Example #1
0
$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";
$add_tab_invoke = PhpExt_Javascript::callfunction("addTab", array("n.id[0]", "n.id[1]", "true", "''", "false"))->output() . "return false;";
$add_tab_invoke_html = PhpExt_Javascript::callfunction("addTab", array("n.id[0]", "n.id[1]", "false", "''", "false"))->output() . "return false;";
$get_tree_panel = PhpExt_Element::getCmp('treePanel');
$if_leaf = PhpExt_Javascript::functionNoDef("if", $add_tab_invoke, array("n.leaf"));
$if_leaf_html = PhpExt_Javascript::functionNoDef("if", $add_tab_invoke_html, array("n.leaf"));
$add_tab_onclick = PhpExt_Javascript::functionDef(null, $if_leaf, array("n"));
Example #2
0
$east->addItem($eastTabs);
$viewport->addItem($east, PhpExt_Layout_BorderLayoutData::createEastRegion()->setSplit(true)->setMinSize(175)->setMaxSize(400)->setMargins("0 5 0 0"));
// West Region
$west = new PhpExt_Panel();
$west->setTitle("West")->setCollapsible(true)->setWidth(200)->setId("west-panel");
$accordion = new PhpExt_Layout_AccordionLayout();
$accordion->setAnimate(true);
$west->setLayout($accordion);
// panel 1
$p1 = new PhpExt_Panel();
$p1->setContentElement("west")->setTitle("Navigation")->setBorder(false)->setIconCssClass("nav");
$west->addItem($p1);
// panel 2
$p2 = new PhpExt_Panel();
$p2->setHtml('<p>Some settings in here.</p>')->setTitle("Settings")->setBorder(false)->setIconCssClass("settings");
$west->addItem($p2);
$viewport->addItem($west, PhpExt_Layout_BorderLayoutData::createWestRegion()->setSplit(true)->setMinSize(175)->setMaxSize(400)->setMargins("0 0 0 5"));
// Center Region
$center = new PhpExt_TabPanel();
$center->setActiveTab(0);
$tabLayout = new PhpExt_Layout_TabLayout();
$tabLayout->setDeferredRender(true);
$center->setLayout($tabLayout);
$c1 = new PhpExt_Panel();
$c1->setContentElement("center1")->setTitle("Close Me")->setAutoScroll(true);
$center->addItem($c1, new PhpExt_Layout_TabLayoutData(true));
$c2 = new PhpExt_Panel();
$c2->setContentElement("center2")->setTitle("Center Panel")->setAutoScroll(true);
$center->addItem($c2);
$viewport->addItem($center, PhpExt_Layout_BorderLayoutData::createCenterRegion());
echo PhpExt_Ext::OnReady($viewport->getJavascript(false, "v"), $viewport->render("viewport"));
Example #3
0
// adds the panel as a 50% column using ColumnLayoutData
$columnPanel->addItem($firstColumn, new PhpExt_Layout_ColumnLayoutData(0.5));
//- Second column
$secondColumn = new PhpExt_Panel();
$secondColumn->setLayout(new PhpExt_Layout_FormLayout())->addItem(PhpExt_Form_TextField::createTextField("last", "Last Name")->setTabIndex(2), new PhpExt_Layout_AnchorLayoutData("95%"))->addItem(PhpExt_Form_TextField::createTextField("email", "Email")->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL)->setTabIndex(4), new PhpExt_Layout_AnchorLayoutData("95%"));
$columnPanel->addItem($secondColumn, new PhpExt_Layout_ColumnLayoutData(0.5));
// Add an HtmlEditor directly to the form, underneath the two columns
$top->addItem(PhpExt_Form_HtmlEditor::createHtmlEditor("bio", "Biography", "bio")->setTabIndex(5)->setHeight(200), new PhpExt_Layout_AnchorLayoutData("98%"));
//- Buttons
$top->addButton(PhpExt_Button::createTextButton("Save"));
$top->addButton(PhpExt_Button::createTextButton("Cancel"));
//****************************** Form as Tabs
$tabs = new PhpExt_Form_FormPanel();
$tabs->setBorder(false)->setLabelWidth(75)->setWidth(350);
$tabPanel = new PhpExt_TabPanel();
$tabPanel->setActiveTab(0)->setDefaults(new PhpExt_Config_ConfigObject(array("autoHeight" => true, "bodyStyle" => "padding:10px")));
$detailsTab = new PhpExt_Panel();
$detailsTab->setTitle("Personal Details")->setLayout(new PhpExt_Layout_FormLayout())->setDefaults(new PhpExt_Config_ConfigObject(array("width" => 230)))->setDefaultType("textfield")->addItem(PhpExt_Form_TextField::createTextField("first", "First Name")->setAllowBlank(false)->setValue("Jack"))->addItem(PhpExt_Form_TextField::createTextField("company", "Company")->setValue("Slocum"))->addItem(PhpExt_Form_TextField::createTextField("last", "Last Name")->setValue("Ext JS"))->addItem(PhpExt_Form_TextField::createTextField("email", "Email")->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL));
$phonesTab = new PhpExt_Panel();
$phonesTab->setTitle("Phone Numbers")->setLayout(new PhpExt_Layout_FormLayout())->setDefaults(new PhpExt_Config_ConfigObject(array("width" => 230)))->setDefaultType("textfield")->addItem(PhpExt_Form_TextField::createTextField("home", "Home")->setValue("(888) 555-1212"))->addItem(PhpExt_Form_TextField::createTextField("business", "Business"))->addItem(PhpExt_Form_TextField::createTextField("mobile", "Mobile"))->addItem(PhpExt_Form_TextField::createTextField("fax", "Fax"));
$tabPanel->addItem($detailsTab);
$tabPanel->addItem($phonesTab);
$tabs->addItem($tabPanel);
$tabs->addButton(PhpExt_Button::createTextButton("Save"));
$tabs->addButton(PhpExt_Button::createTextButton("Cancel"));
//******************************* Form Tabs 2
$tabs2 = new PhpExt_Form_FormPanel();
$tabs2->setLabelAlign(PhpExt_Form_FormPanel::LABEL_ALIGN_TOP)->setTitle("Inner Tabs")->setBodyStyle("padding:5px")->setWidth(600);
$columnPanel2 = new PhpExt_Panel();
// using ColumnLayout
$columnPanel2->setBorder(false)->setLayout(new PhpExt_Layout_ColumnLayout());
Example #4
0
    include_once 'PhpExt/AutoLoadConfigObject.php';
    include_once 'PhpExt/Layout/FitLayout.php';
    include_once 'PhpExt/TabPanel.php';
    include_once 'PhpExt/Panel.php';
    $example_id = @$_GET['eid'];
    $file = $example_id . ".php";
    $win = new PhpExt_Window();
    $win->setTitle("Sample Source: " . $file)->setWidth(500)->setHeight(500)->setLayout(new PhpExt_Layout_FitLayout())->setResizable(false)->setCloseAction(PhpExt_Window::CLOSE_ACTION_HIDE)->setBodyBorder(false)->setPlain(true);
    // PHP Source
    $phpTab = new PhpExt_Panel();
    $phpTab->setTitle("PHP Source")->setLayout(new PhpExt_Layout_FitLayout())->setAutoLoad(new PhpExt_AutoLoadConfigObject($baseUrl . "/examples/viewsource.php", array("file" => $file)))->getAutoLoad()->setScripts(true)->setMethod(PhpExt_AutoLoadConfigObject::AUTO_LOAD_METHOD_GET);
    // Generated JS
    $jsTab = new PhpExt_Panel();
    $jsTab->setTitle("Generated JS")->setLayout(new PhpExt_Layout_FitLayout())->setAutoLoad(new PhpExt_AutoLoadConfigObject($baseUrl . "/examples/viewjs.php", array("file" => $file)))->getAutoLoad()->setScripts(true)->setMethod(PhpExt_AutoLoadConfigObject::AUTO_LOAD_METHOD_GET);
    $tabs = new PhpExt_TabPanel();
    $tabs->setActiveTab(0)->setPlain(true)->setFrame(false)->addItem($phpTab)->addItem($jsTab);
    $win->addItem($tabs);
    $customHeaders = '
	    <link rel="stylesheet" type="text/css" href="resources/ext-2.0.2/resources/css/ext-all.css" />
	
	    <!-- GC -->
	 	<!-- LIBS -->
	 	<script type="text/javascript" src="resources/ext-2.0.2/adapter/ext/ext-base.js"></script>
	 	<!-- ENDLIBS -->
	
	    <script type="text/javascript" src="resources/ext-2.0.2/ext-all.js"></script>
	    <script type="text/javascript" src="examples/examples.js"></script>
	    
	    <script type="text/javascript" src="resources/codepress/codepress.js"></script>
		
		<script>' . $win->getJavascript(false, "w") . '