mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 00:30:34 +08:00
[DE PDFE PE SSE] Fix print panel
This commit is contained in:
@ -81,7 +81,7 @@ define([
|
||||
this.printSettings.menu.on('menu:hide', _.bind(this.onHidePrintMenu, this));
|
||||
this.printSettings.btnPrintSystemDialog.on('click', _.bind(this.onBtnPrint, this, true, true));
|
||||
this.printSettings.btnPrint.on('click', _.bind(this.onBtnPrint, this, true, false));
|
||||
this.printSettings.btnPrintPdf.on('click', _.bind(this.onBtnPrint, this, false));
|
||||
this.printSettings.btnPrintPdf.on('click', _.bind(this.onBtnPrint, this, false, false));
|
||||
this.printSettings.btnPrevPage.on('click', _.bind(this.onChangePreviewPage, this, false));
|
||||
this.printSettings.btnNextPage.on('click', _.bind(this.onChangePreviewPage, this, true));
|
||||
this.printSettings.txtNumberPage.on({
|
||||
@ -189,7 +189,12 @@ define([
|
||||
height = this._state.pgorient ? h : w;
|
||||
var panel = this.printSettings;
|
||||
var store = panel.cmbPaperSize.store,
|
||||
cmbPaperSizeRecord = panel.cmbPaperSize.getSelectedRecord(),
|
||||
item = null;
|
||||
|
||||
if (cmbPaperSizeRecord && Math.abs(w - cmbPaperSizeRecord.size[0]) < 0.1 && Math.abs(h - cmbPaperSizeRecord.size[1]) < 0.1) {
|
||||
return;
|
||||
}
|
||||
for (var i=0; i<store.length-1; i++) {
|
||||
var rec = store.at(i),
|
||||
size = rec.get('size'),
|
||||
|
||||
@ -2767,7 +2767,7 @@ define([], function () {
|
||||
|
||||
this.cmbPrinter = new Common.UI.ComboBox({
|
||||
el: $markup.findById('#print-combo-printer'),
|
||||
menuStyle: 'min-width: 248px;max-height: 280px;',
|
||||
menuStyle: 'width: 248px; max-height: 280px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
cls: 'input-group-nr',
|
||||
@ -2896,7 +2896,7 @@ define([], function () {
|
||||
|
||||
this.cmbPaperSize = new Common.UI.ComboBoxCustom({
|
||||
el: $markup.findById('#print-combo-pages'),
|
||||
menuStyle: 'max-height: 280px; min-width: 248px;',
|
||||
menuStyle: 'max-height: 280px; width: 248px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
template: paperSizeTemplate,
|
||||
|
||||
@ -917,6 +917,19 @@
|
||||
.padding-x(20px, 5px);
|
||||
}
|
||||
}
|
||||
#print-combo-printer,
|
||||
#print-combo-pages {
|
||||
.form-control {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-menu li > a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#print-navigation {
|
||||
|
||||
@ -82,7 +82,7 @@ define([
|
||||
this.printSettings.menu.on('menu:hide', _.bind(this.onHidePrintMenu, this));
|
||||
this.printSettings.btnPrintSystemDialog.on('click', _.bind(this.onBtnPrint, this, true, true));
|
||||
this.printSettings.btnPrint.on('click', _.bind(this.onBtnPrint, this, true, false));
|
||||
this.printSettings.btnPrintPdf.on('click', _.bind(this.onBtnPrint, this, false));
|
||||
this.printSettings.btnPrintPdf.on('click', _.bind(this.onBtnPrint, this, false, false));
|
||||
this.printSettings.btnPrevPage.on('click', _.bind(this.onChangePreviewPage, this, false));
|
||||
this.printSettings.btnNextPage.on('click', _.bind(this.onChangePreviewPage, this, true));
|
||||
this.printSettings.txtNumberPage.on({
|
||||
@ -190,7 +190,12 @@ define([
|
||||
height = this._state.pgorient ? h : w;
|
||||
var panel = this.printSettings;
|
||||
var store = panel.cmbPaperSize.store,
|
||||
cmbPaperSizeRecord = panel.cmbPaperSize.getSelectedRecord(),
|
||||
item = null;
|
||||
|
||||
if (cmbPaperSizeRecord && Math.abs(w - cmbPaperSizeRecord.size[0]) < 0.1 && Math.abs(h - cmbPaperSizeRecord.size[1]) < 0.1) {
|
||||
return;
|
||||
}
|
||||
for (var i=0; i<store.length-1; i++) {
|
||||
var rec = store.at(i),
|
||||
size = rec.get('size'),
|
||||
|
||||
@ -2400,7 +2400,7 @@ define([], function () {
|
||||
|
||||
this.cmbPrinter = new Common.UI.ComboBox({
|
||||
el: $markup.findById('#print-combo-printer'),
|
||||
menuStyle: 'min-width: 248px;max-height: 280px;',
|
||||
menuStyle: 'width: 248px; max-height: 280px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
cls: 'input-group-nr',
|
||||
@ -2529,7 +2529,7 @@ define([], function () {
|
||||
|
||||
this.cmbPaperSize = new Common.UI.ComboBoxCustom({
|
||||
el: $markup.findById('#print-combo-pages'),
|
||||
menuStyle: 'max-height: 280px; min-width: 248px;',
|
||||
menuStyle: 'max-height: 280px; width: 248px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
template: paperSizeTemplate,
|
||||
|
||||
@ -831,6 +831,19 @@
|
||||
.padding-x(20px, 5px);
|
||||
}
|
||||
}
|
||||
#print-combo-printer,
|
||||
#print-combo-pages {
|
||||
.form-control {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-menu li > a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#print-navigation {
|
||||
|
||||
@ -82,7 +82,7 @@ define([
|
||||
this.printSettings.menu.on('menu:hide', _.bind(this.onHidePrintMenu, this));
|
||||
this.printSettings.btnPrintSystemDialog.on('click', _.bind(this.onBtnPrint, this, true, true));
|
||||
this.printSettings.btnPrint.on('click', _.bind(this.onBtnPrint, this, true, false));
|
||||
this.printSettings.btnPrintPdf.on('click', _.bind(this.onBtnPrint, this, false));
|
||||
this.printSettings.btnPrintPdf.on('click', _.bind(this.onBtnPrint, this, false, false));
|
||||
this.printSettings.btnPrevPage.on('click', _.bind(this.onChangePreviewPage, this, false));
|
||||
this.printSettings.btnNextPage.on('click', _.bind(this.onChangePreviewPage, this, true));
|
||||
this.printSettings.txtNumberPage.on({
|
||||
|
||||
@ -2197,28 +2197,7 @@ define([], function () {
|
||||
|
||||
this.cmbPrinter = new Common.UI.ComboBox({
|
||||
el: $markup.findById('#print-combo-printer'),
|
||||
menuStyle: 'min-width: 248px;max-height: 280px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
cls: 'input-group-nr',
|
||||
placeHolder: this.txtPrinterNotSelected,
|
||||
itemsTemplate: _.template([
|
||||
'<% if (items.length > 0) { %>',
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem" <% if (typeof(item.checked) !== "undefined" && item.checked) { %> class="checked" <% } %> ><%= scope.getDisplayValue(item) %></a></li>',
|
||||
'<% }); %>',
|
||||
'<% } else { %>',
|
||||
'<li><a style="background:none; cursor: default;" onclick="event.stopPropagation();">' + this.txtPrintersNotFound + '</a></li>',
|
||||
'<% } %>'
|
||||
].join('')),
|
||||
data: [],
|
||||
dataHint: '2',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
});
|
||||
this.cmbPrinter.on('selected', _.bind(this.onPrinterSelected, this));this.cmbPrinter = new Common.UI.ComboBox({
|
||||
el: $markup.findById('#print-combo-printer'),
|
||||
menuStyle: 'min-width: 248px;max-height: 280px;',
|
||||
menuStyle: 'width: 248px;max-height: 280px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
cls: 'input-group-nr',
|
||||
@ -2339,7 +2318,7 @@ define([], function () {
|
||||
|
||||
this.cmbPaperSize = new Common.UI.ComboBoxCustom({
|
||||
el: $markup.findById('#print-combo-pages'),
|
||||
menuStyle: 'max-height: 280px; min-width: 248px;',
|
||||
menuStyle: 'max-height: 280px; width: 248px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
template: paperSizeTemplate,
|
||||
|
||||
@ -843,6 +843,19 @@
|
||||
.padding-x(20px, 5px);
|
||||
}
|
||||
}
|
||||
#print-combo-printer,
|
||||
#print-combo-pages {
|
||||
.form-control {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-menu li > a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -555,7 +555,7 @@ define([
|
||||
pageSetup = props.asc_getPageSetup(),
|
||||
size = [pageSetup.asc_getWidth(), pageSetup.asc_getHeight()],
|
||||
orientation = pageSetup.asc_getOrientation(),
|
||||
printerOption = this.printSettings.cmbPrinter.getSelectedRecord();
|
||||
printerOption = (this.printSettings.cmbPrinter ? this.printSettings.cmbPrinter.getSelectedRecord() : null);
|
||||
this.adjPrintParams.asc_setNativeOptions({
|
||||
usesystemdialog: useSystemDialog,
|
||||
printer: printerOption ? printerOption.value : null,
|
||||
|
||||
@ -2843,7 +2843,7 @@ define([], function () {
|
||||
if(this.mode.isDesktopApp) {
|
||||
this.cmbPrinter = new Common.UI.ComboBox({
|
||||
el: $markup.findById('#print-combo-printer'),
|
||||
menuStyle: 'min-width: 248px;max-height: 280px;',
|
||||
menuStyle: 'width: 248px; max-height: 280px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
cls: 'input-group-nr',
|
||||
@ -3006,7 +3006,7 @@ define([], function () {
|
||||
|
||||
this.cmbPaperSize = new Common.UI.ComboBoxCustom({
|
||||
el: $markup.findById('#print-combo-pages'),
|
||||
menuStyle: 'max-height: 280px; min-width: 248px;',
|
||||
menuStyle: 'max-height: 280px; width: 248px;',
|
||||
editable: false,
|
||||
takeFocusOnClose: true,
|
||||
template: paperSizeTemplate,
|
||||
|
||||
@ -148,19 +148,19 @@ define([
|
||||
takeFocusOnClose: true,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{value:'215.9|279.4', displayValue:'US Letter (21,59 cm x 27,94 cm)', caption: 'US Letter'},
|
||||
{value:'215.9|355.6', displayValue:'US Legal (21,59 cm x 35,56 cm)', caption: 'US Legal'},
|
||||
{value:'210|297', displayValue:'A4 (21 cm x 29,7 cm)', caption: 'A4'},
|
||||
{value:'148|210', displayValue:'A5 (14,8 cm x 21 cm)', caption: 'A5'},
|
||||
{value:'176|250', displayValue:'B5 (17,6 cm x 25 cm)', caption: 'B5'},
|
||||
{value:'104.8|241.3', displayValue:'Envelope #10 (10,48 cm x 24,13 cm)', caption: 'Envelope #10'},
|
||||
{value:'110|220', displayValue:'Envelope DL (11 cm x 22 cm)', caption: 'Envelope DL'},
|
||||
{value:'279.4|431.8', displayValue:'Tabloid (27,94 cm x 43,18 cm)', caption: 'Tabloid'},
|
||||
{value:'297|420', displayValue:'A3 (29,7 cm x 42 cm)', caption: 'A3'},
|
||||
{value:'296.9|457.2', displayValue:'Tabloid Oversize (29,69 cm x 45,72 cm)', caption: 'Tabloid Oversize'},
|
||||
{value:'196.8|273', displayValue:'ROC 16K (19,68 cm x 27,3 cm)', caption: 'ROC 16K'},
|
||||
{value:'120|235', displayValue:'Envelope Choukei 3 (12 cm x 23,5 cm)', caption: 'Envelope Choukei 3'},
|
||||
{value:'305|487', displayValue:'Super B/A3 (30,5 cm x 48,7 cm)', caption: 'Super B/A3'}
|
||||
{value:'215.9|279.4', displayValue:'US Letter (21,59 cm x 27,94 cm)', caption: 'US Letter', size: [215.9, 279.4]},
|
||||
{value:'215.9|355.6', displayValue:'US Legal (21,59 cm x 35,56 cm)', caption: 'US Legal', size: [215.9, 355.6]},
|
||||
{value:'210|297', displayValue:'A4 (21 cm x 29,7 cm)', caption: 'A4', size: [210, 297]},
|
||||
{value:'148|210', displayValue:'A5 (14,8 cm x 21 cm)', caption: 'A5', size: [148, 210]},
|
||||
{value:'176|250', displayValue:'B5 (17,6 cm x 25 cm)', caption: 'B5', size: [176, 250]},
|
||||
{value:'104.8|241.3', displayValue:'Envelope #10 (10,48 cm x 24,13 cm)', caption: 'Envelope #10', size: [104.8, 241.3]},
|
||||
{value:'110|220', displayValue:'Envelope DL (11 cm x 22 cm)', caption: 'Envelope DL', size: [110, 220]},
|
||||
{value:'279.4|431.8', displayValue:'Tabloid (27,94 cm x 43,18 cm)', caption: 'Tabloid', size: [279.4, 431.8]},
|
||||
{value:'297|420', displayValue:'A3 (29,7 cm x 42 cm)', caption: 'A3', size: [297, 420]},
|
||||
{value:'296.9|457.2', displayValue:'Tabloid Oversize (29,69 cm x 45,72 cm)', caption: 'Tabloid Oversize', size: [296.9, 457.2]},
|
||||
{value:'196.8|273', displayValue:'ROC 16K (19,68 cm x 27,3 cm)', caption: 'ROC 16K', size: [196.8, 273]},
|
||||
{value:'120|235', displayValue:'Envelope Choukei 3 (12 cm x 23,5 cm)', caption: 'Envelope Choukei 3', size: [120, 235]},
|
||||
{value:'305|487', displayValue:'Super B/A3 (30,5 cm x 48,7 cm)', caption: 'Super B/A3', size: [305, 487]}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@ -948,8 +948,22 @@
|
||||
#print-combo-sides {
|
||||
.dropdown-menu li > a {
|
||||
.padding-x(20px, 5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
#print-combo-printer,
|
||||
#print-combo-pages {
|
||||
.form-control {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
.dropdown-menu li > a {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.print-titles-header {
|
||||
cursor: pointer;
|
||||
.print-titles-caret {
|
||||
|
||||
Reference in New Issue
Block a user