Fixed IE hero lock image.

This commit is contained in:
Nick Winter 2014-12-10 10:37:57 -08:00
parent d51db43823
commit 239f94697f
3 changed files with 9 additions and 1 deletions
app
styles/play/modal
templates/play/modal
views/play/modal

View file

@ -110,6 +110,9 @@ $heroCanvasHeight: 265px
background-color: goldenrod
@include filter(contrast(50%) brightness(65%))
&.ie
@include opacity(0.35)
.lock-indicator
position: absolute
width: 40%

View file

@ -20,7 +20,10 @@
li(data-hero-id=hero.get('original'), title=hero.name, data-slide-to=index, data-target="#hero-carousel", class="hero-indicator hero-index-" + index + (hero.locked ? " locked" : "") + (hero.purchasable ? " purchasable" : "") + (hero.restricted ? " restricted" : ""))
.hero-avatar
if hero.locked && !hero.purchasable
img.lock-indicator(src="/images/pages/game-menu/lock.png", draggable="false")
if isIE
img.lock-indicator(src="/images/pages/game-menu/lock-processed.png", draggable="false")
else
img.lock-indicator(src="/images/pages/game-menu/lock.png", draggable="false")
.carousel-inner
for hero in heroes
div(class="item hero-item" + (hero.locked ? " locked" : "") + (hero.purchasable ? " purchasable" : "") + (hero.restricted ? " restricted" : ""), data-hero-id=hero.get('original'))

View file

@ -69,11 +69,13 @@ module.exports = class PlayHeroesModal extends ModalView
context.confirmButtonI18N = @confirmButtonI18N
context.visibleHero = @visibleHero
context.gems = me.gems()
context.isIE = @isIE()
context
afterRender: ->
super()
return unless @supermodel.finished()
@$el.find('.hero-avatar').addClass 'ie' if @isIE()
heroes = @heroes.models
@$el.find('.hero-indicator').each ->
heroID = $(@).data('hero-id')