本文整理汇总了PHP中helpers\Assets::js方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::js方法的具体用法?PHP Assets::js怎么用?PHP Assets::js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers\Assets
的用法示例。
在下文中一共展示了Assets::js方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeFunction
public function executeFunction($link, $type)
{
switch ($type) {
case 'js':
Assets::js([$link]);
break;
case 'css':
Assets::css([$link]);
break;
}
}
示例2:
<li>
<a href="/#contato">Contato</a>
</li>
<li class="footer-menu-divider">⋅</li>
<li>
<p><strong>Email: </strong><a href="mailto:jrobertoonb@gmail.com">jrobertoonb@gmail.com</a></p>
</li>
<li>
<p><strong>Phone: </strong><a href="tel:974764843">o11 - 97476-4843</a></p>
</li>
</ul>
<p class="copyright text-muted small">José Roberto de Oliveira 2016.</p>
</div>
</div>
</div>
</footer>
<?php
Assets::js(array('//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例3:
<?php
/**
* Sample layout
*/
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array('/app/templates/default/js/jquery.js', '/app/templates/default/js/bootstrap.min.js', '/app/templates/default/js/scrollingSidebar.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例4:
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array(Url::templatePath() . 'css/bootstrap.min.css', Url::templatePath() . 'css/londinium-theme.css', Url::templatePath() . 'css/icons.css', Url::templatePath() . 'css/styles.css', Url::templatePath() . 'css/video-js.css', 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=latin,cyrillic-ext'));
//hook for plugging in css
$hooks->run('css');
?>
<!-- JS -->
<?php
Assets::js(array('http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js', Url::templatePath() . 'js/plugins/charts/sparkline.min.js', Url::templatePath() . 'js/plugins/forms/uniform.min.js', Url::templatePath() . 'js/plugins/forms/select2.min.js', Url::templatePath() . 'js/plugins/forms/inputmask.js', Url::templatePath() . 'js/plugins/forms/autosize.js', Url::templatePath() . 'js/plugins/forms/inputlimit.min.js', Url::templatePath() . 'js/plugins/forms/listbox.js', Url::templatePath() . 'js/plugins/forms/multiselect.js', Url::templatePath() . 'js/plugins/forms/validate.min.js', Url::templatePath() . 'js/plugins/forms/tags.min.js', Url::templatePath() . 'js/plugins/forms/switch.min.js', Url::templatePath() . 'js/plugins/forms/uploader/plupload.full.min.js', Url::templatePath() . 'js/plugins/forms/uploader/plupload.queue.min.js', Url::templatePath() . 'js/plugins/forms/wysihtml5/wysihtml5.min.js', Url::templatePath() . 'js/plugins/forms/wysihtml5/toolbar.js', Url::templatePath() . 'js/plugins/interface/daterangepicker.js', Url::templatePath() . 'js/plugins/interface/fancybox.min.js', Url::templatePath() . 'js/plugins/interface/moment.js', Url::templatePath() . 'js/plugins/interface/jgrowl.min.js', Url::templatePath() . 'js/plugins/interface/datatables.min.js', Url::templatePath() . 'js/plugins/interface/colorpicker.js', Url::templatePath() . 'js/plugins/interface/fullcalendar.min.js', Url::templatePath() . 'js/plugins/interface/timepicker.min.js', Url::templatePath() . 'js/bootstrap.min.js', Url::templatePath() . 'js/video.js', Url::templatePath() . 'js/application.js'));
//hook for plugging in javascript
$hooks->run('js');
?>
<script>
videojs.options.flash.swf = "<?php
echo Url::templatePath() . 'swf/video-js.swf';
?>
";
</script>
</head>
<body>
<!-- Login wrapper -->
<div class="login-wrapper">
<form action="<?php
示例5:
<a href="#about">About</a>
</li>
<li class="footer-menu-divider">⋅</li>
<li>
<a href="#services">Services</a>
</li>
<li class="footer-menu-divider">⋅</li>
<li>
<a href="#contact">Contact</a>
</li>
</ul>
<p class="copyright text-muted small">Copyright © Your Company 2014. All Rights Reserved</p>
</div>
</div>
</div>
</footer>
<?php
Assets::js(array(Url::templatePath() . 'js/jquery.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例6:
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div><!-- /content-wrapper -->
<footer class="main-footer">
<div class="pull-right hidden-xs"><b>Version</b> 0.0.1 </div>
<strong>Copyright © 2015 <a href="http://uness.com">Picontest</a>.</strong> All rights reserved.
</footer>
</div><!-- /wrapper -->
<!-- REQUIRED JS SCRIPTS -->
<?php
Assets::js(array(Url::templatePath() . 'backoffice/js/jquery.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js', Url::templatePath() . 'backoffice/js/app.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
if ($data['js-datePlaceholder']) {
Assets::js(array(Url::templatePath() . 'backoffice/js/jquery.inputmask.js', Url::templatePath() . 'backoffice/js/jquery.inputmask.extensions.js', Url::templatePath() . 'backoffice/js/jquery.inputmask.date.extensions.js', Url::templatePath() . 'backoffice/js/datePlaceholder.js'));
}
?>
<script>
</script>
</body>
</html>
示例7:
<?php
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array('//code.jquery.com/jquery-1.11.3.min.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js', '//code.jquery.com/ui/1.11.2/jquery-ui.js', Url::templatePath() . 'js/plugins/metisMenu/jquery.metisMenu.js', Url::templatePath() . 'js/inspinia.js', Url::templatePath() . 'js/plugins/pace/pace.min.js', Url::templatePath() . 'js/plugins/fullcalendar/fullcalendar.min.js', Url::templatePath() . 'js/custom.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例8: isset
<?php
/**
* Sample layout
*/
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array_merge(array(Url::templatePath() . 'js/jquery.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'), isset($data['js']) ? $data['js'] : array()));
if (isset($data['ownjs'])) {
foreach ($data['ownjs'] as $js) {
echo $js;
}
}
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例9:
<?php
/**
* Sample layout
*/
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
<!-- JS -->
<?php
Assets::js(array(Url::templatePath() . 'js/jquery.js', Url::templatePath() . 'js/jqui.js', Url::templatePath() . 'js/bootstrap.js', Url::templatePath() . 'js/script.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例10:
<?php
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array(Url::templatePath() . 'js/jquery.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js', '//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js', '//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.js', 'https://code.jquery.com/ui/1.11.3/jquery-ui.min.js', '//blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js', Url::templatePath() . 'js/site.js', Url::templatePath() . 'js/wheel.js', Url::templatePath() . 'js/jquery.tinysort.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例11:
'warningStyle' : 'warningTextareaInfo',
'warningNumber': 40
};
// $('.textcounter').textareaCount(options);
var options2 = {
'maxCharacterSize': 160,
'originalStyle': 'originalTextareaInfo',
'warningStyle' : 'warningTextareaInfo',
'warningNumber': 40,
'displayFormat' : '#input/#max | #words words'
};
$('.textcounter').textareaCount(options2);
var options3 = {
'maxCharacterSize': 200,
'originalStyle': 'originalTextareaInfo',
'warningStyle' : 'warningTextareaInfo',
'warningNumber': 40,
'displayFormat' : '#left Characters Left / #max'
};
});
</script>
<?php
Assets::js(array(Url::templatePath() . 'js/custom.js'));
?>
</body>
</html>
<?php
Session::destroy('success');
Session::destroy('error');
示例12: function
<?php
use Helpers\Assets;
use Helpers\Url;
Assets::js(Url::templatePath() . "js/bootstrap-timepicker.js");
?>
<script>
$(document).ready(function () {
var form = document.getElementById("search_stock");
form.addEventListener("submit", function (e) {
var term = $("#serarch_id").val();
window.location.href = "/Clients/" + term;
e.preventDefault();
});
});
</script>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="/Login">Billing</a>
</div>
<div id="menu" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<!--li ><a href="#Billing">Billing</a></li-->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Акции<span class="caret"></span></a>
<ul class="dropdown-menu">
<li ><a href="/Share">Список</a></li>
<li><a href="/Share/Create">Создать</a></li>
</ul>
</li>
<li class="dropdown">
示例13:
<div class="hline-w"></div>
<p>
Some Ave, 987,<br/>
23890, New York,<br/>
United States.<br/>
</p>
</div>
</div><! --/row -->
</div><! --/container -->
</div><! --/footerwrap -->
<!-- JS -->
<?php
Assets::js(array('//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js', Url::templatePath() . 'js/retina-1.1.0.js', Url::templatePath() . 'js/jquery.hoverdir.js', Url::templatePath() . 'js/jquery.hoverex.min.js', Url::templatePath() . 'js/jquery.prettyPhoto.js', Url::templatePath() . 'js/jquery.isotope.min.js', Url::templatePath() . 'js/custom.js', Url::templatePath() . 'js/modernizr.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
<script>
// Portfolio
(function($) {
"use strict";
var $container = $('.portfolio'),
$items = $container.find('.portfolio-item'),
portfolioLayout = 'fitRows';
if( $container.hasClass('portfolio-centered') ) {
示例14:
<?php
/**
* Sample layout
*/
use Helpers\Assets;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
$theroute = DIR . 'app/Modules/Search/templates/search/';
Assets::js(array($theroute . 'js/jquery-1.11.1.min.js', $theroute . 'js/ajaxlivesearch.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例15:
<?php
/**
* Sample layout
*/
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
use Core\View;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array('//code.jquery.com/jquery-2.1.4.min.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js', Url::templatePath() . 'js/error-helper.js', Url::templatePath() . 'js/collapse-icon.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
if (isset($data['footer-logic'])) {
View::render($data['footer-logic'], $data);
}
?>
</body>
</html>