/*
 * JSMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/Projects/Packer/
*/

// V:\1.1.007\js\form\Ext.ux.Namirial.form.Configurazione.js

Ext.ns('Ext.ux');Ext.ns('Ext.ux.Namirial');Ext.ns('Ext.ux.Namirial.form');Ext.ux.Namirial.form.Configurazione=function(c){try{function functionTbSalva(){try{var jsonConf=getValuesFromForm(this.formPanel.getForm(),true);var jsonConfStr=Ext.util.JSON.encode(jsonConf);execSql(getQuery(UPD_CONF_UTENTE,[jsonConfStr,session.userLogged]),WRITEDATAURL,null,null,this,LOGIN);connLogin.exec(getQuery(UPD_CONF_UTENTE,[jsonConfStr,session.userLogged]));if(this.checkHelp.getValue()){session.conf=Ext.encode({HELP:'1'});}else{session.conf=Ext.encode({HELP:'0'});}
this.winConfig.close();}catch(e){}}
this.tb_salva=new Ext.Toolbar.Button({text:'Salva',icon:IMG_SALVA,iconCls:'x-btn-text-icon',tooltip:{title:'Salva',text:'Salva le modifiche apportate alla configurazione'},handler:functionTbSalva.createDelegate(this)})
this.checkHelp=new Ext.form.Checkbox({fieldLabel:'Mostra informazioni sui campi',name:'HELP'})
this.formPanel=new Ext.form.FormPanel({layout:'form',autoWidth:true,border:false,bodyStyle:PADDING_10+SFONDO_TRASPARENTE,labelWidth:150,items:[this.checkHelp]})
this.winConfig=new Ext.Window({id:WINDOW_CONF,draggable:true,resizable:false,constrain:true,title:'Configurazione',width:400,height:200,items:[this.formPanel],tbar:[this.tb_salva]})
this.winConfig.on('beforeshow',function(){chiudiFinestre();hideLoading();},this)
this.winConfig.on('show',function(){var jsonConf=Ext.util.JSON.decode(session.conf);this.checkHelp.setValue(jsonConf.HELP);},this)
this.formShow=function(){if(Ext.isEmpty(Ext.WindowMgr.get(WINDOW_CONF))){this.winConfig.show();}}}catch(e){getToastMsg(MSG_TEXT,'Configurazione');log.error("Ext.ux.Namirial.form.Configurazione -> ",e);}}

