Author: jfthomps
Date: Thu Nov  6 19:38:23 2014
New Revision: 1637192

URL: http://svn.apache.org/r1637192
Log:
(no JIRA associated with this)

utils.php: modified continuationsError: added an html comment line before 
printing error for javascript code to key off of

code.js: modified returnCheck: added check for returned data not containing "-- 
continuationserror --" to check for html comment line added when returning 
error from a continuations error. if string is found, error text is passed 
along to user

Modified:
    vcl/trunk/web/.ht-inc/utils.php
    vcl/trunk/web/js/code.js

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1637192&r1=1637191&r2=1637192&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Thu Nov  6 19:38:23 2014
@@ -81,7 +81,6 @@ function initGlobals() {
        $contuserid = '';
        $continuation = processInputVar('continuation', ARG_STRING);
        if(! empty($continuation)) {
-               # TODO handle AJ errors
                $tmp = getContinuationsData($continuation);
                if(empty($tmp))
                        abort(11);
@@ -11528,6 +11527,7 @@ function continuationsError() {
                }
        }
        if(array_key_exists('error', $contdata)) {
+               print "<!-- continuationserror -->\n";
                switch($contdata['error']) {
                case 'invalid input':
                        print _("<h2>Error: Invalid Input</h2><br>\n");

Modified: vcl/trunk/web/js/code.js
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/js/code.js?rev=1637192&r1=1637191&r2=1637192&view=diff
==============================================================================
--- vcl/trunk/web/js/code.js (original)
+++ vcl/trunk/web/js/code.js Thu Nov  6 19:38:23 2014
@@ -78,7 +78,8 @@ function returnCheck(CB, data, ioArgs) {
                var json = dojo.fromJson(data);
        }
        catch(error) {
-               if(data.match(/<html/) || ! error.message.match(/syntax 
error/)) {
+               if((! data.match(/-- continuationserror --/)) &&
+                  (data.match(/<html/) || ! error.message.match(/syntax 
error/))) {
                        alert(_('Error encountered:') + " " + _('Please try 
again later'));
                        return;
                }


Reply via email to