projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9346bd5
)
Roo/Button.js
author
Alan
<alan@roojs.com>
Tue, 15 Mar 2022 07:21:59 +0000
(15:21 +0800)
committer
Alan
<alan@roojs.com>
Tue, 15 Mar 2022 07:21:59 +0000
(15:21 +0800)
Roo/Button.js
patch
|
blob
|
history
diff --git
a/Roo/Button.js
b/Roo/Button.js
index
4d4ddf2
..
c3cc8d6
100644
(file)
--- a/
Roo/Button.js
+++ b/
Roo/Button.js
@@
-369,7
+369,24
@@
Roo.extend(Roo.Button, Roo.util.Observable, {
this.hide();
}
},
this.hide();
}
},
-
+ /**
+ * Similar to toggle, but does not trigger event.
+ * @param {Boolean} state [required] Force a particular state
+ */
+ setPressed : function(state)
+ {
+
+ if(state != this.pressed){
+ if(state){
+ this.el.addClass("x-btn-pressed");
+ this.pressed = true;
+ }else{
+ this.el.removeClass("x-btn-pressed");
+ this.pressed = false;
+ }
+ }
+ }
+
/**
* If a state it passed, it becomes the pressed state otherwise the current state is toggled.
* @param {Boolean} state (optional) Force a particular state
/**
* If a state it passed, it becomes the pressed state otherwise the current state is toggled.
* @param {Boolean} state (optional) Force a particular state
@@
-392,6
+409,8
@@
Roo.extend(Roo.Button, Roo.util.Observable, {
}
},
}
},
+
+
/**
* Focus the button
*/
/**
* Focus the button
*/