Discussion:
[dart-misc] Problem with buttons in modal dialog
Mateusz Lewandowski
2017-01-08 20:55:24 UTC
Permalink
Hi
like in topic.
I have problem with actions after click in paper buttons in my paper dialog.
I have the following.

<polymer-element name="advert-details">
<template>
<paper-dialog id="dialog" modal="true">
<div class="AdvertDetails">
<div id="ImageContent">
</div>

<div class="row">
<div class="label">Tytul:</div>
<div class="field" id="title">{{title}}</div>
</div>

<div class="row">
<div class="label">Tresc:</div>
<div class="field" id="content">{{content}}</div>
</div>

<div class="row">
<div class="label">Miasto:</div>
<div class="field" id="city">{{city}}</div>
</div>
</div>

<div class="buttons">
<paper-button dialog-dismiss>Cancel</paper-button>
<paper-button dialog-confirm autofocus>Accept</paper-button>
</div>

</paper-dialog>

</template>
</polymer-element>

Buttons has dispayed ok but after click on it there is no action like close dialog.
Additional question is should property modal set to true, makes main web site blocked and only actions on modal should be accessible?
If yes how i think, it does not work. In my case if property "modal" is set or not there is no difference.
I use following versions of polymer and paper elements

polymer: '^0.16.0'
paper_elements: '^0.6.2'
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
tomaszkubacki
2017-01-18 05:03:31 UTC
Permalink
Mariusz,

Sorry this is a bit off topic - we are small dev shop from having exp in
both polymer1 and ng2, and here is my advice based on having to maintain
big proj (20K LOC) in polymer1.

You really really should migrate to ng2 or at least not relay on polymer1.
Further versions of Chrome may not support old shadow DOM spec and you may
end up with app supported only on old Chromium versions. Earlier you start,
less pain you will receive.

Now to your question:
Never used paper elements but suppose you need to handle button click event
manually and set modal property to false (can't see button handlers in your
example).

Cheers,
Tomek


W dniu niedziela, 8 stycznia 2017 21:55:24 UTC+1 uÅŒytkownik Mateusz
Post by Mateusz Lewandowski
Hi
like in topic.
I have problem with actions after click in paper buttons in my paper dialog.
I have the following.
<polymer-element name="advert-details">
<template>
<paper-dialog id="dialog" modal="true">
<div class="AdvertDetails">
<div id="ImageContent">
</div>
<div class="row">
<div class="label">Tytul:</div>
<div class="field" id="title">{{title}}</div>
</div>
<div class="row">
<div class="label">Tresc:</div>
<div class="field" id="content">{{content}}</div>
</div>
<div class="row">
<div class="label">Miasto:</div>
<div class="field" id="city">{{city}}</div>
</div>
</div>
<div class="buttons">
<paper-button dialog-dismiss>Cancel</paper-button>
<paper-button dialog-confirm autofocus>Accept</paper-button>
</div>
</paper-dialog>
</template>
</polymer-element>
Buttons has dispayed ok but after click on it there is no action like close dialog.
Additional question is should property modal set to true, makes main web site blocked and only actions on modal should be accessible?
If yes how i think, it does not work. In my case if property "modal" is set or not there is no difference.
I use following versions of polymer and paper elements
polymer: '^0.16.0'
paper_elements: '^0.6.2'
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Mateusz Lewandowski
2017-01-18 05:19:03 UTC
Permalink
Hi, thanks for Your response. (Dzięki za odpowiedź pozdro ;) )
I have no experience with dart and polymer morover no experience in angular.
Like you wrote, there was no on click action for buttons. I have already
add it and works fine.
Before i thought that it is not needed and paper dialog will only close on
this type of action.
Post by tomaszkubacki
Mariusz,
Sorry this is a bit off topic - we are small dev shop from having exp in
both polymer1 and ng2, and here is my advice based on having to maintain
big proj (20K LOC) in polymer1.
You really really should migrate to ng2 or at least not relay on polymer1.
Further versions of Chrome may not support old shadow DOM spec and you may
end up with app supported only on old Chromium versions. Earlier you start,
less pain you will receive.
Never used paper elements but suppose you need to handle button click
event manually and set modal property to false (can't see button handlers
in your example).
Cheers,
Tomek
W dniu niedziela, 8 stycznia 2017 21:55:24 UTC+1 uÅŒytkownik Mateusz
Post by Mateusz Lewandowski
Hi
like in topic.
I have problem with actions after click in paper buttons in my paper dialog.
I have the following.
<polymer-element name="advert-details">
<template>
<paper-dialog id="dialog" modal="true">
<div class="AdvertDetails">
<div id="ImageContent">
</div>
<div class="row">
<div class="label">Tytul:</div>
<div class="field" id="title">{{title}}</div>
</div>
<div class="row">
<div class="label">Tresc:</div>
<div class="field" id="content">{{content}}</div>
</div>
<div class="row">
<div class="label">Miasto:</div>
<div class="field" id="city">{{city}}</div>
</div>
</div>
<div class="buttons">
<paper-button dialog-dismiss>Cancel</paper-button>
<paper-button dialog-confirm autofocus>Accept</paper-button>
</div>
</paper-dialog>
</template>
</polymer-element>
Buttons has dispayed ok but after click on it there is no action like close dialog.
Additional question is should property modal set to true, makes main web site blocked and only actions on modal should be accessible?
If yes how i think, it does not work. In my case if property "modal" is set or not there is no difference.
I use following versions of polymer and paper elements
polymer: '^0.16.0'
paper_elements: '^0.6.2'
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Continue reading on narkive:
Loading...