- fix : last user query is ok when relog (no more 'ast' language...), but still includes facet filters.

- fix : advanced search, status-bit checkbox can be checked
This commit is contained in:
Jean-Yves Gaulier
2015-04-07 19:27:05 +02:00
parent 812a18987d
commit d9b1a54e55
3 changed files with 9 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ class Query implements ControllerProviderInterface
$app['manipulator.user']->logQuery($app['authentication']->getUser(), $result->getQuery()); $app['manipulator.user']->logQuery($app['authentication']->getUser(), $result->getQuery());
if ($app['settings']->getUserSetting($app['authentication']->getUser(), 'start_page') === 'LAST_QUERY') { if ($app['settings']->getUserSetting($app['authentication']->getUser(), 'start_page') === 'LAST_QUERY') {
$app['manipulator.user']->setUserSetting($app['authentication']->getUser(), 'start_page_query', $result->getQuery()); $app['manipulator.user']->setUserSetting($app['authentication']->getUser(), 'start_page_query', $query);
} }
foreach ($options->getDataboxes() as $databox) { foreach ($options->getDataboxes() as $databox) {

View File

@@ -428,7 +428,8 @@
<div class="status_filter"> <div class="status_filter">
<span>{{ 'Status des documents a rechercher' | trans }}</span> <span>{{ 'Status des documents a rechercher' | trans }}</span>
<table style="width: 100%;"> <table style="width: 100%;">
{% for databox_id, flag in search_status %} {% for status_key, flag in search_status %}
{% for databox_id in flag.sbas %}
<tr> <tr>
<td> <td>
<label class="checkbox inline"> <label class="checkbox inline">
@@ -454,6 +455,7 @@
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endfor %}
</table> </table>
</div> </div>
{% endif %} {% endif %}

View File

@@ -195,8 +195,8 @@ function checkFilters(save) {
$('select option:selected:not(".default-selection")', container).removeAttr('selected').selected(false); $('select option:selected:not(".default-selection")', container).removeAttr('selected').selected(false);
$('select option.field_switch', container).addClass("hidden"); $('select option.field_switch', container).addClass("hidden");
$('input.field_switch:checked', container).removeAttr('checked'); $('input.field_switch:checked', container).removeAttr('checked');
$('input.field_switch:checkbox', container).parent().hide();
filters.removeClass('danger'); filters.removeClass('danger');
@@ -209,7 +209,6 @@ function checkFilters(save) {
search.bases[sbas_id] = new Array(); search.bases[sbas_id] = new Array();
var bas_ckbox = $this.find('.checkbas'); var bas_ckbox = $this.find('.checkbas');
if (bas_ckbox.filter(':not(:checked)').length > 0) { if (bas_ckbox.filter(':not(:checked)').length > 0) {
danger = 'medium'; danger = 'medium';
} }
@@ -444,10 +443,12 @@ function initAnswerForm() {
var $this = $(this), var $this = $(this),
method = $this.attr('method') ? $this.attr('method') : 'POST'; method = $this.attr('method') ? $this.attr('method') : 'POST';
var data = $this.serializeArray();
answAjax = $.ajax({ answAjax = $.ajax({
type: method, type: method,
url: $this.attr('action'), url: $this.attr('action'),
data: $this.serialize(), data: data,
dataType: 'json', dataType: 'json',
beforeSend: function (formData) { beforeSend: function (formData) {
if (answAjaxrunning && answAjax.abort) if (answAjaxrunning && answAjax.abort)