Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->setExtClassInfo("Ext.StatusBar", "status");
     $validProps = array("defaultText", "statusAlign");
     $this->addValidConfigProperties($validProps);
     $this->_mustRender = true;
 }
Example #2
0
global $ari;
$ari->popup = 1;
// no mostrar el main_frame
PhpExt_Javascript::sendContentType();
//--------------------------------------------------MENU TOP-----------------------------------------------------------------------------------------------------------//
//items del panel top
//Boton_Salir OnClick
$msg_config = PhpExt_MessageBoxOptions::createMsgOptions()->setTitle($ari->title)->setMsg("¿Está seguro que desea salir?")->setWidth(300)->setButtons(new PhpExt_JavascriptStm("{ cancel:'Cancelar', yes:'Salir', ok:'Salir y Guardar' }"))->setMultiline(false)->setFn(PhpExt_Javascript::variable("function( Result ){\n\t\t\t\t\tif(Result == 'yes'){\n\t\t\t\t\t\twindow.location = '/seguridad/logout';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(Result == 'ok'){\n\t\t\t\t\t\twindow.location = '/seguridad/logoutsave';\n\t\t\t\t\t}\t\t\t  \t\t\t  \n\t\t\t\t}"));
$msgbox = PhpExt_Javascript::functionDef(null, PhpExt_MessageBox::show($msg_config));
//Boton_Mi_Cuenta OnClick // function addTab( Title, Url, Add, Params, cache, tab_id ) // addTab(i.title,i.url,true,i.params,true,i.id);
$function_add_tab = PhpExt_Javascript::callfunction("addTab", array("'Mi Cuenta'", "'/seguridad/user/update'", "true"));
$handler_mi_cuenta = PhpExt_Javascript::functionDef("", $function_add_tab, array("e"));
$sub_menu_bienvenido = new PhpExt_Menu_Menu();
$sub_menu_bienvenido->addCheckItem("Cuenta", "Mi Cuenta", $handler_mi_cuenta);
$sub_menu_bienvenido->addCheckItem("Salir2", "Salir", $msgbox);
$menu = new PhpExt_Toolbar_Toolbar();
$menu->addFill("leftfill");
//para que los botones estena a la derecha
$menu->addButton("welcome", "<u>Bienvenido " . $ari->get("user")->name() . "</u>");
$menu->addButton("Salir", "Salir", null, $msgbox);
//pongo los iconos
$boton_mi_cuenta = $sub_menu_bienvenido->getItem("Cuenta");
$boton_mi_cuenta->setIcon("/images/ext/user.png");
$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");
Example #3
0
 protected function getConfigParams($lazy = false)
 {
     if ($this->_bottomToolbar->getItems()->getCount() == 0 && !$this->_bottomToolbar->getMustRender()) {
         $this->setExtConfigProperty("bbar", null);
     }
     if ($this->_topToolbar->getItems()->getCount() == 0 && !$this->_topToolbar->getMustRender()) {
         $this->setExtConfigProperty("tbar", null);
     }
     if ($this->_tools->getCount() == 0) {
         $this->setExtConfigProperty("tools", null);
     }
     return parent::getConfigParams($lazy);
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->setExtClassInfo("Ext.PagingToolbar", "paging");
     $validProps = array("displayInfo", "displayMsg", "emptyMsg", "pageSize", "store");
     $this->addValidConfigProperties($validProps);
     $this->_mustRender = true;
     $this->setExtConfigProperty("displayMsg", "Viendo Registros {0} - {1} de {2}");
 }