Skip to content
Snippets Groups Projects
Commit b40c7575 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Fix Summon reload, broken by removal of closeAction in favor of the stack.

parent d4d788a9
No related merge requests found
...@@ -124,7 +124,7 @@ function getLightboxByUrl(url, post, callback) { ...@@ -124,7 +124,7 @@ function getLightboxByUrl(url, post, callback) {
} }
}, },
error:function(d,e) { error:function(d,e) {
console.log(url,e,d); console.log(url,e,d); // Error reporting
} }
}); });
lastLightboxURL = url; lastLightboxURL = url;
...@@ -251,9 +251,18 @@ function ajaxLogin(form) { ...@@ -251,9 +251,18 @@ function ajaxLogin(form) {
refreshCommentList(recordId, recordSource); refreshCommentList(recordId, recordSource);
}); });
var summon = false;
$('.hiddenSource').each(function(i, e) {
if(e.value == 'Summon') {
summon = true;
// If summon, queue reload
callbackStack.unshift(function(){document.location.reload(true);});
}
});
// Refresh tab content // Refresh tab content
var recordTabs = $('.recordTabs'); var recordTabs = $('.recordTabs');
if(recordTabs.length > 0) { if(!summon && recordTabs.length > 0) { // If summon, skip: about to reload anyway
var tab = recordTabs.find('.active a').attr('id'); var tab = recordTabs.find('.active a').attr('id');
$.ajax({ $.ajax({
type:'POST', type:'POST',
...@@ -263,7 +272,7 @@ function ajaxLogin(form) { ...@@ -263,7 +272,7 @@ function ajaxLogin(form) {
recordTabs.next('.tab-container').html(html); recordTabs.next('.tab-container').html(html);
}, },
error:function(d,e) { error:function(d,e) {
console.log(d,e); console.log(d,e); // Error reporting
} }
}); });
} }
...@@ -276,12 +285,6 @@ function ajaxLogin(form) { ...@@ -276,12 +285,6 @@ function ajaxLogin(form) {
} else if(lastLightboxPOST && lastLightboxPOST['loggingin']) { } else if(lastLightboxPOST && lastLightboxPOST['loggingin']) {
closeLightbox(); closeLightbox();
} else { } else {
// If summon, queue reload
$('.hiddenSource').each(function(i, e) {
if(e.value == 'Summon') {
callbackStack.unshift(function(){alert('!');document.location.reload(true);});
}
});
getLightboxByUrl(lastLightboxURL, lastLightboxPOST); getLightboxByUrl(lastLightboxURL, lastLightboxPOST);
} }
} else { } else {
...@@ -324,7 +327,7 @@ function cartSubmit($form) { ...@@ -324,7 +327,7 @@ function cartSubmit($form) {
newDoc.close(); newDoc.close();
}, },
error:function(d,e) { error:function(d,e) {
console.log(d,e); console.log(d,e); // Error reporting
} }
}); });
break; break;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment