mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 02:13:15 +00:00
PHRAS-2327_report_refacto_41 base collections fix
This commit is contained in:
@@ -52,20 +52,31 @@ $(document).ready(function () {
|
|||||||
$list.hide();
|
$list.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".form2 .select-options li").click(function(e) {
|
|
||||||
e.stopPropagation();
|
|
||||||
var value = $(this).attr('rel'),
|
|
||||||
form = $(this).closest('form');
|
|
||||||
$(".form2 .collist", form).hide();
|
|
||||||
$(".form2 .collist-" + value, form).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).click(function() {
|
$(document).click(function() {
|
||||||
$styledSelect.removeClass('active');
|
$styledSelect.removeClass('active');
|
||||||
$list.hide();
|
$list.hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".form2 .select-options li").click(function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
var $this = $(this),
|
||||||
|
value = $this.attr('rel'),
|
||||||
|
form = $this.closest('form');
|
||||||
|
$(".form2 .collist", form).hide();
|
||||||
|
$(".form2 .collist-" + value, form).show();
|
||||||
|
|
||||||
|
$(".form2 .collist", form).each(function(i, list) {
|
||||||
|
if ($(list).is(':visible') === true) {
|
||||||
|
$(list).find('input').prop('checked', true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(list).find('input').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$('.form2 .collist').each(function() {
|
$('.form2 .collist').each(function() {
|
||||||
var $this = $(this),
|
var $this = $(this),
|
||||||
form = $this.closest('form'),
|
form = $this.closest('form'),
|
||||||
@@ -73,6 +84,13 @@ $(document).ready(function () {
|
|||||||
;
|
;
|
||||||
$this.hide();
|
$this.hide();
|
||||||
$(".collist-" + i, form).show();
|
$(".collist-" + i, form).show();
|
||||||
|
|
||||||
|
if ($this.hasClass('collist-1')) {
|
||||||
|
$this.find('input').prop('checked', true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this.find('input').prop('checked', false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.form2').each(function() {
|
$('.form2').each(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user