projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
126bab7
)
Support short error messages for status field
author
Joey Schulze
<joey@infodrom.org>
Sun, 28 Feb 2010 16:53:34 +0000
(17:53 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Sun, 28 Feb 2010 16:53:34 +0000
(17:53 +0100)
lib/functions.js
patch
|
blob
|
history
diff --git
a/lib/functions.js
b/lib/functions.js
index
a145482
..
ea1d587
100644
(file)
--- a/
lib/functions.js
+++ b/
lib/functions.js
@@
-7,7
+7,10
@@
function ajax_request_callback(req)
var data = json_parse(req.responseText);
if (typeof data.error == 'string') {
var data = json_parse(req.responseText);
if (typeof data.error == 'string') {
- error('Fehler im AJAX-Backend');
+ if (typeof data.errormsg == 'string')
+ error(data.errormsg);
+ else
+ error('Fehler im AJAX-Backend');
alert("Fehler im AJAX backend:\n" + data.error);
} else if (req.oncomplete)
req.oncomplete(data);
alert("Fehler im AJAX backend:\n" + data.error);
} else if (req.oncomplete)
req.oncomplete(data);