Commit 759a7f2f authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Merge

parents 0f0ee3f8 bec66ef9
...@@ -3,7 +3,7 @@ $(function () { ...@@ -3,7 +3,7 @@ $(function () {
setActionListeners(); setActionListeners();
loadInitialCustomFocuses(); loadInitialCustomFocuses();
checkFocusEditable(); checkFocusEditable();
}) });
/** /**
* Loads the user theme and stored settings from local storage * Loads the user theme and stored settings from local storage
...@@ -35,7 +35,7 @@ function setActionListeners () { ...@@ -35,7 +35,7 @@ function setActionListeners () {
}); });
} }
function setSettings() { function setSettings () {
var acceptedParams = ['autocomplete', 'key', 'lang', 'newtab', 'sprueche']; var acceptedParams = ['autocomplete', 'key', 'lang', 'newtab', 'sprueche'];
for (var key in localStorage) { for (var key in localStorage) {
var value = localStorage.getItem(key); var value = localStorage.getItem(key);
...@@ -162,13 +162,13 @@ function saveFocus () { ...@@ -162,13 +162,13 @@ function saveFocus () {
if (!isValidName(name)) { if (!isValidName(name)) {
switch (document.documentElement.lang) { switch (document.documentElement.lang) {
case 'en': case 'en':
alert('no Characters other then a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character'); alert('No characters other than a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character');
break; break;
case 'es': case 'es':
alert(''); // TODO alert('Por favor, introduzca un nombre válido'); // TODO
break; break;
default: default:
alert(''); // TODO alert('Bitte gültigen Namen eingeben:\n* Keine Sonderzeichen\n* Mindestens 1 Buchstabe\n'); // TODO
break; break;
} }
return; return;
...@@ -185,7 +185,7 @@ function saveFocus () { ...@@ -185,7 +185,7 @@ function saveFocus () {
return; return;
} }
// Ansonsten wird der andere Fokus gelöscht // Ansonsten wird der andere Fokus gelöscht
deleteFocusById(id) deleteFocusById(id);
} }
/* Fokus speichern */ /* Fokus speichern */
var focus = {}; var focus = {};
...@@ -224,7 +224,7 @@ function deleteFocusById (id) { ...@@ -224,7 +224,7 @@ function deleteFocusById (id) {
*/ */
function deleteFocus () { function deleteFocus () {
var oldId = document.getElementById('original-id').value; var oldId = document.getElementById('original-id').value;
deleteFocusById(oldId) deleteFocusById(oldId);
$('#create-focus-modal').modal('hide'); $('#create-focus-modal').modal('hide');
$('#focus-select').change(); $('#focus-select').change();
} }
......
...@@ -3,7 +3,7 @@ $(function () { ...@@ -3,7 +3,7 @@ $(function () {
setActionListeners(); setActionListeners();
loadInitialCustomFocuses(); loadInitialCustomFocuses();
checkFocusEditable(); checkFocusEditable();
}) });
/** /**
* Loads the user theme and stored settings from local storage * Loads the user theme and stored settings from local storage
...@@ -35,7 +35,7 @@ function setActionListeners () { ...@@ -35,7 +35,7 @@ function setActionListeners () {
}); });
} }
function setSettings() { function setSettings () {
var acceptedParams = ['autocomplete', 'key', 'lang', 'newtab', 'sprueche']; var acceptedParams = ['autocomplete', 'key', 'lang', 'newtab', 'sprueche'];
for (var key in localStorage) { for (var key in localStorage) {
var value = localStorage.getItem(key); var value = localStorage.getItem(key);
...@@ -162,13 +162,13 @@ function saveFocus () { ...@@ -162,13 +162,13 @@ function saveFocus () {
if (!isValidName(name)) { if (!isValidName(name)) {
switch (document.documentElement.lang) { switch (document.documentElement.lang) {
case 'en': case 'en':
alert('no Characters other then a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character'); alert('No characters other than a-z, A-Z, 0-9, ä, ö, ü, ß, -, _ allowed, at least 1 character');
break; break;
case 'es': case 'es':
alert(''); // TODO alert('Por favor, introduzca un nombre válido'); // TODO
break; break;
default: default:
alert(''); // TODO alert('Bitte gültigen Namen eingeben:\n* Keine Sonderzeichen\n* Mindestens 1 Buchstabe\n'); // TODO
break; break;
} }
return; return;
...@@ -185,7 +185,7 @@ function saveFocus () { ...@@ -185,7 +185,7 @@ function saveFocus () {
return; return;
} }
// Ansonsten wird der andere Fokus gelöscht // Ansonsten wird der andere Fokus gelöscht
deleteFocusById(id) deleteFocusById(id);
} }
/* Fokus speichern */ /* Fokus speichern */
var focus = {}; var focus = {};
...@@ -224,7 +224,7 @@ function deleteFocusById (id) { ...@@ -224,7 +224,7 @@ function deleteFocusById (id) {
*/ */
function deleteFocus () { function deleteFocus () {
var oldId = document.getElementById('original-id').value; var oldId = document.getElementById('original-id').value;
deleteFocusById(oldId) deleteFocusById(oldId);
$('#create-focus-modal').modal('hide'); $('#create-focus-modal').modal('hide');
$('#focus-select').change(); $('#focus-select').change();
} }
......
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