public override void HandleRequest(string jsonString, AjaxBase ajax) { if (!User.IsAdminLoggedIn(ajax)) { ajax.Unauthorized(); return; } AdminCollectionsGetResponse response = new AdminCollectionsGetResponse(); response.collections = Collection.ToJsonArray(Collection.GetAllCollections()); ajax.ReturnJson(response); }
private void GetRequestSuccess(AdminCollectionsGetResponse response) { Show(); foreach (CollectionJson collection in response.collections) { jQuery.FromHtml("<option></option>").AppendTo(jQuery.Select("#admin-manga-add-collection")).Value(collection.id.ToString()).Text(collection.name); } }
private void GetRequestSuccess(AdminCollectionsGetResponse response) { collections = response.collections; ChangePage(currentPage); pagination.Refresh(); }