Example #1
0
';
if (typeof phpVars != "object")
	var phpVars = {};
phpVars.bitrix_sessid = '<?php 
echo bitrix_sessid();
?>
';

if (typeof oForum != "object")
	var oForum = {};
oForum.page_number = <?php 
echo intval($arResult['PAGE_NUMBER']);
?>
;
oForum.topic_read_url = '<?php 
echo CUtil::JSUrlEscape($arResult['CURRENT_PAGE']);
?>
';

function reply2author(name)
{
	name = name.replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, "\"");
	if (!!window.oLHE && !!name) {
		if (window.oLHE.sEditorMode == 'code' && window.oLHE.bBBCode) { // BB Codes
		<?php 
if ($arResult["FORUM"]["ALLOW_BIU"] == "Y") {
    ?>
 name = '[B]' + name + '[/B], ';<?php 
}
?>
			window.oLHE.WrapWith("", "", name);
Example #2
0
if (!empty($arResult['CLOUD_DOCUMENT'])) {
    ?>
		defaultService: "<?php 
    echo CUtil::JSUrlEscape($arResult['CLOUD_DOCUMENT']['DEFAULT_SERVICE']);
    ?>
",
		defaultServiceLabel: "<?php 
    echo CUtil::JSUrlEscape($arResult['CLOUD_DOCUMENT']['DEFAULT_SERVICE_LABEL']);
    ?>
",
		createBlankFileUrl: "<?php 
    echo CUtil::JSUrlEscape($arResult['CLOUD_DOCUMENT']['CREATE_BLANK_FILE_URL']);
    ?>
",
		renameBlankFileUrl: "<?php 
    echo CUtil::JSUrlEscape($arResult['CLOUD_DOCUMENT']['RENAME_BLANK_FILE_URL']);
    ?>
",
		<?php 
}
?>
		targetFolderId: "<?php 
echo $arParams['FOLDER_ID'];
?>
"
	});

	BX.message({
		'BX_FPD_LINK_1':'<?php 
echo GetMessageJS("EC_DESTINATION_1");
?>
Example #3
0
?>
",
	DISK_FILE_EXISTS : "<?php 
echo GetMessage('WD_FILE_EXISTS');
?>
",
	DISK_ACCESS_DENIED : "<?php 
echo GetMessage('WD_ACCESS_DENIED');
?>
",
	DISK_CREATE_BLANK_URL : '<?php 
echo CUtil::JSUrlEscape($arResult['CREATE_BLANK_URL']);
?>
',
	DISK_RENAME_FILE_URL : '<?php 
echo CUtil::JSUrlEscape($arResult['RENAME_FILE_URL']);
?>
',
	DISK_TMPLT_THUMB : '<?php 
echo CUtil::JSEscape($thumb);
?>
',
	DISK_TMPLT_THUMB2 : '<?php 
echo CUtil::JSEscape($uploadedFile);
?>
',
	wd_desktop_disk_is_installed: '<?php 
echo (bool) \Bitrix\Disk\Desktop::isDesktopDiskInstall();
?>
',
	wd_service_edit_doc_default: "<?php 
Example #4
0
    function GetPanelHtml()
    {
        global $USER, $APPLICATION, $adminPage;
        if ($APPLICATION->ShowPanel === false || !$USER->IsAuthorized() && $APPLICATION->ShowPanel !== true) {
            return "";
        }
        CTopPanel::InitPanelIcons();
        $arPanelButtons =& $APPLICATION->arPanelButtons;
        $bShowPanel = false;
        foreach ($arPanelButtons as $arValue) {
            if (trim($arValue["HREF"]) != "" || is_array($arValue["MENU"]) && !empty($arValue["MENU"])) {
                //we have at least one button to show
                $bShowPanel = true;
                break;
            }
        }
        if ($bShowPanel == false) {
            $bShowPanel = self::IsShownForUser();
        }
        if ($bShowPanel == false && $APPLICATION->ShowPanel !== true) {
            return "";
        }
        $APPLICATION->PanelShowed = true;
        if (isset($_GET["back_url_admin"]) && $_GET["back_url_admin"] != "" && strpos($_GET["back_url_admin"], "/") === 0) {
            $_SESSION["BACK_URL_ADMIN"] = $_GET["back_url_admin"];
        }
        $aUserOpt = CUserOptions::GetOption("admin_panel", "settings");
        $aUserOptGlobal = CUserOptions::GetOption("global", "settings");
        $toggleModeSet = false;
        if (isset($_GET["freetrix_include_areas"]) && $_GET["freetrix_include_areas"] != "") {
            $APPLICATION->SetShowIncludeAreas($_GET["freetrix_include_areas"] == "Y");
            $toggleModeSet = true;
        }
        $params = DeleteParam(array("freetrix_include_areas", "freetrix_show_mode", "back_url_admin"));
        $href = $APPLICATION->GetCurPage();
        $hrefEnc = htmlspecialcharsbx($href);
        $toggleModeDynamic = $aUserOptGlobal['panel_dynamic_mode'] == 'Y';
        $toggleMode = $toggleModeDynamic && !$toggleModeSet ? $aUserOpt['edit'] == 'on' : $APPLICATION->GetShowIncludeAreas() == 'Y';
        //Save if changed
        $old_edit = $aUserOpt['edit'];
        $aUserOpt['edit'] = $toggleMode ? 'on' : 'off';
        if ($old_edit !== $aUserOpt['edit']) {
            CUserOptions::SetOption('admin_panel', 'settings', $aUserOpt);
        }
        $toggleModeLink = $hrefEnc . '?freetrix_include_areas=' . ($toggleMode ? 'N' : 'Y') . ($params != "" ? "&amp;" . htmlspecialcharsbx($params) : "");
        $result = CTopPanel::ShowPanelScripts(true);
        $result .= '
	<!--[if lte IE 7]>
	<style type="text/css">#bx-panel {display:none !important;}</style>
	<div id="bx-panel-error">' . GetMessage("top_panel_browser") . '</div><![endif]-->
	<script type="text/javascript">BX.admin.dynamic_mode=' . ($toggleModeDynamic ? 'true' : 'false') . '; BX.admin.dynamic_mode_show_borders = ' . ($toggleMode ? 'true' : 'false') . ';</script>
	<div style="display:none; overflow:hidden;" id="bx-panel-back"></div>
	<div id="bx-panel"' . ($aUserOpt["collapsed"] == "on" ? ' class="bx-panel-folded"' : '') . '>
		<div id="bx-panel-top">
			<div id="bx-panel-top-gutter"></div>
			<div id="bx-panel-tabs">
	';
        $result .= '
				<a id="bx-panel-menu" href="" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_start_menu_tooltip_title'), GetMessage('top_panel_start_menu_tooltip')) . '><span id="bx-panel-menu-icon"></span><span id="bx-panel-menu-text">' . GetMessage("top_panel_menu") . '</span></a><a id="bx-panel-view-tab"><span>' . GetMessage("top_panel_site") . '</span></a><a id="bx-panel-admin-tab" href="' . (isset($_SESSION["BACK_URL_ADMIN"]) && $_SESSION["BACK_URL_ADMIN"] != "" ? htmlspecialcharsbx($_SESSION["BACK_URL_ADMIN"]) . (strpos($_SESSION["BACK_URL_ADMIN"], "?") !== false ? "&amp;" : "?") : '/freetrix/admin/index.php?lang=' . LANGUAGE_ID . '&amp;') . 'back_url_pub=' . urlencode($href . ($params != "" ? "?" . $params : "")) . '"><span>' . GetMessage("top_panel_admin") . '</span></a>';
        $back_url = CUtil::JSUrlEscape(CUtil::addslashes($href . ($params != "" ? "?" . $params : "")));
        $arStartMenuParams = array('DIV' => 'bx-panel-menu', 'ACTIVE_CLASS' => 'bx-pressed', 'MENU_URL' => '/freetrix/admin/get_start_menu.php?lang=' . LANGUAGE_ID . '&back_url_pub=' . urlencode($back_url) . '&' . freetrix_sessid_get(), 'MENU_PRELOAD' => $aUserOptGlobal["start_menu_preload"] == 'Y');
        $result .= '<script type="text/javascript">BX.message({MENU_ENABLE_TOOLTIP: ' . ($aUserOptGlobal['start_menu_title'] != 'N' ? 'true' : 'false') . '}); new BX.COpener(' . CUtil::PhpToJsObject($arStartMenuParams) . ');</script>';
        $hkInstance = CHotKeys::getInstance();
        $Execs = $hkInstance->GetCodeByClassName("top_panel_menu", GetMessage("top_panel_menu"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("top_panel_admin", GetMessage("top_panel_admin"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        if ($USER->CanDoOperation("cache_control")) {
            $result .= '<a id="bx-panel-clear-cache" href="" onclick="BX.clearCache(); return false;"><span id="bx-panel-clear-cache-icon"></span><span id="bx-panel-clear-cache-text">' . GetMessage("top_panel_cache_new_tooltip_title") . '</span></a>';
        }
        $result .= '
			</div>
			<div id="bx-panel-userinfo">
	';
        $bCanProfile = $USER->CanDoOperation('view_own_profile') || $USER->CanDoOperation('edit_own_profile');
        $userName = CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $USER->GetFirstName(), "LAST_NAME" => $USER->GetLastName(), "SECOND_NAME" => $USER->GetSecondName(), "LOGIN" => $USER->GetLogin()), $bUseLogin = true, $bHTMLSpec = true);
        if ($bCanProfile) {
            $result .= '<a href="/freetrix/admin/user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $USER->GetID() . '" id="bx-panel-user" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_profile_tooltip')) . '><span id="bx-panel-user-icon"></span><span id="bx-panel-user-text">' . $userName . '</span></a>';
        } else {
            $result .= '<a id="bx-panel-user"><span id="bx-panel-user-icon"></span><span id="bx-panel-user-text">' . $userName . '</span></a>';
        }
        $result .= '<a href="' . $hrefEnc . '?logout=yes' . htmlspecialcharsbx(($s = DeleteParam(array("logout"))) == "" ? "" : "&" . $s) . '" id="bx-panel-logout" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_logout_tooltip') . $hkInstance->GetTitle("bx-panel-logout", true)) . '>' . GetMessage("top_panel_logout") . '</a>';
        $toggleCaptionOn = '<span id="bx-panel-toggle-caption-mode-on">' . GetMessage("top_panel_on") . '</span>';
        $toggleCaptionOff = '<span id="bx-panel-toggle-caption-mode-off">' . GetMessage("top_panel_off") . '</span>';
        $toggleCaptions = $toggleMode ? $toggleCaptionOn . $toggleCaptionOff : $toggleCaptionOff . $toggleCaptionOn;
        $toogle = '<a href="' . $toggleModeLink . '" id="bx-panel-toggle" class="bx-panel-toggle' . ($toggleMode ? '-on' : '-off') . '"' . ($toggleModeDynamic ? '' : ' ' . CTopPanel::AddAttrHint(GetMessage("top_panel_edit_mode_new_tooltip_title"), GetMessage('top_panel_toggle_tooltip') . $hkInstance->GetTitle("bx-panel-small-toggle", true))) . '><span id="bx-panel-switcher-gutter-left"></span><span id="bx-panel-toggle-indicator"><span id="bx-panel-toggle-icon"></span><span id="bx-panel-toggle-icon-overlay"></span></span><span class="bx-panel-break"></span><span id="bx-panel-toggle-caption">' . GetMessage("top_panel_edit_mode_new") . '</span><span class="bx-panel-break"></span><span id="bx-panel-toggle-caption-mode">' . $toggleCaptions . '</span><span id="bx-panel-switcher-gutter-right"></span></a>';
        if ($aUserOpt["collapsed"] == "on") {
            $result .= $toogle;
        }
        $result .= '<a href="" id="bx-panel-expander" ' . CTopPanel::AddAttrHint(GetMessage("top_panel_expand_tooltip_title"), GetMessage("top_panel_expand_tooltip") . $hkInstance->GetTitle("bx-panel-expander", true)) . '><span id="bx-panel-expander-text">' . GetMessage("top_panel_expand") . '</span><span id="bx-panel-expander-arrow"></span></a>';
        if ($hkInstance->IsActive()) {
            $result .= '<a id="bx-panel-hotkeys" href="javascript:void(0)" onclick="BXHotKeys.ShowSettings();" ' . CTopPanel::AddAttrHint(GetMessage("HK_PANEL_TITLE") . $hkInstance->GetTitle("bx-panel-hotkeys", true)) . '></a>';
        }
        $result .= '<a href="javascript:void(0)" id="bx-panel-pin"' . ($aUserOpt['fix'] == 'on' ? ' class="bx-panel-pin-fixed"' : '') . ' ' . CTopPanel::AddAttrHint(GetMessage('top_panel_pin_tooltip')) . '></a>';
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-logout", GetMessage('top_panel_logout_tooltip'));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-small-toggle", GetMessage("top_panel_edit_mode_new_tooltip_title"), 'location.href="' . $href . '?freetrix_include_areas=' . ($toggleMode ? 'N' : 'Y') . ($params != "" ? "&" . $params : "") . '";');
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-expander", GetMessage("top_panel_expand_tooltip_title") . "/" . GetMessage("top_panel_collapse_tooltip_title"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $result .= '
			</div>
		</div>
	';
        /* BUTTONS */
        $result .= '<div id="bx-panel-site-toolbar"><div id="bx-panel-buttons-gutter"></div><div id="bx-panel-switcher">';
        if ($aUserOpt["collapsed"] != "on") {
            $result .= $toogle;
        }
        $result .= '<a href="" id="bx-panel-hider" ' . CTopPanel::AddAttrHint(GetMessage("top_panel_collapse_tooltip_title"), GetMessage("top_panel_collapse_tooltip") . $hkInstance->GetTitle("bx-panel-expander", true)) . '>' . GetMessage("top_panel_collapse") . '<span id="bx-panel-hider-arrow"></span></a>';
        $result .= '</div><div id="bx-panel-buttons"><div id="bx-panel-buttons-inner">';
        $main_sort = "";
        $last_btn_type = '';
        $last_btn_small_cnt = 0;
        $groupId = -1;
        $result .= '<span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
        sortByColumn($arPanelButtons, array("MAIN_SORT" => SORT_ASC, "SORT" => SORT_ASC));
        foreach ($arPanelButtons as $key => $arButton) {
            $result .= $hkInstance->PrintTPButton($arButton);
            if ($main_sort != $arButton["MAIN_SORT"] && $main_sort != "") {
                $result .= '</span><span class="bx-panel-button-separator"></span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                $last_btn_small_cnt = 0;
            }
            if (!isset($arButton['TYPE']) || $arButton['TYPE'] != 'BIG') {
                $arButton['TYPE'] = 'SMALL';
            }
            //very old behaviour
            if (is_set($arButton, "SRC_0")) {
                $arButton["SRC"] = $arButton["SRC_0"];
            }
            $arButton['HREF'] = isset($arButton['HREF']) ? trim($arButton['HREF']) : '';
            $bHasAction = $arButton['HREF'] != '';
            if (array_key_exists("RESORT_MENU", $arButton) && $arButton["RESORT_MENU"] === true && is_array($arButton['MENU']) && !empty($arButton['MENU'])) {
                sortByColumn($arButton['MENU'], "SORT", '', PHP_INT_MAX);
            }
            $bHasMenu = is_array($arButton['MENU']) && count($arButton['MENU']) > 0;
            if ($bHasMenu && !$bHasAction) {
                foreach ($arButton['MENU'] as $arItem) {
                    if (isset($arItem['DEFAULT']) && $arItem['DEFAULT']) {
                        $arButton['HREF'] = $arItem['HREF'];
                        $bHasAction = true;
                    }
                }
            }
            if ($last_btn_type != '' && $arButton['TYPE'] != $last_btn_type && $main_sort == $arButton["MAIN_SORT"]) {
                $result .= '</span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                $last_btn_small_cnt = 0;
            }
            if ($bHasAction && substr(strtolower($arButton['HREF']), 0, 11) == 'javascript:') {
                $arButton['ONCLICK'] = substr($arButton['HREF'], 11);
                $arButton['HREF'] = 'javascript:void(0)';
            }
            if ($arButton['HINT']) {
                if (isset($arButton['HINT']['ID']) && $arButton['HINT']['ID']) {
                    $hintOptions = CUtil::GetPopupOptions($arButton['HINT']['ID']);
                    if ($hintOptions['display'] == 'off') {
                        unset($arButton['HINT']);
                    }
                }
                if ($arButton['HINT']) {
                    unset($arButton['ALT']);
                }
                if ($bHasMenu && (!isset($arButton['HINT_MENU']) || !$arButton['HINT_MENU'])) {
                    $arButton['HINT']['TARGET'] = 'parent';
                }
            }
            $title = isset($arButton['ALT']) ? htmlspecialcharsbx($arButton['ALT']) : '';
            $onClick = isset($arButton['ONCLICK']) ? htmlspecialcharsbx($arButton['ONCLICK']) : '';
            $onClickJs = isset($arButton['ONCLICK']) ? CUtil::JSEscape($arButton['ONCLICK']) : '';
            $hintMenu = isset($arButton['HINT_MENU']) ? CUtil::PhpToJsObject($arButton['HINT_MENU']) : '';
            switch ($arButton['TYPE']) {
                case 'SMALL':
                    if ($last_btn_small_cnt >= 3 && $main_sort == $arButton["MAIN_SORT"]) {
                        $result .= '</span><span class="bx-panel-button-group" data-group-id="' . ++$groupId . '">';
                        $last_btn_small_cnt = 0;
                    } elseif ($last_btn_small_cnt > 0) {
                        $result .= '<span class="bx-panel-break"></span>';
                    }
                    $result .= '<span class="bx-panel-small-button"><span class="bx-panel-small-button-inner">';
                    $button_icon = '<span class="bx-panel-small-button-icon' . ($arButton['ICON'] ? ' ' . $arButton['ICON'] : '') . '"' . (isset($arButton['SRC']) && $arButton['SRC'] ? ' style="background: scroll transparent url(' . htmlspecialcharsbx($arButton['SRC']) . ') no-repeat center center !important;"' : '') . '></span>';
                    $button_text = '<span class="bx-panel-small-button-text">' . htmlspecialcharsbx($arButton['TEXT']) . '</span>';
                    $button_text_js = CUtil::JSEscape($arButton['TEXT']);
                    if ($bHasAction) {
                        $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-active\')" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . $hkInstance->GetTitle("bx_topmenu_btn_" . $key) . '"' : '"' . $hkInstance->GetTitle("bx_topmenu_btn_" . $key) . '"') . '>' . $button_icon . $button_text . '</a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'SMALL\', ACTIVE_CSS: \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-active\', HOVER_CSS: \'bx-panel-small-button' . ($bHasMenu ? '-text' : '') . '-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', SKIP : ' . ($bHasMenu ? "true" : "false") . ', LINK: "' . CUtil::JSEscape($arButton['HREF']) . '", ACTION : "' . $onClickJs . '",TEXT :  "' . $button_text_js . '" })</script>';
                        if ($bHasMenu) {
                            $result .= '<a href="javascript:void(0)" class="bx-panel-small-button-arrow" id="bx_topmenu_btn_' . $key . '_menu"><span class="bx-panel-small-button-arrow"></span></a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'SMALL\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-small-button-arrow-active\', HOVER_CSS: \'bx-panel-small-button-arrow-hover\'' . ($hintMenu ? ', HINT: ' . $hintMenu : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                        }
                    } elseif ($bHasMenu) {
                        $result .= '<a href="javascript:void(0)" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . $button_text . '<span class="bx-panel-small-single-button-arrow"></span></a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'SMALL\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-small-button-active\', HOVER_CSS: \'bx-panel-small-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                    }
                    $result .= '</span></span>';
                    $last_btn_small_cnt++;
                    break;
                case 'BIG':
                    $last_btn_small_cnt = 0;
                    $result .= '<span class="bx-panel-button"><span class="bx-panel-button-inner">';
                    $button_icon = '<span class="bx-panel-button-icon' . ($arButton['ICON'] ? ' ' . $arButton['ICON'] : '') . '"' . (isset($arButton['SRC']) && $arButton['SRC'] ? ' style="background: scroll transparent url(' . htmlspecialcharsbx($arButton['SRC']) . ') no-repeat center center !important;"' : '') . '></span>';
                    $button_text_js = CUtil::JSEscape(str_replace('#BR#', ' ', $arButton['TEXT']));
                    if ($bHasAction && $bHasMenu) {
                        $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '&nbsp;<span class="bx-panel-button-arrow"></span></span>';
                        $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-button-icon-active\');" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . '</a><a id="bx_topmenu_btn_' . $key . '_menu" href="javascript:void(0)">' . $button_text . '</a>';
                        $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'BIG\', ACTIVE_CSS: \'bx-panel-button-icon-active\', HOVER_CSS: \'bx-panel-button-icon-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', SKIP : true }); BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'BIG\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-button-text-active\', HOVER_CSS: \'bx-panel-button-text-hover\'' . ($hintMenu ? ', HINT: ' . $hintMenu : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"})</script>';
                    } else {
                        if ($bHasAction) {
                            $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '</span>';
                            $result .= '<a href="' . htmlspecialcharsbx($arButton['HREF']) . '" onclick="' . $onClick . ';BX.removeClass(this.parentNode.parentNode, \'bx-panel-button-active\');" id="bx_topmenu_btn_' . $key . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $button_icon . $button_text . '</a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '\', TYPE: \'BIG\', ACTIVE_CSS: \'bx-panel-button-active\', HOVER_CSS: \'bx-panel-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', LINK: "' . CUtil::JSEscape($arButton['HREF']) . '", ACTION : "' . $onClickJs . '", TEXT :  "' . $button_text_js . '"});</script>';
                        } else {
                            $button_text = '<span class="bx-panel-button-text">' . str_replace('#BR#', '<span class="bx-panel-break"></span>', $arButton['TEXT']) . '&nbsp;<span class="bx-panel-button-arrow"></span></span>';
                            $result .= '<a href="javascript:void(0)" id="bx_topmenu_btn_' . $key . '_menu">' . $button_icon . $button_text . '</a>';
                            $result .= '<script type="text/javascript">BX.admin.panel.RegisterButton({ID: \'bx_topmenu_btn_' . $key . '_menu\', TYPE: \'BIG\', MENU: ' . CUtil::PhpToJsObject($arButton['MENU']) . ', ACTIVE_CSS: \'bx-panel-button-active\', HOVER_CSS: \'bx-panel-button-hover\'' . ($arButton['HINT'] ? ', HINT: ' . CUtil::PhpToJsObject($arButton['HINT']) : '') . ', GROUP_ID : ' . $groupId . ', TEXT :  "' . $button_text_js . '"});</script>';
                        }
                    }
                    $result .= '</span></span>';
                    break;
            }
            $main_sort = $arButton["MAIN_SORT"];
            $last_btn_type = $arButton['TYPE'];
        }
        $result .= '</span>';
        $result .= '</div>
			</div>
		</div>';
        if ($USER->IsAdmin()) {
            $result .= CAdminNotify::GetHtml();
        }
        $result .= '
	</div>
	';
        $result .= '<script type="text/javascript">
		BX.admin.panel.state = {
			fixed: ' . ($aUserOpt["fix"] == "on" ? 'true' : 'false') . ',
			collapsed: ' . ($aUserOpt["collapsed"] == "on" ? 'true' : 'false') . '
		}
		BX.admin.moreButton.init({ buttonTitle : "' . GetMessageJS("top_panel_more_button_title") . '"});
		</script>';
        //start menu preload
        // if($aUserOptGlobal["start_menu_preload"] == 'Y')
        // 	$result .= '<script type="text/javascript">BX.ready(function(){jsStartMenu.PreloadMenu(\''.CUtil::JSEscape($href.($params<>""? "?".$params:"")).'\');});</script>';
        //show script to play sound
        $result .= $adminPage->ShowSound();
        return $result;
    }
Example #5
0
}
if (($arResult["CurrentUserPerms"]["IsCurrentUser"] || $arResult["CurrentUserPerms"]["Operations"]["viewprofile"]) && !class_exists("CSocNetSubscription")) {
    ?>
		menu.push(
			{ 
				text : "<?php 
    echo GetMessage("SONET_UM_SUBSCRIBE");
    ?>
", 
				title: "<?php 
    echo GetMessage("SONET_UM_SUBSCRIBE");
    ?>
", 
				className : "profile-menu-subscribe", 
				href: "<?php 
    echo CUtil::JSUrlEscape($arResult["Urls"]["Subscribe"]);
    ?>
"
			}
		);
	<?php 
}
if (IsModuleInstalled("bitrix24") && $arResult["CurrentUserPerms"]["Operations"]["modifyuser"]) {
    ?>
		menu.push(
			{
				text : "<?php 
    echo GetMessage("SONET_TELEPHONY_HISTORY");
    ?>
",
				title: "<?php 
Example #6
0
								return BX.PreventDefault(e);
							}},
							<?php 
    if ($version['EDITABLE'] && $version['CAN_UPDATE']) {
        ?>
							{text : BX.message('JS_CORE_VIEWER_EDIT'), className : "bx-viewer-popup-item item-edit", href : "#", onclick: function(e){
								BX.fireEvent(BX.findPreviousSibling(BX(this.bindElement), function(node){ return BX.type.isElementNode(node) && (node.getAttribute('data-bx-viewer'));}, true), 'click');top.BX.CViewer.objNowInShow.runActionByCurrentElement('forceEdit', {obElementViewer: top.BX.CViewer.objNowInShow});
								BX.PopupMenu.currentItem.popupWindow.close();
								return BX.PreventDefault(e);
							}},
							<?php 
    }
    ?>
							{text : BX.message('JS_CORE_VIEWER_SAVE_TO_OWN_FILES'), className : "bx-viewer-popup-item item-b24", href : "#", onclick: function(e){
								top.BX.CViewer.getWindowCopyToDisk({link: "<?php 
    echo CUtil::JSUrlEscape($version['COPY_TO_ME_URL']);
    ?>
", selfViewer: false, showEdit: <?php 
    echo \Bitrix\Disk\Document\DocumentHandler::isEditable($version['NAME']) ? 'true' : 'false';
    ?>
, title: "<?php 
    echo CUtil::JSEscape($version["NAME"]);
    ?>
"});
								BX.PopupMenu.currentItem.popupWindow.close();
								return BX.PreventDefault(e);
							}},
							<?php 
    if ($version['FROM_EXTERNAL_SYSTEM'] && $version['CAN_UPDATE']) {
        ?>
							{text : '<?php 
Example #7
0
		catalogId: <?php 
echo CUtil::PhpToJSObject($arResult['CATALOG_ID']);
?>
,
		sectionId: <?php 
echo CUtil::PhpToJSObject($arResult['SECTION_ID']);
?>
,
		treeInfo: <?php 
echo CUtil::PhpToJSObject($arResult['INITIAL_TREE']);
?>
,
		containerId: "crm-product-section-tree-<?php 
echo $component->getComponentId();
?>
",
		productListUri: "<?php 
echo CUtil::JSUrlEscape($arResult['PAGE_URI_TEMPLATE']);
?>
",
		jsEventsMode: <?php 
echo CUtil::JSEscape($arResult['JS_EVENTS_MODE'] === 'Y' ? 'true' : 'false');
?>
,
		jsEventsManagerId: "<?php 
echo CUtil::JSEscape($arResult['JS_EVENTS_MANAGER_ID']);
?>
"
	});
</script>
Example #8
0
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/interface/navigation.php");
IncludeModuleLangFile(__FILE__);

$nav_func_name = 'GetAdminList';

$sQueryString = CUtil::JSUrlEscape($strNavQueryString);
$sJSUrlPath = CUtil::JSUrlEscape($sUrlPath);

if($this->NavRecordCount>0)
{
?>
<div class="adm-navigation">
	<div class="adm-nav-pages-block">
<?
	if($this->NavPageNomer > 1)
	{
?>
		<a class="adm-nav-page adm-nav-page-prev" href="javascript:<?echo $this->table_id?>.<?php 
echo $nav_func_name;
?>
('<?echo $sJSUrlPath.'?PAGEN_'.$this->NavNum.'='.($this->NavPageNomer-1).'&amp;SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$sQueryString;?>');"><span class="adm-subnav-page-prev-before"></span></a>
<?
	}
	else //$this->NavPageNomer > 1
	{
?>
		<span class="adm-nav-page adm-nav-page-prev"><span class="adm-subnav-page-prev-before"></span></span>
<?
	} //$this->NavPageNomer > 1
Example #9
0
?>
',
		controlName : '<?php 
echo CUtil::JSEscape($arResult['controlName']);
?>
',
		urlSelect : '<?php 
echo CUtil::JSEscape('/bitrix/tools/disk/uf.php?action=selectFile&SITE_ID=' . SITE_ID);
?>
',
		urlRenameFile : '<?php 
echo CUtil::JSEscape('/bitrix/tools/disk/uf.php?action=renameFile');
?>
',
		urlUpload : '<?php 
echo CUtil::JSUrlEscape($arResult['UPLOAD_FILE_URL']);
?>
',
		thumbSize : '<?php 
echo $arParams["THUMB_SIZE"];
?>
'
	});
});
BX.message({
	DISK_FOLDER_TOOLBAR_LABEL_LOCAL_BDISK_EDIT: '<?php 
echo CUtil::JSEscape(\Bitrix\Disk\Document\LocalDocumentController::getName());
?>
'
});
</script>
Example #10
0
            echo $arWDFile['SIZE'];
            ?>
</span>
						<script type="text/javascript">
							var WDpreButtons_<?php 
            echo $arWDFile['ID'];
            ?>
 = [
								{text : BX.message('JS_CORE_VIEWER_VIEW_ELEMENT'), className : "bx-viewer-popup-item item-view", href : "#", onclick: function(e){
									BX.fireEvent(BX.findPreviousSibling(BX(this.bindElement), function(node){ return BX.type.isElementNode(node) && (node.getAttribute('data-bx-viewer'));}, true), 'click');
									BX.PopupMenu.currentItem.popupWindow.close();
									return BX.PreventDefault(e);
								}},
								{text : BX.message('JS_CORE_VIEWER_SAVE_TO_OWN_FILES'), className : "bx-viewer-popup-item item-b24", href : "#", onclick: function(e){
									top.BX.CViewer.getWindowCopyToDisk({link: "<?php 
            echo CUtil::JSUrlEscape(CHTTP::urlAddParams($arWDFile['PATH'], array('toWDController' => 1, 'saveToDisk' => 1)));
            ?>
", selfViewer: false, showEdit: <?php 
            echo CWebDavEditDocGoogle::isEditable($arWDFile['NAME']) ? 'true' : 'false';
            ?>
, title: "<?php 
            echo CUtil::JSEscape($arWDFile["NAME"]);
            ?>
"});
									BX.PopupMenu.currentItem.popupWindow.close();
									return BX.PreventDefault(e);
								}},
								{text : BX.message('JS_CORE_VIEWER_DOWNLOAD_TO_PC'), className : "bx-viewer-popup-item item-download", href : "<?php 
            echo $arWDFile["PATH"];
            ?>
", onclick: function(e){BX.PopupMenu.currentItem.popupWindow.close();}}
Example #11
0
$newBar = false;
$arMoreButtons = array();
foreach ($arParams["BUTTONS"] as $index => $item) {
    if (!empty($item["NEWBAR"])) {
        $newBar = true;
        continue;
    }
    if (!empty($item["SEPARATOR"])) {
        continue;
    }
    if ($newBar || !empty($item["ALIGN"])) {
        $onclick = "";
        if (substr(strtolower($item["LINK"]), 0, 11) == 'javascript:') {
            $onclick = substr($item["LINK"], 11);
        } else {
            $onclick = "jsUtils.Redirect([], '" . CUtil::JSUrlEscape($item["LINK"]) . "')";
        }
        $arMoreButtons[] = array("ICONCLASS" => $item["ICON"], "TEXT" => $item["TEXT"], "ONCLICK" => $onclick, "MENU" => array_key_exists("MENU", $item) ? $item["MENU"] : false);
    } elseif (!empty($item["MENU"])) {
        ?>
			<td>
				<script type="text/javascript">
				var jsMnu_<?php 
        echo $arParams["TOOLBAR_ID"] . '_' . $index;
        ?>
 = <?php 
        echo CUtil::PhpToJSObject($item["MENU"]);
        ?>
;
				</script>
				<a href="javascript:void(0);" hidefocus="true" 
Example #12
0
								return BX.PreventDefault(e);
							}},
							<?php 
        if ($file['EDITABLE'] && $file['CAN_UPDATE']) {
            ?>
							{text : BX.message('JS_CORE_VIEWER_EDIT'), className : "bx-viewer-popup-item item-edit", href : "#", onclick: function(e){
								BX.fireEvent(BX.findPreviousSibling(BX(this.bindElement), function(node){ return BX.type.isElementNode(node) && (node.getAttribute('data-bx-viewer'));}, true), 'click');top.BX.CViewer.objNowInShow.runActionByCurrentElement('forceEdit', {obElementViewer: top.BX.CViewer.objNowInShow});
								BX.PopupMenu.currentItem.popupWindow.close();
								return BX.PreventDefault(e);
							}},
							<?php 
        }
        ?>
							{text : BX.message('JS_CORE_VIEWER_SAVE_TO_OWN_FILES'), className : "bx-viewer-popup-item item-b24", href : "#", onclick: function(e){
								top.BX.CViewer.getWindowCopyToDisk({link: "<?php 
        echo CUtil::JSUrlEscape($file['COPY_TO_ME_URL']);
        ?>
", selfViewer: false, showEdit: <?php 
        echo $file['EDITABLE'] ? 'true' : 'false';
        ?>
, title: "<?php 
        echo CUtil::JSEscape($file["NAME"]);
        ?>
"});
								BX.PopupMenu.currentItem.popupWindow.close();
								return BX.PreventDefault(e);
							}},
							<?php 
        if ($file['FROM_EXTERNAL_SYSTEM'] && $file['CAN_UPDATE']) {
            ?>
							{text : '<?php 
Example #13
0
	<?php 
$APPLICATION->IncludeComponent('bitrix:disk.breadcrumbs', '', array('BREADCRUMBS_ROOT' => $arResult['STORAGE'], 'BREADCRUMBS' => array()));
?>

	<div style="clear: both;"></div>
</div>
<div class="bx-disk-interface-filelist">
	<?php 
$APPLICATION->IncludeComponent('bitrix:disk.interface.grid', '', array('MODE' => $arResult['GRID']['MODE'], 'GRID_ID' => $arResult['GRID']['ID'], 'HEADERS' => $arResult['GRID']['HEADERS'], 'SORT' => $arResult['GRID']['SORT'], 'SORT_VARS' => $arResult['GRID']['SORT_VARS'], 'ROWS' => $arResult['GRID']['ROWS'], 'FOOTER' => array_merge(array(array('title' => Loc::getMessage('DISK_EXTERNAL_LINK_LIST_LABEL_GRID_TOTAL'), 'value' => $arResult['GRID']['ROWS_COUNT'], 'id' => 'bx-disk-total-grid-item')), $arResult['GRID']['FOOTER']), 'EDITABLE' => false, 'ALLOW_EDIT' => true, 'ALLOW_INLINE_EDIT' => false, 'ACTION_ALL_ROWS' => true, 'ACTIONS' => array('delete' => true)), $component);
?>
</div>
<script type="application/javascript">
BX(function () {
	BX.Disk.storePathToUser('<?php 
echo CUtil::JSUrlEscape($arParams['PATH_TO_USER']);
?>
');
	BX.Disk['ExternalLinkListClass_<?php 
echo $component->getComponentId();
?>
'] = new BX.Disk.ExternalLinkListClass({
		grid: bxGrid_<?php 
echo $arResult['GRID']['ID'];
?>
,
		gridGroupActionButton: 'folder-list-action-all-btn',
		gridShowTreeButton: 'folder-list-action-show-tree'
	});
});
BX.message({
Example #14
0
document.getElementById('time_container').innerHTML = player.params['period'] + '';}"></div></td>
						</tr>
					</table></td>
				<td width="10%" valign="top" align="right"><div id="stop" class="photo-player-button" <?php 
?>
 onclick="if(player){player.stop();<?php 
if (empty($arParams["BACK_URL"])) {
    ?>
jsUtils.Redirect([], window.SlideSlider.oSource.Data[window.SlideSlider.active]['url']);<?php 
}
?>
} <?php 
if (!empty($arParams["BACK_URL"])) {
    ?>
jsUtils.Redirect([], '<?php 
    echo CUtil::JSUrlEscape($arParams["BACK_URL"]);
    ?>
');<?php 
}
?>
"></div></td>
			</tr>
		</table>
	</div>
</div>

<script>
window.params = {'x' : 0, 'y' : 0};
function GetWindowSize()
{
	var innerWidth, innerHeight;
Example #15
0
?>
</div>
<div id="disk-breadcrumbs-tree-<?php 
echo $component->getComponentId();
?>
" style="display: none;"></div>



<script type="application/javascript">
		BX.Disk['BreadcrumbsTreeClass_<?php 
echo $component->getComponentId();
?>
'] = new BX.Disk.BreadcrumbsTreeClass({
			storageBaseUrl: '<?php 
echo CUtil::JSUrlEscape($arResult['STORAGE']['LINK']);
?>
',
			rootObject: {
				id: <?php 
echo $arResult['STORAGE']['ID'];
?>
,
				name: '<?php 
echo CUtil::JSEscape($arResult['STORAGE']['NAME']);
?>
'
			},
			<?php 
if ($firstObject) {
    ?>