summaryrefslogtreecommitdiffstats
path: root/wp-admin/js
diff options
context:
space:
mode:
authorryan <ryan@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-05-19 22:17:49 +0000
committerryan <ryan@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-05-19 22:17:49 +0000
commitbb785c8b708131cf80d8e9b8215f41a5196bd09b (patch)
treee1d65e7ec4f97a2f11ff8abb5b69bab565207821 /wp-admin/js
parent80788a01b4ded035ff65ce65def9ad6f57822c89 (diff)
downloadwordpress-mu-bb785c8b708131cf80d8e9b8215f41a5196bd09b.tar.gz
wordpress-mu-bb785c8b708131cf80d8e9b8215f41a5196bd09b.tar.xz
wordpress-mu-bb785c8b708131cf80d8e9b8215f41a5196bd09b.zip
Put checked categories at the top of the checklist. Props mdawaffe. see #WP7000
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1299 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/js')
-rw-r--r--wp-admin/js/post.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js
index c938af3..9b3313c 100644
--- a/wp-admin/js/post.js
+++ b/wp-admin/js/post.js
@@ -118,8 +118,9 @@ jQuery(document).ready( function() {
jQuery('#in-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c );
noSyncChecks = false;
};
+ var popularCats = jQuery('#categorychecklist-pop :checkbox').map( function() { return parseInt(jQuery(this).val(), 10); } ).get().join(',');
var catAddBefore = function( s ) {
- s.data += '&' + jQuery( '#categorychecklist :checked' ).serialize();
+ s.data += '&popular_ids=' + popularCats + '&' + jQuery( '#categorychecklist :checked' ).serialize();
return s;
};
var catAddAfter = function( r, s ) {
@@ -149,7 +150,8 @@ jQuery(document).ready( function() {
} );
jQuery('#category-add-toggle').click( function() {
jQuery(this).parents('div:first').toggleClass( 'wp-hidden-children' );
- categoryTabs.tabsClick( 1 );
+ // categoryTabs.tabs( 'select', '#categories-all' ); // this is broken (in the UI beta?)
+ categoryTabs.find( 'a[href="#categories-all"]' ).click();
jQuery('#newcat').focus();
return false;
} );