Fix errors when bulk actions executed on empty list, props nacin, see #11184

git-svn-id: https://develop.svn.wordpress.org/trunk@12317 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-12-03 01:43:49 +00:00
parent 65e6d5fb10
commit 07f2fd2e4b
8 changed files with 40 additions and 23 deletions
+5 -1
View File
@@ -74,7 +74,7 @@ inlineEditPost = {
},
setBulk : function() {
var te = '', type = this.type, tax;
var te = '', type = this.type, tax, c = true;
this.revert();
$('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
@@ -83,12 +83,16 @@ inlineEditPost = {
$('tbody th.check-column input[type="checkbox"]').each(function(i){
if ( $(this).attr('checked') ) {
c = false;
var id = $(this).val(), theTitle;
theTitle = $('#inline_'+id+' .post_title').text() || inlineEditL10n.notitle;
te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="'+inlineEditL10n.ntdeltitle+'">X</a>'+theTitle+'</div>';
}
});
if ( c )
return this.revert();
$('#bulk-titles').html(te);
$('#bulk-titles a').click(function() {
var id = $(this).attr('id').substr(1);