Plugin Directory

Changeset 622360


Ignore:
Timestamp:
11/08/2012 12:55:53 AM (13 years ago)
Author:
mdjekic
Message:

Synchi 4.6 global commit

Location:
synchi
Files:
172 added
6 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • synchi/trunk/css/synchi_editor.css

    r615875 r622360  
    33// =============================================================================
    44// File: synchi_editor.css
    5 // Version: 1.0
     5// Version: 1.1
    66//
    77// Defines Synchi Editor styles
     
    99
    1010*/
     11
     12.CodeMirror {
     13    background-color: white;
     14}
    1115
    1216.synchi_fullscreen {
  • synchi/trunk/js/jquery.synchi.js

    r615875 r622360  
    11// =============================================================================
    22// File: synchi.js
    3 // Version: 1.0
     3// Version: 1.2
    44//
    55// Synchi global
     
    133133//                    null, "synchi_activeline"
    134134//                );
    135                 self.editor.matchHighlight("CodeMirror-searching");
     135                // check if function exists [4.6]
     136                if(self.editor.matchHighlight) self.editor.matchHighlight("CodeMirror-searching");
    136137            },
    137138            onChange: function(){
  • synchi/trunk/js/synchi_editor.js

    r615875 r622360  
    11// =============================================================================
    2 // File: synchi_eeditor.js
    3 // Version: 1.1
     2// File: synchi_editor.js
     3// Version: 2.0
    44//
    55// Enables synchi editor for articles
     
    77
    88var synchi_editor = false;
     9var synchi_mode = 'n/a'; // html,visual
    910var synchi_fullscreen = false;
    10 var synchi_controls = { original : null, synchi : null }
     11var synchi_controls = false;
    1112
    1213/**
     
    6364
    6465/**
    65  * Checks if TinyMCE is being used
    66  *
    67  * @return true if TinyMCE is being used
    68  */
    69 function synchi_isTinyMCE() {
    70     var tinymce = $("#content-tmce");
    71     return tinymce.length != 0;
    72 }
    73 
    74 /**
    7566 * Initializes article editor with syntax highlight
    76  *
    77  * @param editor_area jQuery wrapped textarea object
    78  */
    79 function synchi_initArticleEditor(editor_area) {
    80     // swich to HTML editor if TinyMCE is being used
    81     if(synchi_isTinyMCE()) switchEditors.switchto($("#content-html").get(0));
     67 */
     68function synchi_initArticleEditor() {
     69   
     70    if(synchi_controls) {
     71        // handle controls
     72        synchi_controls.original = $("#ed_toolbar").clone(true);
     73        synchi_controls.parent = $("#ed_toolbar").parent();
     74       
     75        // init the editor
     76        synchi_editor = $("#content").parent().synchi('file.html');
     77       
     78        // swap controls
     79        $("#ed_toolbar").remove();
     80        synchi_controls.parent.prepend(synchi_controls.synchi);
     81       
     82        return;
     83    }
    8284   
    8385    synchi_call('get_editor_controls', {}, function(response) {
    8486        // handle the controls menu
     87        synchi_controls = {};
    8588        synchi_controls.original = $("#ed_toolbar").clone(true);
    8689        synchi_controls.synchi = response.result;
     
    8891       
    8992        // init the editor
    90         synchi_editor = editor_area.parent().synchi('file.html');
     93        synchi_editor = $("#content").parent().synchi('file.html');
    9194       
    9295        // swap controls
    9396        $("#ed_toolbar").remove();
    94        
    9597        synchi_controls.parent.prepend(synchi_controls.synchi);
    96        
    97         // handle TinyMCE
    98         if(synchi_isTinyMCE()) {
    99             $("#content-tmce").click(function(){
    100                 // revert to textarea
    101                 if(synchi_editor) {
    102                     synchi_editor.editor.toTextArea();
    103                     synchi_editor = false;
    104                     // swap controls
    105                     synchi_controls.synchi = $("#ed_toolbar").clone(true);
    106                     $("#ed_toolbar").remove();
    107                     synchi_controls.parent.prepend(synchi_controls.original);
    108                 }
    109                 // default behaviour
    110                 switchEditors.switchto($(this).get(0));
    111                 return false;
    112             });
    113             $("#content-html").click(function(){
    114                 // default behaviour
    115                 switchEditors.switchto($(this).get(0));
    116                 // re-init article editor
    117                 synchi_editor = $("#content").parent().synchi('file.html');
     98    });   
     99}
     100
     101/**
     102 * Switches the editor between modes
     103 *
     104 * @param mode switch to
     105 * @param element caller
     106 */
     107function synchi_switch(mode,element) {
     108    switch(mode) {
     109        case 'visual':if(synchi_mode != 'visual') {
     110            // clear editor
     111            if(synchi_editor) {
     112                synchi_editor.editor.toTextArea();
     113                synchi_editor = false;
     114
    118115                // swap controls
    119                 synchi_controls.original = $("#ed_toolbar").clone(true);
    120116                $("#ed_toolbar").remove();
    121                 synchi_controls.parent.prepend(synchi_controls.synchi);
    122                 return false;
    123             });
    124         }
    125        
    126         // bind key shortcuts
    127         var bindings = {
    128             'Ctrl+f' : function(event){
    129                 if(synchi_editor) synchi_Control('search');
    130             },
    131             'Ctrl+r' : function(event){
    132                 if(synchi_editor) synchi_Control('search_replace');
    133             },
    134             'Ctrl+left' : function(event){
    135                 if(synchi_editor) synchi_Control('find_prev');
    136             },
    137             'Ctrl+right' : function(event){
    138                 if(synchi_editor) synchi_Control('find_next');
    139             },
    140             'Alt+Shift+left' : function(event){
    141                 if(synchi_editor) synchi_Control('indent_left');
    142             },
    143             'Alt+Shift+right' : function(event){
    144                 if(synchi_editor) synchi_Control('indent_right');
    145             },
    146             'Alt+Shift+f' : function(event){
    147                 if(synchi_editor) synchi_Control('format');
    148             },
    149             'Ctrl+z' : function(event){
    150                 if(synchi_editor) synchi_Control('undo');
    151             },
    152             'Ctrl+y' : function(event){
    153                 if(synchi_editor) synchi_Control('redo');
    154             },
    155             'Ctrl+g' : function(event){
    156                 if(synchi_editor) synchi_Control('goto');
    157             },
    158             'Alt+return' : function(event){
    159                 if(synchi_editor) synchi_Control('fullscreen');
     117                synchi_controls.parent.prepend(synchi_controls.original);
     118
     119                // set mode
     120                synchi_mode = 'visual';
    160121            }
    161         };
    162         for(var index in bindings) shortcut.add(index,bindings[index]);
    163     });
    164 }
    165 
    166 // On Load
    167 $(function(){
    168     var editor_area = $("#content");
    169     if(editor_area.length != 0) synchi_initArticleEditor(editor_area);
     122        }break;
     123        case 'html':if(synchi_mode != 'html') {
     124            // init synchi editor
     125            synchi_initArticleEditor();
     126            // set mode
     127            synchi_mode = 'html';
     128        }break;
     129    }
     130    // switch (default behaviour)
     131    switchEditors.switchto(element);
     132    return false;
     133}
     134
     135/**
     136 * Performs initializations on page load
     137 */
     138function synchi_onLoad() {
     139    // check TinyMCE
     140    if(typeof(tinyMCE) == "undefined") return;
     141   
     142    // determine mode
     143    synchi_mode = (tinyMCE.activeEditor == null || tinyMCE.activeEditor.isHidden() != false) ? 'html' : 'visual';
     144   
     145    // init editor if HTML mode active
     146    if(synchi_mode == 'html') setTimeout(synchi_initArticleEditor, 54);
     147   
     148    // override switch button clicks
     149    $('#content-tmce').click(function(){return synchi_switch('visual',this);});
     150    $('#content-html').click(function(){return synchi_switch('html',this);});
     151   
    170152    // bind click events to line numbers
    171153    $('.CodeMirror-gutter-text pre').live('click',function(){
     
    180162        synchi_editor.editor.focus();
    181163    });
    182 });
     164   
     165    // bind key shortcuts
     166    var bindings = {
     167        'Ctrl+f' : function(event){
     168            if(synchi_editor) synchi_Control('search');
     169        },
     170        'Ctrl+r' : function(event){
     171            if(synchi_editor) synchi_Control('search_replace');
     172        },
     173        'Ctrl+left' : function(event){
     174            if(synchi_editor) synchi_Control('find_prev');
     175        },
     176        'Ctrl+right' : function(event){
     177            if(synchi_editor) synchi_Control('find_next');
     178        },
     179        'Alt+Shift+left' : function(event){
     180            if(synchi_editor) synchi_Control('indent_left');
     181        },
     182        'Alt+Shift+right' : function(event){
     183            if(synchi_editor) synchi_Control('indent_right');
     184        },
     185        'Alt+Shift+f' : function(event){
     186            if(synchi_editor) synchi_Control('format');
     187        },
     188        'Ctrl+z' : function(event){
     189            if(synchi_editor) synchi_Control('undo');
     190        },
     191        'Ctrl+y' : function(event){
     192            if(synchi_editor) synchi_Control('redo');
     193        },
     194        'Ctrl+g' : function(event){
     195            if(synchi_editor) synchi_Control('goto');
     196        },
     197        'Alt+return' : function(event){
     198            if(synchi_editor) synchi_Control('fullscreen');
     199        }
     200    };
     201    for(var index in bindings) shortcut.add(index,bindings[index]);
     202}
     203
     204// On Load
     205$(function(){ setTimeout(synchi_onLoad, 100); });
  • synchi/trunk/lang/synchi-en_US.po

    r615875 r622360  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Synchi v4.5\n"
     3"Project-Id-Version: Synchi v4.6\n"
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: \n"
    6 "PO-Revision-Date: 2012-10-23 00:17:26+0000\n"
     6"PO-Revision-Date: 2012-10-31 23:56:59+0000\n"
    77"Last-Translator: mdjekic <[email protected]>\n"
    88"Language-Team: \n"
     
    8181msgstr ""
    8282
     83#: php/editor_controls.php:28
    8384#: php/synchi_ide.php:96
    8485#@ synchi
     
    8687msgstr ""
    8788
     89#: php/editor_controls.php:29
    8890#: php/synchi_ide.php:97
    8991#@ synchi
     
    9193msgstr ""
    9294
     95#: php/editor_controls.php:30
    9396#: php/synchi_ide.php:98
    9497#@ synchi
     
    9699msgstr ""
    97100
     101#: php/editor_controls.php:31
    98102#: php/synchi_ide.php:99
    99103#@ synchi
     
    101105msgstr ""
    102106
     107#: php/editor_controls.php:32
    103108#: php/synchi_ide.php:100
    104109#@ synchi
     
    106111msgstr ""
    107112
     113#: php/editor_controls.php:33
    108114#: php/synchi_ide.php:101
    109115#@ synchi
     
    111117msgstr ""
    112118
     119#: php/editor_controls.php:34
    113120#: php/synchi_ide.php:102
    114121#@ synchi
     
    126133msgstr ""
    127134
     135#: php/editor_controls.php:35
    128136#: php/synchi_ide.php:105
    129137#@ synchi
     
    131139msgstr ""
    132140
     141#: php/editor_controls.php:36
    133142#: php/synchi_ide.php:106
    134143#@ synchi
     
    340349msgstr ""
    341350
     351#: php/settings.php:35
     352#@ synchi
     353msgid "Synchi Settings"
     354msgstr ""
     355
     356#: php/settings.php:39
     357#@ synchi
     358msgid "Global Settings"
     359msgstr ""
     360
     361#: php/settings.php:43
     362#@ synchi
     363msgid "Plugins Editor"
     364msgstr ""
     365
     366#: php/settings.php:53
     367#@ synchi
     368msgid "Themes Editor"
     369msgstr ""
     370
     371#: php/settings.php:63
     372#@ synchi
     373msgid "Articles Editor"
     374msgstr ""
     375
     376#: php/settings.php:74
     377#@ synchi
     378msgid "Editing Settings"
     379msgstr ""
     380
     381#: php/settings.php:78
     382#@ synchi
     383msgid "Line Numbers"
     384msgstr ""
     385
     386#: php/settings.php:88
     387#@ synchi
     388msgid "Match Brackets"
     389msgstr ""
     390
     391#: php/settings.php:98
     392#@ synchi
     393msgid "Indent With Tabs"
     394msgstr ""
     395
     396#: php/settings.php:108
     397#@ synchi
     398msgid "Tab Size"
     399msgstr ""
     400
     401#: php/settings.php:120
     402#@ synchi
     403msgid "Font Size"
     404msgstr ""
     405
     406#: php/settings.php:131
     407#@ synchi
     408msgid "Other Settings"
     409msgstr ""
     410
     411#: php/settings.php:135
     412#@ synchi
     413msgid "Theme"
     414msgstr ""
     415
     416#: php/settings.php:151
     417#@ synchi
     418msgid "theme preview"
     419msgstr ""
     420
  • synchi/trunk/lang/synchi-sr_RS.po

    r615875 r622360  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Synchi v4.5\n"
     3"Project-Id-Version: Synchi v4.6\n"
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: \n"
    6 "PO-Revision-Date: 2012-10-23 00:17:43+0000\n"
     6"PO-Revision-Date: 2012-10-31 23:58:58+0000\n"
    77"Last-Translator: mdjekic <[email protected]>\n"
    88"Language-Team: \n"
     
    8181msgstr "Сачувај све"
    8282
     83#: php/editor_controls.php:28
    8384#: php/synchi_ide.php:96
    8485#@ synchi
     
    8687msgstr "Пронађи"
    8788
     89#: php/editor_controls.php:29
    8890#: php/synchi_ide.php:97
    8991#@ synchi
     
    9193msgstr "Пронађи претходни"
    9294
     95#: php/editor_controls.php:30
    9396#: php/synchi_ide.php:98
    9497#@ synchi
     
    9699msgstr "Пронађи следећи"
    97100
     101#: php/editor_controls.php:31
    98102#: php/synchi_ide.php:99
    99103#@ synchi
     
    101105msgstr "Замени"
    102106
     107#: php/editor_controls.php:32
    103108#: php/synchi_ide.php:100
    104109#@ synchi
     
    106111msgstr "Форматирај"
    107112
     113#: php/editor_controls.php:33
    108114#: php/synchi_ide.php:101
    109115#@ synchi
     
    111117msgstr "Помери улево"
    112118
     119#: php/editor_controls.php:34
    113120#: php/synchi_ide.php:102
    114121#@ synchi
     
    126133msgstr "Понови претходну акцију"
    127134
     135#: php/editor_controls.php:35
    128136#: php/synchi_ide.php:105
    129137#@ synchi
     
    131139msgstr "Иди на линију"
    132140
     141#: php/editor_controls.php:36
    133142#: php/synchi_ide.php:106
    134143#@ synchi
     
    340349msgstr "Величина датотеке:"
    341350
     351#: php/settings.php:35
     352#@ synchi
     353msgid "Synchi Settings"
     354msgstr "Synchi подешавања"
     355
     356#: php/settings.php:39
     357#@ synchi
     358msgid "Global Settings"
     359msgstr "Глобална подешавања"
     360
     361#: php/settings.php:43
     362#@ synchi
     363msgid "Plugins Editor"
     364msgstr "Уређивач додатака"
     365
     366#: php/settings.php:53
     367#@ synchi
     368msgid "Themes Editor"
     369msgstr "Уређивач тема"
     370
     371#: php/settings.php:63
     372#@ synchi
     373msgid "Articles Editor"
     374msgstr "Уређивач чланака"
     375
     376#: php/settings.php:74
     377#@ synchi
     378msgid "Editing Settings"
     379msgstr "Радна подешавања"
     380
     381#: php/settings.php:78
     382#@ synchi
     383msgid "Line Numbers"
     384msgstr "Нумерисане линије"
     385
     386#: php/settings.php:88
     387#@ synchi
     388msgid "Match Brackets"
     389msgstr "Поклапање заграда"
     390
     391#: php/settings.php:98
     392#@ synchi
     393msgid "Indent With Tabs"
     394msgstr "Одвајање табулатором"
     395
     396#: php/settings.php:108
     397#@ synchi
     398msgid "Tab Size"
     399msgstr "Величина табулатора"
     400
     401#: php/settings.php:120
     402#@ synchi
     403msgid "Font Size"
     404msgstr "Величина текста"
     405
     406#: php/settings.php:131
     407#@ synchi
     408msgid "Other Settings"
     409msgstr "Остала подешавања"
     410
     411#: php/settings.php:135
     412#@ synchi
     413msgid "Theme"
     414msgstr "Тема"
     415
     416#: php/settings.php:151
     417#@ synchi
     418msgid "theme preview"
     419msgstr "изглед теме"
     420
  • synchi/trunk/php/editor_controls.php

    r615875 r622360  
    2525    foreach ($editor_controls as $control) {
    2626        $src = WP_PLUGIN_URL . "/synchi/img/ide/$control.png";
    27         switch ($control) {
    28             case 'search' :$title = 'Search (Ctrl-F)';
    29                 break;
    30             case 'find_prev' :$title = 'Find Previous (Ctrl-left)';
    31                 break;
    32             case 'find_next' :$title = 'Find Next (Ctrl-Right)';
    33                 break;
    34             case 'search_replace' :$title = 'Replace (Ctrl-R)';
    35                 break;
    36             case 'format' :$title = 'Format (Alt-Shift-F)';
    37                 break;
    38             case 'indent_left' :$title = 'Indent left (Alt-Shift-Left)';
    39                 break;
    40             case 'indent_right' :$title = 'Indent right (Alt-Shift-Right)';
    41                 break;
    42             case 'undo' :$title = 'Undo (Ctrl-Z)';
    43                 break;
    44             case 'redo' :$title = 'Redo (Ctrl-Y)';
    45                 break;
    46             case 'goto' :$title = 'Go to line (Ctrl-G)';
    47                 break;
    48             case 'fullscreen' :$title = 'Toggle Fullscreen (Alt-Enter)';
    49                 break;
     27        switch($control) {
     28            case 'search' :$title = __('Search','synchi').' (Ctrl-F)';break;
     29            case 'find_prev' :$title = __('Find Previous','synchi').' (Ctrl-left)';break;
     30            case 'find_next' :$title = __('Find Next','synchi').' (Ctrl-Right)';break;
     31            case 'search_replace' :$title = __('Replace','synchi').' (Ctrl-R)';break;
     32            case 'format' :$title = __('Format','synchi').' (Alt-Shift-F)';break;
     33            case 'indent_left' :$title = __('Indent left','synchi').' (Alt-Shift-Left)';break;
     34            case 'indent_right' :$title = __('Indent right','synchi').' (Alt-Shift-Right)';break;
     35            case 'goto' :$title = __('Go to line','synchi').' (Ctrl-G)';break;
     36            case 'fullscreen' :$title = __('Toggle Fullscreen','synchi').' (Alt-Enter)';break;
    5037            default :$title = 'action';
    5138        }
  • synchi/trunk/php/settings.php

    r615875 r622360  
    33// =============================================================================
    44// File: settings.php
    5 // Version: 2.0
     5// Version: 3.0
    66//
    77// Renders synchi settings.
     
    1515<script type="text/javascript">
    1616   
     17    $ = jQuery;
     18   
    1719    $(function(){
     20        $('input[type="checkbox"]').change(function(){
     21            var checkbox = $(this);
     22            checkbox.prev('select').val((checkbox.is(':checked')) ? 1 : 0);
     23        });
    1824        $("#synchi_theme").change(function(){
    1925            $("#synchi_theme_preview").attr('src','<?php echo WP_PLUGIN_URL; ?>/synchi/img/theme-previews/' + $(this).val() + '.png');
     
    2632<div class="wrap">
    2733   
    28     <h2>Synchi Settings</h2>
     34    <div id="icon-options-general" class="icon32"><br></div>
     35    <h2><?php echo __('Synchi Settings','synchi'); ?></h2>
    2936   
    3037    <form method="post" action="<?php echo WP_ADMIN_URL; ?>/index.php">
    3138       
    32         <h3>Global Settings</h3>
     39        <h3><?php echo __('Global Settings','synchi'); ?></h3>
     40        <hr />
    3341        <table class='form-table'>
    3442            <tr valign='top'>
    35                 <th scope='row'>Synchi IDE in Plugins Editor</th>
     43                <th scope='row'><?php echo __('Plugins Editor','synchi'); ?></th>
    3644                <td>
    37                     <select name="synchi_option_flag_plugins">
    38                         <option value="0" <?php if($synchi_settings['flag_plugins'] == 0) echo 'selected="selected"'; ?>>no</option>
    39                         <option value="1" <?php if($synchi_settings['flag_plugins'] == 1) echo 'selected="selected"'; ?>>yes</option>
     45                    <select name="synchi_option_flag_plugins" style="display: none">
     46                        <option value="0" <?php if($synchi_settings['flag_plugins'] == 0) echo 'selected="selected"'; ?>>off</option>
     47                        <option value="1" <?php if($synchi_settings['flag_plugins'] == 1) echo 'selected="selected"'; ?>>on</option>
    4048                    </select>
     49                    <input type="checkbox" <?php if($synchi_settings['flag_plugins'] == 1) echo 'checked="true"'; ?>/>
    4150                </td>
    4251            </tr>
    4352            <tr valign='top'>
    44                 <th scope='row'>Synchi IDE in Themes Editor</th>
     53                <th scope='row'><?php echo __('Themes Editor','synchi'); ?></th>
    4554                <td>
    46                     <select name="synchi_option_flag_themes">
    47                         <option value="0" <?php if($synchi_settings['flag_themes'] == 0) echo 'selected="selected"'; ?>>no</option>
    48                         <option value="1" <?php if($synchi_settings['flag_themes'] == 1) echo 'selected="selected"'; ?>>yes</option>
     55                    <select name="synchi_option_flag_themes" style="display: none">
     56                        <option value="0" <?php if($synchi_settings['flag_themes'] == 0) echo 'selected="selected"'; ?>>off</option>
     57                        <option value="1" <?php if($synchi_settings['flag_themes'] == 1) echo 'selected="selected"'; ?>>on</option>
    4958                    </select>
     59                    <input type="checkbox" <?php if($synchi_settings['flag_themes'] == 1) echo 'checked="true"'; ?>/>
    5060                </td>
    5161            </tr>
    5262            <tr valign='top'>
    53                 <th scope='row'>Synchi Editor in Articles Editor</th>
     63                <th scope='row'><?php echo __('Articles Editor','synchi'); ?></th>
    5464                <td>
    55                     <select name="synchi_option_flag_articles">
    56                         <option value="0" <?php if($synchi_settings['flag_articles'] == 0) echo 'selected="selected"'; ?>>no</option>
    57                         <option value="1" <?php if($synchi_settings['flag_articles'] == 1) echo 'selected="selected"'; ?>>yes</option>
     65                    <select name="synchi_option_flag_articles" style="display: none">
     66                        <option value="0" <?php if($synchi_settings['flag_articles'] == 0) echo 'selected="selected"'; ?>>off</option>
     67                        <option value="1" <?php if($synchi_settings['flag_articles'] == 1) echo 'selected="selected"'; ?>>on</option>
    5868                    </select>
     69                    <input type="checkbox" <?php if($synchi_settings['flag_articles'] == 1) echo 'checked="true"'; ?>/>
    5970                </td>
    6071            </tr>
    6172        </table>
    6273       
    63         <h3>Editing Settings</h3>
     74        <h3><?php echo __('Editing Settings','synchi'); ?></h3>
     75        <hr />
    6476        <table class='form-table'>
    6577            <tr valign='top'>
    66                 <th scope='row'>Line Numbers</th>
     78                <th scope='row'><?php echo __('Line Numbers','synchi'); ?></th>
    6779                <td>
    68                     <select name="synchi_option_lineNumbers">
     80                    <select name="synchi_option_lineNumbers" style="display: none">
    6981                        <option value="0" <?php if($synchi_settings['lineNumbers'] == 0) echo 'selected="selected"'; ?>>no</option>
    7082                        <option value="1" <?php if($synchi_settings['lineNumbers'] == 1) echo 'selected="selected"'; ?>>yes</option>
    7183                    </select>
     84                    <input type="checkbox" <?php if($synchi_settings['lineNumbers'] == 1) echo 'checked="true"'; ?>/>
    7285                </td>
    7386            </tr>
    7487            <tr valign='top'>
    75                 <th scope='row'>Match Brackets</th>
     88                <th scope='row'><?php echo __('Match Brackets','synchi'); ?></th>
    7689                <td>
    77                     <select name="synchi_option_matchBrackets">
     90                    <select name="synchi_option_matchBrackets" style="display: none">
    7891                        <option value="0" <?php if($synchi_settings['matchBrackets'] == 0) echo 'selected="selected"'; ?>>no</option>
    7992                        <option value="1" <?php if($synchi_settings['matchBrackets'] == 1) echo 'selected="selected"'; ?>>yes</option>
    8093                    </select>
     94                    <input type="checkbox" <?php if($synchi_settings['matchBrackets'] == 1) echo 'checked="true"'; ?>/>
    8195                </td>
    8296            </tr>
    8397            <tr valign='top'>
    84                 <th scope='row'>Font size (px)</th>
     98                <th scope='row'><?php echo __('Indent With Tabs','synchi'); ?></th>
    8599                <td>
    86                     <select name="synchi_option_fontSize">
    87                         <?php for($i=10; $i<=16; $i++) { ?>
    88                         <option value="<?php echo $i; ?>" <?php if($synchi_settings['fontSize'] == $i) echo 'selected="selected"'; ?>><?php echo $i; ?> px</option>
    89                         <?php } ?>
     100                    <select name="synchi_option_indentWithTabs" style="display: none">
     101                        <option value="0" <?php if($synchi_settings['indentWithTabs'] == 0) echo 'selected="selected"'; ?>>no</option>
     102                        <option value="1" <?php if($synchi_settings['indentWithTabs'] == 1) echo 'selected="selected"'; ?>>yes</option>
    90103                    </select>
     104                    <input type="checkbox" <?php if($synchi_settings['indentWithTabs'] == 1) echo 'checked="true"'; ?>/>
    91105                </td>
    92106            </tr>
    93107            <tr valign='top'>
    94                 <th scope='row'>Tab Size</th>
     108                <th scope='row'><?php echo __('Tab Size','synchi'); ?></th>
    95109                <td>
    96110                    <select name="synchi_option_tabSize">
     
    104118            </tr>
    105119            <tr valign='top'>
    106                 <th scope='row'>Indent With Tabs</th>
     120                <th scope='row'><?php echo __('Font Size','synchi'); ?> (px)</th>
    107121                <td>
    108                     <select name="synchi_option_indentWithTabs">
    109                         <option value="0" <?php if($synchi_settings['indentWithTabs'] == 0) echo 'selected="selected"'; ?>>no</option>
    110                         <option value="1" <?php if($synchi_settings['indentWithTabs'] == 1) echo 'selected="selected"'; ?>>yes</option>
     122                    <select name="synchi_option_fontSize">
     123                        <?php for($i=10; $i<=16; $i++) { ?>
     124                        <option value="<?php echo $i; ?>" <?php if($synchi_settings['fontSize'] == $i) echo 'selected="selected"'; ?>><?php echo $i; ?> px</option>
     125                        <?php } ?>
    111126                    </select>
    112127                </td>
    113128            </tr>
     129        </table>
     130       
     131        <h3><?php echo __('Other Settings','synchi'); ?></h3>
     132        <hr />
     133        <table class='form-table'>
    114134            <tr valign='top'>
    115                 <th scope='row'>Theme</th>
     135                <th scope='row'><?php echo __('Theme','synchi'); ?></th>
    116136                <td>
    117137                    <select id="synchi_theme" name="synchi_option_theme">
     
    129149                <th scope='row'></th>
    130150                <td>
    131                     theme preview:<br />
     151                    <?php echo __('theme preview','synchi'); ?>:<br />
    132152                    <img id="synchi_theme_preview" src="" style="width: 590px; height: 300px; border: 1px solid black;" />
    133153                </td>
    134154            </tr>
    135155        </table>
     156       
     157       
    136158        <?php submit_button(); ?>
    137159        <input type="hidden" name="synchi_action" value="update_settings" />
  • synchi/trunk/readme.txt

    r615875 r622360  
    77Requires at least: 2.7
    88Tested up to: 3.4.2
    9 Stable tag: 4.5
     9Stable tag: 4.6
    1010
    1111A full IDE inside your Wordpress! Syntax highlighting and powerfull IDE features
     
    6666screenshots and contact information is available at projects.djekic.net
    6767
    68 = Future features =
     68= Localization =
    6969
    70 Here is a list of features to expect as Synchi evolves:
     70Synchi has localication support. Currently, the IDE is available for:
    7171
    72 * editing files with no file extensions
    73 * upload/download files trough the file browser
    74 * drag & drop in the file browser
    75 * code folding
    76 * using syntax highlight in posts (code examples)
     72* English
     73* Serbian (Српски)
     74
     75= Author =
     76
     77[Miloš Đekić](http://milos.djekic.net) is a sofware enthusiast from Belgrade,
     78Serbia. He loves to create useful software.
    7779
    7880== Installation ==
     
    9193
    9294== Changelog ==
     95
     96= 4.6 =
     97* Fixed the article editor bugs and optimized loading
     98* Optimized the settings page and fixed missing theme bug
     99* Added language support for the article editor and settings
     100* Localized the article editor and settings to Serbian (sr_RS)
    93101
    94102= 4.5 =
  • synchi/trunk/synchi.php

    r615875 r622360  
    2626  Plugin URI: http://projects.djekic.net/synchi
    2727  Description: A full IDE inside your Wordpress! Syntax highlighting and powerfull IDE features in WP plugin editor, themes editor and article HTML editor.
    28   Version: 4.5
     28  Version: 4.6
    2929  Author: Miloš Đekić
    3030  Author URI: http://milos.djekic.net
     
    3838
    3939// synchi version
    40 define("SYNCHI",'4.5');
     40define("SYNCHI",'4.6');
    4141
    4242// define paths
     
    5050
    5151// define themes
    52 $synchi_themes = array('default','ambiance','blackboard','cobalt','eclipse','elegant','erlang-dark','monokai','neat','night','rubyblue','xq-dark');
     52$synchi_themes = array('default','ambiance','blackboard','cobalt','eclipse','elegant','erlang-dark','lesser-dark','monokai','neat','night','rubyblue','xq-dark');
    5353
    5454// define supported modes
     
    677677add_option('synchi_option_flag_plugins', 1);
    678678add_option('synchi_option_flag_themes', 1);
    679 add_option('synchi_option_flag_articles', 0);
     679add_option('synchi_option_flag_articles', 1);
    680680
    681681// register editing options
Note: See TracChangeset for help on using the changeset viewer.