MDL-43262 JavaScript: Correct visible attribute override
authorAndrew Nicols <andrew@nicols.co.uk>
Sun, 8 Dec 2013 14:54:58 +0000 (22:54 +0800)
committerSam Hemelryk <sam@moodle.com>
Sun, 12 Jan 2014 19:26:28 +0000 (08:26 +1300)
This should be done using an attribute modification, rather than at the
constructor level.

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/notification/js/dialogue.js

index f62731d..51b914f 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 84e25c5..6e99a62 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 32f5cd4..66d6484 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 933727a..c149907 100644 (file)
@@ -39,7 +39,6 @@ DIALOGUE = function(c) {
     }
 
     config.srcNode =    '#'+id;
-    config.visible =    config.visible || false;
     config.center =     config.centered && true;
     config.centered =   false;
     config.COUNT = COUNT;
@@ -465,6 +464,19 @@ Y.Base.modifyAttrs(DIALOGUE, {
             }
             return value;
         }
+    },
+
+    /**
+     * Boolean indicating whether or not the Widget is visible.
+     *
+     * We override this from the default Widget attribute value.
+     *
+     * @attribute visible
+     * @default false
+     * @type Boolean
+     */
+    visible: {
+        value: false
     }
 });