stable
Juanfran 2016-10-21 08:36:28 +02:00
parent 9fbf1322b3
commit db52081875
2 changed files with 8 additions and 2 deletions

View File

@ -19,6 +19,12 @@
FilterDirective = () -> FilterDirective = () ->
link = (scope, el, attrs, ctrl) -> link = (scope, el, attrs, ctrl) ->
unwatch = scope.$watch "vm.defaultQ", (q) ->
if q && !scope.vm.filtersForm.$dirty
scope.vm.q = q
unwatch()
else if scope.vm.filtersForm.$dirty
unwatch()
return { return {
scope: { scope: {
@ -29,7 +35,7 @@ FilterDirective = () ->
onRemoveCustomFilter: "&", onRemoveCustomFilter: "&",
onSaveCustomFilter: "&", onSaveCustomFilter: "&",
customFilters: "<", customFilters: "<",
q: "<", defaultQ: "=q",
filters: "<" filters: "<"
customFilters: "<" customFilters: "<"
selectedFilters: "<" selectedFilters: "<"

View File

@ -1,7 +1,7 @@
h1 h1
span.title(translate="COMMON.FILTERS.TITLE") span.title(translate="COMMON.FILTERS.TITLE")
form form(name="vm.filtersForm")
fieldset fieldset
input.e2e-filter-q( input.e2e-filter-q(
type="text", type="text",