roojs-ui.js
authorAlan Knowles <alan@roojs.com>
Wed, 29 Jun 2016 04:30:23 +0000 (12:30 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 29 Jun 2016 04:30:23 +0000 (12:30 +0800)
roojs-ui-debug.js
roojs-debug.js
roojs-all.js

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

index de104a7..64b21e2 100644 (file)
@@ -1515,7 +1515,7 @@ this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,va
 if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=typeof(this.name)=='undefined'?this.id:this.name;}if(!B.name.length){delete B.name;}if(this.inputType){B.type=this.inputType;}this.el=ct.createChild(B,A);}var C=this.el.dom.type;if(C){if(C=='password'){C='text';
 }this.el.addClass('x-form-'+C);}if(this.readOnly){this.el.dom.readOnly=true;}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}this.el.addClass([this.fieldClass,this.cls]);this.initValue();},applyTo:function(A){this.allowDomMove=false;
 this.el=Roo.get(A);this.render(this.el.dom.parentNode);return this;},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(this.el.dom.value.length>0){this.setValue(this.el.dom.value);}},isDirty:function(){if(this.disabled){return false;
-}return String(this.getValue())!==String(this.originalValue);},resetHasChanged:function(){this.loadedValue=String(this.getValue());},hasChanged:function(){if(this.disabled){return false;}return this.loadedValue!==false&&String(this.getValue())!==this.loadedValue;
+}return String(this.getValue())!==String(this.originalValue);},resetHasChanged:function(){this.loadedValue=String(this.getValue());},hasChanged:function(){if(this.disabled||this.readOnly){return false;}return this.loadedValue!==false&&String(this.getValue())!==this.loadedValue;
 },afterRender:function(){Roo.form.Field.superclass.afterRender.call(this);this.initEvents();},fireKey:function(e){if(e.isNavKeyPress()){this.fireEvent("specialkey",this,e);}},reset:function(){this.setValue(this.resetValue);this.clearInvalid();},initEvents:function(){this.el.on("keydown",this.fireKey,this);
 this.el.on("focus",this.onFocus,this);this.el.on("blur",this.onBlur,this);this.el.relayEvent('keyup',this);this.originalValue=this.getValue();this.resetValue=this.getValue();},onFocus:function(){if(!Roo.isOpera&&this.focusClass){this.el.addClass(this.focusClass);
 }if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this);}},beforeBlur:Roo.emptyFn,onBlur:function(){this.beforeBlur();if(!Roo.isOpera&&this.focusClass){this.el.removeClass(this.focusClass);}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate();
index 51bfa38..a1ce173 100644 (file)
@@ -37337,7 +37337,7 @@ side          Add an error icon to the right of the field with a popup on hover
      */
     hasChanged : function()
     {
-        if(this.disabled) {
+        if(this.disabled || this.readOnly) {
             return false;
         }
         return this.loadedValue !== false && String(this.getValue()) !== this.loadedValue;
index 31e2a84..77c70c1 100644 (file)
@@ -20864,7 +20864,7 @@ side          Add an error icon to the right of the field with a popup on hover
      */
     hasChanged : function()
     {
-        if(this.disabled) {
+        if(this.disabled || this.readOnly) {
             return false;
         }
         return this.loadedValue !== false && String(this.getValue()) !== this.loadedValue;
index f564f1c..ca30e67 100644 (file)
@@ -845,7 +845,7 @@ this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,va
 if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=typeof(this.name)=='undefined'?this.id:this.name;}if(!B.name.length){delete B.name;}if(this.inputType){B.type=this.inputType;}this.el=ct.createChild(B,A);}var C=this.el.dom.type;if(C){if(C=='password'){C='text';
 }this.el.addClass('x-form-'+C);}if(this.readOnly){this.el.dom.readOnly=true;}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}this.el.addClass([this.fieldClass,this.cls]);this.initValue();},applyTo:function(A){this.allowDomMove=false;
 this.el=Roo.get(A);this.render(this.el.dom.parentNode);return this;},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(this.el.dom.value.length>0){this.setValue(this.el.dom.value);}},isDirty:function(){if(this.disabled){return false;
-}return String(this.getValue())!==String(this.originalValue);},resetHasChanged:function(){this.loadedValue=String(this.getValue());},hasChanged:function(){if(this.disabled){return false;}return this.loadedValue!==false&&String(this.getValue())!==this.loadedValue;
+}return String(this.getValue())!==String(this.originalValue);},resetHasChanged:function(){this.loadedValue=String(this.getValue());},hasChanged:function(){if(this.disabled||this.readOnly){return false;}return this.loadedValue!==false&&String(this.getValue())!==this.loadedValue;
 },afterRender:function(){Roo.form.Field.superclass.afterRender.call(this);this.initEvents();},fireKey:function(e){if(e.isNavKeyPress()){this.fireEvent("specialkey",this,e);}},reset:function(){this.setValue(this.resetValue);this.clearInvalid();},initEvents:function(){this.el.on("keydown",this.fireKey,this);
 this.el.on("focus",this.onFocus,this);this.el.on("blur",this.onBlur,this);this.el.relayEvent('keyup',this);this.originalValue=this.getValue();this.resetValue=this.getValue();},onFocus:function(){if(!Roo.isOpera&&this.focusClass){this.el.addClass(this.focusClass);
 }if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this);}},beforeBlur:Roo.emptyFn,onBlur:function(){this.beforeBlur();if(!Roo.isOpera&&this.focusClass){this.el.removeClass(this.focusClass);}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate();