X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=ea98f39293ebc9d9850e83975b91a05af6fe48ec;hp=c45b4ca1ba0b0fcf427098c7a829db9de15b621e;hb=8f5eb4c4c8c1b9d0a7198e29efe26ac2d9e0bff8;hpb=e01802ac69da0ec0c9ccecc295beff82c1779f68 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index c45b4ca1ba..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... * */ @@ -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(); } @@ -8454,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) @@ -8472,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. @@ -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: