diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js
index 222245201c..16a3aa97e8 100644
--- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js
+++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js
@@ -500,7 +500,7 @@ define([
var copyDialog = new SSE.Views.Statusbar.CopyDialog({
title : me.statusbar.itemMoveOrCopy,
sheets : items,
- spreadsheetName: me.statusbar.mode.isDesktopApp && me.api.asc_getDocumentName(),
+ spreadsheetName: me.api.asc_getDocumentName(),
isDesktopApp: me.statusbar.mode.isDesktopApp,
handler : function(btn, i, copy, workbook) {
if (btn == 'ok') {
@@ -533,14 +533,12 @@ define([
});
copyDialog.show();
- if (me.statusbar.mode.isDesktopApp) {
- var callback = function (workbooks) {
- if (workbooks) {
- copyDialog.changeSpreadsheets(workbooks);
- }
- };
- me.api.asc_getOpeningDocumentsList(callback);
- }
+ var callback = function (workbooks) {
+ if (workbooks) {
+ copyDialog.changeSpreadsheets(workbooks);
+ }
+ };
+ me.api.asc_getOpeningDocumentsList(callback);
},
onAddWorksheetClick: function(o, index, opts) {
diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js
index d3769a4871..f50d3415f1 100644
--- a/apps/spreadsheeteditor/main/app/view/Statusbar.js
+++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js
@@ -1209,12 +1209,10 @@ define([
},
template: '
' +
- '<% if (isDesktopApp) { %>' +
'
' +
'' +
'
' +
'
' +
- '<% } %>' +
'
' +
'' +
'
' +
@@ -1229,16 +1227,14 @@ define([
});
this.options.tpl = _.template(this.template)(this.options);
- if (this.options.isDesktopApp) {
- this.spreadsheets = {
- data: [
- {displayValue: this.options.spreadsheetName, value: 'current', index: 0},
- {displayValue: this.textCreateNewSpreadsheet, value: 'new', index: -1}
- ],
- changed: false,
- opened: false
- };
- }
+ this.spreadsheets = {
+ data: [
+ {displayValue: this.options.spreadsheetName, value: 'current', index: 0},
+ {displayValue: this.textCreateNewSpreadsheet, value: 'new', index: -1}
+ ],
+ changed: false,
+ opened: false
+ };
this.sheets = [this.options.sheets];
@@ -1252,26 +1248,24 @@ define([
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
- if (this.options.isDesktopApp) {
- this.cmbSpreadsheet = new Common.UI.ComboBox({
- el: $('#status-cmb-spreadsheet', this.$window),
- menuStyle: 'min-width: 100%;',
- data: this.spreadsheets.data,
- cls: 'input-group-nr',
- editable: false
- });
- this.cmbSpreadsheet.setValue('current');
- var showBefore = function () {
- me.spreadsheets.opened = true;
- if (me.spreadsheets.changed) {
- me.cmbSpreadsheet.setData(me.spreadsheets.data)
- me.cmbSpreadsheet.setValue('current');
- }
- me.cmbSpreadsheet.off('show:before', showBefore);
- };
- this.cmbSpreadsheet.on('show:before', showBefore);
- this.cmbSpreadsheet.on('selected', _.bind(this.onChangeSpreadsheet, this));
- }
+ this.cmbSpreadsheet = new Common.UI.ComboBox({
+ el: $('#status-cmb-spreadsheet', this.$window),
+ menuStyle: 'min-width: 100%;',
+ data: this.spreadsheets.data,
+ cls: 'input-group-nr',
+ editable: false
+ });
+ this.cmbSpreadsheet.setValue('current');
+ var showBefore = function () {
+ me.spreadsheets.opened = true;
+ if (me.spreadsheets.changed) {
+ me.cmbSpreadsheet.setData(me.spreadsheets.data)
+ me.cmbSpreadsheet.setValue('current');
+ }
+ me.cmbSpreadsheet.off('show:before', showBefore);
+ };
+ this.cmbSpreadsheet.on('show:before', showBefore);
+ this.cmbSpreadsheet.on('selected', _.bind(this.onChangeSpreadsheet, this));
var pages = [];
this.sheets[0].forEach(function(item){
@@ -1383,7 +1377,7 @@ define([
if (this.options.handler) {
this.options.handler.call(this,
- event.currentTarget.attributes['result'].value, index, this.chCreateCopy.getValue()==='checked', this.cmbSpreadsheet && this.cmbSpreadsheet.getSelectedRecord().value);
+ event.currentTarget.attributes['result'].value, index, this.chCreateCopy.getValue()==='checked', this.cmbSpreadsheet.getSelectedRecord().value);
}
this.close();
@@ -1394,7 +1388,7 @@ define([
index = active ? active.get('inindex') : 0;
if (this.options.handler) {
- this.options.handler.call(this, 'ok', index, this.chCreateCopy.getValue()==='checked', this.cmbSpreadsheet && this.cmbSpreadsheet.getSelectedRecord().value);
+ this.options.handler.call(this, 'ok', index, this.chCreateCopy.getValue()==='checked', this.cmbSpreadsheet.getSelectedRecord().value);
}
this.close();