Don't reload MD files

Stick with the Markdown parsed version shown via editing.
This commit is contained in:
Matt Pass
2013-05-02 17:19:04 +01:00
parent 0d01b4a2ea
commit 1d5c049c01

View File

@@ -267,8 +267,8 @@ if ($_GET['action']=="save") {
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');';
echo 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');</script>';
}
// Reload stickytab window
echo '<script>if (top.ICEcoder.stickyTab.location) {top.ICEcoder.stickyTab.location.reload()};action="doneSave";</script>';
// Reload stickytab window if not a Markdown file
echo '<script>if (top.ICEcoder.stickyTab.location && top.ICEcoder.stickyTab.location.pathname.indexOf(".md")==-1) {top.ICEcoder.stickyTab.location.reload()};action="doneSave";</script>';
} else {
$loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';