Entitaet Geraet hinzugenommen, Aenderungen an Menues und UI
3 files added
5 files modified
| | |
| | | |
| | | /** |
| | | * |
| | | * Beispiele |
| | | * HTTP GET http://192.168.178.64/relay/0 liefert {"ison":false,"has_timer":false,"overpower":false} |
| | | * |
| | | * @author Ulrich Hilger |
| | | */ |
| | | public class Geraet implements Entity { |
| | | |
| | | private String name; |
| | | private String einUrl; |
| | | private String ausUrl; |
| | | private String statusUrl; |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | |
| | | return name; |
| | | } |
| | | |
| | | public String getEinUrl() { |
| | | return einUrl; |
| | | } |
| | | |
| | | public void setEinUrl(String einUrl) { |
| | | this.einUrl = einUrl; |
| | | } |
| | | |
| | | public String getAusUrl() { |
| | | return ausUrl; |
| | | } |
| | | |
| | | public void setAusUrl(String ausUrl) { |
| | | this.ausUrl = ausUrl; |
| | | } |
| | | |
| | | public String getStatusUrl() { |
| | | return statusUrl; |
| | | } |
| | | |
| | | public void setStatusUrl(String statusUrl) { |
| | | this.statusUrl = statusUrl; |
| | | } |
| | | |
| | | } |
| | |
| | | import java.io.IOException; |
| | | import java.util.logging.Logger; |
| | | import de.uhilger.mediaz.entity.Entity; |
| | | import de.uhilger.mediaz.entity.Geraet; |
| | | import de.uhilger.mediaz.entity.Livestream; |
| | | import de.uhilger.mediaz.entity.Titel; |
| | | import java.util.ArrayList; |
| | |
| | | public static final String ST_ABSPIELER = "Abspieler"; |
| | | public static final String ST_ABSPIELLISTE = "Abspielliste"; |
| | | public static final String ST_LIVESTREAM = "Livestream"; |
| | | public static final String ST_GERAET = "Geraet"; |
| | | |
| | | private final String fileBase; |
| | | |
| | |
| | | TypeToken<Abspieler> ttAbspieler = new TypeToken<Abspieler>() {}; |
| | | TypeToken<Abspielliste> ttAbspielliste = new TypeToken<Abspielliste>() {}; |
| | | TypeToken<Livestream> ttLivestream = new TypeToken<Livestream>() {}; |
| | | TypeToken<Geraet> ttGeraet = new TypeToken<Geraet>() {}; |
| | | TypeToken<Titel> ttTitel = new TypeToken<Titel>() {}; |
| | | types = new HashMap(); |
| | | types.put(Ablageort.class.getSimpleName(), ttAblageort); |
| | |
| | | types.put(Abspielliste.class.getSimpleName(), ttAbspielliste); |
| | | types.put(Titel.class.getSimpleName(), ttTitel); |
| | | types.put(Livestream.class.getSimpleName(), ttLivestream); |
| | | types.put(Geraet.class.getSimpleName(), ttGeraet); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | { |
| | | "menue": { |
| | | "menuetitel": "Einstellungen", |
| | | "wurzel": false, |
| | | "vorgaenger": { |
| | | "vtitel": "Hauptmenü", |
| | | "vverweis": "hauptmenue.json" |
| | | }, |
| | | "inhalt": [ |
| | | { |
| | | "titel": "Kataloge", |
| | | "umenue": false, |
| | | "funktion": "app.ablageort_liste" |
| | | }, |
| | | { |
| | | "titel": "Abspieler", |
| | | "umenue": false, |
| | | "funktion": "app.abspieler_liste" |
| | | }, |
| | | { |
| | | "titel": "Abspiellisten", |
| | | "umenue": false, |
| | | "funktion": "app.abspielliste_liste" |
| | | }, |
| | | { |
| | | "titel": "Livestreams", |
| | | "umenue": false, |
| | | "funktion": "app.livestream_liste" |
| | | }, |
| | | { |
| | | "titel": "Geraete", |
| | | "umenue": false, |
| | | "funktion": "app.geraet_liste" |
| | | }, |
| | | { |
| | | "titel": "Einstellungen", |
| | | "umenue": false, |
| | | "funktion": "app.prefs_liste" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | |
| | |
| | | "funktion": "app.livestream_selection" |
| | | }, |
| | | { |
| | | "titel": "", |
| | | "umenue": false, |
| | | "funktion": "" |
| | | }, |
| | | { |
| | | "titel": "Abspielliste", |
| | | "umenue": false, |
| | | "funktion": "app.titel_liste" |
| | | }, |
| | | { |
| | | "titel": "Kataloge", |
| | | "umenue": false, |
| | | "funktion": "app.ablageort_liste" |
| | | }, |
| | | { |
| | | "titel": "Abspieler", |
| | | "umenue": false, |
| | | "funktion": "app.abspieler_liste" |
| | | }, |
| | | { |
| | | "titel": "Abspiellisten", |
| | | "umenue": false, |
| | | "funktion": "app.abspiellisten_liste" |
| | | }, |
| | | { |
| | | "titel": "Livestreams", |
| | | "umenue": false, |
| | | "funktion": "app.livestream_liste" |
| | | }, |
| | | { |
| | | "titel": "Einstellungen", |
| | | "umenue": false, |
| | | "funktion": "app.prefs_liste" |
| | | }, |
| | | { |
| | | "titel": "", |
| | | "umenue": false, |
| | | "funktion": "" |
| | | "umenue": true, |
| | | "verweis": "einstellungen.json" |
| | | }, |
| | | { |
| | | "titel": "Info", |
New file |
| | |
| | | <form> |
| | | <div class="entity-formular"> |
| | | <input name="name" class="entity-element" type="text" id="geraet-name" placeholder="Name" value="{{name}}" /> |
| | | <input name="einUrl" class="entity-element" type="text" id="geraet-einurl" placeholder="URL (Ein)" value="{{einUrl}}" /> |
| | | <input name="ausUrl" class="entity-element" type="text" id="geraet-ausurl" placeholder="URL (Aus)" value="{{ausUrl}}" /> |
| | | <input name="statusUrl" class="entity-element" type="text" id="geraet-statusurl" placeholder="URL (Status)" value="{{statusUrl}}" /> |
| | | <div class="entity-buttons"> |
| | | <button type="submit" class="button-primary" id="ok-btn">Speichern</button> |
| | | <button class="button" id="cancel-btn">Abbrechen</button> |
| | | <button class="button" id="loeschen-btn">Löschen</button> |
| | | </div> |
| | | </div> |
| | | </form> |
New file |
| | |
| | | <div class='entity-formular'> |
| | | <ul class='entity-liste'> |
| | | {{#ArrayList}} |
| | | <li class='entity-eintrag'>{{.}}</li> |
| | | {{/ArrayList}} |
| | | </ul> |
| | | </div> |
| | |
| | | <a id="mi-listen"><i class="icon-list"></i> Abspiellisten</a> |
| | | <a id="mi-orte"><i class="icon-database"></i> Kataloge</a> |
| | | <a id="mi-player"><i class="icon-play"></i> Abspieler</a> |
| | | <a id="mi-live"><i class="icon-ellipsis-vert"></i> Livestream</a> |
| | | <a id="mi-live"><i class="icon-ellipsis-vert"></i> Livestreams</a> |
| | | <a id="mi-devices"><i class="icon-ellipsis-vert"></i> Geräte</a> |
| | | <a id="mi-prefs"><i class="icon-sliders"></i> Einstellungen</a> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="zentrum-behaelter"> |
| | | <!-- Einblendbereich oben --> |
| | | <div class="dialog"></div> |
| | | <div class="top-band"> |
| | | <div class="breadcrumb-behaelter">Breadcrumb hier</div> |
| | | <div class="bereich-name">Name des Bereichs</div> |
| | | </div> |
| | | <div class="dialog"></div> |
| | | <!-- zentraler Inhaltsbereich --> |
| | | <div class="zentrum"> |
| | | <div class="zentraler-inhalt"> |
| | |
| | | self.addEvtListener('#mi-listen', 'click', self.abspielliste_liste); |
| | | self.addEvtListener('#mi-list', 'click', self.titel_liste); |
| | | self.addEvtListener('#mi-live', 'click', self.livestream_liste); |
| | | self.addEvtListener('#mi-devices', 'click', self.geraet_liste); |
| | | |
| | | self.fusszeile_umschalten(); |
| | | self.seitenleiste_umschalten(); |
| | |
| | | } |
| | | }; |
| | | |
| | | this.geraet_liste = function() { |
| | | self.entitaet_liste('Geräte','../api/store/Geraet/liste/', |
| | | "data/tpl/geraet_liste.txt", '../api/store/Geraet/', |
| | | "self.geraet_form", function(responseText) { |
| | | var geraet = JSON.parse(responseText); |
| | | self.geraet_form(geraet); |
| | | }); |
| | | }; |
| | | |
| | | this.ablageort_liste = function() { |
| | | self.entitaet_liste('Kataloge','../api/store/Ablageort/liste/', |
| | | "data/tpl/ablageort_liste.txt", '../api/store/Ablageort/', |
| | |
| | | "data/tpl/form_livestream.txt", '../api/store/Livestream/', |
| | | '#livestream-name', function() { |
| | | self.livestream_liste(); |
| | | }); |
| | | }; |
| | | |
| | | this.geraet_form = function(ge) { |
| | | self.entitaet_form('Gerät', ge, ge.name, |
| | | "data/tpl/form_geraet.txt", '../api/store/Geraet/', |
| | | '#geraet-name', function() { |
| | | self.geraet_liste(); |
| | | }); |
| | | }; |
| | | |
| | |
| | | this.titelAnzName = t; |
| | | this.album = a; |
| | | } |
| | | |
| | | function Geraet(n, e, a, s) { |
| | | this.name = n; |
| | | this.einUrl = e; |
| | | this.ausUrl = a; |
| | | this.statusUrl = s; |
| | | } |