From 946f16ecf07aa8f3240ab0870c15764abe349eb4 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 3 Nov 2020 16:31:58 +0800 Subject: [PATCH] buildSDK/dependancy_bootstrap.txt roojs-bootstrap.js roojs-bootstrap-debug.js --- buildSDK/dependancy_bootstrap.txt | 3 +- roojs-bootstrap-debug.js | 178 +++++++++++++++--------------- roojs-bootstrap.js | 8 +- 3 files changed, 95 insertions(+), 94 deletions(-) diff --git a/buildSDK/dependancy_bootstrap.txt b/buildSDK/dependancy_bootstrap.txt index 30a681e813..71e1ec5763 100644 --- a/buildSDK/dependancy_bootstrap.txt +++ b/buildSDK/dependancy_bootstrap.txt @@ -2,6 +2,7 @@ Roo.bootstrap.version Roo.bootstrap.Component +Roo.bootstrap.Element Roo.bootstrap.Body Roo.bootstrap.ButtonGroup @@ -34,7 +35,7 @@ Roo.bootstrap.NavSidebarItem Roo.bootstrap.Row -Roo.bootstrap.Element + Roo.bootstrap.Pagination Roo.bootstrap.PaginationItem Roo.bootstrap.Slider diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 3bdf91e958..ce4ffe5ce9 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -435,6 +435,95 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent, { } }); + /* + * - LGPL + * + * element + * + */ + +/** + * @class Roo.bootstrap.Element + * @extends Roo.bootstrap.Component + * Bootstrap Element class + * @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 + * @cfg {Boolean} clickable (true|false) default false + * + * @constructor + * Create a new Element + * @param {Object} config The config object + */ + +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, { + + tag: 'div', + cls: '', + html: '', + preventDefault: false, + clickable: false, + + getAutoCreate : function(){ + + var cfg = { + tag: this.tag, + // cls: this.cls, double assign in parent class Component.js :: onRender + html: this.html + }; + + return cfg; + }, + + initEvents: function() + { + Roo.bootstrap.Element.superclass.initEvents.call(this); + + if(this.clickable){ + this.el.on('click', this.onClick, this); + } + + }, + + onClick : function(e) + { + if(this.preventDefault){ + e.preventDefault(); + } + + this.fireEvent('click', this, e); + }, + + getValue : function() + { + return this.el.dom.innerHTML; + }, + + setValue : function(value) + { + this.el.dom.innerHTML = value; + } + +}); + + + /* * - LGPL * @@ -5632,95 +5721,6 @@ Roo.extend(Roo.bootstrap.Row, Roo.bootstrap.Component, { - /* - * - LGPL - * - * element - * - */ - -/** - * @class Roo.bootstrap.Element - * @extends Roo.bootstrap.Component - * Bootstrap Element class - * @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 - * @cfg {Boolean} clickable (true|false) default false - * - * @constructor - * Create a new Element - * @param {Object} config The config object - */ - -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, { - - tag: 'div', - cls: '', - html: '', - preventDefault: false, - clickable: false, - - getAutoCreate : function(){ - - var cfg = { - tag: this.tag, - // cls: this.cls, double assign in parent class Component.js :: onRender - html: this.html - }; - - return cfg; - }, - - initEvents: function() - { - Roo.bootstrap.Element.superclass.initEvents.call(this); - - if(this.clickable){ - this.el.on('click', this.onClick, this); - } - - }, - - onClick : function(e) - { - if(this.preventDefault){ - e.preventDefault(); - } - - this.fireEvent('click', this, e); - }, - - getValue : function() - { - return this.el.dom.innerHTML; - }, - - setValue : function(value) - { - this.el.dom.innerHTML = value; - } - -}); - - - /* * - LGPL * diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index eb2588e3d0..204596ad1f 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -15,6 +15,10 @@ Roo.debug&&Roo.log(cn);}}if(E&&D&&!cn.el&&cn.can_build_overlaid){Roo.debug&&Roo. return cn;}var I=A.items;delete A.items;if(!skip_children){for(var i=0;i