Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

settingsDisplay.html 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <!--
  2. Display Settings
  3. Copyright (C) 2010-2015 Ian Moore (imoore76 at yahoo dot com)
  4. $Id: settingsDisplay.html 595 2015-04-17 09:50:36Z imoore76 $
  5. -->
  6. <ul>
  7. <li><a href="#vboxSettingsTabDisplayVideo"><span class='translate'>Screen</span></a></li>
  8. <li><a href="#vboxSettingsTabDisplayRemote"><span class='translate'>Remote Display</span></a></li>
  9. </ul>
  10. <!-- Video Tab -->
  11. <div id='vboxSettingsTabDisplayVideo' title='Screen'>
  12. <table style='width: 100%'>
  13. <tr>
  14. <th><span class='translate'>Video Memory:</span></th>
  15. <td style='width: 100%; white-space: nowrap'>
  16. <table style='width: 100%'>
  17. <tr>
  18. <td style='width: 100%; border: 0px; margin: 0px; padding: 0px;'>
  19. <div style='margin-top: 4px' id='vboxSettingsDisplayMemory' class='slider'><div class='sliderScale'></div></div>
  20. </td>
  21. <td><input type='text' class='vboxText sliderValue' name='vboxSettingsDisplayMemoryValue' size='2' /> <span class='translate'>MB</span></td>
  22. </tr>
  23. <tr style='vertical-align: top;'>
  24. <td style='border: 0px; margin: 0px; padding: 0px;'>
  25. <table style='width:100%; border: 0px; margin: 0px; padding: 0px;'>
  26. <tr style='vertical-align: top'>
  27. <td style='text-align: left;'><span class='vboxSliderMin'>%1 MB</span></td>
  28. <td style='text-align: right;'><span class='vboxSliderMax'>%1 MB</span></td>
  29. </tr>
  30. </table>
  31. </td>
  32. <td> </td>
  33. </tr>
  34. </table>
  35. </td>
  36. </tr>
  37. <tr>
  38. <th><span class='translate'>Extended Features:</span></th>
  39. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsDisplay3d' /> <span class='translate'>Enable 3D Acceleration</span></label></td>
  40. </tr>
  41. <tr>
  42. <th></th>
  43. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsDisplay2d' /> <span class='translate'>Enable 2D Video Acceleration</span></label></td>
  44. </tr>
  45. </table>
  46. </div>
  47. <!-- Remote Display Tab -->
  48. <div id='vboxSettingsTabDisplayRemote' title='Remote Display'>
  49. <table class='vboxVertical'>
  50. <tr class='vboxRunningEnabled'>
  51. <td colspan='2'><label><input type='checkbox' class='vboxCheckbox vboxEnablerCheckbox' name='vboxSettingsDisplayVRDEEnabled' /> <span class='translate'>Enable Server</span></label></td>
  52. </tr>
  53. <tr class='vboxRunningEnabled'>
  54. <th><span class='translate'>Server Port:</span></th>
  55. <td><input type='text' class='vboxText' style='width: 100%' name='vboxSettingsDisplayVRDEPort' /></td>
  56. </tr>
  57. <tr id='vboxSettingsDisplayVRDEAddrRow'>
  58. <th><span class='translate'>Net Address:</span></th>
  59. <td><input type='text' class='vboxText' style='width: 100%' name='vboxSettingsDisplayVRDEAddr' /></td>
  60. </tr>
  61. <tr class='vboxRunningEnabled vboxSettingsDisplayRDP'>
  62. <th><span class='translate'>Authentication Method:</span></th>
  63. <td>
  64. <select name='vboxSettingsDisplayVRDEAuth' id='vboxSettingsDisplayVRDEAuthID' style='width: 100%'>
  65. <option value='' >None</option>
  66. <option value='External'>External</option>
  67. <option value='Guest'>Guest</option>
  68. </select>
  69. </td>
  70. </tr>
  71. <tr class='vboxRunningEnabled vboxSettingsDisplayRDP'>
  72. <th><span class='translate'>Authentication Timeout:</span></th>
  73. <td><input type='text' class='vboxText' style='width: 100%' name='vboxSettingsDisplayVRDEAuthTimeout' /></td>
  74. </tr>
  75. <tr class='vboxSettingsDisplayRDP'>
  76. <th><span class='translate'>Extended Features:</span></th>
  77. <td><label><input type='checkbox' class='vboxCheckbox' name='vboxSettingsDisplayVRDEMulti' /> <span class='translate vboxEnablerListen'>Allow Multiple Connections</span></label></td>
  78. </tr>
  79. <tr class='vboxRunningEnabled vboxSettingsDisplayVNC'>
  80. <th><span class='translate'>VNC Password:</span></th>
  81. <td><input type='text' class='vboxText' style='width: 100%' name='vboxSettingsDisplayVNCPassword' /></td>
  82. </tr>
  83. </table>
  84. </div>
  85. <script type='text/javascript'>
  86. /* Display */
  87. /* auth method translations */
  88. $('#vboxSettingsDisplayVRDEAuthID').find('option').html(function(i,h){return trans(h,'VBoxGlobal');});
  89. $('#vboxSettingsDisplayMemory').data('form','frmVboxSettings');
  90. $('#vboxSettingsDisplayMemory').slider({'min':parseInt($('#vboxPane').data('vboxSystemProperties').minGuestVRAM),'max':parseInt($('#vboxPane').data('vboxSystemProperties').maxGuestVRAM)});
  91. /* CHange values when data is loaded */
  92. $('#vboxSettingsDialog').on('dataLoaded', function(){
  93. $('#vboxSettingsDisplayMemory').slider('value',parseInt($('#vboxSettingsDialog').data('vboxMachineData').VRAMSize));
  94. document.forms['frmVboxSettings'].vboxSettingsDisplay3d.checked = ($('#vboxSettingsDialog').data('vboxMachineData').accelerate3DEnabled);
  95. document.forms['frmVboxSettings'].vboxSettingsDisplay2d.checked = ($('#vboxSettingsDialog').data('vboxMachineData').accelerate2DVideoEnabled);
  96. var p = $('#vboxSettingsTabDisplayVideo').parent().children('div');
  97. if(!$('#vboxSettingsDialog').data('vboxFullEdit')) {
  98. $(p).find('tr:not(.vboxRunningEnabled)').find('span').addClass('disabled');
  99. $(p).find('tr:not(.vboxRunningEnabled)').find('input,select,textarea').addClass('disabled').prop('disabled',true);
  100. $('#vboxSettingsDisplayMemory').slider('disable');
  101. } else {
  102. $(p).find('tr:not(.vboxRunningEnabled)').find('span').removeClass('disabled');
  103. $(p).find('tr:not(.vboxRunningEnabled)').find('input,select,textarea').removeClass('disabled').prop('disabled',false);
  104. $('#vboxSettingsDisplayMemory').slider('enable');
  105. if(!$('#vboxSettingsDialog').data('vboxHostDetails').acceleration3DAvailable) {
  106. $(document.forms['frmVboxSettings'].vboxSettingsDisplay3d).addClass('disabled').prop('disabled', true)
  107. .parent().addClass('disabled');
  108. } else {
  109. $(document.forms['frmVboxSettings'].vboxSettingsDisplay3d).removeClass('disabled').prop('disabled', false)
  110. .parent().removeClass('disabled');
  111. }
  112. }
  113. /*
  114. * No VRDE?
  115. *
  116. */
  117. if(!($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer && $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack)) {
  118. $('#vboxSettingsTabDisplayVideo').parent().tabs('disable',1);
  119. } else {
  120. $('#vboxSettingsTabDisplayVideo').parent().tabs('enable',1);
  121. // Show / hide VNC / RDP sections
  122. if($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack.indexOf("VNC") > -1) {
  123. $('#vboxSettingsTabDisplayRemote').find('tr.vboxSettingsDisplayRDP').css({'display':'none'});
  124. $('#vboxSettingsTabDisplayRemote').find('tr.vboxSettingsDisplayVNC').css({'display':''});
  125. } else {
  126. $('#vboxSettingsTabDisplayRemote').find('tr.vboxSettingsDisplayRDP').css({'display':''});
  127. $('#vboxSettingsTabDisplayRemote').find('tr.vboxSettingsDisplayVNC').css({'display':'none'});
  128. }
  129. document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEPort.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.ports;
  130. document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEAuth.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authType;
  131. document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEAuthTimeout.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authTimeout;
  132. document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEAddr.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.netAddress;
  133. document.forms['frmVboxSettings'].vboxSettingsDisplayVNCPassword.value = $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VNCPassword;
  134. $(document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEEnabled).attr('checked',(!$('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.enabled)).trigger('click');
  135. if($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.allowMultiConnection) {
  136. document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEMulti.checked = true;
  137. } else {
  138. document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEMulti.checked = false;
  139. }
  140. if(!$('#vboxPane').data('vboxConfig').enableAdvancedConfig)
  141. $('#vboxSettingsDisplayVRDEAddrRow').css('display','none');
  142. }
  143. });
  144. /* Change settings onSave() */
  145. $('#vboxSettingsDialog').on('save',function(){
  146. $('#vboxSettingsDialog').data('vboxMachineData').VRAMSize = $(document.forms['frmVboxSettings'].vboxSettingsDisplayMemoryValue).val();
  147. $('#vboxSettingsDialog').data('vboxMachineData').accelerate3DEnabled = document.forms['frmVboxSettings'].vboxSettingsDisplay3d.checked;
  148. $('#vboxSettingsDialog').data('vboxMachineData').accelerate2DVideoEnabled = document.forms['frmVboxSettings'].vboxSettingsDisplay2d.checked;
  149. if($('#vboxSettingsDialog').data('vboxMachineData').VRDEServer && $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VRDEExtPack) {
  150. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.ports = document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEPort.value;
  151. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.netAddress = document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEAddr.value;
  152. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authType = document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEAuth.value;
  153. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.authTimeout = document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEAuthTimeout.value;
  154. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.enabled = document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEEnabled.checked;
  155. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.allowMultiConnection = document.forms['frmVboxSettings'].vboxSettingsDisplayVRDEMulti.checked;
  156. $('#vboxSettingsDialog').data('vboxMachineData').VRDEServer.VNCPassword = document.forms['frmVboxSettings'].vboxSettingsDisplayVNCPassword.value;
  157. }
  158. });
  159. </script>