X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=2d53d547612c98c1655520f303165252c160c546;hp=c45b4ca1ba0b0fcf427098c7a829db9de15b621e;hb=61c726d90ac8dc8f5c38582448500c515bb8c5c6;hpb=e01802ac69da0ec0c9ccecc295beff82c1779f68 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index c45b4ca1ba..2d53d54761 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -1,4 +1,4 @@ -/** +Roo.bootstrap = {};/** * set the version of bootstrap based on the stylesheet... * */ @@ -855,9 +855,8 @@ Roo.extend(Roo.bootstrap.DropTarget, Roo.bootstrap.Element, { /** * @class Roo.bootstrap.Body * @extends Roo.bootstrap.Component - * @builder-top - * @children Roo.bootstrap.Component - * @parent none + * @children Roo.bootstrap.Component + * @parent none builder * Bootstrap Body class * * @constructor @@ -1341,7 +1340,7 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, { } Roo.log('button on click '); - if(this.preventDefault){ + if(this.href === '' || this.preventDefault){ e.preventDefault(); } @@ -1607,8 +1606,8 @@ Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component, { /** * @class Roo.bootstrap.Container * @extends Roo.bootstrap.Component - * @builder-top * @children Roo.bootstrap.Component + * @parent builder * Bootstrap Container class * @cfg {Boolean} jumbotron is it a jumbotron element * @cfg {String} html content of element @@ -2936,22 +2935,12 @@ Roo.extend(Roo.bootstrap.ButtonUploader, Roo.bootstrap.Button, { getAutoCreate : function() { - var im = { - tag: 'input', - type : 'file', - cls : 'd-none roo-card-upload-selector' - - }; - if (this.multiple) { - im.multiple = 'multiple'; - } + return { cls :'div' , cn : [ - Roo.bootstrap.Button.prototype.getAutoCreate.call(this), - im - + Roo.bootstrap.Button.prototype.getAutoCreate.call(this) ] }; @@ -2972,10 +2961,18 @@ Roo.extend(Roo.bootstrap.ButtonUploader, Roo.bootstrap.Button, { (window.URL && URL.revokeObjectURL && URL) || (window.webkitURL && webkitURL); - - - - this.selectorEl = this.el.select('.roo-card-upload-selector', true).first(); + var im = { + tag: 'input', + type : 'file', + cls : 'd-none roo-card-upload-selector' + + }; + if (this.multiple) { + im.multiple = 'multiple'; + } + this.selectorEl = Roo.get(document.body).createChild(im); // so it does not capture click event for navitem. + + //this.selectorEl = this.el.select('.roo-card-upload-selector', true).first(); this.selectorEl.on('change', this.onFileSelected, this); @@ -3428,7 +3425,7 @@ Roo.extend(Roo.bootstrap.Header, Roo.bootstrap.Component, { * @class Roo.bootstrap.MenuMgr * @licence LGPL * Provides a common registry of all menu items on a page so that they can be easily accessed by id. - * @singleton + * @static */ Roo.bootstrap.menu.Manager = function(){ var menus, active, groups = {}, attached = false, lastShow = new Date(); @@ -3617,7 +3614,7 @@ Roo.bootstrap.menu.Manager = function(){ * @class Roo.bootstrap.menu.Menu * @extends Roo.bootstrap.Component * @licence LGPL - * @children Roo.bootstrap.menu.Item + * @children Roo.bootstrap.menu.Item Roo.bootstrap.menu.Separator * @parent none * Bootstrap Menu class - container for MenuItems - normally has to be added to a object that supports the menu property * @@ -3625,8 +3622,8 @@ Roo.bootstrap.menu.Manager = function(){ * @cfg {bool} hidden if the menu should be hidden when rendered. * @cfg {bool} stopEvent (true|false) Stop event after trigger press (default true) * @cfg {bool} isLink (true|false) the menu has link disable auto expand and collaspe (default false) - * @cfg {bool} hideTrigger (true|false) default false - hide the carret for trigger. - * @cfg {String} align default tl-bl? == below - how the menu should be aligned. +* @cfg {bool} hideTrigger (true|false) default false - hide the carret for trigger. +* @cfg {String} align default tl-bl? == below - how the menu should be aligned. * @constructor * Create a new Menu @@ -4199,9 +4196,9 @@ Roo.extend(Roo.bootstrap.menu.Item, Roo.bootstrap.Component, { }, onClick : function(e) { - Roo.log('item on click '); + //Roo.log('item on click '); - if(this.preventDefault){ + if(this.href === false || this.preventDefault){ e.preventDefault(); } //this.parent().hideMenuItems(); @@ -4259,8 +4256,7 @@ Roo.extend(Roo.bootstrap.menu.Separator, Roo.bootstrap.Component, { /** * @class Roo.bootstrap.Modal * @extends Roo.bootstrap.Component - * @builder-top - * @parent none + * @parent none builder * @children Roo.bootstrap.Component * Bootstrap Modal class * @cfg {String} title Title of dialog @@ -4420,6 +4416,8 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { delete this.items; for(var i =0;i < items.length;i++) { + // we force children not to montor widnow resize - as we do that for them. + items[i].monitorWindowResize = false; nitems.push(this.addxtype(Roo.apply({}, items[i]))); } } @@ -4627,6 +4625,14 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { } this.resizeTo(w,h); + // any layout/border etc.. resize.. + (function () { + this.items.forEach( function(e) { + e.layout ? e.layout() : false; + + }); + }).defer(100,this); + }, show : function() { @@ -4671,7 +4677,9 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { // set zindex here - otherwise it appears to be ignored... this.el.setStyle('z-index', Roo.bootstrap.Modal.zIndex++); - + + + // this is for children that are... layout.Border (function () { this.items.forEach( function(e) { e.layout ? e.layout() : false; @@ -4980,7 +4988,7 @@ Roo.Msg.show({ animEl: 'elId' }); - * @singleton + * @static */ Roo.bootstrap.MessageBox = function(){ var dlg, opt, mask, waitTimer; @@ -6544,10 +6552,11 @@ Roo.extend(Roo.bootstrap.nav.Item, Roo.bootstrap.Component, { } if( - this.preventDefault || - this.href == '#' + this.preventDefault || + this.href === false || + this.href === '#' ){ - Roo.log("NavItem - prevent Default?"); + //Roo.log("NavItem - prevent Default?"); e.preventDefault(); } @@ -9138,7 +9147,8 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * * @cfg {String} cls table class * - * + * + * @cfg {string} empty_results Text to display for no results * @cfg {boolean} striped Should the rows be alternative striped * @cfg {boolean} bordered Add borders to the table * @cfg {boolean} hover Add hover highlighting @@ -9150,11 +9160,13 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @cfg {Boolean} headerShow (true|false) generate thead, default true * @cfg {Boolean} rowSelection (true|false) default false * @cfg {Boolean} cellSelection (true|false) default false - * @cfg {Boolean} scrollBody (true|false) default false - body scrolled / fixed header + * @cfg {Boolean} scrollBody (true|false) default false - body scrolled / fixed header (with resizable columns) * @cfg {Roo.bootstrap.PagingToolbar} footer a paging toolbar * @cfg {Boolean} lazyLoad auto load data while scrolling to the end (default false) * @cfg {Boolean} auto_hide_footer auto hide footer if only one page (default false) - * @cfg {Boolean} enableColumnResize default true if columns can be resized (drag/drop) + * @cfg {Boolean} enableColumnResize default true if columns can be resized = needs scrollBody to be set to work (drag/drop) + * + * * @cfg {Number} minColumnWidth default 50 pixels minimum column width * * @constructor @@ -9316,6 +9328,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { cls: false, + empty_results : '', striped : false, scrollBody : false, bordered: false, @@ -9567,7 +9580,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { } styles.push('#' , this.id , ' .x-hcol-' , i, " { ", width, hidden," }\n", - '#' , this.id , ' .x-grid-split-' , i, " { ", left, splithide,'height:', (headHeight - 4), "px;}\n" + '#' , this.id , ' .x-grid-split-' , i, " { ", left, splithide, 'height:', (headHeight - 4), "px;}\n", + // this is the popover version.. + '.popover-inner #' , this.id , ' .x-grid-split-' , i, " { ", left, splithide, 'height:', 100, "%;}\n" ); } @@ -10002,6 +10017,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { } }, this); + } else if (this.empty_results.length) { + this.el.mask(this.empty_results, 'no-spinner'); } var tfoot = this.el.select('tfoot', true).first(); @@ -10380,7 +10397,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { onBeforeLoad : function() { - + this.el.unmask(); // if needed. }, /** * Remove all rows @@ -12129,7 +12146,7 @@ Roo.apply(Roo.bootstrap.form.Form, { /** * @class Roo.form.VTypes * Overridable validation definitions. The validations provided are basic and intended to be easily customizable and extended. - * @singleton + * @static */ Roo.form.VTypes = function(){ // closure these in so they are only created once. @@ -14687,7 +14704,7 @@ Roo.bootstrap.form.CardUploader.ID = -1;/* /** * @class Roo.data.SortTypes - * @singleton + * @static * Defines the default sorting (casting?) comparison functions used when sorting data. */ Roo.data.SortTypes = { @@ -15341,6 +15358,16 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { *

* @param {Object} options An object containing properties which control loading options: