Renamed and moved updateXvpButton

This commit is contained in:
samhed 2016-04-26 23:29:15 +02:00
parent ab81ddf5d4
commit 9e45354efc
1 changed files with 15 additions and 15 deletions

View File

@ -186,7 +186,7 @@ var UI;
try { try {
UI.rfb = new RFB({'target': $D('noVNC_canvas'), UI.rfb = new RFB({'target': $D('noVNC_canvas'),
'onUpdateState': UI.updateState, 'onUpdateState': UI.updateState,
'onXvpInit': UI.updateXvpVisualState, 'onXvpInit': UI.updateXvpButton,
'onClipboard': UI.clipReceive, 'onClipboard': UI.clipReceive,
'onFBUComplete': UI.initialResize, 'onFBUComplete': UI.initialResize,
'onFBResize': UI.updateViewDrag, 'onFBResize': UI.updateViewDrag,
@ -319,7 +319,7 @@ var UI;
$D('showKeyboard').style.display = "none"; $D('showKeyboard').style.display = "none";
$D('noVNC_extra_keys').style.display = "none"; $D('noVNC_extra_keys').style.display = "none";
$D('sendCtrlAltDelButton').style.display = "none"; $D('sendCtrlAltDelButton').style.display = "none";
UI.updateXvpVisualState(0); UI.updateXvpButton(0);
} }
// State change disables viewport dragging. // State change disables viewport dragging.
@ -540,6 +540,19 @@ var UI;
} }
}, },
// Disable/enable XVP button
updateXvpButton: function(ver) {
if (ver >= 1) {
$D('xvpButton').style.display = 'inline';
} else {
$D('xvpButton').style.display = 'none';
// Close XVP panel if open
if (UI.xvpOpen === true) {
UI.toggleXvpPanel();
}
}
},
// Show the clipboard panel // Show the clipboard panel
toggleClipboardPanel: function() { toggleClipboardPanel: function() {
// Close the description panel // Close the description panel
@ -772,19 +785,6 @@ var UI;
} }
}, },
// Disable/enable XVP button
updateXvpVisualState: function(ver) {
if (ver >= 1) {
$D('xvpButton').style.display = 'inline';
} else {
$D('xvpButton').style.display = 'none';
// Close XVP panel if open
if (UI.xvpOpen === true) {
UI.toggleXvpPanel();
}
}
},
// Display the desktop name in the document title // Display the desktop name in the document title
updateDocumentTitle: function(rfb, name) { updateDocumentTitle: function(rfb, name) {
document.title = name + " - noVNC"; document.title = name + " - noVNC";