Hide modal wrapper when no modal
This commit is contained in:
parent
0e7e9aad39
commit
fa54b639c7
3 changed files with 4 additions and 8 deletions
app
|
@ -104,7 +104,7 @@ mixpanel.init("e71a4e60db7e1dc5e685be96776280f9");</script><!-- end Mixpanel -->
|
||||||
<div id="page-container" class="nano-content">
|
<div id="page-container" class="nano-content">
|
||||||
</div>
|
</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" id="module-load-progress">
|
||||||
<div class="progress-bar"></div>
|
<div class="progress-bar"></div>
|
||||||
|
|
|
@ -3,12 +3,7 @@ template = require 'templates/new-home-view'
|
||||||
CocoCollection = require 'collections/CocoCollection'
|
CocoCollection = require 'collections/CocoCollection'
|
||||||
Course = require 'models/Course'
|
Course = require 'models/Course'
|
||||||
|
|
||||||
###
|
# TODO: auto margin feature paragraphs
|
||||||
TODO:
|
|
||||||
* Get rid of modal wrapper shadow at top of page
|
|
||||||
* auto margin feature paragraphs
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
module.exports = class NewHomeView extends RootView
|
module.exports = class NewHomeView extends RootView
|
||||||
id: 'new-home-view'
|
id: 'new-home-view'
|
||||||
|
|
|
@ -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 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
|
return @modalClosed(visibleModal) # was closed, but modalClosed was not called somehow
|
||||||
modalView.render()
|
modalView.render()
|
||||||
$('#modal-wrapper').empty().append modalView.el
|
$('#modal-wrapper').removeClass('hide').empty().append modalView.el
|
||||||
modalView.afterInsert()
|
modalView.afterInsert()
|
||||||
visibleModal = modalView
|
visibleModal = modalView
|
||||||
modalOptions = {show: true, backdrop: if modalView.closesOnClickOutside then true else 'static'}
|
modalOptions = {show: true, backdrop: if modalView.closesOnClickOutside then true else 'static'}
|
||||||
|
@ -219,6 +219,7 @@ module.exports = class CocoView extends Backbone.View
|
||||||
visibleModal = null
|
visibleModal = null
|
||||||
window.currentModal = null
|
window.currentModal = null
|
||||||
#$('#modal-wrapper .modal').off 'hidden.bs.modal', @modalClosed
|
#$('#modal-wrapper .modal').off 'hidden.bs.modal', @modalClosed
|
||||||
|
$('#modal-wrapper').addClass('hide')
|
||||||
if waitingModal
|
if waitingModal
|
||||||
wm = waitingModal
|
wm = waitingModal
|
||||||
waitingModal = null
|
waitingModal = null
|
||||||
|
|
Reference in a new issue