MDL-36341 calendar: fixed JS bug with popup node setter
authorSam Hemelryk <sam@moodle.com>
Tue, 20 Nov 2012 00:31:31 +0000 (13:31 +1300)
committerSam Hemelryk <sam@moodle.com>
Sun, 2 Dec 2012 22:31:34 +0000 (11:31 +1300)
calendar/yui/eventmanager/eventmanager.js

index d07b94b..4aedc2e 100644 (file)
@@ -101,8 +101,10 @@ YUI.add('moodle-calendar-eventmanager', function(Y) {
             },
             node : {
                 setter : function(node) {
-                    var n = Y.one('#'+node);
-                    return n;
+                    if (typeof(node) === 'string') {
+                        node = Y.one('#'+node);
+                    }
+                    return node;
                 }
             },
             title : {