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);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 private void GetRequestSuccess(AdminCollectionsGetResponse response)
 {
     collections = response.collections;
     ChangePage(currentPage);
     pagination.Refresh();
 }