Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
synergy-components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
synergy-components
Commits
476e20f3
Commit
476e20f3
authored
Mar 16, 2023
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
записи реестр - массовые действия
parent
26f7d817
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
constructor/components/записи реестра/записи реестра.js
constructor/components/записи реестра/записи реестра.js
+23
-21
No files found.
constructor/components/записи реестра/записи реестра.js
View file @
476e20f3
...
...
@@ -215,27 +215,6 @@ const registryTable = {
},
()
=>
null
);
},
removeSelectedRow
:
function
()
{
UIkit
.
modal
.
confirm
(
i18n
.
tr
(
'
Вы действительно хотите удалить все выделенные записи реестра?
'
),
{
labels
:
{
ok
:
i18n
.
tr
(
'
Да
'
),
cancel
:
i18n
.
tr
(
'
Отмена
'
)}}).
then
(()
=>
{
Cons
.
showLoader
();
try
{
let
promises
=
[];
this
.
selectedItems
.
forEach
(
docID
=>
promises
.
push
(
deleteDoc
(
docID
)));
Promise
.
all
(
promises
).
then
(
res
=>
{
showMessage
(
i18n
.
tr
(
"
Все выделенные записи реестра удалены
"
),
"
success
"
);
this
.
createBody
();
Cons
.
hideLoader
();
});
}
catch
(
err
)
{
Cons
.
hideLoader
();
showMessage
(
i18n
.
tr
(
"
Произошла ошибка при удалении записей реестра
"
),
"
error
"
);
console
.
log
(
error
);
}
},
()
=>
null
);
},
documentInfo
:
function
(
dataRow
,
e
){
const
createRow
=
(
label
,
value
)
=>
$
(
`<tr><td>
${
label
}
</td><td>
${
value
}
</td></tr>`
);
...
...
@@ -502,6 +481,27 @@ const registryTable = {
},
100
);
},
createMenuActions
:
function
(
massActions
){
const
{
containerID
,
items
}
=
massActions
;
const
menuContainer
=
$
(
'
<div uk-dropdown="mode: click">
'
);
const
nav
=
$
(
'
<ul>
'
,
{
class
:
'
uk-nav uk-dropdown-nav
'
});
menuContainer
.
append
(
nav
);
$
(
`#
${
containerID
}
`
).
append
(
menuContainer
);
items
.
forEach
(
item
=>
{
const
{
name
,
handler
,
className
=
''
}
=
item
;
const
navItem
=
$
(
`<li class="action-menu-item uk-disabled
${
className
}
"><a href="#">
${
name
}
</a></li>`
);
nav
.
append
(
navItem
);
navItem
.
on
(
'
click
'
,
e
=>
{
handler
(
this
.
selectedItems
,
()
=>
{
this
.
createBody
();
});
});
});
},
reset
:
function
(){
this
.
filterRights
=
[];
this
.
allRights
=
[];
...
...
@@ -577,6 +577,8 @@ const registryTable = {
if
(
params
.
filterCode
)
this
.
filterCode
=
params
.
filterCode
;
if
(
params
.
searchString
)
this
.
searchString
=
params
.
searchString
;
if
(
params
.
massActions
)
this
.
createMenuActions
(
params
.
massActions
);
if
(
params
.
hasOwnProperty
(
'
sum
'
)
&&
params
.
sum
)
{
this
.
sum
=
params
.
sum
;
fire
({
type
:
'
change_label
'
,
text
:
localizedText
(
'
0
'
,
'
0
'
,
'
0
'
,
'
0
'
)},
this
.
sum
.
resultLabel
);
...
...
Write
Preview
Markdown
is supported
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