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/data set2 indicator column #1688

Merged
merged 113 commits into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
79dc894
Fix spacing
jkmarx Mar 29, 2017
c08e84d
Update partial to view for clarity.
jkmarx Mar 29, 2017
5ac8f4e
Fix typo.
jkmarx Mar 29, 2017
3eb44c2
Swap cart and control panel.
jkmarx Mar 29, 2017
cd4f197
Display control panel tree.
jkmarx Mar 31, 2017
185c9ad
Remove temp selected file display.
jkmarx Mar 31, 2017
4804a41
Add pair styling.
jkmarx Mar 31, 2017
dd620f0
Tweak css.
jkmarx Apr 4, 2017
a3f4266
Add file relationship service and depth.
jkmarx Apr 4, 2017
fe144a8
Fix counters for each group.
jkmarx Apr 5, 2017
3f74156
Display selected nodes.
jkmarx Apr 5, 2017
acf4682
Move input group into control directive.
jkmarx Apr 5, 2017
b80fd38
Fix mapping function.
jkmarx Apr 5, 2017
7612cf6
Fix currentTypes generation.
jkmarx Apr 5, 2017
350d343
Max pairs length.
jkmarx Apr 6, 2017
5a627e9
Remove console logs
jkmarx Apr 6, 2017
751aeb9
Trigger current position change when a new tool is selected.
jkmarx Apr 6, 2017
92de38c
Fix scope bug due to factory.
jkmarx Apr 6, 2017
cc44288
Add comments.
jkmarx Apr 6, 2017
ac57907
Remove cloak.
jkmarx Apr 6, 2017
c559bda
Add unit test.
jkmarx Apr 6, 2017
18b176d
Move attribute generation to service.
jkmarx Apr 6, 2017
f6d4506
Put method calls into activate method per style guide.
jkmarx Apr 6, 2017
fc64a97
Style guide changes.
jkmarx Apr 6, 2017
d47a34d
Add a popover to the selection grid.
jkmarx Apr 6, 2017
3a9aaae
Close popover when not clicking on row.
jkmarx Apr 6, 2017
d1229f7
Add popover with custom template.
jkmarx Apr 7, 2017
b892f80
Modify template to only open one popover at a time.
jkmarx Apr 7, 2017
a8a589a
rename method for clarity.
jkmarx Apr 7, 2017
55f1ed7
Use jqlite instead.
jkmarx Apr 7, 2017
4c6ff67
Add template to ui-grid selection.
jkmarx Apr 10, 2017
1fca5b2
Add checkbox selection.
jkmarx Apr 11, 2017
b348072
Grab current uuids from service and dynamically create obj.
jkmarx Apr 11, 2017
aaa5bea
Move input groups to service.
jkmarx Apr 12, 2017
230d0e0
Add a left float, unstyle list class.
jkmarx Apr 12, 2017
6fea3ac
Show current group.
jkmarx Apr 12, 2017
c858343
Rename variable for clarity.
jkmarx Apr 12, 2017
d1ed2f5
Add data object to track current group's nodes.
jkmarx Apr 12, 2017
f70c4c3
Remove buttons for now.
jkmarx Apr 12, 2017
27a22ae
Refactor according to style guide.
jkmarx Apr 13, 2017
1196b55
Change method and variable name for clarity.
jkmarx Apr 13, 2017
977d36e
Move selection obj to node-service.
jkmarx Apr 13, 2017
2f52eb5
Fix bug which requires deep copy.
jkmarx Apr 13, 2017
d35074d
Fix bug with removing selected nodes.
jkmarx Apr 13, 2017
47ac441
Add comments.
jkmarx Apr 13, 2017
f9976ed
fix button css
jkmarx Apr 13, 2017
bc2cf31
Refactor and added comments.
jkmarx Apr 13, 2017
19721bd
Update title.
jkmarx Apr 13, 2017
f183a1a
Add unit for ctrl.
jkmarx Apr 13, 2017
e889476
Add iffy
jkmarx Apr 13, 2017
0dec4c0
Add directive unit test.
jkmarx Apr 13, 2017
9ddb21b
Add line break for readability.
jkmarx Apr 13, 2017
fd3f0ec
Add another directive unit test and remove unused variable.
jkmarx Apr 13, 2017
08446d2
Merge conflict.
jkmarx Apr 13, 2017
2cb43fd
Update unit test.
jkmarx Apr 13, 2017
3db4b3f
Fix typo in view location.
jkmarx Apr 14, 2017
49a0a7f
Fix unit test.
jkmarx Apr 14, 2017
edcd49e
Add comments.
jkmarx Apr 14, 2017
66a6afa
Fix unit tests.
jkmarx Apr 14, 2017
74e703b
Add file relationship test.
jkmarx Apr 14, 2017
47b42f1
Fix bug due to merge.
jkmarx Apr 14, 2017
37621bc
Update directive with static url method.
jkmarx Apr 14, 2017
1bc6927
Remove unneccessary files.
jkmarx Apr 14, 2017
90c8394
Fix formatting.
jkmarx Apr 14, 2017
63fd1a6
Reflect selection in control panel.
jkmarx Apr 14, 2017
8f03ead
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Apr 14, 2017
e7ed6f0
Remove recursive directive and rename for clarity.
jkmarx Apr 18, 2017
85394a0
Reorder and used service for control panel.
jkmarx Apr 18, 2017
0deb51c
Fix indexing.
jkmarx Apr 18, 2017
1de3022
Add css.
jkmarx Apr 18, 2017
13306f9
Add borders to templates.
jkmarx Apr 19, 2017
91511f0
Fix orderby .
jkmarx Apr 19, 2017
2cb50ef
Remove current input group.
jkmarx Apr 19, 2017
76c2b5c
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Apr 19, 2017
ec7f84d
Add unit test.
jkmarx Apr 19, 2017
03fd10c
Consolidate components.
jkmarx Apr 19, 2017
8e8288b
Disable remove/removeAll if groups are empty.
jkmarx Apr 19, 2017
acad3fe
Reorder variable and comment.
jkmarx Apr 19, 2017
06a842c
Remove hr to keep styling consistent.
jkmarx Apr 19, 2017
70917e6
Delete obj properties when empty.
jkmarx Apr 19, 2017
eed7b93
Split pair portion.
jkmarx Apr 19, 2017
ad06726
Seperate pair/list section.
jkmarx Apr 20, 2017
ee0c5f1
Update selectionObj reference.
jkmarx Apr 20, 2017
c727cd8
Adjust css.
jkmarx Apr 20, 2017
e941243
Fix merge conflict.
jkmarx Apr 20, 2017
02b6516
Fix deselect checkbox when clearing group.
jkmarx Apr 21, 2017
b6cc9b1
Add list structure to control panel.
jkmarx Apr 21, 2017
303fdc1
Fix bug with popover.
jkmarx Apr 23, 2017
e59211b
Fix remove and deselect bug.
jkmarx Apr 23, 2017
4390ff5
Add comments.
jkmarx Apr 24, 2017
12f82c6
Turn off select all.
jkmarx Apr 24, 2017
24ce9a9
Add comments and unit tests.
jkmarx Apr 24, 2017
ddb4c60
Add comment.
jkmarx Apr 24, 2017
8b4bea1
Remove unused igv and visualization module.
jkmarx Apr 24, 2017
54a09d4
Remove from refinery app.
jkmarx Apr 24, 2017
b49af72
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Apr 24, 2017
da9bbcd
Update api endpoint.
jkmarx Apr 24, 2017
8a9de4b
Remove default stylin for selected rows.
jkmarx Apr 24, 2017
499a60b
Remove default selection.
jkmarx Apr 24, 2017
991b7c3
Remove console.log.
jkmarx Apr 24, 2017
6ec162b
Remove reference to the ui-grid node selections.
jkmarx Apr 24, 2017
f42e995
Update unit test.
jkmarx Apr 24, 2017
ca5e4ce
Update name for clarity.
jkmarx Apr 24, 2017
9d87cd8
Merge branch 'develop' of https://github.com/refinery-platform/refine…
jkmarx Apr 24, 2017
a33dd1d
Add custom input group template.
jkmarx Apr 25, 2017
2453953
Darken arrow if row is selected.
jkmarx Apr 25, 2017
0233b64
Add dark arrow if popover is open.
jkmarx Apr 25, 2017
fb3c18e
Fix bug cause by shallow copy.
jkmarx Apr 25, 2017
e4c55b2
Fix update ui-grid when remove/remove all.
jkmarx Apr 25, 2017
810ef67
Resolve merge conflict.
jkmarx Apr 26, 2017
cc9202b
Css to hide overflow in group list.
jkmarx Apr 26, 2017
b6b7da3
Reorder and comment.
jkmarx Apr 26, 2017
a12d42b
Add comments.
jkmarx Apr 26, 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
26 changes: 25 additions & 1 deletion refinery/ui/source/js/file-browser/ctrls/ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'fileBrowserFactory',
'fileBrowserSettings',
'filesLoadingService',
'fileRelationshipService',
'isOwnerService',
'resetGridService',
'selectedFilterService',
Expand All @@ -37,15 +38,17 @@
fileBrowserFactory,
fileBrowserSettings,
filesLoadingService,
fileRelationshipService,
isOwnerService,
resetGridService,
selectedFilterService,
selectedNodesService
) {
var maxFileRequest = fileBrowserSettings.maxFileRequest;
var nodesService = selectedNodesService;
var fileService = fileRelationshipService;
var vm = this;

vm.activeNodeRow = nodesService.activeNodeRow;
// flag to help with timing issues when selecting node group
vm.afterNodeGroupUpdate = false;
vm.analysisFilter = fileBrowserFactory.analysisFilter;
Expand Down Expand Up @@ -85,6 +88,7 @@
};
vm.gridOptions.onRegisterApi = gridRegister;
vm.lastPage = 0; // variable supporting ui-grid dynamic scrolling
vm.nodeSelectCollection = fileService.nodeSelectCollection;
vm.openSelectionPopover = openSelectionPopover;
vm.queryKeys = Object.keys($location.search()); // used for preset filters
vm.refreshAssayFiles = refreshAssayFiles;
Expand Down Expand Up @@ -243,6 +247,7 @@
*/
function openSelectionPopover (nodeRow) {
angular.copy(nodeRow, nodesService.activeNodeRow);
vm.activeNodeRow = nodesService.activeNodeRow;
angular.element('#' + nodeRow.uuid).popover('show');
angular.element('.ui-grid-selection-row-header-buttons').popover('disable');
}
Expand Down Expand Up @@ -475,5 +480,24 @@
}
}
);
// when a new row is selected/deselected
$scope.$watch(
function () {
return nodesService.activeNodeRow;
},
function () {
vm.activeNodeRow = nodesService.activeNodeRow;
}
);

// when a node is added/removed from a tool input group
$scope.$watchCollection(
function () {
return fileService.nodeSelectCollection;
},
function () {
vm.nodeSelectCollection = fileService.nodeSelectCollection;
}
);
}
})();
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@
vm.nodeSelection = fileService.nodeSelectCollection;
}
);
// When user selects/deselects row
$scope.$watch(
function () {
return nodeService.activeNodeRow;
},
function () {
vm.activeRow = nodeService.activeNodeRow;
}
);
// When user changes the group selection from the control panel
$scope.$watchCollection(
function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@
'$compile',
'$rootScope',
'$templateCache',
'fileRelationshipService'
'fileRelationshipService',
'selectedNodesService'
];

function rpNodeSelectionPopover (
$compile,
$rootScope,
$templateCache,
fileRelationshipService
fileRelationshipService,
selectedNodesService
) {
return {
restrict: 'AE',
link: function (scope, element) {
var fileService = fileRelationshipService;
var nodesService = selectedNodesService;
// The script is in the data_set2.html template.
var template = $templateCache.get('nodeselectionpopover.html');
var popOverContent = $compile(template)(scope);
Expand All @@ -35,7 +38,9 @@
};
angular.element(element).popover(options);

// Method for resetting the selected now and hiding the popover
scope.closeSelectionPopover = function () {
angular.copy({}, nodesService.activeNodeRow);
angular.element('.popover').popover('hide');
angular.element('.ui-grid-selection-row-header-buttons').popover('enable');
};
Expand Down
57 changes: 48 additions & 9 deletions refinery/ui/source/js/file-browser/services/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ function fileBrowserFactory (
angular.copy(culledAttributes, assayAttributes);
// Add file_download column first
assayAttributes.unshift({ display_name: 'Url', internal_name: 'Url' });
assayAttributes.unshift({ display_name: 'Input Groups', internal_name: 'InputGroups' });
assayAttributes.unshift({ display_name: 'Selection', internal_name: 'Selection' });

// some attributes will be duplicate in different fields, duplicate
// column names will throw an error. This prevents duplicates
for (var ind = 0; ind < assayAttributes.length; ind++) {
Expand Down Expand Up @@ -240,20 +242,53 @@ function fileBrowserFactory (
return internalName;
};

/**
* Helper method for input groups column, requires unique template & fields.
* @param {string} _columnName - column name
*/
var setCustomInputGroupsColumn = function (_columnName) {
var _cellTemplate = '<div class="ngCellText grid-input-groups">' +
'<div ng-if="grid.appScope.nodeSelectCollection[row.entity.uuid].groupList.length > 0" ' +
'class="selected-node" ' +
'title="{{grid.appScope.nodeSelectCollection[row.entity.uuid].groupList}}">' +
'<div class="paragraph ui-grid-cell-contents" ' +
'ng-if="grid.appScope.nodeSelectCollection[row.entity.uuid].groupList[0].length > 1"> ' +
'<span ng-repeat="group in grid.appScope.nodeSelectCollection[row.entity.uuid].groupList ' +
'track by $index">{{group}} &nbsp </span></div></div></div>';

return {
name: _columnName,
field: _columnName,
cellTooltip: true,
width: 11 + '%',
displayName: 'Input Groups',
enableFiltering: false,
enableSorting: false,
enableColumnMenu: false,
enableColumnResizing: true,
cellTemplate: _cellTemplate
};
};

/**
* Helper method for select column, requires unique template & fields.
* @param {string} _columnName - column name
*/
var setCustomSelectColumn = function (columnName) {
var cellTemplate = '<div class="ngCellText text-align-center">' +
var cellTemplate = '<div class="ngCellText text-align-center ui-grid-cell-contents">' +
'<a rp-node-selection-popover title="Select Tool Input"' +
'class="ui-grid-selection-row-header-buttons" ' +
'ng-click="selectButtonClick(row, $event); ' +
'grid.appScope.openSelectionPopover(row.entity);"' +
'ng-class="{\'solidText\': grid.appScope.nodeSelectCollection[' +
'row.entity.uuid].groupList.length > 0 || row.entity.uuid ==' +
' grid.appScope.activeNodeRow.uuid}" ' +
'ng-click="grid.appScope.openSelectionPopover(row.entity)"' +
'id="{{row.entity.uuid}}">' +
'<i class="fa fa-arrow-right ui-grid-checks"' +
' aria-hidden="true"></i></a></div>';
'<i class="fa fa-arrow-right" aria-hidden="true"></i></a></div>';

return {
name: columnName,
field: columnName,
cellTooltip: true,
cellTooltip: false,
width: 4 + '%',
displayName: '',
enableFiltering: false,
Expand All @@ -268,9 +303,9 @@ function fileBrowserFactory (
* Helper method for file download column, requires unique template & fields.
* @param {string} _columnName - column name
*/
var setCustomUrlColumnDef = function (_columnName) {
var setCustomUrlColumn = function (_columnName) {
var internalName = grabAnalysisInternalName(assayAttributes);
var _cellTemplate = '<div class="ngCellText text-align-center"' +
var _cellTemplate = '<div class="ngCellText text-align-center ui-grid-cell-contents"' +
'ng-class="col.colIndex()">' +
'<div ng-if="COL_FIELD" title="Download File \{{COL_FIELD}}\">' +
'<a href="{{COL_FIELD}}" target="_blank">' +
Expand Down Expand Up @@ -324,8 +359,12 @@ function fileBrowserFactory (
};
if (columnName === 'Url') {
// Url requires a custom template for downloading links
tempCustomColumnNames.push(setCustomUrlColumnDef(columnName));
tempCustomColumnNames.push(setCustomUrlColumn(columnName));
} else if (columnName === 'Input Groups') {
// Input Groups requires a custom template for downloading links
tempCustomColumnNames.push(setCustomInputGroupsColumn(columnName));
} else if (columnName === 'Selection') {
// Selection requires a custom template for downloading links
tempCustomColumnNames.push(setCustomSelectColumn(columnName));
} else if (columnName === 'Analysis Group') {
// Analysis requires a custom template for filtering -1 entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@
// groupId and it's associated inputFileType
function removeGroupFromNodeSelectCollection (nodeList, TypeUuid) {
for (var i = 0; i < nodeList.length; i++) {
var groupInd = vm.nodeSelectCollection[nodeList[i].uuid].groupList.indexOf(TypeUuid);
var groupInd = vm.nodeSelectCollection[nodeList[i].uuid].inputTypeList.indexOf(TypeUuid);
if (groupInd > -1) {
vm.nodeSelectCollection[nodeList[i].uuid].groupList.splice(groupInd, 1);
vm.nodeSelectCollection[nodeList[i].uuid].TypeUuid.splice(groupInd, 1);
vm.nodeSelectCollection[nodeList[i].uuid].inputTypeList.splice(groupInd, 1);
}
// Delete node property from obj if empty
if (vm.nodeSelectCollection[nodeList[i].uuid].groupList === 0) {
Expand Down
22 changes: 22 additions & 0 deletions refinery/ui/source/styles/file-browser.less
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,24 @@
word-wrap: break-word;
}


.grid-input-groups {
width: 100%;
height: 100%;
overflow: hidden;
.selected-node {
padding: 0;
width: 100%;
height: 100%;
float: left;
div {
background-color: rgba(0, 158, 115, 0.4);
text-overflow: ellipsis;
white-space: no-wrap;
}
}
}

.node-input-group {
ul {
padding-left: 0px;
Expand Down Expand Up @@ -256,6 +274,10 @@
}
}

.solidText {
opacity: 1 !important;
}

#control-panel-list {
.tree-panel {
padding: .25em;
Expand Down