Put CSS on the .css file and set onclick as an event #572
This commit is contained in:
parent
054dba819b
commit
ececa37bf3
|
|
@ -869,6 +869,15 @@ span.tarteaucitronTitle.tarteaucitronH3 {
|
|||
margin-top: 12px!important;
|
||||
}
|
||||
|
||||
#tarteaucitronCloseCross {
|
||||
position:absolute;
|
||||
color: #FFFF;
|
||||
font-size:1.8rem;
|
||||
cursor: pointer;
|
||||
top: 10px;
|
||||
right: 26px
|
||||
}
|
||||
|
||||
.spacer-20 {
|
||||
height: 20px;
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -582,12 +582,8 @@ var tarteaucitron = {
|
|||
let element = document.getElementById('tarteaucitronAlertBig');
|
||||
let span = document.createElement('span')
|
||||
span.textContent = 'X';
|
||||
span.style.cssText = 'position:absolute; color: #FFFF; font-size:2rem; cursor: pointer; top: 10px; right: 26px';
|
||||
span.setAttribute('id', "clossCross")
|
||||
span.setAttribute('id', "tarteaucitronCloseCross")
|
||||
element.insertBefore(span, element.firstElementChild)
|
||||
document.getElementById("clossCross").onclick = () =>{
|
||||
tarteaucitron.userInterface.closeAlert();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -596,6 +592,9 @@ var tarteaucitron = {
|
|||
setTimeout(function () {
|
||||
|
||||
// Setup events
|
||||
tarteaucitron.addClickEventToId("tarteaucitronCloseCross", function () {
|
||||
tarteaucitron.userInterface.closeAlert();
|
||||
});
|
||||
tarteaucitron.addClickEventToId("tarteaucitronPersonalize", function () {
|
||||
tarteaucitron.userInterface.openPanel();
|
||||
});
|
||||
|
|
@ -872,11 +871,11 @@ var tarteaucitron = {
|
|||
index = 0;
|
||||
|
||||
for (index = 0; index < tarteaucitron.job.length; index += 1) {
|
||||
|
||||
|
||||
if (typeof type !== 'undefined' && s[tarteaucitron.job[index]].type !== type) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
service = s[tarteaucitron.job[index]];
|
||||
key = service.key;
|
||||
if (tarteaucitron.state[key] !== status) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue