Fix popup positioning and make sure popups always open properly
(closes #24)
This commit is contained in:
parent
5c8035b7a8
commit
0bb3eff03b
|
@ -8,7 +8,7 @@
|
|||
<table id="allowed_failure_jobs" class="list">
|
||||
<caption>
|
||||
{{t jobs.allowed_failures}}
|
||||
<a title="What's this?" class="help" name="help-allowed_failures" {{action popup target="view"}}></a>
|
||||
<a title="What's this?" class="help open-popup" name="help-allowed_failures" {{action popup target="view"}}></a>
|
||||
</caption>
|
||||
{{/if}}
|
||||
<thead>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<a href="#" {{action menu target="view"}}></a>
|
||||
<ul class="menu">
|
||||
<li>
|
||||
<a href="#" name="status-images" {{action statusImages target="view"}}>Status Images</a>
|
||||
<a href="#" name="status-images" class="open-popup" {{action statusImages target="view"}}>Status Images</a>
|
||||
</li>
|
||||
{{#if view.canPush}}
|
||||
<li>
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
templateName: 'application'
|
||||
classNames: ['application']
|
||||
|
||||
popup: (event) ->
|
||||
console.log event
|
||||
localeDidChange: (->
|
||||
if locale = Travis.app.get('auth.user.locale')
|
||||
Travis.setLocale(locale)
|
||||
|
@ -13,8 +15,9 @@
|
|||
# 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
|
||||
if ! $(event.target).parents().andSelf().hasClass('popup')
|
||||
targetAndParents = $(event.target).parents().andSelf()
|
||||
if ! ( targetAndParents.hasClass('open-popup') || targetAndParents.hasClass('popup') )
|
||||
@popupCloseAll()
|
||||
if ! $(event.target).parents().andSelf().hasClass('menu')
|
||||
if ! targetAndParents.hasClass('menu')
|
||||
$('.menu').removeClass('display')
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
@mixin popup
|
||||
display: none
|
||||
position: absolute
|
||||
position: fixed
|
||||
z-index: 100
|
||||
background-color: #fff
|
||||
border: 10px solid rgba(0, 0, 0, .5)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
top: 50%
|
||||
left: 50%
|
||||
width: 400px
|
||||
margin: -230px 0 0 -200px
|
||||
margin: -200px 0 0 -200px
|
||||
padding: 20px
|
||||
@include popup
|
||||
|
||||
|
@ -43,10 +43,9 @@
|
|||
|
||||
#status-images
|
||||
display: none
|
||||
position: absolute
|
||||
width: 600px
|
||||
height: 190px
|
||||
margin: -145px 0 0 -300px
|
||||
margin: -95px 0 0 -300px
|
||||
|
||||
p
|
||||
margin: 10px 0
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user