projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3f1c580
)
Roo/bootstrap/Button.js
author
Alan Knowles
<alan@roojs.com>
Fri, 16 May 2014 08:05:32 +0000
(16:05 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 16 May 2014 08:05:32 +0000
(16:05 +0800)
Roo/bootstrap/Button.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/Button.js
b/Roo/bootstrap/Button.js
index
fc5b4bd
..
6a19e08
100644
(file)
--- a/
Roo/bootstrap/Button.js
+++ b/
Roo/bootstrap/Button.js
@@
-275,6
+275,10
@@
Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, {
},
onClick : function(e)
{
+ if (this.disabled) {
+ return;
+ }
+
Roo.log('button on click ');
if(this.preventDefault){
e.preventDefault();
@@
-287,8
+291,17
@@
Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, {
this.fireEvent('click', this, e);
- }
-
+ },
+ enable : function()
+ {
+ this.disabled = false;
+ this.el.removeClass('disabled');
+ },
+ disable : function()
+ {
+ this.disabled = true;
+ this.el.addClass('disabled');
+ },
});