Initial commit

This commit is contained in:
2018-09-24 00:37:59 +08:00
commit f3c152e76b
106 changed files with 10005 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Manual",
"My select": "Mein Auswahl",
"on save adapter restarts with new config immediately": "Beim Speichern von Einstellungen der Adapter wird sofort neu gestartet.",
"template adapter settings": "Beispiel",
"test1": "Test 1",
"test2": "Test 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Manual",
"My select": "My select",
"on save adapter restarts with new config immediately": "on save adapter restarts with new config immediately",
"template adapter settings": "template adapter settings",
"test1": "Test 1",
"test2": "Test 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Manual",
"My select": "Mi seleccion",
"on save adapter restarts with new config immediately": "en el adaptador de guardar se reinicia con nueva configuración de inmediato",
"template adapter settings": "configuración del adaptador de plantilla",
"test1": "Prueba 1",
"test2": "Prueba 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Manuel",
"My select": "Mon choix",
"on save adapter restarts with new config immediately": "sur l'adaptateur de sauvegarde redémarre avec la nouvelle config immédiatement",
"template adapter settings": "paramètres de l'adaptateur de modèle",
"test1": "Test 1",
"test2": "Test 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Manuale",
"My select": "La mia selezione",
"on save adapter restarts with new config immediately": "su save adapter si riavvia immediatamente con la nuova configurazione",
"template adapter settings": "impostazioni dell'adattatore del modello",
"test1": "Test 1",
"test2": "Test 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Met de hand",
"My select": "Mijn select",
"on save adapter restarts with new config immediately": "on save-adapter wordt onmiddellijk opnieuw opgestart met nieuwe config",
"template adapter settings": "sjabloon-adapterinstellingen",
"test1": "Test 1",
"test2": "Test 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Auto",
"Manual": "Manual",
"My select": "Meu selecionado",
"on save adapter restarts with new config immediately": "no adaptador de salvar reinicia com nova configuração imediatamente",
"template adapter settings": "configurações do adaptador de modelo",
"test1": "Teste 1",
"test2": "Teste 2"
}
+9
View File
@@ -0,0 +1,9 @@
{
"Auto": "Автоматически",
"Manual": "Вручную",
"My select": "Выбор",
"on save adapter restarts with new config immediately": "При сохранении настроек адаптера он сразу же перезапускается",
"template adapter settings": "Пример",
"test1": "Тест 1",
"test2": "Тест 2"
}
+90
View File
@@ -0,0 +1,90 @@
<html>
<!-- This file is deprecated!!!!! Please use index_m.html -->
<!-- This file is required only for backward compatibility and will be deleted soon -->
<!-- these 4 files always have to be included -->
<link rel="stylesheet" type="text/css" href="../../lib/css/themes/jquery-ui/redmond/jquery-ui.min.css"/>
<script type="text/javascript" src="../../lib/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../../socket.io/socket.io.js"></script>
<script type="text/javascript" src="../../lib/js/jquery-ui-1.10.3.full.min.js"></script>
<!-- optional: use jqGrid
<link rel="stylesheet" type="text/css" href="../../lib/css/jqGrid/ui.jqgrid-4.5.4.css"/>
<script type="text/javascript" src="../../lib/js/jqGrid/jquery.jqGrid-4.5.4.min.js"></script>
<script type="text/javascript" src="../../lib/js/jqGrid/i18n/grid.locale-all.js"></script>
-->
<!-- optional: use multiselect
<link rel="stylesheet" type="text/css" href="../../lib/css/jquery.multiselect-1.13.css"/>
<script type="text/javascript" src="../../lib/js/jquery.multiselect-1.13.min.js"></script>
-->
<!-- these two file always have to be included -->
<link rel="stylesheet" type="text/css" href="../../css/adapter.css"/>
<script type="text/javascript" src="../../js/translate.js"></script>
<script type="text/javascript" src="../../js/adapter-settings.js"></script>
<script type="text/javascript" src="words.js"></script>
<!-- you have to define 2 functions in the global scope: -->
<script type="text/javascript">
// the function loadSettings has to exist ...
function load(settings, onChange) {
// example: select elements with id=key and class=value and insert value
if (!settings) return;
$('.value').each(function () {
var $key = $(this);
var id = $key.attr('id');
if ($key.attr('type') === 'checkbox') {
// do not call onChange direct, because onChange could expect some arguments
$key.prop('checked', settings[id]).change(function() {
onChange();
});
} else {
// do not call onChange direct, because onChange could expect some arguments
$key.val(settings[id]).change(function() {
onChange();
}).keyup(function() {
onChange();
});
}
});
onChange(false);
}
// ... and the function save has to exist.
// you have to make sure the callback is called with the settings object as first param!
function save(callback) {
// example: select elements with class=value and build settings object
var obj = {};
$('.value').each(function () {
var $this = $(this);
if ($this.attr('type') === 'checkbox') {
obj[$this.attr('id')] = $this.prop('checked');
} else {
obj[$this.attr('id')] = $this.val();
}
});
callback(obj);
}
</script>
<!-- you have to put your config page in a div with id adapter-container -->
<div id="adapter-container">
<table><tr>
<td><img src="klf200.png"/></td>
<td><h3 class="translate">KLF-200 adapter settings</h3></td>
</tr></table>
<table>
<tr><td><span><label for="host" class="translate">host</label></span></td><td><input class="value" id="host"/></td></tr>
<tr><td><span><label for="password" class="translate">password</label></span></td><td><input type="password" class="value" id="password"/></td></tr>
<tr><td><span><label for="pollInterval" class="translate">pollInterval</label></span></td><td><input class="value" id="pollInterval"/></td></tr>
</table>
<p class="translate">on save adapter restarts with new config immediately</p>
</div>
</html>
+88
View File
@@ -0,0 +1,88 @@
<html>
<link rel="stylesheet" type="text/css" href="../../css/adapter.css"/>
<link rel="stylesheet" type="text/css" href="../../lib/css/materialize.css">
<script type="text/javascript" src="../../lib/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../../socket.io/socket.io.js"></script>
<script type="text/javascript" src="../../js/translate.js"></script>
<script type="text/javascript" src="../../lib/js/materialize.js"></script>
<script type="text/javascript" src="../../js/adapter-settings.js"></script>
<script type="text/javascript" src="words.js"></script>
<!-- you have to define 2 functions in the global scope: -->
<script type="text/javascript">
// the function loadSettings has to exist ...
function load(settings, onChange) {
// example: select elements with id=key and class=value and insert value
if (!settings) return;
$('.value').each(function () {
var $key = $(this);
var id = $key.attr('id');
if ($key.attr('type') === 'checkbox') {
// do not call onChange direct, because onChange could expect some arguments
$key.prop('checked', settings[id]).change(function() {
onChange();
});
} else {
// do not call onChange direct, because onChange could expect some arguments
$key.val(settings[id]).change(function() {
onChange();
}).keyup(function() {
onChange();
});
}
});
onChange(false);
M.updateTextFields();
}
// ... and the function save has to exist.
// you have to make sure the callback is called with the settings object as first param!
function save(callback) {
// example: select elements with class=value and build settings object
var obj = {};
$('.value').each(function () {
var $this = $(this);
if ($this.attr('type') === 'checkbox') {
obj[$this.attr('id')] = $this.prop('checked');
} else {
obj[$this.attr('id')] = $this.val();
}
});
callback(obj);
}
</script>
<!-- you have to put your config page in a div with id adapter-container -->
<div class="m adapter-container">
<div class="row">
<div class="col s6"><img src="klf200.png" class="logo"/></div>
</div>
<div class="row">
<div class="input-field col s12 m6">
<input class="value" id="host" type="text"/>
<label for="host" class="translate">host</label>
</div>
<div class="input-field col s12 m6">
<input class="value" id="password" type="password"/>
<label for="password" class="translate">password</label>
</div>
</div>
<div class="row">
<div class="input-field col s12 m3">
<input class="value" id="pollInterval" type="number" min="0"/>
<label for="pollInterval" class="translate">pollInterval</label>
</div>
</div>
<div class="row">
<div class="col s12">
<p class="translate">on save adapter restarts with new config immediately</p>
</div>
</div>
</div>
</html>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

+10
View File
@@ -0,0 +1,10 @@
/*global systemDictionary:true */
'use strict';
systemDictionary = {
"KLF-200 adapter settings": { "en": "KLF-200 adapter settings", "de": "Einstellungen des KLF-200 Adapters", "ru": "Настройки адаптера KLF-200", "pt": "Configurações do adaptador KLF-200", "nl": "KLF-200 adapterinstellingen", "fr": "Paramètres de l'adaptateur KLF-200", "it": "Impostazioni dell'adattatore KLF-200", "es": "Configuraciones del adaptador KLF-200", "pl": "Ustawienia adaptera KLF-200"},
"host": { "en": "Host", "de": "Host", "ru": "хозяин", "pt": "Hospedeiro", "nl": "Gastheer", "fr": "Hôte", "it": "Ospite", "es": "Anfitrión", "pl": "Gospodarz"},
"on save adapter restarts with new config immediately": {"en": "On save the adapter restarts with new configuration immediately", "de": "Beim Speichern von Einstellungen wird der Adapter sofort neu gestartet.", "ru": "При перезагрузке адаптер перезагружается с новой конфигурацией немедленно", "pt": "Ao salvar, o adaptador é reiniciado com a nova configuração imediatamente", "nl": "Bij opslaan wordt de adapter onmiddellijk opnieuw opgestart met een nieuwe configuratie", "fr": "A l'enregistrement, l'adaptateur redémarre immédiatement avec la nouvelle configuration", "it": "Al salvataggio, l'adattatore si riavvia immediatamente con la nuova configurazione", "es": "Al guardar, el adaptador se reinicia con una nueva configuración de inmediato", "pl": "Po zapisaniu adapter natychmiast uruchamia się ponownie z nową konfiguracją"},
"password": { "en": "Password", "de": "Passwort", "ru": "пароль", "pt": "Senha", "nl": "Wachtwoord", "fr": "Mot de passe", "it": "Parola d'ordine", "es": "Contraseña", "pl": "Hasło"},
"pollInterval": { "en": "Polling interval in minutes", "de": "Abfragehäufigkeit in Minuten", "ru": "Интервал опроса в минутах", "pt": "Intervalo de pesquisa em minutos", "nl": "Polling-interval in minuten", "fr": "Intervalle d'interrogation en minutes", "it": "Intervallo di polling in minuti", "es": "Intervalo de sondeo en minutos", "pl": "Interwał odpytywania w minutach"},
};