mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-26 03:13:12 +00:00
Merge pull request #2855 from filipx/PHRAS-2327_report_refacto_41
PHRAS-2327_report_refacto_41 base collections fix
This commit is contained in:
@@ -52,19 +52,30 @@ $(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),
|
||||||
@@ -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() {
|
||||||
|
|||||||
@@ -61,30 +61,30 @@
|
|||||||
<div class="form3 form_content">
|
<div class="form3 form_content">
|
||||||
<div class="form_titre">{{ "report:: 4 - Fields" | trans }}</div>
|
<div class="form_titre">{{ "report:: 4 - Fields" | trans }}</div>
|
||||||
|
|
||||||
<div class="collist">
|
{% for sbas_id,databox in granted_bases %}
|
||||||
|
<div class="collist collist-{{ sbas_id }}">
|
||||||
<div class="collist_buttons">
|
<div class="collist_buttons">
|
||||||
<button class="select-all btn btn-mini" data-target_selector="#chkfld-records input:checkbox">
|
<button class="select-all btn btn-mini" data-target_selector="#chkfld-records-{{ sbas_id }} input:checkbox">
|
||||||
{% trans %}Select all{% endtrans %}
|
{% trans %}Select all{% endtrans %}
|
||||||
</button>
|
</button>
|
||||||
<button class="unselect-all btn btn-mini" data-target_selector="#chkfld-records input:checkbox">
|
<button class="unselect-all btn btn-mini" data-target_selector="#chkfld-records-{{ sbas_id }} input:checkbox">
|
||||||
{% trans %}Deselect all{% endtrans %}
|
{% trans %}Deselect all{% endtrans %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul id="chkfld-records" style="max-height: 150px; overflow-y: auto; overflow-x: hidden;">
|
<ul id="chkfld-records-{{ sbas_id }}" style="max-height: 150px; overflow-y: auto; overflow-x: hidden;">
|
||||||
{% for sbas_id,databox in granted_bases %}
|
{% for meta in databox.metas %}
|
||||||
{% for meta in databox.metas %}
|
<li>
|
||||||
<li>
|
<label class="checkbox custom_checkbox_label">
|
||||||
<label class="checkbox custom_checkbox_label">
|
<input name="meta[]" checked="checked" type="checkbox" value="{{ meta }}">
|
||||||
<input name="meta[]" checked="checked" type="checkbox" value="{{ meta }}">
|
<span class="custom_checkbox"></span>
|
||||||
<span class="custom_checkbox"></span>
|
{{ meta }}
|
||||||
{{ meta }}
|
</label>
|
||||||
</label>
|
</li>
|
||||||
</li>
|
{% endfor %}
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock form_records %}
|
{% endblock form_records %}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user