MDL-43598 dialogue: fixed bug with render procedure
authorSam Hemelryk <sam@moodle.com>
Tue, 7 Jan 2014 22:47:47 +0000 (11:47 +1300)
committerSam Hemelryk <sam@moodle.com>
Sun, 12 Jan 2014 19:27:46 +0000 (08:27 +1300)
lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-debug.js
lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js
lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js
lib/yui/src/chooserdialogue/js/chooserdialogue.js
lib/yui/src/notification/js/dialogue.js

index 1e19920..a31d211 100644 (file)
Binary files a/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-debug.js and b/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-debug.js differ
index ed61bb1..fa8b2e3 100644 (file)
Binary files a/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js and b/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue-min.js differ
index 1e19920..a31d211 100644 (file)
Binary files a/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue.js and b/lib/yui/build/moodle-core-chooserdialogue/moodle-core-chooserdialogue.js differ
index 03db8ff..ff36c28 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js differ
index bd8741d..62cd2fe 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js differ
index e732028..0c3269e 100644 (file)
Binary files a/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js and b/lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js differ
index 2371c65..a2af79d 100644 (file)
@@ -44,7 +44,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
             zindex : 100, // Display in front of other items
             modal: true, // This dialogue should be modal.
             shim : true,
-            closeButtonTitle : this.get('closeButtonTitle')
+            closeButtonTitle : this.get('closeButtonTitle'),
+            render : false
         };
 
         // Override with additional options
index 29fa7c4..edd85e8 100644 (file)
@@ -77,7 +77,9 @@ Y.extend(DIALOGUE, Y.Panel, {
     initializer : function(config) {
         var bb;
 
-        this.render();
+        if (this.get('render')) {
+            this.render();
+        }
         this.makeResponsive();
         this.after('visibleChange', this.visibilityChanged, this);
         if (config.center) {
@@ -495,6 +497,22 @@ Y.Base.modifyAttrs(DIALOGUE, {
             }
             return false;
         }
+    },
+
+    /**
+     * Boolean determining whether to render the widget during initialisation.
+     *
+     * We override this to change the default from false to true for the dialogue.
+     * We then proceed to early render the dialogue during our initialisation rather than waiting
+     * for YUI to render it after that.
+     *
+     * @attribute render
+     * @type Boolean
+     * @default true
+     */
+    render : {
+        value : true,
+        writeOnce : true
     }
 });