本文整理匯總了PHP中rex_view::addJSFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP rex_view::addJSFile方法的具體用法?PHP rex_view::addJSFile怎麽用?PHP rex_view::addJSFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rex_view
的用法示例。
在下文中一共展示了rex_view::addJSFile方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<?php
/**
* rex5_multiupload Addon.
* @author Friends Of REDAXO
* @package redaxo
* @var rex_addon $this
*/
$addon = rex_addon::get('rex5_multiupload');
// --- DYN
$properties = array('folder' => rex_path::media(), 'sync_cats' => '1', 'instant_upload_start' => '1', 'upload_simultaneously' => '5', 'clear_uploadlist_automatically' => '0', 'clear_file_after_finish' => '1', 'show_footnote' => '0', 'php_debug' => '0', 'javascript_debug' => '0');
foreach ($properties as $key => $val) {
$addon->setProperty($key, $val);
}
// --- /DYN
// --- HEADER
if (rex::isBackend()) {
rex_view::addCssFile($addon->getAssetsUrl('fileuploader.css'));
rex_view::addJSFile($addon->getAssetsUrl('fileuploader.js'));
$_REX_HACK_OPENER = "";
$_REX_HACK_OPENER = rex_request('opener_input_field', 'string');
$header = PHP_EOL . ' ' . PHP_EOL . ' <!-- rex5_multiupload -->' . PHP_EOL . ' <script type="text/javascript">var lastMediaPoolOpener = "' . $_REX_HACK_OPENER . '";</script>' . PHP_EOL . ' <!-- ###MULTIUPLOAD_EP_REPLACE### -->' . PHP_EOL . ' <!-- /rex5_multiupload -->' . PHP_EOL;
rex_extension::register('OUTPUT_FILTER', function (rex_extension_point $ep) use($header) {
$suchmuster = '</head>';
$ersetzen = $header . "\n</head>";
$ep->setSubject(str_replace($suchmuster, $ersetzen, $ep->getSubject()));
});
}
// --- /HEADER
示例2: function
<?php
if (rex::isBackend() && rex::getUser()) {
//////////
// JS
//////////
$current_page = rex_be_controller::getCurrentPage();
rex_view::addJSFile($this->getAssetsUrl('js/jquery.sumoselect.js'));
rex_view::addJSFile($this->getAssetsUrl('js/kanban.js'));
rex_view::addJSFile($this->getAssetsUrl('js/jquery.simplecolorpicker.js'));
rex_view::addJSFile($this->getAssetsUrl('js/moments.js'));
rex_view::addJSFile($this->getAssetsUrl('js/pikaday.js'));
rex_view::addJSFile($this->getAssetsUrl('js/custom.js'));
///////////
// SCSS
///////////
rex_extension::register('PACKAGES_INCLUDED', function () {
if (rex::getUser() && $this->getProperty('compile')) {
$compiler = new rex_scss_compiler();
$scss_files = rex_extension::registerPoint(new rex_extension_point('BE_STYLE_SCSS_FILES', [$this->getPath('scss/master.scss')]));
$compiler->setScssFile($scss_files);
$compiler->setCssFile($this->getPath('assets/css/styles.css'));
$compiler->compile();
rex_file::copy($this->getPath('assets/css/styles.css'), $this->getAssetsPath('css/styles.css'));
}
});
rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
///////////
// Subpages
///////////
// aufgaben Listenansicht