Opened 20 years ago
Closed 20 years ago
#2803 closed defect (bug) (fixed)
Manage -> Categories Ajax problems
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.1 |
| Component: | Administration | Keywords: | ajax admin category bg|has-patch bg|needs-testing |
| Focuses: | Cc: |
Description
I tried fixing this but gave up quickly. I think whoever wrote list-manipulation-js.php had a broken spacebar. :)
Anyway, there were two problems I could see:
- Adding a category which has a parent doesn't add that category to the list beneath its parent, it just adds it at the bottom
- Adding a category doesn't add it to the 'Category parent:' dropdown. In other words, you can't add a category, then add a second category which is a child of the first without refreshing the page.
Also, perhaps move the ajax-response dialog to above the form itself. I didn't realise it was there when using it! And it might be nice to say 'Successfully added, Jump ...' instead of just posting an anonymous link.
Attachments (2)
Change History (8)
#2
@
20 years ago
- Milestone 2.2 deleted
Huh. I do not remember hitting the milestone. Clearly I have a bad memory.
#3
@
20 years ago
- Keywords ajax admin category bg|has-patch bg|needs-testing added
- Owner changed from anonymous to mdawaffe
- Status changed from new to assigned
First pass: 2803a.diff
- Splits cat_rows() into cat_rows() and _cat_row() to eliminate code duplication.
- In wp_insert_category(), make sure parent category exists.
- When AJAX adding category, display name as "parent - cat" instead of "- cat" (the quick fix mentioned above to this larger problem).
- When AJAX adding, add to dropdown.
- When AJAX deleting, remove from dropdown.
Note: See
TracTickets for help on using
tickets.
The dropdown should be straightforward. That we can do for 2.1. See wp-admin/custom-fields.js for an example of listMan::addComplete (to abuse notation).
Currently, listMan can only add to the top or the bottom. Arbitrary insertion is doable: add a new XML tag in the response that specifies the insert position. That said, I'd leave this for 2.2. Perhaps in the interim, we can have the new category row show
instead of just
Thoughts?