On Thu, Apr 29, 2010 at 17:52, Sergiu Dumitriu <[email protected]> wrote:
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"
I have hesitated, spec saying that HTML should be uppercased, and XML case sensitive, I have conclude that XHTML should have been uppercased, but I may be wrong. You see to better know that so, I will do so. Denis
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
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO