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,471 @@
|
|
1
|
+
var UIApplication = function(delegate) {
|
2
|
+
var self = UIElement(delegate);
|
3
|
+
|
4
|
+
// Static attributes
|
5
|
+
UIApplication.style = {
|
6
|
+
margin: 10,
|
7
|
+
titleBarHeight: 50,
|
8
|
+
applicationBackgroundWidthNotExpanded: 100,
|
9
|
+
applicationBackgroundHeightNotExpanded: 100,
|
10
|
+
optionRectHeight: 20,
|
11
|
+
headerRectHeightNotExpanded: 10,
|
12
|
+
headerRectHeightExpanded: 30,
|
13
|
+
activeStatusColor: defaultPalette.state.green,
|
14
|
+
disabledStatusColor: defaultPalette.state.red,
|
15
|
+
backTextYMargin: 20,
|
16
|
+
backTextXMargin: 60,
|
17
|
+
backIconXMargin: 10,
|
18
|
+
backIconYMargin: 7,
|
19
|
+
arrow_thick: 5,
|
20
|
+
arrow_width: 30,
|
21
|
+
arrow_bottom_margin: 2,
|
22
|
+
optionRectCloseDelay: 250,
|
23
|
+
closeButtonDelay: 750,
|
24
|
+
backButtonSensitiveAreaWidth: 220
|
25
|
+
};
|
26
|
+
|
27
|
+
// Public variables
|
28
|
+
self.data = undefined;
|
29
|
+
self.expanded = false;
|
30
|
+
|
31
|
+
self.statusColor = function() {
|
32
|
+
if(self.delegate.status)
|
33
|
+
return UIApplication.style.activeStatusColor;
|
34
|
+
|
35
|
+
return UIApplication.style.disabledStatusColor;
|
36
|
+
};
|
37
|
+
|
38
|
+
self.openOptionRect = function (optionGroup) {
|
39
|
+
optionGroup
|
40
|
+
.transition()
|
41
|
+
.attr("transform", "translate(0," + (UIApplication.style.optionRectHeight -1) + ")");
|
42
|
+
};
|
43
|
+
|
44
|
+
self.closeOptionRect = function (optionGroup) {
|
45
|
+
optionGroup
|
46
|
+
.transition()
|
47
|
+
.delay(UIApplication.style.optionRectCloseDelay)
|
48
|
+
.attr("transform", "translate(0," + (- UIApplication.style.optionRectHeight) + ")");
|
49
|
+
};
|
50
|
+
|
51
|
+
// Private variables
|
52
|
+
var applicationBackground = undefined;
|
53
|
+
var nameGroup = undefined;
|
54
|
+
var optionGroup = undefined;
|
55
|
+
var optionRect = undefined;
|
56
|
+
var headerRect = undefined;
|
57
|
+
var appName = undefined;
|
58
|
+
var mailIcon = undefined;
|
59
|
+
var closeIcon = undefined;
|
60
|
+
var optionSignifier = undefined;
|
61
|
+
var backButtonSensitiveArea = undefined;
|
62
|
+
var backArrow = undefined;
|
63
|
+
|
64
|
+
self.render = function() {
|
65
|
+
|
66
|
+
var layer = self.view;
|
67
|
+
|
68
|
+
// function for the rendering of the triangle and square
|
69
|
+
var lineFunction = d3.svg.line()
|
70
|
+
.x(function(d) { return d.x; })
|
71
|
+
.y(function(d) { return d.y; })
|
72
|
+
.interpolate("linear");
|
73
|
+
// Triangle data
|
74
|
+
var arrowData = [
|
75
|
+
{ "x": 0.0, "y": -UIApplication.style.applicationBackgroundHeightNotExpanded/2 + UIApplication.style.arrow_bottom_margin},
|
76
|
+
{ "x": 1*UIApplication.style.applicationBackgroundWidthNotExpanded/2 - UIApplication.style.arrow_width, "y": -UIApplication.style.applicationBackgroundHeightNotExpanded/2+10},
|
77
|
+
{ "x": 1*UIApplication.style.applicationBackgroundWidthNotExpanded/2 - UIApplication.style.arrow_width - UIApplication.style.arrow_thick, "y": -UIApplication.style.applicationBackgroundHeightNotExpanded/2+10},
|
78
|
+
{ "x": 0.0, "y": -UIApplication.style.applicationBackgroundHeightNotExpanded/2 + UIApplication.style.arrow_bottom_margin + 2},
|
79
|
+
{ "x": -1*UIApplication.style.applicationBackgroundWidthNotExpanded/2 + UIApplication.style.arrow_width + UIApplication.style.arrow_thick, "y": -UIApplication.style.applicationBackgroundHeightNotExpanded/2+10},
|
80
|
+
{ "x": -1*UIApplication.style.applicationBackgroundWidthNotExpanded/2 + UIApplication.style.arrow_width, "y": -UIApplication.style.applicationBackgroundHeightNotExpanded/2+10}
|
81
|
+
];
|
82
|
+
|
83
|
+
|
84
|
+
// Create option group
|
85
|
+
// it must be created before the app bg to perform the slide
|
86
|
+
if(optionGroup == undefined) {
|
87
|
+
optionGroup = layer.append("g")
|
88
|
+
.class("optionGroup");
|
89
|
+
}
|
90
|
+
|
91
|
+
// Background rect
|
92
|
+
if(applicationBackground == undefined) {
|
93
|
+
applicationBackground = layer.append("rect")
|
94
|
+
.on("mouseover", function () {
|
95
|
+
delegate.mouseOverEffect(applicationBackground, self.palette.accent1.bright);
|
96
|
+
self.openOptionRect(optionGroup);
|
97
|
+
})
|
98
|
+
.on("mouseout", function () {
|
99
|
+
delegate.mouseOutEffect(applicationBackground, self.palette.accent1.normal);
|
100
|
+
self.closeOptionRect(optionGroup);
|
101
|
+
})
|
102
|
+
.fill(self.palette.primary.normal)
|
103
|
+
.class("applicationBackground");
|
104
|
+
}
|
105
|
+
|
106
|
+
if(self.delegate.expanded) {
|
107
|
+
applicationBackground
|
108
|
+
.classRemove("pointer")
|
109
|
+
.on("click", null)
|
110
|
+
.on("mouseover", null)
|
111
|
+
.on("mouseout", null)
|
112
|
+
.transition()
|
113
|
+
.fill(self.palette.background.dark)
|
114
|
+
.margin(UIApplication.style.margin)
|
115
|
+
.width(windowViewController.width)
|
116
|
+
.height(windowViewController.height)
|
117
|
+
.x(-windowViewController.width / 2 + UIApplication.style.margin)
|
118
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin);
|
119
|
+
}
|
120
|
+
else {
|
121
|
+
applicationBackground
|
122
|
+
.class("pointer")
|
123
|
+
.on("click", function() {
|
124
|
+
delegate.clicked();
|
125
|
+
})
|
126
|
+
.on("mouseover", function() {
|
127
|
+
d3.select(this).fill(self.palette.accent1.bright);
|
128
|
+
self.openOptionRect(optionGroup);
|
129
|
+
optionSignifier
|
130
|
+
.opacity(0)
|
131
|
+
})
|
132
|
+
.on("mouseout", function() {
|
133
|
+
d3.select(this).fill(self.palette.accent1.normal);
|
134
|
+
self.closeOptionRect(optionGroup);
|
135
|
+
optionSignifier
|
136
|
+
.attr("d", lineFunction(arrowData))
|
137
|
+
.transition()
|
138
|
+
.delay(UIApplication.style.optionRectCloseDelay)
|
139
|
+
.opacity(1);
|
140
|
+
|
141
|
+
})
|
142
|
+
.transition()
|
143
|
+
.fill(self.palette.accent1.normal)
|
144
|
+
.margin(undefined)
|
145
|
+
.width(UIApplication.style.applicationBackgroundWidthNotExpanded)
|
146
|
+
.height(UIApplication.style.applicationBackgroundHeightNotExpanded)
|
147
|
+
.x(-50)
|
148
|
+
.y(-50);
|
149
|
+
}
|
150
|
+
|
151
|
+
// Application name group
|
152
|
+
if(nameGroup == undefined) {
|
153
|
+
nameGroup = layer.append("g")
|
154
|
+
.class("nameGroup");
|
155
|
+
}
|
156
|
+
|
157
|
+
// Create the status rect
|
158
|
+
if(headerRect == undefined) {
|
159
|
+
headerRect = nameGroup.append("rect")
|
160
|
+
.class("no_interaction")
|
161
|
+
.class("headerRect");
|
162
|
+
}
|
163
|
+
|
164
|
+
// Update the status rect
|
165
|
+
headerRect
|
166
|
+
.fill(self.statusColor());
|
167
|
+
|
168
|
+
if(appName == undefined) {
|
169
|
+
appName = nameGroup.append("text")
|
170
|
+
.class("name")
|
171
|
+
.class("pointer")
|
172
|
+
.class("no_interaction")
|
173
|
+
.attr("text-anchor", "middle")
|
174
|
+
.fill(self.palette.text.bright);
|
175
|
+
}
|
176
|
+
|
177
|
+
appName.text(delegate.name);
|
178
|
+
|
179
|
+
// add close button
|
180
|
+
if(closeIcon == undefined) {
|
181
|
+
closeIcon = nameGroup.append("text")
|
182
|
+
.text("Back")
|
183
|
+
.fill(self.palette.text.bright)
|
184
|
+
.class("closeApp")
|
185
|
+
.class("pointer")
|
186
|
+
.style("opacity", 0)
|
187
|
+
.attr("text-anchor", "middle")
|
188
|
+
.on("click", function () {
|
189
|
+
delegate.closeButtonClicked();
|
190
|
+
});
|
191
|
+
|
192
|
+
/*
|
193
|
+
closeIcon = nameGroup.append("svg:image")
|
194
|
+
.attr('width', 20)
|
195
|
+
.attr('height', 20)
|
196
|
+
.attr("xlink:href", "img/cross_red_border_white.svg")
|
197
|
+
.class("closeApp")
|
198
|
+
.class("pointer")
|
199
|
+
.style("opacity", 0)
|
200
|
+
.on("click", function () {
|
201
|
+
delegate.closeButtonClicked();
|
202
|
+
});
|
203
|
+
*/
|
204
|
+
}
|
205
|
+
|
206
|
+
|
207
|
+
// add backButtonSensitiveArea
|
208
|
+
if(backButtonSensitiveArea == undefined) {
|
209
|
+
backButtonSensitiveArea = nameGroup.append("rect")
|
210
|
+
.opacity(0)
|
211
|
+
.class("pointer")
|
212
|
+
.width(0)
|
213
|
+
.height(0)
|
214
|
+
.on("click", function () {
|
215
|
+
delegate.closeButtonClicked();
|
216
|
+
})}
|
217
|
+
;
|
218
|
+
|
219
|
+
if(optionRect == undefined) {
|
220
|
+
optionRect = optionGroup.append("rect")
|
221
|
+
.class("optionRect")
|
222
|
+
.class("pointer")
|
223
|
+
.on("click", function() {
|
224
|
+
delegate.subscribeButtonClicked();
|
225
|
+
});
|
226
|
+
}
|
227
|
+
|
228
|
+
if(optionSignifier == undefined) {
|
229
|
+
optionSignifier = layer.append("svg:image")
|
230
|
+
.attr('width', 20)
|
231
|
+
.attr('height', 6.5)
|
232
|
+
.x(-10)
|
233
|
+
.y(40)
|
234
|
+
.class("no_interaction")
|
235
|
+
.attr("xlink:href", "img/arrow_white.svg")
|
236
|
+
.class("pointer")
|
237
|
+
.style("opacity", 0);
|
238
|
+
}
|
239
|
+
|
240
|
+
if(backArrow == undefined) {
|
241
|
+
backArrow = layer.append("svg:image")
|
242
|
+
.attr('width', 0)
|
243
|
+
.attr('height', 0)
|
244
|
+
//.x(1000)
|
245
|
+
//.y(0)
|
246
|
+
.class("no_interaction")
|
247
|
+
.attr("xlink:href", "img/back.svg")
|
248
|
+
.class("pointer")
|
249
|
+
.style("opacity", 1);
|
250
|
+
}
|
251
|
+
|
252
|
+
|
253
|
+
// add mail icon to the option group
|
254
|
+
if(mailIcon == undefined) {
|
255
|
+
mailIcon = optionGroup.append("text")
|
256
|
+
.class("mailIcon")
|
257
|
+
.class("pointer")
|
258
|
+
.class("no_interaction")
|
259
|
+
.attr("text-anchor", "middle")
|
260
|
+
.fill(self.palette.text.bright)
|
261
|
+
.on("mouseover", function() {
|
262
|
+
self.openOptionRect(optionGroup);
|
263
|
+
delegate.mouseOverEffect(applicationBackground, self.palette.accent1.bright);
|
264
|
+
})
|
265
|
+
.y(UIApplication.style.applicationBackgroundHeightNotExpanded / 2 - UIApplication.style.optionRectHeight + 15)
|
266
|
+
.text("subscribe");
|
267
|
+
|
268
|
+
/*mailIcon = optionGroup.append("svg:image")
|
269
|
+
.on("mouseover", function() {
|
270
|
+
self.openOptionRect(optionGroup);
|
271
|
+
delegate.mouseOverEffect(applicationBackground, self.palette.accent1.bright);
|
272
|
+
d3.select(this).attr("xlink:href","img/email_highlighted.svg");
|
273
|
+
})
|
274
|
+
.on("mouseout", function() {
|
275
|
+
d3.select(this).attr("xlink:href","img/email.svg");
|
276
|
+
})
|
277
|
+
.on("click", function() {
|
278
|
+
alert("ciao simona");
|
279
|
+
})
|
280
|
+
.attr('width', 34)
|
281
|
+
.attr('height', 24)
|
282
|
+
.x(-17)
|
283
|
+
.y(UIApplication.style.applicationBackgroundHeightNotExpanded / 2 - UIApplication.style.optionRectHeight +1)
|
284
|
+
.attr("xlink:href", "img/email.svg")
|
285
|
+
.class("mailIcon")
|
286
|
+
.class("pointer");*/
|
287
|
+
}
|
288
|
+
|
289
|
+
// Application name
|
290
|
+
if(self.delegate.expanded) {
|
291
|
+
self.closeOptionRect(optionGroup);
|
292
|
+
|
293
|
+
// move the name
|
294
|
+
appName
|
295
|
+
.transition()
|
296
|
+
.duration(Animations.application.APPLICATION_EXPANSION.duration)
|
297
|
+
.x(0)
|
298
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin + 20);
|
299
|
+
|
300
|
+
// move the rect
|
301
|
+
headerRect
|
302
|
+
.transition()
|
303
|
+
.x(-windowViewController.width / 2 + UIApplication.style.margin )
|
304
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin)
|
305
|
+
.attr('width', windowViewController.width - UIApplication.style.margin * 2)
|
306
|
+
.transition()
|
307
|
+
.attr('height', UIApplication.style.headerRectHeightExpanded)
|
308
|
+
.transition();
|
309
|
+
|
310
|
+
|
311
|
+
// move close button
|
312
|
+
|
313
|
+
closeIcon
|
314
|
+
.text("Back")
|
315
|
+
.on("mouseover", function(){
|
316
|
+
d3.select(this).fill("#bdc3c7");
|
317
|
+
})
|
318
|
+
.on("mouseout", function () {
|
319
|
+
d3.select(this).fill(self.palette.text.bright)
|
320
|
+
})
|
321
|
+
.transition()
|
322
|
+
.x(-windowViewController.width / 2 + UIApplication.style.margin + UIApplication.style.backTextXMargin)
|
323
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin + UIApplication.style.backTextYMargin)
|
324
|
+
.transition()
|
325
|
+
.delay(UIApplication.style.closeButtonDelay)
|
326
|
+
.style("opacity", 1);
|
327
|
+
|
328
|
+
/*
|
329
|
+
* closeIcon
|
330
|
+
.on("mouseover", function() {
|
331
|
+
d3.select(this).attr("xlink:href","img/cross_red_border_white_mouseover.svg");
|
332
|
+
})
|
333
|
+
.on("mouseout", function() {
|
334
|
+
d3.select(this).attr("xlink:href","img/cross_red_border_white.svg");
|
335
|
+
})
|
336
|
+
.transition()
|
337
|
+
.x(windowViewController.width / 2 - UIApplication.style.margin - 25)
|
338
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin + 5)
|
339
|
+
.width(40)
|
340
|
+
.height(40)
|
341
|
+
.attr("xlink:href","img/cross_red_border_white.svg")
|
342
|
+
.transition()
|
343
|
+
.delay(750)
|
344
|
+
.style("opacity", 1);*/
|
345
|
+
|
346
|
+
|
347
|
+
backButtonSensitiveArea
|
348
|
+
.width(UIApplication.style.backButtonSensitiveAreaWidth)
|
349
|
+
.height(UIApplication.style.titleBarHeight)
|
350
|
+
.on("mouseover", function(){
|
351
|
+
closeIcon.fill("#bdc3c7");
|
352
|
+
})
|
353
|
+
.on("mouseout", function () {
|
354
|
+
closeIcon.fill(self.palette.text.bright)
|
355
|
+
})
|
356
|
+
.x(-windowViewController.width / 2 + UIApplication.style.margin )
|
357
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin );
|
358
|
+
|
359
|
+
backArrow
|
360
|
+
//.attr('width', 40)
|
361
|
+
//.attr('height', 25)
|
362
|
+
.attr('width', 30)
|
363
|
+
.attr('height', 17.75)
|
364
|
+
.x(-windowViewController.width / 2 + UIApplication.style.margin + UIApplication.style.backIconXMargin )
|
365
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin + UIApplication.style.backIconYMargin)
|
366
|
+
.transition()
|
367
|
+
.delay(UIApplication.style.closeButtonDelay)
|
368
|
+
.style("opacity", 1);
|
369
|
+
|
370
|
+
optionSignifier
|
371
|
+
.x(0)
|
372
|
+
.y(0)
|
373
|
+
.opacity(0);
|
374
|
+
|
375
|
+
}
|
376
|
+
else {
|
377
|
+
|
378
|
+
backArrow
|
379
|
+
.attr('width', 0)
|
380
|
+
.attr('height', 0)
|
381
|
+
.x(-windowViewController.width / 2 + UIApplication.style.margin )
|
382
|
+
.y(-windowViewController.height / 2 + UIApplication.style.margin + 2)
|
383
|
+
.opacity(0);
|
384
|
+
appName
|
385
|
+
.transition()
|
386
|
+
.x(0)
|
387
|
+
.y(0);
|
388
|
+
|
389
|
+
headerRect
|
390
|
+
.transition()
|
391
|
+
.attr('width', UIApplication.style.applicationBackgroundWidthNotExpanded)
|
392
|
+
.attr('height', UIApplication.style.headerRectHeightNotExpanded)
|
393
|
+
.x(-UIApplication.style.applicationBackgroundWidthNotExpanded / 2)
|
394
|
+
.y(-UIApplication.style.applicationBackgroundWidthNotExpanded / 2);
|
395
|
+
|
396
|
+
closeIcon
|
397
|
+
.text("")
|
398
|
+
.opacity(0);
|
399
|
+
|
400
|
+
optionRect
|
401
|
+
.on("mouseover", function () {
|
402
|
+
self.openOptionRect(optionGroup);
|
403
|
+
delegate.mouseOverEffect(applicationBackground, self.palette.accent1.bright);
|
404
|
+
})
|
405
|
+
.on("mouseout", function () {
|
406
|
+
self.closeOptionRect(optionGroup);
|
407
|
+
delegate.mouseOverEffect(applicationBackground, self.palette.accent1.normal);
|
408
|
+
})
|
409
|
+
.width(UIApplication.style.applicationBackgroundWidthNotExpanded)
|
410
|
+
.height(UIApplication.style.optionRectHeight)
|
411
|
+
.x( - UIApplication.style.applicationBackgroundWidthNotExpanded / 2)
|
412
|
+
.y( UIApplication.style.applicationBackgroundHeightNotExpanded / 2 - UIApplication.style.optionRectHeight)
|
413
|
+
.fill(self.palette.accent1.normal);
|
414
|
+
|
415
|
+
optionSignifier
|
416
|
+
.x(-10)
|
417
|
+
.y(40)
|
418
|
+
.transition()
|
419
|
+
.delay(UIApplication.style.optionRectCloseDelay)
|
420
|
+
.opacity(1);
|
421
|
+
|
422
|
+
backButtonSensitiveArea
|
423
|
+
.width(0)
|
424
|
+
.height(0)
|
425
|
+
.on("mouseover", function(){
|
426
|
+
closeIcon.fill("#bdc3c7");
|
427
|
+
})
|
428
|
+
.on("mouseout", function () {
|
429
|
+
closeIcon.fill(self.palette.text.bright)
|
430
|
+
})
|
431
|
+
}
|
432
|
+
|
433
|
+
appName
|
434
|
+
.text(delegate.name);
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
};
|
439
|
+
|
440
|
+
self.instanceData = function(selectedInstance) {
|
441
|
+
var d = self.data.instances.filter(function(d) {
|
442
|
+
return d.name == selectedInstance
|
443
|
+
});
|
444
|
+
|
445
|
+
if(d.count == 0)
|
446
|
+
return undefined;
|
447
|
+
|
448
|
+
return d[0];
|
449
|
+
};
|
450
|
+
|
451
|
+
self.getWidth = function() {
|
452
|
+
return width - UIApplication.style.margin * 2;
|
453
|
+
};
|
454
|
+
|
455
|
+
self.getHeight = function() {
|
456
|
+
return height - UIApplication.style.margin * 2;
|
457
|
+
};
|
458
|
+
|
459
|
+
// Constructor
|
460
|
+
self.init = function() {
|
461
|
+
|
462
|
+
}();
|
463
|
+
|
464
|
+
// Destructor
|
465
|
+
self.deinit = function() {
|
466
|
+
// Place here the code for dealloc eventual objects
|
467
|
+
|
468
|
+
};
|
469
|
+
|
470
|
+
return self;
|
471
|
+
};
|