From c7a7ddb0a842bbda296a8e1c44bec2b0d714cc08 Mon Sep 17 00:00:00 2001 From: william-bratches Date: Fri, 21 Mar 2014 20:40:31 -0400 Subject: [PATCH] Fix for issue 136 --- karmaworld/templates/courses/course_list.html | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/karmaworld/templates/courses/course_list.html b/karmaworld/templates/courses/course_list.html index 08b4297..a874f63 100644 --- a/karmaworld/templates/courses/course_list.html +++ b/karmaworld/templates/courses/course_list.html @@ -43,21 +43,24 @@ $(document).ready(function() { "aoColumnDefs": [ { // 4th element: thanks - "aTargets": [ 3 ], + "aTargets": [ 6 ], "bSortable": true, - "bVisible": true + "bVisible": true, + "aDataSort": [ 3 ] }, { // 3rd element: notes - "aTargets": [ 2 ], + "aTargets": [ 5 ], "bSortable": true, - "bVisible": true + "bVisible": true, + "aDataSort": [ 2 ] }, { // 2nd element: date - "aTargets": [ 1 ], + "aTargets": [ 4 ], "bSortable": true, - "bVisible": true + "bVisible": true, + "aDataSort": [ 1 ] }, { // 1st element: "sort by" label @@ -67,24 +70,24 @@ $(document).ready(function() { } ], // Initial sorting - 'aaSorting': [[3,'desc']] - }) + 'aaSorting': [[6,'desc']] + }); $('.dataTables_filter input').attr("placeholder", "search courses"); // TODO: can't prepend html to .dataTables_filter input html for fontawesome search icon }); -//button -$(function(){ - $('#paginate_enabled_next').click(function() { - $("#data-table-sort-by").ScrollTo();; + //scrolling scripts - scrolls to top of page after scrolling between pages + $(function(){ + $('#paginate_enabled_next').click(function() { + $("#data-table-sort-by").ScrollTo();; }); -}); - -$(function(){ - $('#paginate_enabled_previous').click(function() { - $("#data-table-sort-by").ScrollTo();; + + $(function(){ + $('paginate_enabled_previous').click(function() { + $("#data-table-sort-by").ScrollTo();; }); -}); + + {% endblock %} @@ -108,8 +111,11 @@ $(function(){ Sort by: + Date + # Notes + Popularity Date - #Notes + # Notes Popularity Upload Course Name -- 2.25.1