Sha256: 6a2d53dabbc7da386b8a6d1fe0a8e41d2a0a881be211211f1eed2806a8441f94
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
class Lanes.Components.ModalDialog extends Lanes.Components.Base events: 'hide.bs.modal': '_onHide' bindings: 'viewport.layout_size': { type:'class',selector:'.modal-dialog'} 'viewport.layout_size': { selector: '.modal', type: 'class' } buttons: close: { label: 'Close', type: 'default', dismiss: true } session: dialog_title: 'string' toggleShown: (show)-> if show then this.show() else this.hide() template: -> tmpl = Lanes.Templates.find('modal/template', this.namespace) tmpl({ size : @size || 'lg' title : @title || context.dialog_title body : this.renderTemplateMethod('bodyTemplate') buttons : @buttons }) hide:-> this.$el.modal('hide') _.Promise.resolve( this ) show: -> if this.rendered this.viewport.el.append(this.el) this.$el.modal('show') else this.render() this.$el.modal({ body: this.viewport.el }) this.notification = new _.DeferredPromise return this.notification.promise destroy: -> this.detach() _onHide: (ev)-> this.detach() this.notification.resolve(this)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.1.0 | client/lanes/components/modal/ModalDialog.coffee |
lanes-0.0.8 | client/lanes/components/modal/ModalDialog.coffee |
lanes-0.0.5 | client/lanes/components/modal/ModalDialog.coffee |