mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user