equal
deleted
inserted
replaced
20 var $page_initted = false; |
20 var $page_initted = false; |
21 var $elements = false; |
21 var $elements = false; |
22 var $page_id = false; |
22 var $page_id = false; |
23 var $namespace = false; |
23 var $namespace = false; |
24 var $js_preload = array(); |
24 var $js_preload = array(); |
|
25 var $js_append = ''; |
25 |
26 |
26 /** |
27 /** |
27 * Page action conditions |
28 * Page action conditions |
28 * @var array |
29 * @var array |
29 */ |
30 */ |
468 |
469 |
469 $this->js_preload = array_values(array_merge($this->js_preload, $files)); |
470 $this->js_preload = array_values(array_merge($this->js_preload, $files)); |
470 } |
471 } |
471 |
472 |
472 /** |
473 /** |
|
474 * Queue some HTML to be inserted after the Javascript runtime. |
|
475 * @param string HTML glob |
|
476 */ |
|
477 |
|
478 function add_header_js($html) |
|
479 { |
|
480 $this->js_append .= "$html\n "; |
|
481 } |
|
482 |
|
483 /** |
473 * Global, only-called-once init. Goes to all themes. |
484 * Global, only-called-once init. Goes to all themes. |
474 */ |
485 */ |
475 |
486 |
476 function init_global_vars() |
487 function init_global_vars() |
477 { |
488 { |
555 { |
566 { |
556 enano_init(); |
567 enano_init(); |
557 window.onload = function(e) { }; |
568 window.onload = function(e) { }; |
558 } |
569 } |
559 </script> |
570 </script> |
|
571 $this->js_append |
560 JSEOF; |
572 JSEOF; |
561 } |
573 } |
562 else |
574 else |
563 { |
575 { |
564 $cdnpath = cdnPath; |
576 $cdnpath = cdnPath; |
602 { |
614 { |
603 enano_init(); |
615 enano_init(); |
604 window.onload = function(e) { }; |
616 window.onload = function(e) { }; |
605 } |
617 } |
606 //]]></script> |
618 //]]></script> |
|
619 $this->js_append |
607 JSEOF; |
620 JSEOF; |
608 } |
621 } |
609 |
622 |
610 |
623 |
611 $this->assign_bool(array( |
624 $this->assign_bool(array( |