
After upgrading ember to 1.8.1 tests pass, but I found a few cases where things break (for example when navigating between certain routes). I'm reverting for now. This reverts commitfa5e9179af
, reversing changes made to978c887123
.
24 lines
984 B
CoffeeScript
24 lines
984 B
CoffeeScript
Travis.reopen
|
|
ApplicationView: Travis.View.extend
|
|
templateName: (-> @get 'controller.templateName' ).property('controller.templateName')
|
|
classNames: ['application']
|
|
|
|
templateNameDidChange: (->
|
|
@rerender()
|
|
).observes('templateName')
|
|
|
|
click: (event) ->
|
|
# TODO: this solves the case of closing menus and popups,
|
|
# but I would like to rewrite it later, not sure how
|
|
# yet, but this does not seem optimal
|
|
targetAndParents = $(event.target).parents().andSelf()
|
|
if ! ( targetAndParents.hasClass('open-popup') || targetAndParents.hasClass('popup') )
|
|
@popupCloseAll()
|
|
|
|
# TODO: I needed to add second check to this conditional, because for some reason
|
|
# event.stopPropagation() in menu() function in RepoShowToolsView does
|
|
# not prevent calling following code
|
|
if ! targetAndParents.hasClass('menu') && !targetAndParents.is('#tools > a')
|
|
$('.menu').removeClass('display')
|
|
|