blob: 937c1e9c8de01334b78eb882dcc3a7226b8b25c5 (
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
26
27
28
29
30
31
32
33
34
35
|
var ModalView = View.extend({
events: {
"click .close": 'close',
},
initialize: function(opt){
if (opt && opt.parent) {
this.parent = opt.parent
}
},
show: function(){
$(".mediaDrawer").removeClass("active")
$(".fileUpload").removeClass("active")
this.$el.addClass("active")
$("body").addClass("noOverflow")
},
hide: function(){
// $(".mediaDrawer, .room1").removeClass("active editing");
this.$el.removeClass("active");
$("body").removeClass("noOverflow");
},
close: function(){
if (window.isModalView) {
window.location.pathname = "/"
}
else {
history.pushState(null, document.title, app.router.originalPath)
this.hide()
}
}
})
|