MINOR Avoid stale version state in VersionList javascript (AIR-22)

This commit is contained in:
Ingo Schommer 2011-08-30 14:07:45 +02:00
parent a642ad2538
commit 29b9452df9
2 changed files with 7 additions and 1 deletions

View File

@ -83,9 +83,11 @@ CMSForm.prototype = {
* @param evalResponse boolean (optional)
*/
loadNewPage : function(formContent, response, evalResponse) {
//alert('here: ' + formContent);
var rightHTML = formContent;
// reset the version view history
if($('versions_holder')) $('versions_holder').reset();
// Rewrite # links
rightHTML = rightHTML.replace(/(<a[^>]+href *= *")#/g, '$1' + window.location.href.replace(/#.*$/,'') + '#');

View File

@ -337,6 +337,10 @@ VersionList.prototype = {
if(this.idLoaded) {
$('Form_EditForm').getPageFromServer(this.idLoaded);
}
},
// reset after new page is loaded... is called from LeftAndMain_right.js
reset : function() {
this.otherVersionID = undefined;
}
}