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 } }))