public/javascripts/curationProcess.js
//Method to remove the CO and redirect back to staging area on completion
Method to remove the CO and redirect back to staging area on completion
Method to remove the CO and redirect back to staging area on completion
function removeCuration(id, isreload, url){
    var request = jsRoutes.controllers.CurationObjects.deleteCuration(id).ajax({
        type: 'DELETE'
    });
    request.done(function (response, textStatus, jqXHR){
        if(isreload === "true")
            window.location.href=url;
        else {
            var obj = $('#'+ id+'-tile').parent();
            $('#masonry').masonry( 'remove', obj );
            $('#masonry').masonry( 'layout' );
        }
    });
    request.fail(function (jqXHR, textStatus, errorThrown){
        console.error("The following error occurred: " + textStatus, errorThrown);
        var errMsg = "You must be logged in to delete a publication request from the system.";
        if (!checkErrorAndRedirect(jqXHR, errMsg)) {
            notify("The publication request was not deleted from the system due to : " + errorThrown, "error");
        }
    });
}
function removeCuration ( id , isreload , url ) { var request = jsRoutes . controllers . CurationObjects . deleteCuration ( id ) . ajax ( { type : 'DELETE' } ) ; request . done ( function ( response , textStatus , jqXHR ) { if ( isreload === "true" ) window . location . href = url ; else { var obj = $ ( '#' + id + '-tile' ) . parent ( ) ; $ ( '#masonry' ) . masonry ( 'remove' , obj ) ; $ ( '#masonry' ) . masonry ( 'layout' ) ; } } ) ; request . fail ( function ( jqXHR , textStatus , errorThrown ) { console . error ( "The following error occurred: " + textStatus , errorThrown ) ; var errMsg = "You must be logged in to delete a publication request from the system." ; if ( ! checkErrorAndRedirect ( jqXHR , errMsg ) ) { notify ( "The publication request was not deleted from the system due to : " + errorThrown , "error" ) ; } } ) ; }
Method to remove the CO and redirect back to staging area on completion
Method to remove the CO and redirect back to staging area on completion