Plugin Directory

Changeset 742780


Ignore:
Timestamp:
07/18/2013 02:12:26 PM (13 years ago)
Author:
rewish
Message:

WP Emmet 0.2.3 Released

Location:
wp-emmet/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • wp-emmet/trunk/WP/Emmet/FormHelper.php

    r737277 r742780  
    222222        return sprintf('<select %s>%s</select>', $attrs, implode('', $optionTags));
    223223    }
     224
     225    /**
     226     * Textarea
     227     *
     228     * @param string $name
     229     * @param array $attributes
     230     * @return string
     231     */
     232    public function textarea($name, Array $attributes = array()) {
     233        $attrs = $this->attributes($attributes + array('name' => $this->name($name)));
     234        return sprintf('<textarea %s>%s</textarea>', $attrs, $this->value($name));
     235    }
    224236}
  • wp-emmet/trunk/WP/Emmet/Options.php

    r739200 r742780  
    6565                'lineNumbers' => '1'
    6666            ),
     67
     68            'codemirror_style' => "font-family: Ricty, \"VL Gothic\", monospace, sans-serif;\nfont-size: 16px;\nline-height: 1.3;\nletter-spacing: 1px;",
    6769
    6870            'override_shortcuts' => '',
  • wp-emmet/trunk/assets/css/wp_emmet.css

    r737277 r742780  
    2020.CodeMirror {
    2121  height: auto;
    22   min-height: 300px;
    2322  margin: -1px;
    2423  border: #CCC 1px solid;
    25   font-family: Ricty, "VL Gothic", monospace, sans-serif;
    26   font-size: 16px;
    27   line-height: 1.3;
    28   letter-spacing: 1px;
    2924}
    3025
  • wp-emmet/trunk/langs/default.pot

    r738398 r742780  
    22msgstr ""
    33"Project-Id-Version: WP Emmet\n"
    4 "POT-Creation-Date: 2013-07-10 02:39+0900\n"
    5 "PO-Revision-Date: 2013-07-10 02:39+0900\n"
     4"POT-Creation-Date: 2013-07-18 23:04+0900\n"
     5"PO-Revision-Date: 2013-07-18 23:04+0900\n"
    66"Last-Translator: rewish <rewish.org@gmail.com>\n"
    77"Language-Team: \n"
     
    8787msgstr ""
    8888
    89 #: views/options.php:95
     89#: views/options.php:93
     90msgid "Editor Style"
     91msgstr ""
     92
     93#: views/options.php:103
    9094msgid "Shortcuts"
    9195msgstr ""
    9296
    93 #: views/options.php:98
     97#: views/options.php:106
    9498msgid "Override shortcuts"
    9599msgstr ""
    96100
    97 #: views/options.php:112
     101#: views/options.php:120
    98102msgid "Save option"
    99103msgstr ""
    100104
    101 #: views/options.php:116
     105#: views/options.php:124
    102106msgid "Bug reports"
    103107msgstr ""
    104108
    105 #: views/options.php:117
     109#: views/options.php:125
    106110#, php-format
    107111msgid "Please create an issue on %s."
    108112msgstr ""
    109113
    110 #: views/options.php:119
     114#: views/options.php:127
    111115msgid "Test the Emmet"
    112116msgstr ""
    113117
    114 #: views/options.php:163
     118#: views/options.php:171
    115119msgid "Expand Abbreviation"
    116120msgstr ""
    117121
    118 #: views/options.php:164
     122#: views/options.php:172
    119123msgid "Match Pair Outward"
    120124msgstr ""
    121125
    122 #: views/options.php:165
     126#: views/options.php:173
    123127msgid "Match Pair Inward"
    124128msgstr ""
    125129
    126 #: views/options.php:166
     130#: views/options.php:174
    127131msgid "Wrap with Abbreviation"
    128132msgstr ""
    129133
    130 #: views/options.php:167
     134#: views/options.php:175
    131135msgid "Next Edit Point"
    132136msgstr ""
    133137
    134 #: views/options.php:168
     138#: views/options.php:176
    135139msgid "Prev Edit Point"
    136140msgstr ""
    137141
    138 #: views/options.php:169
     142#: views/options.php:177
    139143msgid "Select Line"
    140144msgstr ""
    141145
    142 #: views/options.php:170
     146#: views/options.php:178
    143147msgid "Merge Lines"
    144148msgstr ""
    145149
    146 #: views/options.php:171
     150#: views/options.php:179
    147151msgid "Toggle Comment"
    148152msgstr ""
    149153
    150 #: views/options.php:172
     154#: views/options.php:180
    151155msgid "Split/Join Tag"
    152156msgstr ""
    153157
    154 #: views/options.php:173
     158#: views/options.php:181
    155159msgid "Remove Tag"
    156160msgstr ""
    157161
    158 #: views/options.php:174
     162#: views/options.php:182
    159163msgid "Evaluate Math Expression"
    160164msgstr ""
    161165
    162 #: views/options.php:175
     166#: views/options.php:183
    163167msgid "Increment number by 1"
    164168msgstr ""
    165169
    166 #: views/options.php:176
     170#: views/options.php:184
    167171msgid "Decrement number by 1"
    168172msgstr ""
    169173
    170 #: views/options.php:177
     174#: views/options.php:185
    171175msgid "Increment number by 0.1"
    172176msgstr ""
    173177
    174 #: views/options.php:178
     178#: views/options.php:186
    175179msgid "Decrement number by 0.1"
    176180msgstr ""
    177181
    178 #: views/options.php:179
     182#: views/options.php:187
    179183msgid "Increment number by 10"
    180184msgstr ""
    181185
    182 #: views/options.php:180
     186#: views/options.php:188
    183187msgid "Decrement number by 10"
    184188msgstr ""
    185189
    186 #: views/options.php:181
     190#: views/options.php:189
    187191msgid "Select Next Item"
    188192msgstr ""
    189193
    190 #: views/options.php:182
     194#: views/options.php:190
    191195msgid "Select Previous Item"
    192196msgstr ""
    193197
    194 #: views/options.php:183
     198#: views/options.php:191
    195199msgid "Reflect CSS Value"
    196200msgstr ""
  • wp-emmet/trunk/langs/ja.po

    r738398 r742780  
    22msgstr ""
    33"Project-Id-Version: WP Emmet\n"
    4 "POT-Creation-Date: 2013-07-10 02:43+0900\n"
    5 "PO-Revision-Date: 2013-07-10 02:43+0900\n"
     4"POT-Creation-Date: 2013-07-18 23:05+0900\n"
     5"PO-Revision-Date: 2013-07-18 23:08+0900\n"
    66"Last-Translator: rewish <rewish.org@gmail.com>\n"
    77"Language-Team: \n"
     
    1717#: views/options.php:12
    1818msgid "Editor"
    19 msgstr "エディタ"
     19msgstr "エディタ"
    2020
    2121#: views/options.php:16
     
    8787msgstr "行を折り返す"
    8888
    89 #: views/options.php:95
     89#: views/options.php:93
     90msgid "Editor Style"
     91msgstr "エディタースタイル"
     92
     93#: views/options.php:103
    9094msgid "Shortcuts"
    9195msgstr "ショートカット"
    9296
    93 #: views/options.php:98
     97#: views/options.php:106
    9498msgid "Override shortcuts"
    9599msgstr "ショートカットを上書き"
    96100
    97 #: views/options.php:112
     101#: views/options.php:120
    98102msgid "Save option"
    99103msgstr "オプションを保存"
    100104
    101 #: views/options.php:116
     105#: views/options.php:124
    102106msgid "Bug reports"
    103107msgstr "バグの報告"
    104108
    105 #: views/options.php:117
     109#: views/options.php:125
    106110#, php-format
    107111msgid "Please create an issue on %s."
    108112msgstr "%sから報告してください。"
    109113
    110 #: views/options.php:119
     114#: views/options.php:127
    111115msgid "Test the Emmet"
    112116msgstr "Emmetをテスト"
    113117
    114 #: views/options.php:163
     118#: views/options.php:171
    115119msgid "Expand Abbreviation"
    116120msgstr "省略コードの展開"
    117121
    118 #: views/options.php:164
     122#: views/options.php:172
    119123msgid "Match Pair Outward"
    120124msgstr "タグの外側を選択"
    121125
    122 #: views/options.php:165
     126#: views/options.php:173
    123127msgid "Match Pair Inward"
    124128msgstr "タグの内側を選択"
    125129
    126 #: views/options.php:166
     130#: views/options.php:174
    127131msgid "Wrap with Abbreviation"
    128132msgstr "省略コードで包括"
    129133
    130 #: views/options.php:167
     134#: views/options.php:175
    131135msgid "Next Edit Point"
    132136msgstr "次の編集箇所へ"
    133137
    134 #: views/options.php:168
     138#: views/options.php:176
    135139msgid "Prev Edit Point"
    136140msgstr "前の編集箇所へ"
    137141
    138 #: views/options.php:169
     142#: views/options.php:177
    139143msgid "Select Line"
    140144msgstr "行を選択"
    141145
    142 #: views/options.php:170
     146#: views/options.php:178
    143147msgid "Merge Lines"
    144148msgstr "要素を1行に結合"
    145149
    146 #: views/options.php:171
     150#: views/options.php:179
    147151msgid "Toggle Comment"
    148152msgstr "コメントアウトの実行/解除"
    149153
    150 #: views/options.php:172
     154#: views/options.php:180
    151155msgid "Split/Join Tag"
    152156msgstr "タグの結合/分解"
    153157
    154 #: views/options.php:173
     158#: views/options.php:181
    155159msgid "Remove Tag"
    156160msgstr "タグを削除"
    157161
    158 #: views/options.php:174
     162#: views/options.php:182
    159163msgid "Evaluate Math Expression"
    160164msgstr "数式を評価"
    161165
    162 #: views/options.php:175
     166#: views/options.php:183
    163167msgid "Increment number by 1"
    164168msgstr "数値を1増加"
    165169
    166 #: views/options.php:176
     170#: views/options.php:184
    167171msgid "Decrement number by 1"
    168172msgstr "数値を1減少"
    169173
    170 #: views/options.php:177
     174#: views/options.php:185
    171175msgid "Increment number by 0.1"
    172176msgstr "数値を0.1増加"
    173177
    174 #: views/options.php:178
     178#: views/options.php:186
    175179msgid "Decrement number by 0.1"
    176180msgstr "数値を0.1減少"
    177181
    178 #: views/options.php:179
     182#: views/options.php:187
    179183msgid "Increment number by 10"
    180184msgstr "数値を10増加"
    181185
    182 #: views/options.php:180
     186#: views/options.php:188
    183187msgid "Decrement number by 10"
    184188msgstr "数値を10減少"
    185189
    186 #: views/options.php:181
     190#: views/options.php:189
    187191msgid "Select Next Item"
    188192msgstr "次の項目を選択"
    189193
    190 #: views/options.php:182
     194#: views/options.php:190
    191195msgid "Select Previous Item"
    192196msgstr "前の項目を選択"
    193197
    194 #: views/options.php:183
     198#: views/options.php:191
    195199msgid "Reflect CSS Value"
    196200msgstr "CSSの値を反映"
  • wp-emmet/trunk/readme.txt

    r739200 r742780  
    2828== Changelog ==
    2929
     30= 0.2.3 =
     31* Add option of editor style
     32
    3033= 0.2.2 =
    3134* Fix a bug of shortcuts that occurs when `enable` the Code coloring
  • wp-emmet/trunk/views/apply_for_codemirror.php

    r737277 r742780  
     1<style>
     2.CodeMirror {
     3<?php echo $this->Options->get('codemirror_style') . PHP_EOL; ?>
     4}
     5</style>
    16<script>
    2 !function($) {
     7<?php if ($this->Options->get('override_shortcuts')): ?>
     8var emmetKeymap = {
     9<?php foreach ($shortcuts as $label => $keystroke): ?>
     10    '<?php echo $keystroke; ?>': '<?php echo str_replace(array(' ', '/', '.'), array('_', '_', ''), strtolower($label)); ?>',
     11<?php endforeach; ?>
     12    Tab: 'expand_abbreviation_with_tab',
     13    Enter: 'insert_formatted_line_break_only'
     14};
     15<?php endif; ?>
     16
     17jQuery(function($) {
    318    var options = $.extend(<?php echo $this->Options->toJSON('codemirror'); ?>, {
    419            profile: '<?php echo $this->Options->get('profile'); ?>'
     
    1227        };
    1328
    14 <?php if ($this->Options->get('override_shortcuts')): ?>
    15     window.emmetKeymap = {
    16 <?php foreach ($shortcuts as $label => $keystroke): ?>
    17         '<?php echo $keystroke; ?>': '<?php echo str_replace(array(' ', '/', '.'), array('_', '_', ''), strtolower($label)); ?>',
    18 <?php endforeach; ?>
    19         Tab: 'expand_abbreviation_with_tab',
    20         Enter: 'insert_formatted_line_break_only'
    21     };
    22 <?php endif; ?>
     29    setTimeout(function() {
     30        $('textarea:not(#wp_mce_fullscreen)').each(function() {
     31            var $textarea = $(this),
     32                file = $textarea.closest('form').find('input[name="file"]').val(),
     33                mode = $textarea.attr('data-cm-mode'),
     34                maxWidth = $textarea.attr('data-cm-max-width'),
     35                minHeight = $textarea.attr('data-cm-min-height');
    2336
    24     $(function() {
    25         setTimeout(function() {
    26             $('textarea:not(#wp_mce_fullscreen)').each(function() {
    27                 var file = $(this).closest('form').find('input[name="file"]').val();
    28                 $(this).codeMirror($.extend({}, options, {
    29                     mode: mimeTypes[file ? file.split('.').pop() : 'html']
    30                 }));
    31             });
     37            $textarea.codeMirror($.extend({}, options, {
     38                mode: mode || mimeTypes[file ? file.split('.').pop() : 'html']
     39            }));
    3240
    33             wp_emmet.adaptCodeMirror();
    34         }, 0);
    35     });
    36 }(jQuery);
     41            if (maxWidth) {
     42                $($textarea.codeMirrorEditor().display.wrapper).css({maxWidth: maxWidth});
     43            }
     44
     45            if (minHeight) {
     46                $($textarea.codeMirrorEditor().display.scroller).css({minHeight: minHeight});
     47            }
     48        });
     49
     50        wp_emmet.adaptCodeMirror();
     51    }, 0);
     52});
    3753</script>
  • wp-emmet/trunk/views/options.php

    r738398 r742780  
    8989                        <?php echo $form->label('codemirror.lineWrapping', __('Line wrapping', $domain)); ?>
    9090                    </td>
     91                </tr>
     92                <tr data-editor-type="codemirror">
     93                    <th><?php _e('Editor Style', $domain); ?></th>
     94                    <td><?php echo $form->textarea('codemirror_style', array(
     95                        'data-cm-mode' => 'css',
     96                        'data-cm-max-width' => '600px',
     97                        'data-cm-min-height' => '150px'
     98                    )); ?></td>
    9199                </tr>
    92100            </tbody>
  • wp-emmet/trunk/wp-emmet.php

    r739200 r742780  
    44Plugin URI: https://github.com/rewish/wp-emmet
    55Description: Emmet (ex-Zen Coding) for WordPress.
    6 Version: 0.2.2
     6Version: 0.2.3
    77Author: rewish
    88Author URI: https://github.com/rewish
Note: See TracChangeset for help on using the changeset viewer.