b73c49ac by Jeff Balicki

sss

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent c79fd99f
...@@ -30,7 +30,7 @@ function course_list(){ ...@@ -30,7 +30,7 @@ function course_list(){
30 </div> 30 </div>
31 <div class="btn-group sort-button-group"> 31 <div class="btn-group sort-button-group">
32 <label>SORT BY:</label> 32 <label>SORT BY:</label>
33 <button class="btn btn-light" data-sort-direction="asc" data-sort-value="coursename" type="button">Name <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button> 33 <button class="btn btn-light atoz" data-sort-direction="asc" data-sort-value="1" type="button"><spam class="text">A to Z</span></button>
34 <button class="btn btn-light" data-sort-direction="asc" data-sort-value="coursedate" type="button">Date <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button> 34 <button class="btn btn-light" data-sort-direction="asc" data-sort-value="coursedate" type="button">Date <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button>
35 </div> 35 </div>
36 </div> 36 </div>
......
...@@ -42,7 +42,7 @@ function resources_list(){ ...@@ -42,7 +42,7 @@ function resources_list(){
42 </div> 42 </div>
43 <div class="btn-group sort-button-group"> 43 <div class="btn-group sort-button-group">
44 <label>SORT BY:</label> 44 <label>SORT BY:</label>
45 <button class="btn btn-light" data-sort-direction="asc" data-sort-value="1" type="button">Name <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button> 45 <button class="btn btn-light atoz" data-sort-direction="asc" data-sort-value="1" type="button"><spam class="text">A to Z</span></button>
46 <button class="btn btn-light" data-sort-direction="asc" data-sort-value="3" type="button">Date <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button> 46 <button class="btn btn-light" data-sort-direction="asc" data-sort-value="3" type="button">Date <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button>
47 </div> 47 </div>
48 </div> 48 </div>
......
...@@ -35113,13 +35113,18 @@ ...@@ -35113,13 +35113,18 @@
35113 var direction = $(this).attr('data-sort-direction'); 35113 var direction = $(this).attr('data-sort-direction');
35114 var isAscending = direction == 'asc'; 35114 var isAscending = direction == 'asc';
35115 var newDirection = isAscending ? 'desc' : 'asc'; 35115 var newDirection = isAscending ? 'desc' : 'asc';
35116 console.log(sortValue);
35117 console.log(isAscending);
35118 $grid.isotope({ 35116 $grid.isotope({
35119 sortBy: sortValue, 35117 sortBy: sortValue,
35120 sortAscending: isAscending 35118 sortAscending: isAscending
35121 }); 35119 });
35122 updateFilterCounts(); 35120 updateFilterCounts();
35121 if ($(this).hasClass('atoz')) {
35122 if (direction == 'asc') {
35123 $(this).find('.text').text("Z to A");
35124 } else {
35125 $(this).find('.text').text("A to Z");
35126 }
35127 }
35123 $(this).attr('data-sort-direction', newDirection); 35128 $(this).attr('data-sort-direction', newDirection);
35124 var span = $(this).find('.glyphicon'); 35129 var span = $(this).find('.glyphicon');
35125 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); 35130 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down');
...@@ -35272,8 +35277,13 @@ ...@@ -35272,8 +35277,13 @@
35272 var direction = $(this).attr('data-sort-direction'); 35277 var direction = $(this).attr('data-sort-direction');
35273 var isAscending = direction == 'asc'; 35278 var isAscending = direction == 'asc';
35274 var newDirection = isAscending ? 'desc' : 'asc'; 35279 var newDirection = isAscending ? 'desc' : 'asc';
35275 console.log(sortValue); 35280 if ($(this).hasClass('atoz')) {
35276 console.log(isAscending); 35281 if (direction == 'asc') {
35282 $(this).find('.text').text("Z to A");
35283 } else {
35284 $(this).find('.text').text("A to Z");
35285 }
35286 }
35277 $(this).attr('data-sort-direction', newDirection); 35287 $(this).attr('data-sort-direction', newDirection);
35278 var span = $(this).find('.glyphicon'); 35288 var span = $(this).find('.glyphicon');
35279 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); 35289 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down');
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -76,13 +76,18 @@ jQuery(document).ready(function($) { ...@@ -76,13 +76,18 @@ jQuery(document).ready(function($) {
76 var direction = $(this).attr('data-sort-direction'); 76 var direction = $(this).attr('data-sort-direction');
77 var isAscending = (direction == 'asc'); 77 var isAscending = (direction == 'asc');
78 var newDirection = (isAscending) ? 'desc' : 'asc'; 78 var newDirection = (isAscending) ? 'desc' : 'asc';
79 console.log(sortValue);
80 console.log(isAscending);
81 $grid.isotope({ 79 $grid.isotope({
82 sortBy: sortValue, 80 sortBy: sortValue,
83 sortAscending: isAscending 81 sortAscending: isAscending
84 }); 82 });
85 updateFilterCounts(); 83 updateFilterCounts();
84 if($(this).hasClass('atoz')){
85 if(direction == 'asc'){
86 $(this).find('.text').text("Z to A");
87 }else{
88 $(this).find('.text').text("A to Z");
89 }
90 }
86 $(this).attr('data-sort-direction', newDirection); 91 $(this).attr('data-sort-direction', newDirection);
87 var span = $(this).find('.glyphicon'); 92 var span = $(this).find('.glyphicon');
88 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); 93 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down');
......
...@@ -75,8 +75,13 @@ jQuery(document).ready(function($) { ...@@ -75,8 +75,13 @@ jQuery(document).ready(function($) {
75 var direction = $(this).attr('data-sort-direction'); 75 var direction = $(this).attr('data-sort-direction');
76 var isAscending = (direction == 'asc'); 76 var isAscending = (direction == 'asc');
77 var newDirection = (isAscending) ? 'desc' : 'asc'; 77 var newDirection = (isAscending) ? 'desc' : 'asc';
78 console.log(sortValue); 78 if($(this).hasClass('atoz')){
79 console.log(isAscending); 79 if(direction == 'asc'){
80 $(this).find('.text').text("Z to A");
81 }else{
82 $(this).find('.text').text("A to Z");
83 }
84 }
80 $(this).attr('data-sort-direction', newDirection); 85 $(this).attr('data-sort-direction', newDirection);
81 var span = $(this).find('.glyphicon'); 86 var span = $(this).find('.glyphicon');
82 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); 87 span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 Author: Tenzing Communications 5 Author: Tenzing Communications
6 Author URI: https://tenzingbrand.com 6 Author URI: https://tenzingbrand.com
7 Template: understrap 7 Template: understrap
8 Version: 1.1.0026 8 Version: 1.1.0027
9 License: GNU General Public License v2 or later 9 License: GNU General Public License v2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 Text Domain: understrap-child 11 Text Domain: understrap-child
......