X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=ea98f39293ebc9d9850e83975b91a05af6fe48ec;hp=9e6e7e8521e2f5f61d0d6852ac0566221855fe6d;hb=8f5eb4c4c8c1b9d0a7198e29efe26ac2d9e0bff8;hpb=a6573a80df44dfb589e3779cf9028b8f81a490fa diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 9e6e7e8521..ea98f39293 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... * */ @@ -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(); } @@ -8452,7 +8463,7 @@ Roo.grid.ColumnModel = function(config){ }; Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, { /** - * @cfg {String} header The header text to display in the Grid view. + * @cfg {String} header [required] The header text to display in the Grid view. */ /** * @cfg {String} xsHeader Header at Bootsrap Extra Small width (default for all) @@ -8470,66 +8481,66 @@ Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, { * @cfg {String} xlHeader Header at Bootsrap extra Large width */ /** - * @cfg {String} dataIndex (Optional) The name of the field in the grid's {@link Roo.data.Store}'s + * @cfg {String} dataIndex The name of the field in the grid's {@link Roo.data.Store}'s * {@link Roo.data.Record} definition from which to draw the column's value. If not * specified, the column's index is used as an index into the Record's data Array. */ /** - * @cfg {Number} width (Optional) The initial width in pixels of the column. Using this + * @cfg {Number} width The initial width in pixels of the column. Using this * instead of {@link Roo.grid.Grid#autoSizeColumns} is more efficient. */ /** - * @cfg {Boolean} sortable (Optional) True if sorting is to be allowed on this column. + * @cfg {Boolean} sortable True if sorting is to be allowed on this column. * Defaults to the value of the {@link #defaultSortable} property. * Whether local/remote sorting is used is specified in {@link Roo.data.Store#remoteSort}. */ /** - * @cfg {Boolean} locked (Optional) True to lock the column in place while scrolling the Grid. Defaults to false. + * @cfg {Boolean} locked True to lock the column in place while scrolling the Grid. Defaults to false. */ /** - * @cfg {Boolean} fixed (Optional) True if the column width cannot be changed. Defaults to false. + * @cfg {Boolean} fixed True if the column width cannot be changed. Defaults to false. */ /** - * @cfg {Boolean} resizable (Optional) False to disable column resizing. Defaults to true. + * @cfg {Boolean} resizable False to disable column resizing. Defaults to true. */ /** - * @cfg {Boolean} hidden (Optional) True to hide the column. Defaults to false. + * @cfg {Boolean} hidden True to hide the column. Defaults to false. */ /** - * @cfg {Function} renderer (Optional) A function used to generate HTML markup for a cell + * @cfg {Function} renderer A function used to generate HTML markup for a cell * given the cell's data value. See {@link #setRenderer}. If not specified, the * default renderer returns the escaped data value. If an object is returned (bootstrap only) * then it is treated as a Roo Component object instance, and it is rendered after the initial row is rendered */ /** - * @cfg {Roo.grid.GridEditor} editor (Optional) For grid editors - returns the grid editor + * @cfg {Roo.grid.GridEditor} editor For grid editors - returns the grid editor */ /** - * @cfg {String} align (Optional) Set the CSS text-align property of the column. Defaults to undefined. + * @cfg {String} align (left|right) Set the CSS text-align property of the column. Defaults to undefined (left). */ /** - * @cfg {String} valign (Optional) Set the CSS vertical-align property of the column (eg. middle, top, bottom etc). Defaults to undefined. + * @cfg {String} valign (top|bottom|middle) Set the CSS vertical-align property of the column (eg. middle, top, bottom etc). Defaults to undefined (middle) */ /** - * @cfg {String} cursor (Optional) + * @cfg {String} cursor ( auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing) */ /** - * @cfg {String} tooltip (Optional) + * @cfg {String} tooltip mouse over tooltip text */ /** - * @cfg {Number} xs (Optional) can be '0' for hidden at this size (number less than 12) + * @cfg {Number} xs can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} sm (Optional) can be '0' for hidden at this size (number less than 12) + * @cfg {Number} sm can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} md (Optional) can be '0' for hidden at this size (number less than 12) + * @cfg {Number} md can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} lg (Optional) can be '0' for hidden at this size (number less than 12) + * @cfg {Number} lg can be '0' for hidden at this size (number less than 12) */ /** - * @cfg {Number} xl (Optional) can be '0' for hidden at this size (number less than 12) + * @cfg {Number} xl can be '0' for hidden at this size (number less than 12) */ /** * Returns the id of the column at the specified index. @@ -9136,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 @@ -9153,6 +9165,7 @@ Currently the Table uses multiple headers to try and handle XL / Medium etc... * @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 = needs scrollBody to be set to work (drag/drop) + * * * @cfg {Number} minColumnWidth default 50 pixels minimum column width * @@ -9315,6 +9328,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { cls: false, + empty_results : '', striped : false, scrollBody : false, bordered: false, @@ -10003,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(); @@ -10381,7 +10397,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { onBeforeLoad : function() { - + this.el.unmask(); // if needed. }, /** * Remove all rows @@ -15342,6 +15358,16 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { *

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