|
@@ -126,12 +126,6 @@ load: function(target) {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
-// Read a query string variable
|
|
|
|
-getQueryVar: function(name) {
|
|
|
|
- var re = new RegExp('[?].*' + name + '=([^&#]*)');
|
|
|
|
- return (document.location.href.match(re) || ['',null])[1];
|
|
|
|
-},
|
|
|
|
-
|
|
|
|
// Read form control compatible setting from cookie
|
|
// Read form control compatible setting from cookie
|
|
getSetting: function(name) {
|
|
getSetting: function(name) {
|
|
var val, ctrl = $('VNC_' + name);
|
|
var val, ctrl = $('VNC_' + name);
|
|
@@ -188,14 +182,14 @@ saveSetting: function(name) {
|
|
|
|
|
|
// Initial page load read/initialization of settings
|
|
// Initial page load read/initialization of settings
|
|
initSetting: function(name, defVal) {
|
|
initSetting: function(name, defVal) {
|
|
- var val, DC = DefaultControls;
|
|
|
|
|
|
+ var val;
|
|
|
|
|
|
// Check Query string followed by cookie
|
|
// Check Query string followed by cookie
|
|
- val = DC.getQueryVar(name);
|
|
|
|
|
|
+ val = Util.getQueryVar(name);
|
|
if (val === null) {
|
|
if (val === null) {
|
|
val = Util.readCookie(name, defVal);
|
|
val = Util.readCookie(name, defVal);
|
|
}
|
|
}
|
|
- DC.updateSetting(name, val);
|
|
|
|
|
|
+ DefaultControls.updateSetting(name, val);
|
|
Util.Debug("Setting '" + name + "' initialized to '" + val + "'");
|
|
Util.Debug("Setting '" + name + "' initialized to '" + val + "'");
|
|
return val;
|
|
return val;
|
|
},
|
|
},
|
|
@@ -206,7 +200,7 @@ initSetting: function(name, defVal) {
|
|
// On close, settings are applied
|
|
// On close, settings are applied
|
|
clickSettingsMenu: function() {
|
|
clickSettingsMenu: function() {
|
|
var DC = DefaultControls;
|
|
var DC = DefaultControls;
|
|
- if (DefaultControls.settingsOpen) {
|
|
|
|
|
|
+ if (DC.settingsOpen) {
|
|
DC.settingsApply();
|
|
DC.settingsApply();
|
|
|
|
|
|
DC.closeSettingsMenu();
|
|
DC.closeSettingsMenu();
|