d2b1698c0d
1. If the modal gets bigger than 80% of the viewport height a scrollbar will be shown. Currently there isn't anywhere it can get this big, but future work involves possible larger modals 2. Usually its difficult to figure out which was the 'unchecked' radio button using an onchange event. Luckily ember/handlebars changes its properties after the onchange event, so knowing that and using an extra data-checked attribute set via ember, we can figure out which radio button has been 'unchecked'. This means the logic for opening an closing modals becomes slightly easier
19 lines
588 B
Handlebars
19 lines
588 B
Handlebars
{{yield}}
|
|
<input id={{name}} type="radio" name="modal" data-checked="{{checked}}" checked={{checked}} onchange={{action 'change'}} />
|
|
<div role="dialog" aria-modal="true">
|
|
<label for="modal_close"></label>
|
|
<div>
|
|
<div>
|
|
<header>
|
|
<label for="modal_close">Close</label>
|
|
{{#yield-slot 'header'}}{{yield}}{{/yield-slot}}
|
|
</header>
|
|
<div>
|
|
{{#yield-slot 'body'}}{{yield}}{{/yield-slot}}
|
|
</div>
|
|
<footer>
|
|
{{#yield-slot 'actions' (block-params (action 'close'))}}{{yield}}{{/yield-slot}}
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div> |