Changeset 742780
- Timestamp:
- 07/18/2013 02:12:26 PM (13 years ago)
- Location:
- wp-emmet/trunk
- Files:
-
- 10 edited
-
WP/Emmet/FormHelper.php (modified) (1 diff)
-
WP/Emmet/Options.php (modified) (1 diff)
-
assets/css/wp_emmet.css (modified) (1 diff)
-
langs/default.pot (modified) (2 diffs)
-
langs/ja.mo (modified) (previous)
-
langs/ja.po (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
views/apply_for_codemirror.php (modified) (2 diffs)
-
views/options.php (modified) (1 diff)
-
wp-emmet.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-emmet/trunk/WP/Emmet/FormHelper.php
r737277 r742780 222 222 return sprintf('<select %s>%s</select>', $attrs, implode('', $optionTags)); 223 223 } 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 } 224 236 } -
wp-emmet/trunk/WP/Emmet/Options.php
r739200 r742780 65 65 'lineNumbers' => '1' 66 66 ), 67 68 'codemirror_style' => "font-family: Ricty, \"VL Gothic\", monospace, sans-serif;\nfont-size: 16px;\nline-height: 1.3;\nletter-spacing: 1px;", 67 69 68 70 'override_shortcuts' => '', -
wp-emmet/trunk/assets/css/wp_emmet.css
r737277 r742780 20 20 .CodeMirror { 21 21 height: auto; 22 min-height: 300px;23 22 margin: -1px; 24 23 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;29 24 } 30 25 -
wp-emmet/trunk/langs/default.pot
r738398 r742780 2 2 msgstr "" 3 3 "Project-Id-Version: WP Emmet\n" 4 "POT-Creation-Date: 2013-07-1 0 02:39+0900\n"5 "PO-Revision-Date: 2013-07-1 0 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" 6 6 "Last-Translator: rewish <rewish.org@gmail.com>\n" 7 7 "Language-Team: \n" … … 87 87 msgstr "" 88 88 89 #: views/options.php:95 89 #: views/options.php:93 90 msgid "Editor Style" 91 msgstr "" 92 93 #: views/options.php:103 90 94 msgid "Shortcuts" 91 95 msgstr "" 92 96 93 #: views/options.php: 9897 #: views/options.php:106 94 98 msgid "Override shortcuts" 95 99 msgstr "" 96 100 97 #: views/options.php:1 12101 #: views/options.php:120 98 102 msgid "Save option" 99 103 msgstr "" 100 104 101 #: views/options.php:1 16105 #: views/options.php:124 102 106 msgid "Bug reports" 103 107 msgstr "" 104 108 105 #: views/options.php:1 17109 #: views/options.php:125 106 110 #, php-format 107 111 msgid "Please create an issue on %s." 108 112 msgstr "" 109 113 110 #: views/options.php:1 19114 #: views/options.php:127 111 115 msgid "Test the Emmet" 112 116 msgstr "" 113 117 114 #: views/options.php:1 63118 #: views/options.php:171 115 119 msgid "Expand Abbreviation" 116 120 msgstr "" 117 121 118 #: views/options.php:1 64122 #: views/options.php:172 119 123 msgid "Match Pair Outward" 120 124 msgstr "" 121 125 122 #: views/options.php:1 65126 #: views/options.php:173 123 127 msgid "Match Pair Inward" 124 128 msgstr "" 125 129 126 #: views/options.php:1 66130 #: views/options.php:174 127 131 msgid "Wrap with Abbreviation" 128 132 msgstr "" 129 133 130 #: views/options.php:1 67134 #: views/options.php:175 131 135 msgid "Next Edit Point" 132 136 msgstr "" 133 137 134 #: views/options.php:1 68138 #: views/options.php:176 135 139 msgid "Prev Edit Point" 136 140 msgstr "" 137 141 138 #: views/options.php:1 69142 #: views/options.php:177 139 143 msgid "Select Line" 140 144 msgstr "" 141 145 142 #: views/options.php:17 0146 #: views/options.php:178 143 147 msgid "Merge Lines" 144 148 msgstr "" 145 149 146 #: views/options.php:17 1150 #: views/options.php:179 147 151 msgid "Toggle Comment" 148 152 msgstr "" 149 153 150 #: views/options.php:1 72154 #: views/options.php:180 151 155 msgid "Split/Join Tag" 152 156 msgstr "" 153 157 154 #: views/options.php:1 73158 #: views/options.php:181 155 159 msgid "Remove Tag" 156 160 msgstr "" 157 161 158 #: views/options.php:1 74162 #: views/options.php:182 159 163 msgid "Evaluate Math Expression" 160 164 msgstr "" 161 165 162 #: views/options.php:1 75166 #: views/options.php:183 163 167 msgid "Increment number by 1" 164 168 msgstr "" 165 169 166 #: views/options.php:1 76170 #: views/options.php:184 167 171 msgid "Decrement number by 1" 168 172 msgstr "" 169 173 170 #: views/options.php:1 77174 #: views/options.php:185 171 175 msgid "Increment number by 0.1" 172 176 msgstr "" 173 177 174 #: views/options.php:1 78178 #: views/options.php:186 175 179 msgid "Decrement number by 0.1" 176 180 msgstr "" 177 181 178 #: views/options.php:1 79182 #: views/options.php:187 179 183 msgid "Increment number by 10" 180 184 msgstr "" 181 185 182 #: views/options.php:18 0186 #: views/options.php:188 183 187 msgid "Decrement number by 10" 184 188 msgstr "" 185 189 186 #: views/options.php:18 1190 #: views/options.php:189 187 191 msgid "Select Next Item" 188 192 msgstr "" 189 193 190 #: views/options.php:1 82194 #: views/options.php:190 191 195 msgid "Select Previous Item" 192 196 msgstr "" 193 197 194 #: views/options.php:1 83198 #: views/options.php:191 195 199 msgid "Reflect CSS Value" 196 200 msgstr "" -
wp-emmet/trunk/langs/ja.po
r738398 r742780 2 2 msgstr "" 3 3 "Project-Id-Version: WP Emmet\n" 4 "POT-Creation-Date: 2013-07-1 0 02:43+0900\n"5 "PO-Revision-Date: 2013-07-1 0 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" 6 6 "Last-Translator: rewish <rewish.org@gmail.com>\n" 7 7 "Language-Team: \n" … … 17 17 #: views/options.php:12 18 18 msgid "Editor" 19 msgstr "エディタ "19 msgstr "エディター" 20 20 21 21 #: views/options.php:16 … … 87 87 msgstr "行を折り返す" 88 88 89 #: views/options.php:95 89 #: views/options.php:93 90 msgid "Editor Style" 91 msgstr "エディタースタイル" 92 93 #: views/options.php:103 90 94 msgid "Shortcuts" 91 95 msgstr "ショートカット" 92 96 93 #: views/options.php: 9897 #: views/options.php:106 94 98 msgid "Override shortcuts" 95 99 msgstr "ショートカットを上書き" 96 100 97 #: views/options.php:1 12101 #: views/options.php:120 98 102 msgid "Save option" 99 103 msgstr "オプションを保存" 100 104 101 #: views/options.php:1 16105 #: views/options.php:124 102 106 msgid "Bug reports" 103 107 msgstr "バグの報告" 104 108 105 #: views/options.php:1 17109 #: views/options.php:125 106 110 #, php-format 107 111 msgid "Please create an issue on %s." 108 112 msgstr "%sから報告してください。" 109 113 110 #: views/options.php:1 19114 #: views/options.php:127 111 115 msgid "Test the Emmet" 112 116 msgstr "Emmetをテスト" 113 117 114 #: views/options.php:1 63118 #: views/options.php:171 115 119 msgid "Expand Abbreviation" 116 120 msgstr "省略コードの展開" 117 121 118 #: views/options.php:1 64122 #: views/options.php:172 119 123 msgid "Match Pair Outward" 120 124 msgstr "タグの外側を選択" 121 125 122 #: views/options.php:1 65126 #: views/options.php:173 123 127 msgid "Match Pair Inward" 124 128 msgstr "タグの内側を選択" 125 129 126 #: views/options.php:1 66130 #: views/options.php:174 127 131 msgid "Wrap with Abbreviation" 128 132 msgstr "省略コードで包括" 129 133 130 #: views/options.php:1 67134 #: views/options.php:175 131 135 msgid "Next Edit Point" 132 136 msgstr "次の編集箇所へ" 133 137 134 #: views/options.php:1 68138 #: views/options.php:176 135 139 msgid "Prev Edit Point" 136 140 msgstr "前の編集箇所へ" 137 141 138 #: views/options.php:1 69142 #: views/options.php:177 139 143 msgid "Select Line" 140 144 msgstr "行を選択" 141 145 142 #: views/options.php:17 0146 #: views/options.php:178 143 147 msgid "Merge Lines" 144 148 msgstr "要素を1行に結合" 145 149 146 #: views/options.php:17 1150 #: views/options.php:179 147 151 msgid "Toggle Comment" 148 152 msgstr "コメントアウトの実行/解除" 149 153 150 #: views/options.php:1 72154 #: views/options.php:180 151 155 msgid "Split/Join Tag" 152 156 msgstr "タグの結合/分解" 153 157 154 #: views/options.php:1 73158 #: views/options.php:181 155 159 msgid "Remove Tag" 156 160 msgstr "タグを削除" 157 161 158 #: views/options.php:1 74162 #: views/options.php:182 159 163 msgid "Evaluate Math Expression" 160 164 msgstr "数式を評価" 161 165 162 #: views/options.php:1 75166 #: views/options.php:183 163 167 msgid "Increment number by 1" 164 168 msgstr "数値を1増加" 165 169 166 #: views/options.php:1 76170 #: views/options.php:184 167 171 msgid "Decrement number by 1" 168 172 msgstr "数値を1減少" 169 173 170 #: views/options.php:1 77174 #: views/options.php:185 171 175 msgid "Increment number by 0.1" 172 176 msgstr "数値を0.1増加" 173 177 174 #: views/options.php:1 78178 #: views/options.php:186 175 179 msgid "Decrement number by 0.1" 176 180 msgstr "数値を0.1減少" 177 181 178 #: views/options.php:1 79182 #: views/options.php:187 179 183 msgid "Increment number by 10" 180 184 msgstr "数値を10増加" 181 185 182 #: views/options.php:18 0186 #: views/options.php:188 183 187 msgid "Decrement number by 10" 184 188 msgstr "数値を10減少" 185 189 186 #: views/options.php:18 1190 #: views/options.php:189 187 191 msgid "Select Next Item" 188 192 msgstr "次の項目を選択" 189 193 190 #: views/options.php:1 82194 #: views/options.php:190 191 195 msgid "Select Previous Item" 192 196 msgstr "前の項目を選択" 193 197 194 #: views/options.php:1 83198 #: views/options.php:191 195 199 msgid "Reflect CSS Value" 196 200 msgstr "CSSの値を反映" -
wp-emmet/trunk/readme.txt
r739200 r742780 28 28 == Changelog == 29 29 30 = 0.2.3 = 31 * Add option of editor style 32 30 33 = 0.2.2 = 31 34 * 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> 1 6 <script> 2 !function($) { 7 <?php if ($this->Options->get('override_shortcuts')): ?> 8 var 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 17 jQuery(function($) { 3 18 var options = $.extend(<?php echo $this->Options->toJSON('codemirror'); ?>, { 4 19 profile: '<?php echo $this->Options->get('profile'); ?>' … … 12 27 }; 13 28 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'); 23 36 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 })); 32 40 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 }); 37 53 </script> -
wp-emmet/trunk/views/options.php
r738398 r742780 89 89 <?php echo $form->label('codemirror.lineWrapping', __('Line wrapping', $domain)); ?> 90 90 </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> 91 99 </tr> 92 100 </tbody> -
wp-emmet/trunk/wp-emmet.php
r739200 r742780 4 4 Plugin URI: https://github.com/rewish/wp-emmet 5 5 Description: Emmet (ex-Zen Coding) for WordPress. 6 Version: 0.2. 26 Version: 0.2.3 7 7 Author: rewish 8 8 Author URI: https://github.com/rewish
Note: See TracChangeset
for help on using the changeset viewer.