brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [04/27] brooklyn-ui git commit: can go from catalog item to open in composer
Date Thu, 18 Feb 2016 10:36:56 GMT
can go from catalog item to open in composer


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/0554b079
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/0554b079
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/0554b079

Branch: refs/heads/master
Commit: 0554b0796f9886d99f50a98ef8246d8e5c8a3e55
Parents: f49de1c
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Thu Feb 11 03:05:41 2016 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Thu Feb 11 17:44:11 2016 +0000

----------------------------------------------------------------------
 src/main/webapp/assets/js/view/catalog.js              | 6 ++++++
 src/main/webapp/assets/tpl/catalog/details-entity.html | 1 +
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/0554b079/src/main/webapp/assets/js/view/catalog.js
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/js/view/catalog.js b/src/main/webapp/assets/js/view/catalog.js
index eb9effd..5c3e2ce 100644
--- a/src/main/webapp/assets/js/view/catalog.js
+++ b/src/main/webapp/assets/js/view/catalog.js
@@ -43,6 +43,7 @@ define([
     var CatalogItemDetailsView = Backbone.View.extend({
 
         events: {
+            "click .composer": "composeItem",
             "click .delete": "deleteItem"
         },
 
@@ -109,6 +110,11 @@ define([
             return this;
         },
 
+        composeItem: function(event) {
+            // TODO could make this a catalog item
+            Backbone.history.navigate("/v1/editor/app/"+ encodeURIComponent($(event.currentTarget).data("name")),
+                {trigger: true});
+        },
         deleteItem: function(event) {
             // Could use wait flag to block removal of model from collection
             // until server confirms deletion and success handler to perform

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/0554b079/src/main/webapp/assets/tpl/catalog/details-entity.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/tpl/catalog/details-entity.html b/src/main/webapp/assets/tpl/catalog/details-entity.html
index 2e43fe5..02f3fe9 100644
--- a/src/main/webapp/assets/tpl/catalog/details-entity.html
+++ b/src/main/webapp/assets/tpl/catalog/details-entity.html
@@ -20,6 +20,7 @@ under the License.
 <div class="catalog-details">
 
     <div class="float-right">
+        <button data-name="<%= model.id %>" class="btn composer">Open in Composer</button>
         <button data-name="<%= model.id %>" class="btn btn-danger delete">Delete</button>
     </div>
 


Mime
View raw message