Commit d6964e4a authored by Vanessa's avatar Vanessa

fiexd issue 13

parent 26bfdd04
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
"openMethodLabel": "${openMethodLabel}", "openMethodLabel": "${openMethodLabel}",
"typeLabel": "${typeLabel}", "typeLabel": "${typeLabel}",
"markdownHelpLabel": "${markdownHelpLabel}", "markdownHelpLabel": "${markdownHelpLabel}",
"notFoundLabel": "${notFoundLabel}",
"em00Label": "${em00Label}", "em00Label": "${em00Label}",
"em01Label": "${em01Label}", "em01Label": "${em01Label}",
"em02Label": "${em02Label}", "em02Label": "${em02Label}",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* table and paginate util * table and paginate util
* *
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a> * @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
* @version 1.0.0.7, Nov 8, 2011 * @version 1.0.0.8, Jun 11, 2012
*/ */
var TablePaginate = function (id) { var TablePaginate = function (id) {
...@@ -50,9 +50,12 @@ $.extend(TablePaginate.prototype, { ...@@ -50,9 +50,12 @@ $.extend(TablePaginate.prototype, {
initPagination: function () { initPagination: function () {
var id = this.id; var id = this.id;
$("#" + id + "Pagination").paginate({ $("#" + id + "Pagination").paginate({
"bind": function(currentPage) { "bind": function(currentPage, errorMessage) {
admin.setHashByPage(currentPage); if (errorMessage) {
return true; $("#tipMsg").text(errorMessage);
} else {
admin.setHashByPage(currentPage);
}
}, },
"currentPage": 1, "currentPage": 1,
"errorMessage": Label.inputErrorLabel, "errorMessage": Label.inputErrorLabel,
...@@ -86,8 +89,8 @@ $.extend(TablePaginate.prototype, { ...@@ -86,8 +89,8 @@ $.extend(TablePaginate.prototype, {
updateTablePagination: function (data, currentPage, pageInfo) { updateTablePagination: function (data, currentPage, pageInfo) {
currentPage = parseInt(currentPage); currentPage = parseInt(currentPage);
if (currentPage > pageInfo.paginationPageCount && currentPage > 1) { if (currentPage > pageInfo.paginationPageCount && currentPage > 1) {
$("#tipMsg").text(Label.pageLabel + ":" + currentPage + " " + Label.noDataLable); $("#tipMsg").text(Label.pageLabel + currentPage + Label.notFoundLabel);
$("#loadMsg").text(""); $("#loadMsg").text("");
return; return;
} }
$("#" + this.id + "Table").table("update", { $("#" + this.id + "Table").table("update", {
......
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