本文整理汇总了PHP中Assets::getJS方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::getJS方法的具体用法?PHP Assets::getJS怎么用?PHP Assets::getJS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assets
的用法示例。
在下文中一共展示了Assets::getJS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Management
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Electronic Convention Management (ECM)<?php
echo $title ? "::{$title}" : "";
?>
</title>
<?php
echo HTML::style(url::site('static/css/main2.css', TRUE), NULL, TRUE) . "\n";
echo HTML::style(url::site('static/css/jquery-ui.css', TRUE), NULL, TRUE) . "\n";
echo HTML::script(url::site('static/js/jquery.js', TRUE), NULL, TRUE) . "\n";
echo HTML::script(url::site('static/js/jquery-ui.js', TRUE), NULL, TRUE) . "\n";
foreach (Assets::getCSS() as $style) {
echo HTML::style(url::site("static/css/{$style}", TRUE), NULL, TRUE);
}
foreach (Assets::getJS() as $js) {
echo HTML::script(url::site("static/js/{$js}", TRUE), NULL, TRUE);
}
?>
</head>
<body>
<!-- Content container beings here -->
<div id="container">
<!-- Header -->
<?php
if ($isLoggedIn) {
// || $menu
?>
<div id="menu">
示例2: head
/**
* Print the <head> tag
*/
public static function head($title = "")
{
header('Content-type: text/html; charset=utf-8');
if ($title != "") {
self::setTitle($title);
}
if (Assets::issetJS('jquery')) {
/**
* Load jQuery, jQuery UI, Lobby Main, App separately without async
*/
$url = L_URL . "/includes/serve-assets.php?type=js&assets=" . implode(",", array(Assets::getJS('jquery'), Assets::getJS('jqueryui'), Assets::getJS('main'), Assets::issetJS('app') ? Assets::getJS('app') : ""));
echo "<script src='{$url}'></script>";
Assets::removeJS("jquery");
Assets::removeJS("jqueryui");
Assets::removeJS("main");
}
$jsURLParams = array("THEME_URL" => Themes::getThemeURL());
if (Apps::isAppRunning()) {
$jsURLParams["APP_URL"] = urlencode(Apps::getInfo("url"));
$jsURLParams["APP_SRC"] = urlencode(Apps::getInfo("srcURL"));
}
$jsURL = Assets::getServeURL("js", $jsURLParams);
echo "<script>lobby.load_script_url = '" . $jsURL . "';</script>";
$cssServeParams = array("THEME_URL" => THEME_URL);
/**
* CSS Files
*/
if (Apps::isAppRunning()) {
$cssServeParams["APP_URL"] = urlencode(Apps::getInfo("url"));
$cssServeParams["APP_SRC"] = urlencode(Apps::getInfo("srcURL"));
}
echo Assets::getServeLinkTag($cssServeParams);
echo "<link href='" . L_URL . "/favicon.ico' sizes='16x16 32x32 64x64' rel='shortcut icon' />";
/* Title */
echo "<title>" . self::$title . "</title>";
}