summaryrefslogtreecommitdiff
path: root/chimere/static
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-09-27 16:26:28 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-09-27 16:26:28 +0200
commita324a90b4c8718e8f6133e2ad11c5b78724138d6 (patch)
tree85bafeec080d98aef262000fdafa3ae6fb88ea2f /chimere/static
parent13f37c70772f9dd6035d5656fa7a862c107aa217 (diff)
downloadChimère-a324a90b4c8718e8f6133e2ad11c5b78724138d6.tar.bz2
Chimère-a324a90b4c8718e8f6133e2ad11c5b78724138d6.zip
Single click mode for desktop view
Diffstat (limited to 'chimere/static')
-rw-r--r--chimere/static/chimere/js/jquery.chimere.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js
index cb030e7..9075c94 100644
--- a/chimere/static/chimere/js/jquery.chimere.js
+++ b/chimere/static/chimere/js/jquery.chimere.js
@@ -1836,6 +1836,7 @@ function transformCoordToLonLat(coord) {
$('.subcategories li input').bind("click", function (e) {
$('#search-result').html('');
var c_name = $(this).attr('name');
+ var c_id = $(this).attr('id');
c_name = c_name.substr(c_name.lastIndexOf("_") + 1);
var par = $(this).parent();
if ($(this).prop('checked')){
@@ -1843,6 +1844,14 @@ function transformCoordToLonLat(coord) {
} else {
par.removeClass('selected');
}
+ if (settings[map_id].single_click_category){
+ $('.subcategories li input').each(function(){
+ if ($(this).attr('id') != c_id){
+ $(this).prop('checked', false);
+ $(this).parent().removeClass('selected');
+ }
+ });
+ }
if (!settings[map_id].suspend_load) methods.loadGeoObjects(map_id);
_toggle_categories($(this));
if ($('#layer_cat_'+c_name).length){