wp/wp-admin/js/link.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
     7 jQuery(document).ready( function($) {
     7 jQuery(document).ready( function($) {
     8 
     8 
     9 	var newCat, noSyncChecks = false, syncChecks, catAddAfter;
     9 	var newCat, noSyncChecks = false, syncChecks, catAddAfter;
    10 
    10 
    11 	$('#link_name').focus();
    11 	$('#link_name').focus();
    12 	// postboxes
    12 	// Postboxes.
    13 	postboxes.add_postbox_toggles('link');
    13 	postboxes.add_postbox_toggles('link');
    14 
    14 
    15 	/**
    15 	/**
    16 	 * Adds event that opens a particular category tab.
    16 	 * Adds event that opens a particular category tab.
    17 	 *
    17 	 *
    31 		return false;
    31 		return false;
    32 	});
    32 	});
    33 	if ( getUserSetting('cats') )
    33 	if ( getUserSetting('cats') )
    34 		$('#category-tabs a[href="#categories-pop"]').click();
    34 		$('#category-tabs a[href="#categories-pop"]').click();
    35 
    35 
    36 	// Ajax Cat
    36 	// Ajax Cat.
    37 	newCat = $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ); } );
    37 	newCat = $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ); } );
    38 
    38 
    39 	/**
    39 	/**
    40 	 * After adding a new category, focus on the category add input field.
    40 	 * After adding a new category, focus on the category add input field.
    41 	 *
    41 	 *
   120 	 * Adds event handler that shows the interface controls to add a new category.
   120 	 * Adds event handler that shows the interface controls to add a new category.
   121 	 *
   121 	 *
   122 	 * @ignore
   122 	 * @ignore
   123 	 *
   123 	 *
   124 	 * @param {Event} event The event object.
   124 	 * @param {Event} event The event object.
   125 	 * @returns {boolean} Always returns false to prevent regular link
   125 	 * @return {boolean} Always returns false to prevent regular link
   126 	 *                    functionality.
   126 	 *                   functionality.
   127 	 */
   127 	 */
   128 	$('#category-add-toggle').click( function() {
   128 	$('#category-add-toggle').click( function() {
   129 		$(this).parents('div:first').toggleClass( 'wp-hidden-children' );
   129 		$(this).parents('div:first').toggleClass( 'wp-hidden-children' );
   130 		$('#category-tabs a[href="#categories-all"]').click();
   130 		$('#category-tabs a[href="#categories-all"]').click();
   131 		$('#newcategory').focus();
   131 		$('#newcategory').focus();