From f0902c9c5da6ffa2b4cbb9c10d44ea09e0b5b303 Mon Sep 17 00:00:00 2001 From: edward Date: Fri, 13 Nov 2015 13:15:35 +0800 Subject: [PATCH] Roo/bootstrap/Element.js --- Roo/bootstrap/Element.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Roo/bootstrap/Element.js b/Roo/bootstrap/Element.js index bb4c9f0d2e..085b068323 100644 --- a/Roo/bootstrap/Element.js +++ b/Roo/bootstrap/Element.js @@ -12,6 +12,7 @@ * @cfg {String} html contents of the element * @cfg {String} tag tag of the element * @cfg {String} cls class of the element + * @cfg {Boolean} preventDefault (true|false) default false * * @constructor * Create a new Element @@ -20,6 +21,17 @@ Roo.bootstrap.Element = function(config){ Roo.bootstrap.Element.superclass.constructor.call(this, config); + + this.addEvents({ + // raw events + /** + * @event click + * When a element is chick + * @param {Roo.bootstrap.Element} this + * @param {Roo.EventObject} e + */ + "click" : true + }); }; Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component, { @@ -27,7 +39,7 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component, { tag: 'div', cls: '', html: '', - + preventDefault: false, getAutoCreate : function(){ @@ -51,10 +63,6 @@ Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component, { onClick : function(e) { - if (this.disabled) { - return; - } - if(this.preventDefault){ e.preventDefault(); } -- 2.39.2