[SSE] Remove duplicates in table from the right panel

This commit is contained in:
Julia Radzhabova 2020-04-13 12:45:11 +03:00
parent 77a7f8a479
commit 48fa6dbf8f
4 changed files with 17 additions and 1 deletions

View file

@ -96,6 +96,7 @@ define([
'sheet:changed': this.onApiSheetChanged
}
});
Common.NotificationCenter.on('data:remduplicates', _.bind(this.onRemoveDuplicates, this));
},
SetDisabled: function(state) {

View file

@ -78,6 +78,11 @@
<button type="button" class="btn btn-text-default" id="table-btn-convert-range" style="width:100%;"><%= scope.textConvertRange %></button>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<button type="button" class="btn btn-text-default" id="table-btn-rem-duplicates" style="width:100%;"><%= scope.textRemDuplicates %></button>
</td>
</tr>
<tr>
<td class="padding-small" colspan=2>
<div class="separator horizontal"></div>

View file

@ -297,6 +297,14 @@ define([
}, this));
this.lockedControls.push(this.btnConvertRange);
this.btnRemDuplicates = new Common.UI.Button({
el: $('#table-btn-rem-duplicates')
});
this.btnRemDuplicates.on('click', _.bind(function(btn){
Common.NotificationCenter.trigger('data:remduplicates', this);
}, this));
this.lockedControls.push(this.btnRemDuplicates);
$(this.el).on('click', '#table-advanced-link', _.bind(this.openAdvancedSettings, this));
this._initSettings = false;
@ -576,7 +584,8 @@ define([
textAdvanced: 'Show advanced settings',
textConvertRange: 'Convert to range',
textLongOperation: 'Long operation',
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?'
warnLongOperation: 'The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?',
textRemDuplicates: 'Remove duplicates'
}, SSE.Views.TableSettings || {}));
});

View file

@ -2377,6 +2377,7 @@
"SSE.Views.TableSettings.textTemplate": "Select From Template",
"SSE.Views.TableSettings.textTotal": "Total",
"SSE.Views.TableSettings.warnLongOperation": "The operation you are about to perform might take rather much time to complete.<br>Are you sure you want to continue?",
"SSE.Views.TableSettings.textRemDuplicates": "Remove duplicates",
"SSE.Views.TableSettingsAdvanced.textAlt": "Alternative Text",
"SSE.Views.TableSettingsAdvanced.textAltDescription": "Description",
"SSE.Views.TableSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table.",