diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-04-17 00:18:12 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-04-17 00:18:12 +0200 |
| commit | 28598acd1cded15041594710bdef0191415e8ced (patch) | |
| tree | 2ca942919bf827e319a7c4b5e44895909a6817e9 | |
| parent | b633752d5dcf26a94048d267f98738bf5dbcdbda (diff) | |
| download | Chimère-28598acd1cded15041594710bdef0191415e8ced.tar.bz2 Chimère-28598acd1cded15041594710bdef0191415e8ced.zip | |
Fix permalinks
| -rw-r--r-- | chimere/static/chimere/js/jquery.chimere.js | 5 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/map_params.html | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index d831b31..4c35fdf 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -255,7 +255,6 @@ See the file COPYING for details. var val = category_element.is(":checked") ? true : false; category_element.parent().find("li input").attr("checked", val); } - var _toggle_categories = function (category_element) {} var _toggle_categories = function (subcategory_element) { var parent = subcategory_element.parent().parent().parent(); var master_check = parent.find("> input"); @@ -265,6 +264,7 @@ See the file COPYING for details. } else { master_check.removeAttr('checked'); } + return master_check; }; var _init_categories = function () { /* @@ -291,6 +291,9 @@ See the file COPYING for details. if (settings.checked_categories.indexOf(parseInt(cat_id)) != -1) { $(this).attr("checked", "checked"); _toggle_categories($(this)); + methods.toggle_category(); + } else { + $(this).attr("checked", false); } }); if (settings.display_submited == true){ diff --git a/chimere/templates/chimere/blocks/map_params.html b/chimere/templates/chimere/blocks/map_params.html index d983a62..448e206 100644 --- a/chimere/templates/chimere/blocks/map_params.html +++ b/chimere/templates/chimere/blocks/map_params.html @@ -14,7 +14,7 @@ {{icon_offset_y}}); chimere_init_options["dynamic_categories"] = {{ dynamic_categories }}; {% if p_display_submited %}chimere_init_options["display_submited"] = {{ p_display_submited }};{% endif %} - chimere_init_options["checked_categories"] = {% if p_checked_categories %}{{p_checked_categories}}{% else %} {{ CHIMERE_DEFAULT_CATEGORIES }}{% endif %}; + chimere_init_options["checked_categories"] = {% if p_checked_categories %}[{{p_checked_categories}}]{% else %} {{ CHIMERE_DEFAULT_CATEGORIES }}{% endif %}; var p_current_feature{% if p_current_feature %} = {{ p_current_feature }}{% endif %}; </script> |
