本文整理汇总了PHP中CFileInput::menuNew方法的典型用法代码示例。如果您正苦于以下问题:PHP CFileInput::menuNew方法的具体用法?PHP CFileInput::menuNew怎么用?PHP CFileInput::menuNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileInput
的用法示例。
在下文中一共展示了CFileInput::menuNew方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DisplayControl
private static function DisplayControl($inputs = array())
{
self::$menuNew = array();
self::$menuExist = array();
if ($inputs['upload']) {
self::$menuNew[] = array("ID" => "upload", "GLOBAL_ICON" => "adm-menu-upload-pc", "TEXT" => GetMessage("ADM_FILE_UPLOAD"), "CLOSE_ON_CLICK" => false);
self::$menuExist[] = array("ID" => "upload", "GLOBAL_ICON" => "adm-menu-upload-pc", "TEXT" => GetMessage("ADM_FILE_NEW_UPLOAD"), "CLOSE_ON_CLICK" => false);
}
if ($inputs['medialib']) {
self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_MEDIALIB"), "GLOBAL_ICON" => "adm-menu-upload-medialib", "ONCLICK" => "OpenMedialibDialog" . self::$jsId . "()");
self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_MEDIALIB"), "GLOBAL_ICON" => "adm-menu-upload-medialib", "ONCLICK" => "OpenMedialibDialog" . self::$jsId . "()");
}
if ($inputs['file_dialog']) {
self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_SITE"), "GLOBAL_ICON" => "adm-menu-upload-site", "ONCLICK" => "OpenFileDialog" . self::$jsId . "()");
self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_SITE"), "GLOBAL_ICON" => "adm-menu-upload-site", "ONCLICK" => "OpenFileDialog" . self::$jsId . "()");
}
if ($inputs['cloud']) {
self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_CLOUD"), "GLOBAL_ICON" => "adm-menu-upload-cloud", "ONCLICK" => "OpenCloudDialog" . self::$jsId . "()");
self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_CLOUD"), "GLOBAL_ICON" => "adm-menu-upload-cloud", "ONCLICK" => "OpenCloudDialog" . self::$jsId . "()");
}
$arConfig = array('id' => self::$jsId, 'fileExists' => self::$bFileExists, 'files' => self::$curFiles, 'menuNew' => self::$menuNew, 'menuExist' => self::$menuExist, 'multiple' => self::$bMultiple, 'useUpload' => self::$bUseUpload, 'useMedialib' => self::$bUseMedialib, 'useFileDialog' => self::$bUseFileDialog, 'useCloud' => self::$bUseCloud, 'delName' => self::$delInputName, 'descName' => self::$descInputName, 'inputSize' => self::$inputSize, 'minPreviewHeight' => self::$minPreviewHeight, 'minPreviewWidth' => self::$minPreviewWidth, 'showDesc' => self::$bShowDescInput, 'showDel' => self::$bShowDelInput, 'maxCount' => self::$maxCount, 'viewMode' => self::$bViewMode);
if (self::$bMultiple) {
$arConfig['inputNameTemplate'] = self::$inputNameTemplate;
} else {
$arConfig['inputs'] = self::$arInputs;
}
if (self::$bUseCloud) {
$arConfig['cloudDialogPath'] = '/bitrix/admin/clouds_file_search.php?lang=' . LANGUAGE_ID . '&n=';
}
//Base container
?>
<div class="adm-input-file-control" id="<?php
echo self::$jsId . '_cont';
?>
"><?php
if (!self::$bViewMode) {
self::DisplayDialogs();
}
if (self::$bFileExists) {
foreach (self::$curFiles as $ind => $arFile) {
self::DisplayFile($arFile, $ind);
}
}
?>
<script type="text/javascript">new top.BX.file_input(<?php
echo CUtil::PHPToJSObject($arConfig);
?>
);</script>
</div>
<?php
/* Used to refresh form content - workaround for IE bug (mantis:37969) */
?>
<div id="<?php
echo self::$jsId . '_ie_bogus_container';
?>
"><input type="hidden" value="" /></div>
<?php
}