Plugin Directory

Changeset 563247


Ignore:
Timestamp:
06/24/2012 06:37:54 PM (14 years ago)
Author:
mdjekic
Message:
 
Location:
synchi
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • synchi/tags/4.1/js/synchi_editor.js

    r563243 r563247  
    11// =============================================================================
    2 // File: editor.js
    3 // Version: 1.0
     2// File: synchi_eeditor.js
     3// Version: 1.1
    44//
    55// Enables synchi editor for articles
     
    9292        // swap controls
    9393        $("#ed_toolbar").remove();
     94       
    9495        synchi_controls.parent.prepend(synchi_controls.synchi);
    9596       
     
    169170    // bind click events to line numbers
    170171    $('.CodeMirror-gutter-text pre').live('click',function(){
     172        if(!synchi_editor) return;
    171173        var line = Number($.trim($(this).text()))-1;
    172         if(!synchi_editor) return;
    173174        if(!synchi_editor.editor.getLineHandle(line)) return;
    174175        synchi_editor.editor.setCursor(line,0);
  • synchi/tags/4.1/php/head/editor.php

    r563243 r563247  
    6767foreach($css_includes as $css) synchi_echoCSSinclude($css);
    6868foreach($js_includes as $js) synchi_echoJSinclude($js);
    69 if($theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");
     69if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}");
    7070
    7171?>
  • synchi/tags/4.1/php/head/ide.php

    r563243 r563247  
    7878foreach($css_includes as $css) synchi_echoCSSinclude($css);
    7979foreach($js_includes as $js) synchi_echoJSinclude($js);
    80 if($theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");
     80if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}");
    8181
    8282?>
  • synchi/tags/4.1/synchi.php

    r563243 r563247  
    497497 *
    498498 * @return array $settings
     499 * @global $synchi_themes
    499500 */
    500501function 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';
    501505    return array(
    502506        'flag_plugins' => get_option('synchi_option_flag_plugins') == 1,
     
    515519 * and CSS file includes to admin head
    516520 *
    517  * @global $synchi_themes
    518521 * @global $synchi_modes
    519522 */
    520523function 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;
    524525   
    525526    // determine mode
  • synchi/trunk/synchi/js/synchi_editor.js

    r562723 r563247  
    11// =============================================================================
    2 // File: editor.js
    3 // Version: 1.0
     2// File: synchi_eeditor.js
     3// Version: 1.1
    44//
    55// Enables synchi editor for articles
     
    9292        // swap controls
    9393        $("#ed_toolbar").remove();
     94       
    9495        synchi_controls.parent.prepend(synchi_controls.synchi);
    9596       
     
    169170    // bind click events to line numbers
    170171    $('.CodeMirror-gutter-text pre').live('click',function(){
     172        if(!synchi_editor) return;
    171173        var line = Number($.trim($(this).text()))-1;
    172         if(!synchi_editor) return;
    173174        if(!synchi_editor.editor.getLineHandle(line)) return;
    174175        synchi_editor.editor.setCursor(line,0);
  • synchi/trunk/synchi/php/head/editor.php

    r562723 r563247  
    6767foreach($css_includes as $css) synchi_echoCSSinclude($css);
    6868foreach($js_includes as $js) synchi_echoJSinclude($js);
    69 if($theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");
     69if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}");
    7070
    7171?>
  • synchi/trunk/synchi/php/head/ide.php

    r562723 r563247  
    7878foreach($css_includes as $css) synchi_echoCSSinclude($css);
    7979foreach($js_includes as $js) synchi_echoJSinclude($js);
    80 if($theme != 'default') synchi_echoCSSinclude("lib/codemirror/theme/$theme");
     80if($synchi_settings['theme'] != 'default') synchi_echoCSSinclude("lib/codemirror/theme/{$synchi_settings['theme']}");
    8181
    8282?>
  • synchi/trunk/synchi/synchi.php

    r563243 r563247  
    497497 *
    498498 * @return array $settings
     499 * @global $synchi_themes
    499500 */
    500501function 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';
    501505    return array(
    502506        'flag_plugins' => get_option('synchi_option_flag_plugins') == 1,
     
    515519 * and CSS file includes to admin head
    516520 *
    517  * @global $synchi_themes
    518521 * @global $synchi_modes
    519522 */
    520523function 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;
    524525   
    525526    // determine mode
Note: See TracChangeset for help on using the changeset viewer.