Commit e8d0f911 by Dányi Bence

one: delete confirmation window added

parent 7f2b2920
......@@ -338,6 +338,10 @@ $(function() {
* Deletes the specified file (or folder)
*/
self.delete = function(item) {
$('#modal').show();
$('#modal-container').html('Biztosan törlöd a(z) <strong>' + item.originalName + '</strong> ' + (item.type == 'fájl' ? 'fájlt' : 'mappát (és a teljes tartalmát)') + '? <br /><input class="ok" type="button" value="Naná!" style="float: left"/><input class="cancel" type="button" value="Fittyfenét!" style="float: right" />');
$('#modal-container .ok').click(function() {
$('#modal').hide();
$.ajax({
type: 'POST',
data: 'rm=' + self.currentPath() + item.originalName,
......@@ -347,6 +351,10 @@ $(function() {
self.files.remove(item);
}
})
});
$('#modal-container .cancel').click(function() {
$('#modal').hide();
});
}
/**
......
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 sign in to comment