From 3cecdc4706df6b06afefe2036ecbf4be8d6d7002 Mon Sep 17 00:00:00 2001
From: ulrich <not disclosed>
Date: Sat, 06 Jan 2018 18:30:38 +0000
Subject: [PATCH] Kachel anpassen an bearbeiteten Sender

---
 app.js  |   14 ++++++++++++++
 app.css |    1 -
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/app.css b/app.css
index d5a6a5a..44c697b 100644
--- a/app.css
+++ b/app.css
@@ -116,7 +116,6 @@
 }
 
 .sender-eingabe {
-  /* display: inline-block; */
   width: 80%;
 }
 
diff --git a/app.js b/app.js
index 842cccd..03240ef 100644
--- a/app.js
+++ b/app.js
@@ -32,6 +32,15 @@
   }, 200);
 }
 
+/* Senderliste */
+
+function app_kachel_anpassen(sender) {
+  var kachel = $( "div[sid='" + sender.id + "']" );
+  $(kachel).find(".sender-name").text(sender.name);
+  $(kachel).attr("data-verweis", sender.url);
+  $(kachel).find("img").attr("src", sender.logo);
+}
+
 /* --- Menüfunktionen --- */
 
 function app_nachricht_test() {
@@ -124,6 +133,11 @@
             );
             $('#sender-speichern').on('click', function() {
               $('#sender-speichern').off('click');
+              var nameNeu = $("#sender-name").val();
+              var logoNeu = $("#sender-logo").val();
+              var urlNeu = $("#sender-url").val();
+              var sNeu = new Sender(senderId, nameNeu, urlNeu, logoNeu);
+              app_kachel_anpassen(sNeu);
               app_dialog_schliessen();
               app_meldung_mit_timeout('Speichern gewaehlt', 1500);
             });

--
Gitblit v1.9.3