/**
* @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
/**
* @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
* @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();
* @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
*
* @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
/**
* @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
animEl: 'elId'
});
</code></pre>
- * @singleton
+ * @static
*/
Roo.bootstrap.MessageBox = function(){
var dlg, opt, mask, waitTimer;
*
* @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
* @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
cls: false,
+ empty_results : '',
striped : false,
scrollBody : false,
bordered: false,
}
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"
);
}
}
}, this);
+ } else if (this.empty_results.length) {
+ this.el.mask(this.empty_results, 'no-spinner');
}
var tfoot = this.el.select('tfoot', true).first();
onBeforeLoad : function()
{
-
+ this.el.unmask(); // if needed.
},
/**
* Remove all rows
/**
* @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.
/**
* @class Roo.data.SortTypes
- * @singleton
+ * @static
* Defines the default sorting (casting?) comparison functions used when sorting data.
*/
Roo.data.SortTypes = {
// private
// Called as a callback by the Reader during a load operation.
loadRecords : function(o, options, success){
- if(!o || success === false){
+
+ if(!o){
if(success !== false){
this.fireEvent("load", this, [], options, o);
}
try {
result = o.reader.read(response);
}catch(e){
+ o.success = false;
+ o.raw = { errorMsg : response.responseText };
this.fireEvent("loadexception", this, o, response, e);
- o.request.callback.call(o.request.scope, null, o.request.arg, false);
+ o.request.callback.call(o.request.scope, o, o.request.arg, false);
return;
}
/**
* @class Roo.bootstrap.Popover
* @extends Roo.bootstrap.Component
- * @builder-top
- * @parent none
+ * @parent none builder
* @children Roo.bootstrap.Component
* Bootstrap Popover class
* @cfg {String} html contents of the popover (or false to use children..)
}
}, this.delay.hide)
},
+
+ /**
+ * update the position of the dialog
+ * normally this is needed if the popover get's bigger - due to a Table reload etc..
+ *
+ *
+ */
+
+ doAlign : function()
+ {
+
+ if (this.alignEl) {
+ this.updatePosition(this.placement, true);
+
+ } else {
+ // this is usually just done by the builder = to show the popoup in the middle of the scren.
+ var es = this.el.getSize();
+ var x = Roo.lib.Dom.getViewWidth()/2;
+ var y = Roo.lib.Dom.getViewHeight()/2;
+ this.el.setXY([ x-(es.width/2), y-(es.height/2)] );
+
+ }
+
+
+
+
+
+ },
+
/**
* Show the popover
* @param {Roo.Element|string|Boolean} - element to align and point to. (set align to [ pos, offset ])
this.el.show();
this.el.dom.style.display = 'block';
-
- if (this.alignEl) {
- this.updatePosition(this.placement, true);
-
- } else {
- // this is usually just done by the builder = to show the popoup in the middle of the scren.
- var es = this.el.getSize();
- var x = Roo.lib.Dom.getViewWidth()/2;
- var y = Roo.lib.Dom.getViewHeight()/2;
- this.el.setXY([ x-(es.width/2), y-(es.height/2)] );
-
- }
-
+ this.doAlign();
//var arrow = this.el.select('.arrow',true).first();
//arrow.set(align[2],
},
// private
- onLoadError : function(){
+ onLoadError : function(proxy, o){
this.loading.enable();
+ if (this.ds.events.loadexception.listeners.length < 2) {
+ // nothing has been assigned to loadexception except this...
+ // so
+ Roo.MessageBox.alert("Error loading",o.raw.errorMsg);
+
+ }
},
// private
/**
* @class Roo.bootstrap.layout.Border
* @extends Roo.bootstrap.layout.Manager
- * @builder-top
* @children Roo.bootstrap.panel.Content Roo.bootstrap.panel.Nest Roo.bootstrap.panel.Grid
+ * @parent builder Roo.bootstrap.panel.Nest Roo.bootstrap.panel.Nest Roo.bootstrap.Modal
* This class represents a common layout manager used in desktop applications. For screenshots and more details,
* please see: examples/bootstrap/nested.html<br><br>
/**
* @class Roo.bootstrap.paenl.Content
* @extends Roo.util.Observable
- * @builder-top
* @children Roo.bootstrap.Component
+ * @parent builder Roo.bootstrap.layout.Border
* A basic ContentPanel element. - a panel that contain any content (eg. forms etc.)
* @cfg {Boolean} fitToFrame True for this panel to adjust its size to fit when the region resizes (defaults to false)
* @cfg {Boolean} fitContainer When using {@link #fitToFrame} and {@link #resizeEl}, you can also fit the parent container (defaults to false)
this.el.update(content, loadScripts);
},
- ignoreResize : function(w, h){
+ ignoreResize : function(w, h)
+ {
+ return false; // always resize?
if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
return true;
}else{
};
-Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
+Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content,
+{
+ // private
+ is_resizing : false,
+
getId : function(){
return this.grid.id;
},
return this.grid;
},
- setSize : function(width, height){
+ setSize : function(width, height)
+ {
+ if (this.is_resizing) {
+ return;
+
+ }
+ this.is_resizing = true;
if(!this.ignoreResize(width, height)){
var grid = this.grid;
var size = this.adjustForComponents(width, height);
grid.autoSize();
}
+ this.is_resizing = false;
},