N°1658 Fix hard-coded translation in search page when the form has not been automatically submitted.

This commit is contained in:
Molkobain
2018-10-03 17:43:06 +02:00
parent 11308dc76a
commit 396fc2cdcd
4 changed files with 4 additions and 3 deletions

View File

@@ -1177,6 +1177,7 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm
// Search form
'UI:Search:Toggle' => 'Ein-/Ausklappen',
'UI:Search:AutoSubmit:DisabledHint' => 'Automatische Eingabe für diese Klasse deaktiviert',
'UI:Search:NoAutoSubmit:ExplainText' => 'Add some criterion on the search box or click the search button to view the objects.~~',
'UI:Search:Criterion:MoreMenu:AddCriteria' => 'Kriterium hinzufügen',
// - Add new criteria button
'UI:Search:AddCriteria:List:RecentlyUsed:Title' => 'Kürzlich verwendet',

View File

@@ -1409,6 +1409,7 @@ When associated with a trigger, each action is given an "order" number, specifyi
// Search form
'UI:Search:Toggle' => 'Minimize / Expand',
'UI:Search:AutoSubmit:DisabledHint' => 'Auto submit has been disabled for this class',
'UI:Search:NoAutoSubmit:ExplainText' => 'Add some criterion on the search box or click the search button to view the objects.',
'UI:Search:Criterion:MoreMenu:AddCriteria' => 'Add new criteria',
// - Add new criteria button
'UI:Search:AddCriteria:List:RecentlyUsed:Title' => 'Recently used',

View File

@@ -1242,6 +1242,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
// Search form
'UI:Search:Toggle' => 'Réduire / Ouvrir',
'UI:Search:AutoSubmit:DisabledHint' => 'La soumission automatique a été desactivée pour cette classe',
'UI:Search:NoAutoSubmit:ExplainText' => 'Ajoutez des critères dans le formulaire de recherche ou cliquez sur le bouton rechercher pour voir les objets.',
'UI:Search:Criterion:MoreMenu:AddCriteria' => 'Ajouter un critère',
// - Add new criteria button
'UI:Search:AddCriteria:List:RecentlyUsed:Title' => 'Récents',

View File

@@ -745,9 +745,7 @@ $(function()
// Make placeholder if nothing yet
if(oResultAreaElem.html() === '')
{
// TODO: Make a good UI for this POC.
// TODO: Translate sentence.
oResultAreaElem.html('<div class="sf_results_placeholder"><p>Add some criterion on the search box or click the search button to view the objects.</p><p><button type="button">Search<span class="fa fa-search"></span></button></p></div>');
oResultAreaElem.html('<div class="sf_results_placeholder"><p>' + Dict.S('UI:Search:NoAutoSubmit:ExplainText') + '</p><p><button type="button">' + Dict.S('UI:Button:Search') + '<span class="fa fa-search"></span></button></p></div>');
oResultAreaElem.find('button').on('click', function(){
// TODO: Bug: Open "Search for CI", change child classe in the dropdown, click the search button. It submit the search for the original child classe, not the current one; whereas a click on the upper right pictogram does. This might be due to the form reloading.
me._onSubmitClick();