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 <[email protected]> Authored: Tue Feb 26 16:15:16 2013 -0800 Committer: Brian Federle <[email protected]> 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) {
