From 34394c2b5e242c730c3f6854650b064fd58da8de Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 23 Jan 2020 15:45:41 +0300 Subject: [PATCH] console layout rearranged. fix indentation. add translate tags --- console/templates/console-base.html | 3 +- console/templates/console-spice-full.html | 342 +++++++++---------- console/templates/console-spice-lite.html | 381 +++++++++++----------- 3 files changed, 350 insertions(+), 376 deletions(-) diff --git a/console/templates/console-base.html b/console/templates/console-base.html index 75a49c9..e5c7ffe 100644 --- a/console/templates/console-base.html +++ b/console/templates/console-base.html @@ -53,6 +53,7 @@ +
-
+ {% block content %}{% endblock %}
diff --git a/console/templates/console-spice-full.html b/console/templates/console-spice-full.html index 5accf4d..08ef3ee 100644 --- a/console/templates/console-spice-full.html +++ b/console/templates/console-spice-full.html @@ -26,208 +26,192 @@ {% load i18n %} {% load staticfiles %} {% block head %} - - WebVirtCloud - Spice Client - Full - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + WebVirtCloud - Spice Client - Full + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% endblock %} {% block content %} - - -
-
-
+ +
+
+
+ +
+ +
-
- -
{% endblock %} {% block foot %} - + window.addEventListener('spice-port-event', function(event) { + DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'event data:', event.detail.spiceEvent); + }); + */ + document.getElementById("fullscreen_button").addEventListener('click', fullscreen); + document.getElementById('ctrlaltdel').addEventListener('click', sendCtrlAltDel); + document.getElementById('ctrlaltf1').addEventListener('click', function(){sendCtrlAltFN(0);}); + document.getElementById('ctrlaltf2').addEventListener('click', function(){sendCtrlAltFN(1);}); + document.getElementById('ctrlaltf3').addEventListener('click', function(){sendCtrlAltFN(2);}); + document.getElementById('ctrlaltf4').addEventListener('click', function(){sendCtrlAltFN(3);}); + document.getElementById('ctrlaltf5').addEventListener('click', function(){sendCtrlAltFN(4);}); + document.getElementById('ctrlaltf6').addEventListener('click', function(){sendCtrlAltFN(5);}); + document.getElementById('ctrlaltf7').addEventListener('click', function(){sendCtrlAltFN(6);}); + document.getElementById('ctrlaltf8').addEventListener('click', function(){sendCtrlAltFN(7);}); + document.getElementById('ctrlaltf9').addEventListener('click', function(){sendCtrlAltFN(8);}); + document.getElementById('ctrlaltf10').addEventListener('click', function(){sendCtrlAltFN(9);}); + document.getElementById('ctrlaltf11').addEventListener('click', function(){sendCtrlAltFN(10);}); + document.getElementById('ctrlaltf12').addEventListener('click', function(){sendCtrlAltFN(11);}); + connect(); + {% endblock %} diff --git a/console/templates/console-spice-lite.html b/console/templates/console-spice-lite.html index 8f89678..f1e272c 100644 --- a/console/templates/console-spice-lite.html +++ b/console/templates/console-spice-lite.html @@ -27,227 +27,216 @@ {% load staticfiles %} {% block head %} - WebVirtCloud - Spice - Lite - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + WebVirtCloud - Spice - Lite + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + {% endblock %} - {% block content %} -
-
-
- +
+
+
-
- -
+
+ +
{% endblock %} {% block foot %} + /* SPICE port event listeners + window.addEventListener('spice-port-data', function(event) { + // Here we convert data to text, but really we can obtain binary data also + var msg_text = arraybuffer_to_str(new Uint8Array(event.detail.data)); + DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'message text:', msg_text); + }); + + window.addEventListener('spice-port-event', function(event) { + DEBUG > 0 && console.log('SPICE port', event.detail.channel.portName, 'event data:', event.detail.spiceEvent); + }); + */ + document.getElementById("fullscreen_button").addEventListener('click', fullscreen); + document.getElementById('ctrlaltdel').addEventListener('click', sendCtrlAltDel); + document.getElementById('ctrlaltf1').addEventListener('click', function(){sendCtrlAltFN(0);}); + document.getElementById('ctrlaltf2').addEventListener('click', function(){sendCtrlAltFN(1);}); + document.getElementById('ctrlaltf3').addEventListener('click', function(){sendCtrlAltFN(2);}); + document.getElementById('ctrlaltf4').addEventListener('click', function(){sendCtrlAltFN(3);}); + document.getElementById('ctrlaltf5').addEventListener('click', function(){sendCtrlAltFN(4);}); + document.getElementById('ctrlaltf6').addEventListener('click', function(){sendCtrlAltFN(5);}); + document.getElementById('ctrlaltf7').addEventListener('click', function(){sendCtrlAltFN(6);}); + document.getElementById('ctrlaltf8').addEventListener('click', function(){sendCtrlAltFN(7);}); + document.getElementById('ctrlaltf9').addEventListener('click', function(){sendCtrlAltFN(8);}); + document.getElementById('ctrlaltf10').addEventListener('click', function(){sendCtrlAltFN(9);}); + document.getElementById('ctrlaltf11').addEventListener('click', function(){sendCtrlAltFN(10);}); + document.getElementById('ctrlaltf12').addEventListener('click', function(){sendCtrlAltFN(11);}); + connect(); + {% endblock %}