Re: com web/php: Fade out user notes with negative votes: js/common.js
| From: | Paul Dragoonis | Date: | Wed, 04 Dec 2013 03:02:56 +0000 |
| Subject: | Re: com web/php: Fade out user notes with negative votes: js/common.js | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-17323@lists.php.net to get a copy of this message | ||
Hi Dejan,
Can you explain what this does from a functionality perspective ?
Can you get rid of the "bang bang" as some non-JS gurus might get messed up
with it in the future.
On Wed, Dec 4, 2013 at 2:53 AM, Dejan Marjanovic <dm@php.net> wrote:
> Commit: 5bf8f70adc258960802a04e973b23d8d65fe15b3
> Author: Dejan Marjanovic <dejan.marjanovic@gmail.com> Wed, 4
> Dec 2013 03:53:07 +0100
> Parents: 54e5393d960618367cd8e6846ab66dc7898097d9
> Branches: master
>
> Link:
>
> http://git.php.net/?p=web/php.git;a=commitdiff;h=5bf8f70adc258960802a04e973b23d8d65fe15b3
>
> 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);
> + });
> + }
> +/* }}} */
> +
> });
>
> /**
>
>
> --
> PHP Webmaster List Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>