Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ qx.Class.define("osparc.dashboard.Dashboard", {
construct: function() {
this.base(arguments);

this.getChildControl("bar").set({
visibility: "excluded",
});
osparc.utils.Utils.setIdToWidget(this.getChildControl("bar"), "dashboardTabs");
osparc.utils.Utils.setIdToWidget(this, "dashboard");

this.set({
contentPadding: this.self().PADDING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
const dateBy = this.getChildControl("date-by");
dateBy.set({
date: value,
toolTipText: this.tr("Moved to the bin"),
toolTipText: this.tr("Deleted"),
});
}
},
Expand Down Expand Up @@ -302,7 +302,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {

menu.addSeparator();

const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
const trashButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
trashButton.addListener("execute", () => this.fireDataEvent("trashFolderRequested", this.getFolderId()), this);
menu.add(trashButton);
} else if (studyBrowserContext === "trash") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
const dateBy = this.getChildControl("date-by");
dateBy.set({
date: value,
toolTipText: this.tr("Moved to the bin"),
toolTipText: this.tr("Deleted"),
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
const dateBy = this.getChildControl("date-by");
dateBy.set({
date: value,
toolTipText: this.tr("Moved to the bin"),
toolTipText: this.tr("Deleted"),
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", {

osparc.utils.Utils.prettifyMenu(this);

this.getContentElement().setStyles({
"border-color": qx.theme.manager.Color.getInstance().resolve("strong-main"),
});

this.set({
position: "bottom-left",
spacingX: 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
case "study": {
this._add(this.__createWorkspacesAndFoldersTree());
this._add(this.__createTrashBin());
this._add(this.__createResourceTypeContextButtons());
// this._add(this.__createResourceTypeContextButtons());
this._add(filtersSpacer);
const scrollView = new qx.ui.container.Scroll();
scrollView.add(this.__createTagsFilterLayout());
Expand All @@ -67,7 +67,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
break;
}
case "template": {
this._add(this.__createResourceTypeContextButtons());
// this._add(this.__createResourceTypeContextButtons());
this._add(filtersSpacer);
this._add(this.__createSharedWithFilterLayout());
const scrollView = new qx.ui.container.Scroll();
Expand All @@ -78,7 +78,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
break;
}
case "service":
this._add(this.__createResourceTypeContextButtons());
// this._add(this.__createResourceTypeContextButtons());
this._add(filtersSpacer);
this._add(this.__createSharedWithFilterLayout());
this._add(this.__createServiceTypeFilterLayout());
Expand Down Expand Up @@ -124,7 +124,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
const trashButton = this.__trashButton = new qx.ui.toolbar.RadioButton().set({
value: false,
appearance: "filter-toggle-button",
label: this.tr("Bin"),
label: this.tr("Recently Deleted"),
icon: "@FontAwesome5Solid/trash-alt/16",
paddingLeft: 10, // align it with the context
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
osparc.store.Workspaces.getInstance().trashWorkspace(workspaceId)
.then(() => {
this.__reloadWorkspaces();
const msg = this.tr("Successfully moved to Bin");
const msg = this.tr("Successfully deleted");
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
this._resourceFilter.setTrashEmpty(false);
})
Expand Down Expand Up @@ -614,7 +614,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
osparc.store.Folders.getInstance().trashFolder(folderId, this.getCurrentWorkspaceId())
.then(() => {
this.__reloadFolders();
const msg = this.tr("Successfully moved to Bin");
const msg = this.tr("Successfully deleted");
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
this._resourceFilter.setTrashEmpty(false);
})
Expand All @@ -626,11 +626,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {

_trashFolderRequested: function(folderId) {
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
let msg = this.tr("Are you sure you want to move the Folder and all its content to the Bin?");
let msg = this.tr("Are you sure you want to delete the Folder and all its content?");
msg += "<br><br>" + this.tr("It will be permanently deleted after ") + trashDays + " days.";
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
caption: this.tr("Move to Bin"),
confirmText: this.tr("Move to Bin"),
caption: this.tr("Delete"),
confirmText: this.tr("Delete"),
confirmAction: "warning",
});
confirmationWin.center();
Expand Down Expand Up @@ -1124,7 +1124,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {

studiesTrashButton.set({
visibility: selection.length && currentContext === "studiesAndFolders" ? "visible" : "excluded",
label: this.tr("Move to Bin") + (selection.length > 1 ? ` (${selection.length})` : ""),
label: this.tr("Delete") + (selection.length > 1 ? ` (${selection.length})` : ""),
});

studiesDeleteButton.set({
Expand Down Expand Up @@ -1388,7 +1388,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
},

__createTrashStudiesButton: function() {
const trashButton = new qx.ui.form.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/14").set({
const trashButton = new qx.ui.form.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/14").set({
appearance: "warning-button",
visibility: "excluded"
});
Expand Down Expand Up @@ -1648,11 +1648,13 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
const duplicateStudyButton = this.__getDuplicateMenuButton(studyData);
menu.add(duplicateStudyButton);

const convertToPipelineButton = this.__getConvertToPipelineMenuButton(studyData);
menu.add(convertToPipelineButton);
if (osparc.product.Utils.hasConvertToPipelineEnabled()) {
const convertToPipelineButton = this.__getConvertToPipelineMenuButton(studyData);
menu.add(convertToPipelineButton);
}

if (osparc.product.Utils.isProduct("osparc")) {
const exportStudyButton = this.__getExportMenuButton(studyData);
if (osparc.product.Utils.hasExportCMisEnabled()) {
const exportStudyButton = this.__getExportCMisMenuButton(studyData);
menu.add(exportStudyButton);
}

Expand Down Expand Up @@ -1886,7 +1888,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
.then(() => this._updateStudyData(studyData))
},

__getExportMenuButton: function(studyData) {
__getExportCMisMenuButton: function(studyData) {
const exportButton = new qx.ui.menu.Button(this.tr("Export cMIS"), "@FontAwesome5Solid/cloud-download-alt/12");
exportButton["exportCMISButton"] = true;
const isDisabled = osparc.utils.DisabledPlugins.isExportDisabled();
Expand Down Expand Up @@ -1936,7 +1938,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
},

__getTrashStudyMenuButton: function(studyData) {
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
const trashButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
trashButton["trashButton"] = true;
trashButton.set({
appearance: "menu-button"
Expand Down Expand Up @@ -2137,7 +2139,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
osparc.store.Store.getInstance().trashStudy(studyData.uuid)
.then(() => {
this.__removeFromStudyList(studyData.uuid);
const msg = this.tr("Successfully moved to Bin");
const msg = this.tr("Successfully deleted");
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
this._resourceFilter.setTrashEmpty(false);
})
Expand Down Expand Up @@ -2190,19 +2192,18 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
},

__createConfirmTrashWindow: function(studyNames) {
let msg = this.tr("Are you sure you want to move");
let msg = this.tr("Are you sure you want to delete");
if (studyNames.length > 1) {
const studiesText = osparc.product.Utils.getStudyAlias({plural: true});
msg += ` ${studyNames.length} ${studiesText} `
} else {
msg += ` '${studyNames[0]}' `;
}
msg += this.tr("to the Bin?");
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
msg += "<br><br>" + (studyNames.length > 1 ? "They" : "It") + this.tr(` will be permanently deleted after ${trashDays} days.`);
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
caption: this.tr("Move to Bin"),
confirmText: this.tr("Move to Bin"),
caption: this.tr("Delete"),
confirmText: this.tr("Delete"),
confirmAction: "warning",
});
osparc.utils.Utils.setIdToWidget(confirmationWin.getConfirmButton(), "confirmDeleteStudyBtn");
Expand Down Expand Up @@ -2234,7 +2235,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
},

__createConfirmEmptyTrashWindow: function() {
const msg = this.tr("Items in the bin will be permanently deleted");
const msg = this.tr("All items will be permanently deleted");
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
caption: this.tr("Delete"),
confirmText: this.tr("Delete permanently"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
break;
}
case "empty-trash-button": {
control = new qx.ui.form.Button(this.tr("Empty Bin"), "@FontAwesome5Solid/trash/14").set({
control = new qx.ui.form.Button(this.tr("Delete all"), "@FontAwesome5Solid/trash/14").set({
appearance: "danger-button",
allowGrowY: false,
alignY: "middle",
Expand Down Expand Up @@ -276,10 +276,10 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
break;
case "trash": {
this.__setIcon("@FontAwesome5Solid/trash/20");
title.setValue(this.tr("Bin"));
title.setValue(this.tr("Recently Deleted"));
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
description.set({
value: this.tr(`Items in the Bin will be permanently deleted after ${trashDays} days.`),
value: this.tr(`Items here will be permanently deleted after ${trashDays} days.`),
visibility: "visible",
});
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {

menu.addSeparator();

const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
const trashButton = new qx.ui.menu.Button(this.tr("Delete"), "@FontAwesome5Solid/trash/12");
trashButton.addListener("execute", () => this.__trashWorkspaceRequested(), this);
menu.add(trashButton);
} else if (studyBrowserContext === "trash") {
Expand Down Expand Up @@ -263,7 +263,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
const dateBy = this.getChildControl("date-by");
dateBy.set({
date: value,
toolTipText: this.tr("Moved to the bin"),
toolTipText: this.tr("Deleted"),
});
}
},
Expand Down Expand Up @@ -300,11 +300,11 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {

__trashWorkspaceRequested: function() {
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
let msg = this.tr("Are you sure you want to move the Workspace and all its content to the Bin?");
let msg = this.tr("Are you sure you want to delete the Workspace and all its content?");
msg += "<br><br>" + this.tr("It will be permanently deleted after ") + trashDays + " days.";
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
caption: this.tr("Move to Bin"),
confirmText: this.tr("Move to Bin"),
caption: this.tr("Delete"),
confirmText: this.tr("Delete"),
confirmAction: "delete"
});
confirmationWin.center();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ qx.Class.define("osparc.desktop.MainPage", {
const navBar = this.__navBar = new osparc.navigation.NavigationBar();
navBar.populateLayout();
navBar.addListener("backToDashboardPressed", () => this.__backToDashboardPressed(), this);
navBar.addListener("downloadStudyLogs", () => this.__downloadStudyLogs(), this);
navBar.addListener("openLogger", () => this.__openLogger(), this);
this._add(navBar);

// Some resources request before building the main stack
Expand Down Expand Up @@ -171,9 +171,9 @@ qx.Class.define("osparc.desktop.MainPage", {
}
},

__downloadStudyLogs: function() {
__openLogger: function() {
if (this.__studyEditor) {
this.__studyEditor.getStudyLogger().downloadLogs();
osparc.ui.window.Window.popUpInWindow(this.__studyEditor.getStudyLogger(), this.tr("Platform logger"), 950, 650);
}
},

Expand All @@ -199,6 +199,11 @@ qx.Class.define("osparc.desktop.MainPage", {

__createDashboardLayout: function() {
const dashboard = this.__dashboard = new osparc.dashboard.Dashboard();
const tabsBar = dashboard.getChildControl("bar");
tabsBar.set({
paddingBottom: 6
});
this.__navBar.addDashboardTabButtons(tabsBar);
const dashboardLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
dashboardLayout.add(dashboard, {
flex: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {

events: {
"backToDashboardPressed": "qx.event.type.Event",
"downloadStudyLogs": "qx.event.type.Event"
"openLogger": "qx.event.type.Event"
},

properties: {
Expand Down Expand Up @@ -200,7 +200,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {
break;
case "study-title-options":
control = new osparc.navigation.StudyTitleWOptions();
control.addListener("downloadStudyLogs", () => this.fireEvent("downloadStudyLogs"));
control.addListener("openLogger", () => this.fireEvent("openLogger"));
this.getChildControl("left-items").add(control);
break;
case "read-only-info": {
Expand Down Expand Up @@ -324,6 +324,15 @@ qx.Class.define("osparc.navigation.NavigationBar", {
return registerButton;
},

addDashboardTabButtons: function(tabButtons) {
this.__tabButtons = tabButtons;
this.getChildControl("center-items").add(tabButtons);
this.bind("study", this.__tabButtons, "visibility", {
converter: s => s ? "excluded" : "visible"
});
this.__navBarResized();
},

__applyStudy: function(study) {
const readOnlyInfo = this.getChildControl("read-only-info")
if (study) {
Expand Down
Loading
Loading