X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=55c819871815806aefc8d8ebf060ff6339463381;hb=80d1b352167d1133a48f3b71d2a7adb9f85168e5;hp=21624b2f1c13e02f074caacfb59937f4c23ee199;hpb=b70763b34d4ac23fa6e129030203d2aa02f8de30;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 21624b2f1c..55c8198718 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -57,6 +57,7 @@ Roo.apply = function(o, c, defaults){ isIE = ua.indexOf("msie") > -1, isIE7 = ua.indexOf("msie 7") > -1, isIE11 = /trident.*rv\:11\./.test(ua), + isEdge = ua.indexOf("edge") > -1, isGecko = !isSafari && ua.indexOf("gecko") > -1, isBorderBox = isIE && !isStrict, isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1), @@ -64,6 +65,7 @@ Roo.apply = function(o, c, defaults){ isLinux = (ua.indexOf("linux") != -1), isSecure = window.location.href.toLowerCase().indexOf("https") === 0, isIOS = /iphone|ipad/.test(ua), + isAndroid = /android/.test(ua), isTouch = (function() { try { if (ua.indexOf('chrome') != -1 && ua.indexOf('android') == -1) { @@ -340,8 +342,8 @@ Roo.factory(conf, Roo.data); if ((typeof(console) == 'undefined') || (typeof(console.log) == 'undefined')) { return; // alerT? } - console.log(s); + console.log(s); }, /** * Takes an object and converts it to an encoded URL. e.g. Roo.urlEncode({foo: 1, bar: 2}); would return "foo=1&bar=2". Optionally, property values can be arrays, instead of keys and the resulting string that's returned will contain a name/value pair for each array value. @@ -628,6 +630,8 @@ Roo.factory(conf, Roo.data); /** @type Boolean */ isIE11 : isIE11, /** @type Boolean */ + isEdge : isEdge, + /** @type Boolean */ isGecko : isGecko, /** @type Boolean */ isBorderBox : isBorderBox, @@ -640,6 +644,8 @@ Roo.factory(conf, Roo.data); /** @type Boolean */ isIOS : isIOS, /** @type Boolean */ + isAndroid : isAndroid, + /** @type Boolean */ isTouch : isTouch, /** @@ -879,6 +885,8 @@ var s = String.format('
{1}
', cls, text); return Roo.util.Format.htmlEncode(args[i]); }); } + + }); /** @@ -900,7 +908,31 @@ sort = (sort == 'ASC' ? 'DESC' : 'ASC'); String.prototype.toggle = function(value, other){ return this == value ? other : value; -};/* +}; + + +/** + * Remove invalid unicode characters from a string + * + * @return {String} The clean string + */ +String.prototype.unicodeClean = function () { + return this.replace(/[\s\S]/g, + function(character) { + if (character.charCodeAt()< 256) { + return character; + } + try { + encodeURIComponent(character); + } catch(e) { + return ''; + } + return character; + } + ); +}; + +/* * Based on: * Ext JS Library 1.1.1 * Copyright(c) 2006-2007, Ext JS, LLC. @@ -6055,6 +6087,51 @@ Roo.util.Observable.releaseCapture = function(o){ } }; })();/* + * RooJS Library + * Copyright(c) 2007-2017, Roo J Solutions Ltd + * + * Licence LGPL + * + */ + +/** + * @class Roo.Document + * @extends Roo.util.Observable + * This is a convience class to wrap up the main document loading code.. , rather than adding Roo.onReady(......) + * + * @param {Object} config the methods and properties of the 'base' class for the application. + * + * Generic Page handler - implement this to start your app.. + * + * eg. + * MyProject = new Roo.Document({ + events : { + 'load' : true // your events.. + }, + listeners : { + 'ready' : function() { + // fired on Roo.onReady() + } + } + * + */ +Roo.Document = function(cfg) { + + this.addEvents({ + 'ready' : true + }); + Roo.util.Observable.call(this,cfg); + + var _this = this; + + Roo.onReady(function() { + _this.fireEvent('ready'); + },null,false); + + +} + +Roo.extend(Roo.Document, Roo.util.Observable, {});/* * Based on: * Ext JS Library 1.1.1 * Copyright(c) 2006-2007, Ext JS, LLC. @@ -6228,6 +6305,7 @@ Roo.EventManager = function(){ if(o.buffer){ h = createBuffered(h, o); } + fn._handlers = fn._handlers || []; @@ -6580,6 +6658,8 @@ Roo.onReady(function(){ var cls = [ Roo.isIE ? "roo-ie" + : Roo.isIE11 ? "roo-ie11" + : Roo.isEdge ? "roo-edge" : Roo.isGecko ? "roo-gecko" : Roo.isOpera ? "roo-opera" : Roo.isSafari ? "roo-safari" : ""]; @@ -7117,6 +7197,37 @@ if(opt.anim.isAnimated()){ var p = Roo.fly(this.dom.parentNode, '_internal'); return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null; }, + + /** + * Looks at the scrollable parent element + */ + findScrollableParent : function() + { + var overflowRegex = /(auto|scroll)/; + + if(this.getStyle('position') === 'fixed'){ + return Roo.isAndroid ? Roo.get(document.documentElement) : Roo.get(document.body); + } + + var excludeStaticParent = this.getStyle('position') === "absolute"; + + for (var parent = this; (parent = Roo.get(parent.dom.parentNode));){ + + if (excludeStaticParent && parent.getStyle('position') === "static") { + continue; + } + + if (overflowRegex.test(parent.getStyle('overflow') + parent.getStyle('overflow-x') + parent.getStyle('overflow-y'))){ + return parent; + } + + if(parent.dom.nodeName.toLowerCase() == 'body'){ + return Roo.isAndroid ? Roo.get(document.documentElement) : Roo.get(document.body); + } + } + + return Roo.isAndroid ? Roo.get(document.documentElement) : Roo.get(document.body); + }, /** * Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). @@ -9014,6 +9125,7 @@ if(opt.anim.isAnimated()){ if(!this._mask){ this._mask = Roo.DomHelper.append(this.dom, {cls:"roo-el-mask"}, true); } + this.addClass("x-masked"); this._mask.setDisplayed(true); @@ -9035,12 +9147,23 @@ if(opt.anim.isAnimated()){ if(typeof msg == 'string'){ if(!this._maskMsg){ - this._maskMsg = Roo.DomHelper.append(this.dom, {cls:"roo-el-mask-msg", cn:{tag:'div'}}, true); + this._maskMsg = Roo.DomHelper.append(this.dom, { + cls: "roo-el-mask-msg", + cn: [ + { + tag: 'i', + cls: 'fa fa-spinner fa-spin' + }, + { + tag: 'div' + } + ] + }, true); } var mm = this._maskMsg; mm.dom.className = msgCls ? "roo-el-mask-msg " + msgCls : "roo-el-mask-msg"; - if (mm.dom.firstChild) { // weird IE issue? - mm.dom.firstChild.innerHTML = msg; + if (mm.dom.lastChild) { // weird IE issue? + mm.dom.lastChild.innerHTML = msg; } mm.setDisplayed(true); mm.center(this); @@ -11489,6 +11612,11 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, { url = url || form.action; var enctype = form.getAttribute("enctype"); + + if (o.formData) { + return this.doFormDataUpload(o,p,url); + } + if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){ return this.doFormUpload(o, p, url); } @@ -11666,7 +11794,40 @@ Roo.extend(Roo.data.Connection, Roo.util.Observable, { form.removeChild(hiddens[i]); } } + }, + // this is a 'formdata version???' + + + doFormDataUpload : function(o, ps, url) + { + var form = Roo.getDom(o.form); + form.enctype = form.encoding = 'multipart/form-data'; + var formData = o.formData === true ? new FormData(form) : o.formData; + + var cb = { + success: this.handleResponse, + failure: this.handleFailure, + scope: this, + argument: {options: o}, + timeout : o.timeout || this.timeout + }; + + if(typeof o.autoAbort == 'boolean'){ // options gets top priority + if(o.autoAbort){ + this.abort(); + } + }else if(this.autoAbort !== false){ + this.abort(); + } + + //Roo.lib.Ajax.defaultPostHeader = null; + Roo.lib.Ajax.useDefaultHeader = false; + this.transId = Roo.lib.Ajax.request( "POST", url, cb, o.formData, o); + Roo.lib.Ajax.useDefaultHeader = true; + + } + }); /* * Based on: @@ -13657,12 +13818,15 @@ Roo.util.Format = function(){ * eventually this should probably emulate php's number_format * @param {Number/String} value The numeric value to format * @param {Number} decimals number of decimal places + * @param {String} delimiter for thousands (default comma) * @return {String} The formatted currency string */ - number : function(v,decimals) + number : function(v, decimals, thousandsDelimiter) { // multiply and round. decimals = typeof(decimals) == 'undefined' ? 2 : decimals; + thousandsDelimiter = typeof(thousandsDelimiter) == 'undefined' ? ',' : thousandsDelimiter; + var mul = Math.pow(10, decimals); var zero = String(mul).substring(1); v = (Math.round((v-0)*mul))/mul; @@ -13674,13 +13838,12 @@ Roo.util.Format = function(){ var ps = v.split('.'); var whole = ps[0]; - var r = /(\d+)(\d{3})/; // add comma's - while (r.test(whole)) { - whole = whole.replace(r, '$1' + ',' + '$2'); - } + if(thousandsDelimiter.length != 0) { + whole = whole.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsDelimiter ); + } var sub = ps[1] ? // has decimals.. @@ -15284,40 +15447,49 @@ Roo.extend(Roo.Component, Roo.util.Observable, { * @param {String/HTMLElement/Element} container (optional) The element this component should be rendered into. If it is being applied to existing markup, this should be left off. */ render : function(container, position){ - if(!this.rendered && this.fireEvent("beforerender", this) !== false){ - if(!container && this.el){ - this.el = Roo.get(this.el); - container = this.el.dom.parentNode; - this.allowDomMove = false; - } - this.container = Roo.get(container); - this.rendered = true; - if(position !== undefined){ - if(typeof position == 'number'){ - position = this.container.dom.childNodes[position]; - }else{ - position = Roo.getDom(position); - } - } - this.onRender(this.container, position || null); - if(this.cls){ - this.el.addClass(this.cls); - delete this.cls; - } - if(this.style){ - this.el.applyStyles(this.style); - delete this.style; - } - this.fireEvent("render", this); - this.afterRender(this.container); - if(this.hidden){ - this.hide(); - } - if(this.disabled){ - this.disable(); + + if(this.rendered){ + return this; + } + + if(this.fireEvent("beforerender", this) === false){ + return false; + } + + if(!container && this.el){ + this.el = Roo.get(this.el); + container = this.el.dom.parentNode; + this.allowDomMove = false; + } + this.container = Roo.get(container); + this.rendered = true; + if(position !== undefined){ + if(typeof position == 'number'){ + position = this.container.dom.childNodes[position]; + }else{ + position = Roo.getDom(position); } } + this.onRender(this.container, position || null); + if(this.cls){ + this.el.addClass(this.cls); + delete this.cls; + } + if(this.style){ + this.el.applyStyles(this.style); + delete this.style; + } + this.fireEvent("render", this); + this.afterRender(this.container); + if(this.hidden){ + this.hide(); + } + if(this.disabled){ + this.disable(); + } + return this; + }, /** @private */ @@ -15889,6 +16061,12 @@ Roo.extend(Roo.BoxComponent, Roo.Component, { * Our builder application needs the ability to preview these sub compoennts. They will normally have parent=false set, * hence confusing the component builder as it thinks there are multiple top level elements. * + * String Over-ride & Translations + * + * Our builder application writes all the strings as _strings and _named_strings. This is to enable the translation of elements, + * and also the 'overlaying of string values - needed when different versions of the same application with different text content + * are needed. @see Roo.XComponent.overlayString + * * * * @extends Roo.util.Observable @@ -15992,14 +16170,44 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { var hp = this.parent ? 1 : 0; Roo.debug && Roo.log(this); + var tree = this._tree ? this._tree() : this.tree(); + + if (!el && typeof(this.parent) == 'string' && this.parent.substring(0,1) == '#') { // if parent is a '#.....' string, then let's use that.. var ename = this.parent.substr(1); this.parent = false; Roo.debug && Roo.log(ename); switch (ename) { - case 'bootstrap-body' : - if (typeof(Roo.bootstrap.Body) != 'undefined') { + case 'bootstrap-body': + if (typeof(tree.el) != 'undefined' && tree.el == document.body) { + // this is the BorderLayout standard? + this.parent = { el : true }; + break; + } + if (["Nest", "Content", "Grid", "Tree"].indexOf(tree.xtype) > -1) { + // need to insert stuff... + this.parent = { + el : new Roo.bootstrap.layout.Border({ + el : document.body, + + center: { + titlebar: false, + autoScroll:false, + closeOnTab: true, + tabPosition: 'top', + //resizeTabs: true, + alwaysShowTabs: true, + hideTabs: false + //minTabWidth: 140 + } + }) + + }; + break; + } + + if (typeof(Roo.bootstrap.Body) != 'undefined' ) { this.parent = { el : new Roo.bootstrap.Body() }; Roo.debug && Roo.log("setting el to doc body"); @@ -16012,6 +16220,10 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { // fall through default: el = Roo.get(ename); + if (typeof(Roo.bootstrap) != 'undefined' && tree['|xns'] == 'Roo.bootstrap') { + this.parent = { el : true}; + } + break; } @@ -16021,16 +16233,20 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { return; } } + Roo.debug && Roo.log("EL:"); Roo.debug && Roo.log(el); Roo.debug && Roo.log("this.parent.el:"); Roo.debug && Roo.log(this.parent.el); - var tree = this._tree ? this._tree() : this.tree(); // altertive root elements ??? - we need a better way to indicate these. - var is_alt = Roo.XComponent.is_alt || (typeof(Roo.bootstrap) != 'undefined' && tree.xns == Roo.bootstrap) || - (typeof(Roo.mailer) != 'undefined' && tree.xns == Roo.mailer) ; + var is_alt = Roo.XComponent.is_alt || + (typeof(tree.el) != 'undefined' && tree.el == document.body) || + (typeof(Roo.bootstrap) != 'undefined' && tree.xns == Roo.bootstrap) || + (typeof(Roo.mailer) != 'undefined' && tree.xns == Roo.mailer) ; + + if (!this.parent && is_alt) { //el = Roo.get(document.body); @@ -16045,22 +16261,43 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { el = el ? Roo.get(el) : false; - // it's a top level one.. - this.parent = { - el : new Roo.BorderLayout(el || document.body, { + if (typeof(Roo.BorderLayout) == 'undefined' ) { - center: { - titlebar: false, - autoScroll:false, - closeOnTab: true, - tabPosition: 'top', - //resizeTabs: true, - alwaysShowTabs: el && hp? false : true, - hideTabs: el || !hp ? true : false, - minTabWidth: 140 - } - }) - }; + this.parent = { + el : new Roo.bootstrap.layout.Border({ + el: el || document.body, + + center: { + titlebar: false, + autoScroll:false, + closeOnTab: true, + tabPosition: 'top', + //resizeTabs: true, + alwaysShowTabs: false, + hideTabs: true, + minTabWidth: 140, + overflow: 'visible' + } + }) + }; + } else { + + // it's a top level one.. + this.parent = { + el : new Roo.BorderLayout(el || document.body, { + center: { + titlebar: false, + autoScroll:false, + closeOnTab: true, + tabPosition: 'top', + //resizeTabs: true, + alwaysShowTabs: el && hp? false : true, + hideTabs: el || !hp ? true : false, + minTabWidth: 140 + } + }) + }; + } } if (!this.parent.el) { @@ -16074,6 +16311,9 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, { var is_body = false; if (this.parent.el === true) { // bootstrap... - body.. + if (el) { + tree.el = el; + } this.parent.el = Roo.factory(tree); is_body = true; } @@ -16371,6 +16611,7 @@ Roo.apply(Roo.XComponent, { msg: msg, width:450, progress:true, + buttons : false, closable:false, modal: false @@ -16408,7 +16649,7 @@ Roo.apply(Roo.XComponent, { " of " + total + (m.name ? (' - ' + m.name) : ''); Roo.debug && Roo.log(msg); - if (!this.hideProgress && Roo.MessageBox) { + if (!_this.hideProgress && Roo.MessageBox) { Roo.MessageBox.updateProgress( (total - mods.length)/total, msg ); } @@ -16436,7 +16677,32 @@ Roo.apply(Roo.XComponent, { }, - + /** + * Overlay a set of modified strings onto a component + * This is dependant on our builder exporting the strings and 'named strings' elements. + * + * @param {Object} element to overlay on - eg. Pman.Dialog.Login + * @param {Object} associative array of 'named' string and it's new value. + * + */ + overlayStrings : function( component, strings ) + { + if (typeof(component['_named_strings']) == 'undefined') { + throw "ERROR: component does not have _named_strings"; + } + for ( var k in strings ) { + var md = typeof(component['_named_strings'][k]) == 'undefined' ? false : component['_named_strings'][k]; + if (md !== false) { + component['_strings'][md] = strings[k]; + } else { + Roo.log('could not find named string: ' + k + ' in'); + Roo.log(component); + } + + } + + }, + /** * Event Object. @@ -22751,6 +23017,7 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { remove : function(record){ var index = this.data.indexOf(record); this.data.removeAt(index); + if(this.pruneModifiedRecords){ this.modified.remove(record); } @@ -22938,6 +23205,17 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, { this.totalLength = Math.max(t, this.data.length+r.length); this.add(r); } + + if(this.parent && !Roo.isIOS && !this.useNativeIOS && this.parent.emptyTitle.length) { + + var e = new Roo.data.Record({}); + + e.set(this.parent.displayField, this.parent.emptyTitle); + e.set(this.parent.valueField, ''); + + this.insert(0, e); + } + this.fireEvent("load", this, r, options, o); if(options.callback){ options.callback.call(options.scope || this, r, options, true); @@ -23549,6 +23827,7 @@ Roo.data.MemoryProxy = function(data){ }; Roo.extend(Roo.data.MemoryProxy, Roo.data.DataProxy, { + /** * Load data from the requested source (in this case an in-memory * data object passed to the constructor), read the data object into @@ -33397,7 +33676,7 @@ Roo.QuickTips = function(){ if(ttp){ showProc = show.defer(tm.showDelay, tm, [{ el: t, - text: ttp, + text: ttp.replace(/\\n/g,'
'), width: et.getAttributeNS(ns, cfg.width), autoHide: et.getAttributeNS(ns, cfg.hide) != "user", title: et.getAttributeNS(ns, cfg.title), @@ -38703,6 +38982,7 @@ side Add an error icon to the right of the field with a popup on hover */ reset : function(){ this.setValue(this.resetValue); + this.originalValue = this.getValue(); this.clearInvalid(); }, @@ -41399,6 +41679,7 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { reset : function(){ // overridden so that last data is reset.. this.setValue(this.resetValue); + this.originalValue = this.getValue(); this.clearInvalid(); this.lastData = false; if (this.view) { @@ -42658,7 +42939,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { black: false, white: false, - + bodyCls : '', /** * Protected method that will not generally be called directly. It @@ -42686,19 +42967,26 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { 'body{border:0;margin:0;padding:3px;height:98%;cursor:text;}' + ''; } else { - + st = ''; } st += ''; + var cls = 'roo-htmleditor-body'; + + if(this.bodyCls.length){ + cls += ' ' + this.bodyCls; + } return '' + st + //' + - ' '; + ' '; }, // private @@ -43112,8 +43400,6 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { insertAtCursor : function(text) { - - if(!this.activated){ return; } @@ -43575,7 +43861,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { if (v.match(/^\./) || v.match(/^\//)) { return; } - if (v.match(/^(http|https):\/\//) || v.match(/^mailto:/)) { + if (v.match(/^(http|https):\/\//) || v.match(/^mailto:/) || v.match(/^ftp:/)) { return; } if (v.match(/^#/)) { @@ -43664,7 +43950,7 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { node.className = ''; } - if (a.value.match(/body/)) { + if (a.value.match(/^body$/)) { node.className = ''; } continue; @@ -44075,6 +44361,17 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { Roo.each(Roo.get(_this.iframe.contentDocument.head).select('link[rel=stylesheet]', true).elements, function(s){ s.remove(); }); + }, + + setStyle : function(style) + { + Roo.get(this.iframe.contentDocument.head).createChild({ + tag : 'style', + type : 'text/css', + html : style + }); + + return; } // hide stuff that is not compatible @@ -47154,7 +47451,13 @@ Roo.extend(Roo.form.Form, Roo.form.BasicForm, { */ progressUrl : false, - + /** + * @cfg {boolean|FormData} formData - true to use new 'FormData' post, or set to a new FormData({dom form}) Object, if + * sending a formdata with extra parameters - eg uploaded elements. + */ + + formData : false, + /** * Opens a new {@link Roo.form.Column} container in the layout stack. If fields are passed after the config, the * fields are added and the column is closed. If no fields are passed the column remains open @@ -47710,7 +48013,8 @@ Roo.extend(Roo.form.Action.Submit, Roo.form.Action, { url:this.getUrl(!isPost), method: method, params:isPost ? this.getParams() : null, - isUpload: this.form.fileUpload + isUpload: this.form.fileUpload, + formData : this.form.formData })); this.uploadProgress(); @@ -51427,6 +51731,12 @@ Roo.BasicLayoutRegion = function(mgr, config, pos, skipConfig){ * @param {Roo.ContentPanel} panel The panel */ "panelremoved" : true, + /** + * @event beforecollapse + * Fires when this region before collapse. + * @param {Roo.LayoutRegion} this + */ + "beforecollapse" : true, /** * @event collapsed * Fires when this region is collapsed. @@ -51978,24 +52288,29 @@ Roo.extend(Roo.LayoutRegion, Roo.BasicLayoutRegion, { * Collapses this region. * @param {Boolean} skipAnim (optional) true to collapse the element without animation (if animate is true) */ - collapse : function(skipAnim){ + collapse : function(skipAnim, skipCheck = false){ if(this.collapsed) { return; } - this.collapsed = true; - if(this.split){ - this.split.el.hide(); - } - if(this.config.animate && skipAnim !== true){ - this.fireEvent("invalidated", this); - this.animateCollapse(); - }else{ - this.el.setLocation(-20000,-20000); - this.el.hide(); - this.collapsedEl.show(); - this.fireEvent("collapsed", this); - this.fireEvent("invalidated", this); + + if(skipCheck || this.fireEvent("beforecollapse", this) != false){ + + this.collapsed = true; + if(this.split){ + this.split.el.hide(); + } + if(this.config.animate && skipAnim !== true){ + this.fireEvent("invalidated", this); + this.animateCollapse(); + }else{ + this.el.setLocation(-20000,-20000); + this.el.hide(); + this.collapsedEl.show(); + this.fireEvent("collapsed", this); + this.fireEvent("invalidated", this); + } } + }, animateCollapse : function(){ @@ -56914,7 +57229,7 @@ Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, { /** * @cfg {Function} renderer (Optional) 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 uses the raw data value. If an object is returned (bootstrap only) + * 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 */ /** @@ -56923,6 +57238,9 @@ Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, { /** * @cfg {String} align (Optional) Set the CSS text-align property of the column. Defaults to undefined. */ + /** + * @cfg {String} valign (Optional) Set the CSS vertical-align property of the column (eg. middle, top, bottom etc). Defaults to undefined. + */ /** * @cfg {String} cursor (Optional) */ @@ -57290,11 +57608,16 @@ Roo.extend(Roo.grid.ColumnModel, Roo.util.Observable, { } }); -Roo.grid.ColumnModel.defaultRenderer = function(value){ +Roo.grid.ColumnModel.defaultRenderer = function(value) +{ + if(typeof value == "object") { + return value; + } if(typeof value == "string" && value.length < 1){ return " "; } - return value; + + return String.format("{0}", value); }; // Alias for backwards compatibility @@ -60027,20 +60350,18 @@ Roo.LoadMask.prototype = { } */ - - - this.el.unmask(this.removeMask); + (function() { this.el.unmask(this.removeMask); }).defer(50, this); }, // private onLoad : function() { - this.el.unmask(this.removeMask); + (function() { this.el.unmask(this.removeMask); }).defer(50, this); }, // private onBeforeLoad : function(){ if(!this.disabled){ - this.el.mask(this.msg, this.msgCls); + (function() { this.el.mask(this.msg, this.msgCls); }).defer(50, this); } },