diff --git a/rhodecode/public/js/rhodecode.js b/rhodecode/public/js/rhodecode.js --- a/rhodecode/public/js/rhodecode.js +++ b/rhodecode/public/js/rhodecode.js @@ -1251,10 +1251,15 @@ var get_group_name = function(node){ return name } var get_date = function(node){ - var date_ = node.firstElementChild.innerHTML; + var date_ = YUD.getAttribute(node.firstElementChild,'date'); return date_ } +var get_age = function(node){ + console.log(node); + return node +} + var revisionSort = function(a, b, desc, field) { var a_ = fromHTML(a.getData(field)); @@ -1269,8 +1274,12 @@ var revisionSort = function(a, b, desc, return compState; }; var ageSort = function(a, b, desc, field) { - var a_ = a.getData(field); - var b_ = b.getData(field); + var a_ = fromHTML(a.getData(field)); + var b_ = fromHTML(b.getData(field)); + + // extract name from table + a_ = get_date(a_) + b_ = get_date(b_) var comp = YAHOO.util.Sort.compare; var compState = comp(a_, b_, desc); diff --git a/rhodecode/templates/admin/repos/repos.html b/rhodecode/templates/admin/repos/repos.html --- a/rhodecode/templates/admin/repos/repos.html +++ b/rhodecode/templates/admin/repos/repos.html @@ -56,7 +56,7 @@ ##LAST CHANGE - ${h.age(repo['last_change'])} + ${h.age(repo['last_change'])} ##LAST REVISION diff --git a/rhodecode/templates/index_base.html b/rhodecode/templates/index_base.html --- a/rhodecode/templates/index_base.html +++ b/rhodecode/templates/index_base.html @@ -89,7 +89,7 @@ ##LAST CHANGE DATE - ${h.age(repo['last_change'])} + ${h.age(repo['last_change'])} ##LAST REVISION