From 6b63ff8c8429e328aa3ad90868e69ba28b28ef63 Mon Sep 17 00:00:00 2001
From: ulrich <undisclosed>
Date: Sun, 25 Feb 2018 18:30:07 +0000
Subject: [PATCH] Senderkacheln auf Transit-Antwort umgestellt

---
 web/data/sender-transit-beispiel.json |   20 ++++++++++++++++++++
 web/data/tpl/sender-transit.tpl       |   10 ++++++++++
 web/app.js                            |    5 +++--
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/web/app.js b/web/app.js
index d3613cf..4670e93 100644
--- a/web/app.js
+++ b/web/app.js
@@ -36,7 +36,8 @@
   // 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);
@@ -373,7 +374,7 @@
 
 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 ) {
diff --git a/web/data/sender-transit-beispiel.json b/web/data/sender-transit-beispiel.json
new file mode 100644
index 0000000..72de9a1
--- /dev/null
+++ b/web/data/sender-transit-beispiel.json
@@ -0,0 +1,20 @@
+{"List": [
+  {
+    "id": 1,
+    "name": "test5",
+    "url": "test5",
+    "logo": "test5"
+  },
+  {
+    "id": 2,
+    "name": "test6",
+    "url": "test6",
+    "logo": "test6"
+  },
+  {
+    "id": 3,
+    "name": "test",
+    "url": "test",
+    "logo": "../bilder/tabletop_radio.png"
+  }
+]}
diff --git a/web/data/tpl/sender-transit.tpl b/web/data/tpl/sender-transit.tpl
new file mode 100644
index 0000000..25a7f77
--- /dev/null
+++ b/web/data/tpl/sender-transit.tpl
@@ -0,0 +1,10 @@
+<div id="sender" class="sender">
+{{#List}}
+  <div class="sender-kachel" sid="{{id}}" data-verweis="{{url}}">
+    <div class="sender-name">{{name}}</div>
+    <div class="sender-bild-behaelter">
+      <img class="sender-bild" src="{{logo}}">
+    </div>
+  </div>
+{{/List}}
+</div>

--
Gitblit v1.9.3