Commit c4f3df4d authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Der Lang Parameter wird nun übernommen, wie er sollte.

Autocomplete Parameter hinzugefügt
parent 8c511142
...@@ -28,7 +28,7 @@ class StartpageController extends Controller ...@@ -28,7 +28,7 @@ class StartpageController extends Controller
$focusPages = []; $focusPages = [];
$theme = "default"; $theme = "default";
foreach ($request->all() as $key => $value) { foreach ($request->all() as $key => $value) {
if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab' && $key !== 'param_maps') { if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab' && $key !== 'param_maps' && $key !== 'param_autocomplete') {
$focusPages[] = str_replace('param_', '', $key); $focusPages[] = str_replace('param_', '', $key);
} }
if ($key === 'param_theme') { if ($key === 'param_theme') {
...@@ -54,7 +54,8 @@ class StartpageController extends Controller ...@@ -54,7 +54,8 @@ class StartpageController extends Controller
->with('browser', $browser) ->with('browser', $browser)
->with('navbarFocus', 'suche') ->with('navbarFocus', 'suche')
->with('theme', $theme) ->with('theme', $theme)
->with('maps', $maps); ->with('maps', $maps)
->with('autocomplete', $request->input('param_autocomplete', 'on'));
} }
public function loadPage($subpage) public function loadPage($subpage)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"css/themes/default.css": "css/themes/default-39c89a0e8d.css", "css/themes/default.css": "css/themes/default-39c89a0e8d.css",
"js/all.js": "js/all-33a9cda328.js", "js/all.js": "js/all-94969523ba.js",
"js/quicktips.js": "js/quicktips-4563c0221a.js" "js/quicktips.js": "js/quicktips-4563c0221a.js"
} }
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -46,12 +46,25 @@ function setSettings() { ...@@ -46,12 +46,25 @@ function setSettings() {
for (var i = 0; i < localStorage.length; i++) { for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i); var key = localStorage.key(i);
var value = localStorage.getItem(key); var value = localStorage.getItem(key);
if (key.startsWith("param_") && !key.endsWith("lang")) { if (key.startsWith("param_") && !key.endsWith("lang") && !key.endsWith('autocomplete')) {
key = key.substring(key.indexOf("param_") + 6); key = key.substring(key.indexOf("param_") + 6);
$("#searchForm").append("<input type=\"hidden\" name=\"" + key + "\" value=\"" + value + "\">"); $("#searchForm").append("<input type=\"hidden\" name=\"" + key + "\" value=\"" + value + "\">");
} }
$("#foki input[type=radio]#angepasst").attr("checked", true); $("#foki input[type=radio]#angepasst").attr("checked", true);
} }
if( localStorage.getItem("param_lang") !== null ) {
var value = localStorage.getItem("param_lang");
// Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value);
}
if( localStorage.getItem("param_autocomplete") !== null ) {
var value = localStorage.getItem("param_autocomplete");
// Change the value of the lang input field to the given parameter
$("input[name=eingabe]").attr("autocomplete", value);
}
if ($("fieldset#foki.mobile").length) { if ($("fieldset#foki.mobile").length) {
$("fieldset.mobile input#bilder").val("angepasst"); $("fieldset.mobile input#bilder").val("angepasst");
$("fieldset.mobile input#bilder").prop("checked", true); $("fieldset.mobile input#bilder").prop("checked", true);
...@@ -60,7 +73,6 @@ function setSettings() { ...@@ -60,7 +73,6 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label").attr("for", "angepasst"); $("fieldset.mobile label#anpassen-label").attr("for", "angepasst");
$("fieldset.mobile label#anpassen-label span.glyphicon").attr("class", "glyphicon glyphicon-cog"); $("fieldset.mobile label#anpassen-label span.glyphicon").attr("class", "glyphicon glyphicon-cog");
$("fieldset.mobile label#anpassen-label span.content").html("angepasst"); $("fieldset.mobile label#anpassen-label span.content").html("angepasst");
console.log("test");
} }
} }
//Polyfill for form attribute //Polyfill for form attribute
......
...@@ -34,6 +34,10 @@ return [ ...@@ -34,6 +34,10 @@ return [
'request' => 'Abfragemethode', 'request' => 'Abfragemethode',
'autocomplete' => 'Auto-Vervollständigung (Sucheingabe)',
'autocomplete.on' => 'ein',
'autocomplete.off' => 'aus',
"foki.web" => "Web", "foki.web" => "Web",
"foki.andere" => "Andere", "foki.andere" => "Andere",
"foki.produktsuche" => "Produktsuche", "foki.produktsuche" => "Produktsuche",
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
</span> </span>
</button> </button>
</div> </div>
<input type="text" name="eingabe" required="" autofocus="" class="form-control" placeholder="{{ trans('index.placeholder') }}"> <input type="text" name="eingabe" required="" autofocus="" autocomplete="{{$autocomplete}}" class="form-control" placeholder="{{ trans('index.placeholder') }}">
<input type="hidden" name="encoding" value="utf8"> <input type="hidden" name="encoding" value="utf8">
@if ($focus === 'angepasst') <input type="hidden" name="lang" value={{ $lang }} > @if ($focus === 'angepasst') <input type="hidden" name="lang" value={{ $lang }} >
<input type="hidden" name="resultCount" value={{ $resultCount }} > <input type="hidden" name="resultCount" value={{ $resultCount }} >
......
...@@ -47,6 +47,13 @@ ...@@ -47,6 +47,13 @@
<option value="POST">POST</option> <option value="POST">POST</option>
</select> </select>
</div> </div>
<div class="col-sm-6 col-md-4 col-lg-3">
<label class="select-label">@lang('settings.autocomplete'):</label>
<select class="form-control settings-form-control" name="param_autocomplete">
<option value="on" selected>@lang('settings.autocomplete.on')</option>
<option value="off">@lang('settings.autocomplete.off')</option>
</select>
</div>
</div> </div>
</container> </container>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment