Don't add # to URL when clicking 'OK' without changing the permalink.

props avryl.
fixes #27594.
Built from https://develop.svn.wordpress.org/trunk@28771


git-svn-id: http://core.svn.wordpress.org/trunk@28584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-06-18 00:29:15 +00:00
parent 585213b0b6
commit d2a43e7cb2
2 changed files with 4 additions and 3 deletions

View File

@ -892,7 +892,8 @@ jQuery(document).ready( function($) {
b.children('.save').click(function() {
var new_slug = e.children('input').val();
if ( new_slug == $('#editable-post-name-full').text() ) {
return $('#edit-slug-buttons .cancel').click();
b.children('.cancel').click();
return false;
}
$.post(ajaxurl, {
action: 'sample-permalink',
@ -915,7 +916,7 @@ jQuery(document).ready( function($) {
return false;
});
$('#edit-slug-buttons .cancel').click(function() {
b.children('.cancel').click(function() {
$('#view-post-btn').show();
e.html(revert_e);
b.html(revert_b);

File diff suppressed because one or more lines are too long