]> git.mjollnir.org Git - moodle.git/commitdiff
lib MDL-19739 Moved call to include dropdown.js out of outputlib and into the same...
authorsamhemelryk <samhemelryk>
Wed, 8 Jul 2009 03:27:27 +0000 (03:27 +0000)
committersamhemelryk <samhemelryk>
Wed, 8 Jul 2009 03:27:27 +0000 (03:27 +0000)
that uses it.
This ensures that it is only loaded if it is used, which is only is the browser is opera, or IE

lib/outputlib.php
lib/weblib.php

index 3d4ff1deadbee5813f593f00d50ae0377eb3b5ae..3a920ff1b1dc67fe2af5ed91bee1e98b61413306 100644 (file)
@@ -1570,7 +1570,6 @@ class moodle_core_renderer extends moodle_renderer_base {
         $this->page->requires->js('lib/overlib/overlib_cssstyle.js')->in_head();
         $this->page->requires->js('lib/cookies.js')->in_head();
         $this->page->requires->js('lib/ufo.js')->in_head();
-        $this->page->requires->js('lib/dropdown.js')->in_head();
         $this->page->requires->js_function_call('setTimeout', Array('fix_column_widths()', 20));
 
         $focus = $this->page->focuscontrol;
index a2001d3cada0ab4c3739697c36793aa2ff5237e8..8a72f14024e585cc237750d6cbdc7ea3540258e1 100644 (file)
@@ -1172,6 +1172,7 @@ function popup_form($baseurl, $options, $formid, $selected='', $nothing='choose'
         //onfocus will call a function inside dropdown.js. It fixes this IE/Opera behavior.
         //Note: There is a bug on Opera+Linux with the javascript code (first mouse selection is inactive),
         //so we do not fix the Opera behavior on Linux
+        $PAGE->requires->js('lib/dropdown.js')->asap();
         $javascript = ' onfocus="initSelect(\''.$formid.'\','.$targetwindow.')"';
     } else {
         //Other browser