fix vertical align lightbox in IE

stable
Juanfran 2015-01-14 13:25:10 +01:00
parent 3866e6d443
commit 99d183085f
1 changed files with 12 additions and 2 deletions

View File

@ -29,11 +29,21 @@ debounce = @.taiga.debounce
## Common Lightbox Services
#############################################################################
# the lightboxContent hide/show doesn't have sense because is an IE hack
class LightboxService extends taiga.Service
constructor: (@animationFrame) ->
open: ($el) ->
lightboxContent = $el.children().not(".close")
lightboxContent.hide()
$el.css('display', 'flex')
$el.find('input,textarea').first().focus()
timeout(70, -> $el.addClass("open"))
@animationFrame.add =>
$el.addClass("open")
lightboxContent.show()
docEl = angular.element(document)
docEl.on "keydown.lightbox", (e) =>
@ -56,7 +66,7 @@ class LightboxService extends taiga.Service
@.close($(lightboxEl))
module.service("lightboxService", LightboxService)
module.service("lightboxService", ["animationFrame", LightboxService])
class LightboxKeyboardNavigationService extends taiga.Service