Add timeout to hide epics table options
parent
fffc140898
commit
a3a7b868ba
|
@ -23,10 +23,11 @@ taiga = @.taiga
|
||||||
class EpicsTableController
|
class EpicsTableController
|
||||||
@.$inject = [
|
@.$inject = [
|
||||||
"$tgConfirm",
|
"$tgConfirm",
|
||||||
"tgEpicsService"
|
"tgEpicsService",
|
||||||
|
"$timeout"
|
||||||
]
|
]
|
||||||
|
|
||||||
constructor: (@confirm, @epicsService) ->
|
constructor: (@confirm, @epicsService, @timeout) ->
|
||||||
@.displayOptions = false
|
@.displayOptions = false
|
||||||
@.displayVotes = true
|
@.displayVotes = true
|
||||||
@.column = {
|
@.column = {
|
||||||
|
@ -49,4 +50,11 @@ class EpicsTableController
|
||||||
.then null, () => # on error
|
.then null, () => # on error
|
||||||
@confirm.notify("error")
|
@confirm.notify("error")
|
||||||
|
|
||||||
|
hoverEpicTableOption: () ->
|
||||||
|
if @.timer
|
||||||
|
@timeout.cancel(@.timer)
|
||||||
|
|
||||||
|
hideEpicTableOption: () ->
|
||||||
|
return @.timer = @timeout (=> @.displayOptions = false), 400
|
||||||
|
|
||||||
angular.module("taigaEpics").controller("EpicsTableCtrl", EpicsTableController)
|
angular.module("taigaEpics").controller("EpicsTableCtrl", EpicsTableController)
|
||||||
|
|
|
@ -40,11 +40,16 @@ mixin epicSwitch(name, model)
|
||||||
translate="EPICS.TABLE.PROGRESS"
|
translate="EPICS.TABLE.PROGRESS"
|
||||||
ng-if="vm.column.progress"
|
ng-if="vm.column.progress"
|
||||||
)
|
)
|
||||||
.epics-table-options-wrapper(ng-mouseleave="vm.displayOptions = false")
|
.epics-table-options-wrapper(
|
||||||
|
ng-mouseleave="vm.hideEpicTableOption()"
|
||||||
|
)
|
||||||
button.epics-table-option-button.e2e-epics-column-button(ng-click="vm.displayOptions = true")
|
button.epics-table-option-button.e2e-epics-column-button(ng-click="vm.displayOptions = true")
|
||||||
span(translate="EPICS.TABLE.VIEW_OPTIONS")
|
span(translate="EPICS.TABLE.VIEW_OPTIONS")
|
||||||
tg-svg(svg-icon="icon-arrow-down")
|
tg-svg(svg-icon="icon-arrow-down")
|
||||||
form.epics-table-dropdown.e2e-epics-column-dropdown(ng-show="vm.displayOptions")
|
form.epics-table-dropdown.e2e-epics-column-dropdown(
|
||||||
|
ng-show="vm.displayOptions"
|
||||||
|
ng-mouseenter="vm.keepEpicTableOption()"
|
||||||
|
)
|
||||||
.fieldset
|
.fieldset
|
||||||
label.epics-table-options-vote(
|
label.epics-table-options-vote(
|
||||||
translate="EPICS.TABLE.VOTES"
|
translate="EPICS.TABLE.VOTES"
|
||||||
|
|
|
@ -44,6 +44,12 @@
|
||||||
top: 1.3rem;
|
top: 1.3rem;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
&.ng-hide-remove {
|
||||||
|
animation: dropdownFade .2s;
|
||||||
|
}
|
||||||
|
&.ng-hide-add {
|
||||||
|
animation: dropdownFade .2s reverse;
|
||||||
|
}
|
||||||
.fieldset {
|
.fieldset {
|
||||||
@include font-size(small);
|
@include font-size(small);
|
||||||
border-bottom: 1px solid $whitish;
|
border-bottom: 1px solid $whitish;
|
||||||
|
|
Loading…
Reference in New Issue