mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
fixed move or copy index
This commit is contained in:
@ -740,6 +740,7 @@ define([
|
||||
spreadsheetName: me.api.asc_getDocumentName(),
|
||||
isDesktopApp: me.statusbar.mode.isDesktopApp,
|
||||
isOffline: me.statusbar.mode.isOffline,
|
||||
hiddenWorksheets: me.statusbar.getHiddenWorksheets(),
|
||||
handler : function(result, i, copy, workbook) {
|
||||
btn = result;
|
||||
if (btn == 'ok') {
|
||||
|
||||
@ -444,6 +444,7 @@ define([
|
||||
|
||||
update: function() {
|
||||
var me = this;
|
||||
me.hiddenWorksheets = [];
|
||||
var renamingWorksheet = this.controller && this.controller.renamingWorksheet;
|
||||
this.tabbar.empty(true);
|
||||
this.tabMenu.items[5].menu.removeAll();
|
||||
@ -506,6 +507,7 @@ define([
|
||||
|
||||
allItems.forEach(function(item){
|
||||
var hidden = me.api.asc_isWorksheetHidden(item.sheetindex);
|
||||
hidden && me.hiddenWorksheets.push(item);
|
||||
me.sheetListMenu.addItem(new Common.UI.MenuItem({
|
||||
style: 'white-space: pre',
|
||||
caption: Common.Utils.String.htmlEncode(item.label),
|
||||
@ -550,6 +552,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
getHiddenWorksheets: function () {
|
||||
return this.hiddenWorksheets;
|
||||
},
|
||||
|
||||
onUpdateSheetViewSettings: function() {
|
||||
this.updateRtlSheet();
|
||||
},
|
||||
@ -1341,7 +1347,7 @@ define([
|
||||
var active = this.listNames.getSelectedRec(),
|
||||
index = active ? active.get('inindex') : 0;
|
||||
if (index === -255)
|
||||
index = this.listNames.store.length - 1;
|
||||
index = this.listNames.store.length - 1 + this.options.hiddenWorksheets.length;
|
||||
|
||||
var record = this.cmbSpreadsheet.getSelectedRecord();
|
||||
this.options.handler.call(this,
|
||||
@ -1356,7 +1362,7 @@ define([
|
||||
var active = this.listNames.getSelectedRec(),
|
||||
index = active ? active.get('inindex') : 0;
|
||||
if (index === -255)
|
||||
index = this.listNames.store.length - 1;
|
||||
index = this.listNames.store.length - 1 + this.options.hiddenWorksheets.length;
|
||||
|
||||
var record = this.cmbSpreadsheet.getSelectedRecord();
|
||||
this.options.handler.call(this, 'ok', index, this.chCreateCopy.getValue()==='checked', record.value);
|
||||
|
||||
Reference in New Issue
Block a user