| | |
| | | */ |
| | | $('#sender-loeschen').on('click', function() { |
| | | $('#sender-loeschen').off('click'); |
| | | |
| | | app_sender_entfernen(s); |
| | | |
| | | app_kachel_entfernen(s); |
| | | app_dialog_schliessen(); |
| | | app_meldung_mit_timeout('Loeschen gewaehlt ' + s.name, 1500); |
| | |
| | | }); |
| | | } |
| | | |
| | | /* SenderApi */ |
| | | |
| | | var URL_SENDER_API = "api?c=de.uhilger.radiozentrale.api.SenderApi&m="; |
| | | |
| | | function app_neuen_sender_speichern(sender) { |
| | | var obj = serialisieren(sender); |
| | | var url = 'api?c=de.uhilger.radiozentrale.api.SenderApi&m=neuerSender'; |
| | | $.post( url, 'p=' + obj, function( result ) { |
| | | console.log( result ); |
| | | }, "json"); |
| | | app_sender_api('neuerSender', sender); |
| | | } |
| | | |
| | | function app_sender_aendern(sender) { |
| | | app_sender_api('senderAendern', sender); |
| | | } |
| | | |
| | | function app_sender_entfernen(sender) { |
| | | app_sender_api('senderLoeschen', sender); |
| | | } |
| | | |
| | | function app_sender_api(methode, sender) { |
| | | var obj = serialisieren(sender); |
| | | var url = 'api?c=de.uhilger.radiozentrale.api.SenderApi&m=senderAendern'; |
| | | var url = URL_SENDER_API + methode; |
| | | $.post( url, 'p=' + obj, function( result ) { |
| | | console.log( result ); |
| | | }, "json"); |