├── .gitignore ├── .releaseconfig.json ├── admin ├── metro.png └── index.html ├── img └── Demo2.png ├── widgets └── metro │ ├── fonts │ ├── iconFont.eot │ ├── iconFont.ttf │ ├── iconFont.woff │ ├── metroSysIcons.ttf │ ├── metroSysIcons.woff │ └── metroSysIcons.svg │ ├── img │ ├── authors.txt │ ├── Prev_Shutter.png │ ├── fts_window_2w.png │ ├── fts_shutter_10.png │ ├── fts_shutter_100.png │ ├── fts_shutter_20.png │ ├── fts_shutter_30.png │ ├── fts_shutter_40.png │ ├── fts_shutter_50.png │ ├── fts_shutter_60.png │ ├── fts_shutter_70.png │ ├── fts_shutter_80.png │ ├── fts_shutter_90.png │ ├── light_light_dim.png │ ├── light_light_dim_00.png │ ├── light_light_dim_10.png │ ├── light_light_dim_20.png │ ├── light_light_dim_30.png │ ├── light_light_dim_40.png │ ├── light_light_dim_50.png │ ├── light_light_dim_60.png │ ├── light_light_dim_70.png │ ├── light_light_dim_80.png │ ├── light_light_dim_90.png │ ├── sani_heating_temp.png │ ├── light_light_dim_100.png │ └── license.txt │ ├── doc.html │ ├── js │ └── metro.js │ └── css │ └── iconFont.min.css ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── stale.yml └── workflows │ └── test-and-release.yml ├── LICENSE ├── package.json ├── README.md ├── io-package.json └── test └── testPackageFiles.js /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /.idea 3 | /package-lock.json 4 | -------------------------------------------------------------------------------- /.releaseconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["iobroker", "license"] 3 | } 4 | -------------------------------------------------------------------------------- /admin/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/admin/metro.png -------------------------------------------------------------------------------- /img/Demo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/img/Demo2.png -------------------------------------------------------------------------------- /widgets/metro/fonts/iconFont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/fonts/iconFont.eot -------------------------------------------------------------------------------- /widgets/metro/fonts/iconFont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/fonts/iconFont.ttf -------------------------------------------------------------------------------- /widgets/metro/img/authors.txt: -------------------------------------------------------------------------------- 1 | KNX-User-Forum 2 | http://knx-user-forum.de 3 | 4 | mfd.gfx@gmail.com 5 | 6 | User: 7 | mfd 8 | -------------------------------------------------------------------------------- /widgets/metro/fonts/iconFont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/fonts/iconFont.woff -------------------------------------------------------------------------------- /widgets/metro/img/Prev_Shutter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/Prev_Shutter.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_window_2w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_window_2w.png -------------------------------------------------------------------------------- /widgets/metro/fonts/metroSysIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/fonts/metroSysIcons.ttf -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_10.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_100.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_20.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_30.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_40.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_50.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_60.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_70.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_80.png -------------------------------------------------------------------------------- /widgets/metro/img/fts_shutter_90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/fts_shutter_90.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim.png -------------------------------------------------------------------------------- /widgets/metro/fonts/metroSysIcons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/fonts/metroSysIcons.woff -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_00.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_10.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_20.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_30.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_40.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_50.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_60.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_70.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_80.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_90.png -------------------------------------------------------------------------------- /widgets/metro/img/sani_heating_temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/sani_heating_temp.png -------------------------------------------------------------------------------- /widgets/metro/img/light_light_dim_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/HEAD/widgets/metro/img/light_light_dim_100.png -------------------------------------------------------------------------------- /widgets/metro/img/license.txt: -------------------------------------------------------------------------------- 1 | http://creativecommons.org/licenses/by-sa/3.0/de/ 2 | Creative Commons Namensnennung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland Lizenz -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /widgets/metro/doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dokumentation Widget-Set Metro 5 | 6 | 7 | 8 | basiert auf http://metroui.org.ua/ 9 | 10 |

Attribute

11 |
12 | 13 |
bg_class[_false,_true,_active,...]
14 |
Tile Hintergrundfarbe
15 | 16 |
brand_bg_class[_false,_true,_active,...]
17 |
Tile Beschriftungsfeld Hintergrundfarbe
18 | 19 |
badge_bg_class[_false,_true,_active,...]
20 |
Tile Beschriftungsfeld Icon/Zahl Hintergrundfarbe
21 | 22 |
[badge,dialog]icon_class[_false,_true,_active,...]
23 |
vordefinierte Icons
24 | 25 |
[badge,dialog]icon[_false,_true,_active,...]
26 |
eigene Icons
27 | 28 |
transform
29 |
Tile bei Click animieren
30 | 31 |
hover
32 |
Tile bei Hover umrahmen
33 | 34 | 35 | 36 |
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Something is not working as it should 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | **Describe the bug** 10 | A clear and concise description of what the bug is. 11 | 12 | **To Reproduce** 13 | Steps to reproduce the behavior: 14 | 1. Go to '...' 15 | 2. Click on '...' 16 | 3. Scroll down to '....' 17 | 4. See error 18 | 19 | **Expected behavior** 20 | A clear and concise description of what you expected to happen. 21 | 22 | **Screenshots & Logfiles** 23 | If applicable, add screenshots and logfiles to help explain your problem. 24 | 25 | **Versions:** 26 | - Adapter version: 27 | - JS-Controller version: 28 | - Node version: 29 | - Operating system: 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2022 bluefox https://github.com/GermanBluefox, 4 | 2013-2014 hobbyquaker https://github.com/hobbyquaker 5 | 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iobroker.vis-metro", 3 | "description": "Metro Widgets for ioBroker.vis", 4 | "version": "1.2.0", 5 | "author": { 6 | "name": "hobbyquaker", 7 | "email": "hq@ccu.io" 8 | }, 9 | "contributors": [ 10 | "bluefox ", 11 | "hobbyquaker " 12 | ], 13 | "homepage": "https://github.com/ioBroker/ioBroker.vis-metro", 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/ioBroker/ioBroker.vis-metro" 17 | }, 18 | "licenses": [ 19 | { 20 | "type": "MIT", 21 | "url": "https://github.com/ioBroker/ioBroker.vis-metro/blob/master/LICENSE" 22 | } 23 | ], 24 | "keywords": [ 25 | "ioBroker", 26 | "GUI", 27 | "DashUI", 28 | "web interface", 29 | "home automation", 30 | "SCADA", 31 | "metro GUI" 32 | ], 33 | "devDependencies": { 34 | "mocha": "^9.2.0", 35 | "chai": "^4.3.6", 36 | "@alcalzone/release-script": "^3.5.2", 37 | "@alcalzone/release-script-plugin-iobroker": "^3.5.1", 38 | "@alcalzone/release-script-plugin-license": "^3.5.0" 39 | }, 40 | "bugs": { 41 | "url": "https://github.com/ioBroker/ioBroker.vis-metro/issues" 42 | }, 43 | "main": "widgets/metro.html", 44 | "files": [ 45 | "admin/", 46 | "img/", 47 | "widgets/", 48 | "io-package.json", 49 | "LICENSE" 50 | ], 51 | "scripts": { 52 | "test": "node node_modules/mocha/bin/mocha --exit", 53 | "release": "release-script", 54 | "release-patch": "release-script patch --yes --no-update-lockfile", 55 | "release-minor": "release-script minor --yes --no-update-lockfile", 56 | "release-major": "release-script major --yes --no-update-lockfile" 57 | }, 58 | "license": "MIT", 59 | "dependencies": { 60 | "@iobroker/adapter-core": "^1.0.3" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 27 | 51 | 52 |
53 | 54 | 55 | 56 | 57 |

Metro Widgets settings

58 | 59 |
There is nothing to setup 60 |
61 | 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Logo](admin/metro.png) 2 | # ioBroker.vis-metro 3 | 4 | ![Number of Installations](http://iobroker.live/badges/vis-metro-installed.svg) ![Number of Installations](http://iobroker.live/badges/vis-metro-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.vis-metro.svg)](https://www.npmjs.com/package/iobroker.vis-metro) 5 | [![Downloads](https://img.shields.io/npm/dm/iobroker.vis-metro.svg)](https://www.npmjs.com/package/iobroker.vis-metro) 6 | 7 | [![NPM](https://nodei.co/npm/iobroker.vis-metro.png?downloads=true)](https://nodei.co/npm/iobroker.vis-metro/) 8 | 9 | Metro widget sets for ioBroker.vis. Widgets are styled as Windows Metro interface. 10 | ![Screenshot](img/Demo2.png) 11 | 12 | Build with http://metroui.org.ua/. 13 | 14 | 18 | ## Changelog 19 | ### 1.2.0 (2022-02-12) 20 | * (bluefox) Updated build process 21 | 22 | ### 1.1.2 (2017-12-17) 23 | * (bluefox) Fixed metro-string widget 24 | 25 | ### 1.1.1 (2017-05-27) 26 | * (mctom) 2 Widgets added 27 | * (buanet) fix tplMetroTileStateNumber 28 | 29 | ### 1.1.0 (2016-11-12) 30 | * (bluefox) Support of new concept by vis 31 | 32 | ### 1.0.4 (2016-10-11) 33 | * (bluefox) fix Metro Widget Heating 34 | 35 | ### 1.0.3 (2016-09-21) 36 | * (bluefox) fix Metro Widget Tile State / val Badge Number 37 | 38 | ### 1.0.1 (2016-09-13) 39 | * (bluefox) fix Metro Widget "Tile Dialog" 40 | 41 | ### 1.0.0 (2016-03-15) 42 | * (bluefox) remove configuration dialog 43 | 44 | ### 0.2.1 (2016-01-31) 45 | * (vore) add tplMetroTileBoolDialog 46 | 47 | ### 0.2.0 (2015-12-14) 48 | * (bluefox) add custom icon for badges 49 | 50 | ### 0.1.11 (2015-12-03) 51 | * (bluefox) fix Tile ValueList 8: badge icon. 52 | 53 | ### 0.1.10 (2015-12-01) 54 | * (bluefox) fix bool/number widget: badge icon. 55 | 56 | ### 0.1.9 (2015-09-19) 57 | * (bluefox) fix Navigation widget: Brand Background wird nicht angezeigt, sobald Brand Background inactive und Brand Background active den selben Wert haben. 58 | * (instalator) support of old browsers 59 | 60 | ### 0.1.8 (2015-09-06) 61 | * (bluefox) remove prepublish script because installation is not possible 62 | 63 | ### 0.1.6 (2015-08-14) 64 | * (bluefox) prepublish script 65 | * (bluefox) update toggle widget 66 | 67 | ### 0.1.5 (2015-08-12) 68 | * (bluefox) protect against double event: click and touchstart 69 | 70 | ### 0.1.3 (2015-08-05) 71 | * (bluefox) fix metro-tile-heating window icon 72 | 73 | ### 0.1.2 (2015-07-25) 74 | * (bluefox) add mfd icons 75 | * (bluefox) fix widgets with sliders if "min" != 0 76 | 77 | ### 0.1.1 (2015-07-10) 78 | * (bluefox) make content_oid of "Tile Dialog / Badge Number" as object ID 79 | 80 | ### 0.1.0 (2015-06-29) 81 | * (siedi) Add: Service status and humidity to heating tile 82 | 83 | ### 0.0.1 (2015-06-28) 84 | * (bluefox) initial checkin 85 | 86 | ## License 87 | Copyright (c) 2013-2022 hobbyquaker https://github.com/hobbyquaker, bluefox https://github.com/GermanBluefox 88 | MIT 89 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | # Number of days of inactivity before an Issue or Pull Request becomes stale 4 | daysUntilStale: 90 5 | 6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. 7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. 8 | daysUntilClose: 7 9 | 10 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) 11 | onlyLabels: [] 12 | 13 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable 14 | exemptLabels: 15 | - enhancement 16 | - security 17 | 18 | # Set to true to ignore issues in a project (defaults to false) 19 | exemptProjects: true 20 | 21 | # Set to true to ignore issues in a milestone (defaults to false) 22 | exemptMilestones: true 23 | 24 | # Set to true to ignore issues with an assignee (defaults to false) 25 | exemptAssignees: false 26 | 27 | # Label to use when marking as stale 28 | staleLabel: wontfix 29 | 30 | # Comment to post when marking as stale. Set to `false` to disable 31 | markComment: > 32 | This issue has been automatically marked as stale because it has not had 33 | recent activity. It will be closed if no further activity occurs within the next 7 days. 34 | Please check if the issue is still relevant in the most current version of the adapter 35 | and tell us. Also check that all relevant details, logs and reproduction steps 36 | are included and update them if needed. 37 | Thank you for your contributions. 38 | 39 | Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. 40 | Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. 41 | Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, 42 | und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte 43 | enthalten sind bzw. aktualisiert diese. 44 | Vielen Dank für Eure Unterstützung. 45 | 46 | # Comment to post when removing the stale label. 47 | # unmarkComment: > 48 | # Your comment here. 49 | 50 | # Comment to post when closing a stale Issue or Pull Request. 51 | closeComment: > 52 | This issue has been automatically closed because of inactivity. Please open a new 53 | issue if still relevant and make sure to include all relevant details, logs and 54 | reproduction steps. 55 | Thank you for your contributions. 56 | 57 | Dieses Problem wurde aufgrund von Inaktivität automatisch geschlossen. Bitte öffnet ein 58 | neues Issue, falls dies noch relevant ist und stellt sicher das alle relevanten Details, 59 | Logs und Reproduktionsschritte enthalten sind. 60 | Vielen Dank für Eure Unterstützung. 61 | 62 | # Limit the number of actions per hour, from 1-30. Default is 30 63 | limitPerRun: 30 64 | 65 | # Limit to only `issues` or `pulls` 66 | only: issues 67 | 68 | # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': 69 | # pulls: 70 | # daysUntilStale: 30 71 | # markComment: > 72 | # This pull request has been automatically marked as stale because it has not had 73 | # recent activity. It will be closed if no further activity occurs. Thank you 74 | # for your contributions. 75 | 76 | # issues: 77 | # exemptLabels: 78 | # - confirmed -------------------------------------------------------------------------------- /io-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "common": { 3 | "name": "vis-metro", 4 | "version": "1.2.0", 5 | "news": { 6 | "1.2.0": { 7 | "en": "Updated build process", 8 | "de": "Build-Prozess aktualisiert", 9 | "ru": "Обновленный процесс сборки", 10 | "pt": "Processo de compilação atualizado", 11 | "nl": "Bijgewerkt bouwproces", 12 | "fr": "Processus de construction mis à jour", 13 | "it": "Processo di costruzione aggiornato", 14 | "es": "Proceso de compilación actualizado", 15 | "pl": "Zaktualizowany proces kompilacji", 16 | "zh-cn": "更新的构建过程" 17 | }, 18 | "1.1.2": { 19 | "en": "Fixed metro-string widget", 20 | "de": "Korrigiert metro-string widget", 21 | "ru": "Исправлен metro-string widget", 22 | "nl": "Vaste metro-string widget", 23 | "pt": "Atualizado o widget Metro-string", 24 | "fr": "Widget de metro-string fixe" 25 | }, 26 | "1.1.1": { 27 | "en": "2 Widgets added\nfix tplMetroTileStateNumber", 28 | "de": "2 Widgets hinzugefügt\nfix tplMetroTileStateNumber", 29 | "ru": "Добавлено 2 виджета\nИсправлен MetroTileStateNumber" 30 | }, 31 | "1.1.0": { 32 | "en": "Support of new concept by vis", 33 | "de": "Unterstützung vom neuen vis-Konzept", 34 | "ru": "Поддержка нового концепта vis" 35 | }, 36 | "1.0.4": { 37 | "en": "fix Metro Widget Heating", 38 | "de": "Korrigiert Metro Widget Heating", 39 | "ru": "Исправлен виджет Metro Widget Heating" 40 | }, 41 | "1.0.3": { 42 | "en": "fix Metro Widget Tile State / val Badge Number", 43 | "de": "Korrigiert Widget Tile State / val Badge Number", 44 | "ru": "Исправлен виджет Tile State / val Badge Number" 45 | }, 46 | "1.0.1": { 47 | "en": "fix Metro Widget Tile Dialog", 48 | "de": "Korrigiert Widget Tile Dialog", 49 | "ru": "Исправлен виджет навигации" 50 | } 51 | }, 52 | "title": "Metro style Widgets for vis", 53 | "titleLang": { 54 | "en": "Metro style Widgets for vis", 55 | "de": "Widgets im Metro-Stil für vis", 56 | "ru": "Виджеты в стиле Metro для vis", 57 | "pt": "Widgets estilo Metro para vis", 58 | "nl": "Metro-stijl Widgets voor vis", 59 | "fr": "Widgets de style métro pour vis", 60 | "it": "Widget stile metro per vis", 61 | "es": "Widgets de estilo Metro para vis", 62 | "pl": "Widgety w stylu Metro dla vis", 63 | "zh-cn": "用于 vis 的 Metro 风格小部件" 64 | }, 65 | "desc": { 66 | "en": "metro Widgets for ioBroker.vis", 67 | "de": "metro Widgets für ioBroker.vis", 68 | "ru": "metro Widgets для ioBroker.vis" 69 | }, 70 | "platform": "Javascript/Node.js", 71 | "loglevel": "info", 72 | "icon": "metro.png", 73 | "enabled": true, 74 | "mode": "once", 75 | "extIcon": "https://raw.githubusercontent.com/ioBroker/ioBroker.vis-metro/master/admin/metro.png", 76 | "keywords": [ 77 | "metro", 78 | "vis", 79 | "GUI", 80 | "graphical", 81 | "scada" 82 | ], 83 | "readme": "https://github.com/ioBroker/ioBroker.vis-metro/blob/master/README.md", 84 | "authors": [ 85 | "hobbyquaker " 86 | ], 87 | "localLink": "%web_protocol%://%ip%:%web_port%/vis/edit.html", 88 | "license": "MIT", 89 | "dependencies": [ 90 | { 91 | "vis": ">=0.11.1" 92 | } 93 | ], 94 | "onlyWWW": true, 95 | "singleton": true, 96 | "type": "visualization-widgets", 97 | "restartAdapters": [ 98 | "vis" 99 | ], 100 | "connectionType": "none", 101 | "dataSource": "none", 102 | "noConfig": true, 103 | "adminUI": { 104 | "config": "none" 105 | } 106 | }, 107 | "native": { 108 | "dependencies": [ 109 | "jqui-mfd", 110 | "basic" 111 | ] 112 | }, 113 | "instanceObjects": [] 114 | } 115 | -------------------------------------------------------------------------------- /.github/workflows/test-and-release.yml: -------------------------------------------------------------------------------- 1 | # This is a composition of lint and test scripts 2 | # Make sure to update this file along with the others 3 | 4 | name: Test and Release 5 | 6 | # Run this job on all pushes and pull requests 7 | # as well as tags with a semantic version 8 | on: 9 | push: 10 | branches: 11 | - master 12 | tags: 13 | # normal versions 14 | - "v?[0-9]+.[0-9]+.[0-9]+" 15 | # pre-releases 16 | - "v?[0-9]+.[0-9]+.[0-9]+-**" 17 | pull_request: {} 18 | 19 | jobs: 20 | # Runs adapter tests on all supported node versions and OSes 21 | adapter-tests: 22 | if: contains(github.event.head_commit.message, '[skip ci]') == false 23 | 24 | runs-on: ${{ matrix.os }} 25 | strategy: 26 | matrix: 27 | node-version: [12.x, 14.x, 16.x] 28 | os: [ubuntu-latest, windows-latest, macos-latest] 29 | 30 | steps: 31 | - uses: actions/checkout@v1 32 | - name: Use Node.js ${{ matrix.node-version }} 33 | uses: actions/setup-node@v1 34 | with: 35 | node-version: ${{ matrix.node-version }} 36 | 37 | - name: Install Dependencies 38 | run: npm install 39 | 40 | - name: Run local tests 41 | run: npm test 42 | # - name: Run unit tests 43 | # run: npm run test:unit 44 | # - name: Run integration tests # (linux/osx) 45 | # if: startsWith(runner.OS, 'windows') == false 46 | # run: DEBUG=testing:* npm run test:integration 47 | # - name: Run integration tests # (windows) 48 | # if: startsWith(runner.OS, 'windows') 49 | # run: set DEBUG=testing:* & npm run test:integration 50 | 51 | # Deploys the final package to NPM 52 | deploy: 53 | needs: [adapter-tests] 54 | 55 | # Trigger this step only when a commit on master is tagged with a version number 56 | if: | 57 | contains(github.event.head_commit.message, '[skip ci]') == false && 58 | github.event_name == 'push' && 59 | startsWith(github.ref, 'refs/tags/') 60 | runs-on: ubuntu-latest 61 | strategy: 62 | matrix: 63 | node-version: [14.x] 64 | 65 | steps: 66 | - name: Checkout code 67 | uses: actions/checkout@v2 68 | 69 | - name: Use Node.js ${{ matrix.node-version }} 70 | uses: actions/setup-node@v1 71 | with: 72 | node-version: ${{ matrix.node-version }} 73 | 74 | - name: Extract the version and commit body from the tag 75 | id: extract_release 76 | # The body may be multiline, therefore we need to escape some characters 77 | run: | 78 | VERSION="${{ github.ref }}" 79 | VERSION=${VERSION##*/} 80 | VERSION=${VERSION##*v} 81 | echo "::set-output name=VERSION::$VERSION" 82 | BODY=$(git show -s --format=%b) 83 | BODY="${BODY//'%'/'%25'}" 84 | BODY="${BODY//$'\n'/'%0A'}" 85 | BODY="${BODY//$'\r'/'%0D'}" 86 | echo "::set-output name=BODY::$BODY" 87 | 88 | - name: Install Dependencies 89 | run: npm install 90 | 91 | - name: Publish package to npm 92 | run: | 93 | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} 94 | npm whoami 95 | npm publish 96 | 97 | - name: Create Github Release 98 | uses: actions/create-release@v1 99 | env: 100 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 101 | with: 102 | tag_name: ${{ github.ref }} 103 | release_name: Release v${{ steps.extract_release.outputs.VERSION }} 104 | draft: false 105 | # Prerelease versions create pre-releases on GitHub 106 | prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} 107 | body: ${{ steps.extract_release.outputs.BODY }} 108 | 109 | #- name: Notify Sentry.io about the release 110 | # run: | 111 | # npm i -g @sentry/cli 112 | # export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} 113 | # export SENTRY_URL=https://sentry.iobroker.net 114 | # export SENTRY_ORG=iobroker 115 | # export SENTRY_PROJECT=iobroker-admin 116 | # export SENTRY_VERSION=iobroker.admin@${{ steps.extract_release.outputs.VERSION }} 117 | # sentry-cli releases new $SENTRY_VERSION 118 | # sentry-cli releases finalize $SENTRY_VERSION 119 | 120 | # Add the following line BEFORE finalize if repositories are connected in Sentry 121 | # sentry-cli releases set-commits $SENTRY_VERSION --auto 122 | 123 | # Add the following line BEFORE finalize if sourcemap uploads are needed 124 | # sentry-cli releases files $SENTRY_VERSION upload-sourcemaps build/ 125 | -------------------------------------------------------------------------------- /test/testPackageFiles.js: -------------------------------------------------------------------------------- 1 | /* jshint -W097 */ 2 | /* jshint strict:false */ 3 | /* jslint node: true */ 4 | /* jshint expr: true */ 5 | 'use strict'; 6 | 7 | const expect = require('chai').expect; 8 | const fs = require('fs'); 9 | 10 | describe('Test package.json and io-package.json', () => { 11 | it('Test package files', done => { 12 | console.log(); 13 | 14 | const fileContentIOPackage = fs.readFileSync(__dirname + '/../io-package.json', 'utf8'); 15 | const ioPackage = JSON.parse(fileContentIOPackage); 16 | 17 | const fileContentNPMPackage = fs.readFileSync(__dirname + '/../package.json', 'utf8'); 18 | const npmPackage = JSON.parse(fileContentNPMPackage); 19 | 20 | expect(ioPackage).to.be.an('object'); 21 | expect(npmPackage).to.be.an('object'); 22 | 23 | expect(ioPackage.common.version, 'ERROR: Version number in io-package.json needs to exist').to.exist; 24 | expect(npmPackage.version, 'ERROR: Version number in package.json needs to exist').to.exist; 25 | 26 | expect(ioPackage.common.version, 'ERROR: Version numbers in package.json and io-package.json needs to match').to.be.equal(npmPackage.version); 27 | 28 | if (!ioPackage.common.news || !ioPackage.common.news[ioPackage.common.version]) { 29 | console.log('WARNING: No news entry for current version exists in io-package.json, no rollback in Admin possible!'); 30 | console.log(); 31 | } 32 | 33 | expect(npmPackage.author, 'ERROR: Author in package.json needs to exist').to.exist; 34 | expect(ioPackage.common.authors, 'ERROR: Authors in io-package.json needs to exist').to.exist; 35 | 36 | expect(ioPackage.common.license, 'ERROR: License missing in io-package in common.license').to.exist; 37 | 38 | if (ioPackage.common.name.indexOf('template') !== 0) { 39 | if (Array.isArray(ioPackage.common.authors)) { 40 | expect(ioPackage.common.authors.length, 'ERROR: Author in io-package.json needs to be set').to.not.be.equal(0); 41 | if (ioPackage.common.authors.length === 1) { 42 | expect(ioPackage.common.authors[0], 'ERROR: Author in io-package.json needs to be a real name').to.not.be.equal('my Name '); 43 | } 44 | } 45 | else { 46 | expect(ioPackage.common.authors, 'ERROR: Author in io-package.json needs to be a real name').to.not.be.equal('my Name '); 47 | } 48 | } 49 | else { 50 | console.log('WARNING: Testing for set authors field in io-package skipped because template adapter'); 51 | console.log(); 52 | } 53 | expect(fs.existsSync(__dirname + '/../README.md'), 'ERROR: README.md needs to exist! Please create one with description, detail information and changelog. English is mandatory.').to.be.true; 54 | if (!ioPackage.common.titleLang || typeof ioPackage.common.titleLang !== 'object') { 55 | console.log('WARNING: titleLang is not existing in io-package.json. Please add'); 56 | console.log(); 57 | } 58 | if ( 59 | ioPackage.common.title.indexOf('iobroker') !== -1 || 60 | ioPackage.common.title.indexOf('ioBroker') !== -1 || 61 | ioPackage.common.title.indexOf('adapter') !== -1 || 62 | ioPackage.common.title.indexOf('Adapter') !== -1 63 | ) { 64 | console.log('WARNING: title contains Adapter or ioBroker. It is clear anyway, that it is adapter for ioBroker.'); 65 | console.log(); 66 | } 67 | 68 | if (!ioPackage.common.controller && !ioPackage.common.onlyWWW && !ioPackage.common.noConfig) { 69 | if (!ioPackage.common.materialize || !fs.existsSync(__dirname + '/../admin/index_m.html') || !fs.existsSync(__dirname + '/../gulpfile.js')) { 70 | console.log('WARNING: Admin3 support is missing! Please add it'); 71 | console.log(); 72 | } 73 | if (ioPackage.common.materialize) { 74 | expect(fs.existsSync(__dirname + '/../admin/index_m.html'), 'Admin3 support is enabled in io-package.json, but index_m.html is missing!').to.be.true; 75 | } 76 | } 77 | 78 | const licenseFileExists = fs.existsSync(__dirname + '/../LICENSE'); 79 | const fileContentReadme = fs.readFileSync(__dirname + '/../README.md', 'utf8'); 80 | if (fileContentReadme.indexOf('## Changelog') === -1) { 81 | console.log('Warning: The README.md should have a section ## Changelog'); 82 | console.log(); 83 | } 84 | expect((licenseFileExists || fileContentReadme.indexOf('## License') !== -1), 'A LICENSE must exist as LICENSE file or as part of the README.md').to.be.true; 85 | if (!licenseFileExists) { 86 | console.log('Warning: The License should also exist as LICENSE file'); 87 | console.log(); 88 | } 89 | if (fileContentReadme.indexOf('## License') === -1) { 90 | console.log('Warning: The README.md should also have a section ## License to be shown in Admin3'); 91 | console.log(); 92 | } 93 | done(); 94 | }); 95 | }); 96 | -------------------------------------------------------------------------------- /widgets/metro/fonts/metroSysIcons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /widgets/metro/js/metro.js: -------------------------------------------------------------------------------- 1 | var hasTouch = 'ontouchend' in window, eventTimer; 2 | var moveDirection = 'undefined', startX, startY, deltaX, deltaY, mouseDown = false; 3 | 4 | function addTouchEvents(element) { 5 | if (hasTouch) { 6 | element.addEventListener("touchstart", touch2Mouse, true); 7 | element.addEventListener("touchmove", touch2Mouse, true); 8 | element.addEventListener("touchend", touch2Mouse, true); 9 | } 10 | } 11 | 12 | function touch2Mouse(e) { 13 | var theTouch = e.changedTouches[0]; 14 | var mouseEv; 15 | 16 | switch(e.type) 17 | { 18 | case "touchstart": mouseEv="mousedown"; break; 19 | case "touchend": mouseEv="mouseup"; break; 20 | case "touchmove": mouseEv="mousemove"; break; 21 | default: return; 22 | } 23 | 24 | 25 | if (mouseEv === "mousedown") { 26 | eventTimer = (new Date()).getTime(); 27 | startX = theTouch.clientX; 28 | startY = theTouch.clientY; 29 | mouseDown = true; 30 | } 31 | 32 | if (mouseEv === "mouseup") { 33 | if ((new Date()).getTime() - eventTimer <= 500) { 34 | mouseEv = "click"; 35 | } else if ((new Date()).getTime() - eventTimer > 1000) { 36 | mouseEv = "longclick"; 37 | } 38 | eventTimer = 0; 39 | mouseDown = false; 40 | } 41 | 42 | if (mouseEv === "mousemove") { 43 | if (mouseDown) { 44 | deltaX = theTouch.clientX - startX; 45 | deltaY = theTouch.clientY - startY; 46 | moveDirection = deltaX > deltaY ? 'horizontal' : 'vertical'; 47 | } 48 | } 49 | 50 | var mouseEvent = document.createEvent('MouseEvent'); 51 | mouseEvent.initMouseEvent(mouseEv, true, true, window, 1, theTouch.screenX, theTouch.screenY, theTouch.clientX, theTouch.clientY, false, false, false, false, 0, null); 52 | theTouch.target.dispatchEvent(mouseEvent); 53 | 54 | e.preventDefault(); 55 | } 56 | 57 | 58 | (function( $ ) { 59 | $.widget('metro.tileTransform', { 60 | 61 | version: "1.2.0", 62 | 63 | options: {}, 64 | 65 | _create: function(){ 66 | var element = this.element; 67 | var dim = {w: element.width(), h: element.height()}; 68 | 69 | element.on('mousedown.metroTransform', function(e){ 70 | var X = e.pageX - $(this).offset().left, Y = e.pageY - $(this).offset().top; 71 | var transform = 'top'; 72 | 73 | if (X < dim.w * 1/3 && (Y < dim.h * 1/2 || Y > dim.h * 1/2 )) { 74 | transform = 'left'; 75 | } else if (X > dim.w * 2/3 && (Y < dim.h * 1/2 || Y > dim.h * 1/2 )) { 76 | transform = 'right' 77 | } else if (X > dim.w*1/3 && X dim.h/2) { 78 | transform = 'bottom'; 79 | } 80 | 81 | 82 | 83 | setTimeout(function ($this) { 84 | $this.addClass('tile-transform-'+transform); 85 | }, 10, $(this)); 86 | 87 | }); 88 | 89 | element.on('mouseup.metroTransform', function(){ 90 | 91 | 92 | setTimeout(function ($this) { 93 | $this.removeClass('tile-transform-left') 94 | .removeClass('tile-transform-right') 95 | .removeClass('tile-transform-top') 96 | .removeClass('tile-transform-bottom'); 97 | }, 10, $(this)); 98 | 99 | 100 | 101 | }); 102 | element.on('mouseleave.metroTransform', function(){ 103 | $(this) 104 | .removeClass('tile-transform-left') 105 | .removeClass('tile-transform-right') 106 | .removeClass('tile-transform-top') 107 | .removeClass('tile-transform-bottom'); 108 | }); 109 | }, 110 | 111 | _destroy: function(){ 112 | 113 | }, 114 | 115 | _setOption: function(key, value){ 116 | this._super('_setOption', key, value); 117 | } 118 | }) 119 | 120 | $.widget("metro.inputControl", { 121 | 122 | version: "1.0.0", 123 | 124 | options: { 125 | }, 126 | 127 | _create: function(){ 128 | var that = this, 129 | control = this.element; 130 | 131 | if (control.hasClass('text')) { 132 | this.initTextInput(control, that); 133 | } else if (control.hasClass('password')) { 134 | this.initPasswordInput(control, that); 135 | } else if (control.hasClass('checkbox') || control.hasClass('radio') || control.hasClass('switch')) { 136 | this.initCheckboxInput(control, that); 137 | } else if (control.hasClass('file')) { 138 | this.initFileInput(control, that); 139 | } 140 | }, 141 | 142 | initCheckboxInput: function(el, that) { 143 | }, 144 | 145 | initFileInput: function(el, that){ 146 | var button, input, wrapper; 147 | wrapper = $(""); 148 | button = el.children('.btn-file'); 149 | input = el.children('input[type="file"]'); 150 | input.css('z-index', 0); 151 | wrapper.insertAfter(input); 152 | input.attr('tabindex', '-1'); 153 | //button.attr('tabindex', '-1'); 154 | button.attr('type', 'button'); 155 | 156 | input.on('change', function(){ 157 | var val = $(this).val(); 158 | if (val != '') { 159 | wrapper.val(val); 160 | } 161 | }); 162 | 163 | button.on('click', function(){ 164 | input.trigger('click'); 165 | }); 166 | }, 167 | 168 | initTextInput: function(el, that){ 169 | var button = el.children('.btn-clear'), 170 | input = el.children('input[type=text]'); 171 | 172 | //console.log(button.length); 173 | //button = el.children('.btn-clear'); 174 | 175 | if (button.length == 0) return; 176 | 177 | button.attr('tabindex', '-1'); 178 | button.attr('type', 'button'); 179 | 180 | button.on('click', function(){ 181 | input = el.children('input'); 182 | if (input.prop('readonly')) return; 183 | input.val(''); 184 | input.focus(); 185 | that._trigger("onClear", null, el); 186 | }); 187 | 188 | if (!input.attr("disabled")) input.on('click', function(){$(this).focus();}); 189 | }, 190 | 191 | initPasswordInput: function(el, that){ 192 | var button = el.children('.btn-reveal'), 193 | input = el.children('input[type=password]'); 194 | var wrapper; 195 | 196 | if (button.length == 0) return; 197 | 198 | button.attr('tabindex', '-1'); 199 | button.attr('type', 'button'); 200 | 201 | button.on('mousedown', function(e){ 202 | input.attr('type', 'text'); 203 | //e.preventDefault(); 204 | 205 | // wrapper = el.find(".__wrapper__").length == 0 ? $('') : el.find(".__wrapper__"); 206 | // 207 | // input.hide(); 208 | // wrapper.appendTo(that.element); 209 | // wrapper.val(input.val()); 210 | // 211 | // that._trigger("onPasswordShow", null, that.element); 212 | }); 213 | 214 | button.on('mouseup, mouseleave, blur', function(e){ 215 | input.attr('type', 'password').focus(); 216 | //e.preventDefault(); 217 | 218 | 219 | // input.show().focus(); 220 | // wrapper.remove(); 221 | // 222 | // that._trigger("onPasswordHide", null, that.element); 223 | }); 224 | 225 | if (!input.attr("disabled")) input.on('click', function(){$(this).focus();}); 226 | }, 227 | 228 | _destroy: function(){ 229 | 230 | }, 231 | 232 | _setOption: function(key, value){ 233 | this._super('_setOption', key, value); 234 | } 235 | }); 236 | 237 | $.widget("metro.inputTransform", { 238 | 239 | version: "1.0.0", 240 | 241 | options: { 242 | transformType: "text" 243 | }, 244 | 245 | _create: function(){ 246 | var that = this, 247 | element = this.element, 248 | inputType; 249 | 250 | 251 | var checkTransform = element.parent().hasClass("input-control"); 252 | if (checkTransform) return; 253 | 254 | inputType = element.get(0).tagName.toLowerCase(); 255 | 256 | if (inputType == "textarea") { 257 | this.options.transformType = "textarea"; 258 | } else if (inputType == "select") { 259 | this.options.transformType = "select"; 260 | } else { 261 | if (element.data('transformType') != undefined) { 262 | this.options.transformType = element.data('transformType'); 263 | } else { 264 | this.options.transformType = element.attr("type"); 265 | } 266 | } 267 | 268 | var control = undefined; 269 | 270 | switch (this.options.transformType) { 271 | case "password": control = this._createInputPassword(); break; 272 | case "file": control = this._createInputFile(); break; 273 | case "checkbox": control = this._createInputCheckbox(); break; 274 | case "radio": control = this._createInputRadio(); break; 275 | case "switch": control = this._createInputSwitch(); break; 276 | case "select": control = this._createInputSelect(); break; 277 | case "textarea": control = this._createInputTextarea(); break; 278 | case "search": control = this._createInputSearch(); break; 279 | case "email": control = this._createInputEmail(); break; 280 | case "tel": control = this._createInputTel(); break; 281 | case "number": control = this._createInputNum(); break; 282 | default: control = this._createInputText(); 283 | } 284 | 285 | control.inputControl(); 286 | }, 287 | 288 | _createInputTextarea: function(){ 289 | var element = this.element; 290 | 291 | var wrapper = $("
").addClass("input-control").addClass("textarea"); 292 | var clone = element.clone(true); 293 | var parent = element.parent(); 294 | 295 | clone.appendTo(wrapper); 296 | wrapper.insertBefore(element); 297 | 298 | element.remove(); 299 | 300 | return wrapper; 301 | }, 302 | 303 | _createInputSelect: function(){ 304 | var element = this.element; 305 | 306 | var wrapper = $("
").addClass("input-control").addClass("select"); 307 | var clone = element.clone(true); 308 | var parent = element.parent(); 309 | 310 | clone.val(element.val()).appendTo(wrapper); 311 | wrapper.insertBefore(element); 312 | 313 | element.remove(); 314 | 315 | return wrapper; 316 | }, 317 | 318 | _createInputSwitch: function(){ 319 | var element = this.element; 320 | 321 | var wrapper = $("
").addClass("input-control").addClass("switch"); 322 | var label = $("