Bedienoberfläche für Webradio
ulrich
2018-01-05 ffc8723ab4c70a7106fdad1d63b78d13c8c10b48
Sender bearbeiten begonnen (weiter in Arbeit)
3 files modified
2 files added
55 ■■■■ changed files
app.css 5 ●●●●● patch | view | raw | blame | history
app.js 17 ●●●● patch | view | raw | blame | history
data/tpl/dlg-sender-edit-form.tpl 8 ●●●●● patch | view | raw | blame | history
data/tpl/dlg-sender-edit.tpl 11 ●●●● patch | view | raw | blame | history
data/tpl/dlg-sender-neu.tpl 14 ●●●●● patch | view | raw | blame | history
app.css
@@ -105,9 +105,8 @@
  text-align: right;
}
.dlg-sender-edit {
  /* background-color: #f6f6f6; // grau */
  background-color: #dcf2fb; // blau
.dlg-sender-edit, .dlg-sender-neu {
  background-color: #f6f6f6; // grau
}
/*
app.js
@@ -3,7 +3,8 @@
var TPL_SENDER = 'sender';
var TPL_DLG_MSG = 'dlg-msg';
var TPL_DLG_INFO = 'dlg-info';
var TPL_DLG_SENDER = 'dlg-sender';
var TPL_DLG_SENDER_NEU = 'dlg-sender-neu';
var TPL_DLG_SENDER_EDIT = 'dlg-sender-edit';
var templateCache = {}; // mustache templates
var prefsRendered = false;
@@ -14,7 +15,8 @@
  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/dlg-sender-edit.tpl', TPL_DLG_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('tpl/prefs.tpl', 'prefs');
  $('.sued').text('Bereit.');
  setTimeout(function() {
@@ -35,7 +37,7 @@
}
function app_neuer_sender() {
  app_dialog_laden_und_zeigen(templateCache[TPL_DLG_SENDER], '');
  app_dialog_laden_und_zeigen(templateCache[TPL_DLG_SENDER_NEU], '');
  $('#sender-speichern').on('click', function() {
    $('#sender-speichern').attr('onclick','').unbind('click');
    app_dialog_schliessen();
@@ -45,8 +47,15 @@
}
function app_sender_bearbeiten() {
  app_meldung_mit_timeout('Nicht implementiert: Sender bearbeiten.', 1500);
  app_dialog_laden_und_zeigen(templateCache[TPL_DLG_SENDER_EDIT], '');
  app_menu_toggle();
  /*
  $('#sender-speichern').on('click', function() {
    $('#sender-speichern').attr('onclick','').unbind('click');
    app_dialog_schliessen();
    app_meldung_mit_timeout('Speichern gewaehlt', 1500);
  });
  */
}
function app_sender_loeschen() {
data/tpl/dlg-sender-edit-form.tpl
New file
@@ -0,0 +1,8 @@
<form>
  <input id="sender-name" placeholder="Name" type="text" class="sender-eingabe"></br>
  <input id="sender-logo" placeholder="Logo" type="text" class="sender-eingabe"></br>
  <input id="sender-url" placeholder="URL" type="text" class="sender-eingabe"></br>
  <div class="form-button-footer">
    <button type="button" id="sender-speichern">Speichern</button>
  </div>
</form>
data/tpl/dlg-sender-edit.tpl
@@ -1,14 +1,7 @@
<div class="dlg-sender-edit">
  <span class="close-btn pointer-cursor">&#10006;</span>
  <div class="dlg-behaelter">
    <div class="dlg-sender-titel">Neuer Sender</div>
    <form>
      <input id="sender-name" placeholder="Name" type="text" class="sender-eingabe"></br>
      <input id="sender-logo" placeholder="Logo" type="text" class="sender-eingabe"></br>
      <input id="sender-url" placeholder="URL" type="text" class="sender-eingabe"></br>
      <div class="form-button-footer">
        <button type="button" id="sender-speichern">Speichern</button>
      </div>
    </form>
    <div class="dlg-sender-titel">Sender bearbeiten</div>
    <div class="dlg-sender-text">Sender zum Bearbeiten antippen...</div>
  </div>
</div>
data/tpl/dlg-sender-neu.tpl
New file
@@ -0,0 +1,14 @@
<div class="dlg-sender-neu">
  <span class="close-btn pointer-cursor">&#10006;</span>
  <div class="dlg-behaelter">
    <div class="dlg-sender-titel">Neuer Sender</div>
    <form>
      <input id="sender-name" placeholder="Name" type="text" class="sender-eingabe"></br>
      <input id="sender-logo" placeholder="Logo" type="text" class="sender-eingabe"></br>
      <input id="sender-url" placeholder="URL" type="text" class="sender-eingabe"></br>
      <div class="form-button-footer">
        <button type="button" id="sender-speichern">Speichern</button>
      </div>
    </form>
  </div>
</div>