Changeset 948:206fd3d17d64 for plugins/themeEditor/index.php
- Timestamp:
- 11/01/12 07:54:41 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/themeEditor/index.php
r500 r948 15 15 16 16 $file_default = $file = array('c'=>null, 'w'=>false, 'type'=>null, 'f'=>null, 'default_file'=>false); 17 18 # Get interface setting 19 $core->auth->user_prefs->addWorkspace('interface'); 20 $user_ui_colorsyntax = $core->auth->user_prefs->interface->colorsyntax; 17 21 18 22 # Loading themes … … 62 66 <?php echo dcPage::jsVar('dotclear.msg.document_saved',__("Document saved")); ?> 63 67 <?php echo dcPage::jsVar('dotclear.msg.error_occurred',__("An error occurred:")); ?> 68 <?php echo dcPage::jsVar('dotclear.colorsyntax',$user_ui_colorsyntax); ?> 64 69 //]]> 65 70 </script> 66 71 <script type="text/javascript" src="index.php?pf=themeEditor/script.js"></script> 72 <?php if ($user_ui_colorsyntax) { ?> 73 <link rel="stylesheet" type="text/css" href="index.php?pf=themeEditor/codemirror/codemirror.css" /> 74 <link rel="stylesheet" type="text/css" href="index.php?pf=themeEditor/codemirror.css" /> 75 <script type="text/JavaScript" src="index.php?pf=themeEditor/codemirror/codemirror.js"></script> 76 <script type="text/JavaScript" src="index.php?pf=themeEditor/codemirror/xml.js"></script> 77 <script type="text/JavaScript" src="index.php?pf=themeEditor/codemirror/javascript.js"></script> 78 <script type="text/JavaScript" src="index.php?pf=themeEditor/codemirror/css.js"></script> 79 <script type="text/JavaScript" src="index.php?pf=themeEditor/codemirror/php.js"></script> 80 <script type="text/JavaScript" src="index.php?pf=themeEditor/codemirror/htmlmixed.js"></script> 81 <?php } ?> 67 82 </head> 68 83 … … 108 123 echo 109 124 '</fieldset></form>'; 125 126 if ($user_ui_colorsyntax) { 127 $editorMode = (!empty($_REQUEST['css']) ? "css" : (!empty($_REQUEST['js']) ? "javascript" : "text/html")); 128 echo 129 '<script> 130 var editor = CodeMirror.fromTextArea(document.getElementById("file_content"), { 131 mode: "'.$editorMode.'", 132 tabMode: "indent", 133 lineWrapping: "true", 134 lineNumbers: "true", 135 matchBrackets: "true" 136 }); 137 </script>'; 138 } 110 139 } 111 140 ?>
Note: See TracChangeset
for help on using the changeset viewer.