| | |
| | | /* --- Menüfunktionen --- */ |
| | | |
| | | function app_nachricht_test() { |
| | | app_dialog_laden_und_zeigen(templateCache[TPL_DLG_MSG], 'data/msg-test.json'); |
| | | app_dialog_laden_und_zeigen( |
| | | templateCache[TPL_DLG_MSG], 'data/msg-test.json'); |
| | | app_menu_toggle(); |
| | | } |
| | | |
| | |
| | | Mustache.render(templateCache[TPL_SENDER], senderliste)); |
| | | $('.sender-kachel').on('click', function() { |
| | | var kachel = $( this ); |
| | | var senderId = kachel.attr("sid"); |
| | | var senderId = $(kachel).attr("sid"); |
| | | var senderName = $(kachel).find(".sender-name").text(); |
| | | var senderUrl = $(kachel).attr("data-verweis"); |
| | | var senderLogo = $(kachel).find("img").attr("src"); |
| | | var s = new Sender(senderId, senderName, senderUrl, senderLogo); |
| | | switch (senderKlickModus) { |
| | | case "1": |
| | | break; |
| | | case "2": |
| | | $(".dlg-behaelter").html( |
| | | Mustache.render(templateCache[TPL_SENDER_EDIT_FORM], '') |
| | | Mustache.render(templateCache[TPL_SENDER_EDIT_FORM], s) |
| | | ); |
| | | $('#sender-speichern').on('click', function() { |
| | | $('#sender-speichern').off('click'); |
| | |
| | | break; |
| | | default: |
| | | app_meldung_mit_timeout( |
| | | 'Sender ' + senderName + ', ID ' + senderId, |
| | | 'Sender ' + s.name + ', ID ' + s.id, |
| | | 1500 |
| | | ); |
| | | break; |
| | |
| | | templateCache[tname] = template; |
| | | }); |
| | | } |
| | | |
| | | /* Objekte */ |
| | | |
| | | function Sender(i, n, u, l) { |
| | | this.id = i; |
| | | this.name = n; |
| | | this.url = u; |
| | | this.logo = l; |
| | | } |