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:
parent
1a43aa80b8
commit
0d09181552
|
@ -560,9 +560,6 @@ var wpNavMenu;
|
|||
if ( api.menusChanged )
|
||||
return navMenuL10n.saveAlert;
|
||||
};
|
||||
$('input.menu-save').click(function(){
|
||||
window.onbeforeunload = null;
|
||||
});
|
||||
},
|
||||
|
||||
registerChange : function() {
|
||||
|
@ -787,15 +784,18 @@ 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;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
eventOnClickMenuItemDelete : function(clickedEl) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue