From 4ad7d53137234ec70de55ee7fb4f60105def49a0 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 11 Apr 2017 14:22:57 -0400 Subject: [PATCH] adding test ajax code for the search filtering, currently commented out --- glm-member-db/views/front/members/list.html | 40 +++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/glm-member-db/views/front/members/list.html b/glm-member-db/views/front/members/list.html index 22ebc5c..bc24e44 100644 --- a/glm-member-db/views/front/members/list.html +++ b/glm-member-db/views/front/members/list.html @@ -360,8 +360,44 @@ $(this).css("display", "block"); }); - - +// var cat_ids = []; +// $.fn.manufacturer_brand = function(){ +// +// $(this).on("change", function(){ +// var _ = $(this); +// +// var cat_names = []; +// var cat_id = _.val(); +// var el_id = _.attr('id'); +// var cats = _.prev().find('span'); +// +// cat_ids.push(cat_id); +// +// cats.each(function(){ +// cat_names.push(_.text()); +// }); +// +// var data = { +// action: 'glm_members_admin_ajax', +// glm_action: 'filterSearch', +// cat_ids: cat_ids, +// el_id: el_id, +// cat_names: cat_names, +// }; +// $.ajax({ +// type: 'POST', +// url: '{$ajaxUrl}', +// data: data, +// success: function(response){ +// console.log(response); +// } +// }); +// +// }); +// } +// $('#rvManufacturers').manufacturer_brand(); +// $('#brands').manufacturer_brand(); + jQuery('select[multiple]').asmSelect(); // Show search filters box -- 2.17.1