added multi page btn

This commit is contained in:
nikita_bartoshuk
2026-02-08 23:28:04 +03:00
parent 5037f4f97c
commit 7229fa3290
3 changed files with 22 additions and 2 deletions

View File

@ -1739,10 +1739,28 @@ define([
onMenuZoomClick: function(menu, item, e){ onMenuZoomClick: function(menu, item, e){
switch ( item.value ) { switch ( item.value ) {
case 'zoom:page': case 'zoom:page':
item.isChecked() ? this.api.zoomFitToPage() : this.api.zoomCustomMode(); if (item.isChecked()) {
this.api.GetMultipageViewMode() && this.api.SetMultipageViewMode(false);
this.api.zoomFitToPage();
this.view.mnuZoom.items[2].setChecked(false);
} else {
this.api.zoomCustomMode();
}
break; break;
case 'zoom:width': case 'zoom:width':
item.isChecked() ? this.api.zoomFitToWidth() : this.api.zoomCustomMode(); if (item.isChecked()) {
this.api.GetMultipageViewMode() && this.api.SetMultipageViewMode(false);
this.api.zoomFitToWidth();
this.view.mnuZoom.items[2].setChecked(false);
}
break;
case 'zoom:multi':
if (item.isChecked()) {
this.api.zoomCustomMode();
this.api.SetMultipageViewMode(true);
} else {
this.api.SetMultipageViewMode(false);
}
break; break;
} }

View File

@ -76,6 +76,7 @@ define([
items: [ items: [
{caption: this.textFitToPage, value: 'zoom:page', toggleGroup: 'view-zoom', checkable: true}, {caption: this.textFitToPage, value: 'zoom:page', toggleGroup: 'view-zoom', checkable: true},
{caption: this.textFitToWidth, value: 'zoom:width', toggleGroup: 'view-zoom', checkable: true}, {caption: this.textFitToWidth, value: 'zoom:width', toggleGroup: 'view-zoom', checkable: true},
{caption: this.textMultiplePages, value: 'zoom:multi', checkable: true},
(new Common.UI.MenuItem({ (new Common.UI.MenuItem({
template: _.template([ template: _.template([
'<div id="id-menu-zoom" class="menu-zoom" style="height: 26px;" ', '<div id="id-menu-zoom" class="menu-zoom" style="height: 26px;" ',

View File

@ -186,6 +186,7 @@
"DE.Views.ApplicationView.textCut": "Cut", "DE.Views.ApplicationView.textCut": "Cut",
"DE.Views.ApplicationView.textFitToPage": "Fit to page", "DE.Views.ApplicationView.textFitToPage": "Fit to page",
"DE.Views.ApplicationView.textFitToWidth": "Fit to width", "DE.Views.ApplicationView.textFitToWidth": "Fit to width",
"DE.Views.ApplicationView.textMultiplePages": "Multiple pages",
"DE.Views.ApplicationView.textNext": "Next field", "DE.Views.ApplicationView.textNext": "Next field",
"DE.Views.ApplicationView.textPaste": "Paste", "DE.Views.ApplicationView.textPaste": "Paste",
"DE.Views.ApplicationView.textPrintSel": "Print selection", "DE.Views.ApplicationView.textPrintSel": "Print selection",