X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=15aecbb0235fe3fe20cca0cc4fefb69502bd8f86;hb=46006a3c466bf93bd2f3745aef2f13303843d5a7;hp=d21eb2491f980a20c6f5ef317f9b82cb9bad97d4;hpb=6aaebaca844d16f7f8bb7e8cb51041d0ed7af742;p=roojs1
diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js
index d21eb2491f..15aecbb023 100644
--- a/roojs-bootstrap-debug.js
+++ b/roojs-bootstrap-debug.js
@@ -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
@@ -3617,7 +3616,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 +3624,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 +4198,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 +4258,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
@@ -6544,10 +6542,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 +9137,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 +9150,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 +9318,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, {
cls: false,
+ empty_results : '',
striped : false,
scrollBody : false,
bordered: false,
@@ -9567,7 +9570,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 +10007,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 +10387,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, {
onBeforeLoad : function()
{
-
+ this.el.unmask(); // if needed.
},
/**
* Remove all rows
@@ -15387,7 +15394,8 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
// 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);
}
@@ -16238,8 +16246,10 @@ Roo.extend(Roo.data.HttpProxy, Roo.data.DataProxy, {
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;
}
@@ -16645,19 +16655,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;
@@ -21489,8 +21507,7 @@ Roo.extend(Roo.bootstrap.Calendar, Roo.bootstrap.Component, {
/**
* @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..)
@@ -28771,8 +28788,14 @@ Roo.extend(Roo.bootstrap.PagingToolbar, Roo.bootstrap.nav.Simplebar, {
},
// 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
@@ -38023,8 +38046,8 @@ Roo.extend(Roo.bootstrap.layout.Manager, Roo.bootstrap.Component, {
/**
* @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
@@ -40222,8 +40245,8 @@ Roo.extend(Roo.bootstrap.layout.West, Roo.bootstrap.layout.Split, {
/**
* @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)
@@ -40496,7 +40519,9 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, {
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{
@@ -40901,7 +40926,11 @@ Roo.bootstrap.panel.Grid = function(config)
};
-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;
},
@@ -40914,7 +40943,13 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
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);
@@ -40944,6 +40979,7 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
grid.autoSize();
}
+ this.is_resizing = false;
},