Advanced search improvements (restore 2018-04-10 revisions : r5635..r5641)

* Add 'search_manual_submit' config parameter to manage auto-submit
* bugfixes
** date i18n is now handled (using two new options `datepicker.dateFormat` and `datepicker.timeFormat` computed from `AttributeDateTime::GetFormat()->ToDatePicker()`
** handling of `empty` `not empty` operator titles
*** it led to tohers bugfixes and a redesign of the `_computeTitle` (from overwriting to extension using ie `_computeBetweenDaysOperatorTitle`
*** some bug still remain, because autocomplete needs to been finished before checking on them
* Promote 'friendlyname' in the 'most popular' list
* bugfixes
** filters (criterions, enum and FK without autocomplete) now ignore accent on matching with user input
** this is done by using a pre-existing tool used only by the portal, so it was moved to the core (latinize.min.js)
* Integration with manual submit parameter on client side.
* bugfixes : history/breadcrumb had several c[menu] appended (one for each refresh)
* Fix various sanity bugs

SVN:trunk[5632]
This commit is contained in:
Pierre Goiffon
2018-04-12 08:54:05 +00:00
parent 757130847f
commit efa7a4ee55
20 changed files with 259 additions and 253 deletions

View File

@@ -197,6 +197,8 @@ class CriterionToSearchForm extends CriterionConversionAbstract
if (($a['widget'] === AttributeDefinition::SEARCH_WIDGET_TYPE_RAW) &&
($b['widget'] === AttributeDefinition::SEARCH_WIDGET_TYPE_RAW))
{
if (!isset($a['label'])) return -1;
if (!isset($b['label'])) return 1;
return strcmp($a['label'], $b['label']);
}
if ($a['widget'] === AttributeDefinition::SEARCH_WIDGET_TYPE_RAW)
@@ -207,6 +209,8 @@ class CriterionToSearchForm extends CriterionConversionAbstract
return 1;
}
if (!isset($a['label'])) return -1;
if (!isset($b['label'])) return 1;
return strcmp($a['label'], $b['label']);
});
@@ -564,7 +568,7 @@ class CriterionToSearchForm extends CriterionConversionAbstract
$aCriteria['values'] = array();
}
// Convention for 'undefined' enums
$aCriteria['values'][] = array('value' => 'null', 'label' => 'null');
$aCriteria['values'][] = array('value' => 'null', 'label' => Dict::S('Enum:Undefined'));
}
break;
default: