Author: jfthomps
Date: Fri Nov  7 19:55:43 2014
New Revision: 1637439

URL: http://svn.apache.org/r1637439
Log:
no JIRA

utils.php:
-modified getRequestInfo and showTimeTable: changed links using mode=newRequest 
to mode=viewRequests
-modified continuationsError: added a div with an id of 
continuationserrormessage around error message so that error handler in code.js 
can parse contents of div out if whole page of html is returned

requests.php: modified detailStatusHTML: changed link using mode=newRequest to 
mode=viewRequests

code.js: modified returnCheck: added "else if" that gets html from 
continuationserrormessage div if "-- continuationserror --" is on the page so 
whole contents of page will not be displayed to user if header and footer are 
sent

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

Modified: vcl/trunk/web/.ht-inc/requests.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/requests.php?rev=1637439&r1=1637438&r2=1637439&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/requests.php (original)
+++ vcl/trunk/web/.ht-inc/requests.php Fri Nov  7 19:55:43 2014
@@ -2564,8 +2564,8 @@ function detailStatusHTML($reqid) {
        }
        if(! $found) {
                $text  = _("The selected reservation is no longer available.  
Go to ");
-               $text .= "<a href=" . BASEURL . SCRIPT . "?mode=newRequest>";
-               $text .= _("New Reservations</a> to request a new reservation 
or ");
+               $text .= "<a href=" . BASEURL . SCRIPT . "?mode=viewRequests>";
+               $text .= _("Reservations</a> to request a new reservation or ");
                $text .= _("select another one that is available.");
                return $text;
        }

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1637439&r1=1637438&r2=1637439&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Fri Nov  7 19:55:43 2014
@@ -5449,10 +5449,9 @@ function getRequestInfo($id, $returnNULL
                        print $HTMLheader;
                print _("<h1>OOPS! - Reservation Has Expired</h1>\n");
                print _("The selected reservation is no longer available.  Go 
to ");
-               print "<a href=" . BASEURL . SCRIPT . "?mode=newRequest>";
-               print _("New Reservations</a><br>to request a new reservation 
or to ");
-               print "<a href=" . BASEURL . SCRIPT . "?mode=viewRequests>";
-               print _("Current Reservations</a> to select<br>another one that 
is available.");
+               print "<a href=\"" . BASEURL . SCRIPT . "?mode=viewRequests\">";
+               print _("Reservations</a><br>to request a new reservation or ");
+               print _("select another one that is available.");
                printHTMLFooter();
                dbDisconnect();
                exit;
@@ -7496,7 +7495,7 @@ function showTimeTable($links) {
                        elseif($timeslots[$id][$stamp]["available"]) {
                                if($links) {
                                        print "          <TD 
bgcolor=\"#00ff00\"><a href=\"" . BASEURL . SCRIPT;
-                                       print 
"?mode=newRequest&stamp=$stamp&imageid=$imageid&length=$length&imaging=$imaging\"><img
 ";
+                                       print 
"?mode=viewRequests&stamp=$stamp&imageid=$imageid&length=$length&imaging=$imaging\"><img
 ";
                                        print "src=images/green.jpg alt=free 
border=0></a></TD>\n";
                                }
                                else {
@@ -11528,6 +11527,7 @@ function continuationsError() {
        }
        if(array_key_exists('error', $contdata)) {
                print "<!-- continuationserror -->\n";
+               print "<div id=\"continuationserrormessage\">\n";
                switch($contdata['error']) {
                case 'invalid input':
                        print _("<h2>Error: Invalid Input</h2><br>\n");
@@ -11551,6 +11551,7 @@ function continuationsError() {
                        print HELPEMAIL . "</a> " . _("for further assistance.  
Please include the ");
                        print _("steps you took that led up to this problem in 
your email message.");
                }
+               print "</div>\n";
        }
        if(! array_key_exists('noHTMLwrappers', $contdata) ||
                $contdata['noHTMLwrappers'] == 0)

Modified: vcl/trunk/web/js/code.js
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/js/code.js?rev=1637439&r1=1637438&r2=1637439&view=diff
==============================================================================
--- vcl/trunk/web/js/code.js (original)
+++ vcl/trunk/web/js/code.js Fri Nov  7 19:55:43 2014
@@ -83,6 +83,12 @@ function returnCheck(CB, data, ioArgs) {
                        alert(_('Error encountered:') + " " + _('Please try 
again later'));
                        return;
                }
+               else if(data.match(/-- continuationserror --/)) {
+                       var i = data.indexOf('<div 
id="continuationserrormessage');
+                       i = data.indexOf('>', i) + 2;
+                       var j = data.indexOf('</div>', i);
+                       data = data.slice(i, j);
+               }
                var div = document.createElement('div');
                div.innerHTML = data;
                var msg = div.textContent || div.innerText || "";


Reply via email to