當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Assets::getJS方法代碼示例

本文整理匯總了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">
開發者ID:halkeye,項目名稱:ecmproject,代碼行數:31,代碼來源:mainTemplate.php

示例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>";
 }
開發者ID:LobbyOS,項目名稱:server,代碼行數:39,代碼來源:Response.php


注:本文中的Assets::getJS方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。