ordersprinter/webapp/preferences.html

712 lines
34 KiB
HTML
Raw Normal View History

2020-11-19 22:47:44 +01:00
<html>
<head>
<title>Ansicht persönliche Einstellungen</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
2020-11-19 22:48:24 +01:00
<meta name="author" content="Stefan Pichel">
2020-11-19 22:47:44 +01:00
2020-11-19 23:12:13 +01:00
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.16">
2020-11-19 22:47:44 +01:00
2020-11-19 23:02:42 +01:00
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
2020-11-19 22:47:44 +01:00
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
2020-11-19 22:48:24 +01:00
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
2020-11-19 22:47:44 +01:00
<script src="utilities.js"></script>
2020-11-19 22:48:24 +01:00
2020-11-19 22:47:44 +01:00
</head>
<body>
<script>
var PREF_HEADER = ["Persönliche Einstellungen für ","User specific settings for ","Propriedades para usario "];
var PREF_PASSWORD = ["Passwort","Password","Contraseña"];
var PREF_OLD_PASSWORD = ["Altes Passwort:","Old password:","Contraseña obsoleta:"];
var PREF_NEW_PASSWORD = ["Neues Passwort:","New password:","Contraseña nueva:"];
var PREF_LANGUAGE = ["Sprache","Language","Idioma"];
var PREF_ORDERTON = ["Orderton","Order sound","Sonido de la orden"];
var PREF_CHANGE_PASSWD = ["Passwort ändern","Change password","Cambiar contraseña"];
var PREF_WRONG_OLDASS = ["Das Passwort konnte nicht geändert werden. Bitte prüfen Sie, ob das alte Passwort korrekt eingegeben wurde.",
"The password could not be changed. Please verify that the old password was entered correctly.",
"No se puede cambiar la contraseña. Has enterado corectamente la contraseña vieja?"];
var PREF_PASS_CHANGED = ["Das Passwort wurde geändert.","Password changed.","La contraseña esta cambiado."];
var PREF_VOL = ["Lautstärke:", "Volume:", "Volumen:"];
var PREF_RECEIPT_PRINTER = ["Bondrucker","Receipt printer","Impresora de tique"];
var PREF_PRINTER_HEAD = ["Kassendrucker","Paydesk printer","Impresora de tique"];
var PREF_PRINTER_DETAILS = ["Die Auswahl des Bondruckers wirkt sich nur bei Server-Print aus.","The selection of the receipt printers is only relevant for server print.","La selección de la impresora solo sirve para 'server print'"];
var PREF_SIZE_SMALL = ["klein","small","pequeño"];
var PREF_SIZE_MIDDLE = ["mittel","middle","medio"];
var PREF_SIZE_BIG = ["groß","big","grande"];
var PREF_ROOM_BTN_SIZE = ["Raumauswahl","Room selection","Selección de espacio"];
var PREF_TABLE_BTN_SIZE = ["Tischauswahl","Table selection","Selección de mesas"];
var PREF_PROD_BTN_SIZE = ["Produktauswahl","Product selection","Selección de productos"];
var PREF_BTN_SIZE_TXT = ["Buttongrößen","Button sizes","Tamaño de los botones"];
var PREF_TM = ["Tischauswahl bevorzugt","Prefer table selection","Prerefir selección de mesas"];
var PREF_TM_GR = ["Grafische Tischkarte","Tablemap as image","Mapa de cartas"];
var PREF_TM_TEXT = ["Text-Buttons","Text buttons","botones con textos"];
2020-11-19 23:03:35 +01:00
var PREF_IMG_DESK = ["Produktbilder in Desktopansicht","Images in Desktop view","Imagenes en vista de desktop"];
var PREF_IMG_MOBILE = ["Produktbilder in Mobilansicht","Images in mobile view","Imagenes en vista de móviles"];
2020-11-19 23:10:13 +01:00
var PREF_SHOW_PLUS_MINUS = ["Anzahl (#/+/-) in Mobilansicht","Amount (#,+/-) in mobile view","Ajustar numero en vista móvil"];
2020-11-19 23:10:06 +01:00
var PREF_IMG_FIX_BTNS = ["Fixierte Navigationsbuttons (mobile Bestellansicht)","Fixed Navigation Buttons (mobile order view)","Botones fijos de navigación (vista movíl de ordenes)"];
2020-11-19 23:03:35 +01:00
var PREF_NO = ["Nein","No","No"];
var PREF_YES = ["Ja","Yes","Si"];
2020-11-19 22:48:24 +01:00
var PREF_KTL_TITEL = ["Navigation in der Bestellansicht","Order Navigation","Navigacion de ordenar"];
var PREF_KTL = ["Bestellnavigation","Order Navigation","Navigacion de ordenar"];
var PREF_KTL_KEEP = ["Produktkategorie beibehalten","Keep on product type level","No cambiar categoría"];
var PREF_KTL_GO_HIGH = ["-> oberste Produkthierarchie","-> top product hierarchy","-> empezar ariba"];
var PREF_KTL_DESC = ["Soll in der Bestellansicht nach Auswahl eines Produktes wieder an den Anfang der Produkthierarchie gesprungen werden?",
"Do you prefer to jump to the top of the product hierachy after selecting a product in the waiter view?",
"Donde quiere Usted empezar después de seleccion de un producto?"];
2020-11-19 22:53:50 +01:00
var PREF_APPLY_EXTRA_POS = ["Position Extras-Anwenden-Button","Position apply extras button","Posicion aplicar boton extras"];
var PREF_APPLY_EXTRAS_OPTION_TOP = ["Listenanfang","Start of list","Al inicio de la lista"];
var PREF_APPLY_EXTRAS_OPTION_BOTTOM = ["Listenende","End of list","Al final de la lista"];
var PREF_APPLY_EXTRAS_OPTION_BOTH = ["Listenanfang und -ende","Start and end of list","Al inicio y final de la lista"];
2020-11-19 23:10:26 +01:00
var PREF_TABLES_AFTER_SEND = ["Mobilansicht: Nach Produktübermittlung","Mobile view: After sending to server","Vista movíl: Despues transmitir"];
var PREF_TABLES_AFTER_SEND_TABLES = ["Tischauswahl","Table selection","Seleccion de las mesas"];
var PREF_TABLES_AFTER_SEND_ROOMS = ["Raumauswahl","Room selection","Seleccion de las habitaciones"];
2020-11-19 22:48:24 +01:00
2020-11-19 23:02:42 +01:00
var PREF_THEME_TITEL = ["Design","Appearance","Design"];
var PREF_THEME = ["Mobil-Ansicht","Mobile view","Vista movíl"];
var PREF_THEME_COLORFUL = ["bunt","colorful","colorido"];
var PREF_THEME_PALE = ["blass","pale","pálido"];
2020-11-19 23:11:29 +01:00
var PREF_THEME_DARK_SOUL = ["Dark Soul","Dark Soul","Dark Soul"];
2020-11-19 23:02:42 +01:00
var PREF_THEME_HINT = ["Bitte beachten: Möglicherweise wirkt eine Änderung erst, wenn die jeweilige Ansicht im Internetbrowser erneut geladen wird (Reload-Button).",
"It may be necessary to press the reload button of a view to get the changed design to be applied.",
"Quizás es necesario reload las paginas despues de un cambio."];
2020-11-19 23:03:38 +01:00
var PREF_IMG_ICON_DISPLAY = ["Bild-/Iconanzeige","Display of images/icons","Icons/Imagenes en las vistas"];
2020-11-19 23:12:02 +01:00
var PREF_MISC = ["Verschiedenes","Misc","Otros temas"];
var PREF_CALC_PREF = ["Bevorzugter Wechselgeldrechnermodus","Preferred change money calculation mode","Modus para calcular de cambio"];
var PREF_CALC_NONE_TXT = ["Kein Wechselgeldrechner","No calculator","Ningún calculador de cambio"];
var PREF_CALC_TIP_TXT = ["Angabe extra Trinkg.","Do Tip separate","Propina individual"];
var PREF_CALC_TOTAL_TXT = ["Angabe inkl.Trinkg.","Do Tip incl.","Propina incl."];
2020-11-19 23:02:42 +01:00
2020-11-19 22:47:44 +01:00
var l=0;
function doAjaxPasswordChange(oldPass,newPass,errorMsg) {
var data = {
oldPass: oldPass,
newPass: newPass
};
doAjax("POST","php/contenthandler.php?module=admin&command=changeOwnPassword",data,changePassword,"Passwortproblem");
}
function getGeneralConfigItems() {
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertGeneralConfigItems, "Fehler Konfigurationsdaten");
}
function insertGeneralConfigItems(configResult) {
if (configResult.status == "OK") {
var values = configResult.msg;
$("#pref-page").data("receiptprinter",values.receiptprinter);
$("#pref-page").data("userlanguage",values.userlanguage);
setLanguage(values.userlanguage);
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
}
}
2020-11-19 23:02:42 +01:00
function reloadPageWithTimeout() {
setTimeout(function(){document.location.href = "preferences.html"},250);
}
2020-11-19 22:47:44 +01:00
function createLanguagePart(language) {
var html = '<div class="ui-field-contain">';
html += '<label for="language">' + PREF_LANGUAGE[language] + ':</label>';
html += '<select name="language" id="language" data-theme="e">';
if (language == '0') {
html += '<option value="0" selected>Deutsch</option>';
html += '<option value="1">English</option>';
html += '<option value="2">Español</option>';
} else if (language == '1'){
html += '<option value="0">Deutsch</option>';
html += '<option value="1" selected>English</option>';
html += '<option value="2">Español</option>';
} else {
html += '<option value="0">Deutsch</option>';
html += '<option value="1">English</option>';
html += '<option value="2" selected>Español</option>';
}
html += '</select></div>';
return html;
}
function isSelected(currentIndex,searchIndex) {
if (currentIndex == searchIndex) {
return " selected";
} else {
return "";
}
}
function createReceiptPrinterPart(language) {
var printer = $("#pref-page").data("receiptprinter");
var html = PREF_PRINTER_DETAILS[language] + '<br><div class="ui-field-contain">';
html += '<label for="receiptprinter">' + PREF_PRINTER_HEAD[language] + ':</label>';
html += '<select name="receiptprinter" id="receiptprinter" data-theme="e">';
html += '<option value="1"' + isSelected(1,printer) + '>' + PREF_RECEIPT_PRINTER[language] + ' #1</option>';
html += '<option value="2"' + isSelected(2,printer) + '>' + PREF_RECEIPT_PRINTER[language] + ' #2</option>';
html += '<option value="3"' + isSelected(3,printer) + '>' + PREF_RECEIPT_PRINTER[language] + ' #3</option>';
html += '<option value="4"' + isSelected(4,printer) + '>' + PREF_RECEIPT_PRINTER[language] + ' #4</option>';
html += '<option value="5"' + isSelected(5,printer) + '>' + PREF_RECEIPT_PRINTER[language] + ' #5</option>';
html += '<option value="6"' + isSelected(6,printer) + '>' + PREF_RECEIPT_PRINTER[language] + ' #6</option>';
html += '</select></div>';
return html;
}
function setLanguage(lang) {
l = lang;
$("#languagepart").html(createLanguagePart(lang));
$("#languagebox").trigger("create");
$("#receiptprinterpart").html(createReceiptPrinterPart(lang));
$("#receiptprinterpartbox").trigger("create");
$("#prefheader").html(PREF_HEADER[lang]);
$("#passwordgen").html(PREF_PASSWORD[lang]);
$("#oldpassword").html(PREF_OLD_PASSWORD[lang]);
$("#newpassword").html(PREF_NEW_PASSWORD[lang]);
$("#languagetxt").html(PREF_LANGUAGE[lang]);
$("#printertxt").html(PREF_PRINTER_HEAD[lang]);
$("#ordertonetxt").html(PREF_ORDERTON[lang]);
var changepassbtn = '<input type="submit" value="' + PREF_CHANGE_PASSWD[lang] + '" data-theme="d" id="changepasswordbutton"/>';
$("#changepassbtnpart").html(changepassbtn);
$("#userpart").trigger("create");
$("#language").off('change').on('change', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
var newLang = $("#language").find(":selected").val();
doAjax("POST","php/contenthandler.php?module=admin&command=setUserLanguage",{language:newLang},null,"Sprachenaenderung");
setLanguage(newLang);
});
$("#OLDPASSW_WRONG").html(PREF_WRONG_OLDASS[lang]);
$("#PASSWORD_CHANGED").html(PREF_PASS_CHANGED[lang]);
$("#voltxt").html(PREF_VOL[lang]);
$("#btnsizetxt").html(PREF_BTN_SIZE_TXT[lang]);
$("#roombtnsizetxt").html(PREF_ROOM_BTN_SIZE[lang]);
$("#tablebtnsizetxt").html(PREF_TABLE_BTN_SIZE[lang]);
$("#prodbtnsizetxt").html(PREF_PROD_BTN_SIZE[lang]);
$("#prefertmtxt").html(PREF_TABLE_BTN_SIZE[lang]);
$("#prefertmlabeltxt").html(PREF_TM[lang]);
2020-11-19 22:48:24 +01:00
$("#preferktltxt").html(PREF_KTL_TITEL[lang]);
$("#preferktldesc").html(PREF_KTL_DESC[lang]);
2020-11-19 23:02:42 +01:00
$("#preferthemetxt").html(PREF_THEME_TITEL[lang]);
$("#preferthemehint").html(PREF_THEME_HINT[lang]);
2020-11-19 23:03:38 +01:00
$("#preferimgtxt").html(PREF_IMG_ICON_DISPLAY[lang]);
2020-11-19 23:12:02 +01:00
$("#prefermisctxt").html(PREF_MISC[lang]);
2020-11-19 22:47:44 +01:00
initializeMainMenu("#modulemenu");
binding();
}
function changePassword(jsonContent) {
if (jsonContent == "OK") {
$("#passwordchangedpopup").popup( "open", {transition: 'flip'} );
} else {
$("#passwordnotchangedpopup").popup( "open", {transition: 'flip'} );
}
}
function fillCurrentUserIntoMask(username) {
$("#username").html(username);
}
function setCurrentUserIntoMask() {
doAjax("GET","php/contenthandler.php?module=admin&command=getCurrentUser",null,fillCurrentUserIntoMask,"Keine Benutzerinfo");
}
function setVolume() {
doAjax("GET","php/contenthandler.php?module=admin&command=getOrderVolume",null,fillOrderVolume,"Keine Ordertoninformation");
}
function setButtonSizes() {
doAjax("GET","php/contenthandler.php?module=admin&command=getButtonSizes",null,fillButtonSizes,"Keine Buttongroesseninformation");
}
function setPreferTablemap() {
2020-11-19 22:48:24 +01:00
doAjax("GET","php/contenthandler.php?module=admin&command=getPreferTableMap",null,fillPreferTableMap,"Keine Information über Bevorzugung grafischer Tischpläne");
}
2020-11-19 23:03:35 +01:00
function setPreferimgdesk() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPreferimgdesk",null,fillPreferimgdesk,"Keine Information über Bevorzugung Produktbilder in Desktopansicht");
}
function setPreferimgmobile() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPreferimgmobile",null,fillPreferimgmobile,"Keine Information über Bevorzugung Produktbilder in Mobilansicht");
}
2020-11-19 23:10:06 +01:00
function setPreferfixbtns() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPreferfixbtns",null,fillPreferfixbtns,"Keine Information über Bevorzugung Fix-Buttons");
}
2020-11-19 23:03:38 +01:00
function setShowplusminus() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPrefershowplusminus",null,fillPrefershowplusminus,"Keine Information über Bevorzugung Mengenangabe in Mobilansicht");
}
2020-11-19 22:48:24 +01:00
function setKeepTypeLevel() {
doAjax("GET","php/contenthandler.php?module=admin&command=getKeepTypeLevel",null,fillKeepTypeLevel,"Keine Information über Bevorzugung Bestellnavigation");
2020-11-19 22:47:44 +01:00
}
2020-11-19 23:02:42 +01:00
function setMobileTheme() {
doAjax("GET","php/contenthandler.php?module=admin&command=getMobileTheme",null,fillMobileTheme,null);
}
2020-11-19 22:53:50 +01:00
function setApplyBtnPos() {
doAjax("GET","php/contenthandler.php?module=admin&command=getApplyExtrasBtnPos",null,fillExtrasApplyBtnPosPart,"Keine Information über Position Extra-Anwenden-Button");
}
2020-11-19 23:10:26 +01:00
function setTablesAfterSend() {
doAjax("GET","php/contenthandler.php?module=admin&command=getTablesAfterSend",null,fillTablesAfterSendPart,"Keine Information über Navigation nach Bestellübermittlung");
}
2020-11-19 23:12:02 +01:00
function setCalcMode() {
doAjax("GET","php/contenthandler.php?module=admin&command=getPreferCalc",null,fillCalcPref,null);
}
2020-11-19 22:53:50 +01:00
2020-11-19 22:47:44 +01:00
function fillOrderVolume(volume) {
$("#slidervolume").val(volume);
$("#slidervolume").slider('refresh');
}
function createBtnSizePart(size,label,labeltxt) {
var html = '<div class="ui-field-contain">';
2020-11-19 23:10:09 +01:00
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
2020-11-19 22:47:44 +01:00
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,size) + '>' + PREF_SIZE_SMALL[l] + '</option>';
html += '<option value="1"' + isSelected(1,size) + '>' + PREF_SIZE_MIDDLE[l] + '</option>';
html += '<option value="2"' + isSelected(2,size) + '>' + PREF_SIZE_BIG[l] + '</option>';
html += '</select></div>';
return html;
}
function createPreferTMPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
2020-11-19 23:10:09 +01:00
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
2020-11-19 22:47:44 +01:00
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_TM_TEXT[l] + '</option>';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_TM_GR[l] + '</option>';
html += '</select></div>';
return html;
}
2020-11-19 23:03:35 +01:00
function createPreferImgPart(prefervalue,label,labeltxt) {
if (prefervalue == null) {
prefervalue = 0;
}
var html = '<div class="ui-field-contain">';
2020-11-19 23:10:09 +01:00
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
2020-11-19 23:03:35 +01:00
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_NO[l] + '</option>';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_YES[l] + '</option>';
html += '</select></div>';
return html;
}
2020-11-19 22:48:24 +01:00
function createPreferKTLPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
2020-11-19 23:10:09 +01:00
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
2020-11-19 22:48:24 +01:00
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_KTL_KEEP[l] + '</option>';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_KTL_GO_HIGH[l] + '</option>';
html += '</select></div>';
return html;
}
2020-11-19 23:02:42 +01:00
function createPreferMobileThemePart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
2020-11-19 23:10:09 +01:00
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
2020-11-19 23:02:42 +01:00
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_THEME_COLORFUL[l] + '</option>';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_THEME_PALE[l] + '</option>';
2020-11-19 23:11:29 +01:00
html += '<option value="2"' + isSelected(2,prefervalue) + '>' + PREF_THEME_DARK_SOUL[l] + '</option>';
2020-11-19 23:02:42 +01:00
html += '</select></div>';
return html;
}
2020-11-19 22:53:50 +01:00
function createPreferExtrasApplyBtnPosPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
2020-11-19 23:10:09 +01:00
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
2020-11-19 22:53:50 +01:00
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_BOTTOM[l] + '</option>';
html += '<option value="2"' + isSelected(2,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_TOP[l] + '</option>';
html += '<option value="3"' + isSelected(3,prefervalue) + '>' + PREF_APPLY_EXTRAS_OPTION_BOTH[l] + '</option>';
html += '</select></div>';
return html;
}
2020-11-19 23:10:26 +01:00
function createPreferTablesAfterSendPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_TABLES_AFTER_SEND_ROOMS[l] + '</option>';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_TABLES_AFTER_SEND_TABLES[l] + '</option>';
html += '</select></div>';
return html;
}
2020-11-19 23:12:02 +01:00
function createPreferCalcPart(prefervalue,label,labeltxt) {
var html = '<div class="ui-field-contain">';
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span>:</label>';
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_CALC_NONE_TXT[l] + '</option>';
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_CALC_TOTAL_TXT[l] + '</option>';
html += '<option value="2"' + isSelected(2,prefervalue) + '>' + PREF_CALC_TIP_TXT[l] + '</option>';
html += '</select></div>';
return html;
}
2020-11-19 22:47:44 +01:00
function fillButtonSizes(buttonsizes) {
$("#roombtnpart").html(createBtnSizePart(buttonsizes.roombtnsize, "roombtnsize", PREF_ROOM_BTN_SIZE[l]));
$("#tablebtnpart").html(createBtnSizePart(buttonsizes.tablebtnsize, "tablebtnsize", PREF_TABLE_BTN_SIZE[l]));
$("#prodbtnpart").html(createBtnSizePart(buttonsizes.prodbtnsize, "prodbtnsize", PREF_PROD_BTN_SIZE[l]));
$("#btnsizepartbox").trigger("create");
}
function fillPreferTableMap(preferTablemap) {
$("#prefertmbtnpart").html(createPreferTMPart(preferTablemap, "prefertmlabel", PREF_TM[l]));
$("#prefertmpartbox").trigger("create");
}
2020-11-19 23:03:35 +01:00
function fillPreferimgdesk(preferredVaue) {
$("#preferimgdeskbtnpart").html(createPreferImgPart(preferredVaue, "preferimgdesklabel", PREF_IMG_DESK[l]));
2020-11-19 23:03:38 +01:00
$("#preferimgpartbox").trigger("create");
2020-11-19 23:03:35 +01:00
}
function fillPreferimgmobile(preferredVaue) {
$("#preferimgmobilebtnpart").html(createPreferImgPart(preferredVaue, "preferimgmobilelabel", PREF_IMG_MOBILE[l]));
2020-11-19 23:03:38 +01:00
$("#preferimgpartbox").trigger("create");
}
2020-11-19 23:10:06 +01:00
function fillPreferfixbtns(preferredVaue) {
$("#preferfixbtnspart").html(createPreferImgPart(preferredVaue, "preferfixbtnslabel", PREF_IMG_FIX_BTNS[l]));
$("#preferthemepartbox").trigger("create");
}
2020-11-19 23:03:38 +01:00
function fillPrefershowplusminus(preferredVaue) {
$("#prefershowplusminusbtnpart").html(createPreferImgPart(preferredVaue, "prefershowplusminuslabel", PREF_SHOW_PLUS_MINUS[l]));
$("#preferimgpartbox").trigger("create");
2020-11-19 23:03:35 +01:00
}
2020-11-19 22:48:24 +01:00
function fillKeepTypeLevel(preferKeepTypeLevel) {
$("#preferktlbtnpart").html(createPreferKTLPart(preferKeepTypeLevel, "preferktllabel", PREF_KTL[l]));
$("#preferktlpartbox").trigger("create");
}
2020-11-19 23:02:42 +01:00
function fillMobileTheme(mobileTheme) {
$("#preferthemebtnpart").html(createPreferMobileThemePart(mobileTheme, "preferthemelabel", PREF_THEME[l]));
$("#preferthemepartbox").trigger("create");
}
2020-11-19 22:53:50 +01:00
function fillExtrasApplyBtnPosPart(applyPos) {
$("#preferapplypospart").html(createPreferExtrasApplyBtnPosPart(applyPos, "preferapplyposlabel", PREF_APPLY_EXTRA_POS[l]));
$("#preferktlpartbox").trigger("create");
}
2020-11-19 23:10:26 +01:00
function fillTablesAfterSendPart(thevalue) {
$("#prefertablesaftersendpart").html(createPreferTablesAfterSendPart(thevalue, "prefertablesaftersendlabel", PREF_TABLES_AFTER_SEND[l]));
$("#preferktlpartbox").trigger("create");
}
2020-11-19 22:53:50 +01:00
2020-11-19 23:12:02 +01:00
function fillCalcPref(calcPref) {
$("#prefercalcpart").html(createPreferCalcPart(calcPref, "prefercalclabel", PREF_CALC_PREF[l]));
$("#prefermiscpartbox").trigger("create");
}
2020-11-19 22:47:44 +01:00
function handleBtnSize(jsonResult) {
if (jsonResult != "OK") {
alert("Fehler");
}
}
function handleGeneralAnswer(json) {
if (json.status != "OK") {
alert("Fehler");
}
}
function binding() {
$("#changepasswordbutton").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var oldp = $("#oldpass").val();
var newp = $("#newpass").val();
doAjaxPasswordChange(oldp,newp,"Password change impossible");
$("#oldpass").val("");
$("#newpass").val("");
});
$("#slidervolume").off('slidestop').on('slidestop', function(e) {
doAjax("POST","php/contenthandler.php?module=admin&command=setOrderVolume",{volume:$("#slidervolume").val()},null,"Orderton nicht einstellbar");
});
$("#receiptprinter").off('change').on('change', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
var newPrinter = $("#receiptprinter").find(":selected").val();
$("#pref-page").data("receiptprinter",newPrinter);
$("#receiptprinterpart").html(createReceiptPrinterPart($("#pref-page").data("userlanguage")));
$("#receiptprinterpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setUserReceiptPrinter",{printer:newPrinter},null,"Bondruckeränderung");
binding();
});
$("#roombtnsize").off('change').on('change', function(e) {
var newSize = $("#roombtnsize").find(":selected").val();
$("#roombtnpart").html(createBtnSizePart(newSize, "roombtnsize", PREF_ROOM_BTN_SIZE[l]));
$("#btnsizepartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setBtnSize",{btn:0,size:newSize},handleBtnSize,"Buttonsize");
binding();
});
$("#tablebtnsize").off('change').on('change', function(e) {
var newSize = $("#tablebtnsize").find(":selected").val();
$("#tablebtnpart").html(createBtnSizePart(newSize, "tablebtnsize", PREF_TABLE_BTN_SIZE[l]));
$("#btnsizepartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setBtnSize",{btn:1,size:newSize},handleBtnSize,"Buttonsize");
binding();
});
$("#prodbtnsize").off('change').on('change', function(e) {
var newSize = $("#prodbtnsize").find(":selected").val();
$("#prodbtnpart").html(createBtnSizePart(newSize, "prodbtnsize", PREF_PROD_BTN_SIZE[l]));
$("#btnsizepartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setBtnSize",{btn:2,size:newSize},handleBtnSize,"Buttonsize");
binding();
});
$("#prefertmlabel").off('change').on('change', function(e) {
var newVal = $("#prefertmlabel").find(":selected").val();
$("#prefertmbtnpart").html(createPreferTMPart(newVal, "prefertmlabel", PREF_TM[l]));
$("#prefertmpartbox").trigger("create");
2020-11-19 22:48:24 +01:00
doAjax("POST","php/contenthandler.php?module=admin&command=setPreferTableMap",{prefertablemap:newVal},handleGeneralAnswer,"Table Map");
binding();
});
2020-11-19 23:03:35 +01:00
$("#preferimgdesklabel").off('change').on('change', function(e) {
var newVal = $("#preferimgdesklabel").find(":selected").val();
$("#preferimgdeskbtnpart").html(createPreferImgPart(newVal, "preferimgdesklabel", PREF_IMG_DESK[l]));
2020-11-19 23:03:38 +01:00
$("#preferimgpartbox").trigger("create");
2020-11-19 23:03:35 +01:00
doAjax("POST","php/contenthandler.php?module=admin&command=setPreferimgdesk",{preferredvalue:newVal},handleGeneralAnswer,"Produktbilder Desktop");
binding();
});
$("#preferimgmobilelabel").off('change').on('change', function(e) {
var newVal = $("#preferimgmobilelabel").find(":selected").val();
$("#preferimgmobilebtnpart").html(createPreferImgPart(newVal, "preferimgmobilelabel", PREF_IMG_MOBILE[l]));
2020-11-19 23:03:38 +01:00
$("#preferimgpartbox").trigger("create");
2020-11-19 23:03:35 +01:00
doAjax("POST","php/contenthandler.php?module=admin&command=setPreferimgmobile",{preferredvalue:newVal},handleGeneralAnswer,"Produktbilder Mobil");
binding();
});
2020-11-19 23:10:06 +01:00
// setPreferfixbtns
$("#preferfixbtnslabel").off('change').on('change', function(e) {
var newVal = $("#preferfixbtnslabel").find(":selected").val();
fillPreferfixbtns(newVal);
doAjax("POST","php/contenthandler.php?module=admin&command=setPreferfixbtns",{preferredvalue:newVal},handleGeneralAnswer,"Fix-Buttons");
binding();
});
2020-11-19 23:03:38 +01:00
$("#prefershowplusminuslabel").off('change').on('change', function(e) {
var newVal = $("#prefershowplusminuslabel").find(":selected").val();
$("#prefershowplusminusbtnpart").html(createPreferImgPart(newVal, "prefershowplusminuslabel", PREF_SHOW_PLUS_MINUS[l]));
$("#preferimgpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setPrefershowplusminus",{preferredvalue:newVal},handleGeneralAnswer,"Mengenanwahlicons Mobil");
binding();
});
2020-11-19 23:03:35 +01:00
2020-11-19 22:48:24 +01:00
$("#preferktllabel").off('change').on('change', function(e) {
var newVal = $("#preferktllabel").find(":selected").val();
2020-11-19 22:53:50 +01:00
$("#preferktlbtnpart").html(createPreferKTLPart(newVal, "preferktllabel", PREF_KTL[l]));
2020-11-19 22:48:24 +01:00
$("#preferktlpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setKeepTypeLevel",{keeptypelevel:newVal},handleGeneralAnswer,"Keep Type Level");
2020-11-19 22:47:44 +01:00
binding();
});
2020-11-19 23:02:42 +01:00
$("#preferthemelabel").off('change').on('change', function(e) {
var newVal = $("#preferthemelabel").find(":selected").val();
$("#preferthemebtnpart").html(createPreferMobileThemePart(newVal, "preferthemelabel", PREF_THEME[l]));
$("#preferthemepartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setMobileTheme",{mobiletheme:newVal},reloadPageWithTimeout,"Mobile Theme");
binding();
});
2020-11-19 22:53:50 +01:00
$("#preferapplyposlabel").off('change').on('change', function(e) {
var newVal = $("#preferapplyposlabel").find(":selected").val();
$("#preferapplypospart").html(createPreferExtrasApplyBtnPosPart(newVal, "preferapplyposlabel", PREF_APPLY_EXTRA_POS[l]));
$("#preferktlpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setApplyExtrasBtnPos",{applyextrasbtnpos:newVal},handleGeneralAnswer,"Apply Extras Button Position");
binding();
});
2020-11-19 23:10:26 +01:00
$("#prefertablesaftersendlabel").off('change').on('change', function(e) {
var newVal = $("#prefertablesaftersendlabel").find(":selected").val();
$("#prefertablesaftersendpart").html(createPreferTablesAfterSendPart(newVal, "prefertablesaftersendlabel", PREF_TABLES_AFTER_SEND[l]));
$("#preferktlpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setTablesAfterSend",{tablesaftersend:newVal},handleGeneralAnswer,"Anwenden Auswahl nach Bestellübvermittlung");
binding();
});
2020-11-19 23:12:02 +01:00
$("#prefercalclabel").off('change').on('change', function(e) {
var newVal = $("#prefercalclabel").find(":selected").val();
$("#prefercalcpart").html(createPreferCalcPart(newVal, "prefercalclabel", PREF_CALC_PREF[l]));
$("#prefermiscpartbox").trigger("create");
doAjax("POST","php/contenthandler.php?module=admin&command=setPreferCalc",{preferredvalue:newVal},handleGeneralAnswer,"Anwenden Auswahl nach Bestellübvermittlung");
binding();
});
// prefercalclabel
2020-11-19 22:47:44 +01:00
}
$(document).on("pageinit", "#pref-page", function () {
initializeMainMenu("#modulemenu");
hideMenu();
getGeneralConfigItems();
setCurrentUserIntoMask();
setVolume();
setButtonSizes();
setPreferTablemap();
2020-11-19 22:48:24 +01:00
setKeepTypeLevel();
2020-11-19 23:02:42 +01:00
setMobileTheme();
2020-11-19 22:53:50 +01:00
setApplyBtnPos();
2020-11-19 23:10:26 +01:00
setTablesAfterSend();
2020-11-19 23:03:35 +01:00
setPreferimgdesk();
setPreferimgmobile();
2020-11-19 23:03:38 +01:00
setShowplusminus();
2020-11-19 23:10:06 +01:00
setPreferfixbtns();
2020-11-19 23:12:02 +01:00
setCalcMode();
2020-11-19 22:47:44 +01:00
binding();
});
</script>
2020-11-19 23:11:29 +01:00
<div data-role="page" id="pref-page" data-theme="c">
2020-11-19 22:47:44 +01:00
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay" class="noprint">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
2020-11-19 23:02:16 +01:00
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
2020-11-19 22:47:44 +01:00
</ul>
</div><!-- /panel -->
2020-11-19 23:11:29 +01:00
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint" style="background-color:black;">
2020-11-19 22:47:44 +01:00
<h1><span id=prefheader></span></span><span id="username"></span></h1>
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
2020-11-19 23:02:16 +01:00
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
2020-11-19 22:47:44 +01:00
</div>
</div>
<div data-role="content">
<div id="userpart" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id=passwordgen>Passwort</span></h3>
<form>
<span id=oldpassword>Altes Passwort:</span><input type="password" name="oldpassword" id="oldpass"/><br />
<span id=newpassword>Neues Passwort:</span><input type="password" name="newpassword" id="newpass"/><br />
<div id="changepassbtnpart"></div>
</form>
</div> <!-- Benutzerpasswort -->
<div id="volume" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="ordertonetxt">Orderton</span></h3>
<label for="slidervolume"><span id="voltxt">Lautstärke:</span></label>
<input type="range" name="slidervolume" id="slidervolume" value="0" min="0" max="10" />
</div>
<div id="languagebox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="languagetxt">Sprache</span></h3>
<div id="languagepart"></div>
</div>
<div id="receiptprinterpartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="printertxt">Kassendrucker</span></h3>
<div id="receiptprinterpart"></div>
</div>
<div id="btnsizepartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="btnsizetxt">Buttongrößen</span></h3>
<div id="roombtnpart"></div>
<div id="tablebtnpart"></div>
<div id="prodbtnpart"></div>
</div>
<div id="prefertmpartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="prefertmtxt">Tischplan</span></h3>
<div id="prefertmbtnpart"></div>
</div>
2020-11-19 23:03:35 +01:00
2020-11-19 23:03:38 +01:00
<div id="preferimgpartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="preferimgtxt">Bildanzeige</span></h3>
2020-11-19 23:03:35 +01:00
<div id="preferimgdeskbtnpart"></div>
<div id="preferimgmobilebtnpart"></div>
2020-11-19 23:03:38 +01:00
<div id="prefershowplusminusbtnpart"></div>
2020-11-19 23:03:35 +01:00
</div>
2020-11-19 22:47:44 +01:00
2020-11-19 22:48:24 +01:00
<div id="preferktlpartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
2020-11-19 22:53:50 +01:00
<h3><span id="preferktltxt">Bestellnavigation</span></h3>
<p><span id="preferktldesc">Beschreibung</span></p>
2020-11-19 22:48:24 +01:00
<div id="preferktlbtnpart"></div>
2020-11-19 22:53:50 +01:00
<div id="preferapplypospart"></div>
2020-11-19 23:10:26 +01:00
<div id="prefertablesaftersendpart"></div>
2020-11-19 22:48:24 +01:00
</div>
2020-11-19 22:47:44 +01:00
2020-11-19 23:02:42 +01:00
<div id="preferthemepartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="preferthemetxt">Mobil-Design</span></h3>
<p><div id="preferthemebtnpart"></div>
<div id="preferapplythemepart"></div>
2020-11-19 23:10:06 +01:00
<div id="preferfixbtnspart"></div>
2020-11-19 23:02:42 +01:00
<div id="preferthemehint">Reload nach einer Änderung drücken!</div>
</div>
2020-11-19 23:12:02 +01:00
<div id="prefermiscpartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3><span id="prefermisctxt">Versch.</span></h3>
<p><div id="prefercalcpart"></div>
</div>
2020-11-19 22:47:44 +01:00
</div>
2020-11-19 23:11:29 +01:00
<div data-role="footer" data-theme="b" id="thefooterr" style="background-color:black;">
2020-11-19 22:47:44 +01:00
<div class="ui-grid-a">
<div class="ui-block-a userinfo" id="loggedinuser"></div>
<div class="ui-block-b grid_right" id="versioninfo"></div>
</div><!-- /grid-a -->
</div> <!-- footer -->
2020-11-19 23:12:02 +01:00
<div data-role="popup" id="passwordchangedpopup" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
2020-11-19 22:47:44 +01:00
<div data-role="header" class="ui-corner-top">
2020-11-19 23:10:06 +01:00
<h1>Passwortänderung</h1>
2020-11-19 22:47:44 +01:00
</div>
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right"></a>
<div data-role="content" class="ui-corner-bottom ui-content">
<p><span id="PASSWORD_CHANGED">Das Passwort wurde geändert.</span></p>
</div>
</div> <!-- popup for changed password -->
2020-11-19 23:12:02 +01:00
<div data-role="popup" id="passwordnotchangedpopup" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
2020-11-19 22:47:44 +01:00
<div data-role="header" class="ui-corner-top">
<h1>Passwortänderung</h1>
</div>
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right"></a>
<div data-role="content" class="ui-corner-bottom ui-content">
<p><span id="OLDPASSW_WRONG">Das Passwort konnte nicht geändert werden. Bitte prüfen Sie, ob das alte Passwort korrekt eingegeben wurde.</span></p>
</div>
</div> <!-- popup for failed password change -->
</div>
</body>
</html>