ordersprinter/preferences.html

161 lines
5.8 KiB
HTML

<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=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="css/bestformat.css">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<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" />
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js"></script>
</head>
<body>
<script>
function doAjaxPasswordChange(oldPass,newPass,errorMsg) {
var data = {
oldPass: oldPass,
newPass: newPass
};
doAjax("POST","php/contenthandler.php?module=admin&command=changeOwnPassword",data,changePassword,"Passwortproblem");
}
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 fillOrderVolume(volume) {
$("#slidervolume").val(volume);
$("#slidervolume").slider('refresh');
}
function binding() {
// Help buttons
$("#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");
});
}
//pageinit event for first page
//triggers only once
//write all your on-load functions and event handlers pertaining to page1
$(document).on("pageinit", "#admin-page", function () {
initializeMainMenu("#modulemenu");
hideMenu();
binding();
setCurrentUserIntoMask();
setVolume();
});
</script>
<!--
Seitenstruktur:
General settings
MwSt-Satz:
Abrechnung:
Tagesabrechung:
Erstellung neue Abrechnung
<Liste der alten Abrechungen>
Druck - csv-Export
-->
<div data-role="page" id="admin-page">
<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">
<li data-role="list-divider" data-theme="b" data-role="heading">Module</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
<h1>Persönliche Einstellungen für <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">
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
</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>Passwort</h3>
<form action="php/contenthandler.php?module=admin&command=changeOwnPassword" method="post">
Altes Passwort: <input type="password" name="oldpassword" id="oldpass"/><br />
Neues Passwort: <input type="password" name="newpassword" id="newpass"/><br />
<input type="submit" value="Passwort ändern" data-theme="d" id="changepasswordbutton"/>
</form>
</div> <!-- Benutzerpasswort -->
<div id="volume" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
<h3>Orderton</h3>
<label for="slidervolume">Lautstärke:</label>
<input type="range" name="slidervolume" id="slidervolume" value="0" min="0" max="10" />
</div>
</div>
<div data-role="footer" data-theme="b" id="thefooterr">
<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 -->
<div data-role="popup" id="passwordchangedpopup" name="passwordchangedpopup" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
<div data-role="header" class="ui-corner-top">
<h1>Passwordä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>Das Passwort wurde geändert.</p>
</div>
</div> <!-- popup for changed password -->
<div data-role="popup" id="passwordnotchangedpopup" name="passwordnotchangedpopup" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
<div data-role="header" class="ui-corner-top">
<h1>Passwordä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>Das Passwort konnte nicht geändert werden. Bitte prüfen Sie, ob das alte Passwort korrekt eingegeben wurde.</p>
</div>
</div> <!-- popup for failed password change -->
</div>
</body>
</html>