Now using shareOwner for the share owner
Makes it consistent with the regular file list fileData
This commit is contained in:
parent
0944565f60
commit
640fbc016d
|
@ -46,7 +46,7 @@
|
||||||
$tr.find('td.filename input:checkbox').remove();
|
$tr.find('td.filename input:checkbox').remove();
|
||||||
$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','));
|
$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','));
|
||||||
if (this._sharedWithUser) {
|
if (this._sharedWithUser) {
|
||||||
$tr.attr('data-share-owner', fileData.shares[0].ownerDisplayName);
|
$tr.attr('data-share-owner', fileData.shareOwner);
|
||||||
}
|
}
|
||||||
return $tr;
|
return $tr;
|
||||||
},
|
},
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
stime: share.stime * 1000,
|
stime: share.stime * 1000,
|
||||||
};
|
};
|
||||||
if (self._sharedWithUser) {
|
if (self._sharedWithUser) {
|
||||||
file.share.ownerDisplayName = share.displayname_owner;
|
file.shareOwner = share.displayname_owner;
|
||||||
file.name = OC.basename(share.file_target);
|
file.name = OC.basename(share.file_target);
|
||||||
file.path = OC.dirname(share.file_target);
|
file.path = OC.dirname(share.file_target);
|
||||||
file.permissions = share.permissions;
|
file.permissions = share.permissions;
|
||||||
|
|
|
@ -122,9 +122,7 @@ describe('OCA.Sharing.App tests', function() {
|
||||||
type: 'dir',
|
type: 'dir',
|
||||||
path: '/somewhere/inside/subdir',
|
path: '/somewhere/inside/subdir',
|
||||||
counterParts: ['user2'],
|
counterParts: ['user2'],
|
||||||
shares: [{
|
shareOwner: 'user2'
|
||||||
ownerDisplayName: 'user2'
|
|
||||||
}]
|
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
fileListIn.findFileEl('testdir').find('td a.name').click();
|
fileListIn.findFileEl('testdir').find('td a.name').click();
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
describe('OCA.Sharing.FileList tests', function() {
|
describe('OCA.Sharing.FileList tests', function() {
|
||||||
var testFiles, alertStub, notificationStub, fileList;
|
var testFiles, alertStub, notificationStub, fileList, fileActions;
|
||||||
|
var oldFileListPrototype;
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
alertStub = sinon.stub(OC.dialogs, 'alert');
|
alertStub = sinon.stub(OC.dialogs, 'alert');
|
||||||
|
@ -45,10 +46,17 @@ describe('OCA.Sharing.FileList tests', function() {
|
||||||
'<div id="emptycontent">Empty content message</div>' +
|
'<div id="emptycontent">Empty content message</div>' +
|
||||||
'</div>'
|
'</div>'
|
||||||
);
|
);
|
||||||
|
// back up prototype, as it will be extended by
|
||||||
|
// the sharing code
|
||||||
|
oldFileListPrototype = _.extend({}, OCA.Files.FileList.prototype);
|
||||||
|
fileActions = new OCA.Files.FileActions();
|
||||||
|
OCA.Sharing.Util.initialize(fileActions);
|
||||||
});
|
});
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
|
OCA.Files.FileList.prototype = oldFileListPrototype;
|
||||||
testFiles = undefined;
|
testFiles = undefined;
|
||||||
fileList = undefined;
|
fileList = undefined;
|
||||||
|
fileActions = undefined;
|
||||||
|
|
||||||
notificationStub.restore();
|
notificationStub.restore();
|
||||||
alertStub.restore();
|
alertStub.restore();
|
||||||
|
|
Loading…
Reference in New Issue