1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-14 19:42:49 +00:00

Added files

This commit is contained in:
2015-06-25 16:28:41 -05:00
parent 656dca9289
commit eb27b55a54
5621 changed files with 1630154 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
exports.create = function(model, dom) {
var self = this;
dom.addListener(document, 'keydown', function(e) {
if (e.keyCode === 27) { // Escape
self.close('escape')
}
})
}
exports.show = function() {
this.model.set('show', true)
}
exports.close = function(action) {
var cancelled = this.emitCancellable('close', action)
if (!cancelled) this.model.set('show', false)
}
exports._click = function(e) {
var action = e.target.getAttribute('data-action')
if (action) this.close(action)
}