js-options: adding getOptionKeys methods
This commit is contained in:
parent
03794da2ba
commit
7df5b13687
|
@ -32,11 +32,14 @@ Options.prototype.setOption = function (key, value) {
|
||||||
this.optionsStorage.setOption(key, value);
|
this.optionsStorage.setOption(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Options.prototype.getOptions = function () {
|
Options.prototype.getOptionsKeys = function () {
|
||||||
var results = {
|
|
||||||
};
|
|
||||||
this.optionsStorage.setOptionsDoctypePrefix(Options.SYSTEM);
|
this.optionsStorage.setOptionsDoctypePrefix(Options.SYSTEM);
|
||||||
var options = JSON.parse(this.optionsStorage.getOption(this.namespace, '{}'));
|
return JSON.parse(this.optionsStorage.getOption(this.namespace, '{}'));
|
||||||
|
}
|
||||||
|
|
||||||
|
Options.prototype.getOptions = function () {
|
||||||
|
var results = {};
|
||||||
|
var options = this.getOptionsKeys();
|
||||||
for (var key in options) {
|
for (var key in options) {
|
||||||
results[key] = this.getOption(key, '');
|
results[key] = this.getOption(key, '');
|
||||||
}
|
}
|
||||||
|
@ -95,3 +98,17 @@ Options.prototype.getSystemIdOptions = function () {
|
||||||
}
|
}
|
||||||
return this.systemIdOptions.getOptions();
|
return this.systemIdOptions.getOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Options.prototype.getSystemOptionKeys = function () {
|
||||||
|
if (this.systemIdOptions === undefined) {
|
||||||
|
this.setSystemId();
|
||||||
|
}
|
||||||
|
return this.systemIdOptions.getSystemOptionKeys();
|
||||||
|
}
|
||||||
|
|
||||||
|
Options.prototype.getSystemOptions = function () {
|
||||||
|
if (this.systemIdOptions === undefined) {
|
||||||
|
this.setSystemId();
|
||||||
|
}
|
||||||
|
return this.systemIdOptions.getSystemOptions();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue