Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Cleaned up the HTML to avoid some errors (reported by NetBeans), tool…

…bar poweroff icons, debugger keyword hack in generated JS (Achim Hasenmueller).

git-svn-id: http://vboxweb.googlecode.com/svn/trunk@44 729376a8-6c6b-11de-afdd-bb9f892af8c1
  • Loading branch information...
commit 338773c32dbfc9a0a48c0e9af1bc8554a9c902bf 1 parent 4752828
authored August 12, 2009
3  www/static/js/VirtualBox_Main.js
@@ -644,7 +644,8 @@ var vboxIConsoleImpl = Class.create(
644 644
     },
645 645
     getDebugger: function()
646 646
     {
647  
-        return this.jsonObject.debugger;
  647
+// debugger is a reserved keyword, Safari chokes on it, have to fix the generator
  648
+//         return this.jsonObject.debugger;
648 649
     },
649 650
     getUSBDevices: function()
650 651
     {
19  www/static/js/vboxVMToolbar.js
@@ -94,7 +94,7 @@ var vboxVMToolbar = Class.create(
94 94
         if (curItem == undefined)
95 95
         {
96 96
             console.log("vboxVMToolbar::invalidatePage: Current item is undefined.");
97  
-            return false;
  97
+            return;
98 98
         }
99 99
 
100 100
         var state = curItem.state();
@@ -102,30 +102,29 @@ var vboxVMToolbar = Class.create(
102 102
         /* settings can only be changed for powered off and aborted VMs */
103 103
         if (state == VMState.PoweredOff ||
104 104
             state == VMState.Aborted)
105  
-            jQuery("#toolbar-button-vm-settings-span").html('<img id="toolbar-button-settings" src="/images/vbox/vm_settings_32px.png"/>');
  105
+            jQuery("#toolbar-button-vm-settings-span").html('<img id="toolbar-button-settings" src="/images/vbox/vm_settings_32px.png" alt="VM settings"/>');
106 106
         else
107  
-            jQuery("#toolbar-button-vm-settings-span").html('<img src="/images/vbox/vm_settings_disabled_32px.png"/>');
  107
+            jQuery("#toolbar-button-vm-settings-span").html('<img src="/images/vbox/vm_settings_disabled_32px.png" alt=""/>');
108 108
 
109 109
         /* powered off / aborted, paused and saved VMs can be started */
110 110
         if (state == VMState.PoweredOff ||
111 111
             state == VMState.Aborted ||
112 112
             state == VMState.Saved ||
113 113
             state == VMState.Paused)
114  
-            jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_start_32px.png"/">');
  114
+            jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_start_32px.png" alt="Start VM"/">');
115 115
         else if (state == VMState.Running)
116  
-            jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_pause_32px.png"/>');
  116
+            jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_pause_32px.png" alt="Pause VM"/>');
117 117
         else
118  
-            jQuery("#toolbar-button-vm-start-span").html('<img src="/images/vbox/vm_start_disabled_32px.png"/>');
  118
+            jQuery("#toolbar-button-vm-start-span").html('<img src="/images/vbox/vm_start_disabled_32px.png" alt=""/>');
119 119
 
120 120
         /* saved VMs can be discarded */
121 121
         if (state == VMState.Saved)
122  
-            jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_discard_32px.png"/>');
  122
+            jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_discard_32px.png" alt="Discard saved state"/>');
123 123
         else if (state == VMState.Running ||
124 124
                  state == VMState.Paused)
125  
-            /** @todo get a power off icon */
126  
-            jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_delete_32px.png"/>');
  125
+            jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_poweroff_32px.png" alt="Power off VM"/>');
127 126
         else
128  
-            jQuery("#toolbar-button-vm-stop-span").html('<img src="/images/vbox/vm_delete_disabled_32px.png"/>');
  127
+            jQuery("#toolbar-button-vm-stop-span").html('<img src="/images/vbox/vm_poweroff_disabled_32px.png" alt=""/>');
129 128
 
130 129
         jQuery("#toolbar-button-settings").bind("click", this.buttonClicked);
131 130
         jQuery("#toolbar-button-start-pause").bind("click", this.buttonClicked);
26  www/templates/index.html
@@ -28,6 +28,7 @@
28 28
     <head>
29 29
         <title>VirtualBox Web Console</title>
30 30
         <!-- Meta fields. -->
  31
+        <meta http-equiv="Pragma" content="no-cache"/>
31 32
         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
32 33
         <meta http-equiv="Expires" content="0"/>
33 34
         <meta http-equiv="Cache-Control" content ="no-cache"/>
@@ -43,6 +44,8 @@
43 44
         <link rel="stylesheet" type="text/css" href="/static/css/themes/vboxweb/ui.core.css"/>
44 45
         <link rel="stylesheet" type="text/css" href="/static/css/themes/vboxweb/ui.tabs.css"/>
45 46
         <link rel="stylesheet" type="text/css" href="/static/css/themes/vboxweb/ui.all.css"/>
  47
+    </head>
  48
+    <body font="Verdana" onload="onDocumentLoad()">
46 49
         <!-- JavaScript detection. -->
47 50
         <noscript>
48 51
             JavaScript is turned off in your web browser. Turn it on to take full advantage of this site, then refresh the page.
@@ -123,7 +126,7 @@
123 126
 
124 127
             jQuery(document).ready(onDocumentReady);
125 128
             function onDocumentReady()
126  
-            {           
  129
+            {
127 130
                 /* Use different outer-layout classNames to simplify/clarify CSS. */
128 131
                 OuterLayout = jQuery('body').layout({
129 132
                         north__paneSelector:                ".outer-layout-north"
@@ -224,11 +227,9 @@
224 227
             }
225 228
 
226 229
         </script>
227  
-    </head>
228  
-    <body font="Verdana" onload="onDocumentLoad()">
229 230
 
230 231
         <div id="vmToolbar" class="outer-layout-north" style="display: none;">
231  
-            <img id="toolbar-button-new" src="/images/vbox/vm_new_32px.png"/>
  232
+            <img id="toolbar-button-new" src="/images/vbox/vm_new_32px.png" alt="New VM"/>
232 233
             <span id="toolbar-button-vm-settings-span"></span>
233 234
             <span id="toolbar-button-vm-start-span"></span>
234 235
             <span id="toolbar-button-vm-stop-span"></span>
@@ -239,9 +240,9 @@
239 240
         <div id="vmTab" class="outer-layout-center" style="display: none;">
240 241
 
241 242
             <ul>
242  
-                <li><a href="#tabs-center-details"><span><img src="/images/vbox/settings_16px.png" class="tabs-center-page-icon"/>Details</span></a></li>
243  
-                <li><a href="#tabs-center-rdp"><span><img src="/images/vbox/vrdp_16px.png" class="tabs-center-page-icon"/>Console</span></a></li>
244  
-                <li><a href="#tabs-center-desc"><span><img src="/images/vbox/description_16px.png" class="tabs-center-page-icon"/>Description</span></a></li>
  243
+                <li><a href="#tabs-center-details"><span><img src="/images/vbox/settings_16px.png" class="tabs-center-page-icon" alt=""/>Details</span></a></li>
  244
+                <li><a href="#tabs-center-rdp"><span><img src="/images/vbox/vrdp_16px.png" class="tabs-center-page-icon" alt=""/>Console</span></a></li>
  245
+                <li><a href="#tabs-center-desc"><span><img src="/images/vbox/description_16px.png" class="tabs-center-page-icon" alt=""/>Description</span></a></li>
245 246
             </ul>
246 247
 
247 248
             <!-- wrap tab-panels in ui-layout-content div -->
@@ -307,17 +308,17 @@
307 308
                             </div>
308 309
                             <div id="tab-details-vm-display-videomem">
309 310
                                 <div class="tab-details-vm-attribute">Video Memory:</div>
310  
-                                <div class="tab-details-vm-value" id="tab-details-vm-display-videomem-val"/></div>
  311
+                                <div class="tab-details-vm-value" id="tab-details-vm-display-videomem-val"></div>
311 312
                                 <div style="clear: both"></div>
312 313
                             </div>
313 314
                             <div id="tab-details-vm-display-3daccel">
314 315
                                 <div class="tab-details-vm-attribute">3D:</div>
315  
-                                <div class="tab-details-vm-value" id="tab-details-vm-display-3daccel-val"/></div>
  316
+                                <div class="tab-details-vm-value" id="tab-details-vm-display-3daccel-val"></div>
316 317
                                 <div style="clear: both"></div>
317 318
                             </div>
318 319
                             <div id="tab-details-vm-display-rdpport">
319 320
                                 <div class="tab-details-vm-attribute">VRDP Port:</div>
320  
-                                <div class="tab-details-vm-value" id="tab-details-vm-display-rdpport-val"/></div>
  321
+                                <div class="tab-details-vm-value" id="tab-details-vm-display-rdpport-val"></div>
321 322
                                 <div style="clear: both"></div>
322 323
                             </div>
323 324
                         </div>
@@ -338,7 +339,7 @@
338 339
                     <div id="tab-rdp-header"><p class="tab-section-header">Remote View</p></div>
339 340
                     <div class="tab-sections">
340 341
                         <div class="tab-section" id="tab-rdp-sec-desc">
341  
-                            <div id="tab-rdp-desc">Status: <span id="tab-rdp-desc-val"/></div>
  342
+                            <div id="tab-rdp-desc">Status: <span id="tab-rdp-desc-val"></span></div>
342 343
                         </div>
343 344
                         <div class="tab-section" id="tab-rdp-sec-conn">
344 345
                             <div id="tab-rdp-sec-auth">
@@ -377,7 +378,7 @@
377 378
                     <div id="tab-desc-header"><p class="tab-section-header">Description</p></div>
378 379
                     <div class="tab-sections">
379 380
                         <div class="tab-section" id="tab-desc-sec-desc">
380  
-                            <div id="tab-desc-desc"><span id="tab-desc-desc-val"/></div>
  381
+                            <div id="tab-desc-desc"><span id="tab-desc-desc-val"></span></div>
381 382
                         </div>
382 383
                     </div>
383 384
                 </div>
@@ -391,5 +392,4 @@
391 392
         </iframe>
392 393
 
393 394
     </body>
394  
-    <head><meta http-equiv="Pragma" content="no-cache"/></head>
395 395
 </html>

0 notes on commit 338773c

Please sign in to comment.
Something went wrong with that request. Please try again.