本文整理汇总了PHP中CUtil::GetAdditionalFileURL方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::GetAdditionalFileURL方法的具体用法?PHP CUtil::GetAdditionalFileURL怎么用?PHP CUtil::GetAdditionalFileURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUtil
的用法示例。
在下文中一共展示了CUtil::GetAdditionalFileURL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initScripts
/**
* Sets viewport-metadata
*/
public static function initScripts()
{
global $APPLICATION;
$APPLICATION->AddHeadString("<script type=\"text/javascript\"> var appVersion = " . self::$apiVersion . ";var platform = \"" . self::$platform . "\";</script>", false, true);
$APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/" . self::$platform . "-cordova-2.0.0.js") . "\"></script>", false, true);
if ($APPLICATION->IsJSOptimized()) {
$APPLICATION->AddHeadScript("/bitrix/js/mobileapp/bitrix_mobile.js");
} else {
$APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/bitrix_mobile.js") . "\"></script>", false, true);
}
if (self::$platform == "android") {
$APPLICATION->AddHeadString("<script type=\"text/javascript\">app.bindloadPageBlank();</script>", false, false);
}
$APPLICATION->AddHeadString(CMobile::getInstance()->getViewPort());
}
示例2: _loadCSS
private static function _loadCSS($css, $bReturn)
{
/** @global CMain $APPLICATION */
global $APPLICATION;
if (is_array($css)) {
$ret = '';
foreach ($css as $css_file) {
$ret .= self::_loadCSS($css_file, $bReturn);
}
return $ret;
}
$css_filename = $_SERVER['DOCUMENT_ROOT'] . $css;
if (!file_exists($css_filename)) {
return '';
}
if ($bReturn) {
return '<link href="' . CUtil::GetAdditionalFileURL($css) . '" type="text/css" rel="stylesheet" />' . "\r\n";
} else {
$APPLICATION->SetAdditionalCSS($css);
}
return '';
}
示例3: ShowSound
function ShowSound()
{
/** @global CMain $APPLICATION */
global $USER, $APPLICATION;
$res = '';
if($USER->IsAuthorized() && !isset($_COOKIE[COption::GetOptionString("main", "cookie_name", "FREETRIX_SM").'_SOUND_LOGIN_PLAYED']))
{
$aUserOptGlobal = CUserOptions::GetOption("global", "settings");
if($aUserOptGlobal["sound"] == 'Y')
{
if($aUserOptGlobal["sound_login"] == '')
$aUserOptGlobal["sound_login"] = "/freetrix/sounds/main/freetrix_tune.mp3";
ob_start();
$APPLICATION->IncludeComponent("freetrix:player", "",
Array(
"PLAYER_TYPE" => "flv",
"PATH" => htmlspecialcharsbx($aUserOptGlobal["sound_login"]),
"WIDTH" => "1",
"HEIGHT" => "1",
"CONTROLBAR" => "none",
"AUTOSTART" => "Y",
"REPEAT" => "N",
"VOLUME" => "90",
"MUTE" => "N",
"HIGH_QUALITY" => "Y",
"BUFFER_LENGTH" => "2",
"PROVIDER"=>"sound",
),
null, array("HIDE_ICONS"=>"Y")
);
$res = ob_get_contents();
ob_end_clean();
$res = '
<script type="text/javascript" src="'.CUtil::GetAdditionalFileURL('/freetrix/components/freetrix/player/mediaplayer/flvscript.js', true).'"></script>
<div style="position:absolute; top:-1000px; left:-1000px;">
'.$res.'
</div>
';
}
}
return $res;
}
示例4: array_unique
$arCSSNew[] = $css_path;
}
}
$arCSSNew = array_unique($arCSSNew);
$arHeadScriptsNew = $APPLICATION->arHeadScripts;
if (!$APPLICATION->oAsset->optimizeJs()) {
$arHeadScriptsNew = array_merge(CJSCore::GetScriptsList(), $arHeadScriptsNew);
}
$arAdditionalData["CSS"] = array();
foreach ($arCSSNew as $style) {
$arAdditionalData["CSS"][] = CUtil::GetAdditionalFileURL($style);
}
$arAdditionalData['SCRIPTS'] = array();
$arHeadScriptsNew = array_unique($arHeadScriptsNew);
foreach ($arHeadScriptsNew as $script) {
$arAdditionalData["SCRIPTS"][] = CUtil::GetAdditionalFileURL($script);
}
$additional_data = '<script type="text/javascript" bxrunfirst="true">' . "\n";
$additional_data .= 'top.__logGetNextPageLinkEntities(' . CUtil::PhpToJSObject($component->arResult["ENTITIES_XML_ID"]) . ', ' . CUtil::PhpToJSObject($component->arResult["ENTITIES_CORRESPONDENCE"]) . ');';
$additional_data .= '</script>';
if ($arResult["AJAX_CALL"]) {
$strText = ob_get_clean();
echo CUtil::PhpToJSObject(array("PROPS" => array("CONTENT" => $additional_data . $strText, "STRINGS" => array(), "JS" => $arAdditionalData["SCRIPTS"], "CSS" => $arAdditionalData["CSS"]), "LAST_TS" => $arResult["dateLastPageTS"] ? intval($arResult["dateLastPageTS"]) : 0));
} else {
echo $additional_data;
}
if (CModule::IncludeModule("pull")) {
CPullWatch::DeferredSql();
}
die;
}
示例5: GetHTML
function GetHTML($arBanner, $bNoIndex = false)
{
$strReturn = "";
// обрабатываем изображение
if (intval($arBanner["IMAGE_ID"]) > 0 && $arBanner["AD_TYPE"] != "html") {
$arImage = CFile::GetFileArray($arBanner["IMAGE_ID"]);
if ($arImage) {
$file_type = GetFileType($arImage["FILE_NAME"]);
$path = $arImage["SRC"];
switch ($file_type) {
case "FLASH":
$arParams = array();
$url = $param = "";
$alt = $a_title = $a_target = "";
if (strlen(trim($arBanner["URL"])) > 0) {
$param = CAdvBanner::PrepareHTML($arBanner["URL"], $arBanner);
$param = CAdvBanner::GetRedirectURL($param, $arBanner);
$url = $param;
$arParams[] = "flash_link=" . urlencode($param);
if (strlen(trim($arBanner["URL_TARGET"])) > 0) {
$arParams[] = "flash_target=" . urlencode($arBanner["URL_TARGET"]);
$a_target = ' target="' . htmlspecialcharsbx($arBanner["URL_TARGET"]) . '" ';
}
}
if (strlen(trim($arBanner["IMAGE_ALT"])) > 0) {
$alt = CAdvBanner::PrepareHTML($arBanner["IMAGE_ALT"], $arBanner);
$arParams[] = "flash_alt=" . urlencode($alt);
$a_title = " title=\"" . htmlspecialcharsbx($alt) . "\" ";
}
if (count($arParams) > 0) {
$param = "?" . implode("&", $arParams);
}
if ($arBanner["FLASH_TRANSPARENT"] == '') {
$arBanner["FLASH_TRANSPARENT"] = 'transparent';
}
if ($arBanner["FLASH_JS"] != 'Y') {
$strReturn = '<div style="width: ' . $arImage["WIDTH"] . 'px; height: ' . $arImage["HEIGHT"] . 'px; padding:0; margin:0">';
if (strlen(trim($arBanner["URL"])) > 0 && $arBanner["NO_URL_IN_FLASH"] == "Y") {
$strReturn .= ($bNoIndex ? '<noindex>' : '') . '<div style="position:absolute; z-index:100;"><a href="' . $url . '"' . $a_target . $a_title . ($bNoIndex ? ' rel="nofollow"' : '') . '><img src="/bitrix/images/1.gif" width="' . $arImage["WIDTH"] . '" height="' . $arImage["HEIGHT"] . '" style="border:0;" alt="' . htmlspecialcharsEx($alt) . '" /></a></div>' . ($bNoIndex ? '</noindex>' : '');
}
$strReturn .= '<OBJECT
classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
id="banner_' . $arBanner["ID"] . '"
WIDTH="' . $arImage["WIDTH"] . '"
HEIGHT="' . $arImage["HEIGHT"] . '">
<PARAM NAME="movie" VALUE="' . $path . $param . '" />
<PARAM NAME="quality" VALUE="high" />
<PARAM NAME="bgcolor" VALUE="#FFFFFF" />
<PARAM NAME="wmode" VALUE="' . $arBanner["FLASH_TRANSPARENT"] . '" />
<EMBED
src="' . $path . $param . '"
quality="high"
bgcolor="#FFFFFF"
wmode="' . $arBanner["FLASH_TRANSPARENT"] . '"
WIDTH="' . $arImage["WIDTH"] . '"
HEIGHT="' . $arImage["HEIGHT"] . '"
NAME="banner"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT></div>';
} else {
$strReturn = "";
static $bScript = null;
if ($bScript === null) {
$bScript = true;
$strReturn .= '<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL('/bitrix/js/advertising/flash.js') . '"></script>';
}
$altImgPath = '';
$arAltImage = CFile::GetFileArray($arBanner["FLASH_IMAGE"]);
if ($arAltImage) {
$altImgPath = $arAltImage["SRC"];
}
$test_id = 'id' . RandString(10);
$strReturn .= '<div id="' . $test_id . '" style="width: ' . $arImage["WIDTH"] . 'px; height: ' . $arImage["HEIGHT"] . 'px; padding:0; margin:0;">';
$altHref = '';
if (trim($arBanner["URL"]) != '') {
if ($arBanner["NO_URL_IN_FLASH"] == "Y") {
$strReturn .= ($bNoIndex ? '<noindex>' : '') . '<div style="position:absolute; z-index:100;"><a href="' . $url . '"' . $a_target . $a_title . ($bNoIndex ? ' rel="nofollow"' : '') . '><img src="/bitrix/images/1.gif" width="' . $arImage["WIDTH"] . '" height="' . $arImage["HEIGHT"] . '" style="border:0;" alt="' . htmlspecialcharsEx($alt) . '" /></a></div>' . ($bNoIndex ? '</noindex>' : '');
} else {
$altHref = $url;
}
}
$strReturn .= '</div>';
$strReturn .= '<script type="text/javascript">bx_adv_includeFlash("' . $test_id . '", "' . CUtil::JSEscape($path . $param) . '", "' . $arImage["WIDTH"] . '", "' . $arImage["HEIGHT"] . '", "' . $arBanner["FLASH_TRANSPARENT"] . '", "' . CUtil::JSEscape($altImgPath) . '", ' . (intval($arBanner["FLASH_VER"]) <= 0 ? 'null' : intval($arBanner["FLASH_VER"])) . ', "' . CUtil::JSEscape($altHref) . '", "' . CUtil::JSEscape(htmlspecialcharsbx($arBanner["URL_TARGET"])) . '", "' . CUtil::JSEscape(htmlspecialcharsbx($alt)) . '");</script>';
}
break;
default:
$alt = CAdvBanner::PrepareHTML(trim($arBanner["IMAGE_ALT"]), $arBanner);
$strImage = "<img alt=\"" . htmlspecialcharsEx($alt) . "\" title=\"" . htmlspecialcharsEx($alt) . "\" src=\"" . $path . "\" width=\"" . $arImage["WIDTH"] . "\" height=\"" . $arImage["HEIGHT"] . "\" style=\"border:0;\" />";
if (strlen(trim($arBanner["URL"])) > 0) {
$url = $arBanner["URL"];
$url = CAdvBanner::PrepareHTML($url, $arBanner);
$url = CAdvBanner::GetRedirectURL($url, $arBanner);
$target = strlen(trim($arBanner["URL_TARGET"])) > 0 ? " target=\"" . $arBanner["URL_TARGET"] . "\" " : "";
$strReturn = ($bNoIndex ? '<noindex>' : '') . "<a href=\"" . $url . "\"" . $target . ($bNoIndex ? ' rel="nofollow"' : '') . ">" . $strImage . "</a>" . ($bNoIndex ? '</noindex>' : '');
} else {
$strReturn .= $strImage;
}
//.........这里部分代码省略.........
示例6: GetMessage
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$APPLICATION->AddHeadString('<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL(SITE_TEMPLATE_PATH . "/im_mobile.js") . '"></script>');
$frame = \Bitrix\Main\Page\Frame::getInstance();
$frame->setEnable();
$frame->setUseAppCache();
$frame->startDynamicWithID("im_notify_legacy_" . $USER->GetId());
if (empty($arResult)) {
?>
<div class="notif-block-empty"><?php
echo GetMessage('NM_EMPTY');
?>
</div>
<?php
} else {
?>
<div class="notif-block-wrap" id="notif-block-wrap">
<?php
$jsIds = "";
$maxId = 0;
$newFlag = false;
$firstNewFlag = true;
foreach ($arResult as $data) {
$avatarId = "notif-avatar-" . randString(5);
$jsIds .= $jsIds !== "" ? ', "' . $avatarId . '"' : '"' . $avatarId . '"';
$arFormat = array("tommorow" => "tommorow, " . GetMessage('NM_FORMAT_TIME'), "today" => "today, " . GetMessage('NM_FORMAT_TIME'), "yesterday" => "yesterday, " . GetMessage('NM_FORMAT_TIME'), "" => GetMessage('NM_FORMAT_DATE'));
$maxId = $data['id'] > $maxId ? $data['id'] : $maxId;
$data['date'] = FormatDate($arFormat, $data['date']);
示例7: array
//login-main-wrapper
?>
<div style="display: none;" id="window_wrapper"></div>
<script type="text/javascript">
BX.ready(BX.defer(function(){
BX.addClass(document.body, 'login-animate');
BX.addClass(document.body, 'login-animate-popup');
<?php
$arPreload = array('CSS' => array('/bitrix/panel/main/admin.css', '/bitrix/panel/main/admin-public.css', '/bitrix/panel/main/adminstyles_fixed.css', '/bitrix/themes/.default/modules.css'), 'JS' => array('/bitrix/js/main/utils.js', '/bitrix/js/main/admin_tools.js', '/bitrix/js/main/popup_menu.js', '/bitrix/js/main/admin_search.js', '/bitrix/js/main/dd.js', '/bitrix/js/main/core/core_popup.js', '/bitrix/js/main/core/core_date.js', '/bitrix/js/main/core/core_admin_interface.js', '/bitrix/js/main/core/core_autosave.js', '/bitrix/js/main/core/core_fx.js'));
foreach ($arPreload['CSS'] as $key => $file) {
$arPreload['CSS'][$key] = CUtil::GetAdditionalFileURL($file, true);
}
foreach ($arPreload['JS'] as $key => $file) {
$arPreload['JS'][$key] = CUtil::GetAdditionalFileURL($file, true);
}
?>
//preload admin scripts&styles
setTimeout("BX.loadCSS(['<?php
echo implode("','", $arPreload['CSS']);
?>
']); BX.ajax.loadScriptAjax(['<?php
echo implode("','", $arPreload['JS']);
?>
'], null, true);", 2000);
}));
new BX.COpener({DIV: 'login_lang_button', ACTIVE_CLASS: 'login-language-btn-active', MENU: <?php
echo CUtil::PhpToJsObject($arLangButton['MENU']);
示例8: _PrepareAdditionalData
function _PrepareAdditionalData()
{
/** @global CMain $APPLICATION */
global $APPLICATION;
// get CSS changes list
if ($this->bStyle) {
$arCSSList = $APPLICATION->sPath2css;
$cnt_old = count($this->arCSSList);
$cnt_new = count($arCSSList);
$arCSSNew = array();
if ($cnt_old != $cnt_new) {
for ($i = $cnt_old; $i < $cnt_new; $i++) {
$css_path = $arCSSList[$i];
if (strtolower(substr($css_path, 0, 7)) != 'http://' && strtolower(substr($css_path, 0, 8)) != 'https://') {
if (($p = strpos($css_path, "?")) > 0) {
$css_file = substr($css_path, 0, $p);
} else {
$css_file = $css_path;
}
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $css_file)) {
$arCSSNew[] = $arCSSList[$i];
}
} else {
$arCSSNew[] = $arCSSList[$i];
}
}
}
}
// get scripts changes list
$arHeadScripts = $APPLICATION->arHeadScripts;
$cnt_old = count($this->arHeadScripts);
$cnt_new = count($arHeadScripts);
$arHeadScriptsNew = array();
if ($cnt_old != $cnt_new) {
for ($i = $cnt_old; $i < $cnt_new; $i++) {
$arHeadScriptsNew[] = $arHeadScripts[$i];
}
}
if (!$APPLICATION->oAsset->optimizeJs()) {
$arHeadScriptsNew = array_merge(CJSCore::GetScriptsList(), $arHeadScriptsNew);
}
// prepare additional data
$arAdditionalData = array();
$arAdditionalData['TITLE'] = htmlspecialcharsback($APPLICATION->GetTitle());
$arAdditionalData['WINDOW_TITLE'] = htmlspecialcharsback($APPLICATION->GetTitle('title'));
$arAdditionalData['SCRIPTS'] = array();
$arHeadScriptsNew = array_unique($arHeadScriptsNew);
foreach ($arHeadScriptsNew as $script) {
$arAdditionalData['SCRIPTS'][] = CUtil::GetAdditionalFileURL($script);
}
if (null !== $this->__nav_params) {
$arAdditionalData['NAV_CHAIN'] = $APPLICATION->GetNavChain($this->__nav_params[0], $this->__nav_params[1], $this->__nav_params[2], $this->__nav_params[3], $this->__nav_params[4]);
}
if ($this->bStyle) {
$arAdditionalData["CSS"] = array();
/** @noinspection PhpUndefinedVariableInspection */
$arCSSNew = array_unique($arCSSNew);
foreach ($arCSSNew as $style) {
$arAdditionalData['CSS'][] = CUtil::GetAdditionalFileURL($style);
}
}
$additional_data = '<script type="text/javascript" bxrunfirst="true">' . "\n";
$additional_data .= 'var arAjaxPageData = ' . CUtil::PhpToJSObject($arAdditionalData) . ";\r\n";
$additional_data .= 'top.BX.ajax.UpdatePageData(arAjaxPageData)' . ";\r\n";
$additional_data .= '</script><script type="text/javascript">';
if (!$this->bIFrameMode && $this->bHistory) {
$additional_data .= 'top.BX.ajax.history.put(window.AJAX_PAGE_STATE.getState(), \'' . CUtil::JSEscape(CAjax::encodeURI($APPLICATION->GetCurPageParam('', array(BX_AJAX_PARAM_ID), false))) . '\')' . ";\r\n";
}
if ($this->bJump) {
if ($this->bIFrameMode) {
$additional_data .= 'top.setTimeout(\'BX.scrollToNode("comp_' . $this->componentID . '")\', 100)' . ";\r\n";
} else {
$additional_data .= 'top.BX.scrollToNode(\'comp_' . $this->componentID . '\')' . ";\r\n";
}
}
$additional_data .= '</script>';
echo $additional_data;
}
示例9:
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$APPLICATION->SetAdditionalCSS(CUtil::GetAdditionalFileURL('/bitrix/js/mobileapp/interface.css'));
if ($arResult['GET_JS']) {
echo '<script type="text/javascript">' . file_get_contents($_SERVER['DOCUMENT_ROOT'] . $templateFolder . '/script.js') . '</script>';
}
?>
<script type="text/javascript">
topSwichControl = new __MATopSwitchersControl({
itemSelectedId: "<?php
echo $arResult['SELECTED'];
?>
",
callbackFunc: "<?php
echo $arResult['JS_CALLBACK_FUNC'];
?>
"
});
</script>
<div class="order_nav">
<ul>
<?php
foreach ($arParams["ITEMS"] as $key => $text) {
?>
<li id="top_sw_<?php
echo $key;
?>
" <?php
示例10: initScripts
/**
* Sets viewport-metadata
*/
public static function initScripts()
{
global $APPLICATION;
$pgJsFile = "/bitrix/js/mobileapp/" . self::$platform . "-cordova-" . self::$pgVersion . ".js";
if (!file_exists($_SERVER["DOCUMENT_ROOT"] . $pgJsFile)) {
$pgJsFile = self::$remoteScriptPath . self::$platform . "-cordova-" . self::$pgVersion . ".js";
}
$APPLICATION->AddHeadString("<script type=\"text/javascript\"> var appVersion = " . self::$apiVersion . ";var platform = \"" . self::$platform . "\";</script>", false, true);
$APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL($pgJsFile) . "\"></script>", false, true);
$APPLICATION->AddHeadString("<script type=\"text/javascript\" src=\"" . CUtil::GetAdditionalFileURL("/bitrix/js/mobileapp/bitrix_mobile.js") . "\"></script>", false, true);
if (self::$platform == "android") {
$APPLICATION->AddHeadString("<script type=\"text/javascript\">app.bindloadPageBlank();</script>", false, false);
}
$APPLICATION->AddHeadString(CMobile::getInstance()->getViewPort());
}
示例11: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if ($arParams['FORUM_ID'] > 0) {
if ($arParams['MINIMAL']) {
?>
<script type="text/javascript">
if (!window.onForumImageLoad)
{
BX.loadCSS('<?php
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/forum.comments/templates/.default/style.css', true);
?>
');
BX.loadScript('<?php
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/forum.comments/templates/.default/script.js', true);
?>
');
}
else
{
window.onForumImagesLoad();
}
</script><?php
}
$APPLICATION->IncludeComponent("bitrix:forum.comments", ".default", array("FORUM_ID" => $arParams['FORUM_ID'], "ENTITY_TYPE" => MEETING_ITEMS_COMMENTS_ENTITY_TYPE, "ENTITY_ID" => $arResult['ITEM']['ID'], "ENTITY_XML_ID" => "MEETING_ITEM_" . $arResult['ITEM']['ID'], "URL_TEMPLATES_PROFILE_VIEW" => COption::GetOptionString('intranet', 'path_user', '/company/personal/user/#USER_ID#/', SITE_ID), "CACHE_TYPE" => "A", "CACHE_TIME" => "36000", "MESSAGES_PER_PAGE" => "50", "PAGE_NAVIGATION_TEMPLATE" => "", "DATE_TIME_FORMAT" => CDatabase::DateFormatToPHP(FORMAT_DATETIME), "PATH_TO_SMILE" => "/bitrix/images/forum/smile/", "EDITOR_CODE_DEFAULT" => "N", "SHOW_MODERATION" => "Y", "SHOW_AVATAR" => "Y", "SHOW_RATING" => $arParams['MINIMAL'] ? "N" : "Y", "SHOW_MINIMIZED" => "N", "USE_CAPTCHA" => "N", "PREORDER" => "Y", "SHOW_LINK_TO_FORUM" => "N", "SHOW_SUBSCRIBE" => "N", "FILES_COUNT" => 10, "AJAX_MODE" => 'Y', "AJAX_OPTION_HISTORY" => $arParams['MINIMAL'] ? "N" : "Y", "AJAX_OPTION_ADDITIONAL" => "MEETING_ITEM_" . $arResult['ITEM']['ID'] . "_" . $arParams['COMMENTS'], "SHOW_WYSIWYG_EDITOR" => $arParams['MINIMAL'] ? "N" : "Y", "AUTOSAVE" => $arParams['MINIMAL'] ? false : true, "PERMISSION" => "M", "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"]), null, array('HIDE_ICONS' => 'Y'));
}
示例12: if
= null;
<? if (sizeof($arValue) < 1) { ?>
BX.addCustomEvent(<?php
echo $controller;
?>
.parentNode, "BFileDLoadFormController", function() {
<? } ?>
if (! <?php
echo $controller;
?>
.loaded)
{
BX.loadScript(
[
'<?php
echo CUtil::GetAdditionalFileURL('/bitrix/components/bitrix/main.file.input/templates/drag_n_drop/script.js');
?>
',
'/bitrix/js/main/core/core_ajax.js',
'/bitrix/js/main/core/core_dd.js'
], function() {
<?php
echo $controller;
?>
.loaded = true;
var dropbox = new BX.DD.dropFiles();
var variant = 'simple';
if (dropbox && dropbox.supported() && BX.ajax.FormData.isSupported())
{
示例13: AttachJSScripts
public static function AttachJSScripts()
{
if (!defined("BX_B_FILE_DIALOG_SCRIPT_LOADED")) {
// define("BX_B_FILE_DIALOG_SCRIPT_LOADED", true);
?>
if (window.jsUtils)
{
jsUtils.addEvent(window, 'load', function(){jsUtils.loadJSFile('<?php
echo CUtil::GetAdditionalFileURL("/bitrix/js/main/file_dialog.js");
?>
');}, false);
}
<?php
}
}
示例14: ShowPanelScripts
function ShowPanelScripts($bReturn = false)
{
global $APPLICATION, $adminPage;
static $bPanelScriptsIncluded = false;
if ($bPanelScriptsIncluded) {
return null;
}
$bPanelScriptsIncluded = true;
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/init_admin.php";
if (!$bReturn) {
CUtil::InitJSCore(array('window', 'ajax', 'admin'));
$APPLICATION->AddHeadString($adminPage->ShowScript());
$APPLICATION->AddHeadScript('/bitrix/js/main/public_tools.js');
$APPLICATION->SetAdditionalCSS(ADMIN_THEMES_PATH . '/' . ADMIN_THEME_ID . '/pubstyles.css');
} else {
return CUtil::InitJSCore(array('window', 'ajax', 'admin'), true) . $adminPage->ShowScript() . '
<script type="text/javascript" src="' . CUtil::GetAdditionalFileURL('/bitrix/js/main/public_tools.js', true) . '"></script>
<link rel="stylesheet" type="text/css" href="' . CUtil::GetAdditionalFileURL(ADMIN_THEMES_PATH . '/' . ADMIN_THEME_ID . '/pubstyles.css', true) . '" />
';
}
return null;
}
示例15: _filter
/**
*
* @param array[int]string $match
* @return string
*
*/
private function _filter($match)
{
$attribute = $match[1];
$open_quote = $match[2];
$prefix = $match[3];
$link = $match[4];
$extension = $match[5];
$params = $match[6];
$close_quote = $match[7];
$location = null;
if (self::$ajax && $extension === "js") {
return $match[0];
}
//if(preg_match("/^background/i", $attribute))
// $proto = self::$proto."://";
//else
$proto = "//";
foreach (self::$config->getLocations() as $location) {
/* @var CBitrixCloudCDNLocation $location */
if ($location->getProto() === self::$proto) {
$server = $location->getServerNameByPrefixAndExtension($prefix, $extension, $link);
if ($server !== "") {
$filePath = $prefix . $link . $extension;
if ($params === '') {
$filePath = CUtil::GetAdditionalFileURL($filePath);
}
//Fix spaces in the link
$link = str_replace(" ", "%20", $link);
return $attribute . $open_quote . $proto . $server . $filePath . $params . $close_quote;
}
}
}
return $match[0];
}