mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
localStorage for i18n/access (#318)
* upd * upd * . * enumtr * cleanup * upd * update js * update html * hide buttons, if browser not comp, fix typo [skip ci] * fix empty effect name
This commit is contained in:
parent
9804a9b05e
commit
0d114ca728
@ -7,11 +7,8 @@
|
||||
<h4 data-i18n="conf_colors_label_intro">Color calibration, smoothing (color transistions) and detection of blackbars.</h4>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="col-lg-12">
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,10 +6,8 @@
|
||||
<h4 data-i18n="conf_effects_label_intro">Setting up a booteffect/color that is visible after Hyperion startup. Configure a background effect/color which is active, when all capture sources are disabled (also temporarily via Kodi Watch)</h4>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="col-lg-12">
|
||||
<div id='editor_container'></div>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
<div id='editor_container'></div>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,7 +6,6 @@
|
||||
<h4 data-i18n="effectsconfigurator_label_intro">Create out of the base effects new effects that are tuned to your liking. Depending on Effect there are options like color, speed, direction and more available.</h4>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default" >
|
||||
<div class="panel-heading">
|
||||
<label for="effectslist" data-i18n="effectsconfigurator_label_chooseeff">Choose Base-Effect:</label>
|
||||
@ -35,7 +34,6 @@
|
||||
<button class="btn btn-primary pull-right" id='btn_delete' data-i18n="effectsconfigurator_button_deleffect">Delete Effect</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,11 +7,8 @@
|
||||
<h4 data-i18n="conf_grabber_label_intro">Hyperion supports two ways on how to get captured pictures for processing and output. The platform grabber which captures internal at the device you are running Hyperion on (best qualitiy) and the USB Grabber which gathers from a connected device the necessary pictures (more calibration work and configuration).</h4>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="col-lg-12">
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -10,14 +10,10 @@
|
||||
<strong>HINT 1:</strong> In any case you need to enable the remote control for Kodi. Please checkout Wiki for instructions. LINK<br>
|
||||
<strong>HINT 2:</strong> If you just use a USB-Grabber you could enable the Kodi Watch for this separately at the USB-Grabber page.
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/content_kodi.js"></script>
|
||||
<script src="/js/content_kodi.js"></script>
|
||||
|
@ -98,14 +98,31 @@
|
||||
<div class="col-lg-6 col-md-12">
|
||||
|
||||
<div class="panel-group" id="accordion">
|
||||
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading headcollapse" data-toggle="collapse" data-parent="#accordion" data-target="#collapse4">
|
||||
<h4 class="panel-title">
|
||||
<a><i class="fa fa-wrench fa-fw"></i><span data-i18n="conf_leds_layout_generatedconf">Generated/Actual LED Configuration</span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse4" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<p data-i18n="conf_leds_layout_textf1">This textfield shows by default your current loaded layout and will be overwritten if you generate a new one above. Optional you could perform further edits.</p>
|
||||
<b><p data-i18n="conf_leds_layout_textf2">Don't forget to save!</p></b>
|
||||
<textarea rows="25" id="ledconfig" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="button" class="btn btn-warning" id="leds_custom_updsim" data-i18n="conf_leds_layout_button_updsim">Update preview</button>
|
||||
<button type="button" class="btn btn-success pull-right" id="leds_custom_save" data-i18n="conf_leds_layout_button_savelay">Save layout</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading headcollapse" data-toggle="collapse" data-parent="#accordion" data-target="#collapse1">
|
||||
<h4 class="panel-title">
|
||||
<a><i class="fa fa-television fa-fw"></i><span data-i18n="conf_leds_layout_frame">Classic Layout (LED Frame)</span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse1" class="panel-collapse collapse in">
|
||||
<div id="collapse1" class="panel-collapse collapse">
|
||||
<div class="panel-body ">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label col-md-6" for="ip_cl_ledstop" style="width:170px" data-i18n="conf_leds_layout_cl_top">Top</label>
|
||||
@ -218,21 +235,21 @@
|
||||
<div id="collapse2" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label col-md-6" for="ip_ma_ledshoriz" style="width:170px;max-width:200px" data-i18n="conf_leds_layout_ma_horiz">Horizontal</label>
|
||||
<label class="col-form-label col-md-6" for="ip_ma_ledshoriz" style="width:170px;" data-i18n="conf_leds_layout_ma_horiz">Horizontal</label>
|
||||
<div class=" input-group">
|
||||
<input class="form-control ledMAconstr" id="ip_ma_ledshoriz" type="number" value="10" min="1" step="1"></input>
|
||||
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label col-md-6" for="ip_ma_ledsvert" style="width:170px;max-width:200px" data-i18n="conf_leds_layout_ma_vert">Vertical</label>
|
||||
<label class="col-form-label col-md-6" for="ip_ma_ledsvert" style="width:170px;" data-i18n="conf_leds_layout_ma_vert">Vertical</label>
|
||||
<div class=" input-group">
|
||||
<input class="form-control ledMAconstr" id="ip_ma_ledsvert" type="number" value="10" min="1" step="1"></input>
|
||||
<div class="input-group-addon" data-i18n="edt_append_leds">LEDs</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label col-md-6" for="ip_ma_cabling" style="width:170px;max-width:200px" data-i18n="conf_leds_layout_ma_cabling">Cabling</label>
|
||||
<label class="col-form-label col-md-6" for="ip_ma_cabling" style="width:170px;" data-i18n="conf_leds_layout_ma_cabling">Cabling</label>
|
||||
<div class=" input-group">
|
||||
<select class="form-control ledMAconstr" id="ip_ma_cabling">
|
||||
<option value="snake" data-i18n="conf_leds_layout_ma_optsnake">Snake</option>
|
||||
@ -241,7 +258,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!--- <div class="form-group">
|
||||
<label class="col-form-label col-md-6" for="ip_ma_order" style="width:170px;max-width:200px" data-i18n="conf_leds_layout_ma_order">Order</label>
|
||||
<label class="col-form-label col-md-6" for="ip_ma_order" style="width:170px;" data-i18n="conf_leds_layout_ma_order">Order</label>
|
||||
<div class=" input-group">
|
||||
<select class="form-control ledMAconstr" id="ip_ma_order">
|
||||
<option value="horizontal" data-i18n="conf_leds_layout_ma_opthoriz">Horizontal</option>
|
||||
@ -251,7 +268,7 @@
|
||||
</div>
|
||||
--->
|
||||
<div class="form-group">
|
||||
<label class="col-form-label col-md-6" for="ip_ma_start" style="width:170px;max-width:200px" data-i18n="conf_leds_layout_ma_position">Input</label>
|
||||
<label class="col-form-label col-md-6" for="ip_ma_start" style="width:170px;" data-i18n="conf_leds_layout_ma_position">Input</label>
|
||||
<div class=" input-group">
|
||||
<select class="form-control ledMAconstr" id="ip_ma_start">
|
||||
<option value="top-left" data-i18n="conf_leds_layout_ma_opttopleft">Top left</option>
|
||||
@ -267,24 +284,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-primary" style="margin-bottom:5px">
|
||||
<div class="panel-heading headcollapse" data-toggle="collapse" data-parent="#accordion" data-target="#collapse4">
|
||||
<h4 class="panel-title">
|
||||
<a><i class="fa fa-wrench fa-fw"></i><span data-i18n="conf_leds_layout_generatedconf">Generated/Actual LED Configuration</span></a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse4" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<p data-i18n="conf_leds_layout_textf1">This textfield shows by default your current loaded layout and will be overwritten if you generate a new one above. Optional you could perform further edits.</p>
|
||||
<b><p data-i18n="conf_leds_layout_textf2">Don't forget to save!</p></b>
|
||||
<textarea rows="25" id="ledconfig" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="button" class="btn btn-warning" id="leds_custom_updsim" data-i18n="conf_leds_layout_button_updsim">Update preview</button>
|
||||
<button type="button" class="btn btn-success pull-right" id="leds_custom_save" data-i18n="conf_leds_layout_button_savelay">Save layout</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- accordion -->
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-12">
|
||||
@ -293,7 +292,7 @@
|
||||
<h4 class="panel-title"><i class="fa fa-search fa-fw"></i><span data-i18n="conf_leds_layout_peview">LED Layout preview</span></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="previewcreator"><span data-i18n="conf_leds_layout_preview_empty">No preview requested</span></div>
|
||||
<div id="previewcreator"></div>
|
||||
<div id="previewledcount"></div>
|
||||
<div class="col-lg-12 st_helper" style="padding-left:0px; padding-right:0px">
|
||||
<div id="leds_preview"></div>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
@ -7,14 +6,10 @@
|
||||
<h4 data-i18n="conf_network_label_intro">All network based settings are listed here.</h4>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="col-lg-12">
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/js/content_network.js"></script>
|
||||
|
15
assets/webconfig/content/webconfig.html
Normal file
15
assets/webconfig/content/webconfig.html
Normal file
@ -0,0 +1,15 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2 class="page-header"><i class="fa fa-wrench fa-fw"></i><span data-i18n="main_menu_webconfig_token">Webinterface</span></h2>
|
||||
<div class="introd">
|
||||
<h4 data-i18n="conf_webconfig_label_intro">Webinterface settings. Edit wisely</h4>
|
||||
</div>
|
||||
<hr />
|
||||
<div id='editor_container'/>
|
||||
<button class="btn btn-success" id='btn_submit' data-i18n="general_button_savesettings">Save Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/content_webconfig.js"></script>
|
@ -17,6 +17,8 @@
|
||||
"general_country_nl" : "Niederlande",
|
||||
"general_speech_de" : "Deutsch",
|
||||
"general_speech_en" : "Englisch",
|
||||
"general_access_default" : "Standard",
|
||||
"general_access_expert" : "Experte",
|
||||
"general_comp_SMOOTHING" : "Glättung",
|
||||
"general_comp_BLACKBORDER" : "Schwarze Balken Erkennung",
|
||||
"general_comp_KODICHECKER" : "Kodi Überwachung",
|
||||
@ -26,6 +28,9 @@
|
||||
"general_comp_GRABBER" : "Plattform Aufnahme",
|
||||
"general_comp_V4L" : "USB Aufnahme",
|
||||
"general_button_savesettings" : "Einstellungen speichern",
|
||||
"general_btn_ok" : "OK",
|
||||
"general_btn_abort" : "Abbrechen",
|
||||
"general_btn_save" : "Speichern",
|
||||
"dashboard_label_intro" : "Das Dashboard zeigt dir Informationen zum Systemstatus, ob Updates verfügbar sind, den Komponentenstatus sowie die letzten Blog-Posts vom Hyperion Team.",
|
||||
"dashboard_infobox_label_title" : "Information",
|
||||
"dashboard_infobox_label_currenthyp" : "Deine Hyperion Version:",
|
||||
@ -55,6 +60,7 @@
|
||||
"main_menu_system_token" : "System",
|
||||
"main_menu_input_selection_token" : "Eingabeauswahl",
|
||||
"main_menu_logging_token" : "Protokoll",
|
||||
"main_menu_webconfig_token" : "Webkonfiguration",
|
||||
"conf_effects_label_intro" : "Stelle einen Effekt oder Farbe ein, der beim Starten sichtbar sein soll. Stelle einen Hintergrundeffekt/Farbe ein der erst sichtbar wird, wenn alle Bildquellen abgeschaltet sind (Das gilt ebenfalls für temporäres abschalten mithilfe der Kodi Überwachung).",
|
||||
"conf_leds_label_intro" : "Der LED Hardware Bereich ermöglicht eine Vielzahl von Ausgabemöglichkeiten über Raspberry Pi GPIO, USB oder Netzwerk. Erstelle ein LED Layout das zu deinem Aufbau passt und schon kann es losgehen!",
|
||||
"conf_leds_nav_label_ledcontroller" : "LED Steuerung",
|
||||
@ -78,7 +84,6 @@
|
||||
"conf_leds_layout_preview_originTEXT" : "Erstellt von: Textfeld",
|
||||
"conf_leds_layout_preview_originMA" : "Erstellt von: Matrix Layout (LED Wand)",
|
||||
"conf_leds_layout_preview_totalleds" : "LEDs gesamt: $1",
|
||||
"conf_leds_layout_preview_empty" : "Es wurde keine Vorschau angefordert",
|
||||
"conf_leds_layout_cl_top" : "Oben",
|
||||
"conf_leds_layout_cl_bottom" : "Unten",
|
||||
"conf_leds_layout_cl_left" : "Links",
|
||||
@ -105,7 +110,7 @@
|
||||
"conf_leds_layout_ma_opttopright" : "Oben rechts",
|
||||
"conf_leds_layout_ma_optbottomleft" : "Unten links",
|
||||
"conf_leds_layout_ma_optbottomright" : "Unten rechts",
|
||||
"conf_leds_layout_textf1" : "Das Textfeld zeigt dir dein aktuell geladenes Layout, sofern du kein neues Layout mit den Optionen oben erstellt hast. Optional kann man die Werte hier weiter bearbeiten.",
|
||||
"conf_leds_layout_textf1" : "Das Textfeld zeigt dir dein aktuell geladenes Layout, sofern du kein neues Layout mit den Optionen unten erstellt hast. Optional kann man die Werte hier weiter bearbeiten.",
|
||||
"conf_leds_layout_textf2" : "Vergiss nicht zu speichern!",
|
||||
"conf_leds_test_button_toggleleds" : "LEDs",
|
||||
"conf_leds_test_button_togglelednumber" : "LED Nummerierung",
|
||||
@ -118,6 +123,7 @@
|
||||
"conf_logging_label_intro" : "Überprüfe die Meldungen im Prokotoll um zu erfahren was Hyperion gerade beschäftigt. Je nach eingestellter Protokoll-Stufe siehst du mehr oder weniger Informationen.",
|
||||
"conf_logging_btn_pbupload" : "Protokoll hochladen",
|
||||
"conf_logging_btn_autoscroll" : "Automatisch scrollen",
|
||||
"conf_webconfig_label_intro" : "Einstellungen zur Webkonfiguration. Änderungen können die Erreichbarkeit des Webinterfaces beeinflussen.",
|
||||
"remote_label_intro" : "Die Fernbedienung ermöglicht dir während Hyperion läuft Farbe/Effekte zu starten/setzen, aber auch eine Quelle manuell festzulegen. Die Komponentensteuerung ermöglicht es dir gezielt Teile von Hyperion zu aktivieren/deaktivieren. Beachte, dass nach einem Neustart die hier durchgeführten Aktionen wieder zurückgesetzt werden.",
|
||||
"remote_colors_label_coloreffect" : "Farbe/Effekt:",
|
||||
"remote_colors_button_reset" : "Farbe/Effekt zurücksetzen",
|
||||
@ -128,7 +134,7 @@
|
||||
"remote_components_label_components" : "Komponentensteuerung",
|
||||
"remote_optgroup_usreffets" : "Benutzer Effekte",
|
||||
"remote_optgroup_syseffets" : "Mitgelieferte Effekte",
|
||||
"remote_help_text" : "Hyperion nutzt ein Prioritätensystem um die Quelle zu wählen. Alles was du setzte hat eine Prioität (Effekte/Farben/Plattform Capture/USB Capture und Netzwerkquellen). Standartmäßig nutzt Hyperion die Quelle mit der niedrigsten Prioität. Hier hast du die Möglichkeit die Quelle manuell auszuwählen.",
|
||||
"remote_help_text" : "Hyperion nutzt ein Prioritätensystem um die Quelle zu wählen. Alles was du setzte hat eine Prioität (Effekte/Farben/Plattform Capture/USB Capture und Netzwerkquellen). Standartmäßig nutzt Hyperion die Quelle mit der niedrigsten Prioität. Hier hast du die Möglichkeit die Quelle manuell auszuwählen.",
|
||||
"hue_button_create_user_token" : "Benutzer anlegen",
|
||||
"hue_press_link_modal" : "Bitte Link Taste auf der Hue Bridge drücken.",
|
||||
"hue_failure_connection_token" : "Connection Timeout. Bitte drücke die Taste rechtzeitig.",
|
||||
@ -137,7 +143,7 @@
|
||||
"hue_failure_ip_token" : "Bitte überprüfe deine IP Adresse.",
|
||||
"hue_label_username" : "Benutzername:",
|
||||
"hue_label_ip" : "Hue Bridge IP:",
|
||||
"hue_help_text" : "Mit diesem Setupassistenten kannst du einen neuen User auf der Hue Bridge anlegen und deine LightIDs für die Hyperion Konfiguration herausfinden. Wenn du bereits einen eingetragenen User hast, siehst du diesen bereits untenstehend eingetragen. Du kannst allerdings jederzeit einen neuen Anlegen. Beachte: Dies ist nur ein Assistent. Du musst die Daten in die Konfiguration kopieren.",
|
||||
"hue_help_text" : "Mit diesem Setupassistenten kannst du einen neuen User auf der Hue Bridge anlegen und deine LightIDs für die Hyperion Konfiguration herausfinden. Wenn du bereits einen eingetragenen User hast, siehst du diesen bereits untenstehend eingetragen. Du kannst allerdings jederzeit einen neuen Anlegen. Beachte: Dies ist nur ein Assistent. Du musst die Daten in die Konfiguration kopieren.",
|
||||
"effectsconfigurator_label_intro" : "Erstelle auf Grundlage der Basiseffekte neue Effekt die nach deinen Wünschen angepasst sind. Je nach Effekt stehen Optionen wie Farbe, Geschwindigkeit, oder Richtung und vieles mehr zur Auswahl.",
|
||||
"effectsconfigurator_label_chooseeff" : "Basis-Effekt auswählen:",
|
||||
"effectsconfigurator_button_saveeffect" : "Effekt speichern",
|
||||
@ -190,6 +196,10 @@
|
||||
"infoDialog_effconf_created_text" : "Der Effekt $1 wurde erfolgreich erstellt!",
|
||||
"infoDialog_effconf_invalidvalue_title" : "Fehlerhafte Werte!",
|
||||
"infoDialog_effconf_invalidvalue_text" : "Es wurden unzulässige Werte eingetragen, überprüfe das rot markierte Feld und versuche es erneut!",
|
||||
"InfoDialog_lang_title" : "Spracheinstellung",
|
||||
"InfoDialog_lang_text" : "Sollte dir die Vorauswahl der automatischen Spracherkennung nicht gefallen, kannst du die Sprache hier manuell festlegen.",
|
||||
"InfoDialog_access_title" : "Zugriffsstufe",
|
||||
"InfoDialog_access_text" : "Abhängig von der Stufe hast du Zugriff auf mehr oder weniger Einstellungen. Empfohlen ist 'Standard'.",
|
||||
"edt_dev_general_heading_title" : "Allgemeine Einstellungen",
|
||||
"edt_dev_general_name_title" : "Name der Konfiguration",
|
||||
"edt_dev_general_ledCount_title" : "Anzahl Hardware LEDs",
|
||||
|
@ -17,6 +17,8 @@
|
||||
"general_country_nl" : "Netherlands",
|
||||
"general_speech_de" : "German",
|
||||
"general_speech_en" : "English",
|
||||
"general_access_default" : "Default",
|
||||
"general_access_expert" : "Expert",
|
||||
"general_comp_SMOOTHING" : "Smoothing",
|
||||
"general_comp_BLACKBORDER" : "Blackbar Detection",
|
||||
"general_comp_KODICHECKER" : "Kodi Watch",
|
||||
@ -26,6 +28,9 @@
|
||||
"general_comp_GRABBER" : "Platform Capture",
|
||||
"general_comp_V4L" : "USB Capture",
|
||||
"general_button_savesettings" : "Save settings",
|
||||
"general_btn_ok" : "OK",
|
||||
"general_btn_abort" : "Abort",
|
||||
"general_btn_save" : "Save",
|
||||
"dashboard_label_intro" : "The dashboard give you a quick overview about the status of Hyperion and show you the latest news of the Hyperion Blog.",
|
||||
"dashboard_infobox_label_title" : "Information",
|
||||
"dashboard_infobox_label_currenthyp" : "Your Hyperion version:",
|
||||
@ -55,6 +60,7 @@
|
||||
"main_menu_system_token" : "System",
|
||||
"main_menu_input_selection_token" : "Eingabeauswahl",
|
||||
"main_menu_logging_token" : "Log",
|
||||
"main_menu_webconfig_token" : "Webconfiguration",
|
||||
"conf_effects_label_intro" : "Setting up a booteffect/color that is visible after Hyperion startup. Configure a background effect/color which is active, when all capture sources are disabled (also temporarily via Kodi Watch)",
|
||||
"conf_leds_label_intro" : "The LED controller of youre choice is your way to output the led data via Raspberry PI GPIO, USB or network! Choose one, define your led layout and enjoy the light!",
|
||||
"conf_leds_nav_label_ledcontroller" : "LED Controller",
|
||||
@ -78,7 +84,6 @@
|
||||
"conf_leds_layout_preview_originTEXT" : "Created from: Textfield",
|
||||
"conf_leds_layout_preview_originMA" : "Created from: Matrix Layout(LED wall)",
|
||||
"conf_leds_layout_preview_totalleds" : "Totel LEDs: $1",
|
||||
"conf_leds_layout_preview_empty" : "Es wurde keine Vorschau angefordert",
|
||||
"conf_leds_layout_cl_top" : "Top",
|
||||
"conf_leds_layout_cl_bottom" : "Bottom",
|
||||
"conf_leds_layout_cl_left" : "Left",
|
||||
@ -105,7 +110,7 @@
|
||||
"conf_leds_layout_ma_opttopright" : "Top right",
|
||||
"conf_leds_layout_ma_optbottomleft" : "Bottom left",
|
||||
"conf_leds_layout_ma_optbottomright" : "Bottom right",
|
||||
"conf_leds_layout_textf1" : "This textfield shows by default your current loaded layout and will be overwritten if you generate a new one above. Optional you could perform further edits.",
|
||||
"conf_leds_layout_textf1" : "This textfield shows by default your current loaded layout and will be overwritten if you generate a new one with the options below. Optional you could perform further edits.",
|
||||
"conf_leds_layout_textf2" : "Don't forget to save!",
|
||||
"conf_leds_test_button_toggleleds" : "toggle leds",
|
||||
"conf_leds_test_button_togglelednumber" : "toggle led numbers",
|
||||
@ -118,6 +123,7 @@
|
||||
"conf_logging_label_intro" : "Area to check log messages, depending on loglevel setting you see more or less information.",
|
||||
"conf_logging_btn_pbupload" : "Upload log",
|
||||
"conf_logging_btn_autoscroll" : "Auto scrolling",
|
||||
"conf_webconfig_label_intro" : "Webconfiguration settings. Edit wisely.",
|
||||
"remote_label_intro" : "Set an effect/color. You could also select a source manually. The Components control give the opportunity to enable/disable components of Hyprion during runtime. All changes you made here are lost after a restart.",
|
||||
"remote_colors_label_coloreffect" : "Colors/Effects",
|
||||
"remote_colors_button_reset" : "Reset Color/Effect",
|
||||
@ -128,7 +134,7 @@
|
||||
"remote_components_label_components" : "Components control",
|
||||
"remote_optgroup_usreffets" : "User Effects",
|
||||
"remote_optgroup_syseffets" : "Provided Effects",
|
||||
"remote_help_text" : "Hyperion uses a priority system to select a source. Everything you set has a priority (Effect/Color/Platform capture/USB capture and network sources). By default, Hyperion select sources depending on priority (lowest number reflects the current active source). Now you have the opportunity to select sources on your own.",
|
||||
"remote_help_text" : "Hyperion uses a priority system to select a source. Everything you set has a priority (Effect/Color/Platform capture/USB capture and network sources). By default, Hyperion select sources depending on priority (lowest number reflects the current active source). Now you have the opportunity to select sources on your own.",
|
||||
"hue_button_create_user_token" : "Create User",
|
||||
"hue_press_link_modal" : "Please press link button on the Hue Bridge.",
|
||||
"hue_failure_connection_token" : "Connection Timeout. Please press the button in time.",
|
||||
@ -137,7 +143,7 @@
|
||||
"hue_failure_ip_token" : "Please check your IP Address.",
|
||||
"hue_label_username" : "Hue Bridge Username",
|
||||
"hue_label_ip" : "Hue Bridge IP:",
|
||||
"hue_help_text" : "With this Setup Helper you can get a new User for your Hue Bridge and you can see your Lights with the IDs for Hyperion Configuration. If you already have a working User you will see it below. But you can always create a new one as well. Remember: This is only a helper. You have to copy and paste them in your config above.",
|
||||
"hue_help_text" : "With this Setup Helper you can get a new User for your Hue Bridge and you can see your Lights with the IDs for Hyperion Configuration. If you already have a working User you will see it below. But you can always create a new one as well. Remember: This is only a helper. You have to copy and paste them in your config above.",
|
||||
"effectsconfigurator_label_intro" : "Create out of the base effects new effects that are tuned to your liking. Depending on Effect there are options like color, speed, direction and more available.",
|
||||
"effectsconfigurator_label_chooseeff" : "Choose Base-Effect:",
|
||||
"effectsconfigurator_button_saveeffect" : "Save Effect",
|
||||
@ -190,6 +196,10 @@
|
||||
"infoDialog_effconf_created_text" : "The effect $1 has been created successfully!",
|
||||
"infoDialog_effconf_invalidvalue_title" : "INVALID VALUE(S)",
|
||||
"infoDialog_effconf_invalidvalue_text" : "Please check for red marked input(s) and try again!",
|
||||
"InfoDialog_lang_title" : "Language setting",
|
||||
"InfoDialog_lang_text" : "If you don't like the result of the automatic language detection you could overwrite it here.",
|
||||
"InfoDialog_access_title" : "Level setting",
|
||||
"InfoDialog_access_text" : "Depending on settings level you could change more or less settings. Recommended is the default level.",
|
||||
"edt_dev_general_heading_title" : "General Settings",
|
||||
"edt_dev_general_name_title" : "Configuration name",
|
||||
"edt_dev_general_ledCount_title" : "Count of all hardware LEDs",
|
||||
|
@ -88,6 +88,16 @@
|
||||
<!-- /.navbar-header -->
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
<li class="dropdown" id="btn_setlang">
|
||||
<a href="#">
|
||||
<i class="fa fa-globe fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown" id="btn_setaccess">
|
||||
<a href="#">
|
||||
<i class="fa fa-key fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
<!-- /.dropdown -->
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
@ -189,6 +199,7 @@
|
||||
<li>
|
||||
<a class="inactive"><i class="fa fa-industry fa-fw"></i><span data-i18n="main_menu_system_token">System</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li> <a class="inactive" id="load_webconfig"><i class="fa fa-wrench fa-fw"></i><span data-i18n="main_menu_webconfig_token">Webconfiguration</span></a> </li>
|
||||
<li> <a class="inactive" id="load_logging"><i class="fa fa-reorder fa-fw"></i><span data-i18n="main_menu_logging_token">Log</span></a> </li>
|
||||
<li> <a class="inactive" id="load_update"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></a> </li>
|
||||
</ul>
|
||||
@ -223,9 +234,10 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<center>
|
||||
<div class="modal-bodyicon"></div>
|
||||
<div class="modal-bodyicon" style="margin-bottom:20px;"></div>
|
||||
<h4 class="modal-bodytitle" style="font-weight:bold;text-transform:uppercase;"></h4>
|
||||
<div class="modal-bodycontent"></div>
|
||||
<select id="modal_select" class="form-control" style="margin-top:10px;width:auto;"></select>
|
||||
</center>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -247,6 +259,7 @@
|
||||
|
||||
<script src="/js/lib/jquery-ui.min.js"></script>
|
||||
<script src="/js/content_index.js"></script>
|
||||
<script src="/js/localStorage.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
|
@ -1,59 +1,66 @@
|
||||
JSONEditor.defaults.editors.colorPicker = JSONEditor.defaults.editors.string.extend({
|
||||
JSONEditor.defaults.editors.colorPicker = JSONEditor.defaults.editors.string.extend({
|
||||
|
||||
getValue: function() {
|
||||
if ($(this.input).data("colorpicker") !== undefined) {
|
||||
var color = $(this.input).data('colorpicker').color.toRGB();
|
||||
return [color.r,color.g, color.b];
|
||||
}
|
||||
else {
|
||||
return [0,0,0];
|
||||
}
|
||||
},
|
||||
getValue: function() {
|
||||
if ($(this.input).data("colorpicker") !== undefined) {
|
||||
var color = $(this.input).data('colorpicker').color.toRGB();
|
||||
return [color.r,color.g, color.b];
|
||||
}
|
||||
else {
|
||||
return [0,0,0];
|
||||
}
|
||||
},
|
||||
|
||||
setValue: function(val) {
|
||||
function rgb2hex(rgb)
|
||||
{
|
||||
return "#" +
|
||||
("0" + parseInt(rgb[0],10).toString(16)).slice(-2) +
|
||||
("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
|
||||
("0" + parseInt(rgb[2],10).toString(16)).slice(-2);
|
||||
}
|
||||
setValue: function(val) {
|
||||
function rgb2hex(rgb)
|
||||
{
|
||||
return "#" +
|
||||
("0" + parseInt(rgb[0],10).toString(16)).slice(-2) +
|
||||
("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
|
||||
("0" + parseInt(rgb[2],10).toString(16)).slice(-2);
|
||||
}
|
||||
|
||||
$(this.input).colorpicker('updateInput', 'rgb('+val+')');
|
||||
$(this.input).colorpicker('updateData', val);
|
||||
$(this.input).colorpicker('updatePicker', rgb2hex(val));
|
||||
},
|
||||
|
||||
build: function() {
|
||||
this._super();
|
||||
var myinput = this;
|
||||
$(myinput.input).colorpicker({
|
||||
format: 'rgb',
|
||||
customClass: 'colorpicker-2x',
|
||||
sliders: {
|
||||
saturation: {
|
||||
maxLeft: 200,
|
||||
maxTop: 200
|
||||
},
|
||||
hue: {
|
||||
maxTop: 200
|
||||
},
|
||||
$(this.input).colorpicker('updateInput', 'rgb('+val+')');
|
||||
$(this.input).colorpicker('updateData', val);
|
||||
$(this.input).colorpicker('updatePicker', rgb2hex(val));
|
||||
$(this.input).colorpicker('updateComponent', 'rgb('+val+')');
|
||||
},
|
||||
|
||||
|
||||
|
||||
build: function() {
|
||||
this._super();
|
||||
var myinput = this;
|
||||
$(myinput.input).parent().attr("class", $(myinput.input).parent().attr('class') + " colorpicker-element");
|
||||
$(myinput.input).append("<span class='input-group-addon' id='event_catcher'><i></i></span>");
|
||||
$(myinput.input).colorpicker({
|
||||
format: 'rgb',
|
||||
customClass: 'colorpicker-2x',
|
||||
sliders: {
|
||||
saturation: {
|
||||
maxLeft: 200,
|
||||
maxTop: 200
|
||||
},
|
||||
|
||||
})
|
||||
hue: {
|
||||
maxTop: 200
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
$(this.input).colorpicker().on('changeColor', function(e) {
|
||||
$(myinput).val(e.color.toRGB()).change();
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#event_catcher").detach().insertAfter(myinput.input);
|
||||
$("#event_catcher").attr("id", "selector");
|
||||
|
||||
$(this.input).colorpicker().on('changeColor', function(e) {
|
||||
$(myinput).val(e.color.toRGB()).change();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
JSONEditor.defaults.resolvers.unshift(function(schema) {
|
||||
if(schema.type === "array" && schema.format === "colorpicker") {
|
||||
return "colorPicker";
|
||||
}
|
||||
JSONEditor.defaults.resolvers.unshift(function(schema) {
|
||||
if(schema.type === "array" && schema.format === "colorpicker") {
|
||||
return "colorPicker";
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
var oldDelList = [];
|
||||
|
||||
|
@ -16,12 +16,7 @@ $(document).ready( function() {
|
||||
bindNavToContent("#load_confNetwork","network",false);
|
||||
bindNavToContent("#load_effectsconfig","effects_configurator",false);
|
||||
bindNavToContent("#load_logging","logging",false);
|
||||
|
||||
//$.i18n.debug = true;
|
||||
$.i18n().load({ de: 'i18n/de.json', en:'i18n/en.json'}).done(
|
||||
function() {
|
||||
performTranslation();
|
||||
});
|
||||
bindNavToContent("#load_webconfig","webconfig",false);
|
||||
|
||||
$(hyperion).on("cmd-serverinfo",function(event){
|
||||
parsedServerInfoJSON = event.response;
|
||||
|
@ -66,7 +66,7 @@ function createLedPreview(leds, origin){
|
||||
"top:"+(led.vscan.minimum * canvas_height)+"px;"+
|
||||
"width:"+((led.hscan.maximum-led.hscan.minimum) * canvas_width-1)+"px;"+
|
||||
"height:"+((led.vscan.maximum-led.vscan.minimum) * canvas_height-1)+"px;";
|
||||
leds_html += '<div id="'+led_id+'" class="led" style="'+bgcolor+pos+'" title="'+idx+'"><span id="'+led_id+'_num" class="led_prev_num">'+idx+'</span></div>';
|
||||
leds_html += '<div id="'+led_id+'" class="led" style="'+bgcolor+pos+'" title="'+led.index+'"><span id="'+led_id+'_num" class="led_prev_num">'+led.index+'</span></div>';
|
||||
}
|
||||
$('#leds_preview').html(leds_html);
|
||||
$('#ledc_0').css({"background-color":"black","z-index":"12"});
|
||||
@ -108,22 +108,6 @@ function createClassicLeds(){
|
||||
var Hmax = 1.0 - edgeHGap;
|
||||
var ledArray = [];
|
||||
|
||||
createLeftLeds(createBottomLeds(createRightLeds(createTopLeds())));
|
||||
|
||||
if(ledsGlength != "0" && validateGap()){
|
||||
ledArray.splice(ledsGPos, ledsGlength);
|
||||
}
|
||||
|
||||
if (position != "0"){
|
||||
rotateArray(ledArray, position);
|
||||
}
|
||||
|
||||
if (reverse)
|
||||
ledArray.reverse();
|
||||
|
||||
createLedPreview(ledArray, 'classic');
|
||||
createFinalArray(ledArray);
|
||||
|
||||
function createFinalArray(array){
|
||||
finalLedArray = [];
|
||||
for(var i = 0; i<array.length; i++){
|
||||
@ -133,6 +117,7 @@ function createClassicLeds(){
|
||||
vmax = array[i].vscan.maximum;
|
||||
finalLedArray[i] = { "index" : i, "hscan": { "maximum" : hmax, "minimum" : hmin }, "vscan": { "maximum": vmax, "minimum": vmin}}
|
||||
}
|
||||
createLedPreview(finalLedArray, 'classic');
|
||||
}
|
||||
|
||||
function validateGap(){
|
||||
@ -234,6 +219,21 @@ function createClassicLeds(){
|
||||
hmax -= step;
|
||||
}
|
||||
}
|
||||
|
||||
createLeftLeds(createBottomLeds(createRightLeds(createTopLeds())));
|
||||
|
||||
if(ledsGlength != "0" && validateGap()){
|
||||
ledArray.splice(ledsGPos, ledsGlength);
|
||||
}
|
||||
|
||||
if (position != "0"){
|
||||
rotateArray(ledArray, position);
|
||||
}
|
||||
|
||||
if (reverse)
|
||||
ledArray.reverse();
|
||||
|
||||
createFinalArray(ledArray);
|
||||
}
|
||||
|
||||
function createMatrixLeds(){
|
||||
@ -434,6 +434,8 @@ $(document).ready(function() {
|
||||
}
|
||||
$('#leds_canvas').html(leds_html);
|
||||
$('#led_0').css({"z-index":"10"});
|
||||
|
||||
$('#leds_custom_updsim').trigger('click');
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -464,18 +466,14 @@ $(document).ready(function() {
|
||||
// ------------------------------------------------------------------
|
||||
$("#leds_custom_updsim").off().on("click", function() {
|
||||
if (validateText()){
|
||||
string = $("#ledconfig").val();
|
||||
createLedPreview(JSON.parse(string), 'text');
|
||||
createLedPreview(JSON.parse($("#ledconfig").val()), 'text');
|
||||
}
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
$("#leds_custom_save").off().on("click", function() {
|
||||
function createLedConfig(){
|
||||
var string = '{"leds" :';
|
||||
string += $("#ledconfig").val();
|
||||
string += "}";
|
||||
return string
|
||||
var string = '{"leds" :'+$("#ledconfig").val()+'}';
|
||||
}
|
||||
if (validateText())
|
||||
requestWriteConfig(JSON.parse(createLedConfig()));
|
||||
|
19
assets/webconfig/js/content_webconfig.js
Normal file
19
assets/webconfig/js/content_webconfig.js
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
var conf_editor = null;
|
||||
$(hyperion).one("cmd-config-getschema", function(event) {
|
||||
schema = parsedConfSchemaJSON.properties;
|
||||
conf_editor = createJsonEditor('editor_container', {
|
||||
webConfig : schema.webConfig
|
||||
}, true);
|
||||
|
||||
$('#btn_submit').off().on('click',function() {
|
||||
requestWriteConfig(conf_editor.getValue());
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready( function() {
|
||||
performTranslation();
|
||||
requestServerConfigSchema();
|
||||
});
|
||||
|
@ -1457,6 +1457,15 @@ JSONEditor.AbstractEditor = Class.extend({
|
||||
this.updateHeaderText();
|
||||
this.register();
|
||||
this.onWatchedFieldChange();
|
||||
|
||||
//disable input field, if it didn't match the current access level
|
||||
var storedAccess = localStorage.getItem("accesslevel");
|
||||
|
||||
if(this.schema.access){
|
||||
if(this.schema.access == 'expert' && storedAccess != 'expert'){
|
||||
this.disable();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setupWatchListeners: function() {
|
||||
|
119
assets/webconfig/js/localStorage.js
Normal file
119
assets/webconfig/js/localStorage.js
Normal file
@ -0,0 +1,119 @@
|
||||
$(document).ready( function() {
|
||||
|
||||
var storedLang;
|
||||
var storedAccess;
|
||||
var availLang = ['en','de'];
|
||||
var availAccess = ['default','expert']
|
||||
//$.i18n.debug = true;
|
||||
|
||||
function storageComp(){
|
||||
if (typeof(Storage) !== "undefined")
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function initTrans(lc){
|
||||
if (lc == 'auto')
|
||||
{
|
||||
$.i18n().load().done(
|
||||
function() {
|
||||
performTranslation();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$.i18n().locale = lc;
|
||||
$.i18n().load( "i18n", lc ).done(
|
||||
function() {
|
||||
performTranslation();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//i18n
|
||||
if (storageComp())
|
||||
{
|
||||
storedLang = localStorage.getItem("langcode");
|
||||
if (storedLang == null)
|
||||
{
|
||||
localStorage.langcode = "auto";
|
||||
storedLang = 'auto';
|
||||
initTrans('auto');
|
||||
}
|
||||
else
|
||||
{
|
||||
initTrans(storedLang);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
showInfoDialog('warning', "Can't store settings", "Your browser doesn't support localStorage. You can't save a specific language setting (fallback to 'auto detection') and access level (fallback to 'default'). You could still use the webinterface without further issues");
|
||||
initTrans('auto');
|
||||
$('#btn_setlang').toggle();
|
||||
$('#btn_setaccess').toggle();
|
||||
}
|
||||
|
||||
$('#btn_setlang').off().on('click',function() {
|
||||
$('#modal_select').html('');
|
||||
for (var lcx = 0; lcx<availLang.length; lcx++)
|
||||
{
|
||||
$('#modal_select').append(createSelOpt(availLang[lcx], $.i18n('general_speech_'+availLang[lcx])))
|
||||
}
|
||||
showInfoDialog('select', $.i18n('InfoDialog_lang_title'), $.i18n('InfoDialog_lang_text'),'btn_savelang');
|
||||
|
||||
if (storedLang != "auto")
|
||||
$('#modal_select').val(storedLang);
|
||||
|
||||
$('#btn_savelang').off().on('click',function() {
|
||||
var newLang = $('#modal_select').val();
|
||||
|
||||
if (newLang != storedLang)
|
||||
{
|
||||
initTrans(newLang);
|
||||
localStorage.langcode = newLang;
|
||||
storedLang = newLang;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//access
|
||||
function updateVisibility(){
|
||||
if(storedAccess == 'expert')
|
||||
$('#load_webconfig').toggle(true);
|
||||
else
|
||||
$('#load_webconfig').toggle(false);
|
||||
}
|
||||
|
||||
if (storageComp())
|
||||
{
|
||||
storedAccess = localStorage.getItem("accesslevel");
|
||||
if (storedAccess == null)
|
||||
{
|
||||
localStorage.accesslevel = "default";
|
||||
storedAccess = "default";
|
||||
updateVisibility();
|
||||
}
|
||||
else
|
||||
{
|
||||
updateVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btn_setaccess').off().on('click',function() {
|
||||
$('#modal_select').html('');
|
||||
for (var lcx = 0; lcx<availAccess.length; lcx++)
|
||||
{
|
||||
$('#modal_select').append(createSelOpt(availAccess[lcx], $.i18n('general_access_'+availAccess[lcx])))
|
||||
}
|
||||
showInfoDialog('select', $.i18n('InfoDialog_access_title'), $.i18n('InfoDialog_access_text'), 'btn_saveaccess');
|
||||
|
||||
$('#modal_select').val(storedAccess);
|
||||
|
||||
$('#btn_saveaccess').off().on('click',function() {
|
||||
storedAccess = $('#modal_select').val();
|
||||
localStorage.accesslevel = storedAccess;
|
||||
updateVisibility();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
@ -47,25 +47,39 @@ function setClassByBool(obj,enable,class1,class2)
|
||||
}
|
||||
}
|
||||
|
||||
function showInfoDialog(type,header,message)
|
||||
function showInfoDialog(type,header,message,btnid)
|
||||
{
|
||||
if (type != 'select')
|
||||
$('#modal_select').toggle(false);
|
||||
else
|
||||
$('#modal_select').toggle(true);
|
||||
|
||||
$('#modal_dialog .modal-bodytitle').html(header);
|
||||
$('#modal_dialog .modal-bodycontent').html(message);
|
||||
|
||||
if (type=="success"){
|
||||
$('#modal_dialog .modal-bodyicon').html('<i class="fa fa-check modal-icon-check">');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" class="btn btn-success" data-dismiss="modal">OK</button>');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" class="btn btn-success" data-dismiss="modal">'+$.i18n('general_btn_ok')+'</button>');
|
||||
}
|
||||
else if (type=="warning"){
|
||||
$('#modal_dialog .modal-bodyicon').html('<i class="fa fa-warning modal-icon-warning">');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" class="btn btn-warning" data-dismiss="modal">OK</button>');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" class="btn btn-warning" data-dismiss="modal">'+$.i18n('general_btn_ok')+'</button>');
|
||||
}
|
||||
else if (type=="error"){
|
||||
$('#modal_dialog .modal-bodyicon').html('<i class="fa fa-warning modal-icon-error">');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" class="btn btn-danger" data-dismiss="modal">OK</button>');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" class="btn btn-danger" data-dismiss="modal">'+$.i18n('general_btn_ok')+'</button>');
|
||||
}
|
||||
$('#modal_dialog').modal('show');
|
||||
else if (type == "select"){
|
||||
$('#modal_dialog .modal-bodyicon').html('<img src="img/hyperion/hyperionlogo.png" alt="Redefine ambient light!">');
|
||||
$('#modal_dialog .modal-footer-button').html('<button type="button" id="'+btnid+'" class="btn btn-success" data-dismiss="modal">'+$.i18n('general_btn_save')+'</button>');
|
||||
$('#modal_dialog .modal-footer-button').append('<button type="button" class="btn btn-danger" data-dismiss="modal">'+$.i18n('general_btn_abort')+'</button>');
|
||||
}
|
||||
|
||||
$("#modal_dialog").modal({
|
||||
backdrop : "static",
|
||||
keyboard: false,
|
||||
show: true
|
||||
});
|
||||
}
|
||||
|
||||
function isJsonString(str)
|
||||
@ -127,11 +141,14 @@ function createSelGroup(group)
|
||||
return el;
|
||||
}
|
||||
|
||||
function createSelOpt(opt)
|
||||
function createSelOpt(opt, title)
|
||||
{
|
||||
var el = document.createElement('option');
|
||||
el.setAttribute('value', opt);
|
||||
el.innerHTML = opt;
|
||||
if (typeof title == 'undefined')
|
||||
el.innerHTML = opt;
|
||||
else
|
||||
el.innerHTML = title;
|
||||
return el;
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
"default": 5000,
|
||||
"append" : "edt_append_ms",
|
||||
"minimum": 0,
|
||||
"access" : "expert",
|
||||
"propertOrder" : 4
|
||||
}
|
||||
},
|
||||
@ -1047,12 +1048,14 @@
|
||||
"type" : "boolean",
|
||||
"title" : "edt_conf_general_enable_title",
|
||||
"default" : true,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"document_root" :
|
||||
{
|
||||
"type" : "string",
|
||||
"title" : "edt_conf_webc_docroot_title",
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 2
|
||||
},
|
||||
"port" :
|
||||
@ -1062,6 +1065,7 @@
|
||||
"minimum" : 0,
|
||||
"maximum" : 65535,
|
||||
"default" : 8099,
|
||||
"access" : "expert",
|
||||
"propertyOrder" : 3
|
||||
}
|
||||
},
|
||||
|
@ -487,6 +487,12 @@ void JsonClientConnection::handleCreateEffectCommand(const QJsonObject& message,
|
||||
|
||||
if (effectArray.size() > 0)
|
||||
{
|
||||
if (message["name"].toString().trimmed().isEmpty())
|
||||
{
|
||||
sendErrorReply("Can't save new effect. Effect name is empty", command, tan);
|
||||
return;
|
||||
}
|
||||
|
||||
effectJson["name"] = message["name"].toString();
|
||||
effectJson["script"] = message["script"].toString();
|
||||
effectJson["args"] = message["args"].toObject();
|
||||
|
@ -110,7 +110,7 @@ void QJsonSchemaChecker::validate(const QJsonValue & value, const QJsonObject &s
|
||||
else if (attribute == "id")
|
||||
; // references have already been collected
|
||||
else if (attribute == "title" || attribute == "description" || attribute == "default" || attribute == "format"
|
||||
|| attribute == "defaultProperties" || attribute == "propertyOrder" || attribute == "append")
|
||||
|| attribute == "defaultProperties" || attribute == "propertyOrder" || attribute == "append" || attribute == "step" || attribute == "access")
|
||||
; // nothing to do.
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user