| '+a.addText+""),l=d.find("tr:last a")):(c.filter(":last").after('"),l=c.filter(":last").next().find("a")));l.on("click",function(d){d.preventDefault();d=b("#"+a.prefix+"-empty");
6 | var c=d.clone(!0);c.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+h);c.is("tr")?c.children(":last").append('"):c.is("ul")||c.is("ol")?c.append(''+a.deleteText+""):c.children(":first").append(''+a.deleteText+"");c.find("*").each(function(){f(this,a.prefix,g.val())});c.insertBefore(b(d));
7 | b(g).val(parseInt(g.val(),10)+1);h+=1;""!==e.val()&&0>=e.val()-g.val()&&l.parent().hide();c.find("a."+a.deleteCssClass).on("click",function(d){d.preventDefault();c.remove();--h;a.removed&&a.removed(c);b(document).trigger("formset:removed",[c,a.prefix]);d=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(d.length);(""===e.val()||0 tr",b(d).tabularFormset(d,a.options)}})})})(django.jQuery);
14 |
--------------------------------------------------------------------------------
/static/admin/js/SelectBox.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 | var SelectBox = {
4 | cache: {},
5 | init: function(id) {
6 | var box = document.getElementById(id);
7 | var node;
8 | SelectBox.cache[id] = [];
9 | var cache = SelectBox.cache[id];
10 | var boxOptions = box.options;
11 | var boxOptionsLength = boxOptions.length;
12 | for (var i = 0, j = boxOptionsLength; i < j; i++) {
13 | node = boxOptions[i];
14 | cache.push({value: node.value, text: node.text, displayed: 1});
15 | }
16 | },
17 | redisplay: function(id) {
18 | // Repopulate HTML select box from cache
19 | var box = document.getElementById(id);
20 | var node;
21 | $(box).empty(); // clear all options
22 | var new_options = box.outerHTML.slice(0, -9); // grab just the opening tag
23 | var cache = SelectBox.cache[id];
24 | for (var i = 0, j = cache.length; i < j; i++) {
25 | node = cache[i];
26 | if (node.displayed) {
27 | var new_option = new Option(node.text, node.value, false, false);
28 | // Shows a tooltip when hovering over the option
29 | new_option.setAttribute("title", node.text);
30 | new_options += new_option.outerHTML;
31 | }
32 | }
33 | new_options += '';
34 | box.outerHTML = new_options;
35 | },
36 | filter: function(id, text) {
37 | // Redisplay the HTML select box, displaying only the choices containing ALL
38 | // the words in text. (It's an AND search.)
39 | var tokens = text.toLowerCase().split(/\s+/);
40 | var node, token;
41 | var cache = SelectBox.cache[id];
42 | for (var i = 0, j = cache.length; i < j; i++) {
43 | node = cache[i];
44 | node.displayed = 1;
45 | var node_text = node.text.toLowerCase();
46 | var numTokens = tokens.length;
47 | for (var k = 0; k < numTokens; k++) {
48 | token = tokens[k];
49 | if (node_text.indexOf(token) === -1) {
50 | node.displayed = 0;
51 | break; // Once the first token isn't found we're done
52 | }
53 | }
54 | }
55 | SelectBox.redisplay(id);
56 | },
57 | delete_from_cache: function(id, value) {
58 | var node, delete_index = null;
59 | var cache = SelectBox.cache[id];
60 | for (var i = 0, j = cache.length; i < j; i++) {
61 | node = cache[i];
62 | if (node.value === value) {
63 | delete_index = i;
64 | break;
65 | }
66 | }
67 | cache.splice(delete_index, 1);
68 | },
69 | add_to_cache: function(id, option) {
70 | SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1});
71 | },
72 | cache_contains: function(id, value) {
73 | // Check if an item is contained in the cache
74 | var node;
75 | var cache = SelectBox.cache[id];
76 | for (var i = 0, j = cache.length; i < j; i++) {
77 | node = cache[i];
78 | if (node.value === value) {
79 | return true;
80 | }
81 | }
82 | return false;
83 | },
84 | move: function(from, to) {
85 | var from_box = document.getElementById(from);
86 | var option;
87 | var boxOptions = from_box.options;
88 | var boxOptionsLength = boxOptions.length;
89 | for (var i = 0, j = boxOptionsLength; i < j; i++) {
90 | option = boxOptions[i];
91 | var option_value = option.value;
92 | if (option.selected && SelectBox.cache_contains(from, option_value)) {
93 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1});
94 | SelectBox.delete_from_cache(from, option_value);
95 | }
96 | }
97 | SelectBox.redisplay(from);
98 | SelectBox.redisplay(to);
99 | },
100 | move_all: function(from, to) {
101 | var from_box = document.getElementById(from);
102 | var option;
103 | var boxOptions = from_box.options;
104 | var boxOptionsLength = boxOptions.length;
105 | for (var i = 0, j = boxOptionsLength; i < j; i++) {
106 | option = boxOptions[i];
107 | var option_value = option.value;
108 | if (SelectBox.cache_contains(from, option_value)) {
109 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1});
110 | SelectBox.delete_from_cache(from, option_value);
111 | }
112 | }
113 | SelectBox.redisplay(from);
114 | SelectBox.redisplay(to);
115 | },
116 | sort: function(id) {
117 | SelectBox.cache[id].sort(function(a, b) {
118 | a = a.text.toLowerCase();
119 | b = b.text.toLowerCase();
120 | try {
121 | if (a > b) {
122 | return 1;
123 | }
124 | if (a < b) {
125 | return -1;
126 | }
127 | }
128 | catch (e) {
129 | // silently fail on IE 'unknown' exception
130 | }
131 | return 0;
132 | } );
133 | },
134 | select_all: function(id) {
135 | var box = document.getElementById(id);
136 | var boxOptions = box.options;
137 | var boxOptionsLength = boxOptions.length;
138 | for (var i = 0; i < boxOptionsLength; i++) {
139 | boxOptions[i].selected = 'selected';
140 | }
141 | }
142 | };
143 | window.SelectBox = SelectBox;
144 | })(django.jQuery);
145 |
--------------------------------------------------------------------------------
/static/admin/js/actions.js:
--------------------------------------------------------------------------------
1 | /*global gettext, interpolate, ngettext*/
2 | (function($) {
3 | 'use strict';
4 | var lastChecked;
5 |
6 | $.fn.actions = function(opts) {
7 | var options = $.extend({}, $.fn.actions.defaults, opts);
8 | var actionCheckboxes = $(this);
9 | var list_editable_changed = false;
10 | var showQuestion = function() {
11 | $(options.acrossClears).hide();
12 | $(options.acrossQuestions).show();
13 | $(options.allContainer).hide();
14 | },
15 | showClear = function() {
16 | $(options.acrossClears).show();
17 | $(options.acrossQuestions).hide();
18 | $(options.actionContainer).toggleClass(options.selectedClass);
19 | $(options.allContainer).show();
20 | $(options.counterContainer).hide();
21 | },
22 | reset = function() {
23 | $(options.acrossClears).hide();
24 | $(options.acrossQuestions).hide();
25 | $(options.allContainer).hide();
26 | $(options.counterContainer).show();
27 | },
28 | clearAcross = function() {
29 | reset();
30 | $(options.acrossInput).val(0);
31 | $(options.actionContainer).removeClass(options.selectedClass);
32 | },
33 | checker = function(checked) {
34 | if (checked) {
35 | showQuestion();
36 | } else {
37 | reset();
38 | }
39 | $(actionCheckboxes).prop("checked", checked)
40 | .parent().parent().toggleClass(options.selectedClass, checked);
41 | },
42 | updateCounter = function() {
43 | var sel = $(actionCheckboxes).filter(":checked").length;
44 | // data-actions-icnt is defined in the generated HTML
45 | // and contains the total amount of objects in the queryset
46 | var actions_icnt = $('.action-counter').data('actionsIcnt');
47 | $(options.counterContainer).html(interpolate(
48 | ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), {
49 | sel: sel,
50 | cnt: actions_icnt
51 | }, true));
52 | $(options.allToggle).prop("checked", function() {
53 | var value;
54 | if (sel === actionCheckboxes.length) {
55 | value = true;
56 | showQuestion();
57 | } else {
58 | value = false;
59 | clearAcross();
60 | }
61 | return value;
62 | });
63 | };
64 | // Show counter by default
65 | $(options.counterContainer).show();
66 | // Check state of checkboxes and reinit state if needed
67 | $(this).filter(":checked").each(function(i) {
68 | $(this).parent().parent().toggleClass(options.selectedClass);
69 | updateCounter();
70 | if ($(options.acrossInput).val() === 1) {
71 | showClear();
72 | }
73 | });
74 | $(options.allToggle).show().on('click', function() {
75 | checker($(this).prop("checked"));
76 | updateCounter();
77 | });
78 | $("a", options.acrossQuestions).on('click', function(event) {
79 | event.preventDefault();
80 | $(options.acrossInput).val(1);
81 | showClear();
82 | });
83 | $("a", options.acrossClears).on('click', function(event) {
84 | event.preventDefault();
85 | $(options.allToggle).prop("checked", false);
86 | clearAcross();
87 | checker(0);
88 | updateCounter();
89 | });
90 | lastChecked = null;
91 | $(actionCheckboxes).on('click', function(event) {
92 | if (!event) { event = window.event; }
93 | var target = event.target ? event.target : event.srcElement;
94 | if (lastChecked && $.data(lastChecked) !== $.data(target) && event.shiftKey === true) {
95 | var inrange = false;
96 | $(lastChecked).prop("checked", target.checked)
97 | .parent().parent().toggleClass(options.selectedClass, target.checked);
98 | $(actionCheckboxes).each(function() {
99 | if ($.data(this) === $.data(lastChecked) || $.data(this) === $.data(target)) {
100 | inrange = (inrange) ? false : true;
101 | }
102 | if (inrange) {
103 | $(this).prop("checked", target.checked)
104 | .parent().parent().toggleClass(options.selectedClass, target.checked);
105 | }
106 | });
107 | }
108 | $(target).parent().parent().toggleClass(options.selectedClass, target.checked);
109 | lastChecked = target;
110 | updateCounter();
111 | });
112 | $('form#changelist-form table#result_list tr').on('change', 'td:gt(0) :input', function() {
113 | list_editable_changed = true;
114 | });
115 | $('form#changelist-form button[name="index"]').on('click', function(event) {
116 | if (list_editable_changed) {
117 | return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."));
118 | }
119 | });
120 | $('form#changelist-form input[name="_save"]').on('click', function(event) {
121 | var action_changed = false;
122 | $('select option:selected', options.actionContainer).each(function() {
123 | if ($(this).val()) {
124 | action_changed = true;
125 | }
126 | });
127 | if (action_changed) {
128 | if (list_editable_changed) {
129 | return confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action."));
130 | } else {
131 | return confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."));
132 | }
133 | }
134 | });
135 | };
136 | /* Setup plugin defaults */
137 | $.fn.actions.defaults = {
138 | actionContainer: "div.actions",
139 | counterContainer: "span.action-counter",
140 | allContainer: "div.actions span.all",
141 | acrossInput: "div.actions input.select-across",
142 | acrossQuestions: "div.actions span.question",
143 | acrossClears: "div.actions span.clear",
144 | allToggle: "#action-toggle",
145 | selectedClass: "selected"
146 | };
147 | $(document).ready(function() {
148 | var $actionsEls = $('tr input.action-select');
149 | if ($actionsEls.length > 0) {
150 | $actionsEls.actions();
151 | }
152 | });
153 | })(django.jQuery);
154 |
--------------------------------------------------------------------------------
/static/admin/js/admin/RelatedObjectLookups.js:
--------------------------------------------------------------------------------
1 | /*global SelectBox, interpolate*/
2 | // Handles related-objects functionality: lookup link for raw_id_fields
3 | // and Add Another links.
4 |
5 | (function($) {
6 | 'use strict';
7 |
8 | // IE doesn't accept periods or dashes in the window name, but the element IDs
9 | // we use to generate popup window names may contain them, therefore we map them
10 | // to allowed characters in a reversible way so that we can locate the correct
11 | // element when the popup window is dismissed.
12 | function id_to_windowname(text) {
13 | text = text.replace(/\./g, '__dot__');
14 | text = text.replace(/\-/g, '__dash__');
15 | return text;
16 | }
17 |
18 | function windowname_to_id(text) {
19 | text = text.replace(/__dot__/g, '.');
20 | text = text.replace(/__dash__/g, '-');
21 | return text;
22 | }
23 |
24 | function showAdminPopup(triggeringLink, name_regexp, add_popup) {
25 | var name = triggeringLink.id.replace(name_regexp, '');
26 | name = id_to_windowname(name);
27 | var href = triggeringLink.href;
28 | if (add_popup) {
29 | if (href.indexOf('?') === -1) {
30 | href += '?_popup=1';
31 | } else {
32 | href += '&_popup=1';
33 | }
34 | }
35 | var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
36 | win.focus();
37 | return false;
38 | }
39 |
40 | function showRelatedObjectLookupPopup(triggeringLink) {
41 | return showAdminPopup(triggeringLink, /^lookup_/, true);
42 | }
43 |
44 | function dismissRelatedLookupPopup(win, chosenId) {
45 | var name = windowname_to_id(win.name);
46 | var elem = document.getElementById(name);
47 | if (elem.className.indexOf('vManyToManyRawIdAdminField') !== -1 && elem.value) {
48 | elem.value += ',' + chosenId;
49 | } else {
50 | document.getElementById(name).value = chosenId;
51 | }
52 | win.close();
53 | }
54 |
55 | function showRelatedObjectPopup(triggeringLink) {
56 | return showAdminPopup(triggeringLink, /^(change|add|delete)_/, false);
57 | }
58 |
59 | function updateRelatedObjectLinks(triggeringLink) {
60 | var $this = $(triggeringLink);
61 | var siblings = $this.nextAll('.view-related, .change-related, .delete-related');
62 | if (!siblings.length) {
63 | return;
64 | }
65 | var value = $this.val();
66 | if (value) {
67 | siblings.each(function() {
68 | var elm = $(this);
69 | elm.attr('href', elm.attr('data-href-template').replace('__fk__', value));
70 | });
71 | } else {
72 | siblings.removeAttr('href');
73 | }
74 | }
75 |
76 | function dismissAddRelatedObjectPopup(win, newId, newRepr) {
77 | var name = windowname_to_id(win.name);
78 | var elem = document.getElementById(name);
79 | if (elem) {
80 | var elemName = elem.nodeName.toUpperCase();
81 | if (elemName === 'SELECT') {
82 | elem.options[elem.options.length] = new Option(newRepr, newId, true, true);
83 | } else if (elemName === 'INPUT') {
84 | if (elem.className.indexOf('vManyToManyRawIdAdminField') !== -1 && elem.value) {
85 | elem.value += ',' + newId;
86 | } else {
87 | elem.value = newId;
88 | }
89 | }
90 | // Trigger a change event to update related links if required.
91 | $(elem).trigger('change');
92 | } else {
93 | var toId = name + "_to";
94 | var o = new Option(newRepr, newId);
95 | SelectBox.add_to_cache(toId, o);
96 | SelectBox.redisplay(toId);
97 | }
98 | win.close();
99 | }
100 |
101 | function dismissChangeRelatedObjectPopup(win, objId, newRepr, newId) {
102 | var id = windowname_to_id(win.name).replace(/^edit_/, '');
103 | var selectsSelector = interpolate('#%s, #%s_from, #%s_to', [id, id, id]);
104 | var selects = $(selectsSelector);
105 | selects.find('option').each(function() {
106 | if (this.value === objId) {
107 | this.textContent = newRepr;
108 | this.value = newId;
109 | }
110 | });
111 | selects.next().find('.select2-selection__rendered').each(function() {
112 | // The element can have a clear button as a child.
113 | // Use the lastChild to modify only the displayed value.
114 | this.lastChild.textContent = newRepr;
115 | this.title = newRepr;
116 | });
117 | win.close();
118 | }
119 |
120 | function dismissDeleteRelatedObjectPopup(win, objId) {
121 | var id = windowname_to_id(win.name).replace(/^delete_/, '');
122 | var selectsSelector = interpolate('#%s, #%s_from, #%s_to', [id, id, id]);
123 | var selects = $(selectsSelector);
124 | selects.find('option').each(function() {
125 | if (this.value === objId) {
126 | $(this).remove();
127 | }
128 | }).trigger('change');
129 | win.close();
130 | }
131 |
132 | // Global for testing purposes
133 | window.id_to_windowname = id_to_windowname;
134 | window.windowname_to_id = windowname_to_id;
135 |
136 | window.showRelatedObjectLookupPopup = showRelatedObjectLookupPopup;
137 | window.dismissRelatedLookupPopup = dismissRelatedLookupPopup;
138 | window.showRelatedObjectPopup = showRelatedObjectPopup;
139 | window.updateRelatedObjectLinks = updateRelatedObjectLinks;
140 | window.dismissAddRelatedObjectPopup = dismissAddRelatedObjectPopup;
141 | window.dismissChangeRelatedObjectPopup = dismissChangeRelatedObjectPopup;
142 | window.dismissDeleteRelatedObjectPopup = dismissDeleteRelatedObjectPopup;
143 |
144 | // Kept for backward compatibility
145 | window.showAddAnotherPopup = showRelatedObjectPopup;
146 | window.dismissAddAnotherPopup = dismissAddRelatedObjectPopup;
147 |
148 | $(document).ready(function() {
149 | $("a[data-popup-opener]").on('click', function(event) {
150 | event.preventDefault();
151 | opener.dismissRelatedLookupPopup(window, $(this).data("popup-opener"));
152 | });
153 | $('body').on('click', '.related-widget-wrapper-link', function(e) {
154 | e.preventDefault();
155 | if (this.href) {
156 | var event = $.Event('django:show-related', {href: this.href});
157 | $(this).trigger(event);
158 | if (!event.isDefaultPrevented()) {
159 | showRelatedObjectPopup(this);
160 | }
161 | }
162 | });
163 | $('body').on('change', '.related-widget-wrapper select', function(e) {
164 | var event = $.Event('django:update-related');
165 | $(this).trigger(event);
166 | if (!event.isDefaultPrevented()) {
167 | updateRelatedObjectLinks(this);
168 | }
169 | });
170 | $('.related-widget-wrapper select').trigger('change');
171 | $('body').on('click', '.related-lookup', function(e) {
172 | e.preventDefault();
173 | var event = $.Event('django:lookup-related');
174 | $(this).trigger(event);
175 | if (!event.isDefaultPrevented()) {
176 | showRelatedObjectLookupPopup(this);
177 | }
178 | });
179 | });
180 |
181 | })(django.jQuery);
182 |
--------------------------------------------------------------------------------
/static/admin/css/changelists.css:
--------------------------------------------------------------------------------
1 | /* CHANGELISTS */
2 |
3 | #changelist {
4 | position: relative;
5 | width: 100%;
6 | }
7 |
8 | #changelist table {
9 | width: 100%;
10 | }
11 |
12 | .change-list .hiddenfields { display:none; }
13 |
14 | .change-list .filtered table {
15 | border-right: none;
16 | }
17 |
18 | .change-list .filtered {
19 | min-height: 400px;
20 | }
21 |
22 | .change-list .filtered .results, .change-list .filtered .paginator,
23 | .filtered #toolbar, .filtered div.xfull {
24 | margin-right: 280px;
25 | width: auto;
26 | }
27 |
28 | .change-list .filtered table tbody th {
29 | padding-right: 1em;
30 | }
31 |
32 | #changelist-form .results {
33 | overflow-x: auto;
34 | }
35 |
36 | #changelist .toplinks {
37 | border-bottom: 1px solid #ddd;
38 | }
39 |
40 | #changelist .paginator {
41 | color: #666;
42 | border-bottom: 1px solid #eee;
43 | background: #fff;
44 | overflow: hidden;
45 | }
46 |
47 | /* CHANGELIST TABLES */
48 |
49 | #changelist table thead th {
50 | padding: 0;
51 | white-space: nowrap;
52 | vertical-align: middle;
53 | }
54 |
55 | #changelist table thead th.action-checkbox-column {
56 | width: 1.5em;
57 | text-align: center;
58 | }
59 |
60 | #changelist table tbody td.action-checkbox {
61 | text-align: center;
62 | }
63 |
64 | #changelist table tfoot {
65 | color: #666;
66 | }
67 |
68 | /* TOOLBAR */
69 |
70 | #changelist #toolbar {
71 | padding: 8px 10px;
72 | margin-bottom: 15px;
73 | border-top: 1px solid #eee;
74 | border-bottom: 1px solid #eee;
75 | background: #f8f8f8;
76 | color: #666;
77 | }
78 |
79 | #changelist #toolbar form input {
80 | border-radius: 4px;
81 | font-size: 14px;
82 | padding: 5px;
83 | color: #333;
84 | }
85 |
86 | #changelist #toolbar form #searchbar {
87 | height: 19px;
88 | border: 1px solid #ccc;
89 | padding: 2px 5px;
90 | margin: 0;
91 | vertical-align: top;
92 | font-size: 13px;
93 | }
94 |
95 | #changelist #toolbar form #searchbar:focus {
96 | border-color: #999;
97 | }
98 |
99 | #changelist #toolbar form input[type="submit"] {
100 | border: 1px solid #ccc;
101 | padding: 2px 10px;
102 | margin: 0;
103 | vertical-align: middle;
104 | background: #fff;
105 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
106 | cursor: pointer;
107 | color: #333;
108 | }
109 |
110 | #changelist #toolbar form input[type="submit"]:focus,
111 | #changelist #toolbar form input[type="submit"]:hover {
112 | border-color: #999;
113 | }
114 |
115 | #changelist #changelist-search img {
116 | vertical-align: middle;
117 | margin-right: 4px;
118 | }
119 |
120 | /* FILTER COLUMN */
121 |
122 | #changelist-filter {
123 | position: absolute;
124 | top: 0;
125 | right: 0;
126 | z-index: 1000;
127 | width: 240px;
128 | background: #f8f8f8;
129 | border-left: none;
130 | margin: 0;
131 | }
132 |
133 | #changelist-filter h2 {
134 | font-size: 14px;
135 | text-transform: uppercase;
136 | letter-spacing: 0.5px;
137 | padding: 5px 15px;
138 | margin-bottom: 12px;
139 | border-bottom: none;
140 | }
141 |
142 | #changelist-filter h3 {
143 | font-weight: 400;
144 | font-size: 14px;
145 | padding: 0 15px;
146 | margin-bottom: 10px;
147 | }
148 |
149 | #changelist-filter ul {
150 | margin: 5px 0;
151 | padding: 0 15px 15px;
152 | border-bottom: 1px solid #eaeaea;
153 | }
154 |
155 | #changelist-filter ul:last-child {
156 | border-bottom: none;
157 | padding-bottom: none;
158 | }
159 |
160 | #changelist-filter li {
161 | list-style-type: none;
162 | margin-left: 0;
163 | padding-left: 0;
164 | }
165 |
166 | #changelist-filter a {
167 | display: block;
168 | color: #999;
169 | text-overflow: ellipsis;
170 | overflow-x: hidden;
171 | }
172 |
173 | #changelist-filter li.selected {
174 | border-left: 5px solid #eaeaea;
175 | padding-left: 10px;
176 | margin-left: -15px;
177 | }
178 |
179 | #changelist-filter li.selected a {
180 | color: #5b80b2;
181 | }
182 |
183 | #changelist-filter a:focus, #changelist-filter a:hover,
184 | #changelist-filter li.selected a:focus,
185 | #changelist-filter li.selected a:hover {
186 | color: #036;
187 | }
188 |
189 | /* DATE DRILLDOWN */
190 |
191 | .change-list ul.toplinks {
192 | display: block;
193 | float: left;
194 | padding: 0;
195 | margin: 0;
196 | width: 100%;
197 | }
198 |
199 | .change-list ul.toplinks li {
200 | padding: 3px 6px;
201 | font-weight: bold;
202 | list-style-type: none;
203 | display: inline-block;
204 | }
205 |
206 | .change-list ul.toplinks .date-back a {
207 | color: #999;
208 | }
209 |
210 | .change-list ul.toplinks .date-back a:focus,
211 | .change-list ul.toplinks .date-back a:hover {
212 | color: #036;
213 | }
214 |
215 | /* PAGINATOR */
216 |
217 | .paginator {
218 | font-size: 13px;
219 | padding-top: 10px;
220 | padding-bottom: 10px;
221 | line-height: 22px;
222 | margin: 0;
223 | border-top: 1px solid #ddd;
224 | }
225 |
226 | .paginator a:link, .paginator a:visited {
227 | padding: 2px 6px;
228 | background: #79aec8;
229 | text-decoration: none;
230 | color: #fff;
231 | }
232 |
233 | .paginator a.showall {
234 | padding: 0;
235 | border: none;
236 | background: none;
237 | color: #5b80b2;
238 | }
239 |
240 | .paginator a.showall:focus, .paginator a.showall:hover {
241 | background: none;
242 | color: #036;
243 | }
244 |
245 | .paginator .end {
246 | margin-right: 6px;
247 | }
248 |
249 | .paginator .this-page {
250 | padding: 2px 6px;
251 | font-weight: bold;
252 | font-size: 13px;
253 | vertical-align: top;
254 | }
255 |
256 | .paginator a:focus, .paginator a:hover {
257 | color: white;
258 | background: #036;
259 | }
260 |
261 | /* ACTIONS */
262 |
263 | .filtered .actions {
264 | margin-right: 280px;
265 | border-right: none;
266 | }
267 |
268 | #changelist table input {
269 | margin: 0;
270 | vertical-align: baseline;
271 | }
272 |
273 | #changelist table tbody tr.selected {
274 | background-color: #FFFFCC;
275 | }
276 |
277 | #changelist .actions {
278 | padding: 10px;
279 | background: #fff;
280 | border-top: none;
281 | border-bottom: none;
282 | line-height: 24px;
283 | color: #999;
284 | }
285 |
286 | #changelist .actions.selected {
287 | background: #fffccf;
288 | border-top: 1px solid #fffee8;
289 | border-bottom: 1px solid #edecd6;
290 | }
291 |
292 | #changelist .actions span.all,
293 | #changelist .actions span.action-counter,
294 | #changelist .actions span.clear,
295 | #changelist .actions span.question {
296 | font-size: 13px;
297 | margin: 0 0.5em;
298 | display: none;
299 | }
300 |
301 | #changelist .actions:last-child {
302 | border-bottom: none;
303 | }
304 |
305 | #changelist .actions select {
306 | vertical-align: top;
307 | height: 24px;
308 | background: none;
309 | color: #000;
310 | border: 1px solid #ccc;
311 | border-radius: 4px;
312 | font-size: 14px;
313 | padding: 0 0 0 4px;
314 | margin: 0;
315 | margin-left: 10px;
316 | }
317 |
318 | #changelist .actions select:focus {
319 | border-color: #999;
320 | }
321 |
322 | #changelist .actions label {
323 | display: inline-block;
324 | vertical-align: middle;
325 | font-size: 13px;
326 | }
327 |
328 | #changelist .actions .button {
329 | font-size: 13px;
330 | border: 1px solid #ccc;
331 | border-radius: 4px;
332 | background: #fff;
333 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
334 | cursor: pointer;
335 | height: 24px;
336 | line-height: 1;
337 | padding: 4px 8px;
338 | margin: 0;
339 | color: #333;
340 | }
341 |
342 | #changelist .actions .button:focus, #changelist .actions .button:hover {
343 | border-color: #999;
344 | }
345 |
--------------------------------------------------------------------------------
/static/admin/js/core.js:
--------------------------------------------------------------------------------
1 | // Core javascript helper functions
2 |
3 | // basic browser identification & version
4 | var isOpera = (navigator.userAgent.indexOf("Opera") >= 0) && parseFloat(navigator.appVersion);
5 | var isIE = ((document.all) && (!isOpera)) && parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]);
6 |
7 | // quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]);
8 | function quickElement() {
9 | 'use strict';
10 | var obj = document.createElement(arguments[0]);
11 | if (arguments[2]) {
12 | var textNode = document.createTextNode(arguments[2]);
13 | obj.appendChild(textNode);
14 | }
15 | var len = arguments.length;
16 | for (var i = 3; i < len; i += 2) {
17 | obj.setAttribute(arguments[i], arguments[i + 1]);
18 | }
19 | arguments[1].appendChild(obj);
20 | return obj;
21 | }
22 |
23 | // "a" is reference to an object
24 | function removeChildren(a) {
25 | 'use strict';
26 | while (a.hasChildNodes()) {
27 | a.removeChild(a.lastChild);
28 | }
29 | }
30 |
31 | // ----------------------------------------------------------------------------
32 | // Find-position functions by PPK
33 | // See https://www.quirksmode.org/js/findpos.html
34 | // ----------------------------------------------------------------------------
35 | function findPosX(obj) {
36 | 'use strict';
37 | var curleft = 0;
38 | if (obj.offsetParent) {
39 | while (obj.offsetParent) {
40 | curleft += obj.offsetLeft - ((isOpera) ? 0 : obj.scrollLeft);
41 | obj = obj.offsetParent;
42 | }
43 | // IE offsetParent does not include the top-level
44 | if (isIE && obj.parentElement) {
45 | curleft += obj.offsetLeft - obj.scrollLeft;
46 | }
47 | } else if (obj.x) {
48 | curleft += obj.x;
49 | }
50 | return curleft;
51 | }
52 |
53 | function findPosY(obj) {
54 | 'use strict';
55 | var curtop = 0;
56 | if (obj.offsetParent) {
57 | while (obj.offsetParent) {
58 | curtop += obj.offsetTop - ((isOpera) ? 0 : obj.scrollTop);
59 | obj = obj.offsetParent;
60 | }
61 | // IE offsetParent does not include the top-level
62 | if (isIE && obj.parentElement) {
63 | curtop += obj.offsetTop - obj.scrollTop;
64 | }
65 | } else if (obj.y) {
66 | curtop += obj.y;
67 | }
68 | return curtop;
69 | }
70 |
71 | //-----------------------------------------------------------------------------
72 | // Date object extensions
73 | // ----------------------------------------------------------------------------
74 | (function() {
75 | 'use strict';
76 | Date.prototype.getTwelveHours = function() {
77 | var hours = this.getHours();
78 | if (hours === 0) {
79 | return 12;
80 | }
81 | else {
82 | return hours <= 12 ? hours : hours - 12;
83 | }
84 | };
85 |
86 | Date.prototype.getTwoDigitMonth = function() {
87 | return (this.getMonth() < 9) ? '0' + (this.getMonth() + 1) : (this.getMonth() + 1);
88 | };
89 |
90 | Date.prototype.getTwoDigitDate = function() {
91 | return (this.getDate() < 10) ? '0' + this.getDate() : this.getDate();
92 | };
93 |
94 | Date.prototype.getTwoDigitTwelveHour = function() {
95 | return (this.getTwelveHours() < 10) ? '0' + this.getTwelveHours() : this.getTwelveHours();
96 | };
97 |
98 | Date.prototype.getTwoDigitHour = function() {
99 | return (this.getHours() < 10) ? '0' + this.getHours() : this.getHours();
100 | };
101 |
102 | Date.prototype.getTwoDigitMinute = function() {
103 | return (this.getMinutes() < 10) ? '0' + this.getMinutes() : this.getMinutes();
104 | };
105 |
106 | Date.prototype.getTwoDigitSecond = function() {
107 | return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds();
108 | };
109 |
110 | Date.prototype.getHourMinute = function() {
111 | return this.getTwoDigitHour() + ':' + this.getTwoDigitMinute();
112 | };
113 |
114 | Date.prototype.getHourMinuteSecond = function() {
115 | return this.getTwoDigitHour() + ':' + this.getTwoDigitMinute() + ':' + this.getTwoDigitSecond();
116 | };
117 |
118 | Date.prototype.getFullMonthName = function() {
119 | return typeof window.CalendarNamespace === "undefined"
120 | ? this.getTwoDigitMonth()
121 | : window.CalendarNamespace.monthsOfYear[this.getMonth()];
122 | };
123 |
124 | Date.prototype.strftime = function(format) {
125 | var fields = {
126 | B: this.getFullMonthName(),
127 | c: this.toString(),
128 | d: this.getTwoDigitDate(),
129 | H: this.getTwoDigitHour(),
130 | I: this.getTwoDigitTwelveHour(),
131 | m: this.getTwoDigitMonth(),
132 | M: this.getTwoDigitMinute(),
133 | p: (this.getHours() >= 12) ? 'PM' : 'AM',
134 | S: this.getTwoDigitSecond(),
135 | w: '0' + this.getDay(),
136 | x: this.toLocaleDateString(),
137 | X: this.toLocaleTimeString(),
138 | y: ('' + this.getFullYear()).substr(2, 4),
139 | Y: '' + this.getFullYear(),
140 | '%': '%'
141 | };
142 | var result = '', i = 0;
143 | while (i < format.length) {
144 | if (format.charAt(i) === '%') {
145 | result = result + fields[format.charAt(i + 1)];
146 | ++i;
147 | }
148 | else {
149 | result = result + format.charAt(i);
150 | }
151 | ++i;
152 | }
153 | return result;
154 | };
155 |
156 | // ----------------------------------------------------------------------------
157 | // String object extensions
158 | // ----------------------------------------------------------------------------
159 | String.prototype.pad_left = function(pad_length, pad_string) {
160 | var new_string = this;
161 | for (var i = 0; new_string.length < pad_length; i++) {
162 | new_string = pad_string + new_string;
163 | }
164 | return new_string;
165 | };
166 |
167 | String.prototype.strptime = function(format) {
168 | var split_format = format.split(/[.\-/]/);
169 | var date = this.split(/[.\-/]/);
170 | var i = 0;
171 | var day, month, year;
172 | while (i < split_format.length) {
173 | switch (split_format[i]) {
174 | case "%d":
175 | day = date[i];
176 | break;
177 | case "%m":
178 | month = date[i] - 1;
179 | break;
180 | case "%Y":
181 | year = date[i];
182 | break;
183 | case "%y":
184 | year = date[i];
185 | break;
186 | }
187 | ++i;
188 | }
189 | // Create Date object from UTC since the parsed value is supposed to be
190 | // in UTC, not local time. Also, the calendar uses UTC functions for
191 | // date extraction.
192 | return new Date(Date.UTC(year, month, day));
193 | };
194 |
195 | })();
196 | // ----------------------------------------------------------------------------
197 | // Get the computed style for and element
198 | // ----------------------------------------------------------------------------
199 | function getStyle(oElm, strCssRule) {
200 | 'use strict';
201 | var strValue = "";
202 | if(document.defaultView && document.defaultView.getComputedStyle) {
203 | strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
204 | }
205 | else if(oElm.currentStyle) {
206 | strCssRule = strCssRule.replace(/\-(\w)/g, function(strMatch, p1) {
207 | return p1.toUpperCase();
208 | });
209 | strValue = oElm.currentStyle[strCssRule];
210 | }
211 | return strValue;
212 | }
213 |
--------------------------------------------------------------------------------
/static/admin/js/calendar.js:
--------------------------------------------------------------------------------
1 | /*global gettext, pgettext, get_format, quickElement, removeChildren*/
2 | /*
3 | calendar.js - Calendar functions by Adrian Holovaty
4 | depends on core.js for utility functions like removeChildren or quickElement
5 | */
6 |
7 | (function() {
8 | 'use strict';
9 | // CalendarNamespace -- Provides a collection of HTML calendar-related helper functions
10 | var CalendarNamespace = {
11 | monthsOfYear: [
12 | gettext('January'),
13 | gettext('February'),
14 | gettext('March'),
15 | gettext('April'),
16 | gettext('May'),
17 | gettext('June'),
18 | gettext('July'),
19 | gettext('August'),
20 | gettext('September'),
21 | gettext('October'),
22 | gettext('November'),
23 | gettext('December')
24 | ],
25 | daysOfWeek: [
26 | pgettext('one letter Sunday', 'S'),
27 | pgettext('one letter Monday', 'M'),
28 | pgettext('one letter Tuesday', 'T'),
29 | pgettext('one letter Wednesday', 'W'),
30 | pgettext('one letter Thursday', 'T'),
31 | pgettext('one letter Friday', 'F'),
32 | pgettext('one letter Saturday', 'S')
33 | ],
34 | firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')),
35 | isLeapYear: function(year) {
36 | return (((year % 4) === 0) && ((year % 100) !== 0 ) || ((year % 400) === 0));
37 | },
38 | getDaysInMonth: function(month, year) {
39 | var days;
40 | if (month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12) {
41 | days = 31;
42 | }
43 | else if (month === 4 || month === 6 || month === 9 || month === 11) {
44 | days = 30;
45 | }
46 | else if (month === 2 && CalendarNamespace.isLeapYear(year)) {
47 | days = 29;
48 | }
49 | else {
50 | days = 28;
51 | }
52 | return days;
53 | },
54 | draw: function(month, year, div_id, callback, selected) { // month = 1-12, year = 1-9999
55 | var today = new Date();
56 | var todayDay = today.getDate();
57 | var todayMonth = today.getMonth() + 1;
58 | var todayYear = today.getFullYear();
59 | var todayClass = '';
60 |
61 | // Use UTC functions here because the date field does not contain time
62 | // and using the UTC function variants prevent the local time offset
63 | // from altering the date, specifically the day field. For example:
64 | //
65 | // ```
66 | // var x = new Date('2013-10-02');
67 | // var day = x.getDate();
68 | // ```
69 | //
70 | // The day variable above will be 1 instead of 2 in, say, US Pacific time
71 | // zone.
72 | var isSelectedMonth = false;
73 | if (typeof selected !== 'undefined') {
74 | isSelectedMonth = (selected.getUTCFullYear() === year && (selected.getUTCMonth() + 1) === month);
75 | }
76 |
77 | month = parseInt(month);
78 | year = parseInt(year);
79 | var calDiv = document.getElementById(div_id);
80 | removeChildren(calDiv);
81 | var calTable = document.createElement('table');
82 | quickElement('caption', calTable, CalendarNamespace.monthsOfYear[month - 1] + ' ' + year);
83 | var tableBody = quickElement('tbody', calTable);
84 |
85 | // Draw days-of-week header
86 | var tableRow = quickElement('tr', tableBody);
87 | for (var i = 0; i < 7; i++) {
88 | quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]);
89 | }
90 |
91 | var startingPos = new Date(year, month - 1, 1 - CalendarNamespace.firstDayOfWeek).getDay();
92 | var days = CalendarNamespace.getDaysInMonth(month, year);
93 |
94 | var nonDayCell;
95 |
96 | // Draw blanks before first of month
97 | tableRow = quickElement('tr', tableBody);
98 | for (i = 0; i < startingPos; i++) {
99 | nonDayCell = quickElement('td', tableRow, ' ');
100 | nonDayCell.className = "nonday";
101 | }
102 |
103 | function calendarMonth(y, m) {
104 | function onClick(e) {
105 | e.preventDefault();
106 | callback(y, m, this.textContent);
107 | }
108 | return onClick;
109 | }
110 |
111 | // Draw days of month
112 | var currentDay = 1;
113 | for (i = startingPos; currentDay <= days; i++) {
114 | if (i % 7 === 0 && currentDay !== 1) {
115 | tableRow = quickElement('tr', tableBody);
116 | }
117 | if ((currentDay === todayDay) && (month === todayMonth) && (year === todayYear)) {
118 | todayClass = 'today';
119 | } else {
120 | todayClass = '';
121 | }
122 |
123 | // use UTC function; see above for explanation.
124 | if (isSelectedMonth && currentDay === selected.getUTCDate()) {
125 | if (todayClass !== '') {
126 | todayClass += " ";
127 | }
128 | todayClass += "selected";
129 | }
130 |
131 | var cell = quickElement('td', tableRow, '', 'class', todayClass);
132 | var link = quickElement('a', cell, currentDay, 'href', '#');
133 | link.addEventListener('click', calendarMonth(year, month));
134 | currentDay++;
135 | }
136 |
137 | // Draw blanks after end of month (optional, but makes for valid code)
138 | while (tableRow.childNodes.length < 7) {
139 | nonDayCell = quickElement('td', tableRow, ' ');
140 | nonDayCell.className = "nonday";
141 | }
142 |
143 | calDiv.appendChild(calTable);
144 | }
145 | };
146 |
147 | // Calendar -- A calendar instance
148 | function Calendar(div_id, callback, selected) {
149 | // div_id (string) is the ID of the element in which the calendar will
150 | // be displayed
151 | // callback (string) is the name of a JavaScript function that will be
152 | // called with the parameters (year, month, day) when a day in the
153 | // calendar is clicked
154 | this.div_id = div_id;
155 | this.callback = callback;
156 | this.today = new Date();
157 | this.currentMonth = this.today.getMonth() + 1;
158 | this.currentYear = this.today.getFullYear();
159 | if (typeof selected !== 'undefined') {
160 | this.selected = selected;
161 | }
162 | }
163 | Calendar.prototype = {
164 | drawCurrent: function() {
165 | CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback, this.selected);
166 | },
167 | drawDate: function(month, year, selected) {
168 | this.currentMonth = month;
169 | this.currentYear = year;
170 |
171 | if(selected) {
172 | this.selected = selected;
173 | }
174 |
175 | this.drawCurrent();
176 | },
177 | drawPreviousMonth: function() {
178 | if (this.currentMonth === 1) {
179 | this.currentMonth = 12;
180 | this.currentYear--;
181 | }
182 | else {
183 | this.currentMonth--;
184 | }
185 | this.drawCurrent();
186 | },
187 | drawNextMonth: function() {
188 | if (this.currentMonth === 12) {
189 | this.currentMonth = 1;
190 | this.currentYear++;
191 | }
192 | else {
193 | this.currentMonth++;
194 | }
195 | this.drawCurrent();
196 | },
197 | drawPreviousYear: function() {
198 | this.currentYear--;
199 | this.drawCurrent();
200 | },
201 | drawNextYear: function() {
202 | this.currentYear++;
203 | this.drawCurrent();
204 | }
205 | };
206 | window.Calendar = Calendar;
207 | window.CalendarNamespace = CalendarNamespace;
208 | })();
209 |
--------------------------------------------------------------------------------
/static/admin/js/urlify.js:
--------------------------------------------------------------------------------
1 | /*global XRegExp*/
2 | (function() {
3 | 'use strict';
4 |
5 | var LATIN_MAP = {
6 | 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE',
7 | 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I',
8 | 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O',
9 | 'Õ': 'O', 'Ö': 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U',
10 | 'Ü': 'U', 'Ű': 'U', 'Ý': 'Y', 'Þ': 'TH', 'Ÿ': 'Y', 'ß': 'ss', 'à': 'a',
11 | 'á': 'a', 'â': 'a', 'ã': 'a', 'ä': 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c',
12 | 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', 'ì': 'i', 'í': 'i', 'î': 'i',
13 | 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o',
14 | 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u', 'û': 'u', 'ü': 'u',
15 | 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y'
16 | };
17 | var LATIN_SYMBOLS_MAP = {
18 | '©': '(c)'
19 | };
20 | var GREEK_MAP = {
21 | 'α': 'a', 'β': 'b', 'γ': 'g', 'δ': 'd', 'ε': 'e', 'ζ': 'z', 'η': 'h',
22 | 'θ': '8', 'ι': 'i', 'κ': 'k', 'λ': 'l', 'μ': 'm', 'ν': 'n', 'ξ': '3',
23 | 'ο': 'o', 'π': 'p', 'ρ': 'r', 'σ': 's', 'τ': 't', 'υ': 'y', 'φ': 'f',
24 | 'χ': 'x', 'ψ': 'ps', 'ω': 'w', 'ά': 'a', 'έ': 'e', 'ί': 'i', 'ό': 'o',
25 | 'ύ': 'y', 'ή': 'h', 'ώ': 'w', 'ς': 's', 'ϊ': 'i', 'ΰ': 'y', 'ϋ': 'y',
26 | 'ΐ': 'i', 'Α': 'A', 'Β': 'B', 'Γ': 'G', 'Δ': 'D', 'Ε': 'E', 'Ζ': 'Z',
27 | 'Η': 'H', 'Θ': '8', 'Ι': 'I', 'Κ': 'K', 'Λ': 'L', 'Μ': 'M', 'Ν': 'N',
28 | 'Ξ': '3', 'Ο': 'O', 'Π': 'P', 'Ρ': 'R', 'Σ': 'S', 'Τ': 'T', 'Υ': 'Y',
29 | 'Φ': 'F', 'Χ': 'X', 'Ψ': 'PS', 'Ω': 'W', 'Ά': 'A', 'Έ': 'E', 'Ί': 'I',
30 | 'Ό': 'O', 'Ύ': 'Y', 'Ή': 'H', 'Ώ': 'W', 'Ϊ': 'I', 'Ϋ': 'Y'
31 | };
32 | var TURKISH_MAP = {
33 | 'ş': 's', 'Ş': 'S', 'ı': 'i', 'İ': 'I', 'ç': 'c', 'Ç': 'C', 'ü': 'u',
34 | 'Ü': 'U', 'ö': 'o', 'Ö': 'O', 'ğ': 'g', 'Ğ': 'G'
35 | };
36 | var ROMANIAN_MAP = {
37 | 'ă': 'a', 'î': 'i', 'ș': 's', 'ț': 't', 'â': 'a',
38 | 'Ă': 'A', 'Î': 'I', 'Ș': 'S', 'Ț': 'T', 'Â': 'A'
39 | };
40 | var RUSSIAN_MAP = {
41 | 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', 'е': 'e', 'ё': 'yo',
42 | 'ж': 'zh', 'з': 'z', 'и': 'i', 'й': 'j', 'к': 'k', 'л': 'l', 'м': 'm',
43 | 'н': 'n', 'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u',
44 | 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh', 'щ': 'sh', 'ъ': '',
45 | 'ы': 'y', 'ь': '', 'э': 'e', 'ю': 'yu', 'я': 'ya',
46 | 'А': 'A', 'Б': 'B', 'В': 'V', 'Г': 'G', 'Д': 'D', 'Е': 'E', 'Ё': 'Yo',
47 | 'Ж': 'Zh', 'З': 'Z', 'И': 'I', 'Й': 'J', 'К': 'K', 'Л': 'L', 'М': 'M',
48 | 'Н': 'N', 'О': 'O', 'П': 'P', 'Р': 'R', 'С': 'S', 'Т': 'T', 'У': 'U',
49 | 'Ф': 'F', 'Х': 'H', 'Ц': 'C', 'Ч': 'Ch', 'Ш': 'Sh', 'Щ': 'Sh', 'Ъ': '',
50 | 'Ы': 'Y', 'Ь': '', 'Э': 'E', 'Ю': 'Yu', 'Я': 'Ya'
51 | };
52 | var UKRAINIAN_MAP = {
53 | 'Є': 'Ye', 'І': 'I', 'Ї': 'Yi', 'Ґ': 'G', 'є': 'ye', 'і': 'i',
54 | 'ї': 'yi', 'ґ': 'g'
55 | };
56 | var CZECH_MAP = {
57 | 'č': 'c', 'ď': 'd', 'ě': 'e', 'ň': 'n', 'ř': 'r', 'š': 's', 'ť': 't',
58 | 'ů': 'u', 'ž': 'z', 'Č': 'C', 'Ď': 'D', 'Ě': 'E', 'Ň': 'N', 'Ř': 'R',
59 | 'Š': 'S', 'Ť': 'T', 'Ů': 'U', 'Ž': 'Z'
60 | };
61 | var SLOVAK_MAP = {
62 | 'á': 'a', 'ä': 'a', 'č': 'c', 'ď': 'd', 'é': 'e', 'í': 'i', 'ľ': 'l',
63 | 'ĺ': 'l', 'ň': 'n', 'ó': 'o', 'ô': 'o', 'ŕ': 'r', 'š': 's', 'ť': 't',
64 | 'ú': 'u', 'ý': 'y', 'ž': 'z',
65 | 'Á': 'a', 'Ä': 'A', 'Č': 'C', 'Ď': 'D', 'É': 'E', 'Í': 'I', 'Ľ': 'L',
66 | 'Ĺ': 'L', 'Ň': 'N', 'Ó': 'O', 'Ô': 'O', 'Ŕ': 'R', 'Š': 'S', 'Ť': 'T',
67 | 'Ú': 'U', 'Ý': 'Y', 'Ž': 'Z'
68 | };
69 | var POLISH_MAP = {
70 | 'ą': 'a', 'ć': 'c', 'ę': 'e', 'ł': 'l', 'ń': 'n', 'ó': 'o', 'ś': 's',
71 | 'ź': 'z', 'ż': 'z',
72 | 'Ą': 'A', 'Ć': 'C', 'Ę': 'E', 'Ł': 'L', 'Ń': 'N', 'Ó': 'O', 'Ś': 'S',
73 | 'Ź': 'Z', 'Ż': 'Z'
74 | };
75 | var LATVIAN_MAP = {
76 | 'ā': 'a', 'č': 'c', 'ē': 'e', 'ģ': 'g', 'ī': 'i', 'ķ': 'k', 'ļ': 'l',
77 | 'ņ': 'n', 'š': 's', 'ū': 'u', 'ž': 'z',
78 | 'Ā': 'A', 'Č': 'C', 'Ē': 'E', 'Ģ': 'G', 'Ī': 'I', 'Ķ': 'K', 'Ļ': 'L',
79 | 'Ņ': 'N', 'Š': 'S', 'Ū': 'U', 'Ž': 'Z'
80 | };
81 | var ARABIC_MAP = {
82 | 'أ': 'a', 'ب': 'b', 'ت': 't', 'ث': 'th', 'ج': 'g', 'ح': 'h', 'خ': 'kh', 'د': 'd',
83 | 'ذ': 'th', 'ر': 'r', 'ز': 'z', 'س': 's', 'ش': 'sh', 'ص': 's', 'ض': 'd', 'ط': 't',
84 | 'ظ': 'th', 'ع': 'aa', 'غ': 'gh', 'ف': 'f', 'ق': 'k', 'ك': 'k', 'ل': 'l', 'م': 'm',
85 | 'ن': 'n', 'ه': 'h', 'و': 'o', 'ي': 'y'
86 | };
87 | var LITHUANIAN_MAP = {
88 | 'ą': 'a', 'č': 'c', 'ę': 'e', 'ė': 'e', 'į': 'i', 'š': 's', 'ų': 'u',
89 | 'ū': 'u', 'ž': 'z',
90 | 'Ą': 'A', 'Č': 'C', 'Ę': 'E', 'Ė': 'E', 'Į': 'I', 'Š': 'S', 'Ų': 'U',
91 | 'Ū': 'U', 'Ž': 'Z'
92 | };
93 | var SERBIAN_MAP = {
94 | 'ђ': 'dj', 'ј': 'j', 'љ': 'lj', 'њ': 'nj', 'ћ': 'c', 'џ': 'dz',
95 | 'đ': 'dj', 'Ђ': 'Dj', 'Ј': 'j', 'Љ': 'Lj', 'Њ': 'Nj', 'Ћ': 'C',
96 | 'Џ': 'Dz', 'Đ': 'Dj'
97 | };
98 | var AZERBAIJANI_MAP = {
99 | 'ç': 'c', 'ə': 'e', 'ğ': 'g', 'ı': 'i', 'ö': 'o', 'ş': 's', 'ü': 'u',
100 | 'Ç': 'C', 'Ə': 'E', 'Ğ': 'G', 'İ': 'I', 'Ö': 'O', 'Ş': 'S', 'Ü': 'U'
101 | };
102 | var GEORGIAN_MAP = {
103 | 'ა': 'a', 'ბ': 'b', 'გ': 'g', 'დ': 'd', 'ე': 'e', 'ვ': 'v', 'ზ': 'z',
104 | 'თ': 't', 'ი': 'i', 'კ': 'k', 'ლ': 'l', 'მ': 'm', 'ნ': 'n', 'ო': 'o',
105 | 'პ': 'p', 'ჟ': 'j', 'რ': 'r', 'ს': 's', 'ტ': 't', 'უ': 'u', 'ფ': 'f',
106 | 'ქ': 'q', 'ღ': 'g', 'ყ': 'y', 'შ': 'sh', 'ჩ': 'ch', 'ც': 'c', 'ძ': 'dz',
107 | 'წ': 'w', 'ჭ': 'ch', 'ხ': 'x', 'ჯ': 'j', 'ჰ': 'h'
108 | };
109 |
110 | var ALL_DOWNCODE_MAPS = [
111 | LATIN_MAP,
112 | LATIN_SYMBOLS_MAP,
113 | GREEK_MAP,
114 | TURKISH_MAP,
115 | ROMANIAN_MAP,
116 | RUSSIAN_MAP,
117 | UKRAINIAN_MAP,
118 | CZECH_MAP,
119 | SLOVAK_MAP,
120 | POLISH_MAP,
121 | LATVIAN_MAP,
122 | ARABIC_MAP,
123 | LITHUANIAN_MAP,
124 | SERBIAN_MAP,
125 | AZERBAIJANI_MAP,
126 | GEORGIAN_MAP
127 | ];
128 |
129 | var Downcoder = {
130 | 'Initialize': function() {
131 | if (Downcoder.map) { // already made
132 | return;
133 | }
134 | Downcoder.map = {};
135 | Downcoder.chars = [];
136 | for (var i = 0; i < ALL_DOWNCODE_MAPS.length; i++) {
137 | var lookup = ALL_DOWNCODE_MAPS[i];
138 | for (var c in lookup) {
139 | if (lookup.hasOwnProperty(c)) {
140 | Downcoder.map[c] = lookup[c];
141 | }
142 | }
143 | }
144 | for (var k in Downcoder.map) {
145 | if (Downcoder.map.hasOwnProperty(k)) {
146 | Downcoder.chars.push(k);
147 | }
148 | }
149 | Downcoder.regex = new RegExp(Downcoder.chars.join('|'), 'g');
150 | }
151 | };
152 |
153 | function downcode(slug) {
154 | Downcoder.Initialize();
155 | return slug.replace(Downcoder.regex, function(m) {
156 | return Downcoder.map[m];
157 | });
158 | }
159 |
160 |
161 | function URLify(s, num_chars, allowUnicode) {
162 | // changes, e.g., "Petty theft" to "petty-theft"
163 | // remove all these words from the string before urlifying
164 | if (!allowUnicode) {
165 | s = downcode(s);
166 | }
167 | var hasUnicodeChars = /[^\u0000-\u007f]/.test(s);
168 | // Remove English words only if the string contains ASCII (English)
169 | // characters.
170 | if (!hasUnicodeChars) {
171 | var removeList = [
172 | "a", "an", "as", "at", "before", "but", "by", "for", "from",
173 | "is", "in", "into", "like", "of", "off", "on", "onto", "per",
174 | "since", "than", "the", "this", "that", "to", "up", "via",
175 | "with"
176 | ];
177 | var r = new RegExp('\\b(' + removeList.join('|') + ')\\b', 'gi');
178 | s = s.replace(r, '');
179 | }
180 | // if downcode doesn't hit, the char will be stripped here
181 | if (allowUnicode) {
182 | // Keep Unicode letters including both lowercase and uppercase
183 | // characters, whitespace, and dash; remove other characters.
184 | s = XRegExp.replace(s, XRegExp('[^-_\\p{L}\\p{N}\\s]', 'g'), '');
185 | } else {
186 | s = s.replace(/[^-\w\s]/g, ''); // remove unneeded chars
187 | }
188 | s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
189 | s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens
190 | s = s.substring(0, num_chars); // trim to first num_chars chars
191 | s = s.replace(/-+$/g, ''); // trim any trailing hyphens
192 | return s.toLowerCase(); // convert to lowercase
193 | }
194 | window.URLify = URLify;
195 | })();
196 |
--------------------------------------------------------------------------------
/static/admin/css/autocomplete.css:
--------------------------------------------------------------------------------
1 | select.admin-autocomplete {
2 | width: 20em;
3 | }
4 |
5 | .select2-container--admin-autocomplete.select2-container {
6 | min-height: 30px;
7 | }
8 |
9 | .select2-container--admin-autocomplete .select2-selection--single,
10 | .select2-container--admin-autocomplete .select2-selection--multiple {
11 | min-height: 30px;
12 | padding: 0;
13 | }
14 |
15 | .select2-container--admin-autocomplete.select2-container--focus .select2-selection,
16 | .select2-container--admin-autocomplete.select2-container--open .select2-selection {
17 | border-color: #999;
18 | min-height: 30px;
19 | }
20 |
21 | .select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--single,
22 | .select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--single {
23 | padding: 0;
24 | }
25 |
26 | .select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--multiple,
27 | .select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--multiple {
28 | padding: 0;
29 | }
30 |
31 | .select2-container--admin-autocomplete .select2-selection--single {
32 | background-color: #fff;
33 | border: 1px solid #ccc;
34 | border-radius: 4px;
35 | }
36 |
37 | .select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
38 | color: #444;
39 | line-height: 30px;
40 | }
41 |
42 | .select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
43 | cursor: pointer;
44 | float: right;
45 | font-weight: bold;
46 | }
47 |
48 | .select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
49 | color: #999;
50 | }
51 |
52 | .select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
53 | height: 26px;
54 | position: absolute;
55 | top: 1px;
56 | right: 1px;
57 | width: 20px;
58 | }
59 |
60 | .select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
61 | border-color: #888 transparent transparent transparent;
62 | border-style: solid;
63 | border-width: 5px 4px 0 4px;
64 | height: 0;
65 | left: 50%;
66 | margin-left: -4px;
67 | margin-top: -2px;
68 | position: absolute;
69 | top: 50%;
70 | width: 0;
71 | }
72 |
73 | .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__clear {
74 | float: left;
75 | }
76 |
77 | .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__arrow {
78 | left: 1px;
79 | right: auto;
80 | }
81 |
82 | .select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single {
83 | background-color: #eee;
84 | cursor: default;
85 | }
86 |
87 | .select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single .select2-selection__clear {
88 | display: none;
89 | }
90 |
91 | .select2-container--admin-autocomplete.select2-container--open .select2-selection--single .select2-selection__arrow b {
92 | border-color: transparent transparent #888 transparent;
93 | border-width: 0 4px 5px 4px;
94 | }
95 |
96 | .select2-container--admin-autocomplete .select2-selection--multiple {
97 | background-color: white;
98 | border: 1px solid #ccc;
99 | border-radius: 4px;
100 | cursor: text;
101 | }
102 |
103 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
104 | box-sizing: border-box;
105 | list-style: none;
106 | margin: 0;
107 | padding: 0 5px;
108 | width: 100%;
109 | }
110 |
111 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered li {
112 | list-style: none;
113 | }
114 |
115 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__placeholder {
116 | color: #999;
117 | margin-top: 5px;
118 | float: left;
119 | }
120 |
121 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear {
122 | cursor: pointer;
123 | float: right;
124 | font-weight: bold;
125 | margin: 5px;
126 | }
127 |
128 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice {
129 | background-color: #e4e4e4;
130 | border: 1px solid #ccc;
131 | border-radius: 4px;
132 | cursor: default;
133 | float: left;
134 | margin-right: 5px;
135 | margin-top: 5px;
136 | padding: 0 5px;
137 | }
138 |
139 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove {
140 | color: #999;
141 | cursor: pointer;
142 | display: inline-block;
143 | font-weight: bold;
144 | margin-right: 2px;
145 | }
146 |
147 | .select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove:hover {
148 | color: #333;
149 | }
150 |
151 | .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-search--inline {
152 | float: right;
153 | }
154 |
155 | .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
156 | margin-left: 5px;
157 | margin-right: auto;
158 | }
159 |
160 | .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
161 | margin-left: 2px;
162 | margin-right: auto;
163 | }
164 |
165 | .select2-container--admin-autocomplete.select2-container--focus .select2-selection--multiple {
166 | border: solid #999 1px;
167 | outline: 0;
168 | }
169 |
170 | .select2-container--admin-autocomplete.select2-container--disabled .select2-selection--multiple {
171 | background-color: #eee;
172 | cursor: default;
173 | }
174 |
175 | .select2-container--admin-autocomplete.select2-container--disabled .select2-selection__choice__remove {
176 | display: none;
177 | }
178 |
179 | .select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--multiple {
180 | border-top-left-radius: 0;
181 | border-top-right-radius: 0;
182 | }
183 |
184 | .select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--multiple {
185 | border-bottom-left-radius: 0;
186 | border-bottom-right-radius: 0;
187 | }
188 |
189 | .select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
190 | border: 1px solid #ccc;
191 | }
192 |
193 | .select2-container--admin-autocomplete .select2-search--inline .select2-search__field {
194 | background: transparent;
195 | border: none;
196 | outline: 0;
197 | box-shadow: none;
198 | -webkit-appearance: textfield;
199 | }
200 |
201 | .select2-container--admin-autocomplete .select2-results > .select2-results__options {
202 | max-height: 200px;
203 | overflow-y: auto;
204 | }
205 |
206 | .select2-container--admin-autocomplete .select2-results__option[role=group] {
207 | padding: 0;
208 | }
209 |
210 | .select2-container--admin-autocomplete .select2-results__option[aria-disabled=true] {
211 | color: #999;
212 | }
213 |
214 | .select2-container--admin-autocomplete .select2-results__option[aria-selected=true] {
215 | background-color: #ddd;
216 | }
217 |
218 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option {
219 | padding-left: 1em;
220 | }
221 |
222 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__group {
223 | padding-left: 0;
224 | }
225 |
226 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option {
227 | margin-left: -1em;
228 | padding-left: 2em;
229 | }
230 |
231 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
232 | margin-left: -2em;
233 | padding-left: 3em;
234 | }
235 |
236 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
237 | margin-left: -3em;
238 | padding-left: 4em;
239 | }
240 |
241 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
242 | margin-left: -4em;
243 | padding-left: 5em;
244 | }
245 |
246 | .select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
247 | margin-left: -5em;
248 | padding-left: 6em;
249 | }
250 |
251 | .select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
252 | background-color: #79aec8;
253 | color: white;
254 | }
255 |
256 | .select2-container--admin-autocomplete .select2-results__group {
257 | cursor: default;
258 | display: block;
259 | padding: 6px;
260 | }
261 |
--------------------------------------------------------------------------------
/static/admin/css/forms.css:
--------------------------------------------------------------------------------
1 | @import url('widgets.css');
2 |
3 | /* FORM ROWS */
4 |
5 | .form-row {
6 | overflow: hidden;
7 | padding: 10px;
8 | font-size: 13px;
9 | border-bottom: 1px solid #eee;
10 | }
11 |
12 | .form-row img, .form-row input {
13 | vertical-align: middle;
14 | }
15 |
16 | .form-row label input[type="checkbox"] {
17 | margin-top: 0;
18 | vertical-align: 0;
19 | }
20 |
21 | form .form-row p {
22 | padding-left: 0;
23 | }
24 |
25 | .hidden {
26 | display: none;
27 | }
28 |
29 | /* FORM LABELS */
30 |
31 | label {
32 | font-weight: normal;
33 | color: #666;
34 | font-size: 13px;
35 | }
36 |
37 | .required label, label.required {
38 | font-weight: bold;
39 | color: #333;
40 | }
41 |
42 | /* RADIO BUTTONS */
43 |
44 | form ul.radiolist li {
45 | list-style-type: none;
46 | }
47 |
48 | form ul.radiolist label {
49 | float: none;
50 | display: inline;
51 | }
52 |
53 | form ul.radiolist input[type="radio"] {
54 | margin: -2px 4px 0 0;
55 | padding: 0;
56 | }
57 |
58 | form ul.inline {
59 | margin-left: 0;
60 | padding: 0;
61 | }
62 |
63 | form ul.inline li {
64 | float: left;
65 | padding-right: 7px;
66 | }
67 |
68 | /* ALIGNED FIELDSETS */
69 |
70 | .aligned label {
71 | display: block;
72 | padding: 4px 10px 0 0;
73 | float: left;
74 | width: 160px;
75 | word-wrap: break-word;
76 | line-height: 1;
77 | }
78 |
79 | .aligned label:not(.vCheckboxLabel):after {
80 | content: '';
81 | display: inline-block;
82 | vertical-align: middle;
83 | height: 26px;
84 | }
85 |
86 | .aligned label + p, .aligned label + div.help, .aligned label + div.readonly {
87 | padding: 6px 0;
88 | margin-top: 0;
89 | margin-bottom: 0;
90 | margin-left: 170px;
91 | }
92 |
93 | .aligned ul label {
94 | display: inline;
95 | float: none;
96 | width: auto;
97 | }
98 |
99 | .aligned .form-row input {
100 | margin-bottom: 0;
101 | }
102 |
103 | .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
104 | width: 350px;
105 | }
106 |
107 | form .aligned ul {
108 | margin-left: 160px;
109 | padding-left: 10px;
110 | }
111 |
112 | form .aligned ul.radiolist {
113 | display: inline-block;
114 | margin: 0;
115 | padding: 0;
116 | }
117 |
118 | form .aligned p.help,
119 | form .aligned div.help {
120 | clear: left;
121 | margin-top: 0;
122 | margin-left: 160px;
123 | padding-left: 10px;
124 | }
125 |
126 | form .aligned label + p.help,
127 | form .aligned label + div.help {
128 | margin-left: 0;
129 | padding-left: 0;
130 | }
131 |
132 | form .aligned p.help:last-child,
133 | form .aligned div.help:last-child {
134 | margin-bottom: 0;
135 | padding-bottom: 0;
136 | }
137 |
138 | form .aligned input + p.help,
139 | form .aligned textarea + p.help,
140 | form .aligned select + p.help,
141 | form .aligned input + div.help,
142 | form .aligned textarea + div.help,
143 | form .aligned select + div.help {
144 | margin-left: 160px;
145 | padding-left: 10px;
146 | }
147 |
148 | form .aligned ul li {
149 | list-style: none;
150 | }
151 |
152 | form .aligned table p {
153 | margin-left: 0;
154 | padding-left: 0;
155 | }
156 |
157 | .aligned .vCheckboxLabel {
158 | float: none;
159 | width: auto;
160 | display: inline-block;
161 | vertical-align: -3px;
162 | padding: 0 0 5px 5px;
163 | }
164 |
165 | .aligned .vCheckboxLabel + p.help,
166 | .aligned .vCheckboxLabel + div.help {
167 | margin-top: -4px;
168 | }
169 |
170 | .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
171 | width: 610px;
172 | }
173 |
174 | .checkbox-row p.help,
175 | .checkbox-row div.help {
176 | margin-left: 0;
177 | padding-left: 0;
178 | }
179 |
180 | fieldset .fieldBox {
181 | float: left;
182 | margin-right: 20px;
183 | }
184 |
185 | /* WIDE FIELDSETS */
186 |
187 | .wide label {
188 | width: 200px;
189 | }
190 |
191 | form .wide p,
192 | form .wide input + p.help,
193 | form .wide input + div.help {
194 | margin-left: 200px;
195 | }
196 |
197 | form .wide p.help,
198 | form .wide div.help {
199 | padding-left: 38px;
200 | }
201 |
202 | form div.help ul {
203 | padding-left: 0;
204 | margin-left: 0;
205 | }
206 |
207 | .colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
208 | width: 450px;
209 | }
210 |
211 | /* COLLAPSED FIELDSETS */
212 |
213 | fieldset.collapsed * {
214 | display: none;
215 | }
216 |
217 | fieldset.collapsed h2, fieldset.collapsed {
218 | display: block;
219 | }
220 |
221 | fieldset.collapsed {
222 | border: 1px solid #eee;
223 | border-radius: 4px;
224 | overflow: hidden;
225 | }
226 |
227 | fieldset.collapsed h2 {
228 | background: #f8f8f8;
229 | color: #666;
230 | }
231 |
232 | fieldset .collapse-toggle {
233 | color: #fff;
234 | }
235 |
236 | fieldset.collapsed .collapse-toggle {
237 | background: transparent;
238 | display: inline;
239 | color: #447e9b;
240 | }
241 |
242 | /* MONOSPACE TEXTAREAS */
243 |
244 | fieldset.monospace textarea {
245 | font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
246 | }
247 |
248 | /* SUBMIT ROW */
249 |
250 | .submit-row {
251 | padding: 12px 14px;
252 | margin: 0 0 20px;
253 | background: #f8f8f8;
254 | border: 1px solid #eee;
255 | border-radius: 4px;
256 | text-align: right;
257 | overflow: hidden;
258 | }
259 |
260 | body.popup .submit-row {
261 | overflow: auto;
262 | }
263 |
264 | .submit-row input {
265 | height: 35px;
266 | line-height: 15px;
267 | margin: 0 0 0 5px;
268 | }
269 |
270 | .submit-row input.default {
271 | margin: 0 0 0 8px;
272 | text-transform: uppercase;
273 | }
274 |
275 | .submit-row p {
276 | margin: 0.3em;
277 | }
278 |
279 | .submit-row p.deletelink-box {
280 | float: left;
281 | margin: 0;
282 | }
283 |
284 | .submit-row a.deletelink {
285 | display: block;
286 | background: #ba2121;
287 | border-radius: 4px;
288 | padding: 10px 15px;
289 | height: 15px;
290 | line-height: 15px;
291 | color: #fff;
292 | }
293 |
294 | .submit-row a.closelink {
295 | display: inline-block;
296 | background: #bbbbbb;
297 | border-radius: 4px;
298 | padding: 10px 15px;
299 | height: 15px;
300 | line-height: 15px;
301 | margin: 0 0 0 5px;
302 | color: #fff;
303 | }
304 |
305 | .submit-row a.deletelink:focus,
306 | .submit-row a.deletelink:hover,
307 | .submit-row a.deletelink:active {
308 | background: #a41515;
309 | }
310 |
311 | .submit-row a.closelink:focus,
312 | .submit-row a.closelink:hover,
313 | .submit-row a.closelink:active {
314 | background: #aaaaaa;
315 | }
316 |
317 | /* CUSTOM FORM FIELDS */
318 |
319 | .vSelectMultipleField {
320 | vertical-align: top;
321 | }
322 |
323 | .vCheckboxField {
324 | border: none;
325 | }
326 |
327 | .vDateField, .vTimeField {
328 | margin-right: 2px;
329 | margin-bottom: 4px;
330 | }
331 |
332 | .vDateField {
333 | min-width: 6.85em;
334 | }
335 |
336 | .vTimeField {
337 | min-width: 4.7em;
338 | }
339 |
340 | .vURLField {
341 | width: 30em;
342 | }
343 |
344 | .vLargeTextField, .vXMLLargeTextField {
345 | width: 48em;
346 | }
347 |
348 | .flatpages-flatpage #id_content {
349 | height: 40.2em;
350 | }
351 |
352 | .module table .vPositiveSmallIntegerField {
353 | width: 2.2em;
354 | }
355 |
356 | .vTextField, .vUUIDField {
357 | width: 20em;
358 | }
359 |
360 | .vIntegerField {
361 | width: 5em;
362 | }
363 |
364 | .vBigIntegerField {
365 | width: 10em;
366 | }
367 |
368 | .vForeignKeyRawIdAdminField {
369 | width: 5em;
370 | }
371 |
372 | /* INLINES */
373 |
374 | .inline-group {
375 | padding: 0;
376 | margin: 0 0 30px;
377 | }
378 |
379 | .inline-group thead th {
380 | padding: 8px 10px;
381 | }
382 |
383 | .inline-group .aligned label {
384 | width: 160px;
385 | }
386 |
387 | .inline-related {
388 | position: relative;
389 | }
390 |
391 | .inline-related h3 {
392 | margin: 0;
393 | color: #666;
394 | padding: 5px;
395 | font-size: 13px;
396 | background: #f8f8f8;
397 | border-top: 1px solid #eee;
398 | border-bottom: 1px solid #eee;
399 | }
400 |
401 | .inline-related h3 span.delete {
402 | float: right;
403 | }
404 |
405 | .inline-related h3 span.delete label {
406 | margin-left: 2px;
407 | font-size: 11px;
408 | }
409 |
410 | .inline-related fieldset {
411 | margin: 0;
412 | background: #fff;
413 | border: none;
414 | width: 100%;
415 | }
416 |
417 | .inline-related fieldset.module h3 {
418 | margin: 0;
419 | padding: 2px 5px 3px 5px;
420 | font-size: 11px;
421 | text-align: left;
422 | font-weight: bold;
423 | background: #bcd;
424 | color: #fff;
425 | }
426 |
427 | .inline-group .tabular fieldset.module {
428 | border: none;
429 | }
430 |
431 | .inline-related.tabular fieldset.module table {
432 | width: 100%;
433 | }
434 |
435 | .last-related fieldset {
436 | border: none;
437 | }
438 |
439 | .inline-group .tabular tr.has_original td {
440 | padding-top: 2em;
441 | }
442 |
443 | .inline-group .tabular tr td.original {
444 | padding: 2px 0 0 0;
445 | width: 0;
446 | _position: relative;
447 | }
448 |
449 | .inline-group .tabular th.original {
450 | width: 0px;
451 | padding: 0;
452 | }
453 |
454 | .inline-group .tabular td.original p {
455 | position: absolute;
456 | left: 0;
457 | height: 1.1em;
458 | padding: 2px 9px;
459 | overflow: hidden;
460 | font-size: 9px;
461 | font-weight: bold;
462 | color: #666;
463 | _width: 700px;
464 | }
465 |
466 | .inline-group ul.tools {
467 | padding: 0;
468 | margin: 0;
469 | list-style: none;
470 | }
471 |
472 | .inline-group ul.tools li {
473 | display: inline;
474 | padding: 0 5px;
475 | }
476 |
477 | .inline-group div.add-row,
478 | .inline-group .tabular tr.add-row td {
479 | color: #666;
480 | background: #f8f8f8;
481 | padding: 8px 10px;
482 | border-bottom: 1px solid #eee;
483 | }
484 |
485 | .inline-group .tabular tr.add-row td {
486 | padding: 8px 10px;
487 | border-bottom: 1px solid #eee;
488 | }
489 |
490 | .inline-group ul.tools a.add,
491 | .inline-group div.add-row a,
492 | .inline-group .tabular tr.add-row td a {
493 | background: url(../img/icon-addlink.svg) 0 1px no-repeat;
494 | padding-left: 16px;
495 | font-size: 12px;
496 | }
497 |
498 | .empty-form {
499 | display: none;
500 | }
501 |
502 | /* RELATED FIELD ADD ONE / LOOKUP */
503 |
504 | .add-another, .related-lookup {
505 | margin-left: 5px;
506 | display: inline-block;
507 | vertical-align: middle;
508 | background-repeat: no-repeat;
509 | background-size: 14px;
510 | }
511 |
512 | .add-another {
513 | width: 16px;
514 | height: 16px;
515 | background-image: url(../img/icon-addlink.svg);
516 | }
517 |
518 | .related-lookup {
519 | width: 16px;
520 | height: 16px;
521 | background-image: url(../img/search.svg);
522 | }
523 |
524 | form .related-widget-wrapper ul {
525 | display: inline-block;
526 | margin-left: 0;
527 | padding-left: 0;
528 | }
529 |
530 | .clearable-file-input input {
531 | margin-top: 0;
532 | }
533 |
--------------------------------------------------------------------------------
/static/admin/fonts/LICENSE.txt:
--------------------------------------------------------------------------------
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 [yyyy] [name of copyright owner]
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.
203 |
--------------------------------------------------------------------------------
/static/admin/css/widgets.css:
--------------------------------------------------------------------------------
1 | /* SELECTOR (FILTER INTERFACE) */
2 |
3 | .selector {
4 | width: 800px;
5 | float: left;
6 | }
7 |
8 | .selector select {
9 | width: 380px;
10 | height: 17.2em;
11 | }
12 |
13 | .selector-available, .selector-chosen {
14 | float: left;
15 | width: 380px;
16 | text-align: center;
17 | margin-bottom: 5px;
18 | }
19 |
20 | .selector-chosen select {
21 | border-top: none;
22 | }
23 |
24 | .selector-available h2, .selector-chosen h2 {
25 | border: 1px solid #ccc;
26 | border-radius: 4px 4px 0 0;
27 | }
28 |
29 | .selector-chosen h2 {
30 | background: #79aec8;
31 | color: #fff;
32 | }
33 |
34 | .selector .selector-available h2 {
35 | background: #f8f8f8;
36 | color: #666;
37 | }
38 |
39 | .selector .selector-filter {
40 | background: white;
41 | border: 1px solid #ccc;
42 | border-width: 0 1px;
43 | padding: 8px;
44 | color: #999;
45 | font-size: 10px;
46 | margin: 0;
47 | text-align: left;
48 | }
49 |
50 | .selector .selector-filter label,
51 | .inline-group .aligned .selector .selector-filter label {
52 | float: left;
53 | margin: 7px 0 0;
54 | width: 18px;
55 | height: 18px;
56 | padding: 0;
57 | overflow: hidden;
58 | line-height: 1;
59 | }
60 |
61 | .selector .selector-available input {
62 | width: 320px;
63 | margin-left: 8px;
64 | }
65 |
66 | .selector ul.selector-chooser {
67 | float: left;
68 | width: 22px;
69 | background-color: #eee;
70 | border-radius: 10px;
71 | margin: 10em 5px 0 5px;
72 | padding: 0;
73 | }
74 |
75 | .selector-chooser li {
76 | margin: 0;
77 | padding: 3px;
78 | list-style-type: none;
79 | }
80 |
81 | .selector select {
82 | padding: 0 10px;
83 | margin: 0 0 10px;
84 | border-radius: 0 0 4px 4px;
85 | }
86 |
87 | .selector-add, .selector-remove {
88 | width: 16px;
89 | height: 16px;
90 | display: block;
91 | text-indent: -3000px;
92 | overflow: hidden;
93 | cursor: default;
94 | opacity: 0.3;
95 | }
96 |
97 | .active.selector-add, .active.selector-remove {
98 | opacity: 1;
99 | }
100 |
101 | .active.selector-add:hover, .active.selector-remove:hover {
102 | cursor: pointer;
103 | }
104 |
105 | .selector-add {
106 | background: url(../img/selector-icons.svg) 0 -96px no-repeat;
107 | }
108 |
109 | .active.selector-add:focus, .active.selector-add:hover {
110 | background-position: 0 -112px;
111 | }
112 |
113 | .selector-remove {
114 | background: url(../img/selector-icons.svg) 0 -64px no-repeat;
115 | }
116 |
117 | .active.selector-remove:focus, .active.selector-remove:hover {
118 | background-position: 0 -80px;
119 | }
120 |
121 | a.selector-chooseall, a.selector-clearall {
122 | display: inline-block;
123 | height: 16px;
124 | text-align: left;
125 | margin: 1px auto 3px;
126 | overflow: hidden;
127 | font-weight: bold;
128 | line-height: 16px;
129 | color: #666;
130 | text-decoration: none;
131 | opacity: 0.3;
132 | }
133 |
134 | a.active.selector-chooseall:focus, a.active.selector-clearall:focus,
135 | a.active.selector-chooseall:hover, a.active.selector-clearall:hover {
136 | color: #447e9b;
137 | }
138 |
139 | a.active.selector-chooseall, a.active.selector-clearall {
140 | opacity: 1;
141 | }
142 |
143 | a.active.selector-chooseall:hover, a.active.selector-clearall:hover {
144 | cursor: pointer;
145 | }
146 |
147 | a.selector-chooseall {
148 | padding: 0 18px 0 0;
149 | background: url(../img/selector-icons.svg) right -160px no-repeat;
150 | cursor: default;
151 | }
152 |
153 | a.active.selector-chooseall:focus, a.active.selector-chooseall:hover {
154 | background-position: 100% -176px;
155 | }
156 |
157 | a.selector-clearall {
158 | padding: 0 0 0 18px;
159 | background: url(../img/selector-icons.svg) 0 -128px no-repeat;
160 | cursor: default;
161 | }
162 |
163 | a.active.selector-clearall:focus, a.active.selector-clearall:hover {
164 | background-position: 0 -144px;
165 | }
166 |
167 | /* STACKED SELECTORS */
168 |
169 | .stacked {
170 | float: left;
171 | width: 490px;
172 | }
173 |
174 | .stacked select {
175 | width: 480px;
176 | height: 10.1em;
177 | }
178 |
179 | .stacked .selector-available, .stacked .selector-chosen {
180 | width: 480px;
181 | }
182 |
183 | .stacked .selector-available {
184 | margin-bottom: 0;
185 | }
186 |
187 | .stacked .selector-available input {
188 | width: 422px;
189 | }
190 |
191 | .stacked ul.selector-chooser {
192 | height: 22px;
193 | width: 50px;
194 | margin: 0 0 10px 40%;
195 | background-color: #eee;
196 | border-radius: 10px;
197 | }
198 |
199 | .stacked .selector-chooser li {
200 | float: left;
201 | padding: 3px 3px 3px 5px;
202 | }
203 |
204 | .stacked .selector-chooseall, .stacked .selector-clearall {
205 | display: none;
206 | }
207 |
208 | .stacked .selector-add {
209 | background: url(../img/selector-icons.svg) 0 -32px no-repeat;
210 | cursor: default;
211 | }
212 |
213 | .stacked .active.selector-add {
214 | background-position: 0 -48px;
215 | cursor: pointer;
216 | }
217 |
218 | .stacked .selector-remove {
219 | background: url(../img/selector-icons.svg) 0 0 no-repeat;
220 | cursor: default;
221 | }
222 |
223 | .stacked .active.selector-remove {
224 | background-position: 0 -16px;
225 | cursor: pointer;
226 | }
227 |
228 | .selector .help-icon {
229 | background: url(../img/icon-unknown.svg) 0 0 no-repeat;
230 | display: inline-block;
231 | vertical-align: middle;
232 | margin: -2px 0 0 2px;
233 | width: 13px;
234 | height: 13px;
235 | }
236 |
237 | .selector .selector-chosen .help-icon {
238 | background: url(../img/icon-unknown-alt.svg) 0 0 no-repeat;
239 | }
240 |
241 | .selector .search-label-icon {
242 | background: url(../img/search.svg) 0 0 no-repeat;
243 | display: inline-block;
244 | height: 18px;
245 | width: 18px;
246 | }
247 |
248 | /* DATE AND TIME */
249 |
250 | p.datetime {
251 | line-height: 20px;
252 | margin: 0;
253 | padding: 0;
254 | color: #666;
255 | font-weight: bold;
256 | }
257 |
258 | .datetime span {
259 | white-space: nowrap;
260 | font-weight: normal;
261 | font-size: 11px;
262 | color: #ccc;
263 | }
264 |
265 | .datetime input, .form-row .datetime input.vDateField, .form-row .datetime input.vTimeField {
266 | min-width: 0;
267 | margin-left: 5px;
268 | margin-bottom: 4px;
269 | }
270 |
271 | table p.datetime {
272 | font-size: 11px;
273 | margin-left: 0;
274 | padding-left: 0;
275 | }
276 |
277 | .datetimeshortcuts .clock-icon, .datetimeshortcuts .date-icon {
278 | position: relative;
279 | display: inline-block;
280 | vertical-align: middle;
281 | height: 16px;
282 | width: 16px;
283 | overflow: hidden;
284 | }
285 |
286 | .datetimeshortcuts .clock-icon {
287 | background: url(../img/icon-clock.svg) 0 0 no-repeat;
288 | }
289 |
290 | .datetimeshortcuts a:focus .clock-icon,
291 | .datetimeshortcuts a:hover .clock-icon {
292 | background-position: 0 -16px;
293 | }
294 |
295 | .datetimeshortcuts .date-icon {
296 | background: url(../img/icon-calendar.svg) 0 0 no-repeat;
297 | top: -1px;
298 | }
299 |
300 | .datetimeshortcuts a:focus .date-icon,
301 | .datetimeshortcuts a:hover .date-icon {
302 | background-position: 0 -16px;
303 | }
304 |
305 | .timezonewarning {
306 | font-size: 11px;
307 | color: #999;
308 | }
309 |
310 | /* URL */
311 |
312 | p.url {
313 | line-height: 20px;
314 | margin: 0;
315 | padding: 0;
316 | color: #666;
317 | font-size: 11px;
318 | font-weight: bold;
319 | }
320 |
321 | .url a {
322 | font-weight: normal;
323 | }
324 |
325 | /* FILE UPLOADS */
326 |
327 | p.file-upload {
328 | line-height: 20px;
329 | margin: 0;
330 | padding: 0;
331 | color: #666;
332 | font-size: 11px;
333 | font-weight: bold;
334 | }
335 |
336 | .aligned p.file-upload {
337 | margin-left: 170px;
338 | }
339 |
340 | .file-upload a {
341 | font-weight: normal;
342 | }
343 |
344 | .file-upload .deletelink {
345 | margin-left: 5px;
346 | }
347 |
348 | span.clearable-file-input label {
349 | color: #333;
350 | font-size: 11px;
351 | display: inline;
352 | float: none;
353 | }
354 |
355 | /* CALENDARS & CLOCKS */
356 |
357 | .calendarbox, .clockbox {
358 | margin: 5px auto;
359 | font-size: 12px;
360 | width: 19em;
361 | text-align: center;
362 | background: white;
363 | border: 1px solid #ddd;
364 | border-radius: 4px;
365 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
366 | overflow: hidden;
367 | position: relative;
368 | }
369 |
370 | .clockbox {
371 | width: auto;
372 | }
373 |
374 | .calendar {
375 | margin: 0;
376 | padding: 0;
377 | }
378 |
379 | .calendar table {
380 | margin: 0;
381 | padding: 0;
382 | border-collapse: collapse;
383 | background: white;
384 | width: 100%;
385 | }
386 |
387 | .calendar caption, .calendarbox h2 {
388 | margin: 0;
389 | text-align: center;
390 | border-top: none;
391 | background: #f5dd5d;
392 | font-weight: 700;
393 | font-size: 12px;
394 | color: #333;
395 | }
396 |
397 | .calendar th {
398 | padding: 8px 5px;
399 | background: #f8f8f8;
400 | border-bottom: 1px solid #ddd;
401 | font-weight: 400;
402 | font-size: 12px;
403 | text-align: center;
404 | color: #666;
405 | }
406 |
407 | .calendar td {
408 | font-weight: 400;
409 | font-size: 12px;
410 | text-align: center;
411 | padding: 0;
412 | border-top: 1px solid #eee;
413 | border-bottom: none;
414 | }
415 |
416 | .calendar td.selected a {
417 | background: #79aec8;
418 | color: #fff;
419 | }
420 |
421 | .calendar td.nonday {
422 | background: #f8f8f8;
423 | }
424 |
425 | .calendar td.today a {
426 | font-weight: 700;
427 | }
428 |
429 | .calendar td a, .timelist a {
430 | display: block;
431 | font-weight: 400;
432 | padding: 6px;
433 | text-decoration: none;
434 | color: #444;
435 | }
436 |
437 | .calendar td a:focus, .timelist a:focus,
438 | .calendar td a:hover, .timelist a:hover {
439 | background: #79aec8;
440 | color: white;
441 | }
442 |
443 | .calendar td a:active, .timelist a:active {
444 | background: #417690;
445 | color: white;
446 | }
447 |
448 | .calendarnav {
449 | font-size: 10px;
450 | text-align: center;
451 | color: #ccc;
452 | margin: 0;
453 | padding: 1px 3px;
454 | }
455 |
456 | .calendarnav a:link, #calendarnav a:visited,
457 | #calendarnav a:focus, #calendarnav a:hover {
458 | color: #999;
459 | }
460 |
461 | .calendar-shortcuts {
462 | background: white;
463 | font-size: 11px;
464 | line-height: 11px;
465 | border-top: 1px solid #eee;
466 | padding: 8px 0;
467 | color: #ccc;
468 | }
469 |
470 | .calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
471 | display: block;
472 | position: absolute;
473 | top: 8px;
474 | width: 15px;
475 | height: 15px;
476 | text-indent: -9999px;
477 | padding: 0;
478 | }
479 |
480 | .calendarnav-previous {
481 | left: 10px;
482 | background: url(../img/calendar-icons.svg) 0 0 no-repeat;
483 | }
484 |
485 | .calendarbox .calendarnav-previous:focus,
486 | .calendarbox .calendarnav-previous:hover {
487 | background-position: 0 -15px;
488 | }
489 |
490 | .calendarnav-next {
491 | right: 10px;
492 | background: url(../img/calendar-icons.svg) 0 -30px no-repeat;
493 | }
494 |
495 | .calendarbox .calendarnav-next:focus,
496 | .calendarbox .calendarnav-next:hover {
497 | background-position: 0 -45px;
498 | }
499 |
500 | .calendar-cancel {
501 | margin: 0;
502 | padding: 4px 0;
503 | font-size: 12px;
504 | background: #eee;
505 | border-top: 1px solid #ddd;
506 | color: #333;
507 | }
508 |
509 | .calendar-cancel:focus, .calendar-cancel:hover {
510 | background: #ddd;
511 | }
512 |
513 | .calendar-cancel a {
514 | color: black;
515 | display: block;
516 | }
517 |
518 | ul.timelist, .timelist li {
519 | list-style-type: none;
520 | margin: 0;
521 | padding: 0;
522 | }
523 |
524 | .timelist a {
525 | padding: 2px;
526 | }
527 |
528 | /* EDIT INLINE */
529 |
530 | .inline-deletelink {
531 | float: right;
532 | text-indent: -9999px;
533 | background: url(../img/inline-delete.svg) 0 0 no-repeat;
534 | width: 16px;
535 | height: 16px;
536 | border: 0px none;
537 | }
538 |
539 | .inline-deletelink:focus, .inline-deletelink:hover {
540 | cursor: pointer;
541 | }
542 |
543 | /* RELATED WIDGET WRAPPER */
544 | .related-widget-wrapper {
545 | float: left; /* display properly in form rows with multiple fields */
546 | overflow: hidden; /* clear floated contents */
547 | }
548 |
549 | .related-widget-wrapper-link {
550 | opacity: 0.3;
551 | }
552 |
553 | .related-widget-wrapper-link:link {
554 | opacity: .8;
555 | }
556 |
557 | .related-widget-wrapper-link:link:focus,
558 | .related-widget-wrapper-link:link:hover {
559 | opacity: 1;
560 | }
561 |
562 | select + .related-widget-wrapper-link,
563 | .related-widget-wrapper-link + .related-widget-wrapper-link {
564 | margin-left: 7px;
565 | }
566 |
--------------------------------------------------------------------------------
|