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
* @param int $id
* @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)
{
......
......@@ -35,7 +35,6 @@ class MetaGer
protected $addedHosts = [];
protected $startCount = 0;
protected $canCache = false;
protected $canCustomSearch = false;
# Daten über die Abfrage
protected $ip;
protected $language;
......@@ -905,7 +904,6 @@ class MetaGer
} else {
$this->sprueche = false;
}
# Maps
$this->maps = $request->input('maps', 'off');
if ($this->maps === "on") {
$this->maps = true;
......@@ -918,13 +916,6 @@ class MetaGer
} else {
$this->newtab = "_self";
}
# Custom Search
$this->canCustomSearch = $request->input('canCustomSearch', 'false');
if ($this->canCustomSearch === "true") {
$this->canCustomSearch = true;
} else {
$this->canCustomSearch = false;
}
# Theme
$this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'default'));
# Ergebnisse pro Seite:
......@@ -1239,7 +1230,7 @@ class MetaGer
}
}
# Generators
# Generators
public function generateSearchLink($fokus, $results = true)
{
......@@ -1300,11 +1291,6 @@ class MetaGer
# Komplexe Getter
public function canCustomSearch()
{
return $this->canCustomSearch;
}
public function getHostCount($host)
{
$hash = md5($host);
......
......@@ -6890,7 +6890,7 @@ Mixed
}
#foki input + label:hover {
cursor: pointer;
background-color: #e3e3e3;
background-color: #f6f6f6;
}
#color-chooser a {
display: block;
......
This diff is collapsed.
......@@ -3909,6 +3909,7 @@ function productWidget() {
$(".lightSliderContainer").removeClass("hidden");
}
$(document).ready(function() {
// checkPlugin();
if (location.href.indexOf("#plugin-modal") > -1) {
$("#plugin-modal").modal("show");
}
......@@ -3946,19 +3947,12 @@ $(document).ready(function() {
window.location = "./settings/";
});
}
$("#reset-settings-btn").click(function() {
softResetOptions();
document.location.href = $("#reset-settings-btn").attr("data-href");
$("#anpassen-label").click(function() {
window.location = "./settings/";
});
});
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++) {
var key = localStorage.key(i);
var value = localStorage.getItem(key);
......@@ -3966,17 +3960,21 @@ function setSettings() {
key = key.substring(key.indexOf("param_") + 6);
$("#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");
// Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value);
}
if (localStorage.getItem("param_autocomplete") !== null) {
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) {
$("fieldset.mobile input#bilder").val("angepasst");
$("fieldset.mobile input#bilder").prop("checked", true);
......@@ -3987,7 +3985,7 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label span.content").html("angepasst");
}
}
// Polyfill for form attribute
//Polyfill for form attribute
(function($) {
/**
* polyfill for html5 form attr
......@@ -4001,6 +3999,7 @@ function setSettings() {
}
/**
* Append a field to a form
*
*/
$.fn.appendField = function(data) {
// for form only
......@@ -4018,6 +4017,7 @@ function setSettings() {
};
/**
* Find all input fields with form attribute point to jQuery object
*
*/
$('form[id]').submit(function(e) {
var $form = $(this);
......@@ -4073,63 +4073,9 @@ function isUseOnce() {
if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true;
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() {
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
// Checker listener
$(".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
tickOptions();
if (localStorage) {
$("#save").removeClass("hidden");
if (localStorage.getItem("pers")) {
......@@ -4151,7 +4097,18 @@ $(document).ready(function() {
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\">");
switch (getLanguage()) {
case "de":
......@@ -4195,7 +4152,7 @@ function tickOptions() {
}
}
} else {
// $("div.web input").attr("checked", true);
$("div.web input").attr("checked", true);
}
}
......@@ -4206,13 +4163,10 @@ function resetOptions() {
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);
}
localStorage.removeItem(key);
}
}
}
......@@ -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
* Desc: Force cross domain iframes to size to content.
* 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",
"js/all.js": "js/all-5ecffcf961.js",
"css/themes/default.css": "css/themes/default-932aa22ca4.css",
"js/all.js": "js/all-70e38f5f5e.js",
"js/quicktips.js": "js/quicktips-34d41bc58a.js"
}
\ No newline at end of file
......@@ -6890,7 +6890,7 @@ Mixed
}
#foki input + label:hover {
cursor: pointer;
background-color: #e3e3e3;
background-color: #f6f6f6;
}
#color-chooser a {
display: block;
......
This diff is collapsed.
......@@ -3909,6 +3909,7 @@ function productWidget() {
$(".lightSliderContainer").removeClass("hidden");
}
$(document).ready(function() {
// checkPlugin();
if (location.href.indexOf("#plugin-modal") > -1) {
$("#plugin-modal").modal("show");
}
......@@ -3946,19 +3947,12 @@ $(document).ready(function() {
window.location = "./settings/";
});
}
$("#reset-settings-btn").click(function() {
softResetOptions();
document.location.href = $("#reset-settings-btn").attr("data-href");
$("#anpassen-label").click(function() {
window.location = "./settings/";
});
});
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++) {
var key = localStorage.key(i);
var value = localStorage.getItem(key);
......@@ -3966,17 +3960,21 @@ function setSettings() {
key = key.substring(key.indexOf("param_") + 6);
$("#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");
// Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value);
}
if (localStorage.getItem("param_autocomplete") !== null) {
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) {
$("fieldset.mobile input#bilder").val("angepasst");
$("fieldset.mobile input#bilder").prop("checked", true);
......@@ -3987,7 +3985,7 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label span.content").html("angepasst");
}
}
// Polyfill for form attribute
//Polyfill for form attribute
(function($) {
/**
* polyfill for html5 form attr
......@@ -4001,6 +3999,7 @@ function setSettings() {
}
/**
* Append a field to a form
*
*/
$.fn.appendField = function(data) {
// for form only
......@@ -4018,6 +4017,7 @@ function setSettings() {
};
/**
* Find all input fields with form attribute point to jQuery object
*
*/
$('form[id]').submit(function(e) {
var $form = $(this);
......@@ -4073,63 +4073,9 @@ function isUseOnce() {
if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true;
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() {
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
// Checker listener
$(".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
tickOptions();
if (localStorage) {
$("#save").removeClass("hidden");
if (localStorage.getItem("pers")) {
......@@ -4151,7 +4097,18 @@ $(document).ready(function() {
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\">");
switch (getLanguage()) {
case "de":
......@@ -4195,7 +4152,7 @@ function tickOptions() {
}
}
} else {
// $("div.web input").attr("checked", true);
$("div.web input").attr("checked", true);
}
}
......@@ -4206,13 +4163,10 @@ function resetOptions() {
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);
}
localStorage.removeItem(key);
}
}
}
......@@ -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
* Desc: Force cross domain iframes to size to content.
* Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame.
......
This diff is collapsed.
$(document).ready(function() {
// checkPlugin();
if (location.href.indexOf("#plugin-modal") > -1) {
$("#plugin-modal").modal("show");
}
......@@ -36,19 +37,12 @@ $(document).ready(function() {
window.location = "./settings/";
});
}
$("#reset-settings-btn").click(function() {
softResetOptions();
document.location.href = $("#reset-settings-btn").attr("data-href");
$("#anpassen-label").click(function() {
window.location = "./settings/";
});
});
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++) {
var key = localStorage.key(i);
var value = localStorage.getItem(key);
......@@ -56,17 +50,21 @@ function setSettings() {
key = key.substring(key.indexOf("param_") + 6);
$("#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");
// Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value);
}
if (localStorage.getItem("param_autocomplete") !== null) {
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) {
$("fieldset.mobile input#bilder").val("angepasst");
$("fieldset.mobile input#bilder").prop("checked", true);
......@@ -77,7 +75,7 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label span.content").html("angepasst");
}
}
// Polyfill for form attribute
//Polyfill for form attribute
(function($) {
/**
* polyfill for html5 form attr
......@@ -91,6 +89,7 @@ function setSettings() {
}
/**
* Append a field to a form
*
*/
$.fn.appendField = function(data) {
// for form only
......@@ -108,6 +107,7 @@ function setSettings() {
};
/**
* Find all input fields with form attribute point to jQuery object
*
*/
$('form[id]').submit(function(e) {
var $form = $(this);
......@@ -162,44 +162,4 @@ function isUseOnce() {
var pos = url.indexOf("usage=");
if (pos >= 0 && url.substring(pos + 6, pos + 11) == "once") return true;
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;
}
\ No newline at end of file
$(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
// Checker listener
$(".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
tickOptions();
if (localStorage) {
$("#save").removeClass("hidden");
if (localStorage.getItem("pers")) {
......@@ -36,7 +22,18 @@ $(document).ready(function() {
document.location.href = $("#save").attr("data-href");
});
}
$("#save-once").click(function() {
$(".checker").click(function() {