Exemplo n.º 1
0
            $res = CSticker::SetHiden($arIds, true);
        }
        if ($res !== true) {
            ?>
<script>alert("<?php 
            echo CUtil::JSEscape($res);
            ?>
");</script><?php 
        }
    }
    $bJustResult = $_REQUEST['sticker_just_res'] == "Y";
    $colorSchemes = array('bxst-yellow', 'bxst-green', 'bxst-blue', 'bxst-red', 'bxst-purple', 'bxst-gray');
    $curPage = urldecode($_REQUEST['cur_page']);
    $arFilter = array('USER_ID' => $USER->GetId(), 'SITE_ID' => $_REQUEST['site_id']);
    if (!$bJustResult) {
        $arFilterParams = CSticker::GetFilterParams();
        $arFilter['ONLY_OWNER'] = $arFilterParams['type'] == 'my' ? "Y" : "N";
        if ($_REQUEST['type'] == 'current') {
            //$arFilter['CLOSED'] = $arFilterParams['status'] == 'closed' ? 'Y' : 'N';
            $arFilter['PAGE_URL'] = $curPage;
        } else {
            if ($_REQUEST['type'] == 'all') {
                $arFilter['CLOSED'] = 'N';
            }
        }
        if ($arFilterParams['colors'] != 'all') {
            $arFilter['COLORS'] = $arFilterParams['colors'];
        }
    } else {
        $arFilterParams = array();
        $arFilter['ONLY_OWNER'] = isset($_REQUEST['sticker_type']) && $_REQUEST['sticker_type'] == 'my' ? "Y" : "N";
Exemplo n.º 2
0
 function InitJS($Params)
 {
     global $APPLICATION, $USER;
     CUtil::InitJSCore(array('window', 'ajax'));
     $APPLICATION->AddHeadScript('/bitrix/js/fileman/sticker.js');
     $APPLICATION->SetAdditionalCSS('/bitrix/js/fileman/sticker.css');
     $pageUrl = $APPLICATION->GetCurPage();
     $pageTitle = $APPLICATION->GetTitle();
     if ($pageTitle == '') {
         $pageTitle = $pageUrl;
     }
     $listSize = CUtil::GetPopupSize("bx_sticker_list_resize_id", array("width" => 800, "height" => 450));
     $size = explode("_", COption::GetOptionString("fileman", "stickers_start_sizes", "350_200"));
     $min_width = 280;
     $min_height = 160;
     $JSConfig = array("access" => CSticker::CanDoOperation('sticker_edit') ? "W" : "R", "sessid_get" => bitrix_sessid_get(), "start_width" => $size[0] > $min_width ? $size[0] : $min_width, "start_height" => $size[1] > $min_height ? $size[1] : $min_height, "min_width" => $min_width, "min_height" => $min_height, "start_color" => CUserOptions::GetOption('fileman', "stickers_last_color", 0), "zIndex" => 800, "curUserName" => CSticker::GetUserName(), "curUserId" => $USER->GetId(), "pageUrl" => $pageUrl, "pageTitle" => $pageTitle, "bShowStickers" => $Params['bInit'], "listWidth" => $listSize['width'], "listHeight" => $listSize['height'], "listNaviSize" => CUserOptions::GetOption('fileman', "stickers_navi_size", 5), "useHotkeys" => COption::GetOptionString('fileman', "stickers_use_hotkeys", "Y") == "Y", "filterParams" => CSticker::GetFilterParams(), "bHideBottom" => COption::GetOptionString("fileman", "stickers_hide_bottom", "Y") == "Y", "focusOnSticker" => isset($_GET['show_sticker']) ? intVal($_GET['show_sticker']) : 0, "strDate" => FormatDate("j F", time() + CTimeZone::GetOffset()), "curPageCount" => $Params['curPageCount'], "site_id" => SITE_ID);
     if (!is_array($Params['stickers'])) {
         $Params['stickers'] = array();
     }
     self::$Params = array("JSCONFIG" => $JSConfig, "STICKERS" => $Params['stickers']);
 }