X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=3f925227b1e98e49e7dbd6e4ddf282d4c0ff5e62;hb=5cb025da6d12a9ec7da57c2d616452b3d255bdbe;hp=2b806225d211de01e2616bc2bac47f1ed2693fff;hpb=8d4aa09e387bf0f91ad47847e5bac698c2ded8f3;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 2b806225d2..3f925227b1 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -12,7 +12,7 @@ /** * @class Roo.data.SortTypes - * @singleton + * @static * Defines the default sorting (casting?) comparison functions used when sorting data. */ Roo.data.SortTypes = { @@ -511,13 +511,13 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { */ /** - * @cfg {Roo.data.DataProxy} proxy The Proxy object which provides access to a data object. + * @cfg {Roo.data.DataProxy} proxy [required] The Proxy object which provides access to a data object. */ /** * @cfg {Array} data Inline data to be loaded when the store is initialized. */ /** - * @cfg {Roo.data.Reader} reader The Reader object which processes the data object and returns + * @cfg {Roo.data.DataReader} reader [required] The Reader object which processes the data object and returns * an Array of Roo.data.record objects which are cached keyed by their id property. */ /** @@ -666,6 +666,16 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { *
* @param {Object} options An object containing properties which control loading options:
+ { + data : data, // array of key=>value data like JsonReader + total : data.length, + success : true + + } ++ }.
@@ -1559,8 +1574,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; } @@ -1966,19 +1983,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; @@ -6369,7 +6394,7 @@ Roo.extend(Roo.Button, Roo.util.Observable, { */ enableToggle: false, /** - * @cfg {Mixed} menu + * @cfg {Roo.menu.Menu} menu * Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined). */ menu : undefined, @@ -6991,6 +7016,7 @@ Roo.MenuButton = Roo.SplitButton;/* /** * @class Roo.Toolbar + * @children Roo.Toolbar.Item Roo.Toolbar.Button Roo.Toolbar.SplitButton Roo.form.Field * Basic Toolbar class. * @constructor * Creates a new Toolbar @@ -7526,7 +7552,23 @@ Roo.extend(Roo.Toolbar.TextItem, Roo.Toolbar.Item, { enable:Roo.emptyFn, disable:Roo.emptyFn, - focus:Roo.emptyFn + focus:Roo.emptyFn, + /** + * Shows this button + */ + show: function(){ + this.hidden = false; + this.el.style.display = ""; + }, + + /** + * Hides this button + */ + hide: function(){ + this.hidden = true; + this.el.style.display = "none"; + } + }); /** @@ -7540,7 +7582,10 @@ Roo.extend(Roo.Toolbar.TextItem, Roo.Toolbar.Item, { Roo.Toolbar.Button = function(config){ Roo.Toolbar.Button.superclass.constructor.call(this, null, config); }; -Roo.extend(Roo.Toolbar.Button, Roo.Button, { +Roo.extend(Roo.Toolbar.Button, Roo.Button, +{ + + render : function(td){ this.td = td; Roo.Toolbar.Button.superclass.render.call(this, td); @@ -7646,6 +7691,7 @@ Roo.Toolbar.MenuButton = Roo.Toolbar.SplitButton;/* /** * @class Roo.PagingToolbar * @extends Roo.Toolbar + * @children Roo.Toolbar.Item Roo.Toolbar.Button Roo.Toolbar.SplitButton Roo.form.Field * A specialized toolbar that is bound to a {@link Roo.data.Store} and provides automatic paging controls. * @constructor * Create a new PagingToolbar @@ -7681,10 +7727,7 @@ Roo.PagingToolbar = function(el, ds, config) }; Roo.extend(Roo.PagingToolbar, Roo.Toolbar, { - /** - * @cfg {Roo.data.Store} dataSource - * The underlying data store providing the paged data - */ + /** * @cfg {String/HTMLElement/Element} container * container The id or element that will contain the toolbar @@ -7693,6 +7736,8 @@ Roo.extend(Roo.PagingToolbar, Roo.Toolbar, { * @cfg {Boolean} displayInfo * True to display the displayMsg (defaults to false) */ + + /** * @cfg {Number} pageSize * The number of records to display per page (defaults to 20) @@ -7889,7 +7934,11 @@ Roo.extend(Roo.PagingToolbar, Roo.Toolbar, { this.loading.disable(); } }, - + /** + * event that occurs when you click on the navigation buttons - can be used to trigger load of a grid. + * @param {String} which (first|prev|next|last|refresh) which button to press. + * + */ // private onClick : function(which){ var ds = this.ds; @@ -8979,6 +9028,7 @@ Roo.extend(Roo.Editor, Roo.Component, { /** * @class Roo.BasicDialog * @extends Roo.util.Observable + * @parent none builder * Lightweight Dialog Class. The code below shows the creation of a typical dialog using existing HTML markup: *
var dlg = new Roo.BasicDialog("my-dlg", {
@@ -10088,6 +10138,8 @@ Roo.DialogManager = function(){
/**
* @class Roo.LayoutDialog
* @extends Roo.BasicDialog
+ * @children Roo.ContentPanel
+ * @parent builder none
* Dialog which provides adjustments for working with a layout in a Dialog.
* Add your necessary layout config options to the dialog's config.
* Example usage (including a nested layout):
@@ -10173,6 +10225,28 @@ Roo.LayoutDialog = function(el, cfg){
};
Roo.extend(Roo.LayoutDialog, Roo.BasicDialog, {
+
+
+ /**
+ * @cfg {Roo.LayoutRegion} east
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} west
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} south
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} north
+ */
+ /**
+ * @cfg {Roo.LayoutRegion} center
+ */
+ /**
+ * @cfg {Roo.Button} buttons[] Bottom buttons..
+ */
+
+
/**
* Ends update of the layout and resets display to none. Use standard beginUpdate/endUpdate on the layout.
* @deprecated
@@ -10232,6 +10306,7 @@ Roo.extend(Roo.LayoutDialog, Roo.BasicDialog, {
/**
* @class Roo.MessageBox
+ * @static
* Utility class for generating different styles of message boxes. The alias Roo.Msg can also be used.
* Example usage:
*
@@ -10254,7 +10329,7 @@ Roo.Msg.show({
animEl: 'elId'
});
- * @singleton
+ * @static
*/
Roo.MessageBox = function(){
var dlg, opt, mask, waitTimer;
@@ -10341,6 +10416,7 @@ Roo.MessageBox = function(){
}
}
});
+
dlg.on("hide", handleHide);
mask = dlg.mask;
dlg.addKeyListener(27, handleEsc);
@@ -10584,6 +10660,7 @@ Roo.Msg.show({
d.animateTarget = null;
d.show(options.animEl);
}
+ dlg.toFront();
return this;
},
@@ -10783,7 +10860,7 @@ Roo.Msg = Roo.MessageBox;/*
/**
* @class Roo.QuickTips
* Provides attractive and customizable tooltips for any element.
- * @singleton
+ * @static
*/
Roo.QuickTips = function(){
var el, tipBody, tipBodyText, tipTitle, tm, cfg, close, tagEls = {}, esc, removeCls = null, bdLeft, bdRight;
@@ -11185,7 +11262,7 @@ Roo.QuickTips.tips = Roo.QuickTips.register;/*
/**
* @class Roo.tree.TreePanel
* @extends Roo.data.Tree
-
+ * @cfg {Roo.tree.TreeNode} root The root node
* @cfg {Boolean} rootVisible false to hide the root node (defaults to true)
* @cfg {Boolean} lines false to disable tree lines (defaults to true)
* @cfg {Boolean} enableDD true to enable drag and drop
@@ -11202,8 +11279,8 @@ Roo.QuickTips.tips = Roo.QuickTips.register;/*
* @cfg {Boolean} animate true to enable animated expand/collapse (defaults to the value of Roo.enableFx)
* @cfg {Boolean} singleExpand true if only 1 node per branch may be expanded
* @cfg {Boolean} selModel A tree selection model to use with this TreePanel (defaults to a {@link Roo.tree.DefaultSelectionModel})
- * @cfg {Boolean} loader A TreeLoader for use with this TreePanel
- * @cfg {Object|Roo.tree.TreeEditor} editor The TreeEditor or xtype data to display when clicked.
+ * @cfg {Roo.tree.TreeLoader} loader A TreeLoader for use with this TreePanel
+ * @cfg {Roo.tree.TreeEditor} editor The TreeEditor to display when clicked.
* @cfg {String} pathSeparator The token used to separate sub-paths in path strings (defaults to '/')
* @cfg {Function} renderer DEPRECATED - use TreeLoader:create event / Sets the rendering (formatting) function for the nodes. to return HTML markup for the tree view. The render function is called with the following parameters:- The {Object} The data for the node.
* @cfg {Function} rendererTip DEPRECATED - use TreeLoader:create event / Sets the rendering (formatting) function for the nodes hovertip to return HTML markup for the tree view. The render function is called with the following parameters:- The {Object} The data for the node.
@@ -13948,7 +14025,7 @@ Roo.extend(Roo.tree.TreeDragZone, Roo.dd.DragZone, {
* @param {Object} oldconfig DEPRECIATED Either a prebuilt {@link Roo.form.Field} instance or a Field config object
*
* @cfg {Roo.tree.TreePanel} tree The tree to bind to.
- * @cfg {Roo.form.TextField|Object} field The field configuration
+ * @cfg {Roo.form.TextField} field [required] The field configuration
*
*
*/
@@ -14254,7 +14331,7 @@ Roo.tree.ColumnNodeUI = Roo.extend(Roo.tree.TreeNodeUI, {
/**
* @class Roo.tree.ColumnTree
- * @extends Roo.data.TreePanel
+ * @extends Roo.tree.TreePanel
* @cfg {Object} columns Including width, header, renderer, cls, dataIndex
* @cfg {int} borderWidth compined right/left border allowance
* @constructor
@@ -14365,6 +14442,7 @@ Roo.extend(Roo.tree.ColumnTree, Roo.tree.TreePanel, {
/**
* @class Roo.menu.Menu
* @extends Roo.util.Observable
+ * @children Roo.menu.Item Roo.menu.Separator Roo.menu.TextItem
* A menu object. This is the container to which you add all other menu items. Menu can also serve a as a base class
* when you want a specialzed menu based off of another component (like {@link Roo.menu.DateMenu} for example).
* @constructor
@@ -14934,7 +15012,7 @@ Roo.extend(Roo.menu.MenuNav, Roo.KeyNav, {
/**
* @class Roo.menu.MenuMgr
* Provides a common registry of all menu items on a page so that they can be easily accessed by id.
- * @singleton
+ * @static
*/
Roo.menu.MenuMgr = function(){
var menus, active, groups = {}, attached = false, lastShow = new Date();
@@ -15122,6 +15200,7 @@ Roo.menu.MenuMgr = function(){
/**
* @class Roo.menu.BaseItem
* @extends Roo.Component
+ * @abstract
* The base class for all items that render into menus. BaseItem provides default rendering, activated state
* management and base configuration options shared by all menu components.
* @constructor
@@ -15268,6 +15347,7 @@ Roo.extend(Roo.menu.BaseItem, Roo.Component, {
/**
* @class Roo.menu.Adapter
* @extends Roo.menu.BaseItem
+ * @abstract
* A base utility class that adapts a non-menu component so that it can be wrapped by a menu item and added to a menu.
* It provides basic rendering, activation management and enable/disable logic required to work in menus.
* @constructor
@@ -15437,14 +15517,17 @@ Roo.menu.Item = function(config){
}
};
Roo.extend(Roo.menu.Item, Roo.menu.BaseItem, {
-
+ /**
+ * @cfg {Roo.menu.Menu} menu
+ * A Sub menu
+ */
/**
* @cfg {String} text
* The text to show on the menu item.
*/
text: '',
/**
- * @cfg {String} HTML to render in menu
+ * @cfg {String} html to render in menu
* The text to show on the menu item (HTML version).
*/
html: '',
@@ -17517,6 +17600,16 @@ Roo.extend(Roo.form.DateField, Roo.form.TriggerField, {
* The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled')
*/
disabledDatesText : "Disabled",
+
+
+ /**
+ * @cfg {Date/String} zeroValue
+ * if the date is less that this number, then the field is rendered as empty
+ * default is 1800
+ */
+ zeroValue : '1800-01-01',
+
+
/**
* @cfg {Date/String} minValue
* The minimum allowed date. Can be either a Javascript date object or a string date in a
@@ -17693,6 +17786,15 @@ dateField.setValue('2006-5-4');
// private
parseDate : function(value){
+
+ if (value instanceof Date) {
+ if (value < Date.parseDate(this.zeroValue, 'Y-m-d') ) {
+ return '';
+ }
+ return value;
+ }
+
+
if(!value || value instanceof Date){
return value;
}
@@ -17708,6 +17810,9 @@ dateField.setValue('2006-5-4');
v = Date.parseDate(value, this.altFormatsArray[i]);
}
}
+ if (v < Date.parseDate(this.zeroValue, 'Y-m-d') ) {
+ v = '';
+ }
return v;
},
@@ -19363,7 +19468,7 @@ Roo.form.ComboBoxArray = function(config)
Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
{
/**
- * @cfg {Roo.form.Combo} combo The combo box that is wrapped
+ * @cfg {Roo.form.ComboBox} combo [required] The combo box that is wrapped
*/
lastData : false,
@@ -20492,405 +20597,4863 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, {
}
-});//