• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP SubPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: loadSubpanel

    function loadSubpanel($module_name, $child_module)
    {
        $this->parent_module = $module_name;
        $this->child_module = $child_module;
        global $beanList, $beanFiles;
        $class = $beanList[$module_name];
        require_once $beanFiles[$class];
        require_once 'include/SubPanel/SubPanelDefinitions.php';
        $mod = new $class();
        $spd = new SubPanelDefinitions($mod);
        $spd->open_layout_defs(true);
        $panel = $spd->load_subpanel($child_module, true);
        $this->panel = $panel;
        $subpanel = new SubPanel($module_name, 'fab4', $child_module, $panel);
        $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
        $oldcontents = ob_get_contents();
        ob_clean();
        $subpanel->display();
        $this->curText = ob_get_contents();
        ob_clean();
        echo $oldcontents;
        $this->subpanel = $subpanel;
        $this->form = <<<EOQ
\t\t</form>
\t\t<form name='studio' method='POST'>
\t\t\t<input type='hidden' name='action' value='saveSubpanel'>
\t\t\t<input type='hidden' name='module' value='Studio'>
\t\t\t<input type='hidden' name='subpanel' value='{$child_module}'>
EOQ;
    }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:30,代码来源:SubpanelParser.php


示例2: set_subpanel

 function set_subpanel($module_name, $child_module)
 {
     $this->parent_module = $module_name;
     $this->child_module = $child_module;
     global $beanList, $beanFiles;
     $class = $beanList[$module_name];
     require_once $beanFiles[$class];
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     $mod = new $class();
     $spd = new SubPanelDefinitions($mod);
     $spd->open_layout_defs(true);
     $panel = $spd->load_subpanel($child_module, true);
     $this->panel = $panel;
     $subpanel = new SubPanel($module_name, 'fab4', $child_module, $panel);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     ob_flush();
     ob_clean();
     $subpanel->display();
     $this->contents = ob_get_contents();
     ob_clean();
     $this->subpanel = $subpanel;
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:22,代码来源:SubPanelParser.php


示例3: testSubpanelOverride

 public function testSubpanelOverride()
 {
     // Create Subpanel 1
     $subpanel_1 = array('order' => 100, 'module' => 'Cases', 'subpanel_name' => 'default', 'sort_order' => 'asc', 'sort_by' => 'id', 'title_key' => 'LBL_CONTACTS_CASES_1_FROM_CASES_TITLE', 'get_subpanel_data' => 'contacts_cases_1', 'top_buttons' => array(0 => array('widget_class' => 'SubPanelTopButtonQuickCreate'), 1 => array('widget_class' => 'SubPanelTopSelectButton', 'mode' => 'MultiSelect')));
     $subpanel_list_fields_1['list_fields'] = array('priority' => array('type' => 'enum', 'vname' => 'LBL_PRIORITY', 'sortable' => false, 'width' => '10%', 'default' => true));
     $subpanel_def_1 = new aSubPanel("contacts_cases_1", $subpanel_1, $this->bean);
     $subpanel_1 = new SubPanel('Contacts', 'fab4', $subpanel_def_1->_instance_properties['subpanel_name'], $subpanel_def_1);
     $subpanel_1->saveSubPanelDefOverride($subpanel_def_1, 'list_fields', $subpanel_list_fields_1);
     $path_1 = 'custom/modules/' . $subpanel_def_1->_instance_properties['module'] . '/metadata/subpanels';
     $filename_1 = $subpanel_def_1->parent_bean->object_name . "_subpanel_" . $subpanel_def_1->name;
     $extname_1 = '_override' . $subpanel_def_1->parent_bean->object_name . "_subpanel_" . $subpanel_def_1->name;
     // Create SubPane 2
     $subpanel_2 = array('order' => 100, 'module' => 'Cases', 'subpanel_name' => 'default', 'sort_order' => 'asc', 'sort_by' => 'id', 'title_key' => 'LBL_CONTACTS_CASES_2_FROM_CASES_TITLE', 'get_subpanel_data' => 'contacts_cases_2', 'top_buttons' => array(0 => array('widget_class' => 'SubPanelTopButtonQuickCreate'), 1 => array('widget_class' => 'SubPanelTopSelectButton', 'mode' => 'MultiSelect')));
     $subpanel_list_fields_2 = array('case_number' => array('vname' => 'LBL_LIST_NUMBER', 'width' => '6%', 'default' => true));
     $subpanel_def_2 = new aSubPanel("contacts_cases_2", $subpanel_2, $this->bean);
     $subpanel_2 = new SubPanel('Contacts', 'fab4', $subpanel_def_2->_instance_properties['subpanel_name'], $subpanel_def_2);
     $subpanel_2->saveSubPanelDefOverride($subpanel_def_2, 'list_fields', $subpanel_list_fields_2);
     $path_2 = 'custom/modules/' . $subpanel_def_2->_instance_properties['module'] . '/metadata/subpanels';
     $filename_2 = $subpanel_def_1->parent_bean->object_name . "_subpanel_" . $subpanel_def_2->name;
     $extname_2 = '_override' . $subpanel_def_1->parent_bean->object_name . "_subpanel_" . $subpanel_def_2->name;
     // Check files genertaed by subpanel overriding : layout override and subpanel overire
     $this->filename_check[] = 'custom/Extension/modules/' . $subpanel_def_1->parent_bean->module_dir . "/Ext/Layoutdefs/{$extname_1}.php";
     $this->assertTrue(file_exists(end($this->filename_check)));
     $this->filename_check[] = $path_1 . '/' . $filename_1 . '.php';
     $this->assertTrue(file_exists(end($this->filename_check)));
     $this->filename_check[] = 'custom/Extension/modules/' . $subpanel_def_2->parent_bean->module_dir . "/Ext/Layoutdefs/{$extname_2}.php";
     $this->assertTrue(file_exists(end($this->filename_check)));
     $this->filename_check[] = $path_2 . '/' . $filename_2 . '.php';
     $this->assertTrue(file_exists(end($this->filename_check)));
     // laout_defs are reloaded in saveSubPanelDefOverride method, we lauched it
     global $layout_defs;
     // Check override_subpanel_name are differents
     $this->assertTrue(isset($layout_defs['Contacts']['subpanel_setup']['contacts_cases_1']['override_subpanel_name']));
     $this->assertTrue(isset($layout_defs['Contacts']['subpanel_setup']['contacts_cases_2']['override_subpanel_name']));
     $this->assertNotEquals($layout_defs['Contacts']['subpanel_setup']['contacts_cases_1']['override_subpanel_name'], $layout_defs['Contacts']['subpanel_setup']['contacts_cases_2']['override_subpanel_name']);
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:36,代码来源:Bug40171Test.php


示例4: deploy

 function deploy($defs)
 {
     // first sort out the historical record...
     write_array_to_file(self::HISTORYVARIABLENAME, $this->_viewdefs, $this->historyPathname, 'w', '');
     $this->_history->append($this->historyPathname);
     $this->_viewdefs = $defs;
     require_once 'include/SubPanel/SubPanel.php';
     $subpanel = new SubPanel($this->_moduleName, 'fab4', $this->_subpanelName, $this->_aSubPanelObject);
     $subpanel->saveSubPanelDefOverride($this->_aSubPanelObject, 'list_fields', $defs);
     // now clear the cache so that the results are immediately visible
     MetaDataFiles::clearModuleClientCache($this->_aSubPanelObject->template_instance->module_name, 'view');
     MetaDataFiles::clearModuleClientCache($this->_moduleName, 'layout');
     include_once 'include/TemplateHandler/TemplateHandler.php';
     TemplateHandler::clearCache($this->_moduleName);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:DeployedSubpanelImplementation.php


示例5: getSubpanels

 /**
  * Gets a list of subpanels used by the current module
  */
 function getSubpanels()
 {
     if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) {
         $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']);
     }
     require_once 'include/SubPanel/SubPanel.php';
     $nodes = array();
     $GLOBALS['log']->debug("StudioModule->getSubpanels(): getting subpanels for " . $this->module);
     // counter to add a unique key to assoc array below
     $ct = 0;
     foreach (SubPanel::getModuleSubpanels($this->module) as $name => $label) {
         if ($name == 'users') {
             continue;
         }
         $subname = sugar_ucfirst(!empty($label) ? translate($label, $this->module) : $name);
         $action = "module=ModuleBuilder&action=editLayout&view=ListView&view_module={$this->module}&subpanel={$name}&subpanelLabel=" . urlencode($subname);
         //  bug47452 - adding a unique number to the $nodes[ key ] so if you have 2+ panels
         //  with the same subname they will not cancel each other out
         $nodes[$subname . $ct++] = array('name' => $name, 'label' => $subname, 'action' => $action, 'imageTitle' => $subname, 'imageName' => 'icon_' . ucfirst($name) . '_32', 'altImageName' => 'Subpanels', 'size' => '48');
     }
     return $nodes;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:25,代码来源:StudioModule.php


示例6: getSubpanels

 /**
  * Gets a list of subpanels used by the current module
  */
 function getSubpanels()
 {
     if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) {
         $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']);
     }
     require_once 'include/SubPanel/SubPanel.php';
     $nodes = array();
     $GLOBALS['log']->debug("StudioModule->getSubpanels(): getting subpanels for " . $this->module);
     foreach (SubPanel::getModuleSubpanels($this->module) as $name => $label) {
         if ($name == 'users') {
             continue;
         }
         $subname = sugar_ucfirst(!empty($label) ? translate($label, $this->module) : $name);
         $nodes[$subname] = array('name' => $name, 'label' => $subname, 'action' => "module=ModuleBuilder&action=editLayout&view=ListView&view_module={$this->module}&subpanel={$name}&subpanelLabel={$subname}", 'imageTitle' => $subname, 'imageName' => 'icon_' . ucfirst($name) . '_32', 'altImageName' => 'Subpanels', 'size' => '48');
     }
     return $nodes;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:20,代码来源:StudioModule.php


示例7: testOneToManyRelationshipModule2Modult

 /**
  * @group 53223
  */
 public function testOneToManyRelationshipModule2Modult()
 {
     $_REQUEST['relate_id'] = $this->parentAccount->id;
     $_REQUEST['relate_to'] = $this->relationship->getName();
     // create new account
     $objAccount = new Account();
     $objAccount->name = "AccountBug53223" . $_REQUEST['relate_to'] . time();
     $objAccount->save();
     SugarTestAccountUtilities::setCreatedAccount(array($objAccount->id));
     // Retrieve new data
     $this->parentAccount->retrieve($this->parentAccount->id);
     $objAccount->retrieve($objAccount->id);
     $this->parentAccount->load_relationship($this->relationship->getName());
     $objAccount->load_relationship($this->relationship->getName());
     // Getting data of subpanel of parent bean
     $_REQUEST['module'] = 'Accounts';
     $_REQUEST['action'] = 'DetailView';
     $_REQUEST['record'] = $this->parentAccount->id;
     $_SERVER['REQUEST_METHOD'] = 'GET';
     unset($GLOBALS['focus']);
     $subpanels = new SubPanelDefinitions($this->parentAccount, 'Accounts');
     $subpanelDef = $subpanels->load_subpanel($this->relationship->getName() . 'accounts_ida');
     $subpanel = new SubPanel('Accounts', $this->parentAccount->id, 'default', $subpanelDef);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     $subpanel->display();
     $actual = $this->getActualOutput();
     $this->assertContains($objAccount->name, $actual, 'Account name is not displayed in subpanel of parent account');
     ob_clean();
     // Getting data of subpanel of child bean
     $_REQUEST['module'] = 'Accounts';
     $_REQUEST['action'] = 'DetailView';
     $_REQUEST['record'] = $objAccount->id;
     $_SERVER['REQUEST_METHOD'] = 'GET';
     unset($GLOBALS['focus']);
     $subpanels = new SubPanelDefinitions($objAccount, 'Accounts');
     $subpanelDef = $subpanels->load_subpanel($this->relationship->getName() . 'accounts_ida');
     $subpanel = new SubPanel('Accounts', $objAccount->id, 'default', $subpanelDef);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     $subpanel->display();
     $actual = $this->getActualOutput();
     $this->assertNotContains($this->parentAccount->name, $actual, 'Parent account name is displayed in subpanel of child aaccount');
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:45,代码来源:Bug53223Test.php


示例8: insert_popup_header

}
$subpanel = $_REQUEST['subpanel'];
$record = $_REQUEST['record'];
$module = $_REQUEST['module'];
$image_path = 'themes/' . $theme . '/images/';
if (empty($_REQUEST['inline'])) {
    insert_popup_header($theme);
}
//require_once('include/SubPanel/SubPanelDefinitions.php');
//require_once($beanFiles[$beanList[$_REQUEST['module']]]);
//$focus=new $beanList[$_REQUEST['module']];
//$focus->retrieve($record);
include 'include/SubPanel/SubPanel.php';
$layout_def_key = '';
if (!empty($_REQUEST['layout_def_key'])) {
    $layout_def_key = $_REQUEST['layout_def_key'];
}
$subpanel_object = new SubPanel($module, $record, $subpanel, null, $layout_def_key);
$subpanel_object->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
if (!empty($_REQUEST['mkt_id']) && $_REQUEST['mkt_id'] != 'all') {
    // bug 32910
    $mkt_id = $_REQUEST['mkt_id'];
}
if (!empty($mkt_id)) {
    $subpanel_object->subpanel_defs->_instance_properties['function_parameters']['EMAIL_MARKETING_ID_VALUE'] = $mkt_id;
}
echo empty($_REQUEST['inline']) ? $subpanel_object->get_buttons() : '';
$subpanel_object->display();
if (empty($_REQUEST['inline'])) {
    insert_popup_footer($theme);
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:31,代码来源:SubPanelViewer.php


示例9: foreach

require_once 'include/SubPanel/SubPanel.php';
require_once 'modules/Studio/parsers/StudioParser.php';
$moduleFiles = StudioParser::getFiles($the_module);
echo '<table width="100%" class="tabForm" cellpadding="0" cellspacing="0"><tr><td align="right"><b>Layouts:</b></td><td class="dataLabel" align="left">';
$count = 0;
foreach ($moduleFiles as $id => $attr) {
    $label = translate($id, $the_module);
    if ($count > 0) {
        echo '&nbsp;|&nbsp;';
    }
    echo " <a href='index.php?module=Studio&action=wizard&wizard=SelectModuleLayout&option={$id}' class='tabFormAdvLink'>{$label}</a>&nbsp;";
    $count++;
}
echo '</td></tr>';
echo '<tr><td align="right"><b>Subpanels:</b></td><td align="left">';
$layout_def = SubPanel::getModuleSubpanels($the_module);
$count = 0;
foreach ($layout_def as $key => $sub) {
    if ($sub == 'users') {
        unset($layout_def[$key]);
    }
}
$totalCount = count($layout_def);
foreach ($layout_def as $sub) {
    if ($count > 0) {
        echo '&nbsp;|&nbsp;';
    }
    $subname = !empty($GLOBALS['layout_defs'][$the_module]['subpanel_setup'][$sub]['title_key']) ? translate($GLOBALS['layout_defs'][$the_module]['subpanel_setup'][$sub]['title_key'], $the_module) : $sub;
    echo "&nbsp;<a href='index.php?module=Studio&action=index&subpanel={$sub}' class='tabFormAdvLink'>{$subname}</a> ";
    $count++;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:relatedfiles.php


示例10: constructSmarty

 function constructSmarty($parser)
 {
     global $mod_strings;
     $smarty = new Sugar_Smarty();
     $smarty->assign('translate', true);
     $smarty->assign('language', $parser->getLanguage());
     $smarty->assign('view', $this->editLayout);
     $smarty->assign('module', "ModuleBuilder");
     $smarty->assign('field_defs', $parser->getFieldDefs());
     $smarty->assign('action', 'listViewSave');
     $smarty->assign('view_module', $this->editModule);
     if (!empty($this->subpanel)) {
         $smarty->assign('subpanel', $this->subpanel);
         $smarty->assign('subpanelLabel', $this->subpanelLabel);
         if (!$this->fromModuleBuilder) {
             $subList = SubPanel::getModuleSubpanels($this->editModule);
             $subRef = $subList[strtolower($this->subpanel)];
             $subTitleKey = !empty($subRef) ? $subRef : "LBL_" . strtoupper($this->subpanel) . "_SUBPANEL_TITLE";
             $subTitle = !empty($subRef) ? translate($subTitleKey, $this->editModule) : UCfirst($this->subpanel);
             $smarty->assign('subpanel_label', $subTitleKey);
             $smarty->assign('subpanel_title', $subTitle);
         }
     }
     $helpName = $this->subpanel ? 'subPanelEditor' : 'listViewEditor';
     $smarty->assign('helpName', $helpName);
     $smarty->assign('helpDefault', 'modify');
     $smarty->assign('title', $this->_constructTitle());
     $groups = array();
     foreach ($parser->columns as $column => $function) {
         // update this so that each field has a properties set
         // properties are name, value, title (optional)
         $groups[$GLOBALS['mod_strings'][$column]] = $parser->{$function}();
         // call the parser functions to populate the list view columns, by default 'default', 'available' and 'hidden'
     }
     foreach ($groups as $groupKey => $group) {
         foreach ($group as $fieldKey => $field) {
             if (isset($field['width'])) {
                 if (substr($field['width'], -1, 1) == '%') {
                     $groups[$groupKey][$fieldKey]['width'] = substr($field['width'], 0, strlen($field['width']) - 1);
                 }
             }
         }
     }
     $smarty->assign('groups', $groups);
     $smarty->assign('from_mb', $this->fromModuleBuilder);
     global $image_path;
     $imageSave = SugarThemeRegistry::current()->getImage('studio_save', '', null, null, '.gif', $mod_strings['LBL_BTN_SAVE']);
     //        $imageHelp = SugarThemeRegistry::current()->getImage('help') ;
     $history = $parser->getHistory();
     $histaction = "ModuleBuilder.history.browse(\"{$this->editModule}\", \"{$this->editLayout}\")";
     if ($this->subpanel) {
         $histaction = "ModuleBuilder.history.browse(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$this->subpanel}\")";
     }
     $restoreAction = "onclick='ModuleBuilder.history.revert(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$history->getLast()}\", \"\")'";
     if ($this->subpanel) {
         $restoreAction = "onclick='ModuleBuilder.history.revert(\"{$this->editModule}\", \"{$this->editLayout}\", \"{$history->getLast()}\", \"{$this->subpanel}\")'";
     }
     $buttons = array();
     $buttons[] = array('id' => 'savebtn', 'name' => 'savebtn', 'image' => $imageSave, 'text' => !$this->fromModuleBuilder ? $GLOBALS['mod_strings']['LBL_BTN_SAVEPUBLISH'] : $GLOBALS['mod_strings']['LBL_BTN_SAVE'], 'actionScript' => "onclick='studiotabs.generateGroupForm(\"edittabs\");if (countListFields()==0) ModuleBuilder.layoutValidation.popup() ; else ModuleBuilder.handleSave(\"edittabs\" )'");
     $buttons[] = array('id' => 'spacer', 'width' => '50px');
     $buttons[] = array('id' => 'historyBtn', 'name' => 'historyBtn', 'text' => translate('LBL_HISTORY'), 'actionScript' => "onclick='{$histaction}'");
     $buttons[] = array('id' => 'historyDefault', 'name' => 'historyDefault', 'text' => translate('LBL_RESTORE_DEFAULT'), 'actionScript' => $restoreAction);
     $smarty->assign('buttons', $this->_buildImageButtons($buttons));
     $editImage = SugarThemeRegistry::current()->getImage('edit_inline', '', null, null, '.gif', $mod_strings['LBL_EDIT']);
     $smarty->assign('editImage', $editImage);
     $deleteImage = SugarThemeRegistry::current()->getImage('delete_inline', '', null, null, '.gif', $mod_strings['LBL_MB_DELETE']);
     $smarty->assign('deleteImage', $deleteImage);
     $smarty->assign('MOD', $GLOBALS['mod_strings']);
     if ($this->fromModuleBuilder) {
         $smarty->assign('MB', true);
         $smarty->assign('view_package', $_REQUEST['view_package']);
         $mb = new ModuleBuilder();
         $module =& $mb->getPackageModule($_REQUEST['view_package'], $this->editModule);
         $smarty->assign('current_mod_strings', $module->getModStrings());
         if ($this->subpanel) {
             if (isset($_REQUEST['local'])) {
                 $smarty->assign('local', '1');
             }
             $smarty->assign("subpanel", $this->subpanel);
         } else {
             $smarty->assign('description', $GLOBALS['mod_strings']['LBL_LISTVIEW_DESCRIPTION']);
         }
     } else {
         if ($this->subpanel) {
             $smarty->assign("subpanel", "{$this->subpanel}");
         } else {
             $smarty->assign('description', $GLOBALS['mod_strings']['LBL_LISTVIEW_DESCRIPTION']);
         }
     }
     return $smarty;
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:91,代码来源:view.listview.php


示例11: get_list_view_data

 function get_list_view_data()
 {
     global $app_strings;
     global $mod_strings;
     $field_list = $this->get_list_view_array();
     $bean = BeanFactory::getBean('xeBayOrders');
     $bean->retrieve($field_list['ID']);
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     $subpanel_definitions = new SubPanelDefinitions($bean);
     $subpanel_definitions->layout_defs['subpanel_setup']['xebaytransactions']['subpanel_name'] = "ForOrderSimple";
     $thisPanel = $subpanel_definitions->load_subpanel("xebaytransactions");
     ob_start();
     include_once 'include/SubPanel/SubPanel.php';
     $subpanel_object = new SubPanel('xeBayOrders', $field_list['ID'], 'all', $thisPanel);
     $subpanel_object->setTemplateFile('modules/xeBayTransactions/SubPanelDynamic.html');
     $subpanel_object->display();
     $subpanel_data = ob_get_contents();
     @ob_end_clean();
     $order_details .= '<p style="margin: 8px 0px 8px 0px;">';
     $order_details .= $field_list['BUYER_USER_ID'];
     $order_details .= '</p>';
     $order_details .= $subpanel_data;
     $field_list['ORDER_DETAILS'] = $order_details;
     if (!empty($field_list['BUYER_CHECKOUT_MESSAGE'])) {
         $message = "<img alt='{$mod_strings['LBL_MESSAGE']}' style='padding: 0px 5px 0px 2px' border='0' onclick=\"SUGAR.util.getStaticAdditionalDetails(this,'";
         $message .= str_replace(array("&#039;"), array("\\'"), $field_list['BUYER_CHECKOUT_MESSAGE']);
         // $message .= $field_list['BUYER_CHECKOUT_MESSAGE'];
         $message .= "','<div style=\\'float:left\\'>{$mod_strings['LBL_MESSAGE']}</div><div style=\\'float: right\\'>";
         $closeVal = "false";
         $message .= "'," . $closeVal . ")\" src='" . SugarThemeRegistry::current()->getImageURL('AlertEmailTemplates.gif') . "' class='info'>";
         $field_list['BUYER_CHECKOUT_MESSAGE'] = $message;
     }
     if ($field_list['PRINT_STATUS']) {
         $field_list['PRINT_STATUS_ICON'] = "<img alt='Print status' border='0' src='" . SugarThemeRegistry::current()->getImageURL('Print_Email.gif') . "'>";
     }
     return $field_list;
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:37,代码来源:xeBayOrder.php


示例12: get_subpanel_value

\treturn true;
}
</script>
<form method='post' action='index.php'  onsubmit="return get_subpanel_value()">
<input type='hidden' name='action' value='index'>
<input type='hidden' name='module' value='DynamicLayout'>
<input type='hidden' name='edit_subpanel_MSI' value='1'>
<input type='hidden' name='subpanel' id='subpanel' value = ''>
<select id= 'select_subpanel_module' name='select_subpanel_module' onChange='swap_subpanels()'>

EOQ;
echo get_select_options_with_id($subpanelmodules, '');
echo '</select>';
foreach ($subpanelmodules as $mod) {
    echo "<div style='display:none' id='{$mod}'><select id='{$mod}subpanel' name='{$mod}subpanel'>";
    $layout_def = SubPanel::getModuleSubpanels($mod);
    foreach ($layout_def as $sub) {
        echo "<option value='{$sub}'>{$sub}</option>";
    }
    echo '</select></div>';
}
echo '<input type="submit" class="button" name="Submit" value="' . $mod_strings['LBL_SELECT_SUBPANEL'] . '"  ></form>';
echo <<<EOQ
<form name='edit' method='post' action='index.php'>
<input type='hidden' name='action' value='index'>
<input type='hidden' name='module' value='DynamicLayout'>

</form>
EOQ;
echo '<script>swap_subpanels();</script><BR><BR>';
// How To Use Layout Text Block Instructions
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:SelectFile.php


示例13: display

 function display($showContainer = true, $forceTabless = false)
 {
     global $layout_edit_mode, $sugar_version, $sugar_config, $current_user, $app_strings, $modListHeader;
     if (isset($layout_edit_mode) && $layout_edit_mode) {
         return;
     }
     $template = new Sugar_Smarty();
     $template_header = "";
     $template_body = "";
     $template_footer = "";
     $tabs = array();
     $tabs_properties = array();
     $tab_names = array();
     $default_div_display = 'inline';
     if (!empty($sugar_config['hide_subpanels_on_login'])) {
         if (!isset($_SESSION['visited_details'][$this->focus->module_dir])) {
             setcookie($this->focus->module_dir . '_divs', '', 0, null, null, false, true);
             unset($_COOKIE[$this->focus->module_dir . '_divs']);
             $_SESSION['visited_details'][$this->focus->module_dir] = true;
         }
         $default_div_display = 'none';
     }
     $div_cookies = get_sub_cookies($this->focus->module_dir . '_divs');
     if (empty($_REQUEST['subpanels'])) {
         $selected_group = $forceTabless ? '' : $this->getSelectedGroup();
         $usersLayout = $current_user->getPreference('subpanelLayout', $this->focus->module_dir);
         // we need to use some intelligence here when restoring the user's layout, as new modules with new subpanels might have been installed since the user's layout was recorded
         // this means that we can't just restore the old layout verbatim as the new subpanels would then go walkabout
         // so we need to do a merge while attempting as best we can to preserve the sense of the specified order
         // this is complicated by the different ordering schemes used in the two sources for the panels: the user's layout uses an ordinal layout, the panels from getTabs have an explicit ordering driven by the 'order' parameter
         // it's not clear how to best reconcile these two schemes; so we punt on it, and add all new panels to the end of the user's layout. At least this will give them a clue that something has changed...
         // we also now check for tabs that have been removed since the user saved his or her preferences.
         $tabs = $this->getTabs($showContainer, $selected_group);
         if (!empty($usersLayout)) {
             $availableTabs = $tabs;
             $tabs = array_intersect($usersLayout, $availableTabs);
             // remove any tabs that have been removed since the user's layout was saved
             foreach (array_diff($availableTabs, $usersLayout) as $tab) {
                 $tabs[] = $tab;
             }
         }
     } else {
         $tabs = explode(',', $_REQUEST['subpanels']);
     }
     // Display the group header. this section is executed only if the tabbed interface is being used.
     $current_key = '';
     if (!empty($this->show_tabs)) {
         require_once 'include/tabs.php';
         $tab_panel = new SugarWidgetTabs($tabs, $current_key, 'showSubPanel');
         $template_header .= get_form_header('Related', '', false);
         $template_header .= $tab_panel->display();
     }
     if (empty($GLOBALS['relationships'])) {
         if (!class_exists('Relationship')) {
             require 'modules/Relationships/Relationship.php';
         }
         $rel = new Relationship();
         $rel->load_relationship_meta();
     }
     foreach ($tabs as $t => $tab) {
         // load meta definition of the sub-panel.
         $thisPanel = $this->subpanel_definitions->load_subpanel($tab);
         if ($thisPanel === false) {
             continue;
         }
         // this if-block will try to skip over ophaned subpanels. Studio/MB are being delete unloaded modules completely.
         // this check will ignore subpanels that are collections (activities, history, etc)
         if (!isset($thisPanel->_instance_properties['collection_list']) and isset($thisPanel->_instance_properties['get_subpanel_data'])) {
             // ignore when data source is a function
             if (!isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']])) {
                 if (stripos($thisPanel->_instance_properties['get_subpanel_data'], 'function:') === false) {
                     $GLOBALS['log']->fatal("Bad subpanel definition, it has incorrect value for get_subpanel_data property " . $tab);
                     continue;
                 }
             } else {
                 $rel_name = '';
                 if (isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']]['relationship'])) {
                     $rel_name = $this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']]['relationship'];
                 }
                 if (empty($rel_name) or !isset($GLOBALS['relationships'][$rel_name])) {
                     $GLOBALS['log']->fatal("Missing relationship definition " . $rel_name . ". skipping " . $tab . " subpanel");
                     continue;
                 }
             }
         }
         if ($thisPanel->isCollection()) {
             // collect names of sub-panels that may contain items of each module
             $collection_list = $thisPanel->get_inst_prop_value('collection_list');
             if (is_array($collection_list)) {
                 foreach ($collection_list as $data) {
                     if (!empty($data['module'])) {
                         $module_sub_panels[$data['module']][$tab] = true;
                     }
                 }
             }
         } else {
             $module = $thisPanel->get_module_name();
             if (!empty($module)) {
                 $module_sub_panels[$module][$tab] = true;
             }
//.........这里部分代码省略.........
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:101,代码来源:SubPanelTiles.php


示例14: getSubPanelDefine

 /**
  * Retrieve the subpanel definition from the registered layout_defs arrays.
  */
 function getSubPanelDefine($module, $subpanel_id)
 {
     $default_subpanel_define = SubPanel::_get_default_subpanel_define($module, $subpanel_id);
     $custom_subpanel_define = SubPanel::_get_custom_subpanel_define($module, $subpanel_id);
     $subpanel_define = array_merge($default_subpanel_define, $custom_subpanel_define);
     if (empty($subpanel_define)) {
         print 'Could not load subpanel definition for: ' . $subpanel_id;
     }
     return $subpanel_define;
 }
开发者ID:recci,项目名称:SuiteCRM,代码行数:13,代码来源:SubPanel.php


示例15: display

 function display()
 {
     global $locale;
     $editModule = $_REQUEST['view_module'];
     $allLabels = !empty($_REQUEST['labels']) && $_REQUEST['labels'] == 'all';
     if (!isset($_REQUEST['MB'])) {
         global $app_list_strings;
         $moduleNames = array_change_key_case($app_list_strings['moduleList']);
         $translatedEditModule = $moduleNames[strtolower($editModule)];
     }
     $selected_lang = null;
     if (!empty($_REQUEST['selected_lang'])) {
         $selected_lang = $_REQUEST['selected_lang'];
     } else {
         $selected_lang = $locale->getAuthenticatedUserLanguage();
     }
     $smarty = new Sugar_Smarty();
     global $mod_strings;
     $smarty->assign('mod_strings', $mod_strings);
     $smarty->assign('available_languages', get_languages());
     $objectName = BeanFactory::getObjectName($editModule);
     VardefManager::loadVardef($editModule, $objectName);
     global $dictionary;
     $vnames = array();
     //jchi 24557 . We should list all the lables in viewdefs(list,detail,edit,quickcreate) that the user can edit them.
     $parser = ParserFactory::getParser(MB_LISTVIEW, $editModule);
     foreach ($parser->getLayout() as $key => $def) {
         if (isset($def['label'])) {
             $vnames[$def['label']] = $def['label'];
         }
     }
     require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php';
     $variableMap = $this->getVariableMap($editModule);
     foreach ($variableMap as $key => $value) {
         $gridLayoutMetaDataParserTemp = ParserFactory::getParser($key, $editModule);
         foreach ($gridLayoutMetaDataParserTemp->getLayout() as $panel) {
             foreach ($panel as $row) {
                 foreach ($row as $fieldArray) {
                     // fieldArray is an array('name'=>name,'label'=>label)
                     if (isset($fieldArray['label'])) {
                         $vnames[$fieldArray['label']] = $fieldArray['label'];
                     }
                 }
             }
         }
     }
     //end
     //Get Subpanel Labels:
     require_once 'include/SubPanel/SubPanel.php';
     $subList = SubPanel::getModuleSubpanels($editModule);
     foreach ($subList as $subpanel => $titleLabel) {
         $vnames[$titleLabel] = $titleLabel;
     }
     foreach ($dictionary[$objectName]['fields'] as $name => $def) {
         if (isset($def['vname'])) {
             $vnames[$def['vname']] = $def['vname'];
         }
     }
     $formatted_mod_strings = array();
     // we shouldn't set the $refresh=true here, or will lost template language
     // mod_strings.
     // return_module_language($selected_lang, $editModule,false) :
     // the mod_strings will be included from cache files here.
     foreach (return_module_language($selected_lang, $editModule, false) as $name => $label) {
         //#25294
         if ($allLabels || isset($vnames[$name]) || preg_match('/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si', $name)) {
             // Bug 58174 - Escaped labels are sent to the client escaped
             // even in the label editor in studio
             $formatted_mod_strings[$name] = html_entity_decode($label, null, 'UTF-8');
         }
     }
     //Grab everything from the custom files
     $mod_bak = $mod_strings;
     $files = array("custom/modules/{$editModule}/language/{$selected_lang}.lang.php", "custom/modules/{$editModule}/Ext/Language/{$selected_lang}.lang.ext.php");
     foreach ($files as $langfile) {
         $mod_strings = array();
         if (is_file($langfile)) {
             include $langfile;
             foreach ($mod_strings as $key => $label) {
                 // Bug 58174 - Escaped labels are sent to the client escaped
                 // even in the label editor in studio
                 $formatted_mod_strings[$key] = html_entity_decode($label, null, 'UTF-8');
             }
         }
     }
     $mod_strings = $mod_bak;
     ksort($formatted_mod_strings);
     $smarty->assign('MOD', $formatted_mod_strings);
     $smarty->assign('view_module', $editModule);
     $smarty->assign('APP', $GLOBALS['app_strings']);
     $smarty->assign('selected_lang', $selected_lang);
     $smarty->assign('defaultHelp', 'labelsBtn');
     $smarty->assign('assistant', array('key' => 'labels', 'group' => 'module'));
     $smarty->assign('labels_choice', $mod_strings['labelTypes']);
     $smarty->assign('labels_current', $allLabels ? "all" : "");
     $ajax = new AjaxCompose();
     $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
     $ajax->addCrumb($translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $editModule . '")');
     $ajax->addCrumb($mod_strings['LBL_LABELS'], '');
     $html = $smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl');
//.........这里部分代码省略.........
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:101,代码来源:view.labels.php


示例16: display

    function display($showContainer = true, $forceTabless = false)
    {
        global $layout_edit_mode, $sugar_version, $sugar_config, $current_user, $app_strings;
        if (isset($layout_edit_mode) && $layout_edit_mode) {
            return;
        }
        global $modListHeader;
        ob_start();
        echo '<script type="text/javascript" src="' . getJSPath('include/SubPanel/SubPanelTiles.js') . '"></script>';
        ?>
<script>
if(document.DetailView != null &&
   document.DetailView.elements != null &&
   document.DetailView.elements.layout_def_key != null &&
   typeof document.DetailView.elements['layout_def_key'] != 'undefined'){
    document.DetailView.elements['layout_def_key'].value = '<?php 
        echo $this->layout_def_key;
        ?>
';
}
</script>
<?php 
        $tabs = array();
        $default_div_display = 'inline';
        if (!empty($sugar_config['hide_subpanels_on_login'])) {
            if (!isset($_SESSION['visited_details'][$this->focus->module_dir])) {
                setcookie($this->focus->module_dir . '_divs', '');
                unset($_COOKIE[$this->focus->module_dir . '_divs']);
                $_SESSION['visited_details'][$this->focus->module_dir] = true;
            }
            $default_div_display = 'none';
        }
        $div_cookies = get_sub_cookies($this->focus->module_dir . '_divs');
        //Display the group header. this section is executed only if the tabbed interface is being used.
        $current_key = '';
        if (!empty($this->show_tabs)) {
            require_once 'include/tabs.php';
            $tab_panel = new SugarWidgetTabs($tabs, $current_key, 'showSubPanel');
            echo get_form_header('Related', '', false);
            echo "<br />" . $tab_panel->display();
        }
        if (empty($_REQUEST['subpanels'])) {
            $selected_group = $forceTabless ? '' : $this->getSelectedGroup();
            $usersLayout = $current_user->getPreference('subpanelLayout', $this->focus->module_dir);
            // we need to use some intelligence here when restoring the user's layout, as new modules with new subpanels might have been installed since the user's layout was recorded
            // this means that we can't just restore the old layout verbatim as the new subpanels would then go walkabout
            // so we need to do a merge while attempting as best we can to preserve the sense of the specified order
            // this is complicated by the different ordering schemes used in the two sources for the panels: the user's layout uses an ordinal layout, the panels from getTabs have an explicit ordering driven by the 'order' parameter
            // it's not clear how to best reconcile these two schemes; so we punt on it, and add all new panels to the end of the user's layout. At least this will give them a clue that something has changed...
            // we also now check for tabs that have been removed since the user saved his or her preferences.
            $tabs = $this->getTabs($showContainer, $selected_group);
            if (!empty($usersLayout)) {
                $availableTabs = $tabs;
                $tabs = array_intersect($usersLayout, $availableTabs);
                // remove any tabs that have been removed since the user's layout was saved
                foreach (array_diff($availableTabs, $usersLayout) as $tab) {
                    $tabs[] = $tab;
                }
            }
        } else {
            $tabs = explode(',', $_REQUEST['subpanels']);
        }
        $tab_names = array();
        if ($showContainer) {
            echo '<ul class="noBullet" id="subpanel_list">';
        }
        //echo "<li id='hidden_0' style='height: 5px' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>";
        if (empty($GLOBALS['relationships'])) {
            if (!class_exists('Relationship')) {
                require 'modules/Relationships/Relationship.php';
            }
            $rel = new Relationship();
            $rel->load_relationship_meta();
        }
        // this array will store names of sub-panels that can contain items
        // of each module
        $module_sub_panels = array();
        foreach ($tabs as $tab) {
            //load meta definition of the sub-panel.
            $thisPanel = $this->subpanel_definitions->load_subpanel($tab);
            if ($thisPanel === false) {
                continue;
            }
            //this if-block will try to skip over ophaned subpanels. Studio/MB are being delete unloaded modules completely.
            //this check will ignore subpanels that are collections (activities, history, etc)
            if (!isset($thisPanel->_instance_properties['collection_list']) and isset($thisPanel->_instance_properties['get_subpanel_data'])) {
                //ignore when data source is a function
                if (!isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']])) {
                    if (stripos($thisPanel->_instance_properties['get_subpanel_data'], 'function:') === false) {
                        Log::fatal("Bad subpanel definition, it has incorrect value for get_subpanel_data property " . $tab);
                        continue;
                    }
                } else {
                    $rel_name = '';
                    if (isset($this->focus->field_defs[$thisPanel->_instance_properties['get_subpanel_data']]['relationship'])) {
                        $rel_name = $this->focus->field_defs[$thisPanel->_instance_prop 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP SubPanelTiles类代码示例发布时间:2022-05-23
下一篇:
PHP Su_Data类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap