86 | {% endblock %}
87 |
88 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | =====
2 | Nexus
3 | =====
4 |
5 | .. image:: https://img.shields.io/pypi/v/nexus-yplan.svg
6 | :target: https://pypi.python.org/pypi/nexus-yplan
7 |
8 | .. image:: https://travis-ci.org/adamchainz/nexus.svg?branch=master
9 | :target: https://travis-ci.org/adamchainz/nexus
10 |
11 | **Retired: this project is no longer maintained.** I (Adam Johnson) no longer
12 | have time to continue maintaining this. I was doing so to support
13 | `gargoyle-yplan `__, a fork for my
14 | ex-employer YPlan. If you'd like to sponsor ongoing maintenance or take it over
15 | yourself, please contact me@adamj.eu.
16 |
17 | Nexus is a pluggable admin application in Django. It's designed to give you a simple design and architecture for
18 | building admin applications.
19 |
20 | It was originally created by `Disqus `_, but due to the inactivity we at YPlan have taken over maintenance on this fork.
21 |
22 | Screenshot
23 | ----------
24 |
25 | .. image:: https://raw.github.com/adamchainz/nexus/master/screenshot.png
26 |
27 | Requirements
28 | ------------
29 |
30 | Tested with all combinations of:
31 |
32 | * Python: 3.6
33 | * Django: 1.11, 2.0, 2.1, 2.2
34 |
35 | Python 3.4+ supported.
36 |
37 | Installation
38 | ------------
39 |
40 | Install it with **pip**:
41 |
42 | .. code-block:: bash
43 |
44 | pip install nexus-yplan
45 |
46 | Make sure you ``pip uninstall nexus`` first if you're upgrading from the original to this fork - the packages clash.
47 |
48 | You'll need to enable it much like you would ``django.contrib.admin``.
49 |
50 | First, add it to your ``INSTALLED_APPS`` setting:
51 |
52 | .. code-block:: python
53 |
54 | INSTALLED_APPS = (
55 | ...
56 | 'nexus',
57 | )
58 |
59 | ``nexus`` has three dependencies from core Django - ``django.contrib.admin``, ``django.contrib.auth``, and
60 | ``django.contrib.sessions``. If these applications are not in your ``INSTALLED_APPS``, add them; or if you are using a
61 | custom auth system you can skip these requirements by adding the line ``NEXUS_SKIP_INSTALLED_APPS_REQUIREMENTS = True``
62 | to your settings.
63 |
64 | Second, include nexus at some url in your ``urls.py``:
65 |
66 | .. code-block:: python
67 |
68 | import nexus
69 |
70 | # urls.py
71 | urlpatterns = patterns('',
72 | ('^nexus/', include(nexus.site.urls)),
73 | )
74 |
75 | Nexus has autodiscovery similar to Django Admin - it will look in each of your ``INSTALLED_APPS`` for a
76 | ``nexus_modules`` submodule, and import that. This is where the app should declare a ``NexusModule`` subclass and use
77 | ``nexus.site.register`` to add it to the main Nexus site. Thus to add functionality you should install some packages
78 | with modules, or write your own.
79 |
80 |
81 | Available Modules
82 | -----------------
83 |
84 | The following modules are tested against ``nexus-yplan``:
85 |
86 | * `Gargoyle (YPlan fork) `_
87 |
88 | There are also some older applications that provide Nexus modules, however these were only developed against Disqus'
89 | Nexus and not this fork; your mileage may vary:
90 |
91 | * `nexus-memcache `_
92 | * `nexus-redis `_
93 |
94 | If you want to write a module, there are a couple of example modules in ``tests/testapp/nexus_modules.py``, with
95 | templates in ``tests/testapp/templates/nexus/example``. Also the source code shouldn't be too hard to understand.
96 |
97 |
98 | A Note on Login
99 | ---------------
100 |
101 | Until Version 1.1, Nexus included a login/logout functionality. Unfortunately these were copied and adapted from an old
102 | version of the code in Django Admin, and were thus not up to date with security changes in newer Django versions. Since
103 | keeping them up to date would be a burden, and most sites use Django Admin for adminstrator login, the login/logout
104 | functions have been removed.
105 |
106 | Nexus now relies on Django Admin login, or for users to visit it having logged in through another route.
107 |
108 |
109 | Settings
110 | --------
111 |
112 | Nexus' behaviour can be customized by adding some values to your Django settings.
113 |
114 | Media
115 | ~~~~~
116 |
117 | By default Nexus serves its media files itself through Python, avoiding any configuration to integrate with your
118 | project. This is convenient but can be slow. You can control where the media files are served from with the setting
119 | ``NEXUS_MEDIA_PREFIX``, for example:
120 |
121 | .. code-block:: python
122 |
123 | NEXUS_MEDIA_PREFIX = '/served/here/'
124 |
125 | This will make Nexus write its media URLs using this prefix, where it assumes you have set up serving its files.
126 |
--------------------------------------------------------------------------------
/tests/testapp/templates/nexus/styleguide/index.html:
--------------------------------------------------------------------------------
1 | {% extends "nexus/module.html" %}
2 |
3 | {% block content %}
4 |
H1 Lorem Ipsum
5 |
6 |
H2 Lorem Ipsum
7 |
8 |
9 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dignissim malesuada iaculis. Morbi vitae turpis eget libero pellentesque tincidunt. Vestibulum blandit a erat sed pretium. Aenean aliquet purus ipsum, at elementum risus eleifend vitae. Integer eu lorem quam. Aliquam et tellus tincidunt, lobortis massa id, euismod dui. Vivamus lectus ligula, placerat in velit feugiat, molestie tempus enim. Nunc interdum dignissim nunc ac blandit. Integer lobortis ultrices dui nec sagittis. Etiam lobortis lacinia maximus. Donec interdum tempus justo, eget sagittis leo sagittis vel. Donec tincidunt congue ipsum, eu fringilla ligula porttitor eget.
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
Lots of Ipsum to make the page extend beyond one screen to test scrolling behaviour
31 |
32 |
33 | Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.
34 |
', klass)
258 | }
259 | image.src = href
260 | }
261 |
262 | function fillFaceboxFromAjax(href, klass) {
263 | $.facebox.jqxhr = $.get(href, function(data) { $.facebox.reveal(data, klass) })
264 | }
265 |
266 | function skipOverlay() {
267 | return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null
268 | }
269 |
270 | function showOverlay() {
271 | if (skipOverlay()) return
272 |
273 | if ($('#facebox_overlay').length == 0)
274 | $("body").append('')
275 |
276 | $('#facebox_overlay').hide().addClass("facebox_overlayBG")
277 | .css('opacity', $.facebox.settings.opacity)
278 | .click(function() { $(document).trigger('close.facebox') })
279 | .fadeIn(200)
280 | return false
281 | }
282 |
283 | function hideOverlay() {
284 | if (skipOverlay()) return
285 |
286 | $('#facebox_overlay').fadeOut(200, function(){
287 | $("#facebox_overlay").removeClass("facebox_overlayBG")
288 | $("#facebox_overlay").addClass("facebox_hide")
289 | $("#facebox_overlay").remove()
290 | })
291 |
292 | return false
293 | }
294 |
295 | /*
296 | * Bindings
297 | */
298 |
299 | $(document).bind('close.facebox', function() {
300 | if ($.facebox.jqxhr) {
301 | $.facebox.jqxhr.abort()
302 | $.facebox.jqxhr = null
303 | }
304 | $(document).unbind('keydown.facebox')
305 | $('#facebox').fadeOut(function() {
306 | $('#facebox .content').removeClass().addClass('content')
307 | $('#facebox .loading').remove()
308 | $(document).trigger('afterClose.facebox')
309 | })
310 | hideOverlay()
311 | })
312 |
313 | })(jQuery);
314 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright 2010 DISQUS
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------
/nexus/media/css/nexus.css:
--------------------------------------------------------------------------------
1 | /* http://www.positioniseverything.net/easyclearing.html */
2 | .clearfix:after {
3 | content: ".";
4 | display: block;
5 | height: 0;
6 | clear: both;
7 | visibility: hidden;
8 | }
9 | .clearfix {display: inline-block;}
10 | /* Hides from IE-mac \*/
11 | .clearfix {display: block;}
12 | * html .clearfix {height: 1%;}
13 | /* end hide from IE-mac */
14 |
15 | html * { padding:0; margin:0; }
16 | body * * { padding:0; }
17 | body { font:small sans-serif; background: #E5E5E5;
18 | font-family: "Lucida Grande", "Lucida Sans", verdana, sans-serif;
19 | }
20 |
21 | h1 { font-weight:normal; }
22 | h2 { font-weight: normal; }
23 | h3 { font-weight: normal; }
24 | h4 { font-weight: normal; }
25 | h1 a { color: inherit; text-decoration: none; }
26 | h2 span { font-size:80%; color:#666; font-weight:normal; }
27 |
28 | h1, h2, h3, h4, h5, h6, p, ul,
29 | table, form, pre, ol { margin-bottom: 20px; }
30 | ul { margin: 0 0 20px 20px; }
31 |
32 | a { color: #333; }
33 | a:visited { color: inherit; }
34 |
35 | pre {
36 | display: block;
37 | white-space: pre-wrap; /* CSS-3 */
38 | white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
39 | white-space: -pre-wrap; /* Opera 4-6 */
40 | white-space: -o-pre-wrap; /* Opera 7 */
41 | word-wrap: break-word; /* Internet Explorer 5.5+ */
42 | }
43 |
44 | body {
45 | background-color: #fafafc;
46 | }
47 |
48 | input[type=text], input[type=password], select, textarea {
49 | border: 1px solid #cdd2d6;
50 | border-radius: 4px;
51 | -webkit-border-radius: 4px;
52 | -moz-border-radius: 4px;
53 | -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
54 | -moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
55 | padding: 2px 4px;
56 | }
57 |
58 | fieldset {
59 | border: 1px solid #ccc;
60 | margin-bottom: 20px;
61 | }
62 | fieldset h2 {
63 | padding: 10px 10px 0;
64 | margin-bottom: 10px;
65 | font-size: 1.2em;
66 | color: #5A7C9D;
67 | }
68 | .help {
69 | color: #999;
70 | }
71 |
72 | .wrapper {
73 | position: relative;
74 | min-width: 900px;
75 | max-width: 1000px;
76 | margin: 0 auto;
77 | }
78 |
79 | #header {
80 | background-color: #ffffff;
81 | padding: 20px;
82 | margin: 0 0 20px;
83 | border-bottom: 2px solid #d5d9db;
84 | }
85 |
86 | #header h1, #header h2 {
87 | font-family: 'Raleway', arial, sans-serif;
88 | color: #084e80;
89 | display: inline;
90 | font-size: 20pt;
91 | font-weight: normal;
92 | }
93 |
94 | #header h1 {
95 | margin: -5px 0 -10px;
96 | padding: 5px 0 5px 60px;
97 | background-repeat: no-repeat;
98 | background-position: top middle;
99 | }
100 |
101 | #header h1 img {
102 | position: absolute;
103 | top: -10px;
104 | left: -15px;
105 | z-index: 999;
106 | height: 50px;
107 | width: 58px;
108 | display: block;
109 | }
110 |
111 | #header h2 {
112 | color: #ccc;
113 | }
114 |
115 | #header h2::before {
116 | content: '\007C';
117 | font-size: 25px;
118 | color: #f2f2f2;
119 | margin-right: 5px;
120 | }
121 |
122 | #navigation {
123 | padding: 0 15px;
124 | z-index: 100;
125 | }
126 |
127 | #navigation ul {
128 | list-style: none;
129 | margin: 0;
130 | text-align: right;
131 | }
132 |
133 | #navigation li {
134 | display: inline-block;
135 | }
136 |
137 | #navigation .wrapper > ul > li > a,
138 | #navigation .wrapper > ul > li > span {
139 | color: #666;
140 | display: inline-block;
141 | cursor: pointer;
142 | padding: 10px 20px;
143 | text-decoration: none;
144 | border: 1px solid #d5d9db;
145 | background-color: #eeeeee;
146 | border-bottom: none
147 | }
148 |
149 | #navigation li ul {
150 | position: absolute;
151 | z-index: 101;
152 | display: none;
153 | background: #fff;
154 | }
155 | #navigation li:hover ul {
156 | display: block;
157 | }
158 | #navigation li ul li a {
159 | display: block;
160 | padding: 10px 20px;
161 | text-decoration: none;
162 | }
163 |
164 | #navigation li ul li.selected a {
165 | background: #fff !important;
166 | color: #5A7C9D !important;
167 | }
168 |
169 | #navigation li ul li a:hover {
170 | color: #000;
171 | background: #f3f3f3;
172 | }
173 |
174 | #navigation .wrapper > ul > li.selected > a,
175 | #navigation .wrapper > ul > li.selected > span {
176 | background: #fff !important;
177 | color: #5A7C9D !important;
178 | }
179 | #navigation .wrapper > ul > li > a:hover,
180 | #navigation .wrapper > ul > li:hover > span {
181 | color: #000;
182 | background: #f3f3f3;
183 | }
184 |
185 | #container {
186 | padding: 0 10px 50px 10px;
187 | }
188 | #container .wrapper {
189 | margin: 0 auto 20px;
190 | padding: 20px;
191 | background-color: #fff;
192 | border: 1px solid #d5d9db;
193 | }
194 |
195 | #status {
196 | position: absolute;
197 | right: 20px;
198 | top: 28px;
199 | background: #437ba3 url('../img/loading.gif') 8px center no-repeat;
200 | color: #fff;
201 | width: 25px;
202 | padding: 2px 3px;
203 | -webkit-border-radius: 4px;
204 | -moz-border-radius: 4px;
205 | border-radius: 4px;
206 | text-indent: -10000em;
207 | display: none;
208 | }
209 |
210 | #footer {
211 | background-color: #ffffff;
212 | border-top: 1px solid #d5d9db;
213 | padding: 20px 0;
214 | position: fixed;
215 | bottom: 0;
216 | width: 100%;
217 | }
218 |
219 | #facebox h2 {
220 | font-size: 100%;
221 | font-weight: bold;
222 | text-align: center;
223 | margin-bottom: 20px;
224 | }
225 |
226 | #facebox table.switchForm {
227 | width: 100%;
228 | border-collapse: collapse;
229 | margin: 0;
230 | }
231 |
232 | #facebox table.switchForm th, #facebox table.switchForm td {
233 | vertical-align: top;
234 | }
235 |
236 | #facebox table.switchForm th {
237 | width: 100px;
238 | font-weight: normal;
239 | text-align: right;
240 | padding-right: 10px;
241 | }
242 |
243 | #facebox table.switchForm td input,
244 | #facebox table.switchForm td textarea {
245 | width: 230px;
246 | padding: 2px 3px;
247 | }
248 |
249 | #facebox table.switchForm td p {
250 | margin-top: 5px;
251 | font-size: 80%;
252 | color: #666;
253 | }
254 |
255 | #facebox table.switchForm td textarea {
256 | height: 30px;
257 | }
258 |
259 | #facebox table.switchForm td.buttons {
260 | text-align: right;
261 | }
262 |
263 | /*
264 | * Styles for customized buttons.
265 | * (taken from Disqus code, author Chris Jennings)
266 | */
267 |
268 | .button {
269 | display: inline-block;
270 | margin: 0 1px;
271 | font-size: 13px;
272 | border: 1px solid #94afbd;
273 | text-align: center;
274 | -webkit-border-radius: 4px;
275 | -moz-border-radius: 4px;
276 | border-radius: 4px;
277 | color: #5a7c9d;
278 | font-weight: bold;
279 | background: #FFFFFF;
280 | padding: 8px;
281 | font-family: Arial, Helvetica, Calibri, sans-serif;
282 | position: relative;
283 | vertical-align: text-middle;
284 | text-decoration: none;
285 | }
286 |
287 | .button {
288 | cursor: pointer;
289 | }
290 |
291 | .paging li span,
292 | .button.disabled {
293 | color: #C9D5DF;
294 | border-color: #C9D5DF;
295 | }
296 |
297 | .paging li a:hover,
298 | .button:focus,
299 | .button:hover {
300 | border-color: #7b9cad;
301 | color: #436586;
302 | background: #f0f0f0;
303 | }
304 |
305 | .button.delete:hover,
306 | .button.delete:focus,
307 | .button.delete.hover {
308 | border-color: red;
309 | filter: none;
310 | background: #E25F53;
311 | color: #fff;
312 | text-shadow: 0 1px 0 red;
313 | }
314 |
315 | .button img {
316 | position: relative;
317 | display: inline-block;
318 | vertical-align: text-bottom;
319 | }
320 |
321 | .button.small {
322 | padding: 2px 8px;
323 | font-size: 11px;
324 | line-height: 14px;
325 | }
326 |
327 | .button.small:hover {
328 | background-position: right -126px;
329 | }
330 |
331 | .button.xtrasmall {
332 | padding: 1px 4px;
333 | font-size: 11px;
334 | line-height: 14px;
335 | }
336 |
337 | .button.toggled,
338 | .button.toggled:hover,
339 | .button.toggled:focus {
340 | background: #437ba3;
341 | color: #fff;
342 | border-color: #537789;
343 | }
344 |
345 | #container.login-area .wrapper {
346 | min-width: 0;
347 | width: 300px;
348 | }
349 | #container.login-area p {
350 | margin-bottom: 10px;
351 | }
352 | #container.login-area table { width: 295px; }
353 | #container.login-area td { padding: 2px 0; }
354 | #container.login-area form {
355 | margin-bottom: 0;
356 | }
357 | #container.login-area form .submit {
358 | text-align: right;
359 | }
360 | #container.login-area form td textarea,
361 | #container.login-area form td input {
362 | width: 100%;
363 | }
364 |
365 | #account {
366 | position: absolute;
367 | font-size: 0.9em;
368 | right: 0px;
369 | top: 9px;
370 | }
371 |
372 | .nav {
373 | list-style: none;
374 | margin-left: 0;
375 | }
376 | .nav a { color: inherit; }
377 | .nav li { display: inline; }
378 | .nav li a { display: inline-block; }
379 |
380 | /* breadcrumbs */
381 |
382 | #breadcrumbs {
383 | font-size: 0.9em;
384 | height: 16px;
385 | line-height: 16px;
386 | margin: 0 0 20px;
387 | }
388 | #breadcrumbs li {
389 | list-style: none;
390 | display: inline;
391 | float: left;
392 | }
393 | #breadcrumbs a,
394 | #breadcrumbs span {
395 | font-weight: normal;
396 | text-decoration: none;
397 | }
398 | #breadcrumbs li:after {
399 | content: " > ";
400 | margin-right: 4px;
401 | }
402 | #breadcrumbs li:last-child:after {
403 | content: "";
404 | }
405 | #breadcrumbs a:hover,
406 | #breadcrumbs a:focus {
407 | text-decoration: underline;
408 | }
409 | #breadcrumbs li:last-child {
410 | background: none;
411 | font-weight: bold;
412 | }
413 | #breadcrumbs li:last-child a,
414 | #breadcrumbs li:last-child span {
415 | background: none;
416 | text-decoration: none;
417 | font-weight: inherit;
418 | padding-right: 0;
419 | margin-right: 0;
420 | }
421 | #breadcrumbs li:last-child a:hover,
422 | #breadcrumbs li:last-child a:focus {
423 | text-decoration: underline;
424 | }
425 |
426 | /* dashboard styles */
427 | #dashboard {
428 | text-align: center;
429 | }
430 |
431 | .dashboard-module {
432 | display: inline-block;
433 | border-radius: 6px;
434 | padding: 10px;
435 | margin: 5px;
436 | width: 415px;
437 | vertical-align: top;
438 | }
439 | .dashboard-module-title {
440 | font-weight: bold;
441 | color: #084e80;
442 | border-bottom: 1px solid #d5d9db;
443 | padding-bottom: 10px;
444 | margin-bottom: 10px;
445 | }
446 | .dashboard-module-title .go-link {
447 | margin-left: 5px;
448 | color: #ccc;
449 | font-weight: normal;
450 | font-size: 0.9em;
451 | text-decoration: none;
452 | text-transform: lowercase;
453 | }
454 | .dashboard-module-content {
455 |
456 | }
457 | table {
458 | width: 100%;
459 | }
460 | caption {
461 | margin-bottom: 5px;
462 | }
463 | table tbody th {
464 | padding: 3px;
465 | text-align: right;
466 | }
467 |
468 | .capacity-graph {
469 | height: 1.2em;
470 | margin-bottom: 5px;
471 | background-color: #437ba3;
472 | -webkit-box-shadow: 0.1em 0.1em 0.2em #aaa;
473 | -moz-box-shadow: 0.1em 0.1em 0.2em #aaa;
474 | position: relative;
475 | }
476 |
477 | .capacity-graph div {
478 | height: 1.2em;
479 | background-color: #E84A2F;
480 | }
481 |
482 | .capacity-graph strong {
483 | height: 1.2em;
484 | display: block;
485 | vertical-align: middle;
486 | line-height: 1.7em;
487 | position: absolute;
488 | left: 0;
489 | right: 0;
490 | top: 0;
491 | bottom: 0;
492 | color: #fff;
493 | font-size: 9px;
494 | text-align: center;
495 | }
496 |
--------------------------------------------------------------------------------
/nexus/media/js/lib/jquery.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
2 | (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="