Set focus for some fields. Props nbachiyski. fixes #6080
git-svn-id: http://svn.automattic.com/wordpress/trunk@7143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
92ad2aabbe
commit
5aabe0133c
|
@ -1,4 +1,5 @@
|
|||
addLoadEvent( function() {
|
||||
jQuery('#link_name').focus();
|
||||
// postboxes
|
||||
add_postbox_toggles('link');
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ function new_tag_remove_tag() {
|
|||
});
|
||||
jQuery( '#tags-input' ).val( new_tags.join( ',' ).replace( /\s*,+\s*/, ',' ).replace( /,+/, ',' ).replace( /,+\s+,+/, ',' ).replace( /,+\s*$/, '' ).replace( /^\s*,+/, '' ) );
|
||||
tag_update_quickclicks();
|
||||
jQuery('#newtag').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -41,7 +42,7 @@ function tag_flush_to_text() {
|
|||
jQuery('#tags-input').val( newtags );
|
||||
tag_update_quickclicks();
|
||||
jQuery('#newtag').val('');
|
||||
jQuery('#newtag').blur();
|
||||
jQuery('#newtag').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -140,6 +141,7 @@ addLoadEvent( function() {
|
|||
jQuery('#category-add-toggle').click( function() {
|
||||
jQuery(this).parents('div:first').toggleClass( 'wp-hidden-children' );
|
||||
categoryTabs.tabsClick( 1 );
|
||||
jQuery('#newcat').focus();
|
||||
return false;
|
||||
} );
|
||||
jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change();
|
||||
|
@ -153,4 +155,4 @@ addLoadEvent( function() {
|
|||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ function autosave_saved(response) {
|
|||
var res = wpAjax.parseAjaxResponse(response, 'autosave'); // parse the ajax response
|
||||
var message = '';
|
||||
|
||||
if ( res && res.responses.length ) {
|
||||
if ( res && res.responses && res.responses.length ) {
|
||||
message = res.responses[0].data; // The saved message or error.
|
||||
// someone else is editing: disable autosave, set errors
|
||||
if ( res.responses[0].supplemental && 'disable' == res.responses[0].supplemental['disable_autosave'] ) {
|
||||
|
|
Loading…
Reference in New Issue