You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/04/08 11:20:27 UTC
[11/19] incubator-brooklyn git commit: Load the catalog items as json
resource
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c7900364/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 2eaf96b..8eb333f 100644
--- a/docs/website/learnmore/catalog/catalog-item.html
+++ b/docs/website/learnmore/catalog/catalog-item.html
@@ -57,15 +57,22 @@ 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 () {
- updateItem();
+ var items_loaded;
$(window).on('hashchange', updateItem);
- function updateItem() {
+ $.getJSON( "{{site.path.style}}/js/catalog/items.json", function( data ) {
+ items_loaded = data;
+ updateItem(data);
+ });
+
+ function updateItem(items) {
var args, catalog_type;
+ if(!items) {
+ items = items_loaded;
+ }
args = getArgs();
if(args.length!=2) {
alert('bad entity format')