|
From: <ha...@us...> - 2013-07-21 19:36:47
|
Revision: 1823
http://sourceforge.net/p/openautomation/code/1823
Author: hausl
Date: 2013-07-21 19:36:44 +0000 (Sun, 21 Jul 2013)
Log Message:
-----------
fix for config files with wrong file encoding.
Modified Paths:
--------------
CometVisu/trunk/AUTHORS
CometVisu/trunk/src/cometvisu.appcache
CometVisu/trunk/src/lib/templateengine.js
Modified: CometVisu/trunk/AUTHORS
===================================================================
--- CometVisu/trunk/AUTHORS 2013-07-21 14:50:24 UTC (rev 1822)
+++ CometVisu/trunk/AUTHORS 2013-07-21 19:36:44 UTC (rev 1823)
@@ -10,4 +10,5 @@
Axel Otterstätter - panzaeron - Mr.O (at) gmx (dot) de
Christian - chris_ace - chris_ace (at) users (dot) sourceforge (dot) net
David - daviid5 - daviid5 (at) users (dot) sourceforge (dot) net
-Tobias Bräutigam - peuter - tbraeutigam (at) gmail (dot) com
\ No newline at end of file
+Tobias Bräutigam - peuter - tbraeutigam (at) gmail (dot) com
+Michael Hausl - hausl - michael (at) hausl (dot) com
Modified: CometVisu/trunk/src/cometvisu.appcache
===================================================================
--- CometVisu/trunk/src/cometvisu.appcache 2013-07-21 14:50:24 UTC (rev 1822)
+++ CometVisu/trunk/src/cometvisu.appcache 2013-07-21 19:36:44 UTC (rev 1823)
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# Version SVN:20130716-2039
+# Version SVN:20130721-2135
CACHE:
index.html
Modified: CometVisu/trunk/src/lib/templateengine.js
===================================================================
--- CometVisu/trunk/src/lib/templateengine.js 2013-07-21 14:50:24 UTC (rev 1822)
+++ CometVisu/trunk/src/lib/templateengine.js 2013-07-21 19:36:44 UTC (rev 1823)
@@ -24,20 +24,29 @@
if( templateEngine.visu ) templateEngine.visu.stop();
});
$(document).ready(function() {
+ function configError(textStatus) {
+ var message = 'Config-File Error! ';
+ switch (textStatus) {
+ case 'parsererror':
+ message += '<br />Invalid config file!<br /><a href="check_config.php?config=' + templateEngine.configSuffix + '">Please check!</a>';
+ }
+ $('#loading').html(message);
+ };
// get the data once the page was loaded
$.ajax({
url : 'config/visu_config'+ (templateEngine.configSuffix ? '_' + templateEngine.configSuffix : '') + '.xml',
cache : !templateEngine.forceReload,
- success : templateEngine.parseXML,
- error : function(jqXHR, textStatus, errorThrown) {
- var message = 'Config-File Error! ';
- switch (textStatus) {
- case 'parsererror':
- message += '<br />Invalid config file!<br /><a href="check_config.php?config='
- + templateEngine.configSuffix + '">Please check!</a>';
+ success : function(xml) {
+ if (!xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length) {
+ configError("parsererror");
}
- $('#loading').html(message);
+ else {
+ templateEngine.parseXML(xml);
+ }
},
+ error : function(jqXHR, textStatus, errorThrown) {
+ configError(textStatus);
+ },
dataType : 'xml'
});
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|