Commit:    b84c7178243ba6b5337e3414cc1d0217f37ecfc7
Author:    Hannes Magnusson <bj...@mongodb.com>         Sun, 5 Jan 2014 
23:27:14 -0800
Parents:   cd960a15ea0fb7e59fce743aba43ee6298ab214e
Branches:  master

Link:       
http://git.php.net/?p=web/qa.git;a=commitdiff;h=b84c7178243ba6b5337e3414cc1d0217f37ecfc7

Log:
Load JS stuffs at the end, using our template so we don't load things multiple 
times or
incorrect order

Changed paths:
  M  include/functions.php
  M  pulls/index.php


Diff:
diff --git a/include/functions.php b/include/functions.php
index 1be4ff8..2a71dbf 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -25,7 +25,7 @@ function common_header($extra_headers=NULL) {
     echo '<section class="fullscreen">';
 }
 
-function common_footer() {
+function common_footer($JS) {
     echo "</section>";
     include __DIR__ . "/../shared/templates/footer.inc";
 }
diff --git a/pulls/index.php b/pulls/index.php
index ed8be74..03b9a97 100644
--- a/pulls/index.php
+++ b/pulls/index.php
@@ -67,13 +67,6 @@ common_header();
          display: none;
      }
    </style>
-   <link href="jquery-ui.css" rel="stylesheet" type="text/css"/>
-   <script type="text/javascript" src="jquery-1.7.1.min.js"></script>
-   <script type="text/javascript" src="jquery-ui.min.js"></script>
-   <script type="text/javascript" src="jsrender.js"></script>
-   <script type="text/javascript" src="jquery.ba-bbq.min.js"></script>
-   <script type="text/javascript" src="Markdown.Converter.js"></script>
-   <script type="text/javascript" src="Markdown.Sanitizer.js"></script>
    <script id="repoListItemTemplate" type="text/x-jquery-tmpl">
           <li repo="{{=name}}"><b><a href="#">{{=name}}:</a></b> 
{{=description}} ({{=open_issues}})</li>
    </script>
@@ -119,7 +112,6 @@ $ git push origin master     # everything okay? good, let's 
push it
      var GITHUB_ORG     = <?php echo json_encode(GITHUB_ORG); ?>;
      var API_URL        = "api.php";
    </script>
-   <script src="pullrequests.js"></script>
   <div id="loginstatus">
     <span id="checkinglogin">(checking login state ...)</span>
     <span id="loggedin"></span>
@@ -164,7 +156,17 @@ if (!constant('GITHUB_TOKEN')) {
     <button id="loginBtn">Login</button>
   </div>
   <div id="loading">Loading</div>
-<?php
 
-common_footer();
+  <link href="jquery-ui.css" rel="stylesheet" type="text/css"/>
+<?php
+$JS = array(
+    "//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js",
+    "//qa.php.net/pulls/jsrender.js",
+    "//qa.php.net/pulls/pullrequests.js",
+    "//qa.php.net/pulls/jquery.ba-bbq.min.js",
+    "//qa.php.net/pulls/Markdown.Converter.js",
+    "//qa.php.net/pulls/Markdown.Sanitizer.js",
+);
+
+common_footer($JS);


--
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to