function bindFileActionContextMenuDeleteOnClick() {
        $(fileActionContextMenuDeleteElement).click(fileActionContextMenuDeleteMethod = function () {
            var headers = {};
            headers[csrfTokenHeaderName] = $(csrfTokenElement).val();
            headers["Accept"] = "application/json";

            jqxhr(
                {
                    url: baseUrl + '/file/' + getContextMenuClosestDataElement($(this)).data(fileDataAttributeIdOnlyKey),
                    type: 'DELETE',
                    headers: headers,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        console.log(data);

                        if (data !== undefined && data.length != 0) {
                            if (data.files !== undefined && data.files.length != 0) {
                                clearFileListTableAndFetchUserFiles(currentFolderParentId);
                            }
                            else {
                                alert('No Data Found !');
                            }
                        }
                        else {
                            alert('No Data Found !');
                        }
                    },
                    error: function (data) {
                        alert('fail');
                        console.log(data);
                    }
                },
                function () {
                },
                function () {
                },
                function () {
                }
            );
        });
    }
/* Bind Delete File/Folder button click event */
Bind Delete File/Folder button click event
Bind Delete File / Folder button click event
function bindFileActionContextMenuDeleteOnClick() {
        $(fileActionContextMenuDeleteElement).click(fileActionContextMenuDeleteMethod = function () {
            var headers = {};
            headers[csrfTokenHeaderName] = $(csrfTokenElement).val();
            headers["Accept"] = "application/json";
            jqxhr(
                {
                    url: baseUrl + '/file/' + getContextMenuClosestDataElement($(this)).data(fileDataAttributeIdOnlyKey),
                    type: 'DELETE',
                    headers: headers,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function (data) {
                        console.log(data);
                        if (data !== undefined && data.length != 0) {
                            if (data.files !== undefined && data.files.length != 0) {
                                clearFileListTableAndFetchUserFiles(currentFolderParentId);
                            }
                            else {
                                alert('No Data Found !');
                            }
                        }
                        else {
                            alert('No Data Found !');
                        }
                    },
                    error: function (data) {
                        alert('fail');
                        console.log(data);
                    }
                },
                function () {
                },
                function () {
                },
                function () {
                }
            );
        });
    }
function bindFileActionContextMenuDeleteOnClick ( ) { $ ( fileActionContextMenuDeleteElement ) . click ( fileActionContextMenuDeleteMethod = function ( ) { var headers = { } ; headers [ csrfTokenHeaderName ] = $ ( csrfTokenElement ) . val ( ) ; headers [ "Accept" ] = "application/json" ; jqxhr ( { url : baseUrl + '/file/' + getContextMenuClosestDataElement ( $ ( this ) ) . data ( fileDataAttributeIdOnlyKey ) , type : 'DELETE' , headers : headers , cache : false , contentType : false , processData : false , success : function ( data ) { console . log ( data ) ; if ( data !== undefined && data . length != 0 ) { if ( data . files !== undefined && data . files . length != 0 ) { clearFileListTableAndFetchUserFiles ( currentFolderParentId ) ; } else { alert ( 'No Data Found !' ) ; } } else { alert ( 'No Data Found !' ) ; } } , error : function ( data ) { alert ( 'fail' ) ; console . log ( data ) ; } } , function ( ) { } , function ( ) { } , function ( ) { } ) ; } ) ; }
Bind Delete File/Folder button click event
Bind Delete File / Folder button click event