[SSE] Refactoring data from file
This commit is contained in:
parent
d1ff42ccd8
commit
1f62dbf053
|
@ -73,7 +73,6 @@ define([
|
|||
height = options.warning ? 187 : 147;
|
||||
break;
|
||||
}
|
||||
// height = (options.type == Common.Utils.importTextType.CSV || options.type == Common.Utils.importTextType.Paste || options.type == Common.Utils.importTextType.Columns) ? 190 : (options.warning ? 187 : 147);
|
||||
}
|
||||
|
||||
_.extend(_options, {
|
||||
|
@ -423,7 +422,7 @@ define([
|
|||
options.asc_setNumberDecimalSeparator(this.separatorOptions.decimal);
|
||||
options.asc_setNumberGroupSeparator(this.separatorOptions.thousands);
|
||||
}
|
||||
this.api.asc_TextFromFileOrUrl(options, _.bind(this.previewCallback, this), undefined, true);
|
||||
this.api.asc_decodeBuffer(this.preview, options, _.bind(this.previewCallback, this));
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -253,16 +253,13 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onDataFromTextCallback: function(data, advOptions) {
|
||||
if (!data || !data.length) return;
|
||||
|
||||
onDataFromTextCallback: function(advOptions) {
|
||||
var me = this;
|
||||
(new Common.Views.OpenDialog({
|
||||
title: me.txtImportWizard,
|
||||
closable: true,
|
||||
type: Common.Utils.importTextType.Data,
|
||||
preview: true,
|
||||
previewData: data,
|
||||
preview: advOptions.asc_getData(),
|
||||
settings: advOptions ? advOptions.asc_getRecommendedSettings() : me._state.CSVOptions,
|
||||
codepages: advOptions ? advOptions.asc_getCodePages() : null,
|
||||
api: me.api,
|
||||
|
|
Loading…
Reference in a new issue