Skip to content

Commit

Permalink
inactivity style, commands
Browse files Browse the repository at this point in the history
  • Loading branch information
andreypopov committed Dec 3, 2018
1 parent 43c8210 commit 0d5a236
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions popov-blinds.widget.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"template": "<style>\n.blinds_widget .progress-controls {\n position: absolute;\t\n z-index: 999;\n \tright:0;\n \tmargin-right:10px;\n}\n \n.blinds_widget .btn-group-vertical {\n \tposition: relative;\n}\n \n.blinds_widget .blinds-slider .progress-controls .btn-default {\n color: rgb(103, 106, 108);\n \tfont-size:26px;\n background-color: rgba(255,255,255,0.5);\n border-color:rgb(103, 106, 108, 0.5);\n \tpadding: 0 !important;\n \theight:54px;\n}\n \n.blinds_widget .blinds-slider .progress-controls .btn-default:hover {\n border-color:rgb(103, 106, 108, 0.5);\n \tbackground-color: rgba(255,255,255,0.7);\n}\n \n.blinds_widget .rz-limit {\n \tdisplay:none;\n}\n \n.blinds_widget button {\n \tborder: 0px solid white;\n \tbackground: rgba(0,0,0,0.5);\n \tcolor: white; \n \theight: 1.5em;\n \twidth: 1.5em;\n \tfloat: left;\n \tfont-size: 3em;\n \tmargin-right: 12px;\n \tline-height: 50%;\n \tpadding: 0 0 0 0;\n}\n \n.blinds_widget .center {\n margin: 0 auto;\n}\n \n.blinds_widget .blinds-slider .rzslider .rz-bar {\n \tbackground-color: #75bbfd;\n \twidth: 100%;\n}\n \n.blinds_widget .blinds-slider .rzslider .rz-selection {\n \tbackground-color: #b16700;\n}\n \n.blinds_widget .blinds-slider.blinds-slider-{{config.blind_item}} .rzslider .rz-selection {\n \tbackground-color: {{config.blind_color}};\t\n}\n \n.blinds_widget .readonly.blinds-slider.blinds-slider-{{config.blind_item}} .rzslider {\n \tpointer-events: none;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-pointer {\n \tdisplay:none;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-pointer:after {\n \tdisplay: none;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-bubble {\n \tbottom: 14px;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-tick {\n \twidth: 1px;\n \theight: 10px;\n \tmargin-left: 4px;\n \tborder-radius: 0;\n \tbackground: #ffe4d1;\n \ttop: -1px;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-tick.rz-selected {\n \tbackground-color: #b16700;\n}\n \n.blinds_widget .blinds-slider .rzslider.rz-vertical {\n width: 100%;\n \tmargin: 0;\n}\n \n.blinds_widget .blinds-slider .rzslider.rz-vertical .rz-bubble {\n bottom: 0;\n left: 0px!important;\n margin-left: 3px;\n \tz-index:100;\n \tcolor:white !important;\n}\n \n.blinds_widget .blinds-slider .rzslider.rz-vertical .rz-bar-wrapper {\n \t\tmargin:0;\n \tpadding:0;\n \twidth:100%;\n \tcursor:pointer;\n }\n \n.blinds_widget .blinds-slider .box-content { \n \tpadding:0;\n}\n</style>\n\n<div class=\"blinds_widget\">\n <div class=\"title\">{{ngModel.name}}</div>\n \n <div class=\"blinds-slider blinds-slider-{{config.blind_item}} row center\" ng-class=\"(config.no_slider)?'readonly':''\" style=\"height:180px;width:100%;\" ng-init='slider = {\n \"item\": config.blind_percentage,\n \"floor\": 0,\n \"ceil\": 100,\n \"step\": 10,\n \"unit\": \"%\",\n \"vertical\": true,\n \"inverted\": true,\n \"readonly\": true \t\n};'>\n \n<div class=\"progress-controls\">\n\t<div class=\"btn-group-vertical\">\n\t\t<button type=\"button\" class=\"btn btn-default btn-lg\" title=\"Вверх\" ng-click=\"sendCmd(config.blind_item, 'UP')\">\n <i class=\"glyphicon glyphicon-menu-up\"></i>\n </button>\n <button type=\"button\" class=\"btn btn-default btn-lg\" title=\"Стоп\" ng-click=\"sendCmd(config.blind_item, 'STOP')\">\n <i class=\"glyphicon glyphicon-stop\"></i>\n </button>\n <button type=\"button\" class=\"btn btn-default btn-lg\" title=\"Вниз\" ng-click=\"sendCmd(config.blind_item, 'DOWN')\">\n <i class=\"glyphicon glyphicon-menu-down\"></i>\n </button> \n\t</div>\n</div>\n \n <widget-slider class=\"blinds-slider\" ng-model=\"slider\"></widget-slider> \n </div>\n</div>\n \n \n \n \n\n\n\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n",
"template": "<style>\n.blinds_widget .progress-controls {\n position: absolute;\t\n z-index: 999;\n \tright:0;\n \tmargin-right:10px;\n}\n \n.blinds_widget .btn-group-vertical {\n \tposition: relative;\n}\n \n.blinds_widget .blinds-slider .progress-controls .btn-default {\n color: rgb(103, 106, 108);\n \tfont-size:26px;\n background-color: rgba(255,255,255,0.5);\n border-color:rgb(103, 106, 108, 0.5);\n \tpadding: 0 !important;\n \theight:54px;\n}\n \n.blinds_widget .blinds-slider .progress-controls .btn-default:hover {\n border-color:rgb(103, 106, 108, 0.5);\n \tbackground-color: rgba(255,255,255,0.7);\n}\n \n.blinds_widget .rz-limit {\n \tdisplay:none;\n}\n \n.blinds_widget button {\n \tborder: 0px solid white;\n \tbackground: rgba(0,0,0,0.5);\n \tcolor: white; \n \theight: 1.5em;\n \twidth: 1.5em;\n \tfloat: left;\n \tfont-size: 3em;\n \tmargin-right: 12px;\n \tline-height: 50%;\n \tpadding: 0 0 0 0;\n}\n \n.blinds_widget .center {\n margin: 0 auto;\n}\n \n.blinds_widget .blinds-slider .rzslider .rz-bar {\n \tbackground-color: #75bbfd;\n \twidth: 100%;\n}\n \n.blinds_widget .blinds-slider .rzslider .rz-selection {\n \tbackground-color: #b16700;\n}\n \n.blinds_widget .blinds-slider.blinds-slider-{{vm.widget.item}} .rzslider .rz-selection {\n \tbackground-color: {{config.blind_color}};\t\n}\n.blinds_widget .blinds-slider.blinds-slider-{{vm.widget.item}}.inactive .rzslider .rz-selection {\n \tbackground-color: #7e7b7b;\t\n}\n.blinds_widget .blinds-slider.inactive .rzslider .rz-bar {\n \tbackground-color: #cccccc;\n} \n \n \n.blinds_widget .readonly.blinds-slider.blinds-slider-{{vm.widget.item}} .rzslider {\n \tpointer-events: none;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-pointer {\n \tdisplay:none;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-pointer:after {\n \tdisplay: none;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-bubble {\n \tbottom: 14px;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-tick {\n \twidth: 1px;\n \theight: 10px;\n \tmargin-left: 4px;\n \tborder-radius: 0;\n \tbackground: #ffe4d1;\n \ttop: -1px;\n}\n\n.blinds_widget .blinds-slider .rzslider .rz-tick.rz-selected {\n \tbackground-color: #b16700;\n}\n \n.blinds_widget .blinds-slider .rzslider.rz-vertical {\n width: 100%;\n \tmargin: 0;\n}\n \n.blinds_widget .blinds-slider .rzslider.rz-vertical .rz-bubble {\n bottom: 0;\n left: 0px!important;\n margin-left: 3px;\n \tz-index:100;\n \tcolor:white !important;\n}\n \n.blinds_widget .blinds-slider .rzslider.rz-vertical .rz-bar-wrapper {\n \t\tmargin:0;\n \tpadding:0;\n \twidth:100%;\n \tcursor:pointer;\n }\n \n.blinds_widget .blinds-slider .box-content { \n \tpadding:0;\n}\n</style>\n\n<div class=\"blinds_widget\">\n <div class=\"title\">{{ngModel.name}}</div>\n \n <div class=\"blinds-slider blinds-slider-{{vm.widget.item}} row center\" ng-class=\"itemValue(config.blind_item) == 'N/A' || itemValue(config.blind_item) == 'UNDEF'?'inactive':''\" ng-class=\"(config.no_slider) || itemValue(config.blind_item) == 'UNDEF'?'readonly':''\" style=\"height:180px;width:100%;\" ng-init='slider = {\n \"item\": config.blind_percentage,\n \"floor\": 0,\n \"ceil\": 100,\n \"step\": 10,\n \"unit\": \"%\",\n \"vertical\": true,\n \"inverted\": true,\n \"readonly\": true \t\n};'>\n \n<div class=\"progress-controls\">\n\t<div class=\"btn-group-vertical\">\n\t\t<button type=\"button\" class=\"btn btn-default btn-lg\" title=\"Вверх\" ng-click=\"sendCmd(config.blind_item, config.cmd_up)\">\n <i class=\"glyphicon glyphicon-menu-up\"></i>\n </button>\n <button type=\"button\" class=\"btn btn-default btn-lg\" title=\"Стоп\" ng-click=\"sendCmd(config.blind_item, 'STOP')\">\n <i class=\"glyphicon glyphicon-stop\"></i>\n </button>\n <button type=\"button\" class=\"btn btn-default btn-lg\" title=\"Вниз\" ng-click=\"sendCmd(config.blind_item, config.cmd_down)\">\n <i class=\"glyphicon glyphicon-menu-down\"></i>\n </button> \n\t</div>\n</div>\n \n <widget-slider class=\"blinds-slider\" ng-model=\"slider\"></widget-slider> \n </div>\n</div>\n \n \n \n \n\n\n\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n",
"name": "Blinds",
"author": "Popov Andrey",
"description": "A control of blinds up/down/stop + status",
Expand All @@ -24,12 +24,30 @@
"description": "Item that shows status of blinds from 0 (opened) to 100 (closed)",
"default": "0"
},
{
"type": "string",
"id": "cmd_up",
"label": "Command for UP",
"default": "UP"
},
{
"type": "string",
"id": "cmd_stop",
"label": "Command for STOP",
"default": "STOP"
},
{
"type": "string",
"id": "cmd_down",
"label": "Command for DOWN",
"default": "DOWN"
},
{
"type": "checkbox",
"id": "no_slider",
"label": "Slider in read only mode",
"description": "Check it if you are not able to set accurate blinds position"
}
],
"readme_url": "https://community.openhab.org/t/widget-blinds/48834"
"readme_url": "https://community.openhab.org/t/30181"
}

0 comments on commit 0d5a236

Please sign in to comment.