diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index 578e8286ba..4fc07adc52 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -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) { diff --git a/apps/pdfeditor/main/app/view/Statusbar.js b/apps/pdfeditor/main/app/view/Statusbar.js index 75c71c1a96..5ef5a4da28 100644 --- a/apps/pdfeditor/main/app/view/Statusbar.js +++ b/apps/pdfeditor/main/app/view/Statusbar.js @@ -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){