[DE] Fix Bug 42977. Enable search in code pages combobox

This commit is contained in:
Julia Radzhabova 2019-09-26 17:34:01 +03:00
parent 282449adcb
commit 8560476ce7

View file

@ -231,6 +231,9 @@ define([
delimiter = this.cmbDelimiter ? this.cmbDelimiter.getValue() : null, delimiter = this.cmbDelimiter ? this.cmbDelimiter.getValue() : null,
delimiterChar = (delimiter == -1) ? this.inputDelimiter.getValue() : null; delimiterChar = (delimiter == -1) ? this.inputDelimiter.getValue() : null;
(delimiter == -1) && (delimiter = null); (delimiter == -1) && (delimiter = null);
if (!this.closable && this.type == Common.Utils.importTextType.TXT) { //save last encoding only for opening txt files
Common.localStorage.setItem("de-settings-open-encoding", encoding);
}
this.handler.call(this, state, encoding, delimiter, delimiterChar); this.handler.call(this, state, encoding, delimiter, delimiterChar);
} }
} }
@ -284,11 +287,17 @@ define([
data: listItems, data: listItems,
editable: false, editable: false,
disabled: true, disabled: true,
search: true,
itemsTemplate: itemsTemplate itemsTemplate: itemsTemplate
}); });
this.cmbEncoding.setDisabled(false); this.cmbEncoding.setDisabled(false);
this.cmbEncoding.setValue((this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : encodedata[0][0]); var encoding = (this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : encodedata[0][0];
if (!this.closable && this.type == Common.Utils.importTextType.TXT) { // only for opening txt files
var value = Common.localStorage.getItem("de-settings-open-encoding");
value && (encoding = parseInt(value));
}
this.cmbEncoding.setValue(encoding);
if (this.preview) if (this.preview)
this.cmbEncoding.on('selected', _.bind(this.onCmbEncodingSelect, this)); this.cmbEncoding.on('selected', _.bind(this.onCmbEncodingSelect, this));