Skip to content

Commit

Permalink
feat: Ajout du bouton de sauvegarde des notes
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBayfield authored and simon511000 committed Apr 7, 2024
1 parent 0aa7497 commit 4c46693
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions assets/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ function addButtons() {
headerInfo.append(card_header);
}

/**
* Fonction pour ajouter le bouton de sauvegarde
*
* @returns {HTMLElement}
*/
function addSaveButton() {
const button = document.createElement("button");
button.classList.add('btn', 'btn-sm', 'btn-pink');

button.innerHTML = `
<i class="fas fa-save"></i>
Sauvegarder les notes connues
`;

const actions = document.querySelector("#mainContent > div > div:nth-child(4) > div > header > div")
actions.prepend(button)

return button;
}

/**
* Fonction pour appliquer le style
*
Expand Down
3 changes: 3 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ window.addEventListener('load', () => {
// Ajout des styles et des boutons
applyStyle();
addButtons();

// Ajout du bouton de sauvegarde
addSaveButton();
});

0 comments on commit 4c46693

Please sign in to comment.