Don't show double-AYS for deleting a menu. props filosofo, duck_. see #13525.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-28 20:38:19 +00:00
parent 1a43aa80b8
commit 0d09181552
3 changed files with 8 additions and 8 deletions

View File

@ -560,9 +560,6 @@ var wpNavMenu;
if ( api.menusChanged )
return navMenuL10n.saveAlert;
};
$('input.menu-save').click(function(){
window.onbeforeunload = null;
});
},
registerChange : function() {
@ -787,14 +784,17 @@ var wpNavMenu;
$('#update-nav-menu').append( locs );
// Update menu item position data
api.menuList.find('.menu-item-data-position').val( function(index) { return index + 1; } );
window.onbeforeunload = null;
return true;
},
eventOnClickMenuDelete : function(clickedEl) {
// Delete warning AYS
if ( confirm( navMenuL10n.warnDeleteMenu ) )
if ( confirm( navMenuL10n.warnDeleteMenu ) ) {
window.onbeforeunload = null;
return true;
else
}
return false;
},

File diff suppressed because one or more lines are too long

View File

@ -385,7 +385,7 @@ function wp_default_scripts( &$scripts ) {
) );
// Custom Navigation
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100527a' );
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100528' );
$scripts->localize( 'nav-menu', 'navMenuL10n', array(
'custom' => _x('Custom', 'menu nav item type'),
'thickbox' => _x('Edit Menu Item', 'Thickbox Title'),