From: william-bratches Date: Sat, 22 Mar 2014 00:40:31 +0000 (-0400) Subject: Fix for issue 136 X-Git-Tag: release-20150131~144^2~12^2~31 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c7a7ddb0a842bbda296a8e1c44bec2b0d714cc08;p=oweals%2Fkarmaworld.git Fix for issue 136 --- 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