Merge pull request #3031 from ONLYOFFICE/fix/bugfix

Fix Bug 68383
This commit is contained in:
Julia Radzhabova
2024-06-05 13:44:18 +03:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@ -441,6 +441,8 @@ define([
this._state.pageCount = count;
this.toolbar && this.toolbar.fieldPages && this.toolbar.fieldPages.setFixedValue('/ ' + count);
this.toolbar.lockToolbar(Common.enumLock.singlePage, count<2, {array: [this.toolbar.btnDelPage]});
this.toolbar.lockToolbar(Common.enumLock.firstPage, this._state.currentPage<1, {array: [this.toolbar.btnFirstPage, this.toolbar.btnPrevPage]});
this.toolbar.lockToolbar(Common.enumLock.lastPage, this._state.currentPage>=this._state.pageCount-1, {array: [this.toolbar.btnLastPage, this.toolbar.btnNextPage]});
},
onCurrentPage: function(value) {

View File

@ -52,6 +52,8 @@ define([
function _onCountPages(count){
this.pages.set('count', count);
this.btnPagePrev && this.btnPagePrev.setDisabled(this.pages.get('current')<1);
this.btnPageNext && this.btnPageNext.setDisabled(this.pages.get('current')>=this.pages.get('count')-1);
}
function _onCurrentPage(number){