| | |
| | | /* --- Menüfunktionen --- */ |
| | | |
| | | function app_nachricht_test() { |
| | | app_nachricht_zeigen(templateCache[TPL_DLG_MSG], 'data/msg-test.json'); |
| | | app_dialog_laden_und_zeigen(templateCache[TPL_DLG_MSG], 'data/msg-test.json'); |
| | | } |
| | | |
| | | function app_info_dialog_zeigen() { |
| | | app_nachricht_zeigen(templateCache[TPL_DLG_INFO], ''); |
| | | app_dialog_laden_und_zeigen(templateCache[TPL_DLG_INFO], ''); |
| | | } |
| | | |
| | | function app_neuer_sender() { |
| | | app_nachricht_zeigen(templateCache[TPL_DLG_SENDER], ''); |
| | | app_dialog_laden_und_zeigen(templateCache[TPL_DLG_SENDER], ''); |
| | | $('#sender-speichern').on('click', function() { |
| | | $('#sender-speichern').attr('onclick','').unbind('click'); |
| | | app_dialog_schliessen(); |
| | | $('.sued').text('Speichern gewaehlt'); |
| | | setTimeout(function() { |
| | | $('.sued').text('Bereit.'); |
| | | }, 1500); |
| | | }); |
| | | app_menu_toggle(); |
| | | } |
| | | |
| | | |
| | |
| | | function app_dialog_zeigen(vorlage, inhalt) { |
| | | $(".dialog").html(Mustache.render(vorlage, inhalt)); |
| | | $(".close-btn").on('click', function() { |
| | | app_dialog_schliessen(); |
| | | /* |
| | | $('.close-btn').attr('onclick','').unbind('click'); |
| | | $('.dialog').slideUp(300); |
| | | */ |
| | | }); |
| | | $('.dialog').slideDown(300); |
| | | } |
| | | |
| | | function app_dialog_schliessen() { |
| | | $('.close-btn').attr('onclick','').unbind('click'); |
| | | $('.dialog').slideUp(300); |
| | | } |
| | | |
| | | /* --- Ajax-Aufrufe --- */ |
| | |
| | | }); |
| | | } |
| | | |
| | | function app_nachricht_zeigen(vorlage, adresse) { |
| | | function app_dialog_laden_und_zeigen(vorlage, adresse) { |
| | | if(adresse !== '') { |
| | | $.ajax({ |
| | | url: adresse, |