Never reset date sort settings, remove date field choser

This commit is contained in:
Romain Neutron
2013-09-17 14:12:36 +02:00
parent 391d84ca56
commit 0047d0fc36
4 changed files with 2 additions and 12 deletions

View File

@@ -44,7 +44,6 @@ class ConfigurationPanel extends AbstractConfigurationPanel
$params = array(
'configuration' => $configuration,
'date_fields' => $this->getAvailableDateFields($app['phraseanet.appbox']->get_databoxes()),
'available_sort'=> $this->searchEngine->getAvailableSort(),
);

View File

@@ -3,15 +3,6 @@
</div>
<form method="post" action="{{ path('admin_searchengine_post') }}">
<fieldset>
<legend>{% trans 'Date fields available for search' %}</legend>
{% for field in date_fields %}
<label class="checkbox">
<input type="checkbox" name="date_fields[]" value="{{ field }}" {% if field in configuration['date_fields'] %}checked="checked"{% endif %} >
{{ field }}
</label>
{% endfor %}
</fieldset>
<fieldset>
<legend>{% trans 'Default sort' %}</legend>
<select name="default_sort">

View File

@@ -335,7 +335,7 @@
<span>{% trans 'Trier par ' %}</span>
<select name="sort" class="input-small">
{% for sort, sort_name in app['phraseanet.SE'].getAvailableSort() %}
<option value="{{ sort }}" {% if sort == app['phraseanet.SE'].getDefaultSort() %}selected="selected"{% endif %}>{{ sort_name }}</option>
<option value="{{ sort }}" {% if sort == app['phraseanet.SE'].getDefaultSort() %}selected="selected" class="default-selection"{% endif %}>{{ sort_name }}</option>
{% endfor %}
</select>
<select name="ord" class="input-medium">

View File

@@ -197,7 +197,7 @@ function checkFilters(save)
switches.filter('option:selected, input:checked').addClass('was');
$('#sbasfiltercont select option:selected').removeAttr('selected').selected(false);
$('#sbasfiltercont select option:selected:not(".default-selection")').removeAttr('selected').selected(false);
$('#sbasfiltercont select option.field_switch').hide();