Show a space as thousands separator for comments count when setting from js, hide ajax throbber when QE returns an error, see#8227 fixes #8225

git-svn-id: https://develop.svn.wordpress.org/trunk@9726 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2008-11-15 21:58:51 +00:00
parent 24aed08de2
commit 647180ee18
4 changed files with 25 additions and 27 deletions
+12 -3
View File
@@ -17,8 +17,11 @@ setCommentsList = function() {
if ( isNaN(n) ) return;
n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
if ( n < 0 ) { n = 0; }
a.html( n.toString() );
$('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
n = n.toString();
if ( n.length > 3 )
n = n.substr(0, n.length-3)+' '+n.substr(-3);
a.html(n);
});
};
@@ -34,8 +37,11 @@ setCommentsList = function() {
n = n + 1;
}
if ( n < 0 ) { n = 0; }
a.html( n.toString() );
$('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0');
n = n.toString();
if ( n.length > 3 )
n = n.substr(0, n.length-3)+' '+n.substr(-3);
a.html(n);
});
$('span.spam-count' ).each( function() {
@@ -49,7 +55,10 @@ setCommentsList = function() {
n = n - 1;
}
if ( n < 0 ) { n = 0; }
a.html( n.toString() );
n = n.toString();
if ( n.length > 3 )
n = n.substr(0, n.length-3)+' '+n.substr(-3);
a.html(n);
});
if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) {
+5 -16
View File
@@ -11,11 +11,8 @@ inlineEditPost = {
// get all editable rows
t.rows = $('tr.iedit');
// prepare the edit row
// .dblclick(function() { inlineEditPost.toggle(this); })
// prepare the edit rows
qeRow.keyup(function(e) { if(e.which == 27) return inlineEditPost.revert(); });
// .dblclick(function() { inlineEditPost.revert(); })
bulkRow.keyup(function(e) { if (e.which == 27) return inlineEditPost.revert(); });
$('a.cancel', qeRow).click(function() { return inlineEditPost.revert(); });
@@ -25,7 +22,6 @@ inlineEditPost = {
$('a.cancel', bulkRow).click(function() { return inlineEditPost.revert(); });
// add events
// t.rows.dblclick(function() { inlineEditPost.toggle(this); });
t.addEvents(t.rows);
$('#bulk-title-div').parents('fieldset').after(
@@ -51,17 +47,9 @@ inlineEditPost = {
$('select[name="_status"] option[value="future"]', bulkRow).remove();
$('#doaction').click(function(e){
if ( $('select[name="action"]').val() == 'edit' ) {
e.preventDefault();
t.setBulk();
} else if ( $('form#posts-filter tr.inline-editor').length > 0 ) {
t.revert();
}
});
$('#doaction2').click(function(e){
if ( $('select[name="action2"]').val() == 'edit' ) {
$('#doaction, #doaction2').click(function(e){
var n = $(this).attr('id').substr(2);
if ( $('select[name="'+n+'"]').val() == 'edit' ) {
e.preventDefault();
t.setBulk();
} else if ( $('form#posts-filter tr.inline-editor').length > 0 ) {
@@ -205,6 +193,7 @@ inlineEditPost = {
$.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') ) {
+1
View File
@@ -105,6 +105,7 @@ inlineEditTax = {
$.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') ) {