Hide modal wrapper when no modal

This commit is contained in:
Scott Erickson 2016-02-02 14:50:43 -08:00
parent 0e7e9aad39
commit fa54b639c7
3 changed files with 4 additions and 8 deletions

View file

@ -104,7 +104,7 @@ mixpanel.init("e71a4e60db7e1dc5e685be96776280f9");</script><!-- end Mixpanel -->
<div id="page-container" class="nano-content">
</div>
<div id="modal-wrapper" class="modal-content"></div>
<div id="modal-wrapper" class="modal-content hide"></div>
<div class="progress" id="module-load-progress">
<div class="progress-bar"></div>

View file

@ -3,12 +3,7 @@ template = require 'templates/new-home-view'
CocoCollection = require 'collections/CocoCollection'
Course = require 'models/Course'
###
TODO:
* Get rid of modal wrapper shadow at top of page
* auto margin feature paragraphs
###
# TODO: auto margin feature paragraphs
module.exports = class NewHomeView extends RootView
id: 'new-home-view'

View file

@ -204,7 +204,7 @@ module.exports = class CocoView extends Backbone.View
return visibleModal.hide() if visibleModal.$el.is(':visible') # close, then this will get called again
return @modalClosed(visibleModal) # was closed, but modalClosed was not called somehow
modalView.render()
$('#modal-wrapper').empty().append modalView.el
$('#modal-wrapper').removeClass('hide').empty().append modalView.el
modalView.afterInsert()
visibleModal = modalView
modalOptions = {show: true, backdrop: if modalView.closesOnClickOutside then true else 'static'}
@ -219,6 +219,7 @@ module.exports = class CocoView extends Backbone.View
visibleModal = null
window.currentModal = null
#$('#modal-wrapper .modal').off 'hidden.bs.modal', @modalClosed
$('#modal-wrapper').addClass('hide')
if waitingModal
wm = waitingModal
waitingModal = null