本文整理匯總了PHP中CAdminTabControl::ShowTabButtons方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAdminTabControl::ShowTabButtons方法的具體用法?PHP CAdminTabControl::ShowTabButtons怎麽用?PHP CAdminTabControl::ShowTabButtons使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAdminTabControl
的用法示例。
在下文中一共展示了CAdminTabControl::ShowTabButtons方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ShowTabButtons
function ShowTabButtons()
{
/** @global CMain $APPLICATION */
global $APPLICATION;
$s = '';
if (!$this->bPublicMode)
{
if ($this->bShowSettings)
{
$link = DeleteParam(array("mode"));
$link = $APPLICATION->GetCurPage()."?mode=settings".($link <> ""? "&".$link:"");
$aAdditionalMenu = array();
$aAdditionalMenu[] = array(
"TEXT"=>GetMessage("admin_lib_menu_settings"),
"TITLE"=>GetMessage("admin_lib_context_sett_title"),
"ONCLICK"=>$this->name.".ShowSettings('".htmlspecialcharsex(CUtil::JSEscape($link))."')",
"GLOBAL_ICON"=>"adm-menu-setting"
);
if($this->bCustomFields)
{
if(is_array($_SESSION["ADMIN_CUSTOM_FIELDS"]) && array_key_exists($this->name, $_SESSION["ADMIN_CUSTOM_FIELDS"]))
{
$aAdditionalMenu[] = array(
"TEXT" => GetMessage("admin_lib_sett_sett_enable_text"),
"TITLE" => GetMessage("admin_lib_sett_sett_enable"),
"ONCLICK" => $this->name.'.EnableSettings();',
"ICON" => 'custom-fields-on',
);
}
else
{
$aAdditionalMenu[] = array(
"TEXT" => GetMessage("admin_lib_sett_sett_disable_text"),
"TITLE" => GetMessage("admin_lib_sett_sett_disable"),
"ONCLICK" => $this->name.'.DisableSettings();',
"ICON" => 'custom-fields-off'
);
}
}
if (count($aAdditionalMenu) > 1)
{
$sMenuUrl = "BX.adminShowMenu(this, ".htmlspecialcharsbx(CAdminPopup::PhpToJavaScript($aAdditionalMenu)).", {active_class: 'bx-settings-btn-active'});";
$bCustomFieldsOff = is_array($_SESSION["ADMIN_CUSTOM_FIELDS"]) && array_key_exists($this->name, $_SESSION["ADMIN_CUSTOM_FIELDS"]);
$s .= '<span id="'.$this->name.'_settings_btn" class="adm-detail-settings adm-detail-settings-arrow'.($bCustomFieldsOff ? '' : ' adm-detail-settings-active').'" onclick="'.$sMenuUrl.'"></span>';
}
else
{
$s .= '<a class="adm-detail-settings" href="javascript:void(0)" onclick="'.$aAdditionalMenu[0]['ONCLICK'].'"></a>';
}
}
}
return $s.parent::ShowTabButtons();
}
示例2: ShowTabButtons
function ShowTabButtons()
{
$s = '';
if ($this->bShowSettings) {
$aAdditionalMenu = array();
$this->__AddListUrlParams('mode', 'settings');
$strLink = $this->GetListUrl(true);
$this->__DeleteListUrlParams('mode');
$aAdditionalMenu[] = array("TEXT" => GetMessage("admin_lib_menu_settings"), "TITLE" => GetMessage("admin_lib_context_sett_title"), "ONCLICK" => $this->name . ".ShowSettings('" . htmlspecialcharsex(CUtil::JSEscape($strLink)) . "')", "ICON" => "btn_settings");
if ($this->bCustomFields) {
if (is_array($_SESSION["ADMIN_CUSTOM_FIELDS"]) && array_key_exists($this->name, $_SESSION["ADMIN_CUSTOM_FIELDS"])) {
$aAdditionalMenu[] = array("TEXT" => GetMessage("admin_lib_sett_sett_enable_text"), "TITLE" => GetMessage("admin_lib_sett_sett_enable"), "ONCLICK" => $this->name . '.EnableSettings();', "ICON" => 'custom-fields-on');
} else {
$aAdditionalMenu[] = array("TEXT" => GetMessage("admin_lib_sett_sett_disable_text"), "TITLE" => GetMessage("admin_lib_sett_sett_disable"), "ONCLICK" => $this->name . '.DisableSettings();', "ICON" => 'custom-fields-off');
}
}
$s .= '<span class="adm-detail-subsettings-cont">';
if (count($aAdditionalMenu) > 1) {
$sMenuUrl = "BX.adminShowMenu(this, " . htmlspecialcharsbx(CAdminPopupEx::PhpToJavaScript($aAdditionalMenu)) . ", {active_class: 'bx-settings-btn-active'});";
$bCustomFieldsOff = is_array($_SESSION["ADMIN_CUSTOM_FIELDS"]) && array_key_exists($this->name, $_SESSION["ADMIN_CUSTOM_FIELDS"]);
$s .= '<span id="' . $this->name . '_settings_btn" class="adm-detail-subsettings adm-detail-subsettings-arrow' . ($bCustomFieldsOff ? '' : ' adm-detail-subsettings-active') . '" onclick="' . $sMenuUrl . '"></span>';
} else {
$s .= '<a class="adm-detail-subsettings" href="javascript:void(0)" onclick="' . $aAdditionalMenu[0]['ONCLICK'] . ';"></a>';
}
$s .= '</span>';
}
return $s . CAdminTabControl::ShowTabButtons();
}