You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
(function($) { |
|
'use strict'; |
|
$(function() { |
|
$('.file-upload-browse').on('click', function() { |
|
var file = $(this).parent().parent().parent().find('.file-upload-default'); |
|
file.trigger('click'); |
|
}); |
|
$('.file-upload-default').on('change', function() { |
|
$(this).parent().find('.form-control').val($(this).val().replace(/C:\\fakepath\\/i, '')); |
|
}); |
|
}); |
|
$(document).ready(function() { |
|
var listDelete = $('.list-delete'); |
|
listDelete.on('click', function() { |
|
swal({ |
|
title: "Are you sure?", |
|
text: "Do you really want to delete this item?", |
|
icon: "warning", |
|
buttons: ["Cancel", "Delete Now"], |
|
dangerMode: true, |
|
}) |
|
.then((willDelete) => { |
|
if (willDelete) { |
|
swal({ |
|
title: "Deleted", |
|
text: "The list item has been deleted!", |
|
icon: "success", |
|
}); |
|
} else { |
|
swal("The item is not deleted!"); |
|
} |
|
}); |
|
}); |
|
$('.html-editor').summernote({ |
|
height: 300, |
|
tabsize: 2 |
|
}); |
|
}) |
|
})(jQuery); |