X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=7eb4754113f3f0e0f058af9d6a45bcd1a367297e;hb=f4700f0511a9842ccb588098b291c50d855ce574;hp=0d2285db4934541b7eba8997eddca43036390323;hpb=c4ec853f8b86740a021ea3e6669f2d903878a229;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 0d2285db49..7eb4754113 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20406,8 +20406,8 @@ Roo.extend(Roo.form.ComboNested, Roo.form.ComboBox, { left: (i * lw ) + 'px', display : i > 0 ? 'none' : 'block' }); - view.on('selectionchange', this.onSelectChange, this, {list : i }); - view.on('dblclick', this.onDoubleClick, this, {list : i }); + view.on('selectionchange', this.onSelectChange.createDelegate(this, {list : i }, true)); + view.on('dblclick', this.onDoubleClick.createDelegate(this, {list : i }, true)); //view.on('click', this.onViewClick, this, { list : i }); store.on('beforeload', this.onBeforeLoad, this); @@ -25398,14 +25398,20 @@ clientValidation Boolean Applies to submit only. Pass true to call fo // use formdata if (typeof(FormData) != 'undefined' && asString !== true) { - var fd = (new FormData(this.el.dom)).entries(); - var ret = {}; - var ent = fd.next(); - while (!ent.done) { - ret[ent.value[0]] = ent.value[1]; // not sure how this will handle duplicates.. - ent = fd.next(); - }; - return ret; + // this relies on a 'recent' version of chrome apparently... + try { + var fd = (new FormData(this.el.dom)).entries(); + var ret = {}; + var ent = fd.next(); + while (!ent.done) { + ret[ent.value[0]] = ent.value[1]; // not sure how this will handle duplicates.. + ent = fd.next(); + }; + return ret; + } catch(e) { + + } + } @@ -32976,12 +32982,12 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { return this; }, - /** - * Reconfigures the grid to use a different Store and Column Model. - * The View will be bound to the new objects and refreshed. - * @param {Roo.data.Store} dataSource The new {@link Roo.data.Store} object - * @param {Roo.grid.ColumnModel} The new {@link Roo.grid.ColumnModel} object - */ + /** + * Reconfigures the grid to use a different Store and Column Model. + * The View will be bound to the new objects and refreshed. + * @param {Roo.data.Store} dataSource The new {@link Roo.data.Store} object + * @param {Roo.grid.ColumnModel} The new {@link Roo.grid.ColumnModel} object + */ reconfigure : function(dataSource, colModel){ if(this.loadMask){ this.loadMask.destroy(); @@ -32993,7 +32999,31 @@ Roo.extend(Roo.grid.Grid, Roo.util.Observable, { this.colModel = colModel; this.view.refresh(true); }, - + /** + * addColumn + * Add's a column, default at the end.. + * @param {Object} column configuration see {@link Roo.grid.ColumnModel} + * @param {int} position to add (default end) + */ + addColumn : function(cfg, pos) + { + cfg.id = typeof(cfg.id) == 'undefined' ? Roo.id() : cfg.id; // don't normally use this.. + this.cm.lookup[cfg.id] = cfg; + if (typeof(pos) == 'undefined' || pos >= this.cm.config.length) { + this.cm.config.push(cfg); + this.view.refresh(true); + return; + } + // splice + pos = Math.max(0,pos); + this.cm.config.splice(pos, 0, cfg); + this.view.refresh(true); + + } + + + + // private onKeyDown : function(e){ this.fireEvent("keydown", e);