Commit d094341a authored by Karl's avatar Karl

Merge with Development

parents 75a83950 ecadc412
......@@ -3,7 +3,7 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Redis;
use Illuminate\Support\Facades\Redis;
class LogRotate extends Command
{
......
......@@ -3,7 +3,7 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Redis;
use Illuminate\Support\Facades\Redis;
class AdminInterface extends Controller
{
......
......@@ -3,7 +3,7 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Redis;
use Illuminate\Support\Facades\Redis;
class LogController extends Controller
{
......
......@@ -6,7 +6,7 @@ use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Redis;
use Illuminate\Support\Facades\Redis;
class Search implements ShouldQueue
{
......@@ -309,7 +309,7 @@ class Search implements ShouldQueue
try
{
$fp = pfsockopen($this->getHost() . ":" . $this->port . "/$counter", $this->port, $errstr, $errno, 1);
$fp = pfsockopen($this->getHost(), $this->port, $errstr, $errno, 1);
} catch (\ErrorException $e) {
break;
}
......
......@@ -8,7 +8,7 @@ use Jenssegers\Agent\Agent;
use LaravelLocalization;
use Log;
use Predis\Connection\ConnectionException;
use Redis;
use Illuminate\Support\Facades\Redis;
class MetaGer
{
......
......@@ -7,7 +7,7 @@ use App\MetaGer;
use Cache;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Log;
use Redis;
use Illuminate\Support\Facades\Redis;
abstract class Searchengine
{
......
......@@ -6,7 +6,7 @@ use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Queue\Events\JobProcessing;
use Illuminate\Support\ServiceProvider;
use Queue;
use Redis;
use Illuminate\Support\Facades\Redis;
class AppServiceProvider extends ServiceProvider
{
......
......@@ -6,7 +6,7 @@
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"laravel/framework": "5.4.*",
"predis/predis": "^1.1",
"mcamara/laravel-localization": "^1.1",
"jenssegers/agent": "^2.3",
......@@ -17,7 +17,7 @@
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"phpunit/phpunit": "~5.7",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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.
{
"js/editLanguage.js": "js/editLanguage-7a1cbfb2ba.js",
"js/kontakt.js": "js/kontakt-de49d68db3.js",
"js/scriptResultPage.js": "js/scriptResultPage-357d27fe23.js",
"js/scriptStartPage.js": "js/scriptStartPage-030737555a.js",
"js/settings.js": "js/settings-6ff0eab621.js",
"js/widgets.js": "js/widgets-866379dd63.js"
}
\ No newline at end of file
......@@ -7021,7 +7021,7 @@ Mixed
li#info {
white-space: pre-line;
}
main fieldset#foki {
main div#foki {
margin: 5px 0;
text-align: center;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -224,9 +224,10 @@ function showFocusEditDialog(id) {
function saveFocus() {
var name = document.getElementById("focus-name").value;
if (isValidName(name) && atLeastOneChecked()) {
var oldId = document.getElementById("original-id").value;
var id = getIdFromName(name);
var overwrite = true;
if (alreadyInUse(name)) {
if (alreadyInUse(name) && oldId !== id) {
overwrite = confirm("Name bereits genutzt\nüberschreiben?");
if (overwrite) {
localStorage.removeItem(id);
......@@ -234,7 +235,6 @@ function saveFocus() {
}
}
if (overwrite) {
var oldId = document.getElementById("original-id").value;
var focus = {};
$("input[type=checkbox]:checked").each(function(el) {
focus[$(this).attr("name")] = $(this).val();
......
$(document).ready(function() {
switch (getLanguage()) {
case "de":
$(".encrypt-btn").html("Verschlüsseln und senden");
break;
case "en":
$(".encrypt-btn").html("encrypt and send");
break;
case "es":
// $(".encrypt-btn").html(""); TODO
break;
}
$(".contact").submit(function() {
return encrypt(this);
});
});
//based on https://github.com/encrypt-to/secure.contactform.php
/* The MIT License (MIT)
Copyright (c) 2013 Jan Wiegelmann
......@@ -59,6 +43,22 @@ function encrypt() {
return false;
}
}
$(document).ready(function() {
switch (getLanguage()) {
case "de":
$(".encrypt-btn").html("Verschlüsseln und senden");
break;
case "en":
$(".encrypt-btn").html("encrypt and send");
break;
case "es":
// $(".encrypt-btn").html(""); TODO
break;
}
$(".contact").submit(function() {
return encrypt(this);
});
});
function getLanguage() {
var metaData = document.getElementsByTagName('meta');
......
......@@ -3,7 +3,11 @@ $(document).ready(function() {
tickOptions();
if (localStorage) {
$("#save").removeClass("hidden");
if (localStorage.getItem("pers")) {
$("#reset").removeClass("hidden");
}
$("#save").click(function() {
resetOptions();
localStorage.setItem("pers", true);
$("input[type=checkbox]:checked, input[type=hidden]").each(function(el) {
localStorage.setItem($(this).attr("name"), $(this).val());
......@@ -13,6 +17,10 @@ $(document).ready(function() {
});
document.location.href = $("#save").attr("data-href");
});
$("#reset").click(function() {
resetOptions();
document.location.href = $("#save").attr("data-href");
});
}
$(".checker").click(function() {
var selector = "." + $(this).attr("data-type");
......@@ -22,6 +30,9 @@ $(document).ready(function() {
$(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()) {
......@@ -50,7 +61,6 @@ $(document).ready(function() {
break;
}
});
$("#settings-focus").val("angepasst");
});
function tickOptions() {
......@@ -71,6 +81,21 @@ function tickOptions() {
}
}
function resetOptions() {
localStorage.removeItem("pers");
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_" || key.startsWith("focus"))) {
localStorage.removeItem(key);
}
}
}
function getLanguage() {
var metaData = document.getElementsByTagName('meta');
for (var m in metaData) {
......
......@@ -329,7 +329,7 @@ li#info {
white-space: pre-line;
}
main fieldset#foki {
main div#foki {
margin: 5px 0;
text-align: center;
}
......
......@@ -193,7 +193,7 @@
</div>
<h1 id="mglogo"><a class="hidden-xs" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}">MetaGer</a></h1>
<!-- Create the focus selection and options -->
<fieldset id="foki">
<div id="foki">
<div class="focus">
<input id="web" class="focus-radio hide" type="radio" name="focus" value="web" form="searchForm" @if ($focus === 'web') checked @endif required="">
<label id="web-label" class="focus-label" for="web">
......@@ -245,7 +245,7 @@
<a id="settings-btn" class="mutelink btn btn-default" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "settings") }}">
<i class="fa fa-cog" aria-hidden="true"></i>
</a>
</fieldset>
</div>
<fieldset>
<form id="searchForm" @if(Request::has('request') && Request::input('request') === "POST") method="POST" @elseif(Request::has('request') && Request::input('request') === "GET") method="GET" @else method="GET" @endif action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/meta/meta.ger3") }}" accept-charset="UTF-8">
<div class="input-group">
......
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