-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1831 Add bulk actions and update list view in task list
- Loading branch information
Showing
7 changed files
with
132 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
frontend/app/scripts/components/common/task-flags.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
angular.module('theHiveComponents') | ||
.component('taskFlags', { | ||
controller: function() { | ||
this.filterBy = function(fieldName, newValue) { | ||
this.onFilter({ | ||
fieldName: fieldName, | ||
value: newValue | ||
}); | ||
}; | ||
}, | ||
controllerAs: '$ctrl', | ||
templateUrl: 'views/components/common/task-flags.component.html', | ||
bindings: { | ||
task: '<', | ||
inline: '<', | ||
onFilter: '&' | ||
} | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
frontend/app/views/components/common/task-flags.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="task-flags" ng-class="{'inline': $ctrl.inline}"> | ||
<!-- TLP --> | ||
<div class="task-status clickable" uib-tooltip="{{$ctrl.task.status}}" tooltip-popup-delay="500" tooltip-placement="bottom" | ||
ng-click="$ctrl.filterBy('status', $ctrl.task.status)"> | ||
<i ng-class="{ | ||
'Waiting': 'glyphicon glyphicon-pause text-primary', | ||
'InProgress': 'glyphicon glyphicon-hourglass text-yellow', | ||
'Completed': 'glyphicon glyphicon-ok text-success', | ||
}[$ctrl.task.status]"></i> | ||
</div> | ||
|
||
<!-- Flag --> | ||
<div ng-if="!!$ctrl.task.flag" class="task-flag clickable" uib-tooltip="Is flagged" tooltip-popup-delay="500" tooltip-placement="bottom" | ||
ng-click="$ctrl.filterBy('flag', true)"> | ||
<i class="glyphicon glyphicon-flag text-yellow"></i> | ||
</div> | ||
<div ng-if="!!!$ctrl.task.flag" class="task-flag clickable" | ||
ng-click="$ctrl.filterBy('flag', false)"> | ||
<i class="glyphicon glyphicon-flag text-disabled"></i> | ||
</div> | ||
|
||
<!-- Assignee --> | ||
<div ng-if="!!$ctrl.task.assignee" class="task-assignee" uib-tooltip="Is Assigned" tooltip-popup-delay="500" tooltip-placement="bottom"> | ||
<i class="glyphicon glyphicon-user text-muted"></i> | ||
</div> | ||
<div ng-if="!!!$ctrl.task.assignee" class="task-flag clickable" uib-tooltip="Not assigned" tooltip-popup-delay="500" tooltip-placement="bottom"> | ||
<i class="glyphicon glyphicon-user text-disabled"></i> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters