diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-02-20 16:55:14 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-02-20 16:55:14 +0100 |
commit | 1694490cba0b90fb33578671f44777c045ce64c2 (patch) | |
tree | 8717004f1607ec3f1ca80e4ebca5581140bc2ced | |
parent | bca4ba93915de4c3afea08c390b1beadd642e707 (diff) | |
download | Chimère-1694490cba0b90fb33578671f44777c045ce64c2.tar.bz2 Chimère-1694490cba0b90fb33578671f44777c045ce64c2.zip |
JS: add check_categories helper
-rw-r--r-- | chimere/static/chimere/js/jquery.chimere.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 9d4489e..9ec3e48 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -847,6 +847,23 @@ function category_loaded_callback(cat_numbers){ settings.suspend_load = false; methods.loadGeoObjects(); }, + check_categories: function (cat_ids) { + /* + * Check subcategory list + */ + settings.suspend_load = true; + for (idx in cat_ids){ + $('#category_' + cat_ids[idx]).each( + function(){ + $(this).click(); + $(this).parent().removeClass(); + $(this).parent().addClass('selected'); + } + ); + } + settings.suspend_load = false; + methods.loadGeoObjects(); + }, /* * */ |