2d55b40c by Jeff Balicki

ssss

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 2eec86df
...@@ -14900,6 +14900,7 @@ label[for=quicksearch] { ...@@ -14900,6 +14900,7 @@ label[for=quicksearch] {
14900 .category-filter-group { 14900 .category-filter-group {
14901 display: flex; 14901 display: flex;
14902 flex-direction: row; 14902 flex-direction: row;
14903 width: 80%;
14903 } 14904 }
14904 @media only screen and (max-width: 1100px) { 14905 @media only screen and (max-width: 1100px) {
14905 .category-filter-group { 14906 .category-filter-group {
...@@ -14907,6 +14908,10 @@ label[for=quicksearch] { ...@@ -14907,6 +14908,10 @@ label[for=quicksearch] {
14907 } 14908 }
14908 } 14909 }
14909 14910
14911 .category {
14912 flex-wrap: wrap;
14913 }
14914
14910 .category-type, 14915 .category-type,
14911 .category-filter { 14916 .category-filter {
14912 display: flex; 14917 display: flex;
......
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.
...@@ -35,7 +35,7 @@ function resources_list($atts){ ...@@ -35,7 +35,7 @@ function resources_list($atts){
35 <div class="filter-group"> 35 <div class="filter-group">
36 <div class="category-filter-group "> 36 <div class="category-filter-group ">
37 <div class="category"> 37 <div class="category">
38 <?php $terms = get_terms( array( 'taxonomy' => 'resource_category' ,'parent' => $atts['tax']) ); 38 <?php $terms = get_terms( array( 'taxonomy' => 'mlo-category' ,'parent' => $atts['tax']) );
39 foreach($terms as $term){ ?> 39 foreach($terms as $term){ ?>
40 <div class="category-filter"> <input id="<?php echo $term->slug ; ?>" value="<?php echo $term->slug ; ?>" type="checkbox" class="sr-only"><label for="<?php echo $term->slug ; ?>"><?php echo $term->name ; ?></label></div> 40 <div class="category-filter"> <input id="<?php echo $term->slug ; ?>" value="<?php echo $term->slug ; ?>" type="checkbox" class="sr-only"><label for="<?php echo $term->slug ; ?>"><?php echo $term->name ; ?></label></div>
41 <?php }; ?> 41 <?php }; ?>
...@@ -53,7 +53,7 @@ function resources_list($atts){ ...@@ -53,7 +53,7 @@ function resources_list($atts){
53 <thead><tr><th class="hidden"></th><th></th><th class="hidden"></th><th></th></tr></thead> 53 <thead><tr><th class="hidden"></th><th></th><th class="hidden"></th><th></th></tr></thead>
54 <tbody> 54 <tbody>
55 <?php while ($custom_query->have_posts()): $custom_query->the_post(); 55 <?php while ($custom_query->have_posts()): $custom_query->the_post();
56 echo resources(get_the_ID()); 56 echo resources(get_the_ID(), $atts['tax']);
57 endwhile; ?> 57 endwhile; ?>
58 </tbody> 58 </tbody>
59 </table> 59 </table>
...@@ -100,18 +100,18 @@ function resources_fav(){ ...@@ -100,18 +100,18 @@ function resources_fav(){
100 100
101 101
102 102
103 function resources($id){ 103 function resources($id, $tax){
104 104
105 ob_start(); 105 ob_start();
106 $post = get_post($id); 106 $post = get_post($id);
107 $text = str_replace(']]>', ']]&gt;', apply_filters( 'the_content', strip_shortcodes($post->post_content))); 107 $text = str_replace(']]>', ']]&gt;', apply_filters( 'the_content', strip_shortcodes($post->post_content)));
108 $excerpt_length = apply_filters( 'excerpt_length', 20 ); 108 $excerpt_length = apply_filters( 'excerpt_length', 20 );
109 $text = wp_trim_words( $text, $excerpt_length, ' ...' ); 109 $text = wp_trim_words( $text, $excerpt_length, ' ...' );
110 $categories = get_the_terms( $id, 'resource_category' ); 110 $categories = get_the_terms( $id, 'mlo-category' );
111 $cat =""; 111 $cat ="";
112 if(is_array( $categories)){ 112 if(is_array( $categories)){
113 foreach( $categories as $category ) { 113 foreach( $categories as $category ) {
114 if($category->parent == 27){ 114 if($category->parent == $tax){
115 $cat .= " ".$category->slug; 115 $cat .= " ".$category->slug;
116 } 116 }
117 }; 117 };
......
...@@ -20071,7 +20071,7 @@ ...@@ -20071,7 +20071,7 @@
20071 // combine inclusive filters 20071 // combine inclusive filters
20072 filterValue = inclusives.length ? inclusives.join('|') : ''; 20072 filterValue = inclusives.length ? inclusives.join('|') : '';
20073 console.log(filterValue); 20073 console.log(filterValue);
20074 $('#resources').DataTable().column(2).search(filterValue, true, false).draw(); 20074 $('#resources').DataTable().column(1).search(filterValue, true, false).draw();
20075 }); 20075 });
20076 20076
20077 // filter with selects and checkboxes 20077 // filter with selects and checkboxes
......
This diff could not be displayed because it is too large.
...@@ -118,5 +118,5 @@ let Ge=e;var Ze,tn,en,nn,rn=function(t,e){if(this instanceof rn)return Ge(t).Dat ...@@ -118,5 +118,5 @@ let Ge=e;var Ze,tn,en,nn,rn=function(t,e){if(this instanceof rn)return Ge(t).Dat
118 /*! DataTables Bootstrap 5 integration 118 /*! DataTables Bootstrap 5 integration
119 * 2020 SpryMedia Ltd - datatables.net/license 119 * 2020 SpryMedia Ltd - datatables.net/license
120 */ 120 */
121 e.extend(!0,rn.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row dt-row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),e.extend(rn.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap5",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-select form-select-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),rn.ext.renderer.pageButton.bootstrap=function(t,n,r,i,o,a){var s,l,c,u=new rn.Api(t),d=t.oClasses,f=t.oLanguage.oPaginate,h=t.oLanguage.oAria.paginate||{},p=function(n,i){var c,g,m,v,b=function(t){t.preventDefault(),e(t.currentTarget).hasClass("disabled")||u.page()==t.data.action||u.page(t.data.action).draw("page")};for(c=0,g=i.length;c<g;c++)if(v=i[c],Array.isArray(v))p(n,v);else{switch(s="",l="",v){case"ellipsis":s="&#x2026;",l="disabled";break;case"first":s=f.sFirst,l=v+(o>0?"":" disabled");break;case"previous":s=f.sPrevious,l=v+(o>0?"":" disabled");break;case"next":s=f.sNext,l=v+(o<a-1?"":" disabled");break;case"last":s=f.sLast,l=v+(o<a-1?"":" disabled");break;default:s=v+1,l=o===v?"active":""}if(s){var _=-1!==l.indexOf("disabled");m=e("<li>",{class:d.sPageButton+" "+l,id:0===r&&"string"==typeof v?t.sTableId+"_"+v:null}).append(e("<a>",{href:_?null:"#","aria-controls":t.sTableId,"aria-disabled":_?"true":null,"aria-label":h[v],"aria-role":"link","aria-current":"active"===l?"page":null,"data-dt-idx":v,tabindex:t.iTabIndex,class:"page-link"}).html(s)).appendTo(n),t.oApi._fnBindAction(m,{action:v},b)}}},g=e(n);try{c=g.find(document.activeElement).data("dt-idx")}catch(t){}var m=g.children("ul.pagination");m.length?m.empty():m=g.html("<ul/>").children("ul").addClass("pagination"),p(m,i),void 0!==c&&g.find("[data-dt-idx="+c+"]").trigger("focus")},jQuery(document).ready((function(t){if(t("#resources").length){var e,n=t("#resources").DataTable({pageLength:8,searchable:!1,paging:!0,info:!1,order:[[2,"desc"]],dom:'<"top"<"clear"><"clear">>rt<"bottom"<"clear">p<"clear">>'}),r=t("#quicksearch").keyup((function(){console.log(r.val()),t("#resources").DataTable().column(0).search(r.val()).draw()})),i=t(".category-filter input");i.change((function(){var n=[];i.each((function(t,e){e.checked&&n.push(e.value)})),e=n.length?n.join("|"):"",console.log(e),t("#resources").DataTable().column(2).search(e,!0,!1).draw()}));var o,a=t(".category-type input");a.change((function(){var e=[];a.each((function(t,n){n.checked&&e.push(n.value)})),o=e.length?e.join("|"):"",t("#resources").DataTable().column(0).search(o,!0,!1).draw()})),t(".sort-button-group").on("click","button",(function(){var e=t(this).attr("data-sort-value"),r="asc"==t(this).attr("data-sort-direction"),i=r?"desc":"asc";console.log(e),console.log(r),t(this).attr("data-sort-direction",i),t(this).find(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down"),n.order([e,i]).draw()})),t(document).on("click","#filter-more",(function(e){e.preventDefault(),t(".filter-group").toggleClass("open"),t(this).find(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down")}))}}));var qi=document.querySelector(".blur-image");document.addEventListener("DOMContentLoaded",(function(){if(!qi)return!1;var t=qi.getAttribute("data-src"),e=document.querySelector(".full-image"),n=new Image;n.src=t,n.onload=function(){e.classList.add("image-loaded"),e.style.backgroundImage="url("+t+")"}})),t.Alert=C,t.Button=E,t.Carousel=N,t.Collapse=M,t.Dropdown=ye,t.Modal=Le,t.Offcanvas=ke,t.Popover=Be,t.Scrollspy=qe,t.Tab=ze,t.Toast=Ke,t.Tooltip=We})); 121 e.extend(!0,rn.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row dt-row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),e.extend(rn.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap5",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-select form-select-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),rn.ext.renderer.pageButton.bootstrap=function(t,n,r,i,o,a){var s,l,c,u=new rn.Api(t),d=t.oClasses,f=t.oLanguage.oPaginate,h=t.oLanguage.oAria.paginate||{},p=function(n,i){var c,g,m,v,b=function(t){t.preventDefault(),e(t.currentTarget).hasClass("disabled")||u.page()==t.data.action||u.page(t.data.action).draw("page")};for(c=0,g=i.length;c<g;c++)if(v=i[c],Array.isArray(v))p(n,v);else{switch(s="",l="",v){case"ellipsis":s="&#x2026;",l="disabled";break;case"first":s=f.sFirst,l=v+(o>0?"":" disabled");break;case"previous":s=f.sPrevious,l=v+(o>0?"":" disabled");break;case"next":s=f.sNext,l=v+(o<a-1?"":" disabled");break;case"last":s=f.sLast,l=v+(o<a-1?"":" disabled");break;default:s=v+1,l=o===v?"active":""}if(s){var _=-1!==l.indexOf("disabled");m=e("<li>",{class:d.sPageButton+" "+l,id:0===r&&"string"==typeof v?t.sTableId+"_"+v:null}).append(e("<a>",{href:_?null:"#","aria-controls":t.sTableId,"aria-disabled":_?"true":null,"aria-label":h[v],"aria-role":"link","aria-current":"active"===l?"page":null,"data-dt-idx":v,tabindex:t.iTabIndex,class:"page-link"}).html(s)).appendTo(n),t.oApi._fnBindAction(m,{action:v},b)}}},g=e(n);try{c=g.find(document.activeElement).data("dt-idx")}catch(t){}var m=g.children("ul.pagination");m.length?m.empty():m=g.html("<ul/>").children("ul").addClass("pagination"),p(m,i),void 0!==c&&g.find("[data-dt-idx="+c+"]").trigger("focus")},jQuery(document).ready((function(t){if(t("#resources").length){var e,n=t("#resources").DataTable({pageLength:8,searchable:!1,paging:!0,info:!1,order:[[2,"desc"]],dom:'<"top"<"clear"><"clear">>rt<"bottom"<"clear">p<"clear">>'}),r=t("#quicksearch").keyup((function(){console.log(r.val()),t("#resources").DataTable().column(0).search(r.val()).draw()})),i=t(".category-filter input");i.change((function(){var n=[];i.each((function(t,e){e.checked&&n.push(e.value)})),e=n.length?n.join("|"):"",console.log(e),t("#resources").DataTable().column(1).search(e,!0,!1).draw()}));var o,a=t(".category-type input");a.change((function(){var e=[];a.each((function(t,n){n.checked&&e.push(n.value)})),o=e.length?e.join("|"):"",t("#resources").DataTable().column(0).search(o,!0,!1).draw()})),t(".sort-button-group").on("click","button",(function(){var e=t(this).attr("data-sort-value"),r="asc"==t(this).attr("data-sort-direction"),i=r?"desc":"asc";console.log(e),console.log(r),t(this).attr("data-sort-direction",i),t(this).find(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down"),n.order([e,i]).draw()})),t(document).on("click","#filter-more",(function(e){e.preventDefault(),t(".filter-group").toggleClass("open"),t(this).find(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down")}))}}));var qi=document.querySelector(".blur-image");document.addEventListener("DOMContentLoaded",(function(){if(!qi)return!1;var t=qi.getAttribute("data-src"),e=document.querySelector(".full-image"),n=new Image;n.src=t,n.onload=function(){e.classList.add("image-loaded"),e.style.backgroundImage="url("+t+")"}})),t.Alert=C,t.Button=E,t.Carousel=N,t.Collapse=M,t.Dropdown=ye,t.Modal=Le,t.Offcanvas=ke,t.Popover=Be,t.Scrollspy=qe,t.Tab=ze,t.Toast=Ke,t.Tooltip=We}));
122 //# sourceMappingURL=child-theme.min.js.map 122 //# sourceMappingURL=child-theme.min.js.map
...\ No newline at end of file ...\ No newline at end of file
......
This diff could not be displayed because it is too large.
...@@ -44,7 +44,7 @@ jQuery(document).ready(function($) { ...@@ -44,7 +44,7 @@ jQuery(document).ready(function($) {
44 // combine inclusive filters 44 // combine inclusive filters
45 filterValue = inclusives.length ? inclusives.join('|') : ''; 45 filterValue = inclusives.length ? inclusives.join('|') : '';
46 console.log(filterValue); 46 console.log(filterValue);
47 $('#resources').DataTable().column(2).search(filterValue,true,false).draw(); 47 $('#resources').DataTable().column(1).search(filterValue,true,false).draw();
48 }); 48 });
49 49
50 // filter with selects and checkboxes 50 // filter with selects and checkboxes
......
...@@ -63,13 +63,19 @@ label[for="quicksearch"] { ...@@ -63,13 +63,19 @@ label[for="quicksearch"] {
63 .category-filter-group { 63 .category-filter-group {
64 display: flex; 64 display: flex;
65 flex-direction: row; 65 flex-direction: row;
66 width:80%;
66 @media only screen and (max-width: 1100px) { 67 @media only screen and (max-width: 1100px) {
67 flex-direction: column; 68 flex-direction: column;
69
68 } 70 }
69 } 71 }
72 .category{
73 flex-wrap: wrap;
74 }
70 .category-type, 75 .category-type,
71 .category-filter { 76 .category-filter {
72 display: flex; 77 display: flex;
78
73 flex-direction: row; 79 flex-direction: row;
74 @media only screen and (max-width: 1100px) { 80 @media only screen and (max-width: 1100px) {
75 flex-direction: column; 81 flex-direction: column;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 Author: the Understrap Contributors 5 Author: the Understrap Contributors
6 Author URI: https://github.com/understrap/understrap-child/graphs/contributors 6 Author URI: https://github.com/understrap/understrap-child/graphs/contributors
7 Template: understrap 7 Template: understrap
8 Version: 1.2.0008 8 Version: 1.2.0009
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
......