#317 context menu

This commit is contained in:
cutls 2020-08-05 12:26:59 +09:00
parent 1710ab0035
commit 80ce93785a
2 changed files with 4 additions and 2 deletions

View File

@ -680,7 +680,8 @@ function staEx(mode) {
})
return
}
function toggleAction(elem, height) {
function toggleAction(elem, ct) {
var height = ct * 39 + 6
var cont = elem.parents('.cvo').find('.contextMenu')
if (cont.hasClass('hide')) {
$('#contextWrap').removeClass('hide')
@ -691,6 +692,7 @@ function toggleAction(elem, height) {
cont.removeClass('bottom')
cont.addClass('top')
} else {
top = elem.offset().top - 105
cont.removeClass('top')
cont.addClass('bottom')
}

View File

@ -1132,7 +1132,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
</div>
<div class="area-side">
<div class="action ${noauth}">
<a onclick="toggleAction($(this), ${menuct * 39 + 6})"
<a onclick="toggleAction($(this), ${menuct})"
class="ctxMenu waves-effect waves-dark btn-flat" style="padding:0">
<i class="text-darken-3 material-icons act-icon" aria-hidden="true">expand_more</i>
<span class="voice">Other actions</span>