diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-09-29 17:33:18 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-09-29 17:33:18 -0400 |
| commit | c8bfd290434ab06cd6b8b1536b9c317eba7e6630 (patch) | |
| tree | deed00cf98f212f8f7ab497d3259efb8191de857 /public/assets/javascripts/ui/editor/EditorSettings.js | |
| parent | 98289589267dfbd909f71e95b7663e584439231c (diff) | |
if no media, dont show “delete media” button
Diffstat (limited to 'public/assets/javascripts/ui/editor/EditorSettings.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/EditorSettings.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/public/assets/javascripts/ui/editor/EditorSettings.js b/public/assets/javascripts/ui/editor/EditorSettings.js index de47be4..f74b535 100644 --- a/public/assets/javascripts/ui/editor/EditorSettings.js +++ b/public/assets/javascripts/ui/editor/EditorSettings.js @@ -17,8 +17,8 @@ var EditorSettings = FormView.extend({ }, initialize: function(opt){ - this.parent = opt.parent - this.__super__.initialize.call(this) + this.parent = opt.parent + this.__super__.initialize.call(this) this.$id = this.$("[name=_id]") this.$csrf = this.$("[name=_csrf]") @@ -110,7 +110,6 @@ var EditorSettings = FormView.extend({ var state = typeof state == 'boolean' ? state : ! this.$el.hasClass("active") this.$el.toggleClass("active", state) - $(".inuse").removeClass("inuse") $("[data-role='toggle-project-settings']").toggleClass("inuse", state) }, @@ -183,6 +182,8 @@ var EditorSettings = FormView.extend({ window.history.pushState(null, document.title, "/project/" + data.slug + "/edit") this.parent.data = data + + this.toggle(false) }, }) |
