Permalink
Browse files

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...
1 parent 4752828 commit 338773c32dbfc9a0a48c0e9af1bc8554a9c902bf vboxweb committed Aug 12, 2009
Showing with 24 additions and 24 deletions.
  1. +2 −1 www/static/js/VirtualBox_Main.js
  2. +9 −10 www/static/js/vboxVMToolbar.js
  3. +13 −13 www/templates/index.html
@@ -644,7 +644,8 @@ var vboxIConsoleImpl = Class.create(
},
getDebugger: function()
{
- return this.jsonObject.debugger;
+// debugger is a reserved keyword, Safari chokes on it, have to fix the generator
+// return this.jsonObject.debugger;
},
getUSBDevices: function()
{
@@ -94,38 +94,37 @@ var vboxVMToolbar = Class.create(
if (curItem == undefined)
{
console.log("vboxVMToolbar::invalidatePage: Current item is undefined.");
- return false;
+ return;
}
var state = curItem.state();
/* settings can only be changed for powered off and aborted VMs */
if (state == VMState.PoweredOff ||
state == VMState.Aborted)
- jQuery("#toolbar-button-vm-settings-span").html('<img id="toolbar-button-settings" src="/images/vbox/vm_settings_32px.png"/>');
+ jQuery("#toolbar-button-vm-settings-span").html('<img id="toolbar-button-settings" src="/images/vbox/vm_settings_32px.png" alt="VM settings"/>');
else
- jQuery("#toolbar-button-vm-settings-span").html('<img src="/images/vbox/vm_settings_disabled_32px.png"/>');
+ jQuery("#toolbar-button-vm-settings-span").html('<img src="/images/vbox/vm_settings_disabled_32px.png" alt=""/>');
/* powered off / aborted, paused and saved VMs can be started */
if (state == VMState.PoweredOff ||
state == VMState.Aborted ||
state == VMState.Saved ||
state == VMState.Paused)
- jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_start_32px.png"/">');
+ jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_start_32px.png" alt="Start VM"/">');
else if (state == VMState.Running)
- jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_pause_32px.png"/>');
+ jQuery("#toolbar-button-vm-start-span").html('<img id="toolbar-button-start-pause" src="/images/vbox/vm_pause_32px.png" alt="Pause VM"/>');
else
- jQuery("#toolbar-button-vm-start-span").html('<img src="/images/vbox/vm_start_disabled_32px.png"/>');
+ jQuery("#toolbar-button-vm-start-span").html('<img src="/images/vbox/vm_start_disabled_32px.png" alt=""/>');
/* saved VMs can be discarded */
if (state == VMState.Saved)
- jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_discard_32px.png"/>');
+ jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_discard_32px.png" alt="Discard saved state"/>');
else if (state == VMState.Running ||
state == VMState.Paused)
- /** @todo get a power off icon */
- jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_delete_32px.png"/>');
+ jQuery("#toolbar-button-vm-stop-span").html('<img id="toolbar-button-stop-discard" src="/images/vbox/vm_poweroff_32px.png" alt="Power off VM"/>');
else
- jQuery("#toolbar-button-vm-stop-span").html('<img src="/images/vbox/vm_delete_disabled_32px.png"/>');
+ jQuery("#toolbar-button-vm-stop-span").html('<img src="/images/vbox/vm_poweroff_disabled_32px.png" alt=""/>');
jQuery("#toolbar-button-settings").bind("click", this.buttonClicked);
jQuery("#toolbar-button-start-pause").bind("click", this.buttonClicked);
View
@@ -28,6 +28,7 @@
<head>
<title>VirtualBox Web Console</title>
<!-- Meta fields. -->
+ <meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta http-equiv="Expires" content="0"/>
<meta http-equiv="Cache-Control" content ="no-cache"/>
@@ -43,6 +44,8 @@
<link rel="stylesheet" type="text/css" href="/static/css/themes/vboxweb/ui.core.css"/>
<link rel="stylesheet" type="text/css" href="/static/css/themes/vboxweb/ui.tabs.css"/>
<link rel="stylesheet" type="text/css" href="/static/css/themes/vboxweb/ui.all.css"/>
+ </head>
+ <body font="Verdana" onload="onDocumentLoad()">
<!-- JavaScript detection. -->
<noscript>
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 @@
jQuery(document).ready(onDocumentReady);
function onDocumentReady()
- {
+ {
/* Use different outer-layout classNames to simplify/clarify CSS. */
OuterLayout = jQuery('body').layout({
north__paneSelector: ".outer-layout-north"
@@ -224,11 +227,9 @@
}
</script>
- </head>
- <body font="Verdana" onload="onDocumentLoad()">
<div id="vmToolbar" class="outer-layout-north" style="display: none;">
- <img id="toolbar-button-new" src="/images/vbox/vm_new_32px.png"/>
+ <img id="toolbar-button-new" src="/images/vbox/vm_new_32px.png" alt="New VM"/>
<span id="toolbar-button-vm-settings-span"></span>
<span id="toolbar-button-vm-start-span"></span>
<span id="toolbar-button-vm-stop-span"></span>
@@ -239,9 +240,9 @@
<div id="vmTab" class="outer-layout-center" style="display: none;">
<ul>
- <li><a href="#tabs-center-details"><span><img src="/images/vbox/settings_16px.png" class="tabs-center-page-icon"/>Details</span></a></li>
- <li><a href="#tabs-center-rdp"><span><img src="/images/vbox/vrdp_16px.png" class="tabs-center-page-icon"/>Console</span></a></li>
- <li><a href="#tabs-center-desc"><span><img src="/images/vbox/description_16px.png" class="tabs-center-page-icon"/>Description</span></a></li>
+ <li><a href="#tabs-center-details"><span><img src="/images/vbox/settings_16px.png" class="tabs-center-page-icon" alt=""/>Details</span></a></li>
+ <li><a href="#tabs-center-rdp"><span><img src="/images/vbox/vrdp_16px.png" class="tabs-center-page-icon" alt=""/>Console</span></a></li>
+ <li><a href="#tabs-center-desc"><span><img src="/images/vbox/description_16px.png" class="tabs-center-page-icon" alt=""/>Description</span></a></li>
</ul>
<!-- wrap tab-panels in ui-layout-content div -->
@@ -307,17 +308,17 @@
</div>
<div id="tab-details-vm-display-videomem">
<div class="tab-details-vm-attribute">Video Memory:</div>
- <div class="tab-details-vm-value" id="tab-details-vm-display-videomem-val"/></div>
+ <div class="tab-details-vm-value" id="tab-details-vm-display-videomem-val"></div>
<div style="clear: both"></div>
</div>
<div id="tab-details-vm-display-3daccel">
<div class="tab-details-vm-attribute">3D:</div>
- <div class="tab-details-vm-value" id="tab-details-vm-display-3daccel-val"/></div>
+ <div class="tab-details-vm-value" id="tab-details-vm-display-3daccel-val"></div>
<div style="clear: both"></div>
</div>
<div id="tab-details-vm-display-rdpport">
<div class="tab-details-vm-attribute">VRDP Port:</div>
- <div class="tab-details-vm-value" id="tab-details-vm-display-rdpport-val"/></div>
+ <div class="tab-details-vm-value" id="tab-details-vm-display-rdpport-val"></div>
<div style="clear: both"></div>
</div>
</div>
@@ -338,7 +339,7 @@
<div id="tab-rdp-header"><p class="tab-section-header">Remote View</p></div>
<div class="tab-sections">
<div class="tab-section" id="tab-rdp-sec-desc">
- <div id="tab-rdp-desc">Status: <span id="tab-rdp-desc-val"/></div>
+ <div id="tab-rdp-desc">Status: <span id="tab-rdp-desc-val"></span></div>
</div>
<div class="tab-section" id="tab-rdp-sec-conn">
<div id="tab-rdp-sec-auth">
@@ -377,7 +378,7 @@
<div id="tab-desc-header"><p class="tab-section-header">Description</p></div>
<div class="tab-sections">
<div class="tab-section" id="tab-desc-sec-desc">
- <div id="tab-desc-desc"><span id="tab-desc-desc-val"/></div>
+ <div id="tab-desc-desc"><span id="tab-desc-desc-val"></span></div>
</div>
</div>
</div>
@@ -391,5 +392,4 @@
</iframe>
</body>
- <head><meta http-equiv="Pragma" content="no-cache"/></head>
</html>

0 comments on commit 338773c

Please sign in to comment.