<div dir="ltr">Hi Aaron,<div><br></div><div>The only way to combine 2 aforementioned solutions I've been thinking of is to implement David's solution as the 4th option (in addition to true|false|static) on a per-form basis, leaving the possibility to change the default value in configs. I guess this sort of combining would be as simple as just putting both patches together (perhaps, changing a bit David's js-code for catching 'click' event - to work only for the modal forms with [data-modal-backdrop='confirm']).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 1:30 AM, Aaron Sahlin <span dir="ltr"><<a href="mailto:asahlin@linux.vnet.ibm.com" target="_blank">asahlin@linux.vnet.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
I would be happy with either the two proposed solutions (both
improvements over the what we have now).<br>
<div>Any thoughts on combining them? Only close if esc or 'x' is
clicked, but also warn them if data was entered.<br>
<br>
</div><div><div class="h5">
<br>
<br>
<div>On 12/3/2014 7:21 AM, Rob Cresswell
(rcresswe) wrote:<br>
</div>
<blockquote type="cite">
<div>+1 to changing the behaviour to ‘static'. Modal inside a
modal is potentially slightly more useful, but looks messy and
inconsistent, which I think outweighs the functionality. </div>
<div><br>
</div>
<div>Rob</div>
<div><br>
</div>
<br>
<div>
<div>On 2 Dec 2014, at 12:21, Timur Sufiev <<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a>>
wrote:</div>
<br>
<blockquote type="cite">
<div dir="ltr">Hello, Horizoneers and UX-ers!
<div><br>
</div>
<div>The default behavior of modals in Horizon (defined in
turn by Bootstrap defaults) regarding their closing is to
simply close the modal once user clicks somewhere outside
of it (on the backdrop element below and around the
modal). This is not very convenient for the modal forms
containing a lot of input - when it is closed without a
warning all the data the user has already provided is
lost. Keeping this in mind, I've made a patch [1] changing
default Bootstrap 'modal_backdrop' parameter to 'static',
which means that forms are not closed once the user clicks
on a backdrop, while it's still possible to close them by
pressing 'Esc' or clicking on the 'X' link at the top
right border of the form. Also the patch [1] allows to
customize this behavior (between 'true'-current
one/'false' - no backdrop element/'static') on a per-form
basis.</div>
<div><br>
</div>
<div>What I didn't know at the moment I was uploading my
patch is that David Lyle had been working on a similar
solution [2] some time ago. It's a bit more elaborate than
mine: if the user has already filled some some inputs in
the form, then a confirmation dialog is shown, otherwise
the form is silently dismissed as it happens now.</div>
<div><br>
</div>
<div>The whole point of writing about this in the ML is to
gather opinions which approach is better:</div>
<div>* stick to the current behavior;</div>
<div>* change the default behavior to 'static';<br>
</div>
<div>* use the David's solution with confirmation dialog
(once it'll be rebased to the current codebase).</div>
<div><br>
</div>
<div>What do you think?</div>
<div>
<div><br>
</div>
<div>[1] <a href="https://review.openstack.org/#/c/113206/" target="_blank">https://review.openstack.org/#/c/113206/</a></div>
<div>[2] <a href="https://review.openstack.org/#/c/23037/" target="_blank">https://review.openstack.org/#/c/23037/</a></div>
<div><br>
</div>
<div>P.S. I remember that I promised to write this email a
week ago, but better late than never :).<br clear="all">
</div>
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">Timur Sufiev</div>
</div>
</div>
</div>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote>
</div>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Timur Sufiev</div></div>
</div>