123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- $(document).ready(function() {
- $('#settingsForm').submit(function(event) {
- event.preventDefault();
-
- $.post("ajax/saveSettings.php", $("#settingsForm").serialize(), function(data) {
- $(".result").html(data);
- }).success(function(e) {
- $.smallBox({
- title: "Änderung erfolgreich",
- content: "Die Einstellungen zur Landingpage wurden übernommen und gespeichert.",
- color: "#739E73",
- icon: "fa fa-check",
- timeout: 5000
- });
- });
- });
- $('#logout').click(function(e) {
- $("#ajaxReq").html();
- });
- $('#allDls').click(function(e) {
- var loadData = $.ajax({
- method: "GET",
- url: "ajax/downloadOverview.php",
- beforeSend: function () {
- $('#ajaxReq').html('<h1 class="text-center"><i class="fa fa-refresh fa-spin"></i> Daten werden geladen</h1>')
- }
- });
-
- loadData.success(function(data) {
- $("#ajaxReq").html(data);
- });
-
- loadData.fail(function (jqXHR, textStatus) {
- alert("Request failed: " + textStatus);
- });
- e.preventDefault();
- });
-
- $('#allVisits').click(function(e) {
- var loadData = $.ajax({
- method: "GET",
- url: "ajax/visitorOverview.php",
- beforeSend: function () {
- $('#ajaxReq').html('<h1 class="text-center"><i class="fa fa-refresh fa-spin"></i> Daten werden geladen</h1>')
- }
- });
-
- loadData.done(function(data) {
- $("#ajaxReq").html(data);
- });
-
- loadData.fail(function (jqXHR, textStatus) {
- alert("Request failed: " + textStatus);
- });
- });
-
- });
|