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/row template updates #1816

Merged
merged 3 commits into from
Jun 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
var popOverContent = $compile(template)(scope);
var options = {
content: popOverContent,
placement: 'right-top',
placement: 'bottom',
html: true,
trigger: 'manual',
container: 'body'
container: '#assay-files-table'
};
angular.element(element).popover(options);

Expand Down
1 change: 1 addition & 0 deletions refinery/ui/source/js/file-browser/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'ui.grid',
'ui.grid.autoResize',
'ui.grid.infiniteScroll',
'ui.grid.pinning',
'ui.grid.resizeColumns',
'ui.select',
]);
Expand Down
4 changes: 4 additions & 0 deletions refinery/ui/source/js/file-browser/module.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
expect(hasModule('ui.grid.infiniteScroll')).toEqual(true);
});

it('should have "ui.grid.pinning" as a dependency', function () {
expect(hasModule('ui.grid.pinning')).toEqual(true);
});

it('should have "ui.grid.resizeColumns" as a dependency', function () {
expect(hasModule('ui.grid.resizeColumns')).toEqual(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ui-grid="FBCtrl.gridOptions"
ui-grid-auto-resize
ui-grid-infinite-scroll
ui-grid-pinning
ui-grid-resize-columns
class="grid">
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,24 @@
'border-color': NSPCtrl.inputFileTypeColor[inputType.uuid]}">
<div class="checkbox">
<label>
<!-- Deselect: user can currently deselect any node in the current group-->
<span
ng-if="NSPCtrl.groupCollection[NSPCtrl.currentGroup] &&
NSPCtrl.groupCollection[NSPCtrl.currentGroup][inputType.uuid].length > 0"
class="wrap-word">
<span ng-repeat="selectedFile in NSPCtrl.groupCollection[NSPCtrl.currentGroup][inputType.uuid]">
<input
type="checkbox"
ng-click="NSPCtrl.selectNode(inputType.uuid, selectedFile.uuid)"
ng-model="NSPCtrl.selectionObj[NSPCtrl.currentGroup][inputType.uuid][selectedFile.uuid]">
{{ selectedFile[NSPCtrl.attributes.Name] }}
</span>
</span>
<!-- Select: If there's NOT a group already started for the inputFileType than checkbox not selected-->
<span
ng-if="!NSPCtrl.groupCollection[NSPCtrl.currentGroup] ||
!NSPCtrl.groupCollection[NSPCtrl.currentGroup][inputType.uuid] ||
NSPCtrl.groupCollection[NSPCtrl.currentGroup][inputType.uuid].length == 0">
<span>
<input
type="checkbox"
ng-click="NSPCtrl.selectNode(inputType.uuid)"
ng-model="NSPCtrl.selectionObj[NSPCtrl.currentGroup][inputType.uuid][NSPCtrl.activeNode.uuid]">
{{ inputType.name }}
</span>
<!-- Deselect: user can currently deselect any node in the current group-->
<div
class="wrap-word"
ng-class='{"selected-node-name": NSPCtrl.groupCollection[NSPCtrl
.currentGroup][inputType.uuid].length > 0}'>
<span
ng-repeat="selectedFile in NSPCtrl.groupCollection[NSPCtrl.currentGroup][inputType.uuid]">
{{ selectedFile[NSPCtrl.attributes.Name] }}
</span>
</div>
</label>
</div>
</li>
Expand Down Expand Up @@ -59,7 +53,14 @@ <h4>
ng-click="NSPCtrl.selectNode(NSPCtrl.inputFileTypes[0].uuid)"
ng-model="NSPCtrl.selectionObj[NSPCtrl.currentGroup][NSPCtrl.inputFileTypes[0].uuid][NSPCtrl.activeNode.uuid]">
{{ NSPCtrl.inputFileTypes[0].name }}
</label>

<div
ng-if="NSPCtrl.selectionObj[NSPCtrl.currentGroup][NSPCtrl.inputFileTypes[0].uuid][NSPCtrl.activeNode.uuid]"
class="wrap-word selected-node-name">
{{ NSPCtrl.groupCollection[NSPCtrl.currentGroup][NSPCtrl.inputFileTypes[0].uuid]
[NSPCtrl.groupCollection[NSPCtrl.currentGroup][NSPCtrl.inputFileTypes[0].uuid].length - 1]
[NSPCtrl.attributes.Name] }}
</div>
</span>
</li>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<div
ng-repeat='(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name'
class='ui-grid-cell'
ng-class='{
"selectRowBorder": grid.appScope.nodeSelectCollection[row.entity.uuid].groupList.length > 0 ||
(grid.appScope.activeNodeRow && row.entity.uuid == grid.appScope.activeNodeRow.uuid)}'
ng-class='{"activeRowHighlight": (grid.appScope.activeNodeRow && row.entity.uuid == grid
.appScope.activeNodeRow.uuid)}'
ui-grid-cell>
</div>
7 changes: 3 additions & 4 deletions refinery/ui/source/js/file-browser/services/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
enableSorting: false,
enableColumnMenu: false,
enableColumnResizing: true,
pinnedLeft: true,
cellTemplate: _cellTemplate,
visible: isToolSelected
};
Expand All @@ -290,10 +291,7 @@
'<a rp-node-selection-popover title="Select Tool Input"' +
'ng-click="grid.appScope.openSelectionPopover(row.entity)"' +
'id="{{row.entity.uuid}}">' +
'<div class="full-size ui-grid-selection-row-header-buttons" ' +
'ng-class="{\'solidText\': grid.appScope.nodeSelectCollection[' +
'row.entity.uuid].groupList.length > 0 || row.entity.uuid == ' +
'grid.appScope.activeNodeRow.uuid}">' +
'<div class="full-size ui-grid-selection-row-header-buttons solidText">' +
'<i class="fa fa-arrow-right" aria-hidden="true">' +
'</i></div></a></div>';

Expand All @@ -309,6 +307,7 @@
enableSorting: false,
enableColumnMenu: false,
enableColumnResizing: true,
pinnedLeft: true,
cellTemplate: cellTemplate,
visible: isToolSelected
};
Expand Down
8 changes: 5 additions & 3 deletions refinery/ui/source/styles/file-browser.less
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
.fileTypes {
display: inline;
}
.selected-node-name {
border-top: 1px dashed;
}
}
}
}
Expand Down Expand Up @@ -326,9 +329,8 @@
}
}

.selectRowBorder {
border-top: 1px solid @blue-active !important;
border-bottom: 1px solid @blue-active !important;
.activeRowHighlight {
background-color: #c9dde1 !important;
}

.current-type-border {
Expand Down