Traitement des selectMultiple
This commit is contained in:
parent
be87fb8352
commit
5196da2329
@ -52,11 +52,15 @@ $(document).ready(function()
|
||||
|
||||
|
||||
$('#tabs').delegate('a.selectMultiple', 'click', function(e){
|
||||
|
||||
e.stopPropagation();
|
||||
var obj = $(this).parent().find('select.criteres');
|
||||
set(obj.attr('name'), obj.val());
|
||||
});
|
||||
|
||||
$('#tabs').delegate('a.selectMultipleEx', 'click', function(e){
|
||||
|
||||
e.stopPropagation();
|
||||
var obj = $(this).parent().find('select.criteres');
|
||||
set(obj.attr('name'), obj.val(), 1);
|
||||
});
|
||||
|
||||
$('#tabs').delegate('a.autocomplet', 'click', function(e){
|
||||
@ -145,13 +149,15 @@ $(document).ready(function()
|
||||
|
||||
});
|
||||
|
||||
function set(key, value)
|
||||
function set(key, value, ex)
|
||||
{
|
||||
ex = typeof ex !== 'undefined' ? ex : 0;
|
||||
|
||||
$('#comptage').css('display', 'none');
|
||||
$('#attente').css('display', 'block');
|
||||
$('#panel').html('<img src="/themes/default/images/ajax.gif" />');
|
||||
|
||||
$.post('/comptage/index', { cle:key, valeur:value }, function(data, status) {
|
||||
$.post('/comptage/index', { cle:key, valeur:value, exlcude:ex }, function(data, status) {
|
||||
var html = 'Nombre sélectionnées : <span class="valeur">' +
|
||||
data.count + '</span> (dont <span class="valeur">' +
|
||||
data.insee +'</span> unité(s) insee)';
|
||||
|
Loading…
Reference in New Issue
Block a user