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

Merge branch 'development' into 'master'

Development

See merge request !1043
parents d1581fed e094e06b
...@@ -60,6 +60,7 @@ function setActionListeners () { ...@@ -60,6 +60,7 @@ function setActionListeners () {
window.location = './settings/'; window.location = './settings/';
}); });
} }
$('.focusCheckbox').click(toggleDeleteButton);
$('#addFocusBtn').click(() => showFocusCreateDialog('')); $('#addFocusBtn').click(() => showFocusCreateDialog(''));
$('.save-focus-btn').click(saveFocus); $('.save-focus-btn').click(saveFocus);
$('.delete-focus-btn').click(deleteFocus); $('.delete-focus-btn').click(deleteFocus);
...@@ -248,6 +249,8 @@ function showFocusCreateDialog (id) { ...@@ -248,6 +249,8 @@ function showFocusCreateDialog (id) {
console.error(ex); console.error(ex);
} }
} }
toggleDeleteButton();
} }
/** /**
* Shows the focus create dialog for a given id * Shows the focus create dialog for a given id
...@@ -255,6 +258,18 @@ function showFocusCreateDialog (id) { ...@@ -255,6 +258,18 @@ function showFocusCreateDialog (id) {
function showFocusEditDialog (id) { function showFocusEditDialog (id) {
showFocusCreateDialog(id); showFocusCreateDialog(id);
} }
/**
* Shows/Hides the delete button if (no) checkboxes are selected
*/
function toggleDeleteButton() {
if(atLeastOneChecked()) {
$('.delete-focus-btn').show();
} else {
$('.delete-focus-btn').hide();
}
}
/** /**
* Save the current Focus * Save the current Focus
* Listens for save button * Listens for save button
...@@ -287,7 +302,17 @@ function saveFocus () { ...@@ -287,7 +302,17 @@ function saveFocus () {
$('#create-focus-modal').modal('hide'); $('#create-focus-modal').modal('hide');
} }
} else { } else {
alert('Bitte gültigen Namen eingeben:\n* Keine Sonderzeichen\n* Mindestens 1 Buchstabe\n* Mindestens 1 Suchmaschine auswählen'); switch(document.documentElement.lang) {
case 'en':
alert('Please select at least 1 search engine.');
break;
case 'es':
alert('Por favor, seleccione al menos un motor de búsqueda.');
break;
default:
alert('Bitte mindestens 1 Suchmaschine auswählen.');
break;
}
} }
} }
/** /**
...@@ -401,6 +426,9 @@ function removeFocus (name) { ...@@ -401,6 +426,9 @@ function removeFocus (name) {
* Remove the focuses html-elements * Remove the focuses html-elements
*/ */
function removeFocusById (id) { function removeFocusById (id) {
if(id == '') {
return;
}
var focusRadio = document.getElementById(id); var focusRadio = document.getElementById(id);
var focus = focusRadio.parentNode; var focus = focusRadio.parentNode;
var parent = focus.parentNode; var parent = focus.parentNode;
......
...@@ -146,18 +146,6 @@ ul.metager-dropdown-menu { ...@@ -146,18 +146,6 @@ ul.metager-dropdown-menu {
width: 100%; width: 100%;
} }
#gutscheine {
&>a {
display: inline-block;
&:first-child {
padding-right: 0;
}
&:first-child+a {
padding-left: 0;
}
}
}
@keyframes dropdown-animation { @keyframes dropdown-animation {
0% { 0% {
max-height: 0px; max-height: 0px;
......
...@@ -27,17 +27,6 @@ return [ ...@@ -27,17 +27,6 @@ return [
'nav23' => 'Beitrittsformular SUMA-EV', 'nav23' => 'Beitrittsformular SUMA-EV',
'nav24' => 'MetaGer Quellcode', 'nav24' => 'MetaGer Quellcode',
'nav25' => 'MetaGer App', 'nav25' => 'MetaGer App',
'gutscheineToggle' => 'Gutscheine',
'gutscheine.1' => 'Gutscheine',
'gutscheine.2' => 'Congstar Gutschein',
'gutscheine.3' => 'Check24 Gutschein',
'gutscheine.4' => 'Handyflash Gutschein',
'gutscheine.5' => 'Groupon Gutschein',
'gutscheine.6' => 'Medion Gutschein',
'gutscheine.7' => 'Navabi Gutschein',
'gutscheine.8' => 'Netcologne Gutschein',
'gutscheine.9' => 'Teufel Gutschein',
'gutscheine.10' => 'Alle Gutscheine',
'navigationToggle' => 'Navigation anzeigen', 'navigationToggle' => 'Navigation anzeigen',
'sumaev.1' => 'MetaGer wird entwickelt und betrieben vom ', 'sumaev.1' => 'MetaGer wird entwickelt und betrieben vom ',
......
...@@ -26,17 +26,6 @@ return [ ...@@ -26,17 +26,6 @@ return [
"nav23" => "Admitting formular SUMA-EV", "nav23" => "Admitting formular SUMA-EV",
"nav24" => "MetaGer source code", "nav24" => "MetaGer source code",
"nav25" => "MetaGer App", "nav25" => "MetaGer App",
"gutscheineToggle" => "Coupons",
"gutscheine.1" => "Coupons",
"gutscheine.2" => "Congstar Coupons",
"gutscheine.3" => "Check 24 Coupons",
"gutscheine.4" => "Handyflash Coupons",
"gutscheine.5" => "Groupon Coupons",
"gutscheine.6" => "Medion Coupons",
"gutscheine.7" => "Navabi Coupons",
"gutscheine.8" => "Netcologne Coupons",
"gutscheine.9" => "Teufel Coupons",
"gutscheine.10" => "All Coupons",
"navigationToggle" => "show navigation", "navigationToggle" => "show navigation",
"sumaev.1" => "MetaGer is developed and run by ", "sumaev.1" => "MetaGer is developed and run by ",
"sumaev.2" => "SUMA-EV - Association for Free Access to Knowledge.", "sumaev.2" => "SUMA-EV - Association for Free Access to Knowledge.",
......
...@@ -12,16 +12,6 @@ return [ ...@@ -12,16 +12,6 @@ return [
"nav18" => "Contact", "nav18" => "Contact",
"nav19" => "Langue", "nav19" => "Langue",
"nav20" => "Aide", "nav20" => "Aide",
"gutscheine.1" => "Bons d´achat",
"gutscheine.2" => "Bon d´achat Congstar",
"gutscheine.3" => "Bon d´achat Check24\r\n",
"gutscheine.4" => "Bon d´achat Handyflash",
"gutscheine.5" => "Bon d´achat Groupon",
"gutscheine.6" => "Bon d´achat Medion",
"gutscheine.7" => "Bon d´achat Navabi",
"gutscheine.8" => "Bon d´achat Netcologne",
"gutscheine.9" => "Bon d´achat Teufel",
"gutscheine.10" => "Tous les bons d´achats",
"sumaev.1" => "MetaGer est développé et opéré par", "sumaev.1" => "MetaGer est développé et opéré par",
"sumaev.2" => "SUMA-EV - Verein für freien Wissenszugang." "sumaev.2" => "SUMA-EV - Verein für freien Wissenszugang."
]; ];
\ No newline at end of file
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
<div @if(LaravelLocalization::getCurrentLocale() === "de") class="col-xs-4"@else class="col-xs-6"@endif> <div @if(LaravelLocalization::getCurrentLocale() === "de") class="col-xs-4"@else class="col-xs-6"@endif>
<a class="btn btn-default" href="/">{!! trans('resultPage.startseite') !!}</a> <a class="btn btn-default" href="/">{!! trans('resultPage.startseite') !!}</a>
</div> </div>
@if(LaravelLocalization::getCurrentLocale() === "de" && !$metager->validated)
<div class="col-xs-4">
<a class="btn btn-default" href="https://metager.de/gutscheine/">Gutscheine</a>
</div>
@endif
<div @if(LaravelLocalization::getCurrentLocale() === "de") class="col-xs-4"@else class="col-xs-6"@endif> <div @if(LaravelLocalization::getCurrentLocale() === "de") class="col-xs-4"@else class="col-xs-6"@endif>
<a class="btn btn-default" href="/impressum/">{!! trans('resultPage.impressum') !!}</a> <a class="btn btn-default" href="/impressum/">{!! trans('resultPage.impressum') !!}</a>
</div> </div>
......
...@@ -68,42 +68,6 @@ ...@@ -68,42 +68,6 @@
</li> </li>
</ul> </ul>
</li> </li>
@if(LaravelLocalization::getCurrentLocale() === "de")
<li id="gutscheine"@if (isset($navbarFocus) && $navbarFocus === 'gutscheine') class="metager-dropdown active" @else class="metager-dropdown" @endif >
<a href="https://metager.de/gutscheine/">{!! trans('staticPages.gutscheineToggle') !!}</a>
<a class="metager-dropdown-toggle" data-role="button" aria-expanded="false" tabindex="205"><span class="caret"></span></a>
<ul class="metager-dropdown-menu">
<li>
<a href="https://metager.de/gutscheine/congstar/" tabindex="206" >{{ trans('staticPages.gutscheine.2') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/check24/" tabindex="207" >{{ trans('staticPages.gutscheine.3') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/handyflash/" tabindex="208" >{{ trans('staticPages.gutscheine.4') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/groupon/" tabindex="209" >{{ trans('staticPages.gutscheine.5') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/medion/" tabindex="210" >{{ trans('staticPages.gutscheine.6') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/navabi/" tabindex="211" >{{ trans('staticPages.gutscheine.7') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/netcologne/" tabindex="212" >{{ trans('staticPages.gutscheine.8') }}</a>
</li>
<li>
<a href="https://metager.de/gutscheine/teufel/" tabindex="213" >{{ trans('staticPages.gutscheine.9') }}</a>
</li>
<li role="separator" class="divider"></li>
<li>
<a href="https://metager.de/gutscheine/alle-gutscheine/" tabindex="214" >{{ trans('staticPages.gutscheine.10') }}</a>
</li>
</ul>
</li>
@endif
<li @if (isset($navbarFocus) && $navbarFocus === 'datenschutz') class="active" @endif > <li @if (isset($navbarFocus) && $navbarFocus === 'datenschutz') class="active" @endif >
<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/datenschutz/") }}" id="navigationPrivacy" tabindex="215">{{ trans('staticPages.nav3') }}</a> <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/datenschutz/") }}" id="navigationPrivacy" tabindex="215">{{ trans('staticPages.nav3') }}</a>
</li> </li>
......
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