#10809: Table sort internationalization
-----------------------------------------+----------------------------------
 Reporter:  thomasdesvenain              |        Owner:        
     Type:  PLIP                         |       Status:  closed
 Priority:  minor                        |    Milestone:  4.1   
Component:  Javascript                   |   Resolution:  fixed 
 Keywords:  dates, sort, table, listing  |  
-----------------------------------------+----------------------------------
Changes (by thomasdesvenain):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 I implemented the feature and a fix in
 https://svn.plone.org/svn/plone/Plone/branches/plip10809-improve-
 tablesorter (use https://svn.plone.org/svn/plone/buildouts/plone-
 coredev/branches/4.1/plips/plip10809-improve-tablesorter.cfg buildout
 conf)

 I used sortabledata-xxx for naming.

 I could'nt write unit tests (using test_ecmascripts) because of general
 architecture of table_sorter.js. i don't know how to run javascript
 initialization (using coding style : (function($) {code})(jQuery) in
 ecmascript tests environment... If you can help.

 I tried this code using this example page template in custom :
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-US"
       lang="en-US"
       metal:use-macro="here/main_template/macros/master"
       i18n:domain="plone">

 <body>

 <metal:content-core fill-slot="content-core">
 <table class="listing">
   <thead>
     <tr>
       <th>Title</th>
       <th>Number</th>
       <th>Date</th>
       <th>Size</th>
       <th>Author</th>
       <th>Old number</th>
                         <th>Old name</th>
     </tr>
   </thead>
   <tbody>
     <tr>
       <td class="sortabledata-mytitle1">my title 1</td>
       <td class="sortabledata-3">Trois</td>
       <td class="sortabledata-2011-01-09">4th setpember, 2011</td>
       <td class="sortabledata-1000">1 Kb</td>
       <td class="emphasize   sortabledata-soren">Jørgen</td>
       <td>5</td>
       <td>bleu</td>
     </tr>
     <tr>
       <td class="sortabledata-mytitle3">MY TITLE 3</td>
       <td class="sortabledata-12">12</td>
                         <td class="sortabledata-2010-05-09">5 septembre
 2010</td>
       <td class="emphasize sortabledata-1000000">1 Gb</td>
       <td class="sortabledata-elise">Élise</td>
       <td>21</td>
       <td>blanc</td>
     </tr>
     <tr>
       <td class="emphasize sortabledata-mytitle2">My Title 2</td>
       <td class="sortabledata-7">VII</td>
                         <td
 class="sortabledata-2010-05-12">05/12/2010</td>
       <td class="sortabledata-10">10 bytes</td>
       <td class="sortabledata-jose">José</td>
       <td>8</td>
       <td>rouge</td>
     </tr>
   </tbody>
 </table>
 </metal:content-core>

 </body>

 </html>

-- 
Ticket URL: <http://dev.plone.org/plone/ticket/10809#comment:10>
Plone <http://plone.org>
Plone Content Management System
_______________________________________________
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories

Reply via email to