| | |
| | | // Templates laden |
| | | app_get_template('data/tpl/dlg-msg.tpl', TPL_DLG_MSG); |
| | | app_get_template('data/tpl/dlg-info.tpl', TPL_DLG_INFO); |
| | | app_get_template('data/tpl/sender.tpl', TPL_SENDER); |
| | | //app_get_template('data/tpl/sender.tpl', TPL_SENDER); |
| | | app_get_template('data/tpl/sender-transit.tpl', TPL_SENDER); |
| | | app_get_template('data/tpl/dlg-sender-neu.tpl', TPL_DLG_SENDER_NEU); |
| | | app_get_template('data/tpl/dlg-sender-edit.tpl', TPL_DLG_SENDER_EDIT); |
| | | app_get_template('data/tpl/dlg-sender-loeschen.tpl', TPL_DLG_SENDER_DEL); |
| | |
| | | ); |
| | | $('#sender-speichern').on('click', function() { |
| | | $('#sender-speichern').off('click'); |
| | | app_kachel_anpassen(app_sender_dialog_lesen(senderId)); |
| | | var sender = app_sender_dialog_lesen(senderId); |
| | | |
| | | app_sender_aendern(sender); |
| | | |
| | | app_kachel_anpassen(sender); |
| | | app_dialog_schliessen(); |
| | | app_meldung_mit_timeout('Speichern gewaehlt', 1500); |
| | | }); |
| | |
| | | |
| | | function app_get_sender() { |
| | | $.ajax({ |
| | | url: "data/sender.json", |
| | | url: "api?c=de.uhilger.radiozentrale.api.SenderApi&m=senderliste&f=JSONNICE", |
| | | type: "GET", |
| | | dataType : "json" |
| | | }).done(function( senderliste ) { |
| | |
| | | }, "json"); |
| | | } |
| | | |
| | | function app_sender_aendern(sender) { |
| | | var obj = serialisieren(sender); |
| | | var url = 'api?c=de.uhilger.radiozentrale.api.SenderApi&m=senderAendern'; |
| | | $.post( url, 'p=' + obj, function( result ) { |
| | | console.log( result ); |
| | | }, "json"); |
| | | } |
| | | |
| | | /* Hilfsfunktionen */ |
| | | |
| | | function serialisieren(obj) { |