Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions apps/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -490,26 +490,30 @@ <h5 class="modal-title" id="deleteModalLabel">Delete confirmation</h5>
function checkUserPermissions(){
let userType=getUserType();
let permissions;
getUserPermissions(userType).then(function(response){
return response.json();
}).then(function(data) {
// console.log(data);
getUserPermissions(userType)
.then(response => response.text())
.then((data) => {
return (data ? JSON.parse(data) : null);
})
.then((data)=> {
if(data===null)
return;
permissions = data;
if(permissions.slide.delete == true)
$(".DelButton").css("display","block");
});
}
function deleteSld(e) {
const oid = e.dataset.id;
const oname = e.dataset.name;
const oname = e.dataset.name;
const store = new Store('../data/');
if (oid) {
$('#confirmDeleteContent').html(`Are you sure you want to delete the slide ${oname} with id ${oid} ?`);
$('#deleteModal').modal('toggle');
$("#confirmDelete").unbind( "click" );
$("#confirmDelete").click(function(){
store.deleteSlide(oid);
});
});
} else {
alert('No Data Id');
}
Expand Down