Sender-ID und Klick-Funktion für Senderkacheln hinzugefügt
| | |
| | | margin: 0.4em; |
| | | padding: 0.4em; |
| | | background-color: white; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .sender-name { |
| | |
| | | function app_init() { |
| | | $('.dialog').hide(); |
| | | $('.ost').hide(); |
| | | app_menu_init("data/menu/", "hauptmenue.json", "../jslib/app-menu/app-menu.tpl", ".west", "8em"); |
| | | app_menu_init( |
| | | "data/menu/", |
| | | "hauptmenue.json", |
| | | "../jslib/app-menu/app-menu.tpl", |
| | | ".west", |
| | | "8em"); |
| | | 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); |
| | |
| | | function app_neuer_sender() { |
| | | app_dialog_laden_und_zeigen(templateCache[TPL_DLG_SENDER_NEU], ''); |
| | | $('#sender-speichern').on('click', function() { |
| | | $('#sender-speichern').attr('onclick','').unbind('click'); |
| | | $('#sender-speichern').off('click'); |
| | | app_dialog_schliessen(); |
| | | app_meldung_mit_timeout('Speichern gewaehlt', 1500); |
| | | }); |
| | |
| | | } |
| | | |
| | | function app_dialog_schliessen() { |
| | | $('.close-btn').attr('onclick','').unbind('click'); |
| | | $('.close-btn').off('click'); |
| | | $('.dialog').slideUp(300); |
| | | } |
| | | |
| | |
| | | dataType : "json" |
| | | }).done(function( senderliste ) { |
| | | $(".sender-behaelter").html(Mustache.render(templateCache[TPL_SENDER], senderliste)); |
| | | $('.sender-kachel').on('click', function() { |
| | | var kachel = $( this ); |
| | | var senderId = kachel.attr("sid"); |
| | | var senderName = $(kachel).find(".sender-name").text(); |
| | | app_meldung_mit_timeout( |
| | | 'Sender ' + senderName + ', ID ' + senderId, |
| | | 1500); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | |
| | | "titel": "Senderliste", |
| | | "inhalt": [ |
| | | { |
| | | "senderid": 1, |
| | | "sendername": "hr info", |
| | | "senderurl": "http://hr-hrinfo-live.cast.addradio.de/hr/hrinfo/live/mp3/128/stream.mp3", |
| | | "senderlogo": "../bilder/hr-info.png" |
| | | }, |
| | | { |
| | | "senderid": 2, |
| | | "sendername": "radiobob", |
| | | "senderurl": "http://bob.hoerradar.de/radiobob-live-mp3-hq", |
| | | "senderlogo": "../bilder/radio-bob-logo-80.png" |
| | | }, |
| | | { |
| | | "senderid": 3, |
| | | "sendername": "hr3", |
| | | "senderurl": "http://hr-hrinfo-live.cast.addradio.de/hr/hrinfo/live/mp3/128/stream.mp3", |
| | | "senderlogo": "../bilder/hr3.png" |
| | | }, |
| | | { |
| | | "senderid": 4, |
| | | "sendername": "FFH", |
| | | "senderurl": "http://mp3.ffh.de/radioffh/hqlivestream.mp3", |
| | | "senderlogo": "../bilder/ffh.svg" |
| | |
| | | <div id="sender" class="sender"> |
| | | {{#senderliste}} |
| | | {{#inhalt}} |
| | | <div class="sender-kachel" data-verweis="{{senderurl}}"> |
| | | <div class="sender-kachel" sid="{{senderid}}" data-verweis="{{senderurl}}"> |
| | | <div class="sender-name">{{sendername}}</div> |
| | | <div class="sender-bild-behaelter"><img class="sender-bild" src="{{senderlogo}}"></div> |
| | | </div> |