projects
/
qcg-portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set focus on modal form
[qcg-portal.git]
/
qcg
/
templates
/
qcg
/
gridftp.html
diff --git
a/qcg/templates/qcg/gridftp.html
b/qcg/templates/qcg/gridftp.html
index
0b0d55a
..
12fe644
100644
(file)
--- a/
qcg/templates/qcg/gridftp.html
+++ b/
qcg/templates/qcg/gridftp.html
@@
-54,8
+54,6
@@
function conflictingName(name, modal) {
if (filex.files.some(function(item) { return item.get('name') == name })) {
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!'
$('<div>', {
'class': 'alert alert-danger',
html: '<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> Plik o podanej już nazwie istnieje!'
@@
-87,6
+85,13
@@
}
});
}
});
+ $('form').on('show.bs.modal', function() {
+ $(this).find('.alert').remove();
+ this.reset();
+ }).on('shown.bs.modal', function() {
+ $(this).find('input[type="text"]')[0].focus();
+ });
+
$('#btn-upload').on('click', function() {
var url = '{% url 'gridftp_upload' %}?' + $.param({host: filex.host, path: filex.path.full()});
$('#btn-upload').on('click', function() {
var url = '{% url 'gridftp_upload' %}?' + $.param({host: filex.host, path: filex.path.full()});