function conflictingName(name, modal) {
if (filex.files.some(function(item) { return item.get('name') == name })) {
- modal.find('.alert').remove();
-
$('<div>', {
'class': 'alert alert-danger',
html: '<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Plik o podanej już nazwie istnieje!'
});
$('form').on('show.bs.modal', function() {
- console.log('reset');
+ $(this).find('.alert').remove();
this.reset();
+ }).on('shown.bs.modal', function() {
+ $(this).find('input[type="text"]')[0].focus();
});
$('#btn-upload').on('click', function() {