diff -r f50742368f90 -r 172544257e2c plugins/nuggie/client/usercp.js --- a/plugins/nuggie/client/usercp.js Sat Mar 15 15:19:42 2008 -0400 +++ b/plugins/nuggie/client/usercp.js Sat Mar 15 15:21:47 2008 -0400 @@ -35,7 +35,7 @@ } var fader = new Spry.Effect.Highlight(row, {to:'#AA0000', duration: 750}); fader.start(); - setTimeout('_global_ng_row.parentNode.removeChild(_global_ng_row);', 750); + setTimeout('_global_ng_row.parentNode.removeChild(_global_ng_row); nuggie_check_postlist_empty();', 750); } else { @@ -51,6 +51,21 @@ } } +function nuggie_check_postlist_empty() +{ + if ( document.getElementById('nuggie_postlist').childNodes.length == 1 ) + { + var td = document.createElement('td'); + td.className = 'row3'; + td.setAttribute('colspan', '6'); + td.appendChild(document.createTextNode('No posts.')); + td.style.textAlign = 'center'; + var tr = document.createElement('tr'); + tr.appendChild(td); + document.getElementById('nuggie_postlist').appendChild(tr); + } +} + function ajaxNuggieTogglePublished(id, obj) { var published = obj.getAttribute('nuggie:published') == '1' ? true : false;