diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-10-30 11:35:54 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-10-30 11:35:54 +0100 |
commit | 993ee588ab41cdd491a2a90388471ef50aa8cbb1 (patch) | |
tree | 44d0adeec36322d1c3919e5ba546461d9fa9481b | |
parent | e4ac260407e77f30829379b4c29083a693c201d2 (diff) | |
download | sonarqube-993ee588ab41cdd491a2a90388471ef50aa8cbb1.tar.gz sonarqube-993ee588ab41cdd491a2a90388471ef50aa8cbb1.zip |
SONAR-5718 Do not request page when disable facet witout selected items
-rw-r--r-- | server/sonar-web/src/main/coffee/issues/models/state.coffee | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/models/state.coffee b/server/sonar-web/src/main/coffee/issues/models/state.coffee index 1704bfe3cd5..887b988f8aa 100644 --- a/server/sonar-web/src/main/coffee/issues/models/state.coffee +++ b/server/sonar-web/src/main/coffee/issues/models/state.coffee @@ -29,10 +29,18 @@ define [ q + _areQueriesEqual: (a, b) -> + equal = Object.keys(a).length == Object.keys(b).length + Object.keys(a).forEach (key) -> + equal = equal && (a[key] == b[key]) + equal + + updateFilter: (obj) -> - filter = @get 'query' - _.extend filter, obj - @setQuery @cleanQuery filter + oldQuery = @get('query') + query = _.extend {}, oldQuery, obj + query = @cleanQuery query + @setQuery query unless @_areQueriesEqual oldQuery, query setQuery: (query) -> |