From ffc8723ab4c70a7106fdad1d63b78d13c8c10b48 Mon Sep 17 00:00:00 2001 From: ulrich <not disclosed> Date: Fri, 05 Jan 2018 17:57:27 +0000 Subject: [PATCH] Sender bearbeiten begonnen (weiter in Arbeit) --- data/tpl/dlg-sender-edit.tpl | 11 ++--------- app.js | 17 +++++++++++++---- data/tpl/dlg-sender-edit-form.tpl | 8 ++++++++ data/tpl/dlg-sender-neu.tpl | 14 ++++++++++++++ app.css | 5 ++--- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/app.css b/app.css index fe0ac3b..97cb96f 100644 --- a/app.css +++ b/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 } /* diff --git a/app.js b/app.js index 653076d..718c27d 100644 --- a/app.js +++ b/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() { diff --git a/data/tpl/dlg-sender-edit-form.tpl b/data/tpl/dlg-sender-edit-form.tpl new file mode 100644 index 0000000..12546da --- /dev/null +++ b/data/tpl/dlg-sender-edit-form.tpl @@ -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> diff --git a/data/tpl/dlg-sender-edit.tpl b/data/tpl/dlg-sender-edit.tpl index 4f4759f..6652a65 100644 --- a/data/tpl/dlg-sender-edit.tpl +++ b/data/tpl/dlg-sender-edit.tpl @@ -1,14 +1,7 @@ <div class="dlg-sender-edit"> <span class="close-btn pointer-cursor">✖</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> diff --git a/data/tpl/dlg-sender-neu.tpl b/data/tpl/dlg-sender-neu.tpl new file mode 100644 index 0000000..8781c80 --- /dev/null +++ b/data/tpl/dlg-sender-neu.tpl @@ -0,0 +1,14 @@ +<div class="dlg-sender-neu"> + <span class="close-btn pointer-cursor">✖</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> -- Gitblit v1.9.3