Feature/5252 - #3
Conversation
ushi-as
left a comment
There was a problem hiding this comment.
Geilo :) Ich hab mal einen Vorschlag formuliert. Take it or leave it :)
| function addButton(){ | ||
| const sidebar = document.querySelector(".window-sidebar") | ||
| sidebar.innerHTML = "<span class='button-link' id='togglbtn'><span class='icon-sm plugin-icon'>+</span><span>Toggl Task</span></span>" + sidebar.innerHTML | ||
| sidebar.querySelectorAll(".mod-no-top-margin")[1].classList.remove("mod-no-top-margin") |
There was a problem hiding this comment.
Das hier nimmt vom zweiten Element der Liste die Klasse weg. Ist das beabsichtigt oder meintest du das erste? Das wäre dann ...)[0]. Brauchts das überhaupt. Der margin stört doch nicht oder?
There was a problem hiding this comment.
Das zweite ist schon richtig, mod-no-top-margin soll von der h3 entfernt werden, damit diese einen Abstand zum Button hat
There was a problem hiding this comment.
Aber innerhalb der sidebar der zweite? Der button kommt doch vor die erste h3 oder? Du machst ja sidebar.querySelectorAll. Da bekommst du nur Elemente innerhalb der sidebar, nicht das da links.
There was a problem hiding this comment.
ok, mir fällt gerade auf, dass es bei einigen Karten noch ein .mod-no-top-margin in der sidebar gibt und bei einigen nicht...
There was a problem hiding this comment.
aaa ok. ich überlass die entscheidung dir. ich finds wie gesagt grad nicht so wichtig. wichtiger ist die funktionalität. hübsch machen, geht später immernoch.
No description provided.