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

Support user functionalities to toggle the filter tool on upon init #2808

Merged
merged 1 commit into from Aug 10, 2017

Conversation

adube
Copy link
Contributor

@adube adube commented Aug 9, 2017

This PR introduces the support of the two following GMF user "functionalities":

"open_layer_filter_panel": ["true"] - when defined, the filter panel is open upon loading a desktop application.

"preset_layer_filter": ["inventaire_equipements"] - when defined, the name of the layer (data source) automatically: 1) open the filter panel, 2) select the data source in the filter selector tool.

@adube adube requested a review from gberaudo August 9, 2017 18:25
*
* @type {Array.<!string>|undefined}
*/
gmfThemes.GmfFunctionalities.prototype.open_layer_filter_panel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality should be open_panel and contain ['layer_filter'] to open that panel.

const defaultTheme = functionalities.default_theme;
if (defaultTheme.length > 0) {
themeName = defaultTheme[0];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this part?

this.defaultFiltrableDataSourceName_ = usrFunc['preset_layer_filter'][0];
} else {
this.defaultFiltrableDataSourceName_ = undefined;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be simplified to this.defaultFiltrableDataSourceName_ = usrFunc && usrFunc['preset_layer_filter'] && usrFunc['preset_layer_filter'][0].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would set a false value. I want an undefined value. Anyway, having a simplified version of this is not that useful since it already gets minimized and simplified automatically when building the minimized version. I'll leave this as it is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try it, that would set an undefined value. But fine to me to keep as you did.

@adube
Copy link
Contributor Author

adube commented Aug 10, 2017

Fixed.

Copy link
Member

@gberaudo gberaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adube adube merged commit 53b8d59 into camptocamp:master Aug 10, 2017
@adube adube deleted the open-filter-panel branch August 10, 2017 15:33
@sbrunner sbrunner added this to the 2.3 milestone Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants