Changeset 563247
- Timestamp:
- 06/24/2012 06:37:54 PM (14 years ago)
- Location:
- synchi
- Files:
-
- 8 edited
-
tags/4.1/js/synchi_editor.js (modified) (3 diffs)
-
tags/4.1/php/head/editor.php (modified) (1 diff)
-
tags/4.1/php/head/ide.php (modified) (1 diff)
-
tags/4.1/synchi.php (modified) (2 diffs)
-
trunk/synchi/js/synchi_editor.js (modified) (3 diffs)
-
trunk/synchi/php/head/editor.php (modified) (1 diff)
-
trunk/synchi/php/head/ide.php (modified) (1 diff)
-
trunk/synchi/synchi.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
synchi/tags/4.1/js/synchi_editor.js
r563243 r563247 1 1 // ============================================================================= 2 // File: editor.js3 // Version: 1. 02 // File: synchi_eeditor.js 3 // Version: 1.1 4 4 // 5 5 // Enables synchi editor for articles … … 92 92 // swap controls 93 93 $("#ed_toolbar").remove(); 94 94 95 synchi_controls.parent.prepend(synchi_controls.synchi); 95 96 … … 169 170 // bind click events to line numbers 170 171 $('.CodeMirror-gutter-text pre').live('click',function(){ 172 if(!synchi_editor) return; 171 173 var line = Number($.trim($(this).text()))-1; 172 if(!synchi_editor) return;173 174 if(!synchi_editor.editor.getLineHandle(line)) return; 174 175 synchi_editor.editor.setCursor(line,0); -
synchi/tags/4.1/php/head/editor.php
r563243 r563247 67 67 foreach($css_includes as $css) synchi_echoCSSinclude($css); 68 68 foreach($js_includes as $js) synchi_echoJSinclude($js); 69 if($ theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");69 if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}"); 70 70 71 71 ?> -
synchi/tags/4.1/php/head/ide.php
r563243 r563247 78 78 foreach($css_includes as $css) synchi_echoCSSinclude($css); 79 79 foreach($js_includes as $js) synchi_echoJSinclude($js); 80 if($ theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");80 if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}"); 81 81 82 82 ?> -
synchi/tags/4.1/synchi.php
r563243 r563247 497 497 * 498 498 * @return array $settings 499 * @global $synchi_themes 499 500 */ 500 501 function synchi_get_settings() { 502 global $synchi_themes; 503 $theme = get_option('synchi_option_theme'); 504 if(!isset($theme) || empty($theme) || !in_array($theme, $synchi_themes)) $theme = 'default'; 501 505 return array( 502 506 'flag_plugins' => get_option('synchi_option_flag_plugins') == 1, … … 515 519 * and CSS file includes to admin head 516 520 * 517 * @global $synchi_themes518 521 * @global $synchi_modes 519 522 */ 520 523 function synchi_init() { 521 global $synchi_themes,$synchi_modes; 522 $theme = get_option('synchi_option_theme'); 523 if(!isset($theme) || empty($theme) || !in_array($theme, $synchi_themes)) $theme = 'default'; 524 global $synchi_modes; 524 525 525 526 // determine mode -
synchi/trunk/synchi/js/synchi_editor.js
r562723 r563247 1 1 // ============================================================================= 2 // File: editor.js3 // Version: 1. 02 // File: synchi_eeditor.js 3 // Version: 1.1 4 4 // 5 5 // Enables synchi editor for articles … … 92 92 // swap controls 93 93 $("#ed_toolbar").remove(); 94 94 95 synchi_controls.parent.prepend(synchi_controls.synchi); 95 96 … … 169 170 // bind click events to line numbers 170 171 $('.CodeMirror-gutter-text pre').live('click',function(){ 172 if(!synchi_editor) return; 171 173 var line = Number($.trim($(this).text()))-1; 172 if(!synchi_editor) return;173 174 if(!synchi_editor.editor.getLineHandle(line)) return; 174 175 synchi_editor.editor.setCursor(line,0); -
synchi/trunk/synchi/php/head/editor.php
r562723 r563247 67 67 foreach($css_includes as $css) synchi_echoCSSinclude($css); 68 68 foreach($js_includes as $js) synchi_echoJSinclude($js); 69 if($ theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");69 if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}"); 70 70 71 71 ?> -
synchi/trunk/synchi/php/head/ide.php
r562723 r563247 78 78 foreach($css_includes as $css) synchi_echoCSSinclude($css); 79 79 foreach($js_includes as $js) synchi_echoJSinclude($js); 80 if($ theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");80 if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}"); 81 81 82 82 ?> -
synchi/trunk/synchi/synchi.php
r563243 r563247 497 497 * 498 498 * @return array $settings 499 * @global $synchi_themes 499 500 */ 500 501 function synchi_get_settings() { 502 global $synchi_themes; 503 $theme = get_option('synchi_option_theme'); 504 if(!isset($theme) || empty($theme) || !in_array($theme, $synchi_themes)) $theme = 'default'; 501 505 return array( 502 506 'flag_plugins' => get_option('synchi_option_flag_plugins') == 1, … … 515 519 * and CSS file includes to admin head 516 520 * 517 * @global $synchi_themes518 521 * @global $synchi_modes 519 522 */ 520 523 function synchi_init() { 521 global $synchi_themes,$synchi_modes; 522 $theme = get_option('synchi_option_theme'); 523 if(!isset($theme) || empty($theme) || !in_array($theme, $synchi_themes)) $theme = 'default'; 524 global $synchi_modes; 524 525 525 526 // determine mode
Note: See TracChangeset
for help on using the changeset viewer.