ui: eslint: enforce "no-extra-boolean-cast" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
53e3ea8488
commit
d2021707e3
@ -595,7 +595,7 @@ Ext.define('PVE.Parser', {
|
||||
return undefined;
|
||||
} else if (value === 'x!oath') {
|
||||
return 'totp';
|
||||
} else if (!!(match = value.match(/^x!(.+)$/))) {
|
||||
} else if (match = value.match(/^x!(.+)$/)) {
|
||||
return match[1];
|
||||
} else {
|
||||
return 1;
|
||||
|
@ -44,7 +44,7 @@ Ext.define('PVE.dc.RoleView', {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!!rec.data.special) {
|
||||
if (rec.data.special) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
||||
listeners: {
|
||||
change: function(cb, value) {
|
||||
me.down('field[name=ip]').setEmptyText(
|
||||
!!value ? Proxmox.Utils.NoneText : "",
|
||||
value ? Proxmox.Utils.NoneText : "",
|
||||
);
|
||||
me.down('field[name=ip]').setDisabled(!value);
|
||||
me.down('field[name=gw]').setDisabled(!value);
|
||||
@ -253,7 +253,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
||||
listeners: {
|
||||
change: function(cb, value) {
|
||||
me.down('field[name=ip6]').setEmptyText(
|
||||
!!value ? Proxmox.Utils.NoneText : "",
|
||||
value ? Proxmox.Utils.NoneText : "",
|
||||
);
|
||||
me.down('field[name=ip6]').setDisabled(!value);
|
||||
me.down('field[name=gw6]').setDisabled(!value);
|
||||
|
@ -169,7 +169,7 @@ Ext.define('PVE.qemu.PCIInputPanel', {
|
||||
listeners: {
|
||||
change: function(field, value) {
|
||||
var mf = me.down('field[name=multifunction]');
|
||||
if (!!value) {
|
||||
if (value) {
|
||||
mf.setValue(false);
|
||||
}
|
||||
mf.setDisabled(!!value);
|
||||
|
@ -375,8 +375,8 @@ Ext.define('PVE.tree.ResourceTree', {
|
||||
// select parent node is selection vanished
|
||||
if (lastsel && !rootnode.findChild('id', lastsel.data.id, true)) {
|
||||
lastsel = rootnode;
|
||||
while (!!(p = parents.shift())) {
|
||||
if (!!(tmp = rootnode.findChild('id', p.data.id, true))) {
|
||||
while (p = parents.shift()) {
|
||||
if (tmp = rootnode.findChild('id', p.data.id, true)) {
|
||||
lastsel = tmp;
|
||||
break;
|
||||
}
|
||||
@ -461,7 +461,7 @@ Ext.define('PVE.tree.ResourceTree', {
|
||||
if (!sm.isSelected(node)) {
|
||||
sm.select(node);
|
||||
var cn = node;
|
||||
while (!!(cn = cn.parentNode)) {
|
||||
while (cn = cn.parentNode) {
|
||||
if (!cn.isExpanded()) {
|
||||
cn.expand();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user