Changeset 3980:df625feec28c for plugins/themeEditor/index.php
- Timestamp:
- 06/24/19 14:29:57 (6 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/themeEditor/index.php
r3874 r3980 66 66 <title><?php echo __('Edit theme files'); ?></title> 67 67 <?php 68 echo dcPage::jsVars([ 69 'dotclear.msg.saving_document' => __("Saving document..."), 70 'dotclear.msg.document_saved' => __("Document saved"), 71 'dotclear.msg.error_occurred' => __("An error occurred:"), 72 'dotclear.msg.confirm_reset_file' => __("Are you sure you want to reset this file?") 68 if ($user_ui_colorsyntax) { 69 echo dcPage::jsJson('dotclear_colorsyntax', ['colorsyntax' => $user_ui_colorsyntax]); 70 } 71 echo dcPage::jsJson('theme_editor_msg', [ 72 'saving_document' => __("Saving document..."), 73 'document_saved' => __("Document saved"), 74 'error_occurred' => __("An error occurred:"), 75 'confirm_reset_file' => __("Are you sure you want to reset this file?") 73 76 ]) . 74 dcPage::js ConfirmClose('file-form') .75 dcPage::js Load(dcPage::getPF('themeEditor/js/script.js'));77 dcPage::jsLoad(dcPage::getPF('themeEditor/js/script.js')) . 78 dcPage::jsConfirmClose('file-form') ; 76 79 if ($user_ui_colorsyntax) { 77 echo dcPage::jsVars(['dotclear.colorsyntax' => $user_ui_colorsyntax]);78 80 echo dcPage::jsLoadCodeMirror($user_ui_colorsyntax_theme); 79 81 } … … 135 137 (!empty($_REQUEST['js']) ? "javascript" : 136 138 (!empty($_REQUEST['po']) ? "text/plain" : "text/html"))); 137 echo 138 '<script type="text/javascript"> 139 window.CodeMirror.defineMode("dotclear", function(config) { 140 return CodeMirror.multiplexingMode( 141 CodeMirror.getMode(config, "' . $editorMode . '"), 142 {open: "{{tpl:", close: "}}", 143 mode: CodeMirror.getMode(config, "text/plain"), 144 delimStyle: "delimit"}, 145 {open: "<tpl:", close: ">", 146 mode: CodeMirror.getMode(config, "text/plain"), 147 delimStyle: "delimit"}, 148 {open: "</tpl:", close: ">", 149 mode: CodeMirror.getMode(config, "text/plain"), 150 delimStyle: "delimit"} 151 ); 152 }); 153 </script>'; 139 echo dcPage::jsJson('theme_editor_mode', ['mode' => $editorMode]); 140 echo dcPage::jsLoad(dcPage::getPF('themeEditor/js/mode.js')); 154 141 echo dcPage::jsRunCodeMirror('editor', 'file_content', 'dotclear', $user_ui_colorsyntax_theme); 155 142 }
Note: See TracChangeset
for help on using the changeset viewer.