From 34b3d8083239aa77fafe2a4f3ce1f908c4cfa270 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 9 Feb 2017 11:51:55 +0100 Subject: jquery.chimere.js: add an helper to check all subcat of a category --- chimere/static/chimere/js/jquery.chimere.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 9e89920..e1c48a6 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -819,6 +819,18 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { } } }, + check_category: function (cat_id) { + /* + * Check all subcategory of a category + */ + $('#maincategory_' + cat_id + '.subcategories li input').each( + function(){ + $(this).click(); + $(this).parent().removeClass(); + $(this).parent().addClass('selected'); + } + ); + }, /* * */ -- cgit v1.2.3