On Nov 14, 2009, at 2:53 PM, Jerome Velociter wrote:

> On 11/14/09 2:52 PM, Jerome Velociter wrote:
>> On 11/13/09 5:19 PM, vmassol (SVN) wrote:
>>> Author: vmassol
>>> Date: 2009-11-13 17:19:01 +0100 (Fri, 13 Nov 2009)
>>> New Revision: 25059
>>>
>>> Modified:
>>>     platform/core/trunk/xwiki-core/src/main/resources/ 
>>> ApplicationResources.properties
>>>     platform/web/trunk/standard/src/main/webapp/templates/macros.vm
>>> Log:
>>> XWIKI-4588: Associate labels with livetable filter inputs and  
>>> improve livetable title attributes
>>>
>>> * TODO: add labels for lists too
>>>
>>> Modified: platform/core/trunk/xwiki-core/src/main/resources/ 
>>> ApplicationResources.properties
>>> ===================================================================
>>> --- platform/core/trunk/xwiki-core/src/main/resources/ 
>>> ApplicationResources.properties     2009-11-13 16:18:12 UTC (rev 25058)
>>> +++ platform/core/trunk/xwiki-core/src/main/resources/ 
>>> ApplicationResources.properties     2009-11-13 16:19:01 UTC (rev 25059)
>>> @@ -1843,7 +1843,7 @@
>>>   xe.livetable._actions.rename=rename
>>>   xe.livetable._actions.rights=rights
>>>   xe.livetable._actions.copy=copy
>>> -xe.livetable.filters.title=Enter a filter for this field
>>> +xe.livetable.filters.title=Filter for the {0} column
>>>   xe.livetable.loading=Loading...
>>>   xe.livetable.tags.help=Click on one or more tags to filter the  
>>> list
>>>   xe.livetable.tags.help.cancel=and click again on a tag to cancel  
>>> the filter
>>>
>>> Modified: platform/web/trunk/standard/src/main/webapp/templates/ 
>>> macros.vm
>>> ===================================================================
>>> --- platform/web/trunk/standard/src/main/webapp/templates/ 
>>> macros.vm   2009-11-13 16:18:12 UTC (rev 25058)
>>> +++ platform/web/trunk/standard/src/main/webapp/templates/ 
>>> macros.vm   2009-11-13 16:19:01 UTC (rev 25059)
>>> @@ -1564,6 +1564,11 @@
>>>               <tr>
>>>               #foreach($colname in $collist)
>>>                 #set($colprop = $colprops.get($colname))
>>> +              #if(("$!colprop.filterable" == "" ||  
>>> $colprop.filterable != false)&&   "$!colname" != "_actions")
>>> +                #set($isFilterable = true)
>>> +              #else
>>> +                #set($isFilterable = false)
>>> +              #end
>>>                 #if(("$!colprop.sortable" == "" ||  
>>> $colprop.sortable != false)&&   "$!colname" != "_actions")
>>>                   #set($isSortable = true)
>>>                 #else
>>> @@ -1572,7 +1577,9 @@
>>>                 #if($colname != "_actions" || $hasAdmin)
>>>                 <th class="xwiki-livetable-display-header-text  
>>> #if($isSortable)sortable #if($colname == $selectedColumn)selected  
>>> $defaultOrder#else asc#end#end"  #if("$!colprop.type"=="hidden")  
>>> style="display: none" #end>
>>>                   #if($isSortable)<a rel="${colname}">#end
>>> +                #if($isFilterable&&   ("$! 
>>> colprop.type"=="text"||"$!colprop.type"=="number"))<label  
>>> for="xwiki-livetable-filter-${velocityCount}">#end
>>
>> With this, we'll have ID collision if several live tables are  
>> displayed
>> on the page.
>>
>> You need to add the table identifier (passed as a parameter of the  
>> macro
>> AFAIR) in the field ID.
>
> Sorry for the noise, just seen you've fixed it already.

Yep :) Thanks for checking!

-Vincent

>> Jerome.
>>>                   $msg.get("${transprefix}${colname}")
>>> +                #if($isFilterable)</label>#end
>>>                   #if($isSortable)</a>#end
>>>                 </th>
>>>                 #end
>>> @@ -1604,7 +1611,7 @@
>>>                   </select>
>>>                   </td>
>>>                 #elseif( ("$!colprop.type"=="text"||"$! 
>>> colprop.type"=="number")&&   $isFilterable)
>>> -<td class="xwiki-livetable-display-header-filter"><input name="$ 
>>> {colname}" type="text" #if("!$colprop.size"!="") size="$ 
>>> {colprop.size}" #end   
>>> title="$msg.get('xe.livetable.filters.title')" /></td>
>>> +<td class="xwiki-livetable-display-header-filter"><input  
>>> id="xwiki-livetable-filter-${velocityCount}" name="${colname}"  
>>> type="text" #if("!$colprop.size"!="") size="${colprop.size}"  
>>> title="$msg.get('xe.livetable.filters.title', [$msg.get("$ 
>>> {transprefix}${colname}")])"#end /></td>
>>>                 #elseif("$!colprop.type"=="hidden")
>>>                 #elseif($colname != "_actions" || $hasAdmin)
>>>                 <td class="xwiki-livetable-display-header- 
>>> filter"></td>

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to