| | |
| | | var prefsRendered = false; |
| | | |
| | | function app_init() { |
| | | $('.dialog').hide(); |
| | | $('.ost').hide(); |
| | | app_menu_init("menu/", "hauptmenue.json", "../jslib/app-menu/app-menu.tpl", ".west"); |
| | | app_get_template('tpl/sender.tpl', TPL_SENDER); |
| | | //app_get_template('tpl/prefs.tpl', 'prefs'); |
| | | $('.sued').text('Bereit.'); |
| | | setTimeout(function() { |
| | | $("#sender").html(Mustache.render(templateCache[TPL_SENDER], '')); |
| | | app_get_sender(); |
| | | }, 200); |
| | | } |
| | | |
| | | function app_nachricht_test() { |
| | | $(".close-btn").on('click', function() { |
| | | $('.close-btn').attr('onclick','').unbind('click'); |
| | | $('.dialog').slideUp(300); |
| | | }); |
| | | $('.dialog').slideDown(300); |
| | | } |
| | | |
| | | /* --- Ajax-Aufrufe --- */ |
| | | |
| | | function app_get_sender() { |
| | | $.ajax({ |
| | | url: "api/sender.json", |
| | | type: "GET", |
| | | dataType : "json" |
| | | }).done(function( senderliste ) { |
| | | $("#sender").html(Mustache.render(templateCache[TPL_SENDER], senderliste)); |
| | | }); |
| | | } |
| | | |
| | | /* |
| | | Ein Template vom Server in den Cache laden |
| | | template_url - home.tpl, prefs.tpl, sender.tpl |