com web/php: Fade out user notes with negative votes: js/common.js

From: Date: Wed, 04 Dec 2013 02:53:07 +0000
Subject: com web/php: Fade out user notes with negative votes: js/common.js
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-22419@lists.php.net to get a copy of this message
Commit: 02a810c54a6b3185e6cbd06edc94fb19228439c8 Author: Dejan Marjanovic <dejan.marjanovic@gmail.com> Wed, 4 Dec 2013 03:53:07 +0100 Parents: 6e8ced528350281f0d4e2b5722e9c4c59cc87cc1 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=02a810c54a6b3185e6cbd06edc94fb19228439c8 Log: Fade out user notes with negative votes Changed paths: M js/common.js Diff: diff --git a/js/common.js b/js/common.js index a077893..814f1a8 100755 --- a/js/common.js +++ b/js/common.js @@ -287,7 +287,22 @@ $(document).ready(function() { language: getLanguage(), limit: 3 }); - + +/* {{{ Negative user notes fade-out */ + if (!!document.getElementById('usernotes')) + { + $('.note .tally:contains("-")').each(function(){ + var id = this.id.replace('V', ''); + + var v = this.innerHTML.toInt(); + v += 6; + v = v <= 2 ? 2 : v; + + $('#' + id).css('opacity', '0.' + v); + }); + } +/* }}} */ + }); /**

« previous php.webmaster (#22419) next »