minor fixes

This commit is contained in:
Ville Rantanen
2022-09-23 14:23:36 +03:00
parent c042cdd04d
commit 4602b4aa06
3 changed files with 26 additions and 17 deletions

View File

@@ -59,6 +59,12 @@ function hidetoggle(name) {
} else { } else {
document.getElementById(name).style.display='inline-block'; document.getElementById(name).style.display='inline-block';
document.getElementById(name).scrollIntoView(); document.getElementById(name).scrollIntoView();
if (name == 'disp_add') {
document.getElementById('add_md').focus();
}
if (name == 'disp_edit') {
document.getElementById('edit_md').focus();
}
} }
hideOthers(name); hideOthers(name);
} }

View File

@@ -38,6 +38,7 @@ hr { border-color: #377ba8; }
-o-animation: notifier 500ms alternate infinite; -o-animation: notifier 500ms alternate infinite;
animation: notifier 500ms alternate infinite; } animation: notifier 500ms alternate infinite; }
.date { font-size: 0.75em; margin-top: 1.2em; } .date { font-size: 0.75em; margin-top: 1.2em; }
.fixed_topright { position: fixed; top: 0.5em; right: -0.5em; }
/* MD rendering */ /* MD rendering */

View File

@@ -37,6 +37,8 @@
<a id="h2_delete" onclick="hidetoggle('disp_delete')" class=pointer>&otimes;&nbsp;Delete&nbsp;shop</a> <a id="h2_delete" onclick="hidetoggle('disp_delete')" class=pointer>&otimes;&nbsp;Delete&nbsp;shop</a>
</div> </div>
</div> </div>
<span class="hspacer"></span>
<span class="iconbox fixed_topright" onclick="hidetoggle('disp_add')" title="Add/remove">±</span>
{% endif %} {% endif %}
</div> </div>
{% for message in get_flashed_messages() %} {% for message in get_flashed_messages() %}