1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

doc start: empty, template, import

This commit is contained in:
Harvey Kandola 2017-12-15 13:41:20 +00:00
parent e25f23e94c
commit ab475ede04
26 changed files with 521 additions and 349 deletions

View file

@ -17,16 +17,18 @@ import { schedule } from '@ember/runloop';
// element: #new-template-name
// See https://getbootstrap.com/docs/4.0/components/modal/#via-javascript
export default Mixin.create({
modalOpen(modalId, options) {
modalOpen(modalId, options, focusId) {
$(modalId).modal('dispose');
$(modalId).modal(options);
if (is.not.undefined(focusId)) {
$(focusId).trigger('focus');
}
},
modalInputFocus(modalId, inputId) {
$(modalId).on('show.bs.modal', function(event) { // eslint-disable-line no-unused-vars
schedule('afterRender', () => {
$(inputId).focus();
});
$(modalId).on('shown.bs.modal', function(event) { // eslint-disable-line no-unused-vars
$(inputId).trigger('focus');
});
},