diff options
| author | Julie Lala <jules@okfoc.us> | 2014-06-20 01:00:35 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-06-20 01:00:35 -0400 |
| commit | befeb2ed9b7f7086ec0861cbfe4ab6450e1987af (patch) | |
| tree | 9a1c3259d07261e2209cfdc4aa7511bc80b0cf84 /public/assets/javascripts/ui/editor/MediaViewer.js | |
| parent | 4ee6b7e7faab5ed1e5bc295ee5c4ca0540c10da8 (diff) | |
disarm delete after upload
Diffstat (limited to 'public/assets/javascripts/ui/editor/MediaViewer.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/MediaViewer.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/public/assets/javascripts/ui/editor/MediaViewer.js b/public/assets/javascripts/ui/editor/MediaViewer.js index 05e666b..2535f1b 100644 --- a/public/assets/javascripts/ui/editor/MediaViewer.js +++ b/public/assets/javascripts/ui/editor/MediaViewer.js @@ -35,7 +35,7 @@ var MediaViewer = ModalView.extend({ hide: function(){ this.__super__.hide.call(this) - this.deleteArmed(null, false) + this.deleteArmed(false) this.parent.mediaUpload.hide() }, @@ -72,7 +72,10 @@ var MediaViewer = ModalView.extend({ deleteIsArmed: false, deleteArmed: function(e, state){ - if (typeof state != "boolean") { + if (typeof e == "boolean") { + state = e + } + else if (typeof state != "boolean") { state = ! this.deleteIsArmed } this.deleteIsArmed = state |
