当前位置: 首页>>代码示例>>PHP>>正文


PHP rex_view::addJSFile方法代码示例

本文整理汇总了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
开发者ID:darwin26,项目名称:rex5_multiupload,代码行数:29,代码来源:boot.php

示例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
开发者ID:FriendsOfREDAXO,项目名称:aufgaben,代码行数:31,代码来源:boot.php


注:本文中的rex_view::addJSFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。