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/04/04 02:56:09 UTC
git commit: updated refs/heads/ui-add-remove-nics to 4f5d311
Updated Branches:
refs/heads/ui-add-remove-nics 1a80f9e1f -> 4f5d31184
WIP - Implement/style NIC actions
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f5d3118
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f5d3118
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f5d3118
Branch: refs/heads/ui-add-remove-nics
Commit: 4f5d3118482389c5557af7c431b937739c2a184b
Parents: 1a80f9e
Author: Brian Federle <br...@citrix.com>
Authored: Wed Apr 3 17:55:39 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Apr 3 17:55:39 2013 -0700
----------------------------------------------------------------------
ui/css/cloudstack3.css | 25 +++++++++++++++++++++++++
ui/scripts/instances.js | 19 +++++++++++++++++++
ui/scripts/ui/widgets/detailView.js | 17 ++++++++++++++++-
3 files changed, 60 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f5d3118/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index a0b8602..6805060 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -2009,6 +2009,31 @@ div.detail-group.actions td {
vertical-align: middle;
}
+.details.group-multiple div.detail-group.actions {
+ float: right;
+ max-width: 75%;
+ height: 23px;
+ position: relative;
+ margin: -15px 0 -5px;
+}
+
+.details.group-multiple div.detail-group.actions .detail-actions {
+ display: block;
+ height: 35px;
+ padding: 0;
+}
+
+.details.group-multiple div.detail-group.actions .detail-actions td {
+}
+
+.details.group-multiple div.detail-group.actions .detail-actions .action {
+ float: right;
+ /*+placement:shift 2px 7px;*/
+ position: relative;
+ left: 2px;
+ top: 7px;
+}
+
.detail-group table td.detail-actions {
width: 59%;
height: 26px;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f5d3118/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index ddb5622..d4cc57f 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1281,6 +1281,25 @@
});
},
notification: { poll: pollAsyncJobResult }
+ },
+
+ // Remove NIC/Network from VM
+ remove: {
+ label: 'label.action.delete.network',
+ messages: {
+ confirm: function(args) {
+ return 'message.action.delete.network';
+ },
+ notification: function(args) {
+ return 'label.action.delete.network';
+ }
+ },
+ action: function(args) {
+ args.response.success();
+ },
+ notification: {
+ poll: function(args) { args.complete(); }
+ }
}
},
fields: [
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f5d3118/ui/scripts/ui/widgets/detailView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js
index 427010a..ddb62f0 100644
--- a/ui/scripts/ui/widgets/detailView.js
+++ b/ui/scripts/ui/widgets/detailView.js
@@ -698,7 +698,10 @@
$.each(actions, function(key, value) {
if ($.inArray(key, allowedActions) == -1 ||
- (key == 'edit' && options.compact)) return true;
+ (options.ignoreAddAction && key == 'add') ||
+ (key == 'edit' && options.compact)) {
+ return true;
+ }
var $action = $('<div></div>')
.addClass('action').addClass(key)
@@ -1073,6 +1076,18 @@
})
);
}
+
+ // Add action bar
+ if (tabData.actions) {
+ var $actions = makeActionButtons(tabData.actions, {
+ actionFilter: tabData.actions.actionFilter,
+ data: item,
+ context: $detailView.data('view-args').context,
+ ignoreAddAction: true
+ });
+
+ $fieldContent.find('th').append($actions);
+ }
});
// Add item action