Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jkmarx/details owner name bug #1839

Merged
merged 34 commits into from
Jun 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1b2a6d4
Enable pinning of select and input group columns.
jkmarx Jun 20, 2017
45d62d5
Add highlights and keep icon blue.
jkmarx Jun 20, 2017
3ff1957
Show template and input file.
jkmarx Jun 20, 2017
93effc2
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Jun 20, 2017
bccd7dd
Add basic functionality for reindexing.
jkmarx Jun 21, 2017
56e51aa
Add depthNames data and replace types.
jkmarx Jun 21, 2017
6f5cede
Add library which was accidently deleted. (#1821)
jkmarx Jun 22, 2017
b714e52
Merge branch 'jkmarx/loop-names' of https://github.com/refinery-platf…
jkmarx Jun 22, 2017
9a9e1eb
Reindex node set collection.
jkmarx Jun 22, 2017
c6feb3d
Fix width of popover to prevent arrow jump.
jkmarx Jun 22, 2017
33ef8fc
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Jun 22, 2017
895317e
Update selection obj.
jkmarx Jun 22, 2017
a067408
Refactor collection to own methods.
jkmarx Jun 22, 2017
4131d85
Fix bug.
jkmarx Jun 23, 2017
d9e9ccb
Fix pair checkbox.
jkmarx Jun 23, 2017
679456a
Add comments
jkmarx Jun 23, 2017
b6fe7d1
Remove unused method.
jkmarx Jun 23, 2017
a735ff9
Add comments.
jkmarx Jun 23, 2017
16cb16c
Remove comment.
jkmarx Jun 23, 2017
8517a14
Fix color issue associate on deselecting a node.
jkmarx Jun 23, 2017
a5cbd99
Fix bug with popover and missing nav.
jkmarx Jun 23, 2017
1850f6a
Hide remove button for 1 depth tools.
jkmarx Jun 23, 2017
eccd5b0
Adjust text.
jkmarx Jun 26, 2017
ab1d499
Fix merge conflicts.
jkmarx Jun 26, 2017
07f5eb3
Fix unit test.
jkmarx Jun 26, 2017
6091b25
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Jun 26, 2017
42c4c74
Adjust placement of table config.
jkmarx Jun 26, 2017
c541fcd
Merge branch 'jkmarx/missing-nav-bar-bug' of https://github.com/refin…
jkmarx Jun 26, 2017
6c3d3c9
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Jun 26, 2017
b274a05
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Jun 26, 2017
7592fcd
Add error check and update html.
jkmarx Jun 26, 2017
e5f341b
Remove console.
jkmarx Jun 26, 2017
9d2f6a7
Remove typo.
jkmarx Jun 27, 2017
01315fb
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Jun 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 14 additions & 13 deletions refinery/ui/source/js/commons/services/users.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

function userFactory ($q, $resource, settings) {
function userFactory ($q, $resource, _, settings) {
var userService = {};
var userResource = $resource(
settings.appRoot + settings.refineryApi + '/users/:uuid/',
Expand Down Expand Up @@ -45,17 +45,18 @@ function userFactory ($q, $resource, settings) {
userService.get = function (uuid) {
if (store[uuid] === undefined) {
return getUserData(uuid).then(function (data) {
store[uuid] = {
affiliation: data.affiliation,
email: data.user.email,
firstName: data.user.first_name,
fullName: (data.user.first_name + ' ' + data.user.last_name).trim(),
lastName: data.user.last_name,
userId: data.user.id,
userName: data.user.username,
userProfileUuid: data.uuid
};

if (_.has(data, 'user')) {
store[uuid] = {
affiliation: data.affiliation,
email: data.user.email,
firstName: data.user.first_name,
fullName: (data.user.first_name + ' ' + data.user.last_name).trim(),
lastName: data.user.last_name,
userId: data.user.id,
userName: data.user.username,
userProfileUuid: data.uuid
};
}
return store[uuid];
});
}
Expand All @@ -67,4 +68,4 @@ function userFactory ($q, $resource, settings) {

angular
.module('refineryApp')
.factory('userService', ['$q', '$resource', 'settings', userFactory]);
.factory('userService', ['$q', '$resource', '_', 'settings', userFactory]);
8 changes: 5 additions & 3 deletions refinery/ui/source/js/data-set-about/ctrls/sharing-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ function AboutSharingCtrl (
$scope,
$location,
$window,
$log
$log,
_
) {
var vm = this;
vm.dataSetSharing = dataSetAboutFactory.dataSetSharing;
Expand All @@ -29,9 +30,9 @@ function AboutSharingCtrl (

vm.refreshOwnerName = function (userUuid) {
userService.get(userUuid).then(function (response) {
if (response.fullName) {
if (_.has(response, 'fullName') && response.fullName) {
vm.ownerName = response.fullName;
} else {
} else if (_.has(response, 'userName') && response.userName) {
vm.ownerName = response.userName;
}
});
Expand All @@ -51,6 +52,7 @@ angular
'$location',
'$window',
'$log',
'_',
AboutSharingCtrl
]);

3 changes: 3 additions & 0 deletions refinery/ui/source/js/data-set-about/partials/sharing.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ <h4>Owner</h4>
{{ ASCtrl.ownerName }}
</a>
</span>
<span ng-if="!ASCtrl.dataSetSharing.is_owner && !ASCtrl.ownerName">
<em>Owner's information not available.</em>
</span>
</p>

<div ng-if="ASCtrl.groupList.length > 0">
Expand Down