Fix urlencoded chars in links after using QE

git-svn-id: http://svn.automattic.com/wordpress/trunk@10101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-12-07 05:14:49 +00:00
parent 7050ada441
commit 57b4d9966c
3 changed files with 19 additions and 11 deletions

View File

@ -207,17 +207,20 @@ inlineEditPost = {
// make ajax request
$.post('admin-ajax.php', params,
function(r) {
var row = $(inlineEditPost.what+id);
$('table.widefat .inline-edit-save .waiting').hide();
if (r) {
if ( -1 != r.indexOf('<tr') ) {
r = r.replace(/hide-if-no-js/, '');
$(inlineEditPost.what+id).remove();
$('#edit-'+id).before(r).remove();
var row = $(inlineEditPost.what+id);
row.hide();
$('#edit-'+id).remove();
row.html($(r).html());
if ( 'draft' == $('input[name="post_status"]').val() )
row.find('td.column-comments').hide();
row.find('.hide-if-no-js').removeClass('hide-if-no-js');
inlineEditPost.addEvents(row);
row.fadeIn();
} else {
@ -228,7 +231,7 @@ inlineEditPost = {
$('#edit-'+id+' .inline-edit-save').append('<span class="error">'+inlineEditL10n.error+'</span>');
}
}
);
, 'html');
return false;
},

View File

@ -105,15 +105,20 @@ inlineEditTax = {
// make ajax request
$.post('admin-ajax.php', params,
function(r) {
var row = $(inlineEditTax.what+id);
$('table.widefat .inline-edit-save .waiting').hide();
if (r) {
if ( -1 != r.indexOf('<tr') ) {
$('#edit-'+id).remove();
r = r.replace(/hide-if-no-js/, '');
row.html($(r).html()).fadeIn();
$(inlineEditTax.what+id).remove();
$('#edit-'+id).before(r).remove();
var row = $(inlineEditTax.what+id);
row.hide();
row.find('.hide-if-no-js').removeClass('hide-if-no-js');
inlineEditTax.addEvents(row);
row.fadeIn();
} else
$('#edit-'+id+' .inline-edit-save .error').html(r).show();
} else

View File

@ -250,14 +250,14 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
$scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081206' );
$scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081206b' );
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
'error' => __('Error while saving the changes.'),
'ntdeltitle' => __('Remove From Bulk Edit'),
'notitle' => __('(no title)')
) );
$scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081117' );
$scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081206' );
$scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
'error' => __('Error while saving the changes.')
) );