You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/27 22:57:41 UTC

[14/23] git commit: refs/heads/master - Add 'edit region' action

Add 'edit region' action


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

Branch: refs/heads/master
Commit: b4286e7949d9954e1bfc8d1586fb3fa95e956799
Parents: acce7d9
Author: Brian Federle <br...@citrix.com>
Authored: Tue Feb 26 16:15:16 2013 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Tue Feb 26 16:15:16 2013 -0800

----------------------------------------------------------------------
 ui/scripts/regions.js |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b4286e79/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index e4dbaf9..d79f728 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -84,6 +84,19 @@
       detailView: {
         name: 'Region details',
         actions: {
+          edit: {
+            label: 'label.edit.region',
+            action: function(args) {
+              $.ajax({
+                url: createURL('updateRegion'),
+                data: args.data,
+                success: function(json) {
+                  args.response.success();
+                  $(window).trigger('cloudStack.refreshRegions');
+                }
+              });
+            }
+          },
           remove: {
             label: 'label.remove.region',
             messages: {
@@ -109,11 +122,11 @@
             title: 'label.details',
             fields: [
               {
-                name: { label: 'label.name' },
+                name: { label: 'label.name', isEditable: true },
               },
               {
-                endpoint: { label: 'label.endpoint' },
-                id: { label: 'label.id' }
+                endpoint: { label: 'label.endpoint', isEditable: true },
+                id: { label: 'label.id', isEditable: true }
               }
             ],
             dataProvider: function(args) {