mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-28 18:20:42 +00:00
feat: add counter to collapsible and for local attachments
This commit is contained in:
parent
a3d2b5f24d
commit
08339ad222
3 changed files with 9 additions and 3 deletions
|
|
@ -3,6 +3,7 @@
|
|||
<ng-md-icon class="collapsible-expand-icon"
|
||||
icon="expand_more"></ng-md-icon>
|
||||
<span ng-bind=":: vm.title"></span>
|
||||
<span ng-if="vm.isCounter">(<span ng-bind="vm.counter||0"></span>)</span>
|
||||
<ng-md-icon ng-if="vm.icon"
|
||||
class="collapsible-icon"
|
||||
icon="{{::vm.icon}}"></ng-md-icon>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
function CollapsibleCtrl($timeout, $element) {
|
||||
const vm = this;
|
||||
|
||||
if ($element.attr('counter')) {
|
||||
vm.isCounter = true;
|
||||
}
|
||||
|
||||
// TODO fix this
|
||||
$timeout(() => {
|
||||
if (vm.isInitiallyExpanded) {
|
||||
|
|
@ -50,7 +54,8 @@
|
|||
icon: '@',
|
||||
isInitiallyExpanded: '@',
|
||||
btnAction: '&',
|
||||
btnIcon: '@'
|
||||
btnIcon: '@',
|
||||
counter: '<'
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -213,9 +213,9 @@
|
|||
|
||||
<section>
|
||||
<collapsible collapsible-title="Local attachments and links"
|
||||
counter="task.localAttachments.length"
|
||||
btn-action="$ctrl.addLocalAttachment(task)"
|
||||
btn-icon="add"
|
||||
is-initially-expanded="'true'">
|
||||
btn-icon="add">
|
||||
<task-local-links local-links="task.localAttachments"></task-local-links>
|
||||
</collapsible>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue