Ghost/core/client/templates/components/gh-modal-dialog.hbs
Jason Williams 26b7102451 Use an explicit action name in action helper
No Issue
- Clicking on the body of a modal dialog causes an
  unhandled exception in the console.  Add an explicit
  action name to the helper.
2014-12-26 16:01:50 +00:00

23 lines
1.2 KiB
Handlebars

<div class="modal-container js-modal-container" {{action "closeModal"}}>
<article {{bind-attr class="klass :js-modal"}}>
<section class="modal-content" {{action "noBubble" bubbles=false preventDefault=false}}>
{{#if title}}<header class="modal-header"><h1>{{title}}</h1></header>{{/if}}
{{#if showClose}}<a class="close" href="" title="Close" {{action "closeModal"}}><span class="hidden">Close</span></a>{{/if}}
<section class="modal-body">
{{yield}}
</section>
{{#if confirm}}
<footer class="modal-footer">
<button type="button" {{bind-attr class="rejectButtonClass :js-button-reject"}} {{action "confirm" "reject"}}>
{{confirm.reject.text}}
</button><!--
Required to strip the white-space between buttons
--><button type="button" {{bind-attr class="acceptButtonClass :js-button-accept"}} {{action "confirm" "accept"}}>
{{confirm.accept.text}}
</button>
</footer>
{{/if}}
</section>
</article>
</div>
<div class="modal-background js-modal-background"></div>