Isn't it just a question of using the <td data="..."> attribute to have sorting on that attribute?
On 1 August 2017 at 01:52, Victor Martinez <[email protected]> wrote: > Hi there, > > Any ideas how I can use the sortable type in a non value cell? I though I > could use the "data-sort" attribute in the cell but it doesn't work. > > As you can see below, there is a table based on two columns, first column > contains the value "${job.name}" while the second column is just a > colorful cell > > <table class="sortable pane bigtable" id="lintTable"> > <thead> > <tr> > <th class="pane-header">Job Name</th> > <th class="pane-header">Status</th> > </tr> > </thead> > <tbody id="lintBody"> > <j:forEach var="job" items="${it.jobSet.elements()}"> > <tr> > <td>${job.name}</td> > <td id="${job.defect. status}" style="background-color: > ${job.defect.color?;"/> > </j:forEach> > </tbody> > </table> > > And its UI > > > <https://lh3.googleusercontent.com/-zVg2lnNOnsI/WYA_9KruHAI/AAAAAAAAICk/tO42nLd_uwEH6jv5NxcTZNR5f_WVKp5NgCLcBGAs/s1600/Screen%2BShot%2B2017-08-01%2Bat%2B09.45.57.png> > > I wish I could also order the Status column based on the colors but it > seems the only sortable field is the value one: https://github.com/ > jenkinsci/jenkins/blob/master/war/src/main/webapp/scripts/sortable.js#L241 > > Any ideas whether the sortable class can be used with hidden values or > different cell attributes? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-dev/5899e2b8-d025-46a2-9a67-5df566aebb75% > 40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/5899e2b8-d025-46a2-9a67-5df566aebb75%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMwqGVTRcwJQ64nGx%3D89KAPD%3DqVAOSRLCoB3S%3DKuBEUQpg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
