X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=8f61342c187bed14fa05b59c529ea9b25b49412f;hb=7e3002584cb7fc8681da1d57855309b65749866d;hp=a8ebd5ad6c8ba175113a8a4f58f28c2d0ba2bb83;hpb=efe88c035f1d92965197899c7ff9e3fdf6a1a754;p=roojs1 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index a8ebd5ad6c..8f61342c18 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -1340,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(); } @@ -2935,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) ] }; @@ -2971,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); @@ -3616,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 * @@ -3624,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 @@ -4198,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(); @@ -4418,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]))); } } @@ -4625,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() { @@ -4669,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; @@ -6542,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(); } @@ -16654,19 +16665,27 @@ Roo.extend(Roo.data.JsonReader, Roo.data.DataReader, { } var records = []; for(var i = 0; i < c; i++){ - var n = root[i]; + var n = root[i]; var values = {}; var id = this.getId(n); for(var j = 0; j < fl; j++){ f = fi[j]; - var v = this.ef[j](n); - if (!f.convert) { - Roo.log('missing convert for ' + f.name); - Roo.log(f); - continue; - } - values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue); - } + var v = this.ef[j](n); + if (!f.convert) { + Roo.log('missing convert for ' + f.name); + Roo.log(f); + continue; + } + values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue); + } + if (!Record) { + return { + raw : { errorMsg : "JSON Reader Error: fields or metadata not available to create Record" }, + success : false, + records : [], + totalRecords : 0 + }; + } var record = new Record(values, id); record.json = n; records[i] = record; @@ -37853,6 +37872,8 @@ Roo.bootstrap.SplitBar.BOTTOM = 4; */ Roo.bootstrap.layout.Manager = function(config) { + this.monitorWindowResize = true; // do this before we apply configuration. + Roo.bootstrap.layout.Manager.superclass.constructor.call(this,config); @@ -37860,7 +37881,7 @@ Roo.bootstrap.layout.Manager = function(config) /** false to disable window resize monitoring @type Boolean */ - this.monitorWindowResize = true; + this.regions = {}; this.addEvents({ /** @@ -40512,7 +40533,7 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, { ignoreResize : function(w, h) { - return false; // always resize? + //return false; // always resize? if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ return true; }else{ @@ -40919,9 +40940,7 @@ Roo.bootstrap.panel.Grid = function(config) Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, { - // private - is_resizing : false, - + getId : function(){ return this.grid.id; }, @@ -40936,12 +40955,8 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, setSize : function(width, height) { - if (this.is_resizing) { - return; - - } - this.is_resizing = true; - if(!this.ignoreResize(width, height)){ + + //if(!this.ignoreResize(width, height)){ var grid = this.grid; var size = this.adjustForComponents(width, height); // tfoot is not a footer? @@ -40969,8 +40984,8 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, //} grid.autoSize(); - } - this.is_resizing = false; + //} + },