Set savedPoints on reverting, load or save

On reverting set back to the changeGeneration integer
On loading set to the new changeGeneration integer
On saving set to the current changeGeneration integer
This commit is contained in:
Matt Pass
2013-09-25 09:52:16 +01:00
parent fe2719a6e3
commit ee917776f0

View File

@@ -305,7 +305,7 @@ if ($_GET['action']=="save") {
document.getElementById('userVersionFile').value = cM.getValue();
// Revert back to original
cM.setValue(document.getElementById('loadedFile').value);
top.ICEcoder.changedContent[thisTab-1] = 0;
top.ICEcoder.savedPoints[thisTab-1] = cM.changeGeneration();
top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "<?php echo $filemtime; ?>";
cM.clearHistory();
// Now for the new file
@@ -350,6 +350,7 @@ if (action=="load") {
top.ICEcoder.switchMode();
cM = top.ICEcoder.getcMInstance();
cM.setValue(document.getElementById('loadedFile').value);
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
top.document.getElementById('content').style.visibility='visible';
top.ICEcoder.switchTab(top.ICEcoder.selectedTab);
top.ICEcoder.focus();
@@ -425,7 +426,8 @@ if (action=="save") {
}
if (action=="doneSave") {
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 0;
cM = top.ICEcoder.getcMInstance();
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);
}