summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-02-09 11:51:55 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-02-09 11:51:55 +0100
commit34b3d8083239aa77fafe2a4f3ce1f908c4cfa270 (patch)
tree8f7017d8c12cf56a7d5b05fa20bb62e4fab75736
parentd9c870629ec46e046867436bf5083fa083af0cae (diff)
downloadChimère-34b3d8083239aa77fafe2a4f3ce1f908c4cfa270.tar.bz2
Chimère-34b3d8083239aa77fafe2a4f3ce1f908c4cfa270.zip
jquery.chimere.js: add an helper to check all subcat of a category
-rw-r--r--chimere/static/chimere/js/jquery.chimere.js12
1 files changed, 12 insertions, 0 deletions
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');
+ }
+ );
+ },
/*
*
*/