From: william-bratches Date: Sat, 22 Mar 2014 00:36:21 +0000 (-0400) Subject: fix to issue 136 X-Git-Tag: release-20150131~144^2~12^2~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=993add1042d039f26afe99e2008a7c29afcb300d;p=oweals%2Fkarmaworld.git fix to issue 136 --- diff --git a/karmaworld/templates/courses/course_list.html b/karmaworld/templates/courses/course_list.html index a874f63..08b4297 100644 --- a/karmaworld/templates/courses/course_list.html +++ b/karmaworld/templates/courses/course_list.html @@ -43,24 +43,21 @@ $(document).ready(function() { "aoColumnDefs": [ { // 4th element: thanks - "aTargets": [ 6 ], + "aTargets": [ 3 ], "bSortable": true, - "bVisible": true, - "aDataSort": [ 3 ] + "bVisible": true }, { // 3rd element: notes - "aTargets": [ 5 ], + "aTargets": [ 2 ], "bSortable": true, - "bVisible": true, - "aDataSort": [ 2 ] + "bVisible": true }, { // 2nd element: date - "aTargets": [ 4 ], + "aTargets": [ 1 ], "bSortable": true, - "bVisible": true, - "aDataSort": [ 1 ] + "bVisible": true }, { // 1st element: "sort by" label @@ -70,24 +67,24 @@ $(document).ready(function() { } ], // Initial sorting - 'aaSorting': [[6,'desc']] - }); + 'aaSorting': [[3,'desc']] + }) $('.dataTables_filter input').attr("placeholder", "search courses"); // TODO: can't prepend html to .dataTables_filter input html for fontawesome search icon }); - //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();; +//button +$(function(){ + $('#paginate_enabled_next').click(function() { + $("#data-table-sort-by").ScrollTo();; }); +}); - +$(function(){ + $('#paginate_enabled_previous').click(function() { + $("#data-table-sort-by").ScrollTo();; + }); +}); {% endblock %} @@ -111,11 +108,8 @@ $(document).ready(function() { Sort by: - Date - # Notes - Popularity Date - # Notes + #Notes Popularity Upload Course Name