]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/link.js
Wordpress 2.7.1
[autoinstalls/wordpress.git] / wp-admin / js / link.js
index 2b3fa65cbabd7a3cce5be70735cf99a5f23e1679..716b34452ad192598b47a86edd142a0613c82e52 100644 (file)
@@ -1,17 +1,17 @@
-jQuery(document).ready( function() {
+jQuery(document).ready( function($) {
        // close postboxes that should be closed
        jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
 
        jQuery('#link_name').focus();
        // postboxes
-       add_postbox_toggles('link');
+       postboxes.add_postbox_toggles('link');
 
        // category tabs
        var categoryTabs = jQuery('#category-tabs').tabs();
 
        // Ajax Cat
        var newCat = jQuery('#newcat').one( 'focus', function() { jQuery(this).val( '' ).removeClass( 'form-input-tip' ) } );
-       jQuery('#category-add-sumbit').click( function() { newCat.focus(); } );
+       jQuery('#category-add-submit').click( function() { newCat.focus(); } );
        var noSyncChecks = false; // prophylactic. necessary?
        var syncChecks = function() {
                if ( noSyncChecks )
@@ -42,6 +42,12 @@ jQuery(document).ready( function() {
                response: 'category-ajax-response',
                addAfter: catAddAfter
        } );
+
+       $('a[href="#categories-all"]').click(function(){deleteUserSetting('cats');});
+       $('a[href="#categories-pop"]').click(function(){setUserSetting('cats','pop');});
+       if ( 'pop' == getUserSetting('cats') )
+               $('a[href="#categories-pop"]').click();
+
        jQuery('#category-add-toggle').click( function() {
                jQuery(this).parents('div:first').toggleClass( 'wp-hidden-children' );
                categoryTabs.tabsClick( 1 );