brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [01/11] incubator-brooklyn git commit: Revert the eager loading of the catalog items
Date Thu, 30 Jul 2015 20:00:18 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 906ea254c -> d90a8bf07


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/website/learnmore/catalog/catalog-item.html
----------------------------------------------------------------------
diff --git a/docs/website/learnmore/catalog/catalog-item.html b/docs/website/learnmore/catalog/catalog-item.html
index 8eb333f..b7acd5b 100644
--- a/docs/website/learnmore/catalog/catalog-item.html
+++ b/docs/website/learnmore/catalog/catalog-item.html
@@ -57,22 +57,16 @@ under the License.
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
 <script src="{{site.path.style}}/js/catalog/common.js" type="text/javascript"></script>
+<script src="{{site.path.style}}/js/catalog/items.js" type="text/javascript"></script>
+
 <script type="text/javascript">
   $(document).ready(function () {
-    var items_loaded;
-
     $(window).on('hashchange', updateItem);
 
-    $.getJSON( "{{site.path.style}}/js/catalog/items.json", function( data ) {
-      items_loaded = data;
-      updateItem(data);
-    });
+    updateItem(items);
 
     function updateItem(items) {
       var args, catalog_type;
-      if(!items) {
-        items = items_loaded;
-      }
       args = getArgs();
       if(args.length!=2) {
         alert('bad entity format')

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/642035ae/docs/website/learnmore/catalog/index.html
----------------------------------------------------------------------
diff --git a/docs/website/learnmore/catalog/index.html b/docs/website/learnmore/catalog/index.html
index 9911ba6..f987f37 100644
--- a/docs/website/learnmore/catalog/index.html
+++ b/docs/website/learnmore/catalog/index.html
@@ -23,6 +23,7 @@ under the License.
 <head>
 
   {% include base-head.html %}
+  <script type="text/javascript" src="{{site.path.style}}/js/catalog/items.js"></script>
   <link rel="stylesheet" href="{{site.path.style}}/css/catalog_items.css" type="text/css"
media="screen"/>
 </head>
 
@@ -128,16 +129,8 @@ under the License.
     });
   };
   
-  var items_loaded;
   $(document).ready(function () {
-    if(!items_loaded) {
-      $.getJSON( "{{site.path.style}}/js/catalog/items.json", function( data ) {
-        items_loaded = data;
-        updateItems(data);
-      });
-    } else {
-      updateItems(items_loaded);
-    }
+    updateItems(items);
 
     function updateItems(items) {
       if (!String.prototype.trim) {


Mime
View raw message