123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!--
-
- 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>
|