diff --git a/services/static-webserver/client/source/class/osparc/dashboard/NewPlusMenu.js b/services/static-webserver/client/source/class/osparc/dashboard/NewPlusMenu.js index 7c122be856d4..401ce83446b8 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/NewPlusMenu.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/NewPlusMenu.js @@ -161,7 +161,9 @@ qx.Class.define("osparc.dashboard.NewPlusMenu", { __addItems: function() { this.__addUIConfigItems(); if (osparc.store.StaticInfo.getInstance().isDevFeaturesEnabled()) { - this.__addHypertools(); + if (osparc.product.Utils.isS4LProduct()) { + this.__addHypertools(); + } this.__addOtherTabsAccess(); } this.getChildControl("new-folder"); diff --git a/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js b/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js index d4bc4d3c1ec6..0d0f52669f03 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/ResourceDetails.js @@ -522,14 +522,8 @@ qx.Class.define("osparc.dashboard.ResourceDetails", { this.__addOpenButton(page); const lazyLoadContent = () => { - const commentsList = new osparc.info.CommentsList(resourceData["uuid"]); - page.addToContent(commentsList); - if (osparc.data.model.Study.canIWrite(resourceData["accessRights"])) { - const addComment = new osparc.info.CommentAdd(resourceData["uuid"]); - addComment.setPaddingLeft(10); - addComment.addListener("commentAdded", () => commentsList.fetchComments()); - page.addToFooter(addComment); - } + const conversations = new osparc.info.Conversations(resourceData); + page.addToContent(conversations); } page.addListenerOnce("appear", lazyLoadContent, this); @@ -545,23 +539,23 @@ qx.Class.define("osparc.dashboard.ResourceDetails", { const lazyLoadContent = () => { const resourceData = this.__resourceData; - let permissionsView = null; + let collaboratorsView = null; if (osparc.utils.Resources.isService(resourceData)) { - permissionsView = new osparc.share.CollaboratorsService(resourceData); - permissionsView.addListener("updateAccessRights", e => { + collaboratorsView = new osparc.share.CollaboratorsService(resourceData); + collaboratorsView.addListener("updateAccessRights", e => { const updatedData = e.getData(); if (osparc.utils.Resources.isService(resourceData)) { this.fireDataEvent("updateService", updatedData); } }, this); } else { - permissionsView = new osparc.share.CollaboratorsStudy(resourceData); + collaboratorsView = new osparc.share.CollaboratorsStudy(resourceData); if (osparc.utils.Resources.isStudy(resourceData)) { - permissionsView.getChildControl("study-link").show(); + collaboratorsView.getChildControl("study-link").show(); } else if (osparc.utils.Resources.isTemplate(resourceData)) { - permissionsView.getChildControl("template-link").show(); + collaboratorsView.getChildControl("template-link").show(); } - permissionsView.addListener("updateAccessRights", e => { + collaboratorsView.addListener("updateAccessRights", e => { const updatedData = e.getData(); if (osparc.utils.Resources.isStudy(resourceData)) { this.fireDataEvent("updateStudy", updatedData); @@ -570,7 +564,7 @@ qx.Class.define("osparc.dashboard.ResourceDetails", { } }, this); } - page.addToContent(permissionsView); + page.addToContent(collaboratorsView); } page.addListenerOnce("appear", lazyLoadContent, this); diff --git a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js index 3a8659316de6..ec9ef69314ec 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js @@ -417,10 +417,10 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", { __openShareWith: function() { const workspace = osparc.store.Workspaces.getInstance().getWorkspace(this.getCurrentWorkspaceId()); - const permissionsView = new osparc.share.CollaboratorsWorkspace(workspace); + const collaboratorsView = new osparc.share.CollaboratorsWorkspace(workspace); const title = this.tr("Share Workspace"); - const win = osparc.ui.window.Window.popUpInWindow(permissionsView, title, 500, 400); - permissionsView.addListener("updateAccessRights", () => { + const win = osparc.ui.window.Window.popUpInWindow(collaboratorsView, title, 500, 400); + collaboratorsView.addListener("updateAccessRights", () => { win.close(); this.__updateShareInfo(workspace.getAccessRights()); }, this); diff --git a/services/static-webserver/client/source/class/osparc/dashboard/WorkspaceButtonItem.js b/services/static-webserver/client/source/class/osparc/dashboard/WorkspaceButtonItem.js index d645d5799bc9..7d8fb3b5a951 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/WorkspaceButtonItem.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/WorkspaceButtonItem.js @@ -293,10 +293,10 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", { }, __openShareWith: function() { - const permissionsView = new osparc.share.CollaboratorsWorkspace(this.getWorkspace()); + const collaboratorsView = new osparc.share.CollaboratorsWorkspace(this.getWorkspace()); const title = this.tr("Share Workspace"); - osparc.ui.window.Window.popUpInWindow(permissionsView, title, 500, 400); - permissionsView.addListener("updateAccessRights", () => this.__applyAccessRights(this.getWorkspace().getAccessRights()), this); + osparc.ui.window.Window.popUpInWindow(collaboratorsView, title, 500, 400); + collaboratorsView.addListener("updateAccessRights", () => this.__applyAccessRights(this.getWorkspace().getAccessRights()), this); }, __trashWorkspaceRequested: function() { diff --git a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js index e10cc5f62fdd..184ec27633ce 100644 --- a/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js +++ b/services/static-webserver/client/source/class/osparc/desktop/WorkbenchView.js @@ -438,6 +438,19 @@ qx.Class.define("osparc.desktop.WorkbenchView", { this.__addTopBarSpacer(topBar); + if (osparc.utils.DisabledPlugins.isConversationEnabled()) { + const commentsButton = new qx.ui.form.Button().set({ + appearance: "form-button-outlined", + toolTipText: this.tr("Conversations"), + icon: "@FontAwesome5Solid/comments/16", + marginRight: 10, + marginTop: 7, + ...osparc.navigation.NavigationBar.BUTTON_OPTIONS + }); + commentsButton.addListener("execute", () => osparc.info.Conversations.popUpInWindow(study.serialize())); + topBar.add(commentsButton); + } + const startAppButtonTB = this.__startAppButtonTB = new qx.ui.form.Button().set({ appearance: "form-button-outlined", label: this.tr("App Mode"), diff --git a/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js b/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js index 0e1eda8fe462..4d3f31c15ee2 100644 --- a/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js +++ b/services/static-webserver/client/source/class/osparc/editor/AnnotationNoteCreator.js @@ -18,9 +18,11 @@ qx.Class.define("osparc.editor.AnnotationNoteCreator", { extend: qx.ui.core.Widget, - construct: function() { + construct: function(study) { this.base(arguments); + this.__study = study; + this._setLayout(new qx.ui.layout.VBox(10)); this.getChildControl("instructions"); @@ -86,16 +88,48 @@ qx.Class.define("osparc.editor.AnnotationNoteCreator", { control.addListener("execute", () => { const currentStudy = osparc.store.Store.getInstance().getCurrentStudy().serialize(); currentStudy["resourceType"] = "study"; - const collaboratorsManager = new osparc.share.NewCollaboratorsManager(currentStudy, false); - collaboratorsManager.setCaption("Recipient"); - collaboratorsManager.getActionButton().setLabel(this.tr("Add")); - collaboratorsManager.addListener("addCollaborators", e => { - const { - selectedGids, - } = e.getData(); - if (selectedGids) { - collaboratorsManager.close(); - this.__setRecipientGid(selectedGids[0]); + const recipientsManager = new osparc.share.NewCollaboratorsManager(currentStudy, false, false); + recipientsManager.setCaption("Recipient"); + recipientsManager.getActionButton().setLabel(this.tr("Add")); + recipientsManager.addListener("addCollaborators", e => { + const data = e.getData(); + const recipientGids = data["selectedGids"]; + + if (recipientGids && recipientGids.length) { + const recipientGid = parseInt(recipientGids[0]); + this.__setRecipientGid(recipientGid); + recipientsManager.close(); + + const currentAccessRights = this.__study.getAccessRights(); + const proposeSharing = []; + if (!(parseInt(recipientGid) in currentAccessRights)) { + proposeSharing.push(recipientGid); + } + if (proposeSharing.length) { + const collaboratorsManager = new osparc.share.NewCollaboratorsManager(currentStudy, false, true, proposeSharing); + collaboratorsManager.addListener("addCollaborators", ev => { + const { + selectedGids, + newAccessRights, + } = ev.getData(); + const newCollaborators = {}; + selectedGids.forEach(gid => { + newCollaborators[gid] = newAccessRights; + }); + const studyData = this.__study.serialize(); + osparc.store.Study.addCollaborators(studyData, newCollaborators) + .then(() => { + const potentialCollaborators = osparc.store.Groups.getInstance().getPotentialCollaborators() + selectedGids.forEach(gid => { + if (gid in potentialCollaborators && "getUserId" in potentialCollaborators[gid]) { + const uid = potentialCollaborators[gid].getUserId(); + osparc.notification.Notifications.postNewStudy(uid, studyData["uuid"]); + } + }); + }) + .finally(() => collaboratorsManager.close()); + }); + } } }, this); }, this); diff --git a/services/static-webserver/client/source/class/osparc/info/CommentUI.js b/services/static-webserver/client/source/class/osparc/info/CommentUI.js index cd1906854ab1..13ce7b204219 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentUI.js +++ b/services/static-webserver/client/source/class/osparc/info/CommentUI.js @@ -65,6 +65,7 @@ qx.Class.define("osparc.info.CommentUI", { control = new qx.ui.container.Composite(new qx.ui.layout.HBox(5).set({ alignX: this.__isMyComment() ? "right" : "left" })); + control.addAt(new qx.ui.basic.Label("-"), 1); this._add(control, { row: 0, column: 1 @@ -74,17 +75,17 @@ qx.Class.define("osparc.info.CommentUI", { control = new qx.ui.basic.Label().set({ font: "text-12" }); - this.getChildControl("header-layout").addAt(control, 0); + this.getChildControl("header-layout").addAt(control, this.__isMyComment() ? 2 : 0); break; case "last-updated": control = new qx.ui.basic.Label().set({ font: "text-12" }); - this.getChildControl("header-layout").addAt(control, 1); + this.getChildControl("header-layout").addAt(control, this.__isMyComment() ? 0 : 2); break; case "comment-content": control = new osparc.ui.markdown.Markdown().set({ - backgroundColor: "background-main-2", + // backgroundColor: "background-main-2", decorator: "rounded", noMargin: true, paddingLeft: 8, diff --git a/services/static-webserver/client/source/class/osparc/info/CommentsList.js b/services/static-webserver/client/source/class/osparc/info/Conversations.js similarity index 74% rename from services/static-webserver/client/source/class/osparc/info/CommentsList.js rename to services/static-webserver/client/source/class/osparc/info/Conversations.js index d0b605132c8a..afde3b7188ee 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentsList.js +++ b/services/static-webserver/client/source/class/osparc/info/Conversations.js @@ -16,16 +16,16 @@ ************************************************************************ */ -qx.Class.define("osparc.info.CommentsList", { +qx.Class.define("osparc.info.Conversations", { extend: qx.ui.core.Widget, /** - * @param studyId {String} Study Id + * @param studyData {String} Study Data */ - construct: function(studyId) { + construct: function(studyData) { this.base(arguments); - this.__studyId = studyId; + this.__studyData = studyData; this._setLayout(new qx.ui.layout.VBox(10)); @@ -34,7 +34,19 @@ qx.Class.define("osparc.info.CommentsList", { this.fetchComments(); }, + statics: { + popUpInWindow: function(studyData) { + const conversations = new osparc.info.Conversations(studyData); + const title = qx.locale.Manager.tr("Conversations"); + const viewWidth = 600; + const viewHeight = 700; + const win = osparc.ui.window.Window.popUpInWindow(conversations, title, viewWidth, viewHeight); + return win; + }, + }, + members: { + __studyData: null, __nextRequestParams: null, _createChildControlImpl: function(id) { @@ -50,13 +62,23 @@ qx.Class.define("osparc.info.CommentsList", { control = new qx.ui.container.Composite(new qx.ui.layout.VBox(5)).set({ alignY: "middle" }); - this._add(control); + this._add(control, { + flex: 1 + }); break; case "load-more-button": control = new osparc.ui.form.FetchButton(this.tr("Load more comments...")); control.addListener("execute", () => this.fetchComments(false)); this._add(control); break; + case "add-comment": + if (osparc.data.model.Study.canIWrite(this.__studyData["accessRights"])) { + control = new osparc.info.CommentAdd(this.__studyData["uuid"]); + control.setPaddingLeft(10); + control.addListener("commentAdded", () => this.fetchComments()); + this._add(control); + } + break; } return control || this.base(arguments, id); @@ -66,6 +88,7 @@ qx.Class.define("osparc.info.CommentsList", { this.getChildControl("title"); this.getChildControl("comments-list"); this.getChildControl("load-more-button"); + this.getChildControl("add-comment"); }, fetchComments: function(removeComments = true) { @@ -92,7 +115,7 @@ qx.Class.define("osparc.info.CommentsList", { __getNextRequest: function() { const params = { url: { - studyId: this.__studyId, + studyId: this.__studyData["uuid"], offset: 0, limit: 20 } diff --git a/services/static-webserver/client/source/class/osparc/info/ServiceLarge.js b/services/static-webserver/client/source/class/osparc/info/ServiceLarge.js index d0ab2cf36b14..39d85b590d98 100644 --- a/services/static-webserver/client/source/class/osparc/info/ServiceLarge.js +++ b/services/static-webserver/client/source/class/osparc/info/ServiceLarge.js @@ -505,8 +505,8 @@ qx.Class.define("osparc.info.ServiceLarge", { }, __openAccessRights: function() { - const permissionsView = osparc.info.ServiceUtils.openAccessRights(this.getService()); - permissionsView.addListener("updateAccessRights", e => { + const collaboratorsView = osparc.info.ServiceUtils.openAccessRights(this.getService()); + collaboratorsView.addListener("updateAccessRights", e => { const updatedServiceData = e.getData(); this.setService(updatedServiceData); this.fireDataEvent("updateService", updatedServiceData); diff --git a/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js b/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js index 7e4710bcbe21..790851ea0c5f 100644 --- a/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js +++ b/services/static-webserver/client/source/class/osparc/info/ServiceUtils.js @@ -367,10 +367,10 @@ qx.Class.define("osparc.info.ServiceUtils", { * @param serviceData {Object} Serialized Service Object */ openAccessRights: function(serviceData) { - const permissionsView = new osparc.share.CollaboratorsService(serviceData); + const collaboratorsView = new osparc.share.CollaboratorsService(serviceData); const title = qx.locale.Manager.tr("Share with Collaborators and Organizations"); - osparc.ui.window.Window.popUpInWindow(permissionsView, title, 400, 300); - return permissionsView; + osparc.ui.window.Window.popUpInWindow(collaboratorsView, title, 400, 300); + return collaboratorsView; }, /** diff --git a/services/static-webserver/client/source/class/osparc/info/StudyLarge.js b/services/static-webserver/client/source/class/osparc/info/StudyLarge.js index 069eb30a3e32..99beb3a09d12 100644 --- a/services/static-webserver/client/source/class/osparc/info/StudyLarge.js +++ b/services/static-webserver/client/source/class/osparc/info/StudyLarge.js @@ -226,8 +226,8 @@ qx.Class.define("osparc.info.StudyLarge", { __openAccessRights: function() { const studyData = this.getStudy().serialize(); studyData["resourceType"] = this.__isTemplate ? "template" : "study"; - const permissionsView = osparc.info.StudyUtils.openAccessRights(studyData); - permissionsView.addListener("updateAccessRights", e => { + const collaboratorsView = osparc.info.StudyUtils.openAccessRights(studyData); + collaboratorsView.addListener("updateAccessRights", e => { const updatedData = e.getData(); this.getStudy().setAccessRights(updatedData["accessRights"]); this.fireDataEvent("updateStudy", updatedData); diff --git a/services/static-webserver/client/source/class/osparc/jobs/RunsTableModel.js b/services/static-webserver/client/source/class/osparc/jobs/RunsTableModel.js index 3385b19c689d..cd75159534aa 100644 --- a/services/static-webserver/client/source/class/osparc/jobs/RunsTableModel.js +++ b/services/static-webserver/client/source/class/osparc/jobs/RunsTableModel.js @@ -50,6 +50,10 @@ qx.Class.define("osparc.jobs.RunsTableModel", { }, }, + statics: { + SERVER_MAX_LIMIT: 49, + }, + members: { // overridden _loadRowCount() { diff --git a/services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js b/services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js index 92fa0cf3f7f0..7e82df071034 100644 --- a/services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js +++ b/services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js @@ -75,6 +75,13 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", { }); control.addListener("execute", () => this.__reloadIFrame(), this); break; + case "study-menu-conversations": + control = new qx.ui.menu.Button().set({ + label: this.tr("Conversations"), + icon: "@FontAwesome5Solid/comments/12", + }); + control.addListener("execute", () => osparc.info.Conversations.popUpInWindow(this.getStudy().serialize()), this); + break; case "study-menu-convert-to-pipeline": control = new qx.ui.menu.Button().set({ label: this.tr("Convert to Pipeline"), @@ -103,6 +110,9 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", { optionsMenu.setAppearance("menu-wider"); optionsMenu.add(this.getChildControl("study-menu-info")); optionsMenu.add(this.getChildControl("study-menu-reload")); + if (osparc.utils.DisabledPlugins.isConversationEnabled()) { + optionsMenu.add(this.getChildControl("study-menu-conversations")); + } if (osparc.product.Utils.hasConvertToPipelineEnabled()) { optionsMenu.add(this.getChildControl("study-menu-convert-to-pipeline")); } @@ -151,6 +161,13 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", { converter: mode => mode === "standalone" ? "visible" : "excluded" }); + if (osparc.utils.DisabledPlugins.isConversationEnabled()) { + const conversationsButton = this.getChildControl("study-menu-conversations"); + study.getUi().bind("mode", conversationsButton, "visibility", { + converter: mode => mode === "standalone" ? "visible" : "excluded" + }); + } + if (osparc.product.Utils.hasConvertToPipelineEnabled()) { const convertToPipelineButton = this.getChildControl("study-menu-convert-to-pipeline"); study.getUi().bind("mode", convertToPipelineButton, "visibility", { diff --git a/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js b/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js index dfb66aaab493..aed7b56d89ce 100644 --- a/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js +++ b/services/static-webserver/client/source/class/osparc/share/NewCollaboratorsManager.js @@ -8,7 +8,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { extend: osparc.ui.window.SingletonWindow, - construct: function(resourceData, showOrganizations = true) { + construct: function(resourceData, showOrganizations = true, showAccessRights = true, preselectCollaboratorGids = []) { this.base(arguments, "newCollaboratorsManager", this.tr("New collaborators")); this.set({ @@ -26,6 +26,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { this.__resourceData = resourceData; this.__showOrganizations = showOrganizations; + this.__showAccessRights = showAccessRights; this.__renderLayout(); @@ -38,6 +39,16 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { this.__shareWithEmailEnabled = osparc.utils.DisabledPlugins.isShareWithEmailEnabled(); } + if (preselectCollaboratorGids && preselectCollaboratorGids.length) { + preselectCollaboratorGids.forEach(preselectCollaboratorGid => { + const potentialCollaboratorList = this.getChildControl("potential-collaborators-list"); + const found = potentialCollaboratorList.getChildren().find(c => "groupId" in c && c["groupId"] === preselectCollaboratorGid) + if (found) { + found.setValue(true); + } + }); + } + this.center(); this.open(); }, @@ -50,6 +61,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { members: { __resourceData: null, __showOrganizations: null, + __showAccessRights: null, __searchDelayer: null, __selectedCollaborators: null, __potentialCollaborators: null, @@ -192,7 +204,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { this.getChildControl("potential-collaborators-list"); this.getChildControl("searching-collaborators"); - if (this.__resourceData["resourceType"] === "study") { + if (this.__resourceData["resourceType"] === "study" && this.__showAccessRights) { const selectBox = this.getChildControl("access-rights-selector"); const helper = this.getChildControl("access-rights-helper"); @@ -261,14 +273,7 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { collaboratorButton.addListener("changeValue", e => { const selected = e.getData(); - if (selected) { - this.__selectedCollaborators[collaborator.getGroupId()] = collaborator; - collaboratorButton.unsubscribeToFilterGroup("collaboratorsManager"); - } else if (collaborator.getGroupId() in this.__selectedCollaborators) { - delete this.__selectedCollaborators[collaborator.getGroupId()]; - collaboratorButton.subscribeToFilterGroup("collaboratorsManager"); - } - this.getChildControl("share-button").setEnabled(Boolean(Object.keys(this.__selectedCollaborators).length)); + this.__collaboratorSelected(selected, collaborator.getGroupId(), collaborator, collaboratorButton); }, this); return collaboratorButton; }, @@ -289,18 +294,22 @@ qx.Class.define("osparc.share.NewCollaboratorsManager", { collaboratorButton.addListener("changeValue", e => { const selected = e.getData(); - if (selected) { - this.__selectedCollaborators[collaborator.getEmail()] = collaborator; - collaboratorButton.unsubscribeToFilterGroup("collaboratorsManager"); - } else if (collaborator.getEmail() in this.__selectedCollaborators) { - delete this.__selectedCollaborators[collaborator.getEmail()]; - collaboratorButton.subscribeToFilterGroup("collaboratorsManager"); - } - this.getChildControl("share-button").setEnabled(Boolean(Object.keys(this.__selectedCollaborators).length)); + this.__collaboratorSelected(selected, collaborator.getEmail(), collaborator, collaboratorButton); }, this); return collaboratorButton; }, + __collaboratorSelected: function(selected, collaboratorGidOrEmail, collaborator, collaboratorButton) { + if (selected) { + this.__selectedCollaborators[collaboratorGidOrEmail] = collaborator; + collaboratorButton.unsubscribeToFilterGroup("collaboratorsManager"); + } else if (collaborator.getGroupId() in this.__selectedCollaborators) { + delete this.__selectedCollaborators[collaboratorGidOrEmail]; + collaboratorButton.subscribeToFilterGroup("collaboratorsManager"); + } + this.getChildControl("share-button").setEnabled(Boolean(Object.keys(this.__selectedCollaborators).length)); + }, + __addPotentialCollaborators: function(foundCollaborators = []) { const potentialCollaborators = Object.values(this.__potentialCollaborators).concat(foundCollaborators); const potentialCollaboratorList = this.getChildControl("potential-collaborators-list"); diff --git a/services/static-webserver/client/source/class/osparc/utils/DisabledPlugins.js b/services/static-webserver/client/source/class/osparc/utils/DisabledPlugins.js index 20bd1416678a..225e775f047b 100644 --- a/services/static-webserver/client/source/class/osparc/utils/DisabledPlugins.js +++ b/services/static-webserver/client/source/class/osparc/utils/DisabledPlugins.js @@ -67,6 +67,10 @@ qx.Class.define("osparc.utils.DisabledPlugins", { return false; }, + isConversationEnabled: function() { + return osparc.store.StaticInfo.getInstance().isDevFeaturesEnabled(); + }, + __isPluginDisabled: function(key) { const statics = osparc.store.Store.getInstance().get("statics"); if (statics) { diff --git a/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js b/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js index ec3f146fef3e..a9b633ed0086 100644 --- a/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js +++ b/services/static-webserver/client/source/class/osparc/workbench/WorkbenchUI.js @@ -1927,7 +1927,7 @@ qx.Class.define("osparc.workbench.WorkbenchUI", { serializeData.attributes = initPos; } if (type === "note") { - const noteEditor = new osparc.editor.AnnotationNoteCreator(); + const noteEditor = new osparc.editor.AnnotationNoteCreator(this.getStudy()); const win = osparc.editor.AnnotationNoteCreator.popUpInWindow(noteEditor); noteEditor.addListener("addNote", () => { const gid = noteEditor.getRecipientGid(); diff --git a/services/static-webserver/client/source/translation/en.po b/services/static-webserver/client/source/translation/en.po index c0f9cf224b73..76c5ed443d31 100644 --- a/services/static-webserver/client/source/translation/en.po +++ b/services/static-webserver/client/source/translation/en.po @@ -2174,19 +2174,19 @@ msgstr "" msgid "No Tiers found" msgstr "" -#: osparc/info/CommentsList.js +#: osparc/info/Conversations.js msgid "0 Comments" msgstr "" -#: osparc/info/CommentsList.js +#: osparc/info/Conversations.js msgid "Load more comments..." msgstr "" -#: osparc/info/CommentsList.js +#: osparc/info/Conversations.js msgid "1 Comment" msgstr "" -#: osparc/info/CommentsList.js +#: osparc/info/Conversations.js msgid " Comments" msgstr ""