2d55b40c by Jeff Balicki

ssss

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 2eec86df
......@@ -14900,6 +14900,7 @@ label[for=quicksearch] {
.category-filter-group {
display: flex;
flex-direction: row;
width: 80%;
}
@media only screen and (max-width: 1100px) {
.category-filter-group {
......@@ -14907,6 +14908,10 @@ label[for=quicksearch] {
}
}
.category {
flex-wrap: wrap;
}
.category-type,
.category-filter {
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){
<div class="filter-group">
<div class="category-filter-group ">
<div class="category">
<?php $terms = get_terms( array( 'taxonomy' => 'resource_category' ,'parent' => $atts['tax']) );
<?php $terms = get_terms( array( 'taxonomy' => 'mlo-category' ,'parent' => $atts['tax']) );
foreach($terms as $term){ ?>
<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>
<?php }; ?>
......@@ -53,7 +53,7 @@ function resources_list($atts){
<thead><tr><th class="hidden"></th><th></th><th class="hidden"></th><th></th></tr></thead>
<tbody>
<?php while ($custom_query->have_posts()): $custom_query->the_post();
echo resources(get_the_ID());
echo resources(get_the_ID(), $atts['tax']);
endwhile; ?>
</tbody>
</table>
......@@ -100,18 +100,18 @@ function resources_fav(){
function resources($id){
function resources($id, $tax){
ob_start();
$post = get_post($id);
$text = str_replace(']]>', ']]&gt;', apply_filters( 'the_content', strip_shortcodes($post->post_content)));
$excerpt_length = apply_filters( 'excerpt_length', 20 );
$text = wp_trim_words( $text, $excerpt_length, ' ...' );
$categories = get_the_terms( $id, 'resource_category' );
$categories = get_the_terms( $id, 'mlo-category' );
$cat ="";
if(is_array( $categories)){
foreach( $categories as $category ) {
if($category->parent == 27){
if($category->parent == $tax){
$cat .= " ".$category->slug;
}
};
......
......@@ -20071,7 +20071,7 @@
// combine inclusive filters
filterValue = inclusives.length ? inclusives.join('|') : '';
console.log(filterValue);
$('#resources').DataTable().column(2).search(filterValue, true, false).draw();
$('#resources').DataTable().column(1).search(filterValue, true, false).draw();
});
// 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
/*! DataTables Bootstrap 5 integration
* 2020 SpryMedia Ltd - datatables.net/license
*/
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}));
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}));
//# sourceMappingURL=child-theme.min.js.map
\ 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($) {
// combine inclusive filters
filterValue = inclusives.length ? inclusives.join('|') : '';
console.log(filterValue);
$('#resources').DataTable().column(2).search(filterValue,true,false).draw();
$('#resources').DataTable().column(1).search(filterValue,true,false).draw();
});
// filter with selects and checkboxes
......
......@@ -63,13 +63,19 @@ label[for="quicksearch"] {
.category-filter-group {
display: flex;
flex-direction: row;
width:80%;
@media only screen and (max-width: 1100px) {
flex-direction: column;
}
}
.category{
flex-wrap: wrap;
}
.category-type,
.category-filter {
display: flex;
flex-direction: row;
@media only screen and (max-width: 1100px) {
flex-direction: column;
......
......@@ -5,7 +5,7 @@
Author: the Understrap Contributors
Author URI: https://github.com/understrap/understrap-child/graphs/contributors
Template: understrap
Version: 1.2.0008
Version: 1.2.0009
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
......