From e81ae59b0ddb390d9d25b83b8b74b755a4f0ab1d Mon Sep 17 00:00:00 2001
From: "Mark M. Florida" <markflorida@wustl.edu>
Date: Thu, 7 Jul 2016 15:28:13 -0500
Subject: [PATCH] XNAT-4392: updated sorting functionality in admin summary.

---
 .../xnat-templates/screens/AdminSummary.vm       | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/main/webapp/xnat-templates/screens/AdminSummary.vm b/src/main/webapp/xnat-templates/screens/AdminSummary.vm
index cb5b4bb6..38bbe677 100644
--- a/src/main/webapp/xnat-templates/screens/AdminSummary.vm
+++ b/src/main/webapp/xnat-templates/screens/AdminSummary.vm
@@ -35,9 +35,6 @@ From:
 </form>
 
 
-<script type="text/javascript" src="$content.getURI("scripts/sortable_us.js")"></script>
-
-
 <div id="new_projects" class="section">
     <h3>New $displayManager.getPluralDisplayNameForProject()</h3>
     $qm.execute("select meta.insert_date as ""Date Created"", textcat(textcat(use.firstname, ' '),use.lastname) as ""Creator"", invest.lastname as ""Investigator"", proj.id as ""ID"", proj.name as ""Name"", proj.secondary_id as ""Secondary ID"", proj.description as ""Description"", proj.keywords as ""Keywords"" from xnat_projectdata_meta_data meta join xnat_projectdata proj on proj.projectdata_info = meta.meta_data_id left join xnat_investigatordata invest on proj.pi_xnat_investigatordata_id = invest.xnat_investigatordata_id left join xdat_user use on meta.insert_user_xdat_user_id = use.xdat_user_id where meta.insert_date > (NOW()-interval '$duration1') AND meta.insert_date < (NOW()-interval '$duration2')")
@@ -85,8 +82,6 @@ From:
                 table_id = div.id + '_TABLE';
 
             div.style.marginTop = '20px';
-//            __div.css('margin-top','20px');
-//            __div.find('> h3').css('margin-bottom','10px');
 
             // remove the table if there are no records
             if (__table.find('> tbody > tr').length === 0){
@@ -95,14 +90,17 @@ From:
                 return;
             }
 
-//            jq(table).removeAttr('width');
-
             table.id = table_id;
-            table.className = 'sortable xnat-table alt1'
+            table.className = 'xnat-table alt1 highlight sortable'
             table.width = '100%';
             table.style.marginTop = '10px';
 
-            ts_makeSortable(table);
+            __table.find('tr').each(function(){
+                var __tr = $(this);
+                __tr.find('> th, > td').first().addClass('index');
+            })
+
+            __table.tableSort();
 
         });
 
-- 
GitLab