本文整理汇总了PHP中CMS_Asset::add_module_js方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS_Asset::add_module_js方法的具体用法?PHP CMS_Asset::add_module_js怎么用?PHP CMS_Asset::add_module_js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMS_Asset
的用法示例。
在下文中一共展示了CMS_Asset::add_module_js方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: anchor
.hidden {
display: none!important;
visibility: hidden;
}
</style>
<?php
$asset = new CMS_Asset();
foreach ($css_files as $file) {
$asset->add_css($file);
}
echo $asset->compile_css();
foreach ($js_files as $file) {
$asset->add_js($file);
}
// also add adjust.js which contain of field adjustment function
$asset->add_module_js('scripts/adjust.js', '{{ module_path }}');
echo $asset->compile_js();
echo '<h4>Project</h4>';
echo anchor(site_url('{{ module_path }}/data/nds/project/'), 'Show All Project', 'class="btn btn-primary"');
echo $output;
?>
<script type="text/javascript">
// if document ready, call adjust when needed
$(document).ready(function(){
var changing_field = 'template_id';
var affected_field = 'options';
var get_restricted_path = '<?php
echo site_url('{{ module_path }}');
?>
'+'/data/ajax/get_restricted_project_option/';
示例2:
<?php
$asset = new CMS_Asset();
$asset->add_module_css('styles/navigation.css', 'main');
foreach ($css_files as $file) {
$asset->add_css($file);
}
echo $asset->compile_css();
foreach ($js_files as $file) {
$asset->add_js($file);
}
$asset->add_module_js('scripts/navigation.js', 'main');
echo $asset->compile_js();
echo $output;
示例3: exit
<!DOCTYPE html>
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
$asset = new CMS_Asset();
$asset->add_module_css('styles/navigation.css', 'simpeg_stmik');
foreach ($css_files as $file) {
$asset->add_css($file);
}
echo $asset->compile_css();
foreach ($js_files as $file) {
$asset->add_js($file);
}
$asset->add_module_js('scripts/navigation.js', 'simpeg_stmik');
echo $asset->compile_js();
echo $output;
示例4:
<?php
$asset = new CMS_Asset();
foreach ($css_files as $file) {
$asset->add_css($file);
}
echo $asset->compile_css();
foreach ($js_files as $file) {
$asset->add_js($file);
}
$asset->add_module_js('scripts/privilege.js', 'main');
echo $asset->compile_js();
echo $output;