From acff4866644454cc6c8f1fc5edd8f66155a3b1b8 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Mon, 27 Aug 2012 14:55:02 +0800 Subject: [PATCH] MDl-34606 Administration: id for clear button is set properly, and disabled on page load --- user/selector/module.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/selector/module.js b/user/selector/module.js index e6818c88f7c..68b743d3b0a 100644 --- a/user/selector/module.js +++ b/user/selector/module.js @@ -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(''); 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); },