diff --git a/codepot/src/codepot/views/code_edit.php b/codepot/src/codepot/views/code_edit.php index 9f5dbcd6..47b02699 100644 --- a/codepot/src/codepot/views/code_edit.php +++ b/codepot/src/codepot/views/code_edit.php @@ -95,12 +95,19 @@ $(function () { ace_modes = codepot_get_ace_modes(); var detected_mode = null; + var text_mode = null; + var text_opt = null; for (var i in ace_modes) { var mode = ace_modes[i]; var opt = $("").val(mode.mode).text(mode.caption); + if (!text_mode && mode.caption == 'Text') + { + text_mode = mode; + text_opt = opt; + } if (mode.supportsFile("")) { if (!detected_mode) @@ -114,6 +121,12 @@ $(function () { mode_menu.append(opt); } + if (!detected_mode && text_mode) + { + text_opt.attr('selected', 'selected'); + detected_mode = text_mode; + } + var editor = ace.edit("code_edit_mainarea_result_code"); //editor.setTheme("ace/theme/chrome"); if (detected_mode) editor.getSession().setMode (detected_mode.mode); @@ -239,10 +252,9 @@ $this->load->view (
id}{$revreqroot}", - htmlspecialchars($project->name));*/ - print htmlspecialchars($project->name); + htmlspecialchars($project->name)); $exps = explode ('/', $headpath); $expsize = count($exps); @@ -253,12 +265,9 @@ $this->load->view ( $xpar = $this->converter->AsciiToHex ($par); print '/'; - /* print anchor ( "code/file/{$project->id}/{$xpar}{$revreq}", htmlspecialchars($exps[$i])); - */ - print htmlspecialchars($exps[$i]); } if ($headpath != $file['fullpath'])