Commit 3a11ef5d authored by Mat's avatar Mat
Browse files

enlève le dropdown sur Lettre. ça ne permet plus d'éditer la Lettre d'ici,

mais on gagne en clarté. du coup on modifie la lettre depuis la page LettreInfos
parent d2b2bffe
......@@ -203,45 +203,14 @@ function changeStatus(jsonRow)
*/
function displayEditLettreLink(jsonRow)
{
if (jsonRow.status === 'draft' || jsonRow.status === 'current')
{
let dropdown = document.createElement('div');
dropdown.classList.add('dropdown');
let dropBtn = document.createElement('button');
dropBtn.classList.add('btn', 'btn-sm', 'btn-outline-dark', 'mb-1', 'mr-1', 'dropdown-toggle');
dropBtn.setAttribute('id', 'dropdownMenuButton');
dropBtn.setAttribute('type', 'button');
dropBtn.dataset.toggle = 'dropdown';
dropBtn.setAttribute('aria-haspopup', true);
dropBtn.setAttribute('aria-expanded', false);
dropBtn.innerHTML = '<i class="far fa-envelope-open fa-fw"></i> ' + jsonRow.reference;
dropdown.appendChild(dropBtn);
let dropmenu = document.createElement('div');
dropmenu.classList.add('dropdown-menu');
dropmenu.setAttribute('aria-labelledby', 'dropdownMenuButton');
let linkEditLettre = displayEditLettre(jsonRow);
linkEditLettre.classList.add('dropdown-item');
dropmenu.appendChild(linkEditLettre);
let linkLettreInfos = displayLinkLettreInfos(jsonRow);
linkLettreInfos.textContent = "Agencer son contenu";
linkLettreInfos.classList.add('dropdown-item');
dropmenu.appendChild(linkLettreInfos);
dropdown.appendChild(dropmenu);
return dropdown;
}
else {
let linkLettreInfos = displayLinkLettreInfos(jsonRow);
linkLettreInfos.classList.add('btn', 'btn-outline-dark', 'btn-sm', 'mb-1', 'mr-1');
let linkLettreInfos = displayLinkLettreInfos(jsonRow);
linkLettreInfos.innerHTML = '<i class="far fa-envelope fa-fw"></i> ' + jsonRow.reference;
linkLettreInfos.classList.add('btn', 'btn-outline-dark', 'btn-sm', 'mb-1', 'mr-1');
return linkLettreInfos;
linkLettreInfos.innerHTML = '<i class="far fa-envelope'
+ ((jsonRow.status === 'draft' || jsonRow.status === 'current') ? '-open' : '')
+ ' fa-fw"></i> ' + jsonRow.reference;
}
return linkLettreInfos;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment