mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Avoid stale version state in VersionList javascript (AIR-22)
This commit is contained in:
parent
a642ad2538
commit
29b9452df9
@ -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(/#.*$/,'') + '#');
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user