[SSE] Fix Bug 33224.
This commit is contained in:
parent
777e645743
commit
dedd7a50d4
|
@ -76,7 +76,10 @@ define([
|
||||||
'<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>',
|
'<div id="id-codepages-combo" class="input-group-nr" style="margin-bottom:15px;"></div>',
|
||||||
'<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
|
'<% if (type == Asc.c_oAscAdvancedOptionsID.CSV) { %>',
|
||||||
'<label class="header">' + t.txtDelimiter + '</label>',
|
'<label class="header">' + t.txtDelimiter + '</label>',
|
||||||
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;"></div>',
|
'<div>',
|
||||||
|
'<div id="id-delimiters-combo" class="input-group-nr" style="max-width: 110px;display: inline-block; vertical-align: middle;"></div>',
|
||||||
|
'<div id="id-delimiter-other" class="input-row" style="display: inline-block; vertical-align: middle;margin-left: 10px;"></div>',
|
||||||
|
'</div>',
|
||||||
'<% } %>',
|
'<% } %>',
|
||||||
'<% } %>',
|
'<% } %>',
|
||||||
'</div>',
|
'</div>',
|
||||||
|
@ -135,9 +138,12 @@ define([
|
||||||
|
|
||||||
onBtnClick: function (event) {
|
onBtnClick: function (event) {
|
||||||
if (this.handler) {
|
if (this.handler) {
|
||||||
if (this.cmbEncoding)
|
if (this.cmbEncoding) {
|
||||||
this.handler.call(this, this.cmbEncoding.getValue(), this.cmbDelimiter ? this.cmbDelimiter.getValue() : null);
|
var delimiter = this.cmbDelimiter ? this.cmbDelimiter.getValue() : null,
|
||||||
else
|
delimiterChar = (delimiter == -1) ? this.inputDelimiter.getValue() : null;
|
||||||
|
(delimiter == -1) && (delimiter = null);
|
||||||
|
this.handler.call(this, this.cmbEncoding.getValue(), delimiter, delimiterChar);
|
||||||
|
} else
|
||||||
this.handler.call(this, this.inputPwd.getValue());
|
this.handler.call(this, this.inputPwd.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,14 +343,29 @@ define([
|
||||||
{value: 2, displayValue: ';'},
|
{value: 2, displayValue: ';'},
|
||||||
{value: 3, displayValue: ':'},
|
{value: 3, displayValue: ':'},
|
||||||
{value: 1, displayValue: this.txtTab},
|
{value: 1, displayValue: this.txtTab},
|
||||||
{value: 5, displayValue: this.txtSpace}],
|
{value: 5, displayValue: this.txtSpace},
|
||||||
|
{value: -1, displayValue: this.txtOther}],
|
||||||
editable: false
|
editable: false
|
||||||
});
|
});
|
||||||
this.cmbDelimiter.setValue( (this.settings && this.settings.asc_getDelimiter()) ? this.settings.asc_getDelimiter() : 4);
|
this.cmbDelimiter.setValue( (this.settings && this.settings.asc_getDelimiter()) ? this.settings.asc_getDelimiter() : 4);
|
||||||
|
this.cmbDelimiter.on('selected', _.bind(this.onCmbDelimiterSelect, this));
|
||||||
|
|
||||||
|
this.inputDelimiter = new Common.UI.InputField({
|
||||||
|
el : $('#id-delimiter-other'),
|
||||||
|
style : 'width: 30px;',
|
||||||
|
maxLength: 1,
|
||||||
|
value: (this.settings && this.settings.asc_getDelimiterChar()) ? this.settings.asc_getDelimiterChar() : ''
|
||||||
|
});
|
||||||
|
this.inputDelimiter.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onCmbDelimiterSelect: function(combo, record){
|
||||||
|
this.inputDelimiter.setVisible(record.value == -1);
|
||||||
|
},
|
||||||
|
|
||||||
okButtonText : "OK",
|
okButtonText : "OK",
|
||||||
cancelButtonText : "Cancel",
|
cancelButtonText : "Cancel",
|
||||||
txtDelimiter : "Delimiter",
|
txtDelimiter : "Delimiter",
|
||||||
|
@ -353,7 +374,8 @@ define([
|
||||||
txtTab : "Tab",
|
txtTab : "Tab",
|
||||||
txtTitle : "Choose %1 options",
|
txtTitle : "Choose %1 options",
|
||||||
txtPassword : "Password",
|
txtPassword : "Password",
|
||||||
txtTitleProtected : "Protected File"
|
txtTitleProtected : "Protected File",
|
||||||
|
txtOther: 'Other'
|
||||||
|
|
||||||
}, Common.Views.OpenDialog || {}));
|
}, Common.Views.OpenDialog || {}));
|
||||||
});
|
});
|
|
@ -1402,10 +1402,10 @@ define([
|
||||||
type: type,
|
type: type,
|
||||||
codepages: advOptions.asc_getOptions().asc_getCodePages(),
|
codepages: advOptions.asc_getOptions().asc_getCodePages(),
|
||||||
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
|
settings: advOptions.asc_getOptions().asc_getRecommendedSettings(),
|
||||||
handler: function (encoding, delimiter) {
|
handler: function (encoding, delimiter, delimiterChar) {
|
||||||
me.isShowOpenDialog = false;
|
me.isShowOpenDialog = false;
|
||||||
if (me && me.api) {
|
if (me && me.api) {
|
||||||
me.api.asc_setAdvancedOptions(type, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter));
|
me.api.asc_setAdvancedOptions(type, new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar));
|
||||||
me.loadMask && me.loadMask.show();
|
me.loadMask && me.loadMask.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
"Common.Views.OpenDialog.txtTab": "Tab",
|
"Common.Views.OpenDialog.txtTab": "Tab",
|
||||||
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
|
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
|
||||||
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
|
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
|
||||||
|
"Common.Views.OpenDialog.txtOther": "Other",
|
||||||
"Common.Views.PluginDlg.textLoading": "Loading",
|
"Common.Views.PluginDlg.textLoading": "Loading",
|
||||||
"Common.Views.Plugins.strPlugins": "Plugins",
|
"Common.Views.Plugins.strPlugins": "Plugins",
|
||||||
"Common.Views.Plugins.textLoading": "Loading",
|
"Common.Views.Plugins.textLoading": "Loading",
|
||||||
|
|
Loading…
Reference in a new issue