-
Notifications
You must be signed in to change notification settings - Fork 72
/
hoversidenavbuttonsmenu.json
16 lines (16 loc) · 5.74 KB
/
hoversidenavbuttonsmenu.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"alias": "hoversidenavbuttonsmenu",
"name": "HoverSidenavButtonsMenu",
"descriptor": {
"type": "static",
"sizeX": 7.5,
"sizeY": 3,
"resources": [],
"templateHtml": "<div id=\"mySidenav\" class=\"sidenav\">\r\n <a href=\"#\" id=\"first\">First</a>\r\n <a href=\"#\" id=\"second\">Blog</a>\r\n <a href=\"#\" id=\"third\">Projects</a>\r\n <a href=\"#\" id=\"fourth\">Contact</a>\r\n</div>\r\n",
"templateCss": "#mySidenav a {\r\n position: absolute;\r\n left: -80px;\r\n transition: 0.3s;\r\n padding: 15px;\r\n width: 120px;\r\n text-decoration: none;\r\n font-size: 20px;\r\n color: white;\r\n border-radius: 0 5px 5px 0;\r\n}\r\n\r\n#mySidenav a:hover {\r\n left: 0;\r\n}\r\n\r\n#first {\r\n top: 20px;\r\n background-color: #4CAF50;\r\n}\r\n\r\n#second {\r\n top: 80px;\r\n background-color: #2196F3;\r\n}\r\n\r\n#third {\r\n top: 140px;\r\n background-color: #f44336;\r\n}\r\n\r\n#fourth {\r\n top: 200px;\r\n background-color: #555\r\n}",
"controllerScript": "self.onInit = function() \n{\n var menu1Enable = self.ctx.settings.enableLink1;\n var menu2Enable = self.ctx.settings.enableLink2;\n var menu3Enable = self.ctx.settings.enableLink3;\n var menu4Enable = self.ctx.settings.enableLink4;\n var menu1Title = self.ctx.settings.content;\n document.getElementById(\"first\").innerHTML = menu1Title;\n if (menu1Enable === false)\n {\n document.getElementById(\"first\").style.visibility = \"hidden\";\n }\n var menu2Title = self.ctx.settings.content2;\n document.getElementById(\"second\").innerHTML = menu2Title;\n if (menu2Enable === false)\n {\n document.getElementById(\"second\").style.visibility = \"hidden\";\n }\n var menu3Title = self.ctx.settings.content3;\n document.getElementById(\"third\").innerHTML = menu3Title;\n if (menu3Enable === false)\n {\n document.getElementById(\"third\").style.visibility = \"hidden\";\n }\n var menu4Title = self.ctx.settings.content4;\n document.getElementById(\"fourth\").innerHTML = menu4Title;\n if (menu4Enable === false)\n {\n document.getElementById(\"fourth\").style.visibility = \"hidden\";\n } \n var menu1Link = self.ctx.settings.link1;\n var menu2Link = self.ctx.settings.link2;\n var menu3Link = self.ctx.settings.link3;\n var menu4Link = self.ctx.settings.link4;\n \n document.getElementById(\"first\").href = menu1Link;\n document.getElementById(\"second\").href = menu2Link;\n document.getElementById(\"third\").href = menu3Link;\n document.getElementById(\"fourth\").href = menu4Link;\n \n}\n",
"settingsSchema": "{\n \"schema\": {\n \"type\": \"object\",\n \"title\": \"Settings\",\n \"properties\": {\n \"content\": {\n \"title\": \"Menu 1 String\",\n \"type\": \"string\",\n \"default\": \"Menu Entry 1\"\n },\n \"content2\": {\n \"title\": \"Menu 2 String\",\n \"type\": \"string\",\n \"default\": \"Menu Entry 2\"\n },\n \"content3\": {\n \"title\": \"Menu 3 String\",\n \"type\": \"string\",\n \"default\": \"Menu Entry 3\"\n },\n \"content4\": {\n \"title\": \"Menu 4 String\",\n \"type\": \"string\",\n \"default\": \"Menu Entry 4\"\n },\n \"link1\": {\n \"title\": \"Static link 1\",\n \"type\": \"string\",\n \"default\": \"http://www.rossmann-engineering.de\"\n },\n \"link2\": {\n \"title\": \"Static link 2\",\n \"type\": \"string\",\n \"default\": \"http://www.rossmann-engineering.de\"\n },\n \"link3\": {\n \"title\": \"Static link 3\",\n \"type\": \"string\",\n \"default\": \"http://www.rossmann-engineering.de\"\n },\n \"link4\": {\n \"title\": \"Static link 4\",\n \"type\": \"string\",\n \"default\": \"http://www.rossmann-engineering.de\"\n },\n \"enableLink1\": {\n \"title\": \"Enable link 1\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"enableLink2\": {\n \"title\": \"Enable link 2\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enableLink3\": {\n \"title\": \"Enable link 3\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"enableLink4\": {\n \"title\": \"Enable link 4\",\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n }\n}\n",
"dataKeySettingsSchema": "",
"defaultConfig": "{\"showTitle\":false,\"backgroundColor\":\"rgb(255, 255, 255)\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"8px\",\"settings\":{\"content\":\"Menu entry 1\",\"content2\":\"Menu entry 2\",\"content3\":\"Menu entry 3\",\"content4\":\"Menu entry 4\",\"link1\":\"http://www.rossmann-engineering.de\",\"link2\":\"http://www.rossmann-engineering.de\",\"link3\":\"http://www.rossmann-engineering.de\",\"link4\":\"http://www.rossmann-engineering.de\",\"enableLink1\":true,\"enableLink2\":false},\"title\":\"HoverSidenavButtonsMenu\",\"dropShadow\":true,\"datasources\":[],\"timewindow\":{\"realtime\":{\"timewindowMs\":60000}},\"enableFullscreen\":true,\"widgetStyle\":{},\"titleStyle\":{\"fontSize\":\"16px\",\"fontWeight\":400},\"useDashboardTimewindow\":true,\"displayTimewindow\":true,\"showLegend\":false,\"actions\":{}}"
}
}