Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,13 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
this.setMultiSelection(false);
});

const store = osparc.store.Store.getInstance();
store.addListener("changeTags", () => {
const tagsStore = osparc.store.Tags.getInstance();
tagsStore.addListener("tagsChanged", () => {
this.invalidateStudies();
this.__reloadStudies();
}, this);

const store = osparc.store.Store.getInstance();
store.addListener("studyStateChanged", e => {
const {
studyId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ qx.Class.define("osparc.form.tag.TagManager", {
if (!title) {
title = qx.locale.Manager.tr("Apply Tags");
}
return osparc.ui.window.Window.popUpInWindow(tagManager, title, 280, null).set({
return osparc.ui.window.Window.popUpInWindow(tagManager, title, 300, null).set({
allowMinimize: false,
allowMaximize: false,
showMinimize: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ qx.Class.define("osparc.info.StudyMedium", {
}, {
label: this.tr("ACCESS RIGHTS"),
view: osparc.info.StudyUtils.createAccessRights(this.getStudy())
}, {
label: this.tr("SHARED"),
view: osparc.info.StudyUtils.createShared(this.getStudy())
}, {
label: this.tr("CREATED"),
view: osparc.info.StudyUtils.createCreationDate(this.getStudy())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ qx.Class.define("osparc.info.StudyUtils", {
return accessRights;
},

/**
* @param study {osparc.data.model.Study} Study Model
*/
createShared: function(study) {
const isShared = new qx.ui.basic.Label();
const populateLabel = () => {
const nCollabs = Object.keys(study.getAccessRights()).length;
isShared.setValue(nCollabs === 1 ? qx.locale.Manager.tr("Not Shared") : "+" + String(nCollabs-1));
}
study.addListener("changeAccessRights", () => populateLabel());
populateLabel();
return isShared;
},

/**
* @param study {osparc.data.model.Study} Study Model
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ qx.Class.define("osparc.store.Tags", {
.then(accessRightsArray => {
const accessRights = {};
accessRightsArray.forEach(ar => accessRights[ar.gid] = ar);
tag.setAccessRights(accessRights)
tag.setAccessRights(accessRights);
})
.catch(err => console.error(err));
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ qx.Class.define("osparc.utils.Utils", {
if (control && control.getContentElement()) {
control.getContentElement().setAttribute("autocomplete", "off");
control.getContentElement().setAttribute("type", "search");
control.getContentElement().setAttribute("name", "osparc-nope1234");
}
},

Expand Down
Loading