Opened 19 years ago
Closed 19 years ago
#2561 closed defect (bug) (fixed)
AJAX Admin
Reported by: | mdawaffe | Owned by: | mdawaffe |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.0.2 |
Component: | Administration | Keywords: | AJAX ajaxcat list-manipulation bg|2nd-opinion bg|has-patch |
Focuses: | Cc: |
Description
Leverage the Web 2.0 paradigm of... whatever. Slap on some AJAX for a few admin UI function to get rid of annoying page reloads.
Item deletion and dimming (class changing)
- Mass Edit Mode Comments (was #1810)
- edit.php comments (was #2552)
- Plugin (de)activation
- Custom Fields
Item addition
- Custom Fields
- Categories (Manage->Categories)
- Bookmarks? (Bookmarks->Manage Bookmarks)
- Users
Attachments (9)
Change History (34)
#3
@
19 years ago
Looks good.
What about bringing in the AJAX multiselect delete code from #923
The changes to list-manipulation.js there should hopefully support generic multiselect delete.
#4
@
19 years ago
2561.diff
Fixes:
All mentioned Item deletion/dimming.
Better ajaxcat. Update individual custom fields.
Does Not yet:
Do any item addition (though should be fairly simple now)
Known bugs:
Update a custom field. Update it again and it won't go through AJAX. (Source of problem known, looking into best solution.)
Compatibility:
Unknown. Testing (all working) on FF 1.5.0.1/MAC 10.latest, FF 1.0.7/WinXP, IE 6.0.something/WinXP
Methodology:
"Class like" JS. Simple things: PHP sends '-1' (!current_user_can), '0' (does not exist, something broke), '1' (all is well). Complicated things: PHP sends '-1', '0' (as above), XML object with id and escaped raw HTML for inclusion into list.
#5
@
19 years ago
PS: When testing (and please do!), make sure and do a hard refresh or two to clear JS cache.
#8
@
19 years ago
- Status changed from new to assigned
westi, I'll look into it after things settle in. Also, will #923 be made less important when deletion is on the fly anyway?
#10
@
19 years ago
Custom fields delete through asynchronously and update once, as you said. What else should I be testing? Scrolling up it's hard to tell what is currently implemented.
#11
@
19 years ago
This should currently (grouped by what chunk of code implements the feature)
Delete
- Posts on Manage->Posts
- Pages on Manage->Pages
- Comments on Manage->Posts: click on comments # link for a particular post
- Categories on Manage->Categories
- Comments on Manage->Comments
- Comments on Manage->Awaiting Moreration (Delete Just this comment)
- Bookmarks on Bookmarks->Manage Bookmarks
"Dim" (change the coler of)
- Comments when moderating through Manage->Posts: click on comments # link for a particular post
- Plugins when de(activating) on Plugins->Plugins
Update
- Individual (pre-existing) Custom Fields on Write->Post/Page
Add
- Categories through Write->Post/Page or Bookmarks->Add Bookmarks
At some point, this ticket should also have a patch for adding
- Users from Users->Authors & Users
- Categories from Manage->Categories
- New Custom Fields from Write->Post/Page
- Possibly Bookmarks from Bookmarks->Manage Bookmarks
#12
@
19 years ago
Maybe we should continue doing a page reload for plugin activation. Plugins can add menus and submenus when activated, and those menus won't show up if we don't refresh.
#13
@
19 years ago
Good point. I wanted plugins to work here since it's annoying to go through them one by one if you have a bunch to activate/deactivate. It wouldn't be too hard to update the menus live, now that the JS is more abstracted. We'd only have to change the top level menu and the Plugins one.
Should I look into that?
Otherwise, most everything is working on my local copy. I hope to have another patch up in the next couple days that does a better job of keeping the slashes under control and that adds items besides categories as well.
#14
@
19 years ago
How about a separate patch for plugins so we can get the rest of it in and play with plugins on the side?
#16
@
19 years ago
2561c.diff
Delete
- Posts on Manage->Posts
- Pages on Manage->Pages
- Comments on Manage->Posts: click on comments # link for a particular post
- Categories on Manage->Categories
- Comments on Manage->Comments
- Comments on Manage->Awaiting Moreration (Delete Just this comment)
- Bookmarks on Bookmarks->Manage Bookmarks
- Custom Fields on Write->Post/Page
"Dim" (change the coler of)
- Comments when moderating through Manage->Posts: click on comments # link for a particular post
Update
- Individual Custom Fields on Write->Post/Page
Add
- Categories through Write->Post/Page or Bookmarks->Add Bookmarks
- Categories from Manage->Categories
- New Custom Fields from Write->Post/Page
Does not do anything with plugins as above. Does not do user addition, which will be a little tricky with the current way users are listed.
Needs
- Better wp-admin.css for category UL on Write->Post/Page / Bookmarks->Add Bookmarks (fine in FF, ugly in IE).
This latest patch tested only in FF 1.0.5.1/Max OS X
#17
@
19 years ago
- Keywords bg|2nd-opinion bg|has-patch added
- Version changed from 2.0.1 to 2.0.2
I'd like to get this reviewed and altered by others and committed if appropriate. Users, plugins and potentially bookmarks can be spun off to their own tickets.
#18
@
19 years ago
2561h.diff
Fixes several bugs (problems listed belew should now be fixed):
- Not adding new custom fields in IE.
- Problems deleting/custom fields in IE.
- class="alternate" problems.
- Deleting items with ' " / & in their titles
- AJAX calls in quick succession (e.g. dblclick) explodes
- Updating unchanged meta caused breakage.
General cleanup.
- Simplify a few functions.
- Should play nice now on No AJAX and on No JS.
#19
@
19 years ago
2561i.diff
New Stuff:
- i18n: needs checking.
- check_ajax_ref
- clean up a couple typos.
In serious need of cross-browser. Especially older stuff.
#21
@
19 years ago
Please test creating and deleting things (categories, post, custom fields...) with funny characters in their titles:
' " < & % \
Characters that might screw up any kind of escaping/encoding.
Remember to hard refresh for new JS.
#22
@
19 years ago
So far so good on Firefox 1.0.7 and 1.5.0.1.
Got the AJAX ref checking working with the secure admin plugin too.
#23
@
19 years ago
In IE 6.0/WinXP and FF 1.5.0.1/OS X, deletion of a Custom Field with a single quote in the key name resulted in a page refresh, and no alert confirmation. The deletion occured, however. Minor issue.
I haven't tested it all thoroughly, but initially, it seems very good! I'll try to test more later.
I'm working on a patch for this now. I should have some code for this tomorrow that does at least a chunk of all this.