##// END OF EJS Templates
Fixed sorting by data when using custom date format from settings
marcink -
r2548:0ff919f1 beta
parent child Browse files
Show More
@@ -1251,10 +1251,15 b' var get_group_name = function(node){'
1251 return name
1251 return name
1252 }
1252 }
1253 var get_date = function(node){
1253 var get_date = function(node){
1254 var date_ = node.firstElementChild.innerHTML;
1254 var date_ = YUD.getAttribute(node.firstElementChild,'date');
1255 return date_
1255 return date_
1256 }
1256 }
1257
1257
1258 var get_age = function(node){
1259 console.log(node);
1260 return node
1261 }
1262
1258 var revisionSort = function(a, b, desc, field) {
1263 var revisionSort = function(a, b, desc, field) {
1259
1264
1260 var a_ = fromHTML(a.getData(field));
1265 var a_ = fromHTML(a.getData(field));
@@ -1269,8 +1274,12 b' var revisionSort = function(a, b, desc, '
1269 return compState;
1274 return compState;
1270 };
1275 };
1271 var ageSort = function(a, b, desc, field) {
1276 var ageSort = function(a, b, desc, field) {
1272 var a_ = a.getData(field);
1277 var a_ = fromHTML(a.getData(field));
1273 var b_ = b.getData(field);
1278 var b_ = fromHTML(b.getData(field));
1279
1280 // extract name from table
1281 a_ = get_date(a_)
1282 b_ = get_date(b_)
1274
1283
1275 var comp = YAHOO.util.Sort.compare;
1284 var comp = YAHOO.util.Sort.compare;
1276 var compState = comp(a_, b_, desc);
1285 var compState = comp(a_, b_, desc);
@@ -56,7 +56,7 b''
56 </td>
56 </td>
57 ##LAST CHANGE
57 ##LAST CHANGE
58 <td>
58 <td>
59 <span class="tooltip" title="${h.tooltip(repo['last_change'])}">${h.age(repo['last_change'])}</span>
59 <span class="tooltip" date="${repo['last_change']}" title="${h.tooltip(repo['last_change'])}">${h.age(repo['last_change'])}</span>
60 </td>
60 </td>
61 ##LAST REVISION
61 ##LAST REVISION
62 <td>
62 <td>
@@ -89,7 +89,7 b''
89 </td>
89 </td>
90 ##LAST CHANGE DATE
90 ##LAST CHANGE DATE
91 <td>
91 <td>
92 <span class="tooltip" title="${h.tooltip(h.fmt_date(repo['last_change']))}">${h.age(repo['last_change'])}</span>
92 <span class="tooltip" date="${repo['last_change']}" title="${h.tooltip(h.fmt_date(repo['last_change']))}">${h.age(repo['last_change'])}</span>
93 </td>
93 </td>
94 ##LAST REVISION
94 ##LAST REVISION
95 <td>
95 <td>
General Comments 0
You need to be logged in to leave comments. Login now