roojs-core-debug.js
authorAlan Knowles <alan@roojs.com>
Fri, 13 Apr 2012 08:45:14 +0000 (16:45 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 13 Apr 2012 08:45:14 +0000 (16:45 +0800)
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-ui.js
roojs-ui.js
roojs-ui-debug.js
roojs-ui-debug.js
roojs-ui-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-ui.js
roojs-ui.js
roojs-ui-debug.js
roojs-ui-debug.js
roojs-ui-debug.js

roojs-core.js
roojs-ui-debug.js
roojs-ui.js

index d3eb1aa..bd83687 100644 (file)
@@ -262,3 +262,32 @@ H.push(n+' { '+I.join(' ')+'} ');}
 E=H.join("\n");}if(Roo.isIE){F.appendChild(G);ss=G.styleSheet;ss.cssText=E;}else {try{G.appendChild(B.createTextNode(E));}catch(e){nrules.cssText=cssText;}
 F.appendChild(G);ss=G.styleSheet?G.styleSheet:(G.sheet||B.styleSheets[B.styleSheets.length-1]);}
 this.cacheStyleSheet(ss);return ss;},removeStyleSheet:function(id){var E=B.getElementById(id);if(E){E.parentNode.removeChild(E);}},swapStyleSheet:function(id,E){this.removeStyleSheet(id);var ss=B.createElement("link");ss.setAttribute("rel","stylesheet");ss.setAttribute("type","text/css");ss.setAttribute("id",id);ss.setAttribute("href",E);B.getElementsByTagName("head")[0].appendChild(ss);},refreshCache:function(){return this.getRules(true);},cacheStyleSheet:function(E){if(!A){A={};}try{var F=E.cssRules||E.rules;for(var j=F.length-1;j>=0;--j){A[F[j].selectorText]=F[j];}}catch(e){}},getRules:function(E){if(A==null||E){A={};var ds=B.styleSheets;for(var i=0,F=ds.length;i<F;i++){try{this.cacheStyleSheet(ds[i]);}catch(e){}}}return A;},getRule:function(E,F){var rs=this.getRules(F);if(!(E instanceof Array)){return rs[E];}for(var i=0;i<E.length;i++){if(rs[E[i]]){return rs[E[i]];}}return null;},updateRule:function(E,F,G){if(!(E instanceof Array)){var H=this.getRule(E);if(H){H.style[F.replace(C,D)]=G;return true;}}else {for(var i=0;i<E.length;i++){if(this.updateRule(E[i],F,G)){return true;}}}return false;}};}();
+//Roo/util/ClickRepeater.js
+Roo.util.ClickRepeater=function(el,A){this.el=Roo.get(el);this.el.unselectable();Roo.apply(this,A);this.addEvents({"mousedown":true,"click":true,"mouseup":true});this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",function(e){if(this.preventDefault){e.preventDefault();}if(this.stopDefault){e.stopEvent();}},this);}if(this.handler){this.on("click",this.handler,this.scope||this);}
+Roo.util.ClickRepeater.superclass.constructor.call(this);};Roo.extend(Roo.util.ClickRepeater,Roo.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass);}
+this.mousedownTime=new Date();Roo.get(document).on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);this.timer=this.click.defer(this.delay||this.interval,this);},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.getInterval(),this);},getInterval:function(){if(!this.accelerate){return this.interval;}var A=this.mousedownTime.getElapsed();if(A<500){return 400;}else if(A<1700){return 320;}else if(A<2600){return 250;}else if(A<3500){return 180;}else if(A<4400){return 140;}else if(A<5300){return 80;}else if(A<6200){return 50;}else {return 10;}},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass);}
+this.el.on("mouseover",this.handleMouseReturn,this);},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn);if(this.pressClass){this.el.addClass(this.pressClass);}
+this.click();},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn);this.el.un("mouseout",this.handleMouseOut);Roo.get(document).un("mouseup",this.handleMouseUp);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this);}});
+//Roo/KeyNav.js
+Roo.KeyNav=function(el,A){this.el=Roo.get(el);Roo.apply(this,A);if(!this.disabled){this.disabled=true;this.enable();}};Roo.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,prepareEvent:function(e){var k=e.getKey();var h=this.keyToHandler[k];if(Roo.isSafari&&h&&k>=37&&k<=40){e.stopEvent();}},relay:function(e){var k=e.getKey();var h=this.keyToHandler[k];if(h&&this[h]){if(this.doRelay(e,this[h],h)!==true){e[this.defaultEventAction]();}}},doRelay:function(e,h,A){return h.call(this.scope||this,e);},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Roo.isIE||Roo.isAir){this.el.on("keydown",this.relay,this);}else {this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this);}
+this.disabled=false;}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Roo.isIE||Roo.isAir){this.el.un("keydown",this.relay);}else {this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay);}
+this.disabled=true;}}};
+//Roo/KeyMap.js
+Roo.KeyMap=function(el,A,B){this.el=Roo.get(el);this.eventName=B||"keydown";this.bindings=[];if(A){this.addBinding(A);}
+this.enable();};Roo.KeyMap.prototype={stopEvent:false,addBinding:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){this.addBinding(A[i]);}return;}var C=A.key,D=A.shift,E=A.ctrl,F=A.alt,fn=A.fn,G=A.scope;if(typeof C=="string"){var ks=[];var H=C.toUpperCase();for(var j=0,B=H.length;j<B;j++){ks.push(H.charCodeAt(j));}
+C=ks;}var I=C instanceof Array;var J=function(e){if((!D||e.shiftKey)&&(!E||e.ctrlKey)&&(!F||e.altKey)){var k=e.getKey();if(I){for(var i=0,K=C.length;i<K;i++){if(C[i]==k){if(this.stopEvent){e.stopEvent();}
+fn.call(G||window,k,e);return;}}}else {if(k==C){if(this.stopEvent){e.stopEvent();}
+fn.call(G||window,k,e);}}}};this.bindings.push(J);},on:function(A,fn,B){var C,D,E,F;if(typeof A=="object"&&!(A instanceof Array)){C=A.key;D=A.shift;E=A.ctrl;F=A.alt;}else {C=A;}
+this.addBinding({key:C,shift:D,ctrl:E,alt:F,fn:fn,scope:B})},handleKeyDown:function(e){if(this.enabled){var b=this.bindings;for(var i=0,A=b.length;i<A;i++){b[i].call(this,e);}}},isEnabled:function(){return this.enabled;},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true;}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false;}}};
+//Roo/util/TextMetrics.js
+Roo.util.TextMetrics=function(){var A;return {measure:function(el,B,C){if(!A){A=Roo.util.TextMetrics.Instance(el,C);}
+A.bind(el);A.setFixedWidth(C||'auto');return A.getSize(B);},createInstance:function(el,B){return Roo.util.TextMetrics.Instance(el,B);}};}();Roo.util.TextMetrics.Instance=function(A,B){var ml=new Roo.Element(document.createElement('div'));document.body.appendChild(ml.dom);ml.position('absolute');ml.setLeftTop(-1000,-1000);ml.hide();if(B){ml.setWidth(B);}var C={getSize:function(D){ml.update(D);var s=ml.getSize();ml.update('');return s;},bind:function(el){ml.setStyle(Roo.fly(el).getStyles('font-size','font-style','font-weight','font-family','line-height'));},setFixedWidth:function(D){ml.setWidth(D);},getWidth:function(D){ml.dom.style.width='auto';return this.getSize(D).width;},getHeight:function(D){return this.getSize(D).height;}};C.bind(A);return C;};Roo.Element.measureText=Roo.util.TextMetrics.measure;
+//Roo/state/Provider.js
+Roo.state.Provider=function(){this.addEvents({"statechange":true});this.state={};Roo.state.Provider.superclass.constructor.call(this);};Roo.extend(Roo.state.Provider,Roo.util.Observable,{get:function(A,B){return typeof this.state[A]=="undefined"?B:this.state[A];},clear:function(A){delete this.state[A];this.fireEvent("statechange",this,A,null);},set:function(A,B){this.state[A]=B;this.fireEvent("statechange",this,A,B);},decodeValue:function(A){var re=/^(a|n|d|b|s|o)\:(.*)$/;var B=re.exec(unescape(A));if(!B||!B[1])return;var C=B[1];var v=B[2];switch(C){case "n":return parseFloat(v);case "d":return new Date(Date.parse(v));case "b":return (v=="1");case "a":var D=[];var E=v.split("^");for(var i=0,F=E.length;i<F;i++){D.push(this.decodeValue(E[i]));}return D;case "o":var D={};var E=v.split("^");for(var i=0,F=E.length;i<F;i++){var kv=E[i].split("=");D[kv[0]]=this.decodeValue(kv[1]);}return D;default:return v;}},encodeValue:function(v){var A;if(typeof v=="number"){A="n:"+v;}else if(typeof v=="boolean"){A="b:"+(v?"1":"0");}else if(v instanceof Date){A="d:"+v.toGMTString();}else if(v instanceof Array){var B="";for(var i=0,C=v.length;i<C;i++){B+=this.encodeValue(v[i]);if(i!=C-1)B+="^";}
+A="a:"+B;}else if(typeof v=="object"){var B="";for(var D in v){if(typeof v[D]!="function"){B+=D+"="+this.encodeValue(v[D])+"^";}}
+A="o:"+B.substring(0,B.length-1);}else {A="s:"+v;}return escape(A);}});
+//Roo/state/Manager.js
+Roo.state.Manager=function(){var A=new Roo.state.Provider();return {setProvider:function(B){A=B;},get:function(B,C){return A.get(B,C);},set:function(B,C){A.set(B,C);},clear:function(B){A.clear(B);},getProvider:function(){return A;}};}();
+//Roo/state/CookieProvider.js
+Roo.state.CookieProvider=function(A){Roo.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Roo.apply(this,A);this.state=this.readCookies();};Roo.extend(Roo.state.CookieProvider,Roo.state.Provider,{set:function(A,B){if(typeof B=="undefined"||B===null){this.clear(A);return;}
+this.setCookie(A,B);Roo.state.CookieProvider.superclass.set.call(this,A,B);},clear:function(A){this.clearCookie(A);Roo.state.CookieProvider.superclass.clear.call(this,A);},readCookies:function(){var A={};var c=document.cookie+";";var re=/\s?(.*?)=(.*?);/g;var B;while((B=re.exec(c))!=null){var C=B[1];var D=B[2];if(C&&C.substring(0,3)=="ys-"){A[C.substr(3)]=this.decodeValue(D);}}return A;},setCookie:function(A,B){document.cookie="ys-"+A+"="+this.encodeValue(B)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"");},clearCookie:function(A){document.cookie="ys-"+A+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"");}});
index a4e8c0b..810f4c8 100644 (file)
@@ -27051,7 +27051,11 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
             // we have a scenario where updates need confirming.
             // eg. if a locking scenario exists..
             // we look for { errors : { needs_confirm : true }} in the response.
-            if (typeof(action.result.errors.needs_confirm) != 'undefined') {
+            if (
+                (typeof(action.result) != 'undefined') != 'undefined') &&
+                (typeof(action.result.errors) != 'undefined')  &&
+                (typeof(action.result.errors.needs_confirm) != 'undefined')
+          ){
                 var _t = this;
                 Roo.MessageBox.confirm(
                     "Change requires confirmation",
@@ -27076,7 +27080,7 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
                 Roo.MessageBox.alert("Error",
                     (typeof(action.result) != 'undefined' && typeof(action.result.errorMsg) != 'undefined') ?
                         action.result.errorMsg :
-                        "Saving Failed, please check your entries"
+                        "Saving Failed, please check your entries or try again"
                 );
             }
             
index 6747f1b..1c58848 100644 (file)
@@ -589,15 +589,15 @@ tb.addField(new Roo.form.TextField({name:i,width:E.width,value:'',listeners:{'ch
 tb.el.on('click',function(e){e.preventDefault();});tb.el.setVisibilityMode(Roo.Element.DISPLAY);tb.el.hide();tb.name=nm;return tb;},buildFooter:function(){var A=this.editor.wrap.createChild();this.footer=new Roo.Toolbar(A);var B=new Roo.Toolbar.Fill();var _t=this;this.footer.add({text:'&lt;',xtype:'Button',handler:function(){_t.footDisp.scrollTo('left',0,true)}});this.footer.add(B);this.footer.add({text:'&gt;',xtype:'Button',handler:function(){_t.footDisp.select('span').last().scrollIntoView(_t.footDisp,true);}});var A=Roo.get(B.el);A.addClass('x-editor-context');this.footDispWrap=A;this.footDispWrap.overflow='hidden';this.footDisp=A.createChild();this.footDispWrap.on('click',this.onContextClick,this)},onContextClick:function(ev,A){ev.preventDefault();var cn=A.className;Roo.log(cn);if(!cn.match(/x-ed-loc-/)){return;}var n=cn.split('-').pop();var B=this.footerEls;var C=B[n];var D=this.editor.createRange();D.selectNodeContents(C);var E=this.editor.getSelection();E.removeAllRanges();E.addRange(D);this.updateToolbar(null,null,C);}});
 //Roo/form/BasicForm.js
 Roo.form.BasicForm=function(el,A){this.allItems=[];this.childForms=[];Roo.apply(this,A);this.items=new Roo.util.MixedCollection(false,function(o){return o.id||(o.id=Roo.id());});this.addEvents({beforeaction:true,actionfailed:true,actioncomplete:true});if(el){this.initEl(el);}
-Roo.form.BasicForm.superclass.constructor.call(this);};Roo.extend(Roo.form.BasicForm,Roo.util.Observable,{timeout:30,activeAction:null,trackResetOnLoad:false,childForms:false,allItems:false,waitMsgTarget:false,initEl:function(el){this.el=Roo.get(el);this.id=this.el.id||Roo.id();this.el.on('submit',this.onSubmit,this);this.el.addClass('x-form');},onSubmit:function(e){e.stopEvent();},isValid:function(){var A=true;this.items.each(function(f){if(!f.validate()){A=false;}});return A;},isDirty:function(){var A=false;this.items.each(function(f){if(f.isDirty()){A=true;return false;}});return A;},doAction:function(A,B){if(typeof A=='string'){A=new Roo.form.Action.ACTION_TYPES[A](this,B);}if(this.fireEvent('beforeaction',this,A)!==false){this.beforeAction(A);A.run.defer(100,A);}return this;},submit:function(A){this.doAction('submit',A);return this;},load:function(A){this.doAction('load',A);return this;},updateRecord:function(A){A.beginEdit();var fs=A.fields;fs.each(function(f){var B=this.findField(f.name);if(B){A.set(f.name,B.getValue());}},this);A.endEdit();return this;},loadRecord:function(A){this.setValues(A.data);return this;},beforeAction:function(A){var o=A.options;if(this.waitMsgTarget===true){this.el.mask(o.waitMsg||"Sending",'x-mask-loading');}else if(this.waitMsgTarget){this.waitMsgTarget=Roo.get(this.waitMsgTarget);this.waitMsgTarget.mask(o.waitMsg||"Sending",'x-mask-loading');}else {Roo.MessageBox.wait(o.waitMsg||"Sending",o.waitTitle||this.waitTitle||'Please Wait...');}},afterAction:function(A,B){this.activeAction=null;var o=A.options;if(this.waitMsgTarget===true){this.el.unmask();}else if(this.waitMsgTarget){this.waitMsgTarget.unmask();}else {Roo.MessageBox.updateProgress(1);Roo.MessageBox.hide();}if(B){if(o.reset){this.reset();}
-Roo.callback(o.success,o.scope,[this,A]);this.fireEvent('actioncomplete',this,A);}else {if(typeof(A.result.errors.needs_confirm)!='undefined'){var _t=this;Roo.MessageBox.confirm("Change requires confirmation",A.result.errorMsg,function(r){if(r!='yes'){return;}
+Roo.form.BasicForm.superclass.constructor.call(this);};Roo.extend(Roo.form.BasicForm,Roo.util.Observable,{timeout:30,activeAction:null,trackResetOnLoad:false,childForms:false,allItems:false,waitMsgTarget:false,initEl:function(el){this.el=Roo.get(el);this.id=this.el.id||Roo.id();this.el.on('submit',this.onSubmit,this);this.el.addClass('x-form');},onSubmit:function(e){e.stopEvent();},isValid:function(){var valid=true;this.items.each(function(f){if(!f.validate()){valid=false;}});return valid;},isDirty:function(){var dirty=false;this.items.each(function(f){if(f.isDirty()){dirty=true;return false;}});return dirty;},doAction:function(action,options){if(typeof action=='string'){action=new Roo.form.Action.ACTION_TYPES[action](this,options);}if(this.fireEvent('beforeaction',this,action)!==false){this.beforeAction(action);action.run.defer(100,action);}return this;},submit:function(options){this.doAction('submit',options);return this;},load:function(options){this.doAction('load',options);return this;},updateRecord:function(record){record.beginEdit();var fs=record.fields;fs.each(function(f){var field=this.findField(f.name);if(field){record.set(f.name,field.getValue());}},this);record.endEdit();return this;},loadRecord:function(record){this.setValues(record.data);return this;},beforeAction:function(action){var o=action.options;if(this.waitMsgTarget===true){this.el.mask(o.waitMsg||"Sending",'x-mask-loading');}else if(this.waitMsgTarget){this.waitMsgTarget=Roo.get(this.waitMsgTarget);this.waitMsgTarget.mask(o.waitMsg||"Sending",'x-mask-loading');}else {Roo.MessageBox.wait(o.waitMsg||"Sending",o.waitTitle||this.waitTitle||'Please Wait...');}},afterAction:function(action,success){this.activeAction=null;var o=action.options;if(this.waitMsgTarget===true){this.el.unmask();}else if(this.waitMsgTarget){this.waitMsgTarget.unmask();}else {Roo.MessageBox.updateProgress(1);Roo.MessageBox.hide();}if(success){if(o.reset){this.reset();}
+Roo.callback(o.success,o.scope,[this,action]);this.fireEvent('actioncomplete',this,action);}else {if((typeof(action.result)!='undefined')!='undefined')&&(typeof(action.result.errors)!='undefined')&&(typeof(action.result.errors.needs_confirm)!='undefined')){var _t=this;Roo.MessageBox.confirm("Change requires confirmation",action.result.errorMsg,function(r){if(r!='yes'){return;}
 _t.doAction('submit',{params:{_submit_confirmed:1}});});return;}
-Roo.callback(o.failure,o.scope,[this,A]);if(!this.hasListener('actionfailed')){Roo.MessageBox.alert("Error",(typeof(A.result)!='undefined'&&typeof(A.result.errorMsg)!='undefined')?A.result.errorMsg:"Saving Failed, please check your entries");}
-this.fireEvent('actionfailed',this,A);}},findField:function(id){var A=this.items.get(id);if(!A){this.items.each(function(f){if(f.isFormField&&(f.dataIndex==id||f.id==id||f.getName()==id)){A=f;return false;}});}return A||null;},addForm:function(A){if(this.childForms.indexOf(A)>-1){return;}
-this.childForms.push(A);var n='';Roo.each(A.allItems,function(fe){n=typeof(fe.getName)=='undefined'?fe.name:fe.getName();if(this.findField(n)){return;}var B=new Roo.form.Hidden({name:n});B.render(this.el);this.add(B);},this);},markInvalid:function(A){if(A instanceof Array){for(var i=0,B=A.length;i<B;i++){var C=A[i];var f=this.findField(C.id);if(f){f.markInvalid(C.msg);}}}else {var D,id;for(id in A){if(typeof A[id]!='function'&&(D=this.findField(id))){D.markInvalid(A[id]);}}}
-Roo.each(this.childForms||[],function(f){f.markInvalid(A);});return this;},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();}}}}
-Roo.each(this.childForms||[],function(f){f.setValues(A);});return this;},getValues:function(A){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());},this);}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((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();});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);}});return this;},applyToFields:function(o){this.items.each(function(f){Roo.apply(f,o);});return this;},applyIfToFields:function(o){this.items.each(function(f){Roo.applyIf(f,o);});return this;}});Roo.BasicForm=Roo.form.BasicForm;
+Roo.callback(o.failure,o.scope,[this,action]);if(!this.hasListener('actionfailed')){Roo.MessageBox.alert("Error",(typeof(action.result)!='undefined'&&typeof(action.result.errorMsg)!='undefined')?action.result.errorMsg:"Saving Failed, please check your entries or try again");}
+this.fireEvent('actionfailed',this,action);}},findField:function(id){var field=this.items.get(id);if(!field){this.items.each(function(f){if(f.isFormField&&(f.dataIndex==id||f.id==id||f.getName()==id)){field=f;return false;}});}return field||null;},addForm:function(form){if(this.childForms.indexOf(form)>-1){return;}
+this.childForms.push(form);var n='';Roo.each(form.allItems,function(fe){n=typeof(fe.getName)=='undefined'?fe.name:fe.getName();if(this.findField(n)){return;}var add=new Roo.form.Hidden({name:n});add.render(this.el);this.add(add);},this);},markInvalid:function(errors){if(errors instanceof Array){for(var i=0,len=errors.length;i<len;i++){var fieldError=errors[i];var f=this.findField(fieldError.id);if(f){f.markInvalid(fieldError.msg);}}}else {var field,id;for(id in errors){if(typeof errors[id]!='function'&&(field=this.findField(id))){field.markInvalid(errors[id]);}}}
+Roo.each(this.childForms||[],function(f){f.markInvalid(errors);});return this;},setValues:function(values){if(values instanceof Array){for(var i=0,len=values.length;i<len;i++){var v=values[i];var f=this.findField(v.id);if(f){f.setValue(v.value);if(this.trackResetOnLoad){f.originalValue=f.getValue();}}}}else {var field,id;for(id in values){if(typeof values[id]!='function'&&(field=this.findField(id))){if(field.setFromData&&field.valueField&&field.displayField&&(field.store&&!field.store.isLocal)){var sd={};sd[field.valueField]=typeof(values[field.hiddenName])=='undefined'?'':values[field.hiddenName];sd[field.displayField]=typeof(values[field.name])=='undefined'?'':values[field.name];field.setFromData(sd);}else {field.setValue(values[id]);}if(this.trackResetOnLoad){field.originalValue=field.getValue();}}}}
+Roo.each(this.childForms||[],function(f){f.setValues(values);});return this;},getValues:function(asString){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());},this);}var fs=Roo.lib.Ajax.serializeForm(this.el.dom);if(asString===true){return fs;}return Roo.urlDecode(fs);},getFieldValues:function(with_hidden){if(this.childForms){Roo.each(this.childForms,function(f){this.setValues(f.getValues());},this);}var ret={};this.items.each(function(f){if(!f.getName()){return;}var v=f.getValue();if((typeof(v)=='object')&&f.getRawValue){v=f.getRawValue();}if(f.name!=f.getName()){ret[f.name]=f.getRawValue();}
+ret[f.getName()]=v;});return ret;},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();});return this;},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this;},remove:function(field){this.items.remove(field);return this;},render:function(){this.items.each(function(f){if(f.isFormField&&!f.rendered&&document.getElementById(f.id)){f.applyTo(f.id);}});return this;},applyToFields:function(o){this.items.each(function(f){Roo.apply(f,o);});return this;},applyIfToFields:function(o){this.items.each(function(f){Roo.applyIf(f,o);});return this;}});Roo.BasicForm=Roo.form.BasicForm;
 //Roo/form/Form.js
 Roo.form.Form=function(A){var B=[];if(A.items){B=A.items;delete A.items;}
 Roo.form.Form.superclass.constructor.call(this,null,A);this.url=this.url||this.action;if(!this.root){this.root=new Roo.form.Layout(Roo.applyIf({id:Roo.id()},A));}