MDL-54722 javascript: Add YUI depend wrapper to global event
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 2 Jun 2016 02:07:52 +0000 (10:07 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 2 Jun 2016 02:07:56 +0000 (10:07 +0800)
blocks/navigation/amd/build/navblock.min.js
blocks/navigation/amd/src/navblock.js
blocks/settings/amd/build/settingsblock.min.js
blocks/settings/amd/src/settingsblock.js

index 60df49e..2025554 100644 (file)
Binary files a/blocks/navigation/amd/build/navblock.min.js and b/blocks/navigation/amd/build/navblock.min.js differ
index cd44db3..40e8678 100644 (file)
@@ -27,14 +27,18 @@ define(['jquery', 'core/tree'], function($, Tree) {
             var navTree = new Tree(".block_navigation .block_tree");
             navTree.finishExpandingGroup = function(item) {
                 Tree.prototype.finishExpandingGroup.call(this, item);
-                Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
-                    instanceid: instanceid
+                Y.use('moodle-core-event', function() {
+                    Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
+                        instanceid: instanceid
+                    });
                 });
             };
             navTree.collapseGroup = function(item) {
                 Tree.prototype.collapseGroup.call(this, item);
-                Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
-                    instanceid: instanceid
+                Y.use('moodle-core-event', function() {
+                    Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
+                        instanceid: instanceid
+                    });
                 });
             };
         }
index de0b9b9..8a8e746 100644 (file)
Binary files a/blocks/settings/amd/build/settingsblock.min.js and b/blocks/settings/amd/build/settingsblock.min.js differ
index 01187fd..bdccda5 100644 (file)
@@ -32,8 +32,10 @@ define(['jquery', 'core/tree'], function($, Tree) {
             }
             adminTree.finishExpandingGroup = function(item) {
                 Tree.prototype.finishExpandingGroup.call(this, item);
-                Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
-                    instanceid: instanceid
+                Y.use('moodle-core-event', function() {
+                    Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
+                        instanceid: instanceid
+                    });
                 });
             };
             adminTree.collapseGroup = function(item) {
@@ -41,6 +43,11 @@ define(['jquery', 'core/tree'], function($, Tree) {
                 Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
                     instanceid: instanceid
                 });
+                Y.use('moodle-core-event', function() {
+                    Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED, {
+                        instanceid: instanceid
+                    });
+                });
             };
         }
     };