From ceb15c426f081e89608c31d625d71759aff5e072 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Mon, 26 Feb 2018 22:37:12 +0000 Subject: [PATCH] Sender aendern und DbApi --- web/app.js | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/web/app.js b/web/app.js index 4670e93..e2a07e8 100644 --- a/web/app.js +++ b/web/app.js @@ -203,7 +203,11 @@ ); $('#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); }); @@ -467,6 +471,14 @@ }, "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) { -- Gitblit v1.9.3