diff options
| author | yo mama <pepper@scannerjammer.com> | 2014-12-02 15:39:57 -0800 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2014-12-02 15:39:57 -0800 |
| commit | a6f58439c639e0bb390180f67675e87b6a3ece21 (patch) | |
| tree | e39a4564065b4dd41f46d6ec095e9989c72278f3 /ErrorModal.js | |
first
Diffstat (limited to 'ErrorModal.js')
| -rw-r--r-- | ErrorModal.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ErrorModal.js b/ErrorModal.js new file mode 100644 index 0000000..ab3634e --- /dev/null +++ b/ErrorModal.js @@ -0,0 +1,27 @@ + + +var ErrorModal = new( ModalFormView.extend({ + el: ".mediaDrawer.error", + + events: { + "click .ok": "advance", + "click .close": "advance", + }, + + alert: function(message, callback){ + this.$(".errorList").empty().append(message) + this.callback = callback + this.show() + this.$(".ok").focus() + }, + + advance: function(e){ + e && e.preventDefault() + this.hide() + this.callback && this.callback() + this.callback = null + } + +})) + + |
