WIP - Implement/style NIC actions

This commit is contained in:
Brian Federle 2013-04-03 17:55:39 -07:00
parent 1a80f9e1f4
commit 4f5d311848
3 changed files with 60 additions and 1 deletions

View File

@ -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;

View File

@ -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: [

View File

@ -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