projects
/
qcg-portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gridftp ui: fixes in error handling in saving favorites locations
[qcg-portal.git]
/
filex
/
static
/
filex
/
filex.js
diff --git
a/filex/static/filex/filex.js
b/filex/static/filex/filex.js
index
26bec82
..
ac71ea5
100644
(file)
--- a/
filex/static/filex/filex.js
+++ b/
filex/static/filex/filex.js
@@
-265,6
+265,7
@@
$(function(){
callback_called = false;
$form[0].reset();
callback_called = false;
$form[0].reset();
+ $form.find('.alert-danger').remove();
$form.find('#id_host').val(parts.shift());
if (parts.length)
$form.find('#id_host').val(parts.shift());
if (parts.length)
@@
-277,6
+278,7
@@
$(function(){
e.preventDefault();
$btn.button('loading');
e.preventDefault();
$btn.button('loading');
+ $this.find('.alert-danger').remove();
$.post($this.attr('action'), $this.serialize(), function(data) {
callback(data);
$.post($this.attr('action'), $this.serialize(), function(data) {
callback(data);
@@
-288,6
+290,13
@@
$(function(){
console.error(arguments);
var error = (xhr.responseJSON || {}).error || undefined;
console.error(arguments);
var error = (xhr.responseJSON || {}).error || undefined;
+ if (error.__all__) {
+ error = 'Podana lokalizacja jest już zapisana'
+ }
+ else if (xhr.status == 400) {
+ error = 'Niepoprawna nazwa hosta lub ścieżka'
+ }
+
if (typeof error === 'string') {
$('<div>', {
'class': 'alert alert-danger',
if (typeof error === 'string') {
$('<div>', {
'class': 'alert alert-danger',