phpvirtualbox/panes/chooser.html

97 lines
2.2 KiB
HTML
Raw Permalink Normal View History

<!--
Virtual Machine List
Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
$Id: chooser.html 595 2015-04-17 09:50:36Z imoore76 $
@see js/chooser.js
-->
<div id='vboxChooserDiv'></div>
<script type='text/javascript'>
/*
*
*
* Startup for VM List
*
*/
vboxChooser.setAnchorId('vboxChooserDiv');
// Stop actions
var sChildren = [];
for(var i = 0; i < vboxVMActions.stop_actions.length; i++) {
sChildren[sChildren.length] = $.extend(true,{},vboxVMActions[vboxVMActions.stop_actions[i]],{'iconStringDisabled':'_disabled'});
}
// VM List Group context menu
vboxChooser.setContextMenu('group', [
vboxVMGroupActions['newmachine'],
vboxVMGroupActions['addmachine'],
$.extend({}, vboxVMGroupActions['rename'], {separator: true}),
vboxVMGroupActions['ungroup'],
$.extend({}, vboxVMActions['start'], {'separator' : true}),
vboxVMActions['pause'],
vboxVMActions['reset'],
$.extend({},vboxVMActions['stop'], {'children':sChildren}),
$.extend({},vboxVMActions['discard'], {separator: true}),
vboxVMActions['refresh'],
$.extend({}, vboxVMGroupActions['sort'], {separator:true}),
]);
/*
* VM Context menu setup (menu per VM in list)
*/
vboxChooser.setContextMenu('vm',[
vboxVMActions['settings'],
vboxVMActions['clone'],
vboxVMActions['remove'],
vboxVMActions['group'],
$.extend({},vboxVMActions['start'], {'separator' : true}),
vboxVMActions['pause'],
vboxVMActions['reset'],
$.extend({},vboxVMActions['stop'], {'children': sChildren}),
$.extend({},vboxVMActions['discard'], {'separator' : true}),
vboxVMActions['logs'],
vboxVMActions['refresh']
]);
// Don't need thse anymore
sChildren = null;
/*
* VM list context menu setup
*/
vboxChooser.setContextMenu('anchor', [
vboxVMActions['new'],
vboxVMActions['add'],
{
'name':'fileImport',
'label':'Import Appliance...',
'icon':'import',
'click':function(){
new vboxWizardImportApplianceDialog().run();
},
'separator': true
},
{
'name':'fileExport',
'label':'Export Appliance...',
'icon':'export',
'click':function(){new vboxWizardExportApplianceDialog().run(); }
},
$.extend({},vboxVMGroupActions['sort'],{'separator':true,click:function(){
vboxChooser.sortSelectedGroup(true);
}})
]);
vboxChooser.start();
</script>