Rev3672, Fix Config page fileserver port changing

This commit is contained in:
shortcutme 2018-10-24 13:31:42 +02:00
parent a58743b820
commit f540645d80
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
3 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ class UiConfig extends ZeroFrame
if value_same_as_default
value = null
if @config[item.key].item.valid_pattern and not @config[item.key].item.isHidden()
if @config[item.key].item.valid_pattern and not @config[item.key].item.isHidden?()
match = value.match(@config[item.key].item.valid_pattern)
if not match or match[0] != value
message = "Invalid value of #{@config[item.key].item.title}: #{value} (does not matches #{@config[item.key].item.valid_pattern})"

View file

@ -1762,7 +1762,7 @@
};
UiConfig.prototype.saveValues = function(cb) {
var changed_values, i, item, j, last, len, match, message, results, value, value_same_as_default;
var base, changed_values, i, item, j, last, len, match, message, results, value, value_same_as_default;
changed_values = this.getValuesChanged();
results = [];
for (i = j = 0, len = changed_values.length; j < len; i = ++j) {
@ -1773,7 +1773,7 @@
if (value_same_as_default) {
value = null;
}
if (this.config[item.key].item.valid_pattern && !this.config[item.key].item.isHidden()) {
if (this.config[item.key].item.valid_pattern && !(typeof (base = this.config[item.key].item).isHidden === "function" ? base.isHidden() : void 0)) {
match = value.match(this.config[item.key].item.valid_pattern);
if (!match || match[0] !== value) {
message = "Invalid value of " + this.config[item.key].item.title + ": " + value + " (does not matches " + this.config[item.key].item.valid_pattern + ")";

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.6.4"
self.rev = 3671
self.rev = 3672
self.argv = argv
self.action = None
self.pending_changes = {}