Skip to main content

patch to enable sortable=false in yahoo datatable

1 reply [Last post]
tibber
Offline
Joined: 2007-06-26

patch against jmaki 0.9.4, yahoo 2.2.2 to make columns unsortable in yahoo datatable.

Hth,

Tib

<br />
--- resources-orig/yahoo/dataTable/component.js   2007-07-13 16:47:08.000000000 +0200<br />
+++ resources/yahoo/dataTable/component.js      2007-07-13 18:23:17.000000000 +0200<br />
@@ -123,6 +123,7 @@<br />
         for (var i = 0 ; i < cold.length; i++){<br />
             var col = {};</p>
<p>+            col.sortable = true;<br />
             if (cold[i].id) {<br />
                schema.push(cold[i].id);<br />
                schema[cold[i].id] = cold[i].id;<br />
@@ -146,11 +147,12 @@<br />
                      }</p>
<p>                      col.text = cold[i].title;<br />
+                } else if (ii == 'sortable') {<br />
+                       col.sortable = cold[i].sortable;<br />
                 } else {<br />
                     col[ii] = cold[i][ii];<br />
                 }<br />
             }<br />
-            if (!col.sortable) col.sortable = true;<br />
             cols.push(col);<br />
         }<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31

Hi Tibber,

I've fixed the issue for the .9.5 release which we hope to push this weekend. We've done some major surgery on the yahoo.dataTable, dojo.etable, and dojo.table to fit the new models we are proposing. I'm not sure we can carry over the sortable per column to the dojo tables but I'll look into it for a future release. For now it will be yahoo specific.

Thank you for pointing this out.