Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
edit
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
blacklight
edit
Commits
93317ba0
Commit
93317ba0
authored
Aug 01, 2019
by
Michael Seaholm
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/mtc-1341' of gitlab.entropy.cc:blacklight/bl-edit into release
parents
76afa573
5bba6f08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
public/js/modules/page-dialogs.js
public/js/modules/page-dialogs.js
+25
-4
No files found.
public/js/modules/page-dialogs.js
View file @
93317ba0
...
...
@@ -198,11 +198,32 @@ function isCollection(path){
/***************************************************************************************/
module
.
exports
.
deactivate
=
function
(
baseUrl
,
blProxyPrefix
){
// if this is a collection item, then after deactivation show a list of stubs which could be deactivated
activateOrDeactivate
(
"
Deactivate
"
,
[
baseUrl
],
blProxyPrefix
,
(
err
)
=>
{
if
(
err
){
Materialize
.
toast
(
"
Error deactivating. See web console for details.
"
);
console
.
error
(
"
Error deactivating
"
+
baseUrl
,
err
);
return
;}
Materialize
.
toast
(
"
Page deactivation successful
"
,
4000
,
"
rounded
"
)
var
$dialog
=
buildDialog
({
saveText
:
"
Deactivate Page
"
});
var
$dialogBody
=
$dialog
.
find
(
"
.modal-content
"
);
var
titleBar
=
$dialog
.
titleBar
(
"
Deactivate
"
);
var
html
=
[
titleBar
,
`<form>
<div class="row">
<div class="col s12" style="margin:24px; width:calc(100% - 48px);">
`
];
html
.
push
(
"
<h5>Dectivate this page?</h5>
"
);
html
.
push
(
`</div></div></form>`
);
$dialogBody
.
html
(
html
.
join
(
"
"
));
////////////////////////////////////////////////////////////////////////////////////
$dialog
.
find
(
"
.bl-save-button
"
).
click
(
function
(){
// if this is a collection item, then after deactivation show a list of stubs which could be deactivated
activateOrDeactivate
(
"
Deactivate
"
,
[
baseUrl
],
blProxyPrefix
,
(
err
)
=>
{
$dialog
.
closeModal
();
if
(
err
){
Materialize
.
toast
(
"
Error deactivating. See web console for details.
"
);
console
.
error
(
"
Error deactivating
"
+
baseUrl
,
err
);
return
;}
Materialize
.
toast
(
"
Page deactivation successful
"
,
4000
,
"
rounded
"
)
});
})
}
...
...
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