X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=55c819871815806aefc8d8ebf060ff6339463381;hb=80d1b352167d1133a48f3b71d2a7adb9f85168e5;hp=49065fada215be8b2bd89f8a5df74fb65eaa0de3;hpb=658d20ab568d0cce4e1dc49b6a5bea8bd1c594c1;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 49065fada2..55c8198718 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -342,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. @@ -9125,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); @@ -9146,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); @@ -11600,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); } @@ -11777,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: @@ -16561,6 +16611,7 @@ Roo.apply(Roo.XComponent, { msg: msg, width:450, progress:true, + buttons : false, closable:false, modal: false @@ -22966,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); } @@ -33624,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), @@ -38930,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(); }, @@ -41626,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) { @@ -43807,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(/^#/)) { @@ -47397,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 @@ -47953,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(); @@ -57177,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) */