mirror of
https://github.com/Carve/qbittorrent-webui-cjratliff.com.git
synced 2025-02-28 15:40:28 +01:00
fixed 'is null' possibility in context menus, fixed dbl click among other things
This commit is contained in:
parent
df8c16acc8
commit
d2b3900f3e
@ -282,23 +282,31 @@ window.qBittorrent.ContextMenu = (function () {
|
||||
},
|
||||
|
||||
setItemChecked: function (item, checked) {
|
||||
if (this.menu.getElement('a[href$=' + item + ']')) {
|
||||
this.menu.getElement('a[href$=' + item + ']').firstChild.style.opacity =
|
||||
checked ? '1' : '0'
|
||||
}
|
||||
return this
|
||||
},
|
||||
|
||||
getItemChecked: function (item) {
|
||||
if (this.menu.getElement('a[href$=' + item + ']')) {
|
||||
return (
|
||||
'0' !=
|
||||
this.menu.getElement('a[href$=' + item + ']').firstChild.style.opacity
|
||||
)
|
||||
} else {
|
||||
return '0'
|
||||
}
|
||||
},
|
||||
|
||||
//hide an item
|
||||
hideItem: function (item) {
|
||||
if (this.menu.getElement('a[href$=' + item + ']')) {
|
||||
this.menu
|
||||
.getElement('a[href$=' + item + ']')
|
||||
.parentNode.addClass('invisible')
|
||||
}
|
||||
return this
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user