robeaux 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/Gruntfile.js +43 -0
  3. data/Makefile +11 -2
  4. data/README.markdown +2 -0
  5. data/css/main.css +1 -0
  6. data/css/style.css +113 -24
  7. data/css/themes/blackboard.css +1 -0
  8. data/css/themes/dark.css +1 -0
  9. data/css/themes/gray.css +1 -0
  10. data/css/themes/whiteboard.css +1 -0
  11. data/images/bullet-connections-2.png +0 -0
  12. data/images/bullet-connections.png +0 -0
  13. data/images/bullet-devices-2.png +0 -0
  14. data/images/bullet-devices.png +0 -0
  15. data/images/devices-image-2.png +0 -0
  16. data/images/devices-image.png +0 -0
  17. data/images/logo-robeaux.png +0 -0
  18. data/images/robots-icon_03.png +0 -0
  19. data/index.html +15 -8
  20. data/js/controllers/widget_editor_ctrl.js +44 -0
  21. data/js/controllers/widgets_ctrl.js +40 -0
  22. data/js/directives/widget.js +50 -0
  23. data/js/router.js +5 -0
  24. data/js/services/themes.js +9 -5
  25. data/js/services/widgets.js +86 -0
  26. data/js/vendor/angular-route.min.js +1 -2
  27. data/js/vendor/angular.min.js +208 -206
  28. data/js/widgets/attitude.html +32 -0
  29. data/js/widgets/attitude.js +27 -0
  30. data/js/widgets/mindwave.html +51 -0
  31. data/js/widgets/mindwave.js +23 -0
  32. data/less/app.less +21 -0
  33. data/less/objects/buttons.less +32 -0
  34. data/less/objects/connections.less +28 -0
  35. data/less/objects/device.less +30 -0
  36. data/less/objects/forms.less +29 -0
  37. data/less/objects/list.less +27 -0
  38. data/less/objects/nav.less +33 -0
  39. data/less/objects/robot.less +43 -0
  40. data/less/objects/themes.less +18 -0
  41. data/less/objects/widgets.less +85 -0
  42. data/less/support/buttons.less +39 -0
  43. data/less/support/container.less +9 -0
  44. data/less/support/forms.less +18 -0
  45. data/less/support/mixins.less +3 -0
  46. data/less/themes/blackboard.less +158 -0
  47. data/less/themes/dark.less +148 -0
  48. data/less/themes/default.less +52 -0
  49. data/less/themes/gray.less +121 -0
  50. data/less/themes/whiteboard.less +152 -0
  51. data/less/vendor/elements.less +156 -0
  52. data/less/vendor/normalize.less +425 -0
  53. data/less/vendor/semantic-grid.less +67 -0
  54. data/less/views/devices.less +47 -0
  55. data/less/views/robots.less +132 -0
  56. data/less/views/themes.less +31 -0
  57. data/less/views/widgets.less +50 -0
  58. data/package.json +6 -3
  59. data/partials/device.html +66 -57
  60. data/partials/index.html +12 -6
  61. data/partials/robot.html +104 -51
  62. data/partials/themes.html +32 -29
  63. data/partials/widget_editor.html +68 -0
  64. data/robeaux.gemspec +1 -1
  65. data/test/controllers/device_commands_ctrl.js +129 -0
  66. data/test/controllers/device_events_ctrl.js +82 -0
  67. data/test/controllers/index_ctrl.js +48 -0
  68. data/test/controllers/nav_ctrl.js +40 -0
  69. data/test/controllers/robot_commands_ctrl.js +127 -0
  70. data/test/controllers/robot_ctrl.js +62 -0
  71. data/test/controllers/themes_ctrl.js +96 -0
  72. data/test/controllers/widget_editor_ctrl.js +111 -0
  73. data/test/controllers/widgets_ctrl.js +74 -0
  74. data/test/functions/functions.js +30 -0
  75. data/test/karma.conf.js +3 -7
  76. data/test/karma_test_all.conf.js +23 -0
  77. data/test/karma_test_controllers.conf.js +19 -0
  78. data/test/karma_test_functions.conf.js +14 -0
  79. data/test/karma_test_services.conf.js +17 -0
  80. data/test/services/themes.js +122 -0
  81. data/test/services/widgets.js +104 -0
  82. data/test/support/themes.json +9 -0
  83. data/test/support/widgets.json +18 -0
  84. data/test/vendor/angular-mocks.js +13 -13
  85. data/test/vendor/jquery.js +8 -8
  86. metadata +69 -3
  87. data/test/main.js +0 -248
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb64bdd58fcc2541db81dc55c3a21750db37af3f
4
- data.tar.gz: e873c183975f9dd68f66a1dc975eec90894da0f0
3
+ metadata.gz: 8c74948edbd2912fd204a080d2e488f7aadae97c
4
+ data.tar.gz: 150a78c3344f659b4348d18885bd0435b8977144
5
5
  SHA512:
6
- metadata.gz: 863dc02ee4c0e0905b537d4f0fe676ca5c0d85556437478688565e99b32b3037a0230cfe69d7d407d9fa5158c31540a0ab8284ec9f1c457b33ac753461bafe0b
7
- data.tar.gz: 77ae747880626efcbfdeb149ce4c1a18d4f7134a446033d6a3d66640d37ceeb5a042e3b00c24b556c5315baa90e014d91ac00781aca11aa51c1458ac71ae3ab8
6
+ metadata.gz: 7577f31a5ca70bf22e31e2ad1e6b5d77b6ad0181b285aa1be86748ecb604878d6264da5a21fba2815015837e8824509787046e4f733dbedc31ba87faa089cce3
7
+ data.tar.gz: bb30fe68d21b85a852317f10e777da6e426445f8fb121adf21a8755ea8f1c69016db71358f77f1431bbdea95734820b86ac3aa208522166cb4e825bb427a27d7
data/Gruntfile.js ADDED
@@ -0,0 +1,43 @@
1
+ module.exports = function(grunt) {
2
+ grunt.initConfig({
3
+ less: {
4
+ development: {
5
+ options: {
6
+ compress: true,
7
+ yuicompress: true,
8
+ optimization: 2
9
+ },
10
+ files: {
11
+ // target.css file: source.less file
12
+ "css/main.css": "less/app.less",
13
+ "css/themes/blackboard.css": "less/themes/blackboard.less",
14
+ "css/themes/whiteboard.css": "less/themes/whiteboard.less",
15
+ "css/themes/gray.css": "less/themes/gray.less",
16
+ "css/themes/dark.css": "less/themes/dark.less"
17
+ }
18
+ }
19
+ },
20
+ watch: {
21
+ layout: {
22
+ files: ['*.html', 'partials/*.html'],
23
+ options: {
24
+ livereload: true
25
+ }
26
+ },
27
+ styles: {
28
+ // Which files to watch (all .less files recursively in the less directory)
29
+ files: ['less/**/*.less',],
30
+ tasks: ['less'],
31
+ options: {
32
+ nospawn: true,
33
+ livereload: true
34
+ }
35
+ }
36
+ }
37
+ });
38
+
39
+ grunt.loadNpmTasks('grunt-contrib-less');
40
+ grunt.loadNpmTasks('grunt-contrib-watch');
41
+
42
+ grunt.registerTask('default', ['watch']);
43
+ };
data/Makefile CHANGED
@@ -1,9 +1,18 @@
1
1
  VERSION := $(shell node -e "console.log(require('./package.json').version)")
2
2
 
3
- .PHONY: test release
3
+ .PHONY: test release test-controllers test-services test-functions
4
4
 
5
5
  test:
6
- @./node_modules/karma/bin/karma start ./test/karma.conf.js --no-auto-watch --single-run
6
+ @./node_modules/karma/bin/karma start ./test/karma_test_all.conf.js --no-auto-watch --single-run
7
+
8
+ test-controllers:
9
+ @./node_modules/karma/bin/karma start ./test/karma_test_controllers.conf.js --no-auto-watch --single-run
10
+
11
+ test-services:
12
+ @./node_modules/karma/bin/karma start ./test/karma_test_services.conf.js --no-auto-watch --single-run
13
+
14
+ test-functions:
15
+ @./node_modules/karma/bin/karma start ./test/karma_test_functions.conf.js --no-auto-watch --single-run
7
16
 
8
17
  release:
9
18
  @git tag -m "$(VERSION)" v$(VERSION)
data/README.markdown CHANGED
@@ -60,6 +60,8 @@ Then, just run `make release`. It'll take care of:
60
60
 
61
61
  ## Releases
62
62
 
63
+ - 0.3.0 - New style updates
64
+
63
65
  - 0.2.0 - Update for CPP-IO API spec
64
66
 
65
67
  - 0.1.1 - Remove dependency on Google WebFonts
data/css/main.css ADDED
@@ -0,0 +1 @@
1
+ .btn{padding:10px 15px;font-size:15px;line-height:20px;border-radius:5px;display:inline-block;border:0}.btn:hover{cursor:pointer}.btn-big{padding:15px 30px;font-size:15px;line-height:15px;border-radius:5px}.btn-robot{color:#fff;background-color:#1cbbd8;border-color:#fff;text-transform:uppercase}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#fff;background-color:#1694ab;border-color:#e0e0e0}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#1cbbd8;border-color:#fff}.btn-run,.btn-reset{color:#fff;background-color:#c36148;border-color:#fff;text-transform:uppercase}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#fff;background-color:#a34c35;border-color:#e0e0e0}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#c36148;border-color:#fff}.btn-device,.btn-save{color:#fff;background-color:#48caac;border-color:#fff;text-transform:uppercase}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#fff;background-color:#32ad91;border-color:#e0e0e0}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#48caac;border-color:#fff}.btn-connect{color:#fff;background-color:#dec763;border-color:#fff;text-transform:uppercase}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#fff;background-color:#d5b839;border-color:#e0e0e0}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#dec763;border-color:#fff}.connections .robot-devices .name{display:inline-block;margin-left:20px;font-weight:bold}.connections .robot-devices .details{display:inline-block;margin-left:20px;color:#1cbbd8}.connections .robot-connections .name{display:inline-block;margin-left:20px;color:#1cbbd8}.connections .robot-connections .details{display:inline-block;margin-left:20px}.device-detail h2{text-align:center}.device-detail table{margin-top:15px}.device-detail table th{border-bottom:1px solid #ccc;line-height:34px}.device-detail table td{font-family:Inconsolata,monospace;padding:3px}.device-detail .listeners{margin-top:0}.device-detail .remove{color:#f00}.device-detail .remove:hover{cursor:pointer}input[type="text"],select,textarea{display:inline-block;line-height:1.42857143;font-size:15px;color:#444;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;box-sizing:border-box}input[type="text"]:focus,select:focus,textarea:focus{border-color:#1cbbd8;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(28, 187, 216, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(28, 187, 216, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(28, 187, 216, 0.6)}button{outline:none}button::-moz-focus-inner,input[type="reset"]::-moz-focus-inner,input[type="button"]::-moz-focus-inner,input[type="submit"]::-moz-focus-inner,input[type="file"]>input[type="button"]::-moz-focus-inner{outline:none}button:focus::-moz-focus-inner,input[type="reset"]:focus::-moz-focus-inner,input[type="button"]:focus::-moz-focus-inner,input[type="submit"]:focus::-moz-focus-inner,input[type="file"]>input[type="button"]:focus::-moz-focus-inner{outline:none}.list{margin-top:20px}.list .close{float:right;color:#ccc}.list .close:hover{color:#f00;cursor:pointer}.list .theme,.list .widget{display:block;clear:both;padding:5px;border-bottom:1px dotted #ccc}.list .theme:hover,.list .widget:hover{cursor:pointer}.list .selected{background:#eee}nav{background:#000;height:70px;margin-bottom:20px}nav .logo{display:inline-block;margin:15px 15px 0 15px}nav .links{float:right;margin-top:15px}nav .links a{color:#fff;text-decoration:none;display:inline-block;padding:10px 15px;font-size:15px;line-height:20px;border-radius:2px}nav .links a:hover{color:#1cbbd8;text-decoration:none}nav .links .active{background:#1cbbd8}nav .links .active:hover{color:#fff}.robot{width:960px;padding:0;margin-left:auto;margin-right:auto;display:block}.robot .details{float:right;line-height:43px}.robot .details span{color:#1cbbd8;margin-left:50px}.robot .details strong{color:#444;margin-right:20px}.robot .name{margin-left:20px}.robot .commands{*zoom:1}.robot .commands:before,.robot .commands:after{content:"";display:table}.robot .commands:after{clear:both}.robot .commands button{display:block;font-weight:bold;margin-top:15px}.robot .commands table th{border-bottom:1px solid #ccc;line-height:34px}.robot .commands table td{font-family:Inconsolata,monospace;padding:3px}.themes .new-theme{*zoom:1}.themes .new-theme:before,.themes .new-theme:after{content:"";display:table}.themes .new-theme:after{clear:both}.themes .new-theme input{padding:8px 12px}.themes .footer{display:block;text-align:right}.themes .selector{margin-top:20px}.widgets .new-widget input,.widgets .new-attr input{padding:8px 12px}.widgets .new-attr{padding-top:15px}.widgets .attrs{padding-bottom:20px}.widgets .footer{text-align:right}.widgets .footer .btn-reset{margin-right:10px}.widgets .new-widget-instance{position:fixed;top:0;left:0;background-color:rgba(0,0,0,0.5);z-index:99;overflow:hidden}.widgets .panel{background:#fff;padding:6px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;position:relative;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.3);-moz-box-shadow:0 0 5px rgba(0,0,0,0.3);box-shadow:0 0 5px rgba(0,0,0,0.3);overflow:hidden}.widgets .panel .panel-header,.widgets .panel .panel-body,.widgets .panel .panel-footer{*zoom:1}.widgets .panel .panel-header:before,.widgets .panel .panel-body:before,.widgets .panel .panel-footer:before,.widgets .panel .panel-header:after,.widgets .panel .panel-body:after,.widgets .panel .panel-footer:after{content:"";display:table}.widgets .panel .panel-header:after,.widgets .panel .panel-body:after,.widgets .panel .panel-footer:after{clear:both}.widgets .panel .panel-header{border-bottom:1px solid #eaeaea}.widgets .panel .panel-footer{border-top:1px solid #eaeaea;padding-top:6px;margin-top:12px;text-align:right}.widgets .panel .close{position:absolute;top:4px;right:10px;color:#ccc}.widgets .panel .close:hover{cursor:pointer;color:#f00}.widgets .panel h2{margin:0 0 15px 0;text-align:center}.widgets .panel h3,.widgets .panel label{font-size:14px}.widgets .panel select{display:block}.widgets .panel .attr-element{*zoom:1;margin-bottom:10px}.widgets .panel .attr-element:before,.widgets .panel .attr-element:after{content:"";display:table}.widgets .panel .attr-element:after{clear:both}.device-detail .device-header{width:960px;padding:0;margin-left:auto;margin-right:auto;display:block}.device-detail .device-header h2{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.device-detail .device-commands{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.device-detail .device-events{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.device-detail .device-events .input{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.device-detail .device-events .input input{display:inline;float:left;width:56.25%;margin:0 1.04166667%;padding:8px 12px;margin:0 2.08166667% 0 0}.device-detail .device-events .input button{display:inline;float:left;width:39.58333333%;margin:0 1.04166667%}.device-detail .device-events .listeners-div{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%;margin-bottom:30px}.device-detail .device-events .listeners-div table{width:100%}.device-detail .device-events .events{width:100%}.device-detail .remove{width:10%}body{background:#efeef4;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;color:#444}.container-wrap{margin-bottom:30px}.container,.robot,.widgets,.connections,.themes{width:960px;padding:0;margin-left:auto;margin-right:auto;display:block}.row{background:#fff;padding:15px 0;margin-top:10px;*zoom:1}.row:before,.row:after{content:"";display:table}.row:after{clear:both}.robot-details{display:inline;float:left;width:97.91666667%;margin:0 1.04166667%}.robot h2{display:inline;float:left;width:97.91666667%;margin:0 1.04166667%;text-align:center;margin-bottom:15px}.robot .input,.robot .results{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.robot-detail .widgets .new-widget-instance{height:100vh;width:100%}.robot-detail .widgets .active-widgets .add-widget{display:inline;float:left;width:22.91666667%;margin:0 1.04166667%}.robot-detail .widgets .active-widgets button{font-size:2em}.robot-detail .widgets .active-widgets widget{display:inline;float:left;width:72.91666667%;margin:0 1.04166667%}.robot-detail .widgets .panel{margin:10% auto;width:600px}.robot-detail .widgets .panel .type{display:inline;float:left;width:39.58333333%;margin:0 1.04166667%}.robot-detail .widgets .panel .attrs{display:inline;float:left;width:56.25%;margin:0 1.04166667%}.robot-detail .widgets .panel .attrs label{display:inline;float:left;width:31.25%;margin:0 1.04166667%}.robot-detail .widgets .panel .attrs input{display:inline;float:left;width:64.58333333%;margin:0 1.04166667%}.robot-detail .robot-devices{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.robot-detail .robot-connection{display:inline;float:left;width:47.91666667%;margin:0 1.04166667%}.commands .param,.device-commands .param{display:block;width:104.16666667%;margin:0 -2.08333333%;*zoom:1;height:40px}.commands .param:before,.device-commands .param:before,.commands .param:after,.device-commands .param:after{content:"";display:table}.commands .param:after,.device-commands .param:after{clear:both}.commands .param input[type='text'],.device-commands .param input[type='text']{display:inline;float:left;width:29.16666667%;margin:0 2.08333333%}.commands .param select,.device-commands .param select{display:inline;float:left;width:20.83333333%;margin:0 2.08333333%}.commands .param .close,.device-commands .param .close{display:inline;float:left;width:4.16666667%;margin:0 2.08333333%;line-height:34px}.commands .param .close:hover,.device-commands .param .close:hover{color:#f00;cursor:pointer}.commands .input>select,.device-commands .input>select,.commands>select,.device-commands>select{width:100%;margin-left:auto;margin-right:auto;display:block;margin-bottom:15px}.commands button,.device-commands button{width:70%;margin-top:15px;margin-left:auto;margin-right:auto;display:block}.commands table,.device-commands table{width:100%}.themes .sidebar{display:inline;float:left;width:31.25%;margin:0 1.04166667%}.themes .new-theme{display:block;width:106.25%;margin:0 -3.125%;*zoom:1}.themes .new-theme:before,.themes .new-theme:after{content:"";display:table}.themes .new-theme:after{clear:both}.themes .new-theme input{display:inline;float:left;width:68.75%;margin:0 3.125%}.themes .new-theme button{display:inline;float:left;width:18.75%;margin:0 3.125%}.themes .editor{display:inline;float:left;width:64.58333333%;margin:0 1.04166667%}.themes .editor textarea{width:100%;height:250px}.themes .footer{*zoom:1;display:inline;float:left;width:97.91666667%;margin:0 1.04166667%}.themes .footer:before,.themes .footer:after{content:"";display:table}.themes .footer:after{clear:both}.widgets .sidebar{display:inline;float:left;width:22.91666667%;margin:0 1.04166667%}.widgets .new-widget{display:block;width:108.33333333%;margin:0 -4.16666667%;*zoom:1}.widgets .new-widget:before,.widgets .new-widget:after{content:"";display:table}.widgets .new-widget:after{clear:both}.widgets .new-widget input{display:inline;float:left;width:58.33333333%;margin:0 4.16666667%}.widgets .new-widget button{display:inline;float:left;width:25%;margin:0 4.16666667%}.widgets .new-attr{display:block;width:102.77777778%;margin:0 -1.38888889%;*zoom:1}.widgets .new-attr:before,.widgets .new-attr:after{content:"";display:table}.widgets .new-attr:after{clear:both}.widgets .new-attr input{display:inline;float:left;width:52.77777778%;margin:0 1.38888889%}.widgets .new-attr button{display:inline;float:left;width:30.55555556%;margin:0 1.38888889%}.widgets .editor{display:inline;float:left;width:72.91666667%;margin:0 1.04166667%}.widgets .attrs{display:inline;float:left;width:97.22222222%;margin:0 1.38888889%}.widgets .field{display:inline;float:left;width:47.22222222%;margin:0 1.38888889%}.widgets .field textarea{width:100%;min-height:250px}.widgets .footer{display:inline;float:left;width:97.91666667%;margin:0 1.04166667%}
data/css/style.css CHANGED
@@ -52,7 +52,7 @@ body {
52
52
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
53
53
  }
54
54
 
55
- body > .container, body > nav {
55
+ .container,.container-wrap {
56
56
  width: 960px;
57
57
  margin: 0 auto;
58
58
  padding: 0;
@@ -102,7 +102,7 @@ body > nav a.active {
102
102
  color: white;
103
103
  }
104
104
 
105
- .robot, .robot-devices .device, .robot-connections .connection {
105
+ .robot, .robot-devices .device, .robot-connections .connection, .robot-detail .widgets {
106
106
  background: white;
107
107
  height: 70px;
108
108
  line-height: 70px;
@@ -114,7 +114,7 @@ body > nav a.active {
114
114
  padding: 0 15px;
115
115
  }
116
116
 
117
- .icon {
117
+ .icon, .btn {
118
118
  background: black;
119
119
  color: white;
120
120
  height: 40px;
@@ -152,7 +152,7 @@ body > nav a.active {
152
152
  float: right;
153
153
  }
154
154
 
155
- .robot-detail .with-commands .input , .robot-detail .with-commands .results {
155
+ .robot-detail .with-commands .input, .robot-detail .with-commands .results {
156
156
  position: relative;
157
157
  padding-top: 20px;
158
158
  width: 50%;
@@ -240,6 +240,7 @@ body > nav a.active {
240
240
  margin-bottom: 20px;
241
241
  padding: 10px;
242
242
  text-align: center;
243
+ overflow: hidden;
243
244
  }
244
245
 
245
246
  .device-commands {
@@ -344,14 +345,13 @@ body > nav a.active {
344
345
 
345
346
  .close {
346
347
  border-radius: 25px;
347
- border: 1px solid #444;
348
348
  color: #444;
349
349
  float: right;
350
350
  font-size: 14px;
351
351
  line-height: 14px;
352
352
  height: 20px;
353
353
  text-align: center;
354
- margin-top: 4px;
354
+ margin-top: 7px;
355
355
  padding: 1px 5px;
356
356
  }
357
357
 
@@ -379,7 +379,7 @@ body > nav a.active {
379
379
  font-family: Inconsolata, monospace;
380
380
  }
381
381
 
382
- .themes {
382
+ .themes, .widgets {
383
383
  width: 100%;
384
384
  height: 400px;
385
385
  background: white;
@@ -387,67 +387,72 @@ body > nav a.active {
387
387
  position: relative;
388
388
  }
389
389
 
390
- .themes h2 {
390
+ .themes h2, .widgets h2 {
391
391
  margin: 0;
392
392
  }
393
393
 
394
- .themes .sidebar {
395
- width: 15%;
394
+ .themes .sidebar, .widgets .sidebar {
395
+ width: 25%;
396
396
  float: left;
397
397
  }
398
398
 
399
- .themes .sidebar {
399
+ .themes .sidebar, .widgets .sidebar {
400
400
  text-align: center;
401
401
  }
402
402
 
403
- .themes .sidebar button, .themes .sidebar input {
403
+ .themes .sidebar button, .themes .sidebar input,
404
+ .widgets .sidebar button, .widgets .sidebar input {
404
405
  margin: 0;
405
406
  width: 90%;
406
407
  margin-top: 10px;
407
408
  }
408
409
 
409
- .themes .sidebar .list {
410
+ .themes .sidebar .list, .widgets .sidebar .list {
410
411
  padding: 5px 7px;
411
412
  margin: 10px 0;
412
413
  }
413
414
 
414
- .themes .sidebar .list .theme {
415
+ .themes .sidebar .list .theme, .widgets .sidebar .list .widget {
415
416
  height: 30px;
416
417
  line-height: 30px;
417
418
  padding: 0 10px;
418
419
  text-align: left;
419
420
  }
420
421
 
421
- .themes .sidebar .list .theme .close {
422
+ .themes .sidebar .list .theme .close, .widgets .sidebar .list .widget .close {
422
423
  margin-top: 5px;
423
424
  }
424
425
 
425
- .themes .sidebar .list .theme:not(:last-child) {
426
+ .themes .sidebar .list .theme:not(:last-child), .widgets .sidebar .list .widget:not(:last-child) {
426
427
  border-bottom: 1px solid #999;
427
428
  }
428
429
 
429
- .themes .sidebar .list .theme.selected {
430
+ .themes .sidebar .list .theme.selected, .widgets .sidebar .list .widget.selected {
430
431
  background: #159e00;
431
432
  color: white;
432
433
  }
433
434
 
434
- .themes .sidebar .list .theme.selected .close {
435
+ .themes .sidebar .list .theme.selected .close, .widgets .sidebar .list .widget.selected .close {
435
436
  border-color: #efefef;
436
437
  color: #efefef;
437
438
  }
438
439
 
439
- .themes .sidebar .list .theme.selected .close:active {
440
+ .themes .sidebar .list .theme.selected .close:active, .widgets .sidebar .list .widget.selected .close:active {
440
441
  background: white;
441
442
  border-color: white;
442
443
  color: black;
443
444
  }
444
445
 
445
- .themes .editor {
446
- width: 80%;
446
+ .themes .editor, .widgets .editor {
447
+ width: 70%;
447
448
  float: right;
448
449
  }
449
450
 
450
- .themes .editor textarea {
451
+ .themes .editor h2, .widgets .editor h2 {
452
+ margin-bottom: 15px;
453
+ }
454
+
455
+ .themes .editor textarea, .widgets .editor textarea {
451
456
  border: 1px solid #999;
452
457
  font-family: Inconslata, monospace;
453
458
  font-size: 14px;
@@ -457,13 +462,97 @@ body > nav a.active {
457
462
  white-space: pre;
458
463
  }
459
464
 
460
- .themes .footer {
465
+ .widgets .editor .attrs {
466
+ margin-bottom: 20px;
467
+ }
468
+
469
+ .themes .footer, .widgets .footer {
461
470
  clear: both;
462
471
  position: absolute;
463
472
  width: 97%;
464
473
  bottom: 10px;
465
474
  }
466
475
 
467
- .themes .footer .selector {
476
+ .themes .footer .selector, .widgets .footer .selector {
477
+ float: right;
478
+ }
479
+
480
+ .widgets .editor .field {
481
+ width: 49%;
482
+ height: 320px;
483
+ margin: 0;
484
+ display: inline-block;
485
+ }
486
+
487
+ .widgets .editor textarea {
488
+ width: 100%;
489
+ }
490
+
491
+ .widgets .editor .field:last-of-type {
468
492
  float: right;
469
493
  }
494
+
495
+ .robot-detail .widgets {
496
+ line-height: 1;
497
+ min-height: 200px;
498
+ height: auto;
499
+ padding: 0;
500
+ }
501
+
502
+ .widget {
503
+ display: inline-block;
504
+ float: left;
505
+ margin: 0;
506
+ width: 240px;
507
+ height: 200px;
508
+ }
509
+
510
+ .widgets .newWidget {
511
+ width: 240px;
512
+ height: 200px;
513
+ font-size: 50px;
514
+ border: none;
515
+ }
516
+
517
+ .new-widget-instance {
518
+ position: absolute;
519
+ top: 0;
520
+ left: 0;
521
+ float: left;
522
+ background: hsla(0, 0%, 25%, 0.5);
523
+ width: 960px;
524
+ height: 100%;
525
+ padding: 10px 100px;
526
+ }
527
+
528
+ .new-widget-instance .panel {
529
+ width: 100%;
530
+ height: 100%;
531
+ background: white;
532
+ padding: 10px;
533
+ }
534
+
535
+ .new-widget-instance .panel h2 {
536
+ width: 100%;
537
+ text-align: center;
538
+ margin-bottom: 20px;
539
+ }
540
+
541
+ .new-widget-instance .panel h3 {
542
+ margin: 0;
543
+ }
544
+
545
+ .new-widget-instance .panel section {
546
+ width: 49%;
547
+ display: inline-block;
548
+ margin-bottom: 10px;
549
+ }
550
+
551
+ .new-widget-instance .panel input {
552
+ width: auto;
553
+ }
554
+
555
+ .new-widget-instance .panel button {
556
+ clear: both;
557
+ width: 100%;
558
+ }
@@ -0,0 +1 @@
1
+ body{background-color:#343434;color:#fff}nav{background:#2c2c2c}nav .links a{background:none;padding:8px 13px}nav .links a.active{background:none;color:#fff;border:2px solid #1cbcd8}nav .links a:hover{color:#1cbcd8 !important}.row{border-top:1px solid #1cbcd8;padding-top:25px;padding-bottom:25px;width:960px;margin-left:auto;margin-right:auto;display:block}.row:last-child{border-bottom:1px solid #1cbcd8}.row-device{border-top:none;border-bottom:none !important}.robot .details span{color:#fff}.robot .details strong{color:#1cbcd8}.row{background-color:#343434}.bullet-connections{padding-left:32px;background:transparent url(../../images/bullet-connections.png) no-repeat left center}.bullet-devices{padding-left:32px;background:transparent url(../../images/bullet-devices.png) no-repeat left center}.robot-devices{background:transparent url(../../images/devices-image.png) no-repeat 21px center;padding-left:84px}.btn-robot{color:#343434;background-color:#1cbcd8;border-color:#343434}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#343434;background-color:#1695ab;border-color:#151515}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#1cbcd8;border-color:#343434}.btn-device,.btn-save{color:#343434;background-color:#56d884;border-color:#343434}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#343434;background-color:#2fcc67;border-color:#151515}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#56d884;border-color:#343434}.btn-connect{color:#343434;background-color:#d8ca69;border-color:#343434}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#343434;background-color:#cdbc41;border-color:#151515}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#d8ca69;border-color:#343434}.btn-run,.btn-reset{color:#343434;background-color:#ca5252;border-color:#343434}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#343434;background-color:#b23737;border-color:#151515}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#ca5252;border-color:#343434}input[type="text"],select,textarea{color:#fff;background:#343434}input[type="text"]:focus,select:focus,textarea:focus{border-color:#fff;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6)}.widgets .panel{background:#4d4d4d}.widgets .panel .panel-header{border-bottom:1px solid #666}.widgets .panel .panel-footer{border-top:1px solid #666}
@@ -0,0 +1 @@
1
+ body{background-color:#000;color:#000}.row{background-color:#4d4d4d}nav .links a{background:none}nav .links a.active{background:none;color:#1CBBD8}nav .links a:hover{color:#1CBBD8 !important}.robot .details span{color:#fff}.robot .details strong{color:#000}.btn-robot{color:#fff;background-color:#000;border-color:#fff}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#fff;background-color:#000;border-color:#e0e0e0}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#000;border-color:#fff}.btn-device,.btn-save{color:#000;background-color:#fff;border-color:#000}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#000;background-color:#e6e6e6;border-color:#000}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#fff;border-color:#000}.btn-connect{color:#dec763;background-color:#000;border-color:#dec763;text-transform:uppercase}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#dec763;background-color:#000;border-color:#d3b530}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#000;border-color:#dec763}.btn-run,.btn-reset{color:#c36148;background-color:#000;border-color:#c36148;text-transform:uppercase}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#c36148;background-color:#000;border-color:#9b4833}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#000;border-color:#c36148}input[type="text"],select,textarea{color:#000;background:#666}input[type="text"]:focus,select:focus,textarea:focus{border-color:#fff;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6)}.widgets .panel{background:#4d4d4d}.widgets .panel .panel-header{border-bottom:1px solid #666}.widgets .panel .panel-footer{border-top:1px solid #666}.list .theme,.list .widget{border-bottom:1px dotted #666}th{border-bottom:1px solid #666 !important}.connections .robot-devices .details{color:#000}.connections .robot-connections .name{color:#000}
@@ -0,0 +1 @@
1
+ body{background-color:#eeeef4;color:#3e6372}nav{background:#2d4753}nav .links a{background:none;padding:8px 13px}.row{background-color:#fff;border-bottom:3px solid #e1e1e5;padding-top:25px;padding-bottom:25px;margin-bottom:26px;width:980px;margin-left:auto;margin-right:auto;display:block}.row-device{border-top:none}.robot .details span{color:#ff6900}.robot .details strong{color:#3e6372}.btn-robot{color:#fff;background-color:#ff6900;border-color:#fff}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#fff;background-color:#cc5400;border-color:#e0e0e0}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#ff6900;border-color:#fff}.btn-device,.btn-save{color:#fff;background-color:#40cfaa;border-color:#fff}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#fff;background-color:#2cb08e;border-color:#e0e0e0}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#40cfaa;border-color:#fff}.btn-connect{color:#fff;background-color:#dccb5b;border-color:#fff}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#fff;background-color:#d3be31;border-color:#e0e0e0}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#dccb5b;border-color:#fff}.btn-run,.btn-reset{color:#fff;background-color:#ca5252;border-color:#fff}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#fff;background-color:#b23737;border-color:#e0e0e0}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#ca5252;border-color:#fff}.widgets .panel{background:#fff}.widgets .panel .panel-header{border-bottom:1px solid #E1E1E1}.widgets .panel .panel-footer{border-top:1px solid #E1E1E1}
@@ -0,0 +1 @@
1
+ body{background-color:#fff;color:#666}nav{background:#1cbcd8}nav .links a{background:none;padding:8px 13px}nav .links a.active{background:#353535;color:#fff;border:2px solid #1cbcd8}nav .links a.active:hover{color:#fff !important}nav .links a:hover{color:#2c2c2c !important}.row{background-color:#fff;border-top:1px solid #E1E1E1;padding-top:25px;padding-bottom:25px;width:960px;margin-left:auto;margin-right:auto;display:block}.row:last-child{border-bottom:1px solid #E1E1E1}.row-device{border-top:none;border-bottom:none !important}.robot .details span{color:#333}.robot .details strong{color:#666}.bullet-connections{padding-left:32px;background:transparent url(../../images/bullet-connections-2.png) no-repeat left center}.bullet-devices{padding-left:32px;background:transparent url(../../images/bullet-devices-2.png) no-repeat left center}.robot-devices{background:transparent url(../../images/devices-image-2.png) no-repeat 21px center;padding-left:84px}.btn-robot{color:#343434;background-color:#28d8f7;border-color:#343434}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#343434;background-color:#08c3e4;border-color:#151515}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#28d8f7;border-color:#343434}.btn-device,.btn-save{color:#343434;background-color:#15e2ad;border-color:#343434}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#343434;background-color:#11b389;border-color:#151515}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#15e2ad;border-color:#343434}.btn-connect{color:#343434;background-color:#fbed8f;border-color:#343434}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#343434;background-color:#f9e55e;border-color:#151515}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#fbed8f;border-color:#343434}.btn-run,.btn-reset{color:#343434;background-color:#ca5252;border-color:#343434}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#343434;background-color:#b23737;border-color:#151515}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#ca5252;border-color:#343434}.widgets .panel{background:#fff}.widgets .panel .panel-header{border-bottom:1px solid #E1E1E1}.widgets .panel .panel-footer{border-top:1px solid #E1E1E1}
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <link rel="stylesheet" href="/css/fonts.css">
9
9
  <link rel="stylesheet" href="/css/normalize.css">
10
- <link rel="stylesheet" href="/css/style.css">
10
+ <link rel="stylesheet" href="/css/main.css">
11
11
 
12
12
  <span class="ng-hide" ng-controller="ThemesCtrl">
13
13
  <link ng-if="themes.active.url" rel="stylesheet" ng-href="{{themes.active.url}}">
@@ -17,15 +17,18 @@
17
17
 
18
18
  <body>
19
19
  <nav ng-controller="NavCtrl">
20
- <span class="logo">Robeaux</span>
21
-
22
- <span class="links">
23
- <a href="#/robots" ng-class="{active: active('robots')}">robots</a>
24
- <a href="#/themes" ng-class="{active: active('themes')}">themes</a>
25
- </span>
20
+ <div class="container">
21
+ <a href="/" class="logo"><img src="/images/logo-robeaux.png" alt=""></a>
22
+
23
+ <span class="links">
24
+ <a href="#/robots" ng-class="{active: active('robots')}">Robots</a>
25
+ <a href="#/themes" ng-class="{active: active('themes')}">Themes</a>
26
+ <a href="#/widgets" ng-class="{active: active('widgets')}">Widgets</a>
27
+ </span>
28
+ </div>
26
29
  </nav>
27
30
 
28
- <div ng-view class="container"></div>
31
+ <div ng-view class="container-wrap"></div>
29
32
 
30
33
  <script src="/js/vendor/angular.min.js"></script>
31
34
  <script src="/js/vendor/angular-route.min.js"></script>
@@ -33,12 +36,16 @@
33
36
  <script src="/js/app.js"></script>
34
37
  <script src="/js/router.js"></script>
35
38
  <script src="/js/services/themes.js"></script>
39
+ <script src="/js/services/widgets.js"></script>
40
+ <script src="/js/directives/widget.js"></script>
36
41
  <script src="/js/controllers/nav_ctrl.js"></script>
37
42
  <script src="/js/controllers/index_ctrl.js"></script>
38
43
  <script src="/js/controllers/themes_ctrl.js"></script>
44
+ <script src="/js/controllers/widget_editor_ctrl.js"></script>
39
45
  <script src="/js/controllers/robot_ctrl.js"></script>
40
46
  <script src="/js/controllers/robot_commands_ctrl.js"></script>
41
47
  <script src="/js/controllers/device_commands_ctrl.js"></script>
42
48
  <script src="/js/controllers/device_events_ctrl.js"></script>
49
+ <script src="/js/controllers/widgets_ctrl.js"></script>
43
50
  </body>
44
51
  </html>
@@ -0,0 +1,44 @@
1
+ var WidgetEditorCtrl = function WidgetEditorCtrl($scope, Widgets) {
2
+ $scope.widgets = Widgets;
3
+
4
+ $scope.add = function(name) {
5
+ if (!name || name === '') {
6
+ return false;
7
+ }
8
+
9
+ var result = Widgets.add(name);
10
+
11
+ if (result) {
12
+ $scope.edit(result);
13
+ $scope.name = '';
14
+ }
15
+ };
16
+
17
+ $scope.edit = function(widget) {
18
+ if ($scope.editing === widget || !widget.custom) {
19
+ return $scope.editing = null;
20
+ }
21
+
22
+ $scope.editing = widget;
23
+ };
24
+
25
+ $scope.addAttr = function() {
26
+ if ($scope.editing && $scope.newAttr.length) {
27
+ $scope.editing.attrs.push($scope.newAttr);
28
+ }
29
+
30
+ $scope.newAttr = '';
31
+
32
+ Widgets.save();
33
+ };
34
+
35
+ $scope.removeAttr = function(index) {
36
+ if (!$scope.editing) {
37
+ return;
38
+ }
39
+
40
+ $scope.editing.attrs.splice(index, 1);
41
+
42
+ Widgets.save();
43
+ };
44
+ };
@@ -0,0 +1,40 @@
1
+ var WidgetsCtrl = function WidgetsCtrl($scope, Widgets) {
2
+ $scope.widgets = Widgets;
3
+ $scope.activeWidgets = [];
4
+ $scope.newWidget = false;
5
+
6
+ // fetch robot name from parent
7
+ var interval = setInterval(function() {
8
+ if ($scope.$parent.robot) {
9
+ $scope.$apply(function() {
10
+ $scope.robot = $scope.$parent.robot.name;
11
+ $scope.activeWidgets = Widgets.activeWidgets[$scope.robot] || [];
12
+ })
13
+ }
14
+ }, 100);
15
+
16
+ var save = function() {
17
+ Widgets.activeWidgets[$scope.robot] = $scope.activeWidgets;
18
+ Widgets.save();
19
+ }
20
+
21
+ $scope.newActiveWidget = function(widget) {
22
+ if (widget.base === '') {
23
+ return false;
24
+ }
25
+
26
+ widget.name = widget.base.name;
27
+ delete widget.base;
28
+
29
+ $scope.activeWidgets.push(widget);
30
+
31
+ save();
32
+
33
+ $scope.newWidget = false;
34
+ };
35
+
36
+ $scope.removeWidget = function(i) {
37
+ $scope.activeWidgets.splice(i, 1);
38
+ save();
39
+ };
40
+ };
@@ -0,0 +1,50 @@
1
+ robeaux.directive("widget", function(Widgets, $http, $compile) {
2
+ var directive = {};
3
+
4
+ var fetchTemplate = function(url) {
5
+ var request = new XMLHttpRequest();
6
+ request.open('GET', url, false);
7
+ request.send(null);
8
+
9
+ if (request.status === 200) {
10
+ return request.responseText;
11
+ }
12
+ };
13
+
14
+ directive.restrict = "E";
15
+
16
+ directive.scope = {};
17
+
18
+ directive.link = function($scope, $element, $attrs) {
19
+ var widget = Widgets.find($attrs.name),
20
+ tpl;
21
+
22
+ $scope.attrs = angular.fromJson($attrs.attrs);
23
+
24
+ if (!widget) {
25
+ return;
26
+ }
27
+
28
+ if (widget.template) {
29
+ tpl = $compile("<span>" + widget.template + "</span>")($scope);
30
+ }
31
+
32
+ if (widget.template_url) {
33
+ tpl = $compile("<span>" + fetchTemplate(widget.template_url) + "</span>")($scope);
34
+ }
35
+
36
+ $element.append(tpl);
37
+
38
+ if (widget.script) {
39
+ eval(widget.script)
40
+ }
41
+
42
+ if (widget.script_url) {
43
+ $http.get(widget.script_url).success(function(data) {
44
+ eval(data);
45
+ });
46
+ }
47
+ };
48
+
49
+ return directive;
50
+ });
data/js/router.js CHANGED
@@ -16,6 +16,11 @@ robeaux.config(function($routeProvider) {
16
16
  templateUrl: '/partials/themes.html',
17
17
  })
18
18
 
19
+ .when('/widgets', {
20
+ controller: 'WidgetEditorCtrl',
21
+ templateUrl: '/partials/widget_editor.html',
22
+ })
23
+
19
24
  .otherwise({
20
25
  redirectTo: '/robots'
21
26
  });