sync
authorAlan Knowles <alan@roojs.com>
Wed, 20 Nov 2013 04:50:07 +0000 (12:50 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 20 Nov 2013 04:50:07 +0000 (12:50 +0800)
Roo/form/Radio.js
examples/form/dynamic.html
examples/form/dynamic.js
roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 9a64eda..43e2721 100644 (file)
@@ -30,5 +30,36 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, {
      */
     getGroupValue : function(){
         return this.el.up('form').child('input[name='+this.el.dom.name+']:checked', true).value;
-    }
+    },
+    
+    
+    onRender : function(ct, position){
+        Roo.form.Checkbox.superclass.onRender.call(this, ct, position);
+        /*
+        if(this.inputValue !== undefined){
+            this.el.dom.value = this.inputValue;
+        }
+        */
+        this.wrap = this.el.wrap({cls: "x-form-check-wrap"});
+        //this.wrap = this.el.wrap({cls: 'x-menu-check-item '});
+        //var viewEl = this.wrap.createChild({ 
+        //    tag: 'img', cls: 'x-menu-item-icon', style: 'margin: 0px;' ,src : Roo.BLANK_IMAGE_URL });
+        //this.viewEl = viewEl;   
+        //this.wrap.on('click', this.onClick,  this); 
+        
+        //this.el.on('DOMAttrModified', this.setFromHidden,  this); //ff
+        //this.el.on('propertychange', this.setFromHidden,  this);  //ie
+        
+        
+        
+        if(this.boxLabel){
+            this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
+        //    viewEl.on('click', this.onClick,  this); 
+        }
+         if(this.checked){
+            this.el.dom.checked =   'checked' ;
+        }
+         
+    } 
+    
 });
\ No newline at end of file
index 20dad56..d6de282 100644 (file)
@@ -28,6 +28,7 @@
     <script type="text/javascript" src="../../Roo/form/TextField.js"></script>
     <!-- for testing new time picker.. -->
     
+    <script type="text/javascript" src="../../Roo/form/Radio.js"></script>
     
     <script type="text/javascript" src="../../ux/TimePicker.js"></script>
     <script type="text/javascript" src="../../ux/DateDisplay.js"></script>
index 5ecfb9d..03f40b9 100644 (file)
@@ -482,6 +482,41 @@ Roo.onReady(function(){
                 value : '1',
                 width:'auto'
             },
+            
+            {
+            
+                xtype: 'Radio',
+                xns : Roo.form,
+                fieldLabel: 'A test radio box',
+                boxLabel:'Test1',
+                name:'radiotest',
+                inputValue : '1',
+                width:'auto'
+            },
+              {
+            
+                xtype: 'Radio',
+                xns : Roo.form,
+                fieldLabel: 'A test radio box2',
+                boxLabel:'Test1',
+                name:'radiotest',
+                inputValue : '2',
+                checked: true,
+                width:'auto'
+            },
+            {
+            
+                xtype: 'Checkbox',
+                xns : Roo.form,
+               fieldLabel: 'A checkbox',
+                boxLabel:'RooJS v1.1.1',
+                name:'extuser',
+                inputValue : '1',
+                value : '1',
+                width:'auto'
+            },
+            
+            
             {
                 xtype : 'DisplayField',
                 xns : Roo.form,
index 79f14d0..6144470 100644 (file)
@@ -862,7 +862,7 @@ this.inSetChecked=true;this.el.dom.value=A?this.inputValue:this.valueOff;this.in
 this.setValue(this.el.dom.value);},onDestroy:function(){if(this.viewEl){Roo.get(this.viewEl).remove();}
 Roo.form.Checkbox.superclass.onDestroy.call(this);}});
 //Roo/form/Radio.js
-Roo.form.Radio=function(){Roo.form.Radio.superclass.constructor.apply(this,arguments);};Roo.extend(Roo.form.Radio,Roo.form.Checkbox,{inputType:'radio',getGroupValue:function(){return this.el.up('form').child('input[name='+this.el.dom.name+']:checked',true).value;}});
+Roo.form.Radio=function(){Roo.form.Radio.superclass.constructor.apply(this,arguments);};Roo.extend(Roo.form.Radio,Roo.form.Checkbox,{inputType:'radio',getGroupValue:function(){return this.el.up('form').child('input[name='+this.el.dom.name+']:checked',true).value;},onRender:function(ct,A){Roo.form.Checkbox.superclass.onRender.call(this,ct,A);this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:'label',htmlFor:this.el.id,cls:'x-form-cb-label',html:this.boxLabel});}if(this.checked){this.el.dom.checked='checked';}}});
 //Roo/form/HtmlEditor.js
 Roo.form.HtmlEditor=Roo.extend(Roo.form.Field,{toolbars:false,createLinkText:'Please enter the URL for the link:',defaultLinkValue:'http:/'+'/',resizable:false,height:300,width:500,stylesheets:false,frameId:false,validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Roo.emptyFn,iframePad:3,hideMode:'offsets',defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true,editorevent:true});this.defaultAutoCreate={tag:"textarea",style:'width: '+this.width+'px;height: '+this.height+'px;',autocomplete:"off"};},createToolbar:function(A){if(!A.toolbars||!A.toolbars.length){A.toolbars=[new Roo.form.HtmlEditor.ToolbarStandard()];}for(var i=0;i<A.toolbars.length;i++){A.toolbars[i]=Roo.factory(typeof(A.toolbars[i])=='string'?{xtype:A.toolbars[i]}:A.toolbars[i],Roo.form.HtmlEditor);A.toolbars[i].init(A);}},getDocMarkup:function(){var st='';if(this.stylesheets===false){Roo.get(document.head).select('style').each(function(A){st+=A.dom.outerHTML||new XMLSerializer().serializeToString(A.dom);});Roo.get(document.head).select('link').each(function(A){st+=A.dom.outerHTML||new XMLSerializer().serializeToString(A.dom);});}else if(!this.stylesheets.length){st='<style type="text/css">'+'body{border:0;margin:0;padding:3px;height:98%;cursor:text;}'+'</style>';}else {Roo.each(this.stylesheets,function(s){st+='<link rel="stylesheet" type="text/css" href="'+s+'" />'});}
 st+='<style type="text/css">'+'IMG { cursor: pointer } '+'</style>';return '<html><head>'+st+' </head><body class="roo-htmleditor-body"></body></html>';},onRender:function(ct,A){var _t=this;Roo.form.HtmlEditor.superclass.onRender.call(this,ct,A);this.el.dom.style.border='0 none';this.el.dom.setAttribute('tabIndex',-1);this.el.addClass('x-hidden');if(Roo.isIE){this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;')}
@@ -974,7 +974,7 @@ Roo.form.ComboCheck.superclass.onRender.call(this,ct,A);this.view.singleSelect=f
 //Roo/form/Signature.js
 Roo.form.Signature=function(A){Roo.form.Signature.superclass.constructor.call(this,A);this.addEvents({'confirm':true,'reset':true});};Roo.extend(Roo.form.Signature,Roo.form.Field,{labels:{clear:"Clear",confirm:"Confirm"},width:300,height:100,allowBlank:false,signPanel:{},isMouseDown:false,isConfirmed:false,signatureTmp:'',defaultAutoCreate:{tag:"input",type:"hidden"},onRender:function(ct,A){Roo.form.Signature.superclass.onRender.call(this,ct,A);this.wrap=this.el.wrap({cls:'x-form-signature-wrap',style:'width: '+this.width+'px',cn:{cls:'x-form-signature'}});this.createToolbar(this);this.signPanel=this.wrap.createChild({tag:'div',style:'width: '+this.width+'px; height: '+this.height+'px; border: 0;'},this.el);this.svgID=Roo.id();this.svgEl=this.signPanel.createChild({xmlns:'http://www.w3.org/2000/svg',tag:'svg',width:this.width,height:this.height,viewBox:'0 0 '+this.width+' '+this.height,cn:[{tag:"rect",id:this.svgID+"-svg-r",width:this.width,height:this.height,fill:"#ffa"},{tag:"line",x1:"0",y1:(this.height*0.8),x2:this.width,y2:(this.height*0.8),'stroke':"#666",'stroke-width':"1",'stroke-dasharray':"3",'shape-rendering':"crispEdges",'pointer-events':"none"},{tag:"path",id:this.svgID+"-svg-p",'stroke':"navy",'stroke-width':"3",'fill':"none",'pointer-events':'none'}]});this.createSVG();this.svgBox=this.svgEl.dom.getScreenCTM();},createSVG:function(){var A=this.signPanel;var r=A.select('#'+this.svgID+'-svg-r',true).first().dom;var t=this;r.addEventListener('mousedown',function(e){return t.down(e);},false);r.addEventListener('mousemove',function(e){return t.move(e);},false);r.addEventListener('mouseup',function(e){return t.up(e);},false);r.addEventListener('mouseout',function(e){return t.up(e);},false);r.addEventListener('touchstart',function(e){return t.down(e);},false);r.addEventListener('touchmove',function(e){return t.move(e);},false);r.addEventListener('touchend',function(e){return t.up(e);},false);},isTouchEvent:function(e){return e.type.match(/^touch/);},getCoords:function(e){var pt=this.svgEl.dom.createSVGPoint();pt.x=e.clientX;pt.y=e.clientY;if(this.isTouchEvent(e)){pt.x=e.targetTouches[0].clientXpt.y=e.targetTouches[0].clientY;}var a=this.svgEl.dom.getScreenCTM();var b=a.inverse();var mx=pt.matrixTransform(b);return mx.x+','+mx.y;},down:function(e){this.signatureTmp+='M'+this.getCoords(e)+' ';this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',this.signatureTmp);this.isMouseDown=true;e.preventDefault();},move:function(e){if(this.isMouseDown){this.signatureTmp+='L'+this.getCoords(e)+' ';this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',this.signatureTmp);}
 e.preventDefault();},up:function(e){this.isMouseDown=false;var sp=this.signatureTmp.split(' ');if(sp.length>1){if(!sp[sp.length-2].match(/^L/)){sp.pop();sp.pop();sp.push("");this.signatureTmp=sp.join(" ");}}if(this.getValue()!=this.signatureTmp){this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.isConfirmed=false;}
-e.preventDefault();},createToolbar:function(A){function btn(id,B,C){var D=fid+'-'+id;return {id:D,cmd:id,cls:'x-btn-icon x-edit-'+id,enableToggle:B!==false,scope:A,handler:C||A.relayBtnCmd,clickEvent:'mousedown',tooltip:etb.buttonTips[id]||undefined,tabIndex:-1};}var tb=new Roo.Toolbar(A.wrap.dom.firstChild);this.tb=tb;this.tb.add({cls:' x-signature-btn x-signature-'+id,scope:A,handler:this.reset,clickEvent:'mousedown',text:this.labels.clear},{xtype:'Fill',xns:Roo.Toolbar},{cls:'  x-signature-btn x-signature-'+id,scope:A,handler:this.setConfirmed,clickEvent:'mousedown',text:this.labels.confirm});},getImageDataURI:function(){var A=this.svgEl.dom.outerHTML;var B='data:image/svg+xml;base64,'+window.btoa(A);return B;},getConfirmed:function(){return this.isConfirmed;},getWidth:function(){return this.width;},getHeight:function(){return this.height;},getSignature:function(){return this.signatureTmp;},reset:function(){this.signatureTmp='';this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d','');this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},setSignature:function(s){this.signatureTmp=s;this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',s);this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},test:function(){},setConfirmed:function(){if(!this.getSignature()){return;}
+e.preventDefault();},createToolbar:function(A){function btn(id,B,C){var D=fid+'-'+id;return {id:D,cmd:id,cls:'x-btn-icon x-edit-'+id,enableToggle:B!==false,scope:A,handler:C||A.relayBtnCmd,clickEvent:'mousedown',tooltip:etb.buttonTips[id]||undefined,tabIndex:-1};}var tb=new Roo.Toolbar(A.wrap.dom.firstChild);this.tb=tb;this.tb.add({cls:' x-signature-btn x-signature-'+id,scope:A,handler:this.reset,clickEvent:'mousedown',text:this.labels.clear},{xtype:'Fill',xns:Roo.Toolbar},{cls:'  x-signature-btn x-signature-'+id,scope:A,handler:this.setConfirmed,clickEvent:'mousedown',text:this.labels.confirm});},getImageDataURI:function(){var A=this.svgEl.dom.outerHTML;var B='data:image/svg+xml;base64,'+window.btoa(A);return B;},getConfirmed:function(){return this.isConfirmed;},getWidth:function(){return this.width;},getHeight:function(){return this.height;},getSignature:function(){return this.signatureTmp;},reset:function(){this.signatureTmp='';this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d','');this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},setSignature:function(s){this.signatureTmp=s;this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',s);this.setValue(s);this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},test:function(){},setConfirmed:function(){if(!this.getSignature()){return;}
 this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#cfc');this.setValue(this.getSignature());this.isConfirmed=true;},validateValue:function(A){if(this.allowBlank){return true;}if(this.isConfirmed){return true;}return false;}});
 //Roo/DDView.js
 Roo.DDView=function(A,B,C){Roo.DDView.superclass.constructor.apply(this,arguments);this.getEl().setStyle("outline","0px none");this.getEl().unselectable();if(this.dragGroup){this.setDraggable(this.dragGroup.split(","));}if(this.dropGroup){this.setDroppable(this.dropGroup.split(","));}if(this.deletable){this.setDeletable();}
index 1bb7b3c..8cee844 100644 (file)
@@ -40105,7 +40105,38 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, {
      */
     getGroupValue : function(){
         return this.el.up('form').child('input[name='+this.el.dom.name+']:checked', true).value;
-    }
+    },
+    
+    
+    onRender : function(ct, position){
+        Roo.form.Checkbox.superclass.onRender.call(this, ct, position);
+        /*
+        if(this.inputValue !== undefined){
+            this.el.dom.value = this.inputValue;
+        }
+        */
+        this.wrap = this.el.wrap({cls: "x-form-check-wrap"});
+        //this.wrap = this.el.wrap({cls: 'x-menu-check-item '});
+        //var viewEl = this.wrap.createChild({ 
+        //    tag: 'img', cls: 'x-menu-item-icon', style: 'margin: 0px;' ,src : Roo.BLANK_IMAGE_URL });
+        //this.viewEl = viewEl;   
+        //this.wrap.on('click', this.onClick,  this); 
+        
+        //this.el.on('DOMAttrModified', this.setFromHidden,  this); //ff
+        //this.el.on('propertychange', this.setFromHidden,  this);  //ie
+        
+        
+        
+        if(this.boxLabel){
+            this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
+        //    viewEl.on('click', this.onClick,  this); 
+        }
+         if(this.checked){
+            this.el.dom.checked =   'checked' ;
+        }
+         
+    } 
+    
 });//<script type="text/javascript">
 
 /*
@@ -45955,9 +45986,10 @@ Roo.extend(Roo.form.Signature, Roo.form.Field,  {
         this.signatureTmp = s;
         this.signPanel.select('#'+ this.svgID + '-svg-r', true).first().attr('fill', '#ffa');
         this.signPanel.select('#'+ this.svgID + '-svg-p', true).first().attr( 'd', s);
+        this.setValue(s);
         this.isConfirmed = false;
         Roo.form.Signature.superclass.reset.call(this);
-    },
+    }, 
     test : function(){
 //        Roo.log(this.signPanel.dom.contentWindow.up())
     },
index 7135bdc..7725605 100644 (file)
@@ -25158,7 +25158,38 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, {
      */
     getGroupValue : function(){
         return this.el.up('form').child('input[name='+this.el.dom.name+']:checked', true).value;
-    }
+    },
+    
+    
+    onRender : function(ct, position){
+        Roo.form.Checkbox.superclass.onRender.call(this, ct, position);
+        /*
+        if(this.inputValue !== undefined){
+            this.el.dom.value = this.inputValue;
+        }
+        */
+        this.wrap = this.el.wrap({cls: "x-form-check-wrap"});
+        //this.wrap = this.el.wrap({cls: 'x-menu-check-item '});
+        //var viewEl = this.wrap.createChild({ 
+        //    tag: 'img', cls: 'x-menu-item-icon', style: 'margin: 0px;' ,src : Roo.BLANK_IMAGE_URL });
+        //this.viewEl = viewEl;   
+        //this.wrap.on('click', this.onClick,  this); 
+        
+        //this.el.on('DOMAttrModified', this.setFromHidden,  this); //ff
+        //this.el.on('propertychange', this.setFromHidden,  this);  //ie
+        
+        
+        
+        if(this.boxLabel){
+            this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
+        //    viewEl.on('click', this.onClick,  this); 
+        }
+         if(this.checked){
+            this.el.dom.checked =   'checked' ;
+        }
+         
+    } 
+    
 });//<script type="text/javascript">
 
 /*
@@ -31008,9 +31039,10 @@ Roo.extend(Roo.form.Signature, Roo.form.Field,  {
         this.signatureTmp = s;
         this.signPanel.select('#'+ this.svgID + '-svg-r', true).first().attr('fill', '#ffa');
         this.signPanel.select('#'+ this.svgID + '-svg-p', true).first().attr( 'd', s);
+        this.setValue(s);
         this.isConfirmed = false;
         Roo.form.Signature.superclass.reset.call(this);
-    },
+    }, 
     test : function(){
 //        Roo.log(this.signPanel.dom.contentWindow.up())
     },
index d82f9ca..670dbaf 100644 (file)
@@ -561,7 +561,7 @@ this.inSetChecked=true;this.el.dom.value=A?this.inputValue:this.valueOff;this.in
 this.setValue(this.el.dom.value);},onDestroy:function(){if(this.viewEl){Roo.get(this.viewEl).remove();}
 Roo.form.Checkbox.superclass.onDestroy.call(this);}});
 //Roo/form/Radio.js
-Roo.form.Radio=function(){Roo.form.Radio.superclass.constructor.apply(this,arguments);};Roo.extend(Roo.form.Radio,Roo.form.Checkbox,{inputType:'radio',getGroupValue:function(){return this.el.up('form').child('input[name='+this.el.dom.name+']:checked',true).value;}});
+Roo.form.Radio=function(){Roo.form.Radio.superclass.constructor.apply(this,arguments);};Roo.extend(Roo.form.Radio,Roo.form.Checkbox,{inputType:'radio',getGroupValue:function(){return this.el.up('form').child('input[name='+this.el.dom.name+']:checked',true).value;},onRender:function(ct,A){Roo.form.Checkbox.superclass.onRender.call(this,ct,A);this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:'label',htmlFor:this.el.id,cls:'x-form-cb-label',html:this.boxLabel});}if(this.checked){this.el.dom.checked='checked';}}});
 //Roo/form/HtmlEditor.js
 Roo.form.HtmlEditor=Roo.extend(Roo.form.Field,{toolbars:false,createLinkText:'Please enter the URL for the link:',defaultLinkValue:'http:/'+'/',resizable:false,height:300,width:500,stylesheets:false,frameId:false,validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Roo.emptyFn,iframePad:3,hideMode:'offsets',defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true,editorevent:true});this.defaultAutoCreate={tag:"textarea",style:'width: '+this.width+'px;height: '+this.height+'px;',autocomplete:"off"};},createToolbar:function(A){if(!A.toolbars||!A.toolbars.length){A.toolbars=[new Roo.form.HtmlEditor.ToolbarStandard()];}for(var i=0;i<A.toolbars.length;i++){A.toolbars[i]=Roo.factory(typeof(A.toolbars[i])=='string'?{xtype:A.toolbars[i]}:A.toolbars[i],Roo.form.HtmlEditor);A.toolbars[i].init(A);}},getDocMarkup:function(){var st='';if(this.stylesheets===false){Roo.get(document.head).select('style').each(function(A){st+=A.dom.outerHTML||new XMLSerializer().serializeToString(A.dom);});Roo.get(document.head).select('link').each(function(A){st+=A.dom.outerHTML||new XMLSerializer().serializeToString(A.dom);});}else if(!this.stylesheets.length){st='<style type="text/css">'+'body{border:0;margin:0;padding:3px;height:98%;cursor:text;}'+'</style>';}else {Roo.each(this.stylesheets,function(s){st+='<link rel="stylesheet" type="text/css" href="'+s+'" />'});}
 st+='<style type="text/css">'+'IMG { cursor: pointer } '+'</style>';return '<html><head>'+st+' </head><body class="roo-htmleditor-body"></body></html>';},onRender:function(ct,A){var _t=this;Roo.form.HtmlEditor.superclass.onRender.call(this,ct,A);this.el.dom.style.border='0 none';this.el.dom.setAttribute('tabIndex',-1);this.el.addClass('x-hidden');if(Roo.isIE){this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;')}
@@ -673,7 +673,7 @@ Roo.form.ComboCheck.superclass.onRender.call(this,ct,A);this.view.singleSelect=f
 //Roo/form/Signature.js
 Roo.form.Signature=function(A){Roo.form.Signature.superclass.constructor.call(this,A);this.addEvents({'confirm':true,'reset':true});};Roo.extend(Roo.form.Signature,Roo.form.Field,{labels:{clear:"Clear",confirm:"Confirm"},width:300,height:100,allowBlank:false,signPanel:{},isMouseDown:false,isConfirmed:false,signatureTmp:'',defaultAutoCreate:{tag:"input",type:"hidden"},onRender:function(ct,A){Roo.form.Signature.superclass.onRender.call(this,ct,A);this.wrap=this.el.wrap({cls:'x-form-signature-wrap',style:'width: '+this.width+'px',cn:{cls:'x-form-signature'}});this.createToolbar(this);this.signPanel=this.wrap.createChild({tag:'div',style:'width: '+this.width+'px; height: '+this.height+'px; border: 0;'},this.el);this.svgID=Roo.id();this.svgEl=this.signPanel.createChild({xmlns:'http://www.w3.org/2000/svg',tag:'svg',width:this.width,height:this.height,viewBox:'0 0 '+this.width+' '+this.height,cn:[{tag:"rect",id:this.svgID+"-svg-r",width:this.width,height:this.height,fill:"#ffa"},{tag:"line",x1:"0",y1:(this.height*0.8),x2:this.width,y2:(this.height*0.8),'stroke':"#666",'stroke-width':"1",'stroke-dasharray':"3",'shape-rendering':"crispEdges",'pointer-events':"none"},{tag:"path",id:this.svgID+"-svg-p",'stroke':"navy",'stroke-width':"3",'fill':"none",'pointer-events':'none'}]});this.createSVG();this.svgBox=this.svgEl.dom.getScreenCTM();},createSVG:function(){var A=this.signPanel;var r=A.select('#'+this.svgID+'-svg-r',true).first().dom;var t=this;r.addEventListener('mousedown',function(e){return t.down(e);},false);r.addEventListener('mousemove',function(e){return t.move(e);},false);r.addEventListener('mouseup',function(e){return t.up(e);},false);r.addEventListener('mouseout',function(e){return t.up(e);},false);r.addEventListener('touchstart',function(e){return t.down(e);},false);r.addEventListener('touchmove',function(e){return t.move(e);},false);r.addEventListener('touchend',function(e){return t.up(e);},false);},isTouchEvent:function(e){return e.type.match(/^touch/);},getCoords:function(e){var pt=this.svgEl.dom.createSVGPoint();pt.x=e.clientX;pt.y=e.clientY;if(this.isTouchEvent(e)){pt.x=e.targetTouches[0].clientXpt.y=e.targetTouches[0].clientY;}var a=this.svgEl.dom.getScreenCTM();var b=a.inverse();var mx=pt.matrixTransform(b);return mx.x+','+mx.y;},down:function(e){this.signatureTmp+='M'+this.getCoords(e)+' ';this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',this.signatureTmp);this.isMouseDown=true;e.preventDefault();},move:function(e){if(this.isMouseDown){this.signatureTmp+='L'+this.getCoords(e)+' ';this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',this.signatureTmp);}
 e.preventDefault();},up:function(e){this.isMouseDown=false;var sp=this.signatureTmp.split(' ');if(sp.length>1){if(!sp[sp.length-2].match(/^L/)){sp.pop();sp.pop();sp.push("");this.signatureTmp=sp.join(" ");}}if(this.getValue()!=this.signatureTmp){this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.isConfirmed=false;}
-e.preventDefault();},createToolbar:function(A){function btn(id,B,C){var D=fid+'-'+id;return {id:D,cmd:id,cls:'x-btn-icon x-edit-'+id,enableToggle:B!==false,scope:A,handler:C||A.relayBtnCmd,clickEvent:'mousedown',tooltip:etb.buttonTips[id]||undefined,tabIndex:-1};}var tb=new Roo.Toolbar(A.wrap.dom.firstChild);this.tb=tb;this.tb.add({cls:' x-signature-btn x-signature-'+id,scope:A,handler:this.reset,clickEvent:'mousedown',text:this.labels.clear},{xtype:'Fill',xns:Roo.Toolbar},{cls:'  x-signature-btn x-signature-'+id,scope:A,handler:this.setConfirmed,clickEvent:'mousedown',text:this.labels.confirm});},getImageDataURI:function(){var A=this.svgEl.dom.outerHTML;var B='data:image/svg+xml;base64,'+window.btoa(A);return B;},getConfirmed:function(){return this.isConfirmed;},getWidth:function(){return this.width;},getHeight:function(){return this.height;},getSignature:function(){return this.signatureTmp;},reset:function(){this.signatureTmp='';this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d','');this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},setSignature:function(s){this.signatureTmp=s;this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',s);this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},test:function(){},setConfirmed:function(){if(!this.getSignature()){return;}
+e.preventDefault();},createToolbar:function(A){function btn(id,B,C){var D=fid+'-'+id;return {id:D,cmd:id,cls:'x-btn-icon x-edit-'+id,enableToggle:B!==false,scope:A,handler:C||A.relayBtnCmd,clickEvent:'mousedown',tooltip:etb.buttonTips[id]||undefined,tabIndex:-1};}var tb=new Roo.Toolbar(A.wrap.dom.firstChild);this.tb=tb;this.tb.add({cls:' x-signature-btn x-signature-'+id,scope:A,handler:this.reset,clickEvent:'mousedown',text:this.labels.clear},{xtype:'Fill',xns:Roo.Toolbar},{cls:'  x-signature-btn x-signature-'+id,scope:A,handler:this.setConfirmed,clickEvent:'mousedown',text:this.labels.confirm});},getImageDataURI:function(){var A=this.svgEl.dom.outerHTML;var B='data:image/svg+xml;base64,'+window.btoa(A);return B;},getConfirmed:function(){return this.isConfirmed;},getWidth:function(){return this.width;},getHeight:function(){return this.height;},getSignature:function(){return this.signatureTmp;},reset:function(){this.signatureTmp='';this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d','');this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},setSignature:function(s){this.signatureTmp=s;this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#ffa');this.signPanel.select('#'+this.svgID+'-svg-p',true).first().attr('d',s);this.setValue(s);this.isConfirmed=false;Roo.form.Signature.superclass.reset.call(this);},test:function(){},setConfirmed:function(){if(!this.getSignature()){return;}
 this.signPanel.select('#'+this.svgID+'-svg-r',true).first().attr('fill','#cfc');this.setValue(this.getSignature());this.isConfirmed=true;},validateValue:function(A){if(this.allowBlank){return true;}if(this.isConfirmed){return true;}return false;}});
 //Roo/DDView.js
 Roo.DDView=function(A,B,C){Roo.DDView.superclass.constructor.apply(this,arguments);this.getEl().setStyle("outline","0px none");this.getEl().unselectable();if(this.dragGroup){this.setDraggable(this.dragGroup.split(","));}if(this.dropGroup){this.setDroppable(this.dropGroup.split(","));}if(this.deletable){this.setDeletable();}