updateDiffOnSave available in JS

Used in if statement to determine if we should do this or not
This commit is contained in:
Matt Pass
2014-11-14 09:50:44 +00:00
parent 2b44096c4e
commit df685b308e
2 changed files with 9 additions and 1 deletions

View File

@@ -89,6 +89,7 @@ $t = $text['index'];
echo "top.ICEcoder.theme = '".($ICEcoder["theme"]=="default" ? 'icecoder' : $ICEcoder["theme"])."';".
"top.ICEcoder.fontSize = '".$ICEcoder["fontSize"]."';".
"top.ICEcoder.openLastFiles = ".($ICEcoder["openLastFiles"] ? 'true' : 'false').";".
"top.ICEcoder.updateDiffOnSave = ".($ICEcoder["updateDiffOnSave"] ? 'true' : 'false').";".
"top.ICEcoder.codeAssist = ".($ICEcoder["codeAssist"] ? 'true' : 'false').";".
"top.ICEcoder.lineWrapping = ".($ICEcoder["lineWrapping"] ? 'true' : 'false').";".
"top.ICEcoder.indentWithTabs = ".($ICEcoder["indentWithTabs"] ? 'true' : 'false').";".

View File

@@ -195,12 +195,19 @@ if (!$error && $_GET['action']=="save") {
};';
// Copy over content to diff pane if we have that setting on
$doNext .= '
cM = top.ICEcoder.getcMInstance();
cMdiff = top.ICEcoder.getcMdiffInstance();
if (top.ICEcoder.updateDiffOnSave) {
cMdiff.setValue(cM.getValue());
};
';
// Finally, set previous files, indicate changes, set saved points and redo tabs
$doNext .= '
top.ICEcoder.setPreviousFiles();
setTimeout(function(){top.ICEcoder.indicateChanges()},4);
cM = top.ICEcoder.getcMInstance();
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration();
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);';