diff --git a/apps/documenteditor/main/app/view/PageMarginsDialog.js b/apps/documenteditor/main/app/view/PageMarginsDialog.js
index b1c6f83cb..571b796bb 100644
--- a/apps/documenteditor/main/app/view/PageMarginsDialog.js
+++ b/apps/documenteditor/main/app/view/PageMarginsDialog.js
@@ -45,9 +45,9 @@ define([
DE.Views.PageMarginsDialog = Common.UI.Window.extend(_.extend({
options: {
- width: 215,
+ width: 404,
header: true,
- style: 'min-width: 216px;',
+ style: 'min-width: 404px;',
cls: 'modal-dlg',
id: 'window-page-margins',
buttons: ['ok', 'cancel']
@@ -59,31 +59,50 @@ define([
}, options || {});
this.template = [
- '
',
- '
',
- '',
- '',
+ '',
+ ' ' + this.textMultiplePages + '',
+ ' ',
+ ' ',
+ ' ',
' ',
' ',
- ' | ',
- '',
+ '',
+ '',
' ',
' ',
- ' | ',
- '
',
- '',
- '',
+ '',
+ '',
+ '',
+ ' ',
' ',
' ',
- ' | ',
- '',
+ '',
+ '',
' ',
' ',
- ' | ',
- '
',
- '
',
+ '
',
+ '',
+ '',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '',
+ '
',
+ '
',
+ '
',
+ '',
+ '',
+ '
',
+ '
',
+ '
',
'',
- ''
].join('');
this.options.tpl = _.template(this.template)(this.options);
@@ -98,6 +117,18 @@ define([
render: function() {
Common.UI.Window.prototype.render.call(this);
+ this.cmbMultiplePages = new Common.UI.ComboBox({
+ el : $('#page-margins-cmb-multiple-pages'),
+ menuStyle : 'min-width: 180px;',
+ style : 'width: 180px;',
+ editable : false,
+ cls : 'input-group-nr',
+ data : [
+ { value: 0, displayValue: this.textNormal },
+ { value: 1, displayValue: this.textMirrorMargins }
+ ]
+ });
+
this.spnTop = new Common.UI.MetricSpinner({
el: $('#page-margins-spin-top'),
step: .1,
@@ -142,6 +173,41 @@ define([
});
this.spinners.push(this.spnRight);
+ this.spnGutter = new Common.UI.MetricSpinner({
+ el: $('#page-margins-spin-gutter'),
+ step: .1,
+ width: 86,
+ defaultUnit : "cm",
+ value: '1 cm',
+ maxValue: 55.88,
+ minValue: 0
+ });
+ this.spinners.push(this.spnLeft);
+
+ this.cmbGutterPosition = new Common.UI.ComboBox({
+ el : $('#page-margins-spin-gutter-position'),
+ menuStyle : 'min-width: 86px;',
+ style : 'width: 86px;',
+ editable : false,
+ cls : 'input-group-nr',
+ data : [
+ { value: 0, displayValue: this.textLeft },
+ { value: 1, displayValue: this.textTop }
+ ]
+ });
+
+ this.cmbOrientation = new Common.UI.ComboBox({
+ el : $('#page-margins-cmb-orientation'),
+ menuStyle : 'min-width: 180px;',
+ style : 'width: 180px;',
+ editable : false,
+ cls : 'input-group-nr',
+ data : [
+ { value: 0, displayValue: this.textPortrait },
+ { value: 1, displayValue: this.textLandscape }
+ ]
+ });
+
var $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
@@ -221,6 +287,15 @@ define([
textRight: 'Right',
notcriticalErrorTitle: 'Warning',
txtMarginsW: 'Left and right margins are too high for a given page wight',
- txtMarginsH: 'Top and bottom margins are too high for a given page height'
+ txtMarginsH: 'Top and bottom margins are too high for a given page height',
+ textMultiplePages: 'Multiple pages',
+ textGutter: 'Gutter',
+ textGutterPosition: 'Gutter position',
+ textOrientation: 'Orientation',
+ textPreview: 'Preview',
+ textPortrait: 'Portrait',
+ textLandscape: 'Landscape',
+ textMirrorMargins: 'Mirror margins',
+ textNormal: 'Normal'
}, DE.Views.PageMarginsDialog || {}))
});
\ No newline at end of file