Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Vladimir
noc
Commits
026916c2
Verified
Commit
026916c2
authored
Jul 01, 2022
by
Andrey Vertiprahov
Browse files
Fix if.
parent
b917142c
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/web/core/label/LabelField.js
View file @
026916c2
...
...
@@ -124,8 +124,7 @@ Ext.define("NOC.core.label.LabelField", {
},
filterPicked
:
function
(
rec
)
{
var
me
=
this
;
return
!
this
.
valueCollection
.
contains
(
rec
)
&&
!
(
rec
.
get
(
"
is_protected
"
)
&&
me
.
filterProtected
);
return
!
this
.
valueCollection
.
contains
(
rec
)
&&
!
(
rec
.
get
(
"
is_protected
"
)
&&
this
.
filterProtected
);
},
onKeyDown
:
function
(
e
)
{
...
...
@@ -151,10 +150,10 @@ Ext.define("NOC.core.label.LabelField", {
lastSelectionIndex
=
-
1
;
}
valueCollection
.
remove
(
Ext
.
Array
.
filter
(
selModel
.
getSelection
(),
function
(
el
)
{
return
!
el
.
get
(
"
is_protected
"
)
return
!
el
.
get
(
"
is_protected
"
)
&&
me
.
filterProtected
}));
}
else
{
if
(
!
valueCollection
.
last
().
get
(
"
is_protected
"
))
{
if
(
!
valueCollection
.
last
().
get
(
"
is_protected
"
)
&&
me
.
filterProtected
)
{
valueCollection
.
remove
(
valueCollection
.
last
());
}
}
...
...
@@ -233,14 +232,14 @@ Ext.define("NOC.core.label.LabelField", {
'
%}
'
,
me
.
tipTpl
?
'
" data-qtip="{[this.getTip(values)]}">
'
:
'
">
'
,
'
<div class="
'
+
me
.
tagItemTextCls
+
'
">{[this.getItemLabel(values)]}</div>
'
,
'
<tpl if="!is_protected">
'
,
'
<tpl if="!is_protected
|| !this.filterProtected
">
'
,
'
<div class="
'
+
me
.
tagItemCloseCls
+
childElCls
+
'
"></div>
'
,
'
</tpl>
'
,
'
</li>
'
,
'
</tpl>
'
,
{
isProtected
:
function
(
rec
)
{
return
rec
.
get
(
"
is_protected
"
);
return
rec
.
get
(
"
is_protected
"
)
&&
me
.
filterProtected
;
},
isSelected
:
function
(
rec
)
{
return
me
.
selectionModel
.
isSelected
(
rec
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment