roojs-ui.js
authorAlan Knowles <alan@roojs.com>
Wed, 25 Sep 2019 04:54:54 +0000 (12:54 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 25 Sep 2019 04:54:54 +0000 (12:54 +0800)
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 4b411f8..398020d 100644 (file)
@@ -1936,7 +1936,7 @@ i<B;i++){var C=A[i];var f=this.findField(C.id);if(f){f.markInvalid(C.msg);}}}els
 ,setValues:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var v=A[i];var f=this.findField(v.id);if(f){f.setValue(v.value);if(this.trackResetOnLoad){f.originalValue=f.getValue();}}}}else{var C,id;for(id in A){if(typeof A[id]!='function'&&(C=this.findField(id))){if(C.setFromData&&C.valueField&&C.displayField&&(C.store&&!C.store.isLocal)){var sd={}
 ;sd[C.valueField]=typeof(A[C.hiddenName])=='undefined'?'':A[C.hiddenName];sd[C.displayField]=typeof(A[C.name])=='undefined'?'':A[C.name];C.setFromData(sd);}else{C.setValue(A[id]);}if(this.trackResetOnLoad){C.originalValue=C.getValue();}}}}this.resetHasChanged();
 Roo.each(this.childForms||[],function(f){f.setValues(A);f.resetHasChanged();});return this;},getValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());},this);}if(typeof(FormData)!='undefined'&&A!==true){var fd=new FormData(this.el.dom);
-var B={};while(pair=fd.entries().next()){B[pair[0]]=pair[1];};return B;}var fs=Roo.lib.Ajax.serializeForm(this.el.dom);if(A===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());
+var B={};while(pair=fd.entries().next()){if(pair.done){break;}B[pair.value[0]]=pair.value[1];};return B;}var fs=Roo.lib.Ajax.serializeForm(this.el.dom);if(A===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());
 },this);}var B={};this.items.each(function(f){if(!f.getName()){return;}var v=f.getValue();if(f.inputType=='radio'){if(typeof(B[f.getName()])=='undefined'){B[f.getName()]='';}if(!f.el.dom.checked){return;}v=f.el.dom.value;}if((typeof(v)=='object')&&f.getRawValue){v=f.getRawValue();
 }if(f.name!=f.getName()){B[f.name]=f.getRawValue();}B[f.getName()]=v;});return B;},clearInvalid:function(){this.items.each(function(f){f.clearInvalid();});Roo.each(this.childForms||[],function(f){f.clearInvalid();});return this;},reset:function(){this.items.each(function(f){f.reset();
 });Roo.each(this.childForms||[],function(f){f.reset();});this.resetHasChanged();return this;},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this;},remove:function(A){this.items.remove(A);return this;},render:function(){this.items.each(function(f){if(f.isFormField&&!f.rendered&&document.getElementById(f.id)){f.applyTo(f.id);
index 3b8a476..300a740 100644 (file)
@@ -47363,7 +47363,10 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
             var fd = new FormData(this.el.dom);
             var ret = {};
             while (pair = fd.entries().next()) {
-                ret[pair[0]] = pair[1]; // not sure how this will handle duplicates..
+                if (pair.done) {
+                    break;
+                }
+                ret[pair.value[0]] = pair.value[1]; // not sure how this will handle duplicates..
             };
             return ret;
         }
index 23c3ec4..013ef42 100644 (file)
@@ -24912,7 +24912,10 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
             var fd = new FormData(this.el.dom);
             var ret = {};
             while (pair = fd.entries().next()) {
-                ret[pair[0]] = pair[1]; // not sure how this will handle duplicates..
+                if (pair.done) {
+                    break;
+                }
+                ret[pair.value[0]] = pair.value[1]; // not sure how this will handle duplicates..
             };
             return ret;
         }
index ea76031..f998919 100644 (file)
@@ -1067,7 +1067,7 @@ i<B;i++){var C=A[i];var f=this.findField(C.id);if(f){f.markInvalid(C.msg);}}}els
 ,setValues:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var v=A[i];var f=this.findField(v.id);if(f){f.setValue(v.value);if(this.trackResetOnLoad){f.originalValue=f.getValue();}}}}else{var C,id;for(id in A){if(typeof A[id]!='function'&&(C=this.findField(id))){if(C.setFromData&&C.valueField&&C.displayField&&(C.store&&!C.store.isLocal)){var sd={}
 ;sd[C.valueField]=typeof(A[C.hiddenName])=='undefined'?'':A[C.hiddenName];sd[C.displayField]=typeof(A[C.name])=='undefined'?'':A[C.name];C.setFromData(sd);}else{C.setValue(A[id]);}if(this.trackResetOnLoad){C.originalValue=C.getValue();}}}}this.resetHasChanged();
 Roo.each(this.childForms||[],function(f){f.setValues(A);f.resetHasChanged();});return this;},getValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());},this);}if(typeof(FormData)!='undefined'&&A!==true){var fd=new FormData(this.el.dom);
-var B={};while(pair=fd.entries().next()){B[pair[0]]=pair[1];};return B;}var fs=Roo.lib.Ajax.serializeForm(this.el.dom);if(A===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());
+var B={};while(pair=fd.entries().next()){if(pair.done){break;}B[pair.value[0]]=pair.value[1];};return B;}var fs=Roo.lib.Ajax.serializeForm(this.el.dom);if(A===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());
 },this);}var B={};this.items.each(function(f){if(!f.getName()){return;}var v=f.getValue();if(f.inputType=='radio'){if(typeof(B[f.getName()])=='undefined'){B[f.getName()]='';}if(!f.el.dom.checked){return;}v=f.el.dom.value;}if((typeof(v)=='object')&&f.getRawValue){v=f.getRawValue();
 }if(f.name!=f.getName()){B[f.name]=f.getRawValue();}B[f.getName()]=v;});return B;},clearInvalid:function(){this.items.each(function(f){f.clearInvalid();});Roo.each(this.childForms||[],function(f){f.clearInvalid();});return this;},reset:function(){this.items.each(function(f){f.reset();
 });Roo.each(this.childForms||[],function(f){f.reset();});this.resetHasChanged();return this;},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this;},remove:function(A){this.items.remove(A);return this;},render:function(){this.items.each(function(f){if(f.isFormField&&!f.rendered&&document.getElementById(f.id)){f.applyTo(f.id);