Switched to using: http://www.jshint.com/
This commit is contained in:
Joel Martin
2012-01-12 12:38:55 -06:00
parent f66bcda31b
commit ff4bfcb773
6 changed files with 26 additions and 22 deletions

View File

@@ -190,16 +190,16 @@ forceSetting: function(name, val) {
// Show the clipboard panel
toggleClipboardPanel: function() {
//Close settings if open
if (UI.settingsOpen == true) {
if (UI.settingsOpen === true) {
UI.settingsApply();
UI.closeSettingsMenu();
}
//Close connection settings if open
if (UI.connSettingsOpen == true) {
if (UI.connSettingsOpen === true) {
UI.toggleConnectPanel();
}
//Toggle Clipboard Panel
if (UI.clipboardOpen == true) {
if (UI.clipboardOpen === true) {
$D('noVNC_clipboard').style.display = "none";
$D('clipboardButton').className = "noVNC_status_button";
UI.clipboardOpen = false;
@@ -213,17 +213,17 @@ toggleClipboardPanel: function() {
// Show the connection settings panel/menu
toggleConnectPanel: function() {
//Close connection settings if open
if (UI.settingsOpen == true) {
if (UI.settingsOpen === true) {
UI.settingsApply();
UI.closeSettingsMenu();
$D('connectButton').className = "noVNC_status_button";
}
if (UI.clipboardOpen == true) {
if (UI.clipboardOpen === true) {
UI.toggleClipboardPanel();
}
//Toggle Connection Panel
if (UI.connSettingsOpen == true) {
if (UI.connSettingsOpen === true) {
$D('noVNC_controls').style.display = "none";
$D('connectButton').className = "noVNC_status_button";
UI.connSettingsOpen = false;
@@ -265,11 +265,11 @@ toggleSettingsPanel: function() {
// Open menu
openSettingsMenu: function() {
if (UI.clipboardOpen == true) {
if (UI.clipboardOpen === true) {
UI.toggleClipboardPanel();
}
//Close connection settings if open
if (UI.connSettingsOpen == true) {
if (UI.connSettingsOpen === true) {
UI.toggleConnectPanel();
}
$D('noVNC_settings').style.display = "block";
@@ -366,6 +366,7 @@ updateState: function(rfb, state, oldstate, msg) {
break;
case 'disconnected':
$D('noVNC_logo').style.display = "block";
// Fall through
case 'loaded':
klass = "noVNC_status_normal";
break;
@@ -574,11 +575,11 @@ setViewDrag: function(drag) {
// On touch devices, show the OS keyboard
showKeyboard: function() {
if(UI.keyboardVisible == false) {
if(UI.keyboardVisible === false) {
$D('keyboardinput').focus();
UI.keyboardVisible = true;
$D('showKeyboard').className = "noVNC_status_button_selected";
} else if(UI.keyboardVisible == true) {
} else if(UI.keyboardVisible === true) {
$D('keyboardinput').blur();
$D('showKeyboard').className = "noVNC_status_button";
UI.keyboardVisible = false;
@@ -590,7 +591,7 @@ keyInputBlur: function() {
//Weird bug in iOS if you change keyboardVisible
//here it does not actually occur so next time
//you click keyboard icon it doesnt work.
setTimeout("UI.setKeyboard()",100)
setTimeout(function() { UI.setKeyboard(); },100);
},
setKeyboard: function() {