summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/lib/ModalView.js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-11-27 15:21:23 -0500
committerJulie Lala <jules@okfoc.us>2014-11-27 15:21:23 -0500
commit150a5ef3ab0dbd8a63009ddad02a6e9df007d824 (patch)
treef90eee2a36ee662ac791e85cfcc4dc8af0bdeafa /public/assets/javascripts/ui/lib/ModalView.js
parentc9325286ba7fcb38166deff8937105789edfb1d2 (diff)
tabs/spaces
Diffstat (limited to 'public/assets/javascripts/ui/lib/ModalView.js')
-rw-r--r--public/assets/javascripts/ui/lib/ModalView.js84
1 files changed, 42 insertions, 42 deletions
diff --git a/public/assets/javascripts/ui/lib/ModalView.js b/public/assets/javascripts/ui/lib/ModalView.js
index 1c41861..f70fbb3 100644
--- a/public/assets/javascripts/ui/lib/ModalView.js
+++ b/public/assets/javascripts/ui/lib/ModalView.js
@@ -1,50 +1,50 @@
var ModalView = View.extend({
- events: {
- "click .close": 'close',
- },
-
- initialize: function(opt){
- if (opt && opt.parent) {
- this.parent = opt.parent
- }
- },
-
- usesFileUpload: false,
-
- show: function(){
- $(".mediaDrawer").removeClass("active")
-
- if (! this.usesFileUpload) {
- $(".fileUpload").removeClass("active")
- }
- if (this.fixedClose) {
- $("#fixed_close").addClass("active")
- $("#fixed_close").bind("click", this.hide.bind(this))
- }
-
- this.$el.addClass("active")
+ events: {
+ "click .close": 'close',
+ },
+
+ initialize: function(opt){
+ if (opt && opt.parent) {
+ this.parent = opt.parent
+ }
+ },
+
+ usesFileUpload: false,
+
+ show: function(){
+ $(".mediaDrawer").removeClass("active")
+
+ if (! this.usesFileUpload) {
+ $(".fileUpload").removeClass("active")
+ }
+ if (this.fixedClose) {
+ $("#fixed_close").addClass("active")
+ $("#fixed_close").bind("click", this.hide.bind(this))
+ }
+
+ this.$el.addClass("active")
$("body").addClass("noOverflow")
- },
+ },
- hide: function(){
+ hide: function(){
// $(".mediaDrawer, .room1").removeClass("active editing");
- if (this.fixedClose) {
- $("#fixed_close").removeClass("active")
- $("#fixed_close").unbind("click", this.hide.bind(this))
- }
- this.$el.removeClass("active");
+ if (this.fixedClose) {
+ $("#fixed_close").removeClass("active")
+ $("#fixed_close").unbind("click", this.hide.bind(this))
+ }
+ 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()
- }
- }
+ },
+
+ close: function(){
+ if (window.isModalView) {
+ window.location.pathname = "/"
+ }
+ else {
+ history.pushState(null, document.title, app.router.originalPath)
+ this.hide()
+ }
+ }
})