Fix Multiselect ADV - Refs #10763

1.10.x
José Loguercio 9 years ago
parent 7364bbf9a0
commit c4f81fecd5
  1. 21
      main/inc/lib/javascript/pear/qfamsHandler.js

@ -524,27 +524,12 @@ $(function() {
var checked = !$('#'+ id).is(':checked'); var checked = !$('#'+ id).is(':checked');
if (!checked) { if (!checked) {
$('#' +selectId +' option').each(function() { $('#users-f option').prop('selected', true);
var val = $(this).val(); QFAMS.moveSelection('users', this.form.elements['users-f[]'], this.form.elements['users-t[]'], this.form.elements['users[]'], 'add', 'none');
var text = $(this).text();
if (val.substr(0 , 4) == 'USER') {
$('#'+selectId).find('[value="'+val+'"]').remove();
$('#' +selectDestinationId).append(new Option(text, val));
}
});
} }
$('#' + selectDestinationId +' option').each(function() { $('#' + selectDestinationId +' option').each(function() {
var val = $(this).val(); QFAMS.moveSelection('users', this.form.elements['users-f[]'], this.form.elements['users-t[]'], this.form.elements['users[]'], 'remove', 'none');
var text = $(this).text();
if (val.substr(0 , 4) == 'USER') {
if (checked) {
// Add
$('#' +selectId ).append(new Option(text, val));
$('#' + selectDestinationId).find('[value="'+val+'"]').remove();
}
}
}); });
}); });
}); });

Loading…
Cancel
Save