Changeset 3980:df625feec28c for plugins/themeEditor/_admin.php
- Timestamp:
- 06/24/19 14:29:57 (6 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/themeEditor/_admin.php
r3874 r3980 70 70 form::combo('colorsyntax_theme', $themes_combo, 71 71 [ 72 'default' => $core->auth->user_prefs->interface->colorsyntax_theme,73 'extra_html' => 'onchange="selectTheme()"']) .72 'default' => $core->auth->user_prefs->interface->colorsyntax_theme 73 ]) . 74 74 '</p>'; 75 75 } else { … … 97 97 }</textarea>'; 98 98 echo 99 '<script> 100 var input = document.getElementById("colorsyntax_theme"); 101 var theme = input.options[input.selectedIndex].textContent; 102 var editor = CodeMirror.fromTextArea(document.getElementById("codemirror"), { 103 mode: "javascript", 104 tabMode: "indent", 105 lineWrapping: 1, 106 lineNumbers: 1, 107 matchBrackets: 1, 108 autoCloseBrackets: 1, 109 theme: "' . ($core->auth->user_prefs->interface->colorsyntax_theme != '' ? $core->auth->user_prefs->interface->colorsyntax_theme : 'default') . '" 110 }); 111 function selectTheme() { 112 var input = document.getElementById("colorsyntax_theme"); 113 var theme = input.options[input.selectedIndex].value; 114 if (theme == "") theme = "default"; 115 editor.setOption("theme", theme); 116 editor.refresh(); 117 } 118 </script>'; 99 dcPage::jsJson('theme_editor_current', ['theme' => $core->auth->user_prefs->interface->colorsyntax_theme != '' ? $core->auth->user_prefs->interface->colorsyntax_theme : 'default']) . 100 dcPage::jsLoad(dcPage::getPF('themeEditor/js/theme.js')); 119 101 echo '</div>'; 120 102 echo '</div>';
Note: See TracChangeset
for help on using the changeset viewer.