summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/lib/ModalView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-27 15:22:08 -0500
committerJules Laplace <jules@okfoc.us>2014-11-27 15:22:08 -0500
commit598b7d86716d83f3f5c571c98dbf41ae1706cb40 (patch)
treed5db8795d266da5053888281f1ec003787a029be /public/assets/javascripts/ui/lib/ModalView.js
parent8c5fc5db10b101641c07b22c2237b70aee8b70ca (diff)
parent6f7f0ac032193215223787ca69717fcb478f12ac (diff)
merge
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()
+ }
+ }
})