On 04/29/2010 05:21 PM, dgervalle (SVN) wrote:
> Author: dgervalle
> Date: 2010-04-29 17:21:25 +0200 (Thu, 29 Apr 2010)
> New Revision: 28664
>
> Modified:
>     
> platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
> Log:
> XWIKI-5135 - Highlight applied filters in livetable
> Fix tag names comparison to uppercase string.
>
> Modified: 
> platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
> ===================================================================
> --- 
> platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
>  2010-04-29 13:13:38 UTC (rev 28663)
> +++ 
> platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/table/livetable.js
>  2010-04-29 15:21:25 UTC (rev 28664)
> @@ -698,7 +698,7 @@
>      * Apply style to livetable filters that are applied
>      */
>     applyActiveFilterStyle: function(element) {
> -    if(element&&  ((element.tagName == "input"&&  element.type == "text") || 
> element.tagName == "select")) {
> +    if(element&&  ((element.tagName == "INPUT"&&  element.type == "text") || 
> element.tagName == "SELECT")) {

That's not quite correct. Depending on the browser, doctype and 
mimetype, it could be lowercase. Better use some case insensitive 
comparison, for example:
element.tagName.toLowerCase() == "input"

>         if ($F(element) != '') {
>           element.addClassName('xwiki-livetable-filter-active');
>         } else {


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to