remove icon as mandatory confirm parameter
parent
021b56bb9f
commit
185b77cadd
|
@ -169,20 +169,21 @@ class ConfirmService extends taiga.Service
|
||||||
el.find("img").remove()
|
el.find("img").remove()
|
||||||
el.find("svg").remove()
|
el.find("svg").remove()
|
||||||
|
|
||||||
if icon.type == "img"
|
if icon
|
||||||
detailImage = $('<img>').addClass('lb-icon').attr('src', icon.name)
|
if icon.type == "img"
|
||||||
else if icon.type == "svg"
|
detailImage = $('<img>').addClass('lb-icon').attr('src', icon.name)
|
||||||
useSVG = document.createElementNS('http://www.w3.org/2000/svg', 'use')
|
else if icon.type == "svg"
|
||||||
useSVG.setAttributeNS('http://www.w3.org/1999/xlink','href', '#' + icon.name)
|
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")
|
detailImage = document.createElementNS("http://www.w3.org/2000/svg", "svg")
|
||||||
detailImage.classList.add("icon")
|
detailImage.classList.add("icon")
|
||||||
detailImage.classList.add("lb-icon")
|
detailImage.classList.add("lb-icon")
|
||||||
detailImage.classList.add(icon.name)
|
detailImage.classList.add(icon.name)
|
||||||
detailImage.appendChild(useSVG)
|
detailImage.appendChild(useSVG)
|
||||||
|
|
||||||
if detailImage
|
if detailImage
|
||||||
el.find('section').prepend(detailImage)
|
el.find('section').prepend(detailImage)
|
||||||
|
|
||||||
# Render content
|
# Render content
|
||||||
el.find(".title").html(title) if title
|
el.find(".title").html(title) if title
|
||||||
|
|
|
@ -77,3 +77,17 @@ notifications.errorLight.open = function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
notifications.errorLight.close = function() {
|
||||||
|
var el = $('.notification-message-light-error');
|
||||||
|
|
||||||
|
return browser
|
||||||
|
.wait(function() {
|
||||||
|
return common.hasClass(el, 'inactive');
|
||||||
|
}, 4000)
|
||||||
|
.then(function(active) {
|
||||||
|
return browser.sleep(transition).then(function() {
|
||||||
|
return active;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue