aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-03-30 18:09:02 +0200
committerVincent Petry <pvince81@owncloud.com>2016-03-30 18:09:02 +0200
commita9aa39efbfc676aa7988a02c336adc4ef5b3b7e8 (patch)
treedd8cd51e55f85a45ff986a37eca3600fbdbdacc3 /apps/files_sharing
parent66ee9d56fca2d4d586726d4654b761e03d7c69d2 (diff)
downloadnextcloud-server-a9aa39efbfc676aa7988a02c336adc4ef5b3b7e8.tar.gz
nextcloud-server-a9aa39efbfc676aa7988a02c336adc4ef5b3b7e8.zip
Fix displaying owner before share icon in file list
Initial display of owner was missing
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/share.js5
-rw-r--r--apps/files_sharing/tests/js/shareSpec.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index a253763389c..5bfc8e1d4a2 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -111,8 +111,9 @@
_.each($files, function(file) {
var $tr = $(file);
- var shareTypes = $tr.attr('data-share-types');
- if (shareTypes) {
+ var shareTypes = $tr.attr('data-share-types') || '';
+ var shareOwner = $tr.attr('data-share-owner');
+ if (shareTypes || shareOwner) {
var hasLink = false;
var hasShares = false;
_.each(shareTypes.split(',') || [], function(shareType) {
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js
index c488bd94fab..c34234bfe13 100644
--- a/apps/files_sharing/tests/js/shareSpec.js
+++ b/apps/files_sharing/tests/js/shareSpec.js
@@ -141,7 +141,7 @@ describe('OCA.Sharing.Util tests', function() {
permissions: OC.PERMISSION_ALL,
shareOwner: 'User One',
etag: 'abc',
- shareTypes: [OC.Share.SHARE_TYPE_USER]
+ shareTypes: []
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');