Sync checkboxes only for categories, some white space cleanup, props kevinB, fixes #12244
git-svn-id: http://svn.automattic.com/wordpress/trunk@13195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4f460639c8
commit
4c52731c85
|
@ -254,11 +254,12 @@ jQuery(document).ready( function($) {
|
|||
|
||||
// categories
|
||||
$('.categorydiv').each( function(){
|
||||
var this_id = $(this).attr('id'), noSyncChecks = false, syncChecks, catAddAfter, popularCats;
|
||||
var taxonomy_parts = this_id.split('-');
|
||||
taxonomy_parts.shift();
|
||||
var taxonomy = taxonomy_parts.join('-');
|
||||
var settingName = taxonomy+'_tab';
|
||||
var this_id = $(this).attr('id'), noSyncChecks = false, syncChecks, catAddAfter, taxonomyParts, taxonomy, settingName;
|
||||
|
||||
taxonomyParts = this_id.split('-');
|
||||
taxonomyParts.shift();
|
||||
taxonomy = taxonomyParts.join('-');
|
||||
settingName = taxonomy + '_tab';
|
||||
if ( taxonomy == 'category' )
|
||||
settingName = 'cats';
|
||||
|
||||
|
@ -291,8 +292,6 @@ jQuery(document).ready( function($) {
|
|||
noSyncChecks = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
catAddBefore = function( s ) {
|
||||
if ( !$('#new'+taxonomy).val() )
|
||||
return false;
|
||||
|
@ -315,6 +314,7 @@ jQuery(document).ready( function($) {
|
|||
addBefore: catAddBefore,
|
||||
addAfter: catAddAfter
|
||||
});
|
||||
|
||||
$('#' + taxonomy + '-add-toggle').click( function() {
|
||||
$('#' + taxonomy + '-adder').toggleClass( 'wp-hidden-children' );
|
||||
$('a[href="#' + taxonomy + '-all"]', '#' + taxonomy + '-tabs').click();
|
||||
|
@ -323,6 +323,7 @@ jQuery(document).ready( function($) {
|
|||
|
||||
$('#' + taxonomy + 'checklist').children('li.popular-category').add( $('#' + taxonomy + 'checklist-pop').children() ).find(':checkbox').live( 'click', function(){
|
||||
var t = $(this), c = t.is(':checked'), id = t.val();
|
||||
if ( id && t.parents('#taxonomy-'+taxonomy).length )
|
||||
$('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).attr( 'checked', c );
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -275,7 +275,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20091012' );
|
||||
$scripts->add_data( 'postbox', 'group', 1 );
|
||||
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20091208' );
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20100217' );
|
||||
$scripts->add_data( 'post', 'group', 1 );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
'tagsUsed' => __('Tags used on this post:'),
|
||||
|
|
Loading…
Reference in New Issue