Abandoned Cart Lite for WooCommerce - Version 2.5.2

Version Description

Download this release

Release Info

Developer ashokrane
Plugin Icon 128x128 Abandoned Cart Lite for WooCommerce
Version 2.5.2
Comparing to
See all releases

Code changes from version 2.5 to 2.5.2

Files changed (42) hide show
  1. actions.php +46 -0
  2. class-abandoned-orders-table.php +430 -0
  3. class-recover-orders-table.php +404 -0
  4. class-templates-table.php +288 -0
  5. cron/send_email.php +9 -5
  6. css/view.abadoned.orders.style.css +38 -0
  7. default-settings.php +7 -4
  8. images/spectre.jpg +0 -0
  9. js/jquery.tipTip.minified.js +20 -20
  10. js/tinymce/changelog.txt +477 -477
  11. js/tinymce/examples/accessibility.html +10 -10
  12. js/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js +184 -184
  13. js/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +119 -119
  14. js/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js +1 -1
  15. js/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js +50 -50
  16. js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -90
  17. js/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +2 -2
  18. js/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js +955 -955
  19. js/tinymce/jscripts/tiny_mce/plugins/media/langs/en_dlg.js +1 -1
  20. js/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js +52 -52
  21. js/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js +1 -1
  22. js/tinymce/jscripts/tiny_mce/plugins/style/props.htm +845 -845
  23. js/tinymce/jscripts/tiny_mce/plugins/style/readme.txt +19 -19
  24. js/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +122 -122
  25. js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js +1456 -1456
  26. js/tinymce/jscripts/tiny_mce/plugins/table/js/table.js +3 -3
  27. js/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js +345 -345
  28. js/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js +1 -1
  29. js/tinymce/jscripts/tiny_mce/tiny_mce_popup.js +4 -4
  30. languages/messages.pot +268 -268
  31. languages/woocommerce-ac-de_DE.mo +0 -0
  32. languages/woocommerce-ac-de_DE.po +283 -0
  33. languages/woocommerce-ac-he_IL.po +281 -281
  34. languages/woocommerce-ac-sk_SK.mo +0 -0
  35. languages/woocommerce-ac-sk_SK.po +283 -0
  36. languages/woocommerce-ac.po +269 -269
  37. readme.txt +16 -85
  38. views/wacp-email-template-preview.php +1 -1
  39. views/wacp-wc-email-template-preview.php +1 -1
  40. woo-includes/class-wc-dependencies.php +29 -29
  41. woo-includes/woo-functions.php +96 -96
  42. woocommerce-ac.php +338 -595
actions.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) exit;
5
+
6
+ /**
7
+ * Trigger a abadoned cart Deletion
8
+ *
9
+ * @since 2.5.2
10
+ * @param $abadoned_cart_id Arguments passed
11
+ * @return void
12
+ */
13
+
14
+ class wcap_delete_bulk_action_handler{
15
+
16
+ function wcap_delete_bulk_action_handler_function_lite( $abadoned_cart_id ) {
17
+ global $wpdb;
18
+
19
+ $get_user_id = "SELECT user_id FROM `" . $wpdb->prefix . "ac_abandoned_cart_history_lite` WHERE id = '$abadoned_cart_id' ";
20
+ $results_get_user_id = $wpdb->get_results( $get_user_id );
21
+ $user_id_of_guest = $results_get_user_id[0]->user_id;
22
+
23
+ $query_delete = "DELETE FROM `" . $wpdb->prefix . "ac_abandoned_cart_history_lite` WHERE id = '$abadoned_cart_id' ";
24
+ $results_delete = $wpdb->get_results( $query_delete );
25
+
26
+
27
+ if ( $user_id_of_guest >= '63000000' ) {
28
+ $guest_query_delete = "DELETE FROM `" . $wpdb->prefix . "ac_abandoned_cart_history_lite` WHERE id = '" . $user_id_of_guest . "'";
29
+ $results_guest = $wpdb->get_results( $guest_query_delete );
30
+ //guest user
31
+ }
32
+
33
+ wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&wcap_deleted=YES' ) );
34
+
35
+ }
36
+ function wcap_delete_template_bulk_action_handler_function_lite( $template_id ) {
37
+ global $wpdb;
38
+
39
+ $id_remove = $template_id;
40
+ $query_remove = "DELETE FROM `" . $wpdb->prefix . "ac_email_templates_lite` WHERE id='" . $id_remove . "' ";
41
+ $wpdb->query( $query_remove );
42
+
43
+ wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=emailtemplates&wcap_template_deleted=YES' ) );
44
+
45
+ }
46
+ }
class-abandoned-orders-table.php ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Load WP_List_Table if not loaded
4
+ if ( ! class_exists( 'WP_List_Table' ) ) {
5
+ require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
6
+ }
7
+
8
+ class WACP_Abandoned_Orders_Table extends WP_List_Table {
9
+
10
+ /**
11
+ * Number of results to show per page
12
+ *
13
+ * @var string
14
+ * @since 2.5.2
15
+ */
16
+ public $per_page = 30;
17
+
18
+ /**
19
+ * URL of this page
20
+ *
21
+ * @var string
22
+ * @since 2.5.2
23
+ */
24
+ public $base_url;
25
+
26
+ /**
27
+ * Total number of bookings
28
+ *
29
+ * @var int
30
+ * @since 2.5.2
31
+ */
32
+ public $total_count;
33
+
34
+ /**
35
+ * Get things started
36
+ *
37
+ * @see WP_List_Table::__construct()
38
+ */
39
+ public function __construct() {
40
+
41
+ global $status, $page;
42
+
43
+ // Set parent defaults
44
+ parent::__construct( array(
45
+ 'singular' => __( 'abandoned_order_id', 'woocommerce-ac' ), //singular name of the listed records
46
+ 'plural' => __( 'abandoned_order_ids', 'woocommerce-ac' ), //plural name of the listed records
47
+ 'ajax' => false // Does this table support ajax?
48
+ ) );
49
+ $this->wcap_get_abadoned_orders_count_lite();
50
+ $this->process_bulk_action();
51
+ $this->base_url = admin_url( 'admin.php?page=woocommerce_ac_page' );
52
+ }
53
+
54
+ public function wcap_abadoned_order_prepare_items() {
55
+
56
+ $columns = $this->get_columns();
57
+ $hidden = array(); // No hidden columns
58
+ $sortable = $this->get_sortable_columns();
59
+ $data = $this->wacp_abandoned_cart_lite_data();
60
+
61
+ $this->_column_headers = array( $columns, $hidden, $sortable);
62
+ $total_items = $this->total_count;
63
+
64
+ if ( count($data) > 0 ){
65
+ $this->items = $data;
66
+ }else{
67
+ $this->items = '';
68
+ }
69
+ $this->set_pagination_args( array(
70
+ 'total_items' => $total_items, // WE have to calculate the total number of items
71
+ 'per_page' => $this->per_page, // WE have to determine how many items to show on a page
72
+ 'total_pages' => ceil( $total_items / $this->per_page ) // WE have to calculate the total number of pages
73
+ )
74
+ );
75
+ }
76
+
77
+ public function get_columns() {
78
+
79
+
80
+ $columns = array();
81
+ $columns = array(
82
+ 'cb' => '<input type="checkbox" />',
83
+ 'id' => __( 'Id', 'woocommerce-ac' ),
84
+ 'email' => __( 'Email Address', 'woocommerce-ac' ),
85
+ 'customer' => __( 'Customer', 'woocommerce-ac' ),
86
+ 'order_total' => __( 'Order Total', 'woocommerce-ac' ),
87
+ 'date' => __( 'Abandoned Date', 'woocommerce-ac' ),
88
+ 'status' => __( 'Status of Cart', 'woocommerce-ac' )
89
+ );
90
+
91
+ return apply_filters( 'wcap_abandoned_orders_columns', $columns );
92
+ }
93
+
94
+ /***
95
+ * It is used to add the check box for the items
96
+ */
97
+ function column_cb( $item ){
98
+
99
+ $abadoned_order_id = '';
100
+ if( isset($item->id) && "" != $item->id ){
101
+ $abadoned_order_id = $item->id;
102
+ }
103
+ return sprintf(
104
+ '<input type="checkbox" name="%1$s[]" value="%2$s" />',
105
+ 'abandoned_order_id',
106
+ $abadoned_order_id
107
+ );
108
+ }
109
+
110
+ public function get_sortable_columns() {
111
+ $columns = array(
112
+ 'date' => array( 'date', false ),
113
+ 'status' => array( 'status',false),
114
+ );
115
+ return apply_filters( 'wcap_abandoned_orders_sortable_columns', $columns );
116
+ }
117
+
118
+ /**
119
+ * Render the Email Column
120
+ *
121
+ * @access public
122
+ * @since 2.4.8
123
+ * @param array $abadoned_row_info Contains all the data of the abandoned order tabs row
124
+ * @return string Data shown in the Email column
125
+ *
126
+ * This function used for individual delete of row, It is for hover effect delete.
127
+ */
128
+ public function column_email( $abadoned_row_info ) {
129
+
130
+ $row_actions = array();
131
+ $value = '';
132
+ $abadoned_order_id = 0;
133
+ if( isset($abadoned_row_info->email) ){
134
+
135
+ $abadoned_order_id = $abadoned_row_info->id ;
136
+ $row_actions['delete'] = '<a href="' . wp_nonce_url( add_query_arg( array( 'action' => 'wcap_delete', 'abandoned_order_id' => $abadoned_row_info->id ), $this->base_url ), 'abandoned_order_nonce') . '">' . __( 'Delete', 'woocommerce-ac' ) . '</a>';
137
+
138
+ $email = $abadoned_row_info->email;
139
+
140
+ $value = $email . $this->row_actions( $row_actions );
141
+
142
+ }
143
+
144
+ return apply_filters( 'wcap_abandoned_orders_single_column', $value, $abadoned_order_id, 'email' );
145
+ }
146
+
147
+ /***
148
+ * This function used to get the abadoned orders count
149
+ */
150
+ public function wcap_get_abadoned_orders_count_lite() {
151
+
152
+ global $wpdb;
153
+ $results = array();
154
+
155
+ $blank_cart_info = '{"cart":[]}';
156
+ $blank_cart_info_guest = '[]';
157
+
158
+ // non-multisite - regular table name
159
+ $query = "SELECT wpac . * , wpu.user_login, wpu.user_email
160
+ FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite` AS wpac
161
+ LEFT JOIN ".$wpdb->base_prefix."users AS wpu ON wpac.user_id = wpu.id
162
+ WHERE recovered_cart = '0'
163
+ AND wpac.abandoned_cart_info NOT LIKE '%$blank_cart_info%' AND wpac.abandoned_cart_info NOT LIKE '$blank_cart_info_guest' ORDER BY wpac.abandoned_cart_time DESC";
164
+
165
+ $results = $wpdb->get_results($query);
166
+
167
+ $abadoned_orders = count($results);
168
+ $this->total_count = $abadoned_orders;
169
+ }
170
+ public function wacp_abandoned_cart_lite_data() {
171
+ global $wpdb;
172
+
173
+ $return_bookings = array();
174
+ $per_page = $this->per_page;
175
+ $results = array();
176
+
177
+ $blank_cart_info = '{"cart":[]}';
178
+ $blank_cart_info_guest = '[]';
179
+
180
+ // non-multisite - regular table name
181
+ $query = "SELECT wpac . * , wpu.user_login, wpu.user_email
182
+ FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite` AS wpac
183
+ LEFT JOIN ".$wpdb->base_prefix."users AS wpu ON wpac.user_id = wpu.id
184
+ WHERE recovered_cart = '0'
185
+ AND wpac.abandoned_cart_info NOT LIKE '%$blank_cart_info%' AND wpac.abandoned_cart_info NOT LIKE '$blank_cart_info_guest' ORDER BY wpac.abandoned_cart_time DESC";
186
+
187
+ $results = $wpdb->get_results($query);
188
+
189
+ $i = 0;
190
+
191
+ foreach ( $results as $key => $value ) {
192
+
193
+ $return_abadoned_orders[$i] = new stdClass();
194
+
195
+ if ( $value->user_type == "GUEST" ) {
196
+ $query_guest = "SELECT * from `" . $wpdb->prefix . "ac_guest_abandoned_cart_history_lite` WHERE id = %d";
197
+ $results_guest = $wpdb->get_results( $wpdb->prepare( $query_guest, $value->user_id ) );
198
+ }
199
+ $abandoned_order_id = $value->id;
200
+ $user_id = $value->user_id;
201
+ $user_login = $value->user_login;
202
+
203
+ if ( $value->user_type == "GUEST" ) {
204
+
205
+ if ( isset( $results_guest[0]->email_id ) ) $user_email = $results_guest[0]->email_id;
206
+
207
+ if ( isset( $results_guest[0]->billing_first_name ) ) $user_first_name = $results_guest[0]->billing_first_name;
208
+ else $user_first_name = "";
209
+
210
+ if ( isset( $results_guest[0]->billing_last_name ) ) $user_last_name = $results_guest[0]->billing_last_name;
211
+ else $user_last_name = "";
212
+ } else {
213
+ $user_email = $value->user_email;
214
+ $user_first_name_temp = get_user_meta($value->user_id, 'first_name');
215
+ if ( isset( $user_first_name_temp[0] ) ) {
216
+ $user_first_name = $user_first_name_temp[0];
217
+ }else {
218
+ $user_first_name = "";
219
+ }
220
+
221
+ $user_last_name_temp = get_user_meta($value->user_id, 'last_name');
222
+ if ( isset( $user_last_name_temp[0] ) ) {
223
+ $user_last_name = $user_last_name_temp[0];
224
+ }else {
225
+ $user_last_name = "";
226
+ }
227
+ }
228
+
229
+ $cart_info = json_decode( $value->abandoned_cart_info );
230
+ $order_date = "";
231
+ $cart_update_time = $value->abandoned_cart_time;
232
+
233
+ if ( $cart_update_time != "" && $cart_update_time != 0 ) {
234
+ $order_date = date( 'd M, Y h:i A', $cart_update_time );
235
+ }
236
+
237
+ $ac_cutoff_time = get_option( 'ac_lite_cart_abandoned_time' );
238
+ $cut_off_time = $ac_cutoff_time * 60;
239
+ $current_time = current_time( 'timestamp' );
240
+ $compare_time = $current_time - $cart_update_time;
241
+ $cart_details = array();
242
+ if( isset( $cart_info->cart ) ){
243
+ $cart_details = $cart_info->cart;
244
+ }
245
+ $line_total = 0;
246
+
247
+ if ( count( $cart_details ) > 0 ) {
248
+
249
+ foreach ( $cart_details as $k => $v ) {
250
+
251
+ if( $v->line_subtotal_tax != 0 && $v->line_subtotal_tax > 0 ) {
252
+ $line_total = $line_total + $v->line_total + $v->line_subtotal_tax;
253
+ } else {
254
+ $line_total = $line_total + $v->line_total;
255
+ }
256
+ }
257
+ }
258
+ $line_total = round( $line_total, 2 );
259
+ $quantity_total = 0;
260
+
261
+ if ( count( $cart_details ) > 0) {
262
+
263
+ foreach ( $cart_details as $k => $v ) {
264
+ $quantity_total = $quantity_total + $v->quantity;
265
+ }
266
+ }
267
+
268
+ if ( 1 == $quantity_total ) {
269
+ $item_disp = __("item", "woocommerce-ac");
270
+ } else {
271
+ $item_disp = __("items", "woocommerce-ac");
272
+ }
273
+
274
+ if( $value->cart_ignored == 0 && $value->recovered_cart == 0 ) {
275
+ $ac_status = __("Abandoned", "woocommerce-ac");
276
+ } elseif( $value->cart_ignored == 1 && $value->recovered_cart == 0 ) {
277
+ $ac_status = __("Abandoned but new","woocommerce-ac")."</br>". __("cart created after this", "woocommerce-ac");
278
+ } else {
279
+ $ac_status = "";
280
+ }
281
+
282
+ if ( $compare_time > $cut_off_time && $ac_status != "" ) {
283
+
284
+ if( $quantity_total > 0 ) {
285
+
286
+ $abandoned_order_id = $abandoned_order_id;
287
+ $customer_information = $user_first_name . " ".$user_last_name;
288
+ $return_abadoned_orders[ $i ]->id = $abandoned_order_id;
289
+ $return_abadoned_orders[ $i ]->email = $user_email;
290
+ $return_abadoned_orders[ $i ]->customer = $customer_information;
291
+ $return_abadoned_orders[ $i ]->order_total = get_woocommerce_currency_symbol() . "" . $line_total;
292
+ $return_abadoned_orders[ $i ]->date = $order_date;
293
+ $return_abadoned_orders[ $i ]->status = $ac_status;
294
+
295
+ }
296
+ $i++;
297
+ }
298
+
299
+ }
300
+
301
+ // sort for order date
302
+ if (isset($_GET['orderby']) && $_GET['orderby'] == 'date') {
303
+ if (isset($_GET['order']) && $_GET['order'] == 'asc') {
304
+ usort( $return_abadoned_orders, array( __CLASS__ ,"wcap_class_order_date_asc") );
305
+ }
306
+ else {
307
+ usort( $return_abadoned_orders, array( __CLASS__ ,"wcap_class_order_date_dsc") );
308
+ }
309
+ }
310
+
311
+ // sort for customer name
312
+ else if ( isset( $_GET['orderby']) && $_GET['orderby'] == 'status' ) {
313
+ if ( isset( $_GET['order'] ) && $_GET['order'] == 'asc' ) {
314
+ usort( $return_abadoned_orders, array( __CLASS__ ,"wcap_class_status_asc" ) );
315
+ }
316
+ else {
317
+ usort( $return_abadoned_orders, array( __CLASS__ ,"wcap_class_status_dsc" ) );
318
+ }
319
+ }
320
+
321
+ if (isset($_GET['paged']) && $_GET['paged'] > 1) {
322
+ $page_number = $_GET['paged'] - 1;
323
+ $k = $per_page * $page_number;
324
+ }
325
+ else {
326
+ $k = 0;
327
+ }
328
+ $return_abadoned_orders_display = array();
329
+ for ($j = $k;$j < ($k+$per_page);$j++) {
330
+ if (isset($return_abadoned_orders[$j])) {
331
+ $return_abadoned_orders_display[$j] = $return_abadoned_orders[$j];
332
+ }
333
+ else {
334
+ break;
335
+ }
336
+ }
337
+ return apply_filters( 'wcap_abandoned_orders_table_data', $return_abadoned_orders_display );
338
+ }
339
+ function wcap_class_order_date_asc($value1,$value2) {
340
+
341
+ $date_two = $date_one = '';
342
+ $value_one = $value1->date;
343
+ $value_two = $value2->date;
344
+
345
+ $date_formatted_one = date_create_from_format( 'd M, Y h:i A', $value_one );
346
+ if ( isset( $date_formatted_one ) && $date_formatted_one != '' ) {
347
+ $date_one = date_format( $date_formatted_one, 'Y-m-d' );
348
+ }
349
+
350
+ $date_formatted_two = date_create_from_format( 'd M, Y h:i A', $value_two );
351
+ if ( isset( $date_formatted_two ) && $date_formatted_two != '' ) {
352
+ $date_two = date_format( $date_formatted_two, 'Y-m-d' );
353
+ }
354
+ return strtotime($date_one) - strtotime($date_two);
355
+ }
356
+ function wcap_class_order_date_dsc($value1,$value2) {
357
+
358
+ $date_two = $date_one = '';
359
+ $value_one = $value1->date;
360
+ $value_two = $value2->date;
361
+
362
+ $date_formatted_one = date_create_from_format( 'd M, Y h:i A', $value_one );
363
+ if ( isset( $date_formatted_one ) && $date_formatted_one != '' ) {
364
+ $date_one = date_format( $date_formatted_one, 'Y-m-d' );
365
+ }
366
+
367
+ $date_formatted_two = date_create_from_format( 'd M, Y h:i A', $value_two );
368
+ if ( isset( $date_formatted_two ) && $date_formatted_two != '' ) {
369
+ $date_two = date_format( $date_formatted_two, 'Y-m-d' );
370
+ }
371
+
372
+ return strtotime($date_two) - strtotime($date_one);
373
+ }
374
+
375
+ function wcap_class_status_asc($value1,$value2) {
376
+ return strcasecmp($value1->status,$value2->status );
377
+ }
378
+
379
+ function wcap_class_status_dsc ($value1,$value2) {
380
+ return strcasecmp($value2->status,$value1->status );
381
+ }
382
+
383
+ public function column_default( $wcap_abadoned_orders, $column_name ) {
384
+ $value = '';
385
+ switch ( $column_name ) {
386
+ case 'id' :
387
+ if(isset($wcap_abadoned_orders->id)){
388
+ $value = '<strong><a href="admin.php?page=woocommerce_ac_page&action=orderdetails&id='.$wcap_abadoned_orders->id.' ">'.$wcap_abadoned_orders->id.'</a> </strong>';
389
+ }
390
+ break;
391
+ case 'customer' :
392
+ if(isset($wcap_abadoned_orders->customer)){
393
+ $value = $wcap_abadoned_orders->customer;
394
+ }
395
+ break;
396
+
397
+ case 'order_total' :
398
+ if(isset($wcap_abadoned_orders->order_total)){
399
+ $value = $wcap_abadoned_orders->order_total;
400
+ }
401
+ break;
402
+
403
+ case 'date' :
404
+ if(isset($wcap_abadoned_orders->date)){
405
+ $value = $wcap_abadoned_orders->date;
406
+ }
407
+ break;
408
+
409
+ case 'status' :
410
+ if(isset($wcap_abadoned_orders->status)){
411
+ $value = $wcap_abadoned_orders->status;
412
+ }
413
+ break;
414
+
415
+ default:
416
+
417
+ $value = isset( $booking->$column_name ) ? $booking->$column_name : '';
418
+ break;
419
+ }
420
+
421
+ return apply_filters( 'wcap_abandoned_orders_column_default', $value, $wcap_abadoned_orders, $column_name );
422
+ }
423
+
424
+ public function get_bulk_actions() {
425
+ return array(
426
+ 'wcap_delete' => __( 'Delete', 'woocommerce-ac' )
427
+ );
428
+ }
429
+ }
430
+ ?>
class-recover-orders-table.php ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Load WP_List_Table if not loaded
4
+ if ( ! class_exists( 'WP_List_Table' ) ) {
5
+ require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
6
+ }
7
+
8
+ class WACP_Recover_Orders_Table extends WP_List_Table {
9
+
10
+ /**
11
+ * Number of results to show per page
12
+ *
13
+ * @var string
14
+ * @since 2.5.2
15
+ */
16
+ public $per_page = 30;
17
+
18
+ /**
19
+ * URL of this page
20
+ *
21
+ * @var string
22
+ * @since 2.5.2
23
+ */
24
+ public $base_url;
25
+
26
+ /**
27
+ * Total number of recovred orders
28
+ *
29
+ * @var int
30
+ * @since 2.5.2
31
+ */
32
+ public $total_count;
33
+
34
+
35
+ /**
36
+ * Total number of recovred orders
37
+ *
38
+ * @var int
39
+ * @since 2.5.2
40
+ */
41
+ public $total_abandoned_cart_count;
42
+
43
+ /**
44
+ * Total amount of abadoned orders
45
+ *
46
+ * @var int
47
+ * @since 2.5.2
48
+ */
49
+ public $total_order_amount;
50
+
51
+ /**
52
+ * Total number recovred orders
53
+ *
54
+ * @var int
55
+ * @since 2.5.2
56
+ */
57
+ public $recovered_item;
58
+
59
+ /**
60
+ * Total number recovred orders total
61
+ *
62
+ * @var int
63
+ * @since 2.5.2
64
+ */
65
+ public $total_recover_amount;
66
+
67
+
68
+ /**
69
+ * Get things started
70
+ *
71
+ * @see WP_List_Table::__construct()
72
+ */
73
+ public function __construct() {
74
+
75
+ global $status, $page;
76
+
77
+ // Set parent defaults
78
+ parent::__construct( array(
79
+ 'singular' => __( 'rec_abandoned_id', 'woocommerce-ac' ), //singular name of the listed records
80
+ 'plural' => __( 'rec_abandoned_ids', 'woocommerce-ac' ), //plural name of the listed records
81
+ 'ajax' => false // Does this table support ajax?
82
+ ) );
83
+ $this->wcap_get_recovered_orders_count_lite();
84
+
85
+ $this->base_url = admin_url( 'admin.php?page=woocommerce_ac_page&action=stats' );
86
+ }
87
+
88
+ public function wcap_recovered_orders_prepare_items_lite() {
89
+
90
+ $columns = $this->get_columns();
91
+ $hidden = array(); // No hidden columns
92
+ $sortable = $this->recovered_orders_get_sortable_columns();
93
+ $data = $this->wacp_recovered_orders_data_lite();
94
+
95
+ $total_items = $this->total_count;
96
+ $total_abandoned_cart_count = $this->total_abandoned_cart_count;
97
+ $total_order_amount = $this->total_order_amount;
98
+ $total_recover_amount = $this->total_recover_amount;
99
+ $recovered_item = $this->recovered_item;
100
+ $this->items = $data;
101
+
102
+ $this->_column_headers = array( $columns, $hidden, $sortable);
103
+
104
+ $this->set_pagination_args( array(
105
+ 'total_items' => $total_items, // WE have to calculate the total number of items
106
+ 'per_page' => $this->per_page, // WE have to determine how many items to show on a page
107
+ 'total_pages' => ceil( $total_items / $this->per_page ) // WE have to calculate the total number of pages
108
+ )
109
+ );
110
+ }
111
+
112
+ public function get_columns() {
113
+
114
+ $columns = array(
115
+
116
+ 'user_name' => __( 'User Name', 'woocommerce-ac' ),
117
+ 'user_email_id' => __( 'User Email Address', 'woocommerce-ac' ),
118
+ 'created_on' => __( 'Cart Abandoned Date', 'woocommerce-ac' ),
119
+ 'recovered_date' => __( 'Cart Recovered Date' , 'woocommerce-ac'),
120
+ 'order_total' => __( 'Order Total', 'woocommerce-ac' )
121
+
122
+ );
123
+
124
+ return apply_filters( 'wcap_recovered_orders_columns', $columns );
125
+ }
126
+
127
+ public function recovered_orders_get_sortable_columns() {
128
+ $columns = array(
129
+ 'created_on' => array( 'created_on', false ),
130
+ 'recovered_date' => array( 'recovered_date',false)
131
+ );
132
+ return apply_filters( 'wcap_templates_sortable_columns', $columns );
133
+ }
134
+
135
+ /**
136
+ * Render the user name Column
137
+ *
138
+ * @access public
139
+ * @since 2.5.2
140
+ * @param array $abadoned_row_info Contains all the data of the template row
141
+ * @return string Data shown in the Email column
142
+ *
143
+ * This function used for individual delete of row, It is for hover effect delete.
144
+ */
145
+ public function column_user_name( $recovered_orders_row_info ) {
146
+
147
+ $row_actions = array();
148
+ $value = '';
149
+ $recovered_id = 0;
150
+
151
+ if( isset($recovered_orders_row_info->user_name ) ){
152
+ $recovered_id = $recovered_orders_row_info->recovered_id ;
153
+ $row_actions['view_details'] = "<a target=_blank href = post.php?post=$recovered_id&action=edit>". __( 'View Details', 'woocommerce-ac' )."</a>";
154
+ $user_name = $recovered_orders_row_info->user_name;
155
+ $value = $user_name . $this->row_actions( $row_actions );
156
+ }
157
+
158
+ return apply_filters( 'wcap_recovered_orders_single_column', $value, $recovered_id, 'email' );
159
+ }
160
+
161
+ /***
162
+ * This function used to get the abadoned orders count
163
+ */
164
+ public function wcap_get_recovered_orders_count_lite() {
165
+
166
+ global $wpdb;
167
+
168
+ if ( isset( $_POST['start_date'] ) ) $start_date_range = $_POST['start_date'];
169
+ else $start_date_range = "";
170
+
171
+ if ( isset( $_POST['end_date'] ) ) $end_date_range = $_POST['end_date'];
172
+ else $end_date_range = "";
173
+
174
+ $start_date = strtotime( $start_date_range." 00:01:01" );
175
+ $end_date = strtotime( $end_date_range." 23:59:59" );
176
+
177
+ $query_ac = "SELECT * FROM " . $wpdb->prefix . "ac_abandoned_cart_history_lite WHERE abandoned_cart_time >= %d AND abandoned_cart_time <= %d AND recovered_cart > 0 ORDER BY recovered_cart desc";
178
+ $ac_results = $wpdb->get_results( $wpdb->prepare( $query_ac, $start_date, $end_date ) );
179
+
180
+ $templates_count = count($ac_results);
181
+ $this->total_count = $templates_count;
182
+ }
183
+
184
+ public function wacp_recovered_orders_data_lite() {
185
+ global $wpdb;
186
+
187
+ $wcap_class = new woocommerce_abandon_cart ();
188
+
189
+ if ( isset( $_POST['duration_select'] ) ) $duration_range = $_POST['duration_select'];
190
+ else $duration_range = "";
191
+
192
+ if ( $duration_range == "" ) {
193
+
194
+ if ( isset( $_GET['duration_select'] ) ) $duration_range = $_GET['duration_select'];
195
+ }
196
+
197
+ if ( $duration_range == "" ) $duration_range = "last_seven";
198
+ else $duration_range = "";
199
+
200
+ if ( isset( $_POST['start_date'] ) ) $start_date_range = $_POST['start_date'];
201
+ else $start_date_range = "";
202
+
203
+ if ( $start_date_range == "" ) {
204
+
205
+
206
+ $start_date_range = $wcap_class->start_end_dates[$duration_range]['start_date'];
207
+
208
+ }
209
+
210
+ if ( isset( $_POST['end_date'] ) ) $end_date_range = $_POST['end_date'];
211
+ else $end_date_range = "";
212
+
213
+ if ( $end_date_range == "" ) {
214
+ $end_date_range = $wcap_class->start_end_dates[$duration_range]['end_date'];
215
+ }
216
+
217
+ $start_date = strtotime( $start_date_range." 00:01:01" );
218
+ $end_date = strtotime( $end_date_range." 23:59:59" );
219
+
220
+ $query_ac = "SELECT * FROM " . $wpdb->prefix . "ac_abandoned_cart_history_lite WHERE abandoned_cart_time >= %d AND abandoned_cart_time <= %d AND recovered_cart > 0 ORDER BY recovered_cart desc";
221
+ $ac_results = $wpdb->get_results( $wpdb->prepare( $query_ac, $start_date, $end_date ) );
222
+
223
+ $query_ac_carts = "SELECT * FROM " . $wpdb->prefix . "ac_abandoned_cart_history_lite WHERE abandoned_cart_time >= %d AND abandoned_cart_time <= %d ";
224
+ $ac_carts_results = $wpdb->get_results( $wpdb->prepare( $query_ac_carts, $start_date, $end_date ) );
225
+
226
+ $recovered_item = $recovered_total = $count_carts = $total_value = $order_total = 0;
227
+
228
+ $return_recovered_orders = array();
229
+ $per_page = $this->per_page;
230
+ $i = 1;
231
+
232
+
233
+ foreach ( $ac_carts_results as $key => $value ) {
234
+
235
+ $count_carts += 1;
236
+ $cart_detail = json_decode( $value->abandoned_cart_info );
237
+ $product_details = array();
238
+ if( isset( $cart_detail->cart ) ){
239
+ $product_details = $cart_detail->cart;
240
+ }
241
+ $line_total = 0;
242
+
243
+ if ( isset( $product_details ) && count( $product_details ) > 0 && $product_details != false ) {
244
+
245
+ foreach ( $product_details as $k => $v ) {
246
+
247
+ if( $v->line_subtotal_tax != 0 && $v->line_subtotal_tax > 0 ) {
248
+ $line_total = $line_total + $v->line_total + $v->line_subtotal_tax;
249
+ } else {
250
+ $line_total = $line_total + $v->line_total;
251
+ }
252
+ }
253
+ }
254
+ $total_value += $line_total;
255
+
256
+ }
257
+ $total_value = round( $total_value, 2 );
258
+
259
+
260
+ $this->total_order_amount = $total_value ;
261
+ $this->total_abandoned_cart_count = $count_carts ;
262
+
263
+ $recovered_order_total = 0;
264
+
265
+ $this->total_recover_amount = round( $recovered_order_total, 2 ) ;
266
+
267
+
268
+ $table_data = "";
269
+
270
+ foreach ( $ac_results as $key => $value ) {
271
+
272
+
273
+ if( $value->recovered_cart != 0 ) {
274
+
275
+ $return_recovered_orders[$i] = new stdClass();
276
+
277
+ $recovered_id = $value->recovered_cart;
278
+ $rec_order = get_post_meta( $recovered_id );
279
+ $woo_order = new WC_Order( $recovered_id );
280
+ $recovered_date = strtotime( $woo_order->order_date );
281
+ $recovered_date_new = date( 'd M, Y h:i A', $recovered_date );
282
+ $recovered_item += 1;
283
+
284
+ if ( isset($rec_order) && $rec_order != false ) {
285
+ $recovered_total += $rec_order['_order_total'][0];
286
+ }
287
+ $abandoned_date = date( 'd M, Y h:i A', $value->abandoned_cart_time );
288
+ $abandoned_order_id = $value->id;
289
+ $billing_first_name = $billing_last_name = $billing_email = '';
290
+ $recovered_order_total = 0;
291
+
292
+ if ( isset( $rec_order['_billing_first_name'][0] ) ) {
293
+ $billing_first_name = $rec_order['_billing_first_name'][0];
294
+ }
295
+
296
+ if ( isset( $rec_order['_billing_last_name'][0] ) ) {
297
+ $billing_last_name = $rec_order['_billing_last_name'][0];
298
+ }
299
+
300
+ if ( isset( $rec_order['_billing_email'][0] ) ) {
301
+ $billing_email = $rec_order['_billing_email'][0];
302
+ }
303
+
304
+ if ( isset( $rec_order['_order_total'][0] ) ) {
305
+ $recovered_order_total = $rec_order['_order_total'][0];
306
+ }
307
+
308
+ $return_recovered_orders[ $i ]->user_name = $billing_first_name . " " . $billing_last_name ;
309
+ $return_recovered_orders[ $i ]->user_email_id = $billing_email;
310
+ $return_recovered_orders[ $i ]->created_on = $abandoned_date;
311
+ $return_recovered_orders[ $i ]->recovered_date = $recovered_date_new;
312
+ $return_recovered_orders[ $i ]->recovered_id = $recovered_id;
313
+ $return_recovered_orders[ $i ]->recover_order_date = $recovered_date;
314
+ $return_recovered_orders[ $i ]->abandoned_date = $value->abandoned_cart_time;
315
+ $return_recovered_orders[ $i ]->order_total = get_woocommerce_currency_symbol() . $recovered_order_total;
316
+
317
+
318
+ $this->recovered_item = $recovered_item;
319
+ $this->total_recover_amount = round( ( $recovered_order_total + $this->total_recover_amount ) , 2 ) ;
320
+
321
+ $i++;
322
+ }
323
+
324
+
325
+ }
326
+
327
+ // sort for order date
328
+ if (isset($_GET['orderby']) && $_GET['orderby'] == 'created_on') {
329
+ if (isset($_GET['order']) && $_GET['order'] == 'asc') {
330
+ usort( $return_recovered_orders, array( __CLASS__ ,"wcap_class_recovered_created_on_asc") );
331
+ }else {
332
+ usort( $return_recovered_orders, array( __CLASS__ ,"wcap_class_recovered_created_on_dsc") );
333
+ }
334
+ }
335
+
336
+ // sort for customer name
337
+ else if ( isset( $_GET['orderby']) && $_GET['orderby'] == 'recovered_date' ) {
338
+ if ( isset( $_GET['order'] ) && $_GET['order'] == 'asc' ) {
339
+ usort( $return_recovered_orders, array( __CLASS__ ,"wcap_class_recovered_date_asc" ) );
340
+ }else {
341
+ usort( $return_recovered_orders, array( __CLASS__ ,"wcap_class_recovered_date_dsc" ) );
342
+ }
343
+ }
344
+
345
+
346
+ return apply_filters( 'wcap_recovered_orders_table_data', $return_recovered_orders );
347
+ }
348
+
349
+ function wcap_class_recovered_created_on_asc($value1,$value2) {
350
+ return $value1->abandoned_date - $value2->abandoned_date;
351
+ }
352
+
353
+ function wcap_class_recovered_created_on_dsc ($value1,$value2) {
354
+ return $value2->abandoned_date - $value1->abandoned_date;
355
+ }
356
+
357
+ function wcap_class_recovered_date_asc($value1,$value2) {
358
+ return $value1->recover_order_date - $value2->recover_order_date;
359
+ }
360
+
361
+ function wcap_class_recovered_date_dsc ($value1,$value2) {
362
+ return $value2->recover_order_date - $value1->recover_order_date;
363
+ }
364
+
365
+
366
+ public function column_default( $wcap_abadoned_orders, $column_name ) {
367
+ $value = '';
368
+ switch ( $column_name ) {
369
+
370
+ case 'user_email_id' :
371
+ if(isset($wcap_abadoned_orders->user_email_id)){
372
+
373
+ $user_email_id = "<a href= mailto:$wcap_abadoned_orders->user_email_id>". $wcap_abadoned_orders->user_email_id."</a>" ;
374
+ $value = $user_email_id;
375
+ }
376
+ break;
377
+
378
+ case 'created_on' :
379
+ if(isset($wcap_abadoned_orders->created_on)){
380
+ $value = $wcap_abadoned_orders->created_on;
381
+ }
382
+ break;
383
+
384
+ case 'recovered_date' :
385
+ if(isset($wcap_abadoned_orders->recovered_date)){
386
+ $value = $wcap_abadoned_orders->recovered_date;
387
+ }
388
+ break;
389
+
390
+ case 'order_total' :
391
+ if(isset($wcap_abadoned_orders->order_total)){
392
+ $value = $wcap_abadoned_orders->order_total;
393
+ }
394
+ break;
395
+ default:
396
+
397
+ $value = isset( $wcap_abadoned_orders->$column_name ) ? $wcap_abadoned_orders->$column_name : '';
398
+ break;
399
+ }
400
+
401
+ return apply_filters( 'wcap_recovered_orders_column_default', $value, $wcap_abadoned_orders, $column_name );
402
+ }
403
+ }
404
+ ?>
class-templates-table.php ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Load WP_List_Table if not loaded
4
+ if ( ! class_exists( 'WP_List_Table' ) ) {
5
+ require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
6
+ }
7
+
8
+ class WACP_Templates_Table extends WP_List_Table {
9
+
10
+ /**
11
+ * Number of results to show per page
12
+ *
13
+ * @var string
14
+ * @since 2.5.2
15
+ */
16
+ public $per_page = 30;
17
+
18
+ /**
19
+ * URL of this page
20
+ *
21
+ * @var string
22
+ * @since 2.5.2
23
+ */
24
+ public $base_url;
25
+
26
+
27
+ /**
28
+ * Get things started
29
+ *
30
+ * @see WP_List_Table::__construct()
31
+ */
32
+ public function __construct() {
33
+
34
+ global $status, $page;
35
+
36
+ // Set parent defaults
37
+ parent::__construct( array(
38
+ 'singular' => __( 'template_id', 'woocommerce-ac' ), //singular name of the listed records
39
+ 'plural' => __( 'template_ids', 'woocommerce-ac' ), //plural name of the listed records
40
+ 'ajax' => false // Does this table support ajax?
41
+ ) );
42
+ $this->wcap_get_templates_count();
43
+ $this->process_bulk_action();
44
+ $this->base_url = admin_url( 'admin.php?page=woocommerce_ac_page&action=emailtemplates' );
45
+ }
46
+
47
+ public function wcap_templates_prepare_items() {
48
+
49
+ $columns = $this->get_columns();
50
+ $hidden = array(); // No hidden columns
51
+ $sortable = $this->templates_get_sortable_columns();
52
+ $data = $this->wacp_templates_data_lite();
53
+
54
+ $this->_column_headers = array( $columns, $hidden, $sortable);
55
+ $total_items = $this->total_count;
56
+ $this->items = $data;
57
+
58
+ $this->set_pagination_args( array(
59
+ 'total_items' => $total_items, // WE have to calculate the total number of items
60
+ 'per_page' => $this->per_page, // WE have to determine how many items to show on a page
61
+ 'total_pages' => ceil( $total_items / $this->per_page ) // WE have to calculate the total number of pages
62
+ )
63
+ );
64
+ }
65
+
66
+ public function get_columns() {
67
+
68
+ $columns = array(
69
+ 'cb' => '<input type="checkbox" />',
70
+ 'sr' => __( 'Sr', 'woocommerce-ac' ),
71
+ 'template_name' => __( 'Name Of Template', 'woocommerce-ac' ),
72
+ 'sent_time' => __( 'Sent After Set Time', 'woocommerce-ac' ),
73
+ 'activate' => __( 'Active ?', 'woocommerce-ac' )
74
+ );
75
+
76
+ return apply_filters( 'wcap_templates_columns', $columns );
77
+ }
78
+
79
+ /***
80
+ * It is used to add the check box for the items
81
+ */
82
+ function column_cb( $item ){
83
+
84
+ $template_id = '';
85
+ if( isset($item->id) && "" != $item->id ){
86
+ $template_id = $item->id;
87
+ }
88
+ return sprintf(
89
+ '<input type="checkbox" name="%1$s[]" value="%2$s" />',
90
+ 'template_id',
91
+ $template_id
92
+ );
93
+ }
94
+
95
+ public function templates_get_sortable_columns() {
96
+ $columns = array(
97
+ 'template_name' => array( 'template_name', false ),
98
+ 'sent_time' => array( 'sent_time',false),
99
+ );
100
+ return apply_filters( 'wcap_templates_sortable_columns', $columns );
101
+ }
102
+
103
+ /**
104
+ * Render the Email Column
105
+ *
106
+ * @access public
107
+ * @since 2.5.2
108
+ * @param array $abadoned_row_info Contains all the data of the template row
109
+ * @return string Data shown in the Email column
110
+ *
111
+ * This function used for individual delete of row, It is for hover effect delete.
112
+ */
113
+ public function column_template_name( $template_row_info ) {
114
+
115
+ $row_actions = array();
116
+ $value = '';
117
+ $template_id = 0;
118
+ if( isset($template_row_info->template_name) ){
119
+
120
+ $template_id = $template_row_info->id ;
121
+
122
+ $row_actions['edit'] = '<a href="' . wp_nonce_url( add_query_arg( array( 'action' => 'emailtemplates', 'mode'=>'edittemplate', 'id' => $template_row_info->id ), $this->base_url ), 'abandoned_order_nonce') . '">' . __( 'Edit', 'woocommerce-ac' ) . '</a>';
123
+ $row_actions['delete'] = '<a href="' . wp_nonce_url( add_query_arg( array( 'action' => 'wcap_delete_template', 'template_id' => $template_row_info->id ), $this->base_url ), 'abandoned_order_nonce') . '">' . __( 'Delete', 'woocommerce-ac' ) . '</a>';
124
+
125
+ $email = $template_row_info->template_name;
126
+ $value = $email . $this->row_actions( $row_actions );
127
+
128
+ }
129
+
130
+ return apply_filters( 'wcap_template_single_column', $value, $template_id, 'email' );
131
+ }
132
+
133
+ /***
134
+ * This function used to get the abadoned orders count
135
+ */
136
+ public function wcap_get_templates_count() {
137
+
138
+ global $wpdb;
139
+ $results = array();
140
+
141
+ // get main site's table prefix
142
+ $main_prefix = $wpdb->get_blog_prefix(1);
143
+ $query = "SELECT * FROM `" . $wpdb->prefix."ac_email_templates_lite`";
144
+ $results = $wpdb->get_results($query);
145
+
146
+ $templates_count = count($results);
147
+ $this->total_count = $templates_count;
148
+ }
149
+
150
+ public function wacp_templates_data_lite() {
151
+ global $wpdb;
152
+
153
+ $return_bookings = array();
154
+ $per_page = $this->per_page;
155
+ $results = array();
156
+
157
+ $query = "SELECT wpet . * FROM `" . $wpdb->prefix . "ac_email_templates_lite` AS wpet ORDER BY day_or_hour desc , frequency asc";
158
+ $results = $wpdb->get_results( $query );
159
+
160
+ $i = 1;
161
+
162
+ foreach ( $results as $key => $value ) {
163
+
164
+ $return_templates_data[$i] = new stdClass();
165
+
166
+
167
+ $id = $value->id;
168
+ $query_no_emails = "SELECT * FROM " . $wpdb->prefix . "ac_sent_history_lite WHERE template_id= %d";
169
+
170
+ $from = $value->from_email;
171
+ $subject = $value->subject;
172
+ $body = $value->body;
173
+ $is_active = $value->is_active;
174
+
175
+ if ( $is_active == '1' ) {
176
+ $active = "Deactivate";
177
+ } else {
178
+ $active = "Activate";
179
+ }
180
+ $frequency = $value->frequency;
181
+ $day_or_hour = $value->day_or_hour;
182
+
183
+ $return_templates_data[ $i ]->sr = $i;
184
+ $return_templates_data[ $i ]->id = $id;
185
+ $return_templates_data[ $i ]->template_name = $value->template_name;
186
+ $return_templates_data[ $i ]->sent_time = __( $frequency . " " . $day_or_hour . " After Abandonment", 'woocommerce-ac' );
187
+ $return_templates_data[ $i ]->activate = $active;
188
+ $return_templates_data[ $i ]->is_active = $is_active;
189
+ $i++;
190
+
191
+ }
192
+
193
+ // sort for order date
194
+ if (isset($_GET['orderby']) && $_GET['orderby'] == 'template_name') {
195
+ if (isset($_GET['order']) && $_GET['order'] == 'asc') {
196
+ usort( $return_templates_data, array( __CLASS__ ,"wcap_class_template_name_asc") );
197
+ }else {
198
+ usort( $return_templates_data, array( __CLASS__ ,"wcap_class_template_name_dsc") );
199
+ }
200
+ }
201
+
202
+ // sort for customer name
203
+ else if ( isset( $_GET['orderby']) && $_GET['orderby'] == 'sent_time' ) {
204
+ if ( isset( $_GET['order'] ) && $_GET['order'] == 'asc' ) {
205
+ usort( $return_templates_data, array( __CLASS__ ,"wcap_class_sent_time_asc" ) );
206
+ }else {
207
+ usort( $return_templates_data, array( __CLASS__ ,"wcap_class_sent_time_dsc" ) );
208
+ }
209
+ }
210
+
211
+
212
+ return apply_filters( 'wcap_templates_table_data', $return_templates_data );
213
+ }
214
+
215
+ function wcap_class_template_name_asc($value1,$value2) {
216
+ return strcasecmp($value1->template_name,$value2->template_name );
217
+ }
218
+
219
+ function wcap_class_template_name_dsc ($value1,$value2) {
220
+ return strcasecmp($value2->template_name,$value1->template_name );
221
+ }
222
+
223
+ function wcap_class_sent_time_asc($value1,$value2) {
224
+ return strnatcasecmp($value1->sent_time,$value2->sent_time );
225
+ }
226
+
227
+ function wcap_class_sent_time_dsc ($value1,$value2) {
228
+ return strnatcasecmp($value2->sent_time,$value1->sent_time );
229
+ }
230
+
231
+
232
+ public function column_default( $wcap_abadoned_orders, $column_name ) {
233
+ $value = '';
234
+ switch ( $column_name ) {
235
+
236
+ case 'sr' :
237
+ if(isset($wcap_abadoned_orders->sr)){
238
+ $value = $wcap_abadoned_orders->sr;
239
+ }
240
+ break;
241
+
242
+ case 'template_name' :
243
+ if(isset($wcap_abadoned_orders->template_name)){
244
+ $value = $wcap_abadoned_orders->template_name;
245
+ }
246
+ break;
247
+
248
+ case 'sent_time' :
249
+ if(isset($wcap_abadoned_orders->sent_time)){
250
+ $value = $wcap_abadoned_orders->sent_time;
251
+ }
252
+ break;
253
+
254
+ case 'activate' :
255
+ if(isset($wcap_abadoned_orders->activate)){
256
+
257
+ $active = $wcap_abadoned_orders->activate;
258
+ $id = $wcap_abadoned_orders->id;
259
+ $is_active = $wcap_abadoned_orders->is_active;
260
+
261
+ $active = '';
262
+ if ( $is_active == '1' ) {
263
+ $active = "Deactivate";
264
+ } else {
265
+ $active = "Activate";
266
+ }
267
+ $active_text = __( $active, 'woocommerce-ac' );
268
+ $value = '<a href="#" onclick="activate_email_template('. $id.', '.$is_active.' )"> '.$active_text.'</a>';
269
+ //$value = $wcap_abadoned_orders->activate;
270
+ }
271
+ break;
272
+
273
+ default:
274
+
275
+ $value = isset( $wcap_abadoned_orders->$column_name ) ? $wcap_abadoned_orders->$column_name : '';
276
+ break;
277
+ }
278
+
279
+ return apply_filters( 'wcap_template_column_default', $value, $wcap_abadoned_orders, $column_name );
280
+ }
281
+
282
+ public function get_bulk_actions() {
283
+ return array(
284
+ 'wcap_delete_template' => __( 'Delete', 'woocommerce-ac' )
285
+ );
286
+ }
287
+ }
288
+ ?>
cron/send_email.php CHANGED
@@ -1,7 +1,11 @@
1
  <?php
2
 
3
- if(defined('WP_CONTENT_FOLDERNAME')){
4
  $wp_content_dir_name = WP_CONTENT_FOLDERNAME;
 
 
 
 
5
  }else{
6
  $wp_content_dir_name = "wp-content";
7
  }
@@ -177,9 +181,9 @@ require_once $path . 'wp-load.php';
177
  $email_frequency = $value->frequency;
178
  $email_body_template = $value->body;
179
  $email_subject = $value->subject;
180
- $user_email_from = get_option( 'admin_email' );
181
- $headers[] = "From: ".$value->from_name." <".$user_email_from.">"."\r\n";
182
- $headers[] = "Content-Type: text/html"."\r\n";
183
  $template_id = $value->id;
184
  $is_wc_template = $value->is_wc_template;
185
 
@@ -440,4 +444,4 @@ require_once $path . 'wp-load.php';
440
 
441
  $woocommerce_abandon_cart_cron->woocommerce_ac_send_email();
442
 
443
- ?>
1
  <?php
2
 
3
+ if( defined('WP_CONTENT_FOLDERNAME' ) ) {
4
  $wp_content_dir_name = WP_CONTENT_FOLDERNAME;
5
+ }elseif( defined( 'WP_CONTENT_DIR' ) ) {
6
+ $url = WP_CONTENT_DIR;
7
+ $explode_url = explode( "/", $url );
8
+ $wp_content_dir_name = end( $explode_url );
9
  }else{
10
  $wp_content_dir_name = "wp-content";
11
  }
181
  $email_frequency = $value->frequency;
182
  $email_body_template = $value->body;
183
  $email_subject = $value->subject;
184
+ $headers = "From: " . $value->from_name . " <" . $value->from_email . ">" . "\r\n";
185
+ $headers .= "Content-Type: text/html"."\r\n";
186
+ $headers .= "Reply-To: " . $value->reply_email . " " . "\r\n";
187
  $template_id = $value->id;
188
  $is_wc_template = $value->is_wc_template;
189
 
444
 
445
  $woocommerce_abandon_cart_cron->woocommerce_ac_send_email();
446
 
447
+ ?>
css/view.abadoned.orders.style.css ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Decrease the width of the Id column */
2
+ table.wp-list-table .column-id {
3
+ width:5%;
4
+ }
5
+ /* Decrease the width of the cutomer name column
6
+ table.wp-list-table .column-customer {
7
+ width:12%;
8
+ }*/
9
+ /* Decrease the width of the email column*/
10
+ table.wp-list-table .column-email {
11
+ width:15%;
12
+ }
13
+
14
+ /* Decrease the width of the abandoned order date column */
15
+ table.wp-list-table .column-date {
16
+ width:20%;
17
+ }
18
+
19
+ /* Decrease the width of the abandoned order total column */
20
+ table.wp-list-table .column-order_total {
21
+ width:20%;
22
+ }
23
+
24
+ /* This is for the new cart and checkout button in tinymce */
25
+ #woocommerce_ac_email_body_abandoncart_email_variables_css{
26
+
27
+ width : 60px !important;
28
+ }
29
+
30
+ span.mce_abandoncart_email_variables_css {
31
+
32
+ width : 60px !important;
33
+ }
34
+
35
+ /* Decrease the width of the sr column in templates tab */
36
+ table.wp-list-table .column-sr {
37
+ width:4% !important;
38
+ }
default-settings.php CHANGED
@@ -36,9 +36,11 @@ class default_template_settings {
36
  $ac_from_name = 'Admin';
37
  $is_wc_template = 1 ;
38
  $default_template = 1;
 
 
39
 
40
  $query = "INSERT INTO `" . $wpdb->prefix . "ac_email_templates_lite`
41
- ( subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template )
42
  VALUES ( '" . $template_subject_array . "',
43
  '" . $body_content_array . "',
44
  '" . $active_post_array . "',
@@ -47,10 +49,11 @@ class default_template_settings {
47
  '" . $template_name_array . "',
48
  '" . $ac_from_name . "',
49
  '" . $is_wc_template . "',
50
- '" . $default_template . "' )";
 
 
51
 
52
-
53
  $wpdb->query( $query );
54
 
55
  }
56
- }
36
  $ac_from_name = 'Admin';
37
  $is_wc_template = 1 ;
38
  $default_template = 1;
39
+ $from_email = get_option( 'admin_email' );
40
+ $ac_email_reply = get_option( 'admin_email' );
41
 
42
  $query = "INSERT INTO `" . $wpdb->prefix . "ac_email_templates_lite`
43
+ ( subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template, reply_email, from_email )
44
  VALUES ( '" . $template_subject_array . "',
45
  '" . $body_content_array . "',
46
  '" . $active_post_array . "',
49
  '" . $template_name_array . "',
50
  '" . $ac_from_name . "',
51
  '" . $is_wc_template . "',
52
+ '" . $default_template . "',
53
+ '" . $ac_email_reply . "',
54
+ '" . $from_email . "' )";
55
 
 
56
  $wpdb->query( $query );
57
 
58
  }
59
+ }
images/spectre.jpg ADDED
Binary file
js/jquery.tipTip.minified.js CHANGED
@@ -1,21 +1,21 @@
1
- /*
2
- * TipTip
3
- * Copyright 2010 Drew Wilson
4
- * www.drewwilson.com
5
- * code.drewwilson.com/entry/tiptip-jquery-plugin
6
- *
7
- * Version 1.3 - Updated: Mar. 23, 2010
8
- *
9
- * This Plug-In will create a custom tooltip to replace the default
10
- * browser tooltip. It is extremely lightweight and very smart in
11
- * that it detects the edges of the browser window and will make sure
12
- * the tooltip stays within the current window size. As a result the
13
- * tooltip will adjust itself to be displayed above, below, to the left
14
- * or to the right depending on what is necessary to stay within the
15
- * browser window. It is completely customizable as well via CSS.
16
- *
17
- * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
18
- * http://www.opensource.org/licenses/mit-license.php
19
- * http://www.gnu.org/licenses/gpl.html
20
- */
21
  (function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
1
+ /*
2
+ * TipTip
3
+ * Copyright 2010 Drew Wilson
4
+ * www.drewwilson.com
5
+ * code.drewwilson.com/entry/tiptip-jquery-plugin
6
+ *
7
+ * Version 1.3 - Updated: Mar. 23, 2010
8
+ *
9
+ * This Plug-In will create a custom tooltip to replace the default
10
+ * browser tooltip. It is extremely lightweight and very smart in
11
+ * that it detects the edges of the browser window and will make sure
12
+ * the tooltip stays within the current window size. As a result the
13
+ * tooltip will adjust itself to be displayed above, below, to the left
14
+ * or to the right depending on what is necessary to stay within the
15
+ * browser window. It is completely customizable as well via CSS.
16
+ *
17
+ * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses:
18
+ * http://www.opensource.org/licenses/mit-license.php
19
+ * http://www.gnu.org/licenses/gpl.html
20
+ */
21
  (function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery);
js/tinymce/changelog.txt CHANGED
@@ -1,477 +1,477 @@
1
- Version 3.5.8 (2012-11-20)
2
- Fixed bug where html5 data attributes where stripped from contents.
3
- Fixed bug where toolbar was annouced multiple times with JAWS on Firefox.
4
- Fixed bug where the editor view whouldn't scroll to BR elements when using shift+enter or br enter mode.
5
- Fixed bug where a JS error would be thrown when trying to paste table rows then the rows clipboard was empty.
6
- Fixed bug with auto detection logic for youtube urls in the media plugin.
7
- Fixed bug where the formatter would throw errors if you used the jQuery version of TinyMCE and the latest jQuery.
8
- Fixed bug where the latest WebKit versions would produce span elements when deleting text between blocks.
9
- Fixed bug where the autolink plugin would produce DOM exceptions when pressing shift+enter inside a block element.
10
- Fixed bug where toggling of blockquotes when using br enter mode would produce an exception.
11
- Fixed bug where focusing out of the body of the editor wouldn't properly add an undo level.
12
- Fixed issue with warning message being displayed on IE 9+ about the meta header fix for IE 8.
13
- Version 3.5.7 (2012-09-20)
14
- Changed table row properties dialog to not update multiple rows when row type is header or footer.
15
- Fixed bug in hyperlink dialog for IE9 where links with no target attr set had target value of --
16
- Changing toolbars to have a toolbar role for FF keyboard navigation works correctly.
17
- Fixed bug where applying formatting to an empty block element would produce redundant spans.
18
- Fixed bug where caret formatting on IE wouldn't properly apply if you pressed enter/return.
19
- Fixed bug where loading TinyMCE using an async script wouldn't properly initialize editors.
20
- Fixed bug where some white space would be removed after inline elements before block elements.
21
- Fixed bug where it wouldn't properly parse attributes with a single backslash as it's contents.
22
- Fixed bug where noscript elements would loose it's contents on older IE versions.
23
- Fixed bug where backspace inside empty blockquote wouldn't delete it properly.
24
- Fixed bug where custom elements with . in their names wouldn't work properly.
25
- Fixed bug where the custom_elements option didn't properly setup the block elements schema structure.
26
- Fixed bug where the custom_elements option didn't auto populate the extended_valid_elements.
27
- Fixed bug where the whole TD element would get blcok formatted when there where BR elements in it.
28
- Fixed bug where IE 9 might crash if the editor was hidden and specific styles where applied to surrounding contents.
29
- Fixed bug where shift+enter inside a table cell on Gecko would produce an zero width non breaking space between tr:s.
30
- Fixed bug where the advlink dialog wouldn't properly populate the anchors dropdown if the HTML5 schema was used.
31
- Fixed issue with missing autofocus attribute on input element when using the HTML5 schema.
32
- Fixed issue where enter inside a block contained within an LI element wouldn't produce a new LI.
33
- Version 3.5.6 (2012-07-26)
34
- Added "text" as a valid option to the editor.getContent format option. Makes it easier to get a text representation of the editor contents.
35
- Fixed bug where resizing an image to less that 0x0 pixels would display the ghost image at an incorrect position.
36
- Fixed bug where the remove format button would produce extra paragraphs on WebKit if all of the contents was selected.
37
- Fixed issue where edge resize handles on images of wouldn't scale it with the same aspect ratio.
38
- Fixed so force_p_newlines option works again since some users want mixed mode paragraphs.
39
- Fixed so directionality plugin modifies the dir attribute of all selected blocks in the editor.
40
- Fixed bug where backspace/delete of a custom element would move it's attributes to the parent block on Gecko.
41
- Version 3.5.5 (2012-07-19)
42
- Added full resize support for images and tables on WebKit/Opera. It now behaves just like Gecko.
43
- Added automatic embed support for Vimeo, Stream.cz and Google Maps in media plugin. Patch contributed by Jakub Matas.
44
- Fixed bug where the lists plugin wouldn't properly remove all li elements when toggling selected items of. Patched by Taku AMANO.
45
- Fixed bug where the lists plugin would remove the entire list if you pressed deleted at the beginning of the first element. Patched by Taku AMANO.
46
- Fixed bug where the ordered/unordered list buttons could both be enabled if you nested lists. Patch contributed by Craig Petchell.
47
- Fixed bug where shift+enter wouldn't produce a BR in a LI when having forced_root_blocks set to false.
48
- Fixed bug where scrollbars aren't visible in fullscreen when window is resized.
49
- Fixed bug with updating the border size using the advimage dialog on IE 9.
50
- Fixed bug where the selection of inner elements on IE 8 in contentEditable mode would select the whole parent element.
51
- Fixed bug where the enter key would produce an empty anchor if you pressed it at the space after a link on IE.
52
- Fixed bug where autolink plugin would produce an exception for specific html see bug #5365
53
- Fixed so the formatChanged function takes an optional "similar" parameter to use while matching the format.
54
- Version 3.5.4.1 (2012-06-24)
55
- Fixed issue with Shift+A selecting all contents on Chrome.
56
- Version 3.5.4 (2012-06-21)
57
- Added missing mouse events to HTML5 schema. Some events needs to be manually defined though since the spec is huge.
58
- Added image resizing for WebKit browsers by faking the whole resize behavior.
59
- Fixed bug in context menu plugin where listener to hide menu wasn't removed correctly.
60
- Fixed bug where media plugin wouldn't use placeholder size for the object/video elements.
61
- Fixed bug where jQuery plugin would break attr function in jQuery 1.7.2.
62
- Fixed bug where jQuery plugin would throw an error if you used the tinymce pseudo selector when TinyMCE wasn't loaded.
63
- Fixed so encoding option gets applied when using jQuery val() or attr() to extract the contents.
64
- Fixed so any non valid width/height passed to media plugin would get parsed to proper integer or percent values.
65
- Version 3.5.3 (2012-06-19)
66
- Added missing wbr element to HTML5 schema.
67
- Added new mceToggleFormat command. Enabled you to toggle a specific format on/off.
68
- Fixed bug where undo/redo state didn't update correctly after executing an execCommand call.
69
- Fixed bug where the editor would get auto focused on IE running in quirks mode.
70
- Fixed bug where pressing enter before an IMG or INPUT element wouldn't properly split the block.
71
- Fixed bug where backspace would navigate back when selecting control types on IE.
72
- Fixed bug where the editor remove method would unbind events for controls outside the editor instance UI.
73
- Fixed bug where the autosave plugin would try to store a draft copy of editors that where removed.
74
- Fixed bug where floated elements wouldn't expand the block created when pressing enter on non IE browsers.
75
- Fixed bug where the caret would be placed in the wrong location when pressing enter at the beginning of a block.
76
- Fixed bug where it wasn't possible to block events using the handle_event_callback option.
77
- Fixed bug where keyboard navigation of the ColorSplitButton.js didn't work correctly.
78
- Fixed bug where keyboard navigation didn't work correctly on split buttons.
79
- Fixed bug where the legacy Event.add function didn't properly handle multiple id:s passed in.
80
- Fixed bug where the caret would disappear on IE when selecting all contents and pressing backspace/delete.
81
- Fixed bug where the getStart/getEnd methods would sometimes return elements from the wrong document on IE.
82
- Fixed so paragraphs gets created if you press enter inside a form element.
83
- Version 3.5.2 (2012-05-31)
84
- Added new formatChanged method to tinymce.Formatter class. Enables easier state change handling of formats.
85
- Added new selectorChanged method to tinymce.dom.Selection class. Enables easier state change handling of matching CSS selectors.
86
- Changed the default theme to be advanced instead of simple since most users uses the advanced theme.
87
- Changed so the theme_advanced_buttons doesn't have a default set if one button row is specified.
88
- Changed the theme_advanced_toolbar_align default value to "left".
89
- Changed the theme_advanced_toolbar_location default value to "top".
90
- Changed the theme_advanced_statusbar_location default value to "bottom".
91
- Fixed bug where the simple link dialog would remove class and target attributes from links when updating them if the drop downs wasn't visible.
92
- Fixed bug where the link/unlink buttons wouldn't get disabled once a link was created by the autolink plugin logic.
93
- Fixed bug where the border attribute was missing in the HTML5 schema.
94
- Fixed bug where the legacyoutput plugin would use inline styles for font color.
95
- Fixed bug where editing of anchor names wouldn't produce an undo level.
96
- Fixed bug where the table plugin would delete the last empty block element in the editor.
97
- Fixed bug where pasting table rows when they where selected would make it impossible to editor that table row.
98
- Fixed bug with pressing enter in IE while having a select list focused would produce a JS error.
99
- Fixed bug where it wasn't possible to merge table cells by selecting them and using merge from context menu.
100
- Removed summary from HTML5 table attributes and fixed so this and other deprecated table fields gets hidden in the table dialog.
101
- Version 3.5.1.1 (2012-05-25)
102
- Fixed bug with control creation where plugin specific controls didn't work as expected.
103
- Version 3.5.1 (2012-05-25)
104
- Added new onBeforeAdd event to UndoManager patch contributed by Dan Rumney.
105
- Added support for overriding the theme rendering logic by using a custom function.
106
- Fixed bug where links wasn't automatically created by the autolink plugin on old IE versions when pressing enter in BR mode.
107
- Fixed bug where enter on older IE versions wouldn't produce a new paragraph if the previous sibling paragraph was empty.
108
- Fixed bug where toString on a faked DOM range on older IE versions wouldn't return a proper string.
109
- Fixed bug where named anchors wouldn't work properly when schema was set to HTML5.
110
- Fixed bug where HTML5 datalist options wasn't correctly parsed or indented.
111
- Fixed bug where linking would add anchors around block elements when the HTML5 schema was used.
112
- Fixed issue where the autolink plugin wouldn't properly handle mailto:user@domain.com.
113
- Optimized initialization and reduced rendering flicker by hiding the target element while initializing.
114
- Version 3.5.0.1 (2012-05-10)
115
- Fixed bug where selection normalization logic would break the selections of parent elements using the element path.
116
- Fixed bug where the autolink plugin would include trailing dots in domain names in the link creation.
117
- Fixed bug where the autolink plugin would produce an error on older IE versions when pressing enter.
118
- Fixed bug where old IE versions would throw an error during initialization when the editor was placed in an size restricted div.
119
- Version 3.5 (2012-05-03)
120
- Fixed menu rendering issue if the document was in rtl mode.
121
- Fixed bug where the hide function would throw an error about a missing variable.
122
- Fixed bug where autolink wouldn't convert URLs when hitting enter on IE due to the new enter key logic.
123
- Fixed bug where formatting using shortcuts like ctrl+b wouldn't work properly the first time.
124
- Fixed bug where selection.setContent after a formatter call wouldn't generate formatted contents.
125
- Fixed bug where whitespace would be removed before/after invalid_elements when they where removed.
126
- Fixed bug where updating styles using the theme image dialog in non inline mode on IE9 would produce errors.
127
- Fixed bug where IE 8 would produce an error when using the contextmenu plugin.
128
- Fixed bug where delete/backspace could remove contents of noneditable elements.
129
- Fixed so background color in style preview gets computed from body element if the current style element is transparent.
130
- Version 3.5b3 (2012-03-29)
131
- Added cancel button to colour picker dialog.
132
- Added figure and figcaption to the html5 visualblocks plugin.
133
- Added default alignment options for the figure element.
134
- Fixed bug where empty inline elements within block elements would sometimes produce a br child element.
135
- Fixed bug where urls pointing to the same domain as the current one would cause undefined errors. Patch contributed by Paul Giberson.
136
- Fixed bug where enter inside an editable element inside an non editable element would split the element.
137
- Fixed bug where cut/copy/paste of noneditable elements didn't work.
138
- Fixed bug where backspace would sometimes produce font elements on WebKit.
139
- Fixed bug where WebKit would produce spans out of various inline elements when using backspace.
140
- Fixed bug where IE9 wouldn't properly update image styles when images where resized.
141
- Fixed bug where drag/drop of noneditable elements didn't work correctly.
142
- Fixed bug where applying formatting to all contents wouldn't work correctly when an end point was inside an empty bock. Patch contributed by Jose Luiz.
143
- Fixed bug where IE10 removed the scopeName from the DOM element interface and there for it produced an undefined string in element path.
144
- Fixed bug where the caret would be placed at an incorrect location if you applied block formatting while having the caret at the end of the block.
145
- Fixed bug where applying column changes using the cell dialog would only update the first column. Patch contributed by krzyko.
146
- Fixed bug where the visualblocks plugin would force editor focus if it was turned on by default.
147
- Fixed bug where the tabfocus plugin would tab to iframes these are now ignored.
148
- Fixed bug where format drop down list wouldn't show the currently active format for a parent element.
149
- Fixed bug where paste of plain text in IE 9 would remove the new line characters from text.
150
- Fixed bug where the menu buttons/split button menus wouldn't be opened at the right location on older IE versions.
151
- Fixed bug where Gecko browsers wouldn't properly display the right format when having the selection as specific places.
152
- Fixed bug where shift+enter inside the body when having forced_root_blocks set to false would throw an error.
153
- Fixed bug where the jQuery plugin would break the attr method of jQuery 1.7.2. Patch contributed by Markus Kemmerling.
154
- Fixed so options like content_css accepts and array as well as a comma separated string as input.
155
- Restructured the internal logic to make it more separate from Editor.js.
156
- Updated the Sizzle engine to the latest version.
157
- Version 3.5b2 (2012-03-15)
158
- Rewrote the enter key logic to normalize browser behavior.
159
- Fixed so enter within PRE elements produces a BR and shift+enter breaks/end the PRE. Can be disabled using the br_in_pre option.
160
- Fixed bug where the selection wouldn't be correct after applying formatting and having the caret at the end of the new format node.
161
- Fixed bug where the noneditable plugin would process contents on raw input calls for example on undo/redo calls.
162
- Fixed bug where WebKit could produce an exception when a bookmark was requested when there wasn't a proper selection.
163
- Fixed bug where WebKit would fail to open the image dialog since it would be returning false for a class name instead of a string.
164
- Fixed so alignment and indentation works properly when forced_root_blocks is set to false. It will produce a DIV by default.
165
- Version 3.5b1 (2012-03-08)
166
- Added new event class that is faster and enables support for faking events.
167
- Added new self_closing_elements, short_ended_elements, boolean_attributes, non_empty_elements and block_elements options to control the HTML Schema.
168
- Added new schema option and support for the HTML5 schema.
169
- Added new visualblocks plugin that shows html5 blocks with visual borders.
170
- Added new types and selector options to make it easier to create editor instances with different configs.
171
- Added new preview of formatting options in various listboxes.
172
- Added new preview_styles option that enables control over what gets previewed.
173
- Fixed bug where content css would be loaded twice into iframe.
174
- Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
175
- Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
176
- Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
177
- Fixed bug where elements inside a white space preserve element like pre didn't inherit the behavior while parsing.
178
- Version 3.4.9 (2012-02-23)
179
- Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
180
- Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
181
- Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
182
- Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
183
- Fixed bug in Gecko where undo wasn't added when focus was lost.
184
- Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
185
- Fixed bug where right-click on formatted text in IE selected the entire line.
186
- Fixed bug where text ending with space could not be unformatted in IE.
187
- Fixed bug where caret formatting would be removed when moving the caret when a selector expression was used.
188
- Fixed bug where formatting would be applied to the body element when all contents where selected and format had both inline and selector parts.
189
- Fixed bug where the media plugin would throw errors if you had iframe set as an invalid element in config.
190
- Fixed bug where the caret would be placed at the top of the document if you inserted a table and undo:ed that operation. Patch contributed by Wesley Walser.
191
- Fixed bug where content css files where loaded twice into the iframe.
192
- Fixed so elements with comments would be trated as non empty elements. Patch contributed by Arjan Scherpenisse.
193
- Version 3.4.8 (2012-02-02)
194
- Fixed bug in IE where selected text ending with space cannot be formatted then formatted again to get original text.
195
- Fixed bug in IE where images larger than editor area were being deselected when toolbar buttons are clicked.
196
- Fixed bug where wrong text align buttons are active when multiple block elements are selected.
197
- Fixed bug where selected link not showing in target field of link dialog in some selection cases.
198
- Use settings for remove_trailing_br so this can be turned off instead of hard coding the value.
199
- Fixed bug in IE where the media plugin displayed null text when some values aren't filled in.
200
- Added API method 'onSetAttrib' that fires when the attribute value on a node changes.
201
- Fix font size dropdown value not being updated when text already has a font size in the advanced template.
202
- Fixed bug in IE where IE doesn't use ARIA attributes properly on options - causing labels to be read out 2 times.
203
- Fixed bug where caret cannot be placed after table if table is at end of document in IE.
204
- Fixed bug where adding range isn't always successful so we need to check range count otherwise an exception can occur.
205
- Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
206
- Fixed bug where a stranded bullet point would get created in WebKit.
207
- Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
208
- Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
209
- Fix white space in between spans from being deleted.
210
- Fixed bug where scrollbars where visible in the character map dialog on Gecko.
211
- Fixed issue with missing translation for one of the emoticons.
212
- Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
213
- Fixed bug where urls with an at sign in the path wouldn't be parsed correctly. Patch contributed by Jason Grout.
214
- Fixed bug where Opera would remove the first character of a inline formatted word if you pressed backspace.
215
- Fixed bugs with the autoresize plugin on various browsers and removed the need for the throbber.
216
- Fixed performance issue where the contextmenu plugin would try to remove the menu even if it was removed. Patch contributed by mhu.
217
- Version 3.4.7 (2011-11-03)
218
- Modified the caret formatting behavior to word similar to common desktop wordprocessors like Word or Libre Office.
219
- Fixed bug in Webkit - Cursor positioning does not work vertically within a table cell with multiple lines of text.
220
- Fixed bug in IE where Inserting a table in IE8 places cursor in the second cell of the first row.
221
- Fixed bug in IE where editor in a frame doesn't give focus to the toolbar using ALT-F10.
222
- Fix for webkit and gecko so that deleting bullet from start of list outdents inner list items and moves first item into paragraph.
223
- Fix new list items in IE8 not displayed on a new line when list contains nested list items.
224
- Clear formatting in table cell breaks the cell.
225
- Made media type list localisable.
226
- Fix out of memory error when using prototype in media dialog.
227
- Fixed bug where could not add a space in the middle of a th cell.
228
- Fixed bug where adding a bullet between two existing bullets adds an extra one
229
- Fixed bug where trying to insert a new entry midway through a bulleted list fails dismally when the next entry is tabbed in.
230
- Fixed bug where pressing enter on an empty list item does not outdent properly in FF
231
- Fixed bug where adding a heading after a list item in a table cell changes all styles in that cell
232
- Fixed bug where hitting enter to exit from a bullet list moves cursor to the top of the page in Firefox.
233
- Fixed bug where pressing backspace would not delete HRs in Firefox and IE when next to an empty paragraph.
234
- Fixed bug where deleting part of the link text can cause a link with no destination to be saved.
235
- Fixed bug where css style border widths wasn't handled correctly in table dialog.
236
- Fixed bug where parsing invalid html contents on IE or WebKit could produce an infinite loop.
237
- Fixed bug where scripts with custom script types wasn't properly passed though the editor.
238
- Fixed issue where some Japanese kanji characters wasn't properly entity encoded when numeric entity mode was enabled.
239
- Made emoticons dialog use the keyboard naviation.
240
- Added navigation instructions to the symbols dialog.
241
- Added ability to set default values for the media plugin.
242
- Added new font_size_legacy_values option for converting old font element sizes to span with font-size properties.
243
- Fixed bug where the symbols dialog was not accessible.
244
- Added quirk for IE ensuring that the body of the document containing tinyMCE has a role="application" for accessibility.
245
- Fixed bug where the advanced color picker wasn't working properly on FF 7.
246
- Fixed issue where the advanced color picker was producing uppercase hex codes.
247
- Fixed bug where IE 8 could throw exceptions if the contents contained resizable content elements.
248
- Fixed bug where caret formatting wouldn't be correctly applied to previous sibling on WebKit.
249
- Fixed bug where the select boxes for font size/family would loose it's value on WebKit due to recent iOS fixes.
250
- Version 3.4.6 (2011-09-29)
251
- Fixed bug where list items were being created for empty divs.
252
- Added support in Media plugin for audio media using the embed tag
253
- Fixed accessibility bugs in WebKit and IE8 where toolbar items were not being read.
254
- Added new use_accessible_selects option to ensure accessible list boxes are used in all browsers (custom widget in firefox native on other browsers)
255
- Fixed bug where classid attribute was not being checked from embed objects.
256
- Fixed bug in jsrobot tests with intermittently failing.
257
- Fixed bug where anchors wasn't updated properly if you edited them using IE 8.
258
- Fixed bug where input method on WebKit on Mac OS X would fail to initialize when sometimes focusing the editor.
259
- Fixed bug where it wasn't possible to select HR elements on WebKit by simply clicking on them.
260
- Fixed bug where the media plugin wouldn't work on IE9 when not using the inlinepopups plugin.
261
- Fixed bug where hspace,vspace,align and bgcolor would be removed from object elements in the media plugin.
262
- Fixed bug where the new youtube format wouldn't be properly parsed by the media plugin.
263
- Fixed bug where the style attribute of layers wasn't properly updated on IE and Gecko.
264
- Fixed bug where editing contents in a layer would fail on Gecko since contentEditable doesn't inherit properly.
265
- Fixed bug where IE 6/7 would produce JS errors when serializing contents containing layers.
266
- Version 3.4.5 (2011-09-06)
267
- Fixed accessibility bug in WebKit where the right and left arrow keys would update native list boxes.
268
- Added new whitespace_elements option to enable users to specify specific elements where the whitespace is preserved.
269
- Added new merge_siblings option to formats. This option makes it possible to disable the auto merging of siblings when applying formats.
270
- Fixed bug in IE where trailing comma in paste plugin would cause plugin to not run correctly.
271
- Fixed bug in WebKit where console messages would be logged when deleting an empty document.
272
- Fixed bug in IE8 where caret positioned is on list item instead of paragraph when outdent splits the list
273
- Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements.
274
- Fixed bug where the selection normalization logic wouldn't properly handle image elements in specific config cases.
275
- Fixed bug where the map elements coords attribute would be messed up by IE when serializing the DOM.
276
- Fixed bug where IE wouldn't properly handle custom elements when the contents was serialized.
277
- Fixed bug where you couldn't move the caret in Gecko if you focused the editor using the API or a UI control.
278
- Fixed bug where adjacent links would get merged on IE due to bugs in their link command.
279
- Fixed bug where the color split buttons would loose the selection on IE if the editor was placed in a frame/iframe.
280
- Fixed bug where floated images in WebKit wouldn't get properly linked.
281
- Fixed bug where the fullscreen mode in a separate window wasn't forced into IE9+ standards mode.
282
- Fixed bug where pressing enter in an empty editor on WebKit could produce DIV elements instead of P.
283
- Fixed bug where spans would get removed incorrectly when merging two blocks on backspace/delete on WebKit.
284
- Fixed bug where the editor contents wouldn't be completely removed on backspace/delete on WebKit.
285
- Fixed bug where the fullpage plugin wouldn't properly render style elements in the head on IE 6/7.
286
- Fixed bug where the nonbreaking_force_tab option in the nonbreaking plugin wouldn't work on Gecko/WebKit.
287
- Fixed bug where the isDirty state would become true on non IE browsers if there was an table at the end of the contents.
288
- Fixed bug where entities wasn't properly encoded on WebKit when pasting text as plain text.
289
- Fixed bug where empty editors would produce an exception of valid_elements didn't include body and forced_root_blocks where disabled.
290
- Fixed bug where the fullscreen mode wouldn't retain the header/footer in the fullpage plugin.
291
- Fixed issue where the plaintext_mode and plaintext_mode_sticky language keys where swapped.
292
- Version 3.4.4 (2011-08-04)
293
- Added new html5 audio support. Patch contributed by Ronald M. Clifford.
294
- Added mute option for video elements and preload options for video/audio patch contributed by Dmitry Kalinkin.
295
- Fixed selection to match visual selection before applying formatting changes.
296
- Fixed browser specific bugs in lists for WebKit and IE.
297
- Fixed bug where IE would scroll the window if you closed an inline dialog that was larger than the viewport. Patch by Laurence Keijmel.
298
- Fixed bug where pasting contents near a span element could remove parts of that span. Patch contributed by Wesley Walser.
299
- Fixed bug where formatting change would be lost after pressing enter.
300
- Fixed bug in WebKit where deleting across blocks would add extra styles.
301
- Fixed bug where moving cursor vertically in tables in WebKit wasn't working.
302
- Fixed bug in IE where deleting would cause error in console.
303
- Fixed bug where the formatter was not applying formats across list elements.
304
- Fixed bug where the wordcount plugin would try and update the wordcount if tinymce had been destroyed.
305
- Fixed bug where tabfocus plugin would attempt to focus elements not displayed when their parent element was hidden.
306
- Fixed bug where the contentEditable state would sometimes be removed if you deleted contents in Gecko.
307
- Fixed bug where inserting contents using mceInsertContent would fail if "span" was disabled in valid_elements.
308
- Fixed bug where initialization might fail if some resource on gecko wouldn't load properly and fire the onload event.
309
- Fixed bug where ctrl+7/8/9 keys wouldn't properly add the specific formats associated with them.
310
- Fixed bug where the HTML tags wasn't properly closed in the style plugins properties dialog.
311
- Fixed bug where the list plugin would produce an exception if the user tried to delete an element at the very first location.
312
- Version 3.4.3.2 (2011-06-30)
313
- Fixed bug where deleting all of a paragraph inside a table cell would behave badly in webkit.
314
- Fixed bugs in tests in firefox5 and WebKit.
315
- Fixed bug where selection of table cells would produce an exception on Gecko.
316
- Fixed bug where the caret wasn't properly rendered on Gecko when the editor was hidden.
317
- Fixed bug where pasting plain text into WebKit would produce a pre element it will now produce more semantic markup.
318
- Fixed bug where selecting list type formats using the advlist plugin on IE8 would loose editor selection.
319
- Fixed bug where forced root blocks logic wouldn't properly pad elements created if they contained data attributes.
320
- Fixed bug where it would remove all contents of the editor if you inserted an image when not having a caret in the document.
321
- Fixed bug where the YUI compressor wouldn't properly encode strings with only a quote in them.
322
- Fixed bug where WebKit on iOS5 wouldn't call nodeChanged when the selection was changed.
323
- Fixed bug where mceFocus command wouldn't work properly on Gecko since it didn't focus the body element.
324
- Fixed performance issue with the noneditable plugin where it would enable/disable controls to often.
325
- Version 3.4.3.1 (2011-06-16)
326
- Fixed bug where listboxes were not being handled correctly by JAWS in firefox with the o2k7 skin.
327
- Fixed bug where custom buttons were not being rendered correctly when in high contrast mode.
328
- Added support for iOS 5 that now supporting contentEditable in it's latest beta.
329
- Fixed bug where urls in style attributes with a _ character followed by a number would cause incorrect output.
330
- Fixed bug where custom_elements option wasn't working properly on IE browsers.
331
- Fixed bug where custom_elements marked as block elements wouldn't get correctly treated as block elements.
332
- Fixed bug where attributes with </> wasn't properly encoded as XML entities.
333
- Version 3.4.3 (2011-06-09)
334
- Fixed bug where deleting backwards before an image into a list would put the cursor in the wrong location.
335
- Fixed bug where styles plugin would not apply styles across multiple selected block elements correctly.
336
- Fixed bug where cursor would jump to start of document when selection contained empty table cells in IE8.
337
- Fixed bug where applied styles wouldn't be kept if you pressed enter twice to produce two paragraphs.
338
- Fixed bug where a ghost like caret would appear on Gecko when pressing enter while having a text color applied.
339
- Fixed bug where IE would produce absolute urls if you inserted a image/link and reloaded the page.
340
- Fixed bug where applying a heading style to a list item would cascade style to children list items.
341
- Fixed bug where Editor loses focus when backspacing and changing styles in WebKit.
342
- Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided.
343
- Fixed bug where alt-f10 was not always giving focus to the toolbar on Safari.
344
- Added new 'allow_html_in_named_anchor' option to allow html to occur within a named anchor tag. Use at own risk.
345
- Added plugin dependency support. Will autoload plugins specified as a dependency if they haven't been loaded.
346
- Fixed bug where the autolink plugin didn't work with non-English keyboards when pressing ).
347
- Added possibility to change properties of all table cells in a column.
348
- Added external_image_list option to get images list from user-defined variable or function.
349
- Fixed bug where the autoresize plugin wouldn't reduce the editors height on Chrome.
350
- Fixed bug where table size inputs were to small for values with size units.
351
- Fixed bug where table cell/row size input values were not validated.
352
- Fixed bug where menu item line-height would be set to wrong value by external styles.
353
- Fixed bug where hasUndo() would return wrong answer.
354
- Fixed bug where page title would be set to undefined by fullpage plugin.
355
- Fixed bug where HTML5 video properties were not updated in embedded media settings.
356
- Fixed bug where HTML comment on the first line would cause an error.
357
- Fixed bug where spellchecker menu was positioned incorrectly on IE.
358
- Fixed bug where breaking out of list elements on WebKit would produce a DIV instead of P after the list.
359
- Fixed bug where pasting from Word in IE9 would add extra BR elements when text was word wrapped.
360
- Fixed bug where numeric entities with leading zeros would produce incorrect decoding.
361
- Fixed bug where hexadecimal entities wasn't properly decoded.
362
- Fixed bug where bookmarks wasn't properly stored/restored on undo/redo.
363
- Fixed bug where the mceInsertCommand didn't retain the values of links if they contained non url contents.
364
- Fixed bug where the valid_styles option wouldn't be properly used on styles for specific elements.
365
- Fixed so contentEditable is used for the body of the editor if it's supported.
366
- Fixed so trailing BR elements gets removed even when forced_root_blocks option was set to false/null.
367
- Fixed performance issue with mceInsertCommand and inserting very simple contents.
368
- Fixed performance issue with older IE version and huge documents by optimizing the forced root blocks logic.
369
- Fixed performance issue with table plugin where it checked for selected cells to often.
370
- Fixed bug where creating a link on centered/floated image would produce an error on WebKit browsers.
371
- Fixed bug where Gecko would remove single paragraphs if there where contents before/after it.
372
- Fixed bug where the scrollbar would move up/down when pasting contents using the paste plugin.
373
- Version 3.4.2 (2011-04-07)
374
- Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text.
375
- Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz.
376
- Rewritten the fullpage plugin to handle style contents better and have a more normalized behavior across browsers.
377
- Fixed bug where contents inserted with mceInsertContent wasn't parsed using the default dom parser.
378
- Fixed bug where blocks containing a single anchor element would be treated as empty.
379
- Fixed bug where merging of table cells on IE 6, 7 wouldn't look correctly until the contents was refreshed.
380
- Fixed bug where context menu wouldn't work properly on Safari since it was passing out the ctrl key as pressed.
381
- Fixed bug where image border color/style values were overwritten by advimage plugin.
382
- Fixed bug where setting border in advimage plugin would throw error in IE.
383
- Fixed bug where empty anchors list in link settings wasn't hidden.
384
- Fixed bug where xhtmlextras popups were missing localized popup-size parameters.
385
- Fixed bug where the context menu wouldn't select images on WebKit browsers.
386
- Fixed bug where paste plugin wouldn't properly extract the contents on WebKit due to recent changes in browser behavior.
387
- Fixed bug where focus of the editor would get on control contents on IE lost due to a bug in the ColorSplitButton control.
388
- Fixed bug where contextmenu wasn't disabled on noneditable elements.
389
- Fixed bug where getStyle function would trigger error when called on element without style property.
390
- Fixed bug where editor fail to load if Javascript Compressor was used.
391
- Fixed bug where list-style-type=lower-greek would produce errors in IE<8.
392
- Fixed bug where spellchecker plugin would produce errors on IE6-7.
393
- Fixed bug where theme_advanced_containers configuration option causes error.
394
- Fixed bug where the mceReplaceContent command would produce an error since it didn't correctly handle a return value.
395
- Fixed bug where you couldn't enter float point values for em in dialog input fields since it wouldn't be considered a valid size.
396
- Fixed bug in xhtmlxtras plugin where it wasn't possible to remove some attributes in the attributes dialog.
397
- Version 3.4.1 (2011-03-24)
398
- Added significantly improved list handling via the new 'lists' plugin.
399
- Added 'autolink' plugin to enable automatically linking URLs. Similar to the behavior IE has by default.
400
- Added 'theme_advanced_show_current_color' setting to enable the forecolor and backcolor buttons to continuously show the current text color.
401
- Added 'contextmenu_never_use_native' setting to disable the ctrl-right-click showing the native browser context menu behaviour.
402
- Added 'paste_enable_default_filters' setting to enable the default paste filters to be disabled.
403
- Fixed bug where selection locations on undo/redo didn't work correctly on specific contents.
404
- Fixed bug where an exception would be trown on IE when loading TinyMCE inside an iframe.
405
- Fixed bug where some ascii numeric entities wasn't properly decoded.
406
- Fixed bug where some non western language codes wasn't properly decoded/encoded.
407
- Fixed bug where undo levels wasn't created when deleting contents on IE.
408
- Fixed bug where the initial undo levels bookmark wasn't updated correctly.
409
- Fixed bug where search/replace wouldn't be scoped to editor instances on IE8.
410
- Fixed bug where IE9 would produce two br elements after block elements when pasting.
411
- Fixed bug where IE would place the caret at an incorrect position after a paste operation.
412
- Fixed bug where a paste operation using the keyboard would add an extra undo level.
413
- Fixed bug where some attributes/elements wasn't correctly filtered when invalid contents was inserted.
414
- Fixed bug where the table plugin couldn't correctly handle invalid table structures.
415
- Fixed bug where charset and title of the page were handled incorrectly by the fullpage plugin.
416
- Fixed bug where toggle states on some of the list boxes didn't update correctly.
417
- Fixed bug where sub/sub wouldn't work correctly when done as a caret action in Chrome 10.
418
- Fixed bug where the constrain proportions checkbox wouldn't work in the media plugin.
419
- Fixed bug where block elements containing trailing br elements wouldn't treated properly if they where invalid.
420
- Fixed bug where the color picker dialog wouldn't be rendered correctly when using the o2k7 theme.
421
- Fixed bug where setting border=0 using advimage plugin invalid style attribute content was created in Chrome.
422
- Fixed bug with references to non-existing images in css of fullpage plugin.
423
- Fixed bug where item could be unselected in spellchecker's language selector.
424
- Fixed bug where some mispelled words could be not highlighted using spellchecker plugin.
425
- Fixed bug where spellchecking would merge some words on IE.
426
- Fixed bug where spellchecker context menu was not always positioned correctly.
427
- Fixed bug with empty anchors list in advlink popup when Invisible Elements feature was disabled.
428
- Fixed bug where older IE versions wouldn't properly handle some elements if they where placed at the top of editor contents.
429
- Fixed bug where selecting the whole table would enable table tools for cells and rows.
430
- Fixed bug where it wasn't possible to replace selected contents on IE when pasting using the paste plugin.
431
- Fixed bug where setting text color in fullpage plugin doesn't work.
432
- Fixed bug where the state of checkboxes in media plugin wouldn't be set correctly.
433
- Fixed bug where black spade suit character was not included in special character selector.
434
- Fixed bug where setting invalid values for table cell size would throw an error in IE.
435
- Fixed bug where spellchecking would remove whitespace characters from PRE block in IE.
436
- Fixed bug where HR was inserted inside P elements instead of splitting them.
437
- Fixed bug where extra, empty span tags were added when using a format with both selector and inline modes.
438
- Fixed bug where bullet lists weren't always detected correctly.
439
- Fixed bug where deleting some paragraphs on IE would cause an exception.
440
- Fixed bug where the json encoder logic wouldn't properly encode \ characters.
441
- Fixed bug where the onChange event would be fired when the editor was first initialized.
442
- Fixed bug where mceSelected wouldn't be removed properly from output even if it's an internal class.
443
- Fixed issue with table background colors not being transparent. This improves compliance with users browser color preferences.
444
- Fixed issue where styles were not included when using the full page plugin.
445
- Fixed issue where drag/drop operations wasn't properly added to the undo levels.
446
- Fixed issue where colors wasn't correctly applied to elements with underline decoration.
447
- Fixed issue where deleting some paragraphs on IE would cause an exception.
448
- Version 3.4 (2011-03-10)
449
- Added accessibility example with various accessibility options contributed by Ephox.
450
- Fixed bug where attributes wasn't properly handled in the xhtmlxtras plugin.
451
- Fixed bug where the image.htm had some strange td artifacts probably due to auto merging.
452
- Fixed bug where the ToolbarGroup had an missing reference to this in it's destroy method.
453
- Fixed bug with the resizeBy function in the advanced theme where it was scaled by the wrong parent.
454
- Fixed bug where an exception would be thrown by the element if the page was served in xhtml mode.
455
- Fixed bug where mceInsertContent would throw an exception when page was served in xhtml mode.
456
- Fixed bug where you couldn't select a forground/background color when page was served in xhtml mode.
457
- Fixed bug where the editor would scroll to the toolbar when clicked due to a call to focus in ListBox.
458
- Fixed bug where pages with rtl dir wouldn't render split buttons correctly when using the o2k7 theme.
459
- Fixed bug where anchor elements with names wasn't properly collapsed as they where in 3.3.x.
460
- Fixed bug where WebKit wouldn't properly handle image selection if it was done left to right.
461
- Fixed bug where the formatter would align images when the selection range was collapsed.
462
- Fixed bug where the image button would be active when the selection range was collapsed.
463
- Fixed bug where the element_format option wasn't used by the new (X)HTML serializer logic.
464
- Fixed bug where the table cell/row dialogs would produce empty attributes.
465
- Fixed bug where the tfoot wouldn't be added to the top of the table.
466
- Fixed bug where the formatter would merge siblings with white space between them.
467
- Fixed bug where pasting headers and paragraphs would produce an extra paragraph.
468
- Fixed bug where the ColorSplitButton would throw an exception if you clicked out side a color.
469
- Fixed bug where IE9 wouldn't properly produce new paragraphs on enter if the current paragraph had formatting.
470
- Fixed bug where multiple BR elements at end of block elements where removed.
471
- Fixed bug where fullscreen plugin wouldn't correctly display the edit area on IE6 for long pages.
472
- Fixed bug where paste plugin wouldn't properly encode raw entities when pasting in plain text mode.
473
- Fixed bug where the search/replace plugin wouldn't work correctly on IE 9.
474
- Fixed so the drop menus doesn't get an outline border visible when focused, patch contributed by Ephox.
475
- Fixed so the values entered in the color picker are forced to hex values.
476
- Removed dialog workaround for IE 9 beta since the RC is now out and people should upgrade.
477
- Removed obsolete calls in various plugins to the mceBeginUndoLevel command.
1
+ Version 3.5.8 (2012-11-20)
2
+ Fixed bug where html5 data attributes where stripped from contents.
3
+ Fixed bug where toolbar was annouced multiple times with JAWS on Firefox.
4
+ Fixed bug where the editor view whouldn't scroll to BR elements when using shift+enter or br enter mode.
5
+ Fixed bug where a JS error would be thrown when trying to paste table rows then the rows clipboard was empty.
6
+ Fixed bug with auto detection logic for youtube urls in the media plugin.
7
+ Fixed bug where the formatter would throw errors if you used the jQuery version of TinyMCE and the latest jQuery.
8
+ Fixed bug where the latest WebKit versions would produce span elements when deleting text between blocks.
9
+ Fixed bug where the autolink plugin would produce DOM exceptions when pressing shift+enter inside a block element.
10
+ Fixed bug where toggling of blockquotes when using br enter mode would produce an exception.
11
+ Fixed bug where focusing out of the body of the editor wouldn't properly add an undo level.
12
+ Fixed issue with warning message being displayed on IE 9+ about the meta header fix for IE 8.
13
+ Version 3.5.7 (2012-09-20)
14
+ Changed table row properties dialog to not update multiple rows when row type is header or footer.
15
+ Fixed bug in hyperlink dialog for IE9 where links with no target attr set had target value of --
16
+ Changing toolbars to have a toolbar role for FF keyboard navigation works correctly.
17
+ Fixed bug where applying formatting to an empty block element would produce redundant spans.
18
+ Fixed bug where caret formatting on IE wouldn't properly apply if you pressed enter/return.
19
+ Fixed bug where loading TinyMCE using an async script wouldn't properly initialize editors.
20
+ Fixed bug where some white space would be removed after inline elements before block elements.
21
+ Fixed bug where it wouldn't properly parse attributes with a single backslash as it's contents.
22
+ Fixed bug where noscript elements would loose it's contents on older IE versions.
23
+ Fixed bug where backspace inside empty blockquote wouldn't delete it properly.
24
+ Fixed bug where custom elements with . in their names wouldn't work properly.
25
+ Fixed bug where the custom_elements option didn't properly setup the block elements schema structure.
26
+ Fixed bug where the custom_elements option didn't auto populate the extended_valid_elements.
27
+ Fixed bug where the whole TD element would get blcok formatted when there where BR elements in it.
28
+ Fixed bug where IE 9 might crash if the editor was hidden and specific styles where applied to surrounding contents.
29
+ Fixed bug where shift+enter inside a table cell on Gecko would produce an zero width non breaking space between tr:s.
30
+ Fixed bug where the advlink dialog wouldn't properly populate the anchors dropdown if the HTML5 schema was used.
31
+ Fixed issue with missing autofocus attribute on input element when using the HTML5 schema.
32
+ Fixed issue where enter inside a block contained within an LI element wouldn't produce a new LI.
33
+ Version 3.5.6 (2012-07-26)
34
+ Added "text" as a valid option to the editor.getContent format option. Makes it easier to get a text representation of the editor contents.
35
+ Fixed bug where resizing an image to less that 0x0 pixels would display the ghost image at an incorrect position.
36
+ Fixed bug where the remove format button would produce extra paragraphs on WebKit if all of the contents was selected.
37
+ Fixed issue where edge resize handles on images of wouldn't scale it with the same aspect ratio.
38
+ Fixed so force_p_newlines option works again since some users want mixed mode paragraphs.
39
+ Fixed so directionality plugin modifies the dir attribute of all selected blocks in the editor.
40
+ Fixed bug where backspace/delete of a custom element would move it's attributes to the parent block on Gecko.
41
+ Version 3.5.5 (2012-07-19)
42
+ Added full resize support for images and tables on WebKit/Opera. It now behaves just like Gecko.
43
+ Added automatic embed support for Vimeo, Stream.cz and Google Maps in media plugin. Patch contributed by Jakub Matas.
44
+ Fixed bug where the lists plugin wouldn't properly remove all li elements when toggling selected items of. Patched by Taku AMANO.
45
+ Fixed bug where the lists plugin would remove the entire list if you pressed deleted at the beginning of the first element. Patched by Taku AMANO.
46
+ Fixed bug where the ordered/unordered list buttons could both be enabled if you nested lists. Patch contributed by Craig Petchell.
47
+ Fixed bug where shift+enter wouldn't produce a BR in a LI when having forced_root_blocks set to false.
48
+ Fixed bug where scrollbars aren't visible in fullscreen when window is resized.
49
+ Fixed bug with updating the border size using the advimage dialog on IE 9.
50
+ Fixed bug where the selection of inner elements on IE 8 in contentEditable mode would select the whole parent element.
51
+ Fixed bug where the enter key would produce an empty anchor if you pressed it at the space after a link on IE.
52
+ Fixed bug where autolink plugin would produce an exception for specific html see bug #5365
53
+ Fixed so the formatChanged function takes an optional "similar" parameter to use while matching the format.
54
+ Version 3.5.4.1 (2012-06-24)
55
+ Fixed issue with Shift+A selecting all contents on Chrome.
56
+ Version 3.5.4 (2012-06-21)
57
+ Added missing mouse events to HTML5 schema. Some events needs to be manually defined though since the spec is huge.
58
+ Added image resizing for WebKit browsers by faking the whole resize behavior.
59
+ Fixed bug in context menu plugin where listener to hide menu wasn't removed correctly.
60
+ Fixed bug where media plugin wouldn't use placeholder size for the object/video elements.
61
+ Fixed bug where jQuery plugin would break attr function in jQuery 1.7.2.
62
+ Fixed bug where jQuery plugin would throw an error if you used the tinymce pseudo selector when TinyMCE wasn't loaded.
63
+ Fixed so encoding option gets applied when using jQuery val() or attr() to extract the contents.
64
+ Fixed so any non valid width/height passed to media plugin would get parsed to proper integer or percent values.
65
+ Version 3.5.3 (2012-06-19)
66
+ Added missing wbr element to HTML5 schema.
67
+ Added new mceToggleFormat command. Enabled you to toggle a specific format on/off.
68
+ Fixed bug where undo/redo state didn't update correctly after executing an execCommand call.
69
+ Fixed bug where the editor would get auto focused on IE running in quirks mode.
70
+ Fixed bug where pressing enter before an IMG or INPUT element wouldn't properly split the block.
71
+ Fixed bug where backspace would navigate back when selecting control types on IE.
72
+ Fixed bug where the editor remove method would unbind events for controls outside the editor instance UI.
73
+ Fixed bug where the autosave plugin would try to store a draft copy of editors that where removed.
74
+ Fixed bug where floated elements wouldn't expand the block created when pressing enter on non IE browsers.
75
+ Fixed bug where the caret would be placed in the wrong location when pressing enter at the beginning of a block.
76
+ Fixed bug where it wasn't possible to block events using the handle_event_callback option.
77
+ Fixed bug where keyboard navigation of the ColorSplitButton.js didn't work correctly.
78
+ Fixed bug where keyboard navigation didn't work correctly on split buttons.
79
+ Fixed bug where the legacy Event.add function didn't properly handle multiple id:s passed in.
80
+ Fixed bug where the caret would disappear on IE when selecting all contents and pressing backspace/delete.
81
+ Fixed bug where the getStart/getEnd methods would sometimes return elements from the wrong document on IE.
82
+ Fixed so paragraphs gets created if you press enter inside a form element.
83
+ Version 3.5.2 (2012-05-31)
84
+ Added new formatChanged method to tinymce.Formatter class. Enables easier state change handling of formats.
85
+ Added new selectorChanged method to tinymce.dom.Selection class. Enables easier state change handling of matching CSS selectors.
86
+ Changed the default theme to be advanced instead of simple since most users uses the advanced theme.
87
+ Changed so the theme_advanced_buttons doesn't have a default set if one button row is specified.
88
+ Changed the theme_advanced_toolbar_align default value to "left".
89
+ Changed the theme_advanced_toolbar_location default value to "top".
90
+ Changed the theme_advanced_statusbar_location default value to "bottom".
91
+ Fixed bug where the simple link dialog would remove class and target attributes from links when updating them if the drop downs wasn't visible.
92
+ Fixed bug where the link/unlink buttons wouldn't get disabled once a link was created by the autolink plugin logic.
93
+ Fixed bug where the border attribute was missing in the HTML5 schema.
94
+ Fixed bug where the legacyoutput plugin would use inline styles for font color.
95
+ Fixed bug where editing of anchor names wouldn't produce an undo level.
96
+ Fixed bug where the table plugin would delete the last empty block element in the editor.
97
+ Fixed bug where pasting table rows when they where selected would make it impossible to editor that table row.
98
+ Fixed bug with pressing enter in IE while having a select list focused would produce a JS error.
99
+ Fixed bug where it wasn't possible to merge table cells by selecting them and using merge from context menu.
100
+ Removed summary from HTML5 table attributes and fixed so this and other deprecated table fields gets hidden in the table dialog.
101
+ Version 3.5.1.1 (2012-05-25)
102
+ Fixed bug with control creation where plugin specific controls didn't work as expected.
103
+ Version 3.5.1 (2012-05-25)
104
+ Added new onBeforeAdd event to UndoManager patch contributed by Dan Rumney.
105
+ Added support for overriding the theme rendering logic by using a custom function.
106
+ Fixed bug where links wasn't automatically created by the autolink plugin on old IE versions when pressing enter in BR mode.
107
+ Fixed bug where enter on older IE versions wouldn't produce a new paragraph if the previous sibling paragraph was empty.
108
+ Fixed bug where toString on a faked DOM range on older IE versions wouldn't return a proper string.
109
+ Fixed bug where named anchors wouldn't work properly when schema was set to HTML5.
110
+ Fixed bug where HTML5 datalist options wasn't correctly parsed or indented.
111
+ Fixed bug where linking would add anchors around block elements when the HTML5 schema was used.
112
+ Fixed issue where the autolink plugin wouldn't properly handle mailto:user@domain.com.
113
+ Optimized initialization and reduced rendering flicker by hiding the target element while initializing.
114
+ Version 3.5.0.1 (2012-05-10)
115
+ Fixed bug where selection normalization logic would break the selections of parent elements using the element path.
116
+ Fixed bug where the autolink plugin would include trailing dots in domain names in the link creation.
117
+ Fixed bug where the autolink plugin would produce an error on older IE versions when pressing enter.
118
+ Fixed bug where old IE versions would throw an error during initialization when the editor was placed in an size restricted div.
119
+ Version 3.5 (2012-05-03)
120
+ Fixed menu rendering issue if the document was in rtl mode.
121
+ Fixed bug where the hide function would throw an error about a missing variable.
122
+ Fixed bug where autolink wouldn't convert URLs when hitting enter on IE due to the new enter key logic.
123
+ Fixed bug where formatting using shortcuts like ctrl+b wouldn't work properly the first time.
124
+ Fixed bug where selection.setContent after a formatter call wouldn't generate formatted contents.
125
+ Fixed bug where whitespace would be removed before/after invalid_elements when they where removed.
126
+ Fixed bug where updating styles using the theme image dialog in non inline mode on IE9 would produce errors.
127
+ Fixed bug where IE 8 would produce an error when using the contextmenu plugin.
128
+ Fixed bug where delete/backspace could remove contents of noneditable elements.
129
+ Fixed so background color in style preview gets computed from body element if the current style element is transparent.
130
+ Version 3.5b3 (2012-03-29)
131
+ Added cancel button to colour picker dialog.
132
+ Added figure and figcaption to the html5 visualblocks plugin.
133
+ Added default alignment options for the figure element.
134
+ Fixed bug where empty inline elements within block elements would sometimes produce a br child element.
135
+ Fixed bug where urls pointing to the same domain as the current one would cause undefined errors. Patch contributed by Paul Giberson.
136
+ Fixed bug where enter inside an editable element inside an non editable element would split the element.
137
+ Fixed bug where cut/copy/paste of noneditable elements didn't work.
138
+ Fixed bug where backspace would sometimes produce font elements on WebKit.
139
+ Fixed bug where WebKit would produce spans out of various inline elements when using backspace.
140
+ Fixed bug where IE9 wouldn't properly update image styles when images where resized.
141
+ Fixed bug where drag/drop of noneditable elements didn't work correctly.
142
+ Fixed bug where applying formatting to all contents wouldn't work correctly when an end point was inside an empty bock. Patch contributed by Jose Luiz.
143
+ Fixed bug where IE10 removed the scopeName from the DOM element interface and there for it produced an undefined string in element path.
144
+ Fixed bug where the caret would be placed at an incorrect location if you applied block formatting while having the caret at the end of the block.
145
+ Fixed bug where applying column changes using the cell dialog would only update the first column. Patch contributed by krzyko.
146
+ Fixed bug where the visualblocks plugin would force editor focus if it was turned on by default.
147
+ Fixed bug where the tabfocus plugin would tab to iframes these are now ignored.
148
+ Fixed bug where format drop down list wouldn't show the currently active format for a parent element.
149
+ Fixed bug where paste of plain text in IE 9 would remove the new line characters from text.
150
+ Fixed bug where the menu buttons/split button menus wouldn't be opened at the right location on older IE versions.
151
+ Fixed bug where Gecko browsers wouldn't properly display the right format when having the selection as specific places.
152
+ Fixed bug where shift+enter inside the body when having forced_root_blocks set to false would throw an error.
153
+ Fixed bug where the jQuery plugin would break the attr method of jQuery 1.7.2. Patch contributed by Markus Kemmerling.
154
+ Fixed so options like content_css accepts and array as well as a comma separated string as input.
155
+ Restructured the internal logic to make it more separate from Editor.js.
156
+ Updated the Sizzle engine to the latest version.
157
+ Version 3.5b2 (2012-03-15)
158
+ Rewrote the enter key logic to normalize browser behavior.
159
+ Fixed so enter within PRE elements produces a BR and shift+enter breaks/end the PRE. Can be disabled using the br_in_pre option.
160
+ Fixed bug where the selection wouldn't be correct after applying formatting and having the caret at the end of the new format node.
161
+ Fixed bug where the noneditable plugin would process contents on raw input calls for example on undo/redo calls.
162
+ Fixed bug where WebKit could produce an exception when a bookmark was requested when there wasn't a proper selection.
163
+ Fixed bug where WebKit would fail to open the image dialog since it would be returning false for a class name instead of a string.
164
+ Fixed so alignment and indentation works properly when forced_root_blocks is set to false. It will produce a DIV by default.
165
+ Version 3.5b1 (2012-03-08)
166
+ Added new event class that is faster and enables support for faking events.
167
+ Added new self_closing_elements, short_ended_elements, boolean_attributes, non_empty_elements and block_elements options to control the HTML Schema.
168
+ Added new schema option and support for the HTML5 schema.
169
+ Added new visualblocks plugin that shows html5 blocks with visual borders.
170
+ Added new types and selector options to make it easier to create editor instances with different configs.
171
+ Added new preview of formatting options in various listboxes.
172
+ Added new preview_styles option that enables control over what gets previewed.
173
+ Fixed bug where content css would be loaded twice into iframe.
174
+ Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
175
+ Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
176
+ Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
177
+ Fixed bug where elements inside a white space preserve element like pre didn't inherit the behavior while parsing.
178
+ Version 3.4.9 (2012-02-23)
179
+ Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
180
+ Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
181
+ Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
182
+ Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
183
+ Fixed bug in Gecko where undo wasn't added when focus was lost.
184
+ Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
185
+ Fixed bug where right-click on formatted text in IE selected the entire line.
186
+ Fixed bug where text ending with space could not be unformatted in IE.
187
+ Fixed bug where caret formatting would be removed when moving the caret when a selector expression was used.
188
+ Fixed bug where formatting would be applied to the body element when all contents where selected and format had both inline and selector parts.
189
+ Fixed bug where the media plugin would throw errors if you had iframe set as an invalid element in config.
190
+ Fixed bug where the caret would be placed at the top of the document if you inserted a table and undo:ed that operation. Patch contributed by Wesley Walser.
191
+ Fixed bug where content css files where loaded twice into the iframe.
192
+ Fixed so elements with comments would be trated as non empty elements. Patch contributed by Arjan Scherpenisse.
193
+ Version 3.4.8 (2012-02-02)
194
+ Fixed bug in IE where selected text ending with space cannot be formatted then formatted again to get original text.
195
+ Fixed bug in IE where images larger than editor area were being deselected when toolbar buttons are clicked.
196
+ Fixed bug where wrong text align buttons are active when multiple block elements are selected.
197
+ Fixed bug where selected link not showing in target field of link dialog in some selection cases.
198
+ Use settings for remove_trailing_br so this can be turned off instead of hard coding the value.
199
+ Fixed bug in IE where the media plugin displayed null text when some values aren't filled in.
200
+ Added API method 'onSetAttrib' that fires when the attribute value on a node changes.
201
+ Fix font size dropdown value not being updated when text already has a font size in the advanced template.
202
+ Fixed bug in IE where IE doesn't use ARIA attributes properly on options - causing labels to be read out 2 times.
203
+ Fixed bug where caret cannot be placed after table if table is at end of document in IE.
204
+ Fixed bug where adding range isn't always successful so we need to check range count otherwise an exception can occur.
205
+ Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
206
+ Fixed bug where a stranded bullet point would get created in WebKit.
207
+ Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
208
+ Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
209
+ Fix white space in between spans from being deleted.
210
+ Fixed bug where scrollbars where visible in the character map dialog on Gecko.
211
+ Fixed issue with missing translation for one of the emoticons.
212
+ Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
213
+ Fixed bug where urls with an at sign in the path wouldn't be parsed correctly. Patch contributed by Jason Grout.
214
+ Fixed bug where Opera would remove the first character of a inline formatted word if you pressed backspace.
215
+ Fixed bugs with the autoresize plugin on various browsers and removed the need for the throbber.
216
+ Fixed performance issue where the contextmenu plugin would try to remove the menu even if it was removed. Patch contributed by mhu.
217
+ Version 3.4.7 (2011-11-03)
218
+ Modified the caret formatting behavior to word similar to common desktop wordprocessors like Word or Libre Office.
219
+ Fixed bug in Webkit - Cursor positioning does not work vertically within a table cell with multiple lines of text.
220
+ Fixed bug in IE where Inserting a table in IE8 places cursor in the second cell of the first row.
221
+ Fixed bug in IE where editor in a frame doesn't give focus to the toolbar using ALT-F10.
222
+ Fix for webkit and gecko so that deleting bullet from start of list outdents inner list items and moves first item into paragraph.
223
+ Fix new list items in IE8 not displayed on a new line when list contains nested list items.
224
+ Clear formatting in table cell breaks the cell.
225
+ Made media type list localisable.
226
+ Fix out of memory error when using prototype in media dialog.
227
+ Fixed bug where could not add a space in the middle of a th cell.
228
+ Fixed bug where adding a bullet between two existing bullets adds an extra one
229
+ Fixed bug where trying to insert a new entry midway through a bulleted list fails dismally when the next entry is tabbed in.
230
+ Fixed bug where pressing enter on an empty list item does not outdent properly in FF
231
+ Fixed bug where adding a heading after a list item in a table cell changes all styles in that cell
232
+ Fixed bug where hitting enter to exit from a bullet list moves cursor to the top of the page in Firefox.
233
+ Fixed bug where pressing backspace would not delete HRs in Firefox and IE when next to an empty paragraph.
234
+ Fixed bug where deleting part of the link text can cause a link with no destination to be saved.
235
+ Fixed bug where css style border widths wasn't handled correctly in table dialog.
236
+ Fixed bug where parsing invalid html contents on IE or WebKit could produce an infinite loop.
237
+ Fixed bug where scripts with custom script types wasn't properly passed though the editor.
238
+ Fixed issue where some Japanese kanji characters wasn't properly entity encoded when numeric entity mode was enabled.
239
+ Made emoticons dialog use the keyboard naviation.
240
+ Added navigation instructions to the symbols dialog.
241
+ Added ability to set default values for the media plugin.
242
+ Added new font_size_legacy_values option for converting old font element sizes to span with font-size properties.
243
+ Fixed bug where the symbols dialog was not accessible.
244
+ Added quirk for IE ensuring that the body of the document containing tinyMCE has a role="application" for accessibility.
245
+ Fixed bug where the advanced color picker wasn't working properly on FF 7.
246
+ Fixed issue where the advanced color picker was producing uppercase hex codes.
247
+ Fixed bug where IE 8 could throw exceptions if the contents contained resizable content elements.
248
+ Fixed bug where caret formatting wouldn't be correctly applied to previous sibling on WebKit.
249
+ Fixed bug where the select boxes for font size/family would loose it's value on WebKit due to recent iOS fixes.
250
+ Version 3.4.6 (2011-09-29)
251
+ Fixed bug where list items were being created for empty divs.
252
+ Added support in Media plugin for audio media using the embed tag
253
+ Fixed accessibility bugs in WebKit and IE8 where toolbar items were not being read.
254
+ Added new use_accessible_selects option to ensure accessible list boxes are used in all browsers (custom widget in firefox native on other browsers)
255
+ Fixed bug where classid attribute was not being checked from embed objects.
256
+ Fixed bug in jsrobot tests with intermittently failing.
257
+ Fixed bug where anchors wasn't updated properly if you edited them using IE 8.
258
+ Fixed bug where input method on WebKit on Mac OS X would fail to initialize when sometimes focusing the editor.
259
+ Fixed bug where it wasn't possible to select HR elements on WebKit by simply clicking on them.
260
+ Fixed bug where the media plugin wouldn't work on IE9 when not using the inlinepopups plugin.
261
+ Fixed bug where hspace,vspace,align and bgcolor would be removed from object elements in the media plugin.
262
+ Fixed bug where the new youtube format wouldn't be properly parsed by the media plugin.
263
+ Fixed bug where the style attribute of layers wasn't properly updated on IE and Gecko.
264
+ Fixed bug where editing contents in a layer would fail on Gecko since contentEditable doesn't inherit properly.
265
+ Fixed bug where IE 6/7 would produce JS errors when serializing contents containing layers.
266
+ Version 3.4.5 (2011-09-06)
267
+ Fixed accessibility bug in WebKit where the right and left arrow keys would update native list boxes.
268
+ Added new whitespace_elements option to enable users to specify specific elements where the whitespace is preserved.
269
+ Added new merge_siblings option to formats. This option makes it possible to disable the auto merging of siblings when applying formats.
270
+ Fixed bug in IE where trailing comma in paste plugin would cause plugin to not run correctly.
271
+ Fixed bug in WebKit where console messages would be logged when deleting an empty document.
272
+ Fixed bug in IE8 where caret positioned is on list item instead of paragraph when outdent splits the list
273
+ Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements.
274
+ Fixed bug where the selection normalization logic wouldn't properly handle image elements in specific config cases.
275
+ Fixed bug where the map elements coords attribute would be messed up by IE when serializing the DOM.
276
+ Fixed bug where IE wouldn't properly handle custom elements when the contents was serialized.
277
+ Fixed bug where you couldn't move the caret in Gecko if you focused the editor using the API or a UI control.
278
+ Fixed bug where adjacent links would get merged on IE due to bugs in their link command.
279
+ Fixed bug where the color split buttons would loose the selection on IE if the editor was placed in a frame/iframe.
280
+ Fixed bug where floated images in WebKit wouldn't get properly linked.
281
+ Fixed bug where the fullscreen mode in a separate window wasn't forced into IE9+ standards mode.
282
+ Fixed bug where pressing enter in an empty editor on WebKit could produce DIV elements instead of P.
283
+ Fixed bug where spans would get removed incorrectly when merging two blocks on backspace/delete on WebKit.
284
+ Fixed bug where the editor contents wouldn't be completely removed on backspace/delete on WebKit.
285
+ Fixed bug where the fullpage plugin wouldn't properly render style elements in the head on IE 6/7.
286
+ Fixed bug where the nonbreaking_force_tab option in the nonbreaking plugin wouldn't work on Gecko/WebKit.
287
+ Fixed bug where the isDirty state would become true on non IE browsers if there was an table at the end of the contents.
288
+ Fixed bug where entities wasn't properly encoded on WebKit when pasting text as plain text.
289
+ Fixed bug where empty editors would produce an exception of valid_elements didn't include body and forced_root_blocks where disabled.
290
+ Fixed bug where the fullscreen mode wouldn't retain the header/footer in the fullpage plugin.
291
+ Fixed issue where the plaintext_mode and plaintext_mode_sticky language keys where swapped.
292
+ Version 3.4.4 (2011-08-04)
293
+ Added new html5 audio support. Patch contributed by Ronald M. Clifford.
294
+ Added mute option for video elements and preload options for video/audio patch contributed by Dmitry Kalinkin.
295
+ Fixed selection to match visual selection before applying formatting changes.
296
+ Fixed browser specific bugs in lists for WebKit and IE.
297
+ Fixed bug where IE would scroll the window if you closed an inline dialog that was larger than the viewport. Patch by Laurence Keijmel.
298
+ Fixed bug where pasting contents near a span element could remove parts of that span. Patch contributed by Wesley Walser.
299
+ Fixed bug where formatting change would be lost after pressing enter.
300
+ Fixed bug in WebKit where deleting across blocks would add extra styles.
301
+ Fixed bug where moving cursor vertically in tables in WebKit wasn't working.
302
+ Fixed bug in IE where deleting would cause error in console.
303
+ Fixed bug where the formatter was not applying formats across list elements.
304
+ Fixed bug where the wordcount plugin would try and update the wordcount if tinymce had been destroyed.
305
+ Fixed bug where tabfocus plugin would attempt to focus elements not displayed when their parent element was hidden.
306
+ Fixed bug where the contentEditable state would sometimes be removed if you deleted contents in Gecko.
307
+ Fixed bug where inserting contents using mceInsertContent would fail if "span" was disabled in valid_elements.
308
+ Fixed bug where initialization might fail if some resource on gecko wouldn't load properly and fire the onload event.
309
+ Fixed bug where ctrl+7/8/9 keys wouldn't properly add the specific formats associated with them.
310
+ Fixed bug where the HTML tags wasn't properly closed in the style plugins properties dialog.
311
+ Fixed bug where the list plugin would produce an exception if the user tried to delete an element at the very first location.
312
+ Version 3.4.3.2 (2011-06-30)
313
+ Fixed bug where deleting all of a paragraph inside a table cell would behave badly in webkit.
314
+ Fixed bugs in tests in firefox5 and WebKit.
315
+ Fixed bug where selection of table cells would produce an exception on Gecko.
316
+ Fixed bug where the caret wasn't properly rendered on Gecko when the editor was hidden.
317
+ Fixed bug where pasting plain text into WebKit would produce a pre element it will now produce more semantic markup.
318
+ Fixed bug where selecting list type formats using the advlist plugin on IE8 would loose editor selection.
319
+ Fixed bug where forced root blocks logic wouldn't properly pad elements created if they contained data attributes.
320
+ Fixed bug where it would remove all contents of the editor if you inserted an image when not having a caret in the document.
321
+ Fixed bug where the YUI compressor wouldn't properly encode strings with only a quote in them.
322
+ Fixed bug where WebKit on iOS5 wouldn't call nodeChanged when the selection was changed.
323
+ Fixed bug where mceFocus command wouldn't work properly on Gecko since it didn't focus the body element.
324
+ Fixed performance issue with the noneditable plugin where it would enable/disable controls to often.
325
+ Version 3.4.3.1 (2011-06-16)
326
+ Fixed bug where listboxes were not being handled correctly by JAWS in firefox with the o2k7 skin.
327
+ Fixed bug where custom buttons were not being rendered correctly when in high contrast mode.
328
+ Added support for iOS 5 that now supporting contentEditable in it's latest beta.
329
+ Fixed bug where urls in style attributes with a _ character followed by a number would cause incorrect output.
330
+ Fixed bug where custom_elements option wasn't working properly on IE browsers.
331
+ Fixed bug where custom_elements marked as block elements wouldn't get correctly treated as block elements.
332
+ Fixed bug where attributes with </> wasn't properly encoded as XML entities.
333
+ Version 3.4.3 (2011-06-09)
334
+ Fixed bug where deleting backwards before an image into a list would put the cursor in the wrong location.
335
+ Fixed bug where styles plugin would not apply styles across multiple selected block elements correctly.
336
+ Fixed bug where cursor would jump to start of document when selection contained empty table cells in IE8.
337
+ Fixed bug where applied styles wouldn't be kept if you pressed enter twice to produce two paragraphs.
338
+ Fixed bug where a ghost like caret would appear on Gecko when pressing enter while having a text color applied.
339
+ Fixed bug where IE would produce absolute urls if you inserted a image/link and reloaded the page.
340
+ Fixed bug where applying a heading style to a list item would cascade style to children list items.
341
+ Fixed bug where Editor loses focus when backspacing and changing styles in WebKit.
342
+ Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided.
343
+ Fixed bug where alt-f10 was not always giving focus to the toolbar on Safari.
344
+ Added new 'allow_html_in_named_anchor' option to allow html to occur within a named anchor tag. Use at own risk.
345
+ Added plugin dependency support. Will autoload plugins specified as a dependency if they haven't been loaded.
346
+ Fixed bug where the autolink plugin didn't work with non-English keyboards when pressing ).
347
+ Added possibility to change properties of all table cells in a column.
348
+ Added external_image_list option to get images list from user-defined variable or function.
349
+ Fixed bug where the autoresize plugin wouldn't reduce the editors height on Chrome.
350
+ Fixed bug where table size inputs were to small for values with size units.
351
+ Fixed bug where table cell/row size input values were not validated.
352
+ Fixed bug where menu item line-height would be set to wrong value by external styles.
353
+ Fixed bug where hasUndo() would return wrong answer.
354
+ Fixed bug where page title would be set to undefined by fullpage plugin.
355
+ Fixed bug where HTML5 video properties were not updated in embedded media settings.
356
+ Fixed bug where HTML comment on the first line would cause an error.
357
+ Fixed bug where spellchecker menu was positioned incorrectly on IE.
358
+ Fixed bug where breaking out of list elements on WebKit would produce a DIV instead of P after the list.
359
+ Fixed bug where pasting from Word in IE9 would add extra BR elements when text was word wrapped.
360
+ Fixed bug where numeric entities with leading zeros would produce incorrect decoding.
361
+ Fixed bug where hexadecimal entities wasn't properly decoded.
362
+ Fixed bug where bookmarks wasn't properly stored/restored on undo/redo.
363
+ Fixed bug where the mceInsertCommand didn't retain the values of links if they contained non url contents.
364
+ Fixed bug where the valid_styles option wouldn't be properly used on styles for specific elements.
365
+ Fixed so contentEditable is used for the body of the editor if it's supported.
366
+ Fixed so trailing BR elements gets removed even when forced_root_blocks option was set to false/null.
367
+ Fixed performance issue with mceInsertCommand and inserting very simple contents.
368
+ Fixed performance issue with older IE version and huge documents by optimizing the forced root blocks logic.
369
+ Fixed performance issue with table plugin where it checked for selected cells to often.
370
+ Fixed bug where creating a link on centered/floated image would produce an error on WebKit browsers.
371
+ Fixed bug where Gecko would remove single paragraphs if there where contents before/after it.
372
+ Fixed bug where the scrollbar would move up/down when pasting contents using the paste plugin.
373
+ Version 3.4.2 (2011-04-07)
374
+ Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text.
375
+ Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz.
376
+ Rewritten the fullpage plugin to handle style contents better and have a more normalized behavior across browsers.
377
+ Fixed bug where contents inserted with mceInsertContent wasn't parsed using the default dom parser.
378
+ Fixed bug where blocks containing a single anchor element would be treated as empty.
379
+ Fixed bug where merging of table cells on IE 6, 7 wouldn't look correctly until the contents was refreshed.
380
+ Fixed bug where context menu wouldn't work properly on Safari since it was passing out the ctrl key as pressed.
381
+ Fixed bug where image border color/style values were overwritten by advimage plugin.
382
+ Fixed bug where setting border in advimage plugin would throw error in IE.
383
+ Fixed bug where empty anchors list in link settings wasn't hidden.
384
+ Fixed bug where xhtmlextras popups were missing localized popup-size parameters.
385
+ Fixed bug where the context menu wouldn't select images on WebKit browsers.
386
+ Fixed bug where paste plugin wouldn't properly extract the contents on WebKit due to recent changes in browser behavior.
387
+ Fixed bug where focus of the editor would get on control contents on IE lost due to a bug in the ColorSplitButton control.
388
+ Fixed bug where contextmenu wasn't disabled on noneditable elements.
389
+ Fixed bug where getStyle function would trigger error when called on element without style property.
390
+ Fixed bug where editor fail to load if Javascript Compressor was used.
391
+ Fixed bug where list-style-type=lower-greek would produce errors in IE<8.
392
+ Fixed bug where spellchecker plugin would produce errors on IE6-7.
393
+ Fixed bug where theme_advanced_containers configuration option causes error.
394
+ Fixed bug where the mceReplaceContent command would produce an error since it didn't correctly handle a return value.
395
+ Fixed bug where you couldn't enter float point values for em in dialog input fields since it wouldn't be considered a valid size.
396
+ Fixed bug in xhtmlxtras plugin where it wasn't possible to remove some attributes in the attributes dialog.
397
+ Version 3.4.1 (2011-03-24)
398
+ Added significantly improved list handling via the new 'lists' plugin.
399
+ Added 'autolink' plugin to enable automatically linking URLs. Similar to the behavior IE has by default.
400
+ Added 'theme_advanced_show_current_color' setting to enable the forecolor and backcolor buttons to continuously show the current text color.
401
+ Added 'contextmenu_never_use_native' setting to disable the ctrl-right-click showing the native browser context menu behaviour.
402
+ Added 'paste_enable_default_filters' setting to enable the default paste filters to be disabled.
403
+ Fixed bug where selection locations on undo/redo didn't work correctly on specific contents.
404
+ Fixed bug where an exception would be trown on IE when loading TinyMCE inside an iframe.
405
+ Fixed bug where some ascii numeric entities wasn't properly decoded.
406
+ Fixed bug where some non western language codes wasn't properly decoded/encoded.
407
+ Fixed bug where undo levels wasn't created when deleting contents on IE.
408
+ Fixed bug where the initial undo levels bookmark wasn't updated correctly.
409
+ Fixed bug where search/replace wouldn't be scoped to editor instances on IE8.
410
+ Fixed bug where IE9 would produce two br elements after block elements when pasting.
411
+ Fixed bug where IE would place the caret at an incorrect position after a paste operation.
412
+ Fixed bug where a paste operation using the keyboard would add an extra undo level.
413
+ Fixed bug where some attributes/elements wasn't correctly filtered when invalid contents was inserted.
414
+ Fixed bug where the table plugin couldn't correctly handle invalid table structures.
415
+ Fixed bug where charset and title of the page were handled incorrectly by the fullpage plugin.
416
+ Fixed bug where toggle states on some of the list boxes didn't update correctly.
417
+ Fixed bug where sub/sub wouldn't work correctly when done as a caret action in Chrome 10.
418
+ Fixed bug where the constrain proportions checkbox wouldn't work in the media plugin.
419
+ Fixed bug where block elements containing trailing br elements wouldn't treated properly if they where invalid.
420
+ Fixed bug where the color picker dialog wouldn't be rendered correctly when using the o2k7 theme.
421
+ Fixed bug where setting border=0 using advimage plugin invalid style attribute content was created in Chrome.
422
+ Fixed bug with references to non-existing images in css of fullpage plugin.
423
+ Fixed bug where item could be unselected in spellchecker's language selector.
424
+ Fixed bug where some mispelled words could be not highlighted using spellchecker plugin.
425
+ Fixed bug where spellchecking would merge some words on IE.
426
+ Fixed bug where spellchecker context menu was not always positioned correctly.
427
+ Fixed bug with empty anchors list in advlink popup when Invisible Elements feature was disabled.
428
+ Fixed bug where older IE versions wouldn't properly handle some elements if they where placed at the top of editor contents.
429
+ Fixed bug where selecting the whole table would enable table tools for cells and rows.
430
+ Fixed bug where it wasn't possible to replace selected contents on IE when pasting using the paste plugin.
431
+ Fixed bug where setting text color in fullpage plugin doesn't work.
432
+ Fixed bug where the state of checkboxes in media plugin wouldn't be set correctly.
433
+ Fixed bug where black spade suit character was not included in special character selector.
434
+ Fixed bug where setting invalid values for table cell size would throw an error in IE.
435
+ Fixed bug where spellchecking would remove whitespace characters from PRE block in IE.
436
+ Fixed bug where HR was inserted inside P elements instead of splitting them.
437
+ Fixed bug where extra, empty span tags were added when using a format with both selector and inline modes.
438
+ Fixed bug where bullet lists weren't always detected correctly.
439
+ Fixed bug where deleting some paragraphs on IE would cause an exception.
440
+ Fixed bug where the json encoder logic wouldn't properly encode \ characters.
441
+ Fixed bug where the onChange event would be fired when the editor was first initialized.
442
+ Fixed bug where mceSelected wouldn't be removed properly from output even if it's an internal class.
443
+ Fixed issue with table background colors not being transparent. This improves compliance with users browser color preferences.
444
+ Fixed issue where styles were not included when using the full page plugin.
445
+ Fixed issue where drag/drop operations wasn't properly added to the undo levels.
446
+ Fixed issue where colors wasn't correctly applied to elements with underline decoration.
447
+ Fixed issue where deleting some paragraphs on IE would cause an exception.
448
+ Version 3.4 (2011-03-10)
449
+ Added accessibility example with various accessibility options contributed by Ephox.
450
+ Fixed bug where attributes wasn't properly handled in the xhtmlxtras plugin.
451
+ Fixed bug where the image.htm had some strange td artifacts probably due to auto merging.
452
+ Fixed bug where the ToolbarGroup had an missing reference to this in it's destroy method.
453
+ Fixed bug with the resizeBy function in the advanced theme where it was scaled by the wrong parent.
454
+ Fixed bug where an exception would be thrown by the element if the page was served in xhtml mode.
455
+ Fixed bug where mceInsertContent would throw an exception when page was served in xhtml mode.
456
+ Fixed bug where you couldn't select a forground/background color when page was served in xhtml mode.
457
+ Fixed bug where the editor would scroll to the toolbar when clicked due to a call to focus in ListBox.
458
+ Fixed bug where pages with rtl dir wouldn't render split buttons correctly when using the o2k7 theme.
459
+ Fixed bug where anchor elements with names wasn't properly collapsed as they where in 3.3.x.
460
+ Fixed bug where WebKit wouldn't properly handle image selection if it was done left to right.
461
+ Fixed bug where the formatter would align images when the selection range was collapsed.
462
+ Fixed bug where the image button would be active when the selection range was collapsed.
463
+ Fixed bug where the element_format option wasn't used by the new (X)HTML serializer logic.
464
+ Fixed bug where the table cell/row dialogs would produce empty attributes.
465
+ Fixed bug where the tfoot wouldn't be added to the top of the table.
466
+ Fixed bug where the formatter would merge siblings with white space between them.
467
+ Fixed bug where pasting headers and paragraphs would produce an extra paragraph.
468
+ Fixed bug where the ColorSplitButton would throw an exception if you clicked out side a color.
469
+ Fixed bug where IE9 wouldn't properly produce new paragraphs on enter if the current paragraph had formatting.
470
+ Fixed bug where multiple BR elements at end of block elements where removed.
471
+ Fixed bug where fullscreen plugin wouldn't correctly display the edit area on IE6 for long pages.
472
+ Fixed bug where paste plugin wouldn't properly encode raw entities when pasting in plain text mode.
473
+ Fixed bug where the search/replace plugin wouldn't work correctly on IE 9.
474
+ Fixed so the drop menus doesn't get an outline border visible when focused, patch contributed by Ephox.
475
+ Fixed so the values entered in the color picker are forced to hex values.
476
+ Removed dialog workaround for IE 9 beta since the RC is now out and people should upgrade.
477
+ Removed obsolete calls in various plugins to the mceBeginUndoLevel command.
js/tinymce/examples/accessibility.html CHANGED
@@ -24,9 +24,9 @@
24
 
25
  // Example content CSS (should be your site CSS)
26
  // using false to ensure that the default browser settings are used for best Accessibility
27
- // ACCESSIBILITY SETTINGS
28
  content_css : false,
29
- // Use browser preferred colors for dialogs.
30
  browser_preferred_colors : true,
31
  detect_highcontrast : true,
32
 
@@ -65,13 +65,13 @@
65
 
66
  <p>
67
  This page has got the TinyMCE set up to work with configurations related to accessiblity enabled.
68
- In particular
69
- <ul>
70
- <li>the <strong>content_css</strong> is set to false, to ensure that all default browser styles are used, </li>
71
- <li>the <strong>browser_preferred_colors</strong> dialog option is used to ensure that default css is used for dialogs, </li>
72
- <li>and the <strong>detect_highcontrast</strong> option has been set to ensure that highcontrast mode in Windows browsers
73
- is detected and the toolbars are displayed in a high contrast mode.</li>
74
- </ul>
75
  </p>
76
 
77
  <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
@@ -98,4 +98,4 @@ if (document.location.protocol == 'file:') {
98
  }
99
  </script>
100
  </body>
101
- </html>
24
 
25
  // Example content CSS (should be your site CSS)
26
  // using false to ensure that the default browser settings are used for best Accessibility
27
+ // ACCESSIBILITY SETTINGS
28
  content_css : false,
29
+ // Use browser preferred colors for dialogs.
30
  browser_preferred_colors : true,
31
  detect_highcontrast : true,
32
 
65
 
66
  <p>
67
  This page has got the TinyMCE set up to work with configurations related to accessiblity enabled.
68
+ In particular
69
+ <ul>
70
+ <li>the <strong>content_css</strong> is set to false, to ensure that all default browser styles are used, </li>
71
+ <li>the <strong>browser_preferred_colors</strong> dialog option is used to ensure that default css is used for dialogs, </li>
72
+ <li>and the <strong>detect_highcontrast</strong> option has been set to ensure that highcontrast mode in Windows browsers
73
+ is detected and the toolbars are displayed in a high contrast mode.</li>
74
+ </ul>
75
  </p>
76
 
77
  <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
98
  }
99
  </script>
100
  </body>
101
+ </html>
js/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js CHANGED
@@ -1,184 +1,184 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2011, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- tinymce.create('tinymce.plugins.AutolinkPlugin', {
13
- /**
14
- * Initializes the plugin, this will be executed after the plugin has been created.
15
- * This call is done before the editor instance has finished it's initialization so use the onInit event
16
- * of the editor instance to intercept that event.
17
- *
18
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
19
- * @param {string} url Absolute URL to where the plugin is located.
20
- */
21
-
22
- init : function(ed, url) {
23
- var t = this;
24
-
25
- // Add a key down handler
26
- ed.onKeyDown.addToTop(function(ed, e) {
27
- if (e.keyCode == 13)
28
- return t.handleEnter(ed);
29
- });
30
-
31
- // Internet Explorer has built-in automatic linking for most cases
32
- if (tinyMCE.isIE)
33
- return;
34
-
35
- ed.onKeyPress.add(function(ed, e) {
36
- if (e.which == 41)
37
- return t.handleEclipse(ed);
38
- });
39
-
40
- // Add a key up handler
41
- ed.onKeyUp.add(function(ed, e) {
42
- if (e.keyCode == 32)
43
- return t.handleSpacebar(ed);
44
- });
45
- },
46
-
47
- handleEclipse : function(ed) {
48
- this.parseCurrentLine(ed, -1, '(', true);
49
- },
50
-
51
- handleSpacebar : function(ed) {
52
- this.parseCurrentLine(ed, 0, '', true);
53
- },
54
-
55
- handleEnter : function(ed) {
56
- this.parseCurrentLine(ed, -1, '', false);
57
- },
58
-
59
- parseCurrentLine : function(ed, end_offset, delimiter, goback) {
60
- var r, end, start, endContainer, bookmark, text, matches, prev, len;
61
-
62
- // We need at least five characters to form a URL,
63
- // hence, at minimum, five characters from the beginning of the line.
64
- r = ed.selection.getRng(true).cloneRange();
65
- if (r.startOffset < 5) {
66
- // During testing, the caret is placed inbetween two text nodes.
67
- // The previous text node contains the URL.
68
- prev = r.endContainer.previousSibling;
69
- if (prev == null) {
70
- if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
71
- return;
72
-
73
- prev = r.endContainer.firstChild.nextSibling;
74
- }
75
- len = prev.length;
76
- r.setStart(prev, len);
77
- r.setEnd(prev, len);
78
-
79
- if (r.endOffset < 5)
80
- return;
81
-
82
- end = r.endOffset;
83
- endContainer = prev;
84
- } else {
85
- endContainer = r.endContainer;
86
-
87
- // Get a text node
88
- if (endContainer.nodeType != 3 && endContainer.firstChild) {
89
- while (endContainer.nodeType != 3 && endContainer.firstChild)
90
- endContainer = endContainer.firstChild;
91
-
92
- // Move range to text node
93
- if (endContainer.nodeType == 3) {
94
- r.setStart(endContainer, 0);
95
- r.setEnd(endContainer, endContainer.nodeValue.length);
96
- }
97
- }
98
-
99
- if (r.endOffset == 1)
100
- end = 2;
101
- else
102
- end = r.endOffset - 1 - end_offset;
103
- }
104
-
105
- start = end;
106
-
107
- do
108
- {
109
- // Move the selection one character backwards.
110
- r.setStart(endContainer, end >= 2 ? end - 2 : 0);
111
- r.setEnd(endContainer, end >= 1 ? end - 1 : 0);
112
- end -= 1;
113
-
114
- // Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
115
- } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
116
-
117
- if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
118
- r.setStart(endContainer, end);
119
- r.setEnd(endContainer, start);
120
- end += 1;
121
- } else if (r.startOffset == 0) {
122
- r.setStart(endContainer, 0);
123
- r.setEnd(endContainer, start);
124
- }
125
- else {
126
- r.setStart(endContainer, end);
127
- r.setEnd(endContainer, start);
128
- }
129
-
130
- // Exclude last . from word like "www.site.com."
131
- var text = r.toString();
132
- if (text.charAt(text.length - 1) == '.') {
133
- r.setEnd(endContainer, start - 1);
134
- }
135
-
136
- text = r.toString();
137
- matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
138
-
139
- if (matches) {
140
- if (matches[1] == 'www.') {
141
- matches[1] = 'http://www.';
142
- } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
143
- matches[1] = 'mailto:' + matches[1];
144
- }
145
-
146
- bookmark = ed.selection.getBookmark();
147
-
148
- ed.selection.setRng(r);
149
- tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
150
- ed.selection.moveToBookmark(bookmark);
151
- ed.nodeChanged();
152
-
153
- // TODO: Determine if this is still needed.
154
- if (tinyMCE.isWebKit) {
155
- // move the caret to its original position
156
- ed.selection.collapse(false);
157
- var max = Math.min(endContainer.length, start + 1);
158
- r.setStart(endContainer, max);
159
- r.setEnd(endContainer, max);
160
- ed.selection.setRng(r);
161
- }
162
- }
163
- },
164
-
165
- /**
166
- * Returns information about the plugin as a name/value array.
167
- * The current keys are longname, author, authorurl, infourl and version.
168
- *
169
- * @return {Object} Name/value array containing information about the plugin.
170
- */
171
- getInfo : function() {
172
- return {
173
- longname : 'Autolink',
174
- author : 'Moxiecode Systems AB',
175
- authorurl : 'http://tinymce.moxiecode.com',
176
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
177
- version : tinymce.majorVersion + "." + tinymce.minorVersion
178
- };
179
- }
180
- });
181
-
182
- // Register plugin
183
- tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
184
- })();
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2011, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ tinymce.create('tinymce.plugins.AutolinkPlugin', {
13
+ /**
14
+ * Initializes the plugin, this will be executed after the plugin has been created.
15
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
16
+ * of the editor instance to intercept that event.
17
+ *
18
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
19
+ * @param {string} url Absolute URL to where the plugin is located.
20
+ */
21
+
22
+ init : function(ed, url) {
23
+ var t = this;
24
+
25
+ // Add a key down handler
26
+ ed.onKeyDown.addToTop(function(ed, e) {
27
+ if (e.keyCode == 13)
28
+ return t.handleEnter(ed);
29
+ });
30
+
31
+ // Internet Explorer has built-in automatic linking for most cases
32
+ if (tinyMCE.isIE)
33
+ return;
34
+
35
+ ed.onKeyPress.add(function(ed, e) {
36
+ if (e.which == 41)
37
+ return t.handleEclipse(ed);
38
+ });
39
+
40
+ // Add a key up handler
41
+ ed.onKeyUp.add(function(ed, e) {
42
+ if (e.keyCode == 32)
43
+ return t.handleSpacebar(ed);
44
+ });
45
+ },
46
+
47
+ handleEclipse : function(ed) {
48
+ this.parseCurrentLine(ed, -1, '(', true);
49
+ },
50
+
51
+ handleSpacebar : function(ed) {
52
+ this.parseCurrentLine(ed, 0, '', true);
53
+ },
54
+
55
+ handleEnter : function(ed) {
56
+ this.parseCurrentLine(ed, -1, '', false);
57
+ },
58
+
59
+ parseCurrentLine : function(ed, end_offset, delimiter, goback) {
60
+ var r, end, start, endContainer, bookmark, text, matches, prev, len;
61
+
62
+ // We need at least five characters to form a URL,
63
+ // hence, at minimum, five characters from the beginning of the line.
64
+ r = ed.selection.getRng(true).cloneRange();
65
+ if (r.startOffset < 5) {
66
+ // During testing, the caret is placed inbetween two text nodes.
67
+ // The previous text node contains the URL.
68
+ prev = r.endContainer.previousSibling;
69
+ if (prev == null) {
70
+ if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
71
+ return;
72
+
73
+ prev = r.endContainer.firstChild.nextSibling;
74
+ }
75
+ len = prev.length;
76
+ r.setStart(prev, len);
77
+ r.setEnd(prev, len);
78
+
79
+ if (r.endOffset < 5)
80
+ return;
81
+
82
+ end = r.endOffset;
83
+ endContainer = prev;
84
+ } else {
85
+ endContainer = r.endContainer;
86
+
87
+ // Get a text node
88
+ if (endContainer.nodeType != 3 && endContainer.firstChild) {
89
+ while (endContainer.nodeType != 3 && endContainer.firstChild)
90
+ endContainer = endContainer.firstChild;
91
+
92
+ // Move range to text node
93
+ if (endContainer.nodeType == 3) {
94
+ r.setStart(endContainer, 0);
95
+ r.setEnd(endContainer, endContainer.nodeValue.length);
96
+ }
97
+ }
98
+
99
+ if (r.endOffset == 1)
100
+ end = 2;
101
+ else
102
+ end = r.endOffset - 1 - end_offset;
103
+ }
104
+
105
+ start = end;
106
+
107
+ do
108
+ {
109
+ // Move the selection one character backwards.
110
+ r.setStart(endContainer, end >= 2 ? end - 2 : 0);
111
+ r.setEnd(endContainer, end >= 1 ? end - 1 : 0);
112
+ end -= 1;
113
+
114
+ // Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
115
+ } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
116
+
117
+ if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
118
+ r.setStart(endContainer, end);
119
+ r.setEnd(endContainer, start);
120
+ end += 1;
121
+ } else if (r.startOffset == 0) {
122
+ r.setStart(endContainer, 0);
123
+ r.setEnd(endContainer, start);
124
+ }
125
+ else {
126
+ r.setStart(endContainer, end);
127
+ r.setEnd(endContainer, start);
128
+ }
129
+
130
+ // Exclude last . from word like "www.site.com."
131
+ var text = r.toString();
132
+ if (text.charAt(text.length - 1) == '.') {
133
+ r.setEnd(endContainer, start - 1);
134
+ }
135
+
136
+ text = r.toString();
137
+ matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
138
+
139
+ if (matches) {
140
+ if (matches[1] == 'www.') {
141
+ matches[1] = 'http://www.';
142
+ } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
143
+ matches[1] = 'mailto:' + matches[1];
144
+ }
145
+
146
+ bookmark = ed.selection.getBookmark();
147
+
148
+ ed.selection.setRng(r);
149
+ tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
150
+ ed.selection.moveToBookmark(bookmark);
151
+ ed.nodeChanged();
152
+
153
+ // TODO: Determine if this is still needed.
154
+ if (tinyMCE.isWebKit) {
155
+ // move the caret to its original position
156
+ ed.selection.collapse(false);
157
+ var max = Math.min(endContainer.length, start + 1);
158
+ r.setStart(endContainer, max);
159
+ r.setEnd(endContainer, max);
160
+ ed.selection.setRng(r);
161
+ }
162
+ }
163
+ },
164
+
165
+ /**
166
+ * Returns information about the plugin as a name/value array.
167
+ * The current keys are longname, author, authorurl, infourl and version.
168
+ *
169
+ * @return {Object} Name/value array containing information about the plugin.
170
+ */
171
+ getInfo : function() {
172
+ return {
173
+ longname : 'Autolink',
174
+ author : 'Moxiecode Systems AB',
175
+ authorurl : 'http://tinymce.moxiecode.com',
176
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
177
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
178
+ };
179
+ }
180
+ });
181
+
182
+ // Register plugin
183
+ tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
184
+ })();
js/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js CHANGED
@@ -1,119 +1,119 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- /**
13
- * Auto Resize
14
- *
15
- * This plugin automatically resizes the content area to fit its content height.
16
- * It will retain a minimum height, which is the height of the content area when
17
- * it's initialized.
18
- */
19
- tinymce.create('tinymce.plugins.AutoResizePlugin', {
20
- /**
21
- * Initializes the plugin, this will be executed after the plugin has been created.
22
- * This call is done before the editor instance has finished it's initialization so use the onInit event
23
- * of the editor instance to intercept that event.
24
- *
25
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
26
- * @param {string} url Absolute URL to where the plugin is located.
27
- */
28
- init : function(ed, url) {
29
- var t = this, oldSize = 0;
30
-
31
- if (ed.getParam('fullscreen_is_enabled'))
32
- return;
33
-
34
- /**
35
- * This method gets executed each time the editor needs to resize.
36
- */
37
- function resize() {
38
- var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
39
-
40
- // Get height differently depending on the browser used
41
- myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
42
-
43
- // Don't make it smaller than the minimum height
44
- if (myHeight > t.autoresize_min_height)
45
- resizeHeight = myHeight;
46
-
47
- // If a maximum height has been defined don't exceed this height
48
- if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
49
- resizeHeight = t.autoresize_max_height;
50
- body.style.overflowY = "auto";
51
- de.style.overflowY = "auto"; // Old IE
52
- } else {
53
- body.style.overflowY = "hidden";
54
- de.style.overflowY = "hidden"; // Old IE
55
- body.scrollTop = 0;
56
- }
57
-
58
- // Resize content element
59
- if (resizeHeight !== oldSize) {
60
- deltaSize = resizeHeight - oldSize;
61
- DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
62
- oldSize = resizeHeight;
63
-
64
- // WebKit doesn't decrease the size of the body element until the iframe gets resized
65
- // So we need to continue to resize the iframe down until the size gets fixed
66
- if (tinymce.isWebKit && deltaSize < 0)
67
- resize();
68
- }
69
- };
70
-
71
- t.editor = ed;
72
-
73
- // Define minimum height
74
- t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
75
-
76
- // Define maximum height
77
- t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
78
-
79
- // Add padding at the bottom for better UX
80
- ed.onInit.add(function(ed){
81
- ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
82
- });
83
-
84
- // Add appropriate listeners for resizing content area
85
- ed.onChange.add(resize);
86
- ed.onSetContent.add(resize);
87
- ed.onPaste.add(resize);
88
- ed.onKeyUp.add(resize);
89
- ed.onPostRender.add(resize);
90
-
91
- if (ed.getParam('autoresize_on_init', true)) {
92
- ed.onLoad.add(resize);
93
- ed.onLoadContent.add(resize);
94
- }
95
-
96
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
97
- ed.addCommand('mceAutoResize', resize);
98
- },
99
-
100
- /**
101
- * Returns information about the plugin as a name/value array.
102
- * The current keys are longname, author, authorurl, infourl and version.
103
- *
104
- * @return {Object} Name/value array containing information about the plugin.
105
- */
106
- getInfo : function() {
107
- return {
108
- longname : 'Auto Resize',
109
- author : 'Moxiecode Systems AB',
110
- authorurl : 'http://tinymce.moxiecode.com',
111
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
112
- version : tinymce.majorVersion + "." + tinymce.minorVersion
113
- };
114
- }
115
- });
116
-
117
- // Register plugin
118
- tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
119
- })();
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ /**
13
+ * Auto Resize
14
+ *
15
+ * This plugin automatically resizes the content area to fit its content height.
16
+ * It will retain a minimum height, which is the height of the content area when
17
+ * it's initialized.
18
+ */
19
+ tinymce.create('tinymce.plugins.AutoResizePlugin', {
20
+ /**
21
+ * Initializes the plugin, this will be executed after the plugin has been created.
22
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
23
+ * of the editor instance to intercept that event.
24
+ *
25
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
26
+ * @param {string} url Absolute URL to where the plugin is located.
27
+ */
28
+ init : function(ed, url) {
29
+ var t = this, oldSize = 0;
30
+
31
+ if (ed.getParam('fullscreen_is_enabled'))
32
+ return;
33
+
34
+ /**
35
+ * This method gets executed each time the editor needs to resize.
36
+ */
37
+ function resize() {
38
+ var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
39
+
40
+ // Get height differently depending on the browser used
41
+ myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
42
+
43
+ // Don't make it smaller than the minimum height
44
+ if (myHeight > t.autoresize_min_height)
45
+ resizeHeight = myHeight;
46
+
47
+ // If a maximum height has been defined don't exceed this height
48
+ if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
49
+ resizeHeight = t.autoresize_max_height;
50
+ body.style.overflowY = "auto";
51
+ de.style.overflowY = "auto"; // Old IE
52
+ } else {
53
+ body.style.overflowY = "hidden";
54
+ de.style.overflowY = "hidden"; // Old IE
55
+ body.scrollTop = 0;
56
+ }
57
+
58
+ // Resize content element
59
+ if (resizeHeight !== oldSize) {
60
+ deltaSize = resizeHeight - oldSize;
61
+ DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
62
+ oldSize = resizeHeight;
63
+
64
+ // WebKit doesn't decrease the size of the body element until the iframe gets resized
65
+ // So we need to continue to resize the iframe down until the size gets fixed
66
+ if (tinymce.isWebKit && deltaSize < 0)
67
+ resize();
68
+ }
69
+ };
70
+
71
+ t.editor = ed;
72
+
73
+ // Define minimum height
74
+ t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
75
+
76
+ // Define maximum height
77
+ t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
78
+
79
+ // Add padding at the bottom for better UX
80
+ ed.onInit.add(function(ed){
81
+ ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
82
+ });
83
+
84
+ // Add appropriate listeners for resizing content area
85
+ ed.onChange.add(resize);
86
+ ed.onSetContent.add(resize);
87
+ ed.onPaste.add(resize);
88
+ ed.onKeyUp.add(resize);
89
+ ed.onPostRender.add(resize);
90
+
91
+ if (ed.getParam('autoresize_on_init', true)) {
92
+ ed.onLoad.add(resize);
93
+ ed.onLoadContent.add(resize);
94
+ }
95
+
96
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
97
+ ed.addCommand('mceAutoResize', resize);
98
+ },
99
+
100
+ /**
101
+ * Returns information about the plugin as a name/value array.
102
+ * The current keys are longname, author, authorurl, infourl and version.
103
+ *
104
+ * @return {Object} Name/value array containing information about the plugin.
105
+ */
106
+ getInfo : function() {
107
+ return {
108
+ longname : 'Auto Resize',
109
+ author : 'Moxiecode Systems AB',
110
+ authorurl : 'http://tinymce.moxiecode.com',
111
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
112
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
113
+ };
114
+ }
115
+ });
116
+
117
+ // Register plugin
118
+ tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
119
+ })();
js/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js CHANGED
@@ -1 +1 @@
1
- tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"});
1
+ tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"});
js/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js CHANGED
@@ -1,50 +1,50 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
-
13
- tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
14
- /**
15
- * Initializes the plugin, this will be executed after the plugin has been created.
16
- * This call is done before the editor instance has finished it's initialization so use the onInit event
17
- * of the editor instance to intercept that event.
18
- *
19
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
20
- * @param {string} url Absolute URL to where the plugin is located.
21
- */
22
- init : function(ed, url) {
23
- },
24
-
25
-
26
- /**
27
- * Returns information about the plugin as a name/value array.
28
- * The current keys are longname, author, authorurl, infourl and version.
29
- *
30
- * @return {Object} Name/value array containing information about the plugin.
31
- */
32
- getInfo : function() {
33
- return {
34
- longname : 'Example Dependency plugin',
35
- author : 'Some author',
36
- authorurl : 'http://tinymce.moxiecode.com',
37
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
38
- version : "1.0"
39
- };
40
- }
41
- });
42
-
43
- /**
44
- * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
45
- * plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
46
- * plugins in a depends list should typically be specified using the short name). If neccesary this can be done
47
- * with an object which has the url to the plugin and the shortname.
48
- */
49
- tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
50
- })();
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+
13
+ tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
14
+ /**
15
+ * Initializes the plugin, this will be executed after the plugin has been created.
16
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
17
+ * of the editor instance to intercept that event.
18
+ *
19
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
20
+ * @param {string} url Absolute URL to where the plugin is located.
21
+ */
22
+ init : function(ed, url) {
23
+ },
24
+
25
+
26
+ /**
27
+ * Returns information about the plugin as a name/value array.
28
+ * The current keys are longname, author, authorurl, infourl and version.
29
+ *
30
+ * @return {Object} Name/value array containing information about the plugin.
31
+ */
32
+ getInfo : function() {
33
+ return {
34
+ longname : 'Example Dependency plugin',
35
+ author : 'Some author',
36
+ authorurl : 'http://tinymce.moxiecode.com',
37
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
38
+ version : "1.0"
39
+ };
40
+ }
41
+ });
42
+
43
+ /**
44
+ * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
45
+ * plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
46
+ * plugins in a depends list should typically be specified using the short name). If neccesary this can be done
47
+ * with an object which has the url to the plugin and the shortname.
48
+ */
49
+ tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
50
+ })();
js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css CHANGED
@@ -1,90 +1,90 @@
1
- /* Clearlooks 2 */
2
-
3
- /* Reset */
4
- .clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
5
-
6
- /* General */
7
- .clearlooks2 {position:absolute; direction:ltr}
8
- .clearlooks2 .mceWrapper {position:static}
9
- .mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
10
- .clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
11
- .clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
12
-
13
- /* Top */
14
- .clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
15
- .clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
16
- .clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
17
- .clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
18
- .clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
19
- .clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
20
- .clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
21
- .clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
22
- .clearlooks2 .mceFocus .mceTop span {color:#FFF}
23
-
24
- /* Middle */
25
- .clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
26
- .clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
27
- .clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
28
- .clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
29
- .clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
30
-
31
- /* Bottom */
32
- .clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
33
- .clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
34
- .clearlooks2 .mceBottom div {top:0}
35
- .clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
36
- .clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
37
- .clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
38
- .clearlooks2 .mceBottom span {display:none}
39
- .clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
40
- .clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
41
- .clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
42
- .clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
43
- .clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
44
-
45
- /* Actions */
46
- .clearlooks2 a {width:29px; height:16px; top:3px;}
47
- .clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
48
- .clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
49
- .clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
50
- .clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
51
- .clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
52
- .clearlooks2 .mceMovable .mceMove {display:block}
53
- .clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
54
- .clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
55
- .clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
56
- .clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
57
- .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
58
- .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
59
- .clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
60
- .clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
61
- .clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
62
-
63
- /* Resize */
64
- .clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
65
- .clearlooks2 .mceResizable .mceResize {display:block}
66
- .clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
67
- .clearlooks2 .mceMinimizable .mceMin {display:block}
68
- .clearlooks2 .mceMaximizable .mceMax {display:block}
69
- .clearlooks2 .mceMaximized .mceMed {display:block}
70
- .clearlooks2 .mceMaximized .mceMax {display:none}
71
- .clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
72
- .clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
73
- .clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
74
- .clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
75
- .clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
76
- .clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
77
- .clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
78
- .clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
79
-
80
- /* Alert/Confirm */
81
- .clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
82
- .clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
83
- .clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
84
- .clearlooks2 a:hover {font-weight:bold;}
85
- .clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
86
- .clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
87
- .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
88
- .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
89
- .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
90
- .clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
1
+ /* Clearlooks 2 */
2
+
3
+ /* Reset */
4
+ .clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
5
+
6
+ /* General */
7
+ .clearlooks2 {position:absolute; direction:ltr}
8
+ .clearlooks2 .mceWrapper {position:static}
9
+ .mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
10
+ .clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
11
+ .clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
12
+
13
+ /* Top */
14
+ .clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
15
+ .clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
16
+ .clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
17
+ .clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
18
+ .clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
19
+ .clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
20
+ .clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
21
+ .clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
22
+ .clearlooks2 .mceFocus .mceTop span {color:#FFF}
23
+
24
+ /* Middle */
25
+ .clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
26
+ .clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
27
+ .clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
28
+ .clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
29
+ .clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
30
+
31
+ /* Bottom */
32
+ .clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
33
+ .clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
34
+ .clearlooks2 .mceBottom div {top:0}
35
+ .clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
36
+ .clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
37
+ .clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
38
+ .clearlooks2 .mceBottom span {display:none}
39
+ .clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
40
+ .clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
41
+ .clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
42
+ .clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
43
+ .clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
44
+
45
+ /* Actions */
46
+ .clearlooks2 a {width:29px; height:16px; top:3px;}
47
+ .clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
48
+ .clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
49
+ .clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
50
+ .clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
51
+ .clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
52
+ .clearlooks2 .mceMovable .mceMove {display:block}
53
+ .clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
54
+ .clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
55
+ .clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
56
+ .clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
57
+ .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
58
+ .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
59
+ .clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
60
+ .clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
61
+ .clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
62
+
63
+ /* Resize */
64
+ .clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
65
+ .clearlooks2 .mceResizable .mceResize {display:block}
66
+ .clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
67
+ .clearlooks2 .mceMinimizable .mceMin {display:block}
68
+ .clearlooks2 .mceMaximizable .mceMax {display:block}
69
+ .clearlooks2 .mceMaximized .mceMed {display:block}
70
+ .clearlooks2 .mceMaximized .mceMax {display:none}
71
+ .clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
72
+ .clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
73
+ .clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
74
+ .clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
75
+ .clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
76
+ .clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
77
+ .clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
78
+ .clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
79
+
80
+ /* Alert/Confirm */
81
+ .clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
82
+ .clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
83
+ .clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
84
+ .clearlooks2 a:hover {font-weight:bold;}
85
+ .clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
86
+ .clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
87
+ .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
88
+ .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
89
+ .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
90
+ .clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
js/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js CHANGED
@@ -36,7 +36,7 @@
36
  alignright : {selector : alignElements, attributes : {align : 'right'}},
37
  alignfull : {selector : alignElements, attributes : {align : 'justify'}},
38
 
39
- // Change the basic formatting elements to use deprecated element types
40
  bold : [
41
  {inline : 'b', remove : 'all'},
42
  {inline : 'strong', remove : 'all'},
@@ -54,7 +54,7 @@
54
  strikethrough : [
55
  {inline : 'strike', remove : 'all'},
56
  {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
57
- ],
58
 
59
  // Change font size and font family to use the deprecated font element
60
  fontname : {inline : 'font', attributes : {face : '%value'}},
36
  alignright : {selector : alignElements, attributes : {align : 'right'}},
37
  alignfull : {selector : alignElements, attributes : {align : 'justify'}},
38
 
39
+ // Change the basic formatting elements to use deprecated element types
40
  bold : [
41
  {inline : 'b', remove : 'all'},
42
  {inline : 'strong', remove : 'all'},
54
  strikethrough : [
55
  {inline : 'strike', remove : 'all'},
56
  {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
57
+ ],
58
 
59
  // Change font size and font family to use the deprecated font element
60
  fontname : {inline : 'font', attributes : {face : '%value'}},
js/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js CHANGED
@@ -1,955 +1,955 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2011, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- var each = tinymce.each, Event = tinymce.dom.Event, bookmark;
13
-
14
- // Skips text nodes that only contain whitespace since they aren't semantically important.
15
- function skipWhitespaceNodes(e, next) {
16
- while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) {
17
- e = next(e);
18
- }
19
- return e;
20
- }
21
-
22
- function skipWhitespaceNodesBackwards(e) {
23
- return skipWhitespaceNodes(e, function(e) {
24
- return e.previousSibling;
25
- });
26
- }
27
-
28
- function skipWhitespaceNodesForwards(e) {
29
- return skipWhitespaceNodes(e, function(e) {
30
- return e.nextSibling;
31
- });
32
- }
33
-
34
- function hasParentInList(ed, e, list) {
35
- return ed.dom.getParent(e, function(p) {
36
- return tinymce.inArray(list, p) !== -1;
37
- });
38
- }
39
-
40
- function isList(e) {
41
- return e && (e.tagName === 'OL' || e.tagName === 'UL');
42
- }
43
-
44
- function splitNestedLists(element, dom) {
45
- var tmp, nested, wrapItem;
46
- tmp = skipWhitespaceNodesBackwards(element.lastChild);
47
- while (isList(tmp)) {
48
- nested = tmp;
49
- tmp = skipWhitespaceNodesBackwards(nested.previousSibling);
50
- }
51
- if (nested) {
52
- wrapItem = dom.create('li', { style: 'list-style-type: none;'});
53
- dom.split(element, nested);
54
- dom.insertAfter(wrapItem, nested);
55
- wrapItem.appendChild(nested);
56
- wrapItem.appendChild(nested);
57
- element = wrapItem.previousSibling;
58
- }
59
- return element;
60
- }
61
-
62
- function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) {
63
- e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs);
64
- return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs);
65
- }
66
-
67
- function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) {
68
- var prev = skipWhitespaceNodesBackwards(e.previousSibling);
69
- if (prev) {
70
- return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs);
71
- } else {
72
- return e;
73
- }
74
- }
75
-
76
- function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) {
77
- var next = skipWhitespaceNodesForwards(e.nextSibling);
78
- if (next) {
79
- return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs);
80
- } else {
81
- return e;
82
- }
83
- }
84
-
85
- function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
86
- if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
87
- return merge(e1, e2, differentStylesMasterElement);
88
- } else if (e1 && e1.tagName === 'LI' && isList(e2)) {
89
- // Fix invalidly nested lists.
90
- e1.appendChild(e2);
91
- }
92
- return e2;
93
- }
94
-
95
- function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) {
96
- if (!e1 || !e2) {
97
- return false;
98
- } else if (e1.tagName === 'LI' && e2.tagName === 'LI') {
99
- return e2.style.listStyleType === 'none' || containsOnlyAList(e2);
100
- } else if (isList(e1)) {
101
- return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2);
102
- } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P';
103
- }
104
-
105
- function isListForIndent(e) {
106
- var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild);
107
- return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI));
108
- }
109
-
110
- function containsOnlyAList(e) {
111
- var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild);
112
- return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
113
- }
114
-
115
- function merge(e1, e2, masterElement) {
116
- var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
117
- if (e1.tagName === 'P') {
118
- e1.appendChild(e1.ownerDocument.createElement('br'));
119
- }
120
- while (e2.firstChild) {
121
- e1.appendChild(e2.firstChild);
122
- }
123
- if (masterElement) {
124
- e1.style.listStyleType = masterElement.style.listStyleType;
125
- }
126
- e2.parentNode.removeChild(e2);
127
- attemptMerge(lastOriginal, firstNew, false);
128
- return e1;
129
- }
130
-
131
- function findItemToOperateOn(e, dom) {
132
- var item;
133
- if (!dom.is(e, 'li,ol,ul')) {
134
- item = dom.getParent(e, 'li');
135
- if (item) {
136
- e = item;
137
- }
138
- }
139
- return e;
140
- }
141
-
142
- tinymce.create('tinymce.plugins.Lists', {
143
- init: function(ed) {
144
- var LIST_TABBING = 'TABBING';
145
- var LIST_EMPTY_ITEM = 'EMPTY';
146
- var LIST_ESCAPE = 'ESCAPE';
147
- var LIST_PARAGRAPH = 'PARAGRAPH';
148
- var LIST_UNKNOWN = 'UNKNOWN';
149
- var state = LIST_UNKNOWN;
150
-
151
- function isTabInList(e) {
152
- // Don't indent on Ctrl+Tab or Alt+Tab
153
- return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) &&
154
- (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList'));
155
- }
156
-
157
- function isOnLastListItem() {
158
- var li = getLi();
159
- var grandParent = li.parentNode.parentNode;
160
- var isLastItem = li.parentNode.lastChild === li;
161
- return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li);
162
- }
163
-
164
- function isNestedList(grandParent) {
165
- if (isList(grandParent)) {
166
- return grandParent.parentNode && grandParent.parentNode.tagName === 'LI';
167
- } else {
168
- return grandParent.tagName === 'LI';
169
- }
170
- }
171
-
172
- function isInEmptyListItem() {
173
- return ed.selection.isCollapsed() && isEmptyListItem(getLi());
174
- }
175
-
176
- function getLi() {
177
- var n = ed.selection.getStart();
178
- // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position
179
- return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n;
180
- }
181
-
182
- function isEmptyListItem(li) {
183
- var numChildren = li.childNodes.length;
184
- if (li.tagName === 'LI') {
185
- return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li));
186
- }
187
- return false;
188
- }
189
-
190
- function isEmptyIE9Li(li) {
191
- // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these
192
- var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'});
193
- var isLastLi = li == lis[lis.length - 1];
194
- var child = li.firstChild;
195
- return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32));
196
- }
197
-
198
- function isEnter(e) {
199
- return e.keyCode === tinymce.VK.ENTER;
200
- }
201
-
202
- function isEnterWithoutShift(e) {
203
- return isEnter(e) && !e.shiftKey;
204
- }
205
-
206
- function getListKeyState(e) {
207
- if (isTabInList(e)) {
208
- return LIST_TABBING;
209
- } else if (isEnterWithoutShift(e) && isOnLastListItem()) {
210
- // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now
211
- //return LIST_ESCAPE;
212
- return LIST_UNKNOWN;
213
- } else if (isEnterWithoutShift(e) && isInEmptyListItem()) {
214
- return LIST_EMPTY_ITEM;
215
- } else {
216
- return LIST_UNKNOWN;
217
- }
218
- }
219
-
220
- function cancelDefaultEvents(ed, e) {
221
- // list escape is done manually using outdent as it does not create paragraphs correctly in td's
222
- if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) {
223
- Event.cancel(e);
224
- }
225
- }
226
-
227
- function isCursorAtEndOfContainer() {
228
- var range = ed.selection.getRng(true);
229
- var startContainer = range.startContainer;
230
- if (startContainer.nodeType == 3) {
231
- var value = startContainer.nodeValue;
232
- if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) {
233
- // IE9 places a space on the end of the text in some cases so ignore last char
234
- return (range.endOffset == value.length-1);
235
- } else {
236
- return (range.endOffset == value.length);
237
- }
238
- } else if (startContainer.nodeType == 1) {
239
- return range.endOffset == startContainer.childNodes.length;
240
- }
241
- return false;
242
- }
243
-
244
- /*
245
- If we are at the end of a list item surrounded with an element, pressing enter should create a
246
- new list item instead without splitting the element e.g. don't want to create new P or H1 tag
247
- */
248
- function isEndOfListItem() {
249
- var node = ed.selection.getNode();
250
- var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
251
- var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
252
- return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
253
- }
254
-
255
- // Creates a new list item after the current selection's list item parent
256
- function createNewLi(ed, e) {
257
- if (isEnterWithoutShift(e) && isEndOfListItem()) {
258
- var node = ed.selection.getNode();
259
- var li = ed.dom.create("li");
260
- var parentLi = ed.dom.getParent(node, 'li');
261
- ed.dom.insertAfter(li, parentLi);
262
-
263
- // Move caret to new list element.
264
- if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) {
265
- // Removed this line since it would create an odd <&nbsp;> tag and placing the caret inside an empty LI is handled and should be handled by the selection logic
266
- //li.appendChild(ed.dom.create("&nbsp;")); // IE needs an element within the bullet point
267
- ed.selection.setCursorLocation(li, 1);
268
- } else {
269
- ed.selection.setCursorLocation(li, 0);
270
- }
271
- e.preventDefault();
272
- }
273
- }
274
-
275
- function imageJoiningListItem(ed, e) {
276
- var prevSibling;
277
-
278
- if (!tinymce.isGecko)
279
- return;
280
-
281
- var n = ed.selection.getStart();
282
- if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG')
283
- return;
284
-
285
- function lastLI(node) {
286
- var child = node.firstChild;
287
- var li = null;
288
- do {
289
- if (!child)
290
- break;
291
-
292
- if (child.tagName === 'LI')
293
- li = child;
294
- } while (child = child.nextSibling);
295
-
296
- return li;
297
- }
298
-
299
- function addChildren(parentNode, destination) {
300
- while (parentNode.childNodes.length > 0)
301
- destination.appendChild(parentNode.childNodes[0]);
302
- }
303
-
304
- // Check if there is a previous sibling
305
- prevSibling = n.parentNode.previousSibling;
306
- if (!prevSibling)
307
- return;
308
-
309
- var ul;
310
- if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL')
311
- ul = prevSibling;
312
- else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL'))
313
- ul = prevSibling.previousSibling;
314
- else
315
- return;
316
-
317
- var li = lastLI(ul);
318
-
319
- // move the caret to the end of the list item
320
- var rng = ed.dom.createRng();
321
- rng.setStart(li, 1);
322
- rng.setEnd(li, 1);
323
- ed.selection.setRng(rng);
324
- ed.selection.collapse(true);
325
-
326
- // save a bookmark at the end of the list item
327
- var bookmark = ed.selection.getBookmark();
328
-
329
- // copy the image an its text to the list item
330
- var clone = n.parentNode.cloneNode(true);
331
- if (clone.tagName === 'P' || clone.tagName === 'DIV')
332
- addChildren(clone, li);
333
- else
334
- li.appendChild(clone);
335
-
336
- // remove the old copy of the image
337
- n.parentNode.parentNode.removeChild(n.parentNode);
338
-
339
- // move the caret where we saved the bookmark
340
- ed.selection.moveToBookmark(bookmark);
341
- }
342
-
343
- // fix the cursor position to ensure it is correct in IE
344
- function setCursorPositionToOriginalLi(li) {
345
- var list = ed.dom.getParent(li, 'ol,ul');
346
- if (list != null) {
347
- var lastLi = list.lastChild;
348
- // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic
349
- //lastLi.appendChild(ed.getDoc().createElement(''));
350
- ed.selection.setCursorLocation(lastLi, 0);
351
- }
352
- }
353
-
354
- this.ed = ed;
355
- ed.addCommand('Indent', this.indent, this);
356
- ed.addCommand('Outdent', this.outdent, this);
357
- ed.addCommand('InsertUnorderedList', function() {
358
- this.applyList('UL', 'OL');
359
- }, this);
360
- ed.addCommand('InsertOrderedList', function() {
361
- this.applyList('OL', 'UL');
362
- }, this);
363
-
364
- ed.onInit.add(function() {
365
- ed.editorCommands.addCommands({
366
- 'outdent': function() {
367
- var sel = ed.selection, dom = ed.dom;
368
-
369
- function hasStyleIndent(n) {
370
- n = dom.getParent(n, dom.isBlock);
371
- return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0;
372
- }
373
-
374
- return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList');
375
- }
376
- }, 'state');
377
- });
378
-
379
- ed.onKeyUp.add(function(ed, e) {
380
- if (state == LIST_TABBING) {
381
- ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null);
382
- state = LIST_UNKNOWN;
383
- return Event.cancel(e);
384
- } else if (state == LIST_EMPTY_ITEM) {
385
- var li = getLi();
386
- var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey;
387
- ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null);
388
- if (tinymce.isIE) {
389
- setCursorPositionToOriginalLi(li);
390
- }
391
-
392
- return Event.cancel(e);
393
- } else if (state == LIST_ESCAPE) {
394
- if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) {
395
- // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting.
396
- // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after
397
- // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag.
398
- var n = ed.getDoc().createTextNode('\uFEFF');
399
- ed.selection.getNode().appendChild(n);
400
- } else if (tinymce.isIE9 || tinymce.isGecko) {
401
- // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour
402
- // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves
403
- ed.execCommand('Outdent');
404
- return Event.cancel(e);
405
- }
406
- }
407
- });
408
-
409
- function fixListItem(parent, reference) {
410
- // a zero-sized non-breaking space is placed in the empty list item so that the nested list is
411
- // displayed on the below line instead of next to it
412
- var n = ed.getDoc().createTextNode('\uFEFF');
413
- parent.insertBefore(n, reference);
414
- ed.selection.setCursorLocation(n, 0);
415
- // repaint to remove rendering artifact. only visible when creating new list
416
- ed.execCommand('mceRepaint');
417
- }
418
-
419
- function fixIndentedListItemForGecko(ed, e) {
420
- if (isEnter(e)) {
421
- var li = getLi();
422
- if (li) {
423
- var parent = li.parentNode;
424
- var grandParent = parent && parent.parentNode;
425
- if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) {
426
- fixListItem(grandParent, parent);
427
- }
428
- }
429
- }
430
- }
431
-
432
- function fixIndentedListItemForIE8(ed, e) {
433
- if (isEnter(e)) {
434
- var li = getLi();
435
- if (ed.dom.select('ul li', li).length === 1) {
436
- var list = li.firstChild;
437
- fixListItem(li, list);
438
- }
439
- }
440
- }
441
-
442
- function fixDeletingFirstCharOfList(ed, e) {
443
- function listElements(li) {
444
- var elements = [];
445
- var walker = new tinymce.dom.TreeWalker(li.firstChild, li);
446
- for (var node = walker.current(); node; node = walker.next()) {
447
- if (ed.dom.is(node, 'ol,ul,li')) {
448
- elements.push(node);
449
- }
450
- }
451
- return elements;
452
- }
453
-
454
- if (e.keyCode == tinymce.VK.BACKSPACE) {
455
- var li = getLi();
456
- if (li) {
457
- var list = ed.dom.getParent(li, 'ol,ul'),
458
- rng = ed.selection.getRng();
459
- if (list && list.firstChild === li && rng.startOffset == 0) {
460
- var elements = listElements(li);
461
- elements.unshift(li);
462
- ed.execCommand("Outdent", false, elements);
463
- ed.undoManager.add();
464
- return Event.cancel(e);
465
- }
466
- }
467
- }
468
- }
469
-
470
- function fixDeletingEmptyLiInWebkit(ed, e) {
471
- var li = getLi();
472
- if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) {
473
- if (ed.dom.select('ul,ol', li).length === 1) {
474
- var prevLi = li.previousSibling;
475
- ed.dom.remove(ed.dom.select('br', li));
476
- ed.dom.remove(li, true);
477
- var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
478
- if (textNodes.length === 1) {
479
- var textNode = textNodes[0];
480
- ed.selection.setCursorLocation(textNode, textNode.length);
481
- }
482
- ed.undoManager.add();
483
- return Event.cancel(e);
484
- }
485
- }
486
- }
487
-
488
- ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); });
489
- ed.onKeyDown.add(cancelDefaultEvents);
490
- ed.onKeyDown.add(imageJoiningListItem);
491
- ed.onKeyDown.add(createNewLi);
492
-
493
- if (tinymce.isGecko) {
494
- ed.onKeyUp.add(fixIndentedListItemForGecko);
495
- }
496
- if (tinymce.isIE8) {
497
- ed.onKeyUp.add(fixIndentedListItemForIE8);
498
- }
499
- if (tinymce.isGecko || tinymce.isWebKit) {
500
- ed.onKeyDown.add(fixDeletingFirstCharOfList);
501
- }
502
- if (tinymce.isWebKit) {
503
- ed.onKeyDown.add(fixDeletingEmptyLiInWebkit);
504
- }
505
- },
506
-
507
- applyList: function(targetListType, oppositeListType) {
508
- var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
509
- selectedBlocks = ed.selection.getSelectedBlocks();
510
-
511
- function cleanupBr(e) {
512
- if (e && e.tagName === 'BR') {
513
- dom.remove(e);
514
- }
515
- }
516
-
517
- function makeList(element) {
518
- var list = dom.create(targetListType), li;
519
-
520
- function adjustIndentForNewList(element) {
521
- // If there's a margin-left, outdent one level to account for the extra list margin.
522
- if (element.style.marginLeft || element.style.paddingLeft) {
523
- t.adjustPaddingFunction(false)(element);
524
- }
525
- }
526
-
527
- if (element.tagName === 'LI') {
528
- // No change required.
529
- } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') {
530
- processBrs(element, function(startSection, br) {
531
- doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode);
532
- li = startSection.parentNode;
533
- adjustIndentForNewList(li);
534
- cleanupBr(br);
535
- });
536
- if (li) {
537
- if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) {
538
- dom.split(li.parentNode.parentNode, li.parentNode);
539
- }
540
- attemptMergeWithAdjacent(li.parentNode, true);
541
- }
542
- return;
543
- } else {
544
- // Put the list around the element.
545
- li = dom.create('li');
546
- dom.insertAfter(li, element);
547
- li.appendChild(element);
548
- adjustIndentForNewList(element);
549
- element = li;
550
- }
551
- dom.insertAfter(list, element);
552
- list.appendChild(element);
553
- attemptMergeWithAdjacent(list, true);
554
- applied.push(element);
555
- }
556
-
557
- function doWrapList(start, end, template) {
558
- var li, n = start, tmp;
559
- while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) {
560
- start = dom.split(start.parentNode, start.previousSibling);
561
- start = start.nextSibling;
562
- n = start;
563
- }
564
- if (template) {
565
- li = template.cloneNode(true);
566
- start.parentNode.insertBefore(li, start);
567
- while (li.firstChild) dom.remove(li.firstChild);
568
- li = dom.rename(li, 'li');
569
- } else {
570
- li = dom.create('li');
571
- start.parentNode.insertBefore(li, start);
572
- }
573
- while (n && n != end) {
574
- tmp = n.nextSibling;
575
- li.appendChild(n);
576
- n = tmp;
577
- }
578
- if (li.childNodes.length === 0) {
579
- li.innerHTML = '<br _mce_bogus="1" />';
580
- }
581
- makeList(li);
582
- }
583
-
584
- function processBrs(element, callback) {
585
- var startSection, previousBR, END_TO_START = 3, START_TO_END = 1,
586
- breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl';
587
-
588
- function isAnyPartSelected(start, end) {
589
- var r = dom.createRng(), sel;
590
- bookmark.keep = true;
591
- ed.selection.moveToBookmark(bookmark);
592
- bookmark.keep = false;
593
- sel = ed.selection.getRng(true);
594
- if (!end) {
595
- end = start.parentNode.lastChild;
596
- }
597
- r.setStartBefore(start);
598
- r.setEndAfter(end);
599
- return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0);
600
- }
601
-
602
- function nextLeaf(br) {
603
- if (br.nextSibling)
604
- return br.nextSibling;
605
- if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot())
606
- return nextLeaf(br.parentNode);
607
- }
608
-
609
- // Split on BRs within the range and process those.
610
- startSection = element.firstChild;
611
- // First mark the BRs that have any part of the previous section selected.
612
- var trailingContentSelected = false;
613
- each(dom.select(breakElements, element), function(br) {
614
- if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
615
- return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
616
- }
617
- if (isAnyPartSelected(startSection, br)) {
618
- dom.addClass(br, '_mce_tagged_br');
619
- startSection = nextLeaf(br);
620
- }
621
- });
622
- trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined));
623
- startSection = element.firstChild;
624
- each(dom.select(breakElements, element), function(br) {
625
- // Got a section from start to br.
626
- var tmp = nextLeaf(br);
627
- if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
628
- return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
629
- }
630
- if (dom.hasClass(br, '_mce_tagged_br')) {
631
- callback(startSection, br, previousBR);
632
- previousBR = null;
633
- } else {
634
- previousBR = br;
635
- }
636
- startSection = tmp;
637
- });
638
- if (trailingContentSelected) {
639
- callback(startSection, undefined, previousBR);
640
- }
641
- }
642
-
643
- function wrapList(element) {
644
- processBrs(element, function(startSection, br, previousBR) {
645
- // Need to indent this part
646
- doWrapList(startSection, br);
647
- cleanupBr(br);
648
- cleanupBr(previousBR);
649
- });
650
- }
651
-
652
- function changeList(element) {
653
- if (tinymce.inArray(applied, element) !== -1) {
654
- return;
655
- }
656
- if (element.parentNode.tagName === oppositeListType) {
657
- dom.split(element.parentNode, element);
658
- makeList(element);
659
- attemptMergeWithNext(element.parentNode, false);
660
- }
661
- applied.push(element);
662
- }
663
-
664
- function convertListItemToParagraph(element) {
665
- var child, nextChild, mergedElement, splitLast;
666
- if (tinymce.inArray(applied, element) !== -1) {
667
- return;
668
- }
669
- element = splitNestedLists(element, dom);
670
- while (dom.is(element.parentNode, 'ol,ul,li')) {
671
- dom.split(element.parentNode, element);
672
- }
673
- // Push the original element we have from the selection, not the renamed one.
674
- applied.push(element);
675
- element = dom.rename(element, 'p');
676
- mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines);
677
- if (mergedElement === element) {
678
- // Now split out any block elements that can't be contained within a P.
679
- // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each)
680
- child = element.firstChild;
681
- while (child) {
682
- if (dom.isBlock(child)) {
683
- child = dom.split(child.parentNode, child);
684
- splitLast = true;
685
- nextChild = child.nextSibling && child.nextSibling.firstChild;
686
- } else {
687
- nextChild = child.nextSibling;
688
- if (splitLast && child.tagName === 'BR') {
689
- dom.remove(child);
690
- }
691
- splitLast = false;
692
- }
693
- child = nextChild;
694
- }
695
- }
696
- }
697
-
698
- each(selectedBlocks, function(e) {
699
- e = findItemToOperateOn(e, dom);
700
- if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) {
701
- hasOppositeType = true;
702
- } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) {
703
- hasSameType = true;
704
- } else {
705
- hasNonList = true;
706
- }
707
- });
708
-
709
- if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) {
710
- actions = {
711
- 'LI': changeList,
712
- 'H1': makeList,
713
- 'H2': makeList,
714
- 'H3': makeList,
715
- 'H4': makeList,
716
- 'H5': makeList,
717
- 'H6': makeList,
718
- 'P': makeList,
719
- 'BODY': makeList,
720
- 'DIV': selectedBlocks.length > 1 ? makeList : wrapList,
721
- defaultAction: wrapList,
722
- elements: this.selectedBlocks()
723
- };
724
- } else {
725
- actions = {
726
- defaultAction: convertListItemToParagraph,
727
- elements: this.selectedBlocks(),
728
- processEvenIfEmpty: true
729
- };
730
- }
731
- this.process(actions);
732
- },
733
-
734
- indent: function() {
735
- var ed = this.ed, dom = ed.dom, indented = [];
736
-
737
- function createWrapItem(element) {
738
- var wrapItem = dom.create('li', { style: 'list-style-type: none;'});
739
- dom.insertAfter(wrapItem, element);
740
- return wrapItem;
741
- }
742
-
743
- function createWrapList(element) {
744
- var wrapItem = createWrapItem(element),
745
- list = dom.getParent(element, 'ol,ul'),
746
- listType = list.tagName,
747
- listStyle = dom.getStyle(list, 'list-style-type'),
748
- attrs = {},
749
- wrapList;
750
- if (listStyle !== '') {
751
- attrs.style = 'list-style-type: ' + listStyle + ';';
752
- }
753
- wrapList = dom.create(listType, attrs);
754
- wrapItem.appendChild(wrapList);
755
- return wrapList;
756
- }
757
-
758
- function indentLI(element) {
759
- if (!hasParentInList(ed, element, indented)) {
760
- element = splitNestedLists(element, dom);
761
- var wrapList = createWrapList(element);
762
- wrapList.appendChild(element);
763
- attemptMergeWithAdjacent(wrapList.parentNode, false);
764
- attemptMergeWithAdjacent(wrapList, false);
765
- indented.push(element);
766
- }
767
- }
768
-
769
- this.process({
770
- 'LI': indentLI,
771
- defaultAction: this.adjustPaddingFunction(true),
772
- elements: this.selectedBlocks()
773
- });
774
-
775
- },
776
-
777
- outdent: function(ui, elements) {
778
- var t = this, ed = t.ed, dom = ed.dom, outdented = [];
779
-
780
- function outdentLI(element) {
781
- var listElement, targetParent, align;
782
- if (!hasParentInList(ed, element, outdented)) {
783
- if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') {
784
- return t.adjustPaddingFunction(false)(element);
785
- }
786
- align = dom.getStyle(element, 'text-align', true);
787
- if (align === 'center' || align === 'right') {
788
- dom.setStyle(element, 'text-align', 'left');
789
- return;
790
- }
791
- element = splitNestedLists(element, dom);
792
- listElement = element.parentNode;
793
- targetParent = element.parentNode.parentNode;
794
- if (targetParent.tagName === 'P') {
795
- dom.split(targetParent, element.parentNode);
796
- } else {
797
- dom.split(listElement, element);
798
- if (targetParent.tagName === 'LI') {
799
- // Nested list, need to split the LI and go back out to the OL/UL element.
800
- dom.split(targetParent, element);
801
- } else if (!dom.is(targetParent, 'ol,ul')) {
802
- dom.rename(element, 'p');
803
- }
804
- }
805
- outdented.push(element);
806
- }
807
- }
808
-
809
- var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks();
810
- this.process({
811
- 'LI': outdentLI,
812
- defaultAction: this.adjustPaddingFunction(false),
813
- elements: listElements
814
- });
815
-
816
- each(outdented, attemptMergeWithAdjacent);
817
- },
818
-
819
- process: function(actions) {
820
- var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r;
821
-
822
- function isEmptyElement(element) {
823
- var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) {
824
- return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark'
825
- || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == ''));
826
- });
827
- return excludeBrsAndBookmarks.length === 0;
828
- }
829
-
830
- function processElement(element) {
831
- dom.removeClass(element, '_mce_act_on');
832
- if (!element || element.nodeType !== 1 || ! actions.processEvenIfEmpty && selectedBlocks.length > 1 && isEmptyElement(element)) {
833
- return;
834
- }
835
- element = findItemToOperateOn(element, dom);
836
- var action = actions[element.tagName];
837
- if (!action) {
838
- action = actions.defaultAction;
839
- }
840
- action(element);
841
- }
842
-
843
- function recurse(element) {
844
- t.splitSafeEach(element.childNodes, processElement, true);
845
- }
846
-
847
- function brAtEdgeOfSelection(container, offset) {
848
- return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length &&
849
- container.childNodes[offset].tagName === 'BR';
850
- }
851
-
852
- function isInTable() {
853
- var n = sel.getNode();
854
- var p = dom.getParent(n, 'td');
855
- return p !== null;
856
- }
857
-
858
- selectedBlocks = actions.elements;
859
-
860
- r = sel.getRng(true);
861
- if (!r.collapsed) {
862
- if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) {
863
- r.setEnd(r.endContainer, r.endOffset - 1);
864
- sel.setRng(r);
865
- }
866
- if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) {
867
- r.setStart(r.startContainer, r.startOffset + 1);
868
- sel.setRng(r);
869
- }
870
- }
871
-
872
-
873
- if (tinymce.isIE8) {
874
- // append a zero sized nbsp so that caret is restored correctly using bookmark
875
- var s = t.ed.selection.getNode();
876
- if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) {
877
- var i = t.ed.getDoc().createTextNode('\uFEFF');
878
- s.appendChild(i);
879
- }
880
- }
881
-
882
- bookmark = sel.getBookmark();
883
- actions.OL = actions.UL = recurse;
884
- t.splitSafeEach(selectedBlocks, processElement);
885
- sel.moveToBookmark(bookmark);
886
- bookmark = null;
887
-
888
- // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6
889
- if (!isInTable()) {
890
- // Avoids table or image handles being left behind in Firefox.
891
- t.ed.execCommand('mceRepaint');
892
- }
893
- },
894
-
895
- splitSafeEach: function(elements, f, forceClassBase) {
896
- if (forceClassBase ||
897
- (tinymce.isGecko &&
898
- (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
899
- /Firefox\/3\.[0-4]/.test(navigator.userAgent)))) {
900
- this.classBasedEach(elements, f);
901
- } else {
902
- each(elements, f);
903
- }
904
- },
905
-
906
- classBasedEach: function(elements, f) {
907
- var dom = this.ed.dom, nodes, element;
908
- // Mark nodes
909
- each(elements, function(element) {
910
- dom.addClass(element, '_mce_act_on');
911
- });
912
- nodes = dom.select('._mce_act_on');
913
- while (nodes.length > 0) {
914
- element = nodes.shift();
915
- dom.removeClass(element, '_mce_act_on');
916
- f(element);
917
- nodes = dom.select('._mce_act_on');
918
- }
919
- },
920
-
921
- adjustPaddingFunction: function(isIndent) {
922
- var indentAmount, indentUnits, ed = this.ed;
923
- indentAmount = ed.settings.indentation;
924
- indentUnits = /[a-z%]+/i.exec(indentAmount);
925
- indentAmount = parseInt(indentAmount, 10);
926
- return function(element) {
927
- var currentIndent, newIndentAmount;
928
- currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10);
929
- if (isIndent) {
930
- newIndentAmount = currentIndent + indentAmount;
931
- } else {
932
- newIndentAmount = currentIndent - indentAmount;
933
- }
934
- ed.dom.setStyle(element, 'padding-left', '');
935
- ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : '');
936
- };
937
- },
938
-
939
- selectedBlocks: function() {
940
- var ed = this.ed, selectedBlocks = ed.selection.getSelectedBlocks();
941
- return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
942
- },
943
-
944
- getInfo: function() {
945
- return {
946
- longname : 'Lists',
947
- author : 'Moxiecode Systems AB',
948
- authorurl : 'http://tinymce.moxiecode.com',
949
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists',
950
- version : tinymce.majorVersion + "." + tinymce.minorVersion
951
- };
952
- }
953
- });
954
- tinymce.PluginManager.add("lists", tinymce.plugins.Lists);
955
- }());
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2011, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ var each = tinymce.each, Event = tinymce.dom.Event, bookmark;
13
+
14
+ // Skips text nodes that only contain whitespace since they aren't semantically important.
15
+ function skipWhitespaceNodes(e, next) {
16
+ while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) {
17
+ e = next(e);
18
+ }
19
+ return e;
20
+ }
21
+
22
+ function skipWhitespaceNodesBackwards(e) {
23
+ return skipWhitespaceNodes(e, function(e) {
24
+ return e.previousSibling;
25
+ });
26
+ }
27
+
28
+ function skipWhitespaceNodesForwards(e) {
29
+ return skipWhitespaceNodes(e, function(e) {
30
+ return e.nextSibling;
31
+ });
32
+ }
33
+
34
+ function hasParentInList(ed, e, list) {
35
+ return ed.dom.getParent(e, function(p) {
36
+ return tinymce.inArray(list, p) !== -1;
37
+ });
38
+ }
39
+
40
+ function isList(e) {
41
+ return e && (e.tagName === 'OL' || e.tagName === 'UL');
42
+ }
43
+
44
+ function splitNestedLists(element, dom) {
45
+ var tmp, nested, wrapItem;
46
+ tmp = skipWhitespaceNodesBackwards(element.lastChild);
47
+ while (isList(tmp)) {
48
+ nested = tmp;
49
+ tmp = skipWhitespaceNodesBackwards(nested.previousSibling);
50
+ }
51
+ if (nested) {
52
+ wrapItem = dom.create('li', { style: 'list-style-type: none;'});
53
+ dom.split(element, nested);
54
+ dom.insertAfter(wrapItem, nested);
55
+ wrapItem.appendChild(nested);
56
+ wrapItem.appendChild(nested);
57
+ element = wrapItem.previousSibling;
58
+ }
59
+ return element;
60
+ }
61
+
62
+ function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) {
63
+ e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs);
64
+ return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs);
65
+ }
66
+
67
+ function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) {
68
+ var prev = skipWhitespaceNodesBackwards(e.previousSibling);
69
+ if (prev) {
70
+ return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs);
71
+ } else {
72
+ return e;
73
+ }
74
+ }
75
+
76
+ function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) {
77
+ var next = skipWhitespaceNodesForwards(e.nextSibling);
78
+ if (next) {
79
+ return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs);
80
+ } else {
81
+ return e;
82
+ }
83
+ }
84
+
85
+ function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
86
+ if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
87
+ return merge(e1, e2, differentStylesMasterElement);
88
+ } else if (e1 && e1.tagName === 'LI' && isList(e2)) {
89
+ // Fix invalidly nested lists.
90
+ e1.appendChild(e2);
91
+ }
92
+ return e2;
93
+ }
94
+
95
+ function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) {
96
+ if (!e1 || !e2) {
97
+ return false;
98
+ } else if (e1.tagName === 'LI' && e2.tagName === 'LI') {
99
+ return e2.style.listStyleType === 'none' || containsOnlyAList(e2);
100
+ } else if (isList(e1)) {
101
+ return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2);
102
+ } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P';
103
+ }
104
+
105
+ function isListForIndent(e) {
106
+ var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild);
107
+ return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI));
108
+ }
109
+
110
+ function containsOnlyAList(e) {
111
+ var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild);
112
+ return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
113
+ }
114
+
115
+ function merge(e1, e2, masterElement) {
116
+ var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
117
+ if (e1.tagName === 'P') {
118
+ e1.appendChild(e1.ownerDocument.createElement('br'));
119
+ }
120
+ while (e2.firstChild) {
121
+ e1.appendChild(e2.firstChild);
122
+ }
123
+ if (masterElement) {
124
+ e1.style.listStyleType = masterElement.style.listStyleType;
125
+ }
126
+ e2.parentNode.removeChild(e2);
127
+ attemptMerge(lastOriginal, firstNew, false);
128
+ return e1;
129
+ }
130
+
131
+ function findItemToOperateOn(e, dom) {
132
+ var item;
133
+ if (!dom.is(e, 'li,ol,ul')) {
134
+ item = dom.getParent(e, 'li');
135
+ if (item) {
136
+ e = item;
137
+ }
138
+ }
139
+ return e;
140
+ }
141
+
142
+ tinymce.create('tinymce.plugins.Lists', {
143
+ init: function(ed) {
144
+ var LIST_TABBING = 'TABBING';
145
+ var LIST_EMPTY_ITEM = 'EMPTY';
146
+ var LIST_ESCAPE = 'ESCAPE';
147
+ var LIST_PARAGRAPH = 'PARAGRAPH';
148
+ var LIST_UNKNOWN = 'UNKNOWN';
149
+ var state = LIST_UNKNOWN;
150
+
151
+ function isTabInList(e) {
152
+ // Don't indent on Ctrl+Tab or Alt+Tab
153
+ return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) &&
154
+ (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList'));
155
+ }
156
+
157
+ function isOnLastListItem() {
158
+ var li = getLi();
159
+ var grandParent = li.parentNode.parentNode;
160
+ var isLastItem = li.parentNode.lastChild === li;
161
+ return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li);
162
+ }
163
+
164
+ function isNestedList(grandParent) {
165
+ if (isList(grandParent)) {
166
+ return grandParent.parentNode && grandParent.parentNode.tagName === 'LI';
167
+ } else {
168
+ return grandParent.tagName === 'LI';
169
+ }
170
+ }
171
+
172
+ function isInEmptyListItem() {
173
+ return ed.selection.isCollapsed() && isEmptyListItem(getLi());
174
+ }
175
+
176
+ function getLi() {
177
+ var n = ed.selection.getStart();
178
+ // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position
179
+ return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n;
180
+ }
181
+
182
+ function isEmptyListItem(li) {
183
+ var numChildren = li.childNodes.length;
184
+ if (li.tagName === 'LI') {
185
+ return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li));
186
+ }
187
+ return false;
188
+ }
189
+
190
+ function isEmptyIE9Li(li) {
191
+ // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these
192
+ var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'});
193
+ var isLastLi = li == lis[lis.length - 1];
194
+ var child = li.firstChild;
195
+ return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32));
196
+ }
197
+
198
+ function isEnter(e) {
199
+ return e.keyCode === tinymce.VK.ENTER;
200
+ }
201
+
202
+ function isEnterWithoutShift(e) {
203
+ return isEnter(e) && !e.shiftKey;
204
+ }
205
+
206
+ function getListKeyState(e) {
207
+ if (isTabInList(e)) {
208
+ return LIST_TABBING;
209
+ } else if (isEnterWithoutShift(e) && isOnLastListItem()) {
210
+ // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now
211
+ //return LIST_ESCAPE;
212
+ return LIST_UNKNOWN;
213
+ } else if (isEnterWithoutShift(e) && isInEmptyListItem()) {
214
+ return LIST_EMPTY_ITEM;
215
+ } else {
216
+ return LIST_UNKNOWN;
217
+ }
218
+ }
219
+
220
+ function cancelDefaultEvents(ed, e) {
221
+ // list escape is done manually using outdent as it does not create paragraphs correctly in td's
222
+ if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) {
223
+ Event.cancel(e);
224
+ }
225
+ }
226
+
227
+ function isCursorAtEndOfContainer() {
228
+ var range = ed.selection.getRng(true);
229
+ var startContainer = range.startContainer;
230
+ if (startContainer.nodeType == 3) {
231
+ var value = startContainer.nodeValue;
232
+ if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) {
233
+ // IE9 places a space on the end of the text in some cases so ignore last char
234
+ return (range.endOffset == value.length-1);
235
+ } else {
236
+ return (range.endOffset == value.length);
237
+ }
238
+ } else if (startContainer.nodeType == 1) {
239
+ return range.endOffset == startContainer.childNodes.length;
240
+ }
241
+ return false;
242
+ }
243
+
244
+ /*
245
+ If we are at the end of a list item surrounded with an element, pressing enter should create a
246
+ new list item instead without splitting the element e.g. don't want to create new P or H1 tag
247
+ */
248
+ function isEndOfListItem() {
249
+ var node = ed.selection.getNode();
250
+ var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
251
+ var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
252
+ return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
253
+ }
254
+
255
+ // Creates a new list item after the current selection's list item parent
256
+ function createNewLi(ed, e) {
257
+ if (isEnterWithoutShift(e) && isEndOfListItem()) {
258
+ var node = ed.selection.getNode();
259
+ var li = ed.dom.create("li");
260
+ var parentLi = ed.dom.getParent(node, 'li');
261
+ ed.dom.insertAfter(li, parentLi);
262
+
263
+ // Move caret to new list element.
264
+ if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) {
265
+ // Removed this line since it would create an odd <&nbsp;> tag and placing the caret inside an empty LI is handled and should be handled by the selection logic
266
+ //li.appendChild(ed.dom.create("&nbsp;")); // IE needs an element within the bullet point
267
+ ed.selection.setCursorLocation(li, 1);
268
+ } else {
269
+ ed.selection.setCursorLocation(li, 0);
270
+ }
271
+ e.preventDefault();
272
+ }
273
+ }
274
+
275
+ function imageJoiningListItem(ed, e) {
276
+ var prevSibling;
277
+
278
+ if (!tinymce.isGecko)
279
+ return;
280
+
281
+ var n = ed.selection.getStart();
282
+ if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG')
283
+ return;
284
+
285
+ function lastLI(node) {
286
+ var child = node.firstChild;
287
+ var li = null;
288
+ do {
289
+ if (!child)
290
+ break;
291
+
292
+ if (child.tagName === 'LI')
293
+ li = child;
294
+ } while (child = child.nextSibling);
295
+
296
+ return li;
297
+ }
298
+
299
+ function addChildren(parentNode, destination) {
300
+ while (parentNode.childNodes.length > 0)
301
+ destination.appendChild(parentNode.childNodes[0]);
302
+ }
303
+
304
+ // Check if there is a previous sibling
305
+ prevSibling = n.parentNode.previousSibling;
306
+ if (!prevSibling)
307
+ return;
308
+
309
+ var ul;
310
+ if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL')
311
+ ul = prevSibling;
312
+ else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL'))
313
+ ul = prevSibling.previousSibling;
314
+ else
315
+ return;
316
+
317
+ var li = lastLI(ul);
318
+
319
+ // move the caret to the end of the list item
320
+ var rng = ed.dom.createRng();
321
+ rng.setStart(li, 1);
322
+ rng.setEnd(li, 1);
323
+ ed.selection.setRng(rng);
324
+ ed.selection.collapse(true);
325
+
326
+ // save a bookmark at the end of the list item
327
+ var bookmark = ed.selection.getBookmark();
328
+
329
+ // copy the image an its text to the list item
330
+ var clone = n.parentNode.cloneNode(true);
331
+ if (clone.tagName === 'P' || clone.tagName === 'DIV')
332
+ addChildren(clone, li);
333
+ else
334
+ li.appendChild(clone);
335
+
336
+ // remove the old copy of the image
337
+ n.parentNode.parentNode.removeChild(n.parentNode);
338
+
339
+ // move the caret where we saved the bookmark
340
+ ed.selection.moveToBookmark(bookmark);
341
+ }
342
+
343
+ // fix the cursor position to ensure it is correct in IE
344
+ function setCursorPositionToOriginalLi(li) {
345
+ var list = ed.dom.getParent(li, 'ol,ul');
346
+ if (list != null) {
347
+ var lastLi = list.lastChild;
348
+ // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic
349
+ //lastLi.appendChild(ed.getDoc().createElement(''));
350
+ ed.selection.setCursorLocation(lastLi, 0);
351
+ }
352
+ }
353
+
354
+ this.ed = ed;
355
+ ed.addCommand('Indent', this.indent, this);
356
+ ed.addCommand('Outdent', this.outdent, this);
357
+ ed.addCommand('InsertUnorderedList', function() {
358
+ this.applyList('UL', 'OL');
359
+ }, this);
360
+ ed.addCommand('InsertOrderedList', function() {
361
+ this.applyList('OL', 'UL');
362
+ }, this);
363
+
364
+ ed.onInit.add(function() {
365
+ ed.editorCommands.addCommands({
366
+ 'outdent': function() {
367
+ var sel = ed.selection, dom = ed.dom;
368
+
369
+ function hasStyleIndent(n) {
370
+ n = dom.getParent(n, dom.isBlock);
371
+ return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0;
372
+ }
373
+
374
+ return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList');
375
+ }
376
+ }, 'state');
377
+ });
378
+
379
+ ed.onKeyUp.add(function(ed, e) {
380
+ if (state == LIST_TABBING) {
381
+ ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null);
382
+ state = LIST_UNKNOWN;
383
+ return Event.cancel(e);
384
+ } else if (state == LIST_EMPTY_ITEM) {
385
+ var li = getLi();
386
+ var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey;
387
+ ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null);
388
+ if (tinymce.isIE) {
389
+ setCursorPositionToOriginalLi(li);
390
+ }
391
+
392
+ return Event.cancel(e);
393
+ } else if (state == LIST_ESCAPE) {
394
+ if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) {
395
+ // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting.
396
+ // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after
397
+ // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag.
398
+ var n = ed.getDoc().createTextNode('\uFEFF');
399
+ ed.selection.getNode().appendChild(n);
400
+ } else if (tinymce.isIE9 || tinymce.isGecko) {
401
+ // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour
402
+ // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves
403
+ ed.execCommand('Outdent');
404
+ return Event.cancel(e);
405
+ }
406
+ }
407
+ });
408
+
409
+ function fixListItem(parent, reference) {
410
+ // a zero-sized non-breaking space is placed in the empty list item so that the nested list is
411
+ // displayed on the below line instead of next to it
412
+ var n = ed.getDoc().createTextNode('\uFEFF');
413
+ parent.insertBefore(n, reference);
414
+ ed.selection.setCursorLocation(n, 0);
415
+ // repaint to remove rendering artifact. only visible when creating new list
416
+ ed.execCommand('mceRepaint');
417
+ }
418
+
419
+ function fixIndentedListItemForGecko(ed, e) {
420
+ if (isEnter(e)) {
421
+ var li = getLi();
422
+ if (li) {
423
+ var parent = li.parentNode;
424
+ var grandParent = parent && parent.parentNode;
425
+ if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) {
426
+ fixListItem(grandParent, parent);
427
+ }
428
+ }
429
+ }
430
+ }
431
+
432
+ function fixIndentedListItemForIE8(ed, e) {
433
+ if (isEnter(e)) {
434
+ var li = getLi();
435
+ if (ed.dom.select('ul li', li).length === 1) {
436
+ var list = li.firstChild;
437
+ fixListItem(li, list);
438
+ }
439
+ }
440
+ }
441
+
442
+ function fixDeletingFirstCharOfList(ed, e) {
443
+ function listElements(li) {
444
+ var elements = [];
445
+ var walker = new tinymce.dom.TreeWalker(li.firstChild, li);
446
+ for (var node = walker.current(); node; node = walker.next()) {
447
+ if (ed.dom.is(node, 'ol,ul,li')) {
448
+ elements.push(node);
449
+ }
450
+ }
451
+ return elements;
452
+ }
453
+
454
+ if (e.keyCode == tinymce.VK.BACKSPACE) {
455
+ var li = getLi();
456
+ if (li) {
457
+ var list = ed.dom.getParent(li, 'ol,ul'),
458
+ rng = ed.selection.getRng();
459
+ if (list && list.firstChild === li && rng.startOffset == 0) {
460
+ var elements = listElements(li);
461
+ elements.unshift(li);
462
+ ed.execCommand("Outdent", false, elements);
463
+ ed.undoManager.add();
464
+ return Event.cancel(e);
465
+ }
466
+ }
467
+ }
468
+ }
469
+
470
+ function fixDeletingEmptyLiInWebkit(ed, e) {
471
+ var li = getLi();
472
+ if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) {
473
+ if (ed.dom.select('ul,ol', li).length === 1) {
474
+ var prevLi = li.previousSibling;
475
+ ed.dom.remove(ed.dom.select('br', li));
476
+ ed.dom.remove(li, true);
477
+ var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
478
+ if (textNodes.length === 1) {
479
+ var textNode = textNodes[0];
480
+ ed.selection.setCursorLocation(textNode, textNode.length);
481
+ }
482
+ ed.undoManager.add();
483
+ return Event.cancel(e);
484
+ }
485
+ }
486
+ }
487
+
488
+ ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); });
489
+ ed.onKeyDown.add(cancelDefaultEvents);
490
+ ed.onKeyDown.add(imageJoiningListItem);
491
+ ed.onKeyDown.add(createNewLi);
492
+
493
+ if (tinymce.isGecko) {
494
+ ed.onKeyUp.add(fixIndentedListItemForGecko);
495
+ }
496
+ if (tinymce.isIE8) {
497
+ ed.onKeyUp.add(fixIndentedListItemForIE8);
498
+ }
499
+ if (tinymce.isGecko || tinymce.isWebKit) {
500
+ ed.onKeyDown.add(fixDeletingFirstCharOfList);
501
+ }
502
+ if (tinymce.isWebKit) {
503
+ ed.onKeyDown.add(fixDeletingEmptyLiInWebkit);
504
+ }
505
+ },
506
+
507
+ applyList: function(targetListType, oppositeListType) {
508
+ var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
509
+ selectedBlocks = ed.selection.getSelectedBlocks();
510
+
511
+ function cleanupBr(e) {
512
+ if (e && e.tagName === 'BR') {
513
+ dom.remove(e);
514
+ }
515
+ }
516
+
517
+ function makeList(element) {
518
+ var list = dom.create(targetListType), li;
519
+
520
+ function adjustIndentForNewList(element) {
521
+ // If there's a margin-left, outdent one level to account for the extra list margin.
522
+ if (element.style.marginLeft || element.style.paddingLeft) {
523
+ t.adjustPaddingFunction(false)(element);
524
+ }
525
+ }
526
+
527
+ if (element.tagName === 'LI') {
528
+ // No change required.
529
+ } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') {
530
+ processBrs(element, function(startSection, br) {
531
+ doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode);
532
+ li = startSection.parentNode;
533
+ adjustIndentForNewList(li);
534
+ cleanupBr(br);
535
+ });
536
+ if (li) {
537
+ if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) {
538
+ dom.split(li.parentNode.parentNode, li.parentNode);
539
+ }
540
+ attemptMergeWithAdjacent(li.parentNode, true);
541
+ }
542
+ return;
543
+ } else {
544
+ // Put the list around the element.
545
+ li = dom.create('li');
546
+ dom.insertAfter(li, element);
547
+ li.appendChild(element);
548
+ adjustIndentForNewList(element);
549
+ element = li;
550
+ }
551
+ dom.insertAfter(list, element);
552
+ list.appendChild(element);
553
+ attemptMergeWithAdjacent(list, true);
554
+ applied.push(element);
555
+ }
556
+
557
+ function doWrapList(start, end, template) {
558
+ var li, n = start, tmp;
559
+ while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) {
560
+ start = dom.split(start.parentNode, start.previousSibling);
561
+ start = start.nextSibling;
562
+ n = start;
563
+ }
564
+ if (template) {
565
+ li = template.cloneNode(true);
566
+ start.parentNode.insertBefore(li, start);
567
+ while (li.firstChild) dom.remove(li.firstChild);
568
+ li = dom.rename(li, 'li');
569
+ } else {
570
+ li = dom.create('li');
571
+ start.parentNode.insertBefore(li, start);
572
+ }
573
+ while (n && n != end) {
574
+ tmp = n.nextSibling;
575
+ li.appendChild(n);
576
+ n = tmp;
577
+ }
578
+ if (li.childNodes.length === 0) {
579
+ li.innerHTML = '<br _mce_bogus="1" />';
580
+ }
581
+ makeList(li);
582
+ }
583
+
584
+ function processBrs(element, callback) {
585
+ var startSection, previousBR, END_TO_START = 3, START_TO_END = 1,
586
+ breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl';
587
+
588
+ function isAnyPartSelected(start, end) {
589
+ var r = dom.createRng(), sel;
590
+ bookmark.keep = true;
591
+ ed.selection.moveToBookmark(bookmark);
592
+ bookmark.keep = false;
593
+ sel = ed.selection.getRng(true);
594
+ if (!end) {
595
+ end = start.parentNode.lastChild;
596
+ }
597
+ r.setStartBefore(start);
598
+ r.setEndAfter(end);
599
+ return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0);
600
+ }
601
+
602
+ function nextLeaf(br) {
603
+ if (br.nextSibling)
604
+ return br.nextSibling;
605
+ if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot())
606
+ return nextLeaf(br.parentNode);
607
+ }
608
+
609
+ // Split on BRs within the range and process those.
610
+ startSection = element.firstChild;
611
+ // First mark the BRs that have any part of the previous section selected.
612
+ var trailingContentSelected = false;
613
+ each(dom.select(breakElements, element), function(br) {
614
+ if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
615
+ return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
616
+ }
617
+ if (isAnyPartSelected(startSection, br)) {
618
+ dom.addClass(br, '_mce_tagged_br');
619
+ startSection = nextLeaf(br);
620
+ }
621
+ });
622
+ trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined));
623
+ startSection = element.firstChild;
624
+ each(dom.select(breakElements, element), function(br) {
625
+ // Got a section from start to br.
626
+ var tmp = nextLeaf(br);
627
+ if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
628
+ return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
629
+ }
630
+ if (dom.hasClass(br, '_mce_tagged_br')) {
631
+ callback(startSection, br, previousBR);
632
+ previousBR = null;
633
+ } else {
634
+ previousBR = br;
635
+ }
636
+ startSection = tmp;
637
+ });
638
+ if (trailingContentSelected) {
639
+ callback(startSection, undefined, previousBR);
640
+ }
641
+ }
642
+
643
+ function wrapList(element) {
644
+ processBrs(element, function(startSection, br, previousBR) {
645
+ // Need to indent this part
646
+ doWrapList(startSection, br);
647
+ cleanupBr(br);
648
+ cleanupBr(previousBR);
649
+ });
650
+ }
651
+
652
+ function changeList(element) {
653
+ if (tinymce.inArray(applied, element) !== -1) {
654
+ return;
655
+ }
656
+ if (element.parentNode.tagName === oppositeListType) {
657
+ dom.split(element.parentNode, element);
658
+ makeList(element);
659
+ attemptMergeWithNext(element.parentNode, false);
660
+ }
661
+ applied.push(element);
662
+ }
663
+
664
+ function convertListItemToParagraph(element) {
665
+ var child, nextChild, mergedElement, splitLast;
666
+ if (tinymce.inArray(applied, element) !== -1) {
667
+ return;
668
+ }
669
+ element = splitNestedLists(element, dom);
670
+ while (dom.is(element.parentNode, 'ol,ul,li')) {
671
+ dom.split(element.parentNode, element);
672
+ }
673
+ // Push the original element we have from the selection, not the renamed one.
674
+ applied.push(element);
675
+ element = dom.rename(element, 'p');
676
+ mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines);
677
+ if (mergedElement === element) {
678
+ // Now split out any block elements that can't be contained within a P.
679
+ // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each)
680
+ child = element.firstChild;
681
+ while (child) {
682
+ if (dom.isBlock(child)) {
683
+ child = dom.split(child.parentNode, child);
684
+ splitLast = true;
685
+ nextChild = child.nextSibling && child.nextSibling.firstChild;
686
+ } else {
687
+ nextChild = child.nextSibling;
688
+ if (splitLast && child.tagName === 'BR') {
689
+ dom.remove(child);
690
+ }
691
+ splitLast = false;
692
+ }
693
+ child = nextChild;
694
+ }
695
+ }
696
+ }
697
+
698
+ each(selectedBlocks, function(e) {
699
+ e = findItemToOperateOn(e, dom);
700
+ if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) {
701
+ hasOppositeType = true;
702
+ } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) {
703
+ hasSameType = true;
704
+ } else {
705
+ hasNonList = true;
706
+ }
707
+ });
708
+
709
+ if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) {
710
+ actions = {
711
+ 'LI': changeList,
712
+ 'H1': makeList,
713
+ 'H2': makeList,
714
+ 'H3': makeList,
715
+ 'H4': makeList,
716
+ 'H5': makeList,
717
+ 'H6': makeList,
718
+ 'P': makeList,
719
+ 'BODY': makeList,
720
+ 'DIV': selectedBlocks.length > 1 ? makeList : wrapList,
721
+ defaultAction: wrapList,
722
+ elements: this.selectedBlocks()
723
+ };
724
+ } else {
725
+ actions = {
726
+ defaultAction: convertListItemToParagraph,
727
+ elements: this.selectedBlocks(),
728
+ processEvenIfEmpty: true
729
+ };
730
+ }
731
+ this.process(actions);
732
+ },
733
+
734
+ indent: function() {
735
+ var ed = this.ed, dom = ed.dom, indented = [];
736
+
737
+ function createWrapItem(element) {
738
+ var wrapItem = dom.create('li', { style: 'list-style-type: none;'});
739
+ dom.insertAfter(wrapItem, element);
740
+ return wrapItem;
741
+ }
742
+
743
+ function createWrapList(element) {
744
+ var wrapItem = createWrapItem(element),
745
+ list = dom.getParent(element, 'ol,ul'),
746
+ listType = list.tagName,
747
+ listStyle = dom.getStyle(list, 'list-style-type'),
748
+ attrs = {},
749
+ wrapList;
750
+ if (listStyle !== '') {
751
+ attrs.style = 'list-style-type: ' + listStyle + ';';
752
+ }
753
+ wrapList = dom.create(listType, attrs);
754
+ wrapItem.appendChild(wrapList);
755
+ return wrapList;
756
+ }
757
+
758
+ function indentLI(element) {
759
+ if (!hasParentInList(ed, element, indented)) {
760
+ element = splitNestedLists(element, dom);
761
+ var wrapList = createWrapList(element);
762
+ wrapList.appendChild(element);
763
+ attemptMergeWithAdjacent(wrapList.parentNode, false);
764
+ attemptMergeWithAdjacent(wrapList, false);
765
+ indented.push(element);
766
+ }
767
+ }
768
+
769
+ this.process({
770
+ 'LI': indentLI,
771
+ defaultAction: this.adjustPaddingFunction(true),
772
+ elements: this.selectedBlocks()
773
+ });
774
+
775
+ },
776
+
777
+ outdent: function(ui, elements) {
778
+ var t = this, ed = t.ed, dom = ed.dom, outdented = [];
779
+
780
+ function outdentLI(element) {
781
+ var listElement, targetParent, align;
782
+ if (!hasParentInList(ed, element, outdented)) {
783
+ if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') {
784
+ return t.adjustPaddingFunction(false)(element);
785
+ }
786
+ align = dom.getStyle(element, 'text-align', true);
787
+ if (align === 'center' || align === 'right') {
788
+ dom.setStyle(element, 'text-align', 'left');
789
+ return;
790
+ }
791
+ element = splitNestedLists(element, dom);
792
+ listElement = element.parentNode;
793
+ targetParent = element.parentNode.parentNode;
794
+ if (targetParent.tagName === 'P') {
795
+ dom.split(targetParent, element.parentNode);
796
+ } else {
797
+ dom.split(listElement, element);
798
+ if (targetParent.tagName === 'LI') {
799
+ // Nested list, need to split the LI and go back out to the OL/UL element.
800
+ dom.split(targetParent, element);
801
+ } else if (!dom.is(targetParent, 'ol,ul')) {
802
+ dom.rename(element, 'p');
803
+ }
804
+ }
805
+ outdented.push(element);
806
+ }
807
+ }
808
+
809
+ var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks();
810
+ this.process({
811
+ 'LI': outdentLI,
812
+ defaultAction: this.adjustPaddingFunction(false),
813
+ elements: listElements
814
+ });
815
+
816
+ each(outdented, attemptMergeWithAdjacent);
817
+ },
818
+
819
+ process: function(actions) {
820
+ var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r;
821
+
822
+ function isEmptyElement(element) {
823
+ var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) {
824
+ return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark'
825
+ || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == ''));
826
+ });
827
+ return excludeBrsAndBookmarks.length === 0;
828
+ }
829
+
830
+ function processElement(element) {
831
+ dom.removeClass(element, '_mce_act_on');
832
+ if (!element || element.nodeType !== 1 || ! actions.processEvenIfEmpty && selectedBlocks.length > 1 && isEmptyElement(element)) {
833
+ return;
834
+ }
835
+ element = findItemToOperateOn(element, dom);
836
+ var action = actions[element.tagName];
837
+ if (!action) {
838
+ action = actions.defaultAction;
839
+ }
840
+ action(element);
841
+ }
842
+
843
+ function recurse(element) {
844
+ t.splitSafeEach(element.childNodes, processElement, true);
845
+ }
846
+
847
+ function brAtEdgeOfSelection(container, offset) {
848
+ return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length &&
849
+ container.childNodes[offset].tagName === 'BR';
850
+ }
851
+
852
+ function isInTable() {
853
+ var n = sel.getNode();
854
+ var p = dom.getParent(n, 'td');
855
+ return p !== null;
856
+ }
857
+
858
+ selectedBlocks = actions.elements;
859
+
860
+ r = sel.getRng(true);
861
+ if (!r.collapsed) {
862
+ if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) {
863
+ r.setEnd(r.endContainer, r.endOffset - 1);
864
+ sel.setRng(r);
865
+ }
866
+ if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) {
867
+ r.setStart(r.startContainer, r.startOffset + 1);
868
+ sel.setRng(r);
869
+ }
870
+ }
871
+
872
+
873
+ if (tinymce.isIE8) {
874
+ // append a zero sized nbsp so that caret is restored correctly using bookmark
875
+ var s = t.ed.selection.getNode();
876
+ if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) {
877
+ var i = t.ed.getDoc().createTextNode('\uFEFF');
878
+ s.appendChild(i);
879
+ }
880
+ }
881
+
882
+ bookmark = sel.getBookmark();
883
+ actions.OL = actions.UL = recurse;
884
+ t.splitSafeEach(selectedBlocks, processElement);
885
+ sel.moveToBookmark(bookmark);
886
+ bookmark = null;
887
+
888
+ // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6
889
+ if (!isInTable()) {
890
+ // Avoids table or image handles being left behind in Firefox.
891
+ t.ed.execCommand('mceRepaint');
892
+ }
893
+ },
894
+
895
+ splitSafeEach: function(elements, f, forceClassBase) {
896
+ if (forceClassBase ||
897
+ (tinymce.isGecko &&
898
+ (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
899
+ /Firefox\/3\.[0-4]/.test(navigator.userAgent)))) {
900
+ this.classBasedEach(elements, f);
901
+ } else {
902
+ each(elements, f);
903
+ }
904
+ },
905
+
906
+ classBasedEach: function(elements, f) {
907
+ var dom = this.ed.dom, nodes, element;
908
+ // Mark nodes
909
+ each(elements, function(element) {
910
+ dom.addClass(element, '_mce_act_on');
911
+ });
912
+ nodes = dom.select('._mce_act_on');
913
+ while (nodes.length > 0) {
914
+ element = nodes.shift();
915
+ dom.removeClass(element, '_mce_act_on');
916
+ f(element);
917
+ nodes = dom.select('._mce_act_on');
918
+ }
919
+ },
920
+
921
+ adjustPaddingFunction: function(isIndent) {
922
+ var indentAmount, indentUnits, ed = this.ed;
923
+ indentAmount = ed.settings.indentation;
924
+ indentUnits = /[a-z%]+/i.exec(indentAmount);
925
+ indentAmount = parseInt(indentAmount, 10);
926
+ return function(element) {
927
+ var currentIndent, newIndentAmount;
928
+ currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10);
929
+ if (isIndent) {
930
+ newIndentAmount = currentIndent + indentAmount;
931
+ } else {
932
+ newIndentAmount = currentIndent - indentAmount;
933
+ }
934
+ ed.dom.setStyle(element, 'padding-left', '');
935
+ ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : '');
936
+ };
937
+ },
938
+
939
+ selectedBlocks: function() {
940
+ var ed = this.ed, selectedBlocks = ed.selection.getSelectedBlocks();
941
+ return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
942
+ },
943
+
944
+ getInfo: function() {
945
+ return {
946
+ longname : 'Lists',
947
+ author : 'Moxiecode Systems AB',
948
+ authorurl : 'http://tinymce.moxiecode.com',
949
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists',
950
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
951
+ };
952
+ }
953
+ });
954
+ tinymce.PluginManager.add("lists", tinymce.plugins.Lists);
955
+ }());
js/tinymce/jscripts/tiny_mce/plugins/media/langs/en_dlg.js CHANGED
@@ -1 +1 @@
1
- tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" });
1
+ tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" });
js/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js CHANGED
@@ -1,53 +1,53 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- tinymce.create('tinymce.plugins.Preview', {
13
- init : function(ed, url) {
14
- var t = this, css = tinymce.explode(ed.settings.content_css);
15
-
16
- t.editor = ed;
17
-
18
- // Force absolute CSS urls
19
- tinymce.each(css, function(u, k) {
20
- css[k] = ed.documentBaseURI.toAbsolute(u);
21
- });
22
-
23
- ed.addCommand('mcePreview', function() {
24
- ed.windowManager.open({
25
- file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"),
26
- width : parseInt(ed.getParam("plugin_preview_width", "550")),
27
- height : parseInt(ed.getParam("plugin_preview_height", "600")),
28
- resizable : "yes",
29
- scrollbars : "yes",
30
- popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"),
31
- inline : ed.getParam("plugin_preview_inline", 1)
32
- }, {
33
- base : ed.documentBaseURI.getURI()
34
- });
35
- });
36
-
37
- ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'});
38
- },
39
-
40
- getInfo : function() {
41
- return {
42
- longname : 'Preview',
43
- author : 'Moxiecode Systems AB',
44
- authorurl : 'http://tinymce.moxiecode.com',
45
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
46
- version : tinymce.majorVersion + "." + tinymce.minorVersion
47
- };
48
- }
49
- });
50
-
51
- // Register plugin
52
- tinymce.PluginManager.add('preview', tinymce.plugins.Preview);
53
  })();
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ tinymce.create('tinymce.plugins.Preview', {
13
+ init : function(ed, url) {
14
+ var t = this, css = tinymce.explode(ed.settings.content_css);
15
+
16
+ t.editor = ed;
17
+
18
+ // Force absolute CSS urls
19
+ tinymce.each(css, function(u, k) {
20
+ css[k] = ed.documentBaseURI.toAbsolute(u);
21
+ });
22
+
23
+ ed.addCommand('mcePreview', function() {
24
+ ed.windowManager.open({
25
+ file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"),
26
+ width : parseInt(ed.getParam("plugin_preview_width", "550")),
27
+ height : parseInt(ed.getParam("plugin_preview_height", "600")),
28
+ resizable : "yes",
29
+ scrollbars : "yes",
30
+ popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"),
31
+ inline : ed.getParam("plugin_preview_inline", 1)
32
+ }, {
33
+ base : ed.documentBaseURI.getURI()
34
+ });
35
+ });
36
+
37
+ ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'});
38
+ },
39
+
40
+ getInfo : function() {
41
+ return {
42
+ longname : 'Preview',
43
+ author : 'Moxiecode Systems AB',
44
+ authorurl : 'http://tinymce.moxiecode.com',
45
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
46
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
47
+ };
48
+ }
49
+ });
50
+
51
+ // Register plugin
52
+ tinymce.PluginManager.add('preview', tinymce.plugins.Preview);
53
  })();
js/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js CHANGED
@@ -1 +1 @@
1
- tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
1
+ tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
js/tinymce/jscripts/tiny_mce/plugins/style/props.htm CHANGED
@@ -1,845 +1,845 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>{#style_dlg.title}</title>
5
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
- <script type="text/javascript" src="../../utils/editable_selects.js"></script>
8
- <script type="text/javascript" src="../../utils/form_utils.js"></script>
9
- <script type="text/javascript" src="js/props.js"></script>
10
- <link href="css/props.css" rel="stylesheet" type="text/css" />
11
- </head>
12
-
13
- <body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
14
- <span id="app_title" style="display:none">{#style_dlg.title}</span>
15
- <form onsubmit="updateAction();return false;" action="#">
16
- <div class="tabs">
17
- <ul>
18
- <li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
19
- <li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
20
- <li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
21
- <li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
22
- <li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
23
- <li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
24
- <li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
25
- </ul>
26
- </div>
27
-
28
- <div class="panel_wrapper">
29
- <div id="text_panel" class="panel current">
30
- <fieldset>
31
- <legend>{#style_dlg.text}</legend>
32
- <table role="presentation" border="0" width="100%">
33
- <tr>
34
- <td><label for="text_font">{#style_dlg.text_font}</label></td>
35
- <td colspan="3">
36
- <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
37
- </td>
38
- </tr>
39
- <tr>
40
- <td><label for="text_size">{#style_dlg.text_size}</label></td>
41
- <td>
42
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
43
- <tr>
44
- <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
45
- <td>&nbsp;</td>
46
- <td>
47
- <label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
48
- <select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
49
- </td>
50
- </tr>
51
- </table>
52
- </td>
53
- <td><label for="text_weight">{#style_dlg.text_weight}</label></td>
54
- <td>
55
- <select id="text_weight" name="text_weight"></select>
56
- </td>
57
- </tr>
58
- <tr>
59
- <td><label for="text_style">{#style_dlg.text_style}</label></td>
60
- <td>
61
- <select id="text_style" name="text_style" class="mceEditableSelect"></select>
62
- </td>
63
- <td><label for="text_variant">{#style_dlg.text_variant}</label></td>
64
- <td>
65
- <select id="text_variant" name="text_variant"></select>
66
- </td>
67
- </tr>
68
- <tr>
69
- <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
70
- <td>
71
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
72
- <tr>
73
- <td>
74
- <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
75
- </td>
76
- <td>&nbsp;</td>
77
- <td>
78
- <label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
79
- <select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
80
- </td>
81
- </tr>
82
- </table>
83
- </td>
84
- <td><label for="text_case">{#style_dlg.text_case}</label></td>
85
- <td>
86
- <select id="text_case" name="text_case"></select>
87
- </td>
88
- </tr>
89
- <tr>
90
- <td><label for="text_color">{#style_dlg.text_color}</label></td>
91
- <td colspan="2">
92
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
93
- <tr>
94
- <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
95
- <td id="text_color_pickcontainer">&nbsp;</td>
96
- </tr>
97
- </table>
98
- </td>
99
- </tr>
100
- <tr>
101
- <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
102
- <td colspan="2">
103
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
104
- <tr>
105
- <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
106
- <td><label for="text_underline">{#style_dlg.text_underline}</label></td>
107
- </tr>
108
- <tr>
109
- <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
110
- <td><label for="text_overline">{#style_dlg.text_overline}</label></td>
111
- </tr>
112
- <tr>
113
- <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
114
- <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
115
- </tr>
116
- <tr>
117
- <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
118
- <td><label for="text_blink">{#style_dlg.text_blink}</label></td>
119
- </tr>
120
- <tr>
121
- <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
122
- <td><label for="text_none">{#style_dlg.text_none}</label></td>
123
- </tr>
124
- </table>
125
- </td>
126
- </tr>
127
- </table>
128
- </fieldset>
129
- </div>
130
-
131
- <div id="background_panel" class="panel">
132
- <fieldset>
133
- <legend>{#style_dlg.background}</legend>
134
- <table role="presentation" border="0">
135
- <tr>
136
- <td><label for="background_color">{#style_dlg.background_color}</label></td>
137
- <td>
138
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
139
- <tr>
140
- <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
141
- <td id="background_color_pickcontainer">&nbsp;</td>
142
- </tr>
143
- </table>
144
- </td>
145
- </tr>
146
-
147
- <tr>
148
- <td><label for="background_image">{#style_dlg.background_image}</label></td>
149
- <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
150
- <tr>
151
- <td><input id="background_image" name="background_image" type="text" /></td>
152
- <td id="background_image_browser">&nbsp;</td>
153
- </tr>
154
- </table>
155
- </td>
156
- </tr>
157
-
158
- <tr>
159
- <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
160
- <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
161
- </tr>
162
-
163
- <tr>
164
- <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
165
- <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
166
- </tr>
167
-
168
- <tr>
169
- <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
170
- <td>
171
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
172
- <tr>
173
- <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
174
- <td>&nbsp;</td>
175
- <td>
176
- <label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
177
- <select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
178
- </td>
179
- </tr>
180
- </table>
181
- </td>
182
- </tr>
183
-
184
- <tr>
185
- <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
186
- <td>
187
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
188
- <tr>
189
- <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
190
- <td>&nbsp;</td>
191
- <td>
192
-
193
- <label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
194
- <select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
195
- </tr>
196
- </table>
197
- </td>
198
- </tr>
199
- </table>
200
- </fieldset>
201
- </div>
202
-
203
- <div id="block_panel" class="panel">
204
- <fieldset>
205
- <legend>{#style_dlg.block}</legend>
206
- <table role="presentation" border="0">
207
- <tr>
208
- <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
209
- <td>
210
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
211
- <tr>
212
- <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
213
- <td>&nbsp;</td>
214
- <td>
215
- <label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
216
- <select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
217
- </td>
218
- </tr>
219
- </table>
220
- </td>
221
- </tr>
222
-
223
- <tr>
224
- <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
225
- <td>
226
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
227
- <tr>
228
- <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
229
- <td>&nbsp;</td>
230
- <td>
231
- <label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
232
- <select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
233
- </td>
234
- </tr>
235
- </table>
236
- </td>
237
- </tr>
238
-
239
- <tr>
240
- <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
241
- <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
242
- </tr>
243
-
244
- <tr>
245
- <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
246
- <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
247
- </tr>
248
-
249
- <tr>
250
- <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
251
- <td>
252
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
253
- <tr>
254
- <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
255
- <td>&nbsp;</td>
256
- <td>
257
- <label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
258
-
259
- <select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
260
- </td>
261
- </tr>
262
- </table>
263
- </td>
264
- </tr>
265
-
266
- <tr>
267
- <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
268
- <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
269
- </tr>
270
-
271
- <tr>
272
- <td><label for="block_display">{#style_dlg.block_display}</label></td>
273
- <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
274
- </tr>
275
- </table>
276
- </fieldset>
277
- </div>
278
-
279
- <div id="box_panel" class="panel">
280
- <fieldset>
281
- <legend>{#style_dlg.box}</legend>
282
- <table role="presentation" border="0">
283
- <tr>
284
- <td><label for="box_width">{#style_dlg.box_width}</label></td>
285
- <td>
286
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
287
- <tr>
288
- <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
289
- <td>&nbsp;</td>
290
- <td>
291
- <label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
292
- <select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
293
- </td>
294
- </tr>
295
- </table>
296
- </td>
297
- <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{#style_dlg.box_float}</label></td>
298
- <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
299
- </tr>
300
-
301
- <tr>
302
- <td><label for="box_height">{#style_dlg.box_height}</label></td>
303
- <td>
304
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
305
- <tr>
306
- <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
307
- <td>&nbsp;</td>
308
- <td>
309
- <label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
310
- <select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
311
- </td>
312
- </tr>
313
- </table>
314
- </td>
315
- <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{#style_dlg.box_clear}</label></td>
316
- <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
317
- </tr>
318
- </table>
319
- </fieldset>
320
-
321
- <div style="float: left; width: 49%">
322
- <fieldset>
323
- <legend>{#style_dlg.padding}</legend>
324
-
325
- <table role="presentation" border="0">
326
- <tr>
327
- <td>&nbsp;</td>
328
- <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
329
- </tr>
330
- <tr>
331
- <td><label for="box_padding_top">{#style_dlg.top}</label></td>
332
- <td>
333
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
334
- <tr>
335
- <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
336
- <td>&nbsp;</td>
337
- <td>
338
- <label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
339
- <select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
340
- </td>
341
- </tr>
342
- </table>
343
- </td>
344
- </tr>
345
- <tr>
346
- <td><label for="box_padding_right">{#style_dlg.right}</label></td>
347
- <td>
348
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
349
- <tr>
350
- <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
351
- <td>&nbsp;</td>
352
- <td>
353
- <label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
354
- <select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
355
- </td>
356
- </tr>
357
- </table>
358
- </td>
359
- </tr>
360
- <tr>
361
- <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
362
- <td>
363
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
364
- <tr>
365
- <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
366
- <td>&nbsp;</td>
367
- <td>
368
- <label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
369
- <select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
370
- </td>
371
- </tr>
372
- </table>
373
- </td>
374
- </tr>
375
- <tr>
376
- <td><label for="box_padding_left">{#style_dlg.left}</label></td>
377
- <td>
378
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
379
- <tr>
380
- <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
381
- <td>&nbsp;</td>
382
- <td>
383
- <label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
384
- <select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
385
- </td>
386
- </tr>
387
- </table>
388
- </td>
389
- </tr>
390
- </table>
391
- </fieldset>
392
- </div>
393
-
394
- <div style="float: right; width: 49%">
395
- <fieldset>
396
- <legend>{#style_dlg.margin}</legend>
397
-
398
- <table role="presentation" border="0">
399
- <tr>
400
- <td>&nbsp;</td>
401
- <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
402
- </tr>
403
- <tr>
404
- <td><label for="box_margin_top">{#style_dlg.top}</label></td>
405
- <td>
406
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
407
- <tr>
408
- <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
409
- <td>&nbsp;</td>
410
- <td>
411
- <label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
412
- <select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
413
- </td>
414
- </tr>
415
- </table>
416
- </td>
417
- </tr>
418
- <tr>
419
- <td><label for="box_margin_right">{#style_dlg.right}</label></td>
420
- <td>
421
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
422
- <tr>
423
- <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
424
- <td>&nbsp;</td>
425
- <td>
426
- <label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
427
- <select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
428
- </td>
429
- </tr>
430
- </table>
431
- </td>
432
- </tr>
433
- <tr>
434
- <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
435
- <td>
436
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
437
- <tr>
438
- <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
439
- <td>&nbsp;</td>
440
- <td>
441
- <label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
442
- <select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
443
- </td>
444
- </tr>
445
- </table>
446
- </td>
447
- </tr>
448
- <tr>
449
- <td><label for="box_margin_left">{#style_dlg.left}</label></td>
450
- <td>
451
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
452
- <tr>
453
- <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
454
- <td>&nbsp;</td>
455
- <td>
456
- <label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
457
- <select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
458
- </td>
459
- </tr>
460
- </table>
461
- </td>
462
- </tr>
463
- </table>
464
- </fieldset>
465
- </div>
466
- <br style="clear: both" />
467
- </div>
468
-
469
- <div id="border_panel" class="panel">
470
- <fieldset>
471
- <legend>{#style_dlg.border}</legend>
472
- <table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
473
- <tr>
474
- <td class="tdelim">&nbsp;</td>
475
- <td class="tdelim delim">&nbsp;</td>
476
- <td class="tdelim">{#style_dlg.style}</td>
477
- <td class="tdelim delim">&nbsp;</td>
478
- <td class="tdelim">{#style_dlg.width}</td>
479
- <td class="tdelim delim">&nbsp;</td>
480
- <td class="tdelim">{#style_dlg.color}</td>
481
- </tr>
482
-
483
- <tr>
484
- <td>&nbsp;</td>
485
- <td class="delim">&nbsp;</td>
486
- <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
487
- <td class="delim">&nbsp;</td>
488
- <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
489
- <td class="delim">&nbsp;</td>
490
- <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
491
- </tr>
492
-
493
- <tr>
494
- <td>{#style_dlg.top}</td>
495
- <td class="delim">&nbsp;</td>
496
- <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
497
- <td class="delim">&nbsp;</td>
498
- <td>
499
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
500
- <tr>
501
- <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
502
- <td>&nbsp;</td>
503
- <td>
504
- <label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
505
- <select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
506
- </td>
507
- </tr>
508
- </table>
509
- </td>
510
- <td class="delim">&nbsp;</td>
511
- <td>
512
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
513
- <tr>
514
- <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
515
- <td id="border_color_top_pickcontainer">&nbsp;</td>
516
- </tr>
517
- </table>
518
- </td>
519
- </tr>
520
-
521
- <tr>
522
- <td>{#style_dlg.right}</td>
523
- <td class="delim">&nbsp;</td>
524
- <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
525
- <td class="delim">&nbsp;</td>
526
- <td>
527
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
528
- <tr>
529
- <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
530
- <td>&nbsp;</td>
531
- <td>
532
- <label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
533
- <select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
534
- </td>
535
- </tr>
536
- </table>
537
- </td>
538
- <td class="delim">&nbsp;</td>
539
- <td>
540
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
541
- <tr>
542
- <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
543
- <td id="border_color_right_pickcontainer">&nbsp;</td>
544
- </tr>
545
- </table>
546
- </td>
547
- </tr>
548
-
549
- <tr>
550
- <td>{#style_dlg.bottom}</td>
551
- <td class="delim">&nbsp;</td>
552
- <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
553
- <td class="delim">&nbsp;</td>
554
- <td>
555
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
556
- <tr>
557
- <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
558
- <td>&nbsp;</td>
559
- <td>
560
- <label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
561
- <select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
562
- </td>
563
- </tr>
564
- </table>
565
- </td>
566
- <td class="delim">&nbsp;</td>
567
- <td>
568
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
569
- <tr>
570
- <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
571
- <td id="border_color_bottom_pickcontainer">&nbsp;</td>
572
- </tr>
573
- </table>
574
- </td>
575
- </tr>
576
-
577
- <tr>
578
- <td>{#style_dlg.left}</td>
579
- <td class="delim">&nbsp;</td>
580
- <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
581
- <td class="delim">&nbsp;</td>
582
- <td>
583
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
584
- <tr>
585
- <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
586
- <td>&nbsp;</td>
587
- <td>
588
- <label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
589
- <select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
590
- </td>
591
- </tr>
592
- </table>
593
- </td>
594
- <td class="delim">&nbsp;</td>
595
- <td>
596
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
597
- <tr>
598
- <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
599
- <td id="border_color_left_pickcontainer">&nbsp;</td>
600
- </tr>
601
- </table>
602
- </td>
603
- </tr>
604
- </table>
605
- </fieldset>
606
- </div>
607
-
608
- <div id="list_panel" class="panel">
609
- <fieldset>
610
- <legend>{#style_dlg.list}</legend>
611
- <table role="presentation" border="0">
612
- <tr>
613
- <td><label for="list_type">{#style_dlg.list_type}</label></td>
614
- <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
615
- </tr>
616
-
617
- <tr>
618
- <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
619
- <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
620
- </tr>
621
-
622
- <tr>
623
- <td><label for="list_position">{#style_dlg.position}</label></td>
624
- <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
625
- </tr>
626
- </table>
627
- </fieldset>
628
- </div>
629
-
630
- <div id="positioning_panel" class="panel">
631
- <fieldset>
632
- <legend>{#style_dlg.position}</legend>
633
- <table role="presentation" border="0">
634
- <tr>
635
- <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
636
- <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
637
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{#style_dlg.visibility}</label></td>
638
- <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
639
- </tr>
640
-
641
- <tr>
642
- <td><label for="positioning_width">{#style_dlg.width}</label></td>
643
- <td>
644
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
645
- <tr>
646
- <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
647
- <td>&nbsp;</td>
648
- <td>
649
- <label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
650
- <select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
651
- </td>
652
- </tr>
653
- </table>
654
- </td>
655
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{#style_dlg.zindex}</label></td>
656
- <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
657
- </tr>
658
-
659
- <tr>
660
- <td><label for="positioning_height">{#style_dlg.height}</label></td>
661
- <td>
662
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
663
- <tr>
664
- <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
665
- <td>&nbsp;</td>
666
- <td>
667
- <label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
668
- <select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
669
- </td>
670
- </tr>
671
- </table>
672
- </td>
673
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{#style_dlg.overflow}</label></td>
674
- <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
675
- </tr>
676
- </table>
677
- </fieldset>
678
-
679
- <div style="float: left; width: 49%">
680
- <fieldset>
681
- <legend>{#style_dlg.placement}</legend>
682
-
683
- <table role="presentation" border="0">
684
- <tr>
685
- <td>&nbsp;</td>
686
- <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
687
- </tr>
688
- <tr>
689
- <td>{#style_dlg.top}</td>
690
- <td>
691
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
692
- <tr>
693
- <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
694
- <td>&nbsp;</td>
695
- <td>
696
- <label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
697
- <select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
698
- </td>
699
- </tr>
700
- </table>
701
- </td>
702
- </tr>
703
- <tr>
704
- <td>{#style_dlg.right}</td>
705
- <td>
706
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
707
- <tr>
708
- <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
709
- <td>&nbsp;</td>
710
- <td>
711
- <label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
712
- <select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
713
- </td>
714
- </tr>
715
- </table>
716
- </td>
717
- </tr>
718
- <tr>
719
- <td>{#style_dlg.bottom}</td>
720
- <td>
721
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
722
- <tr>
723
- <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
724
- <td>&nbsp;</td>
725
- <td>
726
- <label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
727
- <select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
728
- </td>
729
- </tr>
730
- </table>
731
- </td>
732
- </tr>
733
- <tr>
734
- <td>{#style_dlg.left}</td>
735
- <td>
736
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
737
- <tr>
738
- <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
739
- <td>&nbsp;</td>
740
- <td>
741
- <label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
742
- <select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
743
- </td>
744
- </tr>
745
- </table>
746
- </td>
747
- </tr>
748
- </table>
749
- </fieldset>
750
- </div>
751
-
752
- <div style="float: right; width: 49%">
753
- <fieldset>
754
- <legend>{#style_dlg.clip}</legend>
755
-
756
- <table role="presentation" border="0">
757
- <tr>
758
- <td>&nbsp;</td>
759
- <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
760
- </tr>
761
- <tr>
762
- <td>{#style_dlg.top}</td>
763
- <td>
764
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
765
- <tr>
766
- <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
767
- <td>&nbsp;</td>
768
- <td>
769
- <label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
770
- <select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
771
- </td>
772
- </tr>
773
- </table>
774
- </td>
775
- </tr>
776
- <tr>
777
- <td>{#style_dlg.right}</td>
778
- <td>
779
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
780
- <tr>
781
- <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
782
- <td>&nbsp;</td>
783
- <td>
784
- <label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
785
- <select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
786
- </td>
787
- </tr>
788
- </table>
789
- </td>
790
- </tr>
791
- <tr>
792
- <td>{#style_dlg.bottom}</td>
793
- <td>
794
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
795
- <tr>
796
- <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
797
- <td>&nbsp;</td>
798
- <td>
799
- <label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
800
- <select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
801
- </td>
802
- </tr>
803
- </table>
804
- </td>
805
- </tr>
806
- <tr>
807
- <td>{#style_dlg.left}</td>
808
- <td>
809
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
810
- <tr>
811
- <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
812
- <td>&nbsp;</td>
813
- <td>
814
- <label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
815
- <select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
816
- </td>
817
- </tr>
818
- </table>
819
- </td>
820
- </tr>
821
- </table>
822
- </fieldset>
823
- </div>
824
- <br style="clear: both" />
825
- </div>
826
- </div>
827
-
828
- <div class="panel_toggle_insert_span">
829
- <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
830
- <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
831
- </div>
832
-
833
- <div class="mceActionPanel">
834
- <input type="submit" id="insert" name="insert" value="{#update}" />
835
- <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
836
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
837
- </div>
838
- </form>
839
-
840
- <div style="display: none">
841
- <div id="container"></div>
842
- </div>
843
-
844
- </body>
845
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>{#style_dlg.title}</title>
5
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
7
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
8
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
9
+ <script type="text/javascript" src="js/props.js"></script>
10
+ <link href="css/props.css" rel="stylesheet" type="text/css" />
11
+ </head>
12
+
13
+ <body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
14
+ <span id="app_title" style="display:none">{#style_dlg.title}</span>
15
+ <form onsubmit="updateAction();return false;" action="#">
16
+ <div class="tabs">
17
+ <ul>
18
+ <li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
19
+ <li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
20
+ <li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
21
+ <li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
22
+ <li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
23
+ <li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
24
+ <li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
25
+ </ul>
26
+ </div>
27
+
28
+ <div class="panel_wrapper">
29
+ <div id="text_panel" class="panel current">
30
+ <fieldset>
31
+ <legend>{#style_dlg.text}</legend>
32
+ <table role="presentation" border="0" width="100%">
33
+ <tr>
34
+ <td><label for="text_font">{#style_dlg.text_font}</label></td>
35
+ <td colspan="3">
36
+ <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
37
+ </td>
38
+ </tr>
39
+ <tr>
40
+ <td><label for="text_size">{#style_dlg.text_size}</label></td>
41
+ <td>
42
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
43
+ <tr>
44
+ <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
45
+ <td>&nbsp;</td>
46
+ <td>
47
+ <label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
48
+ <select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
49
+ </td>
50
+ </tr>
51
+ </table>
52
+ </td>
53
+ <td><label for="text_weight">{#style_dlg.text_weight}</label></td>
54
+ <td>
55
+ <select id="text_weight" name="text_weight"></select>
56
+ </td>
57
+ </tr>
58
+ <tr>
59
+ <td><label for="text_style">{#style_dlg.text_style}</label></td>
60
+ <td>
61
+ <select id="text_style" name="text_style" class="mceEditableSelect"></select>
62
+ </td>
63
+ <td><label for="text_variant">{#style_dlg.text_variant}</label></td>
64
+ <td>
65
+ <select id="text_variant" name="text_variant"></select>
66
+ </td>
67
+ </tr>
68
+ <tr>
69
+ <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
70
+ <td>
71
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
72
+ <tr>
73
+ <td>
74
+ <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
75
+ </td>
76
+ <td>&nbsp;</td>
77
+ <td>
78
+ <label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
79
+ <select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
80
+ </td>
81
+ </tr>
82
+ </table>
83
+ </td>
84
+ <td><label for="text_case">{#style_dlg.text_case}</label></td>
85
+ <td>
86
+ <select id="text_case" name="text_case"></select>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <td><label for="text_color">{#style_dlg.text_color}</label></td>
91
+ <td colspan="2">
92
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
93
+ <tr>
94
+ <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
95
+ <td id="text_color_pickcontainer">&nbsp;</td>
96
+ </tr>
97
+ </table>
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
102
+ <td colspan="2">
103
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
104
+ <tr>
105
+ <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
106
+ <td><label for="text_underline">{#style_dlg.text_underline}</label></td>
107
+ </tr>
108
+ <tr>
109
+ <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
110
+ <td><label for="text_overline">{#style_dlg.text_overline}</label></td>
111
+ </tr>
112
+ <tr>
113
+ <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
114
+ <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
115
+ </tr>
116
+ <tr>
117
+ <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
118
+ <td><label for="text_blink">{#style_dlg.text_blink}</label></td>
119
+ </tr>
120
+ <tr>
121
+ <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
122
+ <td><label for="text_none">{#style_dlg.text_none}</label></td>
123
+ </tr>
124
+ </table>
125
+ </td>
126
+ </tr>
127
+ </table>
128
+ </fieldset>
129
+ </div>
130
+
131
+ <div id="background_panel" class="panel">
132
+ <fieldset>
133
+ <legend>{#style_dlg.background}</legend>
134
+ <table role="presentation" border="0">
135
+ <tr>
136
+ <td><label for="background_color">{#style_dlg.background_color}</label></td>
137
+ <td>
138
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
139
+ <tr>
140
+ <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
141
+ <td id="background_color_pickcontainer">&nbsp;</td>
142
+ </tr>
143
+ </table>
144
+ </td>
145
+ </tr>
146
+
147
+ <tr>
148
+ <td><label for="background_image">{#style_dlg.background_image}</label></td>
149
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
150
+ <tr>
151
+ <td><input id="background_image" name="background_image" type="text" /></td>
152
+ <td id="background_image_browser">&nbsp;</td>
153
+ </tr>
154
+ </table>
155
+ </td>
156
+ </tr>
157
+
158
+ <tr>
159
+ <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
160
+ <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
161
+ </tr>
162
+
163
+ <tr>
164
+ <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
165
+ <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
166
+ </tr>
167
+
168
+ <tr>
169
+ <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
170
+ <td>
171
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
172
+ <tr>
173
+ <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
174
+ <td>&nbsp;</td>
175
+ <td>
176
+ <label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
177
+ <select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
178
+ </td>
179
+ </tr>
180
+ </table>
181
+ </td>
182
+ </tr>
183
+
184
+ <tr>
185
+ <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
186
+ <td>
187
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
188
+ <tr>
189
+ <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
190
+ <td>&nbsp;</td>
191
+ <td>
192
+
193
+ <label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
194
+ <select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
195
+ </tr>
196
+ </table>
197
+ </td>
198
+ </tr>
199
+ </table>
200
+ </fieldset>
201
+ </div>
202
+
203
+ <div id="block_panel" class="panel">
204
+ <fieldset>
205
+ <legend>{#style_dlg.block}</legend>
206
+ <table role="presentation" border="0">
207
+ <tr>
208
+ <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
209
+ <td>
210
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
211
+ <tr>
212
+ <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
213
+ <td>&nbsp;</td>
214
+ <td>
215
+ <label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
216
+ <select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
217
+ </td>
218
+ </tr>
219
+ </table>
220
+ </td>
221
+ </tr>
222
+
223
+ <tr>
224
+ <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
225
+ <td>
226
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
227
+ <tr>
228
+ <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
229
+ <td>&nbsp;</td>
230
+ <td>
231
+ <label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
232
+ <select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
233
+ </td>
234
+ </tr>
235
+ </table>
236
+ </td>
237
+ </tr>
238
+
239
+ <tr>
240
+ <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
241
+ <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
242
+ </tr>
243
+
244
+ <tr>
245
+ <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
246
+ <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
247
+ </tr>
248
+
249
+ <tr>
250
+ <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
251
+ <td>
252
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
253
+ <tr>
254
+ <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
255
+ <td>&nbsp;</td>
256
+ <td>
257
+ <label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
258
+
259
+ <select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
260
+ </td>
261
+ </tr>
262
+ </table>
263
+ </td>
264
+ </tr>
265
+
266
+ <tr>
267
+ <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
268
+ <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
269
+ </tr>
270
+
271
+ <tr>
272
+ <td><label for="block_display">{#style_dlg.block_display}</label></td>
273
+ <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
274
+ </tr>
275
+ </table>
276
+ </fieldset>
277
+ </div>
278
+
279
+ <div id="box_panel" class="panel">
280
+ <fieldset>
281
+ <legend>{#style_dlg.box}</legend>
282
+ <table role="presentation" border="0">
283
+ <tr>
284
+ <td><label for="box_width">{#style_dlg.box_width}</label></td>
285
+ <td>
286
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
287
+ <tr>
288
+ <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
289
+ <td>&nbsp;</td>
290
+ <td>
291
+ <label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
292
+ <select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
293
+ </td>
294
+ </tr>
295
+ </table>
296
+ </td>
297
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{#style_dlg.box_float}</label></td>
298
+ <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
299
+ </tr>
300
+
301
+ <tr>
302
+ <td><label for="box_height">{#style_dlg.box_height}</label></td>
303
+ <td>
304
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
305
+ <tr>
306
+ <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
307
+ <td>&nbsp;</td>
308
+ <td>
309
+ <label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
310
+ <select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
311
+ </td>
312
+ </tr>
313
+ </table>
314
+ </td>
315
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{#style_dlg.box_clear}</label></td>
316
+ <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
317
+ </tr>
318
+ </table>
319
+ </fieldset>
320
+
321
+ <div style="float: left; width: 49%">
322
+ <fieldset>
323
+ <legend>{#style_dlg.padding}</legend>
324
+
325
+ <table role="presentation" border="0">
326
+ <tr>
327
+ <td>&nbsp;</td>
328
+ <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
329
+ </tr>
330
+ <tr>
331
+ <td><label for="box_padding_top">{#style_dlg.top}</label></td>
332
+ <td>
333
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
334
+ <tr>
335
+ <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
336
+ <td>&nbsp;</td>
337
+ <td>
338
+ <label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
339
+ <select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
340
+ </td>
341
+ </tr>
342
+ </table>
343
+ </td>
344
+ </tr>
345
+ <tr>
346
+ <td><label for="box_padding_right">{#style_dlg.right}</label></td>
347
+ <td>
348
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
349
+ <tr>
350
+ <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
351
+ <td>&nbsp;</td>
352
+ <td>
353
+ <label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
354
+ <select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
355
+ </td>
356
+ </tr>
357
+ </table>
358
+ </td>
359
+ </tr>
360
+ <tr>
361
+ <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
362
+ <td>
363
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
364
+ <tr>
365
+ <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
366
+ <td>&nbsp;</td>
367
+ <td>
368
+ <label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
369
+ <select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
370
+ </td>
371
+ </tr>
372
+ </table>
373
+ </td>
374
+ </tr>
375
+ <tr>
376
+ <td><label for="box_padding_left">{#style_dlg.left}</label></td>
377
+ <td>
378
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
379
+ <tr>
380
+ <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
381
+ <td>&nbsp;</td>
382
+ <td>
383
+ <label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
384
+ <select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
385
+ </td>
386
+ </tr>
387
+ </table>
388
+ </td>
389
+ </tr>
390
+ </table>
391
+ </fieldset>
392
+ </div>
393
+
394
+ <div style="float: right; width: 49%">
395
+ <fieldset>
396
+ <legend>{#style_dlg.margin}</legend>
397
+
398
+ <table role="presentation" border="0">
399
+ <tr>
400
+ <td>&nbsp;</td>
401
+ <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
402
+ </tr>
403
+ <tr>
404
+ <td><label for="box_margin_top">{#style_dlg.top}</label></td>
405
+ <td>
406
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
407
+ <tr>
408
+ <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
409
+ <td>&nbsp;</td>
410
+ <td>
411
+ <label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
412
+ <select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
413
+ </td>
414
+ </tr>
415
+ </table>
416
+ </td>
417
+ </tr>
418
+ <tr>
419
+ <td><label for="box_margin_right">{#style_dlg.right}</label></td>
420
+ <td>
421
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
422
+ <tr>
423
+ <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
424
+ <td>&nbsp;</td>
425
+ <td>
426
+ <label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
427
+ <select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
428
+ </td>
429
+ </tr>
430
+ </table>
431
+ </td>
432
+ </tr>
433
+ <tr>
434
+ <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
435
+ <td>
436
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
437
+ <tr>
438
+ <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
439
+ <td>&nbsp;</td>
440
+ <td>
441
+ <label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
442
+ <select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
443
+ </td>
444
+ </tr>
445
+ </table>
446
+ </td>
447
+ </tr>
448
+ <tr>
449
+ <td><label for="box_margin_left">{#style_dlg.left}</label></td>
450
+ <td>
451
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
452
+ <tr>
453
+ <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
454
+ <td>&nbsp;</td>
455
+ <td>
456
+ <label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
457
+ <select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
458
+ </td>
459
+ </tr>
460
+ </table>
461
+ </td>
462
+ </tr>
463
+ </table>
464
+ </fieldset>
465
+ </div>
466
+ <br style="clear: both" />
467
+ </div>
468
+
469
+ <div id="border_panel" class="panel">
470
+ <fieldset>
471
+ <legend>{#style_dlg.border}</legend>
472
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
473
+ <tr>
474
+ <td class="tdelim">&nbsp;</td>
475
+ <td class="tdelim delim">&nbsp;</td>
476
+ <td class="tdelim">{#style_dlg.style}</td>
477
+ <td class="tdelim delim">&nbsp;</td>
478
+ <td class="tdelim">{#style_dlg.width}</td>
479
+ <td class="tdelim delim">&nbsp;</td>
480
+ <td class="tdelim">{#style_dlg.color}</td>
481
+ </tr>
482
+
483
+ <tr>
484
+ <td>&nbsp;</td>
485
+ <td class="delim">&nbsp;</td>
486
+ <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
487
+ <td class="delim">&nbsp;</td>
488
+ <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
489
+ <td class="delim">&nbsp;</td>
490
+ <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
491
+ </tr>
492
+
493
+ <tr>
494
+ <td>{#style_dlg.top}</td>
495
+ <td class="delim">&nbsp;</td>
496
+ <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
497
+ <td class="delim">&nbsp;</td>
498
+ <td>
499
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
500
+ <tr>
501
+ <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
502
+ <td>&nbsp;</td>
503
+ <td>
504
+ <label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
505
+ <select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
506
+ </td>
507
+ </tr>
508
+ </table>
509
+ </td>
510
+ <td class="delim">&nbsp;</td>
511
+ <td>
512
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
513
+ <tr>
514
+ <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
515
+ <td id="border_color_top_pickcontainer">&nbsp;</td>
516
+ </tr>
517
+ </table>
518
+ </td>
519
+ </tr>
520
+
521
+ <tr>
522
+ <td>{#style_dlg.right}</td>
523
+ <td class="delim">&nbsp;</td>
524
+ <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
525
+ <td class="delim">&nbsp;</td>
526
+ <td>
527
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
528
+ <tr>
529
+ <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
530
+ <td>&nbsp;</td>
531
+ <td>
532
+ <label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
533
+ <select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
534
+ </td>
535
+ </tr>
536
+ </table>
537
+ </td>
538
+ <td class="delim">&nbsp;</td>
539
+ <td>
540
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
541
+ <tr>
542
+ <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
543
+ <td id="border_color_right_pickcontainer">&nbsp;</td>
544
+ </tr>
545
+ </table>
546
+ </td>
547
+ </tr>
548
+
549
+ <tr>
550
+ <td>{#style_dlg.bottom}</td>
551
+ <td class="delim">&nbsp;</td>
552
+ <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
553
+ <td class="delim">&nbsp;</td>
554
+ <td>
555
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
556
+ <tr>
557
+ <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
558
+ <td>&nbsp;</td>
559
+ <td>
560
+ <label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
561
+ <select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
562
+ </td>
563
+ </tr>
564
+ </table>
565
+ </td>
566
+ <td class="delim">&nbsp;</td>
567
+ <td>
568
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
569
+ <tr>
570
+ <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
571
+ <td id="border_color_bottom_pickcontainer">&nbsp;</td>
572
+ </tr>
573
+ </table>
574
+ </td>
575
+ </tr>
576
+
577
+ <tr>
578
+ <td>{#style_dlg.left}</td>
579
+ <td class="delim">&nbsp;</td>
580
+ <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
581
+ <td class="delim">&nbsp;</td>
582
+ <td>
583
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
584
+ <tr>
585
+ <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
586
+ <td>&nbsp;</td>
587
+ <td>
588
+ <label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
589
+ <select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
590
+ </td>
591
+ </tr>
592
+ </table>
593
+ </td>
594
+ <td class="delim">&nbsp;</td>
595
+ <td>
596
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
597
+ <tr>
598
+ <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
599
+ <td id="border_color_left_pickcontainer">&nbsp;</td>
600
+ </tr>
601
+ </table>
602
+ </td>
603
+ </tr>
604
+ </table>
605
+ </fieldset>
606
+ </div>
607
+
608
+ <div id="list_panel" class="panel">
609
+ <fieldset>
610
+ <legend>{#style_dlg.list}</legend>
611
+ <table role="presentation" border="0">
612
+ <tr>
613
+ <td><label for="list_type">{#style_dlg.list_type}</label></td>
614
+ <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
615
+ </tr>
616
+
617
+ <tr>
618
+ <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
619
+ <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
620
+ </tr>
621
+
622
+ <tr>
623
+ <td><label for="list_position">{#style_dlg.position}</label></td>
624
+ <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
625
+ </tr>
626
+ </table>
627
+ </fieldset>
628
+ </div>
629
+
630
+ <div id="positioning_panel" class="panel">
631
+ <fieldset>
632
+ <legend>{#style_dlg.position}</legend>
633
+ <table role="presentation" border="0">
634
+ <tr>
635
+ <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
636
+ <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
637
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{#style_dlg.visibility}</label></td>
638
+ <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
639
+ </tr>
640
+
641
+ <tr>
642
+ <td><label for="positioning_width">{#style_dlg.width}</label></td>
643
+ <td>
644
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
645
+ <tr>
646
+ <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
647
+ <td>&nbsp;</td>
648
+ <td>
649
+ <label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
650
+ <select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
651
+ </td>
652
+ </tr>
653
+ </table>
654
+ </td>
655
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{#style_dlg.zindex}</label></td>
656
+ <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
657
+ </tr>
658
+
659
+ <tr>
660
+ <td><label for="positioning_height">{#style_dlg.height}</label></td>
661
+ <td>
662
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
663
+ <tr>
664
+ <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
665
+ <td>&nbsp;</td>
666
+ <td>
667
+ <label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
668
+ <select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
669
+ </td>
670
+ </tr>
671
+ </table>
672
+ </td>
673
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{#style_dlg.overflow}</label></td>
674
+ <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
675
+ </tr>
676
+ </table>
677
+ </fieldset>
678
+
679
+ <div style="float: left; width: 49%">
680
+ <fieldset>
681
+ <legend>{#style_dlg.placement}</legend>
682
+
683
+ <table role="presentation" border="0">
684
+ <tr>
685
+ <td>&nbsp;</td>
686
+ <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
687
+ </tr>
688
+ <tr>
689
+ <td>{#style_dlg.top}</td>
690
+ <td>
691
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
692
+ <tr>
693
+ <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
694
+ <td>&nbsp;</td>
695
+ <td>
696
+ <label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
697
+ <select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
698
+ </td>
699
+ </tr>
700
+ </table>
701
+ </td>
702
+ </tr>
703
+ <tr>
704
+ <td>{#style_dlg.right}</td>
705
+ <td>
706
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
707
+ <tr>
708
+ <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
709
+ <td>&nbsp;</td>
710
+ <td>
711
+ <label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
712
+ <select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
713
+ </td>
714
+ </tr>
715
+ </table>
716
+ </td>
717
+ </tr>
718
+ <tr>
719
+ <td>{#style_dlg.bottom}</td>
720
+ <td>
721
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
722
+ <tr>
723
+ <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
724
+ <td>&nbsp;</td>
725
+ <td>
726
+ <label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
727
+ <select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
728
+ </td>
729
+ </tr>
730
+ </table>
731
+ </td>
732
+ </tr>
733
+ <tr>
734
+ <td>{#style_dlg.left}</td>
735
+ <td>
736
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
737
+ <tr>
738
+ <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
739
+ <td>&nbsp;</td>
740
+ <td>
741
+ <label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
742
+ <select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
743
+ </td>
744
+ </tr>
745
+ </table>
746
+ </td>
747
+ </tr>
748
+ </table>
749
+ </fieldset>
750
+ </div>
751
+
752
+ <div style="float: right; width: 49%">
753
+ <fieldset>
754
+ <legend>{#style_dlg.clip}</legend>
755
+
756
+ <table role="presentation" border="0">
757
+ <tr>
758
+ <td>&nbsp;</td>
759
+ <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
760
+ </tr>
761
+ <tr>
762
+ <td>{#style_dlg.top}</td>
763
+ <td>
764
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
765
+ <tr>
766
+ <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
767
+ <td>&nbsp;</td>
768
+ <td>
769
+ <label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
770
+ <select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
771
+ </td>
772
+ </tr>
773
+ </table>
774
+ </td>
775
+ </tr>
776
+ <tr>
777
+ <td>{#style_dlg.right}</td>
778
+ <td>
779
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
780
+ <tr>
781
+ <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
782
+ <td>&nbsp;</td>
783
+ <td>
784
+ <label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
785
+ <select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
786
+ </td>
787
+ </tr>
788
+ </table>
789
+ </td>
790
+ </tr>
791
+ <tr>
792
+ <td>{#style_dlg.bottom}</td>
793
+ <td>
794
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
795
+ <tr>
796
+ <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
797
+ <td>&nbsp;</td>
798
+ <td>
799
+ <label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
800
+ <select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
801
+ </td>
802
+ </tr>
803
+ </table>
804
+ </td>
805
+ </tr>
806
+ <tr>
807
+ <td>{#style_dlg.left}</td>
808
+ <td>
809
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
810
+ <tr>
811
+ <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
812
+ <td>&nbsp;</td>
813
+ <td>
814
+ <label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
815
+ <select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
816
+ </td>
817
+ </tr>
818
+ </table>
819
+ </td>
820
+ </tr>
821
+ </table>
822
+ </fieldset>
823
+ </div>
824
+ <br style="clear: both" />
825
+ </div>
826
+ </div>
827
+
828
+ <div class="panel_toggle_insert_span">
829
+ <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
830
+ <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
831
+ </div>
832
+
833
+ <div class="mceActionPanel">
834
+ <input type="submit" id="insert" name="insert" value="{#update}" />
835
+ <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
836
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
837
+ </div>
838
+ </form>
839
+
840
+ <div style="display: none">
841
+ <div id="container"></div>
842
+ </div>
843
+
844
+ </body>
845
+ </html>
js/tinymce/jscripts/tiny_mce/plugins/style/readme.txt CHANGED
@@ -1,19 +1,19 @@
1
- Edit CSS Style plug-in notes
2
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
- Unlike WYSIWYG editor functionality that operates only on the selected text,
4
- typically by inserting new HTML elements with the specified styles.
5
- This plug-in operates on the HTML blocks surrounding the selected text.
6
- No new HTML elements are created.
7
-
8
- This plug-in only operates on the surrounding blocks and not the nearest
9
- parent node. This means that if a block encapsulates a node,
10
- e.g <p><span>text</span></p>, then only the styles in the block are
11
- recognized, not those in the span.
12
-
13
- When selecting text that includes multiple blocks at the same level (peers),
14
- this plug-in accumulates the specified styles in all of the surrounding blocks
15
- and populates the dialogue checkboxes accordingly. There is no differentiation
16
- between styles set in all the blocks versus styles set in some of the blocks.
17
-
18
- When the [Update] or [Apply] buttons are pressed, the styles selected in the
19
- checkboxes are applied to all blocks that surround the selected text.
1
+ Edit CSS Style plug-in notes
2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
+ Unlike WYSIWYG editor functionality that operates only on the selected text,
4
+ typically by inserting new HTML elements with the specified styles.
5
+ This plug-in operates on the HTML blocks surrounding the selected text.
6
+ No new HTML elements are created.
7
+
8
+ This plug-in only operates on the surrounding blocks and not the nearest
9
+ parent node. This means that if a block encapsulates a node,
10
+ e.g <p><span>text</span></p>, then only the styles in the block are
11
+ recognized, not those in the span.
12
+
13
+ When selecting text that includes multiple blocks at the same level (peers),
14
+ this plug-in accumulates the specified styles in all of the surrounding blocks
15
+ and populates the dialogue checkboxes accordingly. There is no differentiation
16
+ between styles set in all the blocks versus styles set in some of the blocks.
17
+
18
+ When the [Update] or [Apply] buttons are pressed, the styles selected in the
19
+ checkboxes are applied to all blocks that surround the selected text.
js/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js CHANGED
@@ -1,122 +1,122 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
13
-
14
- tinymce.create('tinymce.plugins.TabFocusPlugin', {
15
- init : function(ed, url) {
16
- function tabCancel(ed, e) {
17
- if (e.keyCode === 9)
18
- return Event.cancel(e);
19
- }
20
-
21
- function tabHandler(ed, e) {
22
- var x, i, f, el, v;
23
-
24
- function find(d) {
25
- el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
26
-
27
- function canSelectRecursive(e) {
28
- return e.nodeName==="BODY" || (e.type != 'hidden' &&
29
- !(e.style.display == "none") &&
30
- !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
31
- }
32
- function canSelectInOldIe(el) {
33
- return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
34
- }
35
- function isOldIe() {
36
- return tinymce.isIE6 || tinymce.isIE7;
37
- }
38
- function canSelect(el) {
39
- return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
40
- }
41
-
42
- each(el, function(e, i) {
43
- if (e.id == ed.id) {
44
- x = i;
45
- return false;
46
- }
47
- });
48
- if (d > 0) {
49
- for (i = x + 1; i < el.length; i++) {
50
- if (canSelect(el[i]))
51
- return el[i];
52
- }
53
- } else {
54
- for (i = x - 1; i >= 0; i--) {
55
- if (canSelect(el[i]))
56
- return el[i];
57
- }
58
- }
59
-
60
- return null;
61
- }
62
-
63
- if (e.keyCode === 9) {
64
- v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
65
-
66
- if (v.length == 1) {
67
- v[1] = v[0];
68
- v[0] = ':prev';
69
- }
70
-
71
- // Find element to focus
72
- if (e.shiftKey) {
73
- if (v[0] == ':prev')
74
- el = find(-1);
75
- else
76
- el = DOM.get(v[0]);
77
- } else {
78
- if (v[1] == ':next')
79
- el = find(1);
80
- else
81
- el = DOM.get(v[1]);
82
- }
83
-
84
- if (el) {
85
- if (el.id && (ed = tinymce.get(el.id || el.name)))
86
- ed.focus();
87
- else
88
- window.setTimeout(function() {
89
- if (!tinymce.isWebKit)
90
- window.focus();
91
- el.focus();
92
- }, 10);
93
-
94
- return Event.cancel(e);
95
- }
96
- }
97
- }
98
-
99
- ed.onKeyUp.add(tabCancel);
100
-
101
- if (tinymce.isGecko) {
102
- ed.onKeyPress.add(tabHandler);
103
- ed.onKeyDown.add(tabCancel);
104
- } else
105
- ed.onKeyDown.add(tabHandler);
106
-
107
- },
108
-
109
- getInfo : function() {
110
- return {
111
- longname : 'Tabfocus',
112
- author : 'Moxiecode Systems AB',
113
- authorurl : 'http://tinymce.moxiecode.com',
114
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
115
- version : tinymce.majorVersion + "." + tinymce.minorVersion
116
- };
117
- }
118
- });
119
-
120
- // Register plugin
121
- tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
122
- })();
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function() {
12
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
13
+
14
+ tinymce.create('tinymce.plugins.TabFocusPlugin', {
15
+ init : function(ed, url) {
16
+ function tabCancel(ed, e) {
17
+ if (e.keyCode === 9)
18
+ return Event.cancel(e);
19
+ }
20
+
21
+ function tabHandler(ed, e) {
22
+ var x, i, f, el, v;
23
+
24
+ function find(d) {
25
+ el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
26
+
27
+ function canSelectRecursive(e) {
28
+ return e.nodeName==="BODY" || (e.type != 'hidden' &&
29
+ !(e.style.display == "none") &&
30
+ !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
31
+ }
32
+ function canSelectInOldIe(el) {
33
+ return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
34
+ }
35
+ function isOldIe() {
36
+ return tinymce.isIE6 || tinymce.isIE7;
37
+ }
38
+ function canSelect(el) {
39
+ return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
40
+ }
41
+
42
+ each(el, function(e, i) {
43
+ if (e.id == ed.id) {
44
+ x = i;
45
+ return false;
46
+ }
47
+ });
48
+ if (d > 0) {
49
+ for (i = x + 1; i < el.length; i++) {
50
+ if (canSelect(el[i]))
51
+ return el[i];
52
+ }
53
+ } else {
54
+ for (i = x - 1; i >= 0; i--) {
55
+ if (canSelect(el[i]))
56
+ return el[i];
57
+ }
58
+ }
59
+
60
+ return null;
61
+ }
62
+
63
+ if (e.keyCode === 9) {
64
+ v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
65
+
66
+ if (v.length == 1) {
67
+ v[1] = v[0];
68
+ v[0] = ':prev';
69
+ }
70
+
71
+ // Find element to focus
72
+ if (e.shiftKey) {
73
+ if (v[0] == ':prev')
74
+ el = find(-1);
75
+ else
76
+ el = DOM.get(v[0]);
77
+ } else {
78
+ if (v[1] == ':next')
79
+ el = find(1);
80
+ else
81
+ el = DOM.get(v[1]);
82
+ }
83
+
84
+ if (el) {
85
+ if (el.id && (ed = tinymce.get(el.id || el.name)))
86
+ ed.focus();
87
+ else
88
+ window.setTimeout(function() {
89
+ if (!tinymce.isWebKit)
90
+ window.focus();
91
+ el.focus();
92
+ }, 10);
93
+
94
+ return Event.cancel(e);
95
+ }
96
+ }
97
+ }
98
+
99
+ ed.onKeyUp.add(tabCancel);
100
+
101
+ if (tinymce.isGecko) {
102
+ ed.onKeyPress.add(tabHandler);
103
+ ed.onKeyDown.add(tabCancel);
104
+ } else
105
+ ed.onKeyDown.add(tabHandler);
106
+
107
+ },
108
+
109
+ getInfo : function() {
110
+ return {
111
+ longname : 'Tabfocus',
112
+ author : 'Moxiecode Systems AB',
113
+ authorurl : 'http://tinymce.moxiecode.com',
114
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
115
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
116
+ };
117
+ }
118
+ });
119
+
120
+ // Register plugin
121
+ tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
122
+ })();
js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js CHANGED
@@ -1,1456 +1,1456 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function(tinymce) {
12
- var each = tinymce.each;
13
-
14
- // Checks if the selection/caret is at the start of the specified block element
15
- function isAtStart(rng, par) {
16
- var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
17
-
18
- rng2.setStartBefore(par);
19
- rng2.setEnd(rng.endContainer, rng.endOffset);
20
-
21
- elm = doc.createElement('body');
22
- elm.appendChild(rng2.cloneContents());
23
-
24
- // Check for text characters of other elements that should be treated as content
25
- return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
26
- };
27
-
28
- function getSpanVal(td, name) {
29
- return parseInt(td.getAttribute(name) || 1);
30
- }
31
-
32
- /**
33
- * Table Grid class.
34
- */
35
- function TableGrid(table, dom, selection) {
36
- var grid, startPos, endPos, selectedCell;
37
-
38
- buildGrid();
39
- selectedCell = dom.getParent(selection.getStart(), 'th,td');
40
- if (selectedCell) {
41
- startPos = getPos(selectedCell);
42
- endPos = findEndPos();
43
- selectedCell = getCell(startPos.x, startPos.y);
44
- }
45
-
46
- function cloneNode(node, children) {
47
- node = node.cloneNode(children);
48
- node.removeAttribute('id');
49
-
50
- return node;
51
- }
52
-
53
- function buildGrid() {
54
- var startY = 0;
55
-
56
- grid = [];
57
-
58
- each(['thead', 'tbody', 'tfoot'], function(part) {
59
- var rows = dom.select('> ' + part + ' tr', table);
60
-
61
- each(rows, function(tr, y) {
62
- y += startY;
63
-
64
- each(dom.select('> td, > th', tr), function(td, x) {
65
- var x2, y2, rowspan, colspan;
66
-
67
- // Skip over existing cells produced by rowspan
68
- if (grid[y]) {
69
- while (grid[y][x])
70
- x++;
71
- }
72
-
73
- // Get col/rowspan from cell
74
- rowspan = getSpanVal(td, 'rowspan');
75
- colspan = getSpanVal(td, 'colspan');
76
-
77
- // Fill out rowspan/colspan right and down
78
- for (y2 = y; y2 < y + rowspan; y2++) {
79
- if (!grid[y2])
80
- grid[y2] = [];
81
-
82
- for (x2 = x; x2 < x + colspan; x2++) {
83
- grid[y2][x2] = {
84
- part : part,
85
- real : y2 == y && x2 == x,
86
- elm : td,
87
- rowspan : rowspan,
88
- colspan : colspan
89
- };
90
- }
91
- }
92
- });
93
- });
94
-
95
- startY += rows.length;
96
- });
97
- };
98
-
99
- function getCell(x, y) {
100
- var row;
101
-
102
- row = grid[y];
103
- if (row)
104
- return row[x];
105
- };
106
-
107
- function setSpanVal(td, name, val) {
108
- if (td) {
109
- val = parseInt(val);
110
-
111
- if (val === 1)
112
- td.removeAttribute(name, 1);
113
- else
114
- td.setAttribute(name, val, 1);
115
- }
116
- }
117
-
118
- function isCellSelected(cell) {
119
- return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
120
- };
121
-
122
- function getSelectedRows() {
123
- var rows = [];
124
-
125
- each(table.rows, function(row) {
126
- each(row.cells, function(cell) {
127
- if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
128
- rows.push(row);
129
- return false;
130
- }
131
- });
132
- });
133
-
134
- return rows;
135
- };
136
-
137
- function deleteTable() {
138
- var rng = dom.createRng();
139
-
140
- rng.setStartAfter(table);
141
- rng.setEndAfter(table);
142
-
143
- selection.setRng(rng);
144
-
145
- dom.remove(table);
146
- };
147
-
148
- function cloneCell(cell) {
149
- var formatNode;
150
-
151
- // Clone formats
152
- tinymce.walk(cell, function(node) {
153
- var curNode;
154
-
155
- if (node.nodeType == 3) {
156
- each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
157
- node = cloneNode(node, false);
158
-
159
- if (!formatNode)
160
- formatNode = curNode = node;
161
- else if (curNode)
162
- curNode.appendChild(node);
163
-
164
- curNode = node;
165
- });
166
-
167
- // Add something to the inner node
168
- if (curNode)
169
- curNode.innerHTML = tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />';
170
-
171
- return false;
172
- }
173
- }, 'childNodes');
174
-
175
- cell = cloneNode(cell, false);
176
- setSpanVal(cell, 'rowSpan', 1);
177
- setSpanVal(cell, 'colSpan', 1);
178
-
179
- if (formatNode) {
180
- cell.appendChild(formatNode);
181
- } else {
182
- if (!tinymce.isIE)
183
- cell.innerHTML = '<br data-mce-bogus="1" />';
184
- }
185
-
186
- return cell;
187
- };
188
-
189
- function cleanup() {
190
- var rng = dom.createRng();
191
-
192
- // Empty rows
193
- each(dom.select('tr', table), function(tr) {
194
- if (tr.cells.length == 0)
195
- dom.remove(tr);
196
- });
197
-
198
- // Empty table
199
- if (dom.select('tr', table).length == 0) {
200
- rng.setStartAfter(table);
201
- rng.setEndAfter(table);
202
- selection.setRng(rng);
203
- dom.remove(table);
204
- return;
205
- }
206
-
207
- // Empty header/body/footer
208
- each(dom.select('thead,tbody,tfoot', table), function(part) {
209
- if (part.rows.length == 0)
210
- dom.remove(part);
211
- });
212
-
213
- // Restore selection to start position if it still exists
214
- buildGrid();
215
-
216
- // Restore the selection to the closest table position
217
- row = grid[Math.min(grid.length - 1, startPos.y)];
218
- if (row) {
219
- selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
220
- selection.collapse(true);
221
- }
222
- };
223
-
224
- function fillLeftDown(x, y, rows, cols) {
225
- var tr, x2, r, c, cell;
226
-
227
- tr = grid[y][x].elm.parentNode;
228
- for (r = 1; r <= rows; r++) {
229
- tr = dom.getNext(tr, 'tr');
230
-
231
- if (tr) {
232
- // Loop left to find real cell
233
- for (x2 = x; x2 >= 0; x2--) {
234
- cell = grid[y + r][x2].elm;
235
-
236
- if (cell.parentNode == tr) {
237
- // Append clones after
238
- for (c = 1; c <= cols; c++)
239
- dom.insertAfter(cloneCell(cell), cell);
240
-
241
- break;
242
- }
243
- }
244
-
245
- if (x2 == -1) {
246
- // Insert nodes before first cell
247
- for (c = 1; c <= cols; c++)
248
- tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
249
- }
250
- }
251
- }
252
- };
253
-
254
- function split() {
255
- each(grid, function(row, y) {
256
- each(row, function(cell, x) {
257
- var colSpan, rowSpan, newCell, i;
258
-
259
- if (isCellSelected(cell)) {
260
- cell = cell.elm;
261
- colSpan = getSpanVal(cell, 'colspan');
262
- rowSpan = getSpanVal(cell, 'rowspan');
263
-
264
- if (colSpan > 1 || rowSpan > 1) {
265
- setSpanVal(cell, 'rowSpan', 1);
266
- setSpanVal(cell, 'colSpan', 1);
267
-
268
- // Insert cells right
269
- for (i = 0; i < colSpan - 1; i++)
270
- dom.insertAfter(cloneCell(cell), cell);
271
-
272
- fillLeftDown(x, y, rowSpan - 1, colSpan);
273
- }
274
- }
275
- });
276
- });
277
- };
278
-
279
- function merge(cell, cols, rows) {
280
- var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
281
-
282
- // Use specified cell and cols/rows
283
- if (cell) {
284
- pos = getPos(cell);
285
- startX = pos.x;
286
- startY = pos.y;
287
- endX = startX + (cols - 1);
288
- endY = startY + (rows - 1);
289
- } else {
290
- startPos = endPos = null;
291
-
292
- // Calculate start/end pos by checking for selected cells in grid works better with context menu
293
- each(grid, function(row, y) {
294
- each(row, function(cell, x) {
295
- if (isCellSelected(cell)) {
296
- if (!startPos) {
297
- startPos = {x: x, y: y};
298
- }
299
-
300
- endPos = {x: x, y: y};
301
- }
302
- });
303
- });
304
-
305
- // Use selection
306
- startX = startPos.x;
307
- startY = startPos.y;
308
- endX = endPos.x;
309
- endY = endPos.y;
310
- }
311
-
312
- // Find start/end cells
313
- startCell = getCell(startX, startY);
314
- endCell = getCell(endX, endY);
315
-
316
- // Check if the cells exists and if they are of the same part for example tbody = tbody
317
- if (startCell && endCell && startCell.part == endCell.part) {
318
- // Split and rebuild grid
319
- split();
320
- buildGrid();
321
-
322
- // Set row/col span to start cell
323
- startCell = getCell(startX, startY).elm;
324
- setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
325
- setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
326
-
327
- // Remove other cells and add it's contents to the start cell
328
- for (y = startY; y <= endY; y++) {
329
- for (x = startX; x <= endX; x++) {
330
- if (!grid[y] || !grid[y][x])
331
- continue;
332
-
333
- cell = grid[y][x].elm;
334
-
335
- if (cell != startCell) {
336
- // Move children to startCell
337
- children = tinymce.grep(cell.childNodes);
338
- each(children, function(node) {
339
- startCell.appendChild(node);
340
- });
341
-
342
- // Remove bogus nodes if there is children in the target cell
343
- if (children.length) {
344
- children = tinymce.grep(startCell.childNodes);
345
- count = 0;
346
- each(children, function(node) {
347
- if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
348
- startCell.removeChild(node);
349
- });
350
- }
351
-
352
- // Remove cell
353
- dom.remove(cell);
354
- }
355
- }
356
- }
357
-
358
- // Remove empty rows etc and restore caret location
359
- cleanup();
360
- }
361
- };
362
-
363
- function insertRow(before) {
364
- var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
365
-
366
- // Find first/last row
367
- each(grid, function(row, y) {
368
- each(row, function(cell, x) {
369
- if (isCellSelected(cell)) {
370
- cell = cell.elm;
371
- rowElm = cell.parentNode;
372
- newRow = cloneNode(rowElm, false);
373
- posY = y;
374
-
375
- if (before)
376
- return false;
377
- }
378
- });
379
-
380
- if (before)
381
- return !posY;
382
- });
383
-
384
- for (x = 0; x < grid[0].length; x++) {
385
- // Cell not found could be because of an invalid table structure
386
- if (!grid[posY][x])
387
- continue;
388
-
389
- cell = grid[posY][x].elm;
390
-
391
- if (cell != lastCell) {
392
- if (!before) {
393
- rowSpan = getSpanVal(cell, 'rowspan');
394
- if (rowSpan > 1) {
395
- setSpanVal(cell, 'rowSpan', rowSpan + 1);
396
- continue;
397
- }
398
- } else {
399
- // Check if cell above can be expanded
400
- if (posY > 0 && grid[posY - 1][x]) {
401
- otherCell = grid[posY - 1][x].elm;
402
- rowSpan = getSpanVal(otherCell, 'rowSpan');
403
- if (rowSpan > 1) {
404
- setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
405
- continue;
406
- }
407
- }
408
- }
409
-
410
- // Insert new cell into new row
411
- newCell = cloneCell(cell);
412
- setSpanVal(newCell, 'colSpan', cell.colSpan);
413
-
414
- newRow.appendChild(newCell);
415
-
416
- lastCell = cell;
417
- }
418
- }
419
-
420
- if (newRow.hasChildNodes()) {
421
- if (!before)
422
- dom.insertAfter(newRow, rowElm);
423
- else
424
- rowElm.parentNode.insertBefore(newRow, rowElm);
425
- }
426
- };
427
-
428
- function insertCol(before) {
429
- var posX, lastCell;
430
-
431
- // Find first/last column
432
- each(grid, function(row, y) {
433
- each(row, function(cell, x) {
434
- if (isCellSelected(cell)) {
435
- posX = x;
436
-
437
- if (before)
438
- return false;
439
- }
440
- });
441
-
442
- if (before)
443
- return !posX;
444
- });
445
-
446
- each(grid, function(row, y) {
447
- var cell, rowSpan, colSpan;
448
-
449
- if (!row[posX])
450
- return;
451
-
452
- cell = row[posX].elm;
453
- if (cell != lastCell) {
454
- colSpan = getSpanVal(cell, 'colspan');
455
- rowSpan = getSpanVal(cell, 'rowspan');
456
-
457
- if (colSpan == 1) {
458
- if (!before) {
459
- dom.insertAfter(cloneCell(cell), cell);
460
- fillLeftDown(posX, y, rowSpan - 1, colSpan);
461
- } else {
462
- cell.parentNode.insertBefore(cloneCell(cell), cell);
463
- fillLeftDown(posX, y, rowSpan - 1, colSpan);
464
- }
465
- } else
466
- setSpanVal(cell, 'colSpan', cell.colSpan + 1);
467
-
468
- lastCell = cell;
469
- }
470
- });
471
- };
472
-
473
- function deleteCols() {
474
- var cols = [];
475
-
476
- // Get selected column indexes
477
- each(grid, function(row, y) {
478
- each(row, function(cell, x) {
479
- if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
480
- each(grid, function(row) {
481
- var cell = row[x].elm, colSpan;
482
-
483
- colSpan = getSpanVal(cell, 'colSpan');
484
-
485
- if (colSpan > 1)
486
- setSpanVal(cell, 'colSpan', colSpan - 1);
487
- else
488
- dom.remove(cell);
489
- });
490
-
491
- cols.push(x);
492
- }
493
- });
494
- });
495
-
496
- cleanup();
497
- };
498
-
499
- function deleteRows() {
500
- var rows;
501
-
502
- function deleteRow(tr) {
503
- var nextTr, pos, lastCell;
504
-
505
- nextTr = dom.getNext(tr, 'tr');
506
-
507
- // Move down row spanned cells
508
- each(tr.cells, function(cell) {
509
- var rowSpan = getSpanVal(cell, 'rowSpan');
510
-
511
- if (rowSpan > 1) {
512
- setSpanVal(cell, 'rowSpan', rowSpan - 1);
513
- pos = getPos(cell);
514
- fillLeftDown(pos.x, pos.y, 1, 1);
515
- }
516
- });
517
-
518
- // Delete cells
519
- pos = getPos(tr.cells[0]);
520
- each(grid[pos.y], function(cell) {
521
- var rowSpan;
522
-
523
- cell = cell.elm;
524
-
525
- if (cell != lastCell) {
526
- rowSpan = getSpanVal(cell, 'rowSpan');
527
-
528
- if (rowSpan <= 1)
529
- dom.remove(cell);
530
- else
531
- setSpanVal(cell, 'rowSpan', rowSpan - 1);
532
-
533
- lastCell = cell;
534
- }
535
- });
536
- };
537
-
538
- // Get selected rows and move selection out of scope
539
- rows = getSelectedRows();
540
-
541
- // Delete all selected rows
542
- each(rows.reverse(), function(tr) {
543
- deleteRow(tr);
544
- });
545
-
546
- cleanup();
547
- };
548
-
549
- function cutRows() {
550
- var rows = getSelectedRows();
551
-
552
- dom.remove(rows);
553
- cleanup();
554
-
555
- return rows;
556
- };
557
-
558
- function copyRows() {
559
- var rows = getSelectedRows();
560
-
561
- each(rows, function(row, i) {
562
- rows[i] = cloneNode(row, true);
563
- });
564
-
565
- return rows;
566
- };
567
-
568
- function pasteRows(rows, before) {
569
- // If we don't have any rows in the clipboard, return immediately
570
- if(!rows)
571
- return;
572
-
573
- var selectedRows = getSelectedRows(),
574
- targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
575
- targetCellCount = targetRow.cells.length;
576
-
577
- // Calc target cell count
578
- each(grid, function(row) {
579
- var match;
580
-
581
- targetCellCount = 0;
582
- each(row, function(cell, x) {
583
- if (cell.real)
584
- targetCellCount += cell.colspan;
585
-
586
- if (cell.elm.parentNode == targetRow)
587
- match = 1;
588
- });
589
-
590
- if (match)
591
- return false;
592
- });
593
-
594
- if (!before)
595
- rows.reverse();
596
-
597
- each(rows, function(row) {
598
- var cellCount = row.cells.length, cell;
599
-
600
- // Remove col/rowspans
601
- for (i = 0; i < cellCount; i++) {
602
- cell = row.cells[i];
603
- setSpanVal(cell, 'colSpan', 1);
604
- setSpanVal(cell, 'rowSpan', 1);
605
- }
606
-
607
- // Needs more cells
608
- for (i = cellCount; i < targetCellCount; i++)
609
- row.appendChild(cloneCell(row.cells[cellCount - 1]));
610
-
611
- // Needs less cells
612
- for (i = targetCellCount; i < cellCount; i++)
613
- dom.remove(row.cells[i]);
614
-
615
- // Add before/after
616
- if (before)
617
- targetRow.parentNode.insertBefore(row, targetRow);
618
- else
619
- dom.insertAfter(row, targetRow);
620
- });
621
-
622
- // Remove current selection
623
- dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
624
- };
625
-
626
- function getPos(target) {
627
- var pos;
628
-
629
- each(grid, function(row, y) {
630
- each(row, function(cell, x) {
631
- if (cell.elm == target) {
632
- pos = {x : x, y : y};
633
- return false;
634
- }
635
- });
636
-
637
- return !pos;
638
- });
639
-
640
- return pos;
641
- };
642
-
643
- function setStartCell(cell) {
644
- startPos = getPos(cell);
645
- };
646
-
647
- function findEndPos() {
648
- var pos, maxX, maxY;
649
-
650
- maxX = maxY = 0;
651
-
652
- each(grid, function(row, y) {
653
- each(row, function(cell, x) {
654
- var colSpan, rowSpan;
655
-
656
- if (isCellSelected(cell)) {
657
- cell = grid[y][x];
658
-
659
- if (x > maxX)
660
- maxX = x;
661
-
662
- if (y > maxY)
663
- maxY = y;
664
-
665
- if (cell.real) {
666
- colSpan = cell.colspan - 1;
667
- rowSpan = cell.rowspan - 1;
668
-
669
- if (colSpan) {
670
- if (x + colSpan > maxX)
671
- maxX = x + colSpan;
672
- }
673
-
674
- if (rowSpan) {
675
- if (y + rowSpan > maxY)
676
- maxY = y + rowSpan;
677
- }
678
- }
679
- }
680
- });
681
- });
682
-
683
- return {x : maxX, y : maxY};
684
- };
685
-
686
- function setEndCell(cell) {
687
- var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
688
-
689
- endPos = getPos(cell);
690
-
691
- if (startPos && endPos) {
692
- // Get start/end positions
693
- startX = Math.min(startPos.x, endPos.x);
694
- startY = Math.min(startPos.y, endPos.y);
695
- endX = Math.max(startPos.x, endPos.x);
696
- endY = Math.max(startPos.y, endPos.y);
697
-
698
- // Expand end positon to include spans
699
- maxX = endX;
700
- maxY = endY;
701
-
702
- // Expand startX
703
- for (y = startY; y <= maxY; y++) {
704
- cell = grid[y][startX];
705
-
706
- if (!cell.real) {
707
- if (startX - (cell.colspan - 1) < startX)
708
- startX -= cell.colspan - 1;
709
- }
710
- }
711
-
712
- // Expand startY
713
- for (x = startX; x <= maxX; x++) {
714
- cell = grid[startY][x];
715
-
716
- if (!cell.real) {
717
- if (startY - (cell.rowspan - 1) < startY)
718
- startY -= cell.rowspan - 1;
719
- }
720
- }
721
-
722
- // Find max X, Y
723
- for (y = startY; y <= endY; y++) {
724
- for (x = startX; x <= endX; x++) {
725
- cell = grid[y][x];
726
-
727
- if (cell.real) {
728
- colSpan = cell.colspan - 1;
729
- rowSpan = cell.rowspan - 1;
730
-
731
- if (colSpan) {
732
- if (x + colSpan > maxX)
733
- maxX = x + colSpan;
734
- }
735
-
736
- if (rowSpan) {
737
- if (y + rowSpan > maxY)
738
- maxY = y + rowSpan;
739
- }
740
- }
741
- }
742
- }
743
-
744
- // Remove current selection
745
- dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
746
-
747
- // Add new selection
748
- for (y = startY; y <= maxY; y++) {
749
- for (x = startX; x <= maxX; x++) {
750
- if (grid[y][x])
751
- dom.addClass(grid[y][x].elm, 'mceSelected');
752
- }
753
- }
754
- }
755
- };
756
-
757
- // Expose to public
758
- tinymce.extend(this, {
759
- deleteTable : deleteTable,
760
- split : split,
761
- merge : merge,
762
- insertRow : insertRow,
763
- insertCol : insertCol,
764
- deleteCols : deleteCols,
765
- deleteRows : deleteRows,
766
- cutRows : cutRows,
767
- copyRows : copyRows,
768
- pasteRows : pasteRows,
769
- getPos : getPos,
770
- setStartCell : setStartCell,
771
- setEndCell : setEndCell
772
- });
773
- };
774
-
775
- tinymce.create('tinymce.plugins.TablePlugin', {
776
- init : function(ed, url) {
777
- var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
778
-
779
- function createTableGrid(node) {
780
- var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
781
-
782
- if (tblElm)
783
- return new TableGrid(tblElm, ed.dom, selection);
784
- };
785
-
786
- function cleanup() {
787
- // Restore selection possibilities
788
- ed.getBody().style.webkitUserSelect = '';
789
-
790
- if (hasCellSelection) {
791
- ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
792
- hasCellSelection = false;
793
- }
794
- };
795
-
796
- // Register buttons
797
- each([
798
- ['table', 'table.desc', 'mceInsertTable', true],
799
- ['delete_table', 'table.del', 'mceTableDelete'],
800
- ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
801
- ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
802
- ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
803
- ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
804
- ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
805
- ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
806
- ['row_props', 'table.row_desc', 'mceTableRowProps', true],
807
- ['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
808
- ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
809
- ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
810
- ], function(c) {
811
- ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
812
- });
813
-
814
- // Select whole table is a table border is clicked
815
- if (!tinymce.isIE) {
816
- ed.onClick.add(function(ed, e) {
817
- e = e.target;
818
-
819
- if (e.nodeName === 'TABLE') {
820
- ed.selection.select(e);
821
- ed.nodeChanged();
822
- }
823
- });
824
- }
825
-
826
- ed.onPreProcess.add(function(ed, args) {
827
- var nodes, i, node, dom = ed.dom, value;
828
-
829
- nodes = dom.select('table', args.node);
830
- i = nodes.length;
831
- while (i--) {
832
- node = nodes[i];
833
- dom.setAttrib(node, 'data-mce-style', '');
834
-
835
- if ((value = dom.getAttrib(node, 'width'))) {
836
- dom.setStyle(node, 'width', value);
837
- dom.setAttrib(node, 'width', '');
838
- }
839
-
840
- if ((value = dom.getAttrib(node, 'height'))) {
841
- dom.setStyle(node, 'height', value);
842
- dom.setAttrib(node, 'height', '');
843
- }
844
- }
845
- });
846
-
847
- // Handle node change updates
848
- ed.onNodeChange.add(function(ed, cm, n) {
849
- var p;
850
-
851
- n = ed.selection.getStart();
852
- p = ed.dom.getParent(n, 'td,th,caption');
853
- cm.setActive('table', n.nodeName === 'TABLE' || !!p);
854
-
855
- // Disable table tools if we are in caption
856
- if (p && p.nodeName === 'CAPTION')
857
- p = 0;
858
-
859
- cm.setDisabled('delete_table', !p);
860
- cm.setDisabled('delete_col', !p);
861
- cm.setDisabled('delete_table', !p);
862
- cm.setDisabled('delete_row', !p);
863
- cm.setDisabled('col_after', !p);
864
- cm.setDisabled('col_before', !p);
865
- cm.setDisabled('row_after', !p);
866
- cm.setDisabled('row_before', !p);
867
- cm.setDisabled('row_props', !p);
868
- cm.setDisabled('cell_props', !p);
869
- cm.setDisabled('split_cells', !p);
870
- cm.setDisabled('merge_cells', !p);
871
- });
872
-
873
- ed.onInit.add(function(ed) {
874
- var startTable, startCell, dom = ed.dom, tableGrid;
875
-
876
- winMan = ed.windowManager;
877
-
878
- // Add cell selection logic
879
- ed.onMouseDown.add(function(ed, e) {
880
- if (e.button != 2) {
881
- cleanup();
882
-
883
- startCell = dom.getParent(e.target, 'td,th');
884
- startTable = dom.getParent(startCell, 'table');
885
- }
886
- });
887
-
888
- dom.bind(ed.getDoc(), 'mouseover', function(e) {
889
- var sel, table, target = e.target;
890
-
891
- if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
892
- table = dom.getParent(target, 'table');
893
- if (table == startTable) {
894
- if (!tableGrid) {
895
- tableGrid = createTableGrid(table);
896
- tableGrid.setStartCell(startCell);
897
-
898
- ed.getBody().style.webkitUserSelect = 'none';
899
- }
900
-
901
- tableGrid.setEndCell(target);
902
- hasCellSelection = true;
903
- }
904
-
905
- // Remove current selection
906
- sel = ed.selection.getSel();
907
-
908
- try {
909
- if (sel.removeAllRanges)
910
- sel.removeAllRanges();
911
- else
912
- sel.empty();
913
- } catch (ex) {
914
- // IE9 might throw errors here
915
- }
916
-
917
- e.preventDefault();
918
- }
919
- });
920
-
921
- ed.onMouseUp.add(function(ed, e) {
922
- var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
923
-
924
- // Move selection to startCell
925
- if (startCell) {
926
- if (tableGrid)
927
- ed.getBody().style.webkitUserSelect = '';
928
-
929
- function setPoint(node, start) {
930
- var walker = new tinymce.dom.TreeWalker(node, node);
931
-
932
- do {
933
- // Text node
934
- if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
935
- if (start)
936
- rng.setStart(node, 0);
937
- else
938
- rng.setEnd(node, node.nodeValue.length);
939
-
940
- return;
941
- }
942
-
943
- // BR element
944
- if (node.nodeName == 'BR') {
945
- if (start)
946
- rng.setStartBefore(node);
947
- else
948
- rng.setEndBefore(node);
949
-
950
- return;
951
- }
952
- } while (node = (start ? walker.next() : walker.prev()));
953
- }
954
-
955
- // Try to expand text selection as much as we can only Gecko supports cell selection
956
- selectedCells = dom.select('td.mceSelected,th.mceSelected');
957
- if (selectedCells.length > 0) {
958
- rng = dom.createRng();
959
- node = selectedCells[0];
960
- endNode = selectedCells[selectedCells.length - 1];
961
- rng.setStartBefore(node);
962
- rng.setEndAfter(node);
963
-
964
- setPoint(node, 1);
965
- walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
966
-
967
- do {
968
- if (node.nodeName == 'TD' || node.nodeName == 'TH') {
969
- if (!dom.hasClass(node, 'mceSelected'))
970
- break;
971
-
972
- lastNode = node;
973
- }
974
- } while (node = walker.next());
975
-
976
- setPoint(lastNode);
977
-
978
- sel.setRng(rng);
979
- }
980
-
981
- ed.nodeChanged();
982
- startCell = tableGrid = startTable = null;
983
- }
984
- });
985
-
986
- ed.onKeyUp.add(function(ed, e) {
987
- cleanup();
988
- });
989
-
990
- ed.onKeyDown.add(function (ed, e) {
991
- fixTableCellSelection(ed);
992
- });
993
-
994
- ed.onMouseDown.add(function (ed, e) {
995
- if (e.button != 2) {
996
- fixTableCellSelection(ed);
997
- }
998
- });
999
- function tableCellSelected(ed, rng, n, currentCell) {
1000
- // The decision of when a table cell is selected is somewhat involved. The fact that this code is
1001
- // required is actually a pointer to the root cause of this bug. A cell is selected when the start
1002
- // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
1003
- // or the parent of the table (in the case of the selection containing the last cell of a table).
1004
- var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
1005
- tableParent, allOfCellSelected, tableCellSelection;
1006
- if (table)
1007
- tableParent = table.parentNode;
1008
- allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
1009
- rng.startOffset == 0 &&
1010
- rng.endOffset == 0 &&
1011
- currentCell &&
1012
- (n.nodeName=="TR" || n==tableParent);
1013
- tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
1014
- return allOfCellSelected || tableCellSelection;
1015
- // return false;
1016
- }
1017
-
1018
- // this nasty hack is here to work around some WebKit selection bugs.
1019
- function fixTableCellSelection(ed) {
1020
- if (!tinymce.isWebKit)
1021
- return;
1022
-
1023
- var rng = ed.selection.getRng();
1024
- var n = ed.selection.getNode();
1025
- var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
1026
-
1027
- if (!tableCellSelected(ed, rng, n, currentCell))
1028
- return;
1029
- if (!currentCell) {
1030
- currentCell=n;
1031
- }
1032
-
1033
- // Get the very last node inside the table cell
1034
- var end = currentCell.lastChild;
1035
- while (end.lastChild)
1036
- end = end.lastChild;
1037
-
1038
- // Select the entire table cell. Nothing outside of the table cell should be selected.
1039
- rng.setEnd(end, end.nodeValue.length);
1040
- ed.selection.setRng(rng);
1041
- }
1042
- ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
1043
-
1044
- // Add context menu
1045
- if (ed && ed.plugins.contextmenu) {
1046
- ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
1047
- var sm, se = ed.selection, el = se.getNode() || ed.getBody();
1048
-
1049
- if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
1050
- m.removeAll();
1051
-
1052
- if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
1053
- m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
1054
- m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
1055
- m.addSeparator();
1056
- }
1057
-
1058
- if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
1059
- m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
1060
- m.addSeparator();
1061
- }
1062
-
1063
- m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
1064
- m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
1065
- m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
1066
- m.addSeparator();
1067
-
1068
- // Cell menu
1069
- sm = m.addMenu({title : 'table.cell'});
1070
- sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
1071
- sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
1072
- sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
1073
-
1074
- // Row menu
1075
- sm = m.addMenu({title : 'table.row'});
1076
- sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
1077
- sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
1078
- sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
1079
- sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
1080
- sm.addSeparator();
1081
- sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
1082
- sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
1083
- sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
1084
- sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
1085
-
1086
- // Column menu
1087
- sm = m.addMenu({title : 'table.col'});
1088
- sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
1089
- sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
1090
- sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
1091
- } else
1092
- m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
1093
- });
1094
- }
1095
-
1096
- // Fix to allow navigating up and down in a table in WebKit browsers.
1097
- if (tinymce.isWebKit) {
1098
- function moveSelection(ed, e) {
1099
- var VK = tinymce.VK;
1100
- var key = e.keyCode;
1101
-
1102
- function handle(upBool, sourceNode, event) {
1103
- var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
1104
- var currentRow = ed.dom.getParent(sourceNode, 'tr');
1105
- var siblingRow = currentRow[siblingDirection];
1106
-
1107
- if (siblingRow) {
1108
- moveCursorToRow(ed, sourceNode, siblingRow, upBool);
1109
- tinymce.dom.Event.cancel(event);
1110
- return true;
1111
- } else {
1112
- var tableNode = ed.dom.getParent(currentRow, 'table');
1113
- var middleNode = currentRow.parentNode;
1114
- var parentNodeName = middleNode.nodeName.toLowerCase();
1115
- if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
1116
- var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
1117
- if (targetParent !== null) {
1118
- return moveToRowInTarget(upBool, targetParent, sourceNode, event);
1119
- }
1120
- }
1121
- return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
1122
- }
1123
- }
1124
-
1125
- function getTargetParent(upBool, topNode, secondNode, nodeName) {
1126
- var tbodies = ed.dom.select('>' + nodeName, topNode);
1127
- var position = tbodies.indexOf(secondNode);
1128
- if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
1129
- return getFirstHeadOrFoot(upBool, topNode);
1130
- } else if (position === -1) {
1131
- var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
1132
- return tbodies[topOrBottom];
1133
- } else {
1134
- return tbodies[position + (upBool ? -1 : 1)];
1135
- }
1136
- }
1137
-
1138
- function getFirstHeadOrFoot(upBool, parent) {
1139
- var tagName = upBool ? 'thead' : 'tfoot';
1140
- var headOrFoot = ed.dom.select('>' + tagName, parent);
1141
- return headOrFoot.length !== 0 ? headOrFoot[0] : null;
1142
- }
1143
-
1144
- function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
1145
- var targetRow = getChildForDirection(targetParent, upBool);
1146
- targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
1147
- tinymce.dom.Event.cancel(event);
1148
- return true;
1149
- }
1150
-
1151
- function escapeTable(upBool, currentRow, siblingDirection, table, event) {
1152
- var tableSibling = table[siblingDirection];
1153
- if (tableSibling) {
1154
- moveCursorToStartOfElement(tableSibling);
1155
- return true;
1156
- } else {
1157
- var parentCell = ed.dom.getParent(table, 'td,th');
1158
- if (parentCell) {
1159
- return handle(upBool, parentCell, event);
1160
- } else {
1161
- var backUpSibling = getChildForDirection(currentRow, !upBool);
1162
- moveCursorToStartOfElement(backUpSibling);
1163
- return tinymce.dom.Event.cancel(event);
1164
- }
1165
- }
1166
- }
1167
-
1168
- function getChildForDirection(parent, up) {
1169
- var child = parent && parent[up ? 'lastChild' : 'firstChild'];
1170
- // BR is not a valid table child to return in this case we return the table cell
1171
- return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
1172
- }
1173
-
1174
- function moveCursorToStartOfElement(n) {
1175
- ed.selection.setCursorLocation(n, 0);
1176
- }
1177
-
1178
- function isVerticalMovement() {
1179
- return key == VK.UP || key == VK.DOWN;
1180
- }
1181
-
1182
- function isInTable(ed) {
1183
- var node = ed.selection.getNode();
1184
- var currentRow = ed.dom.getParent(node, 'tr');
1185
- return currentRow !== null;
1186
- }
1187
-
1188
- function columnIndex(column) {
1189
- var colIndex = 0;
1190
- var c = column;
1191
- while (c.previousSibling) {
1192
- c = c.previousSibling;
1193
- colIndex = colIndex + getSpanVal(c, "colspan");
1194
- }
1195
- return colIndex;
1196
- }
1197
-
1198
- function findColumn(rowElement, columnIndex) {
1199
- var c = 0;
1200
- var r = 0;
1201
- each(rowElement.children, function(cell, i) {
1202
- c = c + getSpanVal(cell, "colspan");
1203
- r = i;
1204
- if (c > columnIndex)
1205
- return false;
1206
- });
1207
- return r;
1208
- }
1209
-
1210
- function moveCursorToRow(ed, node, row, upBool) {
1211
- var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
1212
- var tgtColumnIndex = findColumn(row, srcColumnIndex);
1213
- var tgtNode = row.childNodes[tgtColumnIndex];
1214
- var rowCellTarget = getChildForDirection(tgtNode, upBool);
1215
- moveCursorToStartOfElement(rowCellTarget || tgtNode);
1216
- }
1217
-
1218
- function shouldFixCaret(preBrowserNode) {
1219
- var newNode = ed.selection.getNode();
1220
- var newParent = ed.dom.getParent(newNode, 'td,th');
1221
- var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
1222
- return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
1223
- }
1224
-
1225
- function checkSameParentTable(nodeOne, NodeTwo) {
1226
- return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
1227
- }
1228
-
1229
- if (isVerticalMovement() && isInTable(ed)) {
1230
- var preBrowserNode = ed.selection.getNode();
1231
- setTimeout(function() {
1232
- if (shouldFixCaret(preBrowserNode)) {
1233
- handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
1234
- }
1235
- }, 0);
1236
- }
1237
- }
1238
-
1239
- ed.onKeyDown.add(moveSelection);
1240
- }
1241
-
1242
- // Fixes an issue on Gecko where it's impossible to place the caret behind a table
1243
- // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
1244
- function fixTableCaretPos() {
1245
- var last;
1246
-
1247
- // Skip empty text nodes form the end
1248
- for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
1249
-
1250
- if (last && last.nodeName == 'TABLE') {
1251
- if (ed.settings.forced_root_block)
1252
- ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />');
1253
- else
1254
- ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
1255
- }
1256
- };
1257
-
1258
- // Fixes an bug where it's impossible to place the caret before a table in Gecko
1259
- // this fix solves it by detecting when the caret is at the beginning of such a table
1260
- // and then manually moves the caret infront of the table
1261
- if (tinymce.isGecko) {
1262
- ed.onKeyDown.add(function(ed, e) {
1263
- var rng, table, dom = ed.dom;
1264
-
1265
- // On gecko it's not possible to place the caret before a table
1266
- if (e.keyCode == 37 || e.keyCode == 38) {
1267
- rng = ed.selection.getRng();
1268
- table = dom.getParent(rng.startContainer, 'table');
1269
-
1270
- if (table && ed.getBody().firstChild == table) {
1271
- if (isAtStart(rng, table)) {
1272
- rng = dom.createRng();
1273
-
1274
- rng.setStartBefore(table);
1275
- rng.setEndBefore(table);
1276
-
1277
- ed.selection.setRng(rng);
1278
-
1279
- e.preventDefault();
1280
- }
1281
- }
1282
- }
1283
- });
1284
- }
1285
-
1286
- ed.onKeyUp.add(fixTableCaretPos);
1287
- ed.onSetContent.add(fixTableCaretPos);
1288
- ed.onVisualAid.add(fixTableCaretPos);
1289
-
1290
- ed.onPreProcess.add(function(ed, o) {
1291
- var last = o.node.lastChild;
1292
-
1293
- if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") {
1294
- ed.dom.remove(last);
1295
- }
1296
- });
1297
-
1298
-
1299
- /**
1300
- * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
1301
- *
1302
- * Removed: Since the new enter logic seems to fix this one.
1303
- */
1304
- /*
1305
- if (tinymce.isGecko) {
1306
- ed.onKeyDown.add(function(ed, e) {
1307
- if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
1308
- var node = ed.selection.getRng().startContainer;
1309
- var tableCell = dom.getParent(node, 'td,th');
1310
- if (tableCell) {
1311
- var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
1312
- dom.insertAfter(zeroSizedNbsp, node);
1313
- }
1314
- }
1315
- });
1316
- }
1317
- */
1318
-
1319
- fixTableCaretPos();
1320
- ed.startContent = ed.getContent({format : 'raw'});
1321
- });
1322
-
1323
- // Register action commands
1324
- each({
1325
- mceTableSplitCells : function(grid) {
1326
- grid.split();
1327
- },
1328
-
1329
- mceTableMergeCells : function(grid) {
1330
- var rowSpan, colSpan, cell;
1331
-
1332
- cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
1333
- if (cell) {
1334
- rowSpan = cell.rowSpan;
1335
- colSpan = cell.colSpan;
1336
- }
1337
-
1338
- if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
1339
- winMan.open({
1340
- url : url + '/merge_cells.htm',
1341
- width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
1342
- height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
1343
- inline : 1
1344
- }, {
1345
- rows : rowSpan,
1346
- cols : colSpan,
1347
- onaction : function(data) {
1348
- grid.merge(cell, data.cols, data.rows);
1349
- },
1350
- plugin_url : url
1351
- });
1352
- } else
1353
- grid.merge();
1354
- },
1355
-
1356
- mceTableInsertRowBefore : function(grid) {
1357
- grid.insertRow(true);
1358
- },
1359
-
1360
- mceTableInsertRowAfter : function(grid) {
1361
- grid.insertRow();
1362
- },
1363
-
1364
- mceTableInsertColBefore : function(grid) {
1365
- grid.insertCol(true);
1366
- },
1367
-
1368
- mceTableInsertColAfter : function(grid) {
1369
- grid.insertCol();
1370
- },
1371
-
1372
- mceTableDeleteCol : function(grid) {
1373
- grid.deleteCols();
1374
- },
1375
-
1376
- mceTableDeleteRow : function(grid) {
1377
- grid.deleteRows();
1378
- },
1379
-
1380
- mceTableCutRow : function(grid) {
1381
- clipboardRows = grid.cutRows();
1382
- },
1383
-
1384
- mceTableCopyRow : function(grid) {
1385
- clipboardRows = grid.copyRows();
1386
- },
1387
-
1388
- mceTablePasteRowBefore : function(grid) {
1389
- grid.pasteRows(clipboardRows, true);
1390
- },
1391
-
1392
- mceTablePasteRowAfter : function(grid) {
1393
- grid.pasteRows(clipboardRows);
1394
- },
1395
-
1396
- mceTableDelete : function(grid) {
1397
- grid.deleteTable();
1398
- }
1399
- }, function(func, name) {
1400
- ed.addCommand(name, function() {
1401
- var grid = createTableGrid();
1402
-
1403
- if (grid) {
1404
- func(grid);
1405
- ed.execCommand('mceRepaint');
1406
- cleanup();
1407
- }
1408
- });
1409
- });
1410
-
1411
- // Register dialog commands
1412
- each({
1413
- mceInsertTable : function(val) {
1414
- winMan.open({
1415
- url : url + '/table.htm',
1416
- width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
1417
- height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
1418
- inline : 1
1419
- }, {
1420
- plugin_url : url,
1421
- action : val ? val.action : 0
1422
- });
1423
- },
1424
-
1425
- mceTableRowProps : function() {
1426
- winMan.open({
1427
- url : url + '/row.htm',
1428
- width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
1429
- height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
1430
- inline : 1
1431
- }, {
1432
- plugin_url : url
1433
- });
1434
- },
1435
-
1436
- mceTableCellProps : function() {
1437
- winMan.open({
1438
- url : url + '/cell.htm',
1439
- width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
1440
- height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
1441
- inline : 1
1442
- }, {
1443
- plugin_url : url
1444
- });
1445
- }
1446
- }, function(func, name) {
1447
- ed.addCommand(name, function(ui, val) {
1448
- func(val);
1449
- });
1450
- });
1451
- }
1452
- });
1453
-
1454
- // Register plugin
1455
- tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
1456
- })(tinymce);
1
+ /**
2
+ * editor_plugin_src.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+ (function(tinymce) {
12
+ var each = tinymce.each;
13
+
14
+ // Checks if the selection/caret is at the start of the specified block element
15
+ function isAtStart(rng, par) {
16
+ var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
17
+
18
+ rng2.setStartBefore(par);
19
+ rng2.setEnd(rng.endContainer, rng.endOffset);
20
+
21
+ elm = doc.createElement('body');
22
+ elm.appendChild(rng2.cloneContents());
23
+
24
+ // Check for text characters of other elements that should be treated as content
25
+ return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
26
+ };
27
+
28
+ function getSpanVal(td, name) {
29
+ return parseInt(td.getAttribute(name) || 1);
30
+ }
31
+
32
+ /**
33
+ * Table Grid class.
34
+ */
35
+ function TableGrid(table, dom, selection) {
36
+ var grid, startPos, endPos, selectedCell;
37
+
38
+ buildGrid();
39
+ selectedCell = dom.getParent(selection.getStart(), 'th,td');
40
+ if (selectedCell) {
41
+ startPos = getPos(selectedCell);
42
+ endPos = findEndPos();
43
+ selectedCell = getCell(startPos.x, startPos.y);
44
+ }
45
+
46
+ function cloneNode(node, children) {
47
+ node = node.cloneNode(children);
48
+ node.removeAttribute('id');
49
+
50
+ return node;
51
+ }
52
+
53
+ function buildGrid() {
54
+ var startY = 0;
55
+
56
+ grid = [];
57
+
58
+ each(['thead', 'tbody', 'tfoot'], function(part) {
59
+ var rows = dom.select('> ' + part + ' tr', table);
60
+
61
+ each(rows, function(tr, y) {
62
+ y += startY;
63
+
64
+ each(dom.select('> td, > th', tr), function(td, x) {
65
+ var x2, y2, rowspan, colspan;
66
+
67
+ // Skip over existing cells produced by rowspan
68
+ if (grid[y]) {
69
+ while (grid[y][x])
70
+ x++;
71
+ }
72
+
73
+ // Get col/rowspan from cell
74
+ rowspan = getSpanVal(td, 'rowspan');
75
+ colspan = getSpanVal(td, 'colspan');
76
+
77
+ // Fill out rowspan/colspan right and down
78
+ for (y2 = y; y2 < y + rowspan; y2++) {
79
+ if (!grid[y2])
80
+ grid[y2] = [];
81
+
82
+ for (x2 = x; x2 < x + colspan; x2++) {
83
+ grid[y2][x2] = {
84
+ part : part,
85
+ real : y2 == y && x2 == x,
86
+ elm : td,
87
+ rowspan : rowspan,
88
+ colspan : colspan
89
+ };
90
+ }
91
+ }
92
+ });
93
+ });
94
+
95
+ startY += rows.length;
96
+ });
97
+ };
98
+
99
+ function getCell(x, y) {
100
+ var row;
101
+
102
+ row = grid[y];
103
+ if (row)
104
+ return row[x];
105
+ };
106
+
107
+ function setSpanVal(td, name, val) {
108
+ if (td) {
109
+ val = parseInt(val);
110
+
111
+ if (val === 1)
112
+ td.removeAttribute(name, 1);
113
+ else
114
+ td.setAttribute(name, val, 1);
115
+ }
116
+ }
117
+
118
+ function isCellSelected(cell) {
119
+ return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
120
+ };
121
+
122
+ function getSelectedRows() {
123
+ var rows = [];
124
+
125
+ each(table.rows, function(row) {
126
+ each(row.cells, function(cell) {
127
+ if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
128
+ rows.push(row);
129
+ return false;
130
+ }
131
+ });
132
+ });
133
+
134
+ return rows;
135
+ };
136
+
137
+ function deleteTable() {
138
+ var rng = dom.createRng();
139
+
140
+ rng.setStartAfter(table);
141
+ rng.setEndAfter(table);
142
+
143
+ selection.setRng(rng);
144
+
145
+ dom.remove(table);
146
+ };
147
+
148
+ function cloneCell(cell) {
149
+ var formatNode;
150
+
151
+ // Clone formats
152
+ tinymce.walk(cell, function(node) {
153
+ var curNode;
154
+
155
+ if (node.nodeType == 3) {
156
+ each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
157
+ node = cloneNode(node, false);
158
+
159
+ if (!formatNode)
160
+ formatNode = curNode = node;
161
+ else if (curNode)
162
+ curNode.appendChild(node);
163
+
164
+ curNode = node;
165
+ });
166
+
167
+ // Add something to the inner node
168
+ if (curNode)
169
+ curNode.innerHTML = tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />';
170
+
171
+ return false;
172
+ }
173
+ }, 'childNodes');
174
+
175
+ cell = cloneNode(cell, false);
176
+ setSpanVal(cell, 'rowSpan', 1);
177
+ setSpanVal(cell, 'colSpan', 1);
178
+
179
+ if (formatNode) {
180
+ cell.appendChild(formatNode);
181
+ } else {
182
+ if (!tinymce.isIE)
183
+ cell.innerHTML = '<br data-mce-bogus="1" />';
184
+ }
185
+
186
+ return cell;
187
+ };
188
+
189
+ function cleanup() {
190
+ var rng = dom.createRng();
191
+
192
+ // Empty rows
193
+ each(dom.select('tr', table), function(tr) {
194
+ if (tr.cells.length == 0)
195
+ dom.remove(tr);
196
+ });
197
+
198
+ // Empty table
199
+ if (dom.select('tr', table).length == 0) {
200
+ rng.setStartAfter(table);
201
+ rng.setEndAfter(table);
202
+ selection.setRng(rng);
203
+ dom.remove(table);
204
+ return;
205
+ }
206
+
207
+ // Empty header/body/footer
208
+ each(dom.select('thead,tbody,tfoot', table), function(part) {
209
+ if (part.rows.length == 0)
210
+ dom.remove(part);
211
+ });
212
+
213
+ // Restore selection to start position if it still exists
214
+ buildGrid();
215
+
216
+ // Restore the selection to the closest table position
217
+ row = grid[Math.min(grid.length - 1, startPos.y)];
218
+ if (row) {
219
+ selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
220
+ selection.collapse(true);
221
+ }
222
+ };
223
+
224
+ function fillLeftDown(x, y, rows, cols) {
225
+ var tr, x2, r, c, cell;
226
+
227
+ tr = grid[y][x].elm.parentNode;
228
+ for (r = 1; r <= rows; r++) {
229
+ tr = dom.getNext(tr, 'tr');
230
+
231
+ if (tr) {
232
+ // Loop left to find real cell
233
+ for (x2 = x; x2 >= 0; x2--) {
234
+ cell = grid[y + r][x2].elm;
235
+
236
+ if (cell.parentNode == tr) {
237
+ // Append clones after
238
+ for (c = 1; c <= cols; c++)
239
+ dom.insertAfter(cloneCell(cell), cell);
240
+
241
+ break;
242
+ }
243
+ }
244
+
245
+ if (x2 == -1) {
246
+ // Insert nodes before first cell
247
+ for (c = 1; c <= cols; c++)
248
+ tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
249
+ }
250
+ }
251
+ }
252
+ };
253
+
254
+ function split() {
255
+ each(grid, function(row, y) {
256
+ each(row, function(cell, x) {
257
+ var colSpan, rowSpan, newCell, i;
258
+
259
+ if (isCellSelected(cell)) {
260
+ cell = cell.elm;
261
+ colSpan = getSpanVal(cell, 'colspan');
262
+ rowSpan = getSpanVal(cell, 'rowspan');
263
+
264
+ if (colSpan > 1 || rowSpan > 1) {
265
+ setSpanVal(cell, 'rowSpan', 1);
266
+ setSpanVal(cell, 'colSpan', 1);
267
+
268
+ // Insert cells right
269
+ for (i = 0; i < colSpan - 1; i++)
270
+ dom.insertAfter(cloneCell(cell), cell);
271
+
272
+ fillLeftDown(x, y, rowSpan - 1, colSpan);
273
+ }
274
+ }
275
+ });
276
+ });
277
+ };
278
+
279
+ function merge(cell, cols, rows) {
280
+ var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
281
+
282
+ // Use specified cell and cols/rows
283
+ if (cell) {
284
+ pos = getPos(cell);
285
+ startX = pos.x;
286
+ startY = pos.y;
287
+ endX = startX + (cols - 1);
288
+ endY = startY + (rows - 1);
289
+ } else {
290
+ startPos = endPos = null;
291
+
292
+ // Calculate start/end pos by checking for selected cells in grid works better with context menu
293
+ each(grid, function(row, y) {
294
+ each(row, function(cell, x) {
295
+ if (isCellSelected(cell)) {
296
+ if (!startPos) {
297
+ startPos = {x: x, y: y};
298
+ }
299
+
300
+ endPos = {x: x, y: y};
301
+ }
302
+ });
303
+ });
304
+
305
+ // Use selection
306
+ startX = startPos.x;
307
+ startY = startPos.y;
308
+ endX = endPos.x;
309
+ endY = endPos.y;
310
+ }
311
+
312
+ // Find start/end cells
313
+ startCell = getCell(startX, startY);
314
+ endCell = getCell(endX, endY);
315
+
316
+ // Check if the cells exists and if they are of the same part for example tbody = tbody
317
+ if (startCell && endCell && startCell.part == endCell.part) {
318
+ // Split and rebuild grid
319
+ split();
320
+ buildGrid();
321
+
322
+ // Set row/col span to start cell
323
+ startCell = getCell(startX, startY).elm;
324
+ setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
325
+ setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
326
+
327
+ // Remove other cells and add it's contents to the start cell
328
+ for (y = startY; y <= endY; y++) {
329
+ for (x = startX; x <= endX; x++) {
330
+ if (!grid[y] || !grid[y][x])
331
+ continue;
332
+
333
+ cell = grid[y][x].elm;
334
+
335
+ if (cell != startCell) {
336
+ // Move children to startCell
337
+ children = tinymce.grep(cell.childNodes);
338
+ each(children, function(node) {
339
+ startCell.appendChild(node);
340
+ });
341
+
342
+ // Remove bogus nodes if there is children in the target cell
343
+ if (children.length) {
344
+ children = tinymce.grep(startCell.childNodes);
345
+ count = 0;
346
+ each(children, function(node) {
347
+ if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
348
+ startCell.removeChild(node);
349
+ });
350
+ }
351
+
352
+ // Remove cell
353
+ dom.remove(cell);
354
+ }
355
+ }
356
+ }
357
+
358
+ // Remove empty rows etc and restore caret location
359
+ cleanup();
360
+ }
361
+ };
362
+
363
+ function insertRow(before) {
364
+ var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
365
+
366
+ // Find first/last row
367
+ each(grid, function(row, y) {
368
+ each(row, function(cell, x) {
369
+ if (isCellSelected(cell)) {
370
+ cell = cell.elm;
371
+ rowElm = cell.parentNode;
372
+ newRow = cloneNode(rowElm, false);
373
+ posY = y;
374
+
375
+ if (before)
376
+ return false;
377
+ }
378
+ });
379
+
380
+ if (before)
381
+ return !posY;
382
+ });
383
+
384
+ for (x = 0; x < grid[0].length; x++) {
385
+ // Cell not found could be because of an invalid table structure
386
+ if (!grid[posY][x])
387
+ continue;
388
+
389
+ cell = grid[posY][x].elm;
390
+
391
+ if (cell != lastCell) {
392
+ if (!before) {
393
+ rowSpan = getSpanVal(cell, 'rowspan');
394
+ if (rowSpan > 1) {
395
+ setSpanVal(cell, 'rowSpan', rowSpan + 1);
396
+ continue;
397
+ }
398
+ } else {
399
+ // Check if cell above can be expanded
400
+ if (posY > 0 && grid[posY - 1][x]) {
401
+ otherCell = grid[posY - 1][x].elm;
402
+ rowSpan = getSpanVal(otherCell, 'rowSpan');
403
+ if (rowSpan > 1) {
404
+ setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
405
+ continue;
406
+ }
407
+ }
408
+ }
409
+
410
+ // Insert new cell into new row
411
+ newCell = cloneCell(cell);
412
+ setSpanVal(newCell, 'colSpan', cell.colSpan);
413
+
414
+ newRow.appendChild(newCell);
415
+
416
+ lastCell = cell;
417
+ }
418
+ }
419
+
420
+ if (newRow.hasChildNodes()) {
421
+ if (!before)
422
+ dom.insertAfter(newRow, rowElm);
423
+ else
424
+ rowElm.parentNode.insertBefore(newRow, rowElm);
425
+ }
426
+ };
427
+
428
+ function insertCol(before) {
429
+ var posX, lastCell;
430
+
431
+ // Find first/last column
432
+ each(grid, function(row, y) {
433
+ each(row, function(cell, x) {
434
+ if (isCellSelected(cell)) {
435
+ posX = x;
436
+
437
+ if (before)
438
+ return false;
439
+ }
440
+ });
441
+
442
+ if (before)
443
+ return !posX;
444
+ });
445
+
446
+ each(grid, function(row, y) {
447
+ var cell, rowSpan, colSpan;
448
+
449
+ if (!row[posX])
450
+ return;
451
+
452
+ cell = row[posX].elm;
453
+ if (cell != lastCell) {
454
+ colSpan = getSpanVal(cell, 'colspan');
455
+ rowSpan = getSpanVal(cell, 'rowspan');
456
+
457
+ if (colSpan == 1) {
458
+ if (!before) {
459
+ dom.insertAfter(cloneCell(cell), cell);
460
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
461
+ } else {
462
+ cell.parentNode.insertBefore(cloneCell(cell), cell);
463
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
464
+ }
465
+ } else
466
+ setSpanVal(cell, 'colSpan', cell.colSpan + 1);
467
+
468
+ lastCell = cell;
469
+ }
470
+ });
471
+ };
472
+
473
+ function deleteCols() {
474
+ var cols = [];
475
+
476
+ // Get selected column indexes
477
+ each(grid, function(row, y) {
478
+ each(row, function(cell, x) {
479
+ if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
480
+ each(grid, function(row) {
481
+ var cell = row[x].elm, colSpan;
482
+
483
+ colSpan = getSpanVal(cell, 'colSpan');
484
+
485
+ if (colSpan > 1)
486
+ setSpanVal(cell, 'colSpan', colSpan - 1);
487
+ else
488
+ dom.remove(cell);
489
+ });
490
+
491
+ cols.push(x);
492
+ }
493
+ });
494
+ });
495
+
496
+ cleanup();
497
+ };
498
+
499
+ function deleteRows() {
500
+ var rows;
501
+
502
+ function deleteRow(tr) {
503
+ var nextTr, pos, lastCell;
504
+
505
+ nextTr = dom.getNext(tr, 'tr');
506
+
507
+ // Move down row spanned cells
508
+ each(tr.cells, function(cell) {
509
+ var rowSpan = getSpanVal(cell, 'rowSpan');
510
+
511
+ if (rowSpan > 1) {
512
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
513
+ pos = getPos(cell);
514
+ fillLeftDown(pos.x, pos.y, 1, 1);
515
+ }
516
+ });
517
+
518
+ // Delete cells
519
+ pos = getPos(tr.cells[0]);
520
+ each(grid[pos.y], function(cell) {
521
+ var rowSpan;
522
+
523
+ cell = cell.elm;
524
+
525
+ if (cell != lastCell) {
526
+ rowSpan = getSpanVal(cell, 'rowSpan');
527
+
528
+ if (rowSpan <= 1)
529
+ dom.remove(cell);
530
+ else
531
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
532
+
533
+ lastCell = cell;
534
+ }
535
+ });
536
+ };
537
+
538
+ // Get selected rows and move selection out of scope
539
+ rows = getSelectedRows();
540
+
541
+ // Delete all selected rows
542
+ each(rows.reverse(), function(tr) {
543
+ deleteRow(tr);
544
+ });
545
+
546
+ cleanup();
547
+ };
548
+
549
+ function cutRows() {
550
+ var rows = getSelectedRows();
551
+
552
+ dom.remove(rows);
553
+ cleanup();
554
+
555
+ return rows;
556
+ };
557
+
558
+ function copyRows() {
559
+ var rows = getSelectedRows();
560
+
561
+ each(rows, function(row, i) {
562
+ rows[i] = cloneNode(row, true);
563
+ });
564
+
565
+ return rows;
566
+ };
567
+
568
+ function pasteRows(rows, before) {
569
+ // If we don't have any rows in the clipboard, return immediately
570
+ if(!rows)
571
+ return;
572
+
573
+ var selectedRows = getSelectedRows(),
574
+ targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
575
+ targetCellCount = targetRow.cells.length;
576
+
577
+ // Calc target cell count
578
+ each(grid, function(row) {
579
+ var match;
580
+
581
+ targetCellCount = 0;
582
+ each(row, function(cell, x) {
583
+ if (cell.real)
584
+ targetCellCount += cell.colspan;
585
+
586
+ if (cell.elm.parentNode == targetRow)
587
+ match = 1;
588
+ });
589
+
590
+ if (match)
591
+ return false;
592
+ });
593
+
594
+ if (!before)
595
+ rows.reverse();
596
+
597
+ each(rows, function(row) {
598
+ var cellCount = row.cells.length, cell;
599
+
600
+ // Remove col/rowspans
601
+ for (i = 0; i < cellCount; i++) {
602
+ cell = row.cells[i];
603
+ setSpanVal(cell, 'colSpan', 1);
604
+ setSpanVal(cell, 'rowSpan', 1);
605
+ }
606
+
607
+ // Needs more cells
608
+ for (i = cellCount; i < targetCellCount; i++)
609
+ row.appendChild(cloneCell(row.cells[cellCount - 1]));
610
+
611
+ // Needs less cells
612
+ for (i = targetCellCount; i < cellCount; i++)
613
+ dom.remove(row.cells[i]);
614
+
615
+ // Add before/after
616
+ if (before)
617
+ targetRow.parentNode.insertBefore(row, targetRow);
618
+ else
619
+ dom.insertAfter(row, targetRow);
620
+ });
621
+
622
+ // Remove current selection
623
+ dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
624
+ };
625
+
626
+ function getPos(target) {
627
+ var pos;
628
+
629
+ each(grid, function(row, y) {
630
+ each(row, function(cell, x) {
631
+ if (cell.elm == target) {
632
+ pos = {x : x, y : y};
633
+ return false;
634
+ }
635
+ });
636
+
637
+ return !pos;
638
+ });
639
+
640
+ return pos;
641
+ };
642
+
643
+ function setStartCell(cell) {
644
+ startPos = getPos(cell);
645
+ };
646
+
647
+ function findEndPos() {
648
+ var pos, maxX, maxY;
649
+
650
+ maxX = maxY = 0;
651
+
652
+ each(grid, function(row, y) {
653
+ each(row, function(cell, x) {
654
+ var colSpan, rowSpan;
655
+
656
+ if (isCellSelected(cell)) {
657
+ cell = grid[y][x];
658
+
659
+ if (x > maxX)
660
+ maxX = x;
661
+
662
+ if (y > maxY)
663
+ maxY = y;
664
+
665
+ if (cell.real) {
666
+ colSpan = cell.colspan - 1;
667
+ rowSpan = cell.rowspan - 1;
668
+
669
+ if (colSpan) {
670
+ if (x + colSpan > maxX)
671
+ maxX = x + colSpan;
672
+ }
673
+
674
+ if (rowSpan) {
675
+ if (y + rowSpan > maxY)
676
+ maxY = y + rowSpan;
677
+ }
678
+ }
679
+ }
680
+ });
681
+ });
682
+
683
+ return {x : maxX, y : maxY};
684
+ };
685
+
686
+ function setEndCell(cell) {
687
+ var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
688
+
689
+ endPos = getPos(cell);
690
+
691
+ if (startPos && endPos) {
692
+ // Get start/end positions
693
+ startX = Math.min(startPos.x, endPos.x);
694
+ startY = Math.min(startPos.y, endPos.y);
695
+ endX = Math.max(startPos.x, endPos.x);
696
+ endY = Math.max(startPos.y, endPos.y);
697
+
698
+ // Expand end positon to include spans
699
+ maxX = endX;
700
+ maxY = endY;
701
+
702
+ // Expand startX
703
+ for (y = startY; y <= maxY; y++) {
704
+ cell = grid[y][startX];
705
+
706
+ if (!cell.real) {
707
+ if (startX - (cell.colspan - 1) < startX)
708
+ startX -= cell.colspan - 1;
709
+ }
710
+ }
711
+
712
+ // Expand startY
713
+ for (x = startX; x <= maxX; x++) {
714
+ cell = grid[startY][x];
715
+
716
+ if (!cell.real) {
717
+ if (startY - (cell.rowspan - 1) < startY)
718
+ startY -= cell.rowspan - 1;
719
+ }
720
+ }
721
+
722
+ // Find max X, Y
723
+ for (y = startY; y <= endY; y++) {
724
+ for (x = startX; x <= endX; x++) {
725
+ cell = grid[y][x];
726
+
727
+ if (cell.real) {
728
+ colSpan = cell.colspan - 1;
729
+ rowSpan = cell.rowspan - 1;
730
+
731
+ if (colSpan) {
732
+ if (x + colSpan > maxX)
733
+ maxX = x + colSpan;
734
+ }
735
+
736
+ if (rowSpan) {
737
+ if (y + rowSpan > maxY)
738
+ maxY = y + rowSpan;
739
+ }
740
+ }
741
+ }
742
+ }
743
+
744
+ // Remove current selection
745
+ dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
746
+
747
+ // Add new selection
748
+ for (y = startY; y <= maxY; y++) {
749
+ for (x = startX; x <= maxX; x++) {
750
+ if (grid[y][x])
751
+ dom.addClass(grid[y][x].elm, 'mceSelected');
752
+ }
753
+ }
754
+ }
755
+ };
756
+
757
+ // Expose to public
758
+ tinymce.extend(this, {
759
+ deleteTable : deleteTable,
760
+ split : split,
761
+ merge : merge,
762
+ insertRow : insertRow,
763
+ insertCol : insertCol,
764
+ deleteCols : deleteCols,
765
+ deleteRows : deleteRows,
766
+ cutRows : cutRows,
767
+ copyRows : copyRows,
768
+ pasteRows : pasteRows,
769
+ getPos : getPos,
770
+ setStartCell : setStartCell,
771
+ setEndCell : setEndCell
772
+ });
773
+ };
774
+
775
+ tinymce.create('tinymce.plugins.TablePlugin', {
776
+ init : function(ed, url) {
777
+ var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
778
+
779
+ function createTableGrid(node) {
780
+ var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
781
+
782
+ if (tblElm)
783
+ return new TableGrid(tblElm, ed.dom, selection);
784
+ };
785
+
786
+ function cleanup() {
787
+ // Restore selection possibilities
788
+ ed.getBody().style.webkitUserSelect = '';
789
+
790
+ if (hasCellSelection) {
791
+ ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
792
+ hasCellSelection = false;
793
+ }
794
+ };
795
+
796
+ // Register buttons
797
+ each([
798
+ ['table', 'table.desc', 'mceInsertTable', true],
799
+ ['delete_table', 'table.del', 'mceTableDelete'],
800
+ ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
801
+ ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
802
+ ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
803
+ ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
804
+ ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
805
+ ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
806
+ ['row_props', 'table.row_desc', 'mceTableRowProps', true],
807
+ ['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
808
+ ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
809
+ ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
810
+ ], function(c) {
811
+ ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
812
+ });
813
+
814
+ // Select whole table is a table border is clicked
815
+ if (!tinymce.isIE) {
816
+ ed.onClick.add(function(ed, e) {
817
+ e = e.target;
818
+
819
+ if (e.nodeName === 'TABLE') {
820
+ ed.selection.select(e);
821
+ ed.nodeChanged();
822
+ }
823
+ });
824
+ }
825
+
826
+ ed.onPreProcess.add(function(ed, args) {
827
+ var nodes, i, node, dom = ed.dom, value;
828
+
829
+ nodes = dom.select('table', args.node);
830
+ i = nodes.length;
831
+ while (i--) {
832
+ node = nodes[i];
833
+ dom.setAttrib(node, 'data-mce-style', '');
834
+
835
+ if ((value = dom.getAttrib(node, 'width'))) {
836
+ dom.setStyle(node, 'width', value);
837
+ dom.setAttrib(node, 'width', '');
838
+ }
839
+
840
+ if ((value = dom.getAttrib(node, 'height'))) {
841
+ dom.setStyle(node, 'height', value);
842
+ dom.setAttrib(node, 'height', '');
843
+ }
844
+ }
845
+ });
846
+
847
+ // Handle node change updates
848
+ ed.onNodeChange.add(function(ed, cm, n) {
849
+ var p;
850
+
851
+ n = ed.selection.getStart();
852
+ p = ed.dom.getParent(n, 'td,th,caption');
853
+ cm.setActive('table', n.nodeName === 'TABLE' || !!p);
854
+
855
+ // Disable table tools if we are in caption
856
+ if (p && p.nodeName === 'CAPTION')
857
+ p = 0;
858
+
859
+ cm.setDisabled('delete_table', !p);
860
+ cm.setDisabled('delete_col', !p);
861
+ cm.setDisabled('delete_table', !p);
862
+ cm.setDisabled('delete_row', !p);
863
+ cm.setDisabled('col_after', !p);
864
+ cm.setDisabled('col_before', !p);
865
+ cm.setDisabled('row_after', !p);
866
+ cm.setDisabled('row_before', !p);
867
+ cm.setDisabled('row_props', !p);
868
+ cm.setDisabled('cell_props', !p);
869
+ cm.setDisabled('split_cells', !p);
870
+ cm.setDisabled('merge_cells', !p);
871
+ });
872
+
873
+ ed.onInit.add(function(ed) {
874
+ var startTable, startCell, dom = ed.dom, tableGrid;
875
+
876
+ winMan = ed.windowManager;
877
+
878
+ // Add cell selection logic
879
+ ed.onMouseDown.add(function(ed, e) {
880
+ if (e.button != 2) {
881
+ cleanup();
882
+
883
+ startCell = dom.getParent(e.target, 'td,th');
884
+ startTable = dom.getParent(startCell, 'table');
885
+ }
886
+ });
887
+
888
+ dom.bind(ed.getDoc(), 'mouseover', function(e) {
889
+ var sel, table, target = e.target;
890
+
891
+ if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
892
+ table = dom.getParent(target, 'table');
893
+ if (table == startTable) {
894
+ if (!tableGrid) {
895
+ tableGrid = createTableGrid(table);
896
+ tableGrid.setStartCell(startCell);
897
+
898
+ ed.getBody().style.webkitUserSelect = 'none';
899
+ }
900
+
901
+ tableGrid.setEndCell(target);
902
+ hasCellSelection = true;
903
+ }
904
+
905
+ // Remove current selection
906
+ sel = ed.selection.getSel();
907
+
908
+ try {
909
+ if (sel.removeAllRanges)
910
+ sel.removeAllRanges();
911
+ else
912
+ sel.empty();
913
+ } catch (ex) {
914
+ // IE9 might throw errors here
915
+ }
916
+
917
+ e.preventDefault();
918
+ }
919
+ });
920
+
921
+ ed.onMouseUp.add(function(ed, e) {
922
+ var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
923
+
924
+ // Move selection to startCell
925
+ if (startCell) {
926
+ if (tableGrid)
927
+ ed.getBody().style.webkitUserSelect = '';
928
+
929
+ function setPoint(node, start) {
930
+ var walker = new tinymce.dom.TreeWalker(node, node);
931
+
932
+ do {
933
+ // Text node
934
+ if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
935
+ if (start)
936
+ rng.setStart(node, 0);
937
+ else
938
+ rng.setEnd(node, node.nodeValue.length);
939
+
940
+ return;
941
+ }
942
+
943
+ // BR element
944
+ if (node.nodeName == 'BR') {
945
+ if (start)
946
+ rng.setStartBefore(node);
947
+ else
948
+ rng.setEndBefore(node);
949
+
950
+ return;
951
+ }
952
+ } while (node = (start ? walker.next() : walker.prev()));
953
+ }
954
+
955
+ // Try to expand text selection as much as we can only Gecko supports cell selection
956
+ selectedCells = dom.select('td.mceSelected,th.mceSelected');
957
+ if (selectedCells.length > 0) {
958
+ rng = dom.createRng();
959
+ node = selectedCells[0];
960
+ endNode = selectedCells[selectedCells.length - 1];
961
+ rng.setStartBefore(node);
962
+ rng.setEndAfter(node);
963
+
964
+ setPoint(node, 1);
965
+ walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
966
+
967
+ do {
968
+ if (node.nodeName == 'TD' || node.nodeName == 'TH') {
969
+ if (!dom.hasClass(node, 'mceSelected'))
970
+ break;
971
+
972
+ lastNode = node;
973
+ }
974
+ } while (node = walker.next());
975
+
976
+ setPoint(lastNode);
977
+
978
+ sel.setRng(rng);
979
+ }
980
+
981
+ ed.nodeChanged();
982
+ startCell = tableGrid = startTable = null;
983
+ }
984
+ });
985
+
986
+ ed.onKeyUp.add(function(ed, e) {
987
+ cleanup();
988
+ });
989
+
990
+ ed.onKeyDown.add(function (ed, e) {
991
+ fixTableCellSelection(ed);
992
+ });
993
+
994
+ ed.onMouseDown.add(function (ed, e) {
995
+ if (e.button != 2) {
996
+ fixTableCellSelection(ed);
997
+ }
998
+ });
999
+ function tableCellSelected(ed, rng, n, currentCell) {
1000
+ // The decision of when a table cell is selected is somewhat involved. The fact that this code is
1001
+ // required is actually a pointer to the root cause of this bug. A cell is selected when the start
1002
+ // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
1003
+ // or the parent of the table (in the case of the selection containing the last cell of a table).
1004
+ var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
1005
+ tableParent, allOfCellSelected, tableCellSelection;
1006
+ if (table)
1007
+ tableParent = table.parentNode;
1008
+ allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
1009
+ rng.startOffset == 0 &&
1010
+ rng.endOffset == 0 &&
1011
+ currentCell &&
1012
+ (n.nodeName=="TR" || n==tableParent);
1013
+ tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
1014
+ return allOfCellSelected || tableCellSelection;
1015
+ // return false;
1016
+ }
1017
+
1018
+ // this nasty hack is here to work around some WebKit selection bugs.
1019
+ function fixTableCellSelection(ed) {
1020
+ if (!tinymce.isWebKit)
1021
+ return;
1022
+
1023
+ var rng = ed.selection.getRng();
1024
+ var n = ed.selection.getNode();
1025
+ var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
1026
+
1027
+ if (!tableCellSelected(ed, rng, n, currentCell))
1028
+ return;
1029
+ if (!currentCell) {
1030
+ currentCell=n;
1031
+ }
1032
+
1033
+ // Get the very last node inside the table cell
1034
+ var end = currentCell.lastChild;
1035
+ while (end.lastChild)
1036
+ end = end.lastChild;
1037
+
1038
+ // Select the entire table cell. Nothing outside of the table cell should be selected.
1039
+ rng.setEnd(end, end.nodeValue.length);
1040
+ ed.selection.setRng(rng);
1041
+ }
1042
+ ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
1043
+
1044
+ // Add context menu
1045
+ if (ed && ed.plugins.contextmenu) {
1046
+ ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
1047
+ var sm, se = ed.selection, el = se.getNode() || ed.getBody();
1048
+
1049
+ if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
1050
+ m.removeAll();
1051
+
1052
+ if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
1053
+ m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
1054
+ m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
1055
+ m.addSeparator();
1056
+ }
1057
+
1058
+ if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
1059
+ m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
1060
+ m.addSeparator();
1061
+ }
1062
+
1063
+ m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
1064
+ m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
1065
+ m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
1066
+ m.addSeparator();
1067
+
1068
+ // Cell menu
1069
+ sm = m.addMenu({title : 'table.cell'});
1070
+ sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
1071
+ sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
1072
+ sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
1073
+
1074
+ // Row menu
1075
+ sm = m.addMenu({title : 'table.row'});
1076
+ sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
1077
+ sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
1078
+ sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
1079
+ sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
1080
+ sm.addSeparator();
1081
+ sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
1082
+ sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
1083
+ sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
1084
+ sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
1085
+
1086
+ // Column menu
1087
+ sm = m.addMenu({title : 'table.col'});
1088
+ sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
1089
+ sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
1090
+ sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
1091
+ } else
1092
+ m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
1093
+ });
1094
+ }
1095
+
1096
+ // Fix to allow navigating up and down in a table in WebKit browsers.
1097
+ if (tinymce.isWebKit) {
1098
+ function moveSelection(ed, e) {
1099
+ var VK = tinymce.VK;
1100
+ var key = e.keyCode;
1101
+
1102
+ function handle(upBool, sourceNode, event) {
1103
+ var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
1104
+ var currentRow = ed.dom.getParent(sourceNode, 'tr');
1105
+ var siblingRow = currentRow[siblingDirection];
1106
+
1107
+ if (siblingRow) {
1108
+ moveCursorToRow(ed, sourceNode, siblingRow, upBool);
1109
+ tinymce.dom.Event.cancel(event);
1110
+ return true;
1111
+ } else {
1112
+ var tableNode = ed.dom.getParent(currentRow, 'table');
1113
+ var middleNode = currentRow.parentNode;
1114
+ var parentNodeName = middleNode.nodeName.toLowerCase();
1115
+ if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
1116
+ var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
1117
+ if (targetParent !== null) {
1118
+ return moveToRowInTarget(upBool, targetParent, sourceNode, event);
1119
+ }
1120
+ }
1121
+ return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
1122
+ }
1123
+ }
1124
+
1125
+ function getTargetParent(upBool, topNode, secondNode, nodeName) {
1126
+ var tbodies = ed.dom.select('>' + nodeName, topNode);
1127
+ var position = tbodies.indexOf(secondNode);
1128
+ if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
1129
+ return getFirstHeadOrFoot(upBool, topNode);
1130
+ } else if (position === -1) {
1131
+ var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
1132
+ return tbodies[topOrBottom];
1133
+ } else {
1134
+ return tbodies[position + (upBool ? -1 : 1)];
1135
+ }
1136
+ }
1137
+
1138
+ function getFirstHeadOrFoot(upBool, parent) {
1139
+ var tagName = upBool ? 'thead' : 'tfoot';
1140
+ var headOrFoot = ed.dom.select('>' + tagName, parent);
1141
+ return headOrFoot.length !== 0 ? headOrFoot[0] : null;
1142
+ }
1143
+
1144
+ function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
1145
+ var targetRow = getChildForDirection(targetParent, upBool);
1146
+ targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
1147
+ tinymce.dom.Event.cancel(event);
1148
+ return true;
1149
+ }
1150
+
1151
+ function escapeTable(upBool, currentRow, siblingDirection, table, event) {
1152
+ var tableSibling = table[siblingDirection];
1153
+ if (tableSibling) {
1154
+ moveCursorToStartOfElement(tableSibling);
1155
+ return true;
1156
+ } else {
1157
+ var parentCell = ed.dom.getParent(table, 'td,th');
1158
+ if (parentCell) {
1159
+ return handle(upBool, parentCell, event);
1160
+ } else {
1161
+ var backUpSibling = getChildForDirection(currentRow, !upBool);
1162
+ moveCursorToStartOfElement(backUpSibling);
1163
+ return tinymce.dom.Event.cancel(event);
1164
+ }
1165
+ }
1166
+ }
1167
+
1168
+ function getChildForDirection(parent, up) {
1169
+ var child = parent && parent[up ? 'lastChild' : 'firstChild'];
1170
+ // BR is not a valid table child to return in this case we return the table cell
1171
+ return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
1172
+ }
1173
+
1174
+ function moveCursorToStartOfElement(n) {
1175
+ ed.selection.setCursorLocation(n, 0);
1176
+ }
1177
+
1178
+ function isVerticalMovement() {
1179
+ return key == VK.UP || key == VK.DOWN;
1180
+ }
1181
+
1182
+ function isInTable(ed) {
1183
+ var node = ed.selection.getNode();
1184
+ var currentRow = ed.dom.getParent(node, 'tr');
1185
+ return currentRow !== null;
1186
+ }
1187
+
1188
+ function columnIndex(column) {
1189
+ var colIndex = 0;
1190
+ var c = column;
1191
+ while (c.previousSibling) {
1192
+ c = c.previousSibling;
1193
+ colIndex = colIndex + getSpanVal(c, "colspan");
1194
+ }
1195
+ return colIndex;
1196
+ }
1197
+
1198
+ function findColumn(rowElement, columnIndex) {
1199
+ var c = 0;
1200
+ var r = 0;
1201
+ each(rowElement.children, function(cell, i) {
1202
+ c = c + getSpanVal(cell, "colspan");
1203
+ r = i;
1204
+ if (c > columnIndex)
1205
+ return false;
1206
+ });
1207
+ return r;
1208
+ }
1209
+
1210
+ function moveCursorToRow(ed, node, row, upBool) {
1211
+ var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
1212
+ var tgtColumnIndex = findColumn(row, srcColumnIndex);
1213
+ var tgtNode = row.childNodes[tgtColumnIndex];
1214
+ var rowCellTarget = getChildForDirection(tgtNode, upBool);
1215
+ moveCursorToStartOfElement(rowCellTarget || tgtNode);
1216
+ }
1217
+
1218
+ function shouldFixCaret(preBrowserNode) {
1219
+ var newNode = ed.selection.getNode();
1220
+ var newParent = ed.dom.getParent(newNode, 'td,th');
1221
+ var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
1222
+ return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
1223
+ }
1224
+
1225
+ function checkSameParentTable(nodeOne, NodeTwo) {
1226
+ return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
1227
+ }
1228
+
1229
+ if (isVerticalMovement() && isInTable(ed)) {
1230
+ var preBrowserNode = ed.selection.getNode();
1231
+ setTimeout(function() {
1232
+ if (shouldFixCaret(preBrowserNode)) {
1233
+ handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
1234
+ }
1235
+ }, 0);
1236
+ }
1237
+ }
1238
+
1239
+ ed.onKeyDown.add(moveSelection);
1240
+ }
1241
+
1242
+ // Fixes an issue on Gecko where it's impossible to place the caret behind a table
1243
+ // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
1244
+ function fixTableCaretPos() {
1245
+ var last;
1246
+
1247
+ // Skip empty text nodes form the end
1248
+ for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
1249
+
1250
+ if (last && last.nodeName == 'TABLE') {
1251
+ if (ed.settings.forced_root_block)
1252
+ ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />');
1253
+ else
1254
+ ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
1255
+ }
1256
+ };
1257
+
1258
+ // Fixes an bug where it's impossible to place the caret before a table in Gecko
1259
+ // this fix solves it by detecting when the caret is at the beginning of such a table
1260
+ // and then manually moves the caret infront of the table
1261
+ if (tinymce.isGecko) {
1262
+ ed.onKeyDown.add(function(ed, e) {
1263
+ var rng, table, dom = ed.dom;
1264
+
1265
+ // On gecko it's not possible to place the caret before a table
1266
+ if (e.keyCode == 37 || e.keyCode == 38) {
1267
+ rng = ed.selection.getRng();
1268
+ table = dom.getParent(rng.startContainer, 'table');
1269
+
1270
+ if (table && ed.getBody().firstChild == table) {
1271
+ if (isAtStart(rng, table)) {
1272
+ rng = dom.createRng();
1273
+
1274
+ rng.setStartBefore(table);
1275
+ rng.setEndBefore(table);
1276
+
1277
+ ed.selection.setRng(rng);
1278
+
1279
+ e.preventDefault();
1280
+ }
1281
+ }
1282
+ }
1283
+ });
1284
+ }
1285
+
1286
+ ed.onKeyUp.add(fixTableCaretPos);
1287
+ ed.onSetContent.add(fixTableCaretPos);
1288
+ ed.onVisualAid.add(fixTableCaretPos);
1289
+
1290
+ ed.onPreProcess.add(function(ed, o) {
1291
+ var last = o.node.lastChild;
1292
+
1293
+ if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") {
1294
+ ed.dom.remove(last);
1295
+ }
1296
+ });
1297
+
1298
+
1299
+ /**
1300
+ * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
1301
+ *
1302
+ * Removed: Since the new enter logic seems to fix this one.
1303
+ */
1304
+ /*
1305
+ if (tinymce.isGecko) {
1306
+ ed.onKeyDown.add(function(ed, e) {
1307
+ if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
1308
+ var node = ed.selection.getRng().startContainer;
1309
+ var tableCell = dom.getParent(node, 'td,th');
1310
+ if (tableCell) {
1311
+ var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
1312
+ dom.insertAfter(zeroSizedNbsp, node);
1313
+ }
1314
+ }
1315
+ });
1316
+ }
1317
+ */
1318
+
1319
+ fixTableCaretPos();
1320
+ ed.startContent = ed.getContent({format : 'raw'});
1321
+ });
1322
+
1323
+ // Register action commands
1324
+ each({
1325
+ mceTableSplitCells : function(grid) {
1326
+ grid.split();
1327
+ },
1328
+
1329
+ mceTableMergeCells : function(grid) {
1330
+ var rowSpan, colSpan, cell;
1331
+
1332
+ cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
1333
+ if (cell) {
1334
+ rowSpan = cell.rowSpan;
1335
+ colSpan = cell.colSpan;
1336
+ }
1337
+
1338
+ if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
1339
+ winMan.open({
1340
+ url : url + '/merge_cells.htm',
1341
+ width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
1342
+ height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
1343
+ inline : 1
1344
+ }, {
1345
+ rows : rowSpan,
1346
+ cols : colSpan,
1347
+ onaction : function(data) {
1348
+ grid.merge(cell, data.cols, data.rows);
1349
+ },
1350
+ plugin_url : url
1351
+ });
1352
+ } else
1353
+ grid.merge();
1354
+ },
1355
+
1356
+ mceTableInsertRowBefore : function(grid) {
1357
+ grid.insertRow(true);
1358
+ },
1359
+
1360
+ mceTableInsertRowAfter : function(grid) {
1361
+ grid.insertRow();
1362
+ },
1363
+
1364
+ mceTableInsertColBefore : function(grid) {
1365
+ grid.insertCol(true);
1366
+ },
1367
+
1368
+ mceTableInsertColAfter : function(grid) {
1369
+ grid.insertCol();
1370
+ },
1371
+
1372
+ mceTableDeleteCol : function(grid) {
1373
+ grid.deleteCols();
1374
+ },
1375
+
1376
+ mceTableDeleteRow : function(grid) {
1377
+ grid.deleteRows();
1378
+ },
1379
+
1380
+ mceTableCutRow : function(grid) {
1381
+ clipboardRows = grid.cutRows();
1382
+ },
1383
+
1384
+ mceTableCopyRow : function(grid) {
1385
+ clipboardRows = grid.copyRows();
1386
+ },
1387
+
1388
+ mceTablePasteRowBefore : function(grid) {
1389
+ grid.pasteRows(clipboardRows, true);
1390
+ },
1391
+
1392
+ mceTablePasteRowAfter : function(grid) {
1393
+ grid.pasteRows(clipboardRows);
1394
+ },
1395
+
1396
+ mceTableDelete : function(grid) {
1397
+ grid.deleteTable();
1398
+ }
1399
+ }, function(func, name) {
1400
+ ed.addCommand(name, function() {
1401
+ var grid = createTableGrid();
1402
+
1403
+ if (grid) {
1404
+ func(grid);
1405
+ ed.execCommand('mceRepaint');
1406
+ cleanup();
1407
+ }
1408
+ });
1409
+ });
1410
+
1411
+ // Register dialog commands
1412
+ each({
1413
+ mceInsertTable : function(val) {
1414
+ winMan.open({
1415
+ url : url + '/table.htm',
1416
+ width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
1417
+ height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
1418
+ inline : 1
1419
+ }, {
1420
+ plugin_url : url,
1421
+ action : val ? val.action : 0
1422
+ });
1423
+ },
1424
+
1425
+ mceTableRowProps : function() {
1426
+ winMan.open({
1427
+ url : url + '/row.htm',
1428
+ width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
1429
+ height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
1430
+ inline : 1
1431
+ }, {
1432
+ plugin_url : url
1433
+ });
1434
+ },
1435
+
1436
+ mceTableCellProps : function() {
1437
+ winMan.open({
1438
+ url : url + '/cell.htm',
1439
+ width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
1440
+ height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
1441
+ inline : 1
1442
+ }, {
1443
+ plugin_url : url
1444
+ });
1445
+ }
1446
+ }, function(func, name) {
1447
+ ed.addCommand(name, function(ui, val) {
1448
+ func(val);
1449
+ });
1450
+ });
1451
+ }
1452
+ });
1453
+
1454
+ // Register plugin
1455
+ tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
1456
+ })(tinymce);
js/tinymce/jscripts/tiny_mce/plugins/table/js/table.js CHANGED
@@ -242,16 +242,16 @@ function insertTable() {
242
  } else
243
  inst.execCommand('mceInsertContent', false, html);
244
 
245
- tinymce.each(dom.select('table[data-mce-new]'), function(node) {
246
  var tdorth = dom.select('td,th', node);
247
-
248
  // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
249
  if (tinymce.isIE && node.nextSibling == null) {
250
  if (inst.settings.forced_root_block)
251
  dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
252
  else
253
  dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
254
- }
255
 
256
  try {
257
  // IE9 might fail to do this selection
242
  } else
243
  inst.execCommand('mceInsertContent', false, html);
244
 
245
+ tinymce.each(dom.select('table[data-mce-new]'), function(node) {
246
  var tdorth = dom.select('td,th', node);
247
+
248
  // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
249
  if (tinymce.isIE && node.nextSibling == null) {
250
  if (inst.settings.forced_root_block)
251
  dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
252
  else
253
  dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
254
+ }
255
 
256
  try {
257
  // IE9 might fail to do this selection
js/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js CHANGED
@@ -1,345 +1,345 @@
1
- tinyMCEPopup.requireLangPack();
2
-
3
- var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
4
-
5
- var colors = [
6
- "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
7
- "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
8
- "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
9
- "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
10
- "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
11
- "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
12
- "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
13
- "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
14
- "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
15
- "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
16
- "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
17
- "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
18
- "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
19
- "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
20
- "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
21
- "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
22
- "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
23
- "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
24
- "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
25
- "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
26
- "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
27
- "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
28
- "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
29
- "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
30
- "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
31
- "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
32
- "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
33
- ];
34
-
35
- var named = {
36
- '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
37
- '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
38
- '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
39
- '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
40
- '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
41
- '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
42
- '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
43
- '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
44
- '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
45
- '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
46
- '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
47
- '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
48
- '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
49
- '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
50
- '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
51
- '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
52
- '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
53
- '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
54
- '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
55
- '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
56
- '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
57
- '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
58
- '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
59
- };
60
-
61
- var namedLookup = {};
62
-
63
- function init() {
64
- var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
65
-
66
- tinyMCEPopup.resizeToInnerSize();
67
-
68
- generatePicker();
69
- generateWebColors();
70
- generateNamedColors();
71
-
72
- if (inputColor) {
73
- changeFinalColor(inputColor);
74
-
75
- col = convertHexToRGB(inputColor);
76
-
77
- if (col)
78
- updateLight(col.r, col.g, col.b);
79
- }
80
-
81
- for (key in named) {
82
- value = named[key];
83
- namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
84
- }
85
- }
86
-
87
- function toHexColor(color) {
88
- var matches, red, green, blue, toInt = parseInt;
89
-
90
- function hex(value) {
91
- value = parseInt(value).toString(16);
92
-
93
- return value.length > 1 ? value : '0' + value; // Padd with leading zero
94
- };
95
-
96
- color = tinymce.trim(color);
97
- color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
98
- color = namedLookup[color] || color;
99
-
100
- matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
101
-
102
- if (matches) {
103
- red = toInt(matches[1]);
104
- green = toInt(matches[2]);
105
- blue = toInt(matches[3]);
106
- } else {
107
- matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
108
-
109
- if (matches) {
110
- red = toInt(matches[1], 16);
111
- green = toInt(matches[2], 16);
112
- blue = toInt(matches[3], 16);
113
- } else {
114
- matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
115
-
116
- if (matches) {
117
- red = toInt(matches[1] + matches[1], 16);
118
- green = toInt(matches[2] + matches[2], 16);
119
- blue = toInt(matches[3] + matches[3], 16);
120
- } else {
121
- return '';
122
- }
123
- }
124
- }
125
-
126
- return '#' + hex(red) + hex(green) + hex(blue);
127
- }
128
-
129
- function insertAction() {
130
- var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
131
-
132
- var hexColor = toHexColor(color);
133
-
134
- if (hexColor === '') {
135
- var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
136
- tinyMCEPopup.alert(text + ': ' + color);
137
- }
138
- else {
139
- tinyMCEPopup.restoreSelection();
140
-
141
- if (f)
142
- f(hexColor);
143
-
144
- tinyMCEPopup.close();
145
- }
146
- }
147
-
148
- function showColor(color, name) {
149
- if (name)
150
- document.getElementById("colorname").innerHTML = name;
151
-
152
- document.getElementById("preview").style.backgroundColor = color;
153
- document.getElementById("color").value = color.toUpperCase();
154
- }
155
-
156
- function convertRGBToHex(col) {
157
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
158
-
159
- if (!col)
160
- return col;
161
-
162
- var rgb = col.replace(re, "$1,$2,$3").split(',');
163
- if (rgb.length == 3) {
164
- r = parseInt(rgb[0]).toString(16);
165
- g = parseInt(rgb[1]).toString(16);
166
- b = parseInt(rgb[2]).toString(16);
167
-
168
- r = r.length == 1 ? '0' + r : r;
169
- g = g.length == 1 ? '0' + g : g;
170
- b = b.length == 1 ? '0' + b : b;
171
-
172
- return "#" + r + g + b;
173
- }
174
-
175
- return col;
176
- }
177
-
178
- function convertHexToRGB(col) {
179
- if (col.indexOf('#') != -1) {
180
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
181
-
182
- r = parseInt(col.substring(0, 2), 16);
183
- g = parseInt(col.substring(2, 4), 16);
184
- b = parseInt(col.substring(4, 6), 16);
185
-
186
- return {r : r, g : g, b : b};
187
- }
188
-
189
- return null;
190
- }
191
-
192
- function generatePicker() {
193
- var el = document.getElementById('light'), h = '', i;
194
-
195
- for (i = 0; i < detail; i++){
196
- h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
197
- + ' onclick="changeFinalColor(this.style.backgroundColor)"'
198
- + ' onmousedown="isMouseDown = true; return false;"'
199
- + ' onmouseup="isMouseDown = false;"'
200
- + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
201
- + ' onmouseover="isMouseOver = true;"'
202
- + ' onmouseout="isMouseOver = false;"'
203
- + '></div>';
204
- }
205
-
206
- el.innerHTML = h;
207
- }
208
-
209
- function generateWebColors() {
210
- var el = document.getElementById('webcolors'), h = '', i;
211
-
212
- if (el.className == 'generated')
213
- return;
214
-
215
- // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
216
- h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
217
- + '<tr>';
218
-
219
- for (i=0; i<colors.length; i++) {
220
- h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
221
- + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
222
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
223
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
224
- }
225
- h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
226
- h += '</a></td>';
227
- if ((i+1) % 18 == 0)
228
- h += '</tr><tr>';
229
- }
230
-
231
- h += '</table></div>';
232
-
233
- el.innerHTML = h;
234
- el.className = 'generated';
235
-
236
- paintCanvas(el);
237
- enableKeyboardNavigation(el.firstChild);
238
- }
239
-
240
- function paintCanvas(el) {
241
- tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
242
- var context;
243
- if (canvas.getContext && (context = canvas.getContext("2d"))) {
244
- context.fillStyle = canvas.getAttribute('data-color');
245
- context.fillRect(0, 0, 10, 10);
246
- }
247
- });
248
- }
249
- function generateNamedColors() {
250
- var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
251
-
252
- if (el.className == 'generated')
253
- return;
254
-
255
- for (n in named) {
256
- v = named[n];
257
- h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
258
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
259
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
260
- }
261
- h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
262
- h += '</a>';
263
- i++;
264
- }
265
-
266
- el.innerHTML = h;
267
- el.className = 'generated';
268
-
269
- paintCanvas(el);
270
- enableKeyboardNavigation(el);
271
- }
272
-
273
- function enableKeyboardNavigation(el) {
274
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
275
- root: el,
276
- items: tinyMCEPopup.dom.select('a', el)
277
- }, tinyMCEPopup.dom);
278
- }
279
-
280
- function dechex(n) {
281
- return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
282
- }
283
-
284
- function computeColor(e) {
285
- var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
286
-
287
- x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
288
- y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
289
-
290
- partWidth = document.getElementById('colors').width / 6;
291
- partDetail = detail / 2;
292
- imHeight = document.getElementById('colors').height;
293
-
294
- r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
295
- g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
296
- b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
297
-
298
- coef = (imHeight - y) / imHeight;
299
- r = 128 + (r - 128) * coef;
300
- g = 128 + (g - 128) * coef;
301
- b = 128 + (b - 128) * coef;
302
-
303
- changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
304
- updateLight(r, g, b);
305
- }
306
-
307
- function updateLight(r, g, b) {
308
- var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
309
-
310
- for (i=0; i<detail; i++) {
311
- if ((i>=0) && (i<partDetail)) {
312
- finalCoef = i / partDetail;
313
- finalR = dechex(255 - (255 - r) * finalCoef);
314
- finalG = dechex(255 - (255 - g) * finalCoef);
315
- finalB = dechex(255 - (255 - b) * finalCoef);
316
- } else {
317
- finalCoef = 2 - i / partDetail;
318
- finalR = dechex(r * finalCoef);
319
- finalG = dechex(g * finalCoef);
320
- finalB = dechex(b * finalCoef);
321
- }
322
-
323
- color = finalR + finalG + finalB;
324
-
325
- setCol('gs' + i, '#'+color);
326
- }
327
- }
328
-
329
- function changeFinalColor(color) {
330
- if (color.indexOf('#') == -1)
331
- color = convertRGBToHex(color);
332
-
333
- setCol('preview', color);
334
- document.getElementById('color').value = color;
335
- }
336
-
337
- function setCol(e, c) {
338
- try {
339
- document.getElementById(e).style.backgroundColor = c;
340
- } catch (ex) {
341
- // Ignore IE warning
342
- }
343
- }
344
-
345
- tinyMCEPopup.onInit.add(init);
1
+ tinyMCEPopup.requireLangPack();
2
+
3
+ var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
4
+
5
+ var colors = [
6
+ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
7
+ "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
8
+ "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
9
+ "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
10
+ "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
11
+ "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
12
+ "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
13
+ "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
14
+ "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
15
+ "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
16
+ "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
17
+ "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
18
+ "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
19
+ "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
20
+ "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
21
+ "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
22
+ "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
23
+ "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
24
+ "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
25
+ "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
26
+ "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
27
+ "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
28
+ "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
29
+ "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
30
+ "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
31
+ "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
32
+ "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
33
+ ];
34
+
35
+ var named = {
36
+ '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
37
+ '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
38
+ '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
39
+ '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
40
+ '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
41
+ '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
42
+ '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
43
+ '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
44
+ '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
45
+ '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
46
+ '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
47
+ '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
48
+ '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
49
+ '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
50
+ '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
51
+ '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
52
+ '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
53
+ '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
54
+ '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
55
+ '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
56
+ '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
57
+ '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
58
+ '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
59
+ };
60
+
61
+ var namedLookup = {};
62
+
63
+ function init() {
64
+ var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
65
+
66
+ tinyMCEPopup.resizeToInnerSize();
67
+
68
+ generatePicker();
69
+ generateWebColors();
70
+ generateNamedColors();
71
+
72
+ if (inputColor) {
73
+ changeFinalColor(inputColor);
74
+
75
+ col = convertHexToRGB(inputColor);
76
+
77
+ if (col)
78
+ updateLight(col.r, col.g, col.b);
79
+ }
80
+
81
+ for (key in named) {
82
+ value = named[key];
83
+ namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
84
+ }
85
+ }
86
+
87
+ function toHexColor(color) {
88
+ var matches, red, green, blue, toInt = parseInt;
89
+
90
+ function hex(value) {
91
+ value = parseInt(value).toString(16);
92
+
93
+ return value.length > 1 ? value : '0' + value; // Padd with leading zero
94
+ };
95
+
96
+ color = tinymce.trim(color);
97
+ color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
98
+ color = namedLookup[color] || color;
99
+
100
+ matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
101
+
102
+ if (matches) {
103
+ red = toInt(matches[1]);
104
+ green = toInt(matches[2]);
105
+ blue = toInt(matches[3]);
106
+ } else {
107
+ matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
108
+
109
+ if (matches) {
110
+ red = toInt(matches[1], 16);
111
+ green = toInt(matches[2], 16);
112
+ blue = toInt(matches[3], 16);
113
+ } else {
114
+ matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
115
+
116
+ if (matches) {
117
+ red = toInt(matches[1] + matches[1], 16);
118
+ green = toInt(matches[2] + matches[2], 16);
119
+ blue = toInt(matches[3] + matches[3], 16);
120
+ } else {
121
+ return '';
122
+ }
123
+ }
124
+ }
125
+
126
+ return '#' + hex(red) + hex(green) + hex(blue);
127
+ }
128
+
129
+ function insertAction() {
130
+ var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
131
+
132
+ var hexColor = toHexColor(color);
133
+
134
+ if (hexColor === '') {
135
+ var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
136
+ tinyMCEPopup.alert(text + ': ' + color);
137
+ }
138
+ else {
139
+ tinyMCEPopup.restoreSelection();
140
+
141
+ if (f)
142
+ f(hexColor);
143
+
144
+ tinyMCEPopup.close();
145
+ }
146
+ }
147
+
148
+ function showColor(color, name) {
149
+ if (name)
150
+ document.getElementById("colorname").innerHTML = name;
151
+
152
+ document.getElementById("preview").style.backgroundColor = color;
153
+ document.getElementById("color").value = color.toUpperCase();
154
+ }
155
+
156
+ function convertRGBToHex(col) {
157
+ var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
158
+
159
+ if (!col)
160
+ return col;
161
+
162
+ var rgb = col.replace(re, "$1,$2,$3").split(',');
163
+ if (rgb.length == 3) {
164
+ r = parseInt(rgb[0]).toString(16);
165
+ g = parseInt(rgb[1]).toString(16);
166
+ b = parseInt(rgb[2]).toString(16);
167
+
168
+ r = r.length == 1 ? '0' + r : r;
169
+ g = g.length == 1 ? '0' + g : g;
170
+ b = b.length == 1 ? '0' + b : b;
171
+
172
+ return "#" + r + g + b;
173
+ }
174
+
175
+ return col;
176
+ }
177
+
178
+ function convertHexToRGB(col) {
179
+ if (col.indexOf('#') != -1) {
180
+ col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
181
+
182
+ r = parseInt(col.substring(0, 2), 16);
183
+ g = parseInt(col.substring(2, 4), 16);
184
+ b = parseInt(col.substring(4, 6), 16);
185
+
186
+ return {r : r, g : g, b : b};
187
+ }
188
+
189
+ return null;
190
+ }
191
+
192
+ function generatePicker() {
193
+ var el = document.getElementById('light'), h = '', i;
194
+
195
+ for (i = 0; i < detail; i++){
196
+ h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
197
+ + ' onclick="changeFinalColor(this.style.backgroundColor)"'
198
+ + ' onmousedown="isMouseDown = true; return false;"'
199
+ + ' onmouseup="isMouseDown = false;"'
200
+ + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
201
+ + ' onmouseover="isMouseOver = true;"'
202
+ + ' onmouseout="isMouseOver = false;"'
203
+ + '></div>';
204
+ }
205
+
206
+ el.innerHTML = h;
207
+ }
208
+
209
+ function generateWebColors() {
210
+ var el = document.getElementById('webcolors'), h = '', i;
211
+
212
+ if (el.className == 'generated')
213
+ return;
214
+
215
+ // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
216
+ h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
217
+ + '<tr>';
218
+
219
+ for (i=0; i<colors.length; i++) {
220
+ h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
221
+ + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
222
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
223
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
224
+ }
225
+ h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
226
+ h += '</a></td>';
227
+ if ((i+1) % 18 == 0)
228
+ h += '</tr><tr>';
229
+ }
230
+
231
+ h += '</table></div>';
232
+
233
+ el.innerHTML = h;
234
+ el.className = 'generated';
235
+
236
+ paintCanvas(el);
237
+ enableKeyboardNavigation(el.firstChild);
238
+ }
239
+
240
+ function paintCanvas(el) {
241
+ tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
242
+ var context;
243
+ if (canvas.getContext && (context = canvas.getContext("2d"))) {
244
+ context.fillStyle = canvas.getAttribute('data-color');
245
+ context.fillRect(0, 0, 10, 10);
246
+ }
247
+ });
248
+ }
249
+ function generateNamedColors() {
250
+ var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
251
+
252
+ if (el.className == 'generated')
253
+ return;
254
+
255
+ for (n in named) {
256
+ v = named[n];
257
+ h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
258
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
259
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
260
+ }
261
+ h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
262
+ h += '</a>';
263
+ i++;
264
+ }
265
+
266
+ el.innerHTML = h;
267
+ el.className = 'generated';
268
+
269
+ paintCanvas(el);
270
+ enableKeyboardNavigation(el);
271
+ }
272
+
273
+ function enableKeyboardNavigation(el) {
274
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
275
+ root: el,
276
+ items: tinyMCEPopup.dom.select('a', el)
277
+ }, tinyMCEPopup.dom);
278
+ }
279
+
280
+ function dechex(n) {
281
+ return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
282
+ }
283
+
284
+ function computeColor(e) {
285
+ var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
286
+
287
+ x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
288
+ y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
289
+
290
+ partWidth = document.getElementById('colors').width / 6;
291
+ partDetail = detail / 2;
292
+ imHeight = document.getElementById('colors').height;
293
+
294
+ r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
295
+ g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
296
+ b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
297
+
298
+ coef = (imHeight - y) / imHeight;
299
+ r = 128 + (r - 128) * coef;
300
+ g = 128 + (g - 128) * coef;
301
+ b = 128 + (b - 128) * coef;
302
+
303
+ changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
304
+ updateLight(r, g, b);
305
+ }
306
+
307
+ function updateLight(r, g, b) {
308
+ var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
309
+
310
+ for (i=0; i<detail; i++) {
311
+ if ((i>=0) && (i<partDetail)) {
312
+ finalCoef = i / partDetail;
313
+ finalR = dechex(255 - (255 - r) * finalCoef);
314
+ finalG = dechex(255 - (255 - g) * finalCoef);
315
+ finalB = dechex(255 - (255 - b) * finalCoef);
316
+ } else {
317
+ finalCoef = 2 - i / partDetail;
318
+ finalR = dechex(r * finalCoef);
319
+ finalG = dechex(g * finalCoef);
320
+ finalB = dechex(b * finalCoef);
321
+ }
322
+
323
+ color = finalR + finalG + finalB;
324
+
325
+ setCol('gs' + i, '#'+color);
326
+ }
327
+ }
328
+
329
+ function changeFinalColor(color) {
330
+ if (color.indexOf('#') == -1)
331
+ color = convertRGBToHex(color);
332
+
333
+ setCol('preview', color);
334
+ document.getElementById('color').value = color;
335
+ }
336
+
337
+ function setCol(e, c) {
338
+ try {
339
+ document.getElementById(e).style.backgroundColor = c;
340
+ } catch (ex) {
341
+ // Ignore IE warning
342
+ }
343
+ }
344
+
345
+ tinyMCEPopup.onInit.add(init);
js/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js CHANGED
@@ -1 +1 @@
1
- tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""});
1
+ tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""});
js/tinymce/jscripts/tiny_mce/tiny_mce_popup.js CHANGED
@@ -1,5 +1,5 @@
1
-
2
- // Uncomment and change this document.domain value if you are loading the script cross subdomains
3
- // document.domain = 'moxiecode.com';
4
-
5
  var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
1
+
2
+ // Uncomment and change this document.domain value if you are loading the script cross subdomains
3
+ // document.domain = 'moxiecode.com';
4
+
5
  var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init();
languages/messages.pot CHANGED
@@ -1,268 +1,268 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #, fuzzy
7
- msgid ""
8
- msgstr ""
9
- "Project-Id-Version: PACKAGE VERSION\n"
10
- "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2015-07-08 16:30+0530\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"
15
- "Language: \n"
16
- "MIME-Version: 1.0\n"
17
- "Content-Type: text/plain; charset=CHARSET\n"
18
- "Content-Transfer-Encoding: 8bit\n"
19
-
20
- #: woocommerce-ac.php:22
21
- msgid "Once Every Five Minutes"
22
- msgstr ""
23
-
24
- #: woocommerce-ac.php:204
25
- #, php-format
26
- msgid ""
27
- "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
28
- "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
29
- "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
30
- "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
31
- "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
32
- msgstr ""
33
-
34
- #: woocommerce-ac.php:314
35
- msgid "Abandoned Carts"
36
- msgstr ""
37
-
38
- #: woocommerce-ac.php:516
39
- msgid "Abandoned Orders"
40
- msgstr ""
41
-
42
- #: woocommerce-ac.php:517
43
- msgid "Email Templates"
44
- msgstr ""
45
-
46
- #: woocommerce-ac.php:518 woocommerce-ac.php:712
47
- msgid "Settings"
48
- msgstr ""
49
-
50
- #: woocommerce-ac.php:519
51
- msgid "Recovered Orders"
52
- msgstr ""
53
-
54
- #: woocommerce-ac.php:661
55
- msgid "You do not have sufficient permissions to access this page."
56
- msgstr ""
57
-
58
- #: woocommerce-ac.php:670
59
- msgid "WooCommerce - Abandon Cart Lite"
60
- msgstr ""
61
-
62
- #: woocommerce-ac.php:696
63
- msgid "Your settings have been saved."
64
- msgstr ""
65
-
66
- #: woocommerce-ac.php:718
67
- msgid "Cart abandoned cut-off time"
68
- msgstr ""
69
-
70
- #: woocommerce-ac.php:741
71
- msgid "minutes"
72
- msgstr ""
73
-
74
- #: woocommerce-ac.php:742 woocommerce-ac.php:743
75
- msgid ""
76
- "Consider cart abandoned after X minutes of item being added to cart & order "
77
- "not placed"
78
- msgstr ""
79
-
80
- #: woocommerce-ac.php:753
81
- msgid "Save Changes"
82
- msgstr ""
83
-
84
- #: woocommerce-ac.php:763
85
- msgid ""
86
- "The list below shows all Abandoned Carts which have remained in cart for a "
87
- "time higher than the \"Cart abandoned cut-off time\" setting."
88
- msgstr ""
89
-
90
- #: woocommerce-ac.php:858 woocommerce-ac.php:1501
91
- msgid "Customer"
92
- msgstr ""
93
-
94
- #: woocommerce-ac.php:859 woocommerce-ac.php:1514
95
- msgid "Order Total"
96
- msgstr ""
97
-
98
- #: woocommerce-ac.php:862
99
- msgid "Date"
100
- msgstr ""
101
-
102
- #: woocommerce-ac.php:868
103
- msgid "Status"
104
- msgstr ""
105
-
106
- #: woocommerce-ac.php:872 woocommerce-ac.php:1159
107
- msgid "Actions"
108
- msgstr ""
109
-
110
- #: woocommerce-ac.php:953
111
- msgid ""
112
- "Add email templates at different intervals to maximize the possibility of "
113
- "recovering your abandoned carts."
114
- msgstr ""
115
-
116
- #: woocommerce-ac.php:1054
117
- msgid "The Email Template has been successfully added."
118
- msgstr ""
119
-
120
- #: woocommerce-ac.php:1057
121
- msgid "The Email Template has been successfully updated."
122
- msgstr ""
123
-
124
- #: woocommerce-ac.php:1145
125
- msgid "Sr"
126
- msgstr ""
127
-
128
- #: woocommerce-ac.php:1148
129
- msgid "Template Name"
130
- msgstr ""
131
-
132
- #: woocommerce-ac.php:1154
133
- msgid "Sent"
134
- msgstr ""
135
-
136
- #: woocommerce-ac.php:1158
137
- msgid "Active ?"
138
- msgstr ""
139
-
140
- #: woocommerce-ac.php:1276
141
- msgid ""
142
- "The Report below shows how many Abandoned Carts we were able to recover for "
143
- "you by sending automatic emails to encourage shoppers."
144
- msgstr ""
145
-
146
- #: woocommerce-ac.php:1331
147
- msgid "Start Date:"
148
- msgstr ""
149
-
150
- #: woocommerce-ac.php:1334
151
- msgid "End Date:"
152
- msgstr ""
153
-
154
- #: woocommerce-ac.php:1337
155
- msgid "Go"
156
- msgstr ""
157
-
158
- #: woocommerce-ac.php:1495
159
- msgid "During the selected range"
160
- msgstr ""
161
-
162
- #: woocommerce-ac.php:1495
163
- msgid "carts totaling"
164
- msgstr ""
165
-
166
- #: woocommerce-ac.php:1495
167
- msgid "were abandoned. We were able to recover"
168
- msgstr ""
169
-
170
- #: woocommerce-ac.php:1495
171
- msgid "of them, which led to an extra"
172
- msgstr ""
173
-
174
- #: woocommerce-ac.php:1495
175
- msgid "in sales"
176
- msgstr ""
177
-
178
- #: woocommerce-ac.php:1504
179
- msgid "Created On"
180
- msgstr ""
181
-
182
- #: woocommerce-ac.php:1510
183
- msgid "Recovered Date"
184
- msgstr ""
185
-
186
- #: woocommerce-ac.php:1561
187
- msgid "Template Name:"
188
- msgstr ""
189
-
190
- #: woocommerce-ac.php:1572
191
- msgid "Enter a template name for reference"
192
- msgstr ""
193
-
194
- #: woocommerce-ac.php:1577
195
- msgid "Send From This Name:"
196
- msgstr ""
197
-
198
- #: woocommerce-ac.php:1588
199
- msgid "Enter the name that should appear in the email sent"
200
- msgstr ""
201
-
202
- #: woocommerce-ac.php:1594
203
- msgid "Subject:"
204
- msgstr ""
205
-
206
- #: woocommerce-ac.php:1605
207
- msgid "Enter the subject that should appear in the email sent"
208
- msgstr ""
209
-
210
- #: woocommerce-ac.php:1611
211
- msgid "Email Body:"
212
- msgstr ""
213
-
214
- #: woocommerce-ac.php:1627
215
- msgid "Message to be sent in the reminder email."
216
- msgstr ""
217
-
218
- #: woocommerce-ac.php:1634
219
- msgid "Send this email:"
220
- msgstr ""
221
-
222
- #: woocommerce-ac.php:1686
223
- msgid "after cart is abandoned."
224
- msgstr ""
225
-
226
- #: woocommerce-ac.php:1693
227
- msgid "Send a test email to:"
228
- msgstr ""
229
-
230
- #: woocommerce-ac.php:1699
231
- msgid "Enter the email id to which the test email needs to be sent."
232
- msgstr ""
233
-
234
- #: woocommerce-ac.php:1835 send_email.php:109
235
- msgid "Your Shopping Cart"
236
- msgstr ""
237
-
238
- #: woocommerce-ac.php:1838 send_email.php:112
239
- msgid "Item"
240
- msgstr ""
241
-
242
- #: woocommerce-ac.php:1839 send_email.php:113
243
- msgid "Name"
244
- msgstr ""
245
-
246
- #: woocommerce-ac.php:1840 send_email.php:114
247
- msgid "Quantity"
248
- msgstr ""
249
-
250
- #: woocommerce-ac.php:1841 send_email.php:115
251
- msgid "Price"
252
- msgstr ""
253
-
254
- #: woocommerce-ac.php:1842 send_email.php:116
255
- msgid "Line Subtotal"
256
- msgstr ""
257
-
258
- #: woocommerce-ac.php:1846
259
- msgid "Men\\'\\s Formal Shoes"
260
- msgstr ""
261
-
262
- #: woocommerce-ac.php:1853
263
- msgid "Woman\\'\\s Hand Bags"
264
- msgstr ""
265
-
266
- #: woocommerce-ac.php:1862 send_email.php:160
267
- msgid "Cart Total:"
268
- msgstr ""
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2015-07-08 16:30+0530\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"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=CHARSET\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+
20
+ #: woocommerce-ac.php:22
21
+ msgid "Once Every Five Minutes"
22
+ msgstr ""
23
+
24
+ #: woocommerce-ac.php:204
25
+ #, php-format
26
+ msgid ""
27
+ "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
28
+ "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
29
+ "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
30
+ "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
31
+ "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
32
+ msgstr ""
33
+
34
+ #: woocommerce-ac.php:314
35
+ msgid "Abandoned Carts"
36
+ msgstr ""
37
+
38
+ #: woocommerce-ac.php:516
39
+ msgid "Abandoned Orders"
40
+ msgstr ""
41
+
42
+ #: woocommerce-ac.php:517
43
+ msgid "Email Templates"
44
+ msgstr ""
45
+
46
+ #: woocommerce-ac.php:518 woocommerce-ac.php:712
47
+ msgid "Settings"
48
+ msgstr ""
49
+
50
+ #: woocommerce-ac.php:519
51
+ msgid "Recovered Orders"
52
+ msgstr ""
53
+
54
+ #: woocommerce-ac.php:661
55
+ msgid "You do not have sufficient permissions to access this page."
56
+ msgstr ""
57
+
58
+ #: woocommerce-ac.php:670
59
+ msgid "WooCommerce - Abandon Cart Lite"
60
+ msgstr ""
61
+
62
+ #: woocommerce-ac.php:696
63
+ msgid "Your settings have been saved."
64
+ msgstr ""
65
+
66
+ #: woocommerce-ac.php:718
67
+ msgid "Cart abandoned cut-off time"
68
+ msgstr ""
69
+
70
+ #: woocommerce-ac.php:741
71
+ msgid "minutes"
72
+ msgstr ""
73
+
74
+ #: woocommerce-ac.php:742 woocommerce-ac.php:743
75
+ msgid ""
76
+ "Consider cart abandoned after X minutes of item being added to cart & order "
77
+ "not placed"
78
+ msgstr ""
79
+
80
+ #: woocommerce-ac.php:753
81
+ msgid "Save Changes"
82
+ msgstr ""
83
+
84
+ #: woocommerce-ac.php:763
85
+ msgid ""
86
+ "The list below shows all Abandoned Carts which have remained in cart for a "
87
+ "time higher than the \"Cart abandoned cut-off time\" setting."
88
+ msgstr ""
89
+
90
+ #: woocommerce-ac.php:858 woocommerce-ac.php:1501
91
+ msgid "Customer"
92
+ msgstr ""
93
+
94
+ #: woocommerce-ac.php:859 woocommerce-ac.php:1514
95
+ msgid "Order Total"
96
+ msgstr ""
97
+
98
+ #: woocommerce-ac.php:862
99
+ msgid "Date"
100
+ msgstr ""
101
+
102
+ #: woocommerce-ac.php:868
103
+ msgid "Status"
104
+ msgstr ""
105
+
106
+ #: woocommerce-ac.php:872 woocommerce-ac.php:1159
107
+ msgid "Actions"
108
+ msgstr ""
109
+
110
+ #: woocommerce-ac.php:953
111
+ msgid ""
112
+ "Add email templates at different intervals to maximize the possibility of "
113
+ "recovering your abandoned carts."
114
+ msgstr ""
115
+
116
+ #: woocommerce-ac.php:1054
117
+ msgid "The Email Template has been successfully added."
118
+ msgstr ""
119
+
120
+ #: woocommerce-ac.php:1057
121
+ msgid "The Email Template has been successfully updated."
122
+ msgstr ""
123
+
124
+ #: woocommerce-ac.php:1145
125
+ msgid "Sr"
126
+ msgstr ""
127
+
128
+ #: woocommerce-ac.php:1148
129
+ msgid "Template Name"
130
+ msgstr ""
131
+
132
+ #: woocommerce-ac.php:1154
133
+ msgid "Sent"
134
+ msgstr ""
135
+
136
+ #: woocommerce-ac.php:1158
137
+ msgid "Active ?"
138
+ msgstr ""
139
+
140
+ #: woocommerce-ac.php:1276
141
+ msgid ""
142
+ "The Report below shows how many Abandoned Carts we were able to recover for "
143
+ "you by sending automatic emails to encourage shoppers."
144
+ msgstr ""
145
+
146
+ #: woocommerce-ac.php:1331
147
+ msgid "Start Date:"
148
+ msgstr ""
149
+
150
+ #: woocommerce-ac.php:1334
151
+ msgid "End Date:"
152
+ msgstr ""
153
+
154
+ #: woocommerce-ac.php:1337
155
+ msgid "Go"
156
+ msgstr ""
157
+
158
+ #: woocommerce-ac.php:1495
159
+ msgid "During the selected range"
160
+ msgstr ""
161
+
162
+ #: woocommerce-ac.php:1495
163
+ msgid "carts totaling"
164
+ msgstr ""
165
+
166
+ #: woocommerce-ac.php:1495
167
+ msgid "were abandoned. We were able to recover"
168
+ msgstr ""
169
+
170
+ #: woocommerce-ac.php:1495
171
+ msgid "of them, which led to an extra"
172
+ msgstr ""
173
+
174
+ #: woocommerce-ac.php:1495
175
+ msgid "in sales"
176
+ msgstr ""
177
+
178
+ #: woocommerce-ac.php:1504
179
+ msgid "Created On"
180
+ msgstr ""
181
+
182
+ #: woocommerce-ac.php:1510
183
+ msgid "Recovered Date"
184
+ msgstr ""
185
+
186
+ #: woocommerce-ac.php:1561
187
+ msgid "Template Name:"
188
+ msgstr ""
189
+
190
+ #: woocommerce-ac.php:1572
191
+ msgid "Enter a template name for reference"
192
+ msgstr ""
193
+
194
+ #: woocommerce-ac.php:1577
195
+ msgid "Send From This Name:"
196
+ msgstr ""
197
+
198
+ #: woocommerce-ac.php:1588
199
+ msgid "Enter the name that should appear in the email sent"
200
+ msgstr ""
201
+
202
+ #: woocommerce-ac.php:1594
203
+ msgid "Subject:"
204
+ msgstr ""
205
+
206
+ #: woocommerce-ac.php:1605
207
+ msgid "Enter the subject that should appear in the email sent"
208
+ msgstr ""
209
+
210
+ #: woocommerce-ac.php:1611
211
+ msgid "Email Body:"
212
+ msgstr ""
213
+
214
+ #: woocommerce-ac.php:1627
215
+ msgid "Message to be sent in the reminder email."
216
+ msgstr ""
217
+
218
+ #: woocommerce-ac.php:1634
219
+ msgid "Send this email:"
220
+ msgstr ""
221
+
222
+ #: woocommerce-ac.php:1686
223
+ msgid "after cart is abandoned."
224
+ msgstr ""
225
+
226
+ #: woocommerce-ac.php:1693
227
+ msgid "Send a test email to:"
228
+ msgstr ""
229
+
230
+ #: woocommerce-ac.php:1699
231
+ msgid "Enter the email id to which the test email needs to be sent."
232
+ msgstr ""
233
+
234
+ #: woocommerce-ac.php:1835 send_email.php:109
235
+ msgid "Your Shopping Cart"
236
+ msgstr ""
237
+
238
+ #: woocommerce-ac.php:1838 send_email.php:112
239
+ msgid "Item"
240
+ msgstr ""
241
+
242
+ #: woocommerce-ac.php:1839 send_email.php:113
243
+ msgid "Name"
244
+ msgstr ""
245
+
246
+ #: woocommerce-ac.php:1840 send_email.php:114
247
+ msgid "Quantity"
248
+ msgstr ""
249
+
250
+ #: woocommerce-ac.php:1841 send_email.php:115
251
+ msgid "Price"
252
+ msgstr ""
253
+
254
+ #: woocommerce-ac.php:1842 send_email.php:116
255
+ msgid "Line Subtotal"
256
+ msgstr ""
257
+
258
+ #: woocommerce-ac.php:1846
259
+ msgid "Men\\'\\s Formal Shoes"
260
+ msgstr ""
261
+
262
+ #: woocommerce-ac.php:1853
263
+ msgid "Woman\\'\\s Hand Bags"
264
+ msgstr ""
265
+
266
+ #: woocommerce-ac.php:1862 send_email.php:160
267
+ msgid "Cart Total:"
268
+ msgstr ""
languages/woocommerce-ac-de_DE.mo ADDED
Binary file
languages/woocommerce-ac-de_DE.po ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2015-08-28 16:46+0200\n"
11
+ "PO-Revision-Date: 2015-08-28 17:51+0200\n"
12
+ "Language-Team: \n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.8.4\n"
17
+ "Last-Translator: \n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "Language: de_DE\n"
20
+
21
+ #: woocommerce-ac.php:22
22
+ msgid "Once Every Five Minutes"
23
+ msgstr "Alle fünf Minuten"
24
+
25
+ #: woocommerce-ac.php:204
26
+ #, php-format
27
+ msgid ""
28
+ "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
29
+ "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
30
+ "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
31
+ "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
32
+ "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
33
+ msgstr ""
34
+ "Sie können auf die <a href=\"https://www.tychesoftwares.com/store/premium-"
35
+ "plugins/woocommerce-abandoned-cart-pro/\">PRO version von WooCommerce "
36
+ "Abandoned Cart plugin</a> mit 20% Rabatt upgraden. Nutzen Sie den Coupon-"
37
+ "Code <b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
38
+ "plugins/woocommerce-abandoned-cart-pro/\"> Jetzt kaufen </a> & $24 sparen!"
39
+
40
+ #: woocommerce-ac.php:314
41
+ msgid "Abandoned Carts"
42
+ msgstr "Verlassene Warenkörbe"
43
+
44
+ #: woocommerce-ac.php:516
45
+ msgid "Abandoned Orders"
46
+ msgstr "Abgebrochene Bestellungen"
47
+
48
+ #: woocommerce-ac.php:517
49
+ msgid "Email Templates"
50
+ msgstr "E-Mail-Vorlagen"
51
+
52
+ #: woocommerce-ac.php:518 woocommerce-ac.php:712
53
+ msgid "Settings"
54
+ msgstr "Einstellungen"
55
+
56
+ #: woocommerce-ac.php:519
57
+ msgid "Recovered Orders"
58
+ msgstr "Gerettete Bestellungen"
59
+
60
+ #: woocommerce-ac.php:661
61
+ msgid "You do not have sufficient permissions to access this page."
62
+ msgstr "Sie sind nicht befugt, auf diese Seite zuzugreifen."
63
+
64
+ #: woocommerce-ac.php:670
65
+ msgid "WooCommerce - Abandon Cart Lite"
66
+ msgstr "WooCommerce - Abandon Cart Lite"
67
+
68
+ #: woocommerce-ac.php:696
69
+ msgid "Your settings have been saved."
70
+ msgstr "Die Einstellungen wurden gespeichert."
71
+
72
+ #: woocommerce-ac.php:718
73
+ msgid "Cart abandoned cut-off time"
74
+ msgstr "Verlassene Warenkörbe Cut-Off Zeit"
75
+
76
+ #: woocommerce-ac.php:741
77
+ msgid "minutes"
78
+ msgstr "Minuten"
79
+
80
+ #: woocommerce-ac.php:742 woocommerce-ac.php:743
81
+ msgid ""
82
+ "Consider cart abandoned after X minutes of item being added to cart & order "
83
+ "not placed"
84
+ msgstr ""
85
+ "Warenkorb gilt nach X Minuten zwischen Warenkorb gefüllt und Bestellung "
86
+ "abgebrochen als verlassen."
87
+
88
+ #: woocommerce-ac.php:753
89
+ msgid "Save Changes"
90
+ msgstr "Änderungen Speichern"
91
+
92
+ #: woocommerce-ac.php:763
93
+ msgid ""
94
+ "The list below shows all Abandoned Carts which have remained in cart for a "
95
+ "time higher than the \"Cart abandoned cut-off time\" setting."
96
+ msgstr ""
97
+ "Die untenstehende Liste zeigt alle verlassenen Warenkörbe, die nach der Zeit "
98
+ "bei \"Verlassene Warenkörbe Cut-Off Zeit\" noch existieren."
99
+
100
+ #: woocommerce-ac.php:858 woocommerce-ac.php:1501
101
+ msgid "Customer"
102
+ msgstr "Kunde"
103
+
104
+ #: woocommerce-ac.php:859 woocommerce-ac.php:1514
105
+ msgid "Order Total"
106
+ msgstr "Bestellung gesamt"
107
+
108
+ #: woocommerce-ac.php:862
109
+ msgid "Date"
110
+ msgstr "Datum:"
111
+
112
+ #: woocommerce-ac.php:868
113
+ msgid "Status"
114
+ msgstr "Status"
115
+
116
+ #: woocommerce-ac.php:872 woocommerce-ac.php:1159
117
+ msgid "Actions"
118
+ msgstr "Aktionen"
119
+
120
+ #: woocommerce-ac.php:953
121
+ msgid ""
122
+ "Add email templates at different intervals to maximize the possibility of "
123
+ "recovering your abandoned carts."
124
+ msgstr ""
125
+ "Fügen Sie E-Mail Vorlagen für unterschiedliche Zeitintervalle hinzu, um die "
126
+ "Chancen zu erhöhen, einen verlassenen Warenkorb in eine Bestellung zu "
127
+ "konvertieren."
128
+
129
+ #: woocommerce-ac.php:1054
130
+ msgid "The Email Template has been successfully added."
131
+ msgstr "Die E-Mail Vorlage wurde erfolgreich hinzugefügt."
132
+
133
+ #: woocommerce-ac.php:1057
134
+ msgid "The Email Template has been successfully updated."
135
+ msgstr "Die E-Mail Vorlage wurde erfolgreich angepasst."
136
+
137
+ #: woocommerce-ac.php:1145
138
+ msgid "Sr"
139
+ msgstr "Nr."
140
+
141
+ #: woocommerce-ac.php:1148
142
+ msgid "Template Name"
143
+ msgstr "Vorlagenname"
144
+
145
+ #: woocommerce-ac.php:1154
146
+ msgid "Sent"
147
+ msgstr "Gesendet"
148
+
149
+ #: woocommerce-ac.php:1158
150
+ msgid "Active ?"
151
+ msgstr "aktiv?"
152
+
153
+ #: woocommerce-ac.php:1276
154
+ msgid ""
155
+ "The Report below shows how many Abandoned Carts we were able to recover for "
156
+ "you by sending automatic emails to encourage shoppers."
157
+ msgstr ""
158
+ "Der untenstehende Report zeigt, wieviele verlassene Warenkörbe aufgrund der "
159
+ "E-Mailautomatik gerettet wurden."
160
+
161
+ #: woocommerce-ac.php:1331
162
+ msgid "Start Date:"
163
+ msgstr "Startdatum:"
164
+
165
+ #: woocommerce-ac.php:1334
166
+ msgid "End Date:"
167
+ msgstr "Enddatum:"
168
+
169
+ #: woocommerce-ac.php:1337
170
+ msgid "Go"
171
+ msgstr "Los"
172
+
173
+ #: woocommerce-ac.php:1495
174
+ msgid "During the selected range"
175
+ msgstr "Während des gewählten Zeitraums wurden"
176
+
177
+ #: woocommerce-ac.php:1495
178
+ msgid "carts totaling"
179
+ msgstr "Warenkörbe mit einem Gesamtwert von"
180
+
181
+ #: woocommerce-ac.php:1495
182
+ msgid "were abandoned. We were able to recover"
183
+ msgstr "verlassen. Es konnten"
184
+
185
+ #: woocommerce-ac.php:1495
186
+ msgid "of them, which led to an extra"
187
+ msgstr "dieser Warenkörbe gerettet werden, was zu einem Extra-Umsatz von"
188
+
189
+ #: woocommerce-ac.php:1495
190
+ msgid "in sales"
191
+ msgstr "führte."
192
+
193
+ #: woocommerce-ac.php:1504
194
+ msgid "Created On"
195
+ msgstr "Erstellt Am"
196
+
197
+ #: woocommerce-ac.php:1510
198
+ msgid "Recovered Date"
199
+ msgstr "Datum der Rettung"
200
+
201
+ #: woocommerce-ac.php:1561
202
+ msgid "Template Name:"
203
+ msgstr "Vorlagenname"
204
+
205
+ #: woocommerce-ac.php:1572
206
+ msgid "Enter a template name for reference"
207
+ msgstr "Geben Sie einen Vorlagennamen als Referenz an"
208
+
209
+ #: woocommerce-ac.php:1577
210
+ msgid "Send From This Name:"
211
+ msgstr "Absendername"
212
+
213
+ #: woocommerce-ac.php:1588
214
+ msgid "Enter the name that should appear in the email sent"
215
+ msgstr "Geben Sie den Absendernamen an, der erscheinen soll"
216
+
217
+ #: woocommerce-ac.php:1594
218
+ msgid "Subject:"
219
+ msgstr "Betreff:"
220
+
221
+ #: woocommerce-ac.php:1605
222
+ msgid "Enter the subject that should appear in the email sent"
223
+ msgstr "Geben Sie den Betreff an, der in der Mail erscheinen soll"
224
+
225
+ #: woocommerce-ac.php:1611
226
+ msgid "Email Body:"
227
+ msgstr "E-Mail-Text:"
228
+
229
+ #: woocommerce-ac.php:1627
230
+ msgid "Message to be sent in the reminder email."
231
+ msgstr "Zu sendende Nachricht in der Erinnerungsmail."
232
+
233
+ #: woocommerce-ac.php:1634
234
+ msgid "Send this email:"
235
+ msgstr "Senden Sie diese e-Mail:"
236
+
237
+ #: woocommerce-ac.php:1686
238
+ msgid "after cart is abandoned."
239
+ msgstr "nachdem der Waernkorb verlassen wurde."
240
+
241
+ #: woocommerce-ac.php:1693
242
+ msgid "Send a test email to:"
243
+ msgstr "Sende Test E-Mail an:"
244
+
245
+ #: woocommerce-ac.php:1699
246
+ msgid "Enter the email id to which the test email needs to be sent."
247
+ msgstr "Geben Sie die Mailadresse für die Test E-Mail ein"
248
+
249
+ #: woocommerce-ac.php:1835 send_email.php:109
250
+ msgid "Your Shopping Cart"
251
+ msgstr "Ihr Warenkorb"
252
+
253
+ #: woocommerce-ac.php:1838 send_email.php:112
254
+ msgid "Item"
255
+ msgstr "Art."
256
+
257
+ #: woocommerce-ac.php:1839 send_email.php:113
258
+ msgid "Name"
259
+ msgstr "Name"
260
+
261
+ #: woocommerce-ac.php:1840 send_email.php:114
262
+ msgid "Quantity"
263
+ msgstr "Anzahl"
264
+
265
+ #: woocommerce-ac.php:1841 send_email.php:115
266
+ msgid "Price"
267
+ msgstr "Preis"
268
+
269
+ #: woocommerce-ac.php:1842 send_email.php:116
270
+ msgid "Line Subtotal"
271
+ msgstr "Zwischensumme"
272
+
273
+ #: woocommerce-ac.php:1846
274
+ msgid "Men\\'\\s Formal Shoes"
275
+ msgstr "Herrenschuhe"
276
+
277
+ #: woocommerce-ac.php:1853
278
+ msgid "Woman\\'\\s Hand Bags"
279
+ msgstr "Frauen Handtaschen"
280
+
281
+ #: woocommerce-ac.php:1862 send_email.php:160
282
+ msgid "Cart Total:"
283
+ msgstr "Warenkorb Total:"
languages/woocommerce-ac-he_IL.po CHANGED
@@ -1,281 +1,281 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- msgid ""
7
- msgstr ""
8
- "Project-Id-Version: \n"
9
- "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2015-08-11 18:39+0300\n"
11
- "PO-Revision-Date: 2015-08-11 19:03+0300\n"
12
- "Language-Team: \n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "X-Generator: Poedit 1.8.4\n"
17
- "Last-Translator: \n"
18
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
- "Language: he_IL\n"
20
-
21
- #: woocommerce-ac.php:22
22
- msgid "Once Every Five Minutes"
23
- msgstr "פעם אחת כל חמש דקות"
24
-
25
- #: woocommerce-ac.php:204
26
- #, php-format
27
- msgid ""
28
- "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
29
- "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
30
- "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
31
- "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
32
- "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
33
- msgstr ""
34
- "‏You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
35
- "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
36
- "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
37
- "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
38
- "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
39
-
40
- #: woocommerce-ac.php:314
41
- msgid "Abandoned Carts"
42
- msgstr "עגלות שננטשו"
43
-
44
- #: woocommerce-ac.php:516
45
- msgid "Abandoned Orders"
46
- msgstr "הזמנות שננטשו"
47
-
48
- #: woocommerce-ac.php:517
49
- msgid "Email Templates"
50
- msgstr "תבניות אימייל"
51
-
52
- #: woocommerce-ac.php:518 woocommerce-ac.php:712
53
- msgid "Settings"
54
- msgstr "הגדרות"
55
-
56
- #: woocommerce-ac.php:519
57
- msgid "Recovered Orders"
58
- msgstr "הזמנות ששוחזרו"
59
-
60
- #: woocommerce-ac.php:661
61
- msgid "You do not have sufficient permissions to access this page."
62
- msgstr "אין לך הרשאה מתאימה לגשת לעמוד זה."
63
-
64
- #: woocommerce-ac.php:670
65
- msgid "WooCommerce - Abandon Cart Lite"
66
- msgstr "‏Woocommerce - עגלות נטושות לייט"
67
-
68
- #: woocommerce-ac.php:696
69
- msgid "Your settings have been saved."
70
- msgstr "ההגדרות שלך נשמרו"
71
-
72
- #: woocommerce-ac.php:718
73
- msgid "Cart abandoned cut-off time"
74
- msgstr "זמן חישוב עגלה כנטושה"
75
-
76
- #: woocommerce-ac.php:741
77
- msgid "minutes"
78
- msgstr "דקות"
79
-
80
- #: woocommerce-ac.php:742 woocommerce-ac.php:743
81
- msgid ""
82
- "Consider cart abandoned after X minutes of item being added to cart & order "
83
- "not placed"
84
- msgstr ""
85
- "החשב עגלה כנטושה אחרי X דקות מאז הפריט הוסף לעגלת הקניות וההזמנה לא בוצעה"
86
-
87
- #: woocommerce-ac.php:753
88
- msgid "Save Changes"
89
- msgstr "שמור שינויים"
90
-
91
- #: woocommerce-ac.php:763
92
- msgid ""
93
- "The list below shows all Abandoned Carts which have remained in cart for a "
94
- "time higher than the \"Cart abandoned cut-off time\" setting."
95
- msgstr ""
96
- "רשימה זו מציגה את כל העגלות שננטשו אשר נותרו בעגלה לפרק זמן העולה על ״זמן "
97
- "חישוב עגלה כנטושה״."
98
-
99
- #: woocommerce-ac.php:858 woocommerce-ac.php:1501
100
- msgid "Customer"
101
- msgstr "לקוח"
102
-
103
- #: woocommerce-ac.php:859 woocommerce-ac.php:1514
104
- msgid "Order Total"
105
- msgstr "סה״כ להזמנה"
106
-
107
- #: woocommerce-ac.php:862
108
- msgid "Date"
109
- msgstr "תאריך"
110
-
111
- #: woocommerce-ac.php:868
112
- msgid "Status"
113
- msgstr "סטטוס"
114
-
115
- #: woocommerce-ac.php:872 woocommerce-ac.php:1159
116
- msgid "Actions"
117
- msgstr "פעולות"
118
-
119
- #: woocommerce-ac.php:953
120
- msgid ""
121
- "Add email templates at different intervals to maximize the possibility of "
122
- "recovering your abandoned carts."
123
- msgstr ""
124
- "הוסף תבניות אימייל בפרקי זמן שונים כדי למקסם את האפשרות לשחזר עגלות נטושות "
125
- "שלך."
126
-
127
- #: woocommerce-ac.php:1054
128
- msgid "The Email Template has been successfully added."
129
- msgstr "תבנית אימייל התווספה בהצלחה."
130
-
131
- #: woocommerce-ac.php:1057
132
- msgid "The Email Template has been successfully updated."
133
- msgstr "תבנית אימייל עודכנה בהצלחה."
134
-
135
- #: woocommerce-ac.php:1145
136
- msgid "Sr"
137
- msgstr "‏Sr"
138
-
139
- #: woocommerce-ac.php:1148
140
- msgid "Template Name"
141
- msgstr "שם תבנית"
142
-
143
- #: woocommerce-ac.php:1154
144
- msgid "Sent"
145
- msgstr "נשלח"
146
-
147
- #: woocommerce-ac.php:1158
148
- msgid "Active ?"
149
- msgstr "פעיל?"
150
-
151
- #: woocommerce-ac.php:1276
152
- msgid ""
153
- "The Report below shows how many Abandoned Carts we were able to recover for "
154
- "you by sending automatic emails to encourage shoppers."
155
- msgstr ""
156
- "הדו״ח שלהלן מציג כמה עגלות שננטשו שוחזרו עבורך על ידי שליחה אוטומטית של "
157
- "אימיילים לטובת עידוד קונים."
158
-
159
- #: woocommerce-ac.php:1331
160
- msgid "Start Date:"
161
- msgstr "תאריך התחלה:"
162
-
163
- #: woocommerce-ac.php:1334
164
- msgid "End Date:"
165
- msgstr "תאריך סיום:"
166
-
167
- #: woocommerce-ac.php:1337
168
- msgid "Go"
169
- msgstr "שלח"
170
-
171
- #: woocommerce-ac.php:1495
172
- msgid "During the selected range"
173
- msgstr "במהלך התקופה הנקובה"
174
-
175
- #: woocommerce-ac.php:1495
176
- msgid "carts totaling"
177
- msgstr "עגלות בסך"
178
-
179
- #: woocommerce-ac.php:1495
180
- msgid "were abandoned. We were able to recover"
181
- msgstr "ננטשו. הצלחנו לשחזר"
182
-
183
- #: woocommerce-ac.php:1495
184
- msgid "of them, which led to an extra"
185
- msgstr "מתוכן, אשר הוביל לתוספת של"
186
-
187
- #: woocommerce-ac.php:1495
188
- msgid "in sales"
189
- msgstr "במכירות"
190
-
191
- #: woocommerce-ac.php:1504
192
- msgid "Created On"
193
- msgstr "נוצר ב"
194
-
195
- #: woocommerce-ac.php:1510
196
- msgid "Recovered Date"
197
- msgstr "תאריך שחזור"
198
-
199
- #: woocommerce-ac.php:1561
200
- msgid "Template Name:"
201
- msgstr "שם תבנית:"
202
-
203
- #: woocommerce-ac.php:1572
204
- msgid "Enter a template name for reference"
205
- msgstr "הכנס שם לתבנית לטובת סימוכין"
206
-
207
- #: woocommerce-ac.php:1577
208
- msgid "Send From This Name:"
209
- msgstr "מאת:"
210
-
211
- #: woocommerce-ac.php:1588
212
- msgid "Enter the name that should appear in the email sent"
213
- msgstr "הכנס את השם אשר יופיע באימייל שיישלח"
214
-
215
- #: woocommerce-ac.php:1594
216
- msgid "Subject:"
217
- msgstr "נושא:"
218
-
219
- #: woocommerce-ac.php:1605
220
- msgid "Enter the subject that should appear in the email sent"
221
- msgstr "הכנס את הנושא אשר יופיע באימייל שיישלח"
222
-
223
- #: woocommerce-ac.php:1611
224
- msgid "Email Body:"
225
- msgstr "גוף האימייל:"
226
-
227
- #: woocommerce-ac.php:1627
228
- msgid "Message to be sent in the reminder email."
229
- msgstr "הודעה אשר תישלח באימייל תזכורת."
230
-
231
- #: woocommerce-ac.php:1634
232
- msgid "Send this email:"
233
- msgstr "שלח אימייל זה:"
234
-
235
- #: woocommerce-ac.php:1686
236
- msgid "after cart is abandoned."
237
- msgstr "אחרי שננטשת עגלה."
238
-
239
- #: woocommerce-ac.php:1693
240
- msgid "Send a test email to:"
241
- msgstr "שלח מייל בדיקה אל:"
242
-
243
- #: woocommerce-ac.php:1699
244
- msgid "Enter the email id to which the test email needs to be sent."
245
- msgstr "הכנס את כתובת האימייל אליה יישלח מייל בדיקה."
246
-
247
- #: woocommerce-ac.php:1835 send_email.php:109
248
- msgid "Your Shopping Cart"
249
- msgstr "עגלת הקניות שלך"
250
-
251
- #: woocommerce-ac.php:1838 send_email.php:112
252
- msgid "Item"
253
- msgstr "פריט"
254
-
255
- #: woocommerce-ac.php:1839 send_email.php:113
256
- msgid "Name"
257
- msgstr "שם"
258
-
259
- #: woocommerce-ac.php:1840 send_email.php:114
260
- msgid "Quantity"
261
- msgstr "כמות"
262
-
263
- #: woocommerce-ac.php:1841 send_email.php:115
264
- msgid "Price"
265
- msgstr "מחיר"
266
-
267
- #: woocommerce-ac.php:1842 send_email.php:116
268
- msgid "Line Subtotal"
269
- msgstr "סכום ביניים"
270
-
271
- #: woocommerce-ac.php:1846
272
- msgid "Men\\'\\s Formal Shoes"
273
- msgstr "נעלי גברים"
274
-
275
- #: woocommerce-ac.php:1853
276
- msgid "Woman\\'\\s Hand Bags"
277
- msgstr "תיקי יד של נשים"
278
-
279
- #: woocommerce-ac.php:1862 send_email.php:160
280
- msgid "Cart Total:"
281
- msgstr "סה״כ בעגלה:"
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2015-08-11 18:39+0300\n"
11
+ "PO-Revision-Date: 2015-08-11 19:03+0300\n"
12
+ "Language-Team: \n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.8.4\n"
17
+ "Last-Translator: \n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "Language: he_IL\n"
20
+
21
+ #: woocommerce-ac.php:22
22
+ msgid "Once Every Five Minutes"
23
+ msgstr "פעם אחת כל חמש דקות"
24
+
25
+ #: woocommerce-ac.php:204
26
+ #, php-format
27
+ msgid ""
28
+ "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
29
+ "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
30
+ "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
31
+ "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
32
+ "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
33
+ msgstr ""
34
+ "‏You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
35
+ "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
36
+ "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
37
+ "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
38
+ "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
39
+
40
+ #: woocommerce-ac.php:314
41
+ msgid "Abandoned Carts"
42
+ msgstr "עגלות שננטשו"
43
+
44
+ #: woocommerce-ac.php:516
45
+ msgid "Abandoned Orders"
46
+ msgstr "הזמנות שננטשו"
47
+
48
+ #: woocommerce-ac.php:517
49
+ msgid "Email Templates"
50
+ msgstr "תבניות אימייל"
51
+
52
+ #: woocommerce-ac.php:518 woocommerce-ac.php:712
53
+ msgid "Settings"
54
+ msgstr "הגדרות"
55
+
56
+ #: woocommerce-ac.php:519
57
+ msgid "Recovered Orders"
58
+ msgstr "הזמנות ששוחזרו"
59
+
60
+ #: woocommerce-ac.php:661
61
+ msgid "You do not have sufficient permissions to access this page."
62
+ msgstr "אין לך הרשאה מתאימה לגשת לעמוד זה."
63
+
64
+ #: woocommerce-ac.php:670
65
+ msgid "WooCommerce - Abandon Cart Lite"
66
+ msgstr "‏Woocommerce - עגלות נטושות לייט"
67
+
68
+ #: woocommerce-ac.php:696
69
+ msgid "Your settings have been saved."
70
+ msgstr "ההגדרות שלך נשמרו"
71
+
72
+ #: woocommerce-ac.php:718
73
+ msgid "Cart abandoned cut-off time"
74
+ msgstr "זמן חישוב עגלה כנטושה"
75
+
76
+ #: woocommerce-ac.php:741
77
+ msgid "minutes"
78
+ msgstr "דקות"
79
+
80
+ #: woocommerce-ac.php:742 woocommerce-ac.php:743
81
+ msgid ""
82
+ "Consider cart abandoned after X minutes of item being added to cart & order "
83
+ "not placed"
84
+ msgstr ""
85
+ "החשב עגלה כנטושה אחרי X דקות מאז הפריט הוסף לעגלת הקניות וההזמנה לא בוצעה"
86
+
87
+ #: woocommerce-ac.php:753
88
+ msgid "Save Changes"
89
+ msgstr "שמור שינויים"
90
+
91
+ #: woocommerce-ac.php:763
92
+ msgid ""
93
+ "The list below shows all Abandoned Carts which have remained in cart for a "
94
+ "time higher than the \"Cart abandoned cut-off time\" setting."
95
+ msgstr ""
96
+ "רשימה זו מציגה את כל העגלות שננטשו אשר נותרו בעגלה לפרק זמן העולה על ״זמן "
97
+ "חישוב עגלה כנטושה״."
98
+
99
+ #: woocommerce-ac.php:858 woocommerce-ac.php:1501
100
+ msgid "Customer"
101
+ msgstr "לקוח"
102
+
103
+ #: woocommerce-ac.php:859 woocommerce-ac.php:1514
104
+ msgid "Order Total"
105
+ msgstr "סה״כ להזמנה"
106
+
107
+ #: woocommerce-ac.php:862
108
+ msgid "Date"
109
+ msgstr "תאריך"
110
+
111
+ #: woocommerce-ac.php:868
112
+ msgid "Status"
113
+ msgstr "סטטוס"
114
+
115
+ #: woocommerce-ac.php:872 woocommerce-ac.php:1159
116
+ msgid "Actions"
117
+ msgstr "פעולות"
118
+
119
+ #: woocommerce-ac.php:953
120
+ msgid ""
121
+ "Add email templates at different intervals to maximize the possibility of "
122
+ "recovering your abandoned carts."
123
+ msgstr ""
124
+ "הוסף תבניות אימייל בפרקי זמן שונים כדי למקסם את האפשרות לשחזר עגלות נטושות "
125
+ "שלך."
126
+
127
+ #: woocommerce-ac.php:1054
128
+ msgid "The Email Template has been successfully added."
129
+ msgstr "תבנית אימייל התווספה בהצלחה."
130
+
131
+ #: woocommerce-ac.php:1057
132
+ msgid "The Email Template has been successfully updated."
133
+ msgstr "תבנית אימייל עודכנה בהצלחה."
134
+
135
+ #: woocommerce-ac.php:1145
136
+ msgid "Sr"
137
+ msgstr "‏Sr"
138
+
139
+ #: woocommerce-ac.php:1148
140
+ msgid "Template Name"
141
+ msgstr "שם תבנית"
142
+
143
+ #: woocommerce-ac.php:1154
144
+ msgid "Sent"
145
+ msgstr "נשלח"
146
+
147
+ #: woocommerce-ac.php:1158
148
+ msgid "Active ?"
149
+ msgstr "פעיל?"
150
+
151
+ #: woocommerce-ac.php:1276
152
+ msgid ""
153
+ "The Report below shows how many Abandoned Carts we were able to recover for "
154
+ "you by sending automatic emails to encourage shoppers."
155
+ msgstr ""
156
+ "הדו״ח שלהלן מציג כמה עגלות שננטשו שוחזרו עבורך על ידי שליחה אוטומטית של "
157
+ "אימיילים לטובת עידוד קונים."
158
+
159
+ #: woocommerce-ac.php:1331
160
+ msgid "Start Date:"
161
+ msgstr "תאריך התחלה:"
162
+
163
+ #: woocommerce-ac.php:1334
164
+ msgid "End Date:"
165
+ msgstr "תאריך סיום:"
166
+
167
+ #: woocommerce-ac.php:1337
168
+ msgid "Go"
169
+ msgstr "שלח"
170
+
171
+ #: woocommerce-ac.php:1495
172
+ msgid "During the selected range"
173
+ msgstr "במהלך התקופה הנקובה"
174
+
175
+ #: woocommerce-ac.php:1495
176
+ msgid "carts totaling"
177
+ msgstr "עגלות בסך"
178
+
179
+ #: woocommerce-ac.php:1495
180
+ msgid "were abandoned. We were able to recover"
181
+ msgstr "ננטשו. הצלחנו לשחזר"
182
+
183
+ #: woocommerce-ac.php:1495
184
+ msgid "of them, which led to an extra"
185
+ msgstr "מתוכן, אשר הוביל לתוספת של"
186
+
187
+ #: woocommerce-ac.php:1495
188
+ msgid "in sales"
189
+ msgstr "במכירות"
190
+
191
+ #: woocommerce-ac.php:1504
192
+ msgid "Created On"
193
+ msgstr "נוצר ב"
194
+
195
+ #: woocommerce-ac.php:1510
196
+ msgid "Recovered Date"
197
+ msgstr "תאריך שחזור"
198
+
199
+ #: woocommerce-ac.php:1561
200
+ msgid "Template Name:"
201
+ msgstr "שם תבנית:"
202
+
203
+ #: woocommerce-ac.php:1572
204
+ msgid "Enter a template name for reference"
205
+ msgstr "הכנס שם לתבנית לטובת סימוכין"
206
+
207
+ #: woocommerce-ac.php:1577
208
+ msgid "Send From This Name:"
209
+ msgstr "מאת:"
210
+
211
+ #: woocommerce-ac.php:1588
212
+ msgid "Enter the name that should appear in the email sent"
213
+ msgstr "הכנס את השם אשר יופיע באימייל שיישלח"
214
+
215
+ #: woocommerce-ac.php:1594
216
+ msgid "Subject:"
217
+ msgstr "נושא:"
218
+
219
+ #: woocommerce-ac.php:1605
220
+ msgid "Enter the subject that should appear in the email sent"
221
+ msgstr "הכנס את הנושא אשר יופיע באימייל שיישלח"
222
+
223
+ #: woocommerce-ac.php:1611
224
+ msgid "Email Body:"
225
+ msgstr "גוף האימייל:"
226
+
227
+ #: woocommerce-ac.php:1627
228
+ msgid "Message to be sent in the reminder email."
229
+ msgstr "הודעה אשר תישלח באימייל תזכורת."
230
+
231
+ #: woocommerce-ac.php:1634
232
+ msgid "Send this email:"
233
+ msgstr "שלח אימייל זה:"
234
+
235
+ #: woocommerce-ac.php:1686
236
+ msgid "after cart is abandoned."
237
+ msgstr "אחרי שננטשת עגלה."
238
+
239
+ #: woocommerce-ac.php:1693
240
+ msgid "Send a test email to:"
241
+ msgstr "שלח מייל בדיקה אל:"
242
+
243
+ #: woocommerce-ac.php:1699
244
+ msgid "Enter the email id to which the test email needs to be sent."
245
+ msgstr "הכנס את כתובת האימייל אליה יישלח מייל בדיקה."
246
+
247
+ #: woocommerce-ac.php:1835 send_email.php:109
248
+ msgid "Your Shopping Cart"
249
+ msgstr "עגלת הקניות שלך"
250
+
251
+ #: woocommerce-ac.php:1838 send_email.php:112
252
+ msgid "Item"
253
+ msgstr "פריט"
254
+
255
+ #: woocommerce-ac.php:1839 send_email.php:113
256
+ msgid "Name"
257
+ msgstr "שם"
258
+
259
+ #: woocommerce-ac.php:1840 send_email.php:114
260
+ msgid "Quantity"
261
+ msgstr "כמות"
262
+
263
+ #: woocommerce-ac.php:1841 send_email.php:115
264
+ msgid "Price"
265
+ msgstr "מחיר"
266
+
267
+ #: woocommerce-ac.php:1842 send_email.php:116
268
+ msgid "Line Subtotal"
269
+ msgstr "סכום ביניים"
270
+
271
+ #: woocommerce-ac.php:1846
272
+ msgid "Men\\'\\s Formal Shoes"
273
+ msgstr "נעלי גברים"
274
+
275
+ #: woocommerce-ac.php:1853
276
+ msgid "Woman\\'\\s Hand Bags"
277
+ msgstr "תיקי יד של נשים"
278
+
279
+ #: woocommerce-ac.php:1862 send_email.php:160
280
+ msgid "Cart Total:"
281
+ msgstr "סה״כ בעגלה:"
languages/woocommerce-ac-sk_SK.mo ADDED
Binary file
languages/woocommerce-ac-sk_SK.po ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: woocommerce-ac\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2015-07-08 16:30+0530\n"
11
+ "PO-Revision-Date: 2015-12-16 10:00+0100\n"
12
+ "Last-Translator: \n"
13
+ "Language-Team: Mauro <marek9.danko@gmail.com>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Generator: Poedit 1.8.1\n"
18
+ "X-Poedit-KeywordsList: __;_e\n"
19
+ "X-Poedit-Basepath: .\n"
20
+ "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
21
+ "Language: sk_SK\n"
22
+
23
+ #: woocommerce-ac.php:22
24
+ msgid "Once Every Five Minutes"
25
+ msgstr "Po každých piatich minútach"
26
+
27
+ #: woocommerce-ac.php:204
28
+ msgid ""
29
+ "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
30
+ "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
31
+ "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
32
+ "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
33
+ "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
34
+ msgstr ""
35
+ "Môžete upgradovať na <a href=\"https://www.tychesoftwares.com/store/premium-"
36
+ "plugins/woocommerce-abandoned-cart-pro/\">PRO verziu WooCommerce Abandoned "
37
+ "Cart plugin</a> s <b>20% zľavou</b>. Použite kód: <b>ACPRO20</b>.<a href="
38
+ "\"https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-"
39
+ "cart-pro/\"> Zakúpte teraz </a> a ušetrite 24$ !"
40
+
41
+ #: woocommerce-ac.php:314
42
+ msgid "Abandoned Carts"
43
+ msgstr "Opustené Košíky"
44
+
45
+ #: woocommerce-ac.php:516
46
+ msgid "Abandoned Orders"
47
+ msgstr "Opustené Objednávky"
48
+
49
+ #: woocommerce-ac.php:517
50
+ msgid "Email Templates"
51
+ msgstr "E-mailové šablóny"
52
+
53
+ #: woocommerce-ac.php:518 woocommerce-ac.php:712
54
+ msgid "Settings"
55
+ msgstr "Nastavenia"
56
+
57
+ #: woocommerce-ac.php:519
58
+ msgid "Recovered Orders"
59
+ msgstr "Spätne získaná objednávka "
60
+
61
+ #: woocommerce-ac.php:661
62
+ msgid "You do not have sufficient permissions to access this page."
63
+ msgstr "Nemáte dostatočné oprávnenia k prístupu na túto stránku."
64
+
65
+ #: woocommerce-ac.php:670
66
+ msgid "WooCommerce - Abandon Cart Lite"
67
+ msgstr ""
68
+
69
+ #: woocommerce-ac.php:696
70
+ msgid "Your settings have been saved."
71
+ msgstr "Vaše nastavenia boli uložené."
72
+
73
+ #: woocommerce-ac.php:718
74
+ msgid "Cart abandoned cut-off time"
75
+ msgstr "Limit pre opustený košík"
76
+
77
+ #: woocommerce-ac.php:741
78
+ msgid "minutes"
79
+ msgstr "minút"
80
+
81
+ #: woocommerce-ac.php:742 woocommerce-ac.php:743
82
+ msgid ""
83
+ "Consider cart abandoned after X minutes of item being added to cart & order "
84
+ "not placed"
85
+ msgstr ""
86
+ "Košík je opustený po X minútach potom čo bola položka vložená do košíka ale "
87
+ "objednávka nebola odoslaná"
88
+
89
+ #: woocommerce-ac.php:753
90
+ msgid "Save Changes"
91
+ msgstr "Uložiť zmeny"
92
+
93
+ #: woocommerce-ac.php:763
94
+ msgid ""
95
+ "The list below shows all Abandoned Carts which have remained in cart for a "
96
+ "time higher than the \"Cart abandoned cut-off time\" setting."
97
+ msgstr ""
98
+ "Tento zoznam ukazuje všetky opustené košíky, pri ktorých nebol zmenený stav "
99
+ "dlhší čas ako je nastavený \"Limit pre opustený košík\"."
100
+
101
+ #: woocommerce-ac.php:858 woocommerce-ac.php:1501
102
+ msgid "Customer"
103
+ msgstr "Zákazník"
104
+
105
+ #: woocommerce-ac.php:859 woocommerce-ac.php:1514
106
+ msgid "Order Total"
107
+ msgstr "Objednávka Celkom"
108
+
109
+ #: woocommerce-ac.php:862
110
+ msgid "Date"
111
+ msgstr "Dátum"
112
+
113
+ #: woocommerce-ac.php:868
114
+ msgid "Status"
115
+ msgstr "Stav"
116
+
117
+ #: woocommerce-ac.php:872 woocommerce-ac.php:1159
118
+ msgid "Actions"
119
+ msgstr "Akcie"
120
+
121
+ #: woocommerce-ac.php:953
122
+ msgid ""
123
+ "Add email templates at different intervals to maximize the possibility of "
124
+ "recovering your abandoned carts."
125
+ msgstr ""
126
+ "Add email templates at different intervals to maximize the possibility of "
127
+ "recovering your abandoned carts."
128
+
129
+ #: woocommerce-ac.php:1054
130
+ msgid "The Email Template has been successfully added."
131
+ msgstr "Emailová šablóna bola úspešne pridaná."
132
+
133
+ #: woocommerce-ac.php:1057
134
+ msgid "The Email Template has been successfully updated."
135
+ msgstr "Emailová šablóna bola úspešne uložená."
136
+
137
+ #: woocommerce-ac.php:1145
138
+ msgid "Sr"
139
+ msgstr ""
140
+
141
+ #: woocommerce-ac.php:1148
142
+ msgid "Template Name"
143
+ msgstr "Názov šablóny"
144
+
145
+ #: woocommerce-ac.php:1154
146
+ msgid "Sent"
147
+ msgstr "Odoslané"
148
+
149
+ #: woocommerce-ac.php:1158
150
+ msgid "Active ?"
151
+ msgstr "Aktívne ?"
152
+
153
+ #: woocommerce-ac.php:1276
154
+ msgid ""
155
+ "The Report below shows how many Abandoned Carts we were able to recover for "
156
+ "you by sending automatic emails to encourage shoppers."
157
+ msgstr ""
158
+ "Tento report ukazuje koľko Opustených košíkov sme boli schopný znovuzískať "
159
+ "pre Vás po odoslaní automatického emailu pre povzbudenie nakupujúceho."
160
+
161
+ #: woocommerce-ac.php:1331
162
+ msgid "Start Date:"
163
+ msgstr "Začiatočný dátum:"
164
+
165
+ #: woocommerce-ac.php:1334
166
+ msgid "End Date:"
167
+ msgstr "Dátum ukončenia:"
168
+
169
+ #: woocommerce-ac.php:1337
170
+ msgid "Go"
171
+ msgstr "Spustiť"
172
+
173
+ #: woocommerce-ac.php:1495
174
+ msgid "During the selected range"
175
+ msgstr "Vo vybranom intarvale: "
176
+
177
+ #: woocommerce-ac.php:1495
178
+ msgid "carts totaling"
179
+ msgstr "(v celkovej výške: "
180
+
181
+ #: woocommerce-ac.php:1495
182
+ msgid "were abandoned. We were able to recover"
183
+ msgstr ") opustených košíkov. Objednávku sme spätne získali z"
184
+
185
+ #: woocommerce-ac.php:1495
186
+ msgid "of them, which led to an extra"
187
+ msgstr ",čo viedlo k "
188
+
189
+ #: woocommerce-ac.php:1495
190
+ msgid "in sales"
191
+ msgstr "obratu."
192
+
193
+ #: woocommerce-ac.php:1504
194
+ msgid "Created On"
195
+ msgstr "Vytvorené"
196
+
197
+ #: woocommerce-ac.php:1510
198
+ msgid "Recovered Date"
199
+ msgstr "Dátum znovuzískania"
200
+
201
+ #: woocommerce-ac.php:1561
202
+ msgid "Template Name:"
203
+ msgstr "Názov šablóny:"
204
+
205
+ #: woocommerce-ac.php:1572
206
+ msgid "Enter a template name for reference"
207
+ msgstr "Zadajte názov šablóny pre priradenie"
208
+
209
+ #: woocommerce-ac.php:1577
210
+ msgid "Send From This Name:"
211
+ msgstr "Meno odosielateľa:"
212
+
213
+ #: woocommerce-ac.php:1588
214
+ msgid "Enter the name that should appear in the email sent"
215
+ msgstr "Zadajte meno ktoré sa zobrazí ako odosielateľ"
216
+
217
+ #: woocommerce-ac.php:1594
218
+ msgid "Subject:"
219
+ msgstr "Predmet:"
220
+
221
+ #: woocommerce-ac.php:1605
222
+ msgid "Enter the subject that should appear in the email sent"
223
+ msgstr "Zadajte predmet, ktorý by sa mal objaviť v odolsanom emaile"
224
+
225
+ #: woocommerce-ac.php:1611
226
+ msgid "Email Body:"
227
+ msgstr "Telo emailu:"
228
+
229
+ #: woocommerce-ac.php:1627
230
+ msgid "Message to be sent in the reminder email."
231
+ msgstr "Správa odoslaná ako pripomienkobý email."
232
+
233
+ #: woocommerce-ac.php:1634
234
+ msgid "Send this email:"
235
+ msgstr "Odoslat tento email."
236
+
237
+ #: woocommerce-ac.php:1686
238
+ msgid "after cart is abandoned."
239
+ msgstr "po opustení košíka."
240
+
241
+ #: woocommerce-ac.php:1693
242
+ msgid "Send a test email to:"
243
+ msgstr "Odoslať testovací email na:"
244
+
245
+ #: woocommerce-ac.php:1699
246
+ msgid "Enter the email id to which the test email needs to be sent."
247
+ msgstr "Zadajte email na ktorý sa ma testovací email odoslať."
248
+
249
+ #: woocommerce-ac.php:1835 send_email.php:109
250
+ msgid "Your Shopping Cart"
251
+ msgstr "Váš nakúpný košík"
252
+
253
+ #: woocommerce-ac.php:1838 send_email.php:112
254
+ msgid "Item"
255
+ msgstr "Položka"
256
+
257
+ #: woocommerce-ac.php:1839 send_email.php:113
258
+ msgid "Name"
259
+ msgstr "Meno"
260
+
261
+ #: woocommerce-ac.php:1840 send_email.php:114
262
+ msgid "Quantity"
263
+ msgstr "Množstvo"
264
+
265
+ #: woocommerce-ac.php:1841 send_email.php:115
266
+ msgid "Price"
267
+ msgstr "Cena"
268
+
269
+ #: woocommerce-ac.php:1842 send_email.php:116
270
+ msgid "Line Subtotal"
271
+ msgstr "Subtotal"
272
+
273
+ #: woocommerce-ac.php:1846
274
+ msgid "Men\\'\\s Formal Shoes"
275
+ msgstr ""
276
+
277
+ #: woocommerce-ac.php:1853
278
+ msgid "Woman\\'\\s Hand Bags"
279
+ msgstr ""
280
+
281
+ #: woocommerce-ac.php:1862 send_email.php:160
282
+ msgid "Cart Total:"
283
+ msgstr "Košík spolu:"
languages/woocommerce-ac.po CHANGED
@@ -1,269 +1,269 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- msgid ""
7
- msgstr ""
8
- "Project-Id-Version: woocommerce-ac\n"
9
- "Report-Msgid-Bugs-To: \n"
10
- "POT-Creation-Date: 2015-07-08 16:30+0530\n"
11
- "PO-Revision-Date: 2015-07-16 11:02+0530\n"
12
- "Last-Translator: \n"
13
- "Language-Team: \n"
14
- "MIME-Version: 1.0\n"
15
- "Content-Type: text/plain; charset=UTF-8\n"
16
- "Content-Transfer-Encoding: 8bit\n"
17
- "X-Generator: Poedit 1.5.7\n"
18
- "X-Poedit-KeywordsList: __;_e\n"
19
- "X-Poedit-Basepath: .\n"
20
-
21
- #: woocommerce-ac.php:22
22
- msgid "Once Every Five Minutes"
23
- msgstr ""
24
-
25
- #: woocommerce-ac.php:204
26
- #, php-format
27
- msgid ""
28
- "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
29
- "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
30
- "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
31
- "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
32
- "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
33
- msgstr ""
34
-
35
- #: woocommerce-ac.php:314
36
- msgid "Abandoned Carts"
37
- msgstr ""
38
-
39
- #: woocommerce-ac.php:516
40
- msgid "Abandoned Orders"
41
- msgstr ""
42
-
43
- #: woocommerce-ac.php:517
44
- msgid "Email Templates"
45
- msgstr ""
46
-
47
- #: woocommerce-ac.php:518 woocommerce-ac.php:712
48
- msgid "Settings"
49
- msgstr ""
50
-
51
- #: woocommerce-ac.php:519
52
- msgid "Recovered Orders"
53
- msgstr ""
54
-
55
- #: woocommerce-ac.php:661
56
- msgid "You do not have sufficient permissions to access this page."
57
- msgstr ""
58
-
59
- #: woocommerce-ac.php:670
60
- msgid "WooCommerce - Abandon Cart Lite"
61
- msgstr ""
62
-
63
- #: woocommerce-ac.php:696
64
- msgid "Your settings have been saved."
65
- msgstr ""
66
-
67
- #: woocommerce-ac.php:718
68
- msgid "Cart abandoned cut-off time"
69
- msgstr ""
70
-
71
- #: woocommerce-ac.php:741
72
- msgid "minutes"
73
- msgstr ""
74
-
75
- #: woocommerce-ac.php:742 woocommerce-ac.php:743
76
- msgid ""
77
- "Consider cart abandoned after X minutes of item being added to cart & order "
78
- "not placed"
79
- msgstr ""
80
-
81
- #: woocommerce-ac.php:753
82
- msgid "Save Changes"
83
- msgstr ""
84
-
85
- #: woocommerce-ac.php:763
86
- msgid ""
87
- "The list below shows all Abandoned Carts which have remained in cart for a "
88
- "time higher than the \"Cart abandoned cut-off time\" setting."
89
- msgstr ""
90
-
91
- #: woocommerce-ac.php:858 woocommerce-ac.php:1501
92
- msgid "Customer"
93
- msgstr ""
94
-
95
- #: woocommerce-ac.php:859 woocommerce-ac.php:1514
96
- msgid "Order Total"
97
- msgstr ""
98
-
99
- #: woocommerce-ac.php:862
100
- msgid "Date"
101
- msgstr ""
102
-
103
- #: woocommerce-ac.php:868
104
- msgid "Status"
105
- msgstr ""
106
-
107
- #: woocommerce-ac.php:872 woocommerce-ac.php:1159
108
- msgid "Actions"
109
- msgstr ""
110
-
111
- #: woocommerce-ac.php:953
112
- msgid ""
113
- "Add email templates at different intervals to maximize the possibility of "
114
- "recovering your abandoned carts."
115
- msgstr ""
116
-
117
- #: woocommerce-ac.php:1054
118
- msgid "The Email Template has been successfully added."
119
- msgstr ""
120
-
121
- #: woocommerce-ac.php:1057
122
- msgid "The Email Template has been successfully updated."
123
- msgstr ""
124
-
125
- #: woocommerce-ac.php:1145
126
- msgid "Sr"
127
- msgstr ""
128
-
129
- #: woocommerce-ac.php:1148
130
- msgid "Template Name"
131
- msgstr ""
132
-
133
- #: woocommerce-ac.php:1154
134
- msgid "Sent"
135
- msgstr ""
136
-
137
- #: woocommerce-ac.php:1158
138
- msgid "Active ?"
139
- msgstr ""
140
-
141
- #: woocommerce-ac.php:1276
142
- msgid ""
143
- "The Report below shows how many Abandoned Carts we were able to recover for "
144
- "you by sending automatic emails to encourage shoppers."
145
- msgstr ""
146
-
147
- #: woocommerce-ac.php:1331
148
- msgid "Start Date:"
149
- msgstr ""
150
-
151
- #: woocommerce-ac.php:1334
152
- msgid "End Date:"
153
- msgstr ""
154
-
155
- #: woocommerce-ac.php:1337
156
- msgid "Go"
157
- msgstr ""
158
-
159
- #: woocommerce-ac.php:1495
160
- msgid "During the selected range"
161
- msgstr ""
162
-
163
- #: woocommerce-ac.php:1495
164
- msgid "carts totaling"
165
- msgstr ""
166
-
167
- #: woocommerce-ac.php:1495
168
- msgid "were abandoned. We were able to recover"
169
- msgstr ""
170
-
171
- #: woocommerce-ac.php:1495
172
- msgid "of them, which led to an extra"
173
- msgstr ""
174
-
175
- #: woocommerce-ac.php:1495
176
- msgid "in sales"
177
- msgstr ""
178
-
179
- #: woocommerce-ac.php:1504
180
- msgid "Created On"
181
- msgstr ""
182
-
183
- #: woocommerce-ac.php:1510
184
- msgid "Recovered Date"
185
- msgstr ""
186
-
187
- #: woocommerce-ac.php:1561
188
- msgid "Template Name:"
189
- msgstr ""
190
-
191
- #: woocommerce-ac.php:1572
192
- msgid "Enter a template name for reference"
193
- msgstr ""
194
-
195
- #: woocommerce-ac.php:1577
196
- msgid "Send From This Name:"
197
- msgstr ""
198
-
199
- #: woocommerce-ac.php:1588
200
- msgid "Enter the name that should appear in the email sent"
201
- msgstr ""
202
-
203
- #: woocommerce-ac.php:1594
204
- msgid "Subject:"
205
- msgstr ""
206
-
207
- #: woocommerce-ac.php:1605
208
- msgid "Enter the subject that should appear in the email sent"
209
- msgstr ""
210
-
211
- #: woocommerce-ac.php:1611
212
- msgid "Email Body:"
213
- msgstr ""
214
-
215
- #: woocommerce-ac.php:1627
216
- msgid "Message to be sent in the reminder email."
217
- msgstr ""
218
-
219
- #: woocommerce-ac.php:1634
220
- msgid "Send this email:"
221
- msgstr ""
222
-
223
- #: woocommerce-ac.php:1686
224
- msgid "after cart is abandoned."
225
- msgstr ""
226
-
227
- #: woocommerce-ac.php:1693
228
- msgid "Send a test email to:"
229
- msgstr ""
230
-
231
- #: woocommerce-ac.php:1699
232
- msgid "Enter the email id to which the test email needs to be sent."
233
- msgstr ""
234
-
235
- #: woocommerce-ac.php:1835 send_email.php:109
236
- msgid "Your Shopping Cart"
237
- msgstr ""
238
-
239
- #: woocommerce-ac.php:1838 send_email.php:112
240
- msgid "Item"
241
- msgstr ""
242
-
243
- #: woocommerce-ac.php:1839 send_email.php:113
244
- msgid "Name"
245
- msgstr ""
246
-
247
- #: woocommerce-ac.php:1840 send_email.php:114
248
- msgid "Quantity"
249
- msgstr ""
250
-
251
- #: woocommerce-ac.php:1841 send_email.php:115
252
- msgid "Price"
253
- msgstr ""
254
-
255
- #: woocommerce-ac.php:1842 send_email.php:116
256
- msgid "Line Subtotal"
257
- msgstr ""
258
-
259
- #: woocommerce-ac.php:1846
260
- msgid "Men\\'\\s Formal Shoes"
261
- msgstr ""
262
-
263
- #: woocommerce-ac.php:1853
264
- msgid "Woman\\'\\s Hand Bags"
265
- msgstr ""
266
-
267
- #: woocommerce-ac.php:1862 send_email.php:160
268
- msgid "Cart Total:"
269
- msgstr ""
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: woocommerce-ac\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2015-07-08 16:30+0530\n"
11
+ "PO-Revision-Date: 2015-07-16 11:02+0530\n"
12
+ "Last-Translator: \n"
13
+ "Language-Team: \n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Generator: Poedit 1.5.7\n"
18
+ "X-Poedit-KeywordsList: __;_e\n"
19
+ "X-Poedit-Basepath: .\n"
20
+
21
+ #: woocommerce-ac.php:22
22
+ msgid "Once Every Five Minutes"
23
+ msgstr ""
24
+
25
+ #: woocommerce-ac.php:204
26
+ #, php-format
27
+ msgid ""
28
+ "You can upgrade to the <a href=\"https://www.tychesoftwares.com/store/"
29
+ "premium-plugins/woocommerce-abandoned-cart-pro/\">PRO version of WooCommerce "
30
+ "Abandoned Cart plugin</a> at a <b>20% discount</b>. Use the coupon code: "
31
+ "<b>ACPRO20</b>.<a href=\"https://www.tychesoftwares.com/store/premium-"
32
+ "plugins/woocommerce-abandoned-cart-pro/\"> Purchase now </a> & save $24!"
33
+ msgstr ""
34
+
35
+ #: woocommerce-ac.php:314
36
+ msgid "Abandoned Carts"
37
+ msgstr ""
38
+
39
+ #: woocommerce-ac.php:516
40
+ msgid "Abandoned Orders"
41
+ msgstr ""
42
+
43
+ #: woocommerce-ac.php:517
44
+ msgid "Email Templates"
45
+ msgstr ""
46
+
47
+ #: woocommerce-ac.php:518 woocommerce-ac.php:712
48
+ msgid "Settings"
49
+ msgstr ""
50
+
51
+ #: woocommerce-ac.php:519
52
+ msgid "Recovered Orders"
53
+ msgstr ""
54
+
55
+ #: woocommerce-ac.php:661
56
+ msgid "You do not have sufficient permissions to access this page."
57
+ msgstr ""
58
+
59
+ #: woocommerce-ac.php:670
60
+ msgid "WooCommerce - Abandon Cart Lite"
61
+ msgstr ""
62
+
63
+ #: woocommerce-ac.php:696
64
+ msgid "Your settings have been saved."
65
+ msgstr ""
66
+
67
+ #: woocommerce-ac.php:718
68
+ msgid "Cart abandoned cut-off time"
69
+ msgstr ""
70
+
71
+ #: woocommerce-ac.php:741
72
+ msgid "minutes"
73
+ msgstr ""
74
+
75
+ #: woocommerce-ac.php:742 woocommerce-ac.php:743
76
+ msgid ""
77
+ "Consider cart abandoned after X minutes of item being added to cart & order "
78
+ "not placed"
79
+ msgstr ""
80
+
81
+ #: woocommerce-ac.php:753
82
+ msgid "Save Changes"
83
+ msgstr ""
84
+
85
+ #: woocommerce-ac.php:763
86
+ msgid ""
87
+ "The list below shows all Abandoned Carts which have remained in cart for a "
88
+ "time higher than the \"Cart abandoned cut-off time\" setting."
89
+ msgstr ""
90
+
91
+ #: woocommerce-ac.php:858 woocommerce-ac.php:1501
92
+ msgid "Customer"
93
+ msgstr ""
94
+
95
+ #: woocommerce-ac.php:859 woocommerce-ac.php:1514
96
+ msgid "Order Total"
97
+ msgstr ""
98
+
99
+ #: woocommerce-ac.php:862
100
+ msgid "Date"
101
+ msgstr ""
102
+
103
+ #: woocommerce-ac.php:868
104
+ msgid "Status"
105
+ msgstr ""
106
+
107
+ #: woocommerce-ac.php:872 woocommerce-ac.php:1159
108
+ msgid "Actions"
109
+ msgstr ""
110
+
111
+ #: woocommerce-ac.php:953
112
+ msgid ""
113
+ "Add email templates at different intervals to maximize the possibility of "
114
+ "recovering your abandoned carts."
115
+ msgstr ""
116
+
117
+ #: woocommerce-ac.php:1054
118
+ msgid "The Email Template has been successfully added."
119
+ msgstr ""
120
+
121
+ #: woocommerce-ac.php:1057
122
+ msgid "The Email Template has been successfully updated."
123
+ msgstr ""
124
+
125
+ #: woocommerce-ac.php:1145
126
+ msgid "Sr"
127
+ msgstr ""
128
+
129
+ #: woocommerce-ac.php:1148
130
+ msgid "Template Name"
131
+ msgstr ""
132
+
133
+ #: woocommerce-ac.php:1154
134
+ msgid "Sent"
135
+ msgstr ""
136
+
137
+ #: woocommerce-ac.php:1158
138
+ msgid "Active ?"
139
+ msgstr ""
140
+
141
+ #: woocommerce-ac.php:1276
142
+ msgid ""
143
+ "The Report below shows how many Abandoned Carts we were able to recover for "
144
+ "you by sending automatic emails to encourage shoppers."
145
+ msgstr ""
146
+
147
+ #: woocommerce-ac.php:1331
148
+ msgid "Start Date:"
149
+ msgstr ""
150
+
151
+ #: woocommerce-ac.php:1334
152
+ msgid "End Date:"
153
+ msgstr ""
154
+
155
+ #: woocommerce-ac.php:1337
156
+ msgid "Go"
157
+ msgstr ""
158
+
159
+ #: woocommerce-ac.php:1495
160
+ msgid "During the selected range"
161
+ msgstr ""
162
+
163
+ #: woocommerce-ac.php:1495
164
+ msgid "carts totaling"
165
+ msgstr ""
166
+
167
+ #: woocommerce-ac.php:1495
168
+ msgid "were abandoned. We were able to recover"
169
+ msgstr ""
170
+
171
+ #: woocommerce-ac.php:1495
172
+ msgid "of them, which led to an extra"
173
+ msgstr ""
174
+
175
+ #: woocommerce-ac.php:1495
176
+ msgid "in sales"
177
+ msgstr ""
178
+
179
+ #: woocommerce-ac.php:1504
180
+ msgid "Created On"
181
+ msgstr ""
182
+
183
+ #: woocommerce-ac.php:1510
184
+ msgid "Recovered Date"
185
+ msgstr ""
186
+
187
+ #: woocommerce-ac.php:1561
188
+ msgid "Template Name:"
189
+ msgstr ""
190
+
191
+ #: woocommerce-ac.php:1572
192
+ msgid "Enter a template name for reference"
193
+ msgstr ""
194
+
195
+ #: woocommerce-ac.php:1577
196
+ msgid "Send From This Name:"
197
+ msgstr ""
198
+
199
+ #: woocommerce-ac.php:1588
200
+ msgid "Enter the name that should appear in the email sent"
201
+ msgstr ""
202
+
203
+ #: woocommerce-ac.php:1594
204
+ msgid "Subject:"
205
+ msgstr ""
206
+
207
+ #: woocommerce-ac.php:1605
208
+ msgid "Enter the subject that should appear in the email sent"
209
+ msgstr ""
210
+
211
+ #: woocommerce-ac.php:1611
212
+ msgid "Email Body:"
213
+ msgstr ""
214
+
215
+ #: woocommerce-ac.php:1627
216
+ msgid "Message to be sent in the reminder email."
217
+ msgstr ""
218
+
219
+ #: woocommerce-ac.php:1634
220
+ msgid "Send this email:"
221
+ msgstr ""
222
+
223
+ #: woocommerce-ac.php:1686
224
+ msgid "after cart is abandoned."
225
+ msgstr ""
226
+
227
+ #: woocommerce-ac.php:1693
228
+ msgid "Send a test email to:"
229
+ msgstr ""
230
+
231
+ #: woocommerce-ac.php:1699
232
+ msgid "Enter the email id to which the test email needs to be sent."
233
+ msgstr ""
234
+
235
+ #: woocommerce-ac.php:1835 send_email.php:109
236
+ msgid "Your Shopping Cart"
237
+ msgstr ""
238
+
239
+ #: woocommerce-ac.php:1838 send_email.php:112
240
+ msgid "Item"
241
+ msgstr ""
242
+
243
+ #: woocommerce-ac.php:1839 send_email.php:113
244
+ msgid "Name"
245
+ msgstr ""
246
+
247
+ #: woocommerce-ac.php:1840 send_email.php:114
248
+ msgid "Quantity"
249
+ msgstr ""
250
+
251
+ #: woocommerce-ac.php:1841 send_email.php:115
252
+ msgid "Price"
253
+ msgstr ""
254
+
255
+ #: woocommerce-ac.php:1842 send_email.php:116
256
+ msgid "Line Subtotal"
257
+ msgstr ""
258
+
259
+ #: woocommerce-ac.php:1846
260
+ msgid "Men\\'\\s Formal Shoes"
261
+ msgstr ""
262
+
263
+ #: woocommerce-ac.php:1853
264
+ msgid "Woman\\'\\s Hand Bags"
265
+ msgstr ""
266
+
267
+ #: woocommerce-ac.php:1862 send_email.php:160
268
+ msgid "Cart Total:"
269
+ msgstr ""
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Woocommerce Abandoned Cart Lite ===
2
- Contributors: ashokrane, pinal.shah, mansishah, dharakothari, bhavik.kiri
3
  Tags: abandon cart, shopping cart abandonment
4
  Requires at least: 1.3
5
- Tested up to: 4.4
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,35 +16,32 @@ Abandoned Cart plugin works in the background, sending email notifications to yo
16
 
17
  The Abandoned Cart plugin allows you to recover orders that were just a step away from closing. It enables you to create automatic & well-timed email reminders to be sent to your customers who have added your products to their cart, but did not complete the order. As a result, with this plugin you will start recovering at least 30% or more of your lost sales. Why let this 30% revenue go unclaimed?
18
 
19
- Abandoned Cart Lite plugin enables to do the following things:
20
  <ol>
21
  <li>Recover their abandoned carts in a single click</li>
22
- <li>Identify the Abandoned Orders information, including the products that were abandoned</li>
23
- <li>The plugin now captures abandoned guest carts. A guest user's cart will be captured on the Checkout page, if it is abandoned after entering the email address.</li>
24
- <li>Track abandoned orders value v/s recovered orders value</li>
25
- <li>Admin is notified by email when an order is recovered</li>
26
- <li>Works off-the-shelf as it comes with 1 default email template</li>
27
- <li>Create unlimited email templates to be sent at intervals that you set - Intervals start from 1 hour after cart is abandoned</li>
28
- <li>Add custom variables like Customer First Name, Customer Last name, Customer full name, Cart Link & Product Cart Information in the email template</li>
29
- <li>Copy HTML from anywhere & create templates using the powerful Rich Text Editor</li>
30
- <li>Automatically stops email notifications when a customer makes a purchase or uses the cart recovery link</li>
31
  </ol>
32
 
33
- Abandoned Cart PRO plugin enables to do the following additional things:
34
  <ol>
35
- <li>Works off-the-shelf as it comes with 3 default email templates</li>
36
- <li>Offer incentives to customers to return and complete their checkout with discounts and coupons</li>
 
37
  <li>Add custom variables like Customer Name, Product Information, Coupons, etc. in the email template</li>
38
- <li>Embed Woocommerce coupons & also generate unique coupons in the emails being sent to customers</li>
 
39
  <li>Track whether expired coupons are causing cart abandonment</li>
 
 
40
  <li>Track emails sent, emails opened, links clicked for each template/email</li>
41
- <li>Product report allows you to see which products are being abandoned & which are being recovered the most</li>
42
- <li>Create unlimited email templates to be sent at intervals that you set - Intervals start from 1 minute after cart is abandoned</li>
43
  </ol>
44
 
 
 
45
  **Pro Version:**
46
 
47
- **[WooCommerce Abandoned Cart Pro 2.4.7](http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro "WooCommerce Abandoned Cart Pro")** - The PRO version allows you to track products in abandoned carts, create unlimited email templates, track coupons, keep a track of sent emails & much more.
48
 
49
 
50
  **Email Sending Setup:**
@@ -67,16 +64,10 @@ Abandoned Cart Plugin relies on a function called WP-Cron, and this function onl
67
 
68
  Currently there is no provision for tracking guest carts. This is planned in a future release.
69
 
70
- UPDATE: This feature has been released in version 2.2.
71
-
72
  = Why are abandoned cart notification emails not getting sent? =
73
 
74
  Please ensure you have followed the instructions in "Email Sending Setup" right above this FAQ. Additionally, if you have the PRO version, please verify that you have selected "Enable abandoned cart notifications" option in Settings. With this option turned off, the abandoned carts are recorded, but emails are not sent.
75
 
76
- = Where can I find the documentation on how to setup the plugin? =
77
-
78
- The documentation can be found **[here](https://www.tychesoftwares.com/woocommerce-abandon-cart-plugin-documentation/ "WooCommerce Abandoned Cart Pro")**. The Lite version is a subset of the Pro version, so the same documentation can be used to refer for the Lite version of the plugin.
79
-
80
  == Screenshots ==
81
 
82
  1. Lists all Abandoned Orders.
@@ -89,66 +80,6 @@ The documentation can be found **[here](https://www.tychesoftwares.com/woocommer
89
 
90
  == Changelog ==
91
 
92
- = 2.5 =
93
-
94
- * The Settings page for the plugin has been redone. We are now using the WordPress Settings API for all the options on that page.
95
- * When the plugin is installed & activated for the first time, 1 default email template will also be created. The template will be inactive when the plugin is activated.
96
- * A new setting is added on the Add/Edit Template page named as "Active". If this setting is checked, only then the abandoned cart reminder email will be sent to the customers. If this setting is unchecked, then the email template won't be sent to the customers, but still you can keep it in the plugin. By default, this is unchecked.
97
- * A new setting is added on the Add/Edit Template page named as "Use WooCommerce Template Style". If this setting is checked then abandoned cart reminder email will use the WooCommerce style (header, footer, background, etc.) for the notifications. If it is not checked then the regular email will be sent to the customer as per the formatting that is set in the template editor.
98
- For existing users, this setting will remain unchecked. For new users of the plugin, the setting will be enabled for the existing default email template that is provided with the plugin.
99
- * Abandoned cart email notification will be sent to the client's billing address entered on checkout instead of on the email address added by the user while registering to the website. This applies only for logged in users.
100
- * New shortcode "{{cart.abandoned_date}}" has been introduced in this version. It will display the date and time when the cart was abandoned in the abandoned cart email notification.
101
- * When a customer places an order within the abandoned cart cut off time, then the order received page was displaying a warning. This has been fixed.
102
- * Abandoned Orders tab was not sorting according to the "Date" column. Same way, Recovered Orders tab was not sorting according to "Created On" & "Recovered Date" column. This has been fixed.
103
- * Some warnings were displayed on the Abandoned Orders, Recovered Orders and Product Report tab. These have been fixed.
104
- * The 'mailto' link was not working on the Abandoned Order details page. This has been fixed.
105
- * Tweak - Removed the background white color for the add / edit template page.
106
- * Tweak - Abandoned Orders tab will display the user's billing address using which the cart was abandoned. This applies only for logged in users.
107
-
108
- = 2.4 =
109
- * Abandon Cart record was not being deleted for users, when they do not reach the order received page but the payment for the order is already done. Also user was receiving the abandoned cart notification for such orders. This has been fixed.
110
-
111
- = 2.3 =
112
- * A new setting has been added "Email admin on order recovery". It will send an email to the admin's email address when an abandoned cart is recovered by the customer. This will work only for registered users.
113
- * A new tab "Product Report" has been added. It will list the product name, number of times product has been abandoned and the number of times product has been recovered.
114
-
115
- = 2.2 =
116
- * The plugin now captures abandoned guest carts. A guest user's cart will be captured on the Checkout page, if it is abandoned after entering the email address.
117
- * A new shortcode "{{cart.link}}" is added, which will include the cart URL of your shop.
118
- * Fixed some warnings being displayed in the Settings tab.
119
-
120
- = 2.1 =
121
- * From this version, you can view the abandoned order details, which includes product details, billing & shipping address, under the Abandoned Orders tab.
122
-
123
- = 2.0.1 =
124
- * Applied fix for warning displayed on the abandoned orders page.
125
-
126
- = 2.0 =
127
- * The image link was coming broken while creating or editing the template if the image is present on the same server. This is fixed now.
128
- * Added translations file for Hebrew which was contributed by a user.
129
-
130
- = 1.9 =
131
- * Fixed security issues pointed out by Wordpress.org review team.
132
-
133
- = 1.8 =
134
- * The strings for the products table, added using the shortcode {{products.cart}} in email templates have been added to the .pot, .po and .mo files of the plugin. Now the cart data will be translated to the respective language in the reminder emails as well as the test emails.
135
-
136
- = 1.7 =
137
- * Merge fields like {{products.cart}}, {{customer.firstname}}, etc. will be replaced with dummy data in the test emails that are sent from the template add / edit page. This ensures that you get a very close approximation of the actual email that will be delivered to your customers.
138
- * Product image size in the abandon cart notification emails is set to a fixed height & width now.
139
- * On WordPress Multisite, incorrect table prefix was used due to which the plugin was not functioning correctly on multisite installs. This is fixed now.
140
-
141
- = 1.6 =
142
- * We have included .po, .pot and .mo files in the plugin. The plugin strings can now be translated to any language using these files.
143
-
144
- = 1.5 =
145
- * A shortcode {{products.cart}} can now be added in the abandoned cart notification emails. It will add the product information in the email like Product image, Product name, Quantity, Price & Total. The shortcode needs to be added from the AC menu from the template editor.
146
- * The default value of the field "Cart abandoned cut-off time" in Settings tab was blank when the plugin is installed. This is now set to 60 minutes upon plugin activation.
147
-
148
- = 1.4 =
149
- * The abandoned cart emails were being sent multiple times for a single email template due to a bug. This is fixed.
150
- * The plugin will now work on WordPress Multisite too.
151
-
152
  = 1.3 =
153
  * The abandoned cart email notifications are now sent out automatically without the necessity of having to set up a cron job manually.
154
 
1
  === Woocommerce Abandoned Cart Lite ===
2
+ Contributors: ashokrane
3
  Tags: abandon cart, shopping cart abandonment
4
  Requires at least: 1.3
5
+ Tested up to: 4.1.1
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
16
 
17
  The Abandoned Cart plugin allows you to recover orders that were just a step away from closing. It enables you to create automatic & well-timed email reminders to be sent to your customers who have added your products to their cart, but did not complete the order. As a result, with this plugin you will start recovering at least 30% or more of your lost sales. Why let this 30% revenue go unclaimed?
18
 
19
+ Abandoned Cart plugin enables Customers to:
20
  <ol>
21
  <li>Recover their abandoned carts in a single click</li>
22
+ <li>Automatically logs in registered customers</li>
 
 
 
 
 
 
 
 
23
  </ol>
24
 
25
+ Abandoned Cart plugin enables Admin to:
26
  <ol>
27
+ <li>Identify the Abandoned Orders information, including the products that were abandoned</li>
28
+ <li>Offer incentives to customers to return and complete their checkout with discounts and coupons.</li>
29
+ <li>Create unlimited email templates to be sent at intervals that you set</li>
30
  <li>Add custom variables like Customer Name, Product Information, Coupons, etc. in the email template</li>
31
+ <li>Embed Woocommerce coupons in the emails being sent to customers</li>
32
+ <li>Copy HTML from anywhere & create templates using the powerful Rich Text Editor</li>
33
  <li>Track whether expired coupons are causing cart abandonment</li>
34
+ <li>You are notified by email when an order is recovered</li>
35
+ <li>Track abandoned orders value v/s recovered orders value</li>
36
  <li>Track emails sent, emails opened, links clicked for each template/email</li>
37
+ <li>Automatically stops email notifications when a customer makes a purchase or uses the cart recovery link</li>
 
38
  </ol>
39
 
40
+ Note: Some features are available in the PRO version only.
41
+
42
  **Pro Version:**
43
 
44
+ **[WooCommerce Abandoned Cart Pro 1.0](http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro "WooCommerce Abandoned Cart Pro")** - The PRO version allows you to track products in abandoned carts, create unlimited email templates, track coupons, keep a track of sent emails & much more.
45
 
46
 
47
  **Email Sending Setup:**
64
 
65
  Currently there is no provision for tracking guest carts. This is planned in a future release.
66
 
 
 
67
  = Why are abandoned cart notification emails not getting sent? =
68
 
69
  Please ensure you have followed the instructions in "Email Sending Setup" right above this FAQ. Additionally, if you have the PRO version, please verify that you have selected "Enable abandoned cart notifications" option in Settings. With this option turned off, the abandoned carts are recorded, but emails are not sent.
70
 
 
 
 
 
71
  == Screenshots ==
72
 
73
  1. Lists all Abandoned Orders.
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  = 1.3 =
84
  * The abandoned cart email notifications are now sent out automatically without the necessity of having to set up a cron job manually.
85
 
views/wacp-email-template-preview.php CHANGED
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
 
17
  <p align="center"> Hello John Carter, </p>
18
  <p> &nbsp; </p>
19
- <p align="center"> We\'re following up with you, because we noticed that on 12-12-2015 you attempted to purchase the following products on <?php echo get_option( 'blogname' );?>. </p>
20
  <p> &nbsp; </p>
21
  <p>
22
 
16
 
17
  <p align="center"> Hello John Carter, </p>
18
  <p> &nbsp; </p>
19
+ <p align="center"> We're following up with you, because we noticed that on 12-12-2015 you attempted to purchase the following products on <?php echo get_option( 'blogname' );?>. </p>
20
  <p> &nbsp; </p>
21
  <p>
22
 
views/wacp-wc-email-template-preview.php CHANGED
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
12
 
13
  <p > Hello John Carter, </p>
14
  <p> &nbsp; </p>
15
- <p > We\'re following up with you, because we noticed that on 12-12-2015 you attempted to purchase the following products on <?php echo get_option( 'blogname' );?>. </p>
16
  <p> &nbsp; </p>
17
  <p>
18
 
12
 
13
  <p > Hello John Carter, </p>
14
  <p> &nbsp; </p>
15
+ <p > We're following up with you, because we noticed that on 12-12-2015 you attempted to purchase the following products on <?php echo get_option( 'blogname' );?>. </p>
16
  <p> &nbsp; </p>
17
  <p>
18
 
woo-includes/class-wc-dependencies.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- /**
3
- * WC Dependency Checker
4
- *
5
- * Checks if WooCommerce is enabled
6
- */
7
- class WC_Dependencies {
8
-
9
- private static $active_plugins;
10
-
11
- function init() {
12
-
13
- self::$active_plugins = (array) get_option( 'active_plugins', array() );
14
-
15
- if ( is_multisite() )
16
- self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
17
- }
18
-
19
- function woocommerce_active_check() {
20
-
21
- if ( ! self::$active_plugins ) self::init();
22
-
23
- return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
24
-
25
- }
26
-
27
- }
28
-
29
-
1
+ <?php
2
+ /**
3
+ * WC Dependency Checker
4
+ *
5
+ * Checks if WooCommerce is enabled
6
+ */
7
+ class WC_Dependencies {
8
+
9
+ private static $active_plugins;
10
+
11
+ function init() {
12
+
13
+ self::$active_plugins = (array) get_option( 'active_plugins', array() );
14
+
15
+ if ( is_multisite() )
16
+ self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
17
+ }
18
+
19
+ function woocommerce_active_check() {
20
+
21
+ if ( ! self::$active_plugins ) self::init();
22
+
23
+ return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
24
+
25
+ }
26
+
27
+ }
28
+
29
+
woo-includes/woo-functions.php CHANGED
@@ -1,97 +1,97 @@
1
- <?php
2
- /**
3
- * Functions used by plugins
4
- */
5
- if ( ! class_exists( 'WC_Dependencies' ) )
6
- require_once 'class-wc-dependencies.php';
7
-
8
- /**
9
- * WC Detection
10
- */
11
- if ( ! function_exists( 'is_woocommerce_active' ) ) {
12
- function is_woocommerce_active() {
13
- return WC_Dependencies::woocommerce_active_check();
14
- }
15
- }
16
-
17
- /**
18
- * Queue updates for the WooUpdater
19
- */
20
- if ( ! function_exists( 'woothemes_queue_update' ) ) {
21
- function woothemes_queue_update( $file, $file_id, $product_id ) {
22
- global $woothemes_queued_updates;
23
-
24
- if ( ! isset( $woothemes_queued_updates ) )
25
- $woothemes_queued_updates = array();
26
-
27
- $plugin = new stdClass();
28
- $plugin->file = $file;
29
- $plugin->file_id = $file_id;
30
- $plugin->product_id = $product_id;
31
-
32
- $woothemes_queued_updates[] = $plugin;
33
- }
34
- }
35
-
36
- /**
37
- * Load installer for the WooThemes Updater.
38
- * @return $api Object
39
- */
40
- if ( ! class_exists( 'WooThemes_Updater' ) && ! function_exists( 'woothemes_updater_install' ) ) {
41
- function woothemes_updater_install( $api, $action, $args ) {
42
- $download_url = 'http://woodojo.s3.amazonaws.com/downloads/woothemes-updater/woothemes-updater.zip';
43
-
44
- if ( 'plugin_information' != $action ||
45
- false !== $api ||
46
- ! isset( $args->slug ) ||
47
- 'woothemes-updater' != $args->slug
48
- ) return $api;
49
-
50
- $api = new stdClass();
51
- $api->name = 'WooThemes Updater';
52
- $api->version = '1.0.0';
53
- $api->download_link = esc_url( $download_url );
54
- return $api;
55
- }
56
-
57
- add_filter( 'plugins_api', 'woothemes_updater_install', 10, 3 );
58
- }
59
-
60
- /**
61
- * WooUpdater Installation Prompts
62
- */
63
- if ( ! class_exists( 'WooThemes_Updater' ) && ! function_exists( 'woothemes_updater_notice' ) ) {
64
-
65
- /**
66
- * Display a notice if the "WooThemes Updater" plugin hasn't been installed.
67
- * @return void
68
- */
69
- function woothemes_updater_notice() {
70
- $active_plugins = apply_filters( 'active_plugins', get_option('active_plugins' ) );
71
- if ( in_array( 'woothemes-updater/woothemes-updater.php', $active_plugins ) ) return;
72
-
73
- $slug = 'woothemes-updater';
74
- $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug ), 'install-plugin_' . $slug );
75
- $activate_url = 'plugins.php?action=activate&plugin=' . urlencode( 'woothemes-updater/woothemes-updater.php' ) . '&plugin_status=all&paged=1&s&_wpnonce=' . urlencode( wp_create_nonce( 'activate-plugin_woothemes-updater/woothemes-updater.php' ) );
76
-
77
- $message = '<a href="' . esc_url( $install_url ) . '">Install the WooThemes Updater plugin</a> to get updates for your WooThemes plugins.';
78
- $is_downloaded = false;
79
- $plugins = array_keys( get_plugins() );
80
- foreach ( $plugins as $plugin ) {
81
- if ( strpos( $plugin, 'woothemes-updater.php' ) !== false ) {
82
- $is_downloaded = true;
83
- $message = '<a href="' . esc_url( admin_url( $activate_url ) ) . '">Activate the WooThemes Updater plugin</a> to get updates for your WooThemes plugins.';
84
- }
85
- }
86
- echo '<div class="updated fade"><p>' . $message . '</p></div>' . "\n";
87
- }
88
-
89
- add_action( 'admin_notices', 'woothemes_updater_notice' );
90
- }
91
-
92
- /**
93
- * Prevent conflicts with older versions
94
- */
95
- if ( ! class_exists( 'WooThemes_Plugin_Updater' ) ) {
96
- class WooThemes_Plugin_Updater { function init() {} }
97
  }
1
+ <?php
2
+ /**
3
+ * Functions used by plugins
4
+ */
5
+ if ( ! class_exists( 'WC_Dependencies' ) )
6
+ require_once 'class-wc-dependencies.php';
7
+
8
+ /**
9
+ * WC Detection
10
+ */
11
+ if ( ! function_exists( 'is_woocommerce_active' ) ) {
12
+ function is_woocommerce_active() {
13
+ return WC_Dependencies::woocommerce_active_check();
14
+ }
15
+ }
16
+
17
+ /**
18
+ * Queue updates for the WooUpdater
19
+ */
20
+ if ( ! function_exists( 'woothemes_queue_update' ) ) {
21
+ function woothemes_queue_update( $file, $file_id, $product_id ) {
22
+ global $woothemes_queued_updates;
23
+
24
+ if ( ! isset( $woothemes_queued_updates ) )
25
+ $woothemes_queued_updates = array();
26
+
27
+ $plugin = new stdClass();
28
+ $plugin->file = $file;
29
+ $plugin->file_id = $file_id;
30
+ $plugin->product_id = $product_id;
31
+
32
+ $woothemes_queued_updates[] = $plugin;
33
+ }
34
+ }
35
+
36
+ /**
37
+ * Load installer for the WooThemes Updater.
38
+ * @return $api Object
39
+ */
40
+ if ( ! class_exists( 'WooThemes_Updater' ) && ! function_exists( 'woothemes_updater_install' ) ) {
41
+ function woothemes_updater_install( $api, $action, $args ) {
42
+ $download_url = 'http://woodojo.s3.amazonaws.com/downloads/woothemes-updater/woothemes-updater.zip';
43
+
44
+ if ( 'plugin_information' != $action ||
45
+ false !== $api ||
46
+ ! isset( $args->slug ) ||
47
+ 'woothemes-updater' != $args->slug
48
+ ) return $api;
49
+
50
+ $api = new stdClass();
51
+ $api->name = 'WooThemes Updater';
52
+ $api->version = '1.0.0';
53
+ $api->download_link = esc_url( $download_url );
54
+ return $api;
55
+ }
56
+
57
+ add_filter( 'plugins_api', 'woothemes_updater_install', 10, 3 );
58
+ }
59
+
60
+ /**
61
+ * WooUpdater Installation Prompts
62
+ */
63
+ if ( ! class_exists( 'WooThemes_Updater' ) && ! function_exists( 'woothemes_updater_notice' ) ) {
64
+
65
+ /**
66
+ * Display a notice if the "WooThemes Updater" plugin hasn't been installed.
67
+ * @return void
68
+ */
69
+ function woothemes_updater_notice() {
70
+ $active_plugins = apply_filters( 'active_plugins', get_option('active_plugins' ) );
71
+ if ( in_array( 'woothemes-updater/woothemes-updater.php', $active_plugins ) ) return;
72
+
73
+ $slug = 'woothemes-updater';
74
+ $install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $slug ), 'install-plugin_' . $slug );
75
+ $activate_url = 'plugins.php?action=activate&plugin=' . urlencode( 'woothemes-updater/woothemes-updater.php' ) . '&plugin_status=all&paged=1&s&_wpnonce=' . urlencode( wp_create_nonce( 'activate-plugin_woothemes-updater/woothemes-updater.php' ) );
76
+
77
+ $message = '<a href="' . esc_url( $install_url ) . '">Install the WooThemes Updater plugin</a> to get updates for your WooThemes plugins.';
78
+ $is_downloaded = false;
79
+ $plugins = array_keys( get_plugins() );
80
+ foreach ( $plugins as $plugin ) {
81
+ if ( strpos( $plugin, 'woothemes-updater.php' ) !== false ) {
82
+ $is_downloaded = true;
83
+ $message = '<a href="' . esc_url( admin_url( $activate_url ) ) . '">Activate the WooThemes Updater plugin</a> to get updates for your WooThemes plugins.';
84
+ }
85
+ }
86
+ echo '<div class="updated fade"><p>' . $message . '</p></div>' . "\n";
87
+ }
88
+
89
+ add_action( 'admin_notices', 'woothemes_updater_notice' );
90
+ }
91
+
92
+ /**
93
+ * Prevent conflicts with older versions
94
+ */
95
+ if ( ! class_exists( 'WooThemes_Plugin_Updater' ) ) {
96
+ class WooThemes_Plugin_Updater { function init() {} }
97
  }
woocommerce-ac.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce Abandon Cart Lite Plugin
4
  Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
5
  Description: This plugin captures abandoned carts by logged-in users & emails them about it. <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the PRO Version.</a></strong>
6
- Version: 2.5
7
  Author: Tyche Softwares
8
  Author URI: http://www.tychesoftwares.com/
9
  */
@@ -17,7 +17,7 @@ register_uninstall_hook( __FILE__, 'woocommerce_ac_delete' );
17
 
18
  include_once( "woocommerce_guest_ac.class.php" );
19
  include_once( "default-settings.php" );
20
-
21
  // Add a new interval of 5 minutes
22
  add_filter( 'cron_schedules', 'woocommerce_ac_add_cron_schedule' );
23
 
@@ -38,7 +38,9 @@ if ( ! wp_next_scheduled( 'woocommerce_ac_send_email_action' ) ) {
38
  // Hook into that action that'll fire every 5 minutes
39
  add_action( 'woocommerce_ac_send_email_action', 'woocommerce_ac_send_email_cron' );
40
  function woocommerce_ac_send_email_cron() {
41
- require_once( ABSPATH.'wp-content/plugins/woocommerce-abandoned-cart/cron/send_email.php' );
 
 
42
  }
43
 
44
  function woocommerce_ac_delete(){
@@ -64,9 +66,19 @@ function woocommerce_ac_delete(){
64
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
65
  $wpdb->get_results( $sql_ac_abandoned_cart_history );
66
 
 
 
 
 
 
 
 
 
67
  $query = "SELECT blog_id FROM `".$wpdb->prefix."blogs`";
68
  $results = $wpdb->get_results( $query );
69
 
 
 
70
  foreach( $results as $key => $value ) {
71
 
72
  $table_name_ac_abandoned_cart_history = $wpdb->prefix .$value->blog_id."_"."ac_abandoned_cart_history_lite";
@@ -88,6 +100,14 @@ function woocommerce_ac_delete(){
88
  $sql_ac_abandoned_cart_history = "DROP TABLE " . $table_name_ac_guest_abandoned_cart_history ;
89
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
90
  $wpdb->get_results( $sql_ac_abandoned_cart_history );
 
 
 
 
 
 
 
 
91
 
92
  }
93
 
@@ -204,6 +224,7 @@ function woocommerce_ac_delete(){
204
  add_action('woocommerce_order_status_failed_to_processing_notification', array(&$this, 'ac_email_admin_recovery'));
205
  add_action('woocommerce_order_status_failed_to_completed_notification', array(&$this, 'ac_email_admin_recovery'));
206
  add_action( 'admin_init', array( $this, 'wcap_preview_emails' ) );
 
207
  }
208
 
209
  /*-----------------------------------------------------------------------------------*/
@@ -335,7 +356,17 @@ function woocommerce_ac_delete(){
335
 
336
  $wpdb->get_results( $alter_template_table_query );
337
  }
338
-
 
 
 
 
 
 
 
 
 
 
339
  $sent_table_name = $wpdb->prefix . "ac_sent_history_lite";
340
 
341
  $sql_query = "CREATE TABLE IF NOT EXISTS $sent_table_name (
@@ -547,10 +578,19 @@ function woocommerce_ac_delete(){
547
  if ( count( $results ) == 0 ) {
548
  $alter_template_table_query = "ALTER TABLE $table_name
549
  ADD COLUMN `is_wc_template` enum('0','1') COLLATE utf8_unicode_ci NOT NULL AFTER `from_name`,
550
- ADD COLUMN `default_template` int(11) NOT NULL AFTER `is_wc_template`";
551
  $wpdb->get_results( $alter_template_table_query );
552
  }
 
 
 
553
 
 
 
 
 
 
 
554
  $guest_table = $wpdb->prefix."ac_guest_abandoned_cart_history_lite" ;
555
  $query_guest_table = "SHOW TABLES LIKE '$guest_table' ";
556
  $result_guest_table = $wpdb->get_results( $query_guest_table );
@@ -805,7 +845,9 @@ function woocommerce_ac_delete(){
805
  if ( $track_link == 'track_links' ) {
806
  global $wpdb;
807
 
808
- $validate_server_string = $_SERVER["QUERY_STRING"];
 
 
809
  $validate_server_arr = explode("validate=", $validate_server_string);
810
  $validate_encoded_string = end($validate_server_arr);
811
 
@@ -837,13 +879,15 @@ function woocommerce_ac_delete(){
837
  exit;
838
  }
839
  $user = wp_set_current_user( $user_id );
 
 
840
 
841
  if ( $user_id >= "63000000" ) {
842
  $query_guest = "SELECT * from `". $wpdb->prefix."ac_guest_abandoned_cart_history_lite` WHERE id = %d";
843
  $results_guest = $wpdb->get_results( $wpdb->prepare( $query_guest, $user_id ) );
844
  $query_cart = "SELECT recovered_cart FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite` WHERE user_id = %d";
845
  $results = $wpdb->get_results( $wpdb->prepare( $query_cart, $user_id ) );
846
-
847
  if ( $results_guest && $results[0]->recovered_cart == '0' ) {
848
  $_SESSION[ 'guest_first_name' ] = $results_guest[0]->billing_first_name;
849
  $_SESSION[ 'guest_last_name' ] = $results_guest[0]->billing_last_name;
@@ -878,7 +922,9 @@ function woocommerce_ac_delete(){
878
  function woocommerce_load_guest_persistent_cart() {
879
  global $woocommerce;
880
 
881
- $saved_cart = json_decode( get_user_meta( $_SESSION['user_id'], '_woocommerce_persistent_cart', true ), true );
 
 
882
  $c = array();
883
  $cart_contents_total = $cart_contents_weight = $cart_contents_count = $cart_contents_tax = $total = $subtotal = $subtotal_ex_tax = $tax_total = 0;
884
 
@@ -1161,6 +1207,11 @@ function woocommerce_ac_delete(){
1161
  location.href='admin.php?page=woocommerce_ac_page&action=emailtemplates&mode=removetemplate&id='+id;
1162
  }
1163
  }
 
 
 
 
 
1164
  </script>
1165
 
1166
  <?php
@@ -1222,7 +1273,7 @@ function woocommerce_ac_delete(){
1222
  wp_enqueue_style( 'jquery-ui', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" , '', '', false );
1223
  wp_enqueue_style( 'woocommerce_admin_styles', plugins_url() . '/woocommerce/assets/css/admin.css' );
1224
  wp_enqueue_style( 'jquery-ui-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
1225
-
1226
  ?>
1227
 
1228
  <style>
@@ -1237,6 +1288,12 @@ function woocommerce_ac_delete(){
1237
  <?php
1238
  }
1239
  }
 
 
 
 
 
 
1240
 
1241
  /**
1242
  * Abandon Cart Settings Page
@@ -1271,11 +1328,53 @@ function woocommerce_ac_delete(){
1271
  }
1272
 
1273
  $this->display_tabs();
1274
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1275
  if ( $action == 'emailsettings' ) {
1276
  // Save the field values
1277
  ?>
1278
- <p><?php _e( 'Change settings for sending email notifications to Customers after X minute, to Admin.', 'woocommerce-ac' ); ?></p>
1279
  <div id="content">
1280
 
1281
  <form method="post" action="options.php">
@@ -1293,211 +1392,20 @@ function woocommerce_ac_delete(){
1293
  <p> <?php _e( 'The list below shows all Abandoned Carts which have remained in cart for a time higher than the "Cart abandoned cut-off time" setting.', 'woocommerce-ac' );?> </p>
1294
 
1295
  <?php
1296
-
1297
- include_once( "pagination.class.php");
1298
-
1299
- /* Find the number of rows returned from a query; Note: Do NOT use a LIMIT clause in this query */
1300
-
1301
- $recoverd_cart = 0;
1302
- $query = "SELECT wpac . * , wpu.user_login, wpu.user_email
1303
- FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite` AS wpac
1304
- LEFT JOIN ".$wpdb->base_prefix."users AS wpu ON wpac.user_id = wpu.id
1305
- WHERE recovered_cart= %d ";
1306
- $results = $wpdb->get_results( $wpdb->prepare( $query, $recoverd_cart ) );
1307
-
1308
- $count = $wpdb->num_rows;
1309
-
1310
- if( $count > 0 ) {
1311
- $p = new pagination;
1312
- $p->items( $count );
1313
- $p->limit( 10 ); // Limit entries per page
1314
- $p->target( "admin.php?page=woocommerce_ac_page&action=listcart" );
1315
-
1316
- if ( isset( $p->paging ) ) {
1317
- if ( isset( $_GET[ $p->paging ] ) ) $p->currentPage( $_GET[ $p->paging ] ); // Gets and validates the current page
1318
- }
1319
- $p->calculate(); // Calculates what to show
1320
- $p->parameterName( 'paging' );
1321
- $p->adjacents( 1 ); //No. of page away from the current page
1322
- $p->showCounter( true );
1323
-
1324
- if( !isset( $_GET[ 'paging' ] ) ) {
1325
- $p->page = 1;
1326
- } else {
1327
- $p->page = $_GET[ 'paging' ];
1328
- }
1329
-
1330
- //Query for limit paging
1331
- $limit = "LIMIT " . ($p->page - 1) * $p->limit . ", " . $p->limit;
1332
- $limit_one = ($p->page - 1) * $p->limit;
1333
- $limit_two = $p->limit;
1334
- } else
1335
- $limit = $limit_one = $limit_two = "";
1336
-
1337
- ?>
1338
-
1339
- <div class="tablenav">
1340
- <div class='tablenav-pages'>
1341
- <?php if ( $count > 0 ) echo $p->show(); // Echo out the list of paging. ?>
1342
- </div>
1343
- </div>
1344
-
1345
- <?php
1346
-
1347
- $order = "";
1348
- if( isset( $_GET[ 'order' ] ) ){
1349
- $order = $_GET[ 'order' ];
1350
- }
1351
- if ( $order == "" ) {
1352
- $order = "desc";
1353
- $order_next = "asc";
1354
- }
1355
- elseif ( $order == "asc" ) {
1356
- $order_next = "desc";
1357
- } elseif ( $order == "desc" ) {
1358
- $order_next = "asc";
1359
- }
1360
-
1361
- $order_by = "";
1362
- if( isset( $_GET[ 'orderby' ] ) ){
1363
- $order_by = $_GET[ 'orderby' ];
1364
- }
1365
- if ( $order_by == "" ) {
1366
- $order_by = "abandoned_cart_time";
1367
- }
1368
- /* Now we use the LIMIT clause to grab a range of rows */
1369
-
1370
- $query = "SELECT wpac . * , wpu.user_login, wpu.user_email
1371
- FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite` AS wpac
1372
- LEFT JOIN ".$wpdb->base_prefix."users AS wpu ON wpac.user_id = wpu.id
1373
- WHERE recovered_cart = %d
1374
- ORDER BY abandoned_cart_time $order LIMIT %d, %d ";
1375
-
1376
- $results = $wpdb->get_results( $wpdb->prepare( $query, $recoverd_cart, $limit_one, $limit_two ) );
1377
-
1378
- /* From here you can do whatever you want with the data from the $result link. */
1379
-
1380
- $ac_cutoff_time = get_option( 'ac_lite_cart_abandoned_time' );
1381
-
1382
- ?>
1383
- <table class='wp-list-table widefat fixed posts' cellspacing='0' id='cart_data'>
1384
- <tr>
1385
- <th> <?php _e( 'Customer', 'woocommerce-ac' ); ?> </th>
1386
- <th> <?php _e( 'Order Total', 'woocommerce-ac' ); ?> </th>
1387
- <th scope="col" id="date_ac" class="manage-column column-date_ac sorted <?php echo $order;?>" style="">
1388
- <a href="admin.php?page=woocommerce_ac_page&action=listcart&orderby=abandoned_cart_time&order=<?php echo $order_next;?>">
1389
- <span> <?php _e( 'Date', 'woocommerce-ac' ); ?> </span>
1390
- <span class="sorting-indicator"></span>
1391
- </a>
1392
- </th>
1393
- <th scope="col" id="status_ac" class="manage-column column-status_ac sorted <?php echo $order;?>" style="">
1394
- <a href="admin.php?page=woocommerce_ac_page&action=listcart&orderby=cart_ignored&order=<?php echo $order_next;?>">
1395
- <span> <?php _e( 'Status', 'woocommerce-ac' ); ?> </span>
1396
- <span class="sorting-indicator"></span>
1397
- </a>
1398
- </th>
1399
- <th> <?php _e( 'Actions', 'woocommerce-ac' ); ?> </th>
1400
- </tr>
1401
-
1402
- <?php
1403
- $results_guest = '';
1404
-
1405
- foreach ( $results as $key => $value ) {
1406
-
1407
- if ( $value->user_type == "GUEST" ) {
1408
- $query_guest = "SELECT * from `". $wpdb->prefix."ac_guest_abandoned_cart_history_lite` WHERE id = %d ORDER BY `id` DESC LIMIT 1";
1409
- $results_guest = $wpdb->get_results( $wpdb->prepare( $query_guest, $value->user_id ) );
1410
-
1411
- }
1412
- $abandoned_order_id = $value->id;
1413
- $user_id = $value->user_id;
1414
- $user_login = $value->user_login;
1415
-
1416
- if ( $value->user_type == "GUEST" ) {
1417
-
1418
- if ( isset( $results_guest[0]->email_id ) ) $user_email = $results_guest[0]->email_id;
1419
-
1420
- if ( isset( $results_guest[0]->billing_first_name ) ) $user_first_name = $results_guest[0]->billing_first_name;
1421
- else $user_first_name = "";
1422
-
1423
- if ( isset( $results_guest[0]->billing_last_name ) ) $user_last_name = $results_guest[0]->billing_last_name;
1424
- else $user_last_name = "";
1425
- } else {
1426
- $user_id = $value->user_id;
1427
- $key = 'billing_email';
1428
- $single = true;
1429
- $user_billing_email = get_user_meta( $user_id, $key, $single );
1430
- $user_email = '';
1431
- if( isset($user_billing_email) && $user_billing_email !=''){
1432
- $user_email = $user_billing_email;
1433
- }else{
1434
- $user_email = $value->user_email;
1435
- }
1436
- $user_first_name_temp = get_user_meta($value->user_id, 'first_name');
1437
- if ( isset( $user_first_name_temp[0] )) $user_first_name = $user_first_name_temp[0];
1438
- else $user_first_name = "";
1439
-
1440
- $user_last_name_temp = get_user_meta($value->user_id, 'last_name');
1441
- if ( isset( $user_last_name_temp[0] )) $user_last_name = $user_last_name_temp[0];
1442
- else $user_last_name = "";
1443
- }
1444
-
1445
- $cart_info = json_decode( $value->abandoned_cart_info );
1446
-
1447
- $order_date = "";
1448
- $cart_update_time = $value->abandoned_cart_time;
1449
- if ( $cart_update_time != "" && $cart_update_time != 0 ) {
1450
- $order_date = date( 'd M, Y h:i A', $cart_update_time );
1451
- }
1452
-
1453
- $ac_cutoff_time = get_option( 'ac_lite_cart_abandoned_time' );
1454
- if ( isset( $ac_cutoff_time ) ) {
1455
- $cut_off_time = $ac_cutoff_time * 60;
1456
- } else {
1457
- $cut_off_time = 60 * 60;
1458
- }
1459
- $cart_details = array();
1460
- $current_time = current_time( 'timestamp' );
1461
- $compare_time = $current_time - $cart_update_time;
1462
- $cart_details = (array) $cart_info->cart;
1463
-
1464
- $line_total = 0;
1465
- if ( is_array ( $cart_details ) && count($cart_details) > 0 ) {
1466
- foreach ( $cart_details as $k => $v )
1467
- {
1468
- $line_total = $line_total + $v->line_total;
1469
- }
1470
- }
1471
- if( $value->cart_ignored == 0 && $value->recovered_cart == 0 ) {
1472
- $ac_status = "Abandoned";
1473
- }
1474
- elseif( $value->cart_ignored == 1 && $value->recovered_cart == 0 ) {
1475
- $ac_status = "Abandoned but new </br>cart created after this";
1476
- } else {
1477
- $ac_status = "";
1478
- }
1479
-
1480
- ?>
1481
-
1482
- <?php
1483
- if ( $compare_time > $cut_off_time && $ac_status != "" )
1484
- {
1485
- ?>
1486
- <tr id="row_<?php echo $abandoned_order_id; ?>">
1487
- <td><strong> <a href="admin.php?page=woocommerce_ac_page&action=orderdetails&id=<?php echo $value->id;?>"><?php echo "Abandoned Order #".$abandoned_order_id;?></a></strong><?php if( isset( $user_first_name[0] ) && isset( $user_last_name[0] ) ) { $user_name = $user_first_name." ".$user_last_name; } echo "</br>Name: ".$user_name." <br><a href='mailto:$user_email'>".$user_email."</a>"; ?></td>
1488
- <td><?php echo get_woocommerce_currency_symbol()." ".$line_total; ?></td>
1489
- <td><?php echo $order_date; ?></td>
1490
- <td><?php echo $ac_status; ?>
1491
- <td id="<?php echo $abandoned_order_id; ?>">
1492
- <?php echo "<a href='#' id='$abandoned_order_id-$user_id' class='remove_cart'> <img src='".plugins_url()."/woocommerce-abandoned-cart/images/delete.png' alt='Remove Cart Data' title='Remove Cart Data'></a>"; ?>
1493
- &nbsp;
1494
-
1495
- </tr>
1496
-
1497
- <?php
1498
- }
1499
- }
1500
- echo "</table>";
1501
  } elseif ( $action == 'emailtemplates' && ( $mode != 'edittemplate' && $mode != 'addnewtemplate' ) ) {
1502
  ?>
1503
  <p> <?php _e( 'Add email templates at different intervals to maximize the possibility of recovering your abandoned carts.', 'woocommerce-ac' );?> </p>
@@ -1509,7 +1417,7 @@ function woocommerce_ac_delete(){
1509
 
1510
 
1511
  $active_post = ( empty( $_POST['is_active'] ) ) ? '0' : '1';
1512
- $is_wc_template = ( empty( $_POST['is_wc_template'] ) ) ? '0' : '1'; //It is fix
1513
 
1514
  if ( $active_post == 1 ) {
1515
 
@@ -1534,10 +1442,12 @@ function woocommerce_ac_delete(){
1534
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1535
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1536
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
 
 
1537
 
1538
  $query = "INSERT INTO `".$wpdb->prefix."ac_email_templates_lite`
1539
- (subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template )
1540
- VALUES ( %s, %s, %s, %d, %s, %s, %s, %s, %d )"; //It is fix
1541
 
1542
  $insert_template_successfuly = $wpdb->query( $wpdb->prepare( $query,
1543
  $woocommerce_ac_email_subject,
@@ -1548,8 +1458,10 @@ function woocommerce_ac_delete(){
1548
  $woocommerce_ac_template_name,
1549
  $woocommerce_ac_from_name,
1550
  $is_wc_template,
1551
- $default_value ) //It is fix
1552
- );
 
 
1553
 
1554
  }
1555
  else {
@@ -1567,10 +1479,12 @@ function woocommerce_ac_delete(){
1567
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1568
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1569
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
 
 
1570
 
1571
  $query_insert_new = "INSERT INTO `".$wpdb->prefix."ac_email_templates_lite`
1572
- (subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template)
1573
- VALUES ( %s, %s, %s, %d, %s, %s, %s, %s, %d )";
1574
 
1575
  $insert_template_successfuly = $wpdb->query( $wpdb->prepare( $query_insert_new,
1576
  $woocommerce_ac_email_subject,
@@ -1581,8 +1495,9 @@ function woocommerce_ac_delete(){
1581
  $woocommerce_ac_template_name,
1582
  $woocommerce_ac_from_name,
1583
  $is_wc_template,
1584
- $default_value )
1585
- );
 
1586
  }
1587
  }else{
1588
 
@@ -1590,7 +1505,10 @@ function woocommerce_ac_delete(){
1590
  $woocommerce_ac_email_subject = trim( $_POST[ 'woocommerce_ac_email_subject' ] );
1591
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1592
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1593
- $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
 
 
 
1594
  $active_post = ( empty( $_POST['is_active'] ) ) ? '0' : '1';
1595
  $email_frequency = trim( $_POST[ 'email_frequency' ] );
1596
  $day_or_hour = trim( $_POST[ 'day_or_hour' ] );
@@ -1599,20 +1517,22 @@ function woocommerce_ac_delete(){
1599
 
1600
 
1601
  $query = "INSERT INTO `".$wpdb->prefix."ac_email_templates_lite`
1602
- (subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template )
1603
- VALUES ( %s, %s, %s, %d, %s, %s, %s, %s, %d )";
1604
 
1605
  $insert_template_successfuly = $wpdb->query( $wpdb->prepare( $query,
1606
- $woocommerce_ac_email_subject,
1607
- $woocommerce_ac_email_body,
1608
- $active_post,
1609
- $email_frequency,
1610
- $day_or_hour,
1611
- $woocommerce_ac_template_name,
1612
- $woocommerce_ac_from_name,
1613
- $is_wc_template,
1614
- $default_value ) //It is fix
1615
- );
 
 
1616
 
1617
  }
1618
  }
@@ -1646,6 +1566,8 @@ function woocommerce_ac_delete(){
1646
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1647
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1648
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
 
 
1649
  $id = trim( $_POST[ 'id' ] );
1650
 
1651
  $query_update = "UPDATE `".$wpdb->prefix."ac_email_templates_lite`
@@ -1658,7 +1580,9 @@ function woocommerce_ac_delete(){
1658
  template_name = %s,
1659
  from_name = %s,
1660
  is_wc_template = %s,
1661
- default_template = %d
 
 
1662
  WHERE id = %d ";
1663
  $update_template_successfuly = $wpdb->query($wpdb->prepare( $query_update,
1664
  $woocommerce_ac_email_subject,
@@ -1670,6 +1594,8 @@ function woocommerce_ac_delete(){
1670
  $woocommerce_ac_from_name,
1671
  $is_wc_template,
1672
  $default_value,
 
 
1673
  $id )
1674
 
1675
  );
@@ -1690,6 +1616,8 @@ function woocommerce_ac_delete(){
1690
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1691
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1692
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
 
 
1693
  $id = trim( $_POST[ 'id' ] );
1694
 
1695
  $query_update_latest = "UPDATE `".$wpdb->prefix."ac_email_templates_lite`
@@ -1702,7 +1630,9 @@ function woocommerce_ac_delete(){
1702
  template_name = %s,
1703
  from_name = %s,
1704
  is_wc_template = %s,
1705
- default_template = %d
 
 
1706
  WHERE id = %d ";
1707
  $update_template_successfuly = $wpdb->query($wpdb->prepare( $query_update_latest,
1708
  $woocommerce_ac_email_subject,
@@ -1714,6 +1644,8 @@ function woocommerce_ac_delete(){
1714
  $woocommerce_ac_from_name,
1715
  $is_wc_template,
1716
  $default_value,
 
 
1717
  $id )
1718
 
1719
  );
@@ -1721,21 +1653,26 @@ function woocommerce_ac_delete(){
1721
  }
1722
  }else{
1723
 
 
 
 
 
 
 
1724
  $query_update_new = "UPDATE `".$wpdb->prefix."ac_email_templates_lite`
1725
  SET is_active = %s
1726
  WHERE frequency = %d
1727
  AND day_or_hour = %s ";
1728
- $update_template_successfuly = $wpdb->query( $wpdb->prepare( $query_update_new, $updated_is_active, $email_frequency, $day_or_hour ) );
1729
 
1730
  $woocommerce_ac_email_subject = trim( $_POST[ 'woocommerce_ac_email_subject' ] );
1731
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1732
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1733
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
 
 
1734
  $id = trim( $_POST[ 'id' ] );
1735
- $active = ( empty( $_POST['is_active'] ) ) ? '0' : '1';
1736
- $email_frequency = trim( $_POST[ 'email_frequency' ] );
1737
- $day_or_hour = trim( $_POST[ 'day_or_hour' ] );
1738
- $is_wc_template = ( empty( $_POST['is_wc_template'] ) ) ? '0' : '1';
1739
 
1740
  $check_query = "SELECT * FROM `".$wpdb->prefix."ac_email_templates_lite`
1741
  WHERE is_active= %s
@@ -1759,20 +1696,25 @@ function woocommerce_ac_delete(){
1759
  template_name = %s,
1760
  from_name = %s,
1761
  is_wc_template = %s,
1762
- default_template = %d
 
 
1763
  WHERE id = %d ";
 
1764
  $update_template_successfuly = $wpdb->query($wpdb->prepare( $query_update_latest,
1765
  $woocommerce_ac_email_subject,
1766
  $woocommerce_ac_email_body,
1767
- $active,
1768
  $email_frequency,
1769
  $day_or_hour,
1770
  $woocommerce_ac_template_name,
1771
  $woocommerce_ac_from_name,
1772
  $is_wc_template,
1773
  $default_value,
 
 
1774
  $id )
1775
-
1776
  );
1777
 
1778
  }
@@ -1785,6 +1727,23 @@ function woocommerce_ac_delete(){
1785
  $wpdb->query( $wpdb->prepare( $query_remove, $id_remove ) );
1786
  }
1787
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1788
 
1789
  if ( isset( $_POST[ 'ac_settings_frm' ] ) && $_POST[ 'ac_settings_frm' ] == 'save' && (isset($insert_template_successfuly) && $insert_template_successfuly != '')) { ?>
1790
  <div id="message" class="updated fade"><p><strong><?php _e( 'The Email Template has been successfully added.', 'woocommerce-ac' ); ?></strong></p></div>
@@ -1795,9 +1754,9 @@ function woocommerce_ac_delete(){
1795
  }
1796
 
1797
 
1798
- if ( isset( $_POST[ 'ac_settings_frm' ] ) && $_POST[ 'ac_settings_frm' ] == 'update' && isset($update_template_successfuly) && $update_template_successfuly != '' ) { ?>
1799
  <div id="message" class="updated fade"><p><strong><?php _e( 'The Email Template has been successfully updated.', 'woocommerce-ac' ); ?></strong></p></div>
1800
- <?php } else if ( isset( $_POST[ 'ac_settings_frm' ] ) && $_POST[ 'ac_settings_frm' ] == 'update' && isset($update_template_successfuly) && $update_template_successfuly == '' ){
1801
  ?>
1802
  <div id="message" class="error fade"><p><strong><?php _e( ' There was a problem updating the email template. Please contact the plugin author via <a href= "https://wordpress.org/support/plugin/woocommerce-abandoned-cart">support forum</a>.', 'woocommerce-ac' ); ?></strong></p></div>
1803
  <?php
@@ -1805,143 +1764,23 @@ function woocommerce_ac_delete(){
1805
  ?>
1806
  <div class="tablenav">
1807
  <p style="float:left;">
1808
- <input type="button" value="+ Add New Template" id="add_new_template" onclick="location.href='admin.php?page=woocommerce_ac_page&action=emailtemplates&mode=addnewtemplate';" style="font-weight: bold; color: green; font-size: 18px; cursor: pointer;">
1809
  </p>
1810
 
1811
  <?php
1812
- include_once( "pagination.class.php" );
1813
-
1814
- /* Find the number of rows returned from a query; Note: Do NOT use a LIMIT clause in this query */
1815
- $wpdb->get_results( "SELECT wpet . *
1816
- FROM `".$wpdb->prefix."ac_email_templates_lite` AS wpet
1817
- ");
1818
-
1819
- $count = $wpdb->num_rows;
1820
-
1821
- if( $count > 0 ) {
1822
- $p = new pagination;
1823
- $p->items( $count );
1824
- $p->limit( 10 ); // Limit entries per page
1825
- $p->target( "admin.php?page=woocommerce_ac_page&action=emailtemplates" );
1826
- if ( isset( $p->paging ) ) {
1827
- if ( isset( $_GET[ $p->paging ] ) ){
1828
- $p->currentPage( $_GET[ $p->paging ] ); // Gets and validates the current page
1829
- }
1830
- }
1831
- $p->calculate(); // Calculates what to show
1832
- $p->parameterName( 'paging' );
1833
- $p->adjacents( 1 ); //No. of page away from the current page
1834
- $p->showCounter( true );
1835
-
1836
- if( !isset( $_GET[ 'paging' ] ) ) {
1837
- $p->page = 1;
1838
- } else {
1839
- $p->page = $_GET[ 'paging' ];
1840
- }
1841
-
1842
- //Query for limit paging
1843
- $limit = "LIMIT " . ( $p->page - 1 ) * $p->limit . ", " . $p->limit;
1844
-
1845
- }
1846
- else $limit = "";
1847
-
1848
- ?>
1849
-
1850
- <div class='tablenav-pages'>
1851
- <?php if ( $count>0 ) echo $p->show(); // Echo out the list of paging. ?>
1852
- </div>
1853
- </div>
1854
-
1855
- <?php
1856
-
1857
- $order = "";
1858
- if ( isset( $_GET[ 'order' ] ) ) {
1859
- $order = $_GET[ 'order' ];
1860
- }
1861
- if ( $order == "" ) {
1862
- $order = "asc";
1863
- $order_next = "desc";
1864
- } elseif ( $order == "asc" ) {
1865
- $order_next = "desc";
1866
- } elseif ( $order == "desc" ) {
1867
- $order_next = "asc";
1868
- }
1869
-
1870
- $order_by = "";
1871
- if ( isset($_GET[ 'orderby' ] ) ) {
1872
- $order_by = $_GET[ 'orderby' ];
1873
- }
1874
- if ( $order_by == "" ) {
1875
- $order_by = "frequency";
1876
- }
1877
-
1878
- $query = "SELECT wpet . *
1879
- FROM `".$wpdb->prefix."ac_email_templates_lite` AS wpet
1880
- ORDER BY %s %s
1881
- $limit";
1882
- $results = $wpdb->get_results($wpdb->prepare( $query, $order_by, $order ) );
1883
- /* From here you can do whatever you want with the data from the $result link. */
1884
- ?>
1885
-
1886
- <table class='wp-list-table widefat fixed posts' cellspacing='0' id='email_templates'>
1887
- <tr>
1888
- <th> <?php _e( 'Sr', 'woocommerce-ac' ); ?> </th>
1889
- <th scope="col" id="temp_name" class="manage-column column-temp_name sorted <?php echo $order;?>" style="">
1890
- <a href="admin.php?page=woocommerce_ac_page&action=emailtemplates&orderby=template_name&order=<?php echo $order_next;?>">
1891
- <span> <?php _e( 'Template Name', 'woocommerce-ac' ); ?> </span>
1892
- <span class="sorting-indicator"></span>
1893
- </a>
1894
- </th>
1895
- <th scope="col" id="sent" class="manage-column column-sent sorted <?php echo $order;?>" style="">
1896
- <a href="admin.php?page=woocommerce_ac_page&action=emailtemplates&orderby=frequency&order=<?php echo $order_next;?>">
1897
- <span> <?php _e( 'Sent', 'woocommerce-ac' ); ?> </span>
1898
- <span class="sorting-indicator"></span>
1899
- </a>
1900
- </th>
1901
- <th> <?php _e( 'Active ?', 'woocommerce-ac' ); ?> </th>
1902
- <th> <?php _e( 'Actions', 'woocommerce-ac' ); ?> </th>
1903
- </tr>
1904
-
1905
- <?php
1906
- if ( isset( $_GET[ 'pageno' ] ) ){
1907
- $add_var = ($_GET['pageno'] - 1) * $limit;
1908
- } else {
1909
- $add_var = "";
1910
- }
1911
- $i = 1 + $add_var;
1912
- foreach ( $results as $key => $value )
1913
- {
1914
- $id = $value->id;
1915
-
1916
- $is_active = $value->is_active;
1917
- if ( $is_active == '1' )
1918
- {
1919
- $active = "Yes";
1920
- }
1921
- else
1922
- {
1923
- $active = "No";
1924
- }
1925
- $frequency = $value->frequency;
1926
- $day_or_hour = $value->day_or_hour;
1927
- ?>
1928
-
1929
- <tr id="row_<?php echo $id; ?>">
1930
- <td><?php echo $i; ?></td>
1931
- <td><?php echo $value->template_name; ?></td>
1932
- <td><?php echo $frequency." ".$day_or_hour." After Abandonment";?></td>
1933
- <td><?php echo $active; ?></td>
1934
- <td>
1935
- <a href="admin.php?page=woocommerce_ac_page&action=emailtemplates&mode=edittemplate&id=<?php echo $id; ?>"> <img src="<?php echo plugins_url(); ?>/woocommerce-abandoned-cart/images/edit.png" alt="Edit" title="Edit" width="20" height="20"> </a>&nbsp;
1936
- <a href="#" onclick="delete_email_template( <?php echo $id; ?> )" > <img src="<?php echo plugins_url(); ?>/woocommerce-abandoned-cart/images/delete.png" alt="Delete" title="Delete" width="20" height="20"> </a>&nbsp;
1937
- </td>
1938
- </tr>
1939
-
1940
- <?php
1941
- $i++;
1942
- }
1943
- echo "</table>";
1944
-
1945
  }
1946
  elseif ($action == 'stats' || $action == '')
1947
  {
@@ -2055,215 +1894,75 @@ function woocommerce_ac_delete(){
2055
  });
2056
  </script>
2057
 
2058
- <?php
2059
-
2060
- if ( isset( $_POST[ 'start_date' ] ) ){
2061
- $start_date_range = $_POST[ 'start_date' ];
2062
- } else {
2063
- $start_date_range = "";
2064
- }
2065
- if ( $start_date_range == "" ){
2066
- $start_date_range = $date_sett[ 'start_date' ];
2067
- }
2068
- if ( isset( $_POST[ 'end_date' ] ) ){
2069
- $end_date_range = $_POST[ 'end_date' ];
2070
- } else {
2071
- $end_date_range = "";
2072
- }
2073
- if ( $end_date_range == "" ){
2074
- $end_date_range = $date_sett[ 'end_date' ];
2075
- }
2076
 
2077
- ?>
2078
-
2079
- <label class="start_label" for="start_day"> <?php _e( 'Start Date:', 'woocommerce-ac' ); ?> </label>
2080
- <input type="text" id="start_date" name="start_date" readonly="readonly" value="<?php echo $start_date_range; ?>"/>
2081
-
2082
- <label class="end_label" for="end_day"> <?php _e( 'End Date:', 'woocommerce-ac' ); ?> </label>
2083
- <input type="text" id="end_date" name="end_date" readonly="readonly" value="<?php echo $end_date_range; ?>"/>
2084
-
2085
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Go', 'woocommerce-ac' ); ?>" />
2086
- </form>
2087
- </div>
2088
- </div>
2089
  <?php
2090
 
2091
- global $wpdb;
2092
- $start_date = strtotime( $start_date_range." 00:01:01" );
2093
- $end_date = strtotime( $end_date_range." 23:59:59" );
2094
-
2095
- include_once( "pagination.class.php" );
2096
-
2097
- /* Find the number of rows returned from a query; Note: Do NOT use a LIMIT clause in this query */
2098
- $recoverd_cart = 0;
2099
- $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "ac_abandoned_cart_history_lite
2100
- WHERE abandoned_cart_time >= %d
2101
- AND abandoned_cart_time <= %d
2102
- AND recovered_cart > %d
2103
- ",$start_date,$end_date,$recoverd_cart ) );
2104
- $count = $wpdb->num_rows;
2105
-
2106
- if ( $count > 0 ) {
2107
- $p = new pagination;
2108
- $p->items( $count );
2109
- $p->limit( 10 ); // Limit entries per page
2110
- $p->target( "admin.php?page=woocommerce_ac_page&action=stats&duration_select=$duration_range" );
2111
-
2112
- if ( isset( $p->paging ) ) {
2113
- if ( isset( $_GET[ $p->paging ] ) ) $p->currentPage( $_GET[$p->paging ] ); // Gets and validates the current page
2114
- }
2115
- $p->calculate(); // Calculates what to show
2116
- $p->parameterName( 'paging' );
2117
- $p->adjacents( 1 ); //No. of page away from the current page
2118
- $p->showCounter( true );
2119
-
2120
- if ( !isset( $_GET[ 'paging' ] ) ) {
2121
- $p->page = 1;
2122
- } else {
2123
- $p->page = $_GET[ 'paging' ];
2124
- }
2125
- //Query for limit paging
2126
- $limit_one = ($p->page - 1) * $p->limit ;
2127
- $limit_two = $p->limit ;
2128
- }
2129
- else
2130
- $limit_two = $limit_one = "";
2131
- ?>
2132
-
2133
- <div class="tablenav">
2134
- <div class='tablenav-pages'>
2135
- <?php if ( $count>0 ) echo $p->show(); // Echo out the list of paging. ?>
2136
- </div>
2137
- </div>
2138
-
2139
- <?php
2140
-
2141
- $order = "";
2142
- if ( isset( $_GET[ 'order' ] ) ){
2143
- $order = $_GET[ 'order' ];
2144
- }
2145
- if ( $order == "" ){
2146
- $order = "desc";
2147
- $order_next = "asc";
2148
- } elseif ( $order == "asc" ){
2149
- $order_next = "desc";
2150
- } elseif ( $order == "desc" )
2151
- {
2152
- $order_next = "asc";
2153
- }
2154
-
2155
- $order_by = "";
2156
- if ( isset( $_GET[ 'orderby' ] ) ){
2157
- $order_by = $_GET[ 'orderby' ];
2158
- }
2159
- if ( $order_by == "" ){
2160
- $order_by = "recovered_cart";
2161
- }
2162
-
2163
- $recoverd_cart = 0;
2164
- $query_ac = "SELECT * FROM " . $wpdb->prefix . "ac_abandoned_cart_history_lite
2165
- WHERE abandoned_cart_time >= %d
2166
- AND abandoned_cart_time <= %d
2167
- AND recovered_cart > %d
2168
- ORDER BY $order_by $order LIMIT %d, %d";
2169
- $ac_results = $wpdb->get_results( $wpdb->prepare( $query_ac, $start_date, $end_date, $recoverd_cart, $limit_one, $limit_two ) );
2170
-
2171
- $query_ac_carts = "SELECT * FROM " . $wpdb->prefix . "ac_abandoned_cart_history_lite
2172
- WHERE abandoned_cart_time >= %d
2173
- AND abandoned_cart_time <= %d ";
2174
- $ac_carts_results = $wpdb->get_results($wpdb->prepare($query_ac_carts, $start_date, $end_date) );
2175
-
2176
- $recovered_item = $recovered_total = $count_carts = $total_value = $order_total = 0;
2177
- foreach ( $ac_carts_results as $key => $value )
2178
- {
2179
-
2180
- {
2181
- $product_details = array();
2182
- $count_carts += 1;
2183
-
2184
- $cart_detail = json_decode( $value->abandoned_cart_info );
2185
- $product_details = (array) $cart_detail->cart;
2186
-
2187
- $line_total = 0;
2188
- if ( is_array( $product_details ) && count($product_details) > 0 ) {
2189
- foreach ( $product_details as $k => $v )
2190
- {
2191
- $line_total = $line_total + $v->line_total;
2192
- }
2193
- }
2194
- $total_value += $line_total;
2195
- }
2196
- }
2197
- $table_data = "";
2198
- foreach ( $ac_results as $key => $value )
2199
- {
2200
- if( $value->recovered_cart != 0 )
2201
- {
2202
- $recovered_id = $value->recovered_cart;
2203
- $rec_order = get_post_meta( $recovered_id );
2204
- $woo_order = new WC_Order( $recovered_id );
2205
- $recovered_date = strtotime( $woo_order->order_date );
2206
- $recovered_date_new = date( 'd M, Y h:i A', $recovered_date );
2207
- $recovered_item += 1;
2208
- if ( isset( $rec_order[ '_order_total' ][ 0 ] ) ) {
2209
- $recovered_total += $rec_order[ '_order_total' ][ 0 ];
2210
- }
2211
-
2212
- $abandoned_date = date( 'd M, Y h:i A', $value->abandoned_cart_time );
2213
- $abandoned_order_id = $value->id;
2214
- $billing_first_name = $billing_last_name = $billing_email = '';
2215
- $recovered_order_total = 0;
2216
- if ( isset( $rec_order[ '_billing_first_name' ][ 0 ] ) ) {
2217
- $billing_first_name = $rec_order[ '_billing_first_name' ][ 0 ];
2218
- }
2219
- if ( isset( $rec_order[ '_billing_last_name' ][ 0 ] ) ) {
2220
- $billing_last_name = $rec_order[ '_billing_last_name' ][ 0 ];
2221
- }
2222
- if ( isset( $rec_order[ '_billing_email' ][ 0 ] ) ) {
2223
- $billing_email = $rec_order[ '_billing_email' ][ 0 ];
2224
- }
2225
- if ( isset( $rec_order[ '_order_total' ][ 0 ] ) ) {
2226
- $recovered_order_total = $rec_order[ '_order_total' ][ 0 ];
2227
- }
2228
-
2229
- $table_data .="<tr>
2230
- <td>Name: ".$billing_first_name." ".$billing_last_name."</br><a href='mailto:'".$billing_email."'>".$billing_email."</td>
2231
- <td>".$abandoned_date."</td>
2232
- <td>".$recovered_date_new."</td>
2233
- <td>".get_woocommerce_currency_symbol()." ".$recovered_order_total."</td>
2234
- <td> <a href=\"post.php?post=". $recovered_id."&action=edit\">View Details</td>";
2235
- }
2236
- }
2237
-
2238
- ?>
2239
- <div id="recovered_stats" class="postbox" style="display:block">
2240
- <div class="inside" >
2241
- <p style="font-size: 15px"> <?php _e('During the selected range', 'woocommerce-ac');?> <strong> <?php echo $count_carts; ?> </strong> <?php _e('carts totaling', 'woocommerce-ac');?> <strong> <?php echo get_woocommerce_currency_symbol()." ".$total_value; ?> </strong> <?php _e('were abandoned. We were able to recover', 'woocommerce-ac');?> <strong> <?php echo $recovered_item; ?> </strong> <?php _e('of them, which led to an extra', 'woocommerce-ac');?> <strong> <?php echo get_woocommerce_currency_symbol()." ".$recovered_total; ?> </strong> <?php _e('in sales', 'woocommerce-ac');?></p>
2242
- </div>
2243
- </div>
2244
-
2245
- <table class='wp-list-table widefat fixed posts' cellspacing='0' id='cart_data'>
2246
- <tr>
2247
- <th> <?php _e( 'Customer', 'woocommerce-ac' ); ?> </th>
2248
- <th scope="col" id="created_date" class="manage-column column-created_date sorted <?php echo $order;?>" style="">
2249
- <a href="admin.php?page=woocommerce_ac_page&action=stats&orderby=abandoned_cart_time&order=<?php echo $order_next;?>&durationselect=<?php echo $duration_range;?>">
2250
- <span> <?php _e( 'Created On', 'woocommerce-ac' ); ?> </span>
2251
- <span class="sorting-indicator"></span>
2252
- </a>
2253
- </th>
2254
- <th scope="col" id="rec_order" class="manage-column column-rec_order sorted <?php echo $order;?>" style="">
2255
- <a href="admin.php?page=woocommerce_ac_page&action=stats&orderby=recovered_cart&order=<?php echo $order_next;?>&durationselect=<?php echo $duration_range;?>">
2256
- <span> <?php _e( 'Recovered Date', 'woocommerce-ac' ); ?> </span>
2257
- <span class="sorting-indicator"></span>
2258
- </a>
2259
- </th>
2260
- <th> <?php _e( 'Order Total', 'woocommerce-ac' ); ?> </th>
2261
- <th></th>
2262
- </tr>
2263
- <?php
2264
- echo $table_data;
2265
- print ('</table>');
2266
- }elseif ( $action == 'orderdetails' ) {
2267
  $ac_order_id = $_GET['id'];
2268
  ?>
2269
  <p> </p>
@@ -2747,6 +2446,41 @@ function woocommerce_ac_delete(){
2747
  <img class="help_tip" width="16" height="16" data-tip='<?php _e('Enter the name that should appear in the email sent', 'woocommerce-ac') ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /></p>
2748
 
2749
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2750
 
2751
  <tr>
2752
  <th>
@@ -2808,7 +2542,7 @@ function woocommerce_ac_delete(){
2808
  }
2809
  print'<input type="checkbox" name="is_wc_template" id="is_wc_template" ' . $is_wc_template . '> </input>'; ?>
2810
  <img class="help_tip" width="16" height="16" data-tip='<?php _e( 'Use WooCommerce default style template for abandoned cart reminder emails.', 'woocommerce' ) ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /> <a target = '_blank' href= <?php echo wp_nonce_url( admin_url( '?wacp_preview_woocommerce_mail=true' ), 'woocommerce-ac' ) ; ?> >
2811
- Click here to preview </a>how the email template will look with WooCommerce Template Style enabled. Alternatively, if this is unchecked, the template will appear as <a target = '_blank' href=<?php echo wp_nonce_url( admin_url( '?wacp_preview_mail=true' ), 'woocommerce-ac' ) ; ?>>shown here</a>.
2812
  </p>
2813
  </td>
2814
 
@@ -3027,12 +2761,16 @@ function woocommerce_ac_delete(){
3027
  {
3028
 
3029
  var from_name_preview = $( '#woocommerce_ac_from_name' ).val();
 
 
3030
  var subject_email_preview = $( '#woocommerce_ac_email_subject' ).val();
3031
  var body_email_preview = tinyMCE.activeEditor.getContent();
3032
  var send_email_id = $( '#send_test_email' ).val();
3033
  var is_wc_template = document.getElementById("is_wc_template").checked;
3034
  var data = {
3035
  from_name_preview : from_name_preview,
 
 
3036
  subject_email_preview: subject_email_preview,
3037
  body_email_preview : body_email_preview,
3038
  send_email_id : send_email_id,
@@ -3057,9 +2795,16 @@ function woocommerce_ac_delete(){
3057
  function preview_email_sent() {
3058
 
3059
  $from_email_name = $_POST[ 'from_name_preview' ];
 
 
3060
  $subject_email_preview = $_POST[ 'subject_email_preview' ];
3061
  $body_email_preview = $_POST[ 'body_email_preview' ];
3062
  $is_wc_template = $_POST['is_wc_template'];
 
 
 
 
 
3063
  $body_email_preview = str_replace( '{{customer.firstname}}', 'John', $body_email_preview );
3064
  $body_email_preview = str_replace( '{{customer.lastname}}', 'Doe', $body_email_preview );
3065
  $body_email_preview = str_replace( '{{customer.fullname}}', 'John'." ".'Doe', $body_email_preview );
@@ -3106,9 +2851,7 @@ function woocommerce_ac_delete(){
3106
  $to_email_preview = "";
3107
  }
3108
  $user_email_from = get_option( 'admin_email' );
3109
- $headers[] = "From: ".$from_email_name." <".$user_email_from.">"."\r\n";
3110
- $headers[] = "Content-Type: text/html"."\r\n";
3111
-
3112
  $body_email_final_preview = stripslashes( $body_email_preview );
3113
  if ( isset( $is_wc_template ) && "true" == $is_wc_template ){
3114
 
@@ -3142,4 +2885,4 @@ function woocommerce_ac_delete(){
3142
  }
3143
 
3144
  $woocommerce_abandon_cart = new woocommerce_abandon_cart();
3145
- ?>
3
  Plugin Name: WooCommerce Abandon Cart Lite Plugin
4
  Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
5
  Description: This plugin captures abandoned carts by logged-in users & emails them about it. <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the PRO Version.</a></strong>
6
+ Version: 2.5.1
7
  Author: Tyche Softwares
8
  Author URI: http://www.tychesoftwares.com/
9
  */
17
 
18
  include_once( "woocommerce_guest_ac.class.php" );
19
  include_once( "default-settings.php" );
20
+ require_once( "actions.php" );
21
  // Add a new interval of 5 minutes
22
  add_filter( 'cron_schedules', 'woocommerce_ac_add_cron_schedule' );
23
 
38
  // Hook into that action that'll fire every 5 minutes
39
  add_action( 'woocommerce_ac_send_email_action', 'woocommerce_ac_send_email_cron' );
40
  function woocommerce_ac_send_email_cron() {
41
+ //require_once( ABSPATH.'wp-content/plugins/woocommerce-abandoned-cart/cron/send_email.php' );
42
+ $plugin_dir_path = plugin_dir_path( __FILE__ );
43
+ require_once( $plugin_dir_path . 'cron/send_email.php' );
44
  }
45
 
46
  function woocommerce_ac_delete(){
66
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
67
  $wpdb->get_results( $sql_ac_abandoned_cart_history );
68
 
69
+ $sql_table_user_meta_cart = "DELETE FROM `" . $wpdb->prefix . "usermeta` WHERE meta_key = '_woocommerce_persistent_cart'";
70
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
71
+ $wpdb->get_results( $sql_table_user_meta_cart );
72
+
73
+ $sql_table_user_meta_cart_modified = "DELETE FROM `" . $wpdb->prefix . "usermeta` WHERE meta_key = '_woocommerce_ac_modified_cart'";
74
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
75
+ $wpdb->get_results( $sql_table_user_meta_cart_modified );
76
+
77
  $query = "SELECT blog_id FROM `".$wpdb->prefix."blogs`";
78
  $results = $wpdb->get_results( $query );
79
 
80
+
81
+
82
  foreach( $results as $key => $value ) {
83
 
84
  $table_name_ac_abandoned_cart_history = $wpdb->prefix .$value->blog_id."_"."ac_abandoned_cart_history_lite";
100
  $sql_ac_abandoned_cart_history = "DROP TABLE " . $table_name_ac_guest_abandoned_cart_history ;
101
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
102
  $wpdb->get_results( $sql_ac_abandoned_cart_history );
103
+
104
+ $sql_table_user_meta_cart = "DELETE FROM `" . $wpdb->prefix.$value->blog_id."_"."usermeta` WHERE meta_key = '_woocommerce_persistent_cart'";
105
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
106
+ $wpdb->get_results( $sql_table_user_meta_cart );
107
+
108
+ $sql_table_user_meta_cart_modified = "DELETE FROM `" . $wpdb->prefix.$value->blog_id."_"."usermeta` WHERE meta_key = '_woocommerce_ac_modified_cart'";
109
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
110
+ $wpdb->get_results( $sql_table_user_meta_cart_modified );
111
 
112
  }
113
 
224
  add_action('woocommerce_order_status_failed_to_processing_notification', array(&$this, 'ac_email_admin_recovery'));
225
  add_action('woocommerce_order_status_failed_to_completed_notification', array(&$this, 'ac_email_admin_recovery'));
226
  add_action( 'admin_init', array( $this, 'wcap_preview_emails' ) );
227
+ add_action('init', array( $this, 'app_output_buffer') );
228
  }
229
 
230
  /*-----------------------------------------------------------------------------------*/
356
 
357
  $wpdb->get_results( $alter_template_table_query );
358
  }
359
+ $table_name = $wpdb->prefix . "ac_email_templates_lite";
360
+ $check_email_template_table_query = "SHOW COLUMNS FROM $table_name LIKE 'reply_email' ";
361
+ $results_email = $wpdb->get_results( $check_email_template_table_query );
362
+
363
+ if ( count( $results_email ) == 0 ) {
364
+ $alter_email_template_table_query = "ALTER TABLE $table_name
365
+ ADD COLUMN `reply_email` varchar(50) COLLATE utf8_unicode_ci NOT NULL AFTER `default_template`,
366
+ ADD COLUMN `from_email` varchar(50) COLLATE utf8_unicode_ci NOT NULL AFTER `reply_email`";
367
+ $wpdb->get_results( $alter_email_template_table_query );
368
+ }
369
+
370
  $sent_table_name = $wpdb->prefix . "ac_sent_history_lite";
371
 
372
  $sql_query = "CREATE TABLE IF NOT EXISTS $sent_table_name (
578
  if ( count( $results ) == 0 ) {
579
  $alter_template_table_query = "ALTER TABLE $table_name
580
  ADD COLUMN `is_wc_template` enum('0','1') COLLATE utf8_unicode_ci NOT NULL AFTER `from_name`,
581
+ ADD COLUMN `default_template` int(11) NOT NULL AFTER `is_wc_template`";
582
  $wpdb->get_results( $alter_template_table_query );
583
  }
584
+ $table_name = $wpdb->prefix . "ac_email_templates_lite";
585
+ $check_email_template_table_query = "SHOW COLUMNS FROM $table_name LIKE 'reply_email' ";
586
+ $results_email = $wpdb->get_results( $check_email_template_table_query );
587
 
588
+ if ( count( $results_email ) == 0 ) {
589
+ $alter_email_template_table_query = "ALTER TABLE $table_name
590
+ ADD COLUMN `reply_email` varchar(50) COLLATE utf8_unicode_ci NOT NULL AFTER `default_template`,
591
+ ADD COLUMN `from_email` varchar(50) COLLATE utf8_unicode_ci NOT NULL AFTER `reply_email`";
592
+ $wpdb->get_results( $alter_email_template_table_query );
593
+ }
594
  $guest_table = $wpdb->prefix."ac_guest_abandoned_cart_history_lite" ;
595
  $query_guest_table = "SHOW TABLES LIKE '$guest_table' ";
596
  $result_guest_table = $wpdb->get_results( $query_guest_table );
845
  if ( $track_link == 'track_links' ) {
846
  global $wpdb;
847
 
848
+ $validate_server_string = rawurldecode ( $_SERVER["QUERY_STRING"] );
849
+ $validate_server_string = str_replace ( " " , "+", $validate_server_string);
850
+
851
  $validate_server_arr = explode("validate=", $validate_server_string);
852
  $validate_encoded_string = end($validate_server_arr);
853
 
879
  exit;
880
  }
881
  $user = wp_set_current_user( $user_id );
882
+
883
+
884
 
885
  if ( $user_id >= "63000000" ) {
886
  $query_guest = "SELECT * from `". $wpdb->prefix."ac_guest_abandoned_cart_history_lite` WHERE id = %d";
887
  $results_guest = $wpdb->get_results( $wpdb->prepare( $query_guest, $user_id ) );
888
  $query_cart = "SELECT recovered_cart FROM `".$wpdb->prefix."ac_abandoned_cart_history_lite` WHERE user_id = %d";
889
  $results = $wpdb->get_results( $wpdb->prepare( $query_cart, $user_id ) );
890
+
891
  if ( $results_guest && $results[0]->recovered_cart == '0' ) {
892
  $_SESSION[ 'guest_first_name' ] = $results_guest[0]->billing_first_name;
893
  $_SESSION[ 'guest_last_name' ] = $results_guest[0]->billing_last_name;
922
  function woocommerce_load_guest_persistent_cart() {
923
  global $woocommerce;
924
 
925
+
926
+ $saved_cart = json_decode( get_user_meta( $_SESSION['user_id'], '_woocommerce_persistent_cart',true ), true );
927
+
928
  $c = array();
929
  $cart_contents_total = $cart_contents_weight = $cart_contents_count = $cart_contents_tax = $total = $subtotal = $subtotal_ex_tax = $tax_total = 0;
930
 
1207
  location.href='admin.php?page=woocommerce_ac_page&action=emailtemplates&mode=removetemplate&id='+id;
1208
  }
1209
  }
1210
+
1211
+ function activate_email_template( template_id, active_state ) {
1212
+
1213
+ location.href = 'admin.php?page=woocommerce_ac_page&action=emailtemplates&mode=activate_template&id='+template_id+'&active_state='+active_state ;
1214
+ }
1215
  </script>
1216
 
1217
  <?php
1273
  wp_enqueue_style( 'jquery-ui', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" , '', '', false );
1274
  wp_enqueue_style( 'woocommerce_admin_styles', plugins_url() . '/woocommerce/assets/css/admin.css' );
1275
  wp_enqueue_style( 'jquery-ui-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
1276
+ wp_enqueue_style( 'abandoned-orders-list', plugins_url() . '/woocommerce-abandoned-cart/css/view.abadoned.orders.style.css' );
1277
  ?>
1278
 
1279
  <style>
1288
  <?php
1289
  }
1290
  }
1291
+
1292
+ //bulk action
1293
+ // to over come the wp redirect warning while deleting
1294
+ function app_output_buffer() {
1295
+ ob_start();
1296
+ }
1297
 
1298
  /**
1299
  * Abandon Cart Settings Page
1328
  }
1329
 
1330
  $this->display_tabs();
1331
+ /**
1332
+ * When we delete the item from the below drop down it is registred in action 2
1333
+ */
1334
+ if ( isset( $_GET['action2'] ) ) $action_two = $_GET['action2'];
1335
+ else $action_two = "";
1336
+
1337
+ // Detect when a bulk action is being triggered on abadoned orders page.
1338
+ if( 'wcap_delete' === $action || 'wcap_delete' === $action_two ){
1339
+
1340
+ $ids = isset( $_GET['abandoned_order_id'] ) ? $_GET['abandoned_order_id'] : false;
1341
+ if ( ! is_array( $ids ) ){
1342
+ $ids = array( $ids );
1343
+ }
1344
+
1345
+ foreach ( $ids as $id ) {
1346
+ $class = new wcap_delete_bulk_action_handler();
1347
+ $class->wcap_delete_bulk_action_handler_function_lite( $id );
1348
+ }
1349
+ }
1350
+
1351
+ //Detect when a bulk action is being triggered on temnplates page.
1352
+ if( 'wcap_delete_template' === $action || 'wcap_delete_template' === $action_two ){
1353
+
1354
+ $ids = isset( $_GET['template_id'] ) ? $_GET['template_id'] : false;
1355
+
1356
+ if ( ! is_array( $ids ) ){
1357
+ $ids = array( $ids );
1358
+ }
1359
+
1360
+ foreach ( $ids as $id ) {
1361
+ $class = new wcap_delete_bulk_action_handler();
1362
+ $class->wcap_delete_template_bulk_action_handler_function_lite( $id );
1363
+ }
1364
+ }
1365
+
1366
+ if ( isset($_GET ['wcap_deleted']) && 'YES' == $_GET['wcap_deleted'] ) { ?>
1367
+ <div id="message" class="updated fade"><p><strong><?php _e( 'The Abadoned cart has been successfully deleted.', 'woocommerce-ac' ); ?></strong></p></div>
1368
+ <?php }
1369
+
1370
+ if ( isset($_GET ['wcap_template_deleted']) && 'YES' == $_GET['wcap_template_deleted'] ) { ?>
1371
+ <div id="message" class="updated fade"><p><strong><?php _e( 'The Template has been successfully deleted.', 'woocommerce-ac' ); ?></strong></p></div>
1372
+ <?php }
1373
+
1374
  if ( $action == 'emailsettings' ) {
1375
  // Save the field values
1376
  ?>
1377
+ <p><?php _e( 'Change settings for sending email notifications to Customers after X minute.', 'woocommerce-ac' ); ?></p>
1378
  <div id="content">
1379
 
1380
  <form method="post" action="options.php">
1392
  <p> <?php _e( 'The list below shows all Abandoned Carts which have remained in cart for a time higher than the "Cart abandoned cut-off time" setting.', 'woocommerce-ac' );?> </p>
1393
 
1394
  <?php
1395
+ global $wpdb;
1396
+
1397
+ include_once('class-abandoned-orders-table.php');
1398
+ $wcap_abandoned_order_list = new WACP_Abandoned_Orders_Table();
1399
+ $wcap_abandoned_order_list->wcap_abadoned_order_prepare_items();
1400
+ ?>
1401
+ <div class="wrap">
1402
+ <form id="wacp-abandoned-orders" method="get" >
1403
+ <input type="hidden" name="page" value="woocommerce_ac_page" />
1404
+ <?php $wcap_abandoned_order_list->display(); ?>
1405
+ </form>
1406
+ </div>
1407
+
1408
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1409
  } elseif ( $action == 'emailtemplates' && ( $mode != 'edittemplate' && $mode != 'addnewtemplate' ) ) {
1410
  ?>
1411
  <p> <?php _e( 'Add email templates at different intervals to maximize the possibility of recovering your abandoned carts.', 'woocommerce-ac' );?> </p>
1417
 
1418
 
1419
  $active_post = ( empty( $_POST['is_active'] ) ) ? '0' : '1';
1420
+ $is_wc_template = ( empty( $_POST['is_wc_template'] ) ) ? '0' : '1';
1421
 
1422
  if ( $active_post == 1 ) {
1423
 
1442
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1443
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1444
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
1445
+ $woocommerce_ac_email_reply = trim( $_POST['woocommerce_ac_email_reply'] );
1446
+ $woocommerce_ac_email_from = trim( $_POST[ 'woocommerce_ac_email_from' ] );
1447
 
1448
  $query = "INSERT INTO `".$wpdb->prefix."ac_email_templates_lite`
1449
+ (subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template, reply_email, from_email )
1450
+ VALUES ( %s, %s, %s, %d, %s, %s, %s, %s, %d, %s, %s )"; //It is fix
1451
 
1452
  $insert_template_successfuly = $wpdb->query( $wpdb->prepare( $query,
1453
  $woocommerce_ac_email_subject,
1458
  $woocommerce_ac_template_name,
1459
  $woocommerce_ac_from_name,
1460
  $is_wc_template,
1461
+ $default_value,
1462
+ $woocommerce_ac_email_reply,
1463
+ $woocommerce_ac_email_from)
1464
+ );
1465
 
1466
  }
1467
  else {
1479
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1480
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1481
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
1482
+ $woocommerce_ac_email_from = trim( $_POST['woocommerce_ac_email_from'] );
1483
+ $woocommerce_ac_email_reply = trim( $_POST[ 'woocommerce_ac_email_reply' ] );
1484
 
1485
  $query_insert_new = "INSERT INTO `".$wpdb->prefix."ac_email_templates_lite`
1486
+ (subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template, reply_email, from_email )
1487
+ VALUES ( %s, %s, %s, %d, %s, %s, %s, %s, %d, %s, %s )";
1488
 
1489
  $insert_template_successfuly = $wpdb->query( $wpdb->prepare( $query_insert_new,
1490
  $woocommerce_ac_email_subject,
1495
  $woocommerce_ac_template_name,
1496
  $woocommerce_ac_from_name,
1497
  $is_wc_template,
1498
+ $woocommerce_ac_email_reply,
1499
+ $woocommerce_ac_email_from )
1500
+ );
1501
  }
1502
  }else{
1503
 
1505
  $woocommerce_ac_email_subject = trim( $_POST[ 'woocommerce_ac_email_subject' ] );
1506
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1507
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1508
+ $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
1509
+ $woocommerce_ac_email_reply = trim( $_POST[ 'woocommerce_ac_email_reply' ] );
1510
+ $woocommerce_ac_email_from = trim( $_POST['woocommerce_ac_email_from'] );
1511
+
1512
  $active_post = ( empty( $_POST['is_active'] ) ) ? '0' : '1';
1513
  $email_frequency = trim( $_POST[ 'email_frequency' ] );
1514
  $day_or_hour = trim( $_POST[ 'day_or_hour' ] );
1517
 
1518
 
1519
  $query = "INSERT INTO `".$wpdb->prefix."ac_email_templates_lite`
1520
+ (subject, body, is_active, frequency, day_or_hour, template_name, from_name, is_wc_template, default_template, reply_email, from_email )
1521
+ VALUES ( %s, %s, %s, %d, %s, %s, %s, %s, %d, %s, %s )";
1522
 
1523
  $insert_template_successfuly = $wpdb->query( $wpdb->prepare( $query,
1524
+ $woocommerce_ac_email_subject,
1525
+ $woocommerce_ac_email_body,
1526
+ $active_post,
1527
+ $email_frequency,
1528
+ $day_or_hour,
1529
+ $woocommerce_ac_template_name,
1530
+ $woocommerce_ac_from_name,
1531
+ $is_wc_template,
1532
+ $default_value,
1533
+ $woocommerce_ac_email_reply,
1534
+ $woocommerce_ac_email_from )
1535
+ );
1536
 
1537
  }
1538
  }
1566
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1567
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1568
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
1569
+ $woocommerce_ac_email_from = trim( $_POST['woocommerce_ac_email_from'] );
1570
+ $woocommerce_ac_email_reply = trim( $_POST[ 'woocommerce_ac_email_reply' ] );
1571
  $id = trim( $_POST[ 'id' ] );
1572
 
1573
  $query_update = "UPDATE `".$wpdb->prefix."ac_email_templates_lite`
1580
  template_name = %s,
1581
  from_name = %s,
1582
  is_wc_template = %s,
1583
+ default_template = %d,
1584
+ reply_email = %s,
1585
+ from_email = %s
1586
  WHERE id = %d ";
1587
  $update_template_successfuly = $wpdb->query($wpdb->prepare( $query_update,
1588
  $woocommerce_ac_email_subject,
1594
  $woocommerce_ac_from_name,
1595
  $is_wc_template,
1596
  $default_value,
1597
+ $woocommerce_ac_email_from,
1598
+ $woocommerce_ac_email_reply,
1599
  $id )
1600
 
1601
  );
1616
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1617
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1618
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
1619
+ $woocommerce_ac_email_from = trim( $_POST['woocommerce_ac_email_from'] );
1620
+ $woocommerce_ac_email_reply = trim( $_POST[ 'woocommerce_ac_email_reply' ] );
1621
  $id = trim( $_POST[ 'id' ] );
1622
 
1623
  $query_update_latest = "UPDATE `".$wpdb->prefix."ac_email_templates_lite`
1630
  template_name = %s,
1631
  from_name = %s,
1632
  is_wc_template = %s,
1633
+ default_template = %d,
1634
+ reply_email = %s,
1635
+ from_email = %s
1636
  WHERE id = %d ";
1637
  $update_template_successfuly = $wpdb->query($wpdb->prepare( $query_update_latest,
1638
  $woocommerce_ac_email_subject,
1644
  $woocommerce_ac_from_name,
1645
  $is_wc_template,
1646
  $default_value,
1647
+ $woocommerce_ac_email_reply,
1648
+ $woocommerce_ac_email_from,
1649
  $id )
1650
 
1651
  );
1653
  }
1654
  }else{
1655
 
1656
+ $updated_is_active = '0';
1657
+ $is_active = ( empty( $_POST['is_active'] ) ) ? '0' : '1';
1658
+ $email_frequency = trim( $_POST[ 'email_frequency' ] );
1659
+ $day_or_hour = trim( $_POST[ 'day_or_hour' ] );
1660
+ $is_wc_template = ( empty( $_POST['is_wc_template'] ) ) ? '0' : '1';
1661
+
1662
  $query_update_new = "UPDATE `".$wpdb->prefix."ac_email_templates_lite`
1663
  SET is_active = %s
1664
  WHERE frequency = %d
1665
  AND day_or_hour = %s ";
1666
+ $wpdb->query( $wpdb->prepare( $query_update_new, $updated_is_active, $email_frequency, $day_or_hour ) );
1667
 
1668
  $woocommerce_ac_email_subject = trim( $_POST[ 'woocommerce_ac_email_subject' ] );
1669
  $woocommerce_ac_email_body = trim( $_POST[ 'woocommerce_ac_email_body' ] );
1670
  $woocommerce_ac_template_name = trim( $_POST[ 'woocommerce_ac_template_name' ] );
1671
  $woocommerce_ac_from_name = trim( $_POST[ 'woocommerce_ac_from_name' ] );
1672
+ $woocommerce_ac_email_from = trim( $_POST['woocommerce_ac_email_from'] );
1673
+ $woocommerce_ac_email_reply = trim( $_POST[ 'woocommerce_ac_email_reply' ] );
1674
  $id = trim( $_POST[ 'id' ] );
1675
+
 
 
 
1676
 
1677
  $check_query = "SELECT * FROM `".$wpdb->prefix."ac_email_templates_lite`
1678
  WHERE is_active= %s
1696
  template_name = %s,
1697
  from_name = %s,
1698
  is_wc_template = %s,
1699
+ default_template = %d,
1700
+ reply_email = %s,
1701
+ from_email = %s
1702
  WHERE id = %d ";
1703
+
1704
  $update_template_successfuly = $wpdb->query($wpdb->prepare( $query_update_latest,
1705
  $woocommerce_ac_email_subject,
1706
  $woocommerce_ac_email_body,
1707
+ $is_active,
1708
  $email_frequency,
1709
  $day_or_hour,
1710
  $woocommerce_ac_template_name,
1711
  $woocommerce_ac_from_name,
1712
  $is_wc_template,
1713
  $default_value,
1714
+ $woocommerce_ac_email_reply,
1715
+ $woocommerce_ac_email_from,
1716
  $id )
1717
+
1718
  );
1719
 
1720
  }
1727
  $wpdb->query( $wpdb->prepare( $query_remove, $id_remove ) );
1728
  }
1729
 
1730
+ if ( $action == 'emailtemplates' && $mode == 'activate_template' ) {
1731
+ $template_id = $_GET['id'];
1732
+ $current_template_status = $_GET['active_state'];
1733
+
1734
+ if( "1" == $current_template_status ) {
1735
+ $active = "0";
1736
+ } else {
1737
+ $active = "1";
1738
+ }
1739
+ $query_update = "UPDATE `" . $wpdb->prefix . "ac_email_templates_lite`
1740
+ SET
1741
+ is_active = '" . $active . "'
1742
+ WHERE id = '" . $template_id . "' ";
1743
+ $wpdb->query( $query_update );
1744
+
1745
+ wp_safe_redirect( admin_url( '/admin.php?page=woocommerce_ac_page&action=emailtemplates' ) );
1746
+ }
1747
 
1748
  if ( isset( $_POST[ 'ac_settings_frm' ] ) && $_POST[ 'ac_settings_frm' ] == 'save' && (isset($insert_template_successfuly) && $insert_template_successfuly != '')) { ?>
1749
  <div id="message" class="updated fade"><p><strong><?php _e( 'The Email Template has been successfully added.', 'woocommerce-ac' ); ?></strong></p></div>
1754
  }
1755
 
1756
 
1757
+ if ( isset( $_POST[ 'ac_settings_frm' ] ) && $_POST[ 'ac_settings_frm' ] == 'update' && isset($update_template_successfuly) && $update_template_successfuly >= 0 ) { ?>
1758
  <div id="message" class="updated fade"><p><strong><?php _e( 'The Email Template has been successfully updated.', 'woocommerce-ac' ); ?></strong></p></div>
1759
+ <?php } else if ( isset( $_POST[ 'ac_settings_frm' ] ) && $_POST[ 'ac_settings_frm' ] == 'update' && isset($update_template_successfuly) && $update_template_successfuly === false ){
1760
  ?>
1761
  <div id="message" class="error fade"><p><strong><?php _e( ' There was a problem updating the email template. Please contact the plugin author via <a href= "https://wordpress.org/support/plugin/woocommerce-abandoned-cart">support forum</a>.', 'woocommerce-ac' ); ?></strong></p></div>
1762
  <?php
1764
  ?>
1765
  <div class="tablenav">
1766
  <p style="float:left;">
1767
+ <a cursor: pointer; href="<?php echo "admin.php?page=woocommerce_ac_page&action=emailtemplates&mode=addnewtemplate"; ?>" class="button-secondary"><?php _e( 'Add New Template', 'woocommerce-ac' ); ?></a>
1768
  </p>
1769
 
1770
  <?php
1771
+ /* From here you can do whatever you want with the data from the $result link. */
1772
+ include_once('class-templates-table.php');
1773
+ $wcap_template_list = new WACP_Templates_Table();
1774
+ $wcap_template_list->wcap_templates_prepare_items();
1775
+ ?>
1776
+ <div class="wrap">
1777
+ <form id="wacp-abandoned-templates" method="get" >
1778
+ <input type="hidden" name="page" value="woocommerce_ac_page" />
1779
+ <?php $wcap_template_list->display(); ?>
1780
+ </form>
1781
+ </div>
1782
+ <?php
1783
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1784
  }
1785
  elseif ($action == 'stats' || $action == '')
1786
  {
1894
  });
1895
  </script>
1896
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1897
 
 
 
 
 
 
 
 
 
 
 
 
 
1898
  <?php
1899
 
1900
+ include_once('class-recover-orders-table.php');
1901
+
1902
+ $wcap_recover_orders_list = new WACP_Recover_Orders_Table();
1903
+ $wcap_recover_orders_list->wcap_recovered_orders_prepare_items_lite();
1904
+
1905
+ if ( isset( $_POST['start_date'] ) ) $start_date_range = $_POST['start_date'];
1906
+ else $start_date_range = "";
1907
+
1908
+ if ( $start_date_range == "" ) {
1909
+ $start_date_range = $date_sett['start_date'];
1910
+ }
1911
+
1912
+ if ( isset( $_POST['end_date'] ) ) $end_date_range = $_POST['end_date'];
1913
+ else $end_date_range = "";
1914
+
1915
+ if ( $end_date_range == "" ) {
1916
+ $end_date_range = $date_sett['end_date'];
1917
+ }
1918
+ ?>
1919
+ <label class="start_label" for="start_day"> <?php _e( 'Start Date:', 'woocommerce-ac' ); ?> </label>
1920
+ <input type="text" id="start_date" name="start_date" readonly="readonly" value="<?php echo $start_date_range; ?>"/>
1921
+ <label class="end_label" for="end_day"> <?php _e( 'End Date:', 'woocommerce-ac' ); ?> </label>
1922
+ <input type="text" id="end_date" name="end_date" readonly="readonly" value="<?php echo $end_date_range; ?>"/>
1923
+ <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Go', 'woocommerce-ac' ); ?>" />
1924
+ </form>
1925
+ </div>
1926
+ </div>
1927
+ <div id="recovered_stats" class="postbox" style="display:block">
1928
+ <div class="inside" >
1929
+ <p style="font-size: 15px"><?php _e( 'During the selected range ', 'woocommerce-ac' ); ?>
1930
+ <strong>
1931
+ <?php $count = $wcap_recover_orders_list->total_abandoned_cart_count;
1932
+ echo $count; ?>
1933
+ </strong>
1934
+ <?php _e( 'carts totaling', 'woocommerce-ac' ); ?>
1935
+ <strong>
1936
+ <?php $total_of_all_order = $wcap_recover_orders_list->total_order_amount;
1937
+
1938
+ echo get_woocommerce_currency_symbol().$total_of_all_order; ?>
1939
+ </strong>
1940
+ <?php _e( ' were abandoned. We were able to recover', 'woocommerce-ac' ); ?>
1941
+ <strong>
1942
+ <?php
1943
+ $recovered_item = $wcap_recover_orders_list->recovered_item;
1944
+
1945
+ echo $recovered_item; ?>
1946
+ </strong>
1947
+ <?php _e( ' of them, which led to an extra', 'woocommerce-ac' ); ?>
1948
+ <strong>
1949
+ <?php
1950
+ $recovered_total = $wcap_recover_orders_list->total_recover_amount;
1951
+ echo get_woocommerce_currency_symbol().$recovered_total; ?>
1952
+ </strong>
1953
+ <?php //_e( ' in sales', 'woocommerce-ac' ); ?>
1954
+ </p>
1955
+ </div>
1956
+ </div>
1957
+
1958
+ <div class="wrap">
1959
+ <form id="wacp-recover-orders" method="get" >
1960
+ <input type="hidden" name="page" value="woocommerce_ac_page" />
1961
+ <?php $wcap_recover_orders_list->display(); ?>
1962
+ </form>
1963
+ </div>
1964
+ <?php
1965
+ }elseif ( $action == 'orderdetails' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1966
  $ac_order_id = $_GET['id'];
1967
  ?>
1968
  <p> </p>
2446
  <img class="help_tip" width="16" height="16" data-tip='<?php _e('Enter the name that should appear in the email sent', 'woocommerce-ac') ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /></p>
2447
 
2448
  </tr>
2449
+ <tr>
2450
+ <th>
2451
+ <label for="woocommerce_ac_email_from"><b><?php _e( 'Send From This Email Address:', 'woocommerce-ac' ); ?></b></label>
2452
+ </th>
2453
+ <td>
2454
+
2455
+ <?php
2456
+ $from_edit = get_option( 'admin_email' );
2457
+
2458
+ if ( $mode == 'edittemplate' && $results[0]->from_email != '') { // this is the fix
2459
+ $from_edit = $results[0]->from_email;
2460
+ }
2461
+ print'<input type="text" name="woocommerce_ac_email_from" id="woocommerce_ac_email_from" class="regular-text" value="' . $from_edit . '">'; ?>
2462
+ <img class="help_tip" width="16" height="16" data-tip='<?php _e( 'Which email address should be shown in the "From Email" field for this email?', 'woocommerce' ) ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /></p>
2463
+ <?php ?></textarea>
2464
+ </td>
2465
+ </tr>
2466
+ <tr>
2467
+ <th>
2468
+ <label for="woocommerce_ac_email_reply"><b><?php _e( 'Send Reply Emails to:', 'woocommerce-ac' ); ?></b></label>
2469
+ </th>
2470
+ <td>
2471
+
2472
+ <?php
2473
+ $reply_edit = get_option( 'admin_email' );
2474
+
2475
+ if ( $mode == 'edittemplate' && $results[0]->reply_email != '' ) { // this is the fix
2476
+ $reply_edit = $results[0]->reply_email;
2477
+ }
2478
+
2479
+ print'<input type="text" name="woocommerce_ac_email_reply" id="woocommerce_ac_email_reply" class="regular-text" value="' . $reply_edit . '">'; ?>
2480
+ <img class="help_tip" width="16" height="16" data-tip='<?php _e( 'When a contact receives your email and clicks reply, which email address should that reply be sent to?', 'woocommerce' ) ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /></p>
2481
+ <?php ?></textarea>
2482
+ </td>
2483
+ </tr>
2484
 
2485
  <tr>
2486
  <th>
2542
  }
2543
  print'<input type="checkbox" name="is_wc_template" id="is_wc_template" ' . $is_wc_template . '> </input>'; ?>
2544
  <img class="help_tip" width="16" height="16" data-tip='<?php _e( 'Use WooCommerce default style template for abandoned cart reminder emails.', 'woocommerce' ) ?>' src="<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png" /> <a target = '_blank' href= <?php echo wp_nonce_url( admin_url( '?wacp_preview_woocommerce_mail=true' ), 'woocommerce-ac' ) ; ?> >
2545
+ Click here to preview </a>how the email template will look with WooCommerce Template Style enabled. Alternatively, if this is unchecked, the template will appear as <a target = '_blank' href=<?php echo wp_nonce_url( admin_url( '?wacp_preview_mail=true' ), 'woocommerce-ac' ) ; ?>>shown here</a>. <br> <strong>Note: </strong>When this setting is enabled, then "Send From This Name:" & "Send From This Email Address:" will be overwritten with WooCommerce -> Settings -> Email -> Email Sender Options.
2546
  </p>
2547
  </td>
2548
 
2761
  {
2762
 
2763
  var from_name_preview = $( '#woocommerce_ac_from_name' ).val();
2764
+ var reply_name_preview = $( '#woocommerce_ac_email_reply' ).val();
2765
+ var from_email_preview = $( '#woocommerce_ac_email_from' ).val();
2766
  var subject_email_preview = $( '#woocommerce_ac_email_subject' ).val();
2767
  var body_email_preview = tinyMCE.activeEditor.getContent();
2768
  var send_email_id = $( '#send_test_email' ).val();
2769
  var is_wc_template = document.getElementById("is_wc_template").checked;
2770
  var data = {
2771
  from_name_preview : from_name_preview,
2772
+ reply_name_preview : reply_name_preview,
2773
+ from_email_preview : from_email_preview,
2774
  subject_email_preview: subject_email_preview,
2775
  body_email_preview : body_email_preview,
2776
  send_email_id : send_email_id,
2795
  function preview_email_sent() {
2796
 
2797
  $from_email_name = $_POST[ 'from_name_preview' ];
2798
+ $reply_name_preview = $_POST['reply_name_preview'];
2799
+ $from_email_preview = $_POST['from_email_preview'];
2800
  $subject_email_preview = $_POST[ 'subject_email_preview' ];
2801
  $body_email_preview = $_POST[ 'body_email_preview' ];
2802
  $is_wc_template = $_POST['is_wc_template'];
2803
+
2804
+ $headers = "From: " . $from_email_name . " <" . $from_email_preview . ">" . "\r\n";
2805
+ $headers .= "Content-Type: text/html" . "\r\n";
2806
+ $headers .= "Reply-To: " . $reply_name_preview . " " . "\r\n";
2807
+
2808
  $body_email_preview = str_replace( '{{customer.firstname}}', 'John', $body_email_preview );
2809
  $body_email_preview = str_replace( '{{customer.lastname}}', 'Doe', $body_email_preview );
2810
  $body_email_preview = str_replace( '{{customer.fullname}}', 'John'." ".'Doe', $body_email_preview );
2851
  $to_email_preview = "";
2852
  }
2853
  $user_email_from = get_option( 'admin_email' );
2854
+
 
 
2855
  $body_email_final_preview = stripslashes( $body_email_preview );
2856
  if ( isset( $is_wc_template ) && "true" == $is_wc_template ){
2857
 
2885
  }
2886
 
2887
  $woocommerce_abandon_cart = new woocommerce_abandon_cart();
2888
+ ?>