Fix most popular link category list, props chmac, fixes #9012

git-svn-id: http://svn.automattic.com/wordpress/trunk@10477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-02-01 23:52:10 +00:00
parent 75850602a5
commit c15f74b209
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ jQuery(document).ready( function($) {
return;
noSyncChecks = true;
var th = $(this), c = th.is(':checked'), id = th.val().toString();
$('#in-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c );
$('#in-link-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c );
noSyncChecks = false;
};

View File

@ -1 +1 @@
jQuery(document).ready(function(c){var e,b,a=false,d,f;c("#link_name").focus();postboxes.add_postbox_toggles("link");e=c("#category-tabs").tabs();b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var g=c(this),i=g.is(":checked"),h=g.val().toString();c("#in-category-"+h+", #in-popular-category-"+h).attr("checked",i);a=false};f=function(h,g){c(g.what+" response_data",h).each(function(){var i=c(c(this).text());i.find("label").each(function(){var k=c(this),m=k.find("input").val(),n=k.find("input")[0].id,j=c.trim(k.text()),l;c("#"+n).change(d);l=c('<option value="'+parseInt(m,10)+'"></option>').text(j)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:f});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");e.find('a[href="#categories-all"]').click();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()});
jQuery(document).ready(function(c){var e,b,a=false,d,f;c("#link_name").focus();postboxes.add_postbox_toggles("link");e=c("#category-tabs").tabs();b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var g=c(this),i=g.is(":checked"),h=g.val().toString();c("#in-link-category-"+h+", #in-popular-category-"+h).attr("checked",i);a=false};f=function(h,g){c(g.what+" response_data",h).each(function(){var i=c(c(this).text());i.find("label").each(function(){var k=c(this),m=k.find("input").val(),n=k.find("input")[0].id,j=c.trim(k.text()),l;c("#"+n).change(d);l=c('<option value="'+parseInt(m,10)+'"></option>').text(j)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:f});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");e.find('a[href="#categories-all"]').click();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()});

View File

@ -300,7 +300,7 @@ function wp_default_scripts( &$scripts ) {
'l10n_print_after' => 'try{convertEntities(postL10n);}catch(e){};'
) );
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20090128' );
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20090201' );
$scripts->add_data( 'link', 'group', 1 );
$scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array('jquery'), '20090102' );