本文整理汇总了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