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
@@ -3,11 +3,15 @@ robeaux.factory('Themes', function() {
3
3
 
4
4
  // default themes
5
5
  var defaults = [
6
- { name: 'default', custom: false, css: '' },
7
- { name: 'artoo', custom: false, url: '/css/themes/artoo.css'},
8
- { name: 'cylon', custom: false, url: '/css/themes/cylon.css'},
9
- { name: 'gobot', custom: false, url: '/css/themes/gobot.css'},
10
- { name: 'custom', custom: true, css: ''}
6
+ { name: 'default', custom: false, css: '' },
7
+ { name: 'artoo', custom: false, url: '/css/themes/artoo.css'},
8
+ { name: 'cylon', custom: false, url: '/css/themes/cylon.css'},
9
+ { name: 'gobot', custom: false, url: '/css/themes/gobot.css'},
10
+ { name: 'blackboard', custom: false, url: '/css/themes/blackboard.css'},
11
+ { name: 'whiteboard', custom: false, url: '/css/themes/whiteboard.css'},
12
+ { name: 'dark', custom: false, url: '/css/themes/dark.css'},
13
+ { name: 'gray', custom: false, url: '/css/themes/gray.css'},
14
+ { name: 'custom', custom: true, css: ''}
11
15
  ];
12
16
 
13
17
  service.list = [];
@@ -0,0 +1,86 @@
1
+ robeaux.factory('Widgets', function() {
2
+ var service = {};
3
+
4
+ var defaults = [
5
+ {
6
+ name: 'mindwave',
7
+ custom: false,
8
+ template_url: '/js/widgets/mindwave.html',
9
+ script_url: '/js/widgets/mindwave.js',
10
+ attrs: ['robot', 'device', 'event']
11
+ },
12
+ {
13
+ name: 'attitude',
14
+ custom: false,
15
+ template_url: '/js/widgets/attitude.html',
16
+ script_url: '/js/widgets/attitude.js',
17
+ attrs: ['robot', 'device', 'event']
18
+ }
19
+ ];
20
+
21
+ service.list = [];
22
+
23
+ service.load = function() {
24
+ if (localStorage['widgets']) {
25
+ this.list = angular.fromJson(localStorage['widgets']);
26
+ } else {
27
+ this.list = defaults;
28
+ }
29
+
30
+ if (localStorage['activeWidgets']) {
31
+ this.activeWidgets = angular.fromJson(localStorage['activeWidgets']);
32
+ } else {
33
+ this.activeWidgets = {};
34
+ }
35
+ };
36
+
37
+ service.find = function(name) {
38
+ var match;
39
+
40
+ for (var i = 0; i < this.list.length; i++) {
41
+ if (this.list[i].name === name) {
42
+ match = this.list[i];
43
+ }
44
+ }
45
+
46
+ return match;
47
+ };
48
+
49
+ service.save = function() {
50
+ localStorage.setItem('widgets', angular.toJson(this.list));
51
+ localStorage.setItem('activeWidgets', angular.toJson(this.activeWidgets));
52
+ };
53
+
54
+ service.add = function(name) {
55
+ var widget = {
56
+ name: name,
57
+ template: "",
58
+ script: "",
59
+ attrs: [],
60
+ custom: true
61
+ };
62
+
63
+ this.list.push(widget);
64
+ this.save();
65
+ return this.list[this.list.length - 1];
66
+ };
67
+
68
+ service.remove = function(name) {
69
+ for (var i = 0; i < this.list.length; i++) {
70
+ if (this.list[i].name === name) {
71
+ this.list.splice(i, 1);
72
+ }
73
+ }
74
+
75
+ this.save();
76
+ };
77
+
78
+ service.reset = function() {
79
+ localStorage.removeItem('widgets');
80
+ this.load();
81
+ }
82
+
83
+ service.load();
84
+
85
+ return service;
86
+ });
@@ -1,5 +1,5 @@
1
1
  /*
2
- AngularJS v1.2.16
2
+ AngularJS v1.2.20
3
3
  (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  License: MIT
5
5
  */
@@ -11,4 +11,3 @@ d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(t(d.redirectT
11
11
  b,c=n.get(b,{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function p(){var a,b;e.forEach(k,function(f,k){var q;if(q=!b){var g=c.path();q=f.keys;var l={};if(f.regexp)if(g=f.regexp.exec(g)){for(var h=1,p=g.length;h<p;++h){var n=q[h-1],r="string"==typeof g[h]?decodeURIComponent(g[h]):
12
12
  g[h];n&&r&&(l[n.name]=r)}q=l}else q=null;else q=null;q=a=q}q&&(b=s(f,{params:e.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||k[null]&&s(k[null],{params:{},pathParams:{}})}function t(a,c){var b=[];e.forEach((a||"").split(":"),function(a,d){if(0===d)b.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];b.push(c[f]);b.push(e[2]||"");delete c[f]}});return b.join("")}var u=!1,r={routes:k,reload:function(){u=!0;a.$evalAsync(l)}};a.$on("$locationChangeSuccess",l);return r}]});n.provider("$routeParams",
13
13
  function(){this.$get=function(){return{}}});n.directive("ngView",x);n.directive("ngView",z);x.$inject=["$route","$anchorScroll","$animate"];z.$inject=["$compile","$controller","$route"]})(window,window.angular);
14
- //# sourceMappingURL=angular-route.min.js.map