Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While filter is active, change toolbar icon #5233

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions contribs/gmf/apps/desktop/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@
data-toggle="tooltip" data-placement="left" data-original-title="{{'Draw and Measure'|translate}}">
<span class="fa fa-paint-brush"></span>
</button>
<button ngeo-btn class="btn btn-default" ng-class="{'gmf-filter-active': mainCtrl.filterIsApplied}" ng-model="mainCtrl.filterSelectorActive"
<button ngeo-btn class="btn btn-default" ng-model="mainCtrl.filterSelectorActive"
data-toggle="tooltip" data-placement="left" data-original-title="{{'Filter'|translate}}">
<span class="fa fa-filter"></span>
<span
class="fa"
ng-class="mainCtrl.gmfDataSourceBeingFiltered.dataSource && mainCtrl.gmfDataSourceBeingFiltered.dataSource.filterRules ? 'fa-funnel-dollar' : 'fa-filter'"></span>
</button>
<button ngeo-btn class="btn btn-default" ng-model="mainCtrl.editFeatureActive"
data-toggle="tooltip" data-placement="left" data-original-title="{{'Editing'|translate}}"
Expand Down
4 changes: 0 additions & 4 deletions contribs/gmf/apps/desktop/sass/desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ header {
}
}
}

.gmf-app-tools .gmf-app-bar .btn-group-vertical .btn.gmf-filter-active {
background-color: darken($brand-primary, 30%);
}
7 changes: 5 additions & 2 deletions contribs/gmf/apps/desktop_alt/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@
data-toggle="tooltip" data-placement="left" data-original-title="{{'Draw and Measure'|translate}}">
<span class="fa fa-paint-brush"></span>
</button>
<button ngeo-btn class="btn btn-default" ng-class="{'gmf-filter-active': mainCtrl.filterIsApplied}" ng-model="mainCtrl.filterSelectorActive"
<button ngeo-btn class="btn btn-default" ng-model="mainCtrl.filterSelectorActive"
data-toggle="tooltip" data-placement="left" data-original-title="{{'Filter'|translate}}">
<span class="fa fa-filter"></span>
<span
class="fa"
ng-class="mainCtrl.gmfDataSourceBeingFiltered.dataSource && mainCtrl.gmfDataSourceBeingFiltered.dataSource.filterRules ? 'fa-funnel-dollar' : 'fa-filter'"></span>

</button>
<button ngeo-btn class="btn btn-default" ng-model="mainCtrl.editFeatureActive"
data-toggle="tooltip" data-placement="left" data-original-title="{{'Editing'|translate}}"
Expand Down
4 changes: 0 additions & 4 deletions contribs/gmf/apps/desktop_alt/sass/desktop_alt.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ div .ngeo-displaywindow {
right: initial;
top: $topbar-height + $app-margin + 3 * $map-tools-size;
}

.gmf-app-tools .gmf-app-bar .btn-group-vertical .btn.gmf-filter-active {
background-color: darken($brand-primary, 30%);
}
7 changes: 7 additions & 0 deletions contribs/gmf/src/controllers/AbstractDesktopController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import angular from 'angular';
import gmfControllersAbstractAPIController, {AbstractAPIController}
from 'gmf/controllers/AbstractAPIController.js';
import gmfContextualdataModule from 'gmf/contextualdata/module.js';
import gmfDatasourceDataSourceBeingFiltered from 'gmf/datasource/DataSourceBeingFiltered.js';
import gmfEditingModule from 'gmf/editing/module.js';
import gmfPermalinkShareComponent from 'gmf/permalink/shareComponent.js';
import gmfPrintModule from 'gmf/print/module.js';
Expand Down Expand Up @@ -139,6 +140,11 @@ export class AbstractDesktopController extends AbstractAPIController {
*/
const ngeoToolActivateMgr = $injector.get('ngeoToolActivateMgr');

/**
* @type {import('gmf/datasource/DataSourceBeingFiltered.js').DataSourceBeingFiltered}
*/
this.gmfDataSourceBeingFiltered = $injector.get('gmfDataSourceBeingFiltered');

/**
* The gmf layer being swipe.
* @type {import('gmf/datasource/LayerBeingSwipe.js').LayerBeingSwipe}
Expand Down Expand Up @@ -279,6 +285,7 @@ const module = angular.module('GmfAbstractDesktopControllerModule', [
ngeoQueryPanelComponent.name,
gmfControllersAbstractAPIController.name,
gmfContextualdataModule.name,
gmfDatasourceDataSourceBeingFiltered.name,
gmfEditingModule.name,
gmfPermalinkShareComponent.name,
gmfPrintModule.name,
Expand Down