iobroker.telegram-menu 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  Easily create Telegram Menus
17
17
 
18
- You can create a separate menu for each user, or you can use the global user to generate the same menu for all users.
18
+ You can create different groups with separate menus, and then assign users to them.
19
19
 
20
20
  **If you like it, please consider a donation:**
21
21
 
@@ -33,6 +33,19 @@ You can create a separate menu for each user, or you can use the global user to
33
33
  Placeholder for the next version (at the beginning of the line):
34
34
  ### **WORK IN PROGRESS**
35
35
  -->
36
+ ### 0.4.0 (2023-07-28)
37
+
38
+ - change output value for getState
39
+ - checkbox to disbale Text No Entry found in the settings #34
40
+ - submenu
41
+ - **changed!!!**, states are always set with ack false
42
+ - adapter does not restart when telegram restarts #35
43
+
44
+ ### 0.3.0 (2023-07-02)
45
+
46
+ - add ack Flag
47
+ - Copy-Button to copy User-elements to activ User
48
+
36
49
  ### 0.2.0 (2023-05-28)
37
50
 
38
51
  - rename button
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Kein Eintrag, an alle Benutzer senden.",
3
3
  "Action": "Aktion",
4
+ "Active": "Aktiv",
4
5
  "Add": "hinzufügen",
5
6
  "Add && as a placeholder for the value in the text": "Fügen Sie && als Platzhalter für den Wert im Text hinzu",
6
7
  "Add && as a placeholder for the value in the text": "Fügen Sie && als Platzhalter für den Wert im Text hinzu",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Wählen Sie Ihre Option",
19
20
  "Close": "Schließen",
20
21
  "Confirm": "Bestätigen",
22
+ "Confirm set value": "Eingestellten Wert bestätigen",
21
23
  "Delay": "Verzögerung",
22
24
  "Delay (ms)": "Verzögerung (ms)",
23
25
  "Delete User": "Benutzer löschen",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Möchten Sie die Gruppe wirklich löschen?",
26
28
  "Each entry may only occur once in the complete navigation": "Jeder Eintrag darf in der gesamten Navigation nur einmal vorkommen",
27
29
  "Edit Username": "Benutzernamen bearbeiten",
30
+ "Entry not found!": "Eintrag nicht gefunden!",
28
31
  "Filename": "Dateinamen",
29
32
  "Global User activ": "Globaler Benutzer aktiv",
30
33
  "Instanze": "Instanz",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Einstellungen",
39
42
  "Startside": "Startseite",
40
43
  "Switch": "Schalten",
44
+ "Text will be send if no entry was found!": "Text wird gesendet, wenn kein Eintrag gefunden wurde!",
41
45
  "Trigger": "Auslöser",
42
46
  "Users for this Group, seperate with": "Benutzer für diese Gruppe, trennen Sie mit",
43
47
  "Value": "Wert",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": " No entry, send to all Users.",
3
3
  "Action": "Action",
4
+ "Active": "Active",
4
5
  "Add": "add",
5
6
  "Add && as a placeholder for the value in the text": "Add && as a placeholder for the value in the text",
6
7
  "Add && as a placeholder for the value in the text": "Add && as a placeholder for the value in the text",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Choose your option",
19
20
  "Close": "Close",
20
21
  "Confirm": "Confirm",
22
+ "Confirm set value": "Confirm set value",
21
23
  "Delay": "Delay",
22
24
  "Delay (ms)": "Delay (ms)",
23
25
  "Delete User": "Delete User",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Do you really want to delete the group?",
26
28
  "Each entry may only occur once in the complete navigation": "Each entry may only occur once in the complete navigation",
27
29
  "Edit Username": "Edit Username",
30
+ "Entry not found!": "Entry not found!",
28
31
  "Filename": "Filename",
29
32
  "Global User activ": "Global user activ",
30
33
  "Instanze": "Instanze",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Settings",
39
42
  "Startside": "Startside",
40
43
  "Switch": "Switch",
44
+ "Text will be send if no entry was found!": "Text will be send if no entry was found!",
41
45
  "Trigger": "Trigger",
42
46
  "Users for this Group, seperate with": "Users for this Group, seperate with",
43
47
  "Value": "Value",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Sin entrada, enviar a todos los usuarios.",
3
3
  "Action": "Acción",
4
+ "Active": "Activo",
4
5
  "Add": "agregar",
5
6
  "Add && as a placeholder for the value in the text": "Agregue && como marcador de posición para el valor en el texto",
6
7
  "Add && as a placeholder for the value in the text": "Agregue && como marcador de posición para el valor en el texto",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Elige tu opción",
19
20
  "Close": "Cerca",
20
21
  "Confirm": "Confirmar",
22
+ "Confirm set value": "Confirmar valor establecido",
21
23
  "Delay": "Demora",
22
24
  "Delay (ms)": "Retardo (ms)",
23
25
  "Delete User": "Borrar usuario",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "¿Realmente quieres eliminar el grupo?",
26
28
  "Each entry may only occur once in the complete navigation": "Cada entrada solo puede ocurrir una vez en la navegación completa",
27
29
  "Edit Username": "Editar nombre de usuario",
30
+ "Entry not found!": "¡Entrada no encontrada!",
28
31
  "Filename": "Nombre del archivo",
29
32
  "Global User activ": "Actividad de usuario global",
30
33
  "Instanze": "Instancia",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Ajustes",
39
42
  "Startside": "Lado de salida",
40
43
  "Switch": "Cambiar",
44
+ "Text will be send if no entry was found!": "¡Se enviará texto si no se encontró ninguna entrada!",
41
45
  "Trigger": "Desencadenar",
42
46
  "Users for this Group, seperate with": "Usuarios para este Grupo, separe con",
43
47
  "Value": "Valor",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Aucune entrée, envoyer à tous les utilisateurs.",
3
3
  "Action": "Action",
4
+ "Active": "Actif",
4
5
  "Add": "ajouter",
5
6
  "Add && as a placeholder for the value in the text": "Ajouter && comme espace réservé pour la valeur dans le texte",
6
7
  "Add && as a placeholder for the value in the text": "Ajouter && comme espace réservé pour la valeur dans le texte",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Choisissez votre option",
19
20
  "Close": "Fermer",
20
21
  "Confirm": "Confirmer",
22
+ "Confirm set value": "Confirmer la valeur définie",
21
23
  "Delay": "Retard",
22
24
  "Delay (ms)": "Délai (ms)",
23
25
  "Delete User": "Supprimer l'utilisateur",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Voulez-vous vraiment supprimer le groupe ?",
26
28
  "Each entry may only occur once in the complete navigation": "Chaque entrée ne peut apparaître qu'une seule fois dans la navigation complète",
27
29
  "Edit Username": "Modifier le nom d'utilisateur",
30
+ "Entry not found!": "Entrée introuvable !",
28
31
  "Filename": "Nom de fichier",
29
32
  "Global User activ": "Activation globale de l'utilisateur",
30
33
  "Instanze": "Instantané",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Paramètres",
39
42
  "Startside": "Côté départ",
40
43
  "Switch": "Changer",
44
+ "Text will be send if no entry was found!": "Le texte sera envoyé si aucune entrée n'a été trouvée !",
41
45
  "Trigger": "Déclencher",
42
46
  "Users for this Group, seperate with": "Utilisateurs pour ce groupe, séparés par",
43
47
  "Value": "Valeur",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Nessuna voce, invia a tutti gli utenti.",
3
3
  "Action": "Azione",
4
+ "Active": "Attivo",
4
5
  "Add": "aggiungere",
5
6
  "Add && as a placeholder for the value in the text": "Aggiungi && come segnaposto per il valore nel testo",
6
7
  "Add && as a placeholder for the value in the text": "Aggiungi && come segnaposto per il valore nel testo",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Scegli la tua opzione",
19
20
  "Close": "Vicino",
20
21
  "Confirm": "Confermare",
22
+ "Confirm set value": "Conferma il valore impostato",
21
23
  "Delay": "Ritardo",
22
24
  "Delay (ms)": "Ritardo (ms)",
23
25
  "Delete User": "Elimina utente",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Vuoi davvero eliminare il gruppo?",
26
28
  "Each entry may only occur once in the complete navigation": "Ogni voce può comparire una sola volta nella navigazione completa",
27
29
  "Edit Username": "Modifica nome utente",
30
+ "Entry not found!": "Voce non trovata!",
28
31
  "Filename": "Nome del file",
29
32
  "Global User activ": "Utente globale attivo",
30
33
  "Instanze": "Istanza",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Impostazioni",
39
42
  "Startside": "Lato iniziale",
40
43
  "Switch": "Interruttore",
44
+ "Text will be send if no entry was found!": "Il testo verrà inviato se non è stata trovata alcuna voce!",
41
45
  "Trigger": "Grilletto",
42
46
  "Users for this Group, seperate with": "Utenti per questo gruppo, separati da",
43
47
  "Value": "Valore",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Geen invoer, verzenden naar alle gebruikers.",
3
3
  "Action": "Actie",
4
+ "Active": "Actief",
4
5
  "Add": "toevoegen",
5
6
  "Add && as a placeholder for the value in the text": "Voeg && toe als tijdelijke aanduiding voor de waarde in de tekst",
6
7
  "Add && as a placeholder for the value in the text": "Voeg && toe als tijdelijke aanduiding voor de waarde in de tekst",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Kies uw optie",
19
20
  "Close": "Dichtbij",
20
21
  "Confirm": "Bevestigen",
22
+ "Confirm set value": "Bevestig ingestelde waarde",
21
23
  "Delay": "Vertraging",
22
24
  "Delay (ms)": "Vertraging (ms)",
23
25
  "Delete User": "Verwijder gebruiker",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Wilt u de groep echt verwijderen?",
26
28
  "Each entry may only occur once in the complete navigation": "Elke invoer mag slechts één keer voorkomen in de volledige navigatie",
27
29
  "Edit Username": "Gebruikersnaam bewerken",
30
+ "Entry not found!": "Invoer niet gevonden!",
28
31
  "Filename": "Bestandsnaam",
29
32
  "Global User activ": "Globale gebruiker actief",
30
33
  "Instanze": "Instanze",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Instellingen",
39
42
  "Startside": "Startzijde",
40
43
  "Switch": "Schakelaar",
44
+ "Text will be send if no entry was found!": "Er wordt een tekst verzonden als er geen item is gevonden!",
41
45
  "Trigger": "Trekker",
42
46
  "Users for this Group, seperate with": "Gebruikers voor deze groep, scheid met",
43
47
  "Value": "Waarde",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Brak wpisu, wyślij do wszystkich Użytkowników.",
3
3
  "Action": "Działanie",
4
+ "Active": "Aktywny",
4
5
  "Add": "dodać",
5
6
  "Add && as a placeholder for the value in the text": "Dodaj && jako symbol zastępczy wartości w tekście",
6
7
  "Add && as a placeholder for the value in the text": "Dodaj && jako symbol zastępczy wartości w tekście",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Wybierz swoją opcję",
19
20
  "Close": "Zamknąć",
20
21
  "Confirm": "Potwierdzać",
22
+ "Confirm set value": "Potwierdź ustawioną wartość",
21
23
  "Delay": "Opóźnienie",
22
24
  "Delay (ms)": "Opóźnienie (ms)",
23
25
  "Delete User": "Usuń użytkownika",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Czy na pewno chcesz usunąć grupę?",
26
28
  "Each entry may only occur once in the complete navigation": "Każdy wpis może wystąpić tylko raz w całej nawigacji",
27
29
  "Edit Username": "Edytuj nazwę użytkownika",
30
+ "Entry not found!": "Nie znaleziono wpisu!",
28
31
  "Filename": "Nazwa pliku",
29
32
  "Global User activ": "Globalna aktywność użytkowników",
30
33
  "Instanze": "Instancja",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Ustawienia",
39
42
  "Startside": "Strona startowa",
40
43
  "Switch": "Przełącznik",
44
+ "Text will be send if no entry was found!": "Tekst zostanie wysłany, jeśli nie znaleziono żadnego wpisu!",
41
45
  "Trigger": "Spust",
42
46
  "Users for this Group, seperate with": "Użytkownicy dla tej grupy, oddzielni od",
43
47
  "Value": "Wartość",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Sem entrada, envie para todos os usuários.",
3
3
  "Action": "Ação",
4
+ "Active": "Ativo",
4
5
  "Add": "adicionar",
5
6
  "Add && as a placeholder for the value in the text": "Adicionar && como espaço reservado para o valor no texto",
6
7
  "Add && as a placeholder for the value in the text": "Adicionar && como espaço reservado para o valor no texto",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Escolha sua opção",
19
20
  "Close": "Fechar",
20
21
  "Confirm": "confirme",
22
+ "Confirm set value": "Confirme o valor definido",
21
23
  "Delay": "Atraso",
22
24
  "Delay (ms)": "Atraso (ms)",
23
25
  "Delete User": "Deletar usuário",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Você realmente deseja excluir o grupo?",
26
28
  "Each entry may only occur once in the complete navigation": "Cada entrada só pode ocorrer uma vez na navegação completa",
27
29
  "Edit Username": "Editar nome de usuário",
30
+ "Entry not found!": "Entrada não encontrada!",
28
31
  "Filename": "Nome do arquivo",
29
32
  "Global User activ": "Atividade global do usuário",
30
33
  "Instanze": "instância",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Configurações",
39
42
  "Startside": "Startside",
40
43
  "Switch": "Trocar",
44
+ "Text will be send if no entry was found!": "O texto será enviado se nenhuma entrada for encontrada!",
41
45
  "Trigger": "Acionar",
42
46
  "Users for this Group, seperate with": "Usuários deste Grupo, separados por",
43
47
  "Value": "Valor",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Нет записи, отправить всем пользователям.",
3
3
  "Action": "Действие",
4
+ "Active": "Активный",
4
5
  "Add": "добавлять",
5
6
  "Add && as a placeholder for the value in the text": "Добавьте && в качестве заполнителя для значения в тексте",
6
7
  "Add && as a placeholder for the value in the text": "Добавьте && в качестве заполнителя для значения в тексте",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Выберите свой вариант",
19
20
  "Close": "Закрывать",
20
21
  "Confirm": "Подтверждать",
22
+ "Confirm set value": "Подтвердить установленное значение",
21
23
  "Delay": "Задерживать",
22
24
  "Delay (ms)": "Задержка (мс)",
23
25
  "Delete User": "Удалить пользователя",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Вы действительно хотите удалить группу?",
26
28
  "Each entry may only occur once in the complete navigation": "Каждая запись может встречаться только один раз за всю навигацию.",
27
29
  "Edit Username": "Изменить имя пользователя",
30
+ "Entry not found!": "Запись не найдена!",
28
31
  "Filename": "Имя файла",
29
32
  "Global User activ": "Активность глобального пользователя",
30
33
  "Instanze": "Инстанц",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Настройки",
39
42
  "Startside": "Стартовая сторона",
40
43
  "Switch": "Выключатель",
44
+ "Text will be send if no entry was found!": "Текст будет отправлен, если запись не найдена!",
41
45
  "Trigger": "Курок",
42
46
  "Users for this Group, seperate with": "Пользователи для этой группы, отдельно с",
43
47
  "Value": "Ценить",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "Заборонено, відправити всім користувачам.",
3
3
  "Action": "Дія",
4
+ "Active": "Активний",
4
5
  "Add": "додати",
5
6
  "Add && as a placeholder for the value in the text": "Додайте && як заповнювач для значення в тексті",
6
7
  "Add && as a placeholder for the value in the text": "Додайте && як заповнювач для значення в тексті",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "Виберіть свій варіант",
19
20
  "Close": "Закрити",
20
21
  "Confirm": "Підтвердити",
22
+ "Confirm set value": "Підтвердьте встановлене значення",
21
23
  "Delay": "Затримка",
22
24
  "Delay (ms)": "Затримка (мс)",
23
25
  "Delete User": "Видалити користувача",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "Ви справді хочете видалити групу?",
26
28
  "Each entry may only occur once in the complete navigation": "Кожен запис може з’являтися лише один раз у повній навігації",
27
29
  "Edit Username": "Редагувати ім'я користувача",
30
+ "Entry not found!": "Запис не знайдено!",
28
31
  "Filename": "Ім'я файлу",
29
32
  "Global User activ": "Глобальна активність користувачів",
30
33
  "Instanze": "Instanze",
@@ -38,6 +41,7 @@
38
41
  "Settings": "Налаштування",
39
42
  "Startside": "Стартова сторона",
40
43
  "Switch": "Перемикач",
44
+ "Text will be send if no entry was found!": "Текст буде надіслано, якщо запис не знайдено!",
41
45
  "Trigger": "Тригер",
42
46
  "Users for this Group, seperate with": "Користувачі для цієї групи, окремо від",
43
47
  "Value": "Значення",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  " No entry, send to all Users.": "没有条目,发送给所有用户。",
3
3
  "Action": "行动",
4
+ "Active": "积极的",
4
5
  "Add": "添加",
5
6
  "Add && as a placeholder for the value in the text": "添加 && 作为文本中值的占位符",
6
7
  "Add && as a placeholder for the value in the text": "添加 && 作为文本中值的占位符",
@@ -18,6 +19,7 @@
18
19
  "Choose your option": "选择你的选项",
19
20
  "Close": "关闭",
20
21
  "Confirm": "确认",
22
+ "Confirm set value": "确认设定值",
21
23
  "Delay": "延迟",
22
24
  "Delay (ms)": "延迟(毫秒)",
23
25
  "Delete User": "删除用户",
@@ -25,6 +27,7 @@
25
27
  "Do you really want to delete the group?": "您真的要删除该组吗?",
26
28
  "Each entry may only occur once in the complete navigation": "每个条目在完整导航中只能出现一次",
27
29
  "Edit Username": "修改用户名",
30
+ "Entry not found!": "找不到条目!",
28
31
  "Filename": "文件名",
29
32
  "Global User activ": "全球用户活跃度",
30
33
  "Instanze": "瞬间",
@@ -38,6 +41,7 @@
38
41
  "Settings": "设置",
39
42
  "Startside": "起跑线",
40
43
  "Switch": "转变",
44
+ "Text will be send if no entry was found!": "如果没有找到条目,将发送文本!",
41
45
  "Trigger": "扳机",
42
46
  "Users for this Group, seperate with": "该组的用户,与",
43
47
  "Value": "价值",
@@ -10,6 +10,7 @@
10
10
  <script type="text/javascript" src="../../socket.io/socket.io.js"></script>
11
11
  <script type="text/javascript" src="./js/main.js"></script>
12
12
  <script type="text/javascript" src="./js/component.js"></script>
13
+ <script type="text/javascript" src="./js/groupJQ.js"></script>
13
14
 
14
15
 
15
16
  <script type="text/javascript" src="../../js/translate.js"></script>
@@ -51,6 +52,7 @@
51
52
  setCheckbox(settings.checkbox)
52
53
  generateSelectTrigger(activeGroup)
53
54
  checkUpAndDownArrowBtn(activeGroup)
55
+ disableEnableInputField("#checkboxNoValueFound", "#textNoEntry")
54
56
  // When import from old Version import Username
55
57
  if (settings.usersForGlobal) $("#group_UserInput input[name='Global']").val(settings.usersForGlobal)
56
58
  if (settings.instance) telegramInstance = settings.instance
@@ -147,7 +149,6 @@
147
149
  let gefundenerName = users.find(function (name) {
148
150
  return name.toLowerCase() === userInput.toLowerCase();
149
151
  });
150
- console.log(gefundenerName)
151
152
  if ($(this).val() !== "" && !gefundenerName) {
152
153
  $("#addNewGroup").removeClass("disabled")
153
154
  } else $("#addNewGroup").addClass("disabled")
@@ -205,7 +206,7 @@
205
206
  showHideUserCheckbox(activeGroup)
206
207
  })
207
208
 
208
- // Edit User
209
+ // Edit Group
209
210
  $("#editUser").click(function () {
210
211
  $("#dialog-change-groupname").show()
211
212
  $("#inputEditUser").val(activeGroup)
@@ -218,7 +219,7 @@
218
219
  if (gefundenerName) $("#dialog-change-groupname .btn-set").attr("disabled", "disabled")
219
220
  else $("#dialog-change-groupname .btn-set").removeAttr("disabled")
220
221
  })
221
- // Save Edit User
222
+ // Save Edit Group
222
223
  $("#dialog-change-groupname .btn-set").click(function () {
223
224
  // ActiveUser aus der User List enfernen und die Änderung hinzufügen
224
225
  users = users.filter(function (element) {
@@ -359,6 +360,13 @@
359
360
  $(`#tab_${$("#select_action").val()} tbody`).append(newTrInAction($("#select_action").val(), undefined, rows))
360
361
  $("#btn_action_set").attr("disabled", "disabled")
361
362
  })
363
+
364
+ // Settings--------------------------------------------------------------------
365
+ $("#tab-settings").on("change", "#checkboxNoValueFound", function () {
366
+ disableEnableInputField("#checkboxNoValueFound", "#textNoEntry")
367
+
368
+ })
369
+
362
370
  // --------------------------------------------------------------------------------
363
371
  // Global Disable delete Button in Tables
364
372
  $("div.adapter-container").on("DOMSubtreeModified", "table tbody", function () {
@@ -495,6 +503,69 @@
495
503
  checkUpAndDownArrowBtn(activeGroup)
496
504
  _onChange()
497
505
  })
506
+
507
+ // Copy Data
508
+ $("#btn_copy_nav").click(function () {
509
+ $("#dialog-copy-data").show()
510
+ })
511
+ $("#select-copy-data").on("change", function () {
512
+ $("#copyData").empty()
513
+ //TODO -
514
+ if ($(this).val() == "nav") {
515
+ findElementsToCopy("#tab-nav tbody", "nav")
516
+ }
517
+ else findElementsToCopy(`#tab-action tbody[data-name='${$(this).val()}']`, $(this).val())
518
+ })
519
+ function findElementsToCopy(selektor, toDo) {
520
+ const $bodys = $(selektor).map((index, tbody) => {
521
+ if ($(tbody).attr("name") != activeGroup) return tbody
522
+ })
523
+ let tbody = $("<tbody>")
524
+ $bodys.each(function (index, $body) {
525
+ $($body).find("tr").each(function () {
526
+ let newData = $(this).clone().removeClass("startRow")
527
+ newData.find("a").parent().remove()
528
+ newData.find("td:empty").remove()
529
+ let checkbox = $("<a>").addClass(`btn-floating btn-small waves-effect waves-light blue ${toDo} checkboxCopyData `).append($("<i>").addClass("material-icons").text("add"))
530
+ newData = newData.append($("<td>").append(checkbox))
531
+ tbody.append(newData)
532
+ })
533
+ })
534
+ $("#copyData").append($("<table>").addClass("striped").append(tbody))
535
+ }
536
+ // Save new Rows
537
+ $("#dialog-copy-data").on("click", ".checkboxCopyData", function () {
538
+ const action = $("#select-copy-data").val()
539
+
540
+ const rowToCopy = $(this).parents().eq(1)
541
+ // Add Button entfernen
542
+ rowToCopy.find("a").parent().remove()
543
+ const buttonsNav = `<td><a class="deleteRow btn-floating btn-small waves-effect waves-light red"><i class="material-icons">delete</i></a></td>
544
+ <td><a class="btn-floating btn-small waves-effect waves-light blue btn_down"><i class="material-icons" name="down">arrow_downward</i></a></td>
545
+ <td><a class="btn-floating btn-small waves-effect waves-light blue btn_up"><i class="material-icons" name="up">arrow_upward</i></a></td>`
546
+ const buttonsAction = `<td><a class="deleteEveryRow btn-floating btn-small waves-effect waves-light red"><i class="material-icons">delete</i></a></td>
547
+ <td><a data-target="tab_action" class="editEntry modal-trigger btn-floating btn-small waves-effect waves-light green"><i class="material-icons">edit</i></a></td>`;
548
+ if (action == "nav") {
549
+ rowToCopy.append(buttonsNav)
550
+ $(`#${activeGroup}`).append(rowToCopy)
551
+ checkUpAndDownArrowBtn(activeGroup)
552
+ }
553
+ else {
554
+ rowToCopy.append(buttonsAction)
555
+ $(`#tab-action tbody[name="${activeGroup}"][data-name="${action}"]`).append(rowToCopy)
556
+ }
557
+ })
558
+
559
+ $("#dialog-copy-data .btn-close").click(function () {
560
+ resetSelect()
561
+ _onChange()
562
+ })
563
+ function resetSelect() {
564
+ $("#copyData").empty()
565
+ $("#select-copy-data").val("").select()
566
+ $("#dialog-copy-data").hide()
567
+ }
568
+
498
569
  })
499
570
  </script>
500
571
  </head>
@@ -559,11 +630,12 @@
559
630
  <table id="tab_set" class="resetHide">
560
631
  <thead>
561
632
  <tr>
562
- <th style="width: 20%; background: #64b5f6 ">ID</th>
633
+ <th style="width: 25%; background: #64b5f6 ">ID</th>
563
634
  <th style="width: 1%; background: #64b5f6 "></th>
564
- <th style="width: 5%; background: #64b5f6 " class="translate">Value</th>
565
- <th style="width: 15%; background: #64b5f6 " class="translate">Return text</th>
566
- <th style="width: 1%; background: #64b5f6 " class="text-xsm translate">Confirm</th>
635
+ <th style="width: 4%; background: #64b5f6 " class="translate">Value</th>
636
+ <th style="background: #64b5f6 " class="translate">Return text</th>
637
+ <th style="width: 1%; background: #64b5f6 " class="text-xsm
638
+ translate">Confirm set value</th>
567
639
  <th style="width: 1%; background: #64b5f6 " class="text-xsm translate">Switch</th>
568
640
  <th style="width: 1%; background: #64b5f6 "></th>
569
641
  </tr>
@@ -687,6 +759,9 @@
687
759
  <a class="btn-add btn-floating btn-large waves-effect waves-light green translateT"
688
760
  id="btn_add_nav" name="nav" title="Add new Navigation"><i
689
761
  class="material-icons translate ">add</i></a>
762
+ <a class="btn-add btn-floating btn-small waves-effect waves-light blue translateT"
763
+ id="btn_copy_nav" name="nav" title="Copy Elementes from other Groups"><i
764
+ class="material-icons translate ">content_copy</i></a>
690
765
  </div>
691
766
  <div class="col s8" id="group_UserInput">
692
767
  </div>
@@ -722,6 +797,7 @@
722
797
  </div>
723
798
  </div>
724
799
  <div id="tab-action"></div>
800
+ <!-- //SECTION - Settings -->
725
801
  <div id="tab-settings">
726
802
  <div class=" row">
727
803
  <div class="col s12">
@@ -733,6 +809,19 @@
733
809
  <label>Instance</label>
734
810
  </div>
735
811
  </div>
812
+ <div class="row">
813
+ <div class="col s3">
814
+ <input id="textNoEntry" type="text" class="value translateV" value="Entry not found!">
815
+ <label for="textNoEntry" class="translate">Text will be send if no entry was found!</label>
816
+ </div>
817
+ <div class="input-field col s3">
818
+ <label>
819
+ <input id="checkboxNoValueFound" type="checkbox" class="filled-in valCheckbox"
820
+ checked />
821
+ <span class="translate">Active</span>
822
+ </label>
823
+ </div>
824
+ </div>
736
825
  <div class="row">
737
826
  <div class="input-field col s3">
738
827
  <label>
@@ -816,6 +905,30 @@
816
905
  class="large material-icons left ">close</i><span class="translate">Cancel</span></a>
817
906
  </div>
818
907
  </div>
908
+ <div id="dialog-copy-data" class="modal modal-fixed-footer">
909
+ <div class="modal-content">
910
+ <div class="row">
911
+ <div class="input-field col s3">
912
+ <select id="select-copy-data">
913
+ <option value="" disabled selected>Choose your option</option>
914
+ <option value="nav">Navigation</option>
915
+ <option value="set">SetState</option>
916
+ <option value="get">GetState</option>
917
+ <option value="pic">Send Picture</option>
918
+ </select>
919
+ <label class="translate">Copy Data</label>
920
+ </div>
921
+ </div>
922
+ <div class="row">
923
+ <div id="copyData" class="col s12 ">
924
+ </div>
925
+ </div>
926
+ </div>
927
+ <div class="modal-footer">
928
+ <a class="modal-action modal-close waves-effect waves-green btn btn-close"><i
929
+ class="large material-icons left ">close</i><span class="translate">Close</span></a>
930
+ </div>
931
+ </div>
819
932
  </div>
820
933
 
821
934