Commit 7554d91e authored by Tina Hampton's avatar Tina Hampton

Merge branch 'master' into 'deploy/project7'

Master

See merge request blacklight/bl-edit!275
parents 29eb013b 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")
});
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment