Exemple #1
0
 public function getJavascript($lazy = false, $varName = null)
 {
     if ($this->_varName == null) {
         $configParams = $this->getConfigParams($lazy);
         $className = $this->_extClassName;
         $configObj = "{" . implode(",", $configParams) . "}";
         $tree = $this->_tree->getJavascript(false);
         if ($this->_field !== null) {
             $field = "," . $this->_field->getJavascript(false);
         } else {
             $field = "";
         }
         if ($lazy) {
             return $configObj;
         } else {
             $js = "new {$className}({$tree} {$field}, {$configObj})";
             if ($varName != null) {
                 $this->_varName = $varName;
                 $js = "var {$varName} = {$js};";
             }
             return $js;
         }
     } else {
         return $this->_varName;
     }
 }
Exemple #2
0
$BotonSalir2 = $sub_menu_bienvenido->getItem("Salir2");
$BotonSalir2->setIcon("/images/ext/exit.png");
//agrego el submenu
$boton_welcome = $menu->getItem("welcome");
$boton_welcome->setMenu($sub_menu_bienvenido);
//fin items
$menu_top = new PhpExt_Panel();
$menu_top->setHeader(true)->setBaseCssClass("PanelClass")->setHeight(70)->setTopToolbar($menu)->setIconCssClass("HeaderClass");
//--------------------------------------------MENU ACORDION-------------------------------------------------------------------------------------------------------//
//trae los items del menu
$tree_loader = new PhpExt_Tree_TreeLoader();
$tree_loader->setDataUrl("/admin/menu");
//armo el nodo root (no es visible)
$root = new PhpExt_Tree_AsyncTreeNode();
$root->setText("Principal Node")->setDraggable(false)->setId("Principal_Node")->setExpanded(true)->setCssClass("feeds-node")->expandChildNodes(false);
$menu_acordion = new PhpExt_Tree_TreePanel();
$menu_acordion->setTitle("Menu Principal")->setId("treePanel")->setWidth(250)->setHeight('fill')->setLines(false)->setAutoScroll(true)->setCollapseFirst(false)->setSingleExpand(true)->setUseArrows(true)->setRootVisible(false)->setRoot($root)->setLoader($tree_loader);
//----------------------------------------PANTALLA PRINCIPAL-------------------------------------------------------------------------------------------------------
$tab_layout = new PhpExt_Layout_TabLayout();
$tab_layout->setDeferredRender(false);
$principal = new PhpExt_TabPanel();
$principal->setActiveTab(0)->setId("TabPanel")->setHideMode(PhpExt_Component::HIDE_MODE_OFFSETS)->setLayout($tab_layout)->setEnableKeyEvents(true)->setenableTabScroll(true);
$onrender = "\n\n\n\n\n//beforeclose\nt.on( 'beforeremove', function(t,c){\n\nvar cnx = new Ext.data.Connection();\nExt.Ajax.request({ url : '/admin/closetab',\n\t\t\t\tmethod : 'POST',\n\t\t\t\tparams : 'tab_id=' + c.id \t\t\t\t\t   \n\t\t\t\t });\n\n});\n";
$principal->attachListener("render", new PhpExt_Listener(PhpExt_Javascript::functionDef(null, $onrender, array("t", "r", "i"))));
$module = new OOB_module('About');
$template_dir = $module->admintpldir() . "/about.tpl";
$html = $ari->t->fetch($template_dir);
$bienvenido = new PhpExt_Panel();
$bienvenido->setTitle("Bienvenido")->setId("panel_bienvenido")->setAutoScroll(true)->setBodyStyle("padding:10px 10px 0")->setHtml($html);
$principal->addItem($bienvenido, new PhpExt_Layout_TabLayoutData(true));
$add_tab_function = "\n\n//oob_download\nExt.DomHelper.append(document.body, {\n                    tag: 'form',\n                    id:'download_form',\n                    frameBorder: 0,\n                    width: 0,\n                    height: 0,\n                    css: 'display:none;visibility:hidden;height:0px;'\n\t\t\t\t\t}); \n\nfunction oob_download( url, params ){\n\nvar form = document.getElementById('download_form');\n\nvar inputs = form.getElementsByTagName('input');\n\nfor (i = 0; i < inputs.length; i++){\n   form.removeChild(inputs[i]); \n}\n\nif( Ext.isArray(params) ){\n\tExt.each( params, function( item, index ){\n\t\tel = document.createElement('input');\n\t\tel = form.appendChild(el);\n\t\tel.name = item.name;\n\t\tel.type = 'hidden';\n\t\tel.value = item.value;\t\n\t});\n}\n\nform.method = 'post';\nform.action = url;\nform.submit();\n\n}\nExt.apply( Ext,{ oob_download : oob_download } );\n//fin oob_download\t\t\t\t\t\n\nvar msgconfig = {\n\t\t   title :'Error',\n\t\tprogress : false,\n\t\t    wait : false,\n\t\t     msg : 'Se produjo un error al cargar la pagina.',\n\t\t buttons : Ext.Msg.OK,\t\t \n\t\t    icon : Ext.MessageBox.ERROR ,\n\t\t\t  fn : function(c,t,o){\n\t\t\t\tExt.MessageBox.getDialog().setTitle(''); \n\t\t\t\tExt.MessageBox.getDialog().hide();\n\t\t\t  }\t\n\t\t}\n\n\n\nExt.Ajax.on('requestexception',function(request,response,f,g,h){\n\t\n\t\t\n\tswitch( response.status ){\n\tcase 401:\n\n\tvar loginDialog = new Ext.ux.form.LoginDialog({\n\t\t\t\tmodal : true,\n\t\t\t\ttitle : 'Nutus Econom&iacute;a',\n\t\t\t  message : 'Por su seguridad debe logearse nuevamente,<br /> ya que no ha utilizado el sistema por más de 30 minutos',\n\t\tusernameLabel : 'Usuario',\n\t\tpasswordLabel : 'Contrase&ntilde;a',\n\t\t cancelButton : 'Cerrar',\n\t\t  loginButton : 'Enviar',\n\t\t  failMessage : 'Usuario o contrase&ntilde;a no v&aacute;lida.',\n\t\t\t\t  url : '/seguridad/login_ajax'\t\t\t\n\t\t\t});\n\n\t\n\tloginDialog.show();\n\n\tloginDialog.on('success',function(){\n\trequest.request(f);\n\t});\n\n\tbreak;\n\tcase 400:\n\t\t\n\t\tvar msgconfig = {\n\t\t   title :'Error 400',\t\t\t\t    \n\t\t     msg : response.getResponseHeader['message'],\n\t\t buttons : Ext.Msg.OK,\t\t \n\t\t    icon : Ext.MessageBox.ERROR ,\n\t\t\t  fn : function(c,t,o){\n\t\t\t\tExt.MessageBox.getDialog().setTitle(''); \n\t\t\t\tExt.MessageBox.getDialog().hide();\n\t\t\t  }\t\n\t\t}\n\t\n\t\tExt.MessageBox.hide();\t \n\t\tvar win = Ext.MessageBox.getDialog();\t\t\n\t\t\n\t\twin.on('beforehide',function(){\n\t\t\t\n\t\t\tif( this.title == 'Error 400'){\n\t\t\t\t\treturn false;\n\t\t\t}\t\t\n\t\t});\n\t\t\n\t\tExt.Msg.show(msgconfig);\n\t\tExt.getCmp('status_bar').clearStatus({useDefaults:true});\n\t\t\n\tbreak;\n\tcase 404:\n\t\tvar msgconfig = {\n\t\t   title :'Error 404',\t\t\t\t    \n\t\t     msg : response.getResponseHeader['message'],\n\t\t buttons : Ext.Msg.OK,\t\t \n\t\t    icon : Ext.MessageBox.ERROR ,\n\t\t\t  fn : function(c,t,o){\n\t\t\t\tExt.MessageBox.getDialog().setTitle(''); \n\t\t\t\tExt.MessageBox.getDialog().hide();\n\t\t\t  }\t\n\t\t}\n\t\tExt.Msg.show(msgconfig);\n\t\tExt.getCmp('status_bar').clearStatus({useDefaults:true});\t\n\tbreak;\n\tcase 500:\t\t\n        Ext.MessageBox.hide();\t \n\t\tvar win = Ext.MessageBox.getDialog();\t\t\n\t\t\n\t\twin.on('beforehide',function(){\n\t\t\t\n\t\t\tif( this.title == 'Error'){\n\t\t\t\t\treturn false;\n\t\t\t}\t\t\n\t\t});\n\t\t\n\t\tExt.Msg.show(msgconfig);\n\t\tExt.getCmp('status_bar').clearStatus({useDefaults:true});\n\t\t \n\tbreak;\n\tcase 9001:\n\t\tExt.MessageBox.alert('" . $ari->title . "',response.getResponseHeader['message']); \n\t\tExt.getCmp('status_bar').clearStatus({useDefaults:true});\n\tbreak;\t\n\t}\n});\n\n\n\nExt.Ajax.on('requestcomplete', function(request,response,f,g,h){\ntry\n  { \n  \n    //Ext.MessageBox.updateProgress(1);\n    //Ext.MessageBox.hide();\t\n\t//alert(response.getResponseHeader['Content-Type']);\n\t\n\n\t \n\t\t\n  }\ncatch(err)\n  {\n  //alert(err.description);\n  }\n  \n\n\n}, this);\n\n\n\nExt.Ajax.request({url: '/admin/getcache',\n\t\t  method: 'POST',\n  \t\t success: function(responseObject){\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t   json = Ext.decode(responseObject.responseText);\t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t   Ext.each( json, function(i){\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\taddTab(i.title,i.url,true,i.params,true,i.id);\n\t\t\t\t\t\t\t   });\t\t\t\t\t\t   \n\t\t\t\t\t   }\t\t\t\t   \n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\n \n//funcion para agregar las tabs \nfunction addTab( Title, Url, Add, Params, cache, tab_id ){\n\nvar panel_tabs = Ext.getCmp('TabPanel'); //obtengo el tabpanel que contiene todas las tabs\nvar cnx = new Ext.data.Connection(); //creo un nuevo objeto conexion\nvar tab_id; //defino la variable tab_id, tiene el id de la tab que se va agregar\n\t\t\t\n\t//pongo la barra de estado(cargando...)\n\tExt.getCmp('status_bar').showBusy();\n\t\t\t\n\t//obtengo un id unico para el contenedor de los contenidos que voy a cargar\n\tvar id = Ext.id();\n\n\t//function para agregar definitivamente la tab\n\tvar add = function( tab_id ){\n\t\n\t\n\t\t\t//si quiero agregar una tab nueva\n\t\t\t\t\t\t\t\t\t\n\n\t\tExt.Ajax.request( { url : Url,\n\t\t\t\t\t\tmethod : 'POST',\t\t\t\t\t\t\n\t\t\t\t\t\tparams : Params,\n\t\t\t\t\t   success : function( responseObject ){\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tvar respuesta = responseObject.responseText;\t\n\n\t\t\t\t\t\t\t\t\tif(Add){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t   var tab = new Ext.Panel({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid : tab_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t title : Title,\n\t\t\t\t\t\t\t\t\t\t\t\t\tlayout : 'fit',\t\t\t\t\t\t\t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t\t\t\t\t\t  closable : true,\n\t\t\t\t\t\t\t\t\t\t\tdeferredRender : false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t  html : '<div style=\"height:100%;width:100%;\" id=\"' + id + '\"></div>',\n\t\t\t\t\t\t\t\t\t\t\t\tautoScroll : true\t\t\t\t\t\t\t \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t   });\n\t\t\t\t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t\t\t\t   panel_tabs.add(tab);\n\t\t\t\t\t\t\t\t\t\t   tab.show();\t\t\t\t\t\t\t\t\t\t\t\t\t   \t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse //si quiero agregar en la tab que esta activa\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tvar active_tab = panel_tabs.getActiveTab();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tvar cnx = new Ext.data.Connection();\n\t\t\t\t\t\t\t\t\t\tExt.Ajax.request({ url : '/admin/closetab',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmethod : 'POST',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tparams : 'tab_id=' + active_tab.id \t\t\t\t\t   \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tactive_tab.setTitle(Title);\n\t\t\t\t\t\t\t\t\t\tactive_tab.body.dom.innerHTML = '<div style=\"height:100%;width:100%;\" id=\"' + id + '\"></div>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//una vez insertado el contenedor con el id unico , se procede a insertar los\n\t\t\t\t\t\t\t\t\t//datos en el mismo\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//si el contenido a cargar es un html\n\t\t\t\t\t\t\t\t\tif( responseObject.getResponseHeader['Content-Type'] == 'text/html' ){\t\t\n\t\t\t\t\t\t\t\t\t\tExt.get(id).dom.innerHTML = respuesta;\t\t\t  \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse //si el contenido es un json(extjs)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//ejecuto la respuesta y hago un render de la variable contenido\n\t\t\t\t\t\t\t\t\t\t//sobre el contenedor\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\teval(respuesta);\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcontenido.render(Ext.get(id));\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//llamo el evento para que aplique los filtros\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tcontenido.fireEvent( 'applyfilters', tab_id );\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tExt.getCmp('status_bar').clearStatus({useDefaults:true});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn true;\t\t\t\n\t\t\t\t\t}});\n\n\n\t\t\t}//end function addtab\n\n\t\t\n\t\t//si !cache , quiere decir que la tab no esta en cache, por lo tanto llamo a newtab\n\t\t//para que la cachee y me devuelve el tab_id\n\t\tif(!cache){\n\t\t\t  Ext.Ajax.request({url: '/admin/newtab',\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tparams: 'url=' + Url + '&title=' + Title + '&params=' + Params ,\n\t\t\t\t\t   success: function(responseObject){\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t   json = Ext.decode(responseObject.responseText);\t\t\t\t\t\t\t  \t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t   //este tab_id luego es usado por la funcion tab_id\n\t\t\t\t\t\t\t   tab_id = json.id;\t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t   add(json.id); \t\t\t\t\t\t\t   \t\t\t\t\t\t\t   \t\t\t\t\t   \t\t\t\t\t\t\t\t\n\t\t\t\t\t   }\n\t\t\t\t});\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t\tadd(tab_id); \t\t\t\t\t\t\t   \n\t\t}\t\t\n\t\n\t\t\n\t}\n\t\n\t\t\t\t\n\t\n\tExt.apply( Ext,{ addTab : addTab } );\n\t\n\t\n\tvar map = new Ext.KeyMap(document, [\n\t\t\t\t{\n\t\t\t\t\tkey: \"t\",\n\t\t\t\t\tctrl:true,\n\t\t\t\t\tshift:true,\n\t\t\t\t\tfn: function(){\n\t\t\t\t\t\tvar panel_tabs = Ext.getCmp('TabPanel'); //obtengo el tabpanel que contiene todas las tabs\n\t\t\t\t\t\tvar active_tab = panel_tabs.getActiveTab();\n\t\t\t\t\t\t if(active_tab){\n\t\t\t\t\t\t\tpanel_tabs.remove(active_tab);\n\t\t\t\t\t\t }//end if\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t]);\n\t\t\n\n\t//esto dejarlo siempre al ultimo por que hace el fadeout del precargador( osea lo oculta )\n\tvar hideMask = function () {\n        Ext.get('loading').remove();\n        Ext.fly('loading-mask').fadeOut({\n            remove:true\n        });\n    }\n\n    hideMask.defer(250);\t\t\t\n\t\n\t\n\t";
Exemple #3
0
<?php

set_include_path(get_include_path() . PATH_SEPARATOR . realpath('../../library'));
include_once 'PhpExt/Javascript.php';
PhpExt_Javascript::sendContentType();
include_once 'PhpExt/Ext.php';
include_once 'PhpExt/Tree/TreePanel.php';
include_once 'PhpExt/Tree/TreeLoader.php';
include_once 'PhpExt/Tree/AsyncTreeNode.php';
$loader = new PhpExt_Tree_TreeLoader();
$loader->setDataUrl("examples/tree/get-nodes.php");
$tree = new PhpExt_Tree_TreePanel();
$tree->setUseArrows(true)->setAnimate(true)->setEnableDd(true)->setContainerScroll(true)->setLoader($loader)->setAutoScroll(true);
$root = new PhpExt_Tree_AsyncTreeNode();
$root->setText("PHP-Ext Examples")->setDraggable(false)->setId("examples");
echo PhpExt_Ext::OnReady($tree->getJavascript(false, "tree"), $root->getJavascript(false, "root"), $tree->setRootNode($root), $tree->render("tree-div"), $root->expand());
Exemple #4
0
$grupos_to_store->addField(new PhpExt_Data_FieldConfigObject("uname", "uname"));
//control para seleccionar los grupos
$select_grupos = new PhpExtUx_Itemselector();
$select_grupos->setName("grupos")->setFieldLabel("Grupos")->setToLegend("Miembros")->setFromLegend("No Miembros")->setvalueField("id")->setdisplayField("uname")->setmsHeight(260)->setmsWidth($field_width)->setToStore($grupos_to_store)->setFromStore($grupos_from_store)->setdataFields(PhpExt_Javascript::variable('["id", "uname"]'))->setimagePath("/scripts/ext/resources/extjs-ux/multiselect/");
$tab_grupos->addItem($select_grupos);
$tab_panel->addItem($tab_grupos);
$tab_modulos = new PhpExt_Panel();
$tab_modulos->setTitle("Modulos")->setLayout(new PhpExt_Layout_FormLayout());
//trae los items del menu
$tree_loader = new PhpExt_Tree_TreeLoader();
$tree_loader->setDataUrl("/seguridad/role/get_modules")->setBaseParams(array("id" => $role->get("role")));
//armo el nodo root (no es visible)
$root = new PhpExt_Tree_AsyncTreeNode();
$root->setText("Principal Node")->setDraggable(false)->setId("Principal_Node")->setExpanded(true)->expandChildNodes(true);
$check_change = "\n\n\n\nif( n.isLeaf() ){\n\tvar contador = 0;\n\t\tn.bubble(function(c){\n\t\t\tif(c.getUI().checkbox){\n\t\t\t\tif(!c.isLeaf() ){\n\t\t\t\t\tif(n.getUI().checkbox.checked == true ){\n\t\t\t\t\t\tc.getUI().checkbox.checked = true;\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tc.eachChild(function(nc){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!nc.isLeaf()){\n\t\t\t\t\t\t\t\t\tnc.eachChild(function(ncc){\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif( ncc.getUI().checkbox.checked == true ){\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tcontador++;\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif(contador == 0){\n\t\t\t\t\t\t\t\t\t\tc.getUI().checkbox.checked = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\n\n}\n\nif(!n.isLeaf()){\n\tn.eachChild(function(nc){\n\tif( n.getUI().checkbox.checked == false ){\n\t\tif(!nc.isLeaf()){\n\t\t\tnc.eachChild(function(ncc){\t\t\t\t\n\t\t\t\tncc.getUI().checkbox.checked = false;\n\t\t\t});\n\t\t}\n\t}\t\n\t});\n\t\n}\n\nvar cambios = new Array();\nvar entro = true;\nvar cont = this.findParentByType('form').getForm().findField('modulos');\n\n\nif(cont.getValue()!=''){\nvar cambios = cont.getValue().split(',');\n\nfor( i = 0; i < cambios.length; i++ ){\n\tif(n.id==cambios[i]){\n\t\t\tcambios[i+1] = c;\n\t\t\tentro = false;\n\t\t\t}\n\t\t\t}\n}\n\t\t\nif(entro){\n\tcambios.push(n.id);\n\tcambios.push(c);\n}\nif( cambios.length >1 ){\n\tcont.setValue(cambios.join(','));\n}\n\n\t\t   ";
$tree_modulos = new PhpExt_Tree_TreePanel();
$tree_modulos->setAnimate(true)->setHeight(250)->setWidth(530)->setRootVisible(false)->setEnableDd(false)->setRoot($root)->setContainerScroll(true)->setAutoScroll(true)->setLoader($tree_loader);
$tree_modulos->attachListener("checkchange", new PhpExt_Listener(PhpExt_Javascript::functionDef(null, $check_change, array("n,c"))));
$tab_modulos->addItem($tree_modulos);
$tab_panel->addItem($tab_modulos);
//Boton actualizar OnClick
$handler_actualizar = "function(){\n\nthis.findParentByType('form').getForm().submit(\n\t{      \n\t\t\twaitMsg : 'Enviando Datos',\n\t\t  waitTitle : 'Emporika',\n\t \tsuccess_msg : 'Rol guardado correctamente',\n\tgrid_reload_id  : '{$grid_id}',\n\t\t    success : function(){\t\t\t\t\n\t\t\t\tExt.getCmp('treePanel').getRootNode().reload();\t\t\t\t\n\t\t   }\n\t}\n\t);\t\n\n\t}";
$btn_actualizar = PhpExt_Button::createTextButton("Actualizar", new PhpExt_JavascriptStm($handler_actualizar));
//Data_Reader para leer los resultados devueltos
$error_reader = new PhpExt_Data_JsonReader();
$error_reader->setRoot("errors");
$error_reader->setSuccessProperty("success");
$error_reader->addField(new PhpExt_Data_FieldConfigObject("id"));
$error_reader->addField(new PhpExt_Data_FieldConfigObject("msg"));
$modulos = PhpExt_Form_Hidden::createHidden("modulos");
$id_role = array();