Exemple #1
0
    function GetHTMLEditorSettings($edname, $lightMode, $arTaskbars, &$loadParams)
    {
        ?>
		<script>
			//Array of settings
			if (!window.SETTINGS)
				SETTINGS = {};

			SETTINGS['<?php 
        echo $edname;
        ?>
'] = {};
			<?php 
        $loadParams = '';
        if (!$lightMode) {
            //Get toolbar settings
            $toolbar_settings = stripslashes(CUserOptions::GetOption("fileman", "toolbar_settings_" . $edname));
            $rs_tlbrs = stripslashes(CUserOptions::GetOption("fileman", "rs_toolbar_" . $edname, 'Y'));
            if ($toolbar_settings) {
                ?>
SETTINGS['<?php 
                echo $edname;
                ?>
'].arToolbarSettings = [];<?php 
                $res = explode("||", $toolbar_settings);
                for ($i = 0, $len = count($res); $i < $len; $i++) {
                    $tmp = explode(":", $res[$i]);
                    $tlbrname = $tmp[0];
                    $tmp2 = explode(",", $tmp[1]);
                    $show = $tmp2[0];
                    $docked = $tmp2[1];
                    $arPos = explode(";", substr($tmp2[2], 1, -1));
                    ?>
			var _ar = [];
			_ar.show = <?php 
                    echo $show == 'true' ? 'true' : 'false';
                    ?>
;
			_ar.docked = <?php 
                    echo $docked == 'true' ? 'true' : 'false';
                    ?>
;
			<?php 
                    if ($docked == 'true') {
                        ?>
			_ar.position = [<?php 
                        echo $arPos[0];
                        ?>
,<?php 
                        echo $arPos[1];
                        ?>
,<?php 
                        echo $arPos[2];
                        ?>
];
			<?php 
                    } else {
                        ?>
			_ar.position = {
				x : '<?php 
                        echo substr($arPos[0], -2) == "px" ? substr($arPos[0], 0, -2) : $arPos[0];
                        ?>
',
				y : '<?php 
                        echo substr($arPos[1], -2) == "px" ? substr($arPos[1], 0, -2) : $arPos[1];
                        ?>
'
			};
			<?php 
                    }
                    ?>

			SETTINGS['<?php 
                    echo $edname;
                    ?>
'].arToolbarSettings["<?php 
                    echo $tlbrname;
                    ?>
"] = _ar;
			<?php 
                }
            }
            $loadParams = 'em';
            // extended mode
        }
        //Get taskbar settings
        $taskbars = CUserOptions::GetOption("fileman", "taskbar_settings_" . $edname, false);
        if ($taskbars !== false && CheckSerializedData($taskbars, 10)) {
            $taskbars = unserialize($taskbars);
        } else {
            $taskbars = false;
        }
        if (is_array($taskbars)) {
            ?>
SETTINGS['<?php 
            echo $edname;
            ?>
'].arTaskbarSettings = {};<?php 
            foreach ($taskbars as $tname => $tskbr) {
                // Display settings
                ?>
SETTINGS['<?php 
                echo $edname;
                ?>
'].arTaskbarSettings["<?php 
                echo $tname;
                ?>
"] = {show: <?php 
                echo $tskbr['show'] ? 'true' : 'false';
                ?>
, set: <?php 
                echo $tskbr['set'] == 2 ? 2 : 3;
                ?>
, active: <?php 
                echo $tskbr['active'] ? 'true' : 'false';
                ?>
};<?php 
                if ($tskbr['show'] && in_array($tname, $arTaskbars)) {
                    switch ($tname) {
                        case 'BXSnippetsTaskbar':
                            $loadParams .= 's';
                            break;
                        case 'BXComponents2Taskbar':
                            $loadParams .= 'c2';
                            break;
                    }
                }
            }
        } else {
            if (in_array('BXSnippetsTaskbar', $arTaskbars)) {
                $loadParams .= 's';
            }
            if (in_array('BXComponents2Taskbar', $arTaskbars)) {
                $loadParams .= 'c2';
            }
        }
        //Get taskbarset settings
        $taskbarset = CUserOptions::GetOption("fileman", "taskbarset_settings_" . $edname, false);
        if ($taskbarset !== false && CheckSerializedData($taskbarset, 10)) {
            $taskbarset = unserialize($taskbarset);
        } else {
            $taskbarset = false;
        }
        if (is_array($taskbarset)) {
            ?>
SETTINGS['<?php 
            echo $edname;
            ?>
'].arTBSetsSettings = [];<?php 
            foreach ($taskbarset as $iNum => $tskbrset) {
                if ($iNum != 2) {
                    $iNum = 3;
                }
                ?>
SETTINGS['<?php 
                echo $edname;
                ?>
'].arTBSetsSettings["<?php 
                echo intVal($iNum);
                ?>
"] = {show: <?php 
                echo $tskbrset['show'] ? 'true' : 'false';
                ?>
, size: <?php 
                echo intVal($tskbrset['size']);
                ?>
};
			<?php 
            }
        }
        $show_tooltips = CUserOptions::GetOption("fileman", "show_tooltips" . $edname, "Y");
        $visualEffects = CUserOptions::GetOption("fileman", "visual_effects" . $edname, "Y");
        $arC2DS = CUtil::GetPopupSize("bx_edc2_" . $edname, array("width" => 650, "height" => 450));
        ?>

			SETTINGS['<?php 
        echo $edname;
        ?>
'].showTooltips4Components = <?php 
        echo $show_tooltips == "N" ? "false" : "true";
        ?>
;
			SETTINGS['<?php 
        echo $edname;
        ?>
'].visualEffects = <?php 
        echo $visualEffects == "N" ? "false" : "true";
        ?>
;

			window.comp2_dialog_size = {width: '<?php 
        echo $arC2DS['width'];
        ?>
', height: '<?php 
        echo $arC2DS['height'];
        ?>
'};
		</script>
		<?php 
        //return $str_res;
    }
Exemple #2
0
.FieldEdit()"></div>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</div>

</div>
<?php 
}
?>

<?php 
$variables = array("mess" => array("collapseTabs" => GetMessage("interface_form_close_all"), "expandTabs" => GetMessage("interface_form_show_all"), "settingsTitle" => GetMessage("intarface_form_settings"), "settingsSave" => GetMessage("interface_form_save"), "tabSettingsTitle" => GetMessage("intarface_form_tab"), "tabSettingsSave" => "OK", "tabSettingsName" => GetMessage("intarface_form_tab_name"), "tabSettingsCaption" => GetMessage("intarface_form_tab_title"), "fieldSettingsTitle" => GetMessage("intarface_form_field"), "fieldSettingsName" => GetMessage("intarface_form_field_name"), "sectSettingsTitle" => GetMessage("intarface_form_sect"), "sectSettingsName" => GetMessage("intarface_form_sect_name")), "ajax" => array("AJAX_ID" => $arParams["AJAX_ID"], "AJAX_OPTION_SHADOW" => $arParams["AJAX_OPTION_SHADOW"] == "Y"), "settingWndSize" => CUtil::GetPopupSize("InterfaceFormSettingWnd"), "tabSettingWndSize" => CUtil::GetPopupSize("InterfaceFormTabSettingWnd", array('width' => 400, 'height' => 200)), "fieldSettingWndSize" => CUtil::GetPopupSize("InterfaceFormFieldSettingWnd", array('width' => 400, 'height' => 150)), "component_path" => $component->GetRelativePath(), "template_path" => $this->GetFolder(), "sessid" => bitrix_sessid(), "current_url" => $APPLICATION->GetCurPageParam("", array("bxajaxid", "AJAX_CALL")), "GRID_ID" => $arParams["THEME_GRID_ID"]);
?>
<script type="text/javascript">
var formSettingsDialog<?php 
echo $arParams["FORM_ID"];
?>
;
bxForm_<?php 
echo $arParams["FORM_ID"];
?>
 = new BxCrmInterfaceForm('<?php 
echo $arParams["FORM_ID"];
?>
', <?php 
echo CUtil::PhpToJsObject(array_keys($arResult["TABS"]));
?>
Exemple #3
0
 function GetPopupLink($arUrl)
 {
     CUtil::InitJSCore(array('window', 'ajax'));
     if (class_exists('CUserOptions') && (!is_array($arUrl['PARAMS']) || !isset($arUrl['PARAMS']['resizable']) || $arUrl['PARAMS']['resizable'] !== false)) {
         $pos = strpos($arUrl['URL'], '?');
         if ($pos === false) {
             $check_url = $arUrl['URL'];
         } else {
             $check_url = substr($arUrl['URL'], 0, $pos);
         }
         $arPos = CUtil::GetPopupSize($check_url, $arUrl['PARAMS']);
         if ($arPos['width']) {
             if (!is_array($arUrl['PARAMS'])) {
                 $arUrl['PARAMS'] = array();
             }
             $arUrl['PARAMS']['width'] = $arPos['width'];
             $arUrl['PARAMS']['height'] = $arPos['height'];
         }
     }
     $dialog_class = 'CDialog';
     if (isset($arUrl['PARAMS']['dialog_type']) && $arUrl['PARAMS']['dialog_type']) {
         switch ($arUrl['PARAMS']['dialog_type']) {
             case 'EDITOR':
                 $dialog_class = 'CEditorDialog';
                 break;
             case 'ADMIN':
                 $dialog_class = 'CAdminDialog';
                 break;
             default:
                 $dialog_class = 'CDialog';
         }
     } elseif (strpos($arUrl['URL'], 'bxpublic=') !== false) {
         $dialog_class = 'CAdminDialog';
     }
     $arDialogParams = array('content_url' => $arUrl['URL'], 'width' => null, 'height' => null);
     if (isset($arUrl['PARAMS']['width'])) {
         $arDialogParams['width'] = intval($arUrl['PARAMS']['width']);
     }
     if (isset($arUrl['PARAMS']['height'])) {
         $arDialogParams['height'] = intval($arUrl['PARAMS']['height']);
     }
     if (isset($arUrl['PARAMS']['min_width'])) {
         $arDialogParams['min_width'] = intval($arUrl['PARAMS']['min_width']);
     }
     if (isset($arUrl['PARAMS']['min_height'])) {
         $arDialogParams['min_height'] = intval($arUrl['PARAMS']['min_height']);
     }
     if (isset($arUrl['PARAMS']['resizable']) && $arUrl['PARAMS']['resizable'] === false) {
         $arDialogParams['resizable'] = false;
     }
     if (isset($arUrl['POST']) && $arUrl['POST']) {
         $arDialogParams['content_post'] = $arUrl['POST'];
     }
     return '(new BX.' . $dialog_class . '(' . CUtil::PhpToJsObject($arDialogParams) . ')).Show()';
 }
Exemple #4
0
        ?>
.DeleteFilter(this.form.filters_list.value)"></div>
	</div>
</div>
</div>
<?php 
    }
    ?>

</div>
<?php 
}
?>

<?php 
$variables = array("mess" => array("calend_title" => GetMessage("interface_grid_date"), "for_all_confirm" => GetMessage("interface_grid_del_confirm"), "settingsTitle" => GetMessage("interface_grid_settings_title"), "settingsSave" => GetMessage("interface_grid_settings_save"), "viewsTitle" => GetMessage("interface_grid_views_title"), "viewsApply" => GetMessage("interface_grid_views_apply"), "viewsApplyTitle" => GetMessage("interface_grid_views_apply_title"), "viewsNoName" => GetMessage("interface_grid_view_noname"), "viewsNewView" => GetMessage("interface_grid_views_new"), "viewsDelete" => GetMessage("interface_grid_del_view"), "viewsFilter" => GetMessage("interface_grid_filter_sel"), "filtersTitle" => GetMessage("interface_grid_filter_saved"), "filtersApply" => GetMessage("interface_grid_apply"), "filtersApplyTitle" => GetMessage("interface_grid_filter_apply_title"), "filtersNew" => GetMessage("interface_grid_filter_new"), "filtersDelete" => GetMessage("interface_grid_filter_del"), "filterSettingsTitle" => GetMessage("interface_grid_filter_title"), "filterHide" => GetMessage("interface_grid_to_head_1"), "filterShow" => GetMessage("interface_grid_from_head_1"), "filterApplyTitle" => GetMessage("interface_grid_filter_apply"), "renameTitle" => GetMessage("interface_grid_name_title")), "ajax" => array("AJAX_ID" => $arParams["AJAX_ID"], "AJAX_OPTION_SHADOW" => $arParams["AJAX_OPTION_SHADOW"] == "Y"), "settingWndSize" => CUtil::GetPopupSize("InterfaceGridSettingWnd"), "viewsWndSize" => CUtil::GetPopupSize("InterfaceGridViewsWnd", array('height' => 350, 'width' => 500)), "filtersWndSize" => CUtil::GetPopupSize("InterfaceGridFiltersWnd", array('height' => 350, 'width' => 500)), "filterSettingWndSize" => CUtil::GetPopupSize("InterfaceGridFilterSettingWnd"), "renameWndSize" => CUtil::GetPopupSize("InterfaceGridRenameWnd", array('height' => 150, 'width' => 500)), "calendar_image" => $this->GetFolder() . "/images/calendar.gif", "server_time" => time() + date("Z") + CTimeZone::GetOffset(), "component_path" => $component->GetRelativePath(), "template_path" => $this->GetFolder(), "sessid" => bitrix_sessid(), "current_url" => $arResult["CURRENT_URL"], "user_authorized" => $USER->IsAuthorized());
?>

<script type="text/javascript">
var settingsDialog<?php 
echo $arParams["GRID_ID"];
?>
;
var viewsDialog<?php 
echo $arParams["GRID_ID"];
?>
;
var filtersDialog<?php 
echo $arParams["GRID_ID"];
?>
;
Exemple #5
0
		"filtersApplyTitle"=>GetMessage("interface_grid_filter_apply_title"),
		"filtersNew"=>GetMessage("interface_grid_filter_new"),
		"filtersDelete"=>GetMessage("interface_grid_filter_del"),
		"filterSettingsTitle"=>GetMessage("interface_grid_filter_title"),
		"filterHide"=>GetMessage("interface_grid_to_head_1"),
		"filterShow"=>GetMessage("interface_grid_from_head_1"),
		"filterApplyTitle"=>GetMessage("interface_grid_filter_apply"),
	),
	"ajax"=>array(
		"AJAX_ID"=>$arParams["AJAX_ID"],
		"AJAX_OPTION_SHADOW"=>($arParams["AJAX_OPTION_SHADOW"] == "Y"),
	),
	"settingWndSize"=>CUtil::GetPopupSize("InterfaceGridSettingWnd"),
	"viewsWndSize"=>CUtil::GetPopupSize("InterfaceGridViewsWnd", array('height' => 350, 'width' => 500)),
	"filtersWndSize"=>CUtil::GetPopupSize("InterfaceGridFiltersWnd", array('height' => 350, 'width' => 500)),
	"filterSettingWndSize"=>CUtil::GetPopupSize("InterfaceGridFilterSettingWnd"),
	"calendar_image"=>$this->GetFolder()."/images/calendar.gif",
	"server_time"=>(time()+date("Z")+CTimeZone::GetOffset()),
	"component_path"=>$component->GetRelativePath(),
	"template_path"=>$this->GetFolder(),
	"sessid"=>freetrix_sessid(),
	"current_url"=>$arResult["CURRENT_URL"],
	"user_authorized"=>$USER->IsAuthorized(),
);
?>

<script type="text/javascript">
var settingsDialog<?php 
echo $arParams["GRID_ID"];
?>
;
 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']);
 }
Exemple #7
0
		"tabSettingsTitle"=>GetMessage("intarface_form_tab"),
		"tabSettingsSave"=>"OK",
		"tabSettingsName"=>GetMessage("intarface_form_tab_name"),
		"tabSettingsCaption"=>GetMessage("intarface_form_tab_title"),
		"fieldSettingsTitle"=>GetMessage("intarface_form_field"),
		"fieldSettingsName"=>GetMessage("intarface_form_field_name"),
		"sectSettingsTitle"=>GetMessage("intarface_form_sect"),
		"sectSettingsName"=>GetMessage("intarface_form_sect_name"),
	),
	"ajax"=>array(
		"AJAX_ID"=>$arParams["AJAX_ID"],
		"AJAX_OPTION_SHADOW"=>($arParams["AJAX_OPTION_SHADOW"] == "Y"),
	),
	"settingWndSize"=>CUtil::GetPopupSize("InterfaceFormSettingWnd"),
	"tabSettingWndSize"=>CUtil::GetPopupSize("InterfaceFormTabSettingWnd", array('width'=>400, 'height'=>200)),
	"fieldSettingWndSize"=>CUtil::GetPopupSize("InterfaceFormFieldSettingWnd", array('width'=>400, 'height'=>150)),
	"component_path"=>$component->GetRelativePath(),
	"template_path"=>$this->GetFolder(),
	"sessid"=>bitrix_sessid(),
	"current_url"=>$APPLICATION->GetCurPageParam("", array("bxajaxid", "AJAX_CALL")),
	"GRID_ID"=>$arParams["THEME_GRID_ID"],
);
?>
<script type="text/javascript">
var formSettingsDialog<?php 
echo $arParams["FORM_ID"];
?>
;

bxForm_<?php 
echo $arParams["FORM_ID"];