Commit 68fefaff authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge für die Änderungen in den Einstellungen rückgängig gemacht.

Diese Änderungen haben noch nicht 100%ig funktioniert. Deshalb Nehme ich diese vorerst zurück, bis Karl die Fehler korrigiert hat.
parent 35e750dd
...@@ -15,6 +15,13 @@ class StartpageController extends Controller ...@@ -15,6 +15,13 @@ class StartpageController extends Controller
* @param int $id * @param int $id
* @return Response * @return Response
*/ */
/* public function loadStartPage($locale = "de")
{
\App::setLocale($locale);
return view('index', [
'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
'homeIcon']);
} */
public function loadStartPage(Request $request) public function loadStartPage(Request $request)
{ {
......
...@@ -35,7 +35,6 @@ class MetaGer ...@@ -35,7 +35,6 @@ class MetaGer
protected $addedHosts = []; protected $addedHosts = [];
protected $startCount = 0; protected $startCount = 0;
protected $canCache = false; protected $canCache = false;
protected $canCustomSearch = false;
# Daten über die Abfrage # Daten über die Abfrage
protected $ip; protected $ip;
protected $language; protected $language;
...@@ -905,7 +904,6 @@ class MetaGer ...@@ -905,7 +904,6 @@ class MetaGer
} else { } else {
$this->sprueche = false; $this->sprueche = false;
} }
# Maps
$this->maps = $request->input('maps', 'off'); $this->maps = $request->input('maps', 'off');
if ($this->maps === "on") { if ($this->maps === "on") {
$this->maps = true; $this->maps = true;
...@@ -918,13 +916,6 @@ class MetaGer ...@@ -918,13 +916,6 @@ class MetaGer
} else { } else {
$this->newtab = "_self"; $this->newtab = "_self";
} }
# Custom Search
$this->canCustomSearch = $request->input('canCustomSearch', 'false');
if ($this->canCustomSearch === "true") {
$this->canCustomSearch = true;
} else {
$this->canCustomSearch = false;
}
# Theme # Theme
$this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'default')); $this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'default'));
# Ergebnisse pro Seite: # Ergebnisse pro Seite:
...@@ -1239,7 +1230,7 @@ class MetaGer ...@@ -1239,7 +1230,7 @@ class MetaGer
} }
} }
# Generators # Generators
public function generateSearchLink($fokus, $results = true) public function generateSearchLink($fokus, $results = true)
{ {
...@@ -1300,11 +1291,6 @@ class MetaGer ...@@ -1300,11 +1291,6 @@ class MetaGer
# Komplexe Getter # Komplexe Getter
public function canCustomSearch()
{
return $this->canCustomSearch;
}
public function getHostCount($host) public function getHostCount($host)
{ {
$hash = md5($host); $hash = md5($host);
......
...@@ -6890,7 +6890,7 @@ Mixed ...@@ -6890,7 +6890,7 @@ Mixed
} }
#foki input + label:hover { #foki input + label:hover {
cursor: pointer; cursor: pointer;
background-color: #e3e3e3; background-color: #f6f6f6;
} }
#color-chooser a { #color-chooser a {
display: block; display: block;
......
This diff is collapsed.
...@@ -3909,6 +3909,7 @@ function productWidget() { ...@@ -3909,6 +3909,7 @@ function productWidget() {
$(".lightSliderContainer").removeClass("hidden"); $(".lightSliderContainer").removeClass("hidden");
} }
$(document).ready(function() { $(document).ready(function() {
// checkPlugin();
if (location.href.indexOf("#plugin-modal") > -1) { if (location.href.indexOf("#plugin-modal") > -1) {
$("#plugin-modal").modal("show"); $("#plugin-modal").modal("show");
} }
...@@ -3946,19 +3947,12 @@ $(document).ready(function() { ...@@ -3946,19 +3947,12 @@ $(document).ready(function() {
window.location = "./settings/"; window.location = "./settings/";
}); });
} }
$("#reset-settings-btn").click(function() { $("#anpassen-label").click(function() {
softResetOptions(); window.location = "./settings/";
document.location.href = $("#reset-settings-btn").attr("data-href");
}); });
}); });
function setSettings() { function setSettings() {
if (canCustomSearch()) {
$("#foki input[type=radio]#angepasst").attr("checked", true);
$("#foki label#anpassen-label").removeClass("hide");
$("#foki button#reset-settings-btn").removeClass("hide");
$("#searchForm").append("<input type=\"hidden\" name=\"canCustomSearch\" value=\"true\">");
}
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);
...@@ -3966,17 +3960,21 @@ function setSettings() { ...@@ -3966,17 +3960,21 @@ function setSettings() {
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);
} }
if (localStorage.getItem("param_lang") !== null) {
if( localStorage.getItem("param_lang") !== null ) {
var value = localStorage.getItem("param_lang"); var value = localStorage.getItem("param_lang");
// Change the value of the lang input field to the given parameter // Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value); $("input[name=lang]").val(value);
} }
if (localStorage.getItem("param_autocomplete") !== null) {
if( localStorage.getItem("param_autocomplete") !== null ) {
var value = localStorage.getItem("param_autocomplete"); var value = localStorage.getItem("param_autocomplete");
// Change the value of the lang input field to the given parameter // Change the value of the lang input field to the given parameter
$("input[name=eingabe]").attr("autocomplete", value); $("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);
...@@ -3987,7 +3985,7 @@ function setSettings() { ...@@ -3987,7 +3985,7 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label span.content").html("angepasst"); $("fieldset.mobile label#anpassen-label span.content").html("angepasst");
} }
} }
// Polyfill for form attribute //Polyfill for form attribute
(function($) { (function($) {
/** /**
* polyfill for html5 form attr * polyfill for html5 form attr
...@@ -4001,6 +3999,7 @@ function setSettings() { ...@@ -4001,6 +3999,7 @@ function setSettings() {
} }
/** /**
* Append a field to a form * Append a field to a form
*
*/ */
$.fn.appendField = function(data) { $.fn.appendField = function(data) {
// for form only // for form only
...@@ -4018,6 +4017,7 @@ function setSettings() { ...@@ -4018,6 +4017,7 @@ function setSettings() {
}; };
/** /**
* Find all input fields with form attribute point to jQuery object * Find all input fields with form attribute point to jQuery object
*
*/ */
$('form[id]').submit(function(e) { $('form[id]').submit(function(e) {
var $form = $(this); var $form = $(this);
...@@ -4073,63 +4073,9 @@ function isUseOnce() { ...@@ -4073,63 +4073,9 @@ function isUseOnce() {
if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true; if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true;
return false; return false;
} }
function softResetOptions() {
// localStorage.removeItem("pers");
localStorage.removeItem("focus");
var keys = [];
for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i)
keys.push(key);
}
var metaParams = ["param_sprueche", "param_maps", "param_newtab", "param_lang", "param_autocomplete"];
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key.startsWith("param_" || key.startsWith("focus"))) {
if (metaParams.indexOf(key) === -1) {
localStorage.removeItem(key);
}
}
}
}
function canCustomSearch() {
if (localStorage.key("focus") === "angepasst") {
return true;
}
var metaParams = ["param_sprueche", "param_maps", "param_newtab", "param_lang", "param_autocomplete"];
var keys = [];
for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i)
keys.push(key);
}
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key.startsWith("param_")) {
if (metaParams.indexOf(key) === -1) {
return true;
}
}
}
return false;
}
$(document).ready(function() { $(document).ready(function() {
pageCanJS(); // Einige Inhalte der Seite sollen mit Javascript anders aussehen
tickOptions();
// Wenn LocalStorage verfügbar ist, geben wir die Möglichkeit die Einstellungen dort zu speichern // Wenn LocalStorage verfügbar ist, geben wir die Möglichkeit die Einstellungen dort zu speichern
// Checker listener tickOptions();
$(".checker").click(function() {
var selector = "." + $(this).attr("data-type");
if ($(selector + " input:checked").length) {
$(selector + " input").prop("checked", false);
} else {
$(selector + " input").prop("checked", true);
}
});
$(".allUnchecker").click(function() {
$(".focusCheckbox").prop("checked", false);
});
// Button listener
if (localStorage) { if (localStorage) {
$("#save").removeClass("hidden"); $("#save").removeClass("hidden");
if (localStorage.getItem("pers")) { if (localStorage.getItem("pers")) {
...@@ -4151,7 +4097,18 @@ $(document).ready(function() { ...@@ -4151,7 +4097,18 @@ $(document).ready(function() {
document.location.href = $("#save").attr("data-href"); document.location.href = $("#save").attr("data-href");
}); });
} }
$("#save-once").click(function() { $(".checker").click(function() {
var selector = "." + $(this).attr("data-type");
if ($(selector + " input:checked").length) {
$(selector + " input").prop("checked", false);
} else {
$(selector + " input").prop("checked", true);
}
});
$(".allUnchecker").click(function() {
$(".focusCheckbox").prop("checked", false);
});
$("#unten").click(function() {
$("#settings-form").append("<input type=\"hidden\" name=\"usage\" value=\"once\">"); $("#settings-form").append("<input type=\"hidden\" name=\"usage\" value=\"once\">");
switch (getLanguage()) { switch (getLanguage()) {
case "de": case "de":
...@@ -4195,7 +4152,7 @@ function tickOptions() { ...@@ -4195,7 +4152,7 @@ function tickOptions() {
} }
} }
} else { } else {
// $("div.web input").attr("checked", true); $("div.web input").attr("checked", true);
} }
} }
...@@ -4206,15 +4163,12 @@ function resetOptions() { ...@@ -4206,15 +4163,12 @@ function resetOptions() {
var key = localStorage.key(i) var key = localStorage.key(i)
keys.push(key); keys.push(key);
} }
var metaParams = ["param_sprueche", "param_maps", "param_newtab", "param_lang", "param_autocomplete"];
for (var i = 0; i < keys.length; i++) { for (var i = 0; i < keys.length; i++) {
var key = keys[i]; var key = keys[i];
if (key.startsWith("param_" || key.startsWith("focus"))) { if (key.startsWith("param_" || key.startsWith("focus"))) {
if (metaParams.indexOf(key) === -1) {
localStorage.removeItem(key); localStorage.removeItem(key);
} }
} }
}
} }
function getLanguage() { function getLanguage() {
...@@ -4225,11 +4179,6 @@ function getLanguage() { ...@@ -4225,11 +4179,6 @@ function getLanguage() {
} }
} }
} }
function pageCanJS() {
$("#collapse-engines-div").removeClass("in");
$("#collapse-engines-btn").removeClass("hide");
}
/*! iFrame Resizer (iframeSizer.min.js ) - v3.5.5 - 2016-06-16 /*! iFrame Resizer (iframeSizer.min.js ) - v3.5.5 - 2016-06-16
* Desc: Force cross domain iframes to size to content. * Desc: Force cross domain iframes to size to content.
* Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
......
This diff is collapsed.
{ {
"css/themes/default.css": "css/themes/default-46073189e4.css", "css/themes/default.css": "css/themes/default-932aa22ca4.css",
"js/all.js": "js/all-5ecffcf961.js", "js/all.js": "js/all-70e38f5f5e.js",
"js/quicktips.js": "js/quicktips-34d41bc58a.js" "js/quicktips.js": "js/quicktips-34d41bc58a.js"
} }
\ No newline at end of file
...@@ -6890,7 +6890,7 @@ Mixed ...@@ -6890,7 +6890,7 @@ Mixed
} }
#foki input + label:hover { #foki input + label:hover {
cursor: pointer; cursor: pointer;
background-color: #e3e3e3; background-color: #f6f6f6;
} }
#color-chooser a { #color-chooser a {
display: block; display: block;
......
This diff is collapsed.
...@@ -3909,6 +3909,7 @@ function productWidget() { ...@@ -3909,6 +3909,7 @@ function productWidget() {
$(".lightSliderContainer").removeClass("hidden"); $(".lightSliderContainer").removeClass("hidden");
} }
$(document).ready(function() { $(document).ready(function() {
// checkPlugin();
if (location.href.indexOf("#plugin-modal") > -1) { if (location.href.indexOf("#plugin-modal") > -1) {
$("#plugin-modal").modal("show"); $("#plugin-modal").modal("show");
} }
...@@ -3946,19 +3947,12 @@ $(document).ready(function() { ...@@ -3946,19 +3947,12 @@ $(document).ready(function() {
window.location = "./settings/"; window.location = "./settings/";
}); });
} }
$("#reset-settings-btn").click(function() { $("#anpassen-label").click(function() {
softResetOptions(); window.location = "./settings/";
document.location.href = $("#reset-settings-btn").attr("data-href");
}); });
}); });
function setSettings() { function setSettings() {
if (canCustomSearch()) {
$("#foki input[type=radio]#angepasst").attr("checked", true);
$("#foki label#anpassen-label").removeClass("hide");
$("#foki button#reset-settings-btn").removeClass("hide");
$("#searchForm").append("<input type=\"hidden\" name=\"canCustomSearch\" value=\"true\">");
}
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);
...@@ -3966,17 +3960,21 @@ function setSettings() { ...@@ -3966,17 +3960,21 @@ function setSettings() {
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);
} }
if (localStorage.getItem("param_lang") !== null) {
if( localStorage.getItem("param_lang") !== null ) {
var value = localStorage.getItem("param_lang"); var value = localStorage.getItem("param_lang");
// Change the value of the lang input field to the given parameter // Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value); $("input[name=lang]").val(value);
} }
if (localStorage.getItem("param_autocomplete") !== null) {
if( localStorage.getItem("param_autocomplete") !== null ) {
var value = localStorage.getItem("param_autocomplete"); var value = localStorage.getItem("param_autocomplete");
// Change the value of the lang input field to the given parameter // Change the value of the lang input field to the given parameter
$("input[name=eingabe]").attr("autocomplete", value); $("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);
...@@ -3987,7 +3985,7 @@ function setSettings() { ...@@ -3987,7 +3985,7 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label span.content").html("angepasst"); $("fieldset.mobile label#anpassen-label span.content").html("angepasst");
} }
} }
// Polyfill for form attribute //Polyfill for form attribute
(function($) { (function($) {
/** /**
* polyfill for html5 form attr * polyfill for html5 form attr
...@@ -4001,6 +3999,7 @@ function setSettings() { ...@@ -4001,6 +3999,7 @@ function setSettings() {
} }
/** /**
* Append a field to a form * Append a field to a form
*
*/ */
$.fn.appendField = function(data) { $.fn.appendField = function(data) {
// for form only // for form only
...@@ -4018,6 +4017,7 @@ function setSettings() { ...@@ -4018,6 +4017,7 @@ function setSettings() {
}; };
/** /**
* Find all input fields with form attribute point to jQuery object * Find all input fields with form attribute point to jQuery object
*
*/ */
$('form[id]').submit(function(e) { $('form[id]').submit(function(e) {
var $form = $(this); var $form = $(this);
...@@ -4073,63 +4073,9 @@ function isUseOnce() { ...@@ -4073,63 +4073,9 @@ function isUseOnce() {
if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true; if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true;
return false; return false;
} }
function softResetOptions() {
// localStorage.removeItem("pers");
localStorage.removeItem("focus");
var keys = [];
for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i)
keys.push(key);
}
var metaParams = ["param_sprueche", "param_maps", "param_newtab", "param_lang", "param_autocomplete"];
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key.startsWith("param_" || key.startsWith("focus"))) {
if (metaParams.indexOf(key) === -1) {
localStorage.removeItem(key);
}
}
}
}
function canCustomSearch() {
if (localStorage.key("focus") === "angepasst") {
return true;
}
var metaParams = ["param_sprueche", "param_maps", "param_newtab", "param_lang", "param_autocomplete"];
var keys = [];
for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i)
keys.push(key);
}
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key.startsWith("param_")) {
if (metaParams.indexOf(key) === -1) {
return true;
}
}
}
return false;
}
$(document).ready(function() { $(document).ready(function() {
pageCanJS(); // Einige Inhalte der Seite sollen mit Javascript anders aussehen
tickOptions();
// Wenn LocalStorage verfügbar ist, geben wir die Möglichkeit die Einstellungen dort zu speichern // Wenn LocalStorage verfügbar ist, geben wir die Möglichkeit die Einstellungen dort zu speichern
// Checker listener tickOptions();
$(".checker").click(function() {
var selector = "." + $(this).attr("data-type");
if ($(selector + " input:checked").length) {
$(selector + " input").prop("checked", false);
} else {
$(selector + " input").prop("checked", true);
}
});
$(".allUnchecker").click(function() {
$(".focusCheckbox").prop("checked", false);
});
// Button listener
if (localStorage) { if (localStorage) {
$("#save").removeClass("hidden"); $("#save").removeClass("hidden");
if (localStorage.getItem("pers")) { if (localStorage.getItem("pers")) {
...@@ -4151,7 +4097,18 @@ $(document).ready(function() { ...@@ -4151,7 +4097,18 @@ $(document).ready(function() {
document.location.href = $("#save").attr("data-href"); document.location.href = $("#save").attr("data-href");
}); });
} }
$("#save-once").click(function() { $(".checker").click(function() {
var selector = "." + $(this).attr("data-type");
if ($(selector + " input:checked").length) {
$(selector + " input").prop("checked", false);
} else {
$(selector + " input").prop("checked", true);
}
});
$(".allUnchecker").click(function() {
$(".focusCheckbox").prop("checked", false);
});
$("#unten").click(function() {
$("#settings-form").append("<input type=\"hidden\" name=\"usage\" value=\"once\">"); $("#settings-form").append("<input type=\"hidden\" name=\"usage\" value=\"once\">");
switch (getLanguage()) { switch (getLanguage()) {
case "de": case "de":
...@@ -4195,7 +4152,7 @@ function tickOptions() { ...@@ -4195,7 +4152,7 @@ function tickOptions() {
} }
} }
} else { } else {
// $("div.web input").attr("checked", true); $("div.web input").attr("checked", true);
} }
} }
...@@ -4206,15 +4163,12 @@ function resetOptions() { ...@@ -4206,15 +4163,12 @@ function resetOptions() {
var key = localStorage.key(i) var key = localStorage.key(i)
keys.push(key); keys.push(key);
} }
var metaParams = ["param_sprueche", "param_maps", "param_newtab", "param_lang", "param_autocomplete"];
for (var i = 0; i < keys.length; i++) { for (var i = 0; i < keys.length; i++) {
var key = keys[i]; var key = keys[i];
if (key.startsWith("param_" || key.startsWith("focus"))) { if (key.startsWith("param_" || key.startsWith("focus"))) {
if (metaParams.indexOf(key) === -1) {
localStorage.removeItem(key); localStorage.removeItem(key);
} }
} }
}
} }