Resolve "Move to last page" warning shown unnecessarily issue. Fixes #1422

pull/3/head
Surinder Kumar 2016-07-05 12:20:40 +01:00 committed by Dave Page
parent 1bd27b847b
commit 6c6660e576
1 changed files with 6 additions and 2 deletions

View File

@ -1800,7 +1800,9 @@ define(
}
else {
// If current page is not the last page then confirm from the user
if (self.collection.state.currentPage != self.collection.state.lastPage) {
if (self.collection.state.lastPage != null &&
self.collection.state.currentPage != self.collection.state.lastPage
) {
alertify.confirm('{{ _('Add New Row') }}',
'{{ _('The result set display will move to the last page. Do you wish to continue?') }}',
function() {
@ -2301,7 +2303,9 @@ define(
}
else {
// If current page is not the last page then confirm from the user
if (self.collection.state.currentPage != self.collection.state.lastPage) {
if (self.collection.state.lastPage != null &&
self.collection.state.currentPage != self.collection.state.lastPage
) {
alertify.confirm('{{ _('Paste Row') }}',
'{{ _('The result set display will move to the last page. Do you wish to continue?') }}',
function() {