robeaux 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gruntfile.js +43 -0
- data/Makefile +11 -2
- data/README.markdown +2 -0
- data/css/main.css +1 -0
- data/css/style.css +113 -24
- data/css/themes/blackboard.css +1 -0
- data/css/themes/dark.css +1 -0
- data/css/themes/gray.css +1 -0
- data/css/themes/whiteboard.css +1 -0
- data/images/bullet-connections-2.png +0 -0
- data/images/bullet-connections.png +0 -0
- data/images/bullet-devices-2.png +0 -0
- data/images/bullet-devices.png +0 -0
- data/images/devices-image-2.png +0 -0
- data/images/devices-image.png +0 -0
- data/images/logo-robeaux.png +0 -0
- data/images/robots-icon_03.png +0 -0
- data/index.html +15 -8
- data/js/controllers/widget_editor_ctrl.js +44 -0
- data/js/controllers/widgets_ctrl.js +40 -0
- data/js/directives/widget.js +50 -0
- data/js/router.js +5 -0
- data/js/services/themes.js +9 -5
- data/js/services/widgets.js +86 -0
- data/js/vendor/angular-route.min.js +1 -2
- data/js/vendor/angular.min.js +208 -206
- data/js/widgets/attitude.html +32 -0
- data/js/widgets/attitude.js +27 -0
- data/js/widgets/mindwave.html +51 -0
- data/js/widgets/mindwave.js +23 -0
- data/less/app.less +21 -0
- data/less/objects/buttons.less +32 -0
- data/less/objects/connections.less +28 -0
- data/less/objects/device.less +30 -0
- data/less/objects/forms.less +29 -0
- data/less/objects/list.less +27 -0
- data/less/objects/nav.less +33 -0
- data/less/objects/robot.less +43 -0
- data/less/objects/themes.less +18 -0
- data/less/objects/widgets.less +85 -0
- data/less/support/buttons.less +39 -0
- data/less/support/container.less +9 -0
- data/less/support/forms.less +18 -0
- data/less/support/mixins.less +3 -0
- data/less/themes/blackboard.less +158 -0
- data/less/themes/dark.less +148 -0
- data/less/themes/default.less +52 -0
- data/less/themes/gray.less +121 -0
- data/less/themes/whiteboard.less +152 -0
- data/less/vendor/elements.less +156 -0
- data/less/vendor/normalize.less +425 -0
- data/less/vendor/semantic-grid.less +67 -0
- data/less/views/devices.less +47 -0
- data/less/views/robots.less +132 -0
- data/less/views/themes.less +31 -0
- data/less/views/widgets.less +50 -0
- data/package.json +6 -3
- data/partials/device.html +66 -57
- data/partials/index.html +12 -6
- data/partials/robot.html +104 -51
- data/partials/themes.html +32 -29
- data/partials/widget_editor.html +68 -0
- data/robeaux.gemspec +1 -1
- data/test/controllers/device_commands_ctrl.js +129 -0
- data/test/controllers/device_events_ctrl.js +82 -0
- data/test/controllers/index_ctrl.js +48 -0
- data/test/controllers/nav_ctrl.js +40 -0
- data/test/controllers/robot_commands_ctrl.js +127 -0
- data/test/controllers/robot_ctrl.js +62 -0
- data/test/controllers/themes_ctrl.js +96 -0
- data/test/controllers/widget_editor_ctrl.js +111 -0
- data/test/controllers/widgets_ctrl.js +74 -0
- data/test/functions/functions.js +30 -0
- data/test/karma.conf.js +3 -7
- data/test/karma_test_all.conf.js +23 -0
- data/test/karma_test_controllers.conf.js +19 -0
- data/test/karma_test_functions.conf.js +14 -0
- data/test/karma_test_services.conf.js +17 -0
- data/test/services/themes.js +122 -0
- data/test/services/widgets.js +104 -0
- data/test/support/themes.json +9 -0
- data/test/support/widgets.json +18 -0
- data/test/vendor/angular-mocks.js +13 -13
- data/test/vendor/jquery.js +8 -8
- metadata +69 -3
- data/test/main.js +0 -248
data/js/services/themes.js
CHANGED
@@ -3,11 +3,15 @@ robeaux.factory('Themes', function() {
|
|
3
3
|
|
4
4
|
// default themes
|
5
5
|
var defaults = [
|
6
|
-
{ name: 'default',
|
7
|
-
{ name: 'artoo',
|
8
|
-
{ name: 'cylon',
|
9
|
-
{ name: 'gobot',
|
10
|
-
{ name: '
|
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.
|
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
|