1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Quick fix for reparse confirmation & button placement

This commit is contained in:
alim4r 2022-04-20 20:18:28 +02:00
parent b525252af1
commit c457b58ab8
3 changed files with 10 additions and 4 deletions

View File

@ -17,14 +17,14 @@
{{ entityrow.row(s.track) }} {{ entityrow.row(s.track) }}
{% if adminmode %} {% if adminmode %}
<td class='reparse_area'> <td class='delete_area'>
<span class="confirmactions"> <span class="confirmactions">
<button class="smallbutton warning" onclick="reparseScrobble({{ s.time }})">Confirm</button> <button class="smallbutton warning" onclick="reparseScrobble({{ s.time }},this)">Confirm</button>
<button class="smallbutton" onclick="toggleReparseConfirm(this)">Cancel</button> <button class="smallbutton" onclick="toggleReparseConfirm(this)">Cancel</button>
</span> </span>
<span class="initializeactions"> <span class="initializeactions">
<div class='deleteicon clickable_icon danger' onclick="toggleReparseConfirm(this)"> <div class='refreshicon clickable_icon danger' onclick="toggleReparseConfirm(this)">
<svg style="width:14px;height:14px" viewBox="0 0 24 24"> <svg style="width:14px;height:14px" viewBox="0 0 24 24">
<path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /> <path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" />
</svg> </svg>

View File

@ -612,6 +612,10 @@ table.list td.searchProvider:hover {
table.list td.delete_area { table.list td.delete_area {
text-align: right; text-align: right;
width:0em;
}
table.list td.delete_area.active {
width:7em; width:7em;
} }

View File

@ -15,7 +15,9 @@ function toggleReparseConfirm(element) {
element.parentElement.parentElement.classList.toggle('active'); element.parentElement.parentElement.classList.toggle('active');
} }
function reparseScrobble(id) { function reparseScrobble(id, element) {
toggleReparseConfirm(element);
neo.xhttpreq("/apis/mlj_1/reparse_scrobble",data={'timestamp':id},method="POST",callback=(()=>null),json=true); neo.xhttpreq("/apis/mlj_1/reparse_scrobble",data={'timestamp':id},method="POST",callback=(()=>null),json=true);
} }