Roo.bootstrap.Button = function(config){
Roo.bootstrap.Button.superclass.constructor.call(this, config);
+ this.weightClass = ["btn-default",
+ "btn-primary",
+ "btn-success",
+ "btn-info",
+ "btn-warning",
+ "btn-danger",
+ "btn-link"
+ ],
this.addEvents({
// raw events
/**
show: function() {
this.el.show();
+ },
+ setWeight : function(str)
+ {
+ this.el.removeClass(this.weightClass);
+ this.el.addClass('btn-' + str);
}
onClick: function(e, el)
{
var time = this.endTimer - this.startTimer;
- // Roo.log(e.preventDefault());
+
if(Roo.isTouch){
if(time > 1000){
e.preventDefault();