Merge pull request #1986 from ONLYOFFICE/fix/bug-58524

[SSE] Added option to update all pivot tables
This commit is contained in:
Julia Radzhabova 2022-09-30 17:32:28 +03:00 committed by GitHub
commit 12b205629f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 4 deletions

View file

@ -181,9 +181,10 @@ define([
Common.NotificationCenter.trigger('edit:complete', this);
},
onRefreshClick: function(btn, opts){
onRefreshClick: function(type){
if (this.api) {
this._originalProps.asc_refresh(this.api);
if(type == 'current') this._originalProps.asc_refresh(this.api);
else if(type == 'all') this.api.asc_refreshAllPivots();
}
Common.NotificationCenter.trigger('edit:complete', this);
},

View file

@ -119,7 +119,11 @@ define([
});
this.btnRefreshPivot.on('click', function (e) {
me.fireEvent('pivottable:refresh');
me.fireEvent('pivottable:refresh', ['current']);
});
this.btnRefreshPivot.menu.on('item:click', function (menu, item, e) {
me.fireEvent('pivottable:refresh', [item.value]);
});
this.btnSelectPivot.on('click', function (e) {
@ -254,6 +258,7 @@ define([
iconCls: 'toolbar__icon btn-update',
caption: this.txtRefresh,
disabled : true,
split : true,
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock, _set.wsLock],
dataHint : '1',
dataHintDirection: 'bottom',
@ -333,7 +338,6 @@ define([
me.btnsAddPivot.forEach( function(btn) {
btn.updateHint(me.tipCreatePivot);
});
me.btnRefreshPivot.updateHint(me.tipRefresh);
me.btnSelectPivot.updateHint(me.tipSelect);
me.btnPivotLayout.updateHint(me.capLayout);
me.btnPivotLayout.setMenu(new Common.UI.Menu({
@ -374,6 +378,14 @@ define([
]
}));
me.btnRefreshPivot.setMenu(new Common.UI.Menu({
items: [
{ caption: me.txtRefresh, value: 'current'},
{ caption: me.txtRefreshAll, value: 'all'}
]
}));
me.btnRefreshPivot.updateHint([me.tipRefreshCurrent, me.tipRefresh]);
setEvents.call(me);
});
},
@ -443,6 +455,8 @@ define([
mniBottomSubtotals: 'Show all Subtotals at Bottom of Group',
mniTopSubtotals: 'Show all Subtotals at Top of Group',
txtRefresh: 'Refresh',
txtRefreshAll: 'Refresh All',
tipRefreshCurrent: 'Update the information from data source for the current table',
tipRefresh: 'Update the information from data source',
tipGrandTotals: 'Show or hide grand totals',
tipSubtotals: 'Show or hide subtotals',

View file

@ -2803,6 +2803,7 @@
"SSE.Views.PivotTable.textRowHeader": "Row Headers",
"SSE.Views.PivotTable.tipCreatePivot": "Insert Pivot Table",
"SSE.Views.PivotTable.tipGrandTotals": "Show or hide grand totals",
"SSE.Views.PivotTable.tipRefreshCurrent": "Update the information from data source for the current table",
"SSE.Views.PivotTable.tipRefresh": "Update the information from data source",
"SSE.Views.PivotTable.tipSelect": "Select entire pivot table",
"SSE.Views.PivotTable.tipSubtotals": "Show or hide subtotals",
@ -2816,6 +2817,7 @@
"SSE.Views.PivotTable.txtGroupPivot_Medium": "Medium",
"SSE.Views.PivotTable.txtGroupPivot_Dark": "Dark",
"SSE.Views.PivotTable.txtRefresh": "Refresh",
"SSE.Views.PivotTable.txtRefreshAll": "Refresh All",
"SSE.Views.PivotTable.txtSelect": "Select",
"SSE.Views.PrintSettings.btnDownload": "Save & Download",
"SSE.Views.PrintSettings.btnPrint": "Save & Print",

View file

@ -2781,6 +2781,7 @@
"SSE.Views.PivotTable.textRowHeader": "Заголовки строк",
"SSE.Views.PivotTable.tipCreatePivot": "Вставить сводную таблицу",
"SSE.Views.PivotTable.tipGrandTotals": "Показать или скрыть общие итоги",
"SSE.Views.PivotTable.tipRefreshCurrent": "Обновить информацию из источника данных для текущей таблицы",
"SSE.Views.PivotTable.tipRefresh": "Обновить информацию из источника данных",
"SSE.Views.PivotTable.tipSelect": "Выделить всю сводную таблицу",
"SSE.Views.PivotTable.tipSubtotals": "Показать или скрыть промежуточные итоги",
@ -2794,6 +2795,7 @@
"SSE.Views.PivotTable.txtGroupPivot_Medium": "Средний",
"SSE.Views.PivotTable.txtGroupPivot_Dark": "Темный",
"SSE.Views.PivotTable.txtRefresh": "Обновить",
"SSE.Views.PivotTable.txtRefreshAll": "Обновить все",
"SSE.Views.PivotTable.txtSelect": "Выделить",
"SSE.Views.PrintSettings.btnDownload": "Сохранить и скачать",
"SSE.Views.PrintSettings.btnPrint": "Сохранить и напечатать",