diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index cbe889deb..f52ad272d 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -2552,7 +2552,6 @@ define([
this.getApplication().getController('RightMenu').updateMetricUnit();
this.getApplication().getController('Toolbar').getView('Toolbar').updateMetricUnit();
}
- //this.getApplication().getController('Print').getView('MainSettingsPrint').updateMetricUnit();
this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit();
},
diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js
index bfd5be211..9b869fb01 100644
--- a/apps/spreadsheeteditor/main/app/controller/Print.js
+++ b/apps/spreadsheeteditor/main/app/controller/Print.js
@@ -62,10 +62,6 @@ define([
this._isPreviewVisible = false;
this.addListeners({
- /*'MainSettingsPrint': {
- 'show': _.bind(this.onShowMainSettingsPrint, this),
- 'render:after': _.bind(this.onAfterRender, this)
- },*/
'PrintWithPreview': {
'show': _.bind(this.onShowMainSettingsPrint, this),
'render:after': _.bind(this.onAfterRender, this),
@@ -80,7 +76,6 @@ define([
},
onLaunch: function() {
- //this.printSettings = this.createView('MainSettingsPrint');
this.printSettings = this.createView('PrintWithPreview');
},
diff --git a/apps/spreadsheeteditor/main/app/controller/ViewTab.js b/apps/spreadsheeteditor/main/app/controller/ViewTab.js
index beaa8ce92..bac0719d4 100644
--- a/apps/spreadsheeteditor/main/app/controller/ViewTab.js
+++ b/apps/spreadsheeteditor/main/app/controller/ViewTab.js
@@ -271,7 +271,6 @@ define([
},
onApiZoomChange: function(zf, type){
- console.log('zoom');
var value = Math.floor((zf + .005) * 100);
this.view.cmbZoom.setValue(value, value + '%');
this._state.zoomValue = value;
diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
index 5dbedde58..32c6b5d06 100644
--- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
+++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
@@ -191,7 +191,6 @@ define([
'
',
'',
''
@@ -210,10 +209,6 @@ define([
this.generalSettings.options = {alias:'MainSettingsGeneral'};
this.generalSettings.render($markup.findById('#panel-settings-general'));
- //this.printSettings = SSE.getController('Print').getView('MainSettingsPrint');
- //this.printSettings.menu = this.menu;
- //this.printSettings.render($markup.findById('#panel-settings-print'));
-
this.spellcheckSettings = new SSE.Views.FileMenuPanels.MainSpellCheckSettings({menu: this.menu});
this.spellcheckSettings.render($markup.findById('#panel-settings-spellcheck'));
@@ -221,7 +216,6 @@ define([
el: $markup.findById('#id-settings-menu'),
store: new Common.UI.DataViewStore([
{name: this.txtGeneral, panel: this.generalSettings, iconCls:'toolbar__icon btn-settings', contentTarget: 'panel-settings-general', selected: true},
- //{name: this.txtPageSettings, panel: this.printSettings, iconCls:'toolbar__icon btn-print', contentTarget: 'panel-settings-print'},
{name: this.txtSpellChecking, panel: this.spellcheckSettings, iconCls:'toolbar__icon btn-ic-docspell', contentTarget: 'panel-settings-spellcheck'}
]),
itemTemplate: _.template([
@@ -253,15 +247,10 @@ define([
setMode: function(mode) {
this.mode = mode;
- if (!this.mode.canPrint) {
- $(this.viewSettingsPicker.dataViewItems[1].el).hide();
- if (this.printSettings && this.printSettings.$el && this.printSettings.$el.hasClass('active'))
- this.viewSettingsPicker.selectByIndex(0);
- }
this.generalSettings && this.generalSettings.setMode(this.mode);
this.spellcheckSettings && this.spellcheckSettings.setMode(this.mode);
if (!this.mode.isEdit) {
- $(this.viewSettingsPicker.dataViewItems[2].el).hide();
+ $(this.viewSettingsPicker.dataViewItems[1].el).hide();
if (this.spellcheckSettings && this.spellcheckSettings.$el && this.spellcheckSettings.$el.hasClass('active'))
this.viewSettingsPicker.selectByIndex(0);
}
@@ -275,14 +264,10 @@ define([
SetDisabled: function(disabled) {
if ( disabled ) {
$(this.viewSettingsPicker.dataViewItems[1].el).hide();
- $(this.viewSettingsPicker.dataViewItems[2].el).hide();
this.viewSettingsPicker.selectByIndex(0, true);
} else {
- if ( this.mode.canPrint )
- $(this.viewSettingsPicker.dataViewItems[1].el).show();
-
if ( this.mode.isEdit ) {
- $(this.viewSettingsPicker.dataViewItems[2].el).show();
+ $(this.viewSettingsPicker.dataViewItems[1].el).show();
}
}
},
@@ -292,423 +277,6 @@ define([
txtSpellChecking: 'Spell checking'
}, SSE.Views.FileMenuPanels.Settings || {}));
- SSE.Views.MainSettingsPrint = Common.UI.BaseView.extend(_.extend({
- menu: undefined,
-
- template: _.template([
- '',
- '
',
- '
',
- '',
- ' | ',
- ' | ',
- '
','
','
',
- '',
- ' | ',
- ' | ',
- '
','
',
- '',
- ' | ',
- ' | ',
- '
','
',
- '',
- ' | ',
- ' | ',
- '
','
',
- '',
- ' | ',
- '',
- ' ',
- '',
- ' | ',
- ' ',
- '',
- ' | ',
- ' | ',
- ' ',
- '',
- ' | ',
- ' ',
- '',
- ' | ',
- ' | ',
- ' ',
- ' ',
- ' | ',
- '
',
- '',
- ' | ',
- '',
- ' ',
- '',
- ' | ',
- ' | ',
- ' ',
- '',
- ' | ',
- ' | ',
- ' ',
- '',
- ' | ',
- ' | ',
- ' ',
- '',
- ' | ',
- ' | ',
- ' ',
- ' ',
- ' | ',
- '
',
- '',
- ' | ',
- ' | ',
- '
','
',
- '
',
- '
',
- '
',
- '
',
- '',
- ' | ',
- ' | ',
- '
',
- '
',
- '
',
- '
'
- ].join('')),
-
- initialize: function(options) {
- Common.UI.BaseView.prototype.initialize.call(this,arguments);
-
- this.menu = options.menu;
- this.spinners = [];
- this._initSettings = true;
- },
-
- render: function(parentEl) {
- var $markup = $(this.template({scope: this}));
-
- this.cmbSheet = new Common.UI.ComboBox({
- el : $markup.findById('#advsettings-print-combo-sheets'),
- style : 'width: 242px;',
- menuStyle : 'min-width: 242px;max-height: 280px;',
- editable : false,
- cls : 'input-group-nr',
- data : [],
- dataHint : '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
-
- this.cmbPaperSize = new Common.UI.ComboBox({
- el : $markup.findById('#advsettings-print-combo-pages'),
- style : 'width: 242px;',
- menuStyle : 'max-height: 280px; min-width: 242px;',
- editable : false,
- cls : 'input-group-nr',
- data : [
- {value:'215.9|279.4', displayValue:'US Letter (21,59cm x 27,94cm)', caption: 'US Letter'},
- {value:'215.9|355.6', displayValue:'US Legal (21,59cm x 35,56cm)', caption: 'US Legal'},
- {value:'210|297', displayValue:'A4 (21cm x 29,7cm)', caption: 'A4'},
- {value:'148|210', displayValue:'A5 (14,8cm x 21cm)', caption: 'A5'},
- {value:'176|250', displayValue:'B5 (17,6cm x 25cm)', caption: 'B5'},
- {value:'104.8|241.3', displayValue:'Envelope #10 (10,48cm x 24,13cm)', caption: 'Envelope #10'},
- {value:'110|220', displayValue:'Envelope DL (11cm x 22cm)', caption: 'Envelope DL'},
- {value:'279.4|431.8', displayValue:'Tabloid (27,94cm x 43,178m)', caption: 'Tabloid'},
- {value:'297|420', displayValue:'A3 (29,7cm x 42cm)', caption: 'A3'},
- {value:'304.8|457.1', displayValue:'Tabloid Oversize (30,48cm x 45,71cm)', caption: 'Tabloid Oversize'},
- {value:'196.8|273', displayValue:'ROC 16K (19,68cm x 27,3cm)', caption: 'ROC 16K'},
- {value:'119.9|234.9', displayValue:'Envelope Choukei 3 (11,99cm x 23,49cm)', caption: 'Envelope Choukei 3'},
- {value:'330.2|482.5', displayValue:'Super B/A3 (33,02cm x 48,25cm)', caption: 'Super B/A3'}
- ],
- dataHint : '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
-
- this.cmbPaperOrientation = new Common.UI.ComboBox({
- el : $markup.findById('#advsettings-print-combo-orient'),
- style : 'width: 132px;',
- menuStyle : 'min-width: 132px;',
- editable : false,
- cls : 'input-group-nr',
- data : [
- { value: Asc.c_oAscPageOrientation.PagePortrait, displayValue: this.strPortrait },
- { value: Asc.c_oAscPageOrientation.PageLandscape, displayValue: this.strLandscape }
- ],
- dataHint : '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
-
- var itemsTemplate =
- _.template([
- '<% _.each(items, function(item) { %>',
- ' class="border-top" style="margin-top: 5px;padding-top: 5px;" <% } %> >',
- '<%= scope.getDisplayValue(item) %>',
- '',
- '<% }); %>'
- ].join(''));
- this.cmbLayout = new Common.UI.ComboBox({
- el : $markup.findById('#advsettings-print-combo-layout'),
- style : 'width: 242px;',
- menuStyle : 'min-width: 242px;',
- editable : false,
- cls : 'input-group-nr',
- data : [
- { value: 0, displayValue: this.textActualSize },
- { value: 1, displayValue: this.textFitPage },
- { value: 2, displayValue: this.textFitCols },
- { value: 3, displayValue: this.textFitRows },
- { value: 'customoptions', displayValue: this.textCustomOptions }
- ],
- itemsTemplate: itemsTemplate,
- dataHint : '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
-
- this.chPrintGrid = new Common.UI.CheckBox({
- el: $markup.findById('#advsettings-print-chb-grid'),
- labelText: this.textPrintGrid,
- dataHint: '3',
- dataHintDirection: 'left',
- dataHintOffset: 'small'
- });
-
- this.chPrintRows = new Common.UI.CheckBox({
- el: $markup.findById('#advsettings-print-chb-rows'),
- labelText: this.textPrintHeadings,
- dataHint: '3',
- dataHintDirection: 'left',
- dataHintOffset: 'small'
- });
-
- this.spnMarginTop = new Common.UI.MetricSpinner({
- el: $markup.findById('#advsettings-spin-margin-top'),
- step: .1,
- width: 110,
- defaultUnit : "cm",
- value: '0 cm',
- maxValue: 48.25,
- minValue: 0,
- dataHint: '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
- this.spinners.push(this.spnMarginTop);
-
- this.spnMarginBottom = new Common.UI.MetricSpinner({
- el: $markup.findById('#advsettings-spin-margin-bottom'),
- step: .1,
- width: 110,
- defaultUnit : "cm",
- value: '0 cm',
- maxValue: 48.25,
- minValue: 0,
- dataHint: '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
- this.spinners.push(this.spnMarginBottom);
-
- this.spnMarginLeft = new Common.UI.MetricSpinner({
- el: $markup.findById('#advsettings-spin-margin-left'),
- step: .1,
- width: 110,
- defaultUnit : "cm",
- value: '0.19 cm',
- maxValue: 48.25,
- minValue: 0,
- dataHint: '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
- this.spinners.push(this.spnMarginLeft);
-
- this.spnMarginRight = new Common.UI.MetricSpinner({
- el: $markup.findById('#advsettings-spin-margin-right'),
- step: .1,
- width: 110,
- defaultUnit : "cm",
- value: '0.19 cm',
- maxValue: 48.25,
- minValue: 0,
- dataHint: '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
- this.spinners.push(this.spnMarginRight);
-
- this.txtRangeTop = new Common.UI.InputField({
- el : $markup.findById('#advsettings-txt-top'),
- style : 'width: 147px',
- allowBlank : true,
- validateOnChange: true,
- dataHint: '3',
- dataHintDirection: 'left',
- dataHintOffset: 'small'
- });
-
- this.btnPresetsTop = new Common.UI.Button({
- parentEl: $markup.findById('#advsettings-presets-top'),
- cls: 'btn-text-menu-default',
- caption: this.textRepeat,
- style: 'width: 85px;',
- menu: true,
- dataHint: '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
-
- this.txtRangeLeft = new Common.UI.InputField({
- el : $markup.findById('#advsettings-txt-left'),
- style : 'width: 147px',
- allowBlank : true,
- validateOnChange: true,
- dataHint: '3',
- dataHintDirection: 'left',
- dataHintOffset: 'small'
- });
-
- this.btnPresetsLeft = new Common.UI.Button({
- parentEl: $markup.findById('#advsettings-presets-left'),
- cls: 'btn-text-menu-default',
- caption: this.textRepeat,
- style: 'width: 85px;',
- menu: true,
- dataHint: '3',
- dataHintDirection: 'bottom',
- dataHintOffset: 'big'
- });
-
- this.btnOk = new Common.UI.Button({
- el: $markup.findById('#advsettings-print-button-save')
- });
-
- this.pnlSettings = $markup.find('.flex-settings').addBack().filter('.flex-settings');
-
- // if (parentEl)
- // this.setElement(parentEl, false);
- this.$el = $(parentEl).html($markup);
-
- if (_.isUndefined(this.scroller)) {
- this.scroller = new Common.UI.Scroller({
- el: this.pnlSettings,
- suppressScrollX: true,
- alwaysVisibleY: true
- });
- }
-
- var me = this;
- Common.NotificationCenter.on({
- 'window:resize': function() {
- me.isVisible() && me.updateScroller();
- }
- });
-
- this.fireEvent('render:after', this);
- return this;
- },
-
- addCustomScale: function (add) {
- if (add) {
- this.cmbLayout.setData([
- { value: 0, displayValue: this.textActualSize },
- { value: 1, displayValue: this.textFitPage },
- { value: 2, displayValue: this.textFitCols },
- { value: 3, displayValue: this.textFitRows },
- { value: 4, displayValue: this.textCustom },
- { value: 'customoptions', displayValue: this.textCustomOptions }
- ]);
- } else {
- this.cmbLayout.setData([
- { value: 0, displayValue: this.textActualSize },
- { value: 1, displayValue: this.textFitPage },
- { value: 2, displayValue: this.textFitCols },
- { value: 3, displayValue: this.textFitRows },
- { value: 'customoptions', displayValue: this.textCustomOptions }
- ]);
- }
- },
-
- updateMetricUnit: function() {
- if (this.spinners) {
- for (var i=0; i