Commit b455040d by kevalbhatt

ATLAS-3025 : UI - If go to page is more/less then the available page limit then…

ATLAS-3025 : UI - If go to page is more/less then the available page limit then an error appears in the console
parent e8b32778
......@@ -626,6 +626,14 @@ define(['require',
gotoPagebtn: function(e) {
var that = this;
var goToPage = parseInt(this.ui.gotoPage.val());
if (!_.isNaN(goToPage) && ((goToPage == 0) || (this.collection.state.totalPages < goToPage))) {
Utils.notifyInfo({
content: Messages.search.noRecordForPage + "page " + goToPage
});
this.ui.gotoPage.val('')
that.ui.gotoPagebtn.attr('disabled', true);
return;
}
if (!(_.isNaN(goToPage) || goToPage <= -1)) {
if (this.collection.mode == "client") {
return this.collection.getPage((goToPage - 1), {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment