Merge pull request #972 from taigaio/issue/4083/icon-IE
Refactor icon in lightbox to fix IE bugstable
commit
8bf616ff2e
|
@ -173,14 +173,17 @@ class ConfirmService extends taiga.Service
|
|||
if icon.type == "img"
|
||||
detailImage = $('<img>').addClass('lb-icon').attr('src', icon.name)
|
||||
else if icon.type == "svg"
|
||||
detailImage = document.createElement("div")
|
||||
taiga.addClass(detailImage, "icon")
|
||||
taiga.addClass(detailImage, icon.name)
|
||||
taiga.addClass(detailImage, "lb-icon")
|
||||
|
||||
svgContainer = document.createElementNS("http://www.w3.org/2000/svg", "svg")
|
||||
|
||||
useSVG = document.createElementNS('http://www.w3.org/2000/svg', 'use')
|
||||
useSVG.setAttributeNS('http://www.w3.org/1999/xlink','href', '#' + icon.name)
|
||||
|
||||
detailImage = document.createElementNS("http://www.w3.org/2000/svg", "svg")
|
||||
taiga.addClass(detailImage, "icon")
|
||||
taiga.addClass(detailImage, "lb-icon")
|
||||
taiga.addClass(detailImage, icon.name)
|
||||
detailImage.appendChild(useSVG)
|
||||
detailImage.appendChild(svgContainer).appendChild(useSVG)
|
||||
|
||||
if detailImage
|
||||
el.find('section').prepend(detailImage)
|
||||
|
|
|
@ -55,10 +55,14 @@
|
|||
transition: opacity .3s ease;
|
||||
}
|
||||
.lb-icon {
|
||||
@include svg-size(6rem);
|
||||
display: block;
|
||||
fill: $whitish;
|
||||
margin: 1rem auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
svg {
|
||||
@include svg-size(6rem);
|
||||
display: block;
|
||||
fill: $whitish;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
text-align: center;
|
||||
|
|
Loading…
Reference in New Issue