当前位置: 首页>>代码示例>>PHP>>正文


PHP AjaxCompose类代码示例

本文整理汇总了PHP中AjaxCompose的典型用法代码示例。如果您正苦于以下问题:PHP AjaxCompose类的具体用法?PHP AjaxCompose怎么用?PHP AjaxCompose使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AjaxCompose类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display()
 {
     global $mod_strings;
     $smarty = new Sugar_Smarty();
     $mb = new ModuleBuilder();
     //if (!empty($_REQUEST['package'])) {
     if (empty($_REQUEST['package']) && empty($_REQUEST['new'])) {
         $this->generatePackageButtons($mb->getPackageList());
         $smarty->assign('buttons', $this->buttons);
         $smarty->assign('title', $GLOBALS['mod_strings']['LBL_MODULEBUILDER']);
         $smarty->assign("question", $GLOBALS['mod_strings']['LBL_QUESTION_PACKAGE']);
         $smarty->assign("defaultHelp", "mbHelp");
         $ajax = new AjaxCompose();
         $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")');
         $ajax->addCrumb($GLOBALS['mod_strings']['LBL_PACKAGE_LIST'], '');
         $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_PACKAGE_LIST'], $smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl'));
         echo $ajax->getJavascript();
     } else {
         $name = !empty($_REQUEST['package']) ? $_REQUEST['package'] : '';
         $mb->getPackage($name);
         require_once 'modules/ModuleBuilder/MB/MBPackageTree.php';
         $mbt = new MBPackageTree();
         $nodes = $mbt->fetchNodes();
         $package_labels = array();
         if (!empty($nodes['tree_data']['nodes'])) {
             foreach ($nodes['tree_data']['nodes'] as $entry) {
                 if (!empty($entry['data']['label']) && $name != $entry['data']['label']) {
                     $package_labels[] = strtoupper($entry['data']['label']);
                 }
             }
         }
         $json = getJSONobj();
         $smarty->assign('package_labels', $json->encode($package_labels));
         $this->package =& $mb->packages[$name];
         $this->loadModuleTypes();
         $this->loadPackageHelp($name);
         $this->package->date_modified = $GLOBALS['timedate']->to_display_date_time($this->package->date_modified);
         $smarty->assign('package', $this->package);
         $smarty->assign('mod_strings', $mod_strings);
         $smarty->assign('package_already_deployed', 'false');
         foreach ($this->package->modules as $a_module) {
             if (in_array($a_module->key_name, $GLOBALS['moduleList'])) {
                 $smarty->assign('package_already_deployed', 'true');
                 break;
             }
         }
         $ajax = new AjaxCompose();
         $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")');
         if (empty($name)) {
             $name = $mod_strings['LBL_NEW_PACKAGE'];
         }
         $ajax->addCrumb($name, '');
         $html = $smarty->fetch('modules/ModuleBuilder/tpls/MBPackage/package.tpl');
         if (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'SavePackage') {
             $html .= "<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
         }
         $ajax->addSection('center', translate('LBL_SECTION_PACKAGE', 'ModuleBuilder'), $html);
         echo $ajax->getJavascript();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:60,代码来源:view.package.php

示例2: display

 function display()
 {
     global $mod_strings;
     $ajax = new AjaxCompose();
     $ajax->addSection('center', $mod_strings['LBL_PACKAGE_DELETED'], str_replace('[[package]]', $_REQUEST['package'], $mod_strings['LBL_PACKAGE_WAS_DELETED']));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:view.deletepackage.php

示例3: display

 function display()
 {
     global $current_user, $mod_strings;
     $smarty = new Sugar_Smarty();
     $mb = new MBPackage("packageCustom");
     $mod = $mb->getCustomModules();
     $modules = array();
     $custom = array();
     if (is_array($mod)) {
         foreach ($mod as $key => $value) {
             $modules[] = $key;
             $custom[] = $value;
         }
     }
     $nb_mod = count($modules);
     $smarty->assign('mod_strings', $mod_strings);
     $smarty->assign('modules', $mod);
     $smarty->assign('custom', $custom);
     $smarty->assign('nb_mod', $nb_mod);
     $smarty->assign('defaultHelp', 'exportHelp');
     $smarty->assign('moduleList', $GLOBALS['app_list_strings']['moduleList']);
     $smarty->assign('moduleList', $GLOBALS['app_list_strings']['moduleList']);
     $ajax = new AjaxCompose();
     $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
     $ajax->addSection('center', $mod_strings['LBL_EC_TITLE'], $smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl')));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:view.exportcustomizations.php

示例4: display

 function display()
 {
     $this->parser = ParserFactory::getParser(MB_PORTAL . strtolower($this->editLayout), $this->editModule, null, null, MB_PORTAL);
     $smarty = new Sugar_Smarty();
     //Add in the module we are viewing to our current mod strings
     global $mod_strings, $current_language;
     $editModStrings = return_module_language($current_language, $this->editModule);
     $mod_strings = sugarArrayMerge($editModStrings, $mod_strings);
     $smarty->assign('mod', $mod_strings);
     $smarty->assign('MOD', $mod_strings);
     // assign buttons
     $images = array('icon_save' => 'studio_save', 'icon_publish' => 'studio_publish', 'icon_address' => 'icon_Address', 'icon_emailaddress' => 'icon_EmailAddress', 'icon_phone' => 'icon_Phone');
     foreach ($images as $image => $file) {
         $smarty->assign($image, SugarThemeRegistry::current()->getImage($file, '', null, null, '.gif', $file));
     }
     $smarty->assign('icon_delete', SugarThemeRegistry::current()->getImage('icon_Delete', '', 48, 48, '.gif', $mod_strings['LBL_MB_DELETE']));
     $buttons = array();
     $buttons[] = array('id' => 'saveBtn', 'image' => SugarThemeRegistry::current()->getImage($images['icon_save'], '', null, null, '.gif', $mod_strings['LBL_BTN_SAVE']), 'text' => $GLOBALS['mod_strings']['LBL_BTN_SAVE'], 'actionScript' => "onclick='if(Studio2.checkCalcFields(\"{$_REQUEST['view']}\", \"ERROR_CALCULATED_PORTAL_FIELDS\"))Studio2.handleSave();'");
     $buttons[] = array('id' => 'publishBtn', 'image' => SugarThemeRegistry::current()->getImage($images['icon_publish'], '', null, null, '.gif', $mod_strings['LBL_BTN_PUBLISH']), 'text' => $GLOBALS['mod_strings']['LBL_BTN_SAVEPUBLISH'], 'actionScript' => "onclick='if(Studio2.checkCalcFields(\"{$_REQUEST['view']}\", \"ERROR_CALCULATED_PORTAL_FIELDS\"))Studio2.handlePublish();'");
     $html = "";
     foreach ($buttons as $button) {
         if ($button['id'] == "spacer") {
             $html .= "<td style='width:{$button['width']}'> </td>";
         } else {
             $html .= "<td><input id='{$button['id']}' type='button' valign='center' class='button' style='cursor:pointer' " . "onmousedown='this.className=\"buttonOn\";return false;' onmouseup='this.className=\"button\"' " . "onmouseout='this.className=\"button\"' {$button['actionScript']} value = '{$button['text']}' ></td>";
         }
     }
     $smarty->assign('buttons', $html);
     // assign fields and layout
     $smarty->assign('available_fields', $this->parser->getAvailableFields());
     $smarty->assign('field_defs', $this->parser->getFieldDefs());
     $smarty->assign('layout', $this->parser->getLayout());
     $smarty->assign('view_module', $this->editModule);
     $smarty->assign('calc_field_list', json_encode($this->parser->getCalculatedFields()));
     $smarty->assign('view', $this->editLayout);
     $smarty->assign('maxColumns', $this->parser->getMaxColumns());
     $smarty->assign('fieldwidth', '150px');
     $smarty->assign('translate', true);
     $smarty->assign('fromPortal', true);
     // flag for form submittal - when the layout is submitted the actions are the same for layouts and portal layouts, but the parsers must be different...
     if (!empty($this->parser->usingWorkingFile)) {
         $smarty->assign('layouttitle', $GLOBALS['mod_strings']['LBL_LAYOUT_PREVIEW']);
     } else {
         $smarty->assign('layouttitle', $GLOBALS['mod_strings']['LBL_CURRENT_LAYOUT']);
     }
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main("sugarportal")');
     $ajax->addCrumb(translate('LBL_LAYOUTS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&portal=1&layout=1")');
     $ajax->addCrumb(ucwords(translate('LBL_MODULE_NAME', $this->editModule)), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&portal=1&view_module=' . $this->editModule . '")');
     $ajax->addCrumb(ucwords($this->editLayout), '');
     // set up language files
     $smarty->assign('language', $this->parser->getLanguage());
     // for sugar_translate in the smarty template
     //navjeet- assistant logic has changed
     //include('modules/ModuleBuilder/language/en_us.lang.php');
     //$smarty->assign('assistantBody', $mod_strings['assistantHelp']['module']['editView'] );
     $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_EDIT_LAYOUT'], $smarty->fetch('modules/ModuleBuilder/tpls/layoutView.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:59,代码来源:view.portallayoutview.php

示例5: constructAjax

 function constructAjax()
 {
     require_once 'modules/ModuleBuilder/MB/AjaxCompose.php';
     $ajax = new AjaxCompose();
     if ($this->fromModuleBuilder) {
         $ajax->addCrumb(translate('LBL_MODULEBUILDER', 'ModuleBuilder'), 'ModuleBuilder.main("mb")');
         $ajax->addCrumb($_REQUEST['view_package'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $this->editPackage . '")');
         $ajax->addCrumb($this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $this->editPackage . '&view_module=' . $this->editModule . '")');
         $ajax->addCrumb(translate('LBL_LAYOUTS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&layouts=1&MB=1&view_package=' . $this->editPackage . '&view_module=' . $this->editModule . '")');
         $ajax->addCrumb(translate('LBL_DASHLET', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&dashlet=1&MB=1&view_package=' . $this->editPackage . '&view_module=' . $this->editModule . '")');
         $ViewLabel = $this->editLayout == MB_DASHLET ? 'LBL_DASHLETLISTVIEW' : 'LBL_DASHLETSEARCHVIEW';
         $ajax->addCrumb(translate($ViewLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=editLayout&view=' . $this->editLayout . '&view_module=' . $this->editModule . '&view_package=' . $this->editPackage . '")');
     }
     return $ajax;
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:15,代码来源:view.dashlet.php

示例6: display

 function display()
 {
     global $mod_strings;
     $ajax = new AjaxCompose();
     $smarty = new Sugar_Smarty();
     if (isset($_REQUEST['MB']) && $_REQUEST['MB'] == "1") {
         $smarty->assign("MB", $_REQUEST['MB']);
         $smarty->assign("view_package", $_REQUEST['view_package']);
     }
     $selected_lang = !empty($_REQUEST['selected_lang']) ? $_REQUEST['selected_lang'] : $_SESSION['authenticated_user_language'];
     if (empty($selected_lang)) {
         $selected_lang = $GLOBALS['sugar_config']['default_language'];
     }
     $smarty->assign('available_languages', get_languages());
     $smarty->assign('selected_lang', $selected_lang);
     ksort($this->properties);
     $smarty->assign("properties", $this->properties);
     //        $smarty->assign("id",$this->id);
     $smarty->assign("mod_strings", $mod_strings);
     $smarty->assign('APP', $GLOBALS['app_strings']);
     $smarty->assign("view_module", $this->editModule);
     $smarty->assign("subpanel", $this->subpanel);
     if (isset($this->editPackage)) {
         $smarty->assign("view_package", $this->editPackage);
     }
     $ajax->addSection('east', translate('LBL_SECTION_PROPERTIES', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/editProperty.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:28,代码来源:view.property.php

示例7: constructAjax

 function constructAjax()
 {
     require_once 'modules/ModuleBuilder/MB/AjaxCompose.php';
     $ajax = new AjaxCompose();
     switch ($this->editLayout) {
         default:
             $searchLabel = 'LBL_' . strtoupper($this->editLayout);
     }
     $layoutLabel = 'LBL_LAYOUTS';
     $layoutView = 'layouts';
     if ($this->fromModuleBuilder) {
         $ajax->addCrumb(translate('LBL_MODULEBUILDER', 'ModuleBuilder'), 'ModuleBuilder.main("mb")');
         $ajax->addCrumb($_REQUEST['view_package'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST['view_package'] . '")');
         $ajax->addCrumb($this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST['view_package'] . "&view_module={$this->editModule}" . '")');
         $ajax->addCrumb(translate($layoutLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule . '&view_package=' . $_REQUEST['view_package'] . '")');
         if ($layoutLabel == 'LBL_LAYOUTS') {
             $ajax->addCrumb(translate('LBL_SEARCH_FORMS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' . $this->editModule . '&view_package=' . $_REQUEST['view_package'] . '")');
         }
         $ajax->addCrumb(translate($searchLabel, 'ModuleBuilder'), '');
     } else {
         $ajax->addCrumb(translate('LBL_STUDIO', 'ModuleBuilder'), 'ModuleBuilder.main("studio")');
         $ajax->addCrumb($this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")');
         $ajax->addCrumb(translate($layoutLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=' . $layoutView . '&view_module=' . $this->editModule . '")');
         if ($layoutLabel == 'LBL_LAYOUTS') {
             $ajax->addCrumb(translate('LBL_SEARCH_FORMS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' . $this->editModule . '")');
         }
         $ajax->addCrumb(translate($searchLabel, 'ModuleBuilder'), '');
     }
     $this->title = $searchLabel;
     return $ajax;
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:view.searchview.php

示例8: display

 function display()
 {
     $moduleName = !empty($_REQUEST['view_module']) ? $_REQUEST['view_module'] : $_REQUEST['edit_module'];
     $smarty = new Sugar_Smarty();
     // set the mod_strings as we can be called after doing a Repair and the mod_strings are set to Administration
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'ModuleBuilder');
     $smarty->assign('mod_strings', $GLOBALS['mod_strings']);
     $smarty->assign('view_module', $moduleName);
     $ajax = new AjaxCompose();
     $json = getJSONobj();
     $this->fromModuleBuilder = !empty($_REQUEST['MB']) || !empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio';
     $smarty->assign('fromModuleBuilder', $this->fromModuleBuilder);
     if (!$this->fromModuleBuilder) {
         $smarty->assign('view_package', '');
         $relationships = new DeployedRelationships($moduleName);
         $ajaxRelationships = $this->getAjaxRelationships($relationships);
         $smarty->assign('relationships', $json->encode($ajaxRelationships));
         $smarty->assign('empty', sizeof($ajaxRelationships) == 0);
         $smarty->assign('studio', true);
         //crumb
         global $app_list_strings;
         $moduleNames = array_change_key_case($app_list_strings['moduleList']);
         $translatedModule = $moduleNames[strtolower($moduleName)];
         $ajax->addCrumb(translate('LBL_STUDIO'), 'ModuleBuilder.main("studio")');
         $ajax->addCrumb($translatedModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $moduleName . '")');
         $ajax->addCrumb(translate('LBL_RELATIONSHIPS'), '');
         $ajax->addSection('center', $moduleName . ' ' . translate('LBL_RELATIONSHIPS'), $this->fetchTemplate($smarty, 'modules/ModuleBuilder/tpls/studioRelationships.tpl'));
     } else {
         $smarty->assign('view_package', $_REQUEST['view_package']);
         $mb = new ModuleBuilder();
         $module =& $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']);
         $package = $mb->packages[$_REQUEST['view_package']];
         $package->loadModuleTitles();
         $relationships = new UndeployedRelationships($module->getModuleDir());
         $ajaxRelationships = $this->getAjaxRelationships($relationships);
         $smarty->assign('relationships', $json->encode($ajaxRelationships));
         $smarty->assign('empty', sizeof($ajaxRelationships) == 0);
         $module->help['default'] = empty($_REQUEST['view_module']) ? 'create' : 'modify';
         $module->help['group'] = 'module';
         $ajax->addCrumb(translate('LBL_MODULEBUILDER'), 'ModuleBuilder.main("mb")');
         $ajax->addCrumb($package->name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $package->name . '")');
         $ajax->addCrumb($moduleName, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $package->name . '&view_module=' . $moduleName . '")');
         $ajax->addCrumb(translate('LBL_RELATIONSHIPS'), '');
         $ajax->addSection('center', $moduleName . ' ' . translate('LBL_RELATIONSHIPS'), $this->fetchTemplate($smarty, 'modules/ModuleBuilder/tpls/studioRelationships.tpl'));
     }
     echo $ajax->getJavascript();
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:47,代码来源:view.relationships.php

示例9: display

 function display()
 {
     $smarty = new Sugar_Smarty();
     $smarty->assign('welcome', $GLOBALS['mod_strings']['LBL_SYNCP_WELCOME']);
     $smarty->assign('mod', $GLOBALS['mod_strings']);
     if (isset($_REQUEST['label'])) {
         $smarty->assign('label', $_REQUEST['label']);
     }
     $options = !empty($GLOBALS['system_config']->settings['system_portal_url']) ? $GLOBALS['system_config']->settings['system_portal_url'] : 'https://';
     $smarty->assign('options', $options);
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main("sugarportal")');
     $ajax->addCrumb(translate('LBL_SYNCPORTAL', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=portalsync")');
     $ajax->addSection('center', translate('LBL_SYNCPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portalsync.tpl'));
     $GLOBALS['log']->debug($smarty->fetch('modules/ModuleBuilder/tpls/portalsync.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:17,代码来源:view.portalsync.php

示例10: display

 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();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:17,代码来源:view.dropdown.php

示例11: display

 /**
  * This function loads portal config vars from db and sets them for the view
  * @see SugarView::display() for more info
  */
 function display()
 {
     global $current_user, $app_strings;
     $smarty = new Sugar_Smarty();
     $smarty->assign('mod', $GLOBALS['mod_strings']);
     $smarty->assign("token", session_id());
     $smarty->assign("siteURL", $GLOBALS['sugar_config']['site_url']);
     //Loading label
     $smarty->assign('LBL_LOADING', $app_strings['LBL_ALERT_TITLE_LOADING']);
     $theme = new SidecarTheme();
     $smarty->assign("css_url", $theme->getCSSURL());
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main("sugarportal")');
     $ajax->addCrumb(ucwords(translate('LBL_PORTAL_THEME')), '');
     $ajax->addSection('center', translate('LBL_SUGARPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portaltheme.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:21,代码来源:view.portaltheme.php

示例12: constructAjax

 function constructAjax()
 {
     require_once 'modules/ModuleBuilder/MB/AjaxCompose.php';
     $ajax = new AjaxCompose();
     $layoutLabel = 'LBL_LAYOUTS';
     $layoutView = 'layouts';
     $labels = [MB_LISTVIEW => 'LBL_LISTVIEW'];
     $translatedViewType = '';
     if (isset($labels[strtolower($this->editLayout)])) {
         $translatedViewType = translate($labels[strtolower($this->editLayout)], 'ModuleBuilder');
     }
     $this->translatedViewType = $translatedViewType;
     if ($this->fromModuleBuilder) {
         $ajax->addCrumb(translate('LBL_MODULEBUILDER', 'ModuleBuilder'), 'ModuleBuilder.main("mb")');
         $ajax->addCrumb($_REQUEST['view_package'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST['view_package'] . '")');
         $ajax->addCrumb($this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST['view_package'] . '&view_module=' . $_REQUEST['view_module'] . '")');
         if ($this->subpanel != "") {
             $ajax->addCrumb(translate('LBL_AVAILABLE_SUBPANELS', 'ModuleBuilder'), '');
             if ($this->subpanelLabel) {
                 $subpanelLabel = $this->subpanelLabel;
                 // If the subpanel title has changed, use that for the label instead
                 if (!empty($_REQUEST['subpanel_title']) && $_REQUEST['subpanelLabel'] != $_REQUEST['subpanel_title']) {
                     $subpanelLabel = $_REQUEST['subpanel_title'];
                 }
                 $ajax->addCrumb($subpanelLabel, '');
                 $this->translatedViewType = $subpanelLabel . "&nbsp;" . translate("LBL_SUBPANEL", "ModuleBuilder");
             } else {
                 $ajax->addCrumb($this->subpanel, '');
                 $this->translatedViewType = translate("LBL_SUBPANEL", "ModuleBuilder");
             }
         } else {
             $ajax->addCrumb(translate($layoutLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $_REQUEST['view_module'] . '&view_package=' . $_REQUEST['view_package'] . '")');
             $ajax->addCrumb($translatedViewType, '');
         }
     } else {
         $ajax->addCrumb(translate('LBL_STUDIO', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
         $ajax->addCrumb($this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")');
         if ($this->subpanel) {
             $ajax->addCrumb(translate('LBL_SUBPANELS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=subpanels&view_module=' . $this->editModule . '")');
             if ($this->subpanelLabel) {
                 $subpanelLabel = $this->subpanelLabel;
                 // If the subpanel title has changed, use that for the label instead
                 if (!empty($_REQUEST['subpanel_title']) && $_REQUEST['subpanelLabel'] != $_REQUEST['subpanel_title']) {
                     $subpanelLabel = $_REQUEST['subpanel_title'];
                 }
                 $ajax->addCrumb($subpanelLabel, '');
                 $this->translatedViewType = $subpanelLabel . "&nbsp;" . translate("LBL_SUBPANEL", "ModuleBuilder");
             } else {
                 $ajax->addCrumb($this->subpanel, '');
                 $this->translatedViewType = translate("LBL_SUBPANEL", "ModuleBuilder");
             }
         } else {
             $ajax->addCrumb(translate($layoutLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=' . $layoutView . '&view_module=' . $this->editModule . '")');
             $ajax->addCrumb($translatedViewType, '');
         }
     }
     return $ajax;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:58,代码来源:view.listview.php

示例13: display

 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();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:view.dropdown.php

示例14: display

 /**
  * This function loads portal config vars from db and sets them for the view
  * @see SugarView::display() for more info
  */
 function display()
 {
     $portalFields = array('appStatus' => 'offline', 'logoURL' => '', 'maxQueryResult' => '20', 'maxSearchQueryResult' => '5', 'defaultUser' => '');
     $userList = get_user_array();
     $userList[''] = '';
     require_once "modules/MySettings/TabController.php";
     $controller = new TabController();
     $disabledModulesFlag = false;
     $disabledModules = array_diff($controller->getAllPortalTabs(), $controller->getPortalTabs());
     if (!empty($disabledModules)) {
         $disabledModulesFlag = true;
         array_walk($disabledModules, function (&$item) {
             $item = translate($item);
         });
     }
     $admin = Administration::getSettings();
     $portalConfig = $admin->getConfigForModule('portal', 'support', true);
     $portalConfig['appStatus'] = !empty($portalConfig['on']) ? 'online' : 'offline';
     $smarty = new Sugar_Smarty();
     $smarty->assign('disabledDisplayModulesList', $disabledModules);
     $smarty->assign('disabledDisplayModules', $disabledModulesFlag);
     foreach ($portalFields as $fieldName => $fieldDefault) {
         if (isset($portalConfig[$fieldName])) {
             $smarty->assign($fieldName, html_entity_decode($portalConfig[$fieldName]));
         } else {
             $smarty->assign($fieldName, $fieldDefault);
         }
     }
     $smarty->assign('userList', $userList);
     $smarty->assign('welcome', $GLOBALS['mod_strings']['LBL_SYNCP_WELCOME']);
     $smarty->assign('mod', $GLOBALS['mod_strings']);
     $smarty->assign('siteURL', $GLOBALS['sugar_config']['site_url']);
     if (isset($_REQUEST['label'])) {
         $smarty->assign('label', $_REQUEST['label']);
     }
     $options = !empty($GLOBALS['system_config']->settings['system_portal_url']) ? $GLOBALS['system_config']->settings['system_portal_url'] : 'https://';
     $smarty->assign('options', $options);
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_SUGARPORTAL', 'ModuleBuilder'), 'ModuleBuilder.main("sugarportal")');
     $ajax->addCrumb(ucwords(translate('LBL_PORTAL_CONFIGURE')), '');
     $ajax->addSection('center', translate('LBL_SUGARPORTAL', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/portalconfig.tpl'));
     $GLOBALS['log']->debug($smarty->fetch('modules/ModuleBuilder/tpls/portalconfig.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:48,代码来源:view.portalconfig.php

示例15: display

 function display()
 {
     global $mod_strings;
     $smarty = new Sugar_Smarty();
     $mb = new ModuleBuilder();
     //if (!empty($_REQUEST['package'])) {
     if (empty($_REQUEST['package']) && empty($_REQUEST['new'])) {
         $this->generatePackageButtons($mb->getPackageList());
         $smarty->assign('buttons', $this->buttons);
         $smarty->assign('title', $GLOBALS['mod_strings']['LBL_MODULEBUILDER']);
         $smarty->assign("question", $GLOBALS['mod_strings']['LBL_QUESTION_PACKAGE']);
         $smarty->assign("defaultHelp", "mbHelp");
         $ajax = new AjaxCompose();
         $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")');
         $ajax->addCrumb($GLOBALS['mod_strings']['LBL_PACKAGE_LIST'], '');
         $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_PACKAGE_LIST'], $smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl'));
         echo $ajax->getJavascript();
     } else {
         $name = !empty($_REQUEST['package']) ? $_REQUEST['package'] : '';
         $mb->getPackage($name);
         $this->package =& $mb->packages[$name];
         $this->loadModuleTypes();
         $this->loadPackageHelp($name);
         $this->package->date_modified = $GLOBALS['timedate']->to_display_date_time($this->package->date_modified);
         $smarty->assign('package', $this->package);
         $smarty->assign('mod_strings', $mod_strings);
         $ajax = new AjaxCompose();
         $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package")');
         if (empty($name)) {
             $name = $mod_strings['LBL_NEW_PACKAGE'];
         }
         $ajax->addCrumb($name, '');
         $html = $smarty->fetch('modules/ModuleBuilder/tpls/MBPackage/package.tpl');
         if (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'SavePackage') {
             $html .= "<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
         }
         $ajax->addSection('center', translate('LBL_SECTION_PACKAGE', 'ModuleBuilder'), $html);
         echo $ajax->getJavascript();
     }
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:40,代码来源:view.package.php


注:本文中的AjaxCompose类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。