nutella_framework 0.4.23 → 0.4.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/framework_components/monitoring-bot/monitoring-bot.rb +11 -2
- data/framework_components/monitoring-interface/.gitignore +2 -0
- data/framework_components/monitoring-interface/README.md +1 -0
- data/framework_components/monitoring-interface/bower.json +29 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/.bower.json +23 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/bower.json +14 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/mqttws31.js +2081 -0
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/readme.md +4 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/.bower.json +37 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/LICENSE +21 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/README.md +15 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/bower.json +28 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/browser/mqtt_client_hello_world.html +23 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/browser/nutella_hello_world.html +52 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/node/mqtt_client_hello_world.js +14 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/node/nutella_hello_world.js +38 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/nutella_lib.js +789 -0
- data/framework_components/monitoring-interface/bower_components/nutella_lib/package.json +30 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface.html +215 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/animations.js +27 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/application-view-controller.js +232 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/applications-model.js +61 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/bootstrap.min.js +7 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/cursor.css +7 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/d3.v3.min.js +5 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/graphics.js +156 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/grid-layout.js +103 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/highlight.min.js +2 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/instance-view-controller.js +104 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/jquery-1.10.0.min.js +6 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/notification-center.js +63 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/notifications.js +14 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/page.css +33 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/radial-layout.js +175 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/tab-table.js +8 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-application.css +0 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-application.js +320 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-connection-view.css +10 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-connection-view.js +426 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-element.js +205 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-notification.js +94 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-tab.js +229 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/underscore-min.js +5 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/view-controller.js +68 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/window-view-controller.js +169 -0
- data/framework_components/monitoring-interface/css/alerts.css +3 -0
- data/framework_components/monitoring-interface/css/bootstrap.min.css +5 -0
- data/framework_components/monitoring-interface/css/cursor.css +7 -0
- data/framework_components/monitoring-interface/css/highlight.default.min.css +1 -0
- data/framework_components/monitoring-interface/css/page.css +41 -0
- data/framework_components/monitoring-interface/css/ui-application.css +0 -0
- data/framework_components/monitoring-interface/css/ui-connection-view.css +10 -0
- data/framework_components/monitoring-interface/css/ui-legend-view.css +7 -0
- data/framework_components/monitoring-interface/data/alert.json +8 -0
- data/framework_components/monitoring-interface/data/data.json +2118 -0
- data/framework_components/monitoring-interface/data/data2.json +814 -0
- data/framework_components/monitoring-interface/data/data3.json +823 -0
- data/framework_components/monitoring-interface/data/data4.json +848 -0
- data/framework_components/monitoring-interface/data/message.json +999 -0
- data/framework_components/monitoring-interface/gulpfile.js +29 -0
- data/framework_components/monitoring-interface/img/arrow_white.svg +120 -0
- data/framework_components/monitoring-interface/img/arrow_white_right.svg +104 -0
- data/framework_components/monitoring-interface/img/back.svg +164 -0
- data/framework_components/monitoring-interface/img/cross_red_border_white.svg +143 -0
- data/framework_components/monitoring-interface/img/cross_red_border_white_mouseover.svg +143 -0
- data/framework_components/monitoring-interface/img/email.svg +89 -0
- data/framework_components/monitoring-interface/img/email_highlighted.svg +89 -0
- data/framework_components/monitoring-interface/index.html +144 -0
- data/framework_components/monitoring-interface/js/d3/layout/grid-layout.js +103 -0
- data/framework_components/monitoring-interface/js/d3/layout/radial-layout.js +184 -0
- data/framework_components/monitoring-interface/js/d3/plugin/graphics.js +156 -0
- data/framework_components/monitoring-interface/js/d3/plugin/tab-table.js +8 -0
- data/framework_components/monitoring-interface/js/d3/ui/animations.js +27 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-application.js +471 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-connection-view.js +847 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-element.js +245 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-legend.js +174 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-notification.js +90 -0
- data/framework_components/monitoring-interface/js/d3/ui/ui-tab.js +309 -0
- data/framework_components/monitoring-interface/js/lib/JSXTransformer-0.12.2.js +15199 -0
- data/framework_components/monitoring-interface/js/lib/bootstrap.min.js +7 -0
- data/framework_components/monitoring-interface/js/lib/d3.v3.min.js +5 -0
- data/framework_components/monitoring-interface/js/lib/highlight.min.js +2 -0
- data/framework_components/monitoring-interface/js/lib/jquery-1.10.0.min.js +6 -0
- data/framework_components/monitoring-interface/js/lib/nutella_lib.js +5121 -0
- data/framework_components/monitoring-interface/js/lib/react-with-addons-0.12.2.js +19822 -0
- data/framework_components/monitoring-interface/js/lib/underscore-min.js +5 -0
- data/framework_components/monitoring-interface/js/model/alerts-model.js +74 -0
- data/framework_components/monitoring-interface/js/model/applications-model.js +78 -0
- data/framework_components/monitoring-interface/js/model/messages-model.js +112 -0
- data/framework_components/monitoring-interface/js/notification/notification-center.js +63 -0
- data/framework_components/monitoring-interface/js/notification/notifications.js +21 -0
- data/framework_components/monitoring-interface/js/react/dist/ui-alerts.js +178 -0
- data/framework_components/monitoring-interface/js/react/dist/ui-message-send.js +389 -0
- data/framework_components/monitoring-interface/js/react/dist/ui-messages.js +103 -0
- data/framework_components/monitoring-interface/js/react/src/ui-alerts.js +178 -0
- data/framework_components/monitoring-interface/js/react/src/ui-message-send.js +389 -0
- data/framework_components/monitoring-interface/js/react/src/ui-messages.js +103 -0
- data/framework_components/monitoring-interface/js/view-controller/application-view-controller.js +256 -0
- data/framework_components/monitoring-interface/js/view-controller/instance-view-controller.js +112 -0
- data/framework_components/monitoring-interface/js/view-controller/view-controller.js +74 -0
- data/framework_components/monitoring-interface/js/view-controller/window-view-controller.js +169 -0
- data/framework_components/monitoring-interface/nutella.json +6 -0
- data/framework_components/order.json +1 -0
- data/framework_components/roomcast-bot/roomcast_bot.rb +139 -117
- data/framework_components/roomcast-channel-creator/dist/app.js +9 -7
- data/framework_components/roomcast-channel-creator/index.html +1 -1
- data/framework_components/roomcast-channel-creator/src/app/components/main.js +8 -6
- data/framework_components/roomcast-package-creator/dist/app.js +4 -4
- data/framework_components/roomcast-package-creator/index.html +1 -1
- data/framework_components/roomcast-package-creator/package.json +3 -3
- data/framework_components/roomcast-package-creator/src/app/components/ConfigurationsPanel.js +2 -2
- data/framework_components/roomcast-package-creator/src/app/components/PoolRow.js +1 -1
- data/framework_components/roomcast-teacher-controls/.gitignore +2 -0
- data/framework_components/roomcast-teacher-controls/README.md +9 -0
- data/framework_components/roomcast-teacher-controls/dist/app.js +38327 -0
- data/framework_components/roomcast-teacher-controls/dist/main.css +3052 -0
- data/framework_components/roomcast-teacher-controls/dist/nutella_lib.js +5121 -0
- data/framework_components/roomcast-teacher-controls/gulp/config.js +51 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/browserify.js +77 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/build.js +3 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/css.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/default.js +3 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/fonts.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/less.js +16 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/mui-fonts.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/nutella.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/setWatch.js +5 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/svgs.js +7 -0
- data/framework_components/roomcast-teacher-controls/gulp/tasks/watch.js +12 -0
- data/framework_components/roomcast-teacher-controls/gulp/util/bundleLogger.js +21 -0
- data/framework_components/roomcast-teacher-controls/gulp/util/handleErrors.js +15 -0
- data/framework_components/roomcast-teacher-controls/gulpfile.js +16 -0
- data/framework_components/roomcast-teacher-controls/index.html +51 -0
- data/framework_components/roomcast-teacher-controls/nutella.json +6 -0
- data/framework_components/roomcast-teacher-controls/package.json +38 -0
- data/framework_components/roomcast-teacher-controls/src/app/app.js +22 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivitiesGrid.js +87 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivityCard.js +141 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/Channel.js +70 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/Footer.js +34 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/main.js +74 -0
- data/framework_components/roomcast-teacher-controls/src/less/main.less +186 -0
- data/framework_components/roomcast-teacher-controls/src/less/my_overrides.less +14 -0
- data/lib/commands/meta/run_command.rb +11 -9
- metadata +135 -2
@@ -0,0 +1,245 @@
|
|
1
|
+
/*
|
2
|
+
// palette 1
|
3
|
+
var defaultPalette = {
|
4
|
+
primary: {
|
5
|
+
dark: "#0288D1",
|
6
|
+
normal: "#19BB9B",
|
7
|
+
bright: "#B3E5FC"
|
8
|
+
},
|
9
|
+
text: {
|
10
|
+
dark: "#000000",
|
11
|
+
bright: "#FFFFFF"
|
12
|
+
},
|
13
|
+
accent1: {
|
14
|
+
dark: "#16a689",
|
15
|
+
normal: "#19BB9B",
|
16
|
+
bright: "#1dd9b4"
|
17
|
+
},
|
18
|
+
accent2: {
|
19
|
+
dark: "#F57C00",
|
20
|
+
normal: "#FF9800",
|
21
|
+
bright: "#FFFFFF"
|
22
|
+
},
|
23
|
+
accent3: {
|
24
|
+
dark: "#F57C00",
|
25
|
+
normal: "#FF9800",
|
26
|
+
bright: "#FFE0B2"
|
27
|
+
},
|
28
|
+
background: {
|
29
|
+
dark: "#D2D7D3",
|
30
|
+
normal: "#EEEEEE"
|
31
|
+
|
32
|
+
},
|
33
|
+
state: {
|
34
|
+
red: "#C0392B",
|
35
|
+
//red: "#96281B",
|
36
|
+
//red: "#F26A4B",
|
37
|
+
green: "#019875"
|
38
|
+
}
|
39
|
+
};
|
40
|
+
*/
|
41
|
+
|
42
|
+
/*
|
43
|
+
// palette 2
|
44
|
+
var defaultPalette = {
|
45
|
+
primary: {
|
46
|
+
dark: "#0288D1",
|
47
|
+
normal: "#19BB9B",
|
48
|
+
bright: "#B3E5FC"
|
49
|
+
},
|
50
|
+
text: {
|
51
|
+
dark: "#FFFFFF",
|
52
|
+
bright: "#FFFFFF"
|
53
|
+
},
|
54
|
+
accent1: {
|
55
|
+
dark: "#16a689",
|
56
|
+
normal: "#19BB9B",
|
57
|
+
bright: "#1dd9b4"
|
58
|
+
},
|
59
|
+
accent2: {
|
60
|
+
dark: "#F57C00",
|
61
|
+
normal: "#FF9800",
|
62
|
+
bright: "#FFFFFF"
|
63
|
+
},
|
64
|
+
accent3: {
|
65
|
+
dark: "#F57C00",
|
66
|
+
normal: "#FF9800",
|
67
|
+
bright: "#FFE0B2"
|
68
|
+
},
|
69
|
+
background: {
|
70
|
+
dark: "#534f59",
|
71
|
+
normal: "#39363D"
|
72
|
+
|
73
|
+
},
|
74
|
+
state: {
|
75
|
+
red: "#C0392B",
|
76
|
+
//red: "#96281B",
|
77
|
+
//red: "#F26A4B",
|
78
|
+
green: "#019875"
|
79
|
+
}
|
80
|
+
};
|
81
|
+
*/
|
82
|
+
/*
|
83
|
+
// palette 3
|
84
|
+
var defaultPalette = {
|
85
|
+
primary: {
|
86
|
+
dark: "#0288D1",
|
87
|
+
normal: "#425266",
|
88
|
+
bright: "#B3E5FC"
|
89
|
+
},
|
90
|
+
text: {
|
91
|
+
dark: "#FFFFFF",
|
92
|
+
bright: "#FFFFFF"
|
93
|
+
},
|
94
|
+
accent1: {
|
95
|
+
dark: "#323e4d",
|
96
|
+
normal: "#425266",
|
97
|
+
bright: "#536780"
|
98
|
+
},
|
99
|
+
accent2: {
|
100
|
+
dark: "#FFFFFF",
|
101
|
+
normal: "#FF9800",
|
102
|
+
bright: "#FFFFFF"
|
103
|
+
},
|
104
|
+
accent3: {
|
105
|
+
dark: "#F57C00",
|
106
|
+
normal: "#FF9800",
|
107
|
+
bright: "#FFE0B2"
|
108
|
+
},
|
109
|
+
background: {
|
110
|
+
dark: "#637b99",
|
111
|
+
normal: "#323e4d"
|
112
|
+
|
113
|
+
},
|
114
|
+
state: {
|
115
|
+
red: "#D24D57",
|
116
|
+
//red: "#E74C3C",
|
117
|
+
//red: "#C0392B",
|
118
|
+
//red: "#96281B",
|
119
|
+
//red: "#F26A4B",
|
120
|
+
green: "#26A65B"
|
121
|
+
}
|
122
|
+
};*/
|
123
|
+
|
124
|
+
// palette 4
|
125
|
+
var defaultPalette = {
|
126
|
+
primary: {
|
127
|
+
dark: "#0288D1",
|
128
|
+
normal: "#425266",
|
129
|
+
bright: "#B3E5FC"
|
130
|
+
},
|
131
|
+
text: {
|
132
|
+
dark: "#636D6E",
|
133
|
+
bright: "#FFFFFF"
|
134
|
+
},
|
135
|
+
accent1: {
|
136
|
+
dark: "#323e4d",
|
137
|
+
normal: "#425266",
|
138
|
+
bright: "#536780"
|
139
|
+
},
|
140
|
+
accent2: {
|
141
|
+
dark: "#FFFFFF",
|
142
|
+
normal: "#FF9800",
|
143
|
+
bright: "#FFFFFF"
|
144
|
+
},
|
145
|
+
accent3: {
|
146
|
+
dark: "#F57C00",
|
147
|
+
normal: "#FF9800",
|
148
|
+
bright: "#FFE0B2"
|
149
|
+
},
|
150
|
+
background: {
|
151
|
+
dark: "#C8CBCC",
|
152
|
+
normal: "#ecf0f1"
|
153
|
+
|
154
|
+
},
|
155
|
+
state: {
|
156
|
+
red: "#CC4B55",
|
157
|
+
//red: "#E74C3C",
|
158
|
+
//red: "#C0392B",
|
159
|
+
//red: "#96281B",
|
160
|
+
//red: "#F26A4B",
|
161
|
+
green: "#26A65B"
|
162
|
+
}
|
163
|
+
};
|
164
|
+
var UIElement = function(delegate) {
|
165
|
+
var self = {};
|
166
|
+
|
167
|
+
// Public variables
|
168
|
+
self.delegate = undefined;
|
169
|
+
|
170
|
+
// Private variables
|
171
|
+
var view = undefined;
|
172
|
+
var x = 0;
|
173
|
+
var y = 0;
|
174
|
+
var show = true;
|
175
|
+
|
176
|
+
// Protected variables
|
177
|
+
self.palette = defaultPalette;
|
178
|
+
|
179
|
+
// Getter and setter
|
180
|
+
self.__defineGetter__("x", function() {
|
181
|
+
return x;
|
182
|
+
});
|
183
|
+
|
184
|
+
self.__defineGetter__("y", function() {
|
185
|
+
return y;
|
186
|
+
});
|
187
|
+
|
188
|
+
self.__defineGetter__("view", function() {
|
189
|
+
return view;
|
190
|
+
});
|
191
|
+
|
192
|
+
self.__defineGetter__("show", function() {
|
193
|
+
return show;
|
194
|
+
});
|
195
|
+
|
196
|
+
|
197
|
+
self.__defineSetter__("x", function(newX) {
|
198
|
+
x = newX;
|
199
|
+
self.updateViewPosition();
|
200
|
+
});
|
201
|
+
|
202
|
+
self.__defineSetter__("y", function(newY) {
|
203
|
+
y = newY;
|
204
|
+
self.updateViewPosition();
|
205
|
+
});
|
206
|
+
|
207
|
+
self.__defineSetter__("view", function(newView) {
|
208
|
+
view = newView;
|
209
|
+
self.updateViewPosition();
|
210
|
+
self.updateViewOpacity();
|
211
|
+
});
|
212
|
+
|
213
|
+
self.__defineSetter__("show", function(newShow) {
|
214
|
+
if(show != newShow) {
|
215
|
+
show = newShow;
|
216
|
+
self.updateViewOpacity();
|
217
|
+
}
|
218
|
+
});
|
219
|
+
|
220
|
+
self.updateViewPosition = function() {
|
221
|
+
if(view != undefined) {
|
222
|
+
view.attr("transform", "translate(" + x + ", " + y + ")");
|
223
|
+
}
|
224
|
+
};
|
225
|
+
|
226
|
+
self.updateViewOpacity = function() {
|
227
|
+
if(view != undefined) {
|
228
|
+
view.opacity(show?1:0);
|
229
|
+
}
|
230
|
+
};
|
231
|
+
|
232
|
+
// Constructor
|
233
|
+
self.init = function() {
|
234
|
+
self.delegate = delegate;
|
235
|
+
view = self.delegate.newView();
|
236
|
+
}();
|
237
|
+
|
238
|
+
// Destructor
|
239
|
+
self.deinit = function() {
|
240
|
+
view.remove();
|
241
|
+
};
|
242
|
+
|
243
|
+
return self;
|
244
|
+
|
245
|
+
};
|
@@ -0,0 +1,174 @@
|
|
1
|
+
var UILegend = function(delegate, name) {
|
2
|
+
var self = UIElement(delegate);
|
3
|
+
|
4
|
+
// Static attributes
|
5
|
+
UILegend.style = {
|
6
|
+
legendBoxWidth: 100,
|
7
|
+
legendRightMargin: 50,
|
8
|
+
bottomMargin: 50,
|
9
|
+
legendPositionYExpanded: -70,
|
10
|
+
headerSpacing: 10,
|
11
|
+
legendSpacing: 20,
|
12
|
+
arrow_thick: 11,
|
13
|
+
arrow_ratio: 1.5,
|
14
|
+
square_side: 10.0
|
15
|
+
};
|
16
|
+
|
17
|
+
// Public variables
|
18
|
+
|
19
|
+
// Private variables
|
20
|
+
self._legendGroup = undefined;
|
21
|
+
self._legendName = undefined;
|
22
|
+
self._arrowGroup = undefined;
|
23
|
+
self._squareGroup = undefined;
|
24
|
+
self._expanded = false;
|
25
|
+
|
26
|
+
self.legendAction = function(){
|
27
|
+
self._expanded = !self._expanded;
|
28
|
+
self.render();
|
29
|
+
};
|
30
|
+
|
31
|
+
self.render = function() {
|
32
|
+
|
33
|
+
var layer = self.view;
|
34
|
+
|
35
|
+
// function for the rendering of the triangle and square
|
36
|
+
var lineFunction = d3.svg.line()
|
37
|
+
.x(function(d) { return d.x; })
|
38
|
+
.y(function(d) { return d.y; })
|
39
|
+
.interpolate("linear");
|
40
|
+
// Triangle data
|
41
|
+
var arrowData = [
|
42
|
+
{ "x": 0.0, "y": 0.0},
|
43
|
+
{ "x": 1*UILegend.style.arrow_thick/UILegend.style.arrow_ratio, "y": 1*UILegend.style.arrow_thick},
|
44
|
+
{ "x": -1*UILegend.style.arrow_thick/UILegend.style.arrow_ratio, "y": 1*UILegend.style.arrow_thick}
|
45
|
+
];
|
46
|
+
|
47
|
+
if(self._legendGroup == undefined) {
|
48
|
+
self._legendGroup = layer
|
49
|
+
.append("g")
|
50
|
+
.class("legendGroup")
|
51
|
+
.attr("transform", "translate(" + (windowViewController.width / 2 - UILegend.style.legendBoxWidth - UILegend.style.legendRightMargin) + "," + (windowViewController.height / 2 - UILegend.style.bottomMargin) +")");
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
// Move during window resize
|
55
|
+
self._legendGroup
|
56
|
+
.attr("transform", "translate(" + (windowViewController.width / 2 - UILegend.style.legendBoxWidth - UILegend.style.legendRightMargin) + "," + (windowViewController.height / 2 - UILegend.style.bottomMargin) +")");
|
57
|
+
}
|
58
|
+
|
59
|
+
if(self._arrowGroup == undefined){
|
60
|
+
self._arrowGroup = self._legendGroup
|
61
|
+
.append("g")
|
62
|
+
.class("arrowGroup")
|
63
|
+
.opacity(0);
|
64
|
+
|
65
|
+
self._arrowGroup
|
66
|
+
.append("text")
|
67
|
+
.class("explanation")
|
68
|
+
.text("subscribed channel")
|
69
|
+
.x(5)
|
70
|
+
.y(3);
|
71
|
+
|
72
|
+
self._arrowGroup
|
73
|
+
.append("path")
|
74
|
+
.class("subscribeTriangle")
|
75
|
+
.attr("d", lineFunction(arrowData))
|
76
|
+
.attr("fill", self.palette.accent1.dark)
|
77
|
+
.attr("transform", "rotate(90)")
|
78
|
+
.x(0)
|
79
|
+
.y(0);
|
80
|
+
}
|
81
|
+
|
82
|
+
if(self._squareGroup == undefined){
|
83
|
+
self._squareGroup = self._legendGroup
|
84
|
+
.append("g")
|
85
|
+
.class("arrowGroup")
|
86
|
+
.opacity(0);
|
87
|
+
|
88
|
+
self._squareGroup
|
89
|
+
.append("text")
|
90
|
+
.class("explanation")
|
91
|
+
.text("handle-requests channel")
|
92
|
+
.x(5);
|
93
|
+
|
94
|
+
self._squareGroup
|
95
|
+
.append("rect")
|
96
|
+
.height(UILegend.style.square_side)
|
97
|
+
.width(UILegend.style.square_side)
|
98
|
+
.attr("fill", self.palette.accent1.dark)
|
99
|
+
.x(-11)
|
100
|
+
.y(-8);
|
101
|
+
}
|
102
|
+
|
103
|
+
if(self._legendName == undefined) {
|
104
|
+
self._legendName = self._legendGroup
|
105
|
+
.append("text")
|
106
|
+
.class("legendName")
|
107
|
+
.class("title")
|
108
|
+
.fill(defaultPalette.text.dark)
|
109
|
+
.on("mouseover", function() {
|
110
|
+
self._legendName.fill("black");
|
111
|
+
})
|
112
|
+
.on("mouseout", function() {
|
113
|
+
self._legendName.fill(defaultPalette.text.dark);
|
114
|
+
})
|
115
|
+
.text("Legend")
|
116
|
+
.class("pointer")
|
117
|
+
.y(0)
|
118
|
+
.on("click", self.legendAction);
|
119
|
+
}
|
120
|
+
|
121
|
+
if(self._expanded){
|
122
|
+
self._legendName
|
123
|
+
.on("mouseout", null)
|
124
|
+
.transition()
|
125
|
+
.y(UILegend.style.legendPositionYExpanded)
|
126
|
+
.fill("black");
|
127
|
+
|
128
|
+
self._arrowGroup
|
129
|
+
.attr("transform", "translate(0," + (UILegend.style.legendPositionYExpanded + UILegend.style.headerSpacing + UILegend.style.legendSpacing) +")")
|
130
|
+
.transition()
|
131
|
+
.delay(500)
|
132
|
+
.opacity(1);
|
133
|
+
|
134
|
+
self._squareGroup
|
135
|
+
.attr("transform", "translate(0," + (UILegend.style.legendPositionYExpanded + UILegend.style.headerSpacing + UILegend.style.legendSpacing * 2) +")")
|
136
|
+
.transition()
|
137
|
+
.delay(500)
|
138
|
+
.opacity(1);
|
139
|
+
}
|
140
|
+
|
141
|
+
if(!self._expanded){
|
142
|
+
self._legendName
|
143
|
+
.on("mouseout", function() {
|
144
|
+
self._legendName.fill(defaultPalette.text.dark);
|
145
|
+
})
|
146
|
+
.transition()
|
147
|
+
.y(0)
|
148
|
+
.fill(defaultPalette.text.dark);
|
149
|
+
|
150
|
+
self._arrowGroup
|
151
|
+
.attr("transform", "translate(0,0)")
|
152
|
+
.opacity(0);
|
153
|
+
|
154
|
+
self._squareGroup
|
155
|
+
.attr("transform", "translate(0,0)")
|
156
|
+
.opacity(0);
|
157
|
+
}
|
158
|
+
|
159
|
+
notificationCenter.subscribe(Notifications.ui.APPLICATION_REDUCTION_FINISHED, function() {
|
160
|
+
self._expanded = false;
|
161
|
+
});
|
162
|
+
};
|
163
|
+
|
164
|
+
// Constructor
|
165
|
+
self.init = function() {
|
166
|
+
}();
|
167
|
+
|
168
|
+
// Destructor
|
169
|
+
self.deinit = function() {
|
170
|
+
};
|
171
|
+
|
172
|
+
return self;
|
173
|
+
|
174
|
+
};
|
@@ -0,0 +1,90 @@
|
|
1
|
+
var UINotification = function(delegate) {
|
2
|
+
var self = UIElement(delegate);
|
3
|
+
|
4
|
+
// Static attributes
|
5
|
+
UINotification.style = {
|
6
|
+
notificationRadius: 10,
|
7
|
+
notificationFontSize: 14,
|
8
|
+
margin: {x: 0, y: 10}
|
9
|
+
};
|
10
|
+
|
11
|
+
// Public attributes
|
12
|
+
self.name = undefined; // Name of the notification
|
13
|
+
|
14
|
+
// Private variables
|
15
|
+
var notificationGroup = undefined;
|
16
|
+
var notificationCircle = undefined;
|
17
|
+
var notificationText = undefined;
|
18
|
+
|
19
|
+
self.render = function() {
|
20
|
+
|
21
|
+
var layer = self.view;
|
22
|
+
|
23
|
+
if(notificationGroup == undefined)
|
24
|
+
notificationGroup = layer.layerWithName("notificationGroup");
|
25
|
+
|
26
|
+
if(notificationCircle == undefined) {
|
27
|
+
notificationCircle = notificationGroup
|
28
|
+
.append("circle")
|
29
|
+
.class("notificationCircle")
|
30
|
+
.cx(0)
|
31
|
+
.cy(0)
|
32
|
+
.r(UINotification.style.notificationRadius)
|
33
|
+
.fill(self.palette.accent2.normal);
|
34
|
+
}
|
35
|
+
|
36
|
+
if(notificationText == undefined) {
|
37
|
+
notificationText = notificationGroup
|
38
|
+
.append("text")
|
39
|
+
.class("no_interaction")
|
40
|
+
.class("notificationText")
|
41
|
+
.attr("text-anchor", "middle")
|
42
|
+
.attr("font-size", UINotification.style.notificationFontSize);
|
43
|
+
}
|
44
|
+
|
45
|
+
if(self.show == false) {
|
46
|
+
notificationGroup
|
47
|
+
.transition()
|
48
|
+
.duration(Animations.notification.NOTIFICATION_FADE_OUT.duration)
|
49
|
+
.delay(Animations.notification.NOTIFICATION_FADE_OUT.delay)
|
50
|
+
.opacity(0);
|
51
|
+
|
52
|
+
notificationCircle
|
53
|
+
.cx(0)
|
54
|
+
.cy(0)
|
55
|
+
.r(0);
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
notificationGroup
|
59
|
+
.transition()
|
60
|
+
.duration(Animations.notification.NOTIFICATION_FADE_IN.duration)
|
61
|
+
.delay(Animations.notification.NOTIFICATION_FADE_IN.delay)
|
62
|
+
.opacity(1);
|
63
|
+
|
64
|
+
notificationCircle
|
65
|
+
.cx(0)
|
66
|
+
.cy(0)
|
67
|
+
.r(UINotification.style.notificationRadius);
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
notificationText
|
74
|
+
.y(UINotification.style.notificationFontSize/3)
|
75
|
+
.text(delegate.notification(self.name));
|
76
|
+
};
|
77
|
+
|
78
|
+
// Constructor
|
79
|
+
self.init = function() {
|
80
|
+
|
81
|
+
}();
|
82
|
+
|
83
|
+
// Destructor
|
84
|
+
self.deinit = function() {
|
85
|
+
// Place here the code for dealloc eventual objects
|
86
|
+
|
87
|
+
};
|
88
|
+
|
89
|
+
return self;
|
90
|
+
};
|