Code Snippets - Version 2.1.0

Version Description

  • Added additional setting descriptions
  • Added settings for code and description editor height
  • Updated CodeMirror to version 5.2
  • Fixed not escaping the request URL when using query arg functions
  • Improved efficiency of settings component
Download this release

Release Info

Developer bungeshea
Plugin Icon Code Snippets
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.1 to 2.1.0

Files changed (51) hide show
  1. code-snippets.php +4 -4
  2. includes/admin.php +1 -1
  3. includes/db.php +2 -3
  4. includes/edit/admin.php +6 -0
  5. includes/edit/edit.php +9 -6
  6. includes/import/import.php +2 -5
  7. includes/manage/class-list-table.php +17 -22
  8. includes/settings/class-settings.php +159 -0
  9. includes/settings/settings-fields.php +15 -0
  10. includes/settings/settings.php +18 -104
  11. includes/upgrade.php +0 -3
  12. languages/code-snippets-de_DE.mo +0 -0
  13. languages/code-snippets-de_DE.po +919 -581
  14. languages/code-snippets-fr_FR.mo +0 -0
  15. languages/code-snippets-fr_FR.po +793 -574
  16. languages/code-snippets.po +418 -418
  17. languages/code-snippets.pot +39 -35
  18. readme.txt +58 -48
  19. uninstall.php +1 -0
  20. vendor/codemirror/addon/edit/matchbrackets.js +1 -1
  21. vendor/codemirror/addon/search/search.js +7 -4
  22. vendor/codemirror/addon/search/searchcursor.js +2 -2
  23. vendor/codemirror/lib/codemirror.css +26 -10
  24. vendor/codemirror/lib/codemirror.js +1233 -540
  25. vendor/codemirror/mode/clike/clike.js +8 -3
  26. vendor/codemirror/theme/3024-day.css +2 -0
  27. vendor/codemirror/theme/3024-night.css +2 -0
  28. vendor/codemirror/theme/ambiance.css +4 -6
  29. vendor/codemirror/theme/base16-dark.css +2 -0
  30. vendor/codemirror/theme/base16-light.css +2 -0
  31. vendor/codemirror/theme/blackboard.css +2 -0
  32. vendor/codemirror/theme/cobalt.css +2 -0
  33. vendor/codemirror/theme/colorforth.css +33 -0
  34. vendor/codemirror/theme/erlang-dark.css +2 -0
  35. vendor/codemirror/theme/lesser-dark.css +2 -0
  36. vendor/codemirror/theme/liquibyte.css +95 -0
  37. vendor/codemirror/theme/mbo.css +2 -0
  38. vendor/codemirror/theme/mdn-like.css +3 -1
  39. vendor/codemirror/theme/midnight.css +2 -0
  40. vendor/codemirror/theme/monokai.css +3 -1
  41. vendor/codemirror/theme/night.css +2 -0
  42. vendor/codemirror/theme/paraiso-dark.css +2 -0
  43. vendor/codemirror/theme/paraiso-light.css +2 -0
  44. vendor/codemirror/theme/pastel-on-dark.css +3 -0
  45. vendor/codemirror/theme/rubyblue.css +2 -0
  46. vendor/codemirror/theme/solarized.css +7 -7
  47. vendor/codemirror/theme/the-matrix.css +2 -0
  48. vendor/codemirror/theme/tomorrow-night-eighties.css +2 -0
  49. vendor/codemirror/theme/twilight.css +2 -0
  50. vendor/codemirror/theme/vibrant-ink.css +2 -0
  51. vendor/codemirror/theme/xq-dark.css +2 -0
code-snippets.php CHANGED
@@ -7,7 +7,7 @@
7
  * contribute to the localization, please see http://code-snippets.bungeshea.com
8
  *
9
  * @package Code_Snippets
10
- * @version 2.0.1
11
  * @author Shea Bunge <http://bungeshea.com/>
12
  * @copyright Copyright (c) 2012-2014, Shea Bunge
13
  * @link http://code-snippets.bungeshea.com
@@ -20,7 +20,7 @@ Plugin URI: http://code-snippets.bungeshea.com
20
  Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
21
  Author: Shea Bunge
22
  Author URI: http://bungeshea.com
23
- Version: 2.0.1
24
  License: MIT
25
  License URI: license.txt
26
  Text Domain: code-snippets
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  * @since 2.0
43
  * @var string A PHP-standardized version number string
44
  */
45
- define( 'CODE_SNIPPETS_VERSION', '2.0.1' );
46
 
47
  /**
48
  * The full path to the main file of this plugin
@@ -110,7 +110,7 @@ add_action( 'plugins_loaded', 'execute_active_snippets', 1 );
110
  * Place it in this plugin's "languages" folder and name it "code-snippets-[value in wp-config].mo"
111
  *
112
  * If you wish to contribute a language file to be included in the Code Snippets package,
113
- * please see create an issue on GitHub: https://github.com/bungeshea/code-snippets/issues
114
  */
115
  function code_snippets_load_textdomain() {
116
  load_plugin_textdomain( 'code-snippets', false, dirname( basename( __FILE__ ) ) . '/languages/' );
7
  * contribute to the localization, please see http://code-snippets.bungeshea.com
8
  *
9
  * @package Code_Snippets
10
+ * @version 2.1.0
11
  * @author Shea Bunge <http://bungeshea.com/>
12
  * @copyright Copyright (c) 2012-2014, Shea Bunge
13
  * @link http://code-snippets.bungeshea.com
20
  Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
21
  Author: Shea Bunge
22
  Author URI: http://bungeshea.com
23
+ Version: 2.1.0
24
  License: MIT
25
  License URI: license.txt
26
  Text Domain: code-snippets
42
  * @since 2.0
43
  * @var string A PHP-standardized version number string
44
  */
45
+ define( 'CODE_SNIPPETS_VERSION', '2.1.0' );
46
 
47
  /**
48
  * The full path to the main file of this plugin
110
  * Place it in this plugin's "languages" folder and name it "code-snippets-[value in wp-config].mo"
111
  *
112
  * If you wish to contribute a language file to be included in the Code Snippets package,
113
+ * please see create an issue on GitHub: https://github.com/sheabunge/code-snippets/issues
114
  */
115
  function code_snippets_load_textdomain() {
116
  load_plugin_textdomain( 'code-snippets', false, dirname( basename( __FILE__ ) ) . '/languages/' );
includes/admin.php CHANGED
@@ -197,7 +197,7 @@ function code_snippets_survey_message() {
197
  <?php _e( 'Take the survey now', 'code-snippets' ); ?>
198
  </a>
199
 
200
- <a href="<?php echo wp_nonce_url( add_query_arg( $key, true ), $key ); ?>">Dismiss</a>
201
 
202
  </p></div>
203
 
197
  <?php _e( 'Take the survey now', 'code-snippets' ); ?>
198
  </a>
199
 
200
+ <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( $key, true ), $key ) ); ?>">Dismiss</a>
201
 
202
  </p></div>
203
 
includes/db.php CHANGED
@@ -115,13 +115,12 @@ function create_code_snippets_table( $table_name ) {
115
  /* Create the database table */
116
 
117
  $sql = "CREATE TABLE $table_name (
118
- id bigint(20) not null unsigned auto_increment,
119
  name tinytext not null,
120
  description text,
121
  code longtext not null,
122
  tags longtext,
123
- active tinyint(1) not null default 0,
124
- PRIMARY KEY (id)
125
  ) {$charset_collate};";
126
 
127
  dbDelta( $sql );
115
  /* Create the database table */
116
 
117
  $sql = "CREATE TABLE $table_name (
118
+ id bigint(20) unsigned not null auto_increment primary key,
119
  name tinytext not null,
120
  description text,
121
  code longtext not null,
122
  tags longtext,
123
+ active tinyint(1) not null default 0
 
124
  ) {$charset_collate};";
125
 
126
  dbDelta( $sql );
includes/edit/admin.php CHANGED
@@ -142,5 +142,11 @@ $snippet = get_snippet( $edit_id );
142
  ?>;
143
  var editor = CodeMirror.fromTextArea(document.getElementById('snippet_code'), atts);
144
 
 
 
 
 
 
 
145
  })();
146
  </script>
142
  ?>;
143
  var editor = CodeMirror.fromTextArea(document.getElementById('snippet_code'), atts);
144
 
145
+ jQuery('.CodeMirror').resizable({
146
+ resize: function() {
147
+ editor.setSize( jQuery(this).width(), jQuery(this).height() );
148
+ }
149
+ });
150
+
151
  })();
152
  </script>
includes/edit/edit.php CHANGED
@@ -152,7 +152,7 @@ function code_snippets_load_single_menu() {
152
  /* Delete the snippet if the button was clicked */
153
  elseif ( isset( $_POST['snippet_id'], $_POST['delete_snippet'] ) ) {
154
  delete_snippet( $_POST['snippet_id'] );
155
- wp_redirect( add_query_arg( 'delete', true, $this->manage_url ) );
156
  }
157
 
158
  /* Export the snippet if the button was clicked */
@@ -169,7 +169,8 @@ function code_snippets_load_single_menu() {
169
  * @param object $snippet The snippet being used for this page
170
  */
171
  function code_snippets_description_editor_box( $snippet ) {
172
-
 
173
  ?>
174
 
175
  <label for="snippet_description">
@@ -185,9 +186,9 @@ function code_snippets_description_editor_box( $snippet ) {
185
  'description',
186
  apply_filters( 'code_snippets/admin/description_editor_settings', array(
187
  'textarea_name' => 'snippet_description',
188
- 'textarea_rows' => 10,
189
- 'teeny' => true,
190
- 'media_buttons' => false,
191
  ) )
192
  );
193
  }
@@ -241,7 +242,7 @@ function code_snippets_enqueue_codemirror() {
241
 
242
  /* CodeMirror */
243
 
244
- $codemirror_version = '5.0';
245
  $codemirror_url = plugins_url( 'vendor/codemirror/', CODE_SNIPPETS_FILE );
246
 
247
  wp_enqueue_style(
@@ -367,4 +368,6 @@ function code_snippets_enqueue_codemirror() {
367
  $tagit_version
368
  );
369
 
 
 
370
  }
152
  /* Delete the snippet if the button was clicked */
153
  elseif ( isset( $_POST['snippet_id'], $_POST['delete_snippet'] ) ) {
154
  delete_snippet( $_POST['snippet_id'] );
155
+ wp_redirect( add_query_arg( 'delete', true, code_snippets_get_menu_url( 'manage' ) ) );
156
  }
157
 
158
  /* Export the snippet if the button was clicked */
169
  * @param object $snippet The snippet being used for this page
170
  */
171
  function code_snippets_description_editor_box( $snippet ) {
172
+ $settings = code_snippets_get_settings();
173
+ $settings = $settings['description_editor']
174
  ?>
175
 
176
  <label for="snippet_description">
186
  'description',
187
  apply_filters( 'code_snippets/admin/description_editor_settings', array(
188
  'textarea_name' => 'snippet_description',
189
+ 'textarea_rows' => $settings['rows'],
190
+ 'teeny' => ! $settings['use_full_mce'],
191
+ 'media_buttons' => $settings['media_buttons'],
192
  ) )
193
  );
194
  }
242
 
243
  /* CodeMirror */
244
 
245
+ $codemirror_version = '5.2';
246
  $codemirror_url = plugins_url( 'vendor/codemirror/', CODE_SNIPPETS_FILE );
247
 
248
  wp_enqueue_style(
368
  $tagit_version
369
  );
370
 
371
+ /* Needed for resizable editor functionality */
372
+ wp_enqueue_script( 'jquery-ui-resizable' );
373
  }
includes/import/import.php CHANGED
@@ -103,11 +103,8 @@ function code_snippets_load_import_menu() {
103
  $result = import_snippets( $_FILES['code_snippets_import_file']['tmp_name'], $network );
104
 
105
  /* Send the amount of imported snippets to the page */
106
- if ( false === $result ) {
107
- wp_redirect( add_query_arg( 'error', true ) );
108
- } else {
109
- wp_redirect( add_query_arg( 'imported', $result ) );
110
- }
111
  }
112
 
113
  /* Load the screen help tabs */
103
  $result = import_snippets( $_FILES['code_snippets_import_file']['tmp_name'], $network );
104
 
105
  /* Send the amount of imported snippets to the page */
106
+ $query_args = ( false === $result ) ? array( 'error' => true ) : array( 'imported' => $result );
107
+ wp_redirect( esc_url_raw( $query_args ) );
 
 
 
108
  }
109
 
110
  /* Load the screen help tabs */
includes/manage/class-list-table.php CHANGED
@@ -112,19 +112,19 @@ class Code_Snippets_List_Table extends WP_List_Table {
112
  $actions['deactivate'] = sprintf(
113
  '<a href="%2$s">%1$s</a>',
114
  $screen->is_network ? __( 'Network Deactivate', 'code-snippets' ) : __( 'Deactivate', 'code-snippets' ),
115
- add_query_arg( array(
116
  'action' => 'deactivate',
117
  'id' => $snippet->id
118
- ) )
119
  );
120
  } else {
121
  $actions['activate'] = sprintf(
122
  '<a href="%2$s">%1$s</a>',
123
  $screen->is_network ? __( 'Network Activate', 'code-snippets' ) : __( 'Activate', 'code-snippets' ),
124
- add_query_arg( array(
125
  'action' => 'activate',
126
  'id' => $snippet->id
127
- ) )
128
  );
129
  }
130
 
@@ -137,19 +137,19 @@ class Code_Snippets_List_Table extends WP_List_Table {
137
  $actions['export'] = sprintf(
138
  '<a href="%2$s">%1$s</a>',
139
  __( 'Export', 'code-snippets' ),
140
- add_query_arg( array(
141
  'action' => 'export',
142
  'id' => $snippet->id
143
- ) )
144
  );
145
 
146
  $actions['delete'] = sprintf(
147
  '<a href="%2$s" class="delete" onclick="%3$s">%1$s</a>',
148
  __( 'Delete', 'code-snippets' ),
149
- add_query_arg( array(
150
  'action' => 'delete',
151
  'id' => $snippet->id
152
- ) ),
153
  esc_js( sprintf(
154
  'return confirm("%s");',
155
  __("You are about to permanently delete the selected item.
@@ -202,7 +202,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
202
 
203
  foreach ( $snippet->tags as $tag ) {
204
  $out[] = sprintf( '<a href="%s">%s</a>',
205
- add_query_arg( 'tag', esc_attr( $tag ) ),
206
  esc_html( $tag )
207
  );
208
  }
@@ -314,7 +314,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
314
  }
315
 
316
  $status_links[$type] = sprintf( '<a href="%s"%s>%s</a>',
317
- add_query_arg( 'status', $type ),
318
  ( $type === $status ) ? ' class="current"' : '',
319
  sprintf( $text, number_format_i18n( $count ) )
320
  );
@@ -479,7 +479,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
479
  if ( ! in_array( $action, array( 'export', 'export-php' ) ) ) {
480
  wp_redirect( apply_filters(
481
  "code_snippets/{$action}_redirect",
482
- add_query_arg( $action, true )
483
  ) );
484
  }
485
 
@@ -499,14 +499,14 @@ class Code_Snippets_List_Table extends WP_List_Table {
499
  foreach ( $ids as $id ) {
500
  activate_snippet( $id, $network );
501
  }
502
- wp_redirect( add_query_arg( 'activate-multi', true ) );
503
  break;
504
 
505
  case 'deactivate-selected':
506
  foreach ( $ids as $id ) {
507
  deactivate_snippet( $id, $network );
508
  }
509
- wp_redirect( add_query_arg( 'deactivate-multi', true ) );
510
  break;
511
 
512
  case 'export-selected':
@@ -521,7 +521,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
521
  foreach( $ids as $id ) {
522
  delete_snippet( $id, $network );
523
  }
524
- wp_redirect( add_query_arg( 'delete-multi', true ) );
525
  break;
526
 
527
  case 'clear-recent-list':
@@ -568,13 +568,8 @@ class Code_Snippets_List_Table extends WP_List_Table {
568
 
569
  /* Filter snippets by tag */
570
  if ( isset( $_POST['tag'] ) ) {
571
-
572
- if ( ! empty( $_POST['tag'] ) ) {
573
- wp_redirect( add_query_arg( 'tag', $_POST['tag'] ) );
574
- }
575
- else {
576
- wp_redirect( remove_query_arg( 'tag' ) );
577
- }
578
  }
579
 
580
  if ( ! empty( $_GET['tag'] ) ) {
@@ -777,7 +772,7 @@ class Code_Snippets_List_Table extends WP_List_Table {
777
 
778
  printf (
779
  '&nbsp;<a class="button clear-filters" href="%s">' . __( 'Clear Filters', 'code-snippets' ) . '</a>',
780
- remove_query_arg( array( 's', 'tag' ) )
781
  );
782
  }
783
  }
112
  $actions['deactivate'] = sprintf(
113
  '<a href="%2$s">%1$s</a>',
114
  $screen->is_network ? __( 'Network Deactivate', 'code-snippets' ) : __( 'Deactivate', 'code-snippets' ),
115
+ esc_url( add_query_arg( array(
116
  'action' => 'deactivate',
117
  'id' => $snippet->id
118
+ ) ) )
119
  );
120
  } else {
121
  $actions['activate'] = sprintf(
122
  '<a href="%2$s">%1$s</a>',
123
  $screen->is_network ? __( 'Network Activate', 'code-snippets' ) : __( 'Activate', 'code-snippets' ),
124
+ esc_url( add_query_arg( array(
125
  'action' => 'activate',
126
  'id' => $snippet->id
127
+ ) ) )
128
  );
129
  }
130
 
137
  $actions['export'] = sprintf(
138
  '<a href="%2$s">%1$s</a>',
139
  __( 'Export', 'code-snippets' ),
140
+ esc_url( add_query_arg( array(
141
  'action' => 'export',
142
  'id' => $snippet->id
143
+ ) ) )
144
  );
145
 
146
  $actions['delete'] = sprintf(
147
  '<a href="%2$s" class="delete" onclick="%3$s">%1$s</a>',
148
  __( 'Delete', 'code-snippets' ),
149
+ esc_url( add_query_arg( array(
150
  'action' => 'delete',
151
  'id' => $snippet->id
152
+ ) ) ),
153
  esc_js( sprintf(
154
  'return confirm("%s");',
155
  __("You are about to permanently delete the selected item.
202
 
203
  foreach ( $snippet->tags as $tag ) {
204
  $out[] = sprintf( '<a href="%s">%s</a>',
205
+ esc_url( add_query_arg( 'tag', esc_attr( $tag ) ) ),
206
  esc_html( $tag )
207
  );
208
  }
314
  }
315
 
316
  $status_links[$type] = sprintf( '<a href="%s"%s>%s</a>',
317
+ esc_url( add_query_arg( 'status', $type ) ),
318
  ( $type === $status ) ? ' class="current"' : '',
319
  sprintf( $text, number_format_i18n( $count ) )
320
  );
479
  if ( ! in_array( $action, array( 'export', 'export-php' ) ) ) {
480
  wp_redirect( apply_filters(
481
  "code_snippets/{$action}_redirect",
482
+ esc_url_raw( add_query_arg( $action, true ) )
483
  ) );
484
  }
485
 
499
  foreach ( $ids as $id ) {
500
  activate_snippet( $id, $network );
501
  }
502
+ wp_redirect( esc_url_raw( add_query_arg( 'activate-multi', true ) ) );
503
  break;
504
 
505
  case 'deactivate-selected':
506
  foreach ( $ids as $id ) {
507
  deactivate_snippet( $id, $network );
508
  }
509
+ wp_redirect( esc_url_raw( add_query_arg( 'deactivate-multi', true ) ) );
510
  break;
511
 
512
  case 'export-selected':
521
  foreach( $ids as $id ) {
522
  delete_snippet( $id, $network );
523
  }
524
+ wp_redirect( esc_url_raw( add_query_arg( 'delete-multi', true ) ) );
525
  break;
526
 
527
  case 'clear-recent-list':
568
 
569
  /* Filter snippets by tag */
570
  if ( isset( $_POST['tag'] ) ) {
571
+ $location = empty( $_POST['tag'] ) ? remove_query_arg( 'tag' ) : add_query_arg( 'tag', $_POST['tag'] );
572
+ wp_redirect( esc_url_raw( $location ) );
 
 
 
 
 
573
  }
574
 
575
  if ( ! empty( $_GET['tag'] ) ) {
772
 
773
  printf (
774
  '&nbsp;<a class="button clear-filters" href="%s">' . __( 'Clear Filters', 'code-snippets' ) . '</a>',
775
+ esc_url( remove_query_arg( array( 's', 'tag' ) ) )
776
  );
777
  }
778
  }
includes/settings/class-settings.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class holds the settings fields array
5
+ * @since 2.1.0
6
+ */
7
+ class Code_Snippets_Settings {
8
+
9
+ private static $fields = array();
10
+ private static $defaults = array();
11
+
12
+ public static function setup() {
13
+ self::set_fields();
14
+ self::set_defaults();
15
+ }
16
+
17
+ /**
18
+ * Retrieve the defined fields
19
+ * @return array
20
+ */
21
+ public static function get_fields() {
22
+ return self::$fields;
23
+ }
24
+
25
+ /**
26
+ * Retrieve the default values of the fields
27
+ * @return array the default field values, keyed by ID
28
+ */
29
+ public static function get_defaults() {
30
+ return self::$defaults;
31
+ }
32
+
33
+ /**
34
+ * Loop through the settings fields and extract the default values
35
+ */
36
+ private static function set_defaults() {
37
+ foreach ( self::$fields as $section_id => $section_fields ) {
38
+ self::$defaults[ $section_id ] = wp_list_pluck( $section_fields, 'default', 'id' );
39
+ }
40
+ }
41
+
42
+ private static function set_fields() {
43
+
44
+ self::$fields['general'] = array(
45
+ array(
46
+ 'id' => 'activate_by_default',
47
+ 'name' =>__( 'Activate by Default', 'code-snippets' ),
48
+ 'type' => 'checkbox',
49
+ 'label' => __( "Make the 'Save and Activate' button the default action when saving a snippet.", 'code-snippets' ),
50
+ 'default' => false,
51
+ )
52
+ );
53
+
54
+ /* Description Editor settings section */
55
+ self::$fields['description_editor'] = array(
56
+
57
+ array(
58
+ 'id' => 'rows',
59
+ 'name' => 'Row Height',
60
+ 'type' => 'number',
61
+ 'label' => 'rows',
62
+ 'default' => 5,
63
+ ),
64
+
65
+ array(
66
+ 'id' => 'use_full_mce',
67
+ 'name' => 'Use Full Editor',
68
+ 'type' => 'checkbox',
69
+ 'label' => 'Enable all features of the visual editor',
70
+ 'default' => false,
71
+ ),
72
+
73
+ array(
74
+ 'id' => 'media_buttons',
75
+ 'name' => 'Media Buttons',
76
+ 'type' => 'checkbox',
77
+ 'label' => 'Enable the add media buttons',
78
+ 'default' => false,
79
+ ),
80
+ );
81
+
82
+ /* Code Editor settings section */
83
+
84
+ self::$fields['editor'] = array(
85
+ array(
86
+ 'id' => 'theme',
87
+ 'name' => __( 'Theme', 'code-snippets' ),
88
+ 'type' => 'codemirror_theme_select',
89
+ 'default' => 'default',
90
+ 'codemirror' => 'theme',
91
+ ),
92
+
93
+ array(
94
+ 'id' => 'indent_with_tabs',
95
+ 'name' => __( 'Indent With Tabs', 'code-snippets' ),
96
+ 'type' => 'checkbox',
97
+ 'label' => __( 'Use hard tabs (not spaces) for indentation.', 'code-snippets' ),
98
+ 'default' => true,
99
+ 'codemirror' => 'indentWithTabs',
100
+ ),
101
+
102
+ array(
103
+ 'id' => 'tab_size',
104
+ 'name' => __( 'Tab Size', 'code-snippets' ),
105
+ 'type' => 'number',
106
+ 'desc' => __( 'The width of a tab character.', 'code-snippets' ),
107
+ 'default' => 4,
108
+ 'codemirror' => 'tabSize',
109
+ ),
110
+
111
+ array(
112
+ 'id' => 'indent_unit',
113
+ 'name' => __( 'Indent Unit', 'code-snippets' ),
114
+ 'type' => 'number',
115
+ 'desc' => __( 'How many spaces a block should be indented.', 'code-snippets' ),
116
+ 'default' => 2,
117
+ 'codemirror' => 'indentUnit',
118
+ ),
119
+
120
+ array(
121
+ 'id' => 'wrap_lines',
122
+ 'name' => __( 'Wrap Lines', 'code-snippets' ),
123
+ 'type' => 'checkbox',
124
+ 'label' => __( 'Whether the editor should scroll or wrap for long lines.', 'code-snippets' ),
125
+ 'default' => true,
126
+ 'codemirror' => 'lineWrapping',
127
+ ),
128
+
129
+ array(
130
+ 'id' => 'line_numbers',
131
+ 'name' => __( 'Line Numbers', 'code-snippets' ),
132
+ 'type' => 'checkbox',
133
+ 'label' => __( 'Show line numbers to the left of the editor.', 'code-snippets' ),
134
+ 'default' => true,
135
+ 'codemirror' => 'lineNumbers',
136
+ ),
137
+
138
+ array(
139
+ 'id' => 'auto_close_brackets',
140
+ 'name' => __( 'Auto Close Brackets', 'code-snippets' ),
141
+ 'type' => 'checkbox',
142
+ 'label' => __( 'Auto-close brackets and quotes when typed.', 'code-snippets' ),
143
+ 'default' => true,
144
+ 'codemirror' => 'autoCloseBrackets',
145
+ ),
146
+
147
+ array(
148
+ 'id' => 'highlight_selection_matches',
149
+ 'name' => __( 'Highlight Selection Matches', 'code-snippets' ),
150
+ 'label' => __( 'Highlight all instances of a currently selected word.', 'code-snippets' ),
151
+ 'type' => 'checkbox',
152
+ 'default' => true,
153
+ 'codemirror' => 'highlightSelectionMatches',
154
+ ),
155
+ );
156
+
157
+ self::$fields = apply_filters( 'code_snippets_settings_fields', self::$fields );
158
+ }
159
+ }
includes/settings/settings-fields.php CHANGED
@@ -19,11 +19,17 @@ function code_snippets_checkbox_field( $atts ) {
19
  checked( $saved_value, true, false )
20
  );
21
 
 
22
  if ( isset( $atts['label'] ) ) {
23
  printf ( '<label for="%s">%s %s</label>', $input_name, $output, $atts['label'] );
24
  } else {
25
  echo $output;
26
  }
 
 
 
 
 
27
  }
28
 
29
  /**
@@ -38,4 +44,13 @@ function code_snippets_number_field( $atts ) {
38
  $atts['id'],
39
  code_snippets_get_setting( $atts['section'], $atts['id'] )
40
  );
 
 
 
 
 
 
 
 
 
41
  }
19
  checked( $saved_value, true, false )
20
  );
21
 
22
+ // Output the checkbox field, optionally with label
23
  if ( isset( $atts['label'] ) ) {
24
  printf ( '<label for="%s">%s %s</label>', $input_name, $output, $atts['label'] );
25
  } else {
26
  echo $output;
27
  }
28
+
29
+ // Add field description if it is set
30
+ if ( ! empty( $atts['desc'] ) ) {
31
+ echo '<p class="description">' . $atts['desc'] . '</p>';
32
+ }
33
  }
34
 
35
  /**
44
  $atts['id'],
45
  code_snippets_get_setting( $atts['section'], $atts['id'] )
46
  );
47
+
48
+ if ( ! empty( $atts['label'] ) ) {
49
+ echo ' ' . $atts['label'];
50
+ }
51
+
52
+ // Add field description if it is set
53
+ if ( ! empty( $atts['desc'] ) ) {
54
+ echo '<p class="description">' . $atts['desc'] . '</p>';
55
+ }
56
  }
includes/settings/settings.php CHANGED
@@ -5,19 +5,23 @@
5
  * @package Code_Snippets
6
  */
7
 
 
 
 
8
  /**
9
  * Retrieve the default setting values
10
  * @return array
11
  */
12
  function code_snippets_get_default_settings() {
13
- $fields = code_snippets_get_settings_fields();
14
- $defaults = array();
15
-
16
- foreach ( $fields as $section_id => $section_fields ) {
17
- $defaults[ $section_id ] = wp_list_pluck( $section_fields, 'default', 'id' );
18
- }
19
 
20
- return $defaults;
 
 
 
 
 
21
  }
22
 
23
  /*
@@ -49,112 +53,22 @@ function code_snippets_get_setting( $section, $field ) {
49
  function code_snippets_get_settings_sections() {
50
  $sections = array(
51
  'general' => __( 'General', 'code-snippets' ),
52
- 'editor' => __( 'Editor', 'code-snippets' ),
 
53
  );
54
 
55
  return apply_filters( 'code_snippets_settings_sections', $sections );
56
  }
57
 
58
- /**
59
- * Retrieve the settings fields
60
- * @return array
61
- */
62
- function code_snippets_get_settings_fields() {
63
- $settings = array();
64
-
65
- $settings['general'] = array(
66
- array(
67
- 'id' => 'activate_by_default',
68
- 'name' =>__( 'Activate by Default', 'code-snippets' ),
69
- 'type' => 'checkbox',
70
- 'label' => __( "Make the 'Save and Activate' button the default action when saving a snippet.", 'code-snippets' ),
71
- 'default' => false,
72
- ),
73
- );
74
-
75
- /* Editor settings section */
76
-
77
- $settings['editor'] = array(
78
- array(
79
- 'id' => 'theme',
80
- 'name' => __( 'Theme', 'code-snippets' ),
81
- 'type' => 'codemirror_theme_select',
82
- 'default' => 'default',
83
- 'codemirror' => 'theme',
84
- ),
85
-
86
- array(
87
- 'id' => 'indent_with_tabs',
88
- 'name' => __( 'Indent With Tabs', 'code-snippets' ),
89
- 'type' => 'checkbox',
90
- 'label' => __( 'Use hard tabs (not spaces) for indentation.', 'code-snippets' ),
91
- 'default' => true,
92
- 'codemirror' => 'indentWithTabs',
93
- ),
94
-
95
- array(
96
- 'id' => 'tab_size',
97
- 'name' => __( 'Tab Size', 'code-snippets' ),
98
- 'type' => 'number',
99
- 'label' => __( 'The width of a tab character.', 'code-snippets' ),
100
- 'default' => 4,
101
- 'codemirror' => 'tabSize',
102
- ),
103
-
104
- array(
105
- 'id' => 'indent_unit',
106
- 'name' => __( 'Indent Unit', 'code-snippets' ),
107
- 'type' => 'number',
108
- 'label' => __( 'How many spaces a block should be indented.', 'code-snippets' ),
109
- 'default' => 2,
110
- 'codemirror' => 'indentUnit',
111
- ),
112
-
113
- array(
114
- 'id' => 'wrap_lines',
115
- 'name' => __( 'Wrap Lines', 'code-snippets' ),
116
- 'type' => 'checkbox',
117
- 'label' => __( 'Whether the editor should scroll or wrap for long lines.', 'code-snippets' ),
118
- 'default' => true,
119
- 'codemirror' => 'lineWrapping',
120
- ),
121
-
122
- array(
123
- 'id' => 'line_numbers',
124
- 'name' => __( 'Line Numbers', 'code-snippets' ),
125
- 'type' => 'checkbox',
126
- 'label' => __( 'Show line numbers to the left of the editor.', 'code-snippets' ),
127
- 'default' => true,
128
- 'codemirror' => 'lineNumbers',
129
- ),
130
-
131
- array(
132
- 'id' => 'auto_close_brackets',
133
- 'name' => __( 'Auto Close Brackets', 'code-snippets' ),
134
- 'type' => 'checkbox',
135
- 'label' => __( 'Auto-close brackets and quotes when typed.', 'code-snippets' ),
136
- 'default' => true,
137
- 'codemirror' => 'autoCloseBrackets',
138
- ),
139
-
140
- array(
141
- 'id' => 'highlight_selection_matches',
142
- 'name' => __( 'Highlight Selection Matches', 'code-snippets' ),
143
- 'label' => __( 'Highlight all instances of a currently selected word.', 'code-snippets' ),
144
- 'type' => 'checkbox',
145
- 'default' => true,
146
- 'codemirror' => 'highlightSelectionMatches',
147
- ),
148
- );
149
-
150
- return apply_filters( 'code_snippets_settings_fields', $settings );
151
- }
152
-
153
  /**
154
  * Register settings sections, fields, etc
155
  */
156
  function code_snippets_register_settings() {
157
 
 
 
 
 
158
  /* Register the setting */
159
  register_setting( 'code-snippets', 'code_snippets_settings', 'code_snippets_settings_validate' );
160
 
@@ -186,7 +100,7 @@ function code_snippets_register_settings() {
186
 
187
  /* Add editor preview as a field */
188
  add_settings_field(
189
- 'code_snippets_' . $field['id'],
190
  __( 'Editor Preview', 'code-snippets' ),
191
  'code_snippets_settings_editor_preview',
192
  'code-snippets',
5
  * @package Code_Snippets
6
  */
7
 
8
+ require plugin_dir_path( __FILE__ ) . '/class-settings.php';
9
+ Code_Snippets_Settings::setup();
10
+
11
  /**
12
  * Retrieve the default setting values
13
  * @return array
14
  */
15
  function code_snippets_get_default_settings() {
16
+ return Code_Snippets_Settings::get_defaults();
17
+ }
 
 
 
 
18
 
19
+ /**
20
+ * Retrieve the settings fields
21
+ * @return array
22
+ */
23
+ function code_snippets_get_settings_fields() {
24
+ return Code_Snippets_Settings::get_fields();
25
  }
26
 
27
  /*
53
  function code_snippets_get_settings_sections() {
54
  $sections = array(
55
  'general' => __( 'General', 'code-snippets' ),
56
+ 'description_editor' => __( 'Description Editor', 'code-snippets' ),
57
+ 'editor' => __( 'Code Editor', 'code-snippets' ),
58
  );
59
 
60
  return apply_filters( 'code_snippets_settings_sections', $sections );
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Register settings sections, fields, etc
65
  */
66
  function code_snippets_register_settings() {
67
 
68
+ if ( ! get_option( 'code_snippets_settings', false ) ) {
69
+ add_option( 'code_snippets_settings', code_snippets_get_default_settings() );
70
+ }
71
+
72
  /* Register the setting */
73
  register_setting( 'code-snippets', 'code_snippets_settings', 'code_snippets_settings_validate' );
74
 
100
 
101
  /* Add editor preview as a field */
102
  add_settings_field(
103
+ 'code_snippets_editor_preview',
104
  __( 'Editor Preview', 'code-snippets' ),
105
  'code_snippets_settings_editor_preview',
106
  'code-snippets',
includes/upgrade.php CHANGED
@@ -17,9 +17,6 @@ function code_snippets_upgrader() {
17
  /* Check if this is the first plugin run */
18
  if ( ! $prev_version ) {
19
 
20
- /* Create the snippet tables */
21
- create_code_snippets_tables();
22
-
23
  /* Register capabilities */
24
  $role = get_role( apply_filters( 'code_snippets_role', 'administrator' ) );
25
  $role->add_cap( apply_filters( 'code_snippets_cap', 'manage_snippets' ) );
17
  /* Check if this is the first plugin run */
18
  if ( ! $prev_version ) {
19
 
 
 
 
20
  /* Register capabilities */
21
  $role = get_role( apply_filters( 'code_snippets_role', 'administrator' ) );
22
  $role->add_cap( apply_filters( 'code_snippets_cap', 'manage_snippets' ) );
languages/code-snippets-de_DE.mo CHANGED
Binary file
languages/code-snippets-de_DE.po CHANGED
@@ -1,581 +1,919 @@
1
- # This German Language File: Copyright (C) 2013 by David Decker of deckerweb.de & genesisthemes.de
2
- # This file is distributed under the same license as the Code Snippets Plugin package.
3
- #
4
- # Weitere deutsche Sprachdateien fuer WordPress-Plugins und -Themes finden Sie unter:
5
- # --> http://deckerweb.de/sprachdateien/
6
- #
7
- msgid ""
8
- msgstr ""
9
- "Project-Id-Version: Code Snippets v1.7\n"
10
- "Report-Msgid-Bugs-To: http://deckerweb.de/kontakt/\n"
11
- "POT-Creation-Date: 2013-03-27 15:41:09+0000\n"
12
- "PO-Revision-Date: 2013-03-27 16:44+0100\n"
13
- "Last-Translator: David Decker <deckerweb.mobil@googlemail.com>\n"
14
- "Language-Team: David Decker -- http://deckerweb.de/kontakt/\n"
15
- "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=UTF-8\n"
17
- "Content-Transfer-Encoding: 8bit\n"
18
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
19
- "X-Generator: CSL v1.x\n"
20
- "X-Poedit-Language: German\n"
21
- "X-Poedit-Country: GERMANY\n"
22
- "X-Poedit-SourceCharset: utf-8\n"
23
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
24
- "X-Poedit-Basepath: ../\n"
25
- "X-Textdomain-Support: yes\n"
26
- "X-Poedit-SearchPath-0: .\n"
27
-
28
- #@ code-snippets
29
- #. translators: plugin header field 'Name'
30
- #: code-snippets.php:0
31
- #: code-snippets.php:262
32
- msgid "Code Snippets"
33
- msgstr "Codeschnipsel"
34
-
35
- #@ code-snippets
36
- #. translators: plugin header field 'Description'
37
- #: code-snippets.php:0
38
- msgid "An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!"
39
- msgstr "Auf einfache, saubere und elegante Weise Codeschnipsel für Ihre Webseite hinzufügen. Änderungen an der 'functions.php' des Themes sind nicht mehr notwendig!"
40
-
41
- #@ code-snippets
42
- #. translators: plugin header field 'Author'
43
- #: code-snippets.php:0
44
- msgid "Shea Bunge"
45
- msgstr "Shea Bunge"
46
-
47
- #@ code-snippets
48
- #. translators: plugin header field 'AuthorURI'
49
- #: code-snippets.php:0
50
- msgid "http://bungeshea.com"
51
- msgstr "http://bungeshea.com/"
52
-
53
- #@ code-snippets
54
- #: code-snippets.php:577
55
- #: code-snippets.php:578
56
- #: code-snippets.php:588
57
- #: includes/admin/manage.php:36
58
- msgid "Snippets"
59
- msgstr "Codeschnipsel"
60
-
61
- #@ code-snippets
62
- #: code-snippets.php:612
63
- #: code-snippets.php:1145
64
- #: includes/admin/single.php:45
65
- msgid "Add New Snippet"
66
- msgstr "Neuen Codeschnipsel hinzufügen"
67
-
68
- #@ code-snippets
69
- #: code-snippets.php:613
70
- msgid "Add New"
71
- msgstr "Hinzufügen"
72
-
73
- #@ code-snippets
74
- #: code-snippets.php:641
75
- #: includes/admin/import.php:34
76
- msgid "Import Snippets"
77
- msgstr "Codeschnipsel importieren"
78
-
79
- #@ code-snippets
80
- #: code-snippets.php:642
81
- msgid "Import"
82
- msgstr "Importieren"
83
-
84
- #@ code-snippets
85
- #: code-snippets.php:601
86
- #: code-snippets.php:1146
87
- #: includes/admin/single.php:37
88
- msgid "Edit Snippet"
89
- msgstr "Codeschnipsel bearbeiten"
90
-
91
- #@ code-snippets
92
- #: code-snippets.php:1465
93
- msgid "Manage your existing snippets"
94
- msgstr "Bestehende Codeschnipsel verwalten"
95
-
96
- #@ code-snippets
97
- #: code-snippets.php:589
98
- #: code-snippets.php:1466
99
- msgid "Manage"
100
- msgstr "Verwalten"
101
-
102
- #@ code-snippets
103
- #: code-snippets.php:1486
104
- msgid "Visit the WordPress.org plugin page"
105
- msgstr "Die Plugin-Seite bei WordPress.org aufrufen"
106
-
107
- #@ code-snippets
108
- #: code-snippets.php:1487
109
- msgid "About"
110
- msgstr "Über"
111
-
112
- #@ code-snippets
113
- #: code-snippets.php:1491
114
- msgid "Visit the support forums"
115
- msgstr "Die Support-Foren aufrufen"
116
-
117
- #@ code-snippets
118
- #: code-snippets.php:1492
119
- msgid "Support"
120
- msgstr "Support"
121
-
122
- #@ code-snippets
123
- #: code-snippets.php:1496
124
- msgid "Support this plugin's development"
125
- msgstr "Die Entwicklung dieses Plugins unterstützen"
126
-
127
- #@ code-snippets
128
- #: code-snippets.php:1497
129
- msgid "Donate"
130
- msgstr "Spenden"
131
-
132
- #@ code-snippets
133
- #: includes/admin/import.php:38
134
- msgid "Howdy! Upload your Code Snippets export file and we&#8217;ll import the snippets to this site."
135
- msgstr "Servus! Laden Sie hier Ihre Codeschnipsel-XML-Exportdatei hoch und wir werden die Codeschnipsel dieser Installation hinzufügen."
136
-
137
- #@ code-snippets
138
- #: includes/admin/import.php:40
139
- #, php-format
140
- msgid "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to activate the imported snippets."
141
- msgstr "Danach müssen Sie zur <a href=\"%s\">Codeschnispel verwalten-Seite</a> gehen und die importierten Codeschnipsel entsprechend aktivieren."
142
-
143
- #@ code-snippets
144
- #: includes/admin/import.php:42
145
- msgid "Choose a Code Snippets (.xml) file to upload, then click Upload file and import."
146
- msgstr "Wählen Sie eine Codeschnipsel-XML-Datei zum Hochladen, klicken Sie dann auf 'Datei hochladen &amp; importieren'."
147
-
148
- #@ code-snippets
149
- #: includes/admin/import.php:46
150
- msgid "Choose a file from your computer:"
151
- msgstr "Datei von Ihrem Rechner wählen:"
152
-
153
- #@ code-snippets
154
- #: includes/admin/import.php:46
155
- msgid "(Maximum size: 8MB)"
156
- msgstr "(Maximalgröße: 8 MB)"
157
-
158
- #@ code-snippets
159
- #: includes/admin/import.php:55
160
- msgid "Upload file and import"
161
- msgstr "Datei hochladen &amp; importieren"
162
-
163
- #@ code-snippets
164
- #: includes/admin/manage.php:21
165
- msgid "Snippet <strong>activated</strong>."
166
- msgstr "Codeschnipsel <strong>aktiviert</strong>."
167
-
168
- #@ code-snippets
169
- #: includes/admin/manage.php:23
170
- msgid "Selected snippets <strong>activated</strong>."
171
- msgstr "Ausgewählte Codeschnipsel wurden <strong>aktiviert</strong>."
172
-
173
- #@ code-snippets
174
- #: includes/admin/manage.php:25
175
- msgid "Snippet <strong>deactivated</strong>."
176
- msgstr "Codeschnipsel <strong>deaktiviert</strong>."
177
-
178
- #@ code-snippets
179
- #: includes/admin/manage.php:27
180
- msgid "Selected snippets <strong>deactivated</strong>."
181
- msgstr "Ausgewählte Codeschnipsel wurden <strong>deaktiviert</strong>."
182
-
183
- #@ code-snippets
184
- #: includes/admin/manage.php:29
185
- msgid "Snippet <strong>deleted</strong>."
186
- msgstr "Codeschnipsel <strong>gelöscht</strong>."
187
-
188
- #@ code-snippets
189
- #: includes/admin/manage.php:31
190
- msgid "Selected snippets <strong>deleted</strong>."
191
- msgstr "Ausgewählte Codeschnipsel wurden <strong>gelöscht</strong>."
192
-
193
- #@ code-snippets
194
- #: includes/admin/manage.php:38
195
- #: includes/admin/single.php:42
196
- msgctxt "snippet"
197
- msgid "Add New"
198
- msgstr "Hinzufügen"
199
-
200
- #@ code-snippets
201
- #: includes/admin/manage.php:47
202
- msgid "Search Installed Snippets"
203
- msgstr "Installierte Codeschnipsel suchen"
204
-
205
- #@ code-snippets
206
- #: includes/admin/single.php:22
207
- msgid "Please provide a name for the snippet and its code."
208
- msgstr "Bitte geben Sie einen Namen für den Codeschnipsel und dessen Code an."
209
-
210
- #@ code-snippets
211
- #: includes/admin/single.php:28
212
- msgid "Snippet <strong>updated</strong>."
213
- msgstr "Codeschnipsel <strong>aktualisiert</strong>."
214
-
215
- #@ code-snippets
216
- #: includes/admin/single.php:30
217
- msgid "Snippet <strong>added</strong>."
218
- msgstr "Codeschnipsel <strong>hinzugefügt</strong>."
219
-
220
- #@ code-snippets
221
- #: includes/admin/single.php:55
222
- #: includes/admin/single.php:56
223
- msgid "Name (short title)"
224
- msgstr "Name (Kurztitel)"
225
-
226
- #@ code-snippets
227
- #: includes/admin/single.php:61
228
- msgid "Code"
229
- msgstr "Code"
230
-
231
- #@ code-snippets
232
- #: code-snippets.php:1433
233
- #: includes/class-list-table.php:189
234
- msgid "Description"
235
- msgstr "Beschreibung"
236
-
237
- #@ code-snippets
238
- #: code-snippets.php:1434
239
- msgid "(Optional)"
240
- msgstr "(optional, aber empfohlen für bessere Organisation &amp; Übersicht)"
241
-
242
- #@ code-snippets
243
- #: includes/class-list-table.php:36
244
- msgid "Snippets per page"
245
- msgstr "Codeschnipsel pro Seite"
246
-
247
- #@ code-snippets
248
- #: code-snippets.php:1118
249
- #: includes/class-list-table.php:127
250
- #: includes/class-list-table.php:213
251
- msgid "Network Deactivate"
252
- msgstr "Netzwerk-weit deaktivieren"
253
-
254
- #@ code-snippets
255
- #: code-snippets.php:1118
256
- #: includes/class-list-table.php:127
257
- #: includes/class-list-table.php:213
258
- msgid "Deactivate"
259
- msgstr "Deaktivieren"
260
-
261
- #@ code-snippets
262
- #: code-snippets.php:1127
263
- #: includes/class-list-table.php:137
264
- #: includes/class-list-table.php:212
265
- msgid "Network Activate"
266
- msgstr "Netzwerk-weit aktivieren"
267
-
268
- #@ code-snippets
269
- #: code-snippets.php:1127
270
- #: includes/class-list-table.php:137
271
- #: includes/class-list-table.php:212
272
- msgid "Activate"
273
- msgstr "Aktivieren"
274
-
275
- #@ code-snippets
276
- #: includes/class-list-table.php:187
277
- msgid "Name"
278
- msgstr "Name"
279
-
280
- #@ code-snippets
281
- #: includes/class-list-table.php:188
282
- msgid "ID"
283
- msgstr "ID"
284
-
285
- #@ code-snippets
286
- #: includes/class-list-table.php:147
287
- #: includes/class-list-table.php:214
288
- msgid "Export"
289
- msgstr "Exportieren"
290
-
291
- #@ code-snippets
292
- #: includes/class-list-table.php:155
293
- #: includes/class-list-table.php:215
294
- msgid "Delete"
295
- msgstr "Löschen"
296
-
297
- #@ code-snippets
298
- #: includes/class-list-table.php:216
299
- msgid "Export to PHP"
300
- msgstr "Exportieren als PHP"
301
-
302
- #@ code-snippets
303
- #: includes/class-list-table.php:236
304
- #, php-format
305
- msgid "All <span class=\"count\">(%s)</span>"
306
- msgid_plural "All <span class=\"count\">(%s)</span>"
307
- msgstr[0] "Alle <span class=\"count\">(%s)</span>"
308
- msgstr[1] "Alle <span class=\"count\">(%s)</span>"
309
-
310
- #@ code-snippets
311
- #: includes/class-list-table.php:239
312
- #, php-format
313
- msgid "Active <span class=\"count\">(%s)</span>"
314
- msgid_plural "Active <span class=\"count\">(%s)</span>"
315
- msgstr[0] "Aktiv <span class=\"count\">(%s)</span>"
316
- msgstr[1] "Aktive <span class=\"count\">(%s)</span>"
317
-
318
- #@ code-snippets
319
- #: includes/class-list-table.php:242
320
- #, php-format
321
- msgid "Recently Active <span class=\"count\">(%s)</span>"
322
- msgid_plural "Recently Active <span class=\"count\">(%s)</span>"
323
- msgstr[0] "Kürzlich aktiv <span class=\"count\">(%s)</span>"
324
- msgstr[1] "Kürzlich aktive <span class=\"count\">(%s)</span>"
325
-
326
- #@ code-snippets
327
- #: includes/class-list-table.php:245
328
- #, php-format
329
- msgid "Inactive <span class=\"count\">(%s)</span>"
330
- msgid_plural "Inactive <span class=\"count\">(%s)</span>"
331
- msgstr[0] "Inaktiv <span class=\"count\">(%s)</span>"
332
- msgstr[1] "Inaktive <span class=\"count\">(%s)</span>"
333
-
334
- #@ code-snippets
335
- #: includes/class-list-table.php:279
336
- msgid "Clear List"
337
- msgstr "Liste säubern"
338
-
339
- #@ code-snippets
340
- #: includes/class-list-table.php:374
341
- #, php-format
342
- msgid "You do not appear to have any snippets available at this time. <a href=\"%s\">Add New&rarr;</a>"
343
- msgstr "Sie scheinen derzeit keine Codeschnipsel in der Verwaltung zu haben. Einen neuen <a href=\"%s\">hinzufügen &rarr;</a>"
344
-
345
- #@ code-snippets
346
- #: includes/help/import.php:5
347
- #: includes/help/manage.php:5
348
- #: includes/help/single.php:5
349
- msgid "Overview"
350
- msgstr "Übersicht"
351
-
352
- #@ code-snippets
353
- #: includes/help/import.php:7
354
- msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can load snippets from a Code Snippets (.xml) import file into the database with your existing snippets."
355
- msgstr "Codeschnipsel sind ähnlich wie Plugins - beide erweitern bzw. verändern die Funktionalität. Codeschnipsel sind jedoch weniger komplex und leichtgewichtiger; nur einige Zeilen Code. Damit fällt auch weniger Last auf dem Webserver an. Hier können Sie Codeschnipsel aus einer Codeschipsel-XML-Importdatei hinzufügen."
356
-
357
- #@ code-snippets
358
- #: includes/help/import.php:12
359
- msgid "Importing"
360
- msgstr "Importieren"
361
-
362
- #@ code-snippets
363
- #: includes/help/import.php:15
364
- #, php-format
365
- msgid "Snippets will be added to the database along with your existing snippets. Regardless of whether the snippets were active on the previous site, imported snippets are always inactive until activated using the <a href=\"%s\">Manage Snippets</a> page.</p>"
366
- msgstr "Codeschnipsel werden der Datenbank hinzugefügt, zusammen mit Ihren bereits bestehenden Codeschnipseln. Unabhängig davon, ob diese Codeschnipsel auf der vorherigen Installation aktiv waren, sind importierte Codeschnipsel standardmäßig immer deaktiviert, solange Sie von Ihnen auf der <a href=\"%s\">Codeschnispel verwalten-Seite</a> aktiviert werden.</p>"
367
-
368
- #@ code-snippets
369
- #: includes/help/import.php:20
370
- msgid "Exporting"
371
- msgstr "Exportieren"
372
-
373
- #@ code-snippets
374
- #: includes/help/import.php:22
375
- #, php-format
376
- msgid "You can save your snippets to a Code Snippets (.xml) export file using the <a href=\"%s\">Manage Snippets</a> page."
377
- msgstr "Sie können Ihre Codeschnipsel auch als Codeschnipsel-XML-Exportdatei exportieren, über die <a href=\"%s\">Codeschnipsel verwalten-Seite</a>."
378
-
379
- #@ code-snippets
380
- #: includes/help/import.php:26
381
- #: includes/help/manage.php:27
382
- #: includes/help/single.php:31
383
- msgid "For more information:"
384
- msgstr "Weitere Informationen:"
385
-
386
- #@ code-snippets
387
- #: includes/help/import.php:27
388
- #: includes/help/single.php:32
389
- msgid "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a>"
390
- msgstr "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">Plugin-Seite bei WordPress.org</a>"
391
-
392
- #@ code-snippets
393
- #: includes/help/import.php:28
394
- #: includes/help/manage.php:29
395
- #: includes/help/single.php:33
396
- msgid "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank\">Support Forums</a>"
397
- msgstr "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank\">Offizielles Support-Forum (Engl.)</a>"
398
-
399
- #@ code-snippets
400
- #: includes/help/manage.php:7
401
- msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can manage your existing snippets and preform tasks on them such as activating, deactivating, deleting and exporting."
402
- msgstr "Codeschnipsel sind ähnlich wie Plugins - beide erweitern bzw. verändern die Funktionalität. Codeschnipsel sind jedoch weniger komplex und leichtgewichtiger; nur einige Zeilen Code. Damit fällt auch weniger Last auf dem Webserver an. Hier können Sie bereits existierende Codeschnipsel bearbeiten bzw. Aktionen damit ausführen, wie Aktivieren, Deaktivieren, Löschen sowie Exportieren."
403
-
404
- #@ code-snippets
405
- #: includes/help/manage.php:12
406
- msgid "Safe Mode"
407
- msgstr "Sicherheitsmodus"
408
-
409
- #@ code-snippets
410
- #: includes/help/manage.php:14
411
- msgid "Be sure to check your snippets for errors before you activate them, as a faulty snippet could bring your whole blog down. If your site starts doing strange things, deactivate all your snippets and activate them one at a time."
412
- msgstr "Stellen Sie sicher, dass Sie Ihre Codeschnipsel vor dem Aktivieren überprüfen. Fehlerhafte Codeschnipsel können Ihre gesamte Webseite zum Crash bringen. Falls Ihre Webseite eigenartige Dinge vollführt oder komische Sachen anzeigt, deaktivieren Sie bitte alle Codeschnipsel und aktivieren Sie diese eins nach dem anderen."
413
-
414
- #@ code-snippets
415
- #: includes/help/manage.php:20
416
- msgid "Uninstall"
417
- msgstr "Deinstallieren"
418
-
419
- #@ code-snippets
420
- #: includes/help/manage.php:22
421
- #, php-format
422
- msgid "When you delete Code Snippets through the Plugins menu in WordPress it will clear up the <code>%1$s</code> table and a few other bits of data stored in the database. If you want to keep this data (ie: you are only temporally uninstalling Code Snippets) then remove the <code>%2$s</code> folder using FTP."
423
- msgstr "Wenn Sie das Codeschnipsel-Plugin <strong>über das Plugins-Menü in WordPress löschen</strong>, wird es die <code>%1$s</code> Tabelle leeren und einige anderen (Einstellungs-) Datenbits in Ihrer Datenbank. Falls Sie diese Daten jedoch sichern wollen (mit anderen Worten: Sie wollen das Plugin nur temporär deinstallieren), dann sollten Sie den <code>%2$s</code> Ordner lediglich <strong>via FTP</strong> entfernen."
424
-
425
- #@ code-snippets
426
- #: includes/help/manage.php:23
427
- msgid "Even if you're sure that you don't want to use Code Snippets ever again on this WordPress installation, you may want to use the export feature to back up your snippets."
428
- msgstr "Auch wenn Sie sicher sind, dass Sie das Codeschnipsel-Plugin niemals mehr in dieser WordPress-Installation verwenden werden, wollen Sie vielleicht dennoch die Export-Funktion verwenden, um Ihre Codeschnipsel zu sichern."
429
-
430
- #@ code-snippets
431
- #: includes/help/manage.php:28
432
- msgid "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a></p>"
433
- msgstr "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">Plugin-Seite bei WordPress.org</a></p>"
434
-
435
- #@ code-snippets
436
- #: includes/help/single.php:7
437
- msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can add a new snippet, or edit an existing one."
438
- msgstr "Codeschnipsel sind ähnlich wie Plugins - beide erweitern bzw. verändern die Funktionalität. Codeschnipsel sind jedoch weniger komplex und leichtgewichtiger; nur einige Zeilen Code. Damit fällt auch weniger Last auf dem Webserver an. Hier können Sie einen neuen Codeschnipsel hinzufügen oder bereits Existierende bearbeiten."
439
-
440
- #@ code-snippets
441
- #: includes/help/single.php:11
442
- msgid "Finding Snippets"
443
- msgstr "Codeschnipsel finden"
444
-
445
- #@ code-snippets
446
- #: includes/help/single.php:13
447
- msgid ""
448
- "Here are some links to websites which host a large number of snippets that you can add to your site.\n"
449
- "\t\t<ul>\n"
450
- "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-Snippets</a></li>\n"
451
- "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>\n"
452
- "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats Who Code Snippet Library\">Cats Who Code</a></li>\n"
453
- "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
454
- "\t\t</ul>"
455
- msgstr ""
456
- "Hier sind einige Links zu Webseiten, welche eine große Anzahl von WordPress-Codeschnipseln anbieten, die Sie vielleicht für Ihre Webseite verwenden könnten. Bitte seien Sie äußerst vorsichtig mit fremden Codeschnipseln, überprüfen Sie immer den Anbieter/ Herausgeber. Setzen Sie nur vertrauenswürdige Quellen ein!\n"
457
- "\\\t\\\t<ul>\n"
458
- "\\\t\\\t\\\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-Snippets</a></li>\n"
459
- "\\\t\\\t\\\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>\n"
460
- "\\\t\\\t\\\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats Who Code Snippet Library\">Cats Who Code</a></li>\n"
461
- "\\\t\\\t\\\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
462
- "\\\t\\\t</ul>"
463
-
464
- #@ code-snippets
465
- #: includes/help/single.php:24
466
- msgid "Adding Snippets"
467
- msgstr "Codeschnipsel hinzufügen"
468
-
469
- #@ code-snippets
470
- #: includes/help/single.php:26
471
- msgid "You need to fill out the name and code fields for your snippet to be added. While the description field will add more information about how your snippet works, what is does and where you found it, it is completely optional."
472
- msgstr "Sie müssen die Felder für 'Name' und 'Code' ausfüllen, damit der Schnipsel hinzugefügt werden kann. Das Beschreibungsfeld ist völlig optional, es wird jedoch sehr empfohlen. Damit können Sie kurz notieren, was der Code eigentlich macht und bewahren sich so auf elegante Weise die Übersicht."
473
-
474
- #@ code-snippets
475
- #: includes/help/single.php:27
476
- msgid "Please be sure to check that your snippet is valid PHP code and will not produce errors before adding it through this page. While doing so will not become active straight away, it will help to minimise the chance of a faulty snippet becoming active on your site."
477
- msgstr "Bitte stellen Sie vor dem Einfügen von Codeschnipseln sicher, dass Ihr entsprechender Codeschipsel valider PHP-Code ist und keine Fehler produziert. Somit erhöhen Sie von vornherein die Wahrscheinlichkeit, dass überhaupt fehlerhafte Codeschnipsel in Ihrer Installation aktiviert werden."
478
-
479
- #@ code-snippets
480
- #. translators: plugin header field 'PluginURI'
481
- #: code-snippets.php:0
482
- msgid "http://code-snippets.bungeshea.com"
483
- msgstr "http://code-snippets.bungeshea.com/"
484
-
485
- #@ code-snippets
486
- #: code-snippets.php:263
487
- msgid "Import snippets from a <strong>Code Snippets</strong> export file"
488
- msgstr "Codeschnipsel aus einer <strong>Code Snippets</strong>-Exportdatei importieren"
489
-
490
- #@ code-snippets
491
- #: includes/admin/import.php:20
492
- #, php-format
493
- msgid "Imported <strong>%d</strong> snippet."
494
- msgid_plural "Imported <strong>%d</strong> snippets."
495
- msgstr[0] " <strong>%d</strong> Codeschnipsel importiert."
496
- msgstr[1] " <strong>%d</strong> Codeschnipsel importiert."
497
-
498
- #@ code-snippets
499
- #: includes/help/import.php:29
500
- #: includes/help/manage.php:30
501
- #: includes/help/single.php:34
502
- msgid "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project Website</a>"
503
- msgstr "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Projektwebseite</a>"
504
-
505
- #@ code-snippets
506
- #: includes/help/manage.php:15
507
- msgid "If something goes wrong with a snippet and you can't use WordPress, you can cause all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> file. After you have deactivated the offending snippet, you can turn off safe mode by removing this line or replacing <strong>true</strong> with <strong>false</strong>."
508
- msgstr "Falls etwas schief läuft und Sie WordPress nicht mehr verwenden können - sprich: den Admin-Bereich - können Sie alle Codeschnipsel dieses Plugins von der Ausführung abhalten, indem Sie folgende Konstante <code>define( 'CODE_SNIPPETS_SAFE_MODE', true );</code> Ihrer WordPress-Konfigurationsdatei <code>wp-config.php</code> hinzufügen. Nachdem Sie den fehlerhaften Codeschnipsel gefunden und deaktiviert haben, können Sie den Sicherheitsmodus in der <code>wp-config.php</code> wieder entfernen bzw. den Wert der Konstante von <strong>true</strong> auf dann <strong>false</strong> setzen."
509
-
510
- #@ code-snippets
511
- #: includes/help/single.php:20
512
- msgid "More places to find snippets, as well as a selection of example snippets, can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/\">plugin documentation</a>"
513
- msgstr "Weitere Orte, um Codeschnipsel zu finden und ebenso eine Sammlung von Beispiel-Schnipseln finden Sie in der <a href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/\">Dokumentation des Plugins</a>."
514
-
515
- #@ code-snippets
516
- #. translators: plugin header field 'Version'
517
- #: code-snippets.php:0
518
- msgid "1.7"
519
- msgstr "1.7"
520
-
521
- #@ code-snippets
522
- #: code-snippets.php:602
523
- #: includes/class-list-table.php:142
524
- msgid "Edit"
525
- msgstr "Bearbeiten"
526
-
527
- #@ code-snippets
528
- #: code-snippets.php:1227
529
- msgid "Sorry, you're not allowed to edit snippets"
530
- msgstr "Entschuldigung, aber Sie haben keine Berechtigung zum Bearbeiten von Codeschnipseln."
531
-
532
- #@ code-snippets
533
- #: includes/admin/single.php:24
534
- msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
535
- msgstr "Codeschnipsel <strong>aktualisiert</strong> und <strong>aktiviert</strong>."
536
-
537
- #@ code-snippets
538
- #: includes/admin/single.php:26
539
- msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
540
- msgstr "Codeschnipsel <strong>hinzugefügt</strong> und <strong>aktiviert</strong>."
541
-
542
- #@ code-snippets
543
- #: includes/class-list-table.php:163
544
- msgid ""
545
- "You are about to permanently delete the selected item.\n"
546
- "\t\t\t\t'Cancel' to stop, 'OK' to delete."
547
- msgstr ""
548
- "Sie sind dabei das ausgewählte Element dauerhaft zu löschen.\n"
549
- "\\\t\\\t\\\t\\\t'Abbrechen', um das zu stoppen, 'OK', um wirklich zu löschen."
550
-
551
- #@ code-snippets
552
- #: includes/class-list-table.php:270
553
- msgid "Filter"
554
- msgstr "Filter"
555
-
556
- #@ code-snippets
557
- #: includes/class-list-table.php:541
558
- msgid "Search results"
559
- msgstr "Suchergebnisse"
560
-
561
- #@ code-snippets
562
- #: includes/class-list-table.php:544
563
- #, php-format
564
- msgid " for &#8220;%s&#8221;"
565
- msgstr " für &#8220;%s&#8221;"
566
-
567
- #@ code-snippets
568
- #: includes/class-list-table.php:550
569
- msgid "Clear Filters"
570
- msgstr "Filter zurücksetzen"
571
-
572
- #@ code-snippets
573
- #: includes/help/import.php:14
574
- msgid "You can load your snippets from a code snippets (.xml) export file using this page."
575
- msgstr "Auf dieser Seite können Sie Ihre Codeschnipsel von einer Codeschnipsel-Exportdatei (<code>.xml</code>) laden."
576
-
577
- #@ code-snippets
578
- #: includes/admin/single.php:74
579
- msgid "Save Changes &amp; Activate"
580
- msgstr "Änderungen speichern &amp; Aktivieren"
581
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This German Language File: Copyright (C) 2013 by David Decker of deckerweb.de & genesisthemes.de
2
+ # This file is distributed under the same license as the Code Snippets Plugin package.
3
+ #
4
+ # Weitere deutsche Sprachdateien fuer WordPress-Plugins und -Themes finden Sie unter:
5
+ # --> http://deckerweb.de/sprachdateien/
6
+ #
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: Code Snippets v1.7\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2015-03-05 17:28+1100\n"
12
+ "PO-Revision-Date: 2015-03-17 08:12+0100\n"
13
+ "Last-Translator: Joerg Knoerchen <webmaster@sensorgrafie.de>\n"
14
+ "Language-Team: David Decker -- http://deckerweb.de/kontakt/\n"
15
+ "Language: de_DE\n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
20
+ "X-Generator: Poedit 1.7.4\n"
21
+ "X-Poedit-SourceCharset: utf-8\n"
22
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;"
23
+ "_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
24
+ "X-Poedit-Basepath: ../\n"
25
+ "X-Textdomain-Support: yes\n"
26
+ "X-Poedit-SearchPath-0: .\n"
27
+
28
+ # @ code-snippets
29
+ #: includes/admin.php:81 includes/manage/admin.php:21 includes/manage/manage.php:22
30
+ #: includes/manage/manage.php:23 includes/manage/manage.php:33
31
+ msgid "Snippets"
32
+ msgstr "Codeschnipsel"
33
+
34
+ # @ code-snippets
35
+ #: includes/admin.php:120
36
+ msgid "Manage your existing snippets"
37
+ msgstr "Bestehende Codeschnipsel verwalten"
38
+
39
+ # @ code-snippets
40
+ #: includes/admin.php:121 includes/manage/manage.php:34
41
+ msgid "Manage"
42
+ msgstr "Verwalten"
43
+
44
+ # @ code-snippets
45
+ #: includes/admin.php:150
46
+ msgid "Visit the WordPress.org plugin page"
47
+ msgstr "Die Plugin-Seite bei WordPress.org aufrufen"
48
+
49
+ # @ code-snippets
50
+ #: includes/admin.php:151
51
+ msgid "About"
52
+ msgstr "Über"
53
+
54
+ # @ code-snippets
55
+ #: includes/admin.php:155
56
+ msgid "Visit the support forums"
57
+ msgstr "Die Support-Foren aufrufen"
58
+
59
+ # @ code-snippets
60
+ #: includes/admin.php:156
61
+ msgid "Support"
62
+ msgstr "Support"
63
+
64
+ # @ code-snippets
65
+ #: includes/admin.php:160
66
+ msgid "Support this plugin's development"
67
+ msgstr "Die Entwicklung dieses Plugins unterstützen"
68
+
69
+ # @ code-snippets
70
+ #: includes/admin.php:161
71
+ msgid "Donate"
72
+ msgstr "Spenden"
73
+
74
+ #: includes/admin.php:194
75
+ msgid ""
76
+ "<strong>Have feedback on Code Snippets?</strong> Please take the time to answer a "
77
+ "short survey on how you use this plugin and what you'd like to see changed or added "
78
+ "in the future."
79
+ msgstr ""
80
+ "<strong>Kommentar zu Codeschnipsel?</strong> Nehmen sie sich ein wenig Zeit und "
81
+ "beantworten sie bitte eine kurze Umfrage zum Plugin, wie sie es nutzen und welche "
82
+ "Funktionen sie in Zukunft gerne verändert oder hinzugefügt haben möchten."
83
+
84
+ #: includes/admin.php:197
85
+ msgid "Take the survey now"
86
+ msgstr "An der Umfrage teilnehmen"
87
+
88
+ #: includes/class-export.php:104
89
+ msgid ""
90
+ "This is a code snippets export file generated by the Code Snippets WordPress plugin."
91
+ msgstr ""
92
+ "Dies ist eine Codeschnipsel-Export-Datei die durch das Code Snippets WordPress "
93
+ "Plugin erstellt wurde."
94
+
95
+ #: includes/class-export.php:105
96
+ msgid "http://wordpress.org/plugins/code-snippets"
97
+ msgstr "http://wordpress.org/plugins/code-snippets"
98
+
99
+ #: includes/class-export.php:106
100
+ msgid "To import these snippets a WordPress site follow these steps:"
101
+ msgstr ""
102
+ "Um Codeschnipsel in eine WordPress Seite zu importieren folge diesen Schritten:"
103
+
104
+ #: includes/class-export.php:107
105
+ msgid "1. Log in to that site as an administrator."
106
+ msgstr "1. Melde dich als Administrator an."
107
+
108
+ #: includes/class-export.php:108
109
+ msgid ""
110
+ "2. Install the Code Snippets plugin using the directions provided at the above link."
111
+ msgstr ""
112
+ "2. Installiere das Code Snippets Plugin nutze hierzu den Link und die Informationen "
113
+ "von oben."
114
+
115
+ #: includes/class-export.php:109
116
+ msgid "3. Go to 'Tools: Import' in the WordPress admin panel."
117
+ msgstr ""
118
+ "3. Navigiere zu 'Werkzeuge: Daten importieren' in der WordPress Administration."
119
+
120
+ #: includes/class-export.php:110
121
+ msgid "4. Click on the \"Code Snippets\" importer in the list"
122
+ msgstr "4. Klicke in der Liste der Importmodule auf \"Code Snippets\" "
123
+
124
+ #: includes/class-export.php:111
125
+ msgid "5. Upload this file using the form provided on that page."
126
+ msgstr "5. Lade diese Datei über den angebotenen Dialog der Importseite hoch."
127
+
128
+ #: includes/class-export.php:112
129
+ msgid ""
130
+ "6. Code Snippets will then import all of the snippets and associated information "
131
+ "contained in this file into your site."
132
+ msgstr ""
133
+ "6. Die Codeschnipsel werden neben allen anderen Informationen aus dieser Datei in "
134
+ "deine Seite importiert."
135
+
136
+ #: includes/class-export.php:113
137
+ msgid ""
138
+ "7. You will then have to visit the 'Snippets: Manage' admin menu and activate "
139
+ "desired snippets."
140
+ msgstr ""
141
+ "7. Nach dem Import besuche die Seite 'Codeschnipsel: Verwalten' im "
142
+ "Administrationsmenü und aktiviere die gewünschten Codeschnipsel."
143
+
144
+ # @ code-snippets
145
+ #: includes/edit/admin-help.php:15 includes/import/admin-help.php:16
146
+ #: includes/manage/admin-help.php:15
147
+ msgid "Overview"
148
+ msgstr "Übersicht"
149
+
150
+ # @ code-snippets
151
+ #: includes/edit/admin-help.php:17
152
+ msgid ""
153
+ "Snippets are similar to plugins - they both extend and expand the functionality of "
154
+ "WordPress. Snippets are more light-weight, just a few lines of code, and do not put "
155
+ "as much load on your server. Here you can add a new snippet, or edit an existing "
156
+ "one."
157
+ msgstr ""
158
+ "Codeschnipsel sind ähnlich wie Plugins - beide erweitern bzw. verändern die "
159
+ "Funktionalität. Codeschnipsel sind jedoch weniger komplex und leichtgewichtiger; "
160
+ "nur einige Zeilen Code. Damit fällt auch weniger Last auf dem Webserver an. Hier "
161
+ "können Sie einen neuen Codeschnipsel hinzufügen oder bereits Existierende "
162
+ "bearbeiten."
163
+
164
+ # @ code-snippets
165
+ #: includes/edit/admin-help.php:22
166
+ msgid "Finding Snippets"
167
+ msgstr "Codeschnipsel finden"
168
+
169
+ # @ code-snippets
170
+ #: includes/edit/admin-help.php:24
171
+ msgid ""
172
+ "Here are some links to websites which host a large number of snippets that you can "
173
+ "add to your site.\n"
174
+ "\t\t<ul>\n"
175
+ "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
176
+ "Snippets</a></li>\n"
177
+ "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>\n"
178
+ "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats Who "
179
+ "Code Snippet Library\">Cats Who Code</a></li>\n"
180
+ "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
181
+ "\t\t</ul>"
182
+ msgstr ""
183
+ "Hier sind einige Links zu Webseiten, welche eine große Anzahl von WordPress-"
184
+ "Codeschnipseln anbieten, die Sie vielleicht für Ihre Webseite verwenden könnten. "
185
+ "Bitte seien Sie äußerst vorsichtig mit fremden Codeschnipseln, überprüfen Sie immer "
186
+ "den Anbieter/ Herausgeber. Setzen Sie nur vertrauenswürdige Quellen ein!\n"
187
+ "\\\t\\\t<ul>\n"
188
+ "\\\t\\\t\\\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
189
+ "Snippets</a></li>\n"
190
+ "\\\t\\\t\\\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></"
191
+ "li>\n"
192
+ "\\\t\\\t\\\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats "
193
+ "Who Code Snippet Library\">Cats Who Code</a></li>\n"
194
+ "\\\t\\\t\\\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
195
+ "\\\t\\\t</ul>"
196
+
197
+ # @ code-snippets
198
+ #: includes/edit/admin-help.php:31
199
+ msgid ""
200
+ "More places to find snippets, as well as a selection of example snippets, can be "
201
+ "found in the <a href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/"
202
+ "\">plugin documentation</a>"
203
+ msgstr ""
204
+ "Weitere Orte, um Codeschnipsel zu finden und ebenso eine Sammlung von Beispiel-"
205
+ "Schnipseln finden Sie in der <a href=\"http://code-snippets.bungeshea.com/docs/"
206
+ "finding-snippets/\">Dokumentation des Plugins</a>."
207
+
208
+ # @ code-snippets
209
+ #: includes/edit/admin-help.php:36
210
+ msgid "Adding Snippets"
211
+ msgstr "Codeschnipsel hinzufügen"
212
+
213
+ # @ code-snippets
214
+ #: includes/edit/admin-help.php:38
215
+ msgid ""
216
+ "You need to fill out the name and code fields for your snippet to be added. While "
217
+ "the description field will add more information about how your snippet works, what "
218
+ "is does and where you found it, it is completely optional."
219
+ msgstr ""
220
+ "Sie müssen die Felder für 'Name' und 'Code' ausfüllen, damit der Schnipsel "
221
+ "hinzugefügt werden kann. Das Beschreibungsfeld ist völlig optional, es wird jedoch "
222
+ "sehr empfohlen. Damit können Sie kurz notieren, was der Code eigentlich macht und "
223
+ "bewahren sich so auf elegante Weise die Übersicht."
224
+
225
+ # @ code-snippets
226
+ #: includes/edit/admin-help.php:39
227
+ msgid ""
228
+ "Please be sure to check that your snippet is valid PHP code and will not produce "
229
+ "errors before adding it through this page. While doing so will not become active "
230
+ "straight away, it will help to minimise the chance of a faulty snippet becoming "
231
+ "active on your site."
232
+ msgstr ""
233
+ "Bitte stellen Sie vor dem Einfügen von Codeschnipseln sicher, dass Ihr "
234
+ "entsprechender Codeschipsel valider PHP-Code ist und keine Fehler produziert. Somit "
235
+ "erhöhen Sie von vornherein die Wahrscheinlichkeit, dass überhaupt fehlerhafte "
236
+ "Codeschnipsel in Ihrer Installation aktiviert werden."
237
+
238
+ # @ code-snippets
239
+ #: includes/edit/admin-help.php:43 includes/import/admin-help.php:37
240
+ #: includes/manage/admin-help.php:37
241
+ msgid "For more information:"
242
+ msgstr "Weitere Informationen:"
243
+
244
+ # @ code-snippets
245
+ #: includes/edit/admin-help.php:44 includes/import/admin-help.php:38
246
+ msgid ""
247
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress "
248
+ "Extend</a>"
249
+ msgstr ""
250
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">Plugin-"
251
+ "Seite bei WordPress.org</a>"
252
+
253
+ # @ code-snippets
254
+ #: includes/edit/admin-help.php:45 includes/import/admin-help.php:39
255
+ #: includes/manage/admin-help.php:39
256
+ msgid ""
257
+ "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
258
+ "\">Support Forums</a>"
259
+ msgstr ""
260
+ "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
261
+ "\">Offizielles Support-Forum (Engl.)</a>"
262
+
263
+ # @ code-snippets
264
+ #: includes/edit/admin-help.php:46 includes/import/admin-help.php:40
265
+ #: includes/manage/admin-help.php:40
266
+ msgid ""
267
+ "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project Website</"
268
+ "a>"
269
+ msgstr ""
270
+ "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Projektwebseite</"
271
+ "a>"
272
+
273
+ #: includes/edit/admin-messages.php:14
274
+ msgid "An error occurred when saving the snippet."
275
+ msgstr "Es trat ein Fehler beim Speichern des Codeschnipsel auf."
276
+
277
+ # @ code-snippets
278
+ #: includes/edit/admin-messages.php:18
279
+ msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
280
+ msgstr "Codeschnipsel <strong>aktualisiert</strong> und <strong>aktiviert</strong>."
281
+
282
+ # @ code-snippets
283
+ #: includes/edit/admin-messages.php:22
284
+ msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
285
+ msgstr "Codeschnipsel <strong>hinzugefügt</strong> und <strong>aktiviert</strong>."
286
+
287
+ #: includes/edit/admin-messages.php:26
288
+ msgid "Snippet <strong>updated</strong> and <strong>deactivated</strong>."
289
+ msgstr "Codeschnipsel <strong>aktualisiert</strong> und <strong>deaktiviert</strong>."
290
+
291
+ # @ code-snippets
292
+ #: includes/edit/admin-messages.php:30
293
+ msgid "Snippet <strong>updated</strong>."
294
+ msgstr "Codeschnipsel <strong>aktualisiert</strong>."
295
+
296
+ # @ code-snippets
297
+ #: includes/edit/admin-messages.php:34
298
+ msgid "Snippet <strong>added</strong>."
299
+ msgstr "Codeschnipsel <strong>hinzugefügt</strong>."
300
+
301
+ # @ code-snippets
302
+ #: includes/edit/admin.php:26 includes/edit/edit.php:46 includes/edit/edit.php:47
303
+ msgid "Edit Snippet"
304
+ msgstr "Codeschnipsel bearbeiten"
305
+
306
+ # @ code-snippets
307
+ #: includes/edit/admin.php:31 includes/edit/edit.php:35 includes/manage/admin.php:26
308
+ msgid "Add New"
309
+ msgstr "Hinzufügen"
310
+
311
+ # @ code-snippets
312
+ #: includes/edit/admin.php:35 includes/edit/edit.php:34
313
+ msgid "Add New Snippet"
314
+ msgstr "Neuen Codeschnipsel hinzufügen"
315
+
316
+ # @ code-snippets
317
+ #: includes/edit/admin.php:52 includes/edit/admin.php:53
318
+ msgid "Name (short title)"
319
+ msgstr "Name (Kurztitel)"
320
+
321
+ # @ code-snippets
322
+ #: includes/edit/admin.php:58
323
+ msgid "Code"
324
+ msgstr "Code"
325
+
326
+ #: includes/edit/admin.php:79 includes/edit/admin.php:93
327
+ msgid "Save Changes and Activate"
328
+ msgstr "Speichere Änderungen und Aktiviere"
329
+
330
+ #: includes/edit/admin.php:99
331
+ msgid "Save Changes and Deactivate"
332
+ msgstr "Speichere Änderungen und Deaktiviere"
333
+
334
+ # @ code-snippets
335
+ #: includes/edit/admin.php:109 includes/manage/class-list-table.php:139
336
+ #: includes/manage/class-list-table.php:264
337
+ msgid "Export"
338
+ msgstr "Exportieren"
339
+
340
+ #: includes/edit/admin.php:116
341
+ msgid ""
342
+ "You are about to permanently delete this snippet.\n"
343
+ "'Cancel' to stop, 'OK' to delete."
344
+ msgstr ""
345
+ "Du bist dabei diesen Codeschnipsel endgültig zu löschen.\n"
346
+ "'Abbrechen' um zu stoppen, 'OK' um zu löschen."
347
+
348
+ # @ code-snippets
349
+ #: includes/edit/admin.php:121 includes/manage/class-list-table.php:148
350
+ #: includes/manage/class-list-table.php:265
351
+ msgid "Delete"
352
+ msgstr "Löschen"
353
+
354
+ #: includes/edit/edit.php:83 includes/manage/manage.php:67
355
+ msgid "You are not authorized to access this page."
356
+ msgstr "Du hast keine Berechtigung diese Seite zu betreten."
357
+
358
+ # @ code-snippets
359
+ #: includes/edit/edit.php:176 includes/manage/class-list-table.php:224
360
+ msgid "Description"
361
+ msgstr "Beschreibung"
362
+
363
+ #: includes/edit/edit.php:205 includes/manage/class-list-table.php:225
364
+ msgid "Tags"
365
+ msgstr "Stichworte"
366
+
367
+ # @ code-snippets
368
+ #: includes/import/admin-help.php:18
369
+ msgid ""
370
+ "Snippets are similar to plugins - they both extend and expand the functionality of "
371
+ "WordPress. Snippets are more light-weight, just a few lines of code, and do not put "
372
+ "as much load on your server. Here you can load snippets from a Code Snippets (.xml) "
373
+ "import file into the database with your existing snippets."
374
+ msgstr ""
375
+ "Codeschnipsel sind ähnlich wie Plugins - beide erweitern bzw. verändern die "
376
+ "Funktionalität. Codeschnipsel sind jedoch weniger komplex und leichtgewichtiger; "
377
+ "nur einige Zeilen Code. Damit fällt auch weniger Last auf dem Webserver an. Hier "
378
+ "können Sie Codeschnipsel aus einer Codeschipsel-XML-Importdatei hinzufügen."
379
+
380
+ # @ code-snippets
381
+ #: includes/import/admin-help.php:23
382
+ msgid "Importing"
383
+ msgstr "Importieren"
384
+
385
+ # @ code-snippets
386
+ #: includes/import/admin-help.php:25
387
+ msgid ""
388
+ "You can load your snippets from a code snippets (.xml) export file using this page."
389
+ msgstr ""
390
+ "Auf dieser Seite können Sie Ihre Codeschnipsel von einer Codeschnipsel-Exportdatei "
391
+ "(<code>.xml</code>) laden."
392
+
393
+ # @ code-snippets
394
+ #: includes/import/admin-help.php:26
395
+ #, php-format
396
+ msgid ""
397
+ "Snippets will be added to the database along with your existing snippets. "
398
+ "Regardless of whether the snippets were active on the previous site, imported "
399
+ "snippets are always inactive until activated using the <a href=\"%s\">Manage "
400
+ "Snippets</a> page.</p>"
401
+ msgstr ""
402
+ "Codeschnipsel werden der Datenbank hinzugefügt, zusammen mit Ihren bereits "
403
+ "bestehenden Codeschnipseln. Unabhängig davon, ob diese Codeschnipsel auf der "
404
+ "vorherigen Installation aktiv waren, sind importierte Codeschnipsel standardmäßig "
405
+ "immer deaktiviert, solange Sie von Ihnen auf der <a href=\"%s\">Codeschnispel "
406
+ "verwalten-Seite</a> aktiviert werden.</p>"
407
+
408
+ # @ code-snippets
409
+ #: includes/import/admin-help.php:31
410
+ msgid "Exporting"
411
+ msgstr "Exportieren"
412
+
413
+ # @ code-snippets
414
+ #: includes/import/admin-help.php:33
415
+ #, php-format
416
+ msgid ""
417
+ "You can save your snippets to a Code Snippets (.xml) export file using the <a href="
418
+ "\"%s\">Manage Snippets</a> page."
419
+ msgstr ""
420
+ "Sie können Ihre Codeschnipsel auch als Codeschnipsel-XML-Exportdatei exportieren, "
421
+ "über die <a href=\"%s\">Codeschnipsel verwalten-Seite</a>."
422
+
423
+ #: includes/import/admin-messages.php:16
424
+ #, php-format
425
+ msgid ""
426
+ "Successfully imported <strong>%d</strong> snippet. <a href=\"%s\">Have fun!</a>"
427
+ msgstr ""
428
+ "Erfolgreicher Import des <strong>%d</strong> Codeschnipsel. <a href=\"%s\">Viel "
429
+ "Spass!</a>"
430
+
431
+ #: includes/import/admin-messages.php:30
432
+ msgid "An error occurred when processing the import file."
433
+ msgstr "Ein Fehler trat bei der Verarbeitung der importierten Datei auf."
434
+
435
+ # @ code-snippets
436
+ #: includes/import/admin.php:18 includes/import/import.php:55
437
+ msgid "Import Snippets"
438
+ msgstr "Codeschnipsel importieren"
439
+
440
+ # @ code-snippets
441
+ #: includes/import/admin.php:22
442
+ msgid ""
443
+ "Howdy! Upload your Code Snippets export file and we&#8217;ll import the snippets to "
444
+ "this site."
445
+ msgstr ""
446
+ "Servus! Laden Sie hier Ihre Codeschnipsel-XML-Exportdatei hoch und wir werden die "
447
+ "Codeschnipsel dieser Installation hinzufügen."
448
+
449
+ # @ code-snippets
450
+ #: includes/import/admin.php:24
451
+ #, php-format
452
+ msgid ""
453
+ "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to activate the "
454
+ "imported snippets."
455
+ msgstr ""
456
+ "Danach müssen Sie zur <a href=\"%s\">Codeschnispel verwalten-Seite</a> gehen und "
457
+ "die importierten Codeschnipsel entsprechend aktivieren."
458
+
459
+ # @ code-snippets
460
+ #: includes/import/admin.php:26
461
+ msgid ""
462
+ "Choose a Code Snippets (.xml) file to upload, then click Upload file and import."
463
+ msgstr ""
464
+ "Wählen Sie eine Codeschnipsel-XML-Datei zum Hochladen, klicken Sie dann auf 'Datei "
465
+ "hochladen &amp; importieren'."
466
+
467
+ # @ code-snippets
468
+ #: includes/import/admin.php:33
469
+ msgid "Choose a file from your computer:"
470
+ msgstr "Datei von Ihrem Rechner wählen:"
471
+
472
+ # @ code-snippets
473
+ #: includes/import/admin.php:34
474
+ msgid "(Maximum size: 8MB)"
475
+ msgstr "(Maximalgröße: 8 MB)"
476
+
477
+ # @ code-snippets
478
+ #: includes/import/admin.php:40
479
+ msgid "Upload file and import"
480
+ msgstr "Datei hochladen &amp; importieren"
481
+
482
+ # @ code-snippets
483
+ #: includes/import/import.php:34
484
+ msgid "Code Snippets"
485
+ msgstr "Codeschnipsel"
486
+
487
+ #: includes/import/import.php:35
488
+ msgid "Import snippets from a code snippets export file"
489
+ msgstr "Importiere Codeschnipsel aus einer Code Snippets Export Datei."
490
+
491
+ # @ code-snippets
492
+ #: includes/import/import.php:56
493
+ msgid "Import"
494
+ msgstr "Importieren"
495
+
496
+ #: includes/import/import.php:92
497
+ msgid "You are not access this page."
498
+ msgstr "Du kannst diese Seite nicht betreten."
499
+
500
+ # @ code-snippets
501
+ #: includes/manage/admin-help.php:17
502
+ msgid ""
503
+ "Snippets are similar to plugins - they both extend and expand the functionality of "
504
+ "WordPress. Snippets are more light-weight, just a few lines of code, and do not put "
505
+ "as much load on your server. Here you can manage your existing snippets and preform "
506
+ "tasks on them such as activating, deactivating, deleting and exporting."
507
+ msgstr ""
508
+ "Codeschnipsel sind ähnlich wie Plugins - beide erweitern bzw. verändern die "
509
+ "Funktionalität. Codeschnipsel sind jedoch weniger komplex und leichtgewichtiger; "
510
+ "nur einige Zeilen Code. Damit fällt auch weniger Last auf dem Webserver an. Hier "
511
+ "können Sie bereits existierende Codeschnipsel bearbeiten bzw. Aktionen damit "
512
+ "ausführen, wie Aktivieren, Deaktivieren, Löschen sowie Exportieren."
513
+
514
+ # @ code-snippets
515
+ #: includes/manage/admin-help.php:22
516
+ msgid "Safe Mode"
517
+ msgstr "Sicherheitsmodus"
518
+
519
+ # @ code-snippets
520
+ #: includes/manage/admin-help.php:24
521
+ msgid ""
522
+ "Be sure to check your snippets for errors before you activate them, as a faulty "
523
+ "snippet could bring your whole blog down. If your site starts doing strange things, "
524
+ "deactivate all your snippets and activate them one at a time."
525
+ msgstr ""
526
+ "Stellen Sie sicher, dass Sie Ihre Codeschnipsel vor dem Aktivieren überprüfen. "
527
+ "Fehlerhafte Codeschnipsel können Ihre gesamte Webseite zum Crash bringen. Falls "
528
+ "Ihre Webseite eigenartige Dinge vollführt oder komische Sachen anzeigt, "
529
+ "deaktivieren Sie bitte alle Codeschnipsel und aktivieren Sie diese eins nach dem "
530
+ "anderen."
531
+
532
+ # @ code-snippets
533
+ #: includes/manage/admin-help.php:25
534
+ msgid ""
535
+ "If something goes wrong with a snippet and you can't use WordPress, you can cause "
536
+ "all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', "
537
+ "true);</code> to your <code>wp-config.php</code> file. After you have deactivated "
538
+ "the offending snippet, you can turn off safe mode by removing this line or "
539
+ "replacing <strong>true</strong> with <strong>false</strong>."
540
+ msgstr ""
541
+ "Falls etwas schief läuft und Sie WordPress nicht mehr verwenden können - sprich: "
542
+ "den Admin-Bereich - können Sie alle Codeschnipsel dieses Plugins von der Ausführung "
543
+ "abhalten, indem Sie folgende Konstante <code>define( 'CODE_SNIPPETS_SAFE_MODE', "
544
+ "true );</code> Ihrer WordPress-Konfigurationsdatei <code>wp-config.php</code> "
545
+ "hinzufügen. Nachdem Sie den fehlerhaften Codeschnipsel gefunden und deaktiviert "
546
+ "haben, können Sie den Sicherheitsmodus in der <code>wp-config.php</code> wieder "
547
+ "entfernen bzw. den Wert der Konstante von <strong>true</strong> auf dann "
548
+ "<strong>false</strong> setzen."
549
+
550
+ # @ code-snippets
551
+ #: includes/manage/admin-help.php:30
552
+ msgid "Uninstall"
553
+ msgstr "Deinstallieren"
554
+
555
+ # @ code-snippets
556
+ #: includes/manage/admin-help.php:32
557
+ #, php-format
558
+ msgid ""
559
+ "When you delete Code Snippets through the Plugins menu in WordPress it will clear "
560
+ "up the <code>%1$s</code> table and a few other bits of data stored in the database. "
561
+ "If you want to keep this data (ie: you are only temporally uninstalling Code "
562
+ "Snippets) then remove the <code>%2$s</code> folder using FTP."
563
+ msgstr ""
564
+ "Wenn Sie das Codeschnipsel-Plugin <strong>über das Plugins-Menü in WordPress "
565
+ "löschen</strong>, wird es die <code>%1$s</code> Tabelle leeren und einige anderen "
566
+ "Einstellungen in Ihrer Datenbank. Falls Sie diese Daten jedoch sichern wollen (mit "
567
+ "anderen Worten: Sie wollen das Plugin nur temporär deinstallieren), dann sollten "
568
+ "Sie den <code>%2$s</code> Ordner lediglich <strong>via FTP</strong> entfernen."
569
+
570
+ # @ code-snippets
571
+ #: includes/manage/admin-help.php:33
572
+ msgid ""
573
+ "Even if you're sure that you don't want to use Code Snippets ever again on this "
574
+ "WordPress installation, you may want to use the export feature to back up your "
575
+ "snippets."
576
+ msgstr ""
577
+ "Auch wenn Sie sicher sind, dass Sie das Codeschnipsel-Plugin niemals mehr in dieser "
578
+ "WordPress-Installation verwenden werden, sollten sie vielleicht dennoch vorher die "
579
+ "Export-Funktion verwenden, um Ihre Codeschnipsel zu sichern."
580
+
581
+ # @ code-snippets
582
+ #: includes/manage/admin-help.php:38
583
+ msgid ""
584
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress "
585
+ "Extend</a></p>"
586
+ msgstr ""
587
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">Plugin-"
588
+ "Seite auf WordPress.org</a></p>"
589
+
590
+ #: includes/manage/admin-messages.php:14
591
+ msgid ""
592
+ "<strong>Warning:</strong> Safe mode is active and snippets will not execute! Remove "
593
+ "the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-config.php</code> "
594
+ "to turn off safe mode. <a href=\"http://code-snippets.bungeshea.com/docs/safe-mode/"
595
+ "\" target=\"_blank\">Help</a>"
596
+ msgstr ""
597
+ "<strong>Warnung:</strong> Sicherheitsmodus aktiv! Codeschnipsel werden nicht "
598
+ "ausgeführt. Entferne den Parameter <code>CODE_SNIPPETS_SAFE_MODE</code> aus deiner "
599
+ "<code>wp-config.php</code> um den Sicherheitsmodus auszuschalten. <a href=\"http://"
600
+ "code-snippets.bungeshea.com/docs/safe-mode/\" target=\"_blank\">Hilfe hierzu "
601
+ "(engl.)</a>"
602
+
603
+ # @ code-snippets
604
+ #: includes/manage/admin-messages.php:20
605
+ msgid "Snippet <strong>activated</strong>."
606
+ msgstr "Codeschnipsel <strong>aktiviert</strong>."
607
+
608
+ # @ code-snippets
609
+ #: includes/manage/admin-messages.php:24
610
+ msgid "Selected snippets <strong>activated</strong>."
611
+ msgstr "Ausgewählte Codeschnipsel wurden <strong>aktiviert</strong>."
612
+
613
+ # @ code-snippets
614
+ #: includes/manage/admin-messages.php:28
615
+ msgid "Snippet <strong>deactivated</strong>."
616
+ msgstr "Codeschnipsel <strong>deaktiviert</strong>."
617
+
618
+ # @ code-snippets
619
+ #: includes/manage/admin-messages.php:32
620
+ msgid "Selected snippets <strong>deactivated</strong>."
621
+ msgstr "Ausgewählte Codeschnipsel wurden <strong>deaktiviert</strong>."
622
+
623
+ # @ code-snippets
624
+ #: includes/manage/admin-messages.php:36
625
+ msgid "Snippet <strong>deleted</strong>."
626
+ msgstr "Codeschnipsel <strong>gelöscht</strong>."
627
+
628
+ # @ code-snippets
629
+ #: includes/manage/admin-messages.php:40
630
+ msgid "Selected snippets <strong>deleted</strong>."
631
+ msgstr "Ausgewählte Codeschnipsel wurden <strong>gelöscht</strong>."
632
+
633
+ # @ code-snippets
634
+ #: includes/manage/admin.php:39
635
+ msgid "Search Installed Snippets"
636
+ msgstr "Installierte Codeschnipsel suchen"
637
+
638
+ # @ code-snippets
639
+ #: includes/manage/class-list-table.php:51
640
+ msgid "Snippets per page"
641
+ msgstr "Codeschnipsel pro Seite"
642
+
643
+ # @ code-snippets
644
+ #: includes/manage/class-list-table.php:114 includes/manage/class-list-table.php:263
645
+ msgid "Network Deactivate"
646
+ msgstr "Netzwerkweit deaktivieren"
647
+
648
+ # @ code-snippets
649
+ #: includes/manage/class-list-table.php:114 includes/manage/class-list-table.php:263
650
+ msgid "Deactivate"
651
+ msgstr "Deaktivieren"
652
+
653
+ # @ code-snippets
654
+ #: includes/manage/class-list-table.php:123 includes/manage/class-list-table.php:262
655
+ msgid "Network Activate"
656
+ msgstr "Netzwerkweit aktivieren"
657
+
658
+ # @ code-snippets
659
+ #: includes/manage/class-list-table.php:123 includes/manage/class-list-table.php:262
660
+ msgid "Activate"
661
+ msgstr "Aktivieren"
662
+
663
+ # @ code-snippets
664
+ #: includes/manage/class-list-table.php:133
665
+ msgid "Edit"
666
+ msgstr "Bearbeiten"
667
+
668
+ # @ code-snippets
669
+ #: includes/manage/class-list-table.php:155
670
+ msgid ""
671
+ "You are about to permanently delete the selected item.\n"
672
+ "\t\t\t\t'Cancel' to stop, 'OK' to delete."
673
+ msgstr ""
674
+ "Sie sind dabei das ausgewählte Element dauerhaft zu löschen.\n"
675
+ "\t\t\t\t'Abbrechen', um das zu stoppen, 'OK', um wirklich zu löschen."
676
+
677
+ #: includes/manage/class-list-table.php:163
678
+ #, php-format
679
+ msgid "Untitled #%d"
680
+ msgstr "Unbenannt #%d"
681
+
682
+ # @ code-snippets
683
+ #: includes/manage/class-list-table.php:222
684
+ msgid "Name"
685
+ msgstr "Name"
686
+
687
+ # @ code-snippets
688
+ #: includes/manage/class-list-table.php:223
689
+ msgid "ID"
690
+ msgstr "ID"
691
+
692
+ # @ code-snippets
693
+ #: includes/manage/class-list-table.php:266
694
+ msgid "Export to PHP"
695
+ msgstr "Als PHP exportieren"
696
+
697
+ # @ code-snippets
698
+ #: includes/manage/class-list-table.php:303
699
+ #, php-format
700
+ msgid "All <span class=\"count\">(%s)</span>"
701
+ msgstr "Alle <span class=\"count\">(%s)</span>"
702
+
703
+ # @ code-snippets
704
+ #: includes/manage/class-list-table.php:306
705
+ #, php-format
706
+ msgid "Active <span class=\"count\">(%s)</span>"
707
+ msgstr "Aktiv <span class=\"count\">(%s)</span>"
708
+
709
+ # @ code-snippets
710
+ #: includes/manage/class-list-table.php:309
711
+ #, php-format
712
+ msgid "Recently Active <span class=\"count\">(%s)</span>"
713
+ msgstr "Kürzlich aktiv <span class=\"count\">(%s)</span>"
714
+
715
+ # @ code-snippets
716
+ #: includes/manage/class-list-table.php:312
717
+ #, php-format
718
+ msgid "Inactive <span class=\"count\">(%s)</span>"
719
+ msgstr "Inaktiv <span class=\"count\">(%s)</span>"
720
+
721
+ #: includes/manage/class-list-table.php:372
722
+ msgid "Show all tags"
723
+ msgstr "Zeige alle Stichworte"
724
+
725
+ # @ code-snippets
726
+ #: includes/manage/class-list-table.php:386
727
+ msgid "Filter"
728
+ msgstr "Filter"
729
+
730
+ # @ code-snippets
731
+ #: includes/manage/class-list-table.php:394
732
+ msgid "Clear List"
733
+ msgstr "Liste bereinigen"
734
+
735
+ # @ code-snippets
736
+ #: includes/manage/class-list-table.php:542
737
+ #, php-format
738
+ msgid ""
739
+ "You do not appear to have any snippets available at this time. <a href=\"%s\">Add "
740
+ "New&rarr;</a>"
741
+ msgstr ""
742
+ "Sie scheinen derzeit keine Codeschnipsel in der Verwaltung zu haben. Einen neuen <a "
743
+ "href=\"%s\">hinzufügen &rarr;</a>"
744
+
745
+ # @ code-snippets
746
+ #: includes/manage/class-list-table.php:766
747
+ msgid "Search results"
748
+ msgstr "Suchergebnisse"
749
+
750
+ # @ code-snippets
751
+ #: includes/manage/class-list-table.php:769
752
+ #, php-format
753
+ msgid " for &#8220;%s&#8221;"
754
+ msgstr " für &#8220;%s&#8221;"
755
+
756
+ #: includes/manage/class-list-table.php:773
757
+ #, php-format
758
+ msgid " in tag &#8220;%s&#8221;"
759
+ msgstr " in Stichwort &#8220;%s&#8221;"
760
+
761
+ # @ code-snippets
762
+ #: includes/manage/class-list-table.php:779
763
+ msgid "Clear Filters"
764
+ msgstr "Filter zurücksetzen"
765
+
766
+ #: includes/settings/admin.php:20
767
+ msgid "Snippets Settings"
768
+ msgstr "Codeschnipsel Einstellungen"
769
+
770
+ #: includes/settings/admin.php:21 includes/settings/admin.php:40
771
+ msgid "Settings"
772
+ msgstr "Einstellungen"
773
+
774
+ #: includes/settings/settings.php:51
775
+ msgid "General"
776
+ msgstr "Allgemein"
777
+
778
+ #: includes/settings/settings.php:52
779
+ msgid "Editor"
780
+ msgstr "Editor"
781
+
782
+ #: includes/settings/settings.php:68
783
+ msgid "Activate by Default"
784
+ msgstr "Standardmäßig aktivieren"
785
+
786
+ #: includes/settings/settings.php:70
787
+ msgid "Make the 'Save and Activate' button the default action when saving a snippet."
788
+ msgstr ""
789
+ "Legt die 'Speichern und Aktivieren' Schaltfläche als Standard Aktion fest beim "
790
+ "Speichern eines Codeschnipsel."
791
+
792
+ #: includes/settings/settings.php:80
793
+ msgid "Theme"
794
+ msgstr "Theme"
795
+
796
+ #: includes/settings/settings.php:88
797
+ msgid "Indent With Tabs"
798
+ msgstr "Tabulatorbreite"
799
+
800
+ #: includes/settings/settings.php:90
801
+ msgid "Use hard tabs (not spaces) for indentation."
802
+ msgstr "Benutze Tabulator anstelle von Leerzeichen."
803
+
804
+ #: includes/settings/settings.php:97
805
+ msgid "Tab Size"
806
+ msgstr "Tabulatorweite"
807
+
808
+ #: includes/settings/settings.php:99
809
+ msgid "The width of a tab character."
810
+ msgstr "Die Länge eines Tabulatorzeichens."
811
+
812
+ #: includes/settings/settings.php:106
813
+ msgid "Indent Unit"
814
+ msgstr "Einheit des Einzugs"
815
+
816
+ #: includes/settings/settings.php:108
817
+ msgid "How many spaces a block should be indented."
818
+ msgstr "Anzahl der Leerzeichen die einem Einzug entsprechen sollen."
819
+
820
+ #: includes/settings/settings.php:115
821
+ msgid "Wrap Lines"
822
+ msgstr "Zeilen umbrechen"
823
+
824
+ #: includes/settings/settings.php:117
825
+ msgid "Whether the editor should scroll or wrap for long lines."
826
+ msgstr "Legt fest ob der Editor Zeilen umbricht oder bei langen Zeilen scrollen soll."
827
+
828
+ #: includes/settings/settings.php:124
829
+ msgid "Line Numbers"
830
+ msgstr "Zeilennummer"
831
+
832
+ #: includes/settings/settings.php:126
833
+ msgid "Show line numbers to the left of the editor."
834
+ msgstr "Zeigt Zeilennummern auf der linken Seite des Editors."
835
+
836
+ #: includes/settings/settings.php:133
837
+ msgid "Auto Close Brackets"
838
+ msgstr "Klammern automatisch schliessen."
839
+
840
+ #: includes/settings/settings.php:135
841
+ msgid "Auto-close brackets and quotes when typed."
842
+ msgstr ""
843
+ "Vervollständigt und schliesst Klammern und Anführungszeichen während der Eingabe."
844
+
845
+ #: includes/settings/settings.php:142
846
+ msgid "Highlight Selection Matches"
847
+ msgstr "Auswahlhervorhebung"
848
+
849
+ #: includes/settings/settings.php:143
850
+ msgid "Highlight all instances of a currently selected word."
851
+ msgstr ""
852
+ "Eine Auswahl an anderen Stellen hervorheben an denen die Auswahl ebenfalls vorkommt."
853
+
854
+ #: includes/settings/settings.php:190
855
+ msgid "Editor Preview"
856
+ msgstr "Editor Vorschau"
857
+
858
+ #: includes/settings/settings.php:238
859
+ msgid "Settings saved."
860
+ msgstr "Einstellungen gespeichert."
861
+
862
+ # @ code-snippets
863
+ #~ msgid ""
864
+ #~ "An easy, clean and simple way to add code snippets to your site. No need to edit "
865
+ #~ "to your theme's functions.php file again!"
866
+ #~ msgstr ""
867
+ #~ "Auf einfache, saubere und elegante Weise Codeschnipsel für Ihre Webseite "
868
+ #~ "hinzufügen. Änderungen an der 'functions.php' des Themes sind nicht mehr "
869
+ #~ "notwendig!"
870
+
871
+ # @ code-snippets
872
+ #~ msgid "Shea Bunge"
873
+ #~ msgstr "Shea Bunge"
874
+
875
+ # @ code-snippets
876
+ #~ msgid "http://bungeshea.com"
877
+ #~ msgstr "http://bungeshea.com/"
878
+
879
+ # @ code-snippets
880
+ #~ msgctxt "snippet"
881
+ #~ msgid "Add New"
882
+ #~ msgstr "Hinzufügen"
883
+
884
+ # @ code-snippets
885
+ #~ msgid "Please provide a name for the snippet and its code."
886
+ #~ msgstr "Bitte geben Sie einen Namen für den Codeschnipsel und dessen Code an."
887
+
888
+ # @ code-snippets
889
+ #~ msgid "(Optional)"
890
+ #~ msgstr "(optional, aber empfohlen für bessere Organisation &amp; Übersicht)"
891
+
892
+ # @ code-snippets
893
+ #~ msgid "http://code-snippets.bungeshea.com"
894
+ #~ msgstr "http://code-snippets.bungeshea.com/"
895
+
896
+ # @ code-snippets
897
+ #~ msgid "Import snippets from a <strong>Code Snippets</strong> export file"
898
+ #~ msgstr ""
899
+ #~ "Codeschnipsel aus einer <strong>Code Snippets</strong>-Exportdatei importieren"
900
+
901
+ # @ code-snippets
902
+ #~ msgid "Imported <strong>%d</strong> snippet."
903
+ #~ msgid_plural "Imported <strong>%d</strong> snippets."
904
+ #~ msgstr[0] " <strong>%d</strong> Codeschnipsel importiert."
905
+ #~ msgstr[1] " <strong>%d</strong> Codeschnipsel importiert."
906
+
907
+ # @ code-snippets
908
+ #~ msgid "1.7"
909
+ #~ msgstr "1.7"
910
+
911
+ # @ code-snippets
912
+ #~ msgid "Sorry, you're not allowed to edit snippets"
913
+ #~ msgstr ""
914
+ #~ "Entschuldigung, aber Sie haben keine Berechtigung zum Bearbeiten von "
915
+ #~ "Codeschnipseln."
916
+
917
+ # @ code-snippets
918
+ #~ msgid "Save Changes &amp; Activate"
919
+ #~ msgstr "Änderungen speichern &amp; Aktivieren"
languages/code-snippets-fr_FR.mo CHANGED
Binary file
languages/code-snippets-fr_FR.po CHANGED
@@ -1,574 +1,793 @@
1
- # This file is distributed under the same license as the Code Snippets package.
2
- msgid ""
3
- msgstr ""
4
- "PO-Revision-Date: 2013-09-12 10:25+0100\n"
5
- "MIME-Version: 1.0\n"
6
- "Content-Type: text/plain; charset=UTF-8\n"
7
- "Content-Transfer-Encoding: 8bit\n"
8
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
9
- "X-Generator: Poedit 1.5.7\n"
10
- "Project-Id-Version: Code Snippets\n"
11
- "POT-Creation-Date: \n"
12
- "Last-Translator: \n"
13
- "Language-Team: oWEB <oweb@office-web.net>\n"
14
- "Language: French\n"
15
-
16
- #: code-snippets.php:0 code-snippets.php:262
17
- msgid "Code Snippets"
18
- msgstr "Code Snippets"
19
-
20
- #: code-snippets.php:0
21
- msgid ""
22
- "An easy, clean and simple way to add code snippets to your site. No need to "
23
- "edit to your theme's functions.php file again!"
24
- msgstr ""
25
- "Une manière simple d'ajouter des snippets, portions de code, dans votre "
26
- "site. Plus besoin d'éditer le fichier functions.php de votre thème !"
27
-
28
- #: code-snippets.php:0
29
- msgid "Shea Bunge"
30
- msgstr "Shea Bunge"
31
-
32
- #: code-snippets.php:0
33
- msgid "http://bungeshea.com"
34
- msgstr "http://bungeshea.com"
35
-
36
- #: code-snippets.php:577 code-snippets.php:578 code-snippets.php:588
37
- #: includes/admin/manage.php:36
38
- msgid "Snippets"
39
- msgstr "Snippets"
40
-
41
- #: code-snippets.php:612 code-snippets.php:1145 includes/admin/single.php:45
42
- msgid "Add New Snippet"
43
- msgstr "Ajouter Snippet"
44
-
45
- #: code-snippets.php:613
46
- msgid "Add New"
47
- msgstr "Nouveau"
48
-
49
- #: code-snippets.php:641 includes/admin/import.php:34
50
- msgid "Import Snippets"
51
- msgstr "Import de Snippets"
52
-
53
- #: code-snippets.php:642
54
- msgid "Import"
55
- msgstr "Importer"
56
-
57
- #: code-snippets.php:601 code-snippets.php:1146 includes/admin/single.php:37
58
- msgid "Edit Snippet"
59
- msgstr "Editer"
60
-
61
- #: code-snippets.php:1465
62
- msgid "Manage your existing snippets"
63
- msgstr "Gérer les snippets existants"
64
-
65
- #: code-snippets.php:589 code-snippets.php:1466
66
- msgid "Manage"
67
- msgstr "Gérer"
68
-
69
- #: code-snippets.php:1486
70
- msgid "Visit the WordPress.org plugin page"
71
- msgstr "Page du plugin sur WordPress.org"
72
-
73
- #: code-snippets.php:1487
74
- msgid "About"
75
- msgstr "A propos"
76
-
77
- #: code-snippets.php:1491
78
- msgid "Visit the support forums"
79
- msgstr "Forums de support"
80
-
81
- #: code-snippets.php:1492
82
- msgid "Support"
83
- msgstr "Support"
84
-
85
- #: code-snippets.php:1496
86
- msgid "Support this plugin's development"
87
- msgstr "Aider au développement du plugin"
88
-
89
- #: code-snippets.php:1497
90
- msgid "Donate"
91
- msgstr "Faire un don"
92
-
93
- #: includes/admin/import.php:38
94
- msgid ""
95
- "Howdy! Upload your Code Snippets export file and we&#8217;ll import the "
96
- "snippets to this site."
97
- msgstr ""
98
- "Hey ! Chargez votre fichier contenant les portions de code et nous "
99
- "importerons les Snippets dans ce site."
100
-
101
- #: includes/admin/import.php:40
102
- msgid ""
103
- "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to "
104
- "activate the imported snippets."
105
- msgstr ""
106
- "Vous devez vous rendre à la page <a href=\"%s\">Gérer les Snippets</a> pour "
107
- "activer l'import de snippets."
108
-
109
- #: includes/admin/import.php:42
110
- msgid ""
111
- "Choose a Code Snippets (.xml) file to upload, then click Upload file and "
112
- "import."
113
- msgstr ""
114
- "Choisissez un fichier Code Snippets (.xml) à transférer, puis cliquez "
115
- "Transférer et Importer."
116
-
117
- #: includes/admin/import.php:46
118
- msgid "Choose a file from your computer:"
119
- msgstr "Fichier sur votre ordinateur : "
120
-
121
- #: includes/admin/import.php:46
122
- msgid "(Maximum size: 8MB)"
123
- msgstr "(Taille maxi : 8MB)"
124
-
125
- #: includes/admin/import.php:55
126
- msgid "Upload file and import"
127
- msgstr "Transférer et Importer"
128
-
129
- #: includes/admin/manage.php:21
130
- msgid "Snippet <strong>activated</strong>."
131
- msgstr "Snippet <strong>activaté</strong>."
132
-
133
- #: includes/admin/manage.php:23
134
- msgid "Selected snippets <strong>activated</strong>."
135
- msgstr "Snippets sélectionnés <strong>activés</strong>. "
136
-
137
- #: includes/admin/manage.php:25
138
- msgid "Snippet <strong>deactivated</strong>."
139
- msgstr "Snippet <strong>désactivaté</strong>."
140
-
141
- #: includes/admin/manage.php:27
142
- msgid "Selected snippets <strong>deactivated</strong>."
143
- msgstr "Snippets sélectionnés <strong>désactivés</strong>. "
144
-
145
- #: includes/admin/manage.php:29
146
- msgid "Snippet <strong>deleted</strong>."
147
- msgstr "Snippet <strong>supprimé</strong>."
148
-
149
- #: includes/admin/manage.php:31
150
- msgid "Selected snippets <strong>deleted</strong>."
151
- msgstr "Snippets sélectionnés <strong>supprimés</strong>. "
152
-
153
- #: includes/admin/manage.php:38 includes/admin/single.php:42
154
- msgctxt "snippet"
155
- msgid "Add New"
156
- msgstr "Ajouter "
157
-
158
- #: includes/admin/manage.php:47
159
- msgid "Search Installed Snippets"
160
- msgstr "Chercher dans les Snippets installés"
161
-
162
- #: includes/admin/single.php:22
163
- msgid "Please provide a name for the snippet and its code."
164
- msgstr "Veuillez indiauer un nom ainsi que le code pour ce Snippet. "
165
-
166
- #: includes/admin/single.php:28
167
- msgid "Snippet <strong>updated</strong>."
168
- msgstr "Snippet <strong>mis à jour</strong>."
169
-
170
- #: includes/admin/single.php:30
171
- msgid "Snippet <strong>added</strong>."
172
- msgstr "Snippet <strong>ajouté</strong>."
173
-
174
- #: includes/admin/single.php:55 includes/admin/single.php:56
175
- msgid "Name (short title)"
176
- msgstr "Nom (titre court) "
177
-
178
- #: includes/admin/single.php:61
179
- msgid "Code"
180
- msgstr "Code"
181
-
182
- #: code-snippets.php:1433 includes/class-list-table.php:189
183
- msgid "Description"
184
- msgstr "Description"
185
-
186
- #: code-snippets.php:1434
187
- msgid "(Optional)"
188
- msgstr "(Option)"
189
-
190
- #: includes/class-list-table.php:36
191
- msgid "Snippets per page"
192
- msgstr "Snippets par page "
193
-
194
- #: code-snippets.php:1118 includes/class-list-table.php:127
195
- #: includes/class-list-table.php:213
196
- msgid "Network Deactivate"
197
- msgstr "Désactiver réseau "
198
-
199
- #: code-snippets.php:1118 includes/class-list-table.php:127
200
- #: includes/class-list-table.php:213
201
- msgid "Deactivate"
202
- msgstr "Désactiver "
203
-
204
- #: code-snippets.php:1127 includes/class-list-table.php:137
205
- #: includes/class-list-table.php:212
206
- msgid "Network Activate"
207
- msgstr "Activer réseau "
208
-
209
- #: code-snippets.php:1127 includes/class-list-table.php:137
210
- #: includes/class-list-table.php:212
211
- msgid "Activate"
212
- msgstr "Activer"
213
-
214
- #: includes/class-list-table.php:187
215
- msgid "Name"
216
- msgstr "Nom"
217
-
218
- #: includes/class-list-table.php:188
219
- msgid "ID"
220
- msgstr "ID"
221
-
222
- #: includes/class-list-table.php:147 includes/class-list-table.php:214
223
- msgid "Export"
224
- msgstr "Exporter"
225
-
226
- #: includes/class-list-table.php:155 includes/class-list-table.php:215
227
- msgid "Delete"
228
- msgstr "Supprimer"
229
-
230
- #: includes/class-list-table.php:216
231
- msgid "Export to PHP"
232
- msgstr "Export en PHP"
233
-
234
- #: includes/class-list-table.php:236
235
- msgid "All <span class=\"count\">(%s)</span>"
236
- msgid_plural "All <span class=\"count\">(%s)</span>"
237
- msgstr[0] "Tout <span class=\"count\">(%s)</span>"
238
- msgstr[1] "Tout <span class=\"count\">(%s)</span>"
239
-
240
- #: includes/class-list-table.php:239
241
- msgid "Active <span class=\"count\">(%s)</span>"
242
- msgid_plural "Active <span class=\"count\">(%s)</span>"
243
- msgstr[0] "Activer <span class=\"count\">(%s)</span>"
244
- msgstr[1] "Activer <span class=\"count\">(%s)</span>"
245
-
246
- #: includes/class-list-table.php:242
247
- msgid "Recently Active <span class=\"count\">(%s)</span>"
248
- msgid_plural "Recently Active <span class=\"count\">(%s)</span>"
249
- msgstr[0] "Récemment activé <span class=\"count\">(%s)</span>"
250
- msgstr[1] "Récemment activés <span class=\"count\">(%s)</span>"
251
-
252
- #: includes/class-list-table.php:245
253
- msgid "Inactive <span class=\"count\">(%s)</span>"
254
- msgid_plural "Inactive <span class=\"count\">(%s)</span>"
255
- msgstr[0] "Inactif <span class=\"count\">(%s)</span>"
256
- msgstr[1] "Inactifs <span class=\"count\">(%s)</span>"
257
-
258
- #: includes/class-list-table.php:279
259
- msgid "Clear List"
260
- msgstr "Vider la liste"
261
-
262
- #: includes/class-list-table.php:374
263
- msgid ""
264
- "You do not appear to have any snippets available at this time. <a href=\"%s"
265
- "\">Add New&rarr;</a>"
266
- msgstr "Aucun Snippet pour l'instant. <a href=\"%s\">En ajouter un&rarr;</a>"
267
-
268
- #: includes/help/import.php:5 includes/help/manage.php:5
269
- #: includes/help/single.php:5
270
- msgid "Overview"
271
- msgstr "Présentation "
272
-
273
- #: includes/help/import.php:7
274
- msgid ""
275
- "Snippets are similar to plugins - they both extend and expand the "
276
- "functionality of WordPress. Snippets are more light-weight, just a few lines "
277
- "of code, and do not put as much load on your server. Here you can load "
278
- "snippets from a Code Snippets (.xml) import file into the database with your "
279
- "existing snippets."
280
- msgstr ""
281
- "Les Snippets sont similaires aux plugins. Ils permettent aussi d'étendre les "
282
- "fonctionnalités de WordPress. Les Snippets sont plus légers, juste quelques "
283
- "lignes de code : cela permet à votre site de se charger plus rapidement. "
284
- "Vous pouvez en charger plusieurs en important un fichier de Snippets (.xml)."
285
-
286
- #: includes/help/import.php:12
287
- msgid "Importing"
288
- msgstr "Importation"
289
-
290
- #: includes/help/import.php:15
291
- msgid ""
292
- "Snippets will be added to the database along with your existing snippets. "
293
- "Regardless of whether the snippets were active on the previous site, "
294
- "imported snippets are always inactive until activated using the <a href=\"%s"
295
- "\">Manage Snippets</a> page.</p>"
296
- msgstr ""
297
- "Les Snippets seront ajoutés à votre base de données, en plus de ceux déjà "
298
- "existants. Tous les Snippets importés seront inactifs, même si lors de "
299
- "l'export précédent ils étaient actifs. Il vous restera à les <a href=\"%s"
300
- "\">activer</a> ensuite.</p>"
301
-
302
- #: includes/help/import.php:20
303
- msgid "Exporting"
304
- msgstr "Exportation"
305
-
306
- #: includes/help/import.php:22
307
- msgid ""
308
- "You can save your snippets to a Code Snippets (.xml) export file using the "
309
- "<a href=\"%s\">Manage Snippets</a> page."
310
- msgstr ""
311
- "Vous pouvez sauvegarder vos Snippets dans un fichier de Codes (.xml) en les "
312
- "<a href=\"%s\">exportant</a> ."
313
-
314
- #: includes/help/import.php:26 includes/help/manage.php:27
315
- #: includes/help/single.php:31
316
- msgid "For more information:"
317
- msgstr "Pour plus d'informations : "
318
-
319
- #: includes/help/import.php:27 includes/help/single.php:32
320
- msgid ""
321
- "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
322
- "\">WordPress Extend</a>"
323
- msgstr ""
324
- "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
325
- "\">WordPress Extend</a>"
326
-
327
- #: includes/help/import.php:28 includes/help/manage.php:29
328
- #: includes/help/single.php:33
329
- msgid ""
330
- "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
331
- "\">Support Forums</a>"
332
- msgstr ""
333
- "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
334
- "\">Support Forums</a>"
335
-
336
- #: includes/help/manage.php:7
337
- msgid ""
338
- "Snippets are similar to plugins - they both extend and expand the "
339
- "functionality of WordPress. Snippets are more light-weight, just a few lines "
340
- "of code, and do not put as much load on your server. Here you can manage "
341
- "your existing snippets and preform tasks on them such as activating, "
342
- "deactivating, deleting and exporting."
343
- msgstr ""
344
- "Les Snippets sont similaires au Plugins. Les deux permettent d'étendre les "
345
- "fonctionnalités de WordPress. Les Snippets sont plus légers et permettent, "
346
- "avec quelques lignes de code, de rendre votre site plus rapide. Ici vous "
347
- "avez la possibilité de gérer vos portions de code, automatiser des tâches, "
348
- "en activant, désactivant, supprimant et exportant. "
349
-
350
- #: includes/help/manage.php:12
351
- msgid "Safe Mode"
352
- msgstr "Mode sécurité "
353
-
354
- #: includes/help/manage.php:14
355
- msgid ""
356
- "Be sure to check your snippets for errors before you activate them, as a "
357
- "faulty snippet could bring your whole blog down. If your site starts doing "
358
- "strange things, deactivate all your snippets and activate them one at a time."
359
- msgstr ""
360
- "Veuillez bien vérifier vos Snippets avant de les activer. Si la syntaxe "
361
- "n'est pas correcte, il est possible de rendre votre site inaccessible. Si "
362
- "vous découvrez des comportements bizarres sur votre site, désactivez tous "
363
- "vos Snippets, puis activez-les un par un."
364
-
365
- #: includes/help/manage.php:20
366
- msgid "Uninstall"
367
- msgstr "Désinstaller"
368
-
369
- #: includes/help/manage.php:22
370
- msgid ""
371
- "When you delete Code Snippets through the Plugins menu in WordPress it will "
372
- "clear up the <code>%1$s</code> table and a few other bits of data stored in "
373
- "the database. If you want to keep this data (ie: you are only temporally "
374
- "uninstalling Code Snippets) then remove the <code>%2$s</code> folder using "
375
- "FTP."
376
- msgstr ""
377
- "Si vous désinstallez Code Snippets depuis le menu Plugins de votre "
378
- "installation WordPress, la table <code>%1$s</code> contenant les portions de "
379
- "code sera supprimée de la base de données. Si vous voulez conserver les "
380
- "données (par exemple : désinstaller temporairement Code Snippets) supprimez "
381
- "le dossier <code>%2$s</code> via votre client FTP."
382
-
383
- #: includes/help/manage.php:23
384
- msgid ""
385
- "Even if you're sure that you don't want to use Code Snippets ever again on "
386
- "this WordPress installation, you may want to use the export feature to back "
387
- "up your snippets."
388
- msgstr ""
389
- "Même si vous êtes certain(e) de ne plus vouloir utiliser Code Snippets avec "
390
- "cette installation de WordPress, vous pouvez exporter vos Snippets."
391
-
392
- #: includes/help/manage.php:28
393
- msgid ""
394
- "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
395
- "\">WordPress Extend</a></p>"
396
- msgstr ""
397
- "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
398
- "\">WordPress Extend</a></p>"
399
-
400
- #: includes/help/single.php:7
401
- msgid ""
402
- "Snippets are similar to plugins - they both extend and expand the "
403
- "functionality of WordPress. Snippets are more light-weight, just a few lines "
404
- "of code, and do not put as much load on your server. Here you can add a new "
405
- "snippet, or edit an existing one."
406
- msgstr ""
407
- "Les Snippets sont similaires aux plugins. Ils permettent aussi d'étendre les "
408
- "fonctionnalités de WordPress. Les Snippets sont plus légers, juste quelques "
409
- "lignes de code : cela permet à votre site de se charger plus rapidement. "
410
- "Ici, vous pouvez en ajouter ou en éditer."
411
-
412
- #: includes/help/single.php:11
413
- msgid "Finding Snippets"
414
- msgstr "Trouver des Snippets"
415
-
416
- #: includes/help/single.php:13
417
- msgid ""
418
- "Here are some links to websites which host a large number of snippets that "
419
- "you can add to your site.\n"
420
- "\t\t<ul>\n"
421
- "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
422
- "Snippets</a></li>\n"
423
- "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></"
424
- "li>\n"
425
- "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats "
426
- "Who Code Snippet Library\">Cats Who Code</a></li>\n"
427
- "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
428
- "\t\t</ul>"
429
- msgstr ""
430
- "Voici quelques liens vers des sites qui proposent une large panoplie de "
431
- "Snippets que vous pouvez ajouter à votre installation.\n"
432
- "\t\t<ul>\n"
433
- "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
434
- "Snippets</a></li>\n"
435
- "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></"
436
- "li>\n"
437
- "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats "
438
- "Who Code Snippet Library\">Cats Who Code</a></li>\n"
439
- "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
440
- "\t\t</ul>"
441
-
442
- #: includes/help/single.php:24
443
- msgid "Adding Snippets"
444
- msgstr "Ajout de Snippets"
445
-
446
- #: includes/help/single.php:26
447
- msgid ""
448
- "You need to fill out the name and code fields for your snippet to be added. "
449
- "While the description field will add more information about how your snippet "
450
- "works, what is does and where you found it, it is completely optional."
451
- msgstr ""
452
- "Vous devez remplir les champs Nom et Code pour ajouter un Snippet. Le champ "
453
- "description permet d'ajouter des informations sur la fonction ajoutée : "
454
- "utilité, vous l'avez trouvé. C'est une option de confort."
455
-
456
- #: includes/help/single.php:27
457
- msgid ""
458
- "Please be sure to check that your snippet is valid PHP code and will not "
459
- "produce errors before adding it through this page. While doing so will not "
460
- "become active straight away, it will help to minimise the chance of a faulty "
461
- "snippet becoming active on your site."
462
- msgstr ""
463
- "Veuillez vérifier le code PHP de votre Snippet. En vérifiant le code avant "
464
- "d'activer le Snippet, vous vous assurerez que vous ne mettrez en danger "
465
- "votre installation."
466
-
467
- #: code-snippets.php:0
468
- msgid "http://code-snippets.bungeshea.com"
469
- msgstr "http://code-snippets.bungeshea.com"
470
-
471
- #: code-snippets.php:263
472
- msgid "Import snippets from a <strong>Code Snippets</strong> export file"
473
- msgstr ""
474
- "Importer des Snippets depuis un fichier <strong>Code Snippets</strong> "
475
- "exporté préalablement. "
476
-
477
- #: includes/admin/import.php:20
478
- msgid "Imported <strong>%d</strong> snippet."
479
- msgid_plural "Imported <strong>%d</strong> snippets."
480
- msgstr[0] "Snippet <strong>%d</strong> importé."
481
- msgstr[1] "Snippets <strong>%d</strong> importés."
482
-
483
- #: includes/help/import.php:29 includes/help/manage.php:30
484
- #: includes/help/single.php:34
485
- msgid ""
486
- "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project "
487
- "Website</a>"
488
- msgstr ""
489
- "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Site du "
490
- "Projet</a>"
491
-
492
- #: includes/help/manage.php:15
493
- msgid ""
494
- "If something goes wrong with a snippet and you can't use WordPress, you can "
495
- "cause all snippets to stop executing by adding <code>define"
496
- "('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> "
497
- "file. After you have deactivated the offending snippet, you can turn off "
498
- "safe mode by removing this line or replacing <strong>true</strong> with "
499
- "<strong>false</strong>."
500
- msgstr ""
501
- "Si un problème survient suite à l'activation d'un Snippet et que votre "
502
- "installation WordPress ne fonctionne plus, vous pouvez stopper l'activation "
503
- "de tous les Snippets en ajoutant <code>define('CODE_SNIPPETS_SAFE_MODE', "
504
- "true);</code> dans votre fichier <code>wp-config.php</code>. Vous pourrez "
505
- "alors désactiver le Snippet qui pose problème, puis désactiver le mode "
506
- "sécurité en retirant la ligne <code>define('CODE_SNIPPETS_SAFE_MODE', true);"
507
- "</code> dans votre fichier <code>wp-config.php</code> ou alors changer "
508
- "<strong>true</strong> par <strong>false</strong>."
509
-
510
- #: includes/help/single.php:20
511
- msgid ""
512
- "More places to find snippets, as well as a selection of example snippets, "
513
- "can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/"
514
- "finding-snippets/\">plugin documentation</a>"
515
- msgstr ""
516
- "Vous trouverez une collection de Snippets, ou des exemples sur la page de <a "
517
- "href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/"
518
- "\">documentation</a> du plugin. "
519
-
520
- #: code-snippets.php:0
521
- msgid "1.7"
522
- msgstr "1.7"
523
-
524
- #: code-snippets.php:602 includes/class-list-table.php:142
525
- msgid "Edit"
526
- msgstr "Editer"
527
-
528
- #: code-snippets.php:1227
529
- msgid "Sorry, you're not allowed to edit snippets"
530
- msgstr "Désolé, vous n'êtes pas autorisé à éditer les Snippets "
531
-
532
- #: includes/admin/single.php:24
533
- msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
534
- msgstr "Snippet <strong>mis à jour</strong> et <strong>activé</strong>."
535
-
536
- #: includes/admin/single.php:26
537
- msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
538
- msgstr "Snippet <strong>ajouté</strong> et <strong>activaté</strong>."
539
-
540
- #: includes/class-list-table.php:163
541
- msgid ""
542
- "You are about to permanently delete the selected item.\n"
543
- "\t\t\t\t'Cancel' to stop, 'OK' to delete."
544
- msgstr ""
545
- "Vous allez supprimer définitivement la sélection.\n"
546
- "\t\t\t\t'Cancel' pour annuler, 'OK' confirmer et supprimer."
547
-
548
- #: includes/class-list-table.php:270
549
- msgid "Filter"
550
- msgstr "Filtre "
551
-
552
- #: includes/class-list-table.php:541
553
- msgid "Search results"
554
- msgstr "Résultats de la recherche "
555
-
556
- #: includes/class-list-table.php:544
557
- msgid " for &#8220;%s&#8221;"
558
- msgstr " pour &#8220;%s&#8221;"
559
-
560
- #: includes/class-list-table.php:550
561
- msgid "Clear Filters"
562
- msgstr "Annuler les filtres "
563
-
564
- #: includes/help/import.php:14
565
- msgid ""
566
- "You can load your snippets from a code snippets (.xml) export file using "
567
- "this page."
568
- msgstr ""
569
- "Vous pouvez charger vos Snippets depuis un fichier Code Snippets (.xml) "
570
- "depuis cette page."
571
-
572
- #: includes/admin/single.php:74
573
- msgid "Save Changes &amp; Activate"
574
- msgstr "Enregistrer &amp; Activer"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is distributed under the same license as the Code Snippets package.
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Code Snippets\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2015-03-05 23:28+1100\n"
7
+ "PO-Revision-Date: 2015-03-08 13:34+1000\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: oWEB <oweb@office-web.net>\n"
10
+ "Language: fr\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
15
+ "X-Generator: Poedit 1.7.4\n"
16
+
17
+ #: includes/admin.php:81 includes/manage/admin.php:21
18
+ #: includes/manage/manage.php:22 includes/manage/manage.php:23
19
+ #: includes/manage/manage.php:33
20
+ msgid "Snippets"
21
+ msgstr "Snippets"
22
+
23
+ #: includes/admin.php:120
24
+ msgid "Manage your existing snippets"
25
+ msgstr "Gérer les snippets existants"
26
+
27
+ #: includes/admin.php:121 includes/manage/manage.php:34
28
+ msgid "Manage"
29
+ msgstr "Gérer"
30
+
31
+ #: includes/admin.php:150
32
+ msgid "Visit the WordPress.org plugin page"
33
+ msgstr "Page du plugin sur WordPress.org"
34
+
35
+ #: includes/admin.php:151
36
+ msgid "About"
37
+ msgstr "A propos"
38
+
39
+ #: includes/admin.php:155
40
+ msgid "Visit the support forums"
41
+ msgstr "Forums de support"
42
+
43
+ #: includes/admin.php:156
44
+ msgid "Support"
45
+ msgstr "Support"
46
+
47
+ #: includes/admin.php:160
48
+ msgid "Support this plugin's development"
49
+ msgstr "Aider au développement du plugin"
50
+
51
+ #: includes/admin.php:161
52
+ msgid "Donate"
53
+ msgstr "Faire un don"
54
+
55
+ #: includes/admin.php:194
56
+ msgid ""
57
+ "<strong>Have feedback on Code Snippets?</strong> Please take the time to "
58
+ "answer a short survey on how you use this plugin and what you'd like to see "
59
+ "changed or added in the future."
60
+ msgstr ""
61
+
62
+ #: includes/admin.php:197
63
+ msgid "Take the survey now"
64
+ msgstr ""
65
+
66
+ #: includes/class-export.php:104
67
+ msgid ""
68
+ "This is a code snippets export file generated by the Code Snippets WordPress "
69
+ "plugin."
70
+ msgstr ""
71
+
72
+ #: includes/class-export.php:105
73
+ msgid "http://wordpress.org/plugins/code-snippets"
74
+ msgstr ""
75
+
76
+ #: includes/class-export.php:106
77
+ msgid "To import these snippets a WordPress site follow these steps:"
78
+ msgstr ""
79
+
80
+ #: includes/class-export.php:107
81
+ msgid "1. Log in to that site as an administrator."
82
+ msgstr ""
83
+
84
+ #: includes/class-export.php:108
85
+ msgid ""
86
+ "2. Install the Code Snippets plugin using the directions provided at the "
87
+ "above link."
88
+ msgstr ""
89
+
90
+ #: includes/class-export.php:109
91
+ msgid "3. Go to 'Tools: Import' in the WordPress admin panel."
92
+ msgstr ""
93
+
94
+ #: includes/class-export.php:110
95
+ msgid "4. Click on the \"Code Snippets\" importer in the list"
96
+ msgstr ""
97
+
98
+ #: includes/class-export.php:111
99
+ msgid "5. Upload this file using the form provided on that page."
100
+ msgstr ""
101
+
102
+ #: includes/class-export.php:112
103
+ msgid ""
104
+ "6. Code Snippets will then import all of the snippets and associated "
105
+ "information contained in this file into your site."
106
+ msgstr ""
107
+
108
+ #: includes/class-export.php:113
109
+ msgid ""
110
+ "7. You will then have to visit the 'Snippets: Manage' admin menu and "
111
+ "activate desired snippets."
112
+ msgstr ""
113
+
114
+ #: includes/edit/admin-help.php:15 includes/import/admin-help.php:16
115
+ #: includes/manage/admin-help.php:15
116
+ msgid "Overview"
117
+ msgstr "Présentation "
118
+
119
+ #: includes/edit/admin-help.php:17
120
+ msgid ""
121
+ "Snippets are similar to plugins - they both extend and expand the "
122
+ "functionality of WordPress. Snippets are more light-weight, just a few lines "
123
+ "of code, and do not put as much load on your server. Here you can add a new "
124
+ "snippet, or edit an existing one."
125
+ msgstr ""
126
+ "Les Snippets sont similaires aux plugins. Ils permettent aussi d'étendre les "
127
+ "fonctionnalités de WordPress. Les Snippets sont plus légers, juste quelques "
128
+ "lignes de code : cela permet à votre site de se charger plus rapidement. "
129
+ "Ici, vous pouvez en ajouter ou en éditer."
130
+
131
+ #: includes/edit/admin-help.php:22
132
+ msgid "Finding Snippets"
133
+ msgstr "Trouver des Snippets"
134
+
135
+ #: includes/edit/admin-help.php:24
136
+ msgid ""
137
+ "Here are some links to websites which host a large number of snippets that "
138
+ "you can add to your site.\n"
139
+ "\t\t<ul>\n"
140
+ "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
141
+ "Snippets</a></li>\n"
142
+ "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></"
143
+ "li>\n"
144
+ "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats "
145
+ "Who Code Snippet Library\">Cats Who Code</a></li>\n"
146
+ "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
147
+ "\t\t</ul>"
148
+ msgstr ""
149
+ "Voici quelques liens vers des sites qui proposent une large panoplie de "
150
+ "Snippets que vous pouvez ajouter à votre installation.\n"
151
+ "\t\t<ul>\n"
152
+ "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
153
+ "Snippets</a></li>\n"
154
+ "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></"
155
+ "li>\n"
156
+ "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats "
157
+ "Who Code Snippet Library\">Cats Who Code</a></li>\n"
158
+ "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
159
+ "\t\t</ul>"
160
+
161
+ #: includes/edit/admin-help.php:31
162
+ msgid ""
163
+ "More places to find snippets, as well as a selection of example snippets, "
164
+ "can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/"
165
+ "finding-snippets/\">plugin documentation</a>"
166
+ msgstr ""
167
+ "Vous trouverez une collection de Snippets, ou des exemples sur la page de <a "
168
+ "href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/"
169
+ "\">documentation</a> du plugin. "
170
+
171
+ #: includes/edit/admin-help.php:36
172
+ msgid "Adding Snippets"
173
+ msgstr "Ajout de Snippets"
174
+
175
+ #: includes/edit/admin-help.php:38
176
+ msgid ""
177
+ "You need to fill out the name and code fields for your snippet to be added. "
178
+ "While the description field will add more information about how your snippet "
179
+ "works, what is does and where you found it, it is completely optional."
180
+ msgstr ""
181
+ "Vous devez remplir les champs Nom et Code pour ajouter un Snippet. Le champ "
182
+ "description permet d'ajouter des informations sur la fonction ajoutée : "
183
+ "utilité, où vous l'avez trouvé. C'est une option de confort."
184
+
185
+ #: includes/edit/admin-help.php:39
186
+ msgid ""
187
+ "Please be sure to check that your snippet is valid PHP code and will not "
188
+ "produce errors before adding it through this page. While doing so will not "
189
+ "become active straight away, it will help to minimise the chance of a faulty "
190
+ "snippet becoming active on your site."
191
+ msgstr ""
192
+ "Veuillez vérifier le code PHP de votre Snippet. En vérifiant le code avant "
193
+ "d'activer le Snippet, vous vous assurerez que vous ne mettrez en danger "
194
+ "votre installation."
195
+
196
+ #: includes/edit/admin-help.php:43 includes/import/admin-help.php:37
197
+ #: includes/manage/admin-help.php:37
198
+ msgid "For more information:"
199
+ msgstr "Pour plus d'informations : "
200
+
201
+ #: includes/edit/admin-help.php:44 includes/import/admin-help.php:38
202
+ msgid ""
203
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
204
+ "\">WordPress Extend</a>"
205
+ msgstr ""
206
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
207
+ "\">WordPress Extend</a>"
208
+
209
+ #: includes/edit/admin-help.php:45 includes/import/admin-help.php:39
210
+ #: includes/manage/admin-help.php:39
211
+ msgid ""
212
+ "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
213
+ "\">Support Forums</a>"
214
+ msgstr ""
215
+ "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
216
+ "\">Support Forums</a>"
217
+
218
+ #: includes/edit/admin-help.php:46 includes/import/admin-help.php:40
219
+ #: includes/manage/admin-help.php:40
220
+ msgid ""
221
+ "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project "
222
+ "Website</a>"
223
+ msgstr ""
224
+ "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Site du "
225
+ "Projet</a>"
226
+
227
+ #: includes/edit/admin-messages.php:14
228
+ msgid "An error occurred when saving the snippet."
229
+ msgstr ""
230
+
231
+ #: includes/edit/admin-messages.php:18
232
+ msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
233
+ msgstr "Snippet <strong>mis à jour</strong> et <strong>activé</strong>."
234
+
235
+ #: includes/edit/admin-messages.php:22
236
+ msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
237
+ msgstr "Snippet <strong>ajouté</strong> et <strong>activaté</strong>."
238
+
239
+ #: includes/edit/admin-messages.php:26
240
+ msgid "Snippet <strong>updated</strong> and <strong>deactivated</strong>."
241
+ msgstr "Snippet <strong>mis à jour</strong> et <strong>désactivaté</strong>."
242
+
243
+ #: includes/edit/admin-messages.php:30
244
+ msgid "Snippet <strong>updated</strong>."
245
+ msgstr "Snippet <strong>mis à jour</strong>."
246
+
247
+ #: includes/edit/admin-messages.php:34
248
+ msgid "Snippet <strong>added</strong>."
249
+ msgstr "Snippet <strong>ajouté</strong>."
250
+
251
+ #: includes/edit/admin.php:26 includes/edit/edit.php:46
252
+ #: includes/edit/edit.php:47
253
+ msgid "Edit Snippet"
254
+ msgstr "Editer"
255
+
256
+ #: includes/edit/admin.php:31 includes/edit/edit.php:35
257
+ #: includes/manage/admin.php:26
258
+ msgid "Add New"
259
+ msgstr "Nouveau"
260
+
261
+ #: includes/edit/admin.php:35 includes/edit/edit.php:34
262
+ msgid "Add New Snippet"
263
+ msgstr "Ajouter Snippet"
264
+
265
+ #: includes/edit/admin.php:52 includes/edit/admin.php:53
266
+ msgid "Name (short title)"
267
+ msgstr "Nom (titre court) "
268
+
269
+ #: includes/edit/admin.php:58
270
+ msgid "Code"
271
+ msgstr "Code"
272
+
273
+ #: includes/edit/admin.php:79 includes/edit/admin.php:93
274
+ msgid "Save Changes and Activate"
275
+ msgstr ""
276
+
277
+ #: includes/edit/admin.php:99
278
+ msgid "Save Changes and Deactivate"
279
+ msgstr ""
280
+
281
+ #: includes/edit/admin.php:109 includes/manage/class-list-table.php:139
282
+ #: includes/manage/class-list-table.php:264
283
+ msgid "Export"
284
+ msgstr "Exporter"
285
+
286
+ #: includes/edit/admin.php:116
287
+ msgid ""
288
+ "You are about to permanently delete this snippet.\n"
289
+ "'Cancel' to stop, 'OK' to delete."
290
+ msgstr ""
291
+
292
+ #: includes/edit/admin.php:121 includes/manage/class-list-table.php:148
293
+ #: includes/manage/class-list-table.php:265
294
+ msgid "Delete"
295
+ msgstr "Supprimer"
296
+
297
+ #: includes/edit/edit.php:83 includes/manage/manage.php:67
298
+ msgid "You are not authorized to access this page."
299
+ msgstr ""
300
+
301
+ #: includes/edit/edit.php:176 includes/manage/class-list-table.php:224
302
+ msgid "Description"
303
+ msgstr "Description"
304
+
305
+ #: includes/edit/edit.php:205 includes/manage/class-list-table.php:225
306
+ msgid "Tags"
307
+ msgstr ""
308
+
309
+ #: includes/import/admin-help.php:18
310
+ msgid ""
311
+ "Snippets are similar to plugins - they both extend and expand the "
312
+ "functionality of WordPress. Snippets are more light-weight, just a few lines "
313
+ "of code, and do not put as much load on your server. Here you can load "
314
+ "snippets from a Code Snippets (.xml) import file into the database with your "
315
+ "existing snippets."
316
+ msgstr ""
317
+ "Les Snippets sont similaires aux plugins. Ils permettent aussi d'étendre les "
318
+ "fonctionnalités de WordPress. Les Snippets sont plus légers, juste quelques "
319
+ "lignes de code : cela permet à votre site de se charger plus rapidement. "
320
+ "Vous pouvez en charger plusieurs en important un fichier de Snippets (.xml)."
321
+
322
+ #: includes/import/admin-help.php:23
323
+ msgid "Importing"
324
+ msgstr "Importation"
325
+
326
+ #: includes/import/admin-help.php:25
327
+ msgid ""
328
+ "You can load your snippets from a code snippets (.xml) export file using "
329
+ "this page."
330
+ msgstr ""
331
+ "Vous pouvez charger vos Snippets depuis un fichier Code Snippets (.xml) "
332
+ "depuis cette page."
333
+
334
+ #: includes/import/admin-help.php:26
335
+ #, php-format
336
+ msgid ""
337
+ "Snippets will be added to the database along with your existing snippets. "
338
+ "Regardless of whether the snippets were active on the previous site, "
339
+ "imported snippets are always inactive until activated using the <a href=\"%s"
340
+ "\">Manage Snippets</a> page.</p>"
341
+ msgstr ""
342
+ "Les Snippets seront ajoutés à votre base de données, en plus de ceux déjà "
343
+ "existants. Tous les Snippets importés seront inactifs, même si lors de "
344
+ "l'export précédent ils étaient actifs. Il vous restera à les <a href=\"%s"
345
+ "\">activer</a> ensuite.</p>"
346
+
347
+ #: includes/import/admin-help.php:31
348
+ msgid "Exporting"
349
+ msgstr "Exportation"
350
+
351
+ #: includes/import/admin-help.php:33
352
+ #, php-format
353
+ msgid ""
354
+ "You can save your snippets to a Code Snippets (.xml) export file using the "
355
+ "<a href=\"%s\">Manage Snippets</a> page."
356
+ msgstr ""
357
+ "Vous pouvez sauvegarder vos Snippets dans un fichier de Codes (.xml) en les "
358
+ "<a href=\"%s\">exportant</a> ."
359
+
360
+ #: includes/import/admin-messages.php:16
361
+ #, php-format
362
+ msgid ""
363
+ "Successfully imported <strong>%d</strong> snippet. <a href=\"%s\">Have fun!</"
364
+ "a>"
365
+ msgstr ""
366
+
367
+ #: includes/import/admin-messages.php:30
368
+ msgid "An error occurred when processing the import file."
369
+ msgstr ""
370
+
371
+ #: includes/import/admin.php:18 includes/import/import.php:55
372
+ msgid "Import Snippets"
373
+ msgstr "Import de Snippets"
374
+
375
+ #: includes/import/admin.php:22
376
+ msgid ""
377
+ "Howdy! Upload your Code Snippets export file and we&#8217;ll import the "
378
+ "snippets to this site."
379
+ msgstr ""
380
+ "Hey ! Chargez votre fichier contenant les portions de code et nous "
381
+ "importerons les Snippets dans ce site."
382
+
383
+ #: includes/import/admin.php:24
384
+ #, php-format
385
+ msgid ""
386
+ "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to "
387
+ "activate the imported snippets."
388
+ msgstr ""
389
+ "Vous devez vous rendre à la page <a href=\"%s\">Gérer les Snippets</a> pour "
390
+ "activer l'import de snippets."
391
+
392
+ #: includes/import/admin.php:26
393
+ msgid ""
394
+ "Choose a Code Snippets (.xml) file to upload, then click Upload file and "
395
+ "import."
396
+ msgstr ""
397
+ "Choisissez un fichier Code Snippets (.xml) à transférer, puis cliquez "
398
+ "Transférer et Importer."
399
+
400
+ #: includes/import/admin.php:33
401
+ msgid "Choose a file from your computer:"
402
+ msgstr "Fichier sur votre ordinateur : "
403
+
404
+ #: includes/import/admin.php:34
405
+ msgid "(Maximum size: 8MB)"
406
+ msgstr "(Taille maxi : 8MB)"
407
+
408
+ #: includes/import/admin.php:40
409
+ msgid "Upload file and import"
410
+ msgstr "Transférer et Importer"
411
+
412
+ #: includes/import/import.php:34
413
+ msgid "Code Snippets"
414
+ msgstr "Code Snippets"
415
+
416
+ #: includes/import/import.php:35
417
+ msgid "Import snippets from a code snippets export file"
418
+ msgstr ""
419
+
420
+ #: includes/import/import.php:56
421
+ msgid "Import"
422
+ msgstr "Importer"
423
+
424
+ #: includes/import/import.php:92
425
+ msgid "You are not access this page."
426
+ msgstr ""
427
+
428
+ #: includes/manage/admin-help.php:17
429
+ msgid ""
430
+ "Snippets are similar to plugins - they both extend and expand the "
431
+ "functionality of WordPress. Snippets are more light-weight, just a few lines "
432
+ "of code, and do not put as much load on your server. Here you can manage "
433
+ "your existing snippets and preform tasks on them such as activating, "
434
+ "deactivating, deleting and exporting."
435
+ msgstr ""
436
+ "Les Snippets sont similaires au Plugins. Les deux permettent d'étendre les "
437
+ "fonctionnalités de WordPress. Les Snippets sont plus légers et permettent, "
438
+ "avec quelques lignes de code, de rendre votre site plus rapide. Ici vous "
439
+ "avez la possibilité de gérer vos portions de code, automatiser des tâches, "
440
+ "en activant, désactivant, supprimant et exportant. "
441
+
442
+ #: includes/manage/admin-help.php:22
443
+ msgid "Safe Mode"
444
+ msgstr "Mode sécurité "
445
+
446
+ #: includes/manage/admin-help.php:24
447
+ msgid ""
448
+ "Be sure to check your snippets for errors before you activate them, as a "
449
+ "faulty snippet could bring your whole blog down. If your site starts doing "
450
+ "strange things, deactivate all your snippets and activate them one at a time."
451
+ msgstr ""
452
+ "Veuillez bien vérifier vos Snippets avant de les activer. Si la syntaxe "
453
+ "n'est pas correcte, il est possible de rendre votre site inaccessible. Si "
454
+ "vous découvrez des comportements bizarres sur votre site, désactivez tous "
455
+ "vos Snippets, puis activez-les un par un."
456
+
457
+ #: includes/manage/admin-help.php:25
458
+ msgid ""
459
+ "If something goes wrong with a snippet and you can't use WordPress, you can "
460
+ "cause all snippets to stop executing by adding "
461
+ "<code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-"
462
+ "config.php</code> file. After you have deactivated the offending snippet, "
463
+ "you can turn off safe mode by removing this line or replacing <strong>true</"
464
+ "strong> with <strong>false</strong>."
465
+ msgstr ""
466
+ "Si un problème survient suite à l'activation d'un Snippet et que votre "
467
+ "installation WordPress ne fonctionne plus, vous pouvez stopper l'activation "
468
+ "de tous les Snippets en ajoutant <code>define('CODE_SNIPPETS_SAFE_MODE', "
469
+ "true);</code> dans votre fichier <code>wp-config.php</code>. Vous pourrez "
470
+ "alors désactiver le Snippet qui pose problème, puis désactiver le mode "
471
+ "sécurité en retirant la ligne <code>define('CODE_SNIPPETS_SAFE_MODE', true);"
472
+ "</code> dans votre fichier <code>wp-config.php</code> ou alors changer "
473
+ "<strong>true</strong> par <strong>false</strong>."
474
+
475
+ #: includes/manage/admin-help.php:30
476
+ msgid "Uninstall"
477
+ msgstr "Désinstaller"
478
+
479
+ #: includes/manage/admin-help.php:32
480
+ #, php-format
481
+ msgid ""
482
+ "When you delete Code Snippets through the Plugins menu in WordPress it will "
483
+ "clear up the <code>%1$s</code> table and a few other bits of data stored in "
484
+ "the database. If you want to keep this data (ie: you are only temporally "
485
+ "uninstalling Code Snippets) then remove the <code>%2$s</code> folder using "
486
+ "FTP."
487
+ msgstr ""
488
+ "Si vous désinstallez Code Snippets depuis le menu Plugins de votre "
489
+ "installation WordPress, la table <code>%1$s</code> contenant les portions de "
490
+ "code sera supprimée de la base de données. Si vous voulez conserver les "
491
+ "données (par exemple : désinstaller temporairement Code Snippets) supprimez "
492
+ "le dossier <code>%2$s</code> via votre client FTP."
493
+
494
+ #: includes/manage/admin-help.php:33
495
+ msgid ""
496
+ "Even if you're sure that you don't want to use Code Snippets ever again on "
497
+ "this WordPress installation, you may want to use the export feature to back "
498
+ "up your snippets."
499
+ msgstr ""
500
+ "Même si vous êtes certain(e) de ne plus vouloir utiliser Code Snippets avec "
501
+ "cette installation de WordPress, vous pouvez exporter vos Snippets."
502
+
503
+ #: includes/manage/admin-help.php:38
504
+ msgid ""
505
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
506
+ "\">WordPress Extend</a></p>"
507
+ msgstr ""
508
+ "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank"
509
+ "\">WordPress Extend</a></p>"
510
+
511
+ #: includes/manage/admin-messages.php:14
512
+ msgid ""
513
+ "<strong>Warning:</strong> Safe mode is active and snippets will not execute! "
514
+ "Remove the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-"
515
+ "config.php</code> to turn off safe mode. <a href=\"http://code-snippets."
516
+ "bungeshea.com/docs/safe-mode/\" target=\"_blank\">Help</a>"
517
+ msgstr ""
518
+
519
+ #: includes/manage/admin-messages.php:20
520
+ msgid "Snippet <strong>activated</strong>."
521
+ msgstr "Snippet <strong>activaté</strong>."
522
+
523
+ #: includes/manage/admin-messages.php:24
524
+ msgid "Selected snippets <strong>activated</strong>."
525
+ msgstr "Snippets sélectionnés <strong>activés</strong>. "
526
+
527
+ #: includes/manage/admin-messages.php:28
528
+ msgid "Snippet <strong>deactivated</strong>."
529
+ msgstr "Snippet <strong>désactivaté</strong>."
530
+
531
+ #: includes/manage/admin-messages.php:32
532
+ msgid "Selected snippets <strong>deactivated</strong>."
533
+ msgstr "Snippets sélectionnés <strong>désactivés</strong>. "
534
+
535
+ #: includes/manage/admin-messages.php:36
536
+ msgid "Snippet <strong>deleted</strong>."
537
+ msgstr "Snippet <strong>supprimé</strong>."
538
+
539
+ #: includes/manage/admin-messages.php:40
540
+ msgid "Selected snippets <strong>deleted</strong>."
541
+ msgstr "Snippets sélectionnés <strong>supprimés</strong>. "
542
+
543
+ #: includes/manage/admin.php:39
544
+ msgid "Search Installed Snippets"
545
+ msgstr "Chercher dans les Snippets installés"
546
+
547
+ #: includes/manage/class-list-table.php:51
548
+ msgid "Snippets per page"
549
+ msgstr "Snippets par page "
550
+
551
+ #: includes/manage/class-list-table.php:114
552
+ #: includes/manage/class-list-table.php:263
553
+ msgid "Network Deactivate"
554
+ msgstr "Désactiver réseau "
555
+
556
+ #: includes/manage/class-list-table.php:114
557
+ #: includes/manage/class-list-table.php:263
558
+ msgid "Deactivate"
559
+ msgstr "Désactiver "
560
+
561
+ #: includes/manage/class-list-table.php:123
562
+ #: includes/manage/class-list-table.php:262
563
+ msgid "Network Activate"
564
+ msgstr "Activer réseau "
565
+
566
+ #: includes/manage/class-list-table.php:123
567
+ #: includes/manage/class-list-table.php:262
568
+ msgid "Activate"
569
+ msgstr "Activer"
570
+
571
+ #: includes/manage/class-list-table.php:133
572
+ msgid "Edit"
573
+ msgstr "Editer"
574
+
575
+ #: includes/manage/class-list-table.php:155
576
+ msgid ""
577
+ "You are about to permanently delete the selected item.\n"
578
+ "\t\t\t\t'Cancel' to stop, 'OK' to delete."
579
+ msgstr ""
580
+ "Vous allez supprimer définitivement la sélection.\n"
581
+ "\t\t\t\t'Cancel' pour annuler, 'OK' confirmer et supprimer."
582
+
583
+ #: includes/manage/class-list-table.php:163
584
+ #, php-format
585
+ msgid "Untitled #%d"
586
+ msgstr ""
587
+
588
+ #: includes/manage/class-list-table.php:222
589
+ msgid "Name"
590
+ msgstr "Nom"
591
+
592
+ #: includes/manage/class-list-table.php:223
593
+ msgid "ID"
594
+ msgstr "ID"
595
+
596
+ #: includes/manage/class-list-table.php:266
597
+ msgid "Export to PHP"
598
+ msgstr "Export en PHP"
599
+
600
+ #: includes/manage/class-list-table.php:303
601
+ #, fuzzy, php-format
602
+ msgid "All <span class=\"count\">(%s)</span>"
603
+ msgstr "Tout <span class=\"count\">(%s)</span>"
604
+
605
+ #: includes/manage/class-list-table.php:306
606
+ #, fuzzy, php-format
607
+ msgid "Active <span class=\"count\">(%s)</span>"
608
+ msgstr "Activer <span class=\"count\">(%s)</span>"
609
+
610
+ #: includes/manage/class-list-table.php:309
611
+ #, fuzzy, php-format
612
+ msgid "Recently Active <span class=\"count\">(%s)</span>"
613
+ msgstr "Récemment activé <span class=\"count\">(%s)</span>"
614
+
615
+ #: includes/manage/class-list-table.php:312
616
+ #, fuzzy, php-format
617
+ msgid "Inactive <span class=\"count\">(%s)</span>"
618
+ msgstr "Inactif <span class=\"count\">(%s)</span>"
619
+
620
+ #: includes/manage/class-list-table.php:372
621
+ msgid "Show all tags"
622
+ msgstr ""
623
+
624
+ #: includes/manage/class-list-table.php:386
625
+ msgid "Filter"
626
+ msgstr "Filtre "
627
+
628
+ #: includes/manage/class-list-table.php:394
629
+ msgid "Clear List"
630
+ msgstr "Vider la liste"
631
+
632
+ #: includes/manage/class-list-table.php:542
633
+ #, php-format
634
+ msgid ""
635
+ "You do not appear to have any snippets available at this time. <a href=\"%s"
636
+ "\">Add New&rarr;</a>"
637
+ msgstr "Aucun Snippet pour l'instant. <a href=\"%s\">En ajouter un&rarr;</a>"
638
+
639
+ #: includes/manage/class-list-table.php:766
640
+ msgid "Search results"
641
+ msgstr "Résultats de la recherche "
642
+
643
+ #: includes/manage/class-list-table.php:769
644
+ #, php-format
645
+ msgid " for &#8220;%s&#8221;"
646
+ msgstr " pour &#8220;%s&#8221;"
647
+
648
+ #: includes/manage/class-list-table.php:773
649
+ #, php-format
650
+ msgid " in tag &#8220;%s&#8221;"
651
+ msgstr ""
652
+
653
+ #: includes/manage/class-list-table.php:779
654
+ msgid "Clear Filters"
655
+ msgstr "Annuler les filtres "
656
+
657
+ #: includes/settings/admin.php:20
658
+ msgid "Snippets Settings"
659
+ msgstr ""
660
+
661
+ #: includes/settings/admin.php:21 includes/settings/admin.php:40
662
+ msgid "Settings"
663
+ msgstr ""
664
+
665
+ #: includes/settings/settings.php:51
666
+ msgid "General"
667
+ msgstr ""
668
+
669
+ #: includes/settings/settings.php:52
670
+ msgid "Editor"
671
+ msgstr ""
672
+
673
+ #: includes/settings/settings.php:68
674
+ msgid "Activate by Default"
675
+ msgstr ""
676
+
677
+ #: includes/settings/settings.php:70
678
+ msgid ""
679
+ "Make the 'Save and Activate' button the default action when saving a snippet."
680
+ msgstr ""
681
+
682
+ #: includes/settings/settings.php:80
683
+ msgid "Theme"
684
+ msgstr ""
685
+
686
+ #: includes/settings/settings.php:88
687
+ msgid "Indent With Tabs"
688
+ msgstr ""
689
+
690
+ #: includes/settings/settings.php:90
691
+ msgid "Use hard tabs (not spaces) for indentation."
692
+ msgstr ""
693
+
694
+ #: includes/settings/settings.php:97
695
+ msgid "Tab Size"
696
+ msgstr ""
697
+
698
+ #: includes/settings/settings.php:99
699
+ msgid "The width of a tab character."
700
+ msgstr ""
701
+
702
+ #: includes/settings/settings.php:106
703
+ msgid "Indent Unit"
704
+ msgstr ""
705
+
706
+ #: includes/settings/settings.php:108
707
+ msgid "How many spaces a block should be indented."
708
+ msgstr ""
709
+
710
+ #: includes/settings/settings.php:115
711
+ msgid "Wrap Lines"
712
+ msgstr ""
713
+
714
+ #: includes/settings/settings.php:117
715
+ msgid "Whether the editor should scroll or wrap for long lines."
716
+ msgstr ""
717
+
718
+ #: includes/settings/settings.php:124
719
+ msgid "Line Numbers"
720
+ msgstr ""
721
+
722
+ #: includes/settings/settings.php:126
723
+ msgid "Show line numbers to the left of the editor."
724
+ msgstr ""
725
+
726
+ #: includes/settings/settings.php:133
727
+ msgid "Auto Close Brackets"
728
+ msgstr ""
729
+
730
+ #: includes/settings/settings.php:135
731
+ msgid "Auto-close brackets and quotes when typed."
732
+ msgstr ""
733
+
734
+ #: includes/settings/settings.php:142
735
+ msgid "Highlight Selection Matches"
736
+ msgstr ""
737
+
738
+ #: includes/settings/settings.php:143
739
+ msgid "Highlight all instances of a currently selected word."
740
+ msgstr ""
741
+
742
+ #: includes/settings/settings.php:190
743
+ msgid "Editor Preview"
744
+ msgstr ""
745
+
746
+ #: includes/settings/settings.php:238
747
+ msgid "Settings saved."
748
+ msgstr ""
749
+
750
+ #~ msgid ""
751
+ #~ "An easy, clean and simple way to add code snippets to your site. No need "
752
+ #~ "to edit to your theme's functions.php file again!"
753
+ #~ msgstr ""
754
+ #~ "Une manière simple d'ajouter des snippets, portions de code, dans votre "
755
+ #~ "site. Plus besoin d'éditer le fichier functions.php de votre thème !"
756
+
757
+ #~ msgid "Shea Bunge"
758
+ #~ msgstr "Shea Bunge"
759
+
760
+ #~ msgid "http://bungeshea.com"
761
+ #~ msgstr "http://bungeshea.com"
762
+
763
+ #~ msgctxt "snippet"
764
+ #~ msgid "Add New"
765
+ #~ msgstr "Ajouter "
766
+
767
+ #~ msgid "Please provide a name for the snippet and its code."
768
+ #~ msgstr "Veuillez indiauer un nom ainsi que le code pour ce Snippet. "
769
+
770
+ #~ msgid "(Optional)"
771
+ #~ msgstr "(Option)"
772
+
773
+ #~ msgid "http://code-snippets.bungeshea.com"
774
+ #~ msgstr "http://code-snippets.bungeshea.com"
775
+
776
+ #~ msgid "Import snippets from a <strong>Code Snippets</strong> export file"
777
+ #~ msgstr ""
778
+ #~ "Importer des Snippets depuis un fichier <strong>Code Snippets</strong> "
779
+ #~ "exporté préalablement. "
780
+
781
+ #~ msgid "Imported <strong>%d</strong> snippet."
782
+ #~ msgid_plural "Imported <strong>%d</strong> snippets."
783
+ #~ msgstr[0] "Snippet <strong>%d</strong> importé."
784
+ #~ msgstr[1] "Snippets <strong>%d</strong> importés."
785
+
786
+ #~ msgid "1.7"
787
+ #~ msgstr "1.7"
788
+
789
+ #~ msgid "Sorry, you're not allowed to edit snippets"
790
+ #~ msgstr "Désolé, vous n'êtes pas autorisé à éditer les Snippets "
791
+
792
+ #~ msgid "Save Changes &amp; Activate"
793
+ #~ msgstr "Enregistrer &amp; Activer"
languages/code-snippets.po CHANGED
@@ -1,419 +1,419 @@
1
- # This file is distributed under the same license as the Code Snippets package.
2
- msgid ""
3
- msgstr ""
4
- "PO-Revision-Date: 2013-03-27 15:45:42+0000\n"
5
- "MIME-Version: 1.0\n"
6
- "Content-Type: text/plain; charset=UTF-8\n"
7
- "Content-Transfer-Encoding: 8bit\n"
8
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
9
- "X-Generator: GlotPress/0.1\n"
10
- "Project-Id-Version: Code Snippets\n"
11
-
12
- #: code-snippets.php:0 code-snippets.php:262
13
- msgid "Code Snippets"
14
- msgstr ""
15
-
16
- #: code-snippets.php:0
17
- msgid "An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!"
18
- msgstr ""
19
-
20
- #: code-snippets.php:0
21
- msgid "Shea Bunge"
22
- msgstr ""
23
-
24
- #: code-snippets.php:0
25
- msgid "http://bungeshea.com"
26
- msgstr ""
27
-
28
- #: code-snippets.php:577 code-snippets.php:578 code-snippets.php:588
29
- #: includes/admin/manage.php:36
30
- msgid "Snippets"
31
- msgstr ""
32
-
33
- #: code-snippets.php:612 code-snippets.php:1145 includes/admin/single.php:45
34
- msgid "Add New Snippet"
35
- msgstr ""
36
-
37
- #: code-snippets.php:613
38
- msgid "Add New"
39
- msgstr ""
40
-
41
- #: code-snippets.php:641 includes/admin/import.php:34
42
- msgid "Import Snippets"
43
- msgstr ""
44
-
45
- #: code-snippets.php:642
46
- msgid "Import"
47
- msgstr ""
48
-
49
- #: code-snippets.php:601 code-snippets.php:1146 includes/admin/single.php:37
50
- msgid "Edit Snippet"
51
- msgstr ""
52
-
53
- #: code-snippets.php:1465
54
- msgid "Manage your existing snippets"
55
- msgstr ""
56
-
57
- #: code-snippets.php:589 code-snippets.php:1466
58
- msgid "Manage"
59
- msgstr ""
60
-
61
- #: code-snippets.php:1486
62
- msgid "Visit the WordPress.org plugin page"
63
- msgstr ""
64
-
65
- #: code-snippets.php:1487
66
- msgid "About"
67
- msgstr ""
68
-
69
- #: code-snippets.php:1491
70
- msgid "Visit the support forums"
71
- msgstr ""
72
-
73
- #: code-snippets.php:1492
74
- msgid "Support"
75
- msgstr ""
76
-
77
- #: code-snippets.php:1496
78
- msgid "Support this plugin's development"
79
- msgstr ""
80
-
81
- #: code-snippets.php:1497
82
- msgid "Donate"
83
- msgstr ""
84
-
85
- #: includes/admin/import.php:38
86
- msgid "Howdy! Upload your Code Snippets export file and we&#8217;ll import the snippets to this site."
87
- msgstr ""
88
-
89
- #: includes/admin/import.php:40
90
- msgid "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to activate the imported snippets."
91
- msgstr ""
92
-
93
- #: includes/admin/import.php:42
94
- msgid "Choose a Code Snippets (.xml) file to upload, then click Upload file and import."
95
- msgstr ""
96
-
97
- #: includes/admin/import.php:46
98
- msgid "Choose a file from your computer:"
99
- msgstr ""
100
-
101
- #: includes/admin/import.php:46
102
- msgid "(Maximum size: 8MB)"
103
- msgstr ""
104
-
105
- #: includes/admin/import.php:55
106
- msgid "Upload file and import"
107
- msgstr ""
108
-
109
- #: includes/admin/manage.php:21
110
- msgid "Snippet <strong>activated</strong>."
111
- msgstr ""
112
-
113
- #: includes/admin/manage.php:23
114
- msgid "Selected snippets <strong>activated</strong>."
115
- msgstr ""
116
-
117
- #: includes/admin/manage.php:25
118
- msgid "Snippet <strong>deactivated</strong>."
119
- msgstr ""
120
-
121
- #: includes/admin/manage.php:27
122
- msgid "Selected snippets <strong>deactivated</strong>."
123
- msgstr ""
124
-
125
- #: includes/admin/manage.php:29
126
- msgid "Snippet <strong>deleted</strong>."
127
- msgstr ""
128
-
129
- #: includes/admin/manage.php:31
130
- msgid "Selected snippets <strong>deleted</strong>."
131
- msgstr ""
132
-
133
- #: includes/admin/manage.php:38 includes/admin/single.php:42
134
- msgctxt "snippet"
135
- msgid "Add New"
136
- msgstr ""
137
-
138
- #: includes/admin/manage.php:47
139
- msgid "Search Installed Snippets"
140
- msgstr ""
141
-
142
- #: includes/admin/single.php:22
143
- msgid "Please provide a name for the snippet and its code."
144
- msgstr ""
145
-
146
- #: includes/admin/single.php:28
147
- msgid "Snippet <strong>updated</strong>."
148
- msgstr ""
149
-
150
- #: includes/admin/single.php:30
151
- msgid "Snippet <strong>added</strong>."
152
- msgstr ""
153
-
154
- #: includes/admin/single.php:55 includes/admin/single.php:56
155
- msgid "Name (short title)"
156
- msgstr ""
157
-
158
- #: includes/admin/single.php:61
159
- msgid "Code"
160
- msgstr ""
161
-
162
- #: code-snippets.php:1433 includes/class-list-table.php:189
163
- msgid "Description"
164
- msgstr ""
165
-
166
- #: code-snippets.php:1434
167
- msgid "(Optional)"
168
- msgstr ""
169
-
170
- #: includes/class-list-table.php:36
171
- msgid "Snippets per page"
172
- msgstr ""
173
-
174
- #: code-snippets.php:1118 includes/class-list-table.php:127
175
- #: includes/class-list-table.php:213
176
- msgid "Network Deactivate"
177
- msgstr ""
178
-
179
- #: code-snippets.php:1118 includes/class-list-table.php:127
180
- #: includes/class-list-table.php:213
181
- msgid "Deactivate"
182
- msgstr ""
183
-
184
- #: code-snippets.php:1127 includes/class-list-table.php:137
185
- #: includes/class-list-table.php:212
186
- msgid "Network Activate"
187
- msgstr ""
188
-
189
- #: code-snippets.php:1127 includes/class-list-table.php:137
190
- #: includes/class-list-table.php:212
191
- msgid "Activate"
192
- msgstr ""
193
-
194
- #: includes/class-list-table.php:187
195
- msgid "Name"
196
- msgstr ""
197
-
198
- #: includes/class-list-table.php:188
199
- msgid "ID"
200
- msgstr ""
201
-
202
- #: includes/class-list-table.php:147 includes/class-list-table.php:214
203
- msgid "Export"
204
- msgstr ""
205
-
206
- #: includes/class-list-table.php:155 includes/class-list-table.php:215
207
- msgid "Delete"
208
- msgstr ""
209
-
210
- #: includes/class-list-table.php:216
211
- msgid "Export to PHP"
212
- msgstr ""
213
-
214
- #: includes/class-list-table.php:236
215
- msgid "All <span class=\"count\">(%s)</span>"
216
- msgid_plural "All <span class=\"count\">(%s)</span>"
217
- msgstr[0] ""
218
- msgstr[1] ""
219
-
220
- #: includes/class-list-table.php:239
221
- msgid "Active <span class=\"count\">(%s)</span>"
222
- msgid_plural "Active <span class=\"count\">(%s)</span>"
223
- msgstr[0] ""
224
- msgstr[1] ""
225
-
226
- #: includes/class-list-table.php:242
227
- msgid "Recently Active <span class=\"count\">(%s)</span>"
228
- msgid_plural "Recently Active <span class=\"count\">(%s)</span>"
229
- msgstr[0] ""
230
- msgstr[1] ""
231
-
232
- #: includes/class-list-table.php:245
233
- msgid "Inactive <span class=\"count\">(%s)</span>"
234
- msgid_plural "Inactive <span class=\"count\">(%s)</span>"
235
- msgstr[0] ""
236
- msgstr[1] ""
237
-
238
- #: includes/class-list-table.php:279
239
- msgid "Clear List"
240
- msgstr ""
241
-
242
- #: includes/class-list-table.php:374
243
- msgid "You do not appear to have any snippets available at this time. <a href=\"%s\">Add New&rarr;</a>"
244
- msgstr ""
245
-
246
- #: includes/help/import.php:5 includes/help/manage.php:5
247
- #: includes/help/single.php:5
248
- msgid "Overview"
249
- msgstr ""
250
-
251
- #: includes/help/import.php:7
252
- msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can load snippets from a Code Snippets (.xml) import file into the database with your existing snippets."
253
- msgstr ""
254
-
255
- #: includes/help/import.php:12
256
- msgid "Importing"
257
- msgstr ""
258
-
259
- #: includes/help/import.php:15
260
- msgid "Snippets will be added to the database along with your existing snippets. Regardless of whether the snippets were active on the previous site, imported snippets are always inactive until activated using the <a href=\"%s\">Manage Snippets</a> page.</p>"
261
- msgstr ""
262
-
263
- #: includes/help/import.php:20
264
- msgid "Exporting"
265
- msgstr ""
266
-
267
- #: includes/help/import.php:22
268
- msgid "You can save your snippets to a Code Snippets (.xml) export file using the <a href=\"%s\">Manage Snippets</a> page."
269
- msgstr ""
270
-
271
- #: includes/help/import.php:26 includes/help/manage.php:27
272
- #: includes/help/single.php:31
273
- msgid "For more information:"
274
- msgstr ""
275
-
276
- #: includes/help/import.php:27 includes/help/single.php:32
277
- msgid "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a>"
278
- msgstr ""
279
-
280
- #: includes/help/import.php:28 includes/help/manage.php:29
281
- #: includes/help/single.php:33
282
- msgid "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank\">Support Forums</a>"
283
- msgstr ""
284
-
285
- #: includes/help/manage.php:7
286
- msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can manage your existing snippets and preform tasks on them such as activating, deactivating, deleting and exporting."
287
- msgstr ""
288
-
289
- #: includes/help/manage.php:12
290
- msgid "Safe Mode"
291
- msgstr ""
292
-
293
- #: includes/help/manage.php:14
294
- msgid "Be sure to check your snippets for errors before you activate them, as a faulty snippet could bring your whole blog down. If your site starts doing strange things, deactivate all your snippets and activate them one at a time."
295
- msgstr ""
296
-
297
- #: includes/help/manage.php:20
298
- msgid "Uninstall"
299
- msgstr ""
300
-
301
- #: includes/help/manage.php:22
302
- msgid "When you delete Code Snippets through the Plugins menu in WordPress it will clear up the <code>%1$s</code> table and a few other bits of data stored in the database. If you want to keep this data (ie: you are only temporally uninstalling Code Snippets) then remove the <code>%2$s</code> folder using FTP."
303
- msgstr ""
304
-
305
- #: includes/help/manage.php:23
306
- msgid "Even if you're sure that you don't want to use Code Snippets ever again on this WordPress installation, you may want to use the export feature to back up your snippets."
307
- msgstr ""
308
-
309
- #: includes/help/manage.php:28
310
- msgid "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a></p>"
311
- msgstr ""
312
-
313
- #: includes/help/single.php:7
314
- msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can add a new snippet, or edit an existing one."
315
- msgstr ""
316
-
317
- #: includes/help/single.php:11
318
- msgid "Finding Snippets"
319
- msgstr ""
320
-
321
- #: includes/help/single.php:13
322
- msgid ""
323
- "Here are some links to websites which host a large number of snippets that you can add to your site.\n"
324
- "\t\t<ul>\n"
325
- "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-Snippets</a></li>\n"
326
- "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>\n"
327
- "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats Who Code Snippet Library\">Cats Who Code</a></li>\n"
328
- "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
329
- "\t\t</ul>"
330
- msgstr ""
331
-
332
- #: includes/help/single.php:24
333
- msgid "Adding Snippets"
334
- msgstr ""
335
-
336
- #: includes/help/single.php:26
337
- msgid "You need to fill out the name and code fields for your snippet to be added. While the description field will add more information about how your snippet works, what is does and where you found it, it is completely optional."
338
- msgstr ""
339
-
340
- #: includes/help/single.php:27
341
- msgid "Please be sure to check that your snippet is valid PHP code and will not produce errors before adding it through this page. While doing so will not become active straight away, it will help to minimise the chance of a faulty snippet becoming active on your site."
342
- msgstr ""
343
-
344
- #: code-snippets.php:0
345
- msgid "http://code-snippets.bungeshea.com"
346
- msgstr ""
347
-
348
- #: code-snippets.php:263
349
- msgid "Import snippets from a <strong>Code Snippets</strong> export file"
350
- msgstr ""
351
-
352
- #: includes/admin/import.php:20
353
- msgid "Imported <strong>%d</strong> snippet."
354
- msgid_plural "Imported <strong>%d</strong> snippets."
355
- msgstr[0] ""
356
- msgstr[1] ""
357
-
358
- #: includes/help/import.php:29 includes/help/manage.php:30
359
- #: includes/help/single.php:34
360
- msgid "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project Website</a>"
361
- msgstr ""
362
-
363
- #: includes/help/manage.php:15
364
- msgid "If something goes wrong with a snippet and you can't use WordPress, you can cause all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> file. After you have deactivated the offending snippet, you can turn off safe mode by removing this line or replacing <strong>true</strong> with <strong>false</strong>."
365
- msgstr ""
366
-
367
- #: includes/help/single.php:20
368
- msgid "More places to find snippets, as well as a selection of example snippets, can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/\">plugin documentation</a>"
369
- msgstr ""
370
-
371
- #: code-snippets.php:0
372
- msgid "1.7"
373
- msgstr ""
374
-
375
- #: code-snippets.php:602 includes/class-list-table.php:142
376
- msgid "Edit"
377
- msgstr ""
378
-
379
- #: code-snippets.php:1227
380
- msgid "Sorry, you're not allowed to edit snippets"
381
- msgstr ""
382
-
383
- #: includes/admin/single.php:24
384
- msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
385
- msgstr ""
386
-
387
- #: includes/admin/single.php:26
388
- msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
389
- msgstr ""
390
-
391
- #: includes/class-list-table.php:163
392
- msgid ""
393
- "You are about to permanently delete the selected item.\n"
394
- "\t\t\t\t'Cancel' to stop, 'OK' to delete."
395
- msgstr ""
396
-
397
- #: includes/class-list-table.php:270
398
- msgid "Filter"
399
- msgstr ""
400
-
401
- #: includes/class-list-table.php:541
402
- msgid "Search results"
403
- msgstr ""
404
-
405
- #: includes/class-list-table.php:544
406
- msgid " for &#8220;%s&#8221;"
407
- msgstr ""
408
-
409
- #: includes/class-list-table.php:550
410
- msgid "Clear Filters"
411
- msgstr ""
412
-
413
- #: includes/help/import.php:14
414
- msgid "You can load your snippets from a code snippets (.xml) export file using this page."
415
- msgstr ""
416
-
417
- #: includes/admin/single.php:74
418
- msgid "Save Changes &amp; Activate"
419
  msgstr ""
1
+ # This file is distributed under the same license as the Code Snippets package.
2
+ msgid ""
3
+ msgstr ""
4
+ "PO-Revision-Date: 2013-03-27 15:45:42+0000\n"
5
+ "MIME-Version: 1.0\n"
6
+ "Content-Type: text/plain; charset=UTF-8\n"
7
+ "Content-Transfer-Encoding: 8bit\n"
8
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
9
+ "X-Generator: GlotPress/0.1\n"
10
+ "Project-Id-Version: Code Snippets\n"
11
+
12
+ #: code-snippets.php:0 code-snippets.php:262
13
+ msgid "Code Snippets"
14
+ msgstr ""
15
+
16
+ #: code-snippets.php:0
17
+ msgid "An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!"
18
+ msgstr ""
19
+
20
+ #: code-snippets.php:0
21
+ msgid "Shea Bunge"
22
+ msgstr ""
23
+
24
+ #: code-snippets.php:0
25
+ msgid "http://bungeshea.com"
26
+ msgstr ""
27
+
28
+ #: code-snippets.php:577 code-snippets.php:578 code-snippets.php:588
29
+ #: includes/admin/manage.php:36
30
+ msgid "Snippets"
31
+ msgstr ""
32
+
33
+ #: code-snippets.php:612 code-snippets.php:1145 includes/admin/single.php:45
34
+ msgid "Add New Snippet"
35
+ msgstr ""
36
+
37
+ #: code-snippets.php:613
38
+ msgid "Add New"
39
+ msgstr ""
40
+
41
+ #: code-snippets.php:641 includes/admin/import.php:34
42
+ msgid "Import Snippets"
43
+ msgstr ""
44
+
45
+ #: code-snippets.php:642
46
+ msgid "Import"
47
+ msgstr ""
48
+
49
+ #: code-snippets.php:601 code-snippets.php:1146 includes/admin/single.php:37
50
+ msgid "Edit Snippet"
51
+ msgstr ""
52
+
53
+ #: code-snippets.php:1465
54
+ msgid "Manage your existing snippets"
55
+ msgstr ""
56
+
57
+ #: code-snippets.php:589 code-snippets.php:1466
58
+ msgid "Manage"
59
+ msgstr ""
60
+
61
+ #: code-snippets.php:1486
62
+ msgid "Visit the WordPress.org plugin page"
63
+ msgstr ""
64
+
65
+ #: code-snippets.php:1487
66
+ msgid "About"
67
+ msgstr ""
68
+
69
+ #: code-snippets.php:1491
70
+ msgid "Visit the support forums"
71
+ msgstr ""
72
+
73
+ #: code-snippets.php:1492
74
+ msgid "Support"
75
+ msgstr ""
76
+
77
+ #: code-snippets.php:1496
78
+ msgid "Support this plugin's development"
79
+ msgstr ""
80
+
81
+ #: code-snippets.php:1497
82
+ msgid "Donate"
83
+ msgstr ""
84
+
85
+ #: includes/admin/import.php:38
86
+ msgid "Howdy! Upload your Code Snippets export file and we&#8217;ll import the snippets to this site."
87
+ msgstr ""
88
+
89
+ #: includes/admin/import.php:40
90
+ msgid "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to activate the imported snippets."
91
+ msgstr ""
92
+
93
+ #: includes/admin/import.php:42
94
+ msgid "Choose a Code Snippets (.xml) file to upload, then click Upload file and import."
95
+ msgstr ""
96
+
97
+ #: includes/admin/import.php:46
98
+ msgid "Choose a file from your computer:"
99
+ msgstr ""
100
+
101
+ #: includes/admin/import.php:46
102
+ msgid "(Maximum size: 8MB)"
103
+ msgstr ""
104
+
105
+ #: includes/admin/import.php:55
106
+ msgid "Upload file and import"
107
+ msgstr ""
108
+
109
+ #: includes/admin/manage.php:21
110
+ msgid "Snippet <strong>activated</strong>."
111
+ msgstr ""
112
+
113
+ #: includes/admin/manage.php:23
114
+ msgid "Selected snippets <strong>activated</strong>."
115
+ msgstr ""
116
+
117
+ #: includes/admin/manage.php:25
118
+ msgid "Snippet <strong>deactivated</strong>."
119
+ msgstr ""
120
+
121
+ #: includes/admin/manage.php:27
122
+ msgid "Selected snippets <strong>deactivated</strong>."
123
+ msgstr ""
124
+
125
+ #: includes/admin/manage.php:29
126
+ msgid "Snippet <strong>deleted</strong>."
127
+ msgstr ""
128
+
129
+ #: includes/admin/manage.php:31
130
+ msgid "Selected snippets <strong>deleted</strong>."
131
+ msgstr ""
132
+
133
+ #: includes/admin/manage.php:38 includes/admin/single.php:42
134
+ msgctxt "snippet"
135
+ msgid "Add New"
136
+ msgstr ""
137
+
138
+ #: includes/admin/manage.php:47
139
+ msgid "Search Installed Snippets"
140
+ msgstr ""
141
+
142
+ #: includes/admin/single.php:22
143
+ msgid "Please provide a name for the snippet and its code."
144
+ msgstr ""
145
+
146
+ #: includes/admin/single.php:28
147
+ msgid "Snippet <strong>updated</strong>."
148
+ msgstr ""
149
+
150
+ #: includes/admin/single.php:30
151
+ msgid "Snippet <strong>added</strong>."
152
+ msgstr ""
153
+
154
+ #: includes/admin/single.php:55 includes/admin/single.php:56
155
+ msgid "Name (short title)"
156
+ msgstr ""
157
+
158
+ #: includes/admin/single.php:61
159
+ msgid "Code"
160
+ msgstr ""
161
+
162
+ #: code-snippets.php:1433 includes/class-list-table.php:189
163
+ msgid "Description"
164
+ msgstr ""
165
+
166
+ #: code-snippets.php:1434
167
+ msgid "(Optional)"
168
+ msgstr ""
169
+
170
+ #: includes/class-list-table.php:36
171
+ msgid "Snippets per page"
172
+ msgstr ""
173
+
174
+ #: code-snippets.php:1118 includes/class-list-table.php:127
175
+ #: includes/class-list-table.php:213
176
+ msgid "Network Deactivate"
177
+ msgstr ""
178
+
179
+ #: code-snippets.php:1118 includes/class-list-table.php:127
180
+ #: includes/class-list-table.php:213
181
+ msgid "Deactivate"
182
+ msgstr ""
183
+
184
+ #: code-snippets.php:1127 includes/class-list-table.php:137
185
+ #: includes/class-list-table.php:212
186
+ msgid "Network Activate"
187
+ msgstr ""
188
+
189
+ #: code-snippets.php:1127 includes/class-list-table.php:137
190
+ #: includes/class-list-table.php:212
191
+ msgid "Activate"
192
+ msgstr ""
193
+
194
+ #: includes/class-list-table.php:187
195
+ msgid "Name"
196
+ msgstr ""
197
+
198
+ #: includes/class-list-table.php:188
199
+ msgid "ID"
200
+ msgstr ""
201
+
202
+ #: includes/class-list-table.php:147 includes/class-list-table.php:214
203
+ msgid "Export"
204
+ msgstr ""
205
+
206
+ #: includes/class-list-table.php:155 includes/class-list-table.php:215
207
+ msgid "Delete"
208
+ msgstr ""
209
+
210
+ #: includes/class-list-table.php:216
211
+ msgid "Export to PHP"
212
+ msgstr ""
213
+
214
+ #: includes/class-list-table.php:236
215
+ msgid "All <span class=\"count\">(%s)</span>"
216
+ msgid_plural "All <span class=\"count\">(%s)</span>"
217
+ msgstr[0] ""
218
+ msgstr[1] ""
219
+
220
+ #: includes/class-list-table.php:239
221
+ msgid "Active <span class=\"count\">(%s)</span>"
222
+ msgid_plural "Active <span class=\"count\">(%s)</span>"
223
+ msgstr[0] ""
224
+ msgstr[1] ""
225
+
226
+ #: includes/class-list-table.php:242
227
+ msgid "Recently Active <span class=\"count\">(%s)</span>"
228
+ msgid_plural "Recently Active <span class=\"count\">(%s)</span>"
229
+ msgstr[0] ""
230
+ msgstr[1] ""
231
+
232
+ #: includes/class-list-table.php:245
233
+ msgid "Inactive <span class=\"count\">(%s)</span>"
234
+ msgid_plural "Inactive <span class=\"count\">(%s)</span>"
235
+ msgstr[0] ""
236
+ msgstr[1] ""
237
+
238
+ #: includes/class-list-table.php:279
239
+ msgid "Clear List"
240
+ msgstr ""
241
+
242
+ #: includes/class-list-table.php:374
243
+ msgid "You do not appear to have any snippets available at this time. <a href=\"%s\">Add New&rarr;</a>"
244
+ msgstr ""
245
+
246
+ #: includes/help/import.php:5 includes/help/manage.php:5
247
+ #: includes/help/single.php:5
248
+ msgid "Overview"
249
+ msgstr ""
250
+
251
+ #: includes/help/import.php:7
252
+ msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can load snippets from a Code Snippets (.xml) import file into the database with your existing snippets."
253
+ msgstr ""
254
+
255
+ #: includes/help/import.php:12
256
+ msgid "Importing"
257
+ msgstr ""
258
+
259
+ #: includes/help/import.php:15
260
+ msgid "Snippets will be added to the database along with your existing snippets. Regardless of whether the snippets were active on the previous site, imported snippets are always inactive until activated using the <a href=\"%s\">Manage Snippets</a> page.</p>"
261
+ msgstr ""
262
+
263
+ #: includes/help/import.php:20
264
+ msgid "Exporting"
265
+ msgstr ""
266
+
267
+ #: includes/help/import.php:22
268
+ msgid "You can save your snippets to a Code Snippets (.xml) export file using the <a href=\"%s\">Manage Snippets</a> page."
269
+ msgstr ""
270
+
271
+ #: includes/help/import.php:26 includes/help/manage.php:27
272
+ #: includes/help/single.php:31
273
+ msgid "For more information:"
274
+ msgstr ""
275
+
276
+ #: includes/help/import.php:27 includes/help/single.php:32
277
+ msgid "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a>"
278
+ msgstr ""
279
+
280
+ #: includes/help/import.php:28 includes/help/manage.php:29
281
+ #: includes/help/single.php:33
282
+ msgid "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank\">Support Forums</a>"
283
+ msgstr ""
284
+
285
+ #: includes/help/manage.php:7
286
+ msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can manage your existing snippets and preform tasks on them such as activating, deactivating, deleting and exporting."
287
+ msgstr ""
288
+
289
+ #: includes/help/manage.php:12
290
+ msgid "Safe Mode"
291
+ msgstr ""
292
+
293
+ #: includes/help/manage.php:14
294
+ msgid "Be sure to check your snippets for errors before you activate them, as a faulty snippet could bring your whole blog down. If your site starts doing strange things, deactivate all your snippets and activate them one at a time."
295
+ msgstr ""
296
+
297
+ #: includes/help/manage.php:20
298
+ msgid "Uninstall"
299
+ msgstr ""
300
+
301
+ #: includes/help/manage.php:22
302
+ msgid "When you delete Code Snippets through the Plugins menu in WordPress it will clear up the <code>%1$s</code> table and a few other bits of data stored in the database. If you want to keep this data (ie: you are only temporally uninstalling Code Snippets) then remove the <code>%2$s</code> folder using FTP."
303
+ msgstr ""
304
+
305
+ #: includes/help/manage.php:23
306
+ msgid "Even if you're sure that you don't want to use Code Snippets ever again on this WordPress installation, you may want to use the export feature to back up your snippets."
307
+ msgstr ""
308
+
309
+ #: includes/help/manage.php:28
310
+ msgid "<a href=\"http://wordpress.org/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a></p>"
311
+ msgstr ""
312
+
313
+ #: includes/help/single.php:7
314
+ msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can add a new snippet, or edit an existing one."
315
+ msgstr ""
316
+
317
+ #: includes/help/single.php:11
318
+ msgid "Finding Snippets"
319
+ msgstr ""
320
+
321
+ #: includes/help/single.php:13
322
+ msgid ""
323
+ "Here are some links to websites which host a large number of snippets that you can add to your site.\n"
324
+ "\t\t<ul>\n"
325
+ "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-Snippets</a></li>\n"
326
+ "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>\n"
327
+ "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats Who Code Snippet Library\">Cats Who Code</a></li>\n"
328
+ "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\n"
329
+ "\t\t</ul>"
330
+ msgstr ""
331
+
332
+ #: includes/help/single.php:24
333
+ msgid "Adding Snippets"
334
+ msgstr ""
335
+
336
+ #: includes/help/single.php:26
337
+ msgid "You need to fill out the name and code fields for your snippet to be added. While the description field will add more information about how your snippet works, what is does and where you found it, it is completely optional."
338
+ msgstr ""
339
+
340
+ #: includes/help/single.php:27
341
+ msgid "Please be sure to check that your snippet is valid PHP code and will not produce errors before adding it through this page. While doing so will not become active straight away, it will help to minimise the chance of a faulty snippet becoming active on your site."
342
+ msgstr ""
343
+
344
+ #: code-snippets.php:0
345
+ msgid "http://code-snippets.bungeshea.com"
346
+ msgstr ""
347
+
348
+ #: code-snippets.php:263
349
+ msgid "Import snippets from a <strong>Code Snippets</strong> export file"
350
+ msgstr ""
351
+
352
+ #: includes/admin/import.php:20
353
+ msgid "Imported <strong>%d</strong> snippet."
354
+ msgid_plural "Imported <strong>%d</strong> snippets."
355
+ msgstr[0] ""
356
+ msgstr[1] ""
357
+
358
+ #: includes/help/import.php:29 includes/help/manage.php:30
359
+ #: includes/help/single.php:34
360
+ msgid "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project Website</a>"
361
+ msgstr ""
362
+
363
+ #: includes/help/manage.php:15
364
+ msgid "If something goes wrong with a snippet and you can't use WordPress, you can cause all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> file. After you have deactivated the offending snippet, you can turn off safe mode by removing this line or replacing <strong>true</strong> with <strong>false</strong>."
365
+ msgstr ""
366
+
367
+ #: includes/help/single.php:20
368
+ msgid "More places to find snippets, as well as a selection of example snippets, can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/\">plugin documentation</a>"
369
+ msgstr ""
370
+
371
+ #: code-snippets.php:0
372
+ msgid "1.7"
373
+ msgstr ""
374
+
375
+ #: code-snippets.php:602 includes/class-list-table.php:142
376
+ msgid "Edit"
377
+ msgstr ""
378
+
379
+ #: code-snippets.php:1227
380
+ msgid "Sorry, you're not allowed to edit snippets"
381
+ msgstr ""
382
+
383
+ #: includes/admin/single.php:24
384
+ msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
385
+ msgstr ""
386
+
387
+ #: includes/admin/single.php:26
388
+ msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
389
+ msgstr ""
390
+
391
+ #: includes/class-list-table.php:163
392
+ msgid ""
393
+ "You are about to permanently delete the selected item.\n"
394
+ "\t\t\t\t'Cancel' to stop, 'OK' to delete."
395
+ msgstr ""
396
+
397
+ #: includes/class-list-table.php:270
398
+ msgid "Filter"
399
+ msgstr ""
400
+
401
+ #: includes/class-list-table.php:541
402
+ msgid "Search results"
403
+ msgstr ""
404
+
405
+ #: includes/class-list-table.php:544
406
+ msgid " for &#8220;%s&#8221;"
407
+ msgstr ""
408
+
409
+ #: includes/class-list-table.php:550
410
+ msgid "Clear Filters"
411
+ msgstr ""
412
+
413
+ #: includes/help/import.php:14
414
+ msgid "You can load your snippets from a code snippets (.xml) export file using this page."
415
+ msgstr ""
416
+
417
+ #: includes/admin/single.php:74
418
+ msgid "Save Changes &amp; Activate"
419
  msgstr ""
languages/code-snippets.pot CHANGED
@@ -6,9 +6,9 @@
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: code-snippets 2.0.0-dev\n"
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2015-02-25 13:59+1030\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -271,11 +271,11 @@ msgstr ""
271
  msgid "You are not authorized to access this page."
272
  msgstr ""
273
 
274
- #: includes/edit/edit.php:176 includes/manage/class-list-table.php:224
275
  msgid "Description"
276
  msgstr ""
277
 
278
- #: includes/edit/edit.php:205 includes/manage/class-list-table.php:225
279
  msgid "Tags"
280
  msgstr ""
281
 
@@ -563,21 +563,21 @@ msgid ""
563
  "\">Add New&rarr;</a>"
564
  msgstr ""
565
 
566
- #: includes/manage/class-list-table.php:766
567
  msgid "Search results"
568
  msgstr ""
569
 
570
- #: includes/manage/class-list-table.php:769
571
  #, php-format
572
  msgid " for &#8220;%s&#8221;"
573
  msgstr ""
574
 
575
- #: includes/manage/class-list-table.php:773
576
  #, php-format
577
  msgid " in tag &#8220;%s&#8221;"
578
  msgstr ""
579
 
580
- #: includes/manage/class-list-table.php:779
581
  msgid "Clear Filters"
582
  msgstr ""
583
 
@@ -589,87 +589,91 @@ msgstr ""
589
  msgid "Settings"
590
  msgstr ""
591
 
592
- #: includes/settings/settings.php:51
593
- msgid "General"
594
- msgstr ""
595
-
596
- #: includes/settings/settings.php:52
597
- msgid "Editor"
598
- msgstr ""
599
-
600
- #: includes/settings/settings.php:68
601
  msgid "Activate by Default"
602
  msgstr ""
603
 
604
- #: includes/settings/settings.php:70
605
  msgid ""
606
  "Make the 'Save and Activate' button the default action when saving a snippet."
607
  msgstr ""
608
 
609
- #: includes/settings/settings.php:80
610
  msgid "Theme"
611
  msgstr ""
612
 
613
- #: includes/settings/settings.php:88
614
  msgid "Indent With Tabs"
615
  msgstr ""
616
 
617
- #: includes/settings/settings.php:90
618
  msgid "Use hard tabs (not spaces) for indentation."
619
  msgstr ""
620
 
621
- #: includes/settings/settings.php:97
622
  msgid "Tab Size"
623
  msgstr ""
624
 
625
- #: includes/settings/settings.php:99
626
  msgid "The width of a tab character."
627
  msgstr ""
628
 
629
- #: includes/settings/settings.php:106
630
  msgid "Indent Unit"
631
  msgstr ""
632
 
633
- #: includes/settings/settings.php:108
634
  msgid "How many spaces a block should be indented."
635
  msgstr ""
636
 
637
- #: includes/settings/settings.php:115
638
  msgid "Wrap Lines"
639
  msgstr ""
640
 
641
- #: includes/settings/settings.php:117
642
  msgid "Whether the editor should scroll or wrap for long lines."
643
  msgstr ""
644
 
645
- #: includes/settings/settings.php:124
646
  msgid "Line Numbers"
647
  msgstr ""
648
 
649
- #: includes/settings/settings.php:126
650
  msgid "Show line numbers to the left of the editor."
651
  msgstr ""
652
 
653
- #: includes/settings/settings.php:133
654
  msgid "Auto Close Brackets"
655
  msgstr ""
656
 
657
- #: includes/settings/settings.php:135
658
  msgid "Auto-close brackets and quotes when typed."
659
  msgstr ""
660
 
661
- #: includes/settings/settings.php:142
662
  msgid "Highlight Selection Matches"
663
  msgstr ""
664
 
665
- #: includes/settings/settings.php:143
666
  msgid "Highlight all instances of a currently selected word."
667
  msgstr ""
668
 
669
- #: includes/settings/settings.php:190
 
 
 
 
 
 
 
 
 
 
 
 
670
  msgid "Editor Preview"
671
  msgstr ""
672
 
673
- #: includes/settings/settings.php:238
674
  msgid "Settings saved."
675
  msgstr ""
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
+ "Project-Id-Version: code-snippets 2.1.0\n"
10
  "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2015-05-09 16:34+1000\n"
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
271
  msgid "You are not authorized to access this page."
272
  msgstr ""
273
 
274
+ #: includes/edit/edit.php:177 includes/manage/class-list-table.php:224
275
  msgid "Description"
276
  msgstr ""
277
 
278
+ #: includes/edit/edit.php:206 includes/manage/class-list-table.php:225
279
  msgid "Tags"
280
  msgstr ""
281
 
563
  "\">Add New&rarr;</a>"
564
  msgstr ""
565
 
566
+ #: includes/manage/class-list-table.php:761
567
  msgid "Search results"
568
  msgstr ""
569
 
570
+ #: includes/manage/class-list-table.php:764
571
  #, php-format
572
  msgid " for &#8220;%s&#8221;"
573
  msgstr ""
574
 
575
+ #: includes/manage/class-list-table.php:768
576
  #, php-format
577
  msgid " in tag &#8220;%s&#8221;"
578
  msgstr ""
579
 
580
+ #: includes/manage/class-list-table.php:774
581
  msgid "Clear Filters"
582
  msgstr ""
583
 
589
  msgid "Settings"
590
  msgstr ""
591
 
592
+ #: includes/settings/class-settings.php:47
 
 
 
 
 
 
 
 
593
  msgid "Activate by Default"
594
  msgstr ""
595
 
596
+ #: includes/settings/class-settings.php:49
597
  msgid ""
598
  "Make the 'Save and Activate' button the default action when saving a snippet."
599
  msgstr ""
600
 
601
+ #: includes/settings/class-settings.php:87
602
  msgid "Theme"
603
  msgstr ""
604
 
605
+ #: includes/settings/class-settings.php:95
606
  msgid "Indent With Tabs"
607
  msgstr ""
608
 
609
+ #: includes/settings/class-settings.php:97
610
  msgid "Use hard tabs (not spaces) for indentation."
611
  msgstr ""
612
 
613
+ #: includes/settings/class-settings.php:104
614
  msgid "Tab Size"
615
  msgstr ""
616
 
617
+ #: includes/settings/class-settings.php:106
618
  msgid "The width of a tab character."
619
  msgstr ""
620
 
621
+ #: includes/settings/class-settings.php:113
622
  msgid "Indent Unit"
623
  msgstr ""
624
 
625
+ #: includes/settings/class-settings.php:115
626
  msgid "How many spaces a block should be indented."
627
  msgstr ""
628
 
629
+ #: includes/settings/class-settings.php:122
630
  msgid "Wrap Lines"
631
  msgstr ""
632
 
633
+ #: includes/settings/class-settings.php:124
634
  msgid "Whether the editor should scroll or wrap for long lines."
635
  msgstr ""
636
 
637
+ #: includes/settings/class-settings.php:131
638
  msgid "Line Numbers"
639
  msgstr ""
640
 
641
+ #: includes/settings/class-settings.php:133
642
  msgid "Show line numbers to the left of the editor."
643
  msgstr ""
644
 
645
+ #: includes/settings/class-settings.php:140
646
  msgid "Auto Close Brackets"
647
  msgstr ""
648
 
649
+ #: includes/settings/class-settings.php:142
650
  msgid "Auto-close brackets and quotes when typed."
651
  msgstr ""
652
 
653
+ #: includes/settings/class-settings.php:149
654
  msgid "Highlight Selection Matches"
655
  msgstr ""
656
 
657
+ #: includes/settings/class-settings.php:150
658
  msgid "Highlight all instances of a currently selected word."
659
  msgstr ""
660
 
661
+ #: includes/settings/settings.php:55
662
+ msgid "General"
663
+ msgstr ""
664
+
665
+ #: includes/settings/settings.php:56
666
+ msgid "Description Editor"
667
+ msgstr ""
668
+
669
+ #: includes/settings/settings.php:57
670
+ msgid "Code Editor"
671
+ msgstr ""
672
+
673
+ #: includes/settings/settings.php:104
674
  msgid "Editor Preview"
675
  msgstr ""
676
 
677
+ #: includes/settings/settings.php:152
678
  msgid "Settings saved."
679
  msgstr ""
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Code Snippets ===
2
  Contributors: bungeshea
3
- Donate link: http://code-snippets.bungeshea.com/donate/
4
  Tags: code-snippets, snippets, code, php, network, multisite
5
  Requires at least: 3.3
6
- Tested up to: 4.1.1
7
- Stable tag: 2.0.1
8
  License: MIT
9
  License URI: license.txt
10
 
@@ -12,31 +12,27 @@ An easy, clean and simple way to add code snippets to your site.
12
 
13
  == Description ==
14
 
15
- **Code Snippets** is an easy, clean and simple way to add code snippets to your site. No need to edit to your theme's `functions.php` file again!
16
 
17
- A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website; essentially a mini-plugin with a *lot* less load on your site.
18
  Most snippet-hosting sites tell you to add snippet code to your active theme's `functions.php` file, which can get rather long and messy after a while.
19
- Code Snippets changes that by providing a GUI interface for adding snippets and **actually running them on your site** as if they were in your theme's `functions.php` file.
20
 
21
- You can use a graphical interface, similar to the Plugins menu, to manage, activate, deactivate, edit and delete your snippets. Easily organize your snippets by adding a name and description using the visual editor. Code Snippets includes built-in syntax highlighting and other features to help you write your code. Snippets can be exported for transfer to another side, either in XML for later importing by the Code Snippets plugin, or in PHP for creating your own plugin or theme.
22
 
23
- Although Code Snippets is designed to be easy-to-use and its interface looks, feels and acts as if it was a native part of WordPress, each screen includes a help tab, just in case you get stuck.
24
 
25
- Further information, documentation and updates are available on the [plugin homepage](http://code-snippets.bungeshea.com). You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets).
26
-
27
- If you have any feedback, issues, or suggestions for improvements please leave a topic in the [Support Forum](http://wordpress.org/support/plugin/code-snippets). If you like the plugin, or it is useful to you in any way, please review it on [WordPress.org](http://wordpress.org/support/view/plugin-reviews/code-snippets).
28
-
29
- === Translations ===
30
 
31
  Code Snippets can be used in these different languages thanks to the following translators:
32
 
33
- * German - [David Decker](http://deckerweb.de)
34
- * French - [oWEB](http://office-web.net)
35
- * Japanese - [mt8](http://mt8.biz/)
36
- * Serbo-Croatian - [Borisa Djuraskovic from Web Hosting Hub](http://www.webhostinghub.com/)
37
- * Chinese - [Jincheng Shan](http://shanjincheng.com)
38
- * Russian - [Alexander Samsonov](http://www.wordpressplugins.ru/administration/code-snippets.html)
39
  * Slovak - [Ján Fajčák](http://wp.sk)
 
 
 
 
 
40
 
41
  == Installation ==
42
 
@@ -56,12 +52,10 @@ Code Snippets can be used in these different languages thanks to the following t
56
  3. Upload the contents of the zip file to the `wp-content/plugins/` folder of your WordPress installation
57
  4. Activate the Code Snippets plugin from 'Plugins' page.
58
 
59
- **Network Activating** Code Snippets through the Network Dashboard will enable a special interface for running snippets across the entire network.
60
 
61
  == Frequently Asked Questions ==
62
 
63
- Further documentation is available on the [plugin website](http://code-snippets.bungeshea.com/).
64
-
65
  = How can I insert my snippet into the post text editor? =
66
  Snippets that you add to this plugin are not meant to be inserted into the text editor. Instead, they are run on your site just as if they were added to your functions.php file.
67
 
@@ -104,17 +98,14 @@ Yes. Click the checkboxes next to the snippets you want to export, and then choo
104
  = Can I run network-wide snippets on a multisite installation? =
105
  You can run snippets across an entire multisite network by **Network Activating** Code Snippets through the Network Dashboard. You can also activate Code Snippets just on the main site, and then individually on other sites of your choice.
106
 
107
- ## Where are the snippets stored in my WordPress database?
108
  Snippets are stored in the `wp_snippets` table in the WordPress database. The table name may differ depending on what your table prefix is set to.
109
 
110
- = I need help with Code Snippets =
111
- You can get help with Code Snippets either on the [WordPress Support Forums][support], on [GithHub][issues], or on [WordPress Answers](http://wordpress.stackexchange.com).
112
-
113
- = I have an idea for a cool feature for Code Snippets! =
114
- That's great! Let me know by starting (or adding to) a topic in the [Support Forums][support] or open an issue on [GitHub][issues].
115
 
116
  = I want to contribute to and help develop the Code Snippets plugin! =
117
- That's fantastic! Join me on [GitHub](http://github.com/bungeshea/code-snippets), and also be sure to check out the [development page](http://code-snippets.bungeshea.com/development/) on the [project website](http://code-snippets.bungeshea.com).
118
 
119
  == Screenshots ==
120
 
@@ -125,6 +116,20 @@ That's fantastic! Join me on [GitHub](http://github.com/bungeshea/code-snippets)
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  = 2.0.1 =
129
 
130
  * Fix table creation code not running on upgrade
@@ -132,48 +137,47 @@ That's fantastic! Join me on [GitHub](http://github.com/bungeshea/code-snippets)
132
 
133
  = 2.0 =
134
 
135
- **Highlights:**
136
 
137
  * Better import/export functionality
138
  * New settings page with code editor settings
139
  * Code rewritten for cleaner and more efficient code
140
  * Lots of new translations
141
 
 
142
 
143
- * Removed old admin style support
144
- * Removed backwards-compatible support
145
- * Added braces to single-line conditionals in line with [new coding standards](https://make.wordpress.org/core/2013/11/13/proposed-coding-standards-change-always-require-braces/)
146
- * Split up large classes into separate functions
147
- * Improved plugin file structure
148
- * Replaced uninstall hook with single file method
149
  * Added link to Code Snippets importer under Snippets admin menu
150
  * Added settings component and admin page
151
  * Added support for different CodeMirror themes
152
  * Integrated tags component into main plugin. Current users of the Code Snippets Tags plugin can safely uninstall it.
153
  * Added Auto Close Brackets CodeMirror addon (props to TronicLabs)
154
- * Fixed incompatibility errors with PHP 5.2
155
  * Added Serbo-Croatian translation by Borisa Djuraskovic from [Web Hosting Hub](http://www.webhostinghub.com)
156
- * Fixed empty MO translation files
157
  * Added Highlight Selection Matches CodeMirror addon (props to TronicLabs)
158
  * Added Chinese translation thanks to Jincheng Shan
159
- * Updated CodeMirror library to version 4.6
160
  * Added Russian translation by Alexander Samsonov
161
  * Added Slovak translation by [Ján Fajčák] from [WordPress Slovakia](http://wp.sk)
162
  * Added setting to always save and activate snippets by default
 
 
 
 
 
 
 
163
  * Updated CodeMirror library to version 5.0
164
  * Rewritten import/export functionality to use DOMDocument
165
  * Merged Code_Snippets_Export_PHP class into Code_Snippets_Export class
166
- * Removed duplicate MySQL primary key indexing
167
 
168
- = 1.9.1.1
169
- * Add capability check to site snippets importer
170
 
171
- = 1.9.1 =
172
- * Use an icon font for menu icon instead of embedded SVG
173
- * Use Sass (libsass) instead of Compass
174
- * Unminify CodeMirror scripts
175
- * Fixes for the WP 3.8 interface
176
- * Fix 'enable snippets menu for site admins' multisite setting
 
 
177
 
178
  = 1.9 =
179
  * Add and remove network capabilities as super admins are added and removed
@@ -309,6 +313,12 @@ That's fantastic! Join me on [GitHub](http://github.com/bungeshea/code-snippets)
309
 
310
  == Upgrade Notice ==
311
 
 
 
 
 
 
 
312
  = 2.0 =
313
  Improved import/export; new settings page; improved core code; more translations
314
 
1
  === Code Snippets ===
2
  Contributors: bungeshea
3
+ Donate link: http://bungeshea.com/donate/
4
  Tags: code-snippets, snippets, code, php, network, multisite
5
  Requires at least: 3.3
6
+ Tested up to: 4.2.2
7
+ Stable tag: 2.1.0
8
  License: MIT
9
  License URI: license.txt
10
 
12
 
13
  == Description ==
14
 
15
+ Code Snippets is an easy, clean and simple way to add code snippets to your site. It removes the need to add custom snippets to your theme theme's `functions.php` file.
16
 
17
+ A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website; essentially a mini-plugin with less load on your site.
18
  Most snippet-hosting sites tell you to add snippet code to your active theme's `functions.php` file, which can get rather long and messy after a while.
19
+ Code Snippets changes that by providing a GUI interface for adding snippets and **actually running them on your site** just as if they were in your theme's `functions.php` file.
20
 
21
+ Code Snippets provides graphical interface, similar to the Plugins menu, for managing snippets. Snippets can can be activated and deactivated, just like plugins. The snippet editor includes fields for a name, a visual editor-enabled description, tags to allow you to categorize snippets, and a full-featured code editor. Snippets can be exported for transfer to another side, either in XML for later importing by the Code Snippets plugin, or in PHP for creating your own plugin or theme
22
 
23
+ If you have any feedback, issues, or suggestions for improvements please leave a topic in the [Support Forum](http://wordpress.org/support/plugin/code-snippets). If you like this plugin, or it is useful to you in any way, please review it on [WordPress.org](http://wordpress.org/support/view/plugin-reviews/code-snippets). If you'd like to contribute to the plugin's code or translate it into another language, please [fork the plugin on GitHub](https://github.com/sheabunge/code-snippets).
24
 
25
+ = Translations =
 
 
 
 
26
 
27
  Code Snippets can be used in these different languages thanks to the following translators:
28
 
29
+ * German - [David Decker](http://deckerweb.de) and [Joerg Knoerchen](http://www.sensorgrafie.de/)
 
 
 
 
 
30
  * Slovak - [Ján Fajčák](http://wp.sk)
31
+ * Russian - [Alexander Samsonov](http://www.wordpressplugins.ru/administration/code-snippets.html)
32
+ * Chinese - [Jincheng Shan](http://shanjincheng.com)
33
+ * Serbo-Croatian - [Borisa Djuraskovic from Web Hosting Hub](http://www.webhostinghub.com/)
34
+ * Japanese - [mt8](http://mt8.biz/)
35
+ * French - [oWEB](http://office-web.net)
36
 
37
  == Installation ==
38
 
52
  3. Upload the contents of the zip file to the `wp-content/plugins/` folder of your WordPress installation
53
  4. Activate the Code Snippets plugin from 'Plugins' page.
54
 
55
+ Network Activating Code Snippets through the Network Dashboard will enable a special interface for running snippets across the entire network.
56
 
57
  == Frequently Asked Questions ==
58
 
 
 
59
  = How can I insert my snippet into the post text editor? =
60
  Snippets that you add to this plugin are not meant to be inserted into the text editor. Instead, they are run on your site just as if they were added to your functions.php file.
61
 
98
  = Can I run network-wide snippets on a multisite installation? =
99
  You can run snippets across an entire multisite network by **Network Activating** Code Snippets through the Network Dashboard. You can also activate Code Snippets just on the main site, and then individually on other sites of your choice.
100
 
101
+ = Where are the snippets stored in my WordPress database? =
102
  Snippets are stored in the `wp_snippets` table in the WordPress database. The table name may differ depending on what your table prefix is set to.
103
 
104
+ = I need help with Code Snippets / I have an idea for a new feature for Code Snippets =
105
+ You can get help with Code Snippets, report bugs or errors, and suggest new features and improvements either on the [WordPress Support Forums](https://wordpress.org/support/plugin/code-snippets) or on [GitHub](https://github.com/sheabunge/code-snippets)
 
 
 
106
 
107
  = I want to contribute to and help develop the Code Snippets plugin! =
108
+ That's fantastic! Fork the [repository on GitHub](http://github.com/sheabunge/code-snippets) and send me a pull request.
109
 
110
  == Screenshots ==
111
 
116
 
117
  == Changelog ==
118
 
119
+ = 2.1.0 =
120
+ * Added additional setting descriptions
121
+ * Added settings for code and description editor height
122
+ * Updated CodeMirror to version 5.2
123
+ * Fixed not escaping the request URL when using query arg functions
124
+ * Improved efficiency of settings component
125
+
126
+ = 2.0.3 =
127
+ * Updated German translation by [Joerg Knoerchen](http://www.sensorgraphy.net/)
128
+
129
+ = 2.0.2 =
130
+ * Fix error in table creation code
131
+ * Remove settings database option when plugin is uninstalled
132
+
133
  = 2.0.1 =
134
 
135
  * Fix table creation code not running on upgrade
137
 
138
  = 2.0 =
139
 
140
+ __Highlights__
141
 
142
  * Better import/export functionality
143
  * New settings page with code editor settings
144
  * Code rewritten for cleaner and more efficient code
145
  * Lots of new translations
146
 
147
+ __Added__
148
 
 
 
 
 
 
 
149
  * Added link to Code Snippets importer under Snippets admin menu
150
  * Added settings component and admin page
151
  * Added support for different CodeMirror themes
152
  * Integrated tags component into main plugin. Current users of the Code Snippets Tags plugin can safely uninstall it.
153
  * Added Auto Close Brackets CodeMirror addon (props to TronicLabs)
 
154
  * Added Serbo-Croatian translation by Borisa Djuraskovic from [Web Hosting Hub](http://www.webhostinghub.com)
 
155
  * Added Highlight Selection Matches CodeMirror addon (props to TronicLabs)
156
  * Added Chinese translation thanks to Jincheng Shan
 
157
  * Added Russian translation by Alexander Samsonov
158
  * Added Slovak translation by [Ján Fajčák] from [WordPress Slovakia](http://wp.sk)
159
  * Added setting to always save and activate snippets by default
160
+
161
+ __Changed__
162
+
163
+ * Added braces to single-line conditionals in line with [new coding standards](https://make.wordpress.org/core/2013/11/13/proposed-coding-standards-change-always-require-braces/)
164
+ * Split up large classes into separate functions
165
+ * Improved plugin file structure
166
+ * Replaced uninstall hook with single file method
167
  * Updated CodeMirror library to version 5.0
168
  * Rewritten import/export functionality to use DOMDocument
169
  * Merged Code_Snippets_Export_PHP class into Code_Snippets_Export class
 
170
 
171
+ __Deprecated__
 
172
 
173
+ * Removed old admin style support
174
+ * Removed backwards-compatible support
175
+
176
+ __Fixed__
177
+
178
+ * Fixed incompatibility errors with PHP 5.2
179
+ * Fixed empty MO translation files
180
+ * Removed duplicate MySQL primary key indexing
181
 
182
  = 1.9 =
183
  * Add and remove network capabilities as super admins are added and removed
313
 
314
  == Upgrade Notice ==
315
 
316
+ = 2.1.0 =
317
+ Minor improvements to settings component; added description editor settings; minor security fixes
318
+
319
+ = 2.0.2 =
320
+ Fix snippets not saving
321
+
322
  = 2.0 =
323
  Improved import/export; new settings page; improved core code; more translations
324
 
uninstall.php CHANGED
@@ -24,6 +24,7 @@ function code_snippets_uninstall_site() {
24
  /* Remove saved options */
25
  delete_option( 'code_snippets_version' );
26
  delete_option( 'recently_activated_snippets' );
 
27
 
28
  /* Deregister capabilities */
29
  $role = get_role( apply_filters( 'code_snippets_role', 'administrator' ) );
24
  /* Remove saved options */
25
  delete_option( 'code_snippets_version' );
26
  delete_option( 'recently_activated_snippets' );
27
+ delete_option( 'code_snippets_settings' );
28
 
29
  /* Deregister capabilities */
30
  $role = get_role( apply_filters( 'code_snippets_role', 'administrator' ) );
vendor/codemirror/addon/edit/matchbrackets.js CHANGED
@@ -81,7 +81,7 @@
81
  if (marks.length) {
82
  // Kludge to work around the IE bug from issue #1193, where text
83
  // input stops going to the textare whever this fires.
84
- if (ie_lt8 && cm.state.focused) cm.display.input.focus();
85
 
86
  var clear = function() {
87
  cm.operation(function() {
81
  if (marks.length) {
82
  // Kludge to work around the IE bug from issue #1193, where text
83
  // input stops going to the textare whever this fires.
84
+ if (ie_lt8 && cm.state.focused) cm.focus();
85
 
86
  var clear = function() {
87
  cm.operation(function() {
vendor/codemirror/addon/search/search.js CHANGED
@@ -39,7 +39,7 @@
39
  }
40
 
41
  function SearchState() {
42
- this.posFrom = this.posTo = this.query = null;
43
  this.overlay = null;
44
  }
45
  function getSearchState(cm) {
@@ -53,7 +53,7 @@
53
  return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
54
  }
55
  function dialog(cm, text, shortText, deflt, f) {
56
- if (cm.openDialog) cm.openDialog(text, f, {value: deflt});
57
  else f(prompt(shortText, deflt));
58
  }
59
  function confirmDialog(cm, text, shortText, fs) {
@@ -75,7 +75,8 @@
75
  function doSearch(cm, rev) {
76
  var state = getSearchState(cm);
77
  if (state.query) return findNext(cm, rev);
78
- dialog(cm, queryDialog, "Search for:", cm.getSelection(), function(query) {
 
79
  cm.operation(function() {
80
  if (!query || state.query) return;
81
  state.query = parseQuery(query);
@@ -104,6 +105,7 @@
104
  });}
105
  function clearSearch(cm) {cm.operation(function() {
106
  var state = getSearchState(cm);
 
107
  if (!state.query) return;
108
  state.query = null;
109
  cm.removeOverlay(state.overlay);
@@ -116,7 +118,8 @@
116
  var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
117
  function replace(cm, all) {
118
  if (cm.getOption("readOnly")) return;
119
- dialog(cm, replaceQueryDialog, "Replace:", cm.getSelection(), function(query) {
 
120
  if (!query) return;
121
  query = parseQuery(query);
122
  dialog(cm, replacementQueryDialog, "Replace with:", "", function(text) {
39
  }
40
 
41
  function SearchState() {
42
+ this.posFrom = this.posTo = this.lastQuery = this.query = null;
43
  this.overlay = null;
44
  }
45
  function getSearchState(cm) {
53
  return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
54
  }
55
  function dialog(cm, text, shortText, deflt, f) {
56
+ if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
57
  else f(prompt(shortText, deflt));
58
  }
59
  function confirmDialog(cm, text, shortText, fs) {
75
  function doSearch(cm, rev) {
76
  var state = getSearchState(cm);
77
  if (state.query) return findNext(cm, rev);
78
+ var q = cm.getSelection() || state.lastQuery;
79
+ dialog(cm, queryDialog, "Search for:", q, function(query) {
80
  cm.operation(function() {
81
  if (!query || state.query) return;
82
  state.query = parseQuery(query);
105
  });}
106
  function clearSearch(cm) {cm.operation(function() {
107
  var state = getSearchState(cm);
108
+ state.lastQuery = state.query;
109
  if (!state.query) return;
110
  state.query = null;
111
  cm.removeOverlay(state.overlay);
118
  var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
119
  function replace(cm, all) {
120
  if (cm.getOption("readOnly")) return;
121
+ var query = cm.getSelection() || getSearchState().lastQuery;
122
+ dialog(cm, replaceQueryDialog, "Replace:", query, function(query) {
123
  if (!query) return;
124
  query = parseQuery(query);
125
  dialog(cm, replacementQueryDialog, "Replace with:", "", function(text) {
vendor/codemirror/addon/search/searchcursor.js CHANGED
@@ -148,10 +148,10 @@
148
  from: function() {if (this.atOccurrence) return this.pos.from;},
149
  to: function() {if (this.atOccurrence) return this.pos.to;},
150
 
151
- replace: function(newText) {
152
  if (!this.atOccurrence) return;
153
  var lines = CodeMirror.splitLines(newText);
154
- this.doc.replaceRange(lines, this.pos.from, this.pos.to);
155
  this.pos.to = Pos(this.pos.from.line + lines.length - 1,
156
  lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));
157
  }
148
  from: function() {if (this.atOccurrence) return this.pos.from;},
149
  to: function() {if (this.atOccurrence) return this.pos.to;},
150
 
151
+ replace: function(newText, origin) {
152
  if (!this.atOccurrence) return;
153
  var lines = CodeMirror.splitLines(newText);
154
+ this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin);
155
  this.pos.to = Pos(this.pos.from.line + lines.length - 1,
156
  lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));
157
  }
vendor/codemirror/lib/codemirror.css CHANGED
@@ -4,6 +4,7 @@
4
  /* Set height, width, borders, and global font properties here */
5
  font-family: monospace;
6
  height: 300px;
 
7
  }
8
 
9
  /* PADDING */
@@ -32,8 +33,7 @@
32
  min-width: 20px;
33
  text-align: right;
34
  color: #999;
35
- -moz-box-sizing: content-box;
36
- box-sizing: content-box;
37
  }
38
 
39
  .CodeMirror-guttermarker { color: black; }
@@ -126,6 +126,8 @@ div.CodeMirror-overwrite div.CodeMirror-cursor {}
126
  .cm-s-default .cm-error {color: #f00;}
127
  .cm-invalidchar {color: #f00;}
128
 
 
 
129
  /* Default styles for common addons */
130
 
131
  div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
@@ -139,11 +141,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
139
  the editor. You probably shouldn't touch them. */
140
 
141
  .CodeMirror {
142
- line-height: 1;
143
  position: relative;
144
  overflow: hidden;
145
  background: white;
146
- color: black;
147
  }
148
 
149
  .CodeMirror-scroll {
@@ -155,14 +155,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
155
  height: 100%;
156
  outline: none; /* Prevent dragging from highlighting the element */
157
  position: relative;
158
- -moz-box-sizing: content-box;
159
- box-sizing: content-box;
160
  }
161
  .CodeMirror-sizer {
162
  position: relative;
163
  border-right: 30px solid transparent;
164
- -moz-box-sizing: content-box;
165
- box-sizing: content-box;
166
  }
167
 
168
  /* The fake, visible scrollbars. Used to force redraw during scrolling
@@ -197,8 +193,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
197
  .CodeMirror-gutter {
198
  white-space: normal;
199
  height: 100%;
200
- -moz-box-sizing: content-box;
201
- box-sizing: content-box;
202
  display: inline-block;
203
  margin-bottom: -30px;
204
  /* Hack to make IE7 behave */
@@ -215,6 +209,11 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
215
  cursor: default;
216
  z-index: 4;
217
  }
 
 
 
 
 
218
 
219
  .CodeMirror-lines {
220
  cursor: text;
@@ -235,6 +234,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
235
  z-index: 2;
236
  position: relative;
237
  overflow: visible;
 
238
  }
239
  .CodeMirror-wrap pre {
240
  word-wrap: break-word;
@@ -256,6 +256,20 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
256
 
257
  .CodeMirror-widget {}
258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  .CodeMirror-measure {
260
  position: absolute;
261
  width: 100%;
@@ -283,6 +297,8 @@ div.CodeMirror-cursors {
283
  .CodeMirror-selected { background: #d9d9d9; }
284
  .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
285
  .CodeMirror-crosshair { cursor: crosshair; }
 
 
286
 
287
  .cm-searching {
288
  background: #ffa;
4
  /* Set height, width, borders, and global font properties here */
5
  font-family: monospace;
6
  height: 300px;
7
+ color: black;
8
  }
9
 
10
  /* PADDING */
33
  min-width: 20px;
34
  text-align: right;
35
  color: #999;
36
+ white-space: nowrap;
 
37
  }
38
 
39
  .CodeMirror-guttermarker { color: black; }
126
  .cm-s-default .cm-error {color: #f00;}
127
  .cm-invalidchar {color: #f00;}
128
 
129
+ .CodeMirror-composing { border-bottom: 2px solid; }
130
+
131
  /* Default styles for common addons */
132
 
133
  div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
141
  the editor. You probably shouldn't touch them. */
142
 
143
  .CodeMirror {
 
144
  position: relative;
145
  overflow: hidden;
146
  background: white;
 
147
  }
148
 
149
  .CodeMirror-scroll {
155
  height: 100%;
156
  outline: none; /* Prevent dragging from highlighting the element */
157
  position: relative;
 
 
158
  }
159
  .CodeMirror-sizer {
160
  position: relative;
161
  border-right: 30px solid transparent;
 
 
162
  }
163
 
164
  /* The fake, visible scrollbars. Used to force redraw during scrolling
193
  .CodeMirror-gutter {
194
  white-space: normal;
195
  height: 100%;
 
 
196
  display: inline-block;
197
  margin-bottom: -30px;
198
  /* Hack to make IE7 behave */
209
  cursor: default;
210
  z-index: 4;
211
  }
212
+ .CodeMirror-gutter-wrapper {
213
+ -webkit-user-select: none;
214
+ -moz-user-select: none;
215
+ user-select: none;
216
+ }
217
 
218
  .CodeMirror-lines {
219
  cursor: text;
234
  z-index: 2;
235
  position: relative;
236
  overflow: visible;
237
+ -webkit-tap-highlight-color: transparent;
238
  }
239
  .CodeMirror-wrap pre {
240
  word-wrap: break-word;
256
 
257
  .CodeMirror-widget {}
258
 
259
+ .CodeMirror-code {
260
+ outline: none;
261
+ }
262
+
263
+ /* Force content-box sizing for the elements where we expect it */
264
+ .CodeMirror-scroll,
265
+ .CodeMirror-sizer,
266
+ .CodeMirror-gutter,
267
+ .CodeMirror-gutters,
268
+ .CodeMirror-linenumber {
269
+ -moz-box-sizing: content-box;
270
+ box-sizing: content-box;
271
+ }
272
+
273
  .CodeMirror-measure {
274
  position: absolute;
275
  width: 100%;
297
  .CodeMirror-selected { background: #d9d9d9; }
298
  .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
299
  .CodeMirror-crosshair { cursor: crosshair; }
300
+ .CodeMirror ::selection { background: #d7d4f0; }
301
+ .CodeMirror ::-moz-selection { background: #d7d4f0; }
302
 
303
  .cm-searching {
304
  background: #ffa;
vendor/codemirror/lib/codemirror.js CHANGED
@@ -23,7 +23,6 @@
23
  // detected are enabled based on userAgent etc sniffing.
24
 
25
  var gecko = /gecko\/\d/i.test(navigator.userAgent);
26
- // ie_uptoN means Internet Explorer version N or lower
27
  var ie_upto10 = /MSIE \d/.test(navigator.userAgent);
28
  var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
29
  var ie = ie_upto10 || ie_11up;
@@ -33,7 +32,6 @@
33
  var chrome = /Chrome\//.test(navigator.userAgent);
34
  var presto = /Opera\//.test(navigator.userAgent);
35
  var safari = /Apple Computer/.test(navigator.vendor);
36
- var khtml = /KHTML\//.test(navigator.userAgent);
37
  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
38
  var phantom = /PhantomJS/.test(navigator.userAgent);
39
 
@@ -70,30 +68,36 @@
70
  if (typeof doc == "string") doc = new Doc(doc, options.mode);
71
  this.doc = doc;
72
 
73
- var display = this.display = new Display(place, doc);
 
74
  display.wrapper.CodeMirror = this;
75
  updateGutters(this);
76
  themeChanged(this);
77
  if (options.lineWrapping)
78
  this.display.wrapper.className += " CodeMirror-wrap";
79
- if (options.autofocus && !mobile) focusInput(this);
80
  initScrollbars(this);
81
 
82
  this.state = {
83
  keyMaps: [], // stores maps added by addKeyMap
84
  overlays: [], // highlighting overlays, as added by addOverlay
85
  modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info
86
- overwrite: false, focused: false,
 
 
87
  suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
88
- pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in readInput
89
  draggingText: false,
90
  highlight: new Delayed(), // stores highlight worker timeout
91
- keySeq: null // Unfinished key sequence
 
92
  };
93
 
 
 
94
  // Override magic textarea content restore that IE sometimes does
95
  // on our hidden textarea on reload
96
- if (ie && ie_version < 11) setTimeout(bind(resetInput, this, true), 20);
97
 
98
  registerEventHandlers(this);
99
  ensureGlobalHandlers();
@@ -102,7 +106,7 @@
102
  this.curOp.forceUpdate = true;
103
  attachDoc(this, doc);
104
 
105
- if ((options.autofocus && !mobile) || activeElt() == display.input)
106
  setTimeout(bind(onFocus, this), 20);
107
  else
108
  onBlur(this);
@@ -110,6 +114,7 @@
110
  for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))
111
  optionHandlers[opt](this, options[opt], Init);
112
  maybeUpdateLineNumberWidth(this);
 
113
  for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
114
  endOperation(this);
115
  // Suppress optimizelegibility in Webkit, since it breaks text
@@ -125,31 +130,17 @@
125
  // and content drawing. It holds references to DOM nodes and
126
  // display-related state.
127
 
128
- function Display(place, doc) {
129
  var d = this;
 
130
 
131
- // The semihidden textarea that is focused when the editor is
132
- // focused, and receives input.
133
- var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
134
- // The textarea is kept positioned near the cursor to prevent the
135
- // fact that it'll be scrolled into view on input from scrolling
136
- // our fake cursor out of view. On webkit, when wrap=off, paste is
137
- // very slow. So make the area wide instead.
138
- if (webkit) input.style.width = "1000px";
139
- else input.setAttribute("wrap", "off");
140
- // If border: 0; -- iOS fails to open keyboard (issue #1287)
141
- if (ios) input.style.border = "1px solid black";
142
- input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
143
-
144
- // Wraps and hides input textarea
145
- d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
146
  // Covers bottom-right square when both scrollbars are present.
147
  d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
148
- d.scrollbarFiller.setAttribute("not-content", "true");
149
  // Covers bottom of gutter when coverGutterNextToScrollbar is on
150
  // and h scrollbar is present.
151
  d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
152
- d.gutterFiller.setAttribute("not-content", "true");
153
  // Will contain the actual code, positioned to cover the viewport.
154
  d.lineDiv = elt("div", null, "CodeMirror-code");
155
  // Elements are added to these to represent selection and cursors.
@@ -178,15 +169,11 @@
178
  d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
179
  d.scroller.setAttribute("tabIndex", "-1");
180
  // The element in which the editor lives.
181
- d.wrapper = elt("div", [d.inputDiv, d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
182
 
183
  // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
184
  if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
185
- // Needed to hide big blue blinking cursor on Mobile Safari
186
- if (ios) input.style.width = "0px";
187
- if (!webkit) d.scroller.draggable = true;
188
- // Needed to handle Tab key in KHTML
189
- if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
190
 
191
  if (place) {
192
  if (place.appendChild) place.appendChild(d.wrapper);
@@ -213,25 +200,13 @@
213
  // Used to only resize the line number gutter when necessary (when
214
  // the amount of lines crosses a boundary that makes its width change)
215
  d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
216
- // See readInput and resetInput
217
- d.prevInput = "";
218
  // Set to true when a non-horizontal-scrolling line widget is
219
  // added. As an optimization, line widget aligning is skipped when
220
  // this is false.
221
  d.alignWidgets = false;
222
- // Flag that indicates whether we expect input to appear real soon
223
- // now (after some event like 'keypress' or 'input') and are
224
- // polling intensively.
225
- d.pollingFast = false;
226
- // Self-resetting timeout for the poller
227
- d.poll = new Delayed();
228
 
229
  d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
230
 
231
- // Tracks when resetInput has punted to just putting a short
232
- // string into the textarea instead of the full selection.
233
- d.inaccurateSelection = false;
234
-
235
  // Tracks the maximum line length so that the horizontal scrollbar
236
  // can be kept static when scrolling.
237
  d.maxLine = null;
@@ -247,6 +222,10 @@
247
  // Used to track whether anything happened since the context menu
248
  // was opened.
249
  d.selForContextMenu = null;
 
 
 
 
250
  }
251
 
252
  // STATE UPDATES
@@ -514,10 +493,11 @@
514
 
515
  cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {
516
  cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
 
517
  on(node, "mousedown", function() {
518
- if (cm.state.focused) setTimeout(bind(focusInput, cm), 0);
519
  });
520
- node.setAttribute("not-content", "true");
521
  }, function(pos, axis) {
522
  if (axis == "horizontal") setScrollLeft(cm, pos);
523
  else setScrollTop(cm, pos);
@@ -614,7 +594,7 @@
614
  "CodeMirror-linenumber CodeMirror-gutter-elt"));
615
  var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
616
  display.lineGutter.style.width = "";
617
- display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
618
  display.lineNumWidth = display.lineNumInnerWidth + padding;
619
  display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
620
  display.lineGutter.style.width = display.lineNumWidth + "px";
@@ -649,8 +629,18 @@
649
  this.oldDisplayWidth = displayWidth(cm);
650
  this.force = force;
651
  this.dims = getDimensions(cm);
 
652
  }
653
 
 
 
 
 
 
 
 
 
 
654
  function maybeClipScrollbars(cm) {
655
  var display = cm.display;
656
  if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
@@ -761,9 +751,9 @@
761
  updateScrollbars(cm, barMeasure);
762
  }
763
 
764
- signalLater(cm, "update", cm);
765
  if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
766
- signalLater(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
767
  cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
768
  }
769
  }
@@ -777,6 +767,7 @@
777
  updateSelection(cm);
778
  setDocumentHeight(cm, barMeasure);
779
  updateScrollbars(cm, barMeasure);
 
780
  }
781
  }
782
 
@@ -861,7 +852,7 @@
861
  for (var i = 0; i < view.length; i++) {
862
  var lineView = view[i];
863
  if (lineView.hidden) {
864
- } else if (!lineView.node) { // Not drawn yet
865
  var node = buildLineElement(cm, lineView, lineN, dims);
866
  container.insertBefore(node, cur);
867
  } else { // Already drawn
@@ -892,7 +883,7 @@
892
  if (type == "text") updateLineText(cm, lineView);
893
  else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
894
  else if (type == "class") updateLineClasses(lineView);
895
- else if (type == "widget") updateLineWidgets(lineView, dims);
896
  }
897
  lineView.changes = null;
898
  }
@@ -970,11 +961,11 @@
970
  var markers = lineView.line.gutterMarkers;
971
  if (cm.options.lineNumbers || markers) {
972
  var wrap = ensureLineWrapped(lineView);
973
- var gutterWrap = lineView.gutter =
974
- wrap.insertBefore(elt("div", null, "CodeMirror-gutter-wrapper", "left: " +
975
- (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +
976
- "px; width: " + dims.gutterTotalWidth + "px"),
977
- lineView.text);
978
  if (lineView.line.gutterClass)
979
  gutterWrap.className += " " + lineView.line.gutterClass;
980
  if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
@@ -992,14 +983,14 @@
992
  }
993
  }
994
 
995
- function updateLineWidgets(lineView, dims) {
996
  if (lineView.alignable) lineView.alignable = null;
997
  for (var node = lineView.node.firstChild, next; node; node = next) {
998
  var next = node.nextSibling;
999
  if (node.className == "CodeMirror-linewidget")
1000
  lineView.node.removeChild(node);
1001
  }
1002
- insertLineWidgets(lineView, dims);
1003
  }
1004
 
1005
  // Build a line's DOM representation from scratch
@@ -1011,25 +1002,26 @@
1011
 
1012
  updateLineClasses(lineView);
1013
  updateLineGutter(cm, lineView, lineN, dims);
1014
- insertLineWidgets(lineView, dims);
1015
  return lineView.node;
1016
  }
1017
 
1018
  // A lineView may contain multiple logical lines (when merged by
1019
  // collapsed spans). The widgets for all of them need to be drawn.
1020
- function insertLineWidgets(lineView, dims) {
1021
- insertLineWidgetsFor(lineView.line, lineView, dims, true);
1022
  if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)
1023
- insertLineWidgetsFor(lineView.rest[i], lineView, dims, false);
1024
  }
1025
 
1026
- function insertLineWidgetsFor(line, lineView, dims, allowAbove) {
1027
  if (!line.widgets) return;
1028
  var wrap = ensureLineWrapped(lineView);
1029
  for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
1030
  var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
1031
  if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true");
1032
  positionLineWidget(widget, node, lineView, dims);
 
1033
  if (allowAbove && widget.above)
1034
  wrap.insertBefore(node, lineView.gutter || lineView.text);
1035
  else
@@ -1072,6 +1064,902 @@
1072
  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }
1073
  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }
1074
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1075
  // SELECTION / CURSOR
1076
 
1077
  // Selection objects are immutable. A new one is created every time
@@ -1359,13 +2247,17 @@
1359
 
1360
  // SELECTION DRAWING
1361
 
1362
- // Redraw the selection and/or cursor
1363
- function drawSelection(cm) {
1364
- var display = cm.display, doc = cm.doc, result = {};
 
 
 
1365
  var curFragment = result.cursors = document.createDocumentFragment();
1366
  var selFragment = result.selection = document.createDocumentFragment();
1367
 
1368
  for (var i = 0; i < doc.sel.ranges.length; i++) {
 
1369
  var range = doc.sel.ranges[i];
1370
  var collapsed = range.empty();
1371
  if (collapsed || cm.options.showCursorWhenSelecting)
@@ -1373,33 +2265,9 @@
1373
  if (!collapsed)
1374
  drawSelectionRange(cm, range, selFragment);
1375
  }
1376
-
1377
- // Move the hidden textarea near the cursor to prevent scrolling artifacts
1378
- if (cm.options.moveInputWithCursor) {
1379
- var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
1380
- var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
1381
- result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
1382
- headPos.top + lineOff.top - wrapOff.top));
1383
- result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
1384
- headPos.left + lineOff.left - wrapOff.left));
1385
- }
1386
-
1387
  return result;
1388
  }
1389
 
1390
- function showSelection(cm, drawn) {
1391
- removeChildrenAndAdd(cm.display.cursorDiv, drawn.cursors);
1392
- removeChildrenAndAdd(cm.display.selectionDiv, drawn.selection);
1393
- if (drawn.teTop != null) {
1394
- cm.display.inputDiv.style.top = drawn.teTop + "px";
1395
- cm.display.inputDiv.style.left = drawn.teLeft + "px";
1396
- }
1397
- }
1398
-
1399
- function updateSelection(cm) {
1400
- showSelection(cm, drawSelection(cm));
1401
- }
1402
-
1403
  // Draws a cursor for the given range
1404
  function drawSelectionCursor(cm, range, output) {
1405
  var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine);
@@ -1722,9 +2590,7 @@
1722
 
1723
  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
1724
 
1725
- function measureCharInner(cm, prepared, ch, bias) {
1726
- var map = prepared.map;
1727
-
1728
  var node, start, end, collapse;
1729
  // First, search the line map for the text node corresponding to,
1730
  // or closest to, the target character.
@@ -1758,13 +2624,19 @@
1758
  break;
1759
  }
1760
  }
 
 
 
 
 
 
1761
 
1762
  var rect;
1763
  if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
1764
  for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned
1765
- while (start && isExtendingChar(prepared.line.text.charAt(mStart + start))) --start;
1766
- while (mStart + end < mEnd && isExtendingChar(prepared.line.text.charAt(mStart + end))) ++end;
1767
- if (ie && ie_version < 9 && start == 0 && end == mEnd - mStart) {
1768
  rect = node.parentNode.getBoundingClientRect();
1769
  } else if (ie && cm.options.lineWrapping) {
1770
  var rects = range(node, start, end).getClientRects();
@@ -2076,6 +2948,7 @@
2076
  updateMaxLine: false, // Set when the widest line needs to be determined anew
2077
  scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
2078
  scrollToPos: null, // Used to scroll to a specific position
 
2079
  id: ++nextOpId // Unique ID
2080
  };
2081
  if (operationGroup) {
@@ -2169,7 +3042,7 @@
2169
  }
2170
 
2171
  if (op.updatedDisplay || op.selectionChanged)
2172
- op.newSelectionNodes = drawSelection(cm);
2173
  }
2174
 
2175
  function endOperation_W2(op) {
@@ -2182,8 +3055,8 @@
2182
  cm.display.maxLineChanged = false;
2183
  }
2184
 
2185
- if (op.newSelectionNodes)
2186
- showSelection(cm, op.newSelectionNodes);
2187
  if (op.updatedDisplay)
2188
  setDocumentHeight(cm, op.barMeasure);
2189
  if (op.updatedDisplay || op.startHeight != cm.doc.height)
@@ -2192,7 +3065,8 @@
2192
  if (op.selectionChanged) restartBlink(cm);
2193
 
2194
  if (cm.state.focused && op.updateInput)
2195
- resetInput(cm, op.typing);
 
2196
  }
2197
 
2198
  function endOperation_finish(op) {
@@ -2237,6 +3111,8 @@
2237
  // Fire change events, and delayed event handlers
2238
  if (op.changeObjs)
2239
  signal(cm, "changes", cm, op.changeObjs);
 
 
2240
  }
2241
 
2242
  // Run the given function in an operation
@@ -2462,167 +3338,6 @@
2462
  return dirty;
2463
  }
2464
 
2465
- // INPUT HANDLING
2466
-
2467
- // Poll for input changes, using the normal rate of polling. This
2468
- // runs as long as the editor is focused.
2469
- function slowPoll(cm) {
2470
- if (cm.display.pollingFast) return;
2471
- cm.display.poll.set(cm.options.pollInterval, function() {
2472
- readInput(cm);
2473
- if (cm.state.focused) slowPoll(cm);
2474
- });
2475
- }
2476
-
2477
- // When an event has just come in that is likely to add or change
2478
- // something in the input textarea, we poll faster, to ensure that
2479
- // the change appears on the screen quickly.
2480
- function fastPoll(cm) {
2481
- var missed = false;
2482
- cm.display.pollingFast = true;
2483
- function p() {
2484
- var changed = readInput(cm);
2485
- if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
2486
- else {cm.display.pollingFast = false; slowPoll(cm);}
2487
- }
2488
- cm.display.poll.set(20, p);
2489
- }
2490
-
2491
- // This will be set to an array of strings when copying, so that,
2492
- // when pasting, we know what kind of selections the copied text
2493
- // was made out of.
2494
- var lastCopied = null;
2495
-
2496
- // Read input from the textarea, and update the document to match.
2497
- // When something is selected, it is present in the textarea, and
2498
- // selected (unless it is huge, in which case a placeholder is
2499
- // used). When nothing is selected, the cursor sits after previously
2500
- // seen text (can be empty), which is stored in prevInput (we must
2501
- // not reset the textarea when typing, because that breaks IME).
2502
- function readInput(cm) {
2503
- var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;
2504
- // Since this is called a *lot*, try to bail out as cheaply as
2505
- // possible when it is clear that nothing happened. hasSelection
2506
- // will be the case when there is a lot of text in the textarea,
2507
- // in which case reading its value would be expensive.
2508
- if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)
2509
- return false;
2510
- // See paste handler for more on the fakedLastChar kludge
2511
- if (cm.state.pasteIncoming && cm.state.fakedLastChar) {
2512
- input.value = input.value.substring(0, input.value.length - 1);
2513
- cm.state.fakedLastChar = false;
2514
- }
2515
- var text = input.value;
2516
- // If nothing changed, bail.
2517
- if (text == prevInput && !cm.somethingSelected()) return false;
2518
- // Work around nonsensical selection resetting in IE9/10, and
2519
- // inexplicable appearance of private area unicode characters on
2520
- // some key combos in Mac (#2689).
2521
- if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||
2522
- mac && /[\uf700-\uf7ff]/.test(text)) {
2523
- resetInput(cm);
2524
- return false;
2525
- }
2526
-
2527
- var withOp = !cm.curOp;
2528
- if (withOp) startOperation(cm);
2529
- cm.display.shift = false;
2530
-
2531
- if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)
2532
- prevInput = "\u200b";
2533
- // Find the part of the input that is actually new
2534
- var same = 0, l = Math.min(prevInput.length, text.length);
2535
- while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
2536
- var inserted = text.slice(same), textLines = splitLines(inserted);
2537
-
2538
- // When pasing N lines into N selections, insert one line per selection
2539
- var multiPaste = null;
2540
- if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {
2541
- if (lastCopied && lastCopied.join("\n") == inserted)
2542
- multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);
2543
- else if (textLines.length == doc.sel.ranges.length)
2544
- multiPaste = map(textLines, function(l) { return [l]; });
2545
- }
2546
-
2547
- // Normal behavior is to insert the new text into every selection
2548
- for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {
2549
- var range = doc.sel.ranges[i];
2550
- var from = range.from(), to = range.to();
2551
- // Handle deletion
2552
- if (same < prevInput.length)
2553
- from = Pos(from.line, from.ch - (prevInput.length - same));
2554
- // Handle overwrite
2555
- else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)
2556
- to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
2557
- var updateInput = cm.curOp.updateInput;
2558
- var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
2559
- origin: cm.state.pasteIncoming ? "paste" : cm.state.cutIncoming ? "cut" : "+input"};
2560
- makeChange(cm.doc, changeEvent);
2561
- signalLater(cm, "inputRead", cm, changeEvent);
2562
- // When an 'electric' character is inserted, immediately trigger a reindent
2563
- if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&
2564
- cm.options.smartIndent && range.head.ch < 100 &&
2565
- (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {
2566
- var mode = cm.getModeAt(range.head);
2567
- var end = changeEnd(changeEvent);
2568
- if (mode.electricChars) {
2569
- for (var j = 0; j < mode.electricChars.length; j++)
2570
- if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
2571
- indentLine(cm, end.line, "smart");
2572
- break;
2573
- }
2574
- } else if (mode.electricInput) {
2575
- if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))
2576
- indentLine(cm, end.line, "smart");
2577
- }
2578
- }
2579
- }
2580
- ensureCursorVisible(cm);
2581
- cm.curOp.updateInput = updateInput;
2582
- cm.curOp.typing = true;
2583
-
2584
- // Don't leave long text in the textarea, since it makes further polling slow
2585
- if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = "";
2586
- else cm.display.prevInput = text;
2587
- if (withOp) endOperation(cm);
2588
- cm.state.pasteIncoming = cm.state.cutIncoming = false;
2589
- return true;
2590
- }
2591
-
2592
- // Reset the input to correspond to the selection (or to be empty,
2593
- // when not typing and nothing is selected)
2594
- function resetInput(cm, typing) {
2595
- if (cm.display.contextMenuPending) return;
2596
- var minimal, selected, doc = cm.doc;
2597
- if (cm.somethingSelected()) {
2598
- cm.display.prevInput = "";
2599
- var range = doc.sel.primary();
2600
- minimal = hasCopyEvent &&
2601
- (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);
2602
- var content = minimal ? "-" : selected || cm.getSelection();
2603
- cm.display.input.value = content;
2604
- if (cm.state.focused) selectInput(cm.display.input);
2605
- if (ie && ie_version >= 9) cm.display.inputHasSelection = content;
2606
- } else if (!typing) {
2607
- cm.display.prevInput = cm.display.input.value = "";
2608
- if (ie && ie_version >= 9) cm.display.inputHasSelection = null;
2609
- }
2610
- cm.display.inaccurateSelection = minimal;
2611
- }
2612
-
2613
- function focusInput(cm) {
2614
- if (cm.options.readOnly != "nocursor" && (!mobile || activeElt() != cm.display.input))
2615
- cm.display.input.focus();
2616
- }
2617
-
2618
- function ensureFocus(cm) {
2619
- if (!cm.state.focused) { focusInput(cm); onFocus(cm); }
2620
- }
2621
-
2622
- function isReadOnly(cm) {
2623
- return cm.options.readOnly || cm.doc.cantEdit;
2624
- }
2625
-
2626
  // EVENT HANDLERS
2627
 
2628
  // Attach the necessary event handlers when initializing the editor
@@ -2641,15 +3356,64 @@
2641
  }));
2642
  else
2643
  on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
2644
- // Prevent normal selection in the editor (we handle our own)
2645
- on(d.lineSpace, "selectstart", function(e) {
2646
- if (!eventInWidget(d, e)) e_preventDefault(e);
2647
- });
2648
  // Some browsers fire contextmenu *after* opening the menu, at
2649
  // which point we can't mess with it anymore. Context menu is
2650
  // handled in onMouseDown for these browsers.
2651
  if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
2652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2653
  // Sync scrolling between fake scrollbars and real scrollable
2654
  // area, ensure viewport is updated when scrolling.
2655
  on(d.scroller, "scroll", function() {
@@ -2667,86 +3431,30 @@
2667
  // Prevent wrapper from ever scrolling
2668
  on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
2669
 
2670
- on(d.input, "keyup", function(e) { onKeyUp.call(cm, e); });
2671
- on(d.input, "input", function() {
2672
- if (ie && ie_version >= 9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null;
2673
- readInput(cm);
2674
- });
2675
- on(d.input, "keydown", operation(cm, onKeyDown));
2676
- on(d.input, "keypress", operation(cm, onKeyPress));
2677
- on(d.input, "focus", bind(onFocus, cm));
2678
- on(d.input, "blur", bind(onBlur, cm));
2679
-
2680
- function drag_(e) {
2681
- if (!signalDOMEvent(cm, e)) e_stop(e);
2682
- }
2683
- if (cm.options.dragDrop) {
2684
- on(d.scroller, "dragstart", function(e){onDragStart(cm, e);});
2685
- on(d.scroller, "dragenter", drag_);
2686
- on(d.scroller, "dragover", drag_);
2687
- on(d.scroller, "drop", operation(cm, onDrop));
2688
- }
2689
- on(d.scroller, "paste", function(e) {
2690
- if (eventInWidget(d, e)) return;
2691
- cm.state.pasteIncoming = true;
2692
- focusInput(cm);
2693
- fastPoll(cm);
2694
- });
2695
- on(d.input, "paste", function() {
2696
- // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206
2697
- // Add a char to the end of textarea before paste occur so that
2698
- // selection doesn't span to the end of textarea.
2699
- if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
2700
- var start = d.input.selectionStart, end = d.input.selectionEnd;
2701
- d.input.value += "$";
2702
- // The selection end needs to be set before the start, otherwise there
2703
- // can be an intermediate non-empty selection between the two, which
2704
- // can override the middle-click paste buffer on linux and cause the
2705
- // wrong thing to get pasted.
2706
- d.input.selectionEnd = end;
2707
- d.input.selectionStart = start;
2708
- cm.state.fakedLastChar = true;
2709
- }
2710
- cm.state.pasteIncoming = true;
2711
- fastPoll(cm);
2712
- });
2713
 
2714
- function prepareCopyCut(e) {
2715
- if (cm.somethingSelected()) {
2716
- lastCopied = cm.getSelections();
2717
- if (d.inaccurateSelection) {
2718
- d.prevInput = "";
2719
- d.inaccurateSelection = false;
2720
- d.input.value = lastCopied.join("\n");
2721
- selectInput(d.input);
2722
- }
2723
- } else {
2724
- var text = [], ranges = [];
2725
- for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
2726
- var line = cm.doc.sel.ranges[i].head.line;
2727
- var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
2728
- ranges.push(lineRange);
2729
- text.push(cm.getRange(lineRange.anchor, lineRange.head));
2730
- }
2731
- if (e.type == "cut") {
2732
- cm.setSelections(ranges, null, sel_dontScroll);
2733
- } else {
2734
- d.prevInput = "";
2735
- d.input.value = text.join("\n");
2736
- selectInput(d.input);
2737
- }
2738
- lastCopied = text;
2739
- }
2740
- if (e.type == "cut") cm.state.cutIncoming = true;
2741
- }
2742
- on(d.input, "cut", prepareCopyCut);
2743
- on(d.input, "copy", prepareCopyCut);
2744
 
2745
- // Needed to handle Tab key in KHTML
2746
- if (khtml) on(d.sizer, "mouseup", function() {
2747
- if (activeElt() == d.input) d.input.blur();
2748
- focusInput(cm);
2749
- });
 
 
 
 
 
2750
  }
2751
 
2752
  // Called when the window resizes
@@ -2778,7 +3486,7 @@
2778
  // coordinates beyond the right of the text.
2779
  function posFromMouse(cm, e, liberal, forRect) {
2780
  var display = cm.display;
2781
- if (!liberal && e_target(e).getAttribute("not-content") == "true") return null;
2782
 
2783
  var x, y, space = display.lineSpace.getBoundingClientRect();
2784
  // Fails unpredictably on IE[67] when mouse is dragged around quickly.
@@ -2798,8 +3506,8 @@
2798
  // middle-click-paste. Or it might be a click on something we should
2799
  // not interfere with, such as a scrollbar or widget.
2800
  function onMouseDown(e) {
2801
- if (signalDOMEvent(this, e)) return;
2802
  var cm = this, display = cm.display;
 
2803
  display.shift = e.shiftKey;
2804
 
2805
  if (eventInWidget(display, e)) {
@@ -2825,18 +3533,20 @@
2825
  case 2:
2826
  if (webkit) cm.state.lastMiddleDown = +new Date;
2827
  if (start) extendSelection(cm.doc, start);
2828
- setTimeout(bind(focusInput, cm), 20);
2829
  e_preventDefault(e);
2830
  break;
2831
  case 3:
2832
  if (captureRightClick) onContextMenu(cm, e);
 
2833
  break;
2834
  }
2835
  }
2836
 
2837
  var lastClick, lastDoubleClick;
2838
  function leftButtonDown(cm, e, start) {
2839
- setTimeout(bind(ensureFocus, cm), 0);
 
2840
 
2841
  var now = +new Date, type;
2842
  if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {
@@ -2861,7 +3571,7 @@
2861
  // Start a text drag. When it ends, see if any dragging actually
2862
  // happen, and treat as a click if it didn't.
2863
  function leftButtonStartDrag(cm, e, start, modifier) {
2864
- var display = cm.display;
2865
  var dragEnd = operation(cm, function(e2) {
2866
  if (webkit) display.scroller.draggable = false;
2867
  cm.state.draggingText = false;
@@ -2869,12 +3579,13 @@
2869
  off(display.scroller, "drop", dragEnd);
2870
  if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
2871
  e_preventDefault(e2);
2872
- if (!modifier)
2873
  extendSelection(cm.doc, start);
2874
- focusInput(cm);
2875
- // Work around unexplainable focus problem in IE9 (#2127)
2876
- if (ie && ie_version == 9)
2877
- setTimeout(function() {document.body.focus(); focusInput(cm);}, 20);
 
2878
  }
2879
  });
2880
  // Let the drag handler handle this.
@@ -2900,6 +3611,7 @@
2900
  ourRange = new Range(start, start);
2901
  } else {
2902
  ourRange = doc.sel.primary();
 
2903
  }
2904
 
2905
  if (e.altKey) {
@@ -2931,7 +3643,7 @@
2931
  ourIndex = ranges.length;
2932
  setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),
2933
  {scroll: false, origin: "*mouse"});
2934
- } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single") {
2935
  setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0));
2936
  startSel = doc.sel;
2937
  } else {
@@ -2994,7 +3706,7 @@
2994
  var cur = posFromMouse(cm, e, true, type == "rect");
2995
  if (!cur) return;
2996
  if (cmp(cur, lastPos) != 0) {
2997
- ensureFocus(cm);
2998
  extendTo(cur);
2999
  var visible = visibleLines(display, doc);
3000
  if (cur.line >= visible.to || cur.line < visible.from)
@@ -3012,7 +3724,7 @@
3012
  function done(e) {
3013
  counter = Infinity;
3014
  e_preventDefault(e);
3015
- focusInput(cm);
3016
  off(document, "mousemove", move);
3017
  off(document, "mouseup", up);
3018
  doc.history.lastSelOrigin = null;
@@ -3091,19 +3803,19 @@
3091
  if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
3092
  cm.state.draggingText(e);
3093
  // Ensure the editor is re-focused
3094
- setTimeout(bind(focusInput, cm), 20);
3095
  return;
3096
  }
3097
  try {
3098
  var text = e.dataTransfer.getData("Text");
3099
  if (text) {
3100
- if (cm.state.draggingText && !(mac ? e.metaKey : e.ctrlKey))
3101
  var selected = cm.listSelections();
3102
  setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
3103
  if (selected) for (var i = 0; i < selected.length; ++i)
3104
  replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag");
3105
  cm.replaceSelection(text, "around", "paste");
3106
- focusInput(cm);
3107
  }
3108
  }
3109
  catch(e){}
@@ -3270,7 +3982,7 @@
3270
  }
3271
  // Ensure previous input has been read, so that the handler sees a
3272
  // consistent view of the document
3273
- if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
3274
  var prevShift = cm.display.shift, done = false;
3275
  try {
3276
  if (isReadOnly(cm)) cm.state.suppressEdits = true;
@@ -3300,7 +4012,7 @@
3300
  stopSeq.set(50, function() {
3301
  if (cm.state.keySeq == seq) {
3302
  cm.state.keySeq = null;
3303
- resetInput(cm);
3304
  }
3305
  });
3306
  name = seq + " " + name;
@@ -3352,7 +4064,7 @@
3352
  var lastStoppedKey = null;
3353
  function onKeyDown(e) {
3354
  var cm = this;
3355
- ensureFocus(cm);
3356
  if (signalDOMEvent(cm, e)) return;
3357
  // IE does strange things with escape.
3358
  if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;
@@ -3393,36 +4105,49 @@
3393
 
3394
  function onKeyPress(e) {
3395
  var cm = this;
3396
- if (signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;
3397
  var keyCode = e.keyCode, charCode = e.charCode;
3398
  if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
3399
- if (((presto && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return;
3400
  var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
3401
  if (handleCharBinding(cm, e, ch)) return;
3402
- if (ie && ie_version >= 9) cm.display.inputHasSelection = null;
3403
- fastPoll(cm);
3404
  }
3405
 
3406
  // FOCUS/BLUR EVENTS
3407
 
 
 
 
 
 
 
 
 
 
 
3408
  function onFocus(cm) {
 
 
3409
  if (cm.options.readOnly == "nocursor") return;
3410
  if (!cm.state.focused) {
3411
  signal(cm, "focus", cm);
3412
  cm.state.focused = true;
3413
  addClass(cm.display.wrapper, "CodeMirror-focused");
3414
- // The prevInput test prevents this from firing when a context
3415
- // menu is closed (since the resetInput would kill the
3416
  // select-all detection hack)
3417
  if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
3418
- resetInput(cm);
3419
- if (webkit) setTimeout(bind(resetInput, cm, true), 0); // Issue #1730
3420
  }
 
3421
  }
3422
- slowPoll(cm);
3423
  restartBlink(cm);
3424
  }
3425
  function onBlur(cm) {
 
 
3426
  if (cm.state.focused) {
3427
  signal(cm, "blur", cm);
3428
  cm.state.focused = false;
@@ -3438,80 +4163,8 @@
3438
  // textarea (making it as unobtrusive as possible) to let the
3439
  // right-click take effect on it.
3440
  function onContextMenu(cm, e) {
3441
- if (signalDOMEvent(cm, e, "contextmenu")) return;
3442
- var display = cm.display;
3443
- if (eventInWidget(display, e) || contextMenuInGutter(cm, e)) return;
3444
-
3445
- var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
3446
- if (!pos || presto) return; // Opera is difficult.
3447
-
3448
- // Reset the current text selection only if the click is done outside of the selection
3449
- // and 'resetSelectionOnContextMenu' option is true.
3450
- var reset = cm.options.resetSelectionOnContextMenu;
3451
- if (reset && cm.doc.sel.contains(pos) == -1)
3452
- operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
3453
-
3454
- var oldCSS = display.input.style.cssText;
3455
- display.inputDiv.style.position = "absolute";
3456
- display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
3457
- "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " +
3458
- (ie ? "rgba(255, 255, 255, .05)" : "transparent") +
3459
- "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
3460
- if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)
3461
- focusInput(cm);
3462
- if (webkit) window.scrollTo(null, oldScrollY);
3463
- resetInput(cm);
3464
- // Adds "Select all" to context menu in FF
3465
- if (!cm.somethingSelected()) display.input.value = display.prevInput = " ";
3466
- display.contextMenuPending = true;
3467
- display.selForContextMenu = cm.doc.sel;
3468
- clearTimeout(display.detectingSelectAll);
3469
-
3470
- // Select-all will be greyed out if there's nothing to select, so
3471
- // this adds a zero-width space so that we can later check whether
3472
- // it got selected.
3473
- function prepareSelectAllHack() {
3474
- if (display.input.selectionStart != null) {
3475
- var selected = cm.somethingSelected();
3476
- var extval = display.input.value = "\u200b" + (selected ? display.input.value : "");
3477
- display.prevInput = selected ? "" : "\u200b";
3478
- display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
3479
- // Re-set this, in case some other handler touched the
3480
- // selection in the meantime.
3481
- display.selForContextMenu = cm.doc.sel;
3482
- }
3483
- }
3484
- function rehide() {
3485
- display.contextMenuPending = false;
3486
- display.inputDiv.style.position = "relative";
3487
- display.input.style.cssText = oldCSS;
3488
- if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
3489
- slowPoll(cm);
3490
-
3491
- // Try to detect the user choosing select-all
3492
- if (display.input.selectionStart != null) {
3493
- if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();
3494
- var i = 0, poll = function() {
3495
- if (display.selForContextMenu == cm.doc.sel && display.input.selectionStart == 0)
3496
- operation(cm, commands.selectAll)(cm);
3497
- else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);
3498
- else resetInput(cm);
3499
- };
3500
- display.detectingSelectAll = setTimeout(poll, 200);
3501
- }
3502
- }
3503
-
3504
- if (ie && ie_version >= 9) prepareSelectAllHack();
3505
- if (captureRightClick) {
3506
- e_stop(e);
3507
- var mouseup = function() {
3508
- off(window, "mouseup", mouseup);
3509
- setTimeout(rehide, 20);
3510
- };
3511
- on(window, "mouseup", mouseup);
3512
- } else {
3513
- setTimeout(rehide, 50);
3514
- }
3515
  }
3516
 
3517
  function contextMenuInGutter(cm, e) {
@@ -3999,6 +4652,8 @@
3999
 
4000
  if (indentString != curSpaceString) {
4001
  replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
 
 
4002
  } else {
4003
  // Ensure that, if the cursor was in the whitespace at the start
4004
  // of the line, it is moved to the end of that space.
@@ -4011,7 +4666,6 @@
4011
  }
4012
  }
4013
  }
4014
- line.stateAfter = null;
4015
  }
4016
 
4017
  // Utility for applying a change to a line by handle or number,
@@ -4140,7 +4794,7 @@
4140
 
4141
  CodeMirror.prototype = {
4142
  constructor: CodeMirror,
4143
- focus: function(){window.focus(); focusInput(this); fastPoll(this);},
4144
 
4145
  setOption: function(option, value) {
4146
  var options = this.options, old = options[option];
@@ -4251,7 +4905,7 @@
4251
 
4252
  getHelpers: function(pos, type) {
4253
  var found = [];
4254
- if (!helpers.hasOwnProperty(type)) return helpers;
4255
  var help = helpers[type], mode = this.getModeAt(pos);
4256
  if (typeof mode[type] == "string") {
4257
  if (help[mode[type]]) found.push(help[mode[type]]);
@@ -4301,10 +4955,15 @@
4301
  return lineAtHeight(this.doc, height + this.display.viewOffset);
4302
  },
4303
  heightAtLine: function(line, mode) {
4304
- var end = false, last = this.doc.first + this.doc.size - 1;
4305
- if (line < this.doc.first) line = this.doc.first;
4306
- else if (line > last) { line = last; end = true; }
4307
- var lineObj = getLine(this.doc, line);
 
 
 
 
 
4308
  return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top +
4309
  (end ? this.doc.height - heightAtLine(lineObj) : 0);
4310
  },
@@ -4333,12 +4992,6 @@
4333
  });
4334
  }),
4335
 
4336
- addLineWidget: methodOp(function(handle, node, options) {
4337
- return addLineWidget(this, handle, node, options);
4338
- }),
4339
-
4340
- removeLineWidget: function(widget) { widget.clear(); },
4341
-
4342
  lineInfo: function(line) {
4343
  if (typeof line == "number") {
4344
  if (!isLine(this.doc, line)) return null;
@@ -4362,6 +5015,7 @@
4362
  var top = pos.bottom, left = pos.left;
4363
  node.style.position = "absolute";
4364
  node.setAttribute("cm-ignore-events", "true");
 
4365
  display.sizer.appendChild(node);
4366
  if (vert == "over") {
4367
  top = pos.top;
@@ -4488,7 +5142,7 @@
4488
 
4489
  signal(this, "overwriteToggle", this, this.state.overwrite);
4490
  },
4491
- hasFocus: function() { return activeElt() == this.display.input; },
4492
 
4493
  scrollTo: methodOp(function(x, y) {
4494
  if (x != null || y != null) resolveScrollToPos(this);
@@ -4564,14 +5218,14 @@
4564
  old.cm = null;
4565
  attachDoc(this, doc);
4566
  clearCaches(this);
4567
- resetInput(this);
4568
  this.scrollTo(doc.scrollLeft, doc.scrollTop);
4569
  this.curOp.forceScroll = true;
4570
  signalLater(this, "swapDoc", this, old);
4571
  return old;
4572
  }),
4573
 
4574
- getInputField: function(){return this.display.input;},
4575
  getWrapperElement: function(){return this.display.wrapper;},
4576
  getScrollerElement: function(){return this.display.scroller;},
4577
  getGutterElement: function(){return this.display.gutters;}
@@ -4612,12 +5266,15 @@
4612
  clearCaches(cm);
4613
  regChange(cm);
4614
  }, true);
4615
- option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val) {
4616
- cm.options.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
4617
- cm.refresh();
4618
- }, true);
4619
  option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);
4620
  option("electricChars", true);
 
 
 
4621
  option("rtlMoveVisually", !windows);
4622
  option("wholeLineUpdateBefore", true);
4623
 
@@ -4658,6 +5315,7 @@
4658
  option("showCursorWhenSelecting", false, updateSelection, true);
4659
 
4660
  option("resetSelectionOnContextMenu", true);
 
4661
 
4662
  option("readOnly", false, function(cm, val) {
4663
  if (val == "nocursor") {
@@ -4666,11 +5324,11 @@
4666
  cm.display.disabled = true;
4667
  } else {
4668
  cm.display.disabled = false;
4669
- if (!val) resetInput(cm);
4670
  }
4671
  });
4672
- option("disableInput", false, function(cm, val) {if (!val) resetInput(cm);}, true);
4673
- option("dragDrop", true);
4674
 
4675
  option("cursorBlinkRate", 530);
4676
  option("cursorScrollMargin", 0);
@@ -4686,11 +5344,11 @@
4686
  option("viewportMargin", 10, function(cm){cm.refresh();}, true);
4687
  option("maxHighlightLength", 10000, resetModeState, true);
4688
  option("moveInputWithCursor", true, function(cm, val) {
4689
- if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0;
4690
  });
4691
 
4692
  option("tabindex", null, function(cm, val) {
4693
- cm.display.input.tabIndex = val || "";
4694
  });
4695
  option("autofocus", null);
4696
 
@@ -5121,10 +5779,10 @@
5121
  // FROMTEXTAREA
5122
 
5123
  CodeMirror.fromTextArea = function(textarea, options) {
5124
- if (!options) options = {};
5125
  options.value = textarea.value;
5126
- if (!options.tabindex && textarea.tabindex)
5127
- options.tabindex = textarea.tabindex;
5128
  if (!options.placeholder && textarea.placeholder)
5129
  options.placeholder = textarea.placeholder;
5130
  // Set autofocus to true if this textarea is focused, or if it has
@@ -5152,23 +5810,26 @@
5152
  }
5153
  }
5154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5155
  textarea.style.display = "none";
5156
  var cm = CodeMirror(function(node) {
5157
  textarea.parentNode.insertBefore(node, textarea.nextSibling);
5158
  }, options);
5159
- cm.save = save;
5160
- cm.getTextArea = function() { return textarea; };
5161
- cm.toTextArea = function() {
5162
- cm.toTextArea = isNaN; // Prevent this from being ran twice
5163
- save();
5164
- textarea.parentNode.removeChild(cm.getWrapperElement());
5165
- textarea.style.display = "";
5166
- if (textarea.form) {
5167
- off(textarea.form, "submit", save);
5168
- if (typeof textarea.form.submit == "function")
5169
- textarea.form.submit = realSubmit;
5170
- }
5171
- };
5172
  return cm;
5173
  };
5174
 
@@ -5261,10 +5922,13 @@
5261
  // marker continues beyond the start/end of the line. Markers have
5262
  // links back to the lines they currently touch.
5263
 
 
 
5264
  var TextMarker = CodeMirror.TextMarker = function(doc, type) {
5265
  this.lines = [];
5266
  this.type = type;
5267
  this.doc = doc;
 
5268
  };
5269
  eventMixin(TextMarker);
5270
 
@@ -5848,10 +6512,10 @@
5848
 
5849
  // Line widgets are block elements displayed above or below a line.
5850
 
5851
- var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {
5852
  if (options) for (var opt in options) if (options.hasOwnProperty(opt))
5853
  this[opt] = options[opt];
5854
- this.cm = cm;
5855
  this.node = node;
5856
  };
5857
  eventMixin(LineWidget);
@@ -5862,52 +6526,55 @@
5862
  }
5863
 
5864
  LineWidget.prototype.clear = function() {
5865
- var cm = this.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
5866
  if (no == null || !ws) return;
5867
  for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
5868
  if (!ws.length) line.widgets = null;
5869
  var height = widgetHeight(this);
5870
- runInOp(cm, function() {
 
5871
  adjustScrollWhenAboveVisible(cm, line, -height);
5872
  regLineChange(cm, no, "widget");
5873
- updateLineHeight(line, Math.max(0, line.height - height));
5874
  });
5875
  };
5876
  LineWidget.prototype.changed = function() {
5877
- var oldH = this.height, cm = this.cm, line = this.line;
5878
  this.height = null;
5879
  var diff = widgetHeight(this) - oldH;
5880
  if (!diff) return;
5881
- runInOp(cm, function() {
 
5882
  cm.curOp.forceUpdate = true;
5883
  adjustScrollWhenAboveVisible(cm, line, diff);
5884
- updateLineHeight(line, line.height + diff);
5885
  });
5886
  };
5887
 
5888
  function widgetHeight(widget) {
5889
  if (widget.height != null) return widget.height;
 
 
5890
  if (!contains(document.body, widget.node)) {
5891
  var parentStyle = "position: relative;";
5892
  if (widget.coverGutter)
5893
- parentStyle += "margin-left: -" + widget.cm.display.gutters.offsetWidth + "px;";
5894
  if (widget.noHScroll)
5895
- parentStyle += "width: " + widget.cm.display.wrapper.clientWidth + "px;";
5896
- removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, parentStyle));
5897
  }
5898
  return widget.height = widget.node.offsetHeight;
5899
  }
5900
 
5901
- function addLineWidget(cm, handle, node, options) {
5902
- var widget = new LineWidget(cm, node, options);
5903
- if (widget.noHScroll) cm.display.alignWidgets = true;
5904
- changeLine(cm.doc, handle, "widget", function(line) {
 
5905
  var widgets = line.widgets || (line.widgets = []);
5906
  if (widget.insertAt == null) widgets.push(widget);
5907
  else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
5908
  widget.line = line;
5909
- if (!lineIsHidden(cm.doc, line)) {
5910
- var aboveVisible = heightAtLine(line) < cm.doc.scrollTop;
5911
  updateLineHeight(line, line.height + widgetHeight(widget));
5912
  if (aboveVisible) addToScrollPos(cm, null, widget.height);
5913
  cm.curOp.forceUpdate = true;
@@ -6127,7 +6794,9 @@
6127
  // is needed on Webkit to be able to get line-level bounding
6128
  // rectangles for it (in measureChar).
6129
  var content = elt("span", null, null, webkit ? "padding-right: .1px" : null);
6130
- var builder = {pre: elt("pre", [content]), content: content, col: 0, pos: 0, cm: cm};
 
 
6131
  lineView.measure = {};
6132
 
6133
  // Iterate over the logical lines that make up this visual line.
@@ -6137,8 +6806,6 @@
6137
  builder.addToken = buildToken;
6138
  // Optionally wire in some hacks into the token-rendering
6139
  // algorithm, to deal with browser quirks.
6140
- if ((ie || webkit) && cm.getOption("lineWrapping"))
6141
- builder.addToken = buildTokenSplitSpaces(builder.addToken);
6142
  if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))
6143
  builder.addToken = buildTokenBadBidi(builder.addToken, order);
6144
  builder.map = [];
@@ -6179,6 +6846,7 @@
6179
  function defaultSpecialCharPlaceholder(ch) {
6180
  var token = elt("span", "\u2022", "cm-invalidchar");
6181
  token.title = "\\u" + ch.charCodeAt(0).toString(16);
 
6182
  return token;
6183
  }
6184
 
@@ -6186,10 +6854,11 @@
6186
  // the line map. Takes care to render special characters separately.
6187
  function buildToken(builder, text, style, startStyle, endStyle, title, css) {
6188
  if (!text) return;
6189
- var special = builder.cm.options.specialChars, mustWrap = false;
 
6190
  if (!special.test(text)) {
6191
  builder.col += text.length;
6192
- var content = document.createTextNode(text);
6193
  builder.map.push(builder.pos, builder.pos + text.length, content);
6194
  if (ie && ie_version < 9) mustWrap = true;
6195
  builder.pos += text.length;
@@ -6200,7 +6869,7 @@
6200
  var m = special.exec(text);
6201
  var skipped = m ? m.index - pos : text.length - pos;
6202
  if (skipped) {
6203
- var txt = document.createTextNode(text.slice(pos, pos + skipped));
6204
  if (ie && ie_version < 9) content.appendChild(elt("span", [txt]));
6205
  else content.appendChild(txt);
6206
  builder.map.push(builder.pos, builder.pos + skipped, txt);
@@ -6212,9 +6881,12 @@
6212
  if (m[0] == "\t") {
6213
  var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
6214
  var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
 
 
6215
  builder.col += tabWidth;
6216
  } else {
6217
  var txt = builder.cm.options.specialCharPlaceholder(m[0]);
 
6218
  if (ie && ie_version < 9) content.appendChild(elt("span", [txt]));
6219
  else content.appendChild(txt);
6220
  builder.col += 1;
@@ -6234,22 +6906,17 @@
6234
  builder.content.appendChild(content);
6235
  }
6236
 
6237
- function buildTokenSplitSpaces(inner) {
6238
- function split(old) {
6239
- var out = " ";
6240
- for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
6241
- out += " ";
6242
- return out;
6243
- }
6244
- return function(builder, text, style, startStyle, endStyle, title) {
6245
- inner(builder, text.replace(/ {3,}/g, split), style, startStyle, endStyle, title);
6246
- };
6247
  }
6248
 
6249
  // Work around nonsense dimensions being reported for stretches of
6250
  // right-to-left text.
6251
  function buildTokenBadBidi(inner, order) {
6252
- return function(builder, text, style, startStyle, endStyle, title) {
6253
  style = style ? style + " cm-force-border" : "cm-force-border";
6254
  var start = builder.pos, end = start + text.length;
6255
  for (;;) {
@@ -6258,8 +6925,8 @@
6258
  var part = order[i];
6259
  if (part.to > start && part.from <= start) break;
6260
  }
6261
- if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title);
6262
- inner(builder, text.slice(0, part.to - start), style, startStyle, null, title);
6263
  startStyle = null;
6264
  text = text.slice(part.to - start);
6265
  start = part.to;
@@ -6269,8 +6936,14 @@
6269
 
6270
  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
6271
  var widget = !ignoreWidget && marker.widgetNode;
 
 
 
 
 
 
6272
  if (widget) {
6273
- builder.map.push(builder.pos, builder.pos + size, widget);
6274
  builder.content.appendChild(widget);
6275
  }
6276
  builder.pos += size;
@@ -6295,8 +6968,13 @@
6295
  var foundBookmarks = [];
6296
  for (var j = 0; j < spans.length; ++j) {
6297
  var sp = spans[j], m = sp.marker;
6298
- if (sp.from <= pos && (sp.to == null || sp.to > pos)) {
6299
- if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
 
 
 
 
 
6300
  if (m.className) spanStyle += " " + m.className;
6301
  if (m.css) css = m.css;
6302
  if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
@@ -6307,12 +6985,12 @@
6307
  } else if (sp.from > pos && nextChange > sp.from) {
6308
  nextChange = sp.from;
6309
  }
6310
- if (m.type == "bookmark" && sp.from == pos && m.widgetNode) foundBookmarks.push(m);
6311
  }
6312
  if (collapsed && (collapsed.from || 0) == pos) {
6313
  buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
6314
  collapsed.marker, collapsed.from == null);
6315
  if (collapsed.to == null) return;
 
6316
  }
6317
  if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)
6318
  buildCollapsedSpan(builder, 0, foundBookmarks[j]);
@@ -6775,13 +7453,19 @@
6775
  });
6776
  }),
6777
 
 
 
 
 
 
6778
  markText: function(from, to, options) {
6779
  return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
6780
  },
6781
  setBookmark: function(pos, options) {
6782
  var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
6783
  insertLeft: options && options.insertLeft,
6784
- clearWhenEmpty: false, shared: options && options.shared};
 
6785
  pos = clipPos(this, pos);
6786
  return markText(this, pos, pos, realOpts, "bookmark");
6787
  },
@@ -7488,14 +8172,15 @@
7488
  return out;
7489
  }
7490
 
 
 
7491
  function createObj(base, props) {
7492
  var inst;
7493
  if (Object.create) {
7494
  inst = Object.create(base);
7495
  } else {
7496
- var ctor = function() {};
7497
- ctor.prototype = base;
7498
- inst = new ctor();
7499
  }
7500
  if (props) copyObj(props, inst);
7501
  return inst;
@@ -7514,7 +8199,7 @@
7514
  return function(){return f.apply(null, args);};
7515
  }
7516
 
7517
- var nonASCIISingleCaseWordChar = /[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
7518
  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {
7519
  return /\w/.test(ch) || ch > "\x80" &&
7520
  (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
@@ -7550,9 +8235,9 @@
7550
  }
7551
 
7552
  var range;
7553
- if (document.createRange) range = function(node, start, end) {
7554
  var r = document.createRange();
7555
- r.setEnd(node, end);
7556
  r.setStart(node, start);
7557
  return r;
7558
  };
@@ -7576,12 +8261,16 @@
7576
  return removeChildren(parent).appendChild(e);
7577
  }
7578
 
7579
- function contains(parent, child) {
 
 
7580
  if (parent.contains)
7581
  return parent.contains(child);
7582
- while (child = child.parentNode)
 
7583
  if (child == parent) return true;
7584
- }
 
7585
 
7586
  function activeElt() { return document.activeElement; }
7587
  // Older versions of IE throws unspecified error when touching
@@ -7666,8 +8355,10 @@
7666
  if (measure.firstChild.offsetHeight != 0)
7667
  zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);
7668
  }
7669
- if (zwspSupported) return elt("span", "\u200b");
7670
- else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
 
 
7671
  }
7672
 
7673
  // Feature-detect IE's crummy client rect reporting for bidi text
@@ -8030,6 +8721,8 @@
8030
  lst(order).to -= m[0].length;
8031
  order.push(new BidiSpan(0, len - m[0].length, len));
8032
  }
 
 
8033
  if (order[0].level != lst(order).level)
8034
  order.push(new BidiSpan(order[0].level, len, len));
8035
 
@@ -8039,7 +8732,7 @@
8039
 
8040
  // THE END
8041
 
8042
- CodeMirror.version = "4.12.0";
8043
 
8044
  return CodeMirror;
8045
  });
23
  // detected are enabled based on userAgent etc sniffing.
24
 
25
  var gecko = /gecko\/\d/i.test(navigator.userAgent);
 
26
  var ie_upto10 = /MSIE \d/.test(navigator.userAgent);
27
  var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
28
  var ie = ie_upto10 || ie_11up;
32
  var chrome = /Chrome\//.test(navigator.userAgent);
33
  var presto = /Opera\//.test(navigator.userAgent);
34
  var safari = /Apple Computer/.test(navigator.vendor);
 
35
  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
36
  var phantom = /PhantomJS/.test(navigator.userAgent);
37
 
68
  if (typeof doc == "string") doc = new Doc(doc, options.mode);
69
  this.doc = doc;
70
 
71
+ var input = new CodeMirror.inputStyles[options.inputStyle](this);
72
+ var display = this.display = new Display(place, doc, input);
73
  display.wrapper.CodeMirror = this;
74
  updateGutters(this);
75
  themeChanged(this);
76
  if (options.lineWrapping)
77
  this.display.wrapper.className += " CodeMirror-wrap";
78
+ if (options.autofocus && !mobile) display.input.focus();
79
  initScrollbars(this);
80
 
81
  this.state = {
82
  keyMaps: [], // stores maps added by addKeyMap
83
  overlays: [], // highlighting overlays, as added by addOverlay
84
  modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info
85
+ overwrite: false,
86
+ delayingBlurEvent: false,
87
+ focused: false,
88
  suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
89
+ pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll
90
  draggingText: false,
91
  highlight: new Delayed(), // stores highlight worker timeout
92
+ keySeq: null, // Unfinished key sequence
93
+ specialChars: null
94
  };
95
 
96
+ var cm = this;
97
+
98
  // Override magic textarea content restore that IE sometimes does
99
  // on our hidden textarea on reload
100
+ if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20);
101
 
102
  registerEventHandlers(this);
103
  ensureGlobalHandlers();
106
  this.curOp.forceUpdate = true;
107
  attachDoc(this, doc);
108
 
109
+ if ((options.autofocus && !mobile) || cm.hasFocus())
110
  setTimeout(bind(onFocus, this), 20);
111
  else
112
  onBlur(this);
114
  for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))
115
  optionHandlers[opt](this, options[opt], Init);
116
  maybeUpdateLineNumberWidth(this);
117
+ if (options.finishInit) options.finishInit(this);
118
  for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
119
  endOperation(this);
120
  // Suppress optimizelegibility in Webkit, since it breaks text
130
  // and content drawing. It holds references to DOM nodes and
131
  // display-related state.
132
 
133
+ function Display(place, doc, input) {
134
  var d = this;
135
+ this.input = input;
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  // Covers bottom-right square when both scrollbars are present.
138
  d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
139
+ d.scrollbarFiller.setAttribute("cm-not-content", "true");
140
  // Covers bottom of gutter when coverGutterNextToScrollbar is on
141
  // and h scrollbar is present.
142
  d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
143
+ d.gutterFiller.setAttribute("cm-not-content", "true");
144
  // Will contain the actual code, positioned to cover the viewport.
145
  d.lineDiv = elt("div", null, "CodeMirror-code");
146
  // Elements are added to these to represent selection and cursors.
169
  d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
170
  d.scroller.setAttribute("tabIndex", "-1");
171
  // The element in which the editor lives.
172
+ d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
173
 
174
  // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
175
  if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
176
+ if (!webkit && !(gecko && mobile)) d.scroller.draggable = true;
 
 
 
 
177
 
178
  if (place) {
179
  if (place.appendChild) place.appendChild(d.wrapper);
200
  // Used to only resize the line number gutter when necessary (when
201
  // the amount of lines crosses a boundary that makes its width change)
202
  d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
 
 
203
  // Set to true when a non-horizontal-scrolling line widget is
204
  // added. As an optimization, line widget aligning is skipped when
205
  // this is false.
206
  d.alignWidgets = false;
 
 
 
 
 
 
207
 
208
  d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
209
 
 
 
 
 
210
  // Tracks the maximum line length so that the horizontal scrollbar
211
  // can be kept static when scrolling.
212
  d.maxLine = null;
222
  // Used to track whether anything happened since the context menu
223
  // was opened.
224
  d.selForContextMenu = null;
225
+
226
+ d.activeTouch = null;
227
+
228
+ input.init(d);
229
  }
230
 
231
  // STATE UPDATES
493
 
494
  cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {
495
  cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
496
+ // Prevent clicks in the scrollbars from killing focus
497
  on(node, "mousedown", function() {
498
+ if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0);
499
  });
500
+ node.setAttribute("cm-not-content", "true");
501
  }, function(pos, axis) {
502
  if (axis == "horizontal") setScrollLeft(cm, pos);
503
  else setScrollTop(cm, pos);
594
  "CodeMirror-linenumber CodeMirror-gutter-elt"));
595
  var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
596
  display.lineGutter.style.width = "";
597
+ display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
598
  display.lineNumWidth = display.lineNumInnerWidth + padding;
599
  display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
600
  display.lineGutter.style.width = display.lineNumWidth + "px";
629
  this.oldDisplayWidth = displayWidth(cm);
630
  this.force = force;
631
  this.dims = getDimensions(cm);
632
+ this.events = [];
633
  }
634
 
635
+ DisplayUpdate.prototype.signal = function(emitter, type) {
636
+ if (hasHandler(emitter, type))
637
+ this.events.push(arguments);
638
+ };
639
+ DisplayUpdate.prototype.finish = function() {
640
+ for (var i = 0; i < this.events.length; i++)
641
+ signal.apply(null, this.events[i]);
642
+ };
643
+
644
  function maybeClipScrollbars(cm) {
645
  var display = cm.display;
646
  if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
751
  updateScrollbars(cm, barMeasure);
752
  }
753
 
754
+ update.signal(cm, "update", cm);
755
  if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
756
+ update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
757
  cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
758
  }
759
  }
767
  updateSelection(cm);
768
  setDocumentHeight(cm, barMeasure);
769
  updateScrollbars(cm, barMeasure);
770
+ update.finish();
771
  }
772
  }
773
 
852
  for (var i = 0; i < view.length; i++) {
853
  var lineView = view[i];
854
  if (lineView.hidden) {
855
+ } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
856
  var node = buildLineElement(cm, lineView, lineN, dims);
857
  container.insertBefore(node, cur);
858
  } else { // Already drawn
883
  if (type == "text") updateLineText(cm, lineView);
884
  else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
885
  else if (type == "class") updateLineClasses(lineView);
886
+ else if (type == "widget") updateLineWidgets(cm, lineView, dims);
887
  }
888
  lineView.changes = null;
889
  }
961
  var markers = lineView.line.gutterMarkers;
962
  if (cm.options.lineNumbers || markers) {
963
  var wrap = ensureLineWrapped(lineView);
964
+ var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " +
965
+ (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +
966
+ "px; width: " + dims.gutterTotalWidth + "px");
967
+ cm.display.input.setUneditable(gutterWrap);
968
+ wrap.insertBefore(gutterWrap, lineView.text);
969
  if (lineView.line.gutterClass)
970
  gutterWrap.className += " " + lineView.line.gutterClass;
971
  if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
983
  }
984
  }
985
 
986
+ function updateLineWidgets(cm, lineView, dims) {
987
  if (lineView.alignable) lineView.alignable = null;
988
  for (var node = lineView.node.firstChild, next; node; node = next) {
989
  var next = node.nextSibling;
990
  if (node.className == "CodeMirror-linewidget")
991
  lineView.node.removeChild(node);
992
  }
993
+ insertLineWidgets(cm, lineView, dims);
994
  }
995
 
996
  // Build a line's DOM representation from scratch
1002
 
1003
  updateLineClasses(lineView);
1004
  updateLineGutter(cm, lineView, lineN, dims);
1005
+ insertLineWidgets(cm, lineView, dims);
1006
  return lineView.node;
1007
  }
1008
 
1009
  // A lineView may contain multiple logical lines (when merged by
1010
  // collapsed spans). The widgets for all of them need to be drawn.
1011
+ function insertLineWidgets(cm, lineView, dims) {
1012
+ insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
1013
  if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)
1014
+ insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);
1015
  }
1016
 
1017
+ function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
1018
  if (!line.widgets) return;
1019
  var wrap = ensureLineWrapped(lineView);
1020
  for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
1021
  var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
1022
  if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true");
1023
  positionLineWidget(widget, node, lineView, dims);
1024
+ cm.display.input.setUneditable(node);
1025
  if (allowAbove && widget.above)
1026
  wrap.insertBefore(node, lineView.gutter || lineView.text);
1027
  else
1064
  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }
1065
  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }
1066
 
1067
+ // INPUT HANDLING
1068
+
1069
+ function ensureFocus(cm) {
1070
+ if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }
1071
+ }
1072
+
1073
+ function isReadOnly(cm) {
1074
+ return cm.options.readOnly || cm.doc.cantEdit;
1075
+ }
1076
+
1077
+ // This will be set to an array of strings when copying, so that,
1078
+ // when pasting, we know what kind of selections the copied text
1079
+ // was made out of.
1080
+ var lastCopied = null;
1081
+
1082
+ function applyTextInput(cm, inserted, deleted, sel, origin) {
1083
+ var doc = cm.doc;
1084
+ cm.display.shift = false;
1085
+ if (!sel) sel = doc.sel;
1086
+
1087
+ var textLines = splitLines(inserted), multiPaste = null;
1088
+ // When pasing N lines into N selections, insert one line per selection
1089
+ if (cm.state.pasteIncoming && sel.ranges.length > 1) {
1090
+ if (lastCopied && lastCopied.join("\n") == inserted)
1091
+ multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);
1092
+ else if (textLines.length == sel.ranges.length)
1093
+ multiPaste = map(textLines, function(l) { return [l]; });
1094
+ }
1095
+
1096
+ // Normal behavior is to insert the new text into every selection
1097
+ for (var i = sel.ranges.length - 1; i >= 0; i--) {
1098
+ var range = sel.ranges[i];
1099
+ var from = range.from(), to = range.to();
1100
+ if (range.empty()) {
1101
+ if (deleted && deleted > 0) // Handle deletion
1102
+ from = Pos(from.line, from.ch - deleted);
1103
+ else if (cm.state.overwrite && !cm.state.pasteIncoming) // Handle overwrite
1104
+ to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
1105
+ }
1106
+ var updateInput = cm.curOp.updateInput;
1107
+ var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
1108
+ origin: origin || (cm.state.pasteIncoming ? "paste" : cm.state.cutIncoming ? "cut" : "+input")};
1109
+ makeChange(cm.doc, changeEvent);
1110
+ signalLater(cm, "inputRead", cm, changeEvent);
1111
+ // When an 'electric' character is inserted, immediately trigger a reindent
1112
+ if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&
1113
+ cm.options.smartIndent && range.head.ch < 100 &&
1114
+ (!i || sel.ranges[i - 1].head.line != range.head.line)) {
1115
+ var mode = cm.getModeAt(range.head);
1116
+ var end = changeEnd(changeEvent);
1117
+ var indented = false;
1118
+ if (mode.electricChars) {
1119
+ for (var j = 0; j < mode.electricChars.length; j++)
1120
+ if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
1121
+ indented = indentLine(cm, end.line, "smart");
1122
+ break;
1123
+ }
1124
+ } else if (mode.electricInput) {
1125
+ if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))
1126
+ indented = indentLine(cm, end.line, "smart");
1127
+ }
1128
+ if (indented) signalLater(cm, "electricInput", cm, end.line);
1129
+ }
1130
+ }
1131
+ ensureCursorVisible(cm);
1132
+ cm.curOp.updateInput = updateInput;
1133
+ cm.curOp.typing = true;
1134
+ cm.state.pasteIncoming = cm.state.cutIncoming = false;
1135
+ }
1136
+
1137
+ function copyableRanges(cm) {
1138
+ var text = [], ranges = [];
1139
+ for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
1140
+ var line = cm.doc.sel.ranges[i].head.line;
1141
+ var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
1142
+ ranges.push(lineRange);
1143
+ text.push(cm.getRange(lineRange.anchor, lineRange.head));
1144
+ }
1145
+ return {text: text, ranges: ranges};
1146
+ }
1147
+
1148
+ function disableBrowserMagic(field) {
1149
+ field.setAttribute("autocorrect", "off");
1150
+ field.setAttribute("autocapitalize", "off");
1151
+ field.setAttribute("spellcheck", "false");
1152
+ }
1153
+
1154
+ // TEXTAREA INPUT STYLE
1155
+
1156
+ function TextareaInput(cm) {
1157
+ this.cm = cm;
1158
+ // See input.poll and input.reset
1159
+ this.prevInput = "";
1160
+
1161
+ // Flag that indicates whether we expect input to appear real soon
1162
+ // now (after some event like 'keypress' or 'input') and are
1163
+ // polling intensively.
1164
+ this.pollingFast = false;
1165
+ // Self-resetting timeout for the poller
1166
+ this.polling = new Delayed();
1167
+ // Tracks when input.reset has punted to just putting a short
1168
+ // string into the textarea instead of the full selection.
1169
+ this.inaccurateSelection = false;
1170
+ // Used to work around IE issue with selection being forgotten when focus moves away from textarea
1171
+ this.hasSelection = false;
1172
+ this.composing = null;
1173
+ };
1174
+
1175
+ function hiddenTextarea() {
1176
+ var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
1177
+ var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
1178
+ // The textarea is kept positioned near the cursor to prevent the
1179
+ // fact that it'll be scrolled into view on input from scrolling
1180
+ // our fake cursor out of view. On webkit, when wrap=off, paste is
1181
+ // very slow. So make the area wide instead.
1182
+ if (webkit) te.style.width = "1000px";
1183
+ else te.setAttribute("wrap", "off");
1184
+ // If border: 0; -- iOS fails to open keyboard (issue #1287)
1185
+ if (ios) te.style.border = "1px solid black";
1186
+ disableBrowserMagic(te);
1187
+ return div;
1188
+ }
1189
+
1190
+ TextareaInput.prototype = copyObj({
1191
+ init: function(display) {
1192
+ var input = this, cm = this.cm;
1193
+
1194
+ // Wraps and hides input textarea
1195
+ var div = this.wrapper = hiddenTextarea();
1196
+ // The semihidden textarea that is focused when the editor is
1197
+ // focused, and receives input.
1198
+ var te = this.textarea = div.firstChild;
1199
+ display.wrapper.insertBefore(div, display.wrapper.firstChild);
1200
+
1201
+ // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
1202
+ if (ios) te.style.width = "0px";
1203
+
1204
+ on(te, "input", function() {
1205
+ if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null;
1206
+ input.poll();
1207
+ });
1208
+
1209
+ on(te, "paste", function() {
1210
+ // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206
1211
+ // Add a char to the end of textarea before paste occur so that
1212
+ // selection doesn't span to the end of textarea.
1213
+ if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
1214
+ var start = te.selectionStart, end = te.selectionEnd;
1215
+ te.value += "$";
1216
+ // The selection end needs to be set before the start, otherwise there
1217
+ // can be an intermediate non-empty selection between the two, which
1218
+ // can override the middle-click paste buffer on linux and cause the
1219
+ // wrong thing to get pasted.
1220
+ te.selectionEnd = end;
1221
+ te.selectionStart = start;
1222
+ cm.state.fakedLastChar = true;
1223
+ }
1224
+ cm.state.pasteIncoming = true;
1225
+ input.fastPoll();
1226
+ });
1227
+
1228
+ function prepareCopyCut(e) {
1229
+ if (cm.somethingSelected()) {
1230
+ lastCopied = cm.getSelections();
1231
+ if (input.inaccurateSelection) {
1232
+ input.prevInput = "";
1233
+ input.inaccurateSelection = false;
1234
+ te.value = lastCopied.join("\n");
1235
+ selectInput(te);
1236
+ }
1237
+ } else if (!cm.options.lineWiseCopyCut) {
1238
+ return;
1239
+ } else {
1240
+ var ranges = copyableRanges(cm);
1241
+ lastCopied = ranges.text;
1242
+ if (e.type == "cut") {
1243
+ cm.setSelections(ranges.ranges, null, sel_dontScroll);
1244
+ } else {
1245
+ input.prevInput = "";
1246
+ te.value = ranges.text.join("\n");
1247
+ selectInput(te);
1248
+ }
1249
+ }
1250
+ if (e.type == "cut") cm.state.cutIncoming = true;
1251
+ }
1252
+ on(te, "cut", prepareCopyCut);
1253
+ on(te, "copy", prepareCopyCut);
1254
+
1255
+ on(display.scroller, "paste", function(e) {
1256
+ if (eventInWidget(display, e)) return;
1257
+ cm.state.pasteIncoming = true;
1258
+ input.focus();
1259
+ });
1260
+
1261
+ // Prevent normal selection in the editor (we handle our own)
1262
+ on(display.lineSpace, "selectstart", function(e) {
1263
+ if (!eventInWidget(display, e)) e_preventDefault(e);
1264
+ });
1265
+
1266
+ on(te, "compositionstart", function() {
1267
+ var start = cm.getCursor("from");
1268
+ input.composing = {
1269
+ start: start,
1270
+ range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
1271
+ };
1272
+ });
1273
+ on(te, "compositionend", function() {
1274
+ if (input.composing) {
1275
+ input.poll();
1276
+ input.composing.range.clear();
1277
+ input.composing = null;
1278
+ }
1279
+ });
1280
+ },
1281
+
1282
+ prepareSelection: function() {
1283
+ // Redraw the selection and/or cursor
1284
+ var cm = this.cm, display = cm.display, doc = cm.doc;
1285
+ var result = prepareSelection(cm);
1286
+
1287
+ // Move the hidden textarea near the cursor to prevent scrolling artifacts
1288
+ if (cm.options.moveInputWithCursor) {
1289
+ var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
1290
+ var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
1291
+ result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
1292
+ headPos.top + lineOff.top - wrapOff.top));
1293
+ result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
1294
+ headPos.left + lineOff.left - wrapOff.left));
1295
+ }
1296
+
1297
+ return result;
1298
+ },
1299
+
1300
+ showSelection: function(drawn) {
1301
+ var cm = this.cm, display = cm.display;
1302
+ removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
1303
+ removeChildrenAndAdd(display.selectionDiv, drawn.selection);
1304
+ if (drawn.teTop != null) {
1305
+ this.wrapper.style.top = drawn.teTop + "px";
1306
+ this.wrapper.style.left = drawn.teLeft + "px";
1307
+ }
1308
+ },
1309
+
1310
+ // Reset the input to correspond to the selection (or to be empty,
1311
+ // when not typing and nothing is selected)
1312
+ reset: function(typing) {
1313
+ if (this.contextMenuPending) return;
1314
+ var minimal, selected, cm = this.cm, doc = cm.doc;
1315
+ if (cm.somethingSelected()) {
1316
+ this.prevInput = "";
1317
+ var range = doc.sel.primary();
1318
+ minimal = hasCopyEvent &&
1319
+ (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);
1320
+ var content = minimal ? "-" : selected || cm.getSelection();
1321
+ this.textarea.value = content;
1322
+ if (cm.state.focused) selectInput(this.textarea);
1323
+ if (ie && ie_version >= 9) this.hasSelection = content;
1324
+ } else if (!typing) {
1325
+ this.prevInput = this.textarea.value = "";
1326
+ if (ie && ie_version >= 9) this.hasSelection = null;
1327
+ }
1328
+ this.inaccurateSelection = minimal;
1329
+ },
1330
+
1331
+ getField: function() { return this.textarea; },
1332
+
1333
+ supportsTouch: function() { return false; },
1334
+
1335
+ focus: function() {
1336
+ if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
1337
+ try { this.textarea.focus(); }
1338
+ catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
1339
+ }
1340
+ },
1341
+
1342
+ blur: function() { this.textarea.blur(); },
1343
+
1344
+ resetPosition: function() {
1345
+ this.wrapper.style.top = this.wrapper.style.left = 0;
1346
+ },
1347
+
1348
+ receivedFocus: function() { this.slowPoll(); },
1349
+
1350
+ // Poll for input changes, using the normal rate of polling. This
1351
+ // runs as long as the editor is focused.
1352
+ slowPoll: function() {
1353
+ var input = this;
1354
+ if (input.pollingFast) return;
1355
+ input.polling.set(this.cm.options.pollInterval, function() {
1356
+ input.poll();
1357
+ if (input.cm.state.focused) input.slowPoll();
1358
+ });
1359
+ },
1360
+
1361
+ // When an event has just come in that is likely to add or change
1362
+ // something in the input textarea, we poll faster, to ensure that
1363
+ // the change appears on the screen quickly.
1364
+ fastPoll: function() {
1365
+ var missed = false, input = this;
1366
+ input.pollingFast = true;
1367
+ function p() {
1368
+ var changed = input.poll();
1369
+ if (!changed && !missed) {missed = true; input.polling.set(60, p);}
1370
+ else {input.pollingFast = false; input.slowPoll();}
1371
+ }
1372
+ input.polling.set(20, p);
1373
+ },
1374
+
1375
+ // Read input from the textarea, and update the document to match.
1376
+ // When something is selected, it is present in the textarea, and
1377
+ // selected (unless it is huge, in which case a placeholder is
1378
+ // used). When nothing is selected, the cursor sits after previously
1379
+ // seen text (can be empty), which is stored in prevInput (we must
1380
+ // not reset the textarea when typing, because that breaks IME).
1381
+ poll: function() {
1382
+ var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
1383
+ // Since this is called a *lot*, try to bail out as cheaply as
1384
+ // possible when it is clear that nothing happened. hasSelection
1385
+ // will be the case when there is a lot of text in the textarea,
1386
+ // in which case reading its value would be expensive.
1387
+ if (!cm.state.focused || (hasSelection(input) && !prevInput) ||
1388
+ isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)
1389
+ return false;
1390
+ // See paste handler for more on the fakedLastChar kludge
1391
+ if (cm.state.pasteIncoming && cm.state.fakedLastChar) {
1392
+ input.value = input.value.substring(0, input.value.length - 1);
1393
+ cm.state.fakedLastChar = false;
1394
+ }
1395
+ var text = input.value;
1396
+ // If nothing changed, bail.
1397
+ if (text == prevInput && !cm.somethingSelected()) return false;
1398
+ // Work around nonsensical selection resetting in IE9/10, and
1399
+ // inexplicable appearance of private area unicode characters on
1400
+ // some key combos in Mac (#2689).
1401
+ if (ie && ie_version >= 9 && this.hasSelection === text ||
1402
+ mac && /[\uf700-\uf7ff]/.test(text)) {
1403
+ cm.display.input.reset();
1404
+ return false;
1405
+ }
1406
+
1407
+ if (cm.doc.sel == cm.display.selForContextMenu) {
1408
+ var first = text.charCodeAt(0);
1409
+ if (first == 0x200b && !prevInput) prevInput = "\u200b";
1410
+ if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo"); }
1411
+ }
1412
+ // Find the part of the input that is actually new
1413
+ var same = 0, l = Math.min(prevInput.length, text.length);
1414
+ while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
1415
+
1416
+ var self = this;
1417
+ runInOp(cm, function() {
1418
+ applyTextInput(cm, text.slice(same), prevInput.length - same,
1419
+ null, self.composing ? "*compose" : null);
1420
+
1421
+ // Don't leave long text in the textarea, since it makes further polling slow
1422
+ if (text.length > 1000 || text.indexOf("\n") > -1) input.value = self.prevInput = "";
1423
+ else self.prevInput = text;
1424
+
1425
+ if (self.composing) {
1426
+ self.composing.range.clear();
1427
+ self.composing.range = cm.markText(self.composing.start, cm.getCursor("to"),
1428
+ {className: "CodeMirror-composing"});
1429
+ }
1430
+ });
1431
+ return true;
1432
+ },
1433
+
1434
+ ensurePolled: function() {
1435
+ if (this.pollingFast && this.poll()) this.pollingFast = false;
1436
+ },
1437
+
1438
+ onKeyPress: function() {
1439
+ if (ie && ie_version >= 9) this.hasSelection = null;
1440
+ this.fastPoll();
1441
+ },
1442
+
1443
+ onContextMenu: function(e) {
1444
+ var input = this, cm = input.cm, display = cm.display, te = input.textarea;
1445
+ var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
1446
+ if (!pos || presto) return; // Opera is difficult.
1447
+
1448
+ // Reset the current text selection only if the click is done outside of the selection
1449
+ // and 'resetSelectionOnContextMenu' option is true.
1450
+ var reset = cm.options.resetSelectionOnContextMenu;
1451
+ if (reset && cm.doc.sel.contains(pos) == -1)
1452
+ operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
1453
+
1454
+ var oldCSS = te.style.cssText;
1455
+ input.wrapper.style.position = "absolute";
1456
+ te.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
1457
+ "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " +
1458
+ (ie ? "rgba(255, 255, 255, .05)" : "transparent") +
1459
+ "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
1460
+ if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)
1461
+ display.input.focus();
1462
+ if (webkit) window.scrollTo(null, oldScrollY);
1463
+ display.input.reset();
1464
+ // Adds "Select all" to context menu in FF
1465
+ if (!cm.somethingSelected()) te.value = input.prevInput = " ";
1466
+ input.contextMenuPending = true;
1467
+ display.selForContextMenu = cm.doc.sel;
1468
+ clearTimeout(display.detectingSelectAll);
1469
+
1470
+ // Select-all will be greyed out if there's nothing to select, so
1471
+ // this adds a zero-width space so that we can later check whether
1472
+ // it got selected.
1473
+ function prepareSelectAllHack() {
1474
+ if (te.selectionStart != null) {
1475
+ var selected = cm.somethingSelected();
1476
+ var extval = "\u200b" + (selected ? te.value : "");
1477
+ te.value = "\u21da"; // Used to catch context-menu undo
1478
+ te.value = extval;
1479
+ input.prevInput = selected ? "" : "\u200b";
1480
+ te.selectionStart = 1; te.selectionEnd = extval.length;
1481
+ // Re-set this, in case some other handler touched the
1482
+ // selection in the meantime.
1483
+ display.selForContextMenu = cm.doc.sel;
1484
+ }
1485
+ }
1486
+ function rehide() {
1487
+ input.contextMenuPending = false;
1488
+ input.wrapper.style.position = "relative";
1489
+ te.style.cssText = oldCSS;
1490
+ if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
1491
+
1492
+ // Try to detect the user choosing select-all
1493
+ if (te.selectionStart != null) {
1494
+ if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();
1495
+ var i = 0, poll = function() {
1496
+ if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
1497
+ te.selectionEnd > 0 && input.prevInput == "\u200b")
1498
+ operation(cm, commands.selectAll)(cm);
1499
+ else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);
1500
+ else display.input.reset();
1501
+ };
1502
+ display.detectingSelectAll = setTimeout(poll, 200);
1503
+ }
1504
+ }
1505
+
1506
+ if (ie && ie_version >= 9) prepareSelectAllHack();
1507
+ if (captureRightClick) {
1508
+ e_stop(e);
1509
+ var mouseup = function() {
1510
+ off(window, "mouseup", mouseup);
1511
+ setTimeout(rehide, 20);
1512
+ };
1513
+ on(window, "mouseup", mouseup);
1514
+ } else {
1515
+ setTimeout(rehide, 50);
1516
+ }
1517
+ },
1518
+
1519
+ setUneditable: nothing,
1520
+
1521
+ needsContentAttribute: false
1522
+ }, TextareaInput.prototype);
1523
+
1524
+ // CONTENTEDITABLE INPUT STYLE
1525
+
1526
+ function ContentEditableInput(cm) {
1527
+ this.cm = cm;
1528
+ this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
1529
+ this.polling = new Delayed();
1530
+ this.gracePeriod = false;
1531
+ }
1532
+
1533
+ ContentEditableInput.prototype = copyObj({
1534
+ init: function(display) {
1535
+ var input = this, cm = input.cm;
1536
+ var div = input.div = display.lineDiv;
1537
+ div.contentEditable = "true";
1538
+ disableBrowserMagic(div);
1539
+
1540
+ on(div, "paste", function(e) {
1541
+ var pasted = e.clipboardData && e.clipboardData.getData("text/plain");
1542
+ if (pasted) {
1543
+ e.preventDefault();
1544
+ cm.replaceSelection(pasted, null, "paste");
1545
+ }
1546
+ });
1547
+
1548
+ on(div, "compositionstart", function(e) {
1549
+ var data = e.data;
1550
+ input.composing = {sel: cm.doc.sel, data: data, startData: data};
1551
+ if (!data) return;
1552
+ var prim = cm.doc.sel.primary();
1553
+ var line = cm.getLine(prim.head.line);
1554
+ var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length));
1555
+ if (found > -1 && found <= prim.head.ch)
1556
+ input.composing.sel = simpleSelection(Pos(prim.head.line, found),
1557
+ Pos(prim.head.line, found + data.length));
1558
+ });
1559
+ on(div, "compositionupdate", function(e) {
1560
+ input.composing.data = e.data;
1561
+ });
1562
+ on(div, "compositionend", function(e) {
1563
+ var ours = input.composing;
1564
+ if (!ours) return;
1565
+ if (e.data != ours.startData && !/\u200b/.test(e.data))
1566
+ ours.data = e.data;
1567
+ // Need a small delay to prevent other code (input event,
1568
+ // selection polling) from doing damage when fired right after
1569
+ // compositionend.
1570
+ setTimeout(function() {
1571
+ if (!ours.handled)
1572
+ input.applyComposition(ours);
1573
+ if (input.composing == ours)
1574
+ input.composing = null;
1575
+ }, 50);
1576
+ });
1577
+
1578
+ on(div, "touchstart", function() {
1579
+ input.forceCompositionEnd();
1580
+ });
1581
+
1582
+ on(div, "input", function() {
1583
+ if (input.composing) return;
1584
+ if (!input.pollContent())
1585
+ runInOp(input.cm, function() {regChange(cm);});
1586
+ });
1587
+
1588
+ function onCopyCut(e) {
1589
+ if (cm.somethingSelected()) {
1590
+ lastCopied = cm.getSelections();
1591
+ if (e.type == "cut") cm.replaceSelection("", null, "cut");
1592
+ } else if (!cm.options.lineWiseCopyCut) {
1593
+ return;
1594
+ } else {
1595
+ var ranges = copyableRanges(cm);
1596
+ lastCopied = ranges.text;
1597
+ if (e.type == "cut") {
1598
+ cm.operation(function() {
1599
+ cm.setSelections(ranges.ranges, 0, sel_dontScroll);
1600
+ cm.replaceSelection("", null, "cut");
1601
+ });
1602
+ }
1603
+ }
1604
+ // iOS exposes the clipboard API, but seems to discard content inserted into it
1605
+ if (e.clipboardData && !ios) {
1606
+ e.preventDefault();
1607
+ e.clipboardData.clearData();
1608
+ e.clipboardData.setData("text/plain", lastCopied.join("\n"));
1609
+ } else {
1610
+ // Old-fashioned briefly-focus-a-textarea hack
1611
+ var kludge = hiddenTextarea(), te = kludge.firstChild;
1612
+ cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
1613
+ te.value = lastCopied.join("\n");
1614
+ var hadFocus = document.activeElement;
1615
+ selectInput(te);
1616
+ setTimeout(function() {
1617
+ cm.display.lineSpace.removeChild(kludge);
1618
+ hadFocus.focus();
1619
+ }, 50);
1620
+ }
1621
+ }
1622
+ on(div, "copy", onCopyCut);
1623
+ on(div, "cut", onCopyCut);
1624
+ },
1625
+
1626
+ prepareSelection: function() {
1627
+ var result = prepareSelection(this.cm, false);
1628
+ result.focus = this.cm.state.focused;
1629
+ return result;
1630
+ },
1631
+
1632
+ showSelection: function(info) {
1633
+ if (!info || !this.cm.display.view.length) return;
1634
+ if (info.focus) this.showPrimarySelection();
1635
+ this.showMultipleSelections(info);
1636
+ },
1637
+
1638
+ showPrimarySelection: function() {
1639
+ var sel = window.getSelection(), prim = this.cm.doc.sel.primary();
1640
+ var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset);
1641
+ var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset);
1642
+ if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
1643
+ cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&
1644
+ cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)
1645
+ return;
1646
+
1647
+ var start = posToDOM(this.cm, prim.from());
1648
+ var end = posToDOM(this.cm, prim.to());
1649
+ if (!start && !end) return;
1650
+
1651
+ var view = this.cm.display.view;
1652
+ var old = sel.rangeCount && sel.getRangeAt(0);
1653
+ if (!start) {
1654
+ start = {node: view[0].measure.map[2], offset: 0};
1655
+ } else if (!end) { // FIXME dangerously hacky
1656
+ var measure = view[view.length - 1].measure;
1657
+ var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
1658
+ end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};
1659
+ }
1660
+
1661
+ try { var rng = range(start.node, start.offset, end.offset, end.node); }
1662
+ catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
1663
+ if (rng) {
1664
+ sel.removeAllRanges();
1665
+ sel.addRange(rng);
1666
+ if (old && sel.anchorNode == null) sel.addRange(old);
1667
+ else if (gecko) this.startGracePeriod();
1668
+ }
1669
+ this.rememberSelection();
1670
+ },
1671
+
1672
+ startGracePeriod: function() {
1673
+ var input = this;
1674
+ clearTimeout(this.gracePeriod);
1675
+ this.gracePeriod = setTimeout(function() {
1676
+ input.gracePeriod = false;
1677
+ if (input.selectionChanged())
1678
+ input.cm.operation(function() { input.cm.curOp.selectionChanged = true; });
1679
+ }, 20);
1680
+ },
1681
+
1682
+ showMultipleSelections: function(info) {
1683
+ removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
1684
+ removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
1685
+ },
1686
+
1687
+ rememberSelection: function() {
1688
+ var sel = window.getSelection();
1689
+ this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
1690
+ this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
1691
+ },
1692
+
1693
+ selectionInEditor: function() {
1694
+ var sel = window.getSelection();
1695
+ if (!sel.rangeCount) return false;
1696
+ var node = sel.getRangeAt(0).commonAncestorContainer;
1697
+ return contains(this.div, node);
1698
+ },
1699
+
1700
+ focus: function() {
1701
+ if (this.cm.options.readOnly != "nocursor") this.div.focus();
1702
+ },
1703
+ blur: function() { this.div.blur(); },
1704
+ getField: function() { return this.div; },
1705
+
1706
+ supportsTouch: function() { return true; },
1707
+
1708
+ receivedFocus: function() {
1709
+ var input = this;
1710
+ if (this.selectionInEditor())
1711
+ this.pollSelection();
1712
+ else
1713
+ runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; });
1714
+
1715
+ function poll() {
1716
+ if (input.cm.state.focused) {
1717
+ input.pollSelection();
1718
+ input.polling.set(input.cm.options.pollInterval, poll);
1719
+ }
1720
+ }
1721
+ this.polling.set(this.cm.options.pollInterval, poll);
1722
+ },
1723
+
1724
+ selectionChanged: function() {
1725
+ var sel = window.getSelection();
1726
+ return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
1727
+ sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset;
1728
+ },
1729
+
1730
+ pollSelection: function() {
1731
+ if (!this.composing && !this.gracePeriod && this.selectionChanged()) {
1732
+ var sel = window.getSelection(), cm = this.cm;
1733
+ this.rememberSelection();
1734
+ var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
1735
+ var head = domToPos(cm, sel.focusNode, sel.focusOffset);
1736
+ if (anchor && head) runInOp(cm, function() {
1737
+ setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
1738
+ if (anchor.bad || head.bad) cm.curOp.selectionChanged = true;
1739
+ });
1740
+ }
1741
+ },
1742
+
1743
+ pollContent: function() {
1744
+ var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();
1745
+ var from = sel.from(), to = sel.to();
1746
+ if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false;
1747
+
1748
+ var fromIndex;
1749
+ if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
1750
+ var fromLine = lineNo(display.view[0].line);
1751
+ var fromNode = display.view[0].node;
1752
+ } else {
1753
+ var fromLine = lineNo(display.view[fromIndex].line);
1754
+ var fromNode = display.view[fromIndex - 1].node.nextSibling;
1755
+ }
1756
+ var toIndex = findViewIndex(cm, to.line);
1757
+ if (toIndex == display.view.length - 1) {
1758
+ var toLine = display.viewTo - 1;
1759
+ var toNode = display.view[toIndex].node;
1760
+ } else {
1761
+ var toLine = lineNo(display.view[toIndex + 1].line) - 1;
1762
+ var toNode = display.view[toIndex + 1].node.previousSibling;
1763
+ }
1764
+
1765
+ var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
1766
+ var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
1767
+ while (newText.length > 1 && oldText.length > 1) {
1768
+ if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
1769
+ else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }
1770
+ else break;
1771
+ }
1772
+
1773
+ var cutFront = 0, cutEnd = 0;
1774
+ var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);
1775
+ while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
1776
+ ++cutFront;
1777
+ var newBot = lst(newText), oldBot = lst(oldText);
1778
+ var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
1779
+ oldBot.length - (oldText.length == 1 ? cutFront : 0));
1780
+ while (cutEnd < maxCutEnd &&
1781
+ newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
1782
+ ++cutEnd;
1783
+
1784
+ newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd);
1785
+ newText[0] = newText[0].slice(cutFront);
1786
+
1787
+ var chFrom = Pos(fromLine, cutFront);
1788
+ var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
1789
+ if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
1790
+ replaceRange(cm.doc, newText, chFrom, chTo, "+input");
1791
+ return true;
1792
+ }
1793
+ },
1794
+
1795
+ ensurePolled: function() {
1796
+ this.forceCompositionEnd();
1797
+ },
1798
+ reset: function() {
1799
+ this.forceCompositionEnd();
1800
+ },
1801
+ forceCompositionEnd: function() {
1802
+ if (!this.composing || this.composing.handled) return;
1803
+ this.applyComposition(this.composing);
1804
+ this.composing.handled = true;
1805
+ this.div.blur();
1806
+ this.div.focus();
1807
+ },
1808
+ applyComposition: function(composing) {
1809
+ if (composing.data && composing.data != composing.startData)
1810
+ operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel);
1811
+ },
1812
+
1813
+ setUneditable: function(node) {
1814
+ node.setAttribute("contenteditable", "false");
1815
+ },
1816
+
1817
+ onKeyPress: function(e) {
1818
+ e.preventDefault();
1819
+ operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);
1820
+ },
1821
+
1822
+ onContextMenu: nothing,
1823
+ resetPosition: nothing,
1824
+
1825
+ needsContentAttribute: true
1826
+ }, ContentEditableInput.prototype);
1827
+
1828
+ function posToDOM(cm, pos) {
1829
+ var view = findViewForLine(cm, pos.line);
1830
+ if (!view || view.hidden) return null;
1831
+ var line = getLine(cm.doc, pos.line);
1832
+ var info = mapFromLineView(view, line, pos.line);
1833
+
1834
+ var order = getOrder(line), side = "left";
1835
+ if (order) {
1836
+ var partPos = getBidiPartAt(order, pos.ch);
1837
+ side = partPos % 2 ? "right" : "left";
1838
+ }
1839
+ var result = nodeAndOffsetInLineMap(info.map, pos.ch, "left");
1840
+ result.offset = result.collapse == "right" ? result.end : result.start;
1841
+ return result;
1842
+ }
1843
+
1844
+ function badPos(pos, bad) { if (bad) pos.bad = true; return pos; }
1845
+
1846
+ function domToPos(cm, node, offset) {
1847
+ var lineNode;
1848
+ if (node == cm.display.lineDiv) {
1849
+ lineNode = cm.display.lineDiv.childNodes[offset];
1850
+ if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);
1851
+ node = null; offset = 0;
1852
+ } else {
1853
+ for (lineNode = node;; lineNode = lineNode.parentNode) {
1854
+ if (!lineNode || lineNode == cm.display.lineDiv) return null;
1855
+ if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break;
1856
+ }
1857
+ }
1858
+ for (var i = 0; i < cm.display.view.length; i++) {
1859
+ var lineView = cm.display.view[i];
1860
+ if (lineView.node == lineNode)
1861
+ return locateNodeInLineView(lineView, node, offset);
1862
+ }
1863
+ }
1864
+
1865
+ function locateNodeInLineView(lineView, node, offset) {
1866
+ var wrapper = lineView.text.firstChild, bad = false;
1867
+ if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true);
1868
+ if (node == wrapper) {
1869
+ bad = true;
1870
+ node = wrapper.childNodes[offset];
1871
+ offset = 0;
1872
+ if (!node) {
1873
+ var line = lineView.rest ? lst(lineView.rest) : lineView.line;
1874
+ return badPos(Pos(lineNo(line), line.text.length), bad);
1875
+ }
1876
+ }
1877
+
1878
+ var textNode = node.nodeType == 3 ? node : null, topNode = node;
1879
+ if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
1880
+ textNode = node.firstChild;
1881
+ if (offset) offset = textNode.nodeValue.length;
1882
+ }
1883
+ while (topNode.parentNode != wrapper) topNode = topNode.parentNode;
1884
+ var measure = lineView.measure, maps = measure.maps;
1885
+
1886
+ function find(textNode, topNode, offset) {
1887
+ for (var i = -1; i < (maps ? maps.length : 0); i++) {
1888
+ var map = i < 0 ? measure.map : maps[i];
1889
+ for (var j = 0; j < map.length; j += 3) {
1890
+ var curNode = map[j + 2];
1891
+ if (curNode == textNode || curNode == topNode) {
1892
+ var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
1893
+ var ch = map[j] + offset;
1894
+ if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)];
1895
+ return Pos(line, ch);
1896
+ }
1897
+ }
1898
+ }
1899
+ }
1900
+ var found = find(textNode, topNode, offset);
1901
+ if (found) return badPos(found, bad);
1902
+
1903
+ // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
1904
+ for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
1905
+ found = find(after, after.firstChild, 0);
1906
+ if (found)
1907
+ return badPos(Pos(found.line, found.ch - dist), bad);
1908
+ else
1909
+ dist += after.textContent.length;
1910
+ }
1911
+ for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) {
1912
+ found = find(before, before.firstChild, -1);
1913
+ if (found)
1914
+ return badPos(Pos(found.line, found.ch + dist), bad);
1915
+ else
1916
+ dist += after.textContent.length;
1917
+ }
1918
+ }
1919
+
1920
+ function domTextBetween(cm, from, to, fromLine, toLine) {
1921
+ var text = "", closing = false;
1922
+ function recognizeMarker(id) { return function(marker) { return marker.id == id; }; }
1923
+ function walk(node) {
1924
+ if (node.nodeType == 1) {
1925
+ var cmText = node.getAttribute("cm-text");
1926
+ if (cmText != null) {
1927
+ if (cmText == "") cmText = node.textContent.replace(/\u200b/g, "");
1928
+ text += cmText;
1929
+ return;
1930
+ }
1931
+ var markerID = node.getAttribute("cm-marker"), range;
1932
+ if (markerID) {
1933
+ var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
1934
+ if (found.length && (range = found[0].find()))
1935
+ text += getBetween(cm.doc, range.from, range.to).join("\n");
1936
+ return;
1937
+ }
1938
+ if (node.getAttribute("contenteditable") == "false") return;
1939
+ for (var i = 0; i < node.childNodes.length; i++)
1940
+ walk(node.childNodes[i]);
1941
+ if (/^(pre|div|p)$/i.test(node.nodeName))
1942
+ closing = true;
1943
+ } else if (node.nodeType == 3) {
1944
+ var val = node.nodeValue;
1945
+ if (!val) return;
1946
+ if (closing) {
1947
+ text += "\n";
1948
+ closing = false;
1949
+ }
1950
+ text += val;
1951
+ }
1952
+ }
1953
+ for (;;) {
1954
+ walk(from);
1955
+ if (from == to) break;
1956
+ from = from.nextSibling;
1957
+ }
1958
+ return text;
1959
+ }
1960
+
1961
+ CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};
1962
+
1963
  // SELECTION / CURSOR
1964
 
1965
  // Selection objects are immutable. A new one is created every time
2247
 
2248
  // SELECTION DRAWING
2249
 
2250
+ function updateSelection(cm) {
2251
+ cm.display.input.showSelection(cm.display.input.prepareSelection());
2252
+ }
2253
+
2254
+ function prepareSelection(cm, primary) {
2255
+ var doc = cm.doc, result = {};
2256
  var curFragment = result.cursors = document.createDocumentFragment();
2257
  var selFragment = result.selection = document.createDocumentFragment();
2258
 
2259
  for (var i = 0; i < doc.sel.ranges.length; i++) {
2260
+ if (primary === false && i == doc.sel.primIndex) continue;
2261
  var range = doc.sel.ranges[i];
2262
  var collapsed = range.empty();
2263
  if (collapsed || cm.options.showCursorWhenSelecting)
2265
  if (!collapsed)
2266
  drawSelectionRange(cm, range, selFragment);
2267
  }
 
 
 
 
 
 
 
 
 
 
 
2268
  return result;
2269
  }
2270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2271
  // Draws a cursor for the given range
2272
  function drawSelectionCursor(cm, range, output) {
2273
  var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine);
2590
 
2591
  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
2592
 
2593
+ function nodeAndOffsetInLineMap(map, ch, bias) {
 
 
2594
  var node, start, end, collapse;
2595
  // First, search the line map for the text node corresponding to,
2596
  // or closest to, the target character.
2624
  break;
2625
  }
2626
  }
2627
+ return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd};
2628
+ }
2629
+
2630
+ function measureCharInner(cm, prepared, ch, bias) {
2631
+ var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
2632
+ var node = place.node, start = place.start, end = place.end, collapse = place.collapse;
2633
 
2634
  var rect;
2635
  if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
2636
  for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned
2637
+ while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start;
2638
+ while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end;
2639
+ if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {
2640
  rect = node.parentNode.getBoundingClientRect();
2641
  } else if (ie && cm.options.lineWrapping) {
2642
  var rects = range(node, start, end).getClientRects();
2948
  updateMaxLine: false, // Set when the widest line needs to be determined anew
2949
  scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
2950
  scrollToPos: null, // Used to scroll to a specific position
2951
+ focus: false,
2952
  id: ++nextOpId // Unique ID
2953
  };
2954
  if (operationGroup) {
3042
  }
3043
 
3044
  if (op.updatedDisplay || op.selectionChanged)
3045
+ op.preparedSelection = display.input.prepareSelection();
3046
  }
3047
 
3048
  function endOperation_W2(op) {
3055
  cm.display.maxLineChanged = false;
3056
  }
3057
 
3058
+ if (op.preparedSelection)
3059
+ cm.display.input.showSelection(op.preparedSelection);
3060
  if (op.updatedDisplay)
3061
  setDocumentHeight(cm, op.barMeasure);
3062
  if (op.updatedDisplay || op.startHeight != cm.doc.height)
3065
  if (op.selectionChanged) restartBlink(cm);
3066
 
3067
  if (cm.state.focused && op.updateInput)
3068
+ cm.display.input.reset(op.typing);
3069
+ if (op.focus && op.focus == activeElt()) ensureFocus(op.cm);
3070
  }
3071
 
3072
  function endOperation_finish(op) {
3111
  // Fire change events, and delayed event handlers
3112
  if (op.changeObjs)
3113
  signal(cm, "changes", cm, op.changeObjs);
3114
+ if (op.update)
3115
+ op.update.finish();
3116
  }
3117
 
3118
  // Run the given function in an operation
3338
  return dirty;
3339
  }
3340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3341
  // EVENT HANDLERS
3342
 
3343
  // Attach the necessary event handlers when initializing the editor
3356
  }));
3357
  else
3358
  on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
 
 
 
 
3359
  // Some browsers fire contextmenu *after* opening the menu, at
3360
  // which point we can't mess with it anymore. Context menu is
3361
  // handled in onMouseDown for these browsers.
3362
  if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
3363
 
3364
+ // Used to suppress mouse event handling when a touch happens
3365
+ var touchFinished, prevTouch = {end: 0};
3366
+ function finishTouch() {
3367
+ if (d.activeTouch) {
3368
+ touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000);
3369
+ prevTouch = d.activeTouch;
3370
+ prevTouch.end = +new Date;
3371
+ }
3372
+ };
3373
+ function isMouseLikeTouchEvent(e) {
3374
+ if (e.touches.length != 1) return false;
3375
+ var touch = e.touches[0];
3376
+ return touch.radiusX <= 1 && touch.radiusY <= 1;
3377
+ }
3378
+ function farAway(touch, other) {
3379
+ if (other.left == null) return true;
3380
+ var dx = other.left - touch.left, dy = other.top - touch.top;
3381
+ return dx * dx + dy * dy > 20 * 20;
3382
+ }
3383
+ on(d.scroller, "touchstart", function(e) {
3384
+ if (!isMouseLikeTouchEvent(e)) {
3385
+ clearTimeout(touchFinished);
3386
+ var now = +new Date;
3387
+ d.activeTouch = {start: now, moved: false,
3388
+ prev: now - prevTouch.end <= 300 ? prevTouch : null};
3389
+ if (e.touches.length == 1) {
3390
+ d.activeTouch.left = e.touches[0].pageX;
3391
+ d.activeTouch.top = e.touches[0].pageY;
3392
+ }
3393
+ }
3394
+ });
3395
+ on(d.scroller, "touchmove", function() {
3396
+ if (d.activeTouch) d.activeTouch.moved = true;
3397
+ });
3398
+ on(d.scroller, "touchend", function(e) {
3399
+ var touch = d.activeTouch;
3400
+ if (touch && !eventInWidget(d, e) && touch.left != null &&
3401
+ !touch.moved && new Date - touch.start < 300) {
3402
+ var pos = cm.coordsChar(d.activeTouch, "page"), range;
3403
+ if (!touch.prev || farAway(touch, touch.prev)) // Single tap
3404
+ range = new Range(pos, pos);
3405
+ else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
3406
+ range = cm.findWordAt(pos);
3407
+ else // Triple tap
3408
+ range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));
3409
+ cm.setSelection(range.anchor, range.head);
3410
+ cm.focus();
3411
+ e_preventDefault(e);
3412
+ }
3413
+ finishTouch();
3414
+ });
3415
+ on(d.scroller, "touchcancel", finishTouch);
3416
+
3417
  // Sync scrolling between fake scrollbars and real scrollable
3418
  // area, ensure viewport is updated when scrolling.
3419
  on(d.scroller, "scroll", function() {
3431
  // Prevent wrapper from ever scrolling
3432
  on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
3433
 
3434
+ d.dragFunctions = {
3435
+ simple: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);},
3436
+ start: function(e){onDragStart(cm, e);},
3437
+ drop: operation(cm, onDrop)
3438
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3439
 
3440
+ var inp = d.input.getField();
3441
+ on(inp, "keyup", function(e) { onKeyUp.call(cm, e); });
3442
+ on(inp, "keydown", operation(cm, onKeyDown));
3443
+ on(inp, "keypress", operation(cm, onKeyPress));
3444
+ on(inp, "focus", bind(onFocus, cm));
3445
+ on(inp, "blur", bind(onBlur, cm));
3446
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3447
 
3448
+ function dragDropChanged(cm, value, old) {
3449
+ var wasOn = old && old != CodeMirror.Init;
3450
+ if (!value != !wasOn) {
3451
+ var funcs = cm.display.dragFunctions;
3452
+ var toggle = value ? on : off;
3453
+ toggle(cm.display.scroller, "dragstart", funcs.start);
3454
+ toggle(cm.display.scroller, "dragenter", funcs.simple);
3455
+ toggle(cm.display.scroller, "dragover", funcs.simple);
3456
+ toggle(cm.display.scroller, "drop", funcs.drop);
3457
+ }
3458
  }
3459
 
3460
  // Called when the window resizes
3486
  // coordinates beyond the right of the text.
3487
  function posFromMouse(cm, e, liberal, forRect) {
3488
  var display = cm.display;
3489
+ if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null;
3490
 
3491
  var x, y, space = display.lineSpace.getBoundingClientRect();
3492
  // Fails unpredictably on IE[67] when mouse is dragged around quickly.
3506
  // middle-click-paste. Or it might be a click on something we should
3507
  // not interfere with, such as a scrollbar or widget.
3508
  function onMouseDown(e) {
 
3509
  var cm = this, display = cm.display;
3510
+ if (display.activeTouch && display.input.supportsTouch() || signalDOMEvent(cm, e)) return;
3511
  display.shift = e.shiftKey;
3512
 
3513
  if (eventInWidget(display, e)) {
3533
  case 2:
3534
  if (webkit) cm.state.lastMiddleDown = +new Date;
3535
  if (start) extendSelection(cm.doc, start);
3536
+ setTimeout(function() {display.input.focus();}, 20);
3537
  e_preventDefault(e);
3538
  break;
3539
  case 3:
3540
  if (captureRightClick) onContextMenu(cm, e);
3541
+ else delayBlurEvent(cm);
3542
  break;
3543
  }
3544
  }
3545
 
3546
  var lastClick, lastDoubleClick;
3547
  function leftButtonDown(cm, e, start) {
3548
+ if (ie) setTimeout(bind(ensureFocus, cm), 0);
3549
+ else cm.curOp.focus = activeElt();
3550
 
3551
  var now = +new Date, type;
3552
  if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {
3571
  // Start a text drag. When it ends, see if any dragging actually
3572
  // happen, and treat as a click if it didn't.
3573
  function leftButtonStartDrag(cm, e, start, modifier) {
3574
+ var display = cm.display, startTime = +new Date;
3575
  var dragEnd = operation(cm, function(e2) {
3576
  if (webkit) display.scroller.draggable = false;
3577
  cm.state.draggingText = false;
3579
  off(display.scroller, "drop", dragEnd);
3580
  if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
3581
  e_preventDefault(e2);
3582
+ if (!modifier && +new Date - 200 < startTime)
3583
  extendSelection(cm.doc, start);
3584
+ // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
3585
+ if (webkit || ie && ie_version == 9)
3586
+ setTimeout(function() {document.body.focus(); display.input.focus();}, 20);
3587
+ else
3588
+ display.input.focus();
3589
  }
3590
  });
3591
  // Let the drag handler handle this.
3611
  ourRange = new Range(start, start);
3612
  } else {
3613
  ourRange = doc.sel.primary();
3614
+ ourIndex = doc.sel.primIndex;
3615
  }
3616
 
3617
  if (e.altKey) {
3643
  ourIndex = ranges.length;
3644
  setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),
3645
  {scroll: false, origin: "*mouse"});
3646
+ } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) {
3647
  setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0));
3648
  startSel = doc.sel;
3649
  } else {
3706
  var cur = posFromMouse(cm, e, true, type == "rect");
3707
  if (!cur) return;
3708
  if (cmp(cur, lastPos) != 0) {
3709
+ cm.curOp.focus = activeElt();
3710
  extendTo(cur);
3711
  var visible = visibleLines(display, doc);
3712
  if (cur.line >= visible.to || cur.line < visible.from)
3724
  function done(e) {
3725
  counter = Infinity;
3726
  e_preventDefault(e);
3727
+ display.input.focus();
3728
  off(document, "mousemove", move);
3729
  off(document, "mouseup", up);
3730
  doc.history.lastSelOrigin = null;
3803
  if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
3804
  cm.state.draggingText(e);
3805
  // Ensure the editor is re-focused
3806
+ setTimeout(function() {cm.display.input.focus();}, 20);
3807
  return;
3808
  }
3809
  try {
3810
  var text = e.dataTransfer.getData("Text");
3811
  if (text) {
3812
+ if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey))
3813
  var selected = cm.listSelections();
3814
  setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
3815
  if (selected) for (var i = 0; i < selected.length; ++i)
3816
  replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag");
3817
  cm.replaceSelection(text, "around", "paste");
3818
+ cm.display.input.focus();
3819
  }
3820
  }
3821
  catch(e){}
3982
  }
3983
  // Ensure previous input has been read, so that the handler sees a
3984
  // consistent view of the document
3985
+ cm.display.input.ensurePolled();
3986
  var prevShift = cm.display.shift, done = false;
3987
  try {
3988
  if (isReadOnly(cm)) cm.state.suppressEdits = true;
4012
  stopSeq.set(50, function() {
4013
  if (cm.state.keySeq == seq) {
4014
  cm.state.keySeq = null;
4015
+ cm.display.input.reset();
4016
  }
4017
  });
4018
  name = seq + " " + name;
4064
  var lastStoppedKey = null;
4065
  function onKeyDown(e) {
4066
  var cm = this;
4067
+ cm.curOp.focus = activeElt();
4068
  if (signalDOMEvent(cm, e)) return;
4069
  // IE does strange things with escape.
4070
  if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;
4105
 
4106
  function onKeyPress(e) {
4107
  var cm = this;
4108
+ if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;
4109
  var keyCode = e.keyCode, charCode = e.charCode;
4110
  if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
4111
+ if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;
4112
  var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
4113
  if (handleCharBinding(cm, e, ch)) return;
4114
+ cm.display.input.onKeyPress(e);
 
4115
  }
4116
 
4117
  // FOCUS/BLUR EVENTS
4118
 
4119
+ function delayBlurEvent(cm) {
4120
+ cm.state.delayingBlurEvent = true;
4121
+ setTimeout(function() {
4122
+ if (cm.state.delayingBlurEvent) {
4123
+ cm.state.delayingBlurEvent = false;
4124
+ onBlur(cm);
4125
+ }
4126
+ }, 100);
4127
+ }
4128
+
4129
  function onFocus(cm) {
4130
+ if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false;
4131
+
4132
  if (cm.options.readOnly == "nocursor") return;
4133
  if (!cm.state.focused) {
4134
  signal(cm, "focus", cm);
4135
  cm.state.focused = true;
4136
  addClass(cm.display.wrapper, "CodeMirror-focused");
4137
+ // This test prevents this from firing when a context
4138
+ // menu is closed (since the input reset would kill the
4139
  // select-all detection hack)
4140
  if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
4141
+ cm.display.input.reset();
4142
+ if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730
4143
  }
4144
+ cm.display.input.receivedFocus();
4145
  }
 
4146
  restartBlink(cm);
4147
  }
4148
  function onBlur(cm) {
4149
+ if (cm.state.delayingBlurEvent) return;
4150
+
4151
  if (cm.state.focused) {
4152
  signal(cm, "blur", cm);
4153
  cm.state.focused = false;
4163
  // textarea (making it as unobtrusive as possible) to let the
4164
  // right-click take effect on it.
4165
  function onContextMenu(cm, e) {
4166
+ if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;
4167
+ cm.display.input.onContextMenu(e);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4168
  }
4169
 
4170
  function contextMenuInGutter(cm, e) {
4652
 
4653
  if (indentString != curSpaceString) {
4654
  replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
4655
+ line.stateAfter = null;
4656
+ return true;
4657
  } else {
4658
  // Ensure that, if the cursor was in the whitespace at the start
4659
  // of the line, it is moved to the end of that space.
4666
  }
4667
  }
4668
  }
 
4669
  }
4670
 
4671
  // Utility for applying a change to a line by handle or number,
4794
 
4795
  CodeMirror.prototype = {
4796
  constructor: CodeMirror,
4797
+ focus: function(){window.focus(); this.display.input.focus();},
4798
 
4799
  setOption: function(option, value) {
4800
  var options = this.options, old = options[option];
4905
 
4906
  getHelpers: function(pos, type) {
4907
  var found = [];
4908
+ if (!helpers.hasOwnProperty(type)) return found;
4909
  var help = helpers[type], mode = this.getModeAt(pos);
4910
  if (typeof mode[type] == "string") {
4911
  if (help[mode[type]]) found.push(help[mode[type]]);
4955
  return lineAtHeight(this.doc, height + this.display.viewOffset);
4956
  },
4957
  heightAtLine: function(line, mode) {
4958
+ var end = false, lineObj;
4959
+ if (typeof line == "number") {
4960
+ var last = this.doc.first + this.doc.size - 1;
4961
+ if (line < this.doc.first) line = this.doc.first;
4962
+ else if (line > last) { line = last; end = true; }
4963
+ lineObj = getLine(this.doc, line);
4964
+ } else {
4965
+ lineObj = line;
4966
+ }
4967
  return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top +
4968
  (end ? this.doc.height - heightAtLine(lineObj) : 0);
4969
  },
4992
  });
4993
  }),
4994
 
 
 
 
 
 
 
4995
  lineInfo: function(line) {
4996
  if (typeof line == "number") {
4997
  if (!isLine(this.doc, line)) return null;
5015
  var top = pos.bottom, left = pos.left;
5016
  node.style.position = "absolute";
5017
  node.setAttribute("cm-ignore-events", "true");
5018
+ this.display.input.setUneditable(node);
5019
  display.sizer.appendChild(node);
5020
  if (vert == "over") {
5021
  top = pos.top;
5142
 
5143
  signal(this, "overwriteToggle", this, this.state.overwrite);
5144
  },
5145
+ hasFocus: function() { return this.display.input.getField() == activeElt(); },
5146
 
5147
  scrollTo: methodOp(function(x, y) {
5148
  if (x != null || y != null) resolveScrollToPos(this);
5218
  old.cm = null;
5219
  attachDoc(this, doc);
5220
  clearCaches(this);
5221
+ this.display.input.reset();
5222
  this.scrollTo(doc.scrollLeft, doc.scrollTop);
5223
  this.curOp.forceScroll = true;
5224
  signalLater(this, "swapDoc", this, old);
5225
  return old;
5226
  }),
5227
 
5228
+ getInputField: function(){return this.display.input.getField();},
5229
  getWrapperElement: function(){return this.display.wrapper;},
5230
  getScrollerElement: function(){return this.display.scroller;},
5231
  getGutterElement: function(){return this.display.gutters;}
5266
  clearCaches(cm);
5267
  regChange(cm);
5268
  }, true);
5269
+ option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) {
5270
+ cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
5271
+ if (old != CodeMirror.Init) cm.refresh();
5272
+ });
5273
  option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);
5274
  option("electricChars", true);
5275
+ option("inputStyle", mobile ? "contenteditable" : "textarea", function() {
5276
+ throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME
5277
+ }, true);
5278
  option("rtlMoveVisually", !windows);
5279
  option("wholeLineUpdateBefore", true);
5280
 
5315
  option("showCursorWhenSelecting", false, updateSelection, true);
5316
 
5317
  option("resetSelectionOnContextMenu", true);
5318
+ option("lineWiseCopyCut", true);
5319
 
5320
  option("readOnly", false, function(cm, val) {
5321
  if (val == "nocursor") {
5324
  cm.display.disabled = true;
5325
  } else {
5326
  cm.display.disabled = false;
5327
+ if (!val) cm.display.input.reset();
5328
  }
5329
  });
5330
+ option("disableInput", false, function(cm, val) {if (!val) cm.display.input.reset();}, true);
5331
+ option("dragDrop", true, dragDropChanged);
5332
 
5333
  option("cursorBlinkRate", 530);
5334
  option("cursorScrollMargin", 0);
5344
  option("viewportMargin", 10, function(cm){cm.refresh();}, true);
5345
  option("maxHighlightLength", 10000, resetModeState, true);
5346
  option("moveInputWithCursor", true, function(cm, val) {
5347
+ if (!val) cm.display.input.resetPosition();
5348
  });
5349
 
5350
  option("tabindex", null, function(cm, val) {
5351
+ cm.display.input.getField().tabIndex = val || "";
5352
  });
5353
  option("autofocus", null);
5354
 
5779
  // FROMTEXTAREA
5780
 
5781
  CodeMirror.fromTextArea = function(textarea, options) {
5782
+ options = options ? copyObj(options) : {};
5783
  options.value = textarea.value;
5784
+ if (!options.tabindex && textarea.tabIndex)
5785
+ options.tabindex = textarea.tabIndex;
5786
  if (!options.placeholder && textarea.placeholder)
5787
  options.placeholder = textarea.placeholder;
5788
  // Set autofocus to true if this textarea is focused, or if it has
5810
  }
5811
  }
5812
 
5813
+ options.finishInit = function(cm) {
5814
+ cm.save = save;
5815
+ cm.getTextArea = function() { return textarea; };
5816
+ cm.toTextArea = function() {
5817
+ cm.toTextArea = isNaN; // Prevent this from being ran twice
5818
+ save();
5819
+ textarea.parentNode.removeChild(cm.getWrapperElement());
5820
+ textarea.style.display = "";
5821
+ if (textarea.form) {
5822
+ off(textarea.form, "submit", save);
5823
+ if (typeof textarea.form.submit == "function")
5824
+ textarea.form.submit = realSubmit;
5825
+ }
5826
+ };
5827
+ };
5828
+
5829
  textarea.style.display = "none";
5830
  var cm = CodeMirror(function(node) {
5831
  textarea.parentNode.insertBefore(node, textarea.nextSibling);
5832
  }, options);
 
 
 
 
 
 
 
 
 
 
 
 
 
5833
  return cm;
5834
  };
5835
 
5922
  // marker continues beyond the start/end of the line. Markers have
5923
  // links back to the lines they currently touch.
5924
 
5925
+ var nextMarkerId = 0;
5926
+
5927
  var TextMarker = CodeMirror.TextMarker = function(doc, type) {
5928
  this.lines = [];
5929
  this.type = type;
5930
  this.doc = doc;
5931
+ this.id = ++nextMarkerId;
5932
  };
5933
  eventMixin(TextMarker);
5934
 
6512
 
6513
  // Line widgets are block elements displayed above or below a line.
6514
 
6515
+ var LineWidget = CodeMirror.LineWidget = function(doc, node, options) {
6516
  if (options) for (var opt in options) if (options.hasOwnProperty(opt))
6517
  this[opt] = options[opt];
6518
+ this.doc = doc;
6519
  this.node = node;
6520
  };
6521
  eventMixin(LineWidget);
6526
  }
6527
 
6528
  LineWidget.prototype.clear = function() {
6529
+ var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
6530
  if (no == null || !ws) return;
6531
  for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
6532
  if (!ws.length) line.widgets = null;
6533
  var height = widgetHeight(this);
6534
+ updateLineHeight(line, Math.max(0, line.height - height));
6535
+ if (cm) runInOp(cm, function() {
6536
  adjustScrollWhenAboveVisible(cm, line, -height);
6537
  regLineChange(cm, no, "widget");
 
6538
  });
6539
  };
6540
  LineWidget.prototype.changed = function() {
6541
+ var oldH = this.height, cm = this.doc.cm, line = this.line;
6542
  this.height = null;
6543
  var diff = widgetHeight(this) - oldH;
6544
  if (!diff) return;
6545
+ updateLineHeight(line, line.height + diff);
6546
+ if (cm) runInOp(cm, function() {
6547
  cm.curOp.forceUpdate = true;
6548
  adjustScrollWhenAboveVisible(cm, line, diff);
 
6549
  });
6550
  };
6551
 
6552
  function widgetHeight(widget) {
6553
  if (widget.height != null) return widget.height;
6554
+ var cm = widget.doc.cm;
6555
+ if (!cm) return 0;
6556
  if (!contains(document.body, widget.node)) {
6557
  var parentStyle = "position: relative;";
6558
  if (widget.coverGutter)
6559
+ parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;";
6560
  if (widget.noHScroll)
6561
+ parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;";
6562
+ removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
6563
  }
6564
  return widget.height = widget.node.offsetHeight;
6565
  }
6566
 
6567
+ function addLineWidget(doc, handle, node, options) {
6568
+ var widget = new LineWidget(doc, node, options);
6569
+ var cm = doc.cm;
6570
+ if (cm && widget.noHScroll) cm.display.alignWidgets = true;
6571
+ changeLine(doc, handle, "widget", function(line) {
6572
  var widgets = line.widgets || (line.widgets = []);
6573
  if (widget.insertAt == null) widgets.push(widget);
6574
  else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
6575
  widget.line = line;
6576
+ if (cm && !lineIsHidden(doc, line)) {
6577
+ var aboveVisible = heightAtLine(line) < doc.scrollTop;
6578
  updateLineHeight(line, line.height + widgetHeight(widget));
6579
  if (aboveVisible) addToScrollPos(cm, null, widget.height);
6580
  cm.curOp.forceUpdate = true;
6794
  // is needed on Webkit to be able to get line-level bounding
6795
  // rectangles for it (in measureChar).
6796
  var content = elt("span", null, null, webkit ? "padding-right: .1px" : null);
6797
+ var builder = {pre: elt("pre", [content]), content: content,
6798
+ col: 0, pos: 0, cm: cm,
6799
+ splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")};
6800
  lineView.measure = {};
6801
 
6802
  // Iterate over the logical lines that make up this visual line.
6806
  builder.addToken = buildToken;
6807
  // Optionally wire in some hacks into the token-rendering
6808
  // algorithm, to deal with browser quirks.
 
 
6809
  if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))
6810
  builder.addToken = buildTokenBadBidi(builder.addToken, order);
6811
  builder.map = [];
6846
  function defaultSpecialCharPlaceholder(ch) {
6847
  var token = elt("span", "\u2022", "cm-invalidchar");
6848
  token.title = "\\u" + ch.charCodeAt(0).toString(16);
6849
+ token.setAttribute("aria-label", token.title);
6850
  return token;
6851
  }
6852
 
6854
  // the line map. Takes care to render special characters separately.
6855
  function buildToken(builder, text, style, startStyle, endStyle, title, css) {
6856
  if (!text) return;
6857
+ var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text;
6858
+ var special = builder.cm.state.specialChars, mustWrap = false;
6859
  if (!special.test(text)) {
6860
  builder.col += text.length;
6861
+ var content = document.createTextNode(displayText);
6862
  builder.map.push(builder.pos, builder.pos + text.length, content);
6863
  if (ie && ie_version < 9) mustWrap = true;
6864
  builder.pos += text.length;
6869
  var m = special.exec(text);
6870
  var skipped = m ? m.index - pos : text.length - pos;
6871
  if (skipped) {
6872
+ var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
6873
  if (ie && ie_version < 9) content.appendChild(elt("span", [txt]));
6874
  else content.appendChild(txt);
6875
  builder.map.push(builder.pos, builder.pos + skipped, txt);
6881
  if (m[0] == "\t") {
6882
  var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
6883
  var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
6884
+ txt.setAttribute("role", "presentation");
6885
+ txt.setAttribute("cm-text", "\t");
6886
  builder.col += tabWidth;
6887
  } else {
6888
  var txt = builder.cm.options.specialCharPlaceholder(m[0]);
6889
+ txt.setAttribute("cm-text", m[0]);
6890
  if (ie && ie_version < 9) content.appendChild(elt("span", [txt]));
6891
  else content.appendChild(txt);
6892
  builder.col += 1;
6906
  builder.content.appendChild(content);
6907
  }
6908
 
6909
+ function splitSpaces(old) {
6910
+ var out = " ";
6911
+ for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
6912
+ out += " ";
6913
+ return out;
 
 
 
 
 
6914
  }
6915
 
6916
  // Work around nonsense dimensions being reported for stretches of
6917
  // right-to-left text.
6918
  function buildTokenBadBidi(inner, order) {
6919
+ return function(builder, text, style, startStyle, endStyle, title, css) {
6920
  style = style ? style + " cm-force-border" : "cm-force-border";
6921
  var start = builder.pos, end = start + text.length;
6922
  for (;;) {
6925
  var part = order[i];
6926
  if (part.to > start && part.from <= start) break;
6927
  }
6928
+ if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css);
6929
+ inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);
6930
  startStyle = null;
6931
  text = text.slice(part.to - start);
6932
  start = part.to;
6936
 
6937
  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
6938
  var widget = !ignoreWidget && marker.widgetNode;
6939
+ if (widget) builder.map.push(builder.pos, builder.pos + size, widget);
6940
+ if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
6941
+ if (!widget)
6942
+ widget = builder.content.appendChild(document.createElement("span"));
6943
+ widget.setAttribute("cm-marker", marker.id);
6944
+ }
6945
  if (widget) {
6946
+ builder.cm.display.input.setUneditable(widget);
6947
  builder.content.appendChild(widget);
6948
  }
6949
  builder.pos += size;
6968
  var foundBookmarks = [];
6969
  for (var j = 0; j < spans.length; ++j) {
6970
  var sp = spans[j], m = sp.marker;
6971
+ if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
6972
+ foundBookmarks.push(m);
6973
+ } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
6974
+ if (sp.to != null && sp.to != pos && nextChange > sp.to) {
6975
+ nextChange = sp.to;
6976
+ spanEndStyle = "";
6977
+ }
6978
  if (m.className) spanStyle += " " + m.className;
6979
  if (m.css) css = m.css;
6980
  if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
6985
  } else if (sp.from > pos && nextChange > sp.from) {
6986
  nextChange = sp.from;
6987
  }
 
6988
  }
6989
  if (collapsed && (collapsed.from || 0) == pos) {
6990
  buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
6991
  collapsed.marker, collapsed.from == null);
6992
  if (collapsed.to == null) return;
6993
+ if (collapsed.to == pos) collapsed = false;
6994
  }
6995
  if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)
6996
  buildCollapsedSpan(builder, 0, foundBookmarks[j]);
7453
  });
7454
  }),
7455
 
7456
+ addLineWidget: docMethodOp(function(handle, node, options) {
7457
+ return addLineWidget(this, handle, node, options);
7458
+ }),
7459
+ removeLineWidget: function(widget) { widget.clear(); },
7460
+
7461
  markText: function(from, to, options) {
7462
  return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
7463
  },
7464
  setBookmark: function(pos, options) {
7465
  var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
7466
  insertLeft: options && options.insertLeft,
7467
+ clearWhenEmpty: false, shared: options && options.shared,
7468
+ handleMouseEvents: options && options.handleMouseEvents};
7469
  pos = clipPos(this, pos);
7470
  return markText(this, pos, pos, realOpts, "bookmark");
7471
  },
8172
  return out;
8173
  }
8174
 
8175
+ function nothing() {}
8176
+
8177
  function createObj(base, props) {
8178
  var inst;
8179
  if (Object.create) {
8180
  inst = Object.create(base);
8181
  } else {
8182
+ nothing.prototype = base;
8183
+ inst = new nothing();
 
8184
  }
8185
  if (props) copyObj(props, inst);
8186
  return inst;
8199
  return function(){return f.apply(null, args);};
8200
  }
8201
 
8202
+ var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
8203
  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {
8204
  return /\w/.test(ch) || ch > "\x80" &&
8205
  (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
8235
  }
8236
 
8237
  var range;
8238
+ if (document.createRange) range = function(node, start, end, endNode) {
8239
  var r = document.createRange();
8240
+ r.setEnd(endNode || node, end);
8241
  r.setStart(node, start);
8242
  return r;
8243
  };
8261
  return removeChildren(parent).appendChild(e);
8262
  }
8263
 
8264
+ var contains = CodeMirror.contains = function(parent, child) {
8265
+ if (child.nodeType == 3) // Android browser always returns false when child is a textnode
8266
+ child = child.parentNode;
8267
  if (parent.contains)
8268
  return parent.contains(child);
8269
+ do {
8270
+ if (child.nodeType == 11) child = child.host;
8271
  if (child == parent) return true;
8272
+ } while (child = child.parentNode);
8273
+ };
8274
 
8275
  function activeElt() { return document.activeElement; }
8276
  // Older versions of IE throws unspecified error when touching
8355
  if (measure.firstChild.offsetHeight != 0)
8356
  zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);
8357
  }
8358
+ var node = zwspSupported ? elt("span", "\u200b") :
8359
+ elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
8360
+ node.setAttribute("cm-text", "");
8361
+ return node;
8362
  }
8363
 
8364
  // Feature-detect IE's crummy client rect reporting for bidi text
8721
  lst(order).to -= m[0].length;
8722
  order.push(new BidiSpan(0, len - m[0].length, len));
8723
  }
8724
+ if (order[0].level == 2)
8725
+ order.unshift(new BidiSpan(1, order[0].to, order[0].to));
8726
  if (order[0].level != lst(order).level)
8727
  order.push(new BidiSpan(order[0].level, len, len));
8728
 
8732
 
8733
  // THE END
8734
 
8735
+ CodeMirror.version = "5.2.0";
8736
 
8737
  return CodeMirror;
8738
  });
vendor/codemirror/mode/clike/clike.js CHANGED
@@ -185,7 +185,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
185
  return obj;
186
  }
187
  var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
188
- "double static else struct entry switch extern typedef float union for unsigned " +
189
  "goto while enum void const signed volatile";
190
 
191
  function cppHook(stream, state) {
@@ -354,7 +354,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
354
  state.tokenize = null;
355
  break;
356
  }
357
- escaped = stream.next() != "\\" && !escaped;
358
  }
359
  return "string";
360
  }
@@ -398,8 +398,13 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
398
  if (!stream.match('""')) return false;
399
  state.tokenize = tokenTripleString;
400
  return state.tokenize(stream, state);
 
 
 
 
401
  }
402
- }
 
403
  });
404
 
405
  def(["x-shader/x-vertex", "x-shader/x-fragment"], {
185
  return obj;
186
  }
187
  var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
188
+ "double static else struct switch extern typedef float union for unsigned " +
189
  "goto while enum void const signed volatile";
190
 
191
  function cppHook(stream, state) {
354
  state.tokenize = null;
355
  break;
356
  }
357
+ escaped = stream.next() == "\\" && !escaped;
358
  }
359
  return "string";
360
  }
398
  if (!stream.match('""')) return false;
399
  state.tokenize = tokenTripleString;
400
  return state.tokenize(stream, state);
401
+ },
402
+ "'": function(stream) {
403
+ stream.eatWhile(/[\w\$_\xa1-\uffff]/);
404
+ return "atom";
405
  }
406
+ },
407
+ modeProps: {closeBrackets: {triples: '"'}}
408
  });
409
 
410
  def(["x-shader/x-vertex", "x-shader/x-fragment"], {
vendor/codemirror/theme/3024-day.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
12
  .cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
 
 
13
 
14
  .cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
15
  .cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
10
 
11
  .cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
12
  .cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
13
+ .cm-s-3024-day.CodeMirror ::selection { background: #d6d5d4; }
14
+ .cm-s-3024-day.CodeMirror ::-moz-selection { background: #d9d9d9; }
15
 
16
  .cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
17
  .cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
vendor/codemirror/theme/3024-night.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
12
  .cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
 
 
13
  .cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
14
  .cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
15
  .cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
10
 
11
  .cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
12
  .cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
13
+ .cm-s-3024-night.CodeMirror ::selection { background: rgba(58, 52, 50, .99); }
14
+ .cm-s-3024-night.CodeMirror ::-moz-selection { background: rgba(58, 52, 50, .99); }
15
  .cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
16
  .cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
17
  .cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
vendor/codemirror/theme/ambiance.css CHANGED
@@ -30,12 +30,10 @@
30
  .cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
31
  .cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }
32
 
33
- .cm-s-ambiance .CodeMirror-selected {
34
- background: rgba(255, 255, 255, 0.15);
35
- }
36
- .cm-s-ambiance.CodeMirror-focused .CodeMirror-selected {
37
- background: rgba(255, 255, 255, 0.10);
38
- }
39
 
40
  /* Editor styling */
41
 
30
  .cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
31
  .cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }
32
 
33
+ .cm-s-ambiance .CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }
34
+ .cm-s-ambiance.CodeMirror-focused .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
35
+ .cm-s-ambiance.CodeMirror ::selection { background: rgba(255, 255, 255, 0.10); }
36
+ .cm-s-ambiance.CodeMirror ::-moz-selection { background: rgba(255, 255, 255, 0.10); }
 
 
37
 
38
  /* Editor styling */
39
 
vendor/codemirror/theme/base16-dark.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
12
  .cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}
 
 
13
  .cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
14
  .cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
15
  .cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
10
 
11
  .cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
12
  .cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}
13
+ .cm-s-base16-dark.CodeMirror ::selection { background: rgba(48, 48, 48, .99); }
14
+ .cm-s-base16-dark.CodeMirror ::-moz-selection { background: rgba(48, 48, 48, .99); }
15
  .cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
16
  .cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
17
  .cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
vendor/codemirror/theme/base16-light.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
12
  .cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
 
 
13
  .cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
14
  .cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
15
  .cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
10
 
11
  .cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
12
  .cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
13
+ .cm-s-base16-light.CodeMirror ::selection { background: #e0e0e0; }
14
+ .cm-s-base16-light.CodeMirror ::-moz-selection { background: #e0e0e0; }
15
  .cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
16
  .cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
17
  .cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
vendor/codemirror/theme/blackboard.css CHANGED
@@ -2,6 +2,8 @@
2
 
3
  .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
4
  .cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
 
 
5
  .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
6
  .cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
7
  .cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
2
 
3
  .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
4
  .cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
5
+ .cm-s-blackboard.CodeMirror ::selection { background: rgba(37, 59, 118, .99); }
6
+ .cm-s-blackboard.CodeMirror ::-moz-selection { background: rgba(37, 59, 118, .99); }
7
  .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
8
  .cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
9
  .cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
vendor/codemirror/theme/cobalt.css CHANGED
@@ -1,5 +1,7 @@
1
  .cm-s-cobalt.CodeMirror { background: #002240; color: white; }
2
  .cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
 
 
3
  .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
4
  .cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
5
  .cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
1
  .cm-s-cobalt.CodeMirror { background: #002240; color: white; }
2
  .cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
3
+ .cm-s-cobalt.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
4
+ .cm-s-cobalt.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
5
  .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
6
  .cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
7
  .cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
vendor/codemirror/theme/colorforth.css ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }
2
+ .cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
3
+ .cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }
4
+ .cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }
5
+ .cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }
6
+ .cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white !important; }
7
+
8
+ .cm-s-colorforth span.cm-comment { color: #ededed; }
9
+ .cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; }
10
+ .cm-s-colorforth span.cm-keyword { color: #ffd900; }
11
+ .cm-s-colorforth span.cm-builtin { color: #00d95a; }
12
+ .cm-s-colorforth span.cm-variable { color: #73ff00; }
13
+ .cm-s-colorforth span.cm-string { color: #007bff; }
14
+ .cm-s-colorforth span.cm-number { color: #00c4ff; }
15
+ .cm-s-colorforth span.cm-atom { color: #606060; }
16
+
17
+ .cm-s-colorforth span.cm-variable-2 { color: #EEE; }
18
+ .cm-s-colorforth span.cm-variable-3 { color: #DDD; }
19
+ .cm-s-colorforth span.cm-property {}
20
+ .cm-s-colorforth span.cm-operator {}
21
+
22
+ .cm-s-colorforth span.cm-meta { color: yellow; }
23
+ .cm-s-colorforth span.cm-qualifier { color: #FFF700; }
24
+ .cm-s-colorforth span.cm-bracket { color: #cc7; }
25
+ .cm-s-colorforth span.cm-tag { color: #FFBD40; }
26
+ .cm-s-colorforth span.cm-attribute { color: #FFF700; }
27
+ .cm-s-colorforth span.cm-error { color: #f00; }
28
+
29
+ .cm-s-colorforth .CodeMirror-selected { background: #333d53 !important; }
30
+
31
+ .cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }
32
+
33
+ .cm-s-colorforth .CodeMirror-activeline-background {background: #253540 !important;}
vendor/codemirror/theme/erlang-dark.css CHANGED
@@ -1,5 +1,7 @@
1
  .cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
2
  .cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
 
 
3
  .cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
4
  .cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
5
  .cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
1
  .cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
2
  .cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
3
+ .cm-s-erlang-dark.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
4
+ .cm-s-erlang-dark.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
5
  .cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
6
  .cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
7
  .cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
vendor/codemirror/theme/lesser-dark.css CHANGED
@@ -7,6 +7,8 @@ Ported to CodeMirror by Peter Kroon
7
  }
8
  .cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
9
  .cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
 
 
10
  .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
11
  .cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
12
 
7
  }
8
  .cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
9
  .cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
10
+ .cm-s-lesser-dark.CodeMirror ::selection { background: rgba(69, 68, 59, .99); }
11
+ .cm-s-lesser-dark.CodeMirror ::-moz-selection { background: rgba(69, 68, 59, .99); }
12
  .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
13
  .cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
14
 
vendor/codemirror/theme/liquibyte.css ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .cm-s-liquibyte.CodeMirror {
2
+ background-color: #000;
3
+ color: #fff;
4
+ line-height: 1.2em;
5
+ font-size: 1em;
6
+ }
7
+ .CodeMirror-focused .cm-matchhighlight {
8
+ text-decoration: underline;
9
+ text-decoration-color: #0f0;
10
+ text-decoration-style: wavy;
11
+ }
12
+ .cm-trailingspace {
13
+ text-decoration: line-through;
14
+ text-decoration-color: #f00;
15
+ text-decoration-style: dotted;
16
+ }
17
+ .cm-tab {
18
+ text-decoration: line-through;
19
+ text-decoration-color: #404040;
20
+ text-decoration-style: dotted;
21
+ }
22
+ .cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; }
23
+ .cm-s-liquibyte .CodeMirror-gutter-elt div{ font-size: 1.2em; }
24
+ .cm-s-liquibyte .CodeMirror-guttermarker { }
25
+ .cm-s-liquibyte .CodeMirror-guttermarker-subtle { }
26
+ .cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0;}
27
+ .cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee !important; }
28
+
29
+ .cm-s-liquibyte span.cm-comment { color: #008000; }
30
+ .cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; }
31
+ .cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; }
32
+ .cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; }
33
+ .cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; }
34
+ .cm-s-liquibyte span.cm-string { color: #ff8000; }
35
+ .cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; }
36
+ .cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; }
37
+
38
+ .cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; }
39
+ .cm-s-liquibyte span.cm-variable-3 { color: #c080ff; font-weight: bold; }
40
+ .cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; }
41
+ .cm-s-liquibyte span.cm-operator { color: #fff; }
42
+
43
+ .cm-s-liquibyte span.cm-meta { color: #0f0; }
44
+ .cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; }
45
+ .cm-s-liquibyte span.cm-bracket { color: #cc7; }
46
+ .cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; }
47
+ .cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; }
48
+ .cm-s-liquibyte span.cm-error { color: #f00; }
49
+
50
+ .cm-s-liquibyte .CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25) !important; }
51
+
52
+ .cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); }
53
+
54
+ .cm-s-liquibyte .CodeMirror-activeline-background {background-color: rgba(0, 255, 0, 0.15) !important;}
55
+
56
+ /* Default styles for common addons */
57
+ div.CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; }
58
+ div.CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; }
59
+ .CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); }
60
+ /* Scrollbars */
61
+ /* Simple */
62
+ div.CodeMirror-simplescroll-horizontal div:hover, div.CodeMirror-simplescroll-vertical div:hover {
63
+ background-color: rgba(80, 80, 80, .7);
64
+ }
65
+ div.CodeMirror-simplescroll-horizontal div, div.CodeMirror-simplescroll-vertical div {
66
+ background-color: rgba(80, 80, 80, .3);
67
+ border: 1px solid #404040;
68
+ border-radius: 5px;
69
+ }
70
+ div.CodeMirror-simplescroll-vertical div {
71
+ border-top: 1px solid #404040;
72
+ border-bottom: 1px solid #404040;
73
+ }
74
+ div.CodeMirror-simplescroll-horizontal div {
75
+ border-left: 1px solid #404040;
76
+ border-right: 1px solid #404040;
77
+ }
78
+ div.CodeMirror-simplescroll-vertical {
79
+ background-color: #262626;
80
+ }
81
+ div.CodeMirror-simplescroll-horizontal {
82
+ background-color: #262626;
83
+ border-top: 1px solid #404040;
84
+ }
85
+ /* Overlay */
86
+ div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div {
87
+ background-color: #404040;
88
+ border-radius: 5px;
89
+ }
90
+ div.CodeMirror-overlayscroll-vertical div {
91
+ border: 1px solid #404040;
92
+ }
93
+ div.CodeMirror-overlayscroll-horizontal div {
94
+ border: 1px solid #404040;
95
+ }
vendor/codemirror/theme/mbo.css CHANGED
@@ -6,6 +6,8 @@
6
 
7
  .cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}
8
  .cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
 
 
9
  .cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
10
  .cm-s-mbo .CodeMirror-guttermarker { color: white; }
11
  .cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
6
 
7
  .cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}
8
  .cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
9
+ .cm-s-mbo.CodeMirror ::selection { background: rgba(113, 108, 98, .99); }
10
+ .cm-s-mbo.CodeMirror ::-moz-selection { background: rgba(113, 108, 98, .99); }
11
  .cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
12
  .cm-s-mbo .CodeMirror-guttermarker { color: white; }
13
  .cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
vendor/codemirror/theme/mdn-like.css CHANGED
@@ -9,9 +9,11 @@
9
  */
10
  .cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
11
  .cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
 
 
12
 
13
  .cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
14
- .cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; margin-left: 3px; }
15
  div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
16
 
17
  .cm-s-mdn-like .cm-keyword { color: #6262FF; }
9
  */
10
  .cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
11
  .cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
12
+ .cm-s-mdn-like.CodeMirror ::selection { background: #cfc; }
13
+ .cm-s-mdn-like.CodeMirror ::-moz-selection { background: #cfc; }
14
 
15
  .cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
16
+ .cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; }
17
  div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
18
 
19
  .cm-s-mdn-like .cm-keyword { color: #6262FF; }
vendor/codemirror/theme/midnight.css CHANGED
@@ -15,6 +15,8 @@
15
  .cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
16
 
17
  .cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
 
 
18
  .cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
19
  .cm-s-midnight .CodeMirror-guttermarker { color: white; }
20
  .cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
15
  .cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
16
 
17
  .cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
18
+ .cm-s-midnight.CodeMirror ::selection { background: rgba(49, 77, 103, .99); }
19
+ .cm-s-midnight.CodeMirror ::-moz-selection { background: rgba(49, 77, 103, .99); }
20
  .cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
21
  .cm-s-midnight .CodeMirror-guttermarker { color: white; }
22
  .cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
vendor/codemirror/theme/monokai.css CHANGED
@@ -2,6 +2,8 @@
2
 
3
  .cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
4
  .cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
 
 
5
  .cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
6
  .cm-s-monokai .CodeMirror-guttermarker { color: white; }
7
  .cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
@@ -16,7 +18,7 @@
16
  .cm-s-monokai span.cm-keyword {color: #f92672;}
17
  .cm-s-monokai span.cm-string {color: #e6db74;}
18
 
19
- .cm-s-monokai span.cm-variable {color: #a6e22e;}
20
  .cm-s-monokai span.cm-variable-2 {color: #9effff;}
21
  .cm-s-monokai span.cm-def {color: #fd971f;}
22
  .cm-s-monokai span.cm-bracket {color: #f8f8f2;}
2
 
3
  .cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
4
  .cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
5
+ .cm-s-monokai.CodeMirror ::selection { background: rgba(73, 72, 62, .99); }
6
+ .cm-s-monokai.CodeMirror ::-moz-selection { background: rgba(73, 72, 62, .99); }
7
  .cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
8
  .cm-s-monokai .CodeMirror-guttermarker { color: white; }
9
  .cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
18
  .cm-s-monokai span.cm-keyword {color: #f92672;}
19
  .cm-s-monokai span.cm-string {color: #e6db74;}
20
 
21
+ .cm-s-monokai span.cm-variable {color: #f8f8f2;}
22
  .cm-s-monokai span.cm-variable-2 {color: #9effff;}
23
  .cm-s-monokai span.cm-def {color: #fd971f;}
24
  .cm-s-monokai span.cm-bracket {color: #f8f8f2;}
vendor/codemirror/theme/night.css CHANGED
@@ -2,6 +2,8 @@
2
 
3
  .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
4
  .cm-s-night div.CodeMirror-selected { background: #447 !important; }
 
 
5
  .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
6
  .cm-s-night .CodeMirror-guttermarker { color: white; }
7
  .cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
2
 
3
  .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
4
  .cm-s-night div.CodeMirror-selected { background: #447 !important; }
5
+ .cm-s-night.CodeMirror ::selection { background: rgba(68, 68, 119, .99); }
6
+ .cm-s-night.CodeMirror ::-moz-selection { background: rgba(68, 68, 119, .99); }
7
  .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
8
  .cm-s-night .CodeMirror-guttermarker { color: white; }
9
  .cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
vendor/codemirror/theme/paraiso-dark.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
12
  .cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
 
 
13
  .cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
14
  .cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
15
  .cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
10
 
11
  .cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
12
  .cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
13
+ .cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); }
14
+ .cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); }
15
  .cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
16
  .cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
17
  .cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
vendor/codemirror/theme/paraiso-light.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
12
  .cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
 
 
13
  .cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
14
  .cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
15
  .cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
10
 
11
  .cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
12
  .cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
13
+ .cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; }
14
+ .cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; }
15
  .cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
16
  .cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
17
  .cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
vendor/codemirror/theme/pastel-on-dark.css CHANGED
@@ -14,6 +14,9 @@
14
  font-size: 14px;
15
  }
16
  .cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }
 
 
 
17
  .cm-s-pastel-on-dark .CodeMirror-gutters {
18
  background: #34302f;
19
  border-right: 0px;
14
  font-size: 14px;
15
  }
16
  .cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }
17
+ .cm-s-pastel-on-dark.CodeMirror ::selection { background: rgba(221,240,255,0.2); }
18
+ .cm-s-pastel-on-dark.CodeMirror ::-moz-selection { background: rgba(221,240,255,0.2); }
19
+
20
  .cm-s-pastel-on-dark .CodeMirror-gutters {
21
  background: #34302f;
22
  border-right: 0px;
vendor/codemirror/theme/rubyblue.css CHANGED
@@ -1,5 +1,7 @@
1
  .cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
2
  .cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
 
 
3
  .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
4
  .cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
5
  .cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
1
  .cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
2
  .cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
3
+ .cm-s-rubyblue.CodeMirror ::selection { background: rgba(56, 86, 111, 0.99); }
4
+ .cm-s-rubyblue.CodeMirror ::-moz-selection { background: rgba(56, 86, 111, 0.99); }
5
  .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
6
  .cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
7
  .cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
vendor/codemirror/theme/solarized.css CHANGED
@@ -53,7 +53,7 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
53
  .cm-s-solarized .cm-number { color: #d33682; }
54
  .cm-s-solarized .cm-def { color: #2aa198; }
55
 
56
- .cm-s-solarized .cm-variable { color: #268bd2; }
57
  .cm-s-solarized .cm-variable-2 { color: #b58900; }
58
  .cm-s-solarized .cm-variable-3 { color: #6c71c4; }
59
 
@@ -94,13 +94,13 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
94
  border-bottom: 1px dotted #dc322f;
95
  }
96
 
97
- .cm-s-solarized.cm-s-dark .CodeMirror-selected {
98
- background: #073642;
99
- }
100
 
101
- .cm-s-solarized.cm-s-light .CodeMirror-selected {
102
- background: #eee8d5;
103
- }
104
 
105
  /* Editor styling */
106
 
53
  .cm-s-solarized .cm-number { color: #d33682; }
54
  .cm-s-solarized .cm-def { color: #2aa198; }
55
 
56
+ .cm-s-solarized .cm-variable { color: #839496; }
57
  .cm-s-solarized .cm-variable-2 { color: #b58900; }
58
  .cm-s-solarized .cm-variable-3 { color: #6c71c4; }
59
 
94
  border-bottom: 1px dotted #dc322f;
95
  }
96
 
97
+ .cm-s-solarized.cm-s-dark .CodeMirror-selected { background: #073642; }
98
+ .cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
99
+ .cm-s-solarized.cm-s-dark.CodeMirror ::-moz-selection { background: rgba(7, 54, 66, 0.99); }
100
 
101
+ .cm-s-solarized.cm-s-light .CodeMirror-selected { background: #eee8d5; }
102
+ .cm-s-solarized.cm-s-light.CodeMirror ::selection { background: #eee8d5; }
103
+ .cm-s-solarized.cm-s-lightCodeMirror ::-moz-selection { background: #eee8d5; }
104
 
105
  /* Editor styling */
106
 
vendor/codemirror/theme/the-matrix.css CHANGED
@@ -1,5 +1,7 @@
1
  .cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
2
  .cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
 
 
3
  .cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
4
  .cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
5
  .cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
1
  .cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
2
  .cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
3
+ .cm-s-the-matrix.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
4
+ .cm-s-the-matrix.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
5
  .cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
6
  .cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
7
  .cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
vendor/codemirror/theme/tomorrow-night-eighties.css CHANGED
@@ -10,6 +10,8 @@
10
 
11
  .cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
12
  .cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
 
 
13
  .cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
14
  .cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
15
  .cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
10
 
11
  .cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
12
  .cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
13
+ .cm-s-tomorrow-night-eighties.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
14
+ .cm-s-tomorrow-night-eighties.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
15
  .cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
16
  .cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
17
  .cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
vendor/codemirror/theme/twilight.css CHANGED
@@ -1,5 +1,7 @@
1
  .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
2
  .cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
 
 
3
 
4
  .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
5
  .cm-s-twilight .CodeMirror-guttermarker { color: white; }
1
  .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
2
  .cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
3
+ .cm-s-twilight.CodeMirror ::selection { background: rgba(50, 50, 50, 0.99); }
4
+ .cm-s-twilight.CodeMirror ::-moz-selection { background: rgba(50, 50, 50, 0.99); }
5
 
6
  .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
7
  .cm-s-twilight .CodeMirror-guttermarker { color: white; }
vendor/codemirror/theme/vibrant-ink.css CHANGED
@@ -2,6 +2,8 @@
2
 
3
  .cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
4
  .cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
 
 
5
 
6
  .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
7
  .cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
2
 
3
  .cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
4
  .cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
5
+ .cm-s-vibrant-ink.CodeMirror ::selection { background: rgba(53, 73, 60, 0.99); }
6
+ .cm-s-vibrant-ink.CodeMirror ::-moz-selection { background: rgba(53, 73, 60, 0.99); }
7
 
8
  .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
9
  .cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
vendor/codemirror/theme/xq-dark.css CHANGED
@@ -22,6 +22,8 @@ THE SOFTWARE.
22
  */
23
  .cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
24
  .cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
 
 
25
  .cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
26
  .cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
27
  .cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
22
  */
23
  .cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
24
  .cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
25
+ .cm-s-xq-dark.CodeMirror ::selection { background: rgba(39, 0, 122, 0.99); }
26
+ .cm-s-xq-dark.CodeMirror ::-moz-selection { background: rgba(39, 0, 122, 0.99); }
27
  .cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
28
  .cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
29
  .cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }