mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 02:13:15 +00:00
PHRAS-524
task subdef - fix filter on document type - add filter on multiple databoxes
This commit is contained in:
@@ -4,15 +4,11 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label"> {{ 'Databox' | trans }}</label>
|
||||
<div class="controls">
|
||||
<select name="sbas">
|
||||
<option value="">{{ 'All' | trans }}</option>
|
||||
{% for databox in app['phraseanet.appbox'].get_databoxes() %}
|
||||
<option value="{{ databox.get_sbas_id() }}">
|
||||
{{ databox.get_viewname() }}
|
||||
({{ databox.get_sbas_id() }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% for databox in app['phraseanet.appbox'].get_databoxes() %}
|
||||
<label class="checkbox inline">
|
||||
<input type="checkbox" name="sbas[]" value="{{ databox.get_sbas_id() }}"> {{ databox.get_viewname() }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
@@ -87,29 +83,31 @@
|
||||
xml = $.parseXML(xml);
|
||||
xml = $(xml);
|
||||
|
||||
with(document.forms['graphicForm'])
|
||||
var gform = document.forms['graphicForm'];
|
||||
|
||||
gform.embedded.checked = !!parseInt(xml.find("embedded").text());
|
||||
gform.type_image.checked = !!parseInt(xml.find("type_image").text());
|
||||
gform.type_video.checked = !!parseInt(xml.find("type_video").text());
|
||||
gform.type_audio.checked = !!parseInt(xml.find("type_audio").text());
|
||||
gform.type_document.checked = !!parseInt(xml.find("type_document").text());
|
||||
gform.type_flash.checked = !!parseInt(xml.find("type_flash").text());
|
||||
gform.type_unknown.checked = !!parseInt(xml.find("type_unknown").text());
|
||||
gform.flush.value = minmax(parseInt(xml.find("flush").text()), 1, 100);
|
||||
gform.maxrecs.value = minmax(parseInt(xml.find("maxrecs").text()), 10, 100);
|
||||
gform.maxmegs.value = minmax(parseInt(xml.find("maxmegs").text()), 64, 512);
|
||||
for(i=0; i < gform['sbas[]'].length; i++)
|
||||
{
|
||||
embedded.checked = !!parseInt(xml.find("embedded").text());
|
||||
type_image.checked = !!parseInt(xml.find("type_image").text());
|
||||
type_video.checked = !!parseInt(xml.find("type_video").text());
|
||||
type_audio.checked = !!parseInt(xml.find("type_audio").text());
|
||||
type_document.checked = !!parseInt(xml.find("type_document").text());
|
||||
type_flash.checked = !!parseInt(xml.find("type_flash").text());
|
||||
type_unknown.checked = !!parseInt(xml.find("type_unknown").text());
|
||||
flush.value = minmax(parseInt(xml.find("flush").text()), 1, 100);
|
||||
maxrecs.value = minmax(parseInt(xml.find("maxrecs").text()), 10, 100);
|
||||
maxmegs.value = minmax(parseInt(xml.find("maxmegs").text()), 64, 512);
|
||||
for(i in sbas.options)
|
||||
var sbid = gform['sbas[]'][i].value;
|
||||
|
||||
if(xml.find("sbas").filter(function(){return $(this).text()==sbid}).length > 0)
|
||||
{
|
||||
if(sbas.options[i].value == parseInt(xml.find("sbas").text()) )
|
||||
{
|
||||
sbas.options[i].selected = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sbas.options[i].selected = false;
|
||||
}
|
||||
gform['sbas[]'][i].checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
gform['sbas[]'][i].checked = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user