function display() { $ajax = new AjaxCompose(); $smarty = $this->generateSmarty(); if (isset($_REQUEST['refreshTree'])) { require_once 'modules/ModuleBuilder/Module/DropDownTree.php'; $mbt = new DropDownTree(); $ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes()); $smarty->assign('refreshTree', true); } $smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage('delete_inline', '')); $smarty->assign('editImage', SugarThemeRegistry::current()->getImage('edit_inline', '')); $smarty->assign('action', 'savedropdown'); $body = $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdown.tpl'); $ajax->addSection('east2', $GLOBALS['mod_strings']['LBL_SECTION_DROPDOWNED'], $body); echo $ajax->getJavascript(); }
function display() { $ajax = new AjaxCompose(); $params = $this->parseArguments($_REQUEST); $smarty = $this->generateSmarty($params); if (isset($_REQUEST['refreshTree'])) { $mbt = new DropDownTree(); $ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes()); $smarty->assign('refreshTree', true); } $smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage('delete_inline', '', null, null, '.gif', translate('LBL_MB_DELETE'))); $smarty->assign('editImage', SugarThemeRegistry::current()->getImage('edit_inline', '', null, null, '.gif', translate('LBL_EDIT'))); $smarty->assign('action', 'savedropdown'); $smarty->assign('fromNewField', !empty($_REQUEST['is_new_field'])); $body = $smarty->fetch($this->template); $ajax->addSection('east2', translate('LBL_SECTION_DROPDOWNED'), $body); echo $ajax->getJavascript(); }
function display() { $ajax = new AjaxCompose(); $smarty = new Sugar_Smarty(); if (isset($_REQUEST['refreshTree'])) { require_once 'modules/ModuleBuilder/Module/DropDownTree.php'; $mbt = new DropDownTree(); $ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes()); $smarty->assign('refreshTree', true); } global $mod_strings; $ajax->addCrumb($mod_strings['LBL_DROPDOWNEDITOR'], 'ModuleBuilder.main("dropdowns")'); require_once 'modules/ModuleBuilder/Module/DropDownBrowser.php'; $dd = new DropDownBrowser(); $smarty->assign('LBL_BTN_ADDDROPDOWN', translate('LBL_BTN_ADDDROPDOWN')); $smarty->assign('dropdowns', $dd->getNodes()); $smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage('delete_inline', '', null, null, '.gif', $mod_strings['LBL_MB_DELETE'])); $smarty->assign('editImage', SugarThemeRegistry::current()->getImage('edit_inline', '', null, null, '.gif', $mod_strings['LBL_EDIT'])); $smarty->assign('action', 'savedropdown'); $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR'], $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl')); echo $ajax->getJavascript(); }