You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2016/07/18 17:16:28 UTC
svn commit: r1753271 - in /vcl/trunk/web: .ht-inc/requests.php
js/newresservercommon.js
Author: jfthomps
Date: Mon Jul 18 17:16:28 2016
New Revision: 1753271
URL: http://svn.apache.org/viewvc?rev=1753271&view=rev
Log:
VCL-956 - display reservation times in user's own timezone
requests.php: modified viewRequests: added offsetreloading variable to printed javascript block to act as a flag that the page is getting reloaded
newresservercommon.js: modified populateProfileStore: added check for offsetreloading being defined and set to 1; if so, do not make AJAX call to populate profile store; there was a race condition where the initial page load would continue even after the browser started to reload the page that caused the continuation to get deleted from the database from the initial page load, after it was populated into the database from the 2nd page load, but before the 2nd page load attempted the AJAX call to load it; therefore, when the 2nd page load tried to load it, it had already been deleted from the database
Modified:
vcl/trunk/web/.ht-inc/requests.php
vcl/trunk/web/js/newresservercommon.js
Modified: vcl/trunk/web/.ht-inc/requests.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/requests.php?rev=1753271&r1=1753270&r2=1753271&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/requests.php (original)
+++ vcl/trunk/web/.ht-inc/requests.php Mon Jul 18 17:16:28 2016
@@ -51,6 +51,7 @@ function viewRequests() {
print "<script type=\"text/javascript\">\n";
print "var now = new Date();\n";
print "var offset = now.getTimezoneOffset();\n";
+ print "var offsetreloading = 1;\n";
print "setTimeout(function() {\n";
print " window.location = '" . BASEURL . SCRIPT . "?mode=$mode&offset=' + offset;\n";
print "}, 1);\n";
Modified: vcl/trunk/web/js/newresservercommon.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/newresservercommon.js?rev=1753271&r1=1753270&r2=1753271&view=diff
==============================================================================
--- vcl/trunk/web/js/newresservercommon.js (original)
+++ vcl/trunk/web/js/newresservercommon.js Mon Jul 18 17:16:28 2016
@@ -86,6 +86,8 @@ function int2bstr(a) {
}
function populateProfileStore(cont) {
+ if(typeof(offsetreloading) != 'undefined' && offsetreloading == 1)
+ return;
RPCwrapper({continuation: cont}, populateProfileStoreCB, 1);
}