xmpp.chapril.org-conversejs/src/modals/image.js

15 lines
362 B
JavaScript
Raw Normal View History

2021-09-17 12:17:43 +02:00
import BootstrapModal from "plugins/modal/base.js";
import tpl_image_modal from "./templates/image.js";
2020-07-14 15:45:16 +02:00
export default BootstrapModal.extend({
id: 'image-modal',
2020-07-14 15:45:16 +02:00
toHTML () {
return tpl_image_modal({
'src': this.src,
'onload': ev => (ev.target.parentElement.style.height = `${ev.target.height}px`)
});
2020-07-14 15:45:16 +02:00
}
});