Merge branch 'wip-mdl-34606-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_...
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 4 Sep 2012 00:09:25 +0000 (02:09 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 4 Sep 2012 00:09:25 +0000 (02:09 +0200)
user/selector/module.js

index e6818c8..68b743d 100644 (file)
@@ -77,8 +77,9 @@ M.core_user.init_user_selector = function (Y, name, hash, extrafields, lastsearc
             var clearbtn = Y.one('#'+this.name + '_clearbutton');
             this.clearbutton = Y.Node.create('<input type="button" value="'+clearbtn.get('value')+'" />');
             clearbtn.replace(Y.Node.getDOMNode(this.clearbutton));
-            this.clearbutton.set('id',+this.name+"_clearbutton");
+            this.clearbutton.set('id', this.name+"_clearbutton");
             this.clearbutton.on('click', this.handle_clear, this);
+            this.clearbutton.set('disabled', (this.get_search_text() == ''));
 
             this.send_query(false);
         },