Permalink
Browse files

Make admin modules refreshing not resetting current page

  • Loading branch information...
1 parent 1bd8979 commit aaca44d22d8299224415b82aa24fc86d521778fd @a-fung committed Oct 22, 2012
@@ -16,7 +16,7 @@ namespace afung.MangaWeb3.Client.Admin.Module
public class AdminCollectionsModule : AdminModuleBase
{
private CollectionJson[] collections;
- private int currentPage;
+ private int currentPage = 1;
private Pagination pagination;
private static AdminCollectionsModule _instance = null;
@@ -70,8 +70,8 @@ public void Refresh()
private void GetRequestSuccess(AdminCollectionsGetResponse response)
{
collections = response.collections;
- ChangePage(1);
- pagination.Refresh(true);
+ ChangePage(currentPage);
+ pagination.Refresh();
}
private void ChangePage(int page)
@@ -15,7 +15,7 @@ namespace afung.MangaWeb3.Client.Admin.Module
public class AdminMangasModule : AdminModuleBase
{
private MangaJson[] mangas;
- private int currentPage;
+ private int currentPage = 1;
private Pagination pagination;
private int copiedMangaMetaId = -1;
@@ -84,8 +84,8 @@ private void GetRequestSuccess(AdminMangasGetResponse response)
{
return ((MangaJson)y).status - ((MangaJson)x).status;
});
- ChangePage(1);
- pagination.Refresh(true);
+ ChangePage(currentPage);
+ pagination.Refresh();
}
private int GetTotalPage()
@@ -17,7 +17,7 @@ public class AdminUsersModule : AdminModuleBase
{
private UserJson[] users;
- private int currentPage;
+ private int currentPage = 1;
private Pagination pagination;
private string currentUserName;
@@ -103,8 +103,8 @@ public void Refresh()
private void GetRequestSuccess(AdminUsersGetResponse response)
{
users = response.users;
- ChangePage(1);
- pagination.Refresh(true);
+ ChangePage(currentPage);
+ pagination.Refresh();
}
private void CollectionsButtonClicked(jQueryEvent e)

0 comments on commit aaca44d

Please sign in to comment.