Skip to content

Commit 3977a66

Browse files
authored
Merge branch 'master' into mai/groups-api
2 parents 4f4f7e9 + 2f0cfb0 commit 3977a66

File tree

19 files changed

+98
-45
lines changed

19 files changed

+98
-45
lines changed

services/static-webserver/client/source/class/osparc/file/FileDrop.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ qx.Class.define("osparc.file.FileDrop", {
102102
}
103103
}
104104
return files;
105-
}
105+
},
106+
107+
ONE_FILE_ONLY: qx.locale.Manager.tr("Only one file at a time is accepted.") + "<br>" + qx.locale.Manager.tr("Please zip all files together."),
106108
},
107109

108110
events: {
@@ -299,7 +301,7 @@ qx.Class.define("osparc.file.FileDrop", {
299301
pos: this.__pointerFileEventToScreenPos(e)
300302
});
301303
} else {
302-
osparc.FlashMessenger.getInstance().logAs(this.tr("Only one file at a time is accepted."), "ERROR");
304+
osparc.FlashMessenger.getInstance().logAs(osparc.file.FileDrop.ONE_FILE_ONLY, "ERROR");
303305
}
304306
} else {
305307
osparc.FlashMessenger.getInstance().logAs(this.tr("Folders are not accepted. You might want to upload a zip file."), "ERROR");

services/static-webserver/client/source/class/osparc/file/FilePicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ qx.Class.define("osparc.file.FilePicker", {
417417
},
418418

419419
uploadPendingFiles: function(files) {
420-
if (files.length > 0) {
420+
if (files.length) {
421421
if (files.length === 1) {
422422
const fileUploader = new osparc.file.FileUploader(this.getNode());
423423
fileUploader.addListener("uploadAborted", () => this.__resetOutput());
@@ -428,7 +428,7 @@ qx.Class.define("osparc.file.FilePicker", {
428428
fileUploader.retrieveUrlAndUpload(files[0]);
429429
return true;
430430
}
431-
osparc.FlashMessenger.getInstance().logAs(this.tr("Only one file is accepted"), "ERROR");
431+
osparc.FlashMessenger.getInstance().logAs(osparc.file.FileDrop.ONE_FILE_ONLY, "ERROR");
432432
}
433433
return false;
434434
},

services/static-webserver/client/source/class/osparc/form/renderer/PropForm.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ qx.Class.define("osparc.form.renderer.PropForm", {
3636
},
3737

3838
events: {
39+
"highlightEdge": "qx.event.type.Data",
3940
"linkFieldModified": "qx.event.type.Data",
4041
"fileRequested": "qx.event.type.Data",
4142
"filePickerRequested": "qx.event.type.Data",
@@ -928,6 +929,17 @@ qx.Class.define("osparc.form.renderer.PropForm", {
928929
nodeUuid: fromNodeId,
929930
output: fromPortId
930931
};
932+
const highlightEdgeUI = highlight => {
933+
this.fireDataEvent("highlightEdge", {
934+
highlight,
935+
toNodeId: this.getNode().getNodeId(),
936+
toPortId,
937+
fromNodeId,
938+
fromPortId,
939+
});
940+
};
941+
ctrlLink.addListener("mouseover", () => highlightEdgeUI(true));
942+
ctrlLink.addListener("mouseout", () => highlightEdgeUI(false));
931943

932944
const workbench = study.getWorkbench();
933945
const fromNode = workbench.getNode(fromNodeId);

services/static-webserver/client/source/class/osparc/info/StudyMedium.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ qx.Class.define("osparc.info.StudyMedium", {
162162
const title = this.tr("Study Information");
163163
const width = osparc.info.CardLarge.WIDTH;
164164
const height = osparc.info.CardLarge.HEIGHT;
165-
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height);
165+
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height).set({
166+
maxHeight: height
167+
});
166168
}
167169
}
168170
});

services/static-webserver/client/source/class/osparc/metadata/ServicesInStudy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ qx.Class.define("osparc.metadata.ServicesInStudy", {
150150
const title = this.tr("Service information");
151151
const width = osparc.info.CardLarge.WIDTH;
152152
const height = osparc.info.CardLarge.HEIGHT;
153-
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height);
153+
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height).set({
154+
maxHeight: height
155+
});
154156
}, this);
155157
this._servicesGrid.add(infoButton, {
156158
row: i,

services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", {
6363
const title = this.tr("Information");
6464
const width = osparc.info.CardLarge.WIDTH;
6565
const height = osparc.info.CardLarge.HEIGHT;
66-
osparc.ui.window.Window.popUpInWindow(widget, title, width, height);
66+
osparc.ui.window.Window.popUpInWindow(widget, title, width, height).set({
67+
maxHeight: height
68+
});
6769
});
6870
break;
6971
case "study-menu-download-logs":

services/static-webserver/client/source/class/osparc/node/slideshow/BaseNodeView.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ qx.Class.define("osparc.node.slideshow.BaseNodeView", {
225225
const title = this.tr("Service information");
226226
const width = osparc.info.CardLarge.WIDTH;
227227
const height = osparc.info.CardLarge.HEIGHT;
228-
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height);
228+
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height).set({
229+
maxHeight: height
230+
});
229231
},
230232

231233
__openInstructions: function() {

services/static-webserver/client/source/class/osparc/service/ServiceListItem.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ qx.Class.define("osparc.service.ServiceListItem", {
164164
const title = this.tr("Service information");
165165
const width = osparc.info.CardLarge.WIDTH;
166166
const height = osparc.info.CardLarge.HEIGHT;
167-
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height);
167+
osparc.ui.window.Window.popUpInWindow(serviceDetails, title, width, height).set({
168+
maxHeight: height
169+
});
168170
});
169171
},
170172

services/static-webserver/client/source/class/osparc/theme/Appearance.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,19 @@ qx.Theme.define("osparc.theme.Appearance", {
192192
WINDOW-SMALL-CAP CHOOSER
193193
---------------------------------------------------------------------------
194194
*/
195-
"window-small-cap": {
195+
"node-ui-cap": {
196196
include: "window", // get all the settings from window
197197
alias: "window", // redirect kids to window/kid
198198
style: function(states) {
199199
return {
200200
backgroundColor: states.selected ? "node-selected-background" : "node-background",
201201
textColor: states.selected ? "text-selected" : "text",
202-
decorator: states.maximized ? "window-small-cap-maximized" : "window-small-cap"
202+
decorator: states.maximized ? "node-ui-cap-maximized" : "node-ui-cap"
203203
};
204204
}
205205
},
206206

207-
"window-small-cap/captionbar": {
207+
"node-ui-cap/captionbar": {
208208
include: "window/captionbar", // load defaults from window captionbar
209209
alias: "window/captionbar", // redirect kids
210210
style: function(states) {
@@ -217,7 +217,7 @@ qx.Theme.define("osparc.theme.Appearance", {
217217
}
218218
},
219219

220-
"window-small-cap/title": {
220+
"node-ui-cap/title": {
221221
include: "window/title",
222222
style: function(states) {
223223
return {
@@ -228,7 +228,7 @@ qx.Theme.define("osparc.theme.Appearance", {
228228
}
229229
},
230230

231-
"window-small-cap/minimize-button": {
231+
"node-ui-cap/minimize-button": {
232232
alias: "window/minimize-button",
233233
include: "window/minimize-button",
234234
style: function(states) {
@@ -238,7 +238,7 @@ qx.Theme.define("osparc.theme.Appearance", {
238238
}
239239
},
240240

241-
"window-small-cap/restore-button": {
241+
"node-ui-cap/restore-button": {
242242
alias: "window/restore-button",
243243
include: "window/restore-button",
244244
style: function(states) {
@@ -248,7 +248,7 @@ qx.Theme.define("osparc.theme.Appearance", {
248248
}
249249
},
250250

251-
"window-small-cap/maximize-button": {
251+
"node-ui-cap/maximize-button": {
252252
alias: "window/maximize-button",
253253
include: "window/maximize-button",
254254
style: function(states) {
@@ -258,7 +258,7 @@ qx.Theme.define("osparc.theme.Appearance", {
258258
}
259259
},
260260

261-
"window-small-cap/close-button": {
261+
"node-ui-cap/close-button": {
262262
alias: "window/close-button",
263263
include: "window/close-button",
264264
style: function(states) {
@@ -268,7 +268,7 @@ qx.Theme.define("osparc.theme.Appearance", {
268268
}
269269
},
270270

271-
"window-small-cap/progress": "progressbar",
271+
"node-ui-cap/progress": "progressbar",
272272

273273
"service-window": {
274274
include: "window",

services/static-webserver/client/source/class/osparc/theme/ColorDark.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ qx.Theme.define("osparc.theme.ColorDark", {
6868
"window-caption-background-active": "background-main-3",
6969
"window-caption-text": "text",
7070
"window-caption-text-active": "c12",
71+
"window-border": "background-main-2",
72+
"window-border-inner": "background-main-1",
7173

7274
// material-button
7375
"material-button-background": "fab-background",
@@ -111,10 +113,6 @@ qx.Theme.define("osparc.theme.ColorDark", {
111113
"button-box-pressed": "background-main-4",
112114
"border-lead": "c07",
113115

114-
// window
115-
"window-border": "background-main-2",
116-
"window-border-inner": "background-main-1",
117-
118116
// group box
119117
"white-box-border": "background-main-2",
120118

@@ -172,7 +170,7 @@ qx.Theme.define("osparc.theme.ColorDark", {
172170
"workbench-start-hint": "#505050",
173171

174172
"node-background": "rgba(113, 157, 181, 0.5)",
175-
"node-selected-background": "background-selected",
173+
"node-selected-background": "strong-main",
176174
"node-title-text": "text-selected",
177175
"node-port-text": "#454545",
178176

0 commit comments

Comments
 (0)