mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
Hide menu on connect, remove rounded edges of clipboard, separate menu hide/show code into own file.
This commit is contained in:
56
guacamole/src/main/webapp/scripts/interface.js
Normal file
56
guacamole/src/main/webapp/scripts/interface.js
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
var menu_shaded = false;
|
||||
|
||||
var shade_interval = null;
|
||||
var show_interval = null;
|
||||
|
||||
function shadeMenu() {
|
||||
|
||||
if (!menu_shaded) {
|
||||
|
||||
var step = Math.floor(menu.offsetHeight / 5) + 1;
|
||||
var offset = 0;
|
||||
menu_shaded = true;
|
||||
|
||||
window.clearInterval(show_interval);
|
||||
shade_interval = window.setInterval(function() {
|
||||
|
||||
offset -= step;
|
||||
menu.style.top = offset + "px";
|
||||
|
||||
if (offset <= -menu.offsetHeight) {
|
||||
window.clearInterval(shade_interval);
|
||||
menu.style.visiblity = "hidden";
|
||||
}
|
||||
|
||||
}, 30);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function showMenu() {
|
||||
|
||||
if (menu_shaded) {
|
||||
|
||||
var step = Math.floor(menu.offsetHeight / 5) + 1;
|
||||
var offset = -menu.offsetHeight;
|
||||
menu_shaded = false;
|
||||
menu.style.visiblity = "";
|
||||
|
||||
window.clearInterval(shade_interval);
|
||||
show_interval = window.setInterval(function() {
|
||||
|
||||
offset += step;
|
||||
|
||||
if (offset >= 0) {
|
||||
offset = 0;
|
||||
window.clearInterval(show_interval);
|
||||
}
|
||||
|
||||
menu.style.top = offset + "px";
|
||||
|
||||
}, 30);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user