Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
Allow filter names with spaces
Browse files Browse the repository at this point in the history
To do this now the filters have to explicitly specify a template
name. It will no longer be inferred from the filter name.
  • Loading branch information
mzur committed Jun 16, 2016
1 parent 1ca363f commit 018b4ed
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/public/assets/scripts/main.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/public/assets/styles/dashboard.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/public/assets/styles/dashboard.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/public/assets/styles/edit.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/public/assets/styles/edit.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/public/assets/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/public/assets/styles/main.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/resources/assets/js/transects/services/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ angular.module('dias.transects').service('filter', function (TRANSECT_ID, TRANSE
filters.push({
name: newFilter.name,
resource: newFilter.resource,
template: newFilter.template,
typeahead: newFilter.typeahead,
// add the transform function or use identity if there is none
transformData: newFilter.transformData || angular.identity
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/index/menubar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<ul class="filter-list list-group">
<li class="list-group-item ng-cloak" data-ng-repeat="rule in getRules() | orderBy: '-'" data-ng-class="{'disabled': rule.ids.$resolved === false}">
<span data-ng-if="!rule.negate">has</span><span data-ng-if="rule.negate">has no</span> <span data-ng-include="rule.filter.name + 'FilterRule.html'"></span> <button type="button" class="close pull-right" title="Remove this rule" data-ng-click="removeRule(rule)"><span aria-hidden="true">&times;</span></button>
<span data-ng-if="!rule.negate">has</span><span data-ng-if="rule.negate">has no</span> <span data-ng-include="rule.filter.template"></span> <button type="button" class="close pull-right" title="Remove this rule" data-ng-click="removeRule(rule)"><span aria-hidden="true">&times;</span></button>
</li>
<li class="ng-cloak list-group-item text-muted" data-ng-if="!getRules().length">No filter rules</li>
</ul>
Expand Down

0 comments on commit 018b4ed

Please sign in to comment.