Skip to content

Commit

Permalink
feat(md-modal): implement dismissible option, closes #162
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Apr 6, 2016
1 parent a9a5eee commit 8722d8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modal/modal-trigger.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { customAttribute } from 'aurelia-templating';
import { bindable, customAttribute } from 'aurelia-templating';
import { inject } from 'aurelia-dependency-injection';
import { getBooleanFromAttributeValue } from '../common/attributes';
import { AttributeManager } from '../common/attributeManager';
import { fireMaterializeEvent } from '../common/events';

@customAttribute('md-modal-trigger')
@inject(Element)
export class MdModalTrigger {
@bindable() dismissible = true;

constructor(element) {
this.element = element;
this.attributeManager = new AttributeManager(this.element);
Expand All @@ -15,7 +18,8 @@ export class MdModalTrigger {
attached() {
this.attributeManager.addClasses('modal-trigger');
$(this.element).leanModal({
complete: this.onComplete
complete: this.onComplete,
dismissible: getBooleanFromAttributeValue(this.dismissible)
});
}

Expand Down

0 comments on commit 8722d8f

Please sign in to comment.