From 998addb7221cc77f6e6af4e802d20c2c85e464a9 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Fri, 16 Mar 2018 15:49:31 +0100 Subject: [PATCH 01/21] Documents in a folder should be shared with its group by default - front ok --- .../createcollabdoc/js/createcollabdoc.js | 12 ++++++++++++ .../oae-core/createlink/js/createlink.js | 13 +++++++++++++ .../setpermissions/bundles/default.properties | 3 +++ .../setpermissions/js/setpermissions.js | 2 ++ .../setpermissions/setpermissions.html | 19 +++++++++++++++++++ node_modules/oae-core/upload/js/upload.js | 13 +++++++++++++ shared/oae/bundles/ui/default.properties | 2 ++ shared/oae/css/oae.components.css | 14 ++++++++++++++ 8 files changed, 78 insertions(+) diff --git a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js index 593704ca40e..d78ead41e71 100644 --- a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js +++ b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js @@ -24,6 +24,8 @@ define(['jquery', 'oae.core'], function ($, oae) { var managers = []; // Variable that keeps track of the folders to add this document to var folders = []; + // Variable that keeps track of the folder visibility + var folderVisibility = null; // Variable that keeps track of the selected visibility for the document to create var visibility = null; @@ -110,6 +112,11 @@ define(['jquery', 'oae.core'], function ($, oae) { // Update visibility for document visibility = data.visibility; + // Update visibility folder + if (data.selectedFolderItems[0]) { + folderVisibility = data.selectedFolderItems[0].visibility; + } + managers = _.pluck(data.selectedPrincipalItems, 'shareId'); folders = _.pluck(data.selectedFolderItems, 'id'); @@ -155,6 +162,11 @@ define(['jquery', 'oae.core'], function ($, oae) { var displayName = $.trim($('#createcollabdoc-name', $rootel).val()); + // If the visibility collabdoc is 'inherit', the collabdoc will inherit the folder visibility + if (visibility === 'inherit') { + visibility = folderVisibility; + } + oae.api.content.createCollabDoc(displayName, '', visibility, managers, [], [], folders, function (err, data) { // If the creation succeeded, redirect to the document if (!err) { diff --git a/node_modules/oae-core/createlink/js/createlink.js b/node_modules/oae-core/createlink/js/createlink.js index 4edf1b663a4..f5ea6761a42 100644 --- a/node_modules/oae-core/createlink/js/createlink.js +++ b/node_modules/oae-core/createlink/js/createlink.js @@ -32,6 +32,9 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Variable that keeps track of the selected visibility for the files to upload var visibility = null; + + // Variable that keeps track of the folder visibility + var folderVisibility = null; // Generate a widget ID for the new instance of the `setpermissions` widget. This widget ID // will be used in the event communication between this widget and the `setpermissions` widget. @@ -307,6 +310,11 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Update visibility for links visibility = data.visibility; + // Update visibility folder + if (data.selectedFolderItems[0]) { + folderVisibility = data.selectedFolderItems[0].visibility; + } + // Update the members of the added links $.each(addedLinks, function(index, link) { link.viewers = _.chain(data.selectedPrincipalItems) @@ -405,6 +413,11 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Show the creating animation and add focus to it so the browser scrolls $spinner.removeClass('hide').focus(); + // If the visibility collabdoc is 'inherit', the collabdoc will inherit the folder visibility + if (visibility === 'inherit') { + visibility = folderVisibility; + } + oae.api.content.createLink(link.displayName, link.description, visibility, link.link, [], link.viewers, link.folders, function(error, data) { $spinner.addClass('hide'); if (!error) { diff --git a/node_modules/oae-core/setpermissions/bundles/default.properties b/node_modules/oae-core/setpermissions/bundles/default.properties index 453ac67f07c..b433827a7a7 100644 --- a/node_modules/oae-core/setpermissions/bundles/default.properties +++ b/node_modules/oae-core/setpermissions/bundles/default.properties @@ -119,12 +119,15 @@ PERMISSIONS_LINK_CONTEXT1_SHARE_5+_PLURAL = These links will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. PERMISSIONS_LINK_CONTEXT1_SINGULAR = This link will be added to ${context1}. SHARE_WITH = Share with +VISIBILITY_CONTENT_INHERIT_PLURAL = It will inherit privacy of the folder. +VISIBILITY_CONTENT_INHERIT_SINGULAR = It will inherit privacy of the folder. VISIBILITY_CONTENT_LOGGEDIN_PLURAL = They can be found, seen and re-used by all people in ${tenant}. VISIBILITY_CONTENT_LOGGEDIN_SINGULAR = It can be found, seen and re-used by all people in ${tenant}. VISIBILITY_CONTENT_PRIVATE_PLURAL = They will be private and only visible to the people and groups you share them with. VISIBILITY_CONTENT_PRIVATE_SINGULAR = It will be private and only visible to the people and groups you share it with. VISIBILITY_CONTENT_PUBLIC_PLURAL = They will be public and can be found, seen and re-used by anyone. VISIBILITY_CONTENT_PUBLIC_SINGULAR = It will be public and can be found, seen and re-used by anyone. +VISIBILITY_DISCUSSION_INHERIT_SINGULAR = It will inherit privacy of the folder. VISIBILITY_DISCUSSION_LOGGEDIN_SINGULAR = It can be found, seen and posted into by all people in ${tenant}. VISIBILITY_DISCUSSION_PRIVATE_SINGULAR = It will be private and only visible to the people and groups you share it with. VISIBILITY_DISCUSSION_PUBLIC_SINGULAR = It will be public and can be found and seen by anyone. All logged in users will be able to post to the discussion. diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index bcf96ebe526..43e2ded4176 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -85,6 +85,8 @@ define(['jquery', 'oae.core'], function($, oae) { // the list of context names to display if (pageContext.id !== oae.data.me.id) { selectedContextNames.push(pageContext.displayName); + // Replace the name of the folder by descriptif text + the name of the folder + $('#as-selection-0001 > span').text(oae.api.i18n.translate('__MSG__MEMBERS_OF_FOLDER__') + ' ' + pageContext.displayName); } // Compile the list of users and groups the item is being shared with excluding diff --git a/node_modules/oae-core/setpermissions/setpermissions.html b/node_modules/oae-core/setpermissions/setpermissions.html index e39765f1510..01aa1737400 100644 --- a/node_modules/oae-core/setpermissions/setpermissions.html +++ b/node_modules/oae-core/setpermissions/setpermissions.html @@ -13,6 +13,15 @@

__MSG__VISIBILITY__

__MSG__PRIVATE__ + {if preFill[1]} +
+ +
+ {/if}
diff --git a/node_modules/oae-core/upload/js/upload.js b/node_modules/oae-core/upload/js/upload.js index aa9c69a1dbb..73fbb813cda 100644 --- a/node_modules/oae-core/upload/js/upload.js +++ b/node_modules/oae-core/upload/js/upload.js @@ -31,6 +31,9 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Variable that keeps track of the selected visibility for the files to upload var visibility = null; + // Variable that keeps track of the folder visibility + var folderVisibility = null; + // Generate a widget ID for the new instance of the `setpermissions` widget. This widget ID // will be used in the event communication between this widget and the `setpermissions` widget. var setPermissionsId = oae.api.util.generateId(); @@ -327,6 +330,11 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Update visibility for files visibility = data.visibility; + // Update visibility folder + if (data.selectedFolderItems[0]) { + folderVisibility = data.selectedFolderItems[0].visibility; + } + // Update the members of the selected files $.each(selectedFiles, function(index, file) { file.viewers = _.chain(data.selectedPrincipalItems) @@ -504,6 +512,11 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Show the uploading animation and add focus to it so the browser scrolls $spinner.removeClass('hide').focus(); + // If the visibility collabdoc is 'inherit', the collabdoc will inherit the folder visibility + if (visibility === 'inherit') { + visibility = folderVisibility; + } + oae.api.content.createFile(file.displayName, file.description, visibility, $('#upload-input', $rootel), file.file, [], file.viewers, file.folders, function(error, data) { $spinner.addClass('hide'); if (!error) { diff --git a/shared/oae/bundles/ui/default.properties b/shared/oae/bundles/ui/default.properties index a8b7056e63d..a1cff5ae790 100644 --- a/shared/oae/bundles/ui/default.properties +++ b/shared/oae/bundles/ui/default.properties @@ -476,6 +476,7 @@ HOST_COLON = Host: HTML_DOCUMENT = HTML document IMAGE = Image IMMEDIATE = Immediate +INHERIT = Inherit folder visibility INTERNAL_API = Internal API INVALID_USERNAME_OR_PASSWORD = Invalid username or password INVITATIONS_FAILED = Invitations failed. @@ -536,6 +537,7 @@ MEETING_PRIVATE_DESCRIPTION = The meeting is private and only visible to the use MEETING_PUBLIC_DESCRIPTION = The meeting is public and can be found and seen by anyone MEMBER = Member MEMBERS = Members +MEMBERS_OF_FOLDER = Members of MEMBERS_ONLY = Members only MY_DISCUSSIONS = My discussions MY_GROUPS = My groups diff --git a/shared/oae/css/oae.components.css b/shared/oae/css/oae.components.css index f460ea38383..63f07f86f9a 100644 --- a/shared/oae/css/oae.components.css +++ b/shared/oae/css/oae.components.css @@ -172,11 +172,13 @@ div.oae-hr > span:after { * in the system. The available visibility privacy options are `private`, `loggedin` and * `public`. * e.g. __MSG__PRIVATE__ + * __MSG__INHERIT__ * __MSG__LOGGED_IN__ * __MSG__PUBLIC__ * * Large icons can be rendered by adding the `large` class to the icon. * e.g. __MSG__PRIVATE__ + * __MSG____MSG__INHERIT____ * __MSG__LOGGED_IN__ * __MSG__PUBLIC__ * @@ -186,6 +188,7 @@ div.oae-hr > span:after { */ i.fa-oae-private, +i.fa-oae-inherit, i.fa-oae-loggedin, i.fa-oae-public { font-size: 18px; @@ -194,6 +197,7 @@ i.fa-oae-public { } i.fa-oae-private:before, +i.fa-oae-inherit:before, i.fa-oae-loggedin:before, i.fa-oae-public:before { border-radius: 500px; @@ -212,6 +216,12 @@ i.fa-oae-private:before { content: "\f023"; } +i.fa-oae-inherit:before { + background-color: #FFA3F4; + content: "\f07c"; + padding-left: 2px; +} + i.fa-oae-loggedin:before { background-color: #C4E6FF; content: "\f041"; @@ -237,6 +247,10 @@ i.fa.large:before { width: 60px; } +i.fa.large.fa-oae-inherit:before { + padding-left: 6px; +} + /******************* ** LARGE OPTIONS ** From e5c9b20cbf24e5e0538e2f6dee53f63fe297bfaf Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Fri, 16 Mar 2018 16:17:00 +0100 Subject: [PATCH 02/21] Documents in a folder should be shared with its group by default - bundles modification --- node_modules/oae-core/setpermissions/bundles/default.properties | 1 + node_modules/oae-core/setpermissions/setpermissions.html | 1 + 2 files changed, 2 insertions(+) diff --git a/node_modules/oae-core/setpermissions/bundles/default.properties b/node_modules/oae-core/setpermissions/bundles/default.properties index b433827a7a7..464be0191ab 100644 --- a/node_modules/oae-core/setpermissions/bundles/default.properties +++ b/node_modules/oae-core/setpermissions/bundles/default.properties @@ -119,6 +119,7 @@ PERMISSIONS_LINK_CONTEXT1_SHARE_5+_PLURAL = These links will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. PERMISSIONS_LINK_CONTEXT1_SINGULAR = This link will be added to ${context1}. SHARE_WITH = Share with +SHARE_WITH_MEMBERS_OF_FOLDER = All the members of ${context2} will have rights on it. VISIBILITY_CONTENT_INHERIT_PLURAL = It will inherit privacy of the folder. VISIBILITY_CONTENT_INHERIT_SINGULAR = It will inherit privacy of the folder. VISIBILITY_CONTENT_LOGGEDIN_PLURAL = They can be found, seen and re-used by all people in ${tenant}. diff --git a/node_modules/oae-core/setpermissions/setpermissions.html b/node_modules/oae-core/setpermissions/setpermissions.html index 01aa1737400..ae591e3d5c1 100644 --- a/node_modules/oae-core/setpermissions/setpermissions.html +++ b/node_modules/oae-core/setpermissions/setpermissions.html @@ -437,6 +437,7 @@

__MSG__SHARE_WITH__

{/if} {/if} {/if} + __MSG__SHARE_WITH_MEMBERS_OF_FOLDER__
From bcb0ccf21dd8d852df3bc686080c36f3f718b259 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 22 Mar 2018 14:38:13 +0100 Subject: [PATCH 03/21] Documents in a folder should be shared with its group by default - add folder members on permission input --- .../setpermissions/js/setpermissions.js | 58 +++++++++++++++---- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 43e2ded4176..57bbfec6ea5 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -58,8 +58,10 @@ define(['jquery', 'oae.core'], function($, oae) { /** * Trigger an event when changes have been made to the visibility settings + * + * @param [Object] folderMembers The folder members */ - var savePermissionsChange = function() { + var savePermissionsChange = function(folderMembers) { // Get the items in the share with list var selection = oae.api.util.autoSuggest().getSelection($rootel); @@ -81,6 +83,15 @@ define(['jquery', 'oae.core'], function($, oae) { selectedContextNames.push(getLibraryi18n(widgetData.type)); } + // Compile the list of users and groups the item is being shared with excluding + // the current user and the current page context, as those are being presented + // separately in the summary + var selectedOutsideContext = _.filter(selectedPrincipalItems, function(selectedPrincipalItem) { + return (selectedPrincipalItem.id !== oae.data.me.id && selectedPrincipalItem.id !== pageContext.id); + }); + + selectedOutsideContext.concat(folderMembers); + // The item is always shared with the current context, so ensure it is high priority in // the list of context names to display if (pageContext.id !== oae.data.me.id) { @@ -89,13 +100,6 @@ define(['jquery', 'oae.core'], function($, oae) { $('#as-selection-0001 > span').text(oae.api.i18n.translate('__MSG__MEMBERS_OF_FOLDER__') + ' ' + pageContext.displayName); } - // Compile the list of users and groups the item is being shared with excluding - // the current user and the current page context, as those are being presented - // separately in the summary - var selectedOutsideContext = _.filter(selectedPrincipalItems, function(selectedPrincipalItem) { - return (selectedPrincipalItem.id !== oae.data.me.id && selectedPrincipalItem.id !== pageContext.id); - }); - // Get the selected visibility setting var visibility = $('#setpermissions-container input[type="radio"]:checked', $rootel).val(); @@ -117,12 +121,36 @@ define(['jquery', 'oae.core'], function($, oae) { }); }; + /** + * Get the members of the folder if the resource is inside of a folder + * + * @param {String} folderId The folder id + * @param {Function} callback Standard callback function + */ + var getFolderMembers = function(folderId, callback) { + + if (oae.data.me.id === folderId) { + return callback(null, []); + } + + oae.api.folder.getMembers(folderId, null, null, function(err, members) { + if (err) { + return callback(err); + }; + return callback(null, _.map(members.results, function(member) { return member.profile; })); + }); + }; + /** * Initialize the autosuggest used for sharing with other users or groups * + * @param [Object] folderMembers The folder members * @param {Function} callback Standard callback function */ - var setUpAutoSuggest = function(callback) { + var setUpAutoSuggest = function(folderMembers, callback) { + + widgetData.preFill = widgetData.preFill.concat(folderMembers); + oae.api.util.autoSuggest().setup($('#setpermissions-share', $rootel), { 'allowEmail': true, 'ghosts': widgetData.ghosts, @@ -143,8 +171,16 @@ define(['jquery', 'oae.core'], function($, oae) { // Trigger and bind an event that will ask for the page context $(document).on('oae.context.send.setpermissions.' + uid, function(ev, data) { pageContext = data; - // Immediately pass the default permissions summary back to the widget caller - setUpAutoSuggest(savePermissionsChange); + + // If the resource is inside of a folder, get the folder members to add them to the resource + getFolderMembers(pageContext.id, function(err, folderMembers) { + if (err) { + return err; + } + + // Immediately pass the default permissions summary back to the widget caller + setUpAutoSuggest(folderMembers, savePermissionsChange(folderMembers)); + }); }); $(document).trigger('oae.context.get', 'setpermissions.' + uid); }; From 7b5a331de75883357fb5a0fd309284ced8375d6c Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 22 Mar 2018 14:42:55 +0100 Subject: [PATCH 04/21] Documents in a folder should be shared with its group by default - remove useless line --- node_modules/oae-core/setpermissions/js/setpermissions.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 57bbfec6ea5..d91d063b22b 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -96,8 +96,6 @@ define(['jquery', 'oae.core'], function($, oae) { // the list of context names to display if (pageContext.id !== oae.data.me.id) { selectedContextNames.push(pageContext.displayName); - // Replace the name of the folder by descriptif text + the name of the folder - $('#as-selection-0001 > span').text(oae.api.i18n.translate('__MSG__MEMBERS_OF_FOLDER__') + ' ' + pageContext.displayName); } // Get the selected visibility setting From 702c80e62adeb518bb409c22e23837fed72af35d Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Tue, 27 Mar 2018 15:55:05 +0200 Subject: [PATCH 05/21] Documents in a folder should be shared with its group by default - remove inherit visibility --- .../createcollabdoc/js/createcollabdoc.js | 12 ----------- .../oae-core/createlink/js/createlink.js | 13 ------------ .../setpermissions/bundles/default.properties | 4 ---- .../setpermissions/js/setpermissions.js | 6 +++++- .../setpermissions/setpermissions.html | 20 ------------------- node_modules/oae-core/upload/js/upload.js | 13 ------------ shared/oae/bundles/ui/default.properties | 2 -- shared/oae/css/oae.components.css | 13 ------------ 8 files changed, 5 insertions(+), 78 deletions(-) diff --git a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js index d78ead41e71..593704ca40e 100644 --- a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js +++ b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js @@ -24,8 +24,6 @@ define(['jquery', 'oae.core'], function ($, oae) { var managers = []; // Variable that keeps track of the folders to add this document to var folders = []; - // Variable that keeps track of the folder visibility - var folderVisibility = null; // Variable that keeps track of the selected visibility for the document to create var visibility = null; @@ -112,11 +110,6 @@ define(['jquery', 'oae.core'], function ($, oae) { // Update visibility for document visibility = data.visibility; - // Update visibility folder - if (data.selectedFolderItems[0]) { - folderVisibility = data.selectedFolderItems[0].visibility; - } - managers = _.pluck(data.selectedPrincipalItems, 'shareId'); folders = _.pluck(data.selectedFolderItems, 'id'); @@ -162,11 +155,6 @@ define(['jquery', 'oae.core'], function ($, oae) { var displayName = $.trim($('#createcollabdoc-name', $rootel).val()); - // If the visibility collabdoc is 'inherit', the collabdoc will inherit the folder visibility - if (visibility === 'inherit') { - visibility = folderVisibility; - } - oae.api.content.createCollabDoc(displayName, '', visibility, managers, [], [], folders, function (err, data) { // If the creation succeeded, redirect to the document if (!err) { diff --git a/node_modules/oae-core/createlink/js/createlink.js b/node_modules/oae-core/createlink/js/createlink.js index f5ea6761a42..4edf1b663a4 100644 --- a/node_modules/oae-core/createlink/js/createlink.js +++ b/node_modules/oae-core/createlink/js/createlink.js @@ -32,9 +32,6 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Variable that keeps track of the selected visibility for the files to upload var visibility = null; - - // Variable that keeps track of the folder visibility - var folderVisibility = null; // Generate a widget ID for the new instance of the `setpermissions` widget. This widget ID // will be used in the event communication between this widget and the `setpermissions` widget. @@ -310,11 +307,6 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Update visibility for links visibility = data.visibility; - // Update visibility folder - if (data.selectedFolderItems[0]) { - folderVisibility = data.selectedFolderItems[0].visibility; - } - // Update the members of the added links $.each(addedLinks, function(index, link) { link.viewers = _.chain(data.selectedPrincipalItems) @@ -413,11 +405,6 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Show the creating animation and add focus to it so the browser scrolls $spinner.removeClass('hide').focus(); - // If the visibility collabdoc is 'inherit', the collabdoc will inherit the folder visibility - if (visibility === 'inherit') { - visibility = folderVisibility; - } - oae.api.content.createLink(link.displayName, link.description, visibility, link.link, [], link.viewers, link.folders, function(error, data) { $spinner.addClass('hide'); if (!error) { diff --git a/node_modules/oae-core/setpermissions/bundles/default.properties b/node_modules/oae-core/setpermissions/bundles/default.properties index 464be0191ab..453ac67f07c 100644 --- a/node_modules/oae-core/setpermissions/bundles/default.properties +++ b/node_modules/oae-core/setpermissions/bundles/default.properties @@ -119,16 +119,12 @@ PERMISSIONS_LINK_CONTEXT1_SHARE_5+_PLURAL = These links will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. PERMISSIONS_LINK_CONTEXT1_SINGULAR = This link will be added to ${context1}. SHARE_WITH = Share with -SHARE_WITH_MEMBERS_OF_FOLDER = All the members of ${context2} will have rights on it. -VISIBILITY_CONTENT_INHERIT_PLURAL = It will inherit privacy of the folder. -VISIBILITY_CONTENT_INHERIT_SINGULAR = It will inherit privacy of the folder. VISIBILITY_CONTENT_LOGGEDIN_PLURAL = They can be found, seen and re-used by all people in ${tenant}. VISIBILITY_CONTENT_LOGGEDIN_SINGULAR = It can be found, seen and re-used by all people in ${tenant}. VISIBILITY_CONTENT_PRIVATE_PLURAL = They will be private and only visible to the people and groups you share them with. VISIBILITY_CONTENT_PRIVATE_SINGULAR = It will be private and only visible to the people and groups you share it with. VISIBILITY_CONTENT_PUBLIC_PLURAL = They will be public and can be found, seen and re-used by anyone. VISIBILITY_CONTENT_PUBLIC_SINGULAR = It will be public and can be found, seen and re-used by anyone. -VISIBILITY_DISCUSSION_INHERIT_SINGULAR = It will inherit privacy of the folder. VISIBILITY_DISCUSSION_LOGGEDIN_SINGULAR = It can be found, seen and posted into by all people in ${tenant}. VISIBILITY_DISCUSSION_PRIVATE_SINGULAR = It will be private and only visible to the people and groups you share it with. VISIBILITY_DISCUSSION_PUBLIC_SINGULAR = It will be public and can be found and seen by anyone. All logged in users will be able to post to the discussion. diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index d91d063b22b..83a7afe67b0 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -135,7 +135,11 @@ define(['jquery', 'oae.core'], function($, oae) { if (err) { return callback(err); }; - return callback(null, _.map(members.results, function(member) { return member.profile; })); + + var membersProfile = _.map(members.results, function(member) { return member.profile; }); + membersProfile = _.reject(membersProfile, function(profile) { return profile.id === oae.data.me.id; }); + + return callback(null, membersProfile); }); }; diff --git a/node_modules/oae-core/setpermissions/setpermissions.html b/node_modules/oae-core/setpermissions/setpermissions.html index ae591e3d5c1..e39765f1510 100644 --- a/node_modules/oae-core/setpermissions/setpermissions.html +++ b/node_modules/oae-core/setpermissions/setpermissions.html @@ -13,15 +13,6 @@

__MSG__VISIBILITY__

__MSG__PRIVATE__
- {if preFill[1]} -
- -
- {/if}
diff --git a/node_modules/oae-core/upload/js/upload.js b/node_modules/oae-core/upload/js/upload.js index 73fbb813cda..99a1f723f7e 100644 --- a/node_modules/oae-core/upload/js/upload.js +++ b/node_modules/oae-core/upload/js/upload.js @@ -31,9 +31,6 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Variable that keeps track of the selected visibility for the files to upload var visibility = null; - // Variable that keeps track of the folder visibility - var folderVisibility = null; - // Generate a widget ID for the new instance of the `setpermissions` widget. This widget ID // will be used in the event communication between this widget and the `setpermissions` widget. var setPermissionsId = oae.api.util.generateId(); @@ -330,11 +327,6 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Update visibility for files visibility = data.visibility; - // Update visibility folder - if (data.selectedFolderItems[0]) { - folderVisibility = data.selectedFolderItems[0].visibility; - } - // Update the members of the selected files $.each(selectedFiles, function(index, file) { file.viewers = _.chain(data.selectedPrincipalItems) @@ -511,11 +503,6 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Show the uploading animation and add focus to it so the browser scrolls $spinner.removeClass('hide').focus(); - - // If the visibility collabdoc is 'inherit', the collabdoc will inherit the folder visibility - if (visibility === 'inherit') { - visibility = folderVisibility; - } oae.api.content.createFile(file.displayName, file.description, visibility, $('#upload-input', $rootel), file.file, [], file.viewers, file.folders, function(error, data) { $spinner.addClass('hide'); diff --git a/shared/oae/bundles/ui/default.properties b/shared/oae/bundles/ui/default.properties index a1cff5ae790..a8b7056e63d 100644 --- a/shared/oae/bundles/ui/default.properties +++ b/shared/oae/bundles/ui/default.properties @@ -476,7 +476,6 @@ HOST_COLON = Host: HTML_DOCUMENT = HTML document IMAGE = Image IMMEDIATE = Immediate -INHERIT = Inherit folder visibility INTERNAL_API = Internal API INVALID_USERNAME_OR_PASSWORD = Invalid username or password INVITATIONS_FAILED = Invitations failed. @@ -537,7 +536,6 @@ MEETING_PRIVATE_DESCRIPTION = The meeting is private and only visible to the use MEETING_PUBLIC_DESCRIPTION = The meeting is public and can be found and seen by anyone MEMBER = Member MEMBERS = Members -MEMBERS_OF_FOLDER = Members of MEMBERS_ONLY = Members only MY_DISCUSSIONS = My discussions MY_GROUPS = My groups diff --git a/shared/oae/css/oae.components.css b/shared/oae/css/oae.components.css index 63f07f86f9a..e3d4f126aac 100644 --- a/shared/oae/css/oae.components.css +++ b/shared/oae/css/oae.components.css @@ -172,13 +172,11 @@ div.oae-hr > span:after { * in the system. The available visibility privacy options are `private`, `loggedin` and * `public`. * e.g. __MSG__PRIVATE__ - * __MSG__INHERIT__ * __MSG__LOGGED_IN__ * __MSG__PUBLIC__ * * Large icons can be rendered by adding the `large` class to the icon. * e.g. __MSG__PRIVATE__ - * __MSG____MSG__INHERIT____ * __MSG__LOGGED_IN__ * __MSG__PUBLIC__ * @@ -188,7 +186,6 @@ div.oae-hr > span:after { */ i.fa-oae-private, -i.fa-oae-inherit, i.fa-oae-loggedin, i.fa-oae-public { font-size: 18px; @@ -197,7 +194,6 @@ i.fa-oae-public { } i.fa-oae-private:before, -i.fa-oae-inherit:before, i.fa-oae-loggedin:before, i.fa-oae-public:before { border-radius: 500px; @@ -216,12 +212,6 @@ i.fa-oae-private:before { content: "\f023"; } -i.fa-oae-inherit:before { - background-color: #FFA3F4; - content: "\f07c"; - padding-left: 2px; -} - i.fa-oae-loggedin:before { background-color: #C4E6FF; content: "\f041"; @@ -247,9 +237,6 @@ i.fa.large:before { width: 60px; } -i.fa.large.fa-oae-inherit:before { - padding-left: 6px; -} /******************* From e405571a6bceb215e2161ef31d104b61fbba171f Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Tue, 27 Mar 2018 16:00:11 +0200 Subject: [PATCH 06/21] Documents in a folder should be shared with its group by default - remove inherit visibility --- node_modules/oae-core/upload/js/upload.js | 2 +- shared/oae/css/oae.components.css | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/node_modules/oae-core/upload/js/upload.js b/node_modules/oae-core/upload/js/upload.js index 99a1f723f7e..aa9c69a1dbb 100644 --- a/node_modules/oae-core/upload/js/upload.js +++ b/node_modules/oae-core/upload/js/upload.js @@ -503,7 +503,7 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Show the uploading animation and add focus to it so the browser scrolls $spinner.removeClass('hide').focus(); - + oae.api.content.createFile(file.displayName, file.description, visibility, $('#upload-input', $rootel), file.file, [], file.viewers, file.folders, function(error, data) { $spinner.addClass('hide'); if (!error) { diff --git a/shared/oae/css/oae.components.css b/shared/oae/css/oae.components.css index e3d4f126aac..f460ea38383 100644 --- a/shared/oae/css/oae.components.css +++ b/shared/oae/css/oae.components.css @@ -238,7 +238,6 @@ i.fa.large:before { } - /******************* ** LARGE OPTIONS ** *******************/ From 39f2b5412783d963d4be62f0e2b35f9029869a69 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Wed, 28 Mar 2018 09:43:21 +0200 Subject: [PATCH 07/21] Documents in a folder should be shared with its group by default - remove error --- .../setpermissions/js/setpermissions.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 83a7afe67b0..735c7f86192 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -35,6 +35,9 @@ define(['jquery', 'oae.core'], function($, oae) { // user/group that the item will be shared with var pageContext = null; + // List of members of the current file + var folderMembers = []; + /** * Translate and returns the i18n key associated to personal library that will be the target of the item being added * @@ -58,10 +61,8 @@ define(['jquery', 'oae.core'], function($, oae) { /** * Trigger an event when changes have been made to the visibility settings - * - * @param [Object] folderMembers The folder members */ - var savePermissionsChange = function(folderMembers) { + var savePermissionsChange = function() { // Get the items in the share with list var selection = oae.api.util.autoSuggest().getSelection($rootel); @@ -137,19 +138,18 @@ define(['jquery', 'oae.core'], function($, oae) { }; var membersProfile = _.map(members.results, function(member) { return member.profile; }); - membersProfile = _.reject(membersProfile, function(profile) { return profile.id === oae.data.me.id; }); + folderMembers = _.reject(membersProfile, function(profile) { return profile.id === oae.data.me.id; }); - return callback(null, membersProfile); + return callback(); }); }; /** * Initialize the autosuggest used for sharing with other users or groups * - * @param [Object] folderMembers The folder members * @param {Function} callback Standard callback function */ - var setUpAutoSuggest = function(folderMembers, callback) { + var setUpAutoSuggest = function(callback) { widgetData.preFill = widgetData.preFill.concat(folderMembers); @@ -175,13 +175,13 @@ define(['jquery', 'oae.core'], function($, oae) { pageContext = data; // If the resource is inside of a folder, get the folder members to add them to the resource - getFolderMembers(pageContext.id, function(err, folderMembers) { + getFolderMembers(pageContext.id, function(err) { if (err) { return err; } // Immediately pass the default permissions summary back to the widget caller - setUpAutoSuggest(folderMembers, savePermissionsChange(folderMembers)); + setUpAutoSuggest(savePermissionsChange); }); }); $(document).trigger('oae.context.get', 'setpermissions.' + uid); From bc3f9527b8730a5c675c241cf9aae99a5af8c685 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 5 Apr 2018 13:54:08 +0200 Subject: [PATCH 08/21] Documents in a folder should be shared with its group by default - user are now editor on a collabdoc --- .../oae-core/createcollabdoc/js/createcollabdoc.js | 9 +++++++-- .../oae-core/setpermissions/js/setpermissions.js | 6 ++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js index 593704ca40e..3b6c88a8979 100644 --- a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js +++ b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js @@ -22,6 +22,7 @@ define(['jquery', 'oae.core'], function ($, oae) { // Variable that keeps track of the people and groups to share this document with var managers = []; + var editors = []; // Variable that keeps track of the folders to add this document to var folders = []; @@ -110,7 +111,11 @@ define(['jquery', 'oae.core'], function ($, oae) { // Update visibility for document visibility = data.visibility; - managers = _.pluck(data.selectedPrincipalItems, 'shareId'); + managers = [oae.data.me.id]; + editors = _.chain(data.selectedPrincipalItems) + .reject(function(member) { return member.id === oae.data.me.id; }) + .pluck('id') + .value(); folders = _.pluck(data.selectedFolderItems, 'id'); // Add the permissions summary @@ -155,7 +160,7 @@ define(['jquery', 'oae.core'], function ($, oae) { var displayName = $.trim($('#createcollabdoc-name', $rootel).val()); - oae.api.content.createCollabDoc(displayName, '', visibility, managers, [], [], folders, function (err, data) { + oae.api.content.createCollabDoc(displayName, '', visibility, managers, editors, [], folders, function (err, data) { // If the creation succeeded, redirect to the document if (!err) { window.location = data.profilePath; diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 735c7f86192..af193fa2bb6 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -137,8 +137,10 @@ define(['jquery', 'oae.core'], function($, oae) { return callback(err); }; - var membersProfile = _.map(members.results, function(member) { return member.profile; }); - folderMembers = _.reject(membersProfile, function(profile) { return profile.id === oae.data.me.id; }); + folderMembers = _.chain(members.results) + .map(function(member) { return member.profile; }) + .reject(function(member) { return member.id === oae.data.me.id; }) + .value(); return callback(); }); From 0d1da488a00de44b393493192f7a0f30bea23542 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 5 Apr 2018 14:29:57 +0200 Subject: [PATCH 09/21] Documents in a folder should be shared with its group by default - move a function --- .../oae-core/setpermissions/js/setpermissions.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index af193fa2bb6..effc5e465c0 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -84,6 +84,12 @@ define(['jquery', 'oae.core'], function($, oae) { selectedContextNames.push(getLibraryi18n(widgetData.type)); } + // The item is always shared with the current context, so ensure it is high priority in + // the list of context names to display + if (pageContext.id !== oae.data.me.id) { + selectedContextNames.push(pageContext.displayName); + } + // Compile the list of users and groups the item is being shared with excluding // the current user and the current page context, as those are being presented // separately in the summary @@ -93,12 +99,6 @@ define(['jquery', 'oae.core'], function($, oae) { selectedOutsideContext.concat(folderMembers); - // The item is always shared with the current context, so ensure it is high priority in - // the list of context names to display - if (pageContext.id !== oae.data.me.id) { - selectedContextNames.push(pageContext.displayName); - } - // Get the selected visibility setting var visibility = $('#setpermissions-container input[type="radio"]:checked', $rootel).val(); From 6f0f541689ca3984952901d78a69e5e655ecdecf Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 5 Apr 2018 16:04:27 +0200 Subject: [PATCH 10/21] Documents in a folder should be shared with its group by default - unworking code --- .../oae-core/setpermissions/js/setpermissions.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index effc5e465c0..4fc73468076 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -35,9 +35,6 @@ define(['jquery', 'oae.core'], function($, oae) { // user/group that the item will be shared with var pageContext = null; - // List of members of the current file - var folderMembers = []; - /** * Translate and returns the i18n key associated to personal library that will be the target of the item being added * @@ -62,7 +59,7 @@ define(['jquery', 'oae.core'], function($, oae) { /** * Trigger an event when changes have been made to the visibility settings */ - var savePermissionsChange = function() { + var savePermissionsChange = function(folderMembers) { // Get the items in the share with list var selection = oae.api.util.autoSuggest().getSelection($rootel); @@ -142,7 +139,7 @@ define(['jquery', 'oae.core'], function($, oae) { .reject(function(member) { return member.id === oae.data.me.id; }) .value(); - return callback(); + return callback(null, folderMembers); }); }; @@ -151,7 +148,7 @@ define(['jquery', 'oae.core'], function($, oae) { * * @param {Function} callback Standard callback function */ - var setUpAutoSuggest = function(callback) { + var setUpAutoSuggest = function(folderMembers, callback) { widgetData.preFill = widgetData.preFill.concat(folderMembers); @@ -177,13 +174,13 @@ define(['jquery', 'oae.core'], function($, oae) { pageContext = data; // If the resource is inside of a folder, get the folder members to add them to the resource - getFolderMembers(pageContext.id, function(err) { + getFolderMembers(pageContext.id, function(err, folderMembers) { if (err) { return err; } // Immediately pass the default permissions summary back to the widget caller - setUpAutoSuggest(savePermissionsChange); + setUpAutoSuggest(folderMembers, savePermissionsChange(folderMembers)); }); }); $(document).trigger('oae.context.get', 'setpermissions.' + uid); From 374d64bc6fe43e415a6ec45ab0b464a40a8ab756 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Mon, 9 Apr 2018 16:06:58 +0200 Subject: [PATCH 11/21] Documents in a folder should be shared with its group by default - It works --- .../setpermissions/js/setpermissions.js | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 4fc73468076..6500f84a192 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -59,7 +59,7 @@ define(['jquery', 'oae.core'], function($, oae) { /** * Trigger an event when changes have been made to the visibility settings */ - var savePermissionsChange = function(folderMembers) { + var savePermissionsChange = function(folderMembers, callback) { // Get the items in the share with list var selection = oae.api.util.autoSuggest().getSelection($rootel); @@ -115,6 +115,10 @@ define(['jquery', 'oae.core'], function($, oae) { 'summary': summary, 'visibility': visibility }); + + if (callback) { + return callback(); + } }; /** @@ -129,12 +133,14 @@ define(['jquery', 'oae.core'], function($, oae) { return callback(null, []); } + // Get all members of the folder oae.api.folder.getMembers(folderId, null, null, function(err, members) { if (err) { return callback(err); }; - folderMembers = _.chain(members.results) + // Get out the creator of this resource because he will get right manager anyway + var folderMembers = _.chain(members.results) .map(function(member) { return member.profile; }) .reject(function(member) { return member.id === oae.data.me.id; }) .value(); @@ -180,13 +186,19 @@ define(['jquery', 'oae.core'], function($, oae) { } // Immediately pass the default permissions summary back to the widget caller - setUpAutoSuggest(folderMembers, savePermissionsChange(folderMembers)); + setUpAutoSuggest(folderMembers, function(err) { + if (err) { + return err; + } + + savePermissionsChange(folderMembers); + }); }); }); + $(document).trigger('oae.context.get', 'setpermissions.' + uid); }; setUpSetPermissionsModal(); - }; }); From 3e6bb3c8b4b65413716d8d25c0e8603fc8be4293 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 14 Jun 2018 11:36:35 +0200 Subject: [PATCH 12/21] not ok --- .../createcollabdoc/createcollabdoc.html | 4 +- .../createcollabdoc/js/createcollabdoc.js | 38 +- .../creatediscussion/creatediscussion.html | 2 +- .../creatediscussion/js/creatediscussion.js | 25 +- .../oae-core/createfolder/createfolder.html | 2 +- .../oae-core/createfolder/js/createfolder.js | 31 +- .../oae-core/createlink/createlink.html | 2 +- .../oae-core/createlink/js/createlink.js | 25 +- .../setpermissions/bundles/default.properties | 139 +---- .../setpermissions/css/setpermissions.css | 64 ++ .../setpermissions/js/setpermissions.js | 521 +++++++++++++--- .../setpermissions/setpermissions.html | 558 +++++------------- node_modules/oae-core/upload/js/upload.js | 27 +- node_modules/oae-core/upload/upload.html | 2 +- 14 files changed, 759 insertions(+), 681 deletions(-) diff --git a/node_modules/oae-core/createcollabdoc/createcollabdoc.html b/node_modules/oae-core/createcollabdoc/createcollabdoc.html index 8dbe4770845..fed08305926 100644 --- a/node_modules/oae-core/createcollabdoc/createcollabdoc.html +++ b/node_modules/oae-core/createcollabdoc/createcollabdoc.html @@ -18,10 +18,12 @@

__MSG__CREATE_DOCUMENT__

-
+
+
+ -
+
diff --git a/node_modules/oae-core/creatediscussion/js/creatediscussion.js b/node_modules/oae-core/creatediscussion/js/creatediscussion.js index 4fd01af3b0c..e0b54417639 100644 --- a/node_modules/oae-core/creatediscussion/js/creatediscussion.js +++ b/node_modules/oae-core/creatediscussion/js/creatediscussion.js @@ -102,14 +102,23 @@ define(['jquery', 'oae.core'], function ($, oae) { // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for discussion - visibility = data.visibility; + if (data.visibility) { + visibility = data.visibility; + } - members = _.chain(data.selectedPrincipalItems) - .filter(function(selectedPrincipalItem) { - return (selectedPrincipalItem.id !== oae.data.me.id); - }) - .pluck('shareId') - .value(); + // Update members of the document + if (data.members) { + managers = []; + members = []; + + _.each(data.members, function(role, id) { + if (role === 'manager') { + managers.push(id); + } else { + members.push(id) + } + }); + } // Add the permissions summary $('#creatediscussion-permissions', $rootel).html(data.summary); @@ -154,7 +163,7 @@ define(['jquery', 'oae.core'], function ($, oae) { var displayName = $.trim($('#creatediscussion-name', $rootel).val()); var discussionTopic = $.trim($('#creatediscussion-topic', $rootel).val()); - oae.api.discussion.createDiscussion(displayName, discussionTopic, visibility, [], members, function (err, data) { + oae.api.discussion.createDiscussion(displayName, discussionTopic, visibility, managers, members, function (err, data) { // If the creation succeeded, redirect to the discussion profile if (!err) { window.location = data.profilePath; diff --git a/node_modules/oae-core/createfolder/createfolder.html b/node_modules/oae-core/createfolder/createfolder.html index 57199774ba0..dfc3c4e865b 100644 --- a/node_modules/oae-core/createfolder/createfolder.html +++ b/node_modules/oae-core/createfolder/createfolder.html @@ -18,7 +18,7 @@

__MSG__CREATE_FOLDER__

-
+
diff --git a/node_modules/oae-core/createfolder/js/createfolder.js b/node_modules/oae-core/createfolder/js/createfolder.js index a39983e6b97..3f69a7d11c3 100644 --- a/node_modules/oae-core/createfolder/js/createfolder.js +++ b/node_modules/oae-core/createfolder/js/createfolder.js @@ -104,25 +104,22 @@ define(['jquery', 'oae.core'], function ($, oae) { // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for folder - visibility = data.visibility; - - managers = [contextData.id]; - members = []; - - _.each(data.selectedPrincipalItems, function(selectedPrincipalItem) { - // Since we've already added the current context as a manager, ignore it as - // a selected item. We only consider other items (the current user, if - // applicable, or any other added principal) - if (selectedPrincipalItem.id !== contextData.id) { - if (selectedPrincipalItem.id === oae.data.me.id) { - // Add the current user as a manager if selected - managers.push(oae.data.me.id); + if (data.visibility) { + visibility = data.visibility; + } + + if (data.members) { + managers = []; + members = []; + + _.each(data.members, function(role, id) { + if (role === 'manager') { + managers.push(id); } else { - // Add all other items as members - members.push(selectedPrincipalItem.shareId); + members.push(id) } - } - }); + }); + } // Add the permissions summary $('#createfolder-permissions', $rootel).html(data.summary); diff --git a/node_modules/oae-core/createlink/createlink.html b/node_modules/oae-core/createlink/createlink.html index 2ea092e6bf6..e2092d7a405 100644 --- a/node_modules/oae-core/createlink/createlink.html +++ b/node_modules/oae-core/createlink/createlink.html @@ -18,7 +18,7 @@ diff --git a/node_modules/oae-core/createlink/js/createlink.js b/node_modules/oae-core/createlink/js/createlink.js index 4edf1b663a4..9d245119ba6 100644 --- a/node_modules/oae-core/createlink/js/createlink.js +++ b/node_modules/oae-core/createlink/js/createlink.js @@ -305,17 +305,26 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for links - visibility = data.visibility; + if (data.visibility) { + visibility = data.visibility; + } // Update the members of the added links $.each(addedLinks, function(index, link) { - link.viewers = _.chain(data.selectedPrincipalItems) - .filter(function(selectedPrincipalItem){ - return (selectedPrincipalItem.id !== oae.data.me.id); - }) - .pluck('shareId') - .value(); - link.folders = _.pluck(data.selectedFolderItems, 'id'); + link.managers = []; + link.viewers = []; + + _.each(data.members, function(role, id) { + if (role === 'manager') { + link.managers.push(id); + } else { + link.viewers.push(id) + } + }); + + if (data.selectedFolderItems) { + link.folders = data.selectedFolderItems; + } }); // Add the permissions summary diff --git a/node_modules/oae-core/setpermissions/bundles/default.properties b/node_modules/oae-core/setpermissions/bundles/default.properties index 453ac67f07c..355b61b0bd7 100644 --- a/node_modules/oae-core/setpermissions/bundles/default.properties +++ b/node_modules/oae-core/setpermissions/bundles/default.properties @@ -1,131 +1,10 @@ -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_PLURAL = These discussions will be added to ${context1} and ${context2}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_1_PLURAL = These discussions will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_1_SINGULAR = This discussion will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_2_PLURAL = These discussions will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_2_SINGULAR = This discussion will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_3_PLURAL = These discussions will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_3_SINGULAR = This discussion will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_4_PLURAL = These discussions will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_4_SINGULAR = This discussion will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_5+_PLURAL = These discussions will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SHARE_5+_SINGULAR = This discussion will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DISCUSSION_CONTEXT1_CONTEXT2_SINGULAR = This discussion will be added to ${context1} and ${context2}. -PERMISSIONS_DISCUSSION_CONTEXT1_PLURAL = These discussions will be added to ${context1}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_1_PLURAL = These discussions will be added to ${context1} and shared with ${share1}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_1_SINGULAR = This discussion will be added to ${context1} and shared with ${share1}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_2_PLURAL = These discussions will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_2_SINGULAR = This discussion will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_3_PLURAL = These discussions will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_3_SINGULAR = This discussion will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_4_PLURAL = These discussions will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_4_SINGULAR = This discussion will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_5+_PLURAL = These discussions will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DISCUSSION_CONTEXT1_SHARE_5+_SINGULAR = This discussion will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DISCUSSION_CONTEXT1_SINGULAR = This discussion will be added to ${context1}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_PLURAL = These documents will be added to ${context1} and ${context2}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_1_PLURAL = These documents will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_1_SINGULAR = This document will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_2_PLURAL = These documents will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_2_SINGULAR = This document will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_3_PLURAL = These documents will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_3_SINGULAR = This document will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_4_PLURAL = These documents will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_4_SINGULAR = This document will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_5+_PLURAL = These documents will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SHARE_5+_SINGULAR = This document will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DOCUMENT_CONTEXT1_CONTEXT2_SINGULAR = This document will be added to ${context1} and ${context2}. -PERMISSIONS_DOCUMENT_CONTEXT1_PLURAL = These documents will be added to ${context1}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_1_PLURAL = These documents will be added to ${context1} and shared with ${share1}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_1_SINGULAR = This document will be added to ${context1} and shared with ${share1}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_2_PLURAL = These documents will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_2_SINGULAR = This document will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_3_PLURAL = These documents will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_3_SINGULAR = This document will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_4_PLURAL = These documents will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_4_SINGULAR = This document will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_5+_PLURAL = These documents will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DOCUMENT_CONTEXT1_SHARE_5+_SINGULAR = This document will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_DOCUMENT_CONTEXT1_SINGULAR = This document will be added to ${context1}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_PLURAL = These files will be added to ${context1} and ${context2}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_1_PLURAL = These files will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_1_SINGULAR = This file will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_2_PLURAL = These files will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_2_SINGULAR = This file will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_3_PLURAL = These files will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_3_SINGULAR = This file will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_4_PLURAL = These files will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_4_SINGULAR = This file will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_5+_PLURAL = These files will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SHARE_5+_SINGULAR = This file will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FILE_CONTEXT1_CONTEXT2_SINGULAR = This file will be added to ${context1} and ${context2}. -PERMISSIONS_FILE_CONTEXT1_PLURAL = These files will be added to ${context1}. -PERMISSIONS_FILE_CONTEXT1_SHARE_1_PLURAL = These files will be added to ${context1} and shared with ${share1}. -PERMISSIONS_FILE_CONTEXT1_SHARE_1_SINGULAR = This file will be added to ${context1} and shared with ${share1}. -PERMISSIONS_FILE_CONTEXT1_SHARE_2_PLURAL = These files will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_FILE_CONTEXT1_SHARE_2_SINGULAR = This file will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_FILE_CONTEXT1_SHARE_3_PLURAL = These files will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FILE_CONTEXT1_SHARE_3_SINGULAR = This file will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FILE_CONTEXT1_SHARE_4_PLURAL = These files will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FILE_CONTEXT1_SHARE_4_SINGULAR = This file will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FILE_CONTEXT1_SHARE_5+_PLURAL = These files will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FILE_CONTEXT1_SHARE_5+_SINGULAR = This file will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FILE_CONTEXT1_SINGULAR = This file will be added to ${context1}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_PLURAL = These folders will be added to ${context1} and ${context2}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_1_PLURAL = These folders will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_1_SINGULAR = This folder will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_2_PLURAL = These folders will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_2_SINGULAR = This folder will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_3_PLURAL = These folders will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_3_SINGULAR = This folder will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_4_PLURAL = These folders will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_4_SINGULAR = This folder will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_5+_PLURAL = These folders will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SHARE_5+_SINGULAR = This folder will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FOLDER_CONTEXT1_CONTEXT2_SINGULAR = This folder will be added to ${context1} and ${context2}. -PERMISSIONS_FOLDER_CONTEXT1_PLURAL = These folders will be added to ${context1}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_1_PLURAL = These folders will be added to ${context1} and shared with ${share1}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_1_SINGULAR = This folder will be added to ${context1} and shared with ${share1}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_2_PLURAL = These folders will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_2_SINGULAR = This folder will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_3_PLURAL = These folders will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_3_SINGULAR = This folder will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_4_PLURAL = These folders will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_4_SINGULAR = This folder will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_5+_PLURAL = These folders will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FOLDER_CONTEXT1_SHARE_5+_SINGULAR = This folder will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_FOLDER_CONTEXT1_SINGULAR = This folder will be added to ${context1}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_PLURAL = These links will be added to ${context1} and ${context2}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_1_PLURAL = These links will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_1_SINGULAR = This link will be added to ${context1} and ${context2} and shared with ${share1}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_2_PLURAL = These links will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_2_SINGULAR = This link will be added to ${context1} and ${context2} and shared with ${share1} and ${share2}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_3_PLURAL = These links will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_3_SINGULAR = This link will be added to ${context1} and ${context2} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_4_PLURAL = These links will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_4_SINGULAR = This link will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_5+_PLURAL = These links will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SHARE_5+_SINGULAR = This link will be added to ${context1} and ${context2} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_LINK_CONTEXT1_CONTEXT2_SINGULAR = This link will be added to ${context1} and ${context2}. -PERMISSIONS_LINK_CONTEXT1_PLURAL = These links will be added to ${context1}. -PERMISSIONS_LINK_CONTEXT1_SHARE_1_PLURAL = These links will be added to ${context1} and shared with ${share1}. -PERMISSIONS_LINK_CONTEXT1_SHARE_1_SINGULAR = This link will be added to ${context1} and shared with ${share1}. -PERMISSIONS_LINK_CONTEXT1_SHARE_2_PLURAL = These links will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_LINK_CONTEXT1_SHARE_2_SINGULAR = This link will be added to ${context1} and shared with ${share1} and ${share2}. -PERMISSIONS_LINK_CONTEXT1_SHARE_3_PLURAL = These links will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_LINK_CONTEXT1_SHARE_3_SINGULAR = This link will be added to ${context1} and shared with ${share1}, ${share2} and ${share3}. -PERMISSIONS_LINK_CONTEXT1_SHARE_4_PLURAL = These links will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_LINK_CONTEXT1_SHARE_4_SINGULAR = This link will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and 1 other. -PERMISSIONS_LINK_CONTEXT1_SHARE_5+_PLURAL = These links will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_LINK_CONTEXT1_SHARE_5+_SINGULAR = This link will be added to ${context1} and shared with ${share1}, ${share2}, ${share3} and ${shareOther} others. -PERMISSIONS_LINK_CONTEXT1_SINGULAR = This link will be added to ${context1}. +ADD_MORE = Add more +ADD_THESE_AS = Add these as +PENDING_INVITATIONS = Pending invitations +RESEND_INVITATION = Resend invitation +RESEND_INVITATION_FAILED = The invitation could not be resent. +RESEND_INVITATION_SUCCESS = The invitation has been successfully resent. +REMOVE_MEMBER = Remove "${memberName}" from the list of members +SELECT_ROLE_FOR_USER = Select role for ${memberName} +SELECT_USERS_AND_GROUPS_TO_ADD = Select users and groups to add SHARE_WITH = Share with -VISIBILITY_CONTENT_LOGGEDIN_PLURAL = They can be found, seen and re-used by all people in ${tenant}. -VISIBILITY_CONTENT_LOGGEDIN_SINGULAR = It can be found, seen and re-used by all people in ${tenant}. -VISIBILITY_CONTENT_PRIVATE_PLURAL = They will be private and only visible to the people and groups you share them with. -VISIBILITY_CONTENT_PRIVATE_SINGULAR = It will be private and only visible to the people and groups you share it with. -VISIBILITY_CONTENT_PUBLIC_PLURAL = They will be public and can be found, seen and re-used by anyone. -VISIBILITY_CONTENT_PUBLIC_SINGULAR = It will be public and can be found, seen and re-used by anyone. -VISIBILITY_DISCUSSION_LOGGEDIN_SINGULAR = It can be found, seen and posted into by all people in ${tenant}. -VISIBILITY_DISCUSSION_PRIVATE_SINGULAR = It will be private and only visible to the people and groups you share it with. -VISIBILITY_DISCUSSION_PUBLIC_SINGULAR = It will be public and can be found and seen by anyone. All logged in users will be able to post to the discussion. - diff --git a/node_modules/oae-core/setpermissions/css/setpermissions.css b/node_modules/oae-core/setpermissions/css/setpermissions.css index 48ba0dc18f4..6a6ac1b452f 100644 --- a/node_modules/oae-core/setpermissions/css/setpermissions.css +++ b/node_modules/oae-core/setpermissions/css/setpermissions.css @@ -59,3 +59,67 @@ float: none; } } + +/* Share panel */ + +#setpermissions-overview-visibility { + padding: 10px; + margin-bottom: 25px; +} + +#setpermissions-share-add-more i { + font-size: 13px; + margin-right: 2px; +} + +#setpermissions-share-role { + height: auto; + margin: 12px 0 0; + width: 150px; +} + +#setpermissions-share-role-label { + font-weight: 200; + margin: 17px 10px 0 0; +} + +#setpermissions-change-visibility { + margin-top: -4px; +} + +#setpermissions-share-footer, +#setpermissions-visibility-footer { + padding: 0px; + margin-bottom: 8px; + margin-top: 20px; + margin-left: -13px; +} + +#setpermissions-overview-shared, +#setpermissions-overview-invitations { + padding: 10px; +} + +#setpermissions-overview-invitations > .setpermissions-overview-header { + margin-top: 0px; + margin-left: 5px; +} + +#setpermissions-overview-selected-shared-container > li > div.oae-list-compact-item > div > div > div.oae-listitem-actions > div > select, +#setpermissions-overview-selected-invitations-container > li > div.oae-list-compact-item > div > div > div.oae-listitem-actions > div > select { + height: 31px; + padding: 4px; + width: 150px; +} + +#setpermissions-overview-selected-shared-container > li > div.oae-list-compact-item > div > div > div.oae-listitem-actions, +#setpermissions-overview-selected-invitations-container > li > div.oae-list-compact-item > div > div > div.oae-listitem-actions { + margin-top: -4px; +} + +/* Align buttons in the title of the well titles with the title text */ +#setpermissions-share-add-more { + float: right; + margin-top: -3px; + padding: 4px 12px; +} diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 6500f84a192..c8e83fddbdb 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -31,94 +31,133 @@ define(['jquery', 'oae.core'], function($, oae) { // The widget container var $rootel = $('#' + uid); + // Caches the member updates that need to be applied. Each key is a + // member (user or group) id and its value is the role for that member. + // A value of `false` deletes the member from the group entirely. This + // object is sent to the server via an API call, so all updates should + // be relative to the server state. + var currentMembers = {}; + var currentInvitations = {}; + var invitationsUpdates = {}; + // Variable that keeps track of the current page context, as this will be used as a default // user/group that the item will be shared with var pageContext = null; - /** - * Translate and returns the i18n key associated to personal library that will be the target of the item being added - * - * @param {String} type The type of the items handled by the widget ('file', 'link', 'collabdoc' or 'discussion') - * @return {String} Returns the translated string associated to personal library the item will be added to (e.g. `My Library`, `My Discussions`) - */ - var getLibraryi18n = function(type) { - if (type === 'discussion') { - return oae.api.i18n.translate('__MSG__MY_DISCUSSIONS__'); - } else { - return oae.api.i18n.translate('__MSG__MY_LIBRARY__'); - } - }; + var visibility = null; + + var summary = ''; + + // Variable that will be used to keep track of the current infinite scroll instance + var infinityScroll = null; + + // Declare all possible roles for each resourses + var roles = {'collabdoc': [ + {'id': 'viewer', 'name': oae.api.i18n.translate('__MSG__CAN_VIEW__')}, + {'id': 'editor', 'name': oae.api.i18n.translate('__MSG__CAN_EDIT__')}, + {'id': 'manager', 'name': oae.api.i18n.translate('__MSG__CAN_MANAGE__')} + ], 'link': [ + {'id': 'viewer', 'name': oae.api.i18n.translate('__MSG__CAN_VIEW__')}, + {'id': 'manager', 'name': oae.api.i18n.translate('__MSG__CAN_MANAGE__')} + ], 'upload': [ + {'id': 'viewer', 'name': oae.api.i18n.translate('__MSG__CAN_VIEW__')}, + {'id': 'manager', 'name': oae.api.i18n.translate('__MSG__CAN_MANAGE__')} + ], 'file' : [ + {'id': 'viewer', 'name': oae.api.i18n.translate('__MSG__CAN_VIEW__')}, + {'id': 'manager', 'name': oae.api.i18n.translate('__MSG__CAN_MANAGE__')} + ], 'discussion' : [ + {'id': 'viewer', 'name': oae.api.i18n.translate('__MSG__CAN_VIEW__')}, + {'id': 'manager', 'name': oae.api.i18n.translate('__MSG__CAN_MANAGE__')} + ], 'folder' : [ + {'id': 'viewer', 'name': oae.api.i18n.translate('__MSG__CAN_VIEW__')}, + {'id': 'manager', 'name': oae.api.i18n.translate('__MSG__CAN_MANAGE__')} + ]}; + + + //////////////////////////// + // ACTIONS // + //////////////////////////// /** - * Fire an event to let the widget caller know that the permission change has been aborted + * Fire an event to let the widget caller know that the members change has been aborted */ - var cancelPermissionsChange = function() { + var cancelShareChange = function() { $(document).trigger('oae.setpermissions.cancel.' + uid); }; /** - * Trigger an event when changes have been made to the visibility settings + * Trigger an event when changes have been made to the members settings */ - var savePermissionsChange = function(folderMembers, callback) { - // Get the items in the share with list - var selection = oae.api.util.autoSuggest().getSelection($rootel); + var saveShareChange = function() { + var selectedPrincipalItems = {}; - var selectedFolderAndPrincipalItems = _.partition(selection, function(selectedItem) { - return (selectedItem.resourceType === 'folder'); + var membersPartition = _.partition(getAutosuggestSelection(), function(member) { + return (member.profile.resourceType === 'email'); }); - var selectedFolderItems = selectedFolderAndPrincipalItems[0]; - var selectedPrincipalItems = selectedFolderAndPrincipalItems[1]; - // Determine which selected display names to show on the UI for the user performing the - // share operation. These will be i18nized names that can be displayed directly to the - // user - var selectedContextNames = []; + var newInvitations = membersPartition[0]; + var newMembers = membersPartition[1]; - // Check if the item has been shared with the current user. If so, that should - // always show first in the generated summary - var selectedCurrentUser = _.findWhere(selectedPrincipalItems, {'id': oae.data.me.id}); - if (selectedCurrentUser) { - selectedContextNames.push(getLibraryi18n(widgetData.type)); - } + // Keep track of all members updates + _.each(newMembers, function(newMember) { + currentMembers[newMember.profile.id] = newMember.role; + }); + + // Keep track of all invitations updates + _.each(newInvitations, function(newInvitation) { + invitationsUpdates[newInvitation.profile.id] = newInvitation.role; + }); - // The item is always shared with the current context, so ensure it is high priority in - // the list of context names to display - if (pageContext.id !== oae.data.me.id) { - selectedContextNames.push(pageContext.displayName); + // Update the invitations list + if (!_.isEmpty(newInvitations)) { + updateInvitations(); } - // Compile the list of users and groups the item is being shared with excluding - // the current user and the current page context, as those are being presented - // separately in the summary - var selectedOutsideContext = _.filter(selectedPrincipalItems, function(selectedPrincipalItem) { - return (selectedPrincipalItem.id !== oae.data.me.id && selectedPrincipalItem.id !== pageContext.id); + // Update the members infinite scroll + var newMembers = _.map(newMembers, function(member) { + member.profile.role = member.role; + return member.profile; + }); + + _.each(newMembers, function(newMember) { + infinityScroll.prependItems(newMember); }); - selectedOutsideContext.concat(folderMembers); + // Inform the widget caller that the permissions have changed + $(document).trigger('oae.setpermissions.changed.' + uid, { + 'visibility': visibility, + 'members': currentMembers, + 'invitations': currentInvitations + }); + }; + + /** + * Fire an event to let the widget caller know that the permission change has been aborted + */ + var cancelPermissionsChange = function() { + $(document).trigger('oae.setpermissions.cancel.' + uid); + }; + + /** + * Trigger an event when changes have been made to the visibility settings + */ + var savePermissionsChange = function() { // Get the selected visibility setting - var visibility = $('#setpermissions-container input[type="radio"]:checked', $rootel).val(); + visibility = $('#setpermissions-visibility input[type="radio"]:checked', $rootel).val(); // Generate a user-friendly summary - var summary = oae.api.util.template().render($('#setpermissions-summary-template', $rootel), { - 'count': widgetData.count, + summary = oae.api.util.template().render($('#setpermissions-manage-template', $rootel), { 'resourceType': widgetData.type, - 'selectedContextNames': selectedContextNames, - 'selectedOutsideContext': selectedOutsideContext, - 'visibility': visibility + 'visibility': visibility, + 'tenantName': widgetData.oae.data.me.tenant.displayName }); // Inform the widget caller that the permissions have changed $(document).trigger('oae.setpermissions.changed.' + uid, { - 'selectedFolderItems': selectedFolderItems, - 'selectedPrincipalItems': selectedPrincipalItems, 'summary': summary, 'visibility': visibility }); - - if (callback) { - return callback(); - } }; /** @@ -141,64 +180,374 @@ define(['jquery', 'oae.core'], function($, oae) { // Get out the creator of this resource because he will get right manager anyway var folderMembers = _.chain(members.results) - .map(function(member) { return member.profile; }) - .reject(function(member) { return member.id === oae.data.me.id; }) + .map(function(member) { member.profile.role = member.role; return member.profile; }) + .reject(function(member) { return member.id === widgetData.oae.data.me.id; }) .value(); - return callback(null, folderMembers); + if (_.isEmpty(folderMembers)) { + return callback(null, []); + } else { + return callback(null, folderMembers); + } + }); + }; + + /** + * Removes a member from the list. + */ + var deleteMember = function() { + + var memberId = $(this).attr('data-id'); + + // Remove the list item + if (oae.api.util.validation().isValidEmail(memberId)) { + delete currentInvitations[memberId]; + currentInvitations = _.reject(currentInvitations, function(member) { return member.id == memberId; }); + + // If there is no more pending invitations, hide the list + if (_.isEmpty(currentInvitations)) { + $('#setpermissions-overview-invitations').hide(); + } + + updateInvitations(); + + } else { + infinityScroll.removeItems(memberId); + delete currentMembers[memberId]; + + // can't delete you if there is minus 1 and you + + } + }; + + /** + * Update the role of a member. This will only be persisted when the `Save` button is clicked. + */ + var updateRole = function() { + var memberId = $(this).attr('data-id'); + var selectedRole = $(this).val(); + + if (oae.api.util.validation().isValidEmail(memberId)) { + currentInvitations[memberId] = selectedRole; + } else { + currentMembers[memberId] = selectedRole; + } + }; + + /** + * Update the invitations from the current invitation role state + */ + var updateInvitations = function() { + _.each(invitationsUpdates, function(newInvitationRole, newInvitationEmail) { + currentInvitations[newInvitationEmail] = createMemberProfileForEmail(newInvitationEmail, newInvitationRole); }); + + if (_.isEmpty(currentInvitations)) { + $('#setpermissions-overview-invitations').hide(); + invitationsUpdates = {}; + } else { + oae.api.util.template().render($('#setpermissions-overview-selected-template'), { + 'results': currentInvitations, + 'roles': roles[widgetData.type], + 'displayOptions': { + 'metadata': false + } + }, $('#setpermissions-overview-selected-invitations-container')); + $('#setpermissions-overview-invitations').show(); + invitationsUpdates = {}; + } }; /** - * Initialize the autosuggest used for sharing with other users or groups + * Given an email and a role, create a standard resource member profile of resource type + * 'email', where the id is assigned to the email in place of a proper resource id * - * @param {Function} callback Standard callback function + * @param {String} email The email from which to create a standard resource profile + * @param {String} role The role of the resource in the members list + * @return {Object} The standard resource member object required from the members list template */ - var setUpAutoSuggest = function(folderMembers, callback) { + var createMemberProfileForEmail = function(email, role) { + return { + 'resourceType': 'email', + 'id': email, + 'displayName': email, + 'role': role, + 'beenInvited': false + }; + }; + + + //////////////////////////// + // RENDER / SHOW PANEL // + //////////////////////////// + + /** + * Renders the visibility view. + */ + var renderVisibility = function() { + oae.api.util.template().render($('#setpermissions-visibility-template', $rootel), { + 'contextProfile': widgetData.contextProfile, + 'visibility': widgetData.visibility, + 'resourceType': widgetData.type, + 'tenant': widgetData.oae.data.me.tenant.displayName + }, $('#setpermissions-visibility', $rootel)); + }; + + /** + * Renders the share view. + */ + var renderShare = function() { + oae.api.util.template().render($('#setpermissions-share-template', $rootel), { + 'results': [widgetData.contextProfile], + 'defaultRole': widgetData.defaultRole, + 'roles': roles[widgetData.type] + }, $('#setpermissions-share', $rootel)); + + $('#setpermissions-savepermissions-share', $rootel).prop('disabled', true); + + setUpAutoSuggest(); + }; + + /** + * Shows a specified panel using the provided name. + * + * @param {String} panel The name of the panel to show (i.e. 'visibility') + */ + var showPanel = function(panel) { + $('.modal-body > div').hide(); + $('.modal-footer').hide(); + + if (widgetData.type === 'file') { + $('#upload-permissions-container').show(); + } else { + $('#create' + widgetData.type + '-permissions-container').show(); + } - widgetData.preFill = widgetData.preFill.concat(folderMembers); + $('#' + uid + ' > div').hide(); - oae.api.util.autoSuggest().setup($('#setpermissions-share', $rootel), { + $('#setpermissions-' + panel + '-footer').show(); + $('#setpermissions-' + panel).show(); + }; + + + //////////////////////////// + // AUTO SUGGEST // + //////////////////////////// + + /** + * Disable/enable the add button when an item has been added/removed from the autosuggest field. + */ + var autoSuggestChanged = function() { + $('#setpermissions-savepermissions-share', $rootel).prop('disabled', getAutosuggestSelection().length ? false : true); + }; + + /** + * Initializes the autosuggest used for sharing with other users or groups. + */ + var setUpAutoSuggest = function() { + oae.api.util.autoSuggest().setup($('#setpermissions-share-autosuggest', $rootel), { 'allowEmail': true, - 'ghosts': widgetData.ghosts, - 'preFill': widgetData.preFill - }, null, callback); + 'exclude': widgetData.oae.data.me.id, + 'selectionChanged': autoSuggestChanged + }, null, function() { + // Focus on the autosuggest field once it has been set up + focusAutoSuggest(); + }); }; /** - * Initialize the setpermissions widget + * Focus on the autosuggest field used for sharing with other users or groups after the + * autosuggest component has finished initializing and after the modal dialog has finished + * loading. */ - var setUpSetPermissionsModal = function() { + var focusAutoSuggest = function() { + // Only focus the autosuggest field when the share panel is showing + if ($('#setpermissions-share', $rootel).is(':visible')) { + oae.api.util.autoSuggest().focus($rootel); + } + }; + + /** + * Get the principals that were selected in the autosuggest field. + * + * @return {Object[]} Trimmed member object as used by the members feed containing all properties necessary to render a list item in the infinite scroll + */ + var getAutosuggestSelection = function() { + // Convert these into an object that reflects the members feed, using a `profile` property + // for the principal profile and a `role` property for the new role + var selectedItems = []; + $.each(oae.api.util.autoSuggest().getSelection($rootel), function(index, selectedItem) { + // Autosuggest will provide the query that was used to find someone. If someone used + // an email address to locate a user, we use it as criteria that indicates the user + // performing the search can interact with that user, regardless of their profile + // visibility or tenancy + selectedItems.push({ + 'email': selectedItem.email, + 'profile': _.omit(selectedItem, 'email'), + 'role': $('#setpermissions-share-role', $rootel).val() + }); + }); + + return selectedItems; + }; + + + //////////////////////////// + // MEMBER INFINITE SCROLL // + //////////////////////////// + + /** + * Initialize a new infinite scroll container that fetches the members. + */ + var renderMembers = function(callback) { + // Disable the previous infinite scroll + if (!_.isEmpty(infinityScroll)) { + infinityScroll.kill(); + } + + // If the resource is inside of a folder, get the folder members to add them to the resource + getFolderMembers(pageContext.id, function(err, folderMembers) { + if (err) { + return err; + } + + var url = '/api/user/' + widgetData.oae.data.me.id; + + // Set up the infinite scroll instance + infinityScroll = $('#setpermissions-overview-shared .oae-list').infiniteScroll(url, { + 'limit': 8 + }, '#setpermissions-overview-selected-template', { + 'scrollContainer': $('#setpermissions-overview-shared', $rootel), + 'postProcessor': function(principal) { + var data = {}; + + if (principal.id === widgetData.oae.data.me.id) { + principal.role = 'manager'; + } + + // Add the members of the folders if there is any + data.results = folderMembers.concat([principal]); + // Add the possible roles for the resource + data.roles = roles[widgetData.type]; + data.displayOptions = { + 'metadata': false + }; + + _.each(data.results, function(member) { + currentMembers[member.id] = member.role; + }); + + return data; + }, + 'postRenderer': function(data, $templateOutput) { + return callback(); + } + }); + }); + }; + + + ////////////////////// + // DEINITIALIZATION // + ////////////////////// + + /** + * Resets the widget to its initial state + */ + var reset = function() { + + // Reset the invitations and members caches + currentMembers = {}; + currentInvitations = {}; + invitationsUpdates = {}; + + if (!_.isEmpty(infinityScroll)) { + //infinityScroll.kill(); + infinityScroll = {}; + } + }; + + + //////////////////////////// + // INITIALIZATION // + //////////////////////////// + + // Inform the widget caller the initial permissions and members + var initSetPermissions = function() { + $(document).trigger('oae.setpermissions.changed.' + uid, { + 'members': currentMembers, + 'visibility': visibility, + 'selectedFolderItems': pageContext.id + }); + }; + + /** + * Initialize the manage setpermissions widget + */ + var setUpManageModal = function() { // Render the setpermissions template - oae.api.util.template().render($('#setpermissions-template', $rootel), widgetData, $('#setpermissions-container', $rootel)); + oae.api.util.template().render($('#setpermissions-manage-template', $rootel), widgetData, $('#setpermissions-manage-container', $rootel)); - $('#setpermissions-savepermissions', $rootel).on('click', savePermissionsChange); - $('#setpermissions-cancelpermissions', $rootel).on('click', cancelPermissionsChange); + $(document).on('click', '#setpermissions-change-visibility', function() { + showPanel('visibility'); + }); // Trigger and bind an event that will ask for the page context $(document).on('oae.context.send.setpermissions.' + uid, function(ev, data) { pageContext = data; + renderMembers(initSetPermissions); + }); - // If the resource is inside of a folder, get the folder members to add them to the resource - getFolderMembers(pageContext.id, function(err, folderMembers) { - if (err) { - return err; - } + // Delete a member from the list + $(document).on('click', '.oae-listitem-actions .oae-listitem-remove', deleteMember); - // Immediately pass the default permissions summary back to the widget caller - setUpAutoSuggest(folderMembers, function(err) { - if (err) { - return err; - } + // Update a member's role in the list + $(document).on('change', '.oae-listitem-actions select', updateRole); - savePermissionsChange(folderMembers); - }); - }); - }); + renderVisibility(); + + savePermissionsChange(); + + setUpSetPermissionsModal(); + setUpShareModal(); + + updateInvitations(); + + // Reset the widget when it is dismissed. + $('#create' + widgetData.type + '-modal').on('hidden.bs.modal', reset); + $('#upload-modal').on('hidden.bs.modal', reset); + }; + + /** + * Initialize the permissions setpermissions widget + */ + var setUpSetPermissionsModal = function() { + $('#setpermissions-savepermissions', $rootel).on('click', savePermissionsChange); + $('#setpermissions-cancelpermissions', $rootel).on('click', cancelPermissionsChange); $(document).trigger('oae.context.get', 'setpermissions.' + uid); + + // Catch changes in the visibility radio group + $rootel.on('change', '.oae-large-options-container input[type="radio"]', function() { + $('.oae-large-options-container label', $rootel).removeClass('checked'); + $(this).parents('label').addClass('checked'); + }); + }; + + /** + * Initialize the share setpermissions widget + */ + var setUpShareModal = function() { + + $(document).on('click', '#setpermissions-share-add-more', function() { + renderShare(); + showPanel('share'); + }); + + $(document).on('click', '#setpermissions-savepermissions-share', saveShareChange); + $(document).on('click', '#setpermissions-cancelpermissions-share', cancelShareChange); }; - setUpSetPermissionsModal(); + setUpManageModal(); }; }); diff --git a/node_modules/oae-core/setpermissions/setpermissions.html b/node_modules/oae-core/setpermissions/setpermissions.html index e39765f1510..c73e95bfbbd 100644 --- a/node_modules/oae-core/setpermissions/setpermissions.html +++ b/node_modules/oae-core/setpermissions/setpermissions.html @@ -1,428 +1,168 @@ -
+
+
-
-

__MSG__SHARE_WITH__

- - -
diff --git a/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js b/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js index f7c23841261..3292fe13476 100644 --- a/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js +++ b/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js @@ -7,6 +7,7 @@ define(['jquery', 'oae.core'], function ($, oae) { // Variable that keeps track of the people and groups to share this meeting with var members = []; + var managers = []; // Variable that keeps track of the selected visibility for the meeting to create var visibility = null; @@ -34,7 +35,7 @@ define(['jquery', 'oae.core'], function ($, oae) { var meetingContactList = $('#createmeeting-jitsi-contact-list').is(':checked').toString(); // Create the meeting - oae.api.meetingJitsi.createMeeting(meetingName, meetingDescription, meetingChat, meetingContactList, visibility, [], members, function (err, data) { + oae.api.meetingJitsi.createMeeting(meetingName, meetingDescription, meetingChat, meetingContactList, visibility, managers, members, function (err, data) { // If the creation succeeded, redirect to the meeting profile if (!err) { @@ -129,9 +130,30 @@ define(['jquery', 'oae.core'], function ($, oae) { $(document).on('oae.setpermissions.changed.' + setPermissionsId, function (ev, data) { // Update visibility for the meeting - visibility = data.visibility; + if (data.visibility) { + visibility = data.visibility; + } - members = _.pluck(data.selectedPrincipalItems, 'shareId'); + // Update members of the document + if (data.members) { + managers = []; + members = []; + + _.each(data.members, function(role, id) { + if (role === 'manager') { + managers.push(id); + } else { + members.push(id) + } + }); + _.each(data.invitations, function(invitation, id) { + if (invitation.role === 'manager') { + managers.push(id); + } else { + members.push(id); + } + }); + } // Add the permissions summary $('#createmeeting-jitsi-permissions', $rootel).html(data.summary); @@ -159,7 +181,7 @@ define(['jquery', 'oae.core'], function ($, oae) { oae.api.widget.insertWidget('setpermissions', setPermissionsId, $setPermissionsContainer, false, { 'count': 1, 'preFill': preFill, - 'type': 'collabdoc', + 'type': 'meeting-jitsi', 'visibility': visibility }); From 004f464c06b1ec38a20d59d19b2cd38edba22542 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Thu, 23 Aug 2018 11:53:50 +0200 Subject: [PATCH 18/21] Documents in a folder should be shared with its group by default - reviewed by jshint --- node_modules/oae-core/createcollabdoc/js/createcollabdoc.js | 2 +- node_modules/oae-core/creatediscussion/js/creatediscussion.js | 3 ++- node_modules/oae-core/createfolder/js/createfolder.js | 2 +- node_modules/oae-core/createlink/js/createlink.js | 2 +- node_modules/oae-core/setpermissions/js/setpermissions.js | 1 - node_modules/oae-core/upload/js/upload.js | 2 +- .../oae-jitsi-widgets/createmeeting/js/createmeeting.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js index 5d9a51ad536..72e886990be 100644 --- a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js +++ b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js @@ -127,7 +127,7 @@ define(['jquery', 'oae.core'], function ($, oae) { } else if (role === 'editor') { editors.push(id); } else { - viewers.push(id) + viewers.push(id); } }); diff --git a/node_modules/oae-core/creatediscussion/js/creatediscussion.js b/node_modules/oae-core/creatediscussion/js/creatediscussion.js index c2188c93126..59fa3233b16 100644 --- a/node_modules/oae-core/creatediscussion/js/creatediscussion.js +++ b/node_modules/oae-core/creatediscussion/js/creatediscussion.js @@ -22,6 +22,7 @@ define(['jquery', 'oae.core'], function ($, oae) { // Variable that keeps track of the people and groups to share this discussion with var members = []; + var managers = []; // Variable that keeps track of the selected visibility for the discussion to create var visibility = null; @@ -115,7 +116,7 @@ define(['jquery', 'oae.core'], function ($, oae) { if (role === 'manager') { managers.push(id); } else { - members.push(id) + members.push(id); } }); diff --git a/node_modules/oae-core/createfolder/js/createfolder.js b/node_modules/oae-core/createfolder/js/createfolder.js index d2c7db503ad..f9c8b27abe3 100644 --- a/node_modules/oae-core/createfolder/js/createfolder.js +++ b/node_modules/oae-core/createfolder/js/createfolder.js @@ -116,7 +116,7 @@ define(['jquery', 'oae.core'], function ($, oae) { if (role === 'manager') { managers.push(id); } else { - members.push(id) + members.push(id); } }); diff --git a/node_modules/oae-core/createlink/js/createlink.js b/node_modules/oae-core/createlink/js/createlink.js index 2e7e8f4e47e..657556b74f3 100644 --- a/node_modules/oae-core/createlink/js/createlink.js +++ b/node_modules/oae-core/createlink/js/createlink.js @@ -318,7 +318,7 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { if (role === 'manager') { link.managers.push(id); } else { - link.viewers.push(id) + link.viewers.push(id); } }); diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 52b3782e72a..7e441676daa 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -83,7 +83,6 @@ define(['jquery', 'oae.core'], function($, oae) { * Trigger an event when changes have been made to the members settings */ var saveMembersChange = function() { - var selectedPrincipalItems = {}; // Get members from the autosuggest selection var membersPartition = _.partition(getAutosuggestSelection(), function(member) { diff --git a/node_modules/oae-core/upload/js/upload.js b/node_modules/oae-core/upload/js/upload.js index 77d7cdf3b95..f19c6483945 100644 --- a/node_modules/oae-core/upload/js/upload.js +++ b/node_modules/oae-core/upload/js/upload.js @@ -338,7 +338,7 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j if (role === 'manager') { file.managers.push(id); } else { - file.viewers.push(id) + file.viewers.push(id); } }); diff --git a/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js b/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js index 3292fe13476..25e14c36674 100644 --- a/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js +++ b/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js @@ -143,7 +143,7 @@ define(['jquery', 'oae.core'], function ($, oae) { if (role === 'manager') { managers.push(id); } else { - members.push(id) + members.push(id); } }); _.each(data.invitations, function(invitation, id) { From 4fb02e92dbd4d9add8711cc43363c32503c9ecc0 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Wed, 29 Aug 2018 11:49:32 +0200 Subject: [PATCH 19/21] Documents in a folder should be shared with its group by default - tenant error resolved --- node_modules/oae-core/setpermissions/js/setpermissions.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index 7e441676daa..d0f2de9dc46 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -522,6 +522,8 @@ define(['jquery', 'oae.core'], function($, oae) { * Initialize the manage setpermissions widget */ var setUpManageModal = function() { + widgetData.tenantName = 'tenant'; + // Render the setpermissions template oae.api.util.template().render($('#setpermissions-manage-template', $rootel), widgetData, $('#setpermissions-manage', $rootel)); @@ -541,6 +543,11 @@ define(['jquery', 'oae.core'], function($, oae) { $(document).on('oae.context.send.setpermissions.' + uid, function(ev, data) { pageContext = data; + widgetData.tenantName = pageContext.tenant.displayName; + + // Render the setpermissions template + oae.api.util.template().render($('#setpermissions-manage-template', $rootel), widgetData, $('#setpermissions-manage', $rootel)); + // If the resource is inside of a folder, get the folder members to add them to the resource getFolderMembers(pageContext.id, function(err, folderMembers) { if (err) { From 11c173a955fdd06835619daf0b1066e5e155f437 Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Fri, 31 Aug 2018 16:40:12 +0200 Subject: [PATCH 20/21] Documents in a folder should be shared with its group by default - review --- .../createcollabdoc/js/createcollabdoc.js | 4 +--- .../creatediscussion/js/creatediscussion.js | 4 +--- .../oae-core/createfolder/js/createfolder.js | 4 +--- .../oae-core/createlink/js/createlink.js | 8 ++----- .../setpermissions/js/setpermissions.js | 23 ++++++++----------- node_modules/oae-core/upload/js/upload.js | 10 ++------ .../createmeeting/js/createmeeting.js | 4 +--- 7 files changed, 17 insertions(+), 40 deletions(-) diff --git a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js index 72e886990be..7c4535a6b76 100644 --- a/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js +++ b/node_modules/oae-core/createcollabdoc/js/createcollabdoc.js @@ -111,9 +111,7 @@ define(['jquery', 'oae.core'], function ($, oae) { $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for document - if (data.visibility) { - visibility = data.visibility; - } + visibility = data.visibility || visibility; // Update members of the document if (data.members) { diff --git a/node_modules/oae-core/creatediscussion/js/creatediscussion.js b/node_modules/oae-core/creatediscussion/js/creatediscussion.js index 59fa3233b16..9221f0cd688 100644 --- a/node_modules/oae-core/creatediscussion/js/creatediscussion.js +++ b/node_modules/oae-core/creatediscussion/js/creatediscussion.js @@ -103,9 +103,7 @@ define(['jquery', 'oae.core'], function ($, oae) { // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for discussion - if (data.visibility) { - visibility = data.visibility; - } + visibility = data.visibility || visibility; // Update members of the document if (data.members) { diff --git a/node_modules/oae-core/createfolder/js/createfolder.js b/node_modules/oae-core/createfolder/js/createfolder.js index f9c8b27abe3..186ed333d32 100644 --- a/node_modules/oae-core/createfolder/js/createfolder.js +++ b/node_modules/oae-core/createfolder/js/createfolder.js @@ -104,9 +104,7 @@ define(['jquery', 'oae.core'], function ($, oae) { // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for folder - if (data.visibility) { - visibility = data.visibility; - } + visibility = data.visibility || visibility; if (data.members) { managers = []; diff --git a/node_modules/oae-core/createlink/js/createlink.js b/node_modules/oae-core/createlink/js/createlink.js index 657556b74f3..43e2561b745 100644 --- a/node_modules/oae-core/createlink/js/createlink.js +++ b/node_modules/oae-core/createlink/js/createlink.js @@ -305,9 +305,7 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for links - if (data.visibility) { - visibility = data.visibility; - } + visibility = data.visibility || visibility; // Update the members of the added links $.each(addedLinks, function(index, link) { @@ -330,9 +328,7 @@ define(['jquery', 'oae.core', 'jquery.jeditable'], function($, oae) { } }); - if (data.selectedFolderItems) { - link.folders = data.selectedFolderItems; - } + link.folders = data.selectedFolderItems || link.folders; }); // Add the permissions summary diff --git a/node_modules/oae-core/setpermissions/js/setpermissions.js b/node_modules/oae-core/setpermissions/js/setpermissions.js index d0f2de9dc46..95ae1572ea0 100644 --- a/node_modules/oae-core/setpermissions/js/setpermissions.js +++ b/node_modules/oae-core/setpermissions/js/setpermissions.js @@ -108,17 +108,13 @@ define(['jquery', 'oae.core'], function($, oae) { updateInvitations(invitationsUpdates); } - // Update the members infinite scroll + // Update the members infinite scroll && add members to the permissions modal list var newMembers = _.map(newMembers, function(member) { member.profile.role = member.role; + infinityScroll.prependItems(member.profile); return member.profile; }); - // Add members to the permissions modal list - _.each(newMembers, function(newMember) { - infinityScroll.prependItems(newMember); - }); - // Inform the widget caller that the member/invitation list have changed $(document).trigger('oae.setpermissions.changed.' + uid, { 'members': currentMembers, @@ -150,13 +146,16 @@ define(['jquery', 'oae.core'], function($, oae) { $('#setpermissions-overview-visibility-container i').attr('class', 'fa fa-oae-' + visibility + ' pull-left'); // Change text visibility on the permission modal + var htmlVisibility = null; if (visibility === 'private') { - $('#setpermissions-overview-visibility-container span').html(oae.api.i18n.translate('__MSG__PRIVATE__')); + htmlVisibility = oae.api.i18n.translate('__MSG__PRIVATE__'); } else if (visibility === 'loggedin') { - $('#setpermissions-overview-visibility-container span').html(widgetData.oae.data.me.tenant.displayName); + htmlVisibility = oae.api.i18n.translate(widgetData.oae.data.me.tenant.displayName); } else { - $('#setpermissions-overview-visibility-container span').html(oae.api.i18n.translate('__MSG__PUBLIC__')); + htmlVisibility = oae.api.i18n.translate('__MSG__PUBLIC__'); + } + $('#setpermissions-overview-visibility-container span').html(htmlVisibility); // Inform the widget caller that visibility have changed $(document).trigger('oae.setpermissions.changed.' + uid, { @@ -195,11 +194,7 @@ define(['jquery', 'oae.core'], function($, oae) { .reject(function(member) { return member.id === widgetData.oae.data.me.id; }) .value(); - if (_.isEmpty(folderMembers)) { - return callback(null, []); - } else { - return callback(null, folderMembers); - } + return callback(null, folderMembers || []); }); }; diff --git a/node_modules/oae-core/upload/js/upload.js b/node_modules/oae-core/upload/js/upload.js index f19c6483945..e15a7e31098 100644 --- a/node_modules/oae-core/upload/js/upload.js +++ b/node_modules/oae-core/upload/js/upload.js @@ -325,9 +325,7 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j // Event that will be triggered when permission changes have been made in the `setpermissions` widget $(document).on('oae.setpermissions.changed.' + setPermissionsId, function(ev, data) { // Update visibility for files - if (data.visibility) { - visibility = data.visibility; - } + visibility = data.visibility || visibility; // Update the members of the selected files $.each(selectedFiles, function(index, file) { @@ -350,11 +348,7 @@ define(['jquery', 'oae.core', 'jquery.fileupload', 'jquery.iframe-transport', 'j } }); - if (data.selectedFolderItems) { - file.folders = [data.selectedFolderItems]; - } else { - file.folders = []; - } + file.folders = [data.selectedFolderItems] || []; }); // Add the permissions summary diff --git a/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js b/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js index 25e14c36674..4dd757e453b 100644 --- a/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js +++ b/node_modules/oae-jitsi-widgets/createmeeting/js/createmeeting.js @@ -130,9 +130,7 @@ define(['jquery', 'oae.core'], function ($, oae) { $(document).on('oae.setpermissions.changed.' + setPermissionsId, function (ev, data) { // Update visibility for the meeting - if (data.visibility) { - visibility = data.visibility; - } + visibility = data.visibility || visibility; // Update members of the document if (data.members) { From 4a54e8a0de2fdcf68114935bfe9b2126e1dd88de Mon Sep 17 00:00:00 2001 From: Claire Lozano Date: Mon, 3 Sep 2018 10:03:24 +0200 Subject: [PATCH 21/21] Documents in a folder should be shared with its group by default - bundles --- .../manageaccess/bundles/default.properties | 6 ------ .../manageaccess/bundles/fr_FR.properties | 7 ------- .../setpermissions/bundles/af_ZA.properties | 6 ------ .../setpermissions/bundles/ca_ES.properties | 6 ------ .../setpermissions/bundles/cy_GB.properties | 6 ------ .../setpermissions/bundles/de_DE.properties | 8 -------- .../setpermissions/bundles/default.properties | 7 ------- .../setpermissions/bundles/es_ES.properties | 8 -------- .../setpermissions/bundles/fi_FI.properties | 7 ------- .../setpermissions/bundles/fr_FR.properties | 8 -------- .../setpermissions/bundles/hi_IN.properties | 7 ------- .../setpermissions/bundles/nl_NL.properties | 7 ------- .../setpermissions/bundles/pl_PL.properties | 7 ------- .../setpermissions/bundles/pt_BR.properties | 7 ------- .../setpermissions/bundles/ru_RU.properties | 8 -------- .../setpermissions/bundles/sv_SE.properties | 7 ------- .../setpermissions/bundles/tr_TR.properties | 7 ------- .../setpermissions/bundles/uk_UA.properties | 8 -------- .../setpermissions/bundles/val_ES.properties | 7 ------- .../setpermissions/bundles/zh_CN.properties | 7 ------- .../oae-core/setpermissions/manifest.json | 20 ------------------- shared/oae/bundles/ui/default.properties | 7 +++++++ shared/oae/bundles/ui/fr_FR.properties | 7 +++++++ 23 files changed, 14 insertions(+), 161 deletions(-) delete mode 100644 node_modules/oae-core/setpermissions/bundles/af_ZA.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/ca_ES.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/cy_GB.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/de_DE.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/default.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/es_ES.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/fi_FI.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/fr_FR.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/hi_IN.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/nl_NL.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/pl_PL.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/pt_BR.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/ru_RU.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/sv_SE.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/tr_TR.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/uk_UA.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/val_ES.properties delete mode 100644 node_modules/oae-core/setpermissions/bundles/zh_CN.properties diff --git a/node_modules/oae-core/manageaccess/bundles/default.properties b/node_modules/oae-core/manageaccess/bundles/default.properties index 4fc1750d376..2f6674b7721 100644 --- a/node_modules/oae-core/manageaccess/bundles/default.properties +++ b/node_modules/oae-core/manageaccess/bundles/default.properties @@ -1,13 +1,7 @@ -ADD_MORE = Add more -ADD_THESE_AS = Add these as FAILED_TO_RESEND_INVITATION = Failed to resend invitation. INVITATION_HAS_BEEN_SUCCESSFULLY_RESENT = Invitation has been successfully resent INVITE = Invite -PENDING_INVITATIONS = Pending invitations -REMOVE_MEMBER = Remove "${memberName}" from the list of members RESEND = Resend RESEND_INVITATION = Resend invitation RESEND_INVITATION_FAILED = The invitation could not be resent. RESEND_INVITATION_SUCCESS = The invitation has been successfully resent. -SELECT_ROLE_FOR_USER = Select role for ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD = Select users and groups to add diff --git a/node_modules/oae-core/manageaccess/bundles/fr_FR.properties b/node_modules/oae-core/manageaccess/bundles/fr_FR.properties index 8a2e923a516..b8be3abca57 100644 --- a/node_modules/oae-core/manageaccess/bundles/fr_FR.properties +++ b/node_modules/oae-core/manageaccess/bundles/fr_FR.properties @@ -1,15 +1,8 @@ #X-Generator: crowdin.com -ADD_MORE=Ajouter d'autres -ADD_THESE_AS=Ajoutez-les comme FAILED_TO_RESEND_INVITATION=Impossible de renvoyer l'invitation. INVITATION_HAS_BEEN_SUCCESSFULLY_RESENT=L'invitation a bien \u00e9t\u00e9 renvoy\u00e9e INVITE=Inviter -PENDING_INVITATIONS=Invitations en cours -REMOVE_MEMBER=Retirer "${memberName}" de la liste des membres RESEND=Renvoyer RESEND_INVITATION=Renvoyer l'invitation RESEND_INVITATION_FAILED=L'invitation ne peux pas \u00eatre renvoy\u00e9e. RESEND_INVITATION_SUCCESS=L'invitation a bien \u00e9t\u00e9 renvoy\u00e9e. -SELECT_ROLE_FOR_USER=S\u00e9lectionner un r\u00f4le pour ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=S\u00e9lectionner les utilisateurs et groupes \u00e0 ajouter. - diff --git a/node_modules/oae-core/setpermissions/bundles/af_ZA.properties b/node_modules/oae-core/setpermissions/bundles/af_ZA.properties deleted file mode 100644 index 21465472221..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/af_ZA.properties +++ /dev/null @@ -1,6 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Voeg meer by -ADD_THESE_AS=Voeg hierdie by as -REMOVE_MEMBER=Verwyder "${memberName}" van die lys van lede -SELECT_ROLE_FOR_USER=Kies rol vir ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Kies gebruikers en groepe om by te voeg diff --git a/node_modules/oae-core/setpermissions/bundles/ca_ES.properties b/node_modules/oae-core/setpermissions/bundles/ca_ES.properties deleted file mode 100644 index f23939fe177..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/ca_ES.properties +++ /dev/null @@ -1,6 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Afegir m\u00e9s -ADD_THESE_AS=Afegir estos com -REMOVE_MEMBER=Eliminar "${memberName}" de la llista de membres -SELECT_ROLE_FOR_USER=Selecciona el rol per a ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Selecciona els usuaris i els grups a afegir diff --git a/node_modules/oae-core/setpermissions/bundles/cy_GB.properties b/node_modules/oae-core/setpermissions/bundles/cy_GB.properties deleted file mode 100644 index 7e168ace1a8..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/cy_GB.properties +++ /dev/null @@ -1,6 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Ychwanegwch fwy -ADD_THESE_AS=Ychwanegwch rhain fel -REMOVE_MEMBER=Diddymwch "${memberName}" o'r rhestr o aelodau -SELECT_ROLE_FOR_USER=Dewisiwch swyddogaeth i ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Dewisiwch ddefnyddwyr a grwpiau i'w hychwanegu diff --git a/node_modules/oae-core/setpermissions/bundles/de_DE.properties b/node_modules/oae-core/setpermissions/bundles/de_DE.properties deleted file mode 100644 index 2875329967e..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/de_DE.properties +++ /dev/null @@ -1,8 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Mehr hinzuf\u00fcgen -ADD_THESE_AS=Diese hinzuf\u00fcgen als -PENDING_INVITATIONS=Ausstehende Einladungen -REMOVE_MEMBER="${memberName}" von der Mitgliederliste entfernen -SELECT_ROLE_FOR_USER=W\u00e4hlen Sie die Rolle f\u00fcr ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Mitglieder und Gruppen zum Hinzuf\u00fcgen ausw\u00e4hlen -SHARE_WITH=Teilen mit diff --git a/node_modules/oae-core/setpermissions/bundles/default.properties b/node_modules/oae-core/setpermissions/bundles/default.properties deleted file mode 100644 index c87d9b1c5bd..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/default.properties +++ /dev/null @@ -1,7 +0,0 @@ -ADD_MORE = Add more -ADD_THESE_AS = Add these as -PENDING_INVITATIONS = Pending invitations -REMOVE_MEMBER = Remove "${memberName}" from the list of members -SELECT_ROLE_FOR_USER = Select role for ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD = Select users and groups to add -SHARE_WITH = Share with diff --git a/node_modules/oae-core/setpermissions/bundles/es_ES.properties b/node_modules/oae-core/setpermissions/bundles/es_ES.properties deleted file mode 100644 index 739e76dacb8..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/es_ES.properties +++ /dev/null @@ -1,8 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=A\u00f1adir m\u00e1s -ADD_THESE_AS=A\u00f1adir estos como -PENDING_INVITATIONS=Invitaciones pendientes -REMOVE_MEMBER=Eliminar "${memberName}" de la lista de miembros -SELECT_ROLE_FOR_USER=Seleccione un rol para ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Seleccione los usuarios y grupos para a\u00f1adir -SHARE_WITH=Compartir con diff --git a/node_modules/oae-core/setpermissions/bundles/fi_FI.properties b/node_modules/oae-core/setpermissions/bundles/fi_FI.properties deleted file mode 100644 index 55ef15863dd..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/fi_FI.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Lis\u00e4\u00e4 -ADD_THESE_AS=Lis\u00e4\u00e4 n\u00e4m\u00e4 nimell\u00e4 -PENDING_INVITATIONS=Odottavia kutsuja -REMOVE_MEMBER=Poista "${memberName}" j\u00e4senluettelosta -SELECT_ROLE_FOR_USER=Valitse rooli j\u00e4senelle ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Valitse lis\u00e4tt\u00e4vi\u00e4 k\u00e4ytt\u00e4ji\u00e4 ja ryhmi\u00e4 diff --git a/node_modules/oae-core/setpermissions/bundles/fr_FR.properties b/node_modules/oae-core/setpermissions/bundles/fr_FR.properties deleted file mode 100644 index 38a9f858000..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/fr_FR.properties +++ /dev/null @@ -1,8 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Ajouter d'autres -ADD_THESE_AS=Ajoutez-les comme -PENDING_INVITATIONS=Invitations en cours -REMOVE_MEMBER=Retirer "${memberName}" de la liste des membres -SELECT_ROLE_FOR_USER=S\u00e9lectionner un r\u00f4le pour ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=S\u00e9lectionner les utilisateurs et groupes \u00e0 ajouter. -SHARE_WITH=Partager avec diff --git a/node_modules/oae-core/setpermissions/bundles/hi_IN.properties b/node_modules/oae-core/setpermissions/bundles/hi_IN.properties deleted file mode 100644 index 8a5791047f1..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/hi_IN.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=\u0914\u0930 \u0905\u0927\u093f\u0915 \u091c\u094b\u0921\u093c\u0947\u0902 -ADD_THESE_AS=\u0915\u0947 \u0930\u0942\u092a \u092e\u0947\u0902 \u0907\u0928 \u091c\u094b\u0921\u093c -REMOVE_MEMBER="${memberName}" \u0938\u0926\u0938\u094d\u092f\u094b\u0902 \u0915\u0940 \u0938\u0942\u091a\u0940 \u0938\u0947 \u0928\u093f\u0915\u093e\u0932\u0947\u0902 -SELECT_ROLE_FOR_USER=${memberName} \u0915\u0947 \u0932\u093f\u090f \u091a\u092f\u0928 \u092d\u0942\u092e\u093f\u0915\u093e -SELECT_USERS_AND_GROUPS_TO_ADD=\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e\u0913\u0902 \u0914\u0930 \u0938\u092e\u0942\u0939\u094b\u0902 \u0915\u094b \u091c\u094b\u0921\u093c\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0915\u093e \u091a\u092f\u0928 \u0915\u0930\u0947\u0902 -SHARE_WITH=\u0915\u0947 \u0938\u093e\u0925 \u0938\u093e\u091d\u093e \u0915\u0930\u0947\u0902 diff --git a/node_modules/oae-core/setpermissions/bundles/nl_NL.properties b/node_modules/oae-core/setpermissions/bundles/nl_NL.properties deleted file mode 100644 index 0e9ee1bada2..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/nl_NL.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Meer toevoegen -ADD_THESE_AS=Deze toevoegen als -REMOVE_MEMBER=Verwijder "${memberName}" van deelnemerslijst -SELECT_ROLE_FOR_USER=Selecteer rol voor ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Selecteer gebruikers en groepen om toe te voegen -SHARE_WITH=Delen met diff --git a/node_modules/oae-core/setpermissions/bundles/pl_PL.properties b/node_modules/oae-core/setpermissions/bundles/pl_PL.properties deleted file mode 100644 index 7a65ab83d76..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/pl_PL.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Dodaj wi\u0119cej -ADD_THESE_AS=Dodaj te jako -REMOVE_MEMBER=Usu\u0144 "${memberName}" z listy cz\u0142onk\u00f3w -SELECT_ROLE_FOR_USER=Wybierz funkcj\u0119 dla ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Wybierz u\u017cytkownik\u00f3w i grupy do dodania -SHARE_WITH=Podziel si\u0119 z diff --git a/node_modules/oae-core/setpermissions/bundles/pt_BR.properties b/node_modules/oae-core/setpermissions/bundles/pt_BR.properties deleted file mode 100644 index 1ace338a563..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/pt_BR.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Adicionar mais -ADD_THESE_AS=Adicion\u00e1-los como -REMOVE_MEMBER=Remover "${memberName}" da lista de membros -SELECT_ROLE_FOR_USER=Selecione a fun\u00e7\u00e3o para ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Selecione usu\u00e1rios e grupos para adicionar -SHARE_WITH=Compartilhar com diff --git a/node_modules/oae-core/setpermissions/bundles/ru_RU.properties b/node_modules/oae-core/setpermissions/bundles/ru_RU.properties deleted file mode 100644 index 1beb4db5461..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/ru_RU.properties +++ /dev/null @@ -1,8 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0451 -ADD_THESE_AS=\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 -PENDING_INVITATIONS=\u0412\u044b\u0436\u0438\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 -REMOVE_MEMBER=\u0423\u0434\u0430\u043b\u0438\u0442\u044c "${memberName}" \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 -SELECT_ROLE_FOR_USER=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u043e\u043b\u044c \u0434\u043b\u044f ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f -SHARE_WITH=\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 diff --git a/node_modules/oae-core/setpermissions/bundles/sv_SE.properties b/node_modules/oae-core/setpermissions/bundles/sv_SE.properties deleted file mode 100644 index ab2a4dd81ac..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/sv_SE.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=L\u00e4gg till fler -ADD_THESE_AS=L\u00e4gg till dessa som -REMOVE_MEMBER=Ta bort "${memberName}" fr\u00e5n listan \u00f6ver medlemmar -SELECT_ROLE_FOR_USER=V\u00e4lj roll f\u00f6r ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=V\u00e4lj anv\u00e4ndare och grupper att l\u00e4gga till -SHARE_WITH=Dela med diff --git a/node_modules/oae-core/setpermissions/bundles/tr_TR.properties b/node_modules/oae-core/setpermissions/bundles/tr_TR.properties deleted file mode 100644 index 01037672c80..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/tr_TR.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Daha fazla ekle -ADD_THESE_AS=Bunlar\u0131 farkl\u0131 ekle -PENDING_INVITATIONS=Bekleyen davetler -REMOVE_MEMBER="${memberName}" \u00fcyeleri \u00fcye listesinden \u00e7\u0131kar -SELECT_ROLE_FOR_USER=${memberName} i\u00e7in rol se\u00e7 -SELECT_USERS_AND_GROUPS_TO_ADD=Eklenecek kullan\u0131c\u0131 ve gruplar\u0131 se\u00e7 diff --git a/node_modules/oae-core/setpermissions/bundles/uk_UA.properties b/node_modules/oae-core/setpermissions/bundles/uk_UA.properties deleted file mode 100644 index 362d1b28f64..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/uk_UA.properties +++ /dev/null @@ -1,8 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=\u0414\u043e\u0434\u0430\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 -ADD_THESE_AS=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u0438 \u0457\u0445 \u044f\u043a -PENDING_INVITATIONS=\u041e\u0447\u0456\u043a\u0443\u044e\u0447\u0435 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044f -REMOVE_MEMBER=\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 "${memberName}" \u0437\u0456 \u0441\u043f\u0438\u0441\u043a\u0443 \u0443\u0447\u0430\u0441\u043d\u0438\u043a\u0456\u0432 -SELECT_ROLE_FOR_USER=\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0440\u043e\u043b\u044c \u0434\u043b\u044f ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=\u041e\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432 \u0456 \u0433\u0440\u0443\u043f\u0438 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044f -SHARE_WITH=\u041f\u043e\u0434\u0456\u043b\u0438\u0442\u0438\u0441\u044f \u0437 diff --git a/node_modules/oae-core/setpermissions/bundles/val_ES.properties b/node_modules/oae-core/setpermissions/bundles/val_ES.properties deleted file mode 100644 index 1c7c69f058b..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/val_ES.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=Afegir m\u00e9s -ADD_THESE_AS=Afegir estos com -REMOVE_MEMBER=Eliminar "${memberName}" de la llista de membres -SELECT_ROLE_FOR_USER=Selecciona el rol per a ${memberName} -SELECT_USERS_AND_GROUPS_TO_ADD=Selecciona els usuaris i els grups a afegir -SHARE_WITH=Compartir amb diff --git a/node_modules/oae-core/setpermissions/bundles/zh_CN.properties b/node_modules/oae-core/setpermissions/bundles/zh_CN.properties deleted file mode 100644 index f4e618b7e59..00000000000 --- a/node_modules/oae-core/setpermissions/bundles/zh_CN.properties +++ /dev/null @@ -1,7 +0,0 @@ -#X-Generator: crowdin.com -ADD_MORE=\u6dfb\u52a0\u66f4\u591a -ADD_THESE_AS=\u6dfb\u52a0\u8fd9\u4e9b\u4f5c\u4e3a -REMOVE_MEMBER=\u4ece\u6210\u5458\u5217\u8868\u4e2d\u5220\u9664"${memberName}" -SELECT_ROLE_FOR_USER=\u4e3a${memberName} \u9009\u62e9\u7528\u6237\u7c7b\u522b -SELECT_USERS_AND_GROUPS_TO_ADD=\u9009\u62e9\u8981\u6dfb\u52a0\u7684\u7528\u6237\u548c\u7ec4 -SHARE_WITH=\u5171\u4eab\u4e8e diff --git a/node_modules/oae-core/setpermissions/manifest.json b/node_modules/oae-core/setpermissions/manifest.json index 1ae6afa291d..cfa2bc3a981 100644 --- a/node_modules/oae-core/setpermissions/manifest.json +++ b/node_modules/oae-core/setpermissions/manifest.json @@ -1,23 +1,3 @@ { - "i18n": { - "af_ZA": "bundles/af_ZA.properties", - "ca_ES": "bundles/ca_ES.properties", - "cy_GB": "bundles/cy_GB.properties", - "de_DE": "bundles/de_DE.properties", - "default": "bundles/default.properties", - "es_ES": "bundles/es_ES.properties", - "fi_FI": "bundles/fi_FI.properties", - "fr_FR": "bundles/fr_FR.properties", - "hi_IN": "bundles/hi_IN.properties", - "nl_NL": "bundles/nl_NL.properties", - "pl_PL": "bundles/pl_PL.properties", - "pt_BR": "bundles/pt_BR.properties", - "ru_RU": "bundles/ru_RU.properties", - "sv_SE": "bundles/sv_SE.properties", - "tr_TR": "bundles/tr_TR.properties", - "uk_UA": "bundles/uk_UA.properties", - "val_ES": "bundles/val_ES.properties", - "zh_CN": "bundles/zh_CN.properties" - }, "src": "setpermissions.html" } diff --git a/shared/oae/bundles/ui/default.properties b/shared/oae/bundles/ui/default.properties index a8b7056e63d..84878394fac 100644 --- a/shared/oae/bundles/ui/default.properties +++ b/shared/oae/bundles/ui/default.properties @@ -288,6 +288,8 @@ ACTIVITY_MEETING_VISIBILITY_PRIVATE = ${actor1Link} changed the visibility of th ACTIVITY_MEETING_VISIBILITY_PUBLIC = ${actor1Link} changed the visibility of the meeting "${object1Link}" to public ADD = Add ADD_LTI_TOOL = Add LTI tool +ADD_MORE = Add more +ADD_THESE_AS = Add these as ADD_TO_FOLDER = Add to folder ADMINISTRATION_PANEL = Administration Panel ALIAS_COLON = Alias: @@ -569,6 +571,7 @@ PASSWORD_COLON = Password: PASSWORD_NOT_UPDATED = Password not updated. PASSWORD_UPDATED = Password updated. PDF_DOCUMENT = PDF document +PENDING_INVITATIONS = Pending invitations PEOPLE = People PLAY_VIDEO = Play video PLEASE_ACCEPT_THE_TERMS_AND_CONDITIONS = Please accept the Terms and Conditions @@ -616,6 +619,7 @@ REDIRECTING_TO_TENANT = Redirecting to ${displayName} REFINE_YOUR_SEARCH_COLON = Refine your search: REFINE_BY_CREATOR_COLON = Refine by creator: REMOVE_FROM_SELECTION = Remove from selection +REMOVE_MEMBER = Remove "${memberName}" from the list of members REPLY = Reply RESTORE = Restore REST_API = REST API @@ -631,7 +635,10 @@ SEARCH_ONLY_WITHIN_COLON = Search only within: SEARCH_QUERY_EMPTY = No results could be found for the query "${query}" SEARCH_RESULTS = Search results SELECT_ALL = Select all +SELECT_ROLE_FOR_USER = Select role for ${memberName} +SELECT_USERS_AND_GROUPS_TO_ADD = Select users and groups to add SHARE = Share +SHARE_WITH = Share with SHARED_WITH = Shared with SIGNING_IN = Signing in ... SIGN_IN = Sign in diff --git a/shared/oae/bundles/ui/fr_FR.properties b/shared/oae/bundles/ui/fr_FR.properties index 0449791cd2f..698f15c7f51 100644 --- a/shared/oae/bundles/ui/fr_FR.properties +++ b/shared/oae/bundles/ui/fr_FR.properties @@ -255,6 +255,8 @@ ACTIVITY_INVITE_GROUP_1=${actor1Link} vous a invit\u00e9 \u00e0 acc\u00e9der au ACTIVITY_INVITE_GROUP_2=${actor1Link} vous a invit\u00e9 \u00e0 acc\u00e9der aux groupes "${target1Link}" et "${target2Link}" ACTIVITY_INVITE_GROUP_2+=${actor1Link} vous a invit\u00e9 \u00e0 acc\u00e9der au groupe "${target1Link}" et \u00e0 ${targetCountMinusOne} autres ADD=Ajouter +ADD_MORE=Ajouter d'autres +ADD_THESE_AS=Ajoutez-les comme ADD_TO_FOLDER=Ajouter au dossier ADMINISTRATION_PANEL=Panneau d'administration ALIAS_COLON=Alias \: @@ -505,6 +507,7 @@ PASSWORD_COLON=Mot de passe \: PASSWORD_NOT_UPDATED=Mot de passe non mis \u00e0 jour. PASSWORD_UPDATED=Mot de passe mis \u00e0 jour. PDF_DOCUMENT=Document PDF +PENDING_INVITATIONS=Invitations en cours PEOPLE=Utilisateurs PLAY_VIDEO=Lire la vid\u00e9o PLEASE_ACCEPT_THE_TERMS_AND_CONDITIONS=Veuillez accepter les termes et conditions @@ -551,6 +554,7 @@ RECENT_ACTIVITY=Activit\u00e9 r\u00e9cente REDIRECTING_TO_TENANT=Redirection vers ${displayName} REFINE_YOUR_SEARCH_COLON=Affinez votre recherche \: REMOVE_FROM_SELECTION=Supprimer de la s\u00e9l\u00e9ction +REMOVE_MEMBER=Retirer "${memberName}" de la liste des membres REPLY=R\u00e9pondre RESTORE=Restaurer REST_API=REST API @@ -566,7 +570,10 @@ SEARCH_ONLY_WITHIN_COLON=Rechercher uniquement dans \: SEARCH_QUERY_EMPTY=Votre recherche "${query}" n\u2019a renvoy\u00e9 aucun r\u00e9sultat SEARCH_RESULTS=R\u00e9sultats de la recherche SELECT_ALL=Tout s\u00e9lectionner +SELECT_ROLE_FOR_USER=S\u00e9lectionner un r\u00f4le pour ${memberName} +SELECT_USERS_AND_GROUPS_TO_ADD=S\u00e9lectionner les utilisateurs et groupes \u00e0 ajouter. SHARE=Partager +SHARE_WITH=Partager avec SHARED_WITH=Partag\u00e9 avec SIGNING_IN=Connexion... SIGN_IN=Se connecter