| '+a.addText+""),m=c.find("tr:last a")):(d.filter(":last").after('"),m=d.filter(":last").next().find("a")));m.on("click",function(f){f.preventDefault();f=b("#"+a.prefix+"-empty");
3 | var c=f.clone(!0);c.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+k);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(){h(this,a.prefix,g.val())});c.insertBefore(b(f));
4 | b(g).val(parseInt(g.val(),10)+1);k+=1;""!==e.val()&&0>=e.val()-g.val()&&m.parent().hide();c.find("a."+a.deleteCssClass).on("click",function(f){f.preventDefault();c.remove();--k;a.removed&&a.removed(c);b(document).trigger("formset:removed",[c,a.prefix]);f=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(f.length);(""===e.val()||0 tr",b(c).tabularFormset(c,a.options)}})})})(django.jQuery);
11 |
--------------------------------------------------------------------------------
/mpgWebApp/static/css/owl.carousel.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.2.1
3 | * Copyright 2013-2017 David Deutsch
4 | * Licensed under ()
5 | */
6 | /*
7 | * Owl Carousel - Core
8 | */
9 | .owl-carousel {
10 | display: none;
11 | width: 100%;
12 | -webkit-tap-highlight-color: transparent;
13 | /* position relative and z-index fix webkit rendering fonts issue */
14 | position: relative;
15 | z-index: 1; }
16 | .owl-carousel .owl-stage {
17 | position: relative;
18 | -ms-touch-action: pan-Y;
19 | -moz-backface-visibility: hidden;
20 | /* fix firefox animation glitch */ }
21 | .owl-carousel .owl-stage:after {
22 | content: ".";
23 | display: block;
24 | clear: both;
25 | visibility: hidden;
26 | line-height: 0;
27 | height: 0; }
28 | .owl-carousel .owl-stage-outer {
29 | position: relative;
30 | overflow: hidden;
31 | /* fix for flashing background */
32 | -webkit-transform: translate3d(0px, 0px, 0px); }
33 | .owl-carousel .owl-wrapper,
34 | .owl-carousel .owl-item {
35 | -webkit-backface-visibility: hidden;
36 | -moz-backface-visibility: hidden;
37 | -ms-backface-visibility: hidden;
38 | -webkit-transform: translate3d(0, 0, 0);
39 | -moz-transform: translate3d(0, 0, 0);
40 | -ms-transform: translate3d(0, 0, 0); }
41 | .owl-carousel .owl-item {
42 | position: relative;
43 | min-height: 1px;
44 | float: left;
45 | -webkit-backface-visibility: hidden;
46 | -webkit-tap-highlight-color: transparent;
47 | -webkit-touch-callout: none; }
48 | .owl-carousel .owl-item img {
49 | display: block;
50 | width: 100%; }
51 | .owl-carousel .owl-nav.disabled,
52 | .owl-carousel .owl-dots.disabled {
53 | display: none; }
54 | .owl-carousel .owl-nav .owl-prev,
55 | .owl-carousel .owl-nav .owl-next,
56 | .owl-carousel .owl-dot {
57 | cursor: pointer;
58 | cursor: hand;
59 | -webkit-user-select: none;
60 | -khtml-user-select: none;
61 | -moz-user-select: none;
62 | -ms-user-select: none;
63 | user-select: none; }
64 | .owl-carousel.owl-loaded {
65 | display: block; }
66 | .owl-carousel.owl-loading {
67 | opacity: 0;
68 | display: block; }
69 | .owl-carousel.owl-hidden {
70 | opacity: 0; }
71 | .owl-carousel.owl-refresh .owl-item {
72 | visibility: hidden; }
73 | .owl-carousel.owl-drag .owl-item {
74 | -webkit-user-select: none;
75 | -moz-user-select: none;
76 | -ms-user-select: none;
77 | user-select: none; }
78 | .owl-carousel.owl-grab {
79 | cursor: move;
80 | cursor: grab; }
81 | .owl-carousel.owl-rtl {
82 | direction: rtl; }
83 | .owl-carousel.owl-rtl .owl-item {
84 | float: right; }
85 |
86 | /* No Js */
87 | .no-js .owl-carousel {
88 | display: block; }
89 |
90 | /*
91 | * Owl Carousel - Animate Plugin
92 | */
93 | .owl-carousel .animated {
94 | animation-duration: 1000ms;
95 | animation-fill-mode: both; }
96 |
97 | .owl-carousel .owl-animated-in {
98 | z-index: 0; }
99 |
100 | .owl-carousel .owl-animated-out {
101 | z-index: 1; }
102 |
103 | .owl-carousel .fadeOut {
104 | animation-name: fadeOut; }
105 |
106 | @keyframes fadeOut {
107 | 0% {
108 | opacity: 1; }
109 | 100% {
110 | opacity: 0; } }
111 |
112 | /*
113 | * Owl Carousel - Auto Height Plugin
114 | */
115 | .owl-height {
116 | transition: height 500ms ease-in-out; }
117 |
118 | /*
119 | * Owl Carousel - Lazy Load Plugin
120 | */
121 | .owl-carousel .owl-item .owl-lazy {
122 | opacity: 0;
123 | transition: opacity 400ms ease; }
124 |
125 | .owl-carousel .owl-item img.owl-lazy {
126 | transform-style: preserve-3d; }
127 |
128 | /*
129 | * Owl Carousel - Video Plugin
130 | */
131 | .owl-carousel .owl-video-wrapper {
132 | position: relative;
133 | height: 100%;
134 | background: #000; }
135 |
136 | .owl-carousel .owl-video-play-icon {
137 | position: absolute;
138 | height: 80px;
139 | width: 80px;
140 | left: 50%;
141 | top: 50%;
142 | margin-left: -40px;
143 | margin-top: -40px;
144 | background: url("owl.video.play.png") no-repeat;
145 | cursor: pointer;
146 | z-index: 1;
147 | -webkit-backface-visibility: hidden;
148 | transition: transform 100ms ease; }
149 |
150 | .owl-carousel .owl-video-play-icon:hover {
151 | -ms-transform: scale(1.3, 1.3);
152 | transform: scale(1.3, 1.3); }
153 |
154 | .owl-carousel .owl-video-playing .owl-video-tn,
155 | .owl-carousel .owl-video-playing .owl-video-play-icon {
156 | display: none; }
157 |
158 | .owl-carousel .owl-video-tn {
159 | opacity: 0;
160 | height: 100%;
161 | background-position: center center;
162 | background-repeat: no-repeat;
163 | background-size: contain;
164 | transition: opacity 400ms ease; }
165 |
166 | .owl-carousel .owl-video-frame {
167 | position: relative;
168 | z-index: 1;
169 | height: 100%;
170 | width: 100%; }
171 |
--------------------------------------------------------------------------------
/mpgWebApp/firstPage/static/css/owl.carousel.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.2.1
3 | * Copyright 2013-2017 David Deutsch
4 | * Licensed under ()
5 | */
6 | /*
7 | * Owl Carousel - Core
8 | */
9 | .owl-carousel {
10 | display: none;
11 | width: 100%;
12 | -webkit-tap-highlight-color: transparent;
13 | /* position relative and z-index fix webkit rendering fonts issue */
14 | position: relative;
15 | z-index: 1; }
16 | .owl-carousel .owl-stage {
17 | position: relative;
18 | -ms-touch-action: pan-Y;
19 | -moz-backface-visibility: hidden;
20 | /* fix firefox animation glitch */ }
21 | .owl-carousel .owl-stage:after {
22 | content: ".";
23 | display: block;
24 | clear: both;
25 | visibility: hidden;
26 | line-height: 0;
27 | height: 0; }
28 | .owl-carousel .owl-stage-outer {
29 | position: relative;
30 | overflow: hidden;
31 | /* fix for flashing background */
32 | -webkit-transform: translate3d(0px, 0px, 0px); }
33 | .owl-carousel .owl-wrapper,
34 | .owl-carousel .owl-item {
35 | -webkit-backface-visibility: hidden;
36 | -moz-backface-visibility: hidden;
37 | -ms-backface-visibility: hidden;
38 | -webkit-transform: translate3d(0, 0, 0);
39 | -moz-transform: translate3d(0, 0, 0);
40 | -ms-transform: translate3d(0, 0, 0); }
41 | .owl-carousel .owl-item {
42 | position: relative;
43 | min-height: 1px;
44 | float: left;
45 | -webkit-backface-visibility: hidden;
46 | -webkit-tap-highlight-color: transparent;
47 | -webkit-touch-callout: none; }
48 | .owl-carousel .owl-item img {
49 | display: block;
50 | width: 100%; }
51 | .owl-carousel .owl-nav.disabled,
52 | .owl-carousel .owl-dots.disabled {
53 | display: none; }
54 | .owl-carousel .owl-nav .owl-prev,
55 | .owl-carousel .owl-nav .owl-next,
56 | .owl-carousel .owl-dot {
57 | cursor: pointer;
58 | cursor: hand;
59 | -webkit-user-select: none;
60 | -khtml-user-select: none;
61 | -moz-user-select: none;
62 | -ms-user-select: none;
63 | user-select: none; }
64 | .owl-carousel.owl-loaded {
65 | display: block; }
66 | .owl-carousel.owl-loading {
67 | opacity: 0;
68 | display: block; }
69 | .owl-carousel.owl-hidden {
70 | opacity: 0; }
71 | .owl-carousel.owl-refresh .owl-item {
72 | visibility: hidden; }
73 | .owl-carousel.owl-drag .owl-item {
74 | -webkit-user-select: none;
75 | -moz-user-select: none;
76 | -ms-user-select: none;
77 | user-select: none; }
78 | .owl-carousel.owl-grab {
79 | cursor: move;
80 | cursor: grab; }
81 | .owl-carousel.owl-rtl {
82 | direction: rtl; }
83 | .owl-carousel.owl-rtl .owl-item {
84 | float: right; }
85 |
86 | /* No Js */
87 | .no-js .owl-carousel {
88 | display: block; }
89 |
90 | /*
91 | * Owl Carousel - Animate Plugin
92 | */
93 | .owl-carousel .animated {
94 | animation-duration: 1000ms;
95 | animation-fill-mode: both; }
96 |
97 | .owl-carousel .owl-animated-in {
98 | z-index: 0; }
99 |
100 | .owl-carousel .owl-animated-out {
101 | z-index: 1; }
102 |
103 | .owl-carousel .fadeOut {
104 | animation-name: fadeOut; }
105 |
106 | @keyframes fadeOut {
107 | 0% {
108 | opacity: 1; }
109 | 100% {
110 | opacity: 0; } }
111 |
112 | /*
113 | * Owl Carousel - Auto Height Plugin
114 | */
115 | .owl-height {
116 | transition: height 500ms ease-in-out; }
117 |
118 | /*
119 | * Owl Carousel - Lazy Load Plugin
120 | */
121 | .owl-carousel .owl-item .owl-lazy {
122 | opacity: 0;
123 | transition: opacity 400ms ease; }
124 |
125 | .owl-carousel .owl-item img.owl-lazy {
126 | transform-style: preserve-3d; }
127 |
128 | /*
129 | * Owl Carousel - Video Plugin
130 | */
131 | .owl-carousel .owl-video-wrapper {
132 | position: relative;
133 | height: 100%;
134 | background: #000; }
135 |
136 | .owl-carousel .owl-video-play-icon {
137 | position: absolute;
138 | height: 80px;
139 | width: 80px;
140 | left: 50%;
141 | top: 50%;
142 | margin-left: -40px;
143 | margin-top: -40px;
144 | background: url("owl.video.play.png") no-repeat;
145 | cursor: pointer;
146 | z-index: 1;
147 | -webkit-backface-visibility: hidden;
148 | transition: transform 100ms ease; }
149 |
150 | .owl-carousel .owl-video-play-icon:hover {
151 | -ms-transform: scale(1.3, 1.3);
152 | transform: scale(1.3, 1.3); }
153 |
154 | .owl-carousel .owl-video-playing .owl-video-tn,
155 | .owl-carousel .owl-video-playing .owl-video-play-icon {
156 | display: none; }
157 |
158 | .owl-carousel .owl-video-tn {
159 | opacity: 0;
160 | height: 100%;
161 | background-position: center center;
162 | background-repeat: no-repeat;
163 | background-size: contain;
164 | transition: opacity 400ms ease; }
165 |
166 | .owl-carousel .owl-video-frame {
167 | position: relative;
168 | z-index: 1;
169 | height: 100%;
170 | width: 100%; }
171 |
--------------------------------------------------------------------------------
/mpgWebApp/static/admin/css/rtl.css:
--------------------------------------------------------------------------------
1 | body {
2 | direction: rtl;
3 | }
4 |
5 | /* LOGIN */
6 |
7 | .login .form-row {
8 | float: right;
9 | }
10 |
11 | .login .form-row label {
12 | float: right;
13 | padding-left: 0.5em;
14 | padding-right: 0;
15 | text-align: left;
16 | }
17 |
18 | .login .submit-row {
19 | clear: both;
20 | padding: 1em 9.4em 0 0;
21 | }
22 |
23 | /* GLOBAL */
24 |
25 | th {
26 | text-align: right;
27 | }
28 |
29 | .module h2, .module caption {
30 | text-align: right;
31 | }
32 |
33 | .module ul, .module ol {
34 | margin-left: 0;
35 | margin-right: 1.5em;
36 | }
37 |
38 | .viewlink, .addlink, .changelink {
39 | padding-left: 0;
40 | padding-right: 16px;
41 | background-position: 100% 1px;
42 | }
43 |
44 | .deletelink {
45 | padding-left: 0;
46 | padding-right: 16px;
47 | background-position: 100% 1px;
48 | }
49 |
50 | .object-tools {
51 | float: left;
52 | }
53 |
54 | thead th:first-child,
55 | tfoot td:first-child {
56 | border-left: none;
57 | }
58 |
59 | /* LAYOUT */
60 |
61 | #user-tools {
62 | right: auto;
63 | left: 0;
64 | text-align: left;
65 | }
66 |
67 | div.breadcrumbs {
68 | text-align: right;
69 | }
70 |
71 | #content-main {
72 | float: right;
73 | }
74 |
75 | #content-related {
76 | float: left;
77 | margin-left: -300px;
78 | margin-right: auto;
79 | }
80 |
81 | .colMS {
82 | margin-left: 300px;
83 | margin-right: 0;
84 | }
85 |
86 | /* SORTABLE TABLES */
87 |
88 | table thead th.sorted .sortoptions {
89 | float: left;
90 | }
91 |
92 | thead th.sorted .text {
93 | padding-right: 0;
94 | padding-left: 42px;
95 | }
96 |
97 | /* dashboard styles */
98 |
99 | .dashboard .module table td a {
100 | padding-left: .6em;
101 | padding-right: 16px;
102 | }
103 |
104 | /* changelists styles */
105 |
106 | .change-list .filtered table {
107 | border-left: none;
108 | border-right: 0px none;
109 | }
110 |
111 | #changelist-filter {
112 | right: auto;
113 | left: 0;
114 | border-left: none;
115 | border-right: none;
116 | }
117 |
118 | .change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull {
119 | margin-right: 0;
120 | margin-left: 280px;
121 | }
122 |
123 | #changelist-filter li.selected {
124 | border-left: none;
125 | padding-left: 10px;
126 | margin-left: 0;
127 | border-right: 5px solid #eaeaea;
128 | padding-right: 10px;
129 | margin-right: -15px;
130 | }
131 |
132 | .filtered .actions {
133 | margin-left: 280px;
134 | margin-right: 0;
135 | }
136 |
137 | #changelist table tbody td:first-child, #changelist table tbody th:first-child {
138 | border-right: none;
139 | border-left: none;
140 | }
141 |
142 | /* FORMS */
143 |
144 | .aligned label {
145 | padding: 0 0 3px 1em;
146 | float: right;
147 | }
148 |
149 | .submit-row {
150 | text-align: left
151 | }
152 |
153 | .submit-row p.deletelink-box {
154 | float: right;
155 | }
156 |
157 | .submit-row input.default {
158 | margin-left: 0;
159 | }
160 |
161 | .vDateField, .vTimeField {
162 | margin-left: 2px;
163 | }
164 |
165 | .aligned .form-row input {
166 | margin-left: 5px;
167 | }
168 |
169 | form .aligned p.help, form .aligned div.help {
170 | clear: right;
171 | }
172 |
173 | form .aligned ul {
174 | margin-right: 163px;
175 | margin-left: 0;
176 | }
177 |
178 | form ul.inline li {
179 | float: right;
180 | padding-right: 0;
181 | padding-left: 7px;
182 | }
183 |
184 | input[type=submit].default, .submit-row input.default {
185 | float: left;
186 | }
187 |
188 | fieldset .fieldBox {
189 | float: right;
190 | margin-left: 20px;
191 | margin-right: 0;
192 | }
193 |
194 | .errorlist li {
195 | background-position: 100% 12px;
196 | padding: 0;
197 | }
198 |
199 | .errornote {
200 | background-position: 100% 12px;
201 | padding: 10px 12px;
202 | }
203 |
204 | /* WIDGETS */
205 |
206 | .calendarnav-previous {
207 | top: 0;
208 | left: auto;
209 | right: 10px;
210 | }
211 |
212 | .calendarnav-next {
213 | top: 0;
214 | right: auto;
215 | left: 10px;
216 | }
217 |
218 | .calendar caption, .calendarbox h2 {
219 | text-align: center;
220 | }
221 |
222 | .selector {
223 | float: right;
224 | }
225 |
226 | .selector .selector-filter {
227 | text-align: right;
228 | }
229 |
230 | .inline-deletelink {
231 | float: left;
232 | }
233 |
234 | form .form-row p.datetime {
235 | overflow: hidden;
236 | }
237 |
238 | .related-widget-wrapper {
239 | float: right;
240 | }
241 |
242 | /* MISC */
243 |
244 | .inline-related h2, .inline-group h2 {
245 | text-align: right
246 | }
247 |
248 | .inline-related h3 span.delete {
249 | padding-right: 20px;
250 | padding-left: inherit;
251 | left: 10px;
252 | right: inherit;
253 | float:left;
254 | }
255 |
256 | .inline-related h3 span.delete label {
257 | margin-left: inherit;
258 | margin-right: 2px;
259 | }
260 |
261 | /* IE7 specific bug fixes */
262 |
263 | div.colM {
264 | position: relative;
265 | }
266 |
267 | .submit-row input {
268 | float: left;
269 | }
270 |
--------------------------------------------------------------------------------
/mpgWebApp/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 |
--------------------------------------------------------------------------------
/mpgWebApp/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 | return this.getHours() % 12 || 12;
78 | };
79 |
80 | Date.prototype.getTwoDigitMonth = function() {
81 | return (this.getMonth() < 9) ? '0' + (this.getMonth() + 1) : (this.getMonth() + 1);
82 | };
83 |
84 | Date.prototype.getTwoDigitDate = function() {
85 | return (this.getDate() < 10) ? '0' + this.getDate() : this.getDate();
86 | };
87 |
88 | Date.prototype.getTwoDigitTwelveHour = function() {
89 | return (this.getTwelveHours() < 10) ? '0' + this.getTwelveHours() : this.getTwelveHours();
90 | };
91 |
92 | Date.prototype.getTwoDigitHour = function() {
93 | return (this.getHours() < 10) ? '0' + this.getHours() : this.getHours();
94 | };
95 |
96 | Date.prototype.getTwoDigitMinute = function() {
97 | return (this.getMinutes() < 10) ? '0' + this.getMinutes() : this.getMinutes();
98 | };
99 |
100 | Date.prototype.getTwoDigitSecond = function() {
101 | return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds();
102 | };
103 |
104 | Date.prototype.getFullMonthName = function() {
105 | return typeof window.CalendarNamespace === "undefined"
106 | ? this.getTwoDigitMonth()
107 | : window.CalendarNamespace.monthsOfYear[this.getMonth()];
108 | };
109 |
110 | Date.prototype.strftime = function(format) {
111 | var fields = {
112 | B: this.getFullMonthName(),
113 | c: this.toString(),
114 | d: this.getTwoDigitDate(),
115 | H: this.getTwoDigitHour(),
116 | I: this.getTwoDigitTwelveHour(),
117 | m: this.getTwoDigitMonth(),
118 | M: this.getTwoDigitMinute(),
119 | p: (this.getHours() >= 12) ? 'PM' : 'AM',
120 | S: this.getTwoDigitSecond(),
121 | w: '0' + this.getDay(),
122 | x: this.toLocaleDateString(),
123 | X: this.toLocaleTimeString(),
124 | y: ('' + this.getFullYear()).substr(2, 4),
125 | Y: '' + this.getFullYear(),
126 | '%': '%'
127 | };
128 | var result = '', i = 0;
129 | while (i < format.length) {
130 | if (format.charAt(i) === '%') {
131 | result = result + fields[format.charAt(i + 1)];
132 | ++i;
133 | }
134 | else {
135 | result = result + format.charAt(i);
136 | }
137 | ++i;
138 | }
139 | return result;
140 | };
141 |
142 | // ----------------------------------------------------------------------------
143 | // String object extensions
144 | // ----------------------------------------------------------------------------
145 | String.prototype.strptime = function(format) {
146 | var split_format = format.split(/[.\-/]/);
147 | var date = this.split(/[.\-/]/);
148 | var i = 0;
149 | var day, month, year;
150 | while (i < split_format.length) {
151 | switch (split_format[i]) {
152 | case "%d":
153 | day = date[i];
154 | break;
155 | case "%m":
156 | month = date[i] - 1;
157 | break;
158 | case "%Y":
159 | year = date[i];
160 | break;
161 | case "%y":
162 | year = date[i];
163 | break;
164 | }
165 | ++i;
166 | }
167 | // Create Date object from UTC since the parsed value is supposed to be
168 | // in UTC, not local time. Also, the calendar uses UTC functions for
169 | // date extraction.
170 | return new Date(Date.UTC(year, month, day));
171 | };
172 |
173 | })();
174 |
--------------------------------------------------------------------------------
/mpgWebApp/static/js/wow.min.js:
--------------------------------------------------------------------------------
1 | /*! WOW - v1.0.2 - 2014-10-28
2 | * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
--------------------------------------------------------------------------------
/mpgWebApp/firstPage/static/js/wow.min.js:
--------------------------------------------------------------------------------
1 | /*! WOW - v1.0.2 - 2014-10-28
2 | * Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
--------------------------------------------------------------------------------
/mpgWebApp/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 |
--------------------------------------------------------------------------------
/req.txt:
--------------------------------------------------------------------------------
1 | absl-py==0.7.1
2 | aiohttp==3.5.4
3 | aioredis==1.3.1
4 | alabaster==0.7.12
5 | anaconda-client==1.7.2
6 | anaconda-project==0.8.2
7 | apache-beam==2.16.0
8 | Appium-Python-Client==0.50
9 | asgi-redis==1.4.3
10 | asgiref==3.1.2
11 | asn1crypto==0.24.0
12 | astor==0.7.1
13 | astroid==2.2.5
14 | astropy==3.1.2
15 | async-timeout==3.0.1
16 | atomicwrites==1.3.0
17 | attrs==19.3.0
18 | audioread==2.1.8
19 | Auptimizer==1.2
20 | autobahn==20.4.3
21 | Automat==20.2.0
22 | avro-python3==1.9.1
23 | Babel==2.6.0
24 | backcall==0.1.0
25 | backports.os==0.1.1
26 | backports.shutil-get-terminal-size==1.0.0
27 | beautifulsoup4==4.7.1
28 | bitarray==0.8.3
29 | bkcharts==0.2
30 | bleach==3.1.0
31 | bokeh==1.0.4
32 | boto==2.49.0
33 | boto3==1.10.28
34 | botocore==1.13.28
35 | Bottleneck==1.2.1
36 | branca==0.4.0
37 | certifi==2019.9.11
38 | cffi==1.12.2
39 | channels==2.4.0
40 | channels-redis==2.4.2
41 | chardet==3.0.4
42 | Click==7.0
43 | cloudpickle==1.3.0
44 | clyent==1.2.2
45 | cmdstanpy==0.4.0
46 | colorama==0.4.1
47 | comtypes==1.1.7
48 | constantly==15.1.0
49 | contextlib2==0.5.5
50 | convertdate==2.2.0
51 | coreapi==2.3.3
52 | coreschema==0.0.4
53 | crcmod==1.7
54 | cryptography==2.9.2
55 | cycler==0.10.0
56 | Cython==0.29.6
57 | cytoolz==0.9.0.1
58 | daphne==2.5.0
59 | dash==1.9.1
60 | dash-core-components==1.8.1
61 | dash-html-components==1.0.2
62 | dash-renderer==1.2.4
63 | dash-table==4.6.1
64 | dask==1.1.4
65 | deap==1.2.2
66 | decorator==4.4.0
67 | defusedxml==0.5.0
68 | dill==0.3.0
69 | distributed==1.26.0
70 | Django==2.2.3
71 | django-cors-headers==3.0.1
72 | django-rest-swagger==2.2.0
73 | django-sslserver==0.21
74 | djangorestframework==3.9.4
75 | docopt==0.6.2
76 | docutils==0.14
77 | editdistance==0.5.3
78 | entrypoints==0.3
79 | ephem==3.7.7.1
80 | et-xmlfile==1.0.1
81 | fastavro==0.21.24
82 | fastcache==1.0.2
83 | fire==0.2.1
84 | Flask==1.0.2
85 | Flask-Compress==1.4.0
86 | folium==0.10.1
87 | future==0.18.2
88 | fuzzywuzzy==0.17.0
89 | gast==0.2.2
90 | generateds==2.28a0
91 | gensim==3.8.1
92 | gevent==1.4.0
93 | greenlet==0.4.15
94 | grpcio==1.25.0
95 | gym==0.17.1
96 | h5py==2.9.0
97 | hdfs==2.5.8
98 | heapdict==1.0.0
99 | hiredis==1.0.1
100 | holidays==0.9.11
101 | html5lib==1.0.1
102 | httplib2==0.12.0
103 | hupper==1.9
104 | hyperlink==19.0.0
105 | idna==2.8
106 | idna-ssl==1.1.0
107 | imageio==2.5.0
108 | imagesize==1.1.0
109 | importlib-metadata==0.0.0
110 | imutils==0.5.2
111 | incremental==17.5.0
112 | ipykernel==5.1.0
113 | ipython==7.4.0
114 | ipython-genutils==0.2.0
115 | ipywidgets==7.4.2
116 | isort==4.3.16
117 | itsdangerous==1.1.0
118 | itypes==1.1.0
119 | jdcal==1.4
120 | jedi==0.13.3
121 | Jinja2==2.10
122 | jmespath==0.9.4
123 | joblib==0.14.0
124 | jsonschema==3.0.1
125 | jupyter==1.0.0
126 | jupyter-client==5.2.4
127 | jupyter-console==6.0.0
128 | jupyter-core==4.4.0
129 | jupyterlab==0.35.4
130 | jupyterlab-server==0.2.0
131 | Keras==2.2.4
132 | Keras-Applications==1.0.7
133 | keras-bert==0.81.0
134 | keras-embed-sim==0.7.0
135 | keras-layer-normalization==0.14.0
136 | keras-multi-head==0.22.0
137 | keras-pos-embd==0.11.0
138 | keras-position-wise-feed-forward==0.6.0
139 | Keras-Preprocessing==1.0.9
140 | keras-self-attention==0.41.0
141 | keras-transformer==0.32.0
142 | keras2onnx==1.6.1
143 | keyring==18.0.0
144 | kiwisolver==1.0.1
145 | lazy-object-proxy==1.3.1
146 | librosa==0.7.1
147 | lightgbm==2.2.2
148 | llvmlite==0.28.0
149 | locket==0.2.0
150 | locust==0.0
151 | locustio==0.11.0
152 | LunarCalendar==0.0.9
153 | lunardate==0.2.0
154 | lxml==4.3.2
155 | Markdown==3.1
156 | MarkupSafe==1.1.1
157 | matplotlib==3.0.3
158 | mccabe==0.6.1
159 | menuinst==1.4.16
160 | mistune==0.8.4
161 | mkl-fft==1.0.10
162 | mkl-random==1.0.2
163 | mock==2.0.0
164 | more-itertools==6.0.0
165 | mpmath==1.1.0
166 | mrcnn==0.2
167 | msgpack==0.6.1
168 | msgpack-python==0.5.6
169 | multidict==4.5.2
170 | multipledispatch==0.6.0
171 | mysqlclient==1.4.4
172 | nbconvert==5.4.1
173 | nbformat==4.4.0
174 | netron==4.1.1
175 | networkx==2.2
176 | nltk==3.4
177 | nose==1.3.7
178 | notebook==5.7.8
179 | numba==0.43.1
180 | numexpr==2.6.9
181 | numpy==1.18.2
182 | numpydoc==0.8.0
183 | oauth2client==3.0.0
184 | olefile==0.46
185 | onnx==1.6.0
186 | onnxconverter-common==1.6.0
187 | onnxmltools==1.6.0
188 | onnxruntime==1.2.0
189 | openapi-codec==1.3.2
190 | opencv-python==4.1.0.25
191 | openpyxl==2.6.1
192 | packaging==19.0
193 | paho-mqtt==1.4.0
194 | pandas==0.24.2
195 | pandocfilters==1.4.2
196 | parso==0.3.4
197 | partd==0.3.10
198 | PasteDeploy==2.0.1
199 | path.py==11.5.0
200 | pathlib2==2.3.3
201 | patsy==0.5.1
202 | pbr==5.4.3
203 | pep8==1.7.1
204 | pickleshare==0.7.5
205 | Pillow==6.2.0
206 | plaster==1.0
207 | plaster-pastedeploy==0.7
208 | plotly==4.5.4
209 | pluggy==0.9.0
210 | ply==3.11
211 | prometheus-client==0.6.0
212 | prompt-toolkit==2.0.9
213 | protobuf==3.10.0
214 | psutil==5.6.1
215 | py==1.8.0
216 | pyarrow==0.14.0
217 | pyasn1==0.4.7
218 | pyasn1-modules==0.2.7
219 | pycodestyle==2.5.0
220 | pycosat==0.6.3
221 | pycparser==2.19
222 | pycrypto==2.6.1
223 | pycurl==7.43.0.2
224 | pydot==1.4.1
225 | pyFirmata==1.1.0
226 | pyflakes==2.1.1
227 | pyflink==1.0
228 | pyglet==1.5.0
229 | Pygments==2.3.1
230 | PyHamcrest==2.0.2
231 | pylint==2.3.1
232 | PyMeeus==0.3.6
233 | pymongo==3.9.0
234 | pyodbc==4.0.26
235 | pyOpenSSL==19.0.0
236 | pyparsing==2.4.5
237 | pyramid==1.10.4
238 | pyramid-arima==0.9.0
239 | pyreadline==2.1
240 | pyreadstat==0.2.9
241 | pyrsistent==0.14.11
242 | pyserial==3.4
243 | PySimpleGUI==4.4.1
244 | PySocks==1.6.8
245 | pystan==2.19.0.0
246 | pytest==4.3.1
247 | pytest-arraydiff==0.3
248 | pytest-astropy==0.5.0
249 | pytest-doctestplus==0.3.0
250 | pytest-openfiles==0.3.2
251 | pytest-remotedata==0.3.1
252 | python-dateutil==2.8.0
253 | pytz==2019.3
254 | PyWavelets==1.0.2
255 | pywin32==223
256 | pywinpty==0.5.5
257 | PyYAML==5.1
258 | pyzmq==18.0.0
259 | QtAwesome==0.5.7
260 | qtconsole==4.4.3
261 | QtPy==1.7.0
262 | quickdraw==0.1.0
263 | redis==2.10.6
264 | requests==2.22.0
265 | resampy==0.2.2
266 | retrying==1.3.3
267 | rope==0.12.0
268 | rsa==4.0
269 | ruamel-yaml==0.15.46
270 | s3transfer==0.2.1
271 | scikit-image==0.14.2
272 | scikit-learn==0.20.3
273 | scipy==1.2.1
274 | seaborn==0.9.0
275 | selenium==3.141.0
276 | Send2Trash==1.5.0
277 | service-identity==18.1.0
278 | setuptools-git==1.2
279 | simplejson==3.16.0
280 | singledispatch==3.4.0.3
281 | six==1.13.0
282 | skl2onnx==1.6.0
283 | sklearn-pandas==1.8.0
284 | smart-open==1.9.0
285 | snowballstemmer==1.2.1
286 | sortedcollections==1.1.2
287 | sortedcontainers==2.1.0
288 | SoundFile==0.10.3.post1
289 | soupsieve==1.8
290 | Sphinx==1.8.5
291 | sphinxcontrib-websupport==1.1.0
292 | spyder==3.3.3
293 | spyder-kernels==0.4.2
294 | SQLAlchemy==1.3.1
295 | sqlparse==0.3.0
296 | statsmodels==0.11.1
297 | stopit==1.1.2
298 | sympy==1.3
299 | tables==3.5.1
300 | tblib==1.3.2
301 | tensorboard==1.13.1
302 | tensorflow==1.13.1
303 | tensorflow-estimator==1.13.0
304 | termcolor==1.1.0
305 | terminado==0.8.1
306 | testpath==0.4.2
307 | toolz==0.9.0
308 | tornado==6.0.2
309 | TPOT==0.10.1
310 | tqdm==4.31.1
311 | traitlets==4.3.2
312 | translationstring==1.3
313 | Twisted==20.3.0
314 | txaio==20.4.1
315 | typed-ast==1.4.0
316 | typing-extensions==3.7.4
317 | uiautomator==0.3.6
318 | unicodecsv==0.14.1
319 | update-checker==0.16
320 | uritemplate==3.0.0
321 | urllib3==1.25.7
322 | venusian==3.0.0
323 | wcwidth==0.1.7
324 | webencodings==0.5.1
325 | WebOb==1.8.5
326 | Werkzeug==0.15.3
327 | widgetsnbextension==3.4.2
328 | win-inet-pton==1.1.0
329 | win-unicode-console==0.5
330 | wincertstore==0.2
331 | wrapt==1.11.1
332 | xgboost==0.82
333 | xlrd==1.2.0
334 | XlsxWriter==1.1.5
335 | xlwings==0.15.4
336 | xlwt==1.3.0
337 | yarl==1.3.0
338 | zict==0.1.4
339 | zipp==0.3.3
340 | zope.deprecation==4.4.0
341 | zope.interface==4.7.1
342 |
--------------------------------------------------------------------------------
/mpgWebApp/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 |
--------------------------------------------------------------------------------
/mpgWebApp/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 | font-size: 13px;
102 | padding: 4px 8px;
103 | margin: 0;
104 | vertical-align: middle;
105 | background: #fff;
106 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
107 | cursor: pointer;
108 | color: #333;
109 | }
110 |
111 | #changelist #toolbar form input[type="submit"]:focus,
112 | #changelist #toolbar form input[type="submit"]:hover {
113 | border-color: #999;
114 | }
115 |
116 | #changelist #changelist-search img {
117 | vertical-align: middle;
118 | margin-right: 4px;
119 | }
120 |
121 | /* FILTER COLUMN */
122 |
123 | #changelist-filter {
124 | position: absolute;
125 | top: 0;
126 | right: 0;
127 | z-index: 1000;
128 | width: 240px;
129 | background: #f8f8f8;
130 | border-left: none;
131 | margin: 0;
132 | }
133 |
134 | #changelist-filter h2 {
135 | font-size: 14px;
136 | text-transform: uppercase;
137 | letter-spacing: 0.5px;
138 | padding: 5px 15px;
139 | margin-bottom: 12px;
140 | border-bottom: none;
141 | }
142 |
143 | #changelist-filter h3 {
144 | font-weight: 400;
145 | font-size: 14px;
146 | padding: 0 15px;
147 | margin-bottom: 10px;
148 | }
149 |
150 | #changelist-filter ul {
151 | margin: 5px 0;
152 | padding: 0 15px 15px;
153 | border-bottom: 1px solid #eaeaea;
154 | }
155 |
156 | #changelist-filter ul:last-child {
157 | border-bottom: none;
158 | padding-bottom: none;
159 | }
160 |
161 | #changelist-filter li {
162 | list-style-type: none;
163 | margin-left: 0;
164 | padding-left: 0;
165 | }
166 |
167 | #changelist-filter a {
168 | display: block;
169 | color: #999;
170 | text-overflow: ellipsis;
171 | overflow-x: hidden;
172 | }
173 |
174 | #changelist-filter li.selected {
175 | border-left: 5px solid #eaeaea;
176 | padding-left: 10px;
177 | margin-left: -15px;
178 | }
179 |
180 | #changelist-filter li.selected a {
181 | color: #5b80b2;
182 | }
183 |
184 | #changelist-filter a:focus, #changelist-filter a:hover,
185 | #changelist-filter li.selected a:focus,
186 | #changelist-filter li.selected a:hover {
187 | color: #036;
188 | }
189 |
190 | /* DATE DRILLDOWN */
191 |
192 | .change-list ul.toplinks {
193 | display: block;
194 | float: left;
195 | padding: 0;
196 | margin: 0;
197 | width: 100%;
198 | }
199 |
200 | .change-list ul.toplinks li {
201 | padding: 3px 6px;
202 | font-weight: bold;
203 | list-style-type: none;
204 | display: inline-block;
205 | }
206 |
207 | .change-list ul.toplinks .date-back a {
208 | color: #999;
209 | }
210 |
211 | .change-list ul.toplinks .date-back a:focus,
212 | .change-list ul.toplinks .date-back a:hover {
213 | color: #036;
214 | }
215 |
216 | /* PAGINATOR */
217 |
218 | .paginator {
219 | font-size: 13px;
220 | padding-top: 10px;
221 | padding-bottom: 10px;
222 | line-height: 22px;
223 | margin: 0;
224 | border-top: 1px solid #ddd;
225 | }
226 |
227 | .paginator a:link, .paginator a:visited {
228 | padding: 2px 6px;
229 | background: #79aec8;
230 | text-decoration: none;
231 | color: #fff;
232 | }
233 |
234 | .paginator a.showall {
235 | padding: 0;
236 | border: none;
237 | background: none;
238 | color: #5b80b2;
239 | }
240 |
241 | .paginator a.showall:focus, .paginator a.showall:hover {
242 | background: none;
243 | color: #036;
244 | }
245 |
246 | .paginator .end {
247 | margin-right: 6px;
248 | }
249 |
250 | .paginator .this-page {
251 | padding: 2px 6px;
252 | font-weight: bold;
253 | font-size: 13px;
254 | vertical-align: top;
255 | }
256 |
257 | .paginator a:focus, .paginator a:hover {
258 | color: white;
259 | background: #036;
260 | }
261 |
262 | /* ACTIONS */
263 |
264 | .filtered .actions {
265 | margin-right: 280px;
266 | border-right: none;
267 | }
268 |
269 | #changelist table input {
270 | margin: 0;
271 | vertical-align: baseline;
272 | }
273 |
274 | #changelist table tbody tr.selected {
275 | background-color: #FFFFCC;
276 | }
277 |
278 | #changelist .actions {
279 | padding: 10px;
280 | background: #fff;
281 | border-top: none;
282 | border-bottom: none;
283 | line-height: 24px;
284 | color: #999;
285 | }
286 |
287 | #changelist .actions.selected {
288 | background: #fffccf;
289 | border-top: 1px solid #fffee8;
290 | border-bottom: 1px solid #edecd6;
291 | }
292 |
293 | #changelist .actions span.all,
294 | #changelist .actions span.action-counter,
295 | #changelist .actions span.clear,
296 | #changelist .actions span.question {
297 | font-size: 13px;
298 | margin: 0 0.5em;
299 | display: none;
300 | }
301 |
302 | #changelist .actions:last-child {
303 | border-bottom: none;
304 | }
305 |
306 | #changelist .actions select {
307 | vertical-align: top;
308 | height: 24px;
309 | background: none;
310 | color: #000;
311 | border: 1px solid #ccc;
312 | border-radius: 4px;
313 | font-size: 14px;
314 | padding: 0 0 0 4px;
315 | margin: 0;
316 | margin-left: 10px;
317 | }
318 |
319 | #changelist .actions select:focus {
320 | border-color: #999;
321 | }
322 |
323 | #changelist .actions label {
324 | display: inline-block;
325 | vertical-align: middle;
326 | font-size: 13px;
327 | }
328 |
329 | #changelist .actions .button {
330 | font-size: 13px;
331 | border: 1px solid #ccc;
332 | border-radius: 4px;
333 | background: #fff;
334 | box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
335 | cursor: pointer;
336 | height: 24px;
337 | line-height: 1;
338 | padding: 4px 8px;
339 | margin: 0;
340 | color: #333;
341 | }
342 |
343 | #changelist .actions .button:focus, #changelist .actions .button:hover {
344 | border-color: #999;
345 | }
346 |
--------------------------------------------------------------------------------
/mpgWebApp/static/js/jquery.sticky.js:
--------------------------------------------------------------------------------
1 | // Sticky Plugin v1.0.3 for jQuery
2 | // =============
3 | // Author: Anthony Garand
4 | // Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk)
5 | // Improvements by Leonardo C. Daronco (daronco)
6 | // Created: 02/14/2011
7 | // Date: 07/20/2015
8 | // Website: http://stickyjs.com/
9 | // Description: Makes an element on the page stick on the screen as you scroll
10 | // It will only set the 'top' and 'position' of your element, you
11 | // might need to adjust the width in some cases.
12 |
13 | (function($) {
14 | var slice = Array.prototype.slice; // save ref to original slice()
15 | var splice = Array.prototype.splice; // save ref to original slice()
16 |
17 | var defaults = {
18 | topSpacing: 0,
19 | bottomSpacing: 0,
20 | className: 'is-sticky',
21 | wrapperClassName: 'sticky-wrapper',
22 | center: false,
23 | getWidthFrom: '',
24 | widthFromWrapper: true, // works only when .getWidthFrom is empty
25 | responsiveWidth: false
26 | },
27 | $window = $(window),
28 | $document = $(document),
29 | sticked = [],
30 | windowHeight = $window.height(),
31 | scroller = function() {
32 | var scrollTop = $window.scrollTop(),
33 | documentHeight = $document.height(),
34 | dwh = documentHeight - windowHeight,
35 | extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
36 |
37 | for (var i = 0; i < sticked.length; i++) {
38 | var s = sticked[i],
39 | elementTop = s.stickyWrapper.offset().top,
40 | etse = elementTop - s.topSpacing - extra;
41 |
42 | //update height in case of dynamic content
43 | s.stickyWrapper.css('height', s.stickyElement.outerHeight());
44 |
45 | if (scrollTop <= etse) {
46 | if (s.currentTop !== null) {
47 | s.stickyElement
48 | .css({
49 | 'width': '',
50 | 'position': '',
51 | 'top': ''
52 | });
53 | s.stickyElement.parent().removeClass(s.className);
54 | s.stickyElement.trigger('sticky-end', [s]);
55 | s.currentTop = null;
56 | }
57 | }
58 | else {
59 | var newTop = documentHeight - s.stickyElement.outerHeight()
60 | - s.topSpacing - s.bottomSpacing - scrollTop - extra;
61 | if (newTop < 0) {
62 | newTop = newTop + s.topSpacing;
63 | } else {
64 | newTop = s.topSpacing;
65 | }
66 | if (s.currentTop != newTop) {
67 | var newWidth;
68 | if (s.getWidthFrom) {
69 | newWidth = $(s.getWidthFrom).width() || null;
70 | } else if (s.widthFromWrapper) {
71 | newWidth = s.stickyWrapper.width();
72 | }
73 | if (newWidth == null) {
74 | newWidth = s.stickyElement.width();
75 | }
76 | s.stickyElement
77 | .css('width', newWidth)
78 | .css('position', 'fixed')
79 | .css('top', newTop);
80 |
81 | s.stickyElement.parent().addClass(s.className);
82 |
83 | if (s.currentTop === null) {
84 | s.stickyElement.trigger('sticky-start', [s]);
85 | } else {
86 | // sticky is started but it have to be repositioned
87 | s.stickyElement.trigger('sticky-update', [s]);
88 | }
89 |
90 | if (s.currentTop === s.topSpacing && s.currentTop > newTop || s.currentTop === null && newTop < s.topSpacing) {
91 | // just reached bottom || just started to stick but bottom is already reached
92 | s.stickyElement.trigger('sticky-bottom-reached', [s]);
93 | } else if(s.currentTop !== null && newTop === s.topSpacing && s.currentTop < newTop) {
94 | // sticky is started && sticked at topSpacing && overflowing from top just finished
95 | s.stickyElement.trigger('sticky-bottom-unreached', [s]);
96 | }
97 |
98 | s.currentTop = newTop;
99 | }
100 | }
101 | }
102 | },
103 | resizer = function() {
104 | windowHeight = $window.height();
105 |
106 | for (var i = 0; i < sticked.length; i++) {
107 | var s = sticked[i];
108 | var newWidth = null;
109 | if (s.getWidthFrom) {
110 | if (s.responsiveWidth === true) {
111 | newWidth = $(s.getWidthFrom).width();
112 | }
113 | } else if(s.widthFromWrapper) {
114 | newWidth = s.stickyWrapper.width();
115 | }
116 | if (newWidth != null) {
117 | s.stickyElement.css('width', newWidth);
118 | }
119 | }
120 | },
121 | methods = {
122 | init: function(options) {
123 | var o = $.extend({}, defaults, options);
124 | return this.each(function() {
125 | var stickyElement = $(this);
126 |
127 | var stickyId = stickyElement.attr('id');
128 | var stickyHeight = stickyElement.outerHeight();
129 | var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName
130 | var wrapper = $('')
131 | .attr('id', wrapperId)
132 | .addClass(o.wrapperClassName);
133 |
134 | stickyElement.wrapAll(wrapper);
135 |
136 | var stickyWrapper = stickyElement.parent();
137 |
138 | if (o.center) {
139 | stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});
140 | }
141 |
142 | if (stickyElement.css("float") == "right") {
143 | stickyElement.css({"float":"none"}).parent().css({"float":"right"});
144 | }
145 |
146 | stickyWrapper.css('height', stickyHeight);
147 |
148 | o.stickyElement = stickyElement;
149 | o.stickyWrapper = stickyWrapper;
150 | o.currentTop = null;
151 |
152 | sticked.push(o);
153 | });
154 | },
155 | update: scroller,
156 | unstick: function(options) {
157 | return this.each(function() {
158 | var that = this;
159 | var unstickyElement = $(that);
160 |
161 | var removeIdx = -1;
162 | var i = sticked.length;
163 | while (i-- > 0) {
164 | if (sticked[i].stickyElement.get(0) === that) {
165 | splice.call(sticked,i,1);
166 | removeIdx = i;
167 | }
168 | }
169 | if(removeIdx != -1) {
170 | unstickyElement.unwrap();
171 | unstickyElement
172 | .css({
173 | 'width': '',
174 | 'position': '',
175 | 'top': '',
176 | 'float': ''
177 | })
178 | ;
179 | }
180 | });
181 | }
182 | };
183 |
184 | // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer):
185 | if (window.addEventListener) {
186 | window.addEventListener('scroll', scroller, false);
187 | window.addEventListener('resize', resizer, false);
188 | } else if (window.attachEvent) {
189 | window.attachEvent('onscroll', scroller);
190 | window.attachEvent('onresize', resizer);
191 | }
192 |
193 | $.fn.sticky = function(method) {
194 | if (methods[method]) {
195 | return methods[method].apply(this, slice.call(arguments, 1));
196 | } else if (typeof method === 'object' || !method ) {
197 | return methods.init.apply( this, arguments );
198 | } else {
199 | $.error('Method ' + method + ' does not exist on jQuery.sticky');
200 | }
201 | };
202 |
203 | $.fn.unstick = function(method) {
204 | if (methods[method]) {
205 | return methods[method].apply(this, slice.call(arguments, 1));
206 | } else if (typeof method === 'object' || !method ) {
207 | return methods.unstick.apply( this, arguments );
208 | } else {
209 | $.error('Method ' + method + ' does not exist on jQuery.sticky');
210 | }
211 | };
212 | $(function() {
213 | setTimeout(scroller, 0);
214 | });
215 | })(jQuery);
216 |
217 | $(document).ready(function(){
218 | $(".navbar-default").sticky({topSpacing:0});
219 | });
220 |
--------------------------------------------------------------------------------
|