Debian Codegraph @

docs/autodocs/source/aibs_sphinx/static/external_assets/javascript/portalFooter.js

raw
1
2 function import_portal() {
3
4 var content = "" +
5 "<style>" +
6 "/* some styles used here are defined in and shared with portalHeader.html */" +
7 "" +
8 "#bottom_chrome {" +
9 "" +
10 " position:relative;" +
11 " bottom:0px;" +
12 " width:100%;" +
13 " height:19px;" +
14 " padding-top:7px;" +
15 " background-color:#163E65; " +
16 "}" +
17 "" +
18 "#portal_copyright_notice {" +
19 "" +
20 " font-family:arial,sans-serif;" +
21 " font-size:12px;" +
22 " color:#bbbcbd;" +
23 " margin:auto;" +
24 " text-align:center;" +
25 " position:relative;" +
26 "}" +
27 "" +
28 "#footer_content {" +
29 "" +
30 " position:relative;" +
31 " bottom:0px;" +
32 " width:calc(100% - 112px);" +
33 " height:65px;" +
34 " border-top:2px solid #A5A8AB;" +
35 " margin-left:50px;" +
36 " margin-right:50px;" +
37 "}" +
38 "" +
39 "#portal_footer_item_container {" +
40 "" +
41 " position:relative;" +
42 " top:16.5px;" +
43 " " +
44 " width:100%;" +
45 " height:25px;" +
46 " border:0px solid #000;" +
47 "" +
48 " display:table;" +
49 "}" +
50 "" +
51 ".portal_footer_item {" +
52 "" +
53 " font-family:arial,sans-serif;" +
54 " font-weight:bold;" +
55 " font-size:12px;" +
56 " cursor:pointer;" +
57 " display:inline-block;" +
58 " border: 0px solid #f00;" +
59 " text-align:center;" +
60 " vertical-align:middle;" +
61 " width:20%;" +
62 " height:25px;" +
63 "}" +
64 "" +
65 ".portal_social_icon_set {" +
66 "" +
67 " font-size:20px;" +
68 " color:#fff; " +
69 "}" +
70 "" +
71 ".portal_social_icon_set i {" +
72 "" +
73 " background-color:#A5A8AB; " +
74 "}" +
75 "" +
76 ".portal_call_to_action {" +
77 "" +
78 " background-color: #F9E200;" +
79 " color: #1c598d;" +
80 "" +
81 " font-size:14px;" +
82 " height:20px;" +
83 " width:180px;" +
84 " padding-top:4px;" +
85 "}" +
86 "" +
87 ".portal_call_to_action:hover {" +
88 "" +
89 " background-color: #0779be;" +
90 " color: #fde500" +
91 "}" +
92 "" +
93 "#portal_citation_policy {" +
94 "" +
95 " float:right;" +
96 "}" +
97 "" +
98 ".portal_link_stack a {" +
99 "" +
100 " color:#0779BE !important;" +
101 "}" +
102 "" +
103 "/* overriding application tab bar styles */" +
104 "#pTabBar {" +
105 "" +
106 " width:calc(100% - 100px) !important;" +
107 " margin:auto;" +
108 " background-color:#fff; " +
109 " padding:10px;" +
110 " margin-bottom: 15px;" +
111 "" +
112 " /* IE Sauce */" +
113 " width:auto\\9;" +
114 " margin-left:50px\\9; " +
115 " margin-right:50px\\9;" +
116 "}" +
117 "" +
118 "#pTabBar td {" +
119 "" +
120 " height:32px;" +
121 " padding-left:10px;" +
122 " padding-right:0px;" +
123 "}" +
124 "" +
125 "#pTabBar a {" +
126 "" +
127 " color: #0779BE;" +
128 " text-decoration: none;" +
129 " background-color: #fff;" +
130 " padding-left: 0px;" +
131 " padding-right: 30px;" +
132 " text-align: center;" +
133 " border: none !important;" +
134 " text-transform:uppercase;" +
135 " font-family:Arial,Sans-Serif;" +
136 " font-size:12px;" +
137 " font-weight:bold;" +
138 "}" +
139 "" +
140 "#pTabBar a:hover {" +
141 "" +
142 " color: #0779BE;" +
143 " background-color: #fff;" +
144 "}" +
145 "" +
146 "#pTabBar a.pTabBarSelected {" +
147 "" +
148 " color: #A5A8AB;" +
149 " border: solid 0px #fff;" +
150 "}" +
151 "" +
152 "#top_menu {" +
153 "" +
154 " background-color:#0779be;" +
155 " color:#fbe300;" +
156 "}" +
157 "" +
158 "#app_menu_table {" +
159 "" +
160 " border-spacing:0px;" +
161 "}" +
162 "" +
163 "#menu_cell {" +
164 "" +
165 " color:#0779be !important;" +
166 "}" +
167 "" +
168 "#menu_cell .pTabBarSelected {" +
169 "" +
170 " color:#a5a8ab !important;" +
171 "}" +
172 "" +
173 "#menu_cell:hover {" +
174 "" +
175 " background-color:#0779be !important;" +
176 " color:#fbe300 !important;" +
177 "}" +
178 "" +
179 "#menu_cell:hover > ul ul {" +
180 "" +
181 " display:block;" +
182 " -webkit-animation: fade 0.25s;" +
183 " animation: fade 0.25s; " +
184 "}" +
185 "" +
186 "#app_menu_table li {" +
187 "" +
188 " background-color:inherit !important;" +
189 " color:inherit !important;" +
190 "}" +
191 "" +
192 "#app_menu_table ul a {" +
193 "" +
194 " background-color:inherit !important;" +
195 " color:inherit !important;" +
196 "}" +
197 "" +
198 "#app_menu_table ul a:hover {" +
199 "" +
200 " color:#fbe300 !important;" +
201 "}" +
202 "" +
203 "#nav_menus {" +
204 "" +
205 " background-color: #0779be;" +
206 " color: #fff;" +
207 " top: 23px; " +
208 " min-width:156px !important;" +
209 "}" +
210 "" +
211 "#top_menu img {" +
212 "" +
213 " display:none;" +
214 "}" +
215 "" +
216 "" +
217 "#nav ul {" +
218 "" +
219 " left:-11px !important;" +
220 "}" +
221 "" +
222 "#nav ul li {" +
223 "" +
224 " border-top:none;" +
225 "}" +
226 "" +
227 "#nav ul a {" +
228 "" +
229 " text-align: left;" +
230 " padding-left: 14px; " +
231 "}" +
232 "" +
233 "#nav ul a:hover {" +
234 "" +
235 " background-color:#0779be;" +
236 " color:#fbe300;" +
237 "}" +
238 "" +
239 "#nav li {" +
240 "" +
241 " padding-right:10px !important;" +
242 "}" +
243 "" +
244 "#nav li a {" +
245 "" +
246 " color:#0779BE; " +
247 "}" +
248 "" +
249 ".portal_icon {" +
250 "" +
251 " color:#fff !important;" +
252 "}" +
253 "" +
254 ".icon-twitter:hover {" +
255 "" +
256 " background-color:#5fa8dc;" +
257 "}" +
258 ".icon-facebook:hover {" +
259 "" +
260 " background-color:#3d5a98;" +
261 "}" +
262 ".icon-youtube-play:hover {" +
263 "" +
264 " background: linear-gradient(#e6312a, #b42227);" +
265 " background-color: #CB2029\0; /* IE9 only */" +
266 "}" +
267 ".icon-linkedin-3:hover {" +
268 "" +
269 " background-color:#007bb5;" +
270 "}" +
271 "" +
272 "/* This is a global change to link colors that will affect all the apps */" +
273 "a:hover {" +
274 "" +
275 " color:#47AEDC !important;" +
276 "}" +
277 "" +
278 "/* app-specific overrides */" +
279 "#search_result_common_container {" +
280 "" +
281 " width: calc(100% - 80px);" +
282 " margin-left: 20px;" +
283 "}" +
284 "" +
285 "html, body {" +
286 "" +
287 " height:100%;" +
288 "}" +
289 "" +
290 ".siteContent, .pageContent {" +
291 "" +
292 " min-height: calc(100% - 125px) !important;" +
293 "}" +
294 "" +
295 ".separator {" +
296 "" +
297 " height:0px;" +
298 "}" +
299 "" +
300 "#preview_cell {" +
301 "" +
302 " min-width:251px !important;" +
303 "}" +
304 "" +
305 "" +
306 "/* changing the header bar colors to match the top chrome color */" +
307 "th.contentBlock, .ui-widget-header, ._lw_header, .ageaTabSelected, " +
308 "._cs_header_text_cell, .sectionHeader, .section_header, " +
309 ".projection_search_widget_header, .container_header, .aboutHeader {" +
310 "" +
311 " background-color:#163e65 !important;" +
312 "}" +
313 "" +
314 "/* meta-differential search result table headers */" +
315 ".metaSearchResultTable th {" +
316 "" +
317 " background-color:#163e65 !important;" +
318 "}" +
319 ".metaSearchResultTable th.subheader {" +
320 "" +
321 " background-color:#fff !important;" +
322 "}" +
323 "" +
324 "/* projection landing page headers */" +
325 "table.projection_search_widget th {" +
326 "" +
327 " background-color:#163e65 !important; " +
328 "}" +
329 "" +
330 "/* connectivity experiment page (thumbnails) top widget header */" +
331 "._experiment_specimen_widget tr:first-of-type td {" +
332 "" +
333 " background-color:#163e65 !important; " +
334 "}" +
335 "" +
336 "/* AGEA about box header */" +
337 ".aboutAgeaOverlay div:first-child {" +
338 "" +
339 " background-color:#163e65 !important; " +
340 "}" +
341 "" +
342 "/* AGEA in devmouse */" +
343 ".pageContentAgea {" +
344 "" +
345 " margin-bottom: 52px !important;" +
346 "}" +
347 "" +
348 "/* AGEA in ABA */" +
349 ".pageContent .pageContentAgea {" +
350 "" +
351 " margin-bottom: 16px !important;" +
352 "}" +
353 "" +
354 "/* some suggestions for app content..." +
355 "" +
356 ".slick-header-column, .ui-state-default {" +
357 "" +
358 " background:none !important;" +
359 " background-color:#eee !important;" +
360 "}" +
361 "" +
362 "#search_container {" +
363 "" +
364 " width:calc(100% - 100px);" +
365 " margin:auto;" +
366 " margin-left:auto;" +
367 " margin-right:auto;" +
368 " margin-bottom:12px;" +
369 " border:1px solid #bbb;" +
370 "}" +
371 "" +
372 "#result_block, #preview_block, #search_container {" +
373 " " +
374 " -webkit-border-radius: 0px;" +
375 " -moz-border-radius: 0px;" +
376 " border-radius: 0px; " +
377 "}" +
378 "" +
379 "#result_block:hover, #preview_block:hover, #search_container:hover {" +
380 "" +
381 " -webkit-box-shadow: 1px 1px 4px 0px rgba(0,0,0,0.15);" +
382 " -moz-box-shadow: 1px 1px 4px 0px rgba(0,0,0,0.15);" +
383 " box-shadow: 1px 1px 4px 0px rgba(0,0,0,0.15);" +
384 "}" +
385 "*/" +
386 "" +
387 "</style>" +
388 "" +
389 "" +
390 "<div id=\"pFooter\">" +
391 "<div id=\"footer_content\">" +
392 "" +
393 " <div id=\"portal_footer_item_container\">" +
394 "" +
395 " <a id=\"pContactUs\" target=\"_blank\"><span id=\"portal_send_message\" class=\"portal_footer_item portal_call_to_action\">SEND US A MESSAGE <i class=\"icon-right-open\"></i></span></a>" +
396 " <span class=\"portal_footer_item portal_social_icon_set\">" +
397 " <a id=\"pTwitter\" target=\"_blank\"><i class=\"icon-twitter portal_icon\"></i></a>" +
398 " <a id=\"pFacebook\" target=\"_blank\"><i class=\"icon-facebook portal_icon\"></i></a>" +
399 " <a id=\"pYouTube\" target=\"_blank\"><i class=\"icon-youtube-play portal_icon\"></i></a>" +
400 " <a id=\"pLinkedIn\" target=\"_blank\"><i class=\"icon-linkedin-3 portal_icon\"></i></a>" +
401 " </span>" +
402 " <span class=\"portal_footer_item portal_link_stack\">" +
403 " <a id=\"pAbout\" target=\"_blank\">About the Allen Institute</a></a>" +
404 " <br/>" +
405 " <a id=\"pPublications\" target=\"_blank\">Allen Institute Publications</a></a>" +
406 " </span> " +
407 " <span class=\"portal_footer_item portal_link_stack\">" +
408 " <a id=\"pPrivacyPolicy\" target=\"_blank\">Privacy Policy</a></a>" +
409 " <br/>" +
410 " <a id=\"pTermsOfUse\" target=\"_blank\">Software License</a></a>" +
411 " </span> " +
412 " <a id=\"pCitationPolicy\" target=\"_blank\"><span id=\"portal_citation_policy\" class=\"portal_footer_item portal_call_to_action\">CITATION POLICY <i class=\"icon-right-open\"></i></span></a>" +
413 " </div>" +
414 "</div>" +
415 "" +
416 "" +
417 "<div id=\"bottom_chrome\">" +
418 " <div id=\"portal_copyright_notice\">Copyright ©2015. Allen Institute for Brain Science. All Rights Reserved.</div>" +
419 "</div>" +
420 "</div>" +
421 "";
422 document.write(content);
423 }
424
425 /*
426 Sets the href attribute for all the defined pFooterLinks keys.
427 This is done programatically because the links must be absolute,
428 and the base url is configured differently in portal.js for each
429 environment.
430 */
431 function set_links(link_set) {
432
433 for(var id in link_set) {
434
435 var a = document.getElementById(id);
436 if(a)
437 a.setAttribute('href', link_set[id]);
438 }
439 }
440
441 /*
442 Sometimes it's easier to inject updates from here rather than try to
443 rework the legacy apps individually.
444 */
445 function hack_legacy_app_specific_hacks() {
446
447 if(_pTabId == "pMouseSpinalCord") {
448
449 if(window.console)
450 console.log("importing legacy spinal hacks");
451
452 import_spinal_hacks();
453
454 } else if(_pTabId == "pGlioblastoma") {
455
456 import_glio_hacks();
457 }
458 }
459
460 function import_spinal_hacks() {
461
462 var content = "<style>" +
463 " /* " +
464 " Style overrides to get the spinal cord app to fit in a " +
465 " bit better with the changes done for the June 2014 portal redesign." +
466 " */" +
467 "" +
468 "" +
469 " /* getting the footer to sit at the foot of the page */" +
470 " .siteContent {" +
471 "" +
472 " min-height:calc(100% - 93px) !important;" +
473 " } " +
474 "" +
475 " /* search area background and controls */" +
476 " #searchArea {" +
477 "" +
478 " background-color:#eee;" +
479 " }" +
480 "" +
481 " #searchControls {" +
482 "" +
483 " width: calc(100% - 100px);" +
484 " margin: auto;" +
485 " }" +
486 "" +
487 " input.btnSearch {" +
488 "" +
489 " color:inherit !important;" +
490 " background-color: buttonface !important;" +
491 " }" +
492 "" +
493 " input.submit {" +
494 "" +
495 " color:inherit !important;" +
496 " background-color: buttonface !important;" +
497 " } " +
498 "</style>" +
499 "";
500 document.write(content);
501 }
502
503 function import_glio_hacks() {
504
505 var content = "<style>" +
506 " /* " +
507 " Style overrides to get the spinal cord app to fit in a " +
508 " bit better with the changes done for the June 2014 portal redesign." +
509 " */" +
510 "" +
511 "" +
512 " /* getting the footer to sit at the foot of the page */" +
513 " .siteContent {" +
514 "" +
515 " min-height:calc(100% - 93px) !important;" +
516 " } " +
517 "" +
518 " /* search area background and controls */" +
519 " #searchArea {" +
520 "" +
521 " background-color:#eee;" +
522 " }" +
523 "" +
524 " #searchControls {" +
525 "" +
526 " width: calc(100% - 100px);" +
527 " margin: auto;" +
528 " }" +
529 "" +
530 " input.btnSearch {" +
531 "" +
532 " color:inherit !important;" +
533 " background-color: buttonface !important;" +
534 " }" +
535 "" +
536 " input.submit {" +
537 "" +
538 " color:inherit !important;" +
539 " background-color: buttonface !important;" +
540 " } " +
541 "</style>" +
542 "" +
543 "";
544 document.write(content);
545 }
546
547
548 // _pEXTERNAL_ASSETS is defined in portal.js
549 import_portal();
550
551 // _pFooterLinks is defined in portal.js. This programatically
552 // updates href attributes in the footer.
553 set_links(_pFooterLinks);
554
555 // hackage specific to the legacy apps that we're not otherwise touching.
556 hack_legacy_app_specific_hacks();
557