From: Art Cancro Date: Fri, 1 Sep 2006 17:13:30 +0000 (+0000) Subject: summary view: deleting messages now removes the table rows from X-Git-Tag: v7.86~3957 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=c943b4e37a4f471d12342048ba44f5e71f56b44d;p=citadel.git summary view: deleting messages now removes the table rows from the DOM tree entirely, instead of merely hiding them. This is important because the next thing we're going to do is traverse the DOM tree to determine what rows to use for group select. --- diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index bf4ae9aa9..23999c756 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -28,14 +28,14 @@ function extract_token(source_string, token_num, delimiter) { for (i=0; i= 0) { - extracted_string = extracted_string.substring(j+1); + extracted_string = extracted_string.substr(j+1); } } } j = extracted_string.indexOf(delimiter); if (j >= 0) { - extracted_string = extracted_string.substring(0, j); + extracted_string = extracted_string.substr(0, j); } return extracted_string; @@ -255,12 +255,31 @@ function CtdlRemoveTheUnseenBold(msgnum) { } // A message has been deleted, so yank it from the list. -// (IE barfs on m9999.innerHTML='' so we use a script.aculo.us effect instead.) function CtdlClearDeletedMsg(msgnum) { - new Effect.Squish('m'+msgnum); -} + // Traverse the table looking for a row whose ID contains the desired msgnum + var table = $('summary_headers'); + if (table) { + for (var r = 0; r < table.rows.length; r++) { + var thename = table.rows[r].id; + if (thename.substr(1) == msgnum) { + try { + table.deleteRow(r); + } + catch(e) { + alert('error: browser failed to clear row ' + r); + } + } + } + } + else { // if we can't delete it, + new Effect.Squish('m'+msgnum); // just hide it. + } + + +} + // These functions called when the user down-clicks on the message list resizer bar var saved_x = 0; diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index 1fc63da2b..113071a53 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -1,4 +1,3 @@ -