[SSE] Remove Text to columns button from the right panel

This commit is contained in:
Julia Radzhabova 2019-05-30 17:15:13 +03:00
parent 2c1e8da0b2
commit 14c7f181aa
3 changed files with 3 additions and 54 deletions

View file

@ -60,15 +60,5 @@
<div id="cell-spin-angle" style="display: inline-block;margin-left:5px;"></div> <div id="cell-spin-angle" style="display: inline-block;margin-left:5px;"></div>
</td> </td>
</tr> </tr>
<tr>
<td class="padding-small" colspan=2>
<div class="separator horizontal"></div>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<button type="button" class="btn btn-text-default" id="cell-btn-text-to-column" style="width:100%;"><%= scope.textTextToColumn %></button>
</td>
</tr>
<tr class="finish-cell"></tr> <tr class="finish-cell"></tr>
</table> </table>

View file

@ -71,13 +71,11 @@ define([
this._state = { this._state = {
BackColor: undefined, BackColor: undefined,
DisabledControls: true, DisabledControls: true,
CellAngle: undefined, CellAngle: undefined
CSVOptions: new Asc.asc_CCSVAdvancedOptions(0, 4, '')
}; };
this.lockedControls = []; this.lockedControls = [];
this._locked = true; this._locked = true;
this.isEditCell = false; this.isEditCell = false;
this.isMultiSelect = false;
this.BorderType = 1; this.BorderType = 1;
this.render(); this.render();
@ -141,32 +139,6 @@ define([
this.api && this.api.asc_setCellAngle(field.getNumberValue()); this.api && this.api.asc_setCellAngle(field.getNumberValue());
}, },
onTextToColumn: function() {
this.api.asc_TextImport(this._state.CSVOptions, _.bind(this.onTextToColumnCallback, this), false);
},
onTextToColumnCallback: function(data) {
if (!data || !data.length) return;
var me = this;
(new Common.Views.OpenDialog({
title: me.textWizard,
closable: true,
type: Common.Utils.importTextType.Columns,
preview: true,
previewData: data,
settings: this._state.CSVOptions,
api: me.api,
handler: function (result, encoding, delimiter, delimiterChar) {
if (result == 'ok') {
if (me && me.api) {
me.api.asc_TextToColumns(new Asc.asc_CCSVAdvancedOptions(encoding, delimiter, delimiterChar));
}
}
}
})).show();
},
render: function () { render: function () {
var el = $(this.el); var el = $(this.el);
el.html(this.template({ el.html(this.template({
@ -178,7 +150,6 @@ define([
this.api = o; this.api = o;
if (o) { if (o) {
this.api.asc_registerCallback('asc_onEditCell', this.onApiEditCell.bind(this)); this.api.asc_registerCallback('asc_onEditCell', this.onApiEditCell.bind(this));
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onApiSelectionChanged, this));
} }
return this; return this;
}, },
@ -267,13 +238,6 @@ define([
}); });
this.lockedControls.push(this.spnAngle); this.lockedControls.push(this.spnAngle);
this.spnAngle.on('change', _.bind(this.onAngleChange, this)); this.spnAngle.on('change', _.bind(this.onAngleChange, this));
this.btnTextToColumn = new Common.UI.Button({
el: $('#cell-btn-text-to-column'),
disabled: this._locked
});
this.btnTextToColumn.on('click', _.bind(this.onTextToColumn, this));
this.lockedControls.push(this.btnTextToColumn);
}, },
createDelayedElements: function() { createDelayedElements: function() {
@ -371,10 +335,6 @@ define([
this.disableControls(this._locked); this.disableControls(this._locked);
}, },
onApiSelectionChanged: function(info) {
this.isMultiSelect = info.asc_getFlags().asc_getMultiselect() || info.asc_getSelectedColsCount()>1;
},
setLocked: function (locked) { setLocked: function (locked) {
this._locked = locked; this._locked = locked;
}, },
@ -389,7 +349,6 @@ define([
item.setDisabled(disable); item.setDisabled(disable);
}); });
} }
this.btnTextToColumn.setDisabled(disable || this.isMultiSelect);
}, },
textBorders: 'Border\'s Style', textBorders: 'Border\'s Style',

View file

@ -1135,8 +1135,8 @@
"SSE.Views.CellSettings.textNewColor": "Add New Custom Color", "SSE.Views.CellSettings.textNewColor": "Add New Custom Color",
"SSE.Views.CellSettings.textOrientation": "Text Orientation", "SSE.Views.CellSettings.textOrientation": "Text Orientation",
"SSE.Views.CellSettings.textSelectBorders": "Select borders you want to change applying style chosen above", "SSE.Views.CellSettings.textSelectBorders": "Select borders you want to change applying style chosen above",
"SSE.Views.CellSettings.textTextToColumn": "Text to Columns", "del_SSE.Views.CellSettings.textTextToColumn": "Text to Columns",
"SSE.Views.CellSettings.textWizard": "Text to Columns Wizard", "del_SSE.Views.CellSettings.textWizard": "Text to Columns Wizard",
"SSE.Views.CellSettings.tipAll": "Set outer border and all inner lines", "SSE.Views.CellSettings.tipAll": "Set outer border and all inner lines",
"SSE.Views.CellSettings.tipBottom": "Set outer bottom border only", "SSE.Views.CellSettings.tipBottom": "Set outer bottom border only",
"SSE.Views.CellSettings.tipDiagD": "Set Diagonal Down Border", "SSE.Views.CellSettings.tipDiagD": "Set Diagonal Down Border",