summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/lib/ConfirmModal.js
blob: 868ce8eb68151b331c17f844e094bb6f1946f498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var ConfirmModal = ModalFormView.extend({
	el: ".mediaDrawer.confirm",

	events: {
		"click .yes": "advance",
		"click .no": "hide",
	},
	
	confirm: function(question, callback){
		this.$(".question").html(question)
		this.callback = callback
		this.show()
	},
	
	advance: function(e){
		e && e.preventDefault()
		this.hide()
		this.callback && this.callback()
		this.callback = null
	}

})