janinedog: (Default)
Janine ([personal profile] janinedog) wrote in [site community profile] changelog2009-04-06 11:35 pm

[dw-free] Need to distinguish between visible/screened comments

[commit: http://hg.dwscoalition.org/dw-free/rev/a8144dd3fb33]

http://bugs.dwscoalition.org/show_bug.cgi?id=493

Fix screened comment header bar color, and the title/alt text of the screen
icon.

Patch by [personal profile] juliet.

Files modified:
  • cgi-bin/bml/scheme/global.look
  • htdocs/js/commentmanage.js
  • htdocs/talkscreen.bml
--------------------------------------------------------------------------------
diff -r 73d3d4ce46d2 -r a8144dd3fb33 cgi-bin/bml/scheme/global.look
--- a/cgi-bin/bml/scheme/global.look	Mon Apr 06 23:11:43 2009 +0000
+++ b/cgi-bin/bml/scheme/global.look	Mon Apr 06 23:34:57 2009 +0000
@@ -208,7 +208,7 @@ EMCOLORLITE=>{S}#e2e2e2
 EMCOLORLITE=>{S}#e2e2e2
 ALTCOLOR1=>{S}#eeeeee
 ALTCOLOR2=>{S}#dddddd
-screenedbarcolor=>{S}#d0d0d0
+screenedbarcolor=>{S}#707070
 
 CHOICE=>{P}<dt><a href="%%data2%%"><font size="+1"><tt><b>%%data1%%</b></tt></font></a><dd><font size="2">%%data3%%</font>
 
diff -r 73d3d4ce46d2 -r a8144dd3fb33 htdocs/js/commentmanage.js
--- a/htdocs/js/commentmanage.js	Mon Apr 06 23:11:43 2009 +0000
+++ b/htdocs/js/commentmanage.js	Mon Apr 06 23:34:57 2009 +0000
@@ -511,6 +511,7 @@ function updateLink (ae, resObj, clickTa
     var did_something = 0;
 
     if (clickTarget && clickTarget.src && clickTarget.src == resObj.oldimage) {
+        clickTarget.setAttribute( 'title', resObj.newalt );
         clickTarget.src = resObj.newimage;
         did_something = 1;
     }
@@ -525,7 +526,7 @@ function updateLink (ae, resObj, clickTa
         if (ae && ae.style)
             ae.style.display = 'none';
         if (clickTarget && clickTarget.style)
-            clickTarget.style.dispay = 'none';
+            clickTarget.style.display = 'none';
     }
 
 }
@@ -573,6 +574,7 @@ function createModerationFunction (ae, d
                     poofAt(clickPos);
                     updateLink(ae, resObj, imgTarget);
                     tsInProg[dItemid] = 0;
+
                 } else {
                     tsInProg[dItemid] = 0;
                 }
diff -r 73d3d4ce46d2 -r a8144dd3fb33 htdocs/talkscreen.bml
--- a/htdocs/talkscreen.bml	Mon Apr 06 23:11:43 2009 +0000
+++ b/htdocs/talkscreen.bml	Mon Apr 06 23:34:57 2009 +0000
@@ -35,6 +35,9 @@ _info?><?_code
         # flip case of 'un'
         my $newmode = "un$mode";
         $newmode =~ s/^unun//;
+        my $alttext = $newmode;
+        $alttext =~ s/(\w+)/\u\L$1/g;
+
         my $stockimg = {
             'screen' => "btn_scr.gif",
             'unscreen' => "btn_unscr.gif",
@@ -42,7 +45,8 @@ _info?><?_code
             'unfreeze' => "btn_unfreeze.gif",
         };
 
-        my $res = "rpcRes = {\n mode: \"$mode\", id: $dtalkid, \n" .
+        my $res = "rpcRes = {\n mode: \"$mode\", \n" .
+            " newalt: \"$alttext\", id: $dtalkid, \n" .
             " oldimage: \"$LJ::IMGPREFIX/$stockimg->{$mode}\",\n " .
             " newimage: '$LJ::IMGPREFIX/$stockimg->{$newmode}',\n " .
             " newurl: '$LJ::SITEROOT/talkscreen.bml?mode=$newmode&journal=$journal&talkid=$dtalkid' \n" .
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org