FEATURE: Make tags clickable to edit them
This commit is contained in:
parent
ebce639bf3
commit
a78c163008
|
@ -170,6 +170,20 @@ api = new API()
|
|||
api.refreshRegistry();
|
||||
api.refreshTagClasses();
|
||||
|
||||
document.addEventListener('click', function(event)
|
||||
{
|
||||
let target = event.target
|
||||
let div = target.closest('div')
|
||||
|
||||
if(div && div.classList.contains('tag'))
|
||||
{
|
||||
for(let child of div.children)
|
||||
{
|
||||
document.getElementById(child.className).value = child.innerHTML.replace(/^-$/, '')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
document.getElementById('register-form').onsubmit = function()
|
||||
{
|
||||
api.register()
|
||||
|
|
|
@ -134,6 +134,7 @@ button
|
|||
div.tag
|
||||
{
|
||||
display : inline-block;
|
||||
cursor : pointer;
|
||||
background-color: #eee;
|
||||
color : #222;
|
||||
box-shadow : 1px 1px 5px #000;
|
||||
|
|
Loading…
Reference in a new issue