MDL-40540 dock: the dock loader is now a proper sub module
authorSam Hemelryk <sam@moodle.com>
Thu, 18 Jul 2013 23:15:31 +0000 (11:15 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 21 Jul 2013 22:46:46 +0000 (10:46 +1200)
lib/pagelib.php
lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-debug.js [moved from lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-debug.js with 95% similarity]
lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-min.js [new file with mode: 0644]
lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader.js [moved from lib/yui/build/moodle-core-dockloader/moodle-core-dockloader.js with 95% similarity]
lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js
lib/yui/build/moodle-core-dock/moodle-core-dock-min.js
lib/yui/build/moodle-core-dock/moodle-core-dock.js
lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-min.js [deleted file]
lib/yui/src/dock/build.json
lib/yui/src/dock/js/loader.js [moved from lib/yui/src/dock/js/dockloader.js with 96% similarity]
lib/yui/src/dock/meta/dock.json

index 558b874..4830746 100644 (file)
@@ -1468,7 +1468,7 @@ class moodle_page {
         if ($this->_theme->enable_dock && !empty($CFG->allowblockstodock)) {
             $this->requires->strings_for_js(array('addtodock', 'undockitem', 'dockblock', 'undockblock', 'undockall', 'hidedockpanel', 'hidepanel'), 'block');
             $this->requires->string_for_js('thisdirectionvertical', 'langconfig');
-            $this->requires->yui_module('moodle-core-dockloader', 'M.core.dock.loader.initLoader');
+            $this->requires->yui_module('moodle-core-dock-loader', 'M.core.dock.loader.initLoader');
         }
 
         if ($this === $PAGE) {
similarity index 95%
rename from lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-debug.js
rename to lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-debug.js
index 5d90e18..dac8f38 100644 (file)
Binary files a/lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-debug.js and b/lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-debug.js differ
diff --git a/lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-min.js b/lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-min.js
new file mode 100644 (file)
index 0000000..31147f7
Binary files /dev/null and b/lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader-min.js differ
similarity index 95%
rename from lib/yui/build/moodle-core-dockloader/moodle-core-dockloader.js
rename to lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader.js
index 0f83879..a84e123 100644 (file)
Binary files a/lib/yui/build/moodle-core-dockloader/moodle-core-dockloader.js and b/lib/yui/build/moodle-core-dock-loader/moodle-core-dock-loader.js differ
index 8d52e47..632f1bd 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock-debug.js differ
index e57f30e..6b0a896 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock-min.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock-min.js differ
index 085361e..25c83d7 100644 (file)
Binary files a/lib/yui/build/moodle-core-dock/moodle-core-dock.js and b/lib/yui/build/moodle-core-dock/moodle-core-dock.js differ
diff --git a/lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-min.js b/lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-min.js
deleted file mode 100644 (file)
index f5aff4f..0000000
Binary files a/lib/yui/build/moodle-core-dockloader/moodle-core-dockloader-min.js and /dev/null differ
index e76c5b1..24c2f91 100644 (file)
@@ -11,9 +11,9 @@
         "dockeditem.js"
       ]
     },
-    "moodle-core-dockloader": {
+    "moodle-core-dock-loader": {
         "jsfiles": [
-            "dockloader.js"
+            "loader.js"
         ]
     }
   }
similarity index 96%
rename from lib/yui/src/dock/js/dockloader.js
rename to lib/yui/src/dock/js/loader.js
index 308b857..c574f02 100644 (file)
@@ -35,8 +35,8 @@ M.core.dock.ensureMoveToIconExists = function(blocknode) {
         blockaction = blocknode.one('.block_action'),
         icon = 't/block_to_dock';
 
-    // Must set the image src seperatly of we get an error with XML strict headers
-    if (right_to_left()) {
+    // Must set the image src separately of we get an error with XML strict headers
+    if (Y.one(document.body).hasClass('dir-rtl')) {
         icon = icon + '_rtl';
     }
     moveto.setAttribute('alt', M.util.get_string('addtodock', 'block'));
index 49cc7f3..9f88e2a 100644 (file)
@@ -7,10 +7,10 @@
         "event-mouseenter",
         "event-resize",
         "escape",
-        "moodle-core-dockloader"
+        "moodle-core-dock-loader"
     ]
   },
-  "moodle-core-dockloader": {
+  "moodle-core-dock-loader": {
       "requires": [
           "escape"
       ]