brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [08/10] incubator-brooklyn git commit: Fix addLocation save function
Date Mon, 12 Jan 2015 17:21:47 GMT
Fix addLocation save function


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

Branch: refs/heads/master
Commit: c5db1aa0e35672d74f6a99bbe54986fa89161fcc
Parents: 227694b
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Fri Jan 9 13:22:26 2015 +0000
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Fri Jan 9 13:56:40 2015 +0000

----------------------------------------------------------------------
 usage/jsgui/src/main/webapp/assets/js/view/catalog.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c5db1aa0/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/view/catalog.js b/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
index 576b280..6f75136 100644
--- a/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
+++ b/usage/jsgui/src/main/webapp/assets/js/view/catalog.js
@@ -185,7 +185,6 @@ define([
                     .done(function (data, status, xhr) {
                         // Can extract location of new item with:
                         //model.url = Brooklyn.util.pathOf(xhr.getResponseHeader("Location"));
-                        submitButton.button("reset");
                         self.close();  // one of the calls below should draw a different
view
                         parent.loadAccordionItem("entities", data.id);
                         parent.loadAccordionItem("applications", data.id);
@@ -231,15 +230,18 @@ define([
                 if (!configKeys.displayName) {
                     configKeys.displayName = location.get("name");
                 }
+                var submitButton = this.$(".catalog-submit-button");
+                // "loading" is an indicator to Bootstrap, not a string to display
+                submitButton.button("loading");
                 location.set("config", configKeys);
                 location.save()
                     .done(function (newModel) {
                         newModel = new Location.Model(newModel);
-                        submitButton.button("reset");
                         self.close();  // the call below should draw a different view
                         parent.loadAccordionItem("locations", newModel.id);
                     })
                     .fail(function (response) {
+                        submitButton.button("reset");
                         body.showError(Brooklyn.util.extractError(response));
                     });
             }


Mime
View raw message