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

Add support for angularjs templates to ngeo-displaywindow #3801

Merged

Conversation

pfirpfel
Copy link
Contributor

Allows angularjs templates inside the popups of ngeo-displaywindow.

Example in action: https://geomapfish-demo.camptocamp.com/mkuenzli/displaywindow.html

@pfirpfel pfirpfel added this to the 2.3 milestone Apr 24, 2018
@pfirpfel pfirpfel self-assigned this Apr 24, 2018
content-template="::ctrl.window3Template"
content-scope="::ctrl.windowScope"
draggable="::true"
resize="::true"
Copy link
Member

Choose a reason for hiding this comment

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

If draggable AND resize are true, that's the same as desktop=true.
And by default, desktop is true.
So you can remove both binding, that will be the same.
(read the doc :-p )

I think you can also remove height and width, that's not what we want to show (=noise).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Window2 has both as well... But I agree on leaving out stuff, we don't want to show. I will keep the width/height on the last one though, otherwise you need to resize the window first to see what I want to show.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but in windows 2 I want to demonstrate it.
But ok, you can let it.

* @type {string}
* @export
*/
this.window4TextBinding = 'This is an angular binding.';
Copy link
Member

Choose a reason for hiding this comment

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

AngularJS

@@ -262,6 +299,8 @@ ngeo.message.displaywindowComponent.component('ngeoDisplaywindow', {
bindings: {
'clearOnClose': '<?',
'content': '=?',
'contentTemplate': '<',
'contentScope': '<',
Copy link
Member

Choose a reason for hiding this comment

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

You must add ? symbol to the bindings otherwise it's a mandatory bindings and you will get errors with example's window 1 and 2.

@pfirpfel pfirpfel merged commit 0914617 into camptocamp:master Apr 25, 2018
@pfirpfel pfirpfel deleted the displaywindow-angular-template-content branch April 25, 2018 06:26
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.

2 participants