Ditty News Ticker - Version 3.0.18

Version Description

  • Added Title settings for Posts feed lite
  • Added Content settings for Posts feed lite
  • Updated the default post Layout
Download this release

Release Info

Developer metaphorcreations
Plugin Icon 128x128 Ditty News Ticker
Version 3.0.18
Comparing to
See all releases

Code changes from version 3.0.17 to 3.0.18

ditty-news-ticker.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Ditty (formerly Ditty News Ticker)
5
  * Plugin URI: https://www.metaphorcreations.com/ditty
6
  * Description: Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
7
- * Version: 3.0.17
8
  * Author: Metaphor Creations
9
  * Author URI: https://www.metaphorcreations.com
10
  * License: GPL-2.0+
@@ -20,7 +20,7 @@ if ( ! defined( 'WPINC' ) ) {
20
 
21
  // Plugin version.
22
  if ( ! defined( 'DITTY_VERSION' ) ) {
23
- define( 'DITTY_VERSION', '3.0.17' );
24
  }
25
 
26
  // Plugin Folder Path.
4
  * Plugin Name: Ditty (formerly Ditty News Ticker)
5
  * Plugin URI: https://www.metaphorcreations.com/ditty
6
  * Description: Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
7
+ * Version: 3.0.18
8
  * Author: Metaphor Creations
9
  * Author URI: https://www.metaphorcreations.com
10
  * License: GPL-2.0+
20
 
21
  // Plugin version.
22
  if ( ! defined( 'DITTY_VERSION' ) ) {
23
+ define( 'DITTY_VERSION', '3.0.18' );
24
  }
25
 
26
  // Plugin Folder Path.
includes/class-ditty-item-type-posts-lite.php CHANGED
@@ -58,7 +58,7 @@ class Ditty_Item_Type_Posts_Lite extends Ditty_Item_Type {
58
  * Setup the type settings
59
  *
60
  * @access public
61
- * @since 3.0.12
62
  */
63
  public function fields( $values = array() ) {
64
  $fields = array(
@@ -69,99 +69,9 @@ class Ditty_Item_Type_Posts_Lite extends Ditty_Item_Type {
69
  'help' => __( 'Set the number of Posts to display.', 'ditty-news-ticker' ),
70
  'std' => isset( $values['limit'] ) ? $values['limit'] : false,
71
  ),
72
- // 'contentSettings' => array(
73
- // 'type' => 'group',
74
- // 'id' => 'contentSettings',
75
- // 'collapsible' => true,
76
- // 'default_state' => 'expanded',
77
- // 'multiple_fields' => true,
78
- // 'name' => __( 'Content Settings', 'ditty-news-ticker' ),
79
- // 'help' => __( 'Configure the content settings for the feed items.', 'ditty-news-ticker' ),
80
- // 'fields' => array(
81
- // 'content_display' => array(
82
- // 'type' => 'radio',
83
- // 'id' => 'content_display',
84
- // 'name' => __( 'Content Display', 'ditty-news-ticker' ),
85
- // 'help' => __( 'Configure settings for the post content.', 'ditty-news-ticker' ),
86
- // 'options' => array(
87
- // 'full' => __( 'Full Content', 'ditty-news-ticker' ),
88
- // 'excerpt' => __( 'Excerpt', 'ditty-news-ticker' ),
89
- // ),
90
- // 'inline' => true,
91
- // 'std' => isset( $values['content_display'] ) ? $values['content_display'] : false,
92
- // ),
93
- // 'more_link' => array(
94
- // 'type' => 'radio',
95
- // 'id' => 'more_link',
96
- // 'name' => __( 'Read More Link', 'ditty-news-ticker' ),
97
- // 'help' => __( 'Link the read more text to the post.', 'ditty-news-ticker' ),
98
- // 'options' => array(
99
- // 'post' => __( 'Yes', 'ditty-news-ticker' ),
100
- // 'false' => __( 'No', 'ditty-news-ticker' ),
101
- // ),
102
- // 'inline' => true,
103
- // 'std' => isset( $values['more_link'] ) ? $values['more_link'] : false,
104
- // ),
105
- // 'excerpt_length' => array(
106
- // 'type' => 'number',
107
- // 'id' => 'excerpt_length',
108
- // 'name' => __( 'Excerpt Length', 'ditty-news-ticker' ),
109
- // 'help' => __( 'Set the length of the excerpt.', 'ditty-news-ticker' ),
110
- // 'std' => isset( $values['excerpt_length'] ) ? $values['excerpt_length'] : false,
111
- // ),
112
- // 'more' => array(
113
- // 'type' => 'text',
114
- // 'id' => 'more',
115
- // 'name' => __( 'Read More Text', 'ditty-news-ticker' ),
116
- // 'help' => __( 'Add read more text to the excerpt.', 'ditty-news-ticker' ),
117
- // 'std' => isset( $values['more'] ) ? $values['more'] : false,
118
- // ),
119
- // 'more_before' => array(
120
- // 'type' => 'text',
121
- // 'id' => 'more_before',
122
- // 'name' => __( 'Read More Before Text', 'ditty-news-ticker' ),
123
- // 'help' => __( 'Add text before the Read More text.', 'ditty-news-ticker' ),
124
- // 'std' => isset( $values['more_before'] ) ? $values['more_before'] : false,
125
- // ),
126
- // 'more_after' => array(
127
- // 'type' => 'text',
128
- // 'id' => 'more_after',
129
- // 'name' => __( 'Read More After Text', 'ditty-news-ticker' ),
130
- // 'help' => __( 'Add text after the Read More text.', 'ditty-news-ticker' ),
131
- // 'std' => isset( $values['more_after'] ) ? $values['more_after'] : false,
132
- // ),
133
- // ),
134
- // ),
135
- 'linkSettings' => array(
136
- 'type' => 'group',
137
- 'id' => 'linkSettings',
138
- 'collapsible' => true,
139
- 'default_state' => 'expanded',
140
- 'multiple_fields' => true,
141
- 'name' => __( 'Link Settings', 'ditty-news-ticker' ),
142
- 'help' => __( 'Configure the link settings for the feed items.', 'ditty-news-ticker' ),
143
- 'fields' => array(
144
- 'link_target' => array(
145
- 'type' => 'select',
146
- 'id' => 'link_target',
147
- 'name' => __( 'Link Target', 'ditty-news-ticker' ),
148
- 'help' => __( 'Set a target for your links.', 'ditty-news-ticker' ),
149
- 'options' => array(
150
- '_self' => '_self',
151
- '_blank' => '_blank'
152
- ),
153
- 'std' => isset( $values['link_target'] ) ? $values['link_target'] : false,
154
- ),
155
- 'link_nofollow' => array(
156
- 'type' => 'checkbox',
157
- 'id' => 'link_nofollow',
158
- 'name' => __( 'Link No Follow', 'ditty-news-ticker' ),
159
- 'label' => __( 'Add "nofollow" to link', 'ditty-news-ticker' ),
160
- 'help' => __( 'Enabling this setting will add an attribute called \'nofollow\' to your links. This tells search engines to not follow this link.', 'ditty-news-ticker' ),
161
- 'std' => isset( $values['link_nofollow'] ) ? $values['link_nofollow'] : false,
162
- ),
163
- ),
164
- ),
165
  );
166
  return $fields;
167
  }
@@ -170,19 +80,22 @@ class Ditty_Item_Type_Posts_Lite extends Ditty_Item_Type {
170
  * Set the default field values
171
  *
172
  * @access public
173
- * @since 3.0.12
174
  */
175
  public function default_settings() {
176
  $defaults = array(
177
  'limit' => 10,
178
- // 'content_display' => 'excerpt',
179
- // 'excerpt_length' => 200,
180
- // 'more' => __( 'Read More', 'ditty-news-ticker' ),
181
- // 'more_link' => 'post',
182
- // 'more_before' => '... ',
183
- // 'more_after' => '',
184
- 'link_target' => '_self',
185
- 'link_nofollow' => '',
 
 
 
186
  );
187
  return apply_filters( 'ditty_type_default_settings', $defaults, $this->slug );
188
  }
58
  * Setup the type settings
59
  *
60
  * @access public
61
+ * @since 3.0.18
62
  */
63
  public function fields( $values = array() ) {
64
  $fields = array(
69
  'help' => __( 'Set the number of Posts to display.', 'ditty-news-ticker' ),
70
  'std' => isset( $values['limit'] ) ? $values['limit'] : false,
71
  ),
72
+ 'titleSettings' => method_exists( $this, 'title_settings' ) ? $this->title_settings( $values ) : false,
73
+ 'contentSettings' => method_exists( $this, 'content_settings' ) ? $this->content_settings( $values ) : false,
74
+ 'linkSettings' => method_exists( $this, 'link_settings' ) ? $this->link_settings( $values ) : false,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  );
76
  return $fields;
77
  }
80
  * Set the default field values
81
  *
82
  * @access public
83
+ * @since 3.0.18
84
  */
85
  public function default_settings() {
86
  $defaults = array(
87
  'limit' => 10,
88
+ 'content_display' => 'full',
89
+ 'excerpt_length' => 200,
90
+ 'excerpt_element' => 'default',
91
+ 'more' => esc_html__( 'Read More', 'ditty-news-ticker' ),
92
+ 'more_link' => 'post',
93
+ 'more_before' => '... ',
94
+ 'more_after' => '',
95
+ 'title_element' => 'default',
96
+ 'title_link' => 'default',
97
+ 'link_target' => '_self',
98
+ 'link_nofollow' => '',
99
  );
100
  return apply_filters( 'ditty_type_default_settings', $defaults, $this->slug );
101
  }
includes/class-ditty-item-type.php CHANGED
@@ -235,4 +235,191 @@ class Ditty_Item_Type {
235
  public function editor_preview( $value ) {
236
  return '';
237
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
235
  public function editor_preview( $value ) {
236
  return '';
237
  }
238
+
239
+ /**
240
+ * Return the item title settings
241
+ *
242
+ * @since 3.0.18
243
+ * @var multiple $updated_value
244
+ */
245
+ public function title_settings( $values ) {
246
+ $title_settings = array(
247
+ 'type' => 'group',
248
+ 'id' => 'titleSettings',
249
+ 'collapsible' => true,
250
+ 'default_state' => 'expanded',
251
+ 'multiple_fields' => true,
252
+ 'name' => __( 'Title Settings', 'ditty-news-ticker' ),
253
+ 'help' => __( 'Configure settings for the title tag.', 'ditty-news-ticker' ),
254
+ 'fields' => array(
255
+ 'title_element' => array(
256
+ 'type' => 'select',
257
+ 'id' => 'title_element',
258
+ 'name' => esc_html__( 'Title Element', 'ditty-news-ticker' ),
259
+ 'help' => esc_html__( 'Choose the html wrapper element for titles.', 'ditty-news-ticker' ),
260
+ 'std' => isset( $values['title_element'] ) ? $values['title_element'] : false,
261
+ 'options' => array(
262
+ 'default' => esc_html__( 'Use Default', 'ditty-news-ticker' ),
263
+ 'none' => esc_html__( 'None', 'ditty-news-ticker' ),
264
+ 'h1' => 'h1',
265
+ 'h2' => 'h2',
266
+ 'h3' => 'h3',
267
+ 'h4' => 'h4',
268
+ 'h5' => 'h5',
269
+ 'h6' => 'h6',
270
+ 'div' => 'div',
271
+ 'p' => 'p',
272
+ 'span' => 'span',
273
+ ),
274
+ ),
275
+ 'title_link' => array(
276
+ 'type' => 'radio',
277
+ 'id' => 'title_link',
278
+ 'name' => esc_html__( 'Title Link', 'ditty-news-ticker' ),
279
+ 'help' => esc_html__( 'Add a link to the post.', 'ditty-news-ticker' ),
280
+ 'inline' => true,
281
+ 'std' => isset( $values['title_link'] ) ? $values['title_link'] : false,
282
+ 'options' => array(
283
+ 'default' => esc_html__( 'Default', 'ditty-news-ticker' ),
284
+ 'on' => esc_html__( 'On', 'ditty-news-ticker' ),
285
+ 'off' => esc_html__( 'Off', 'ditty-news-ticker' ),
286
+ ),
287
+ ),
288
+ ),
289
+ );
290
+ return $title_settings;
291
+ }
292
+
293
+ /**
294
+ * Return the item content settings
295
+ *
296
+ * @since 3.0.18
297
+ * @var multiple $updated_value
298
+ */
299
+ public function content_settings( $values ) {
300
+ $content_settings = array(
301
+ 'type' => 'group',
302
+ 'id' => 'contentSettings',
303
+ 'collapsible' => true,
304
+ 'default_state' => 'expanded',
305
+ 'multiple_fields' => true,
306
+ 'name' => esc_html__( 'Content Settings', 'ditty-news-ticker' ),
307
+ 'help' => esc_html__( 'Configure the content settings for the feed items.', 'ditty-news-ticker' ),
308
+ 'fields' => array(
309
+ 'content_display' => array(
310
+ 'type' => 'radio',
311
+ 'id' => 'content_display',
312
+ 'name' => esc_html__( 'Content Display', 'ditty-news-ticker' ),
313
+ 'help' => esc_html__( 'Configure settings for the post content.', 'ditty-news-ticker' ),
314
+ 'options' => array(
315
+ 'full' => esc_html__( 'Full Content', 'ditty-news-ticker' ),
316
+ 'excerpt' => esc_html__( 'Excerpt', 'ditty-news-ticker' ),
317
+ ),
318
+ 'inline' => true,
319
+ 'std' => isset( $values['content_display'] ) ? $values['content_display'] : false,
320
+ ),
321
+ 'excerpt_element' => array(
322
+ 'type' => 'select',
323
+ 'id' => 'excerpt_element',
324
+ 'name' => esc_html__( 'Excerpt Element', 'ditty-news-ticker' ),
325
+ 'help' => esc_html__( 'Choose the html wrapper element for excerpts.', 'ditty-news-ticker' ),
326
+ 'std' => isset( $values['excerpt_element'] ) ? $values['excerpt_element'] : false,
327
+ 'options' => array(
328
+ 'default' => esc_html__( 'Use Default', 'ditty-news-ticker' ),
329
+ 'none' => esc_html__( 'None', 'ditty-news-ticker' ),
330
+ 'h1' => 'h1',
331
+ 'h2' => 'h2',
332
+ 'h3' => 'h3',
333
+ 'h4' => 'h4',
334
+ 'h5' => 'h5',
335
+ 'h6' => 'h6',
336
+ 'div' => 'div',
337
+ 'p' => 'p',
338
+ 'span' => 'span',
339
+ ),
340
+ ),
341
+ 'excerpt_length' => array(
342
+ 'type' => 'number',
343
+ 'id' => 'excerpt_length',
344
+ 'name' => esc_html__( 'Excerpt Length', 'ditty-news-ticker' ),
345
+ 'help' => esc_html__( 'Set the length of the excerpt.', 'ditty-news-ticker' ),
346
+ 'std' => isset( $values['excerpt_length'] ) ? $values['excerpt_length'] : false,
347
+ ),
348
+ 'more' => array(
349
+ 'type' => 'text',
350
+ 'id' => 'more',
351
+ 'name' => esc_html__( 'Read More Text', 'ditty-news-ticker' ),
352
+ 'help' => esc_html__( 'Add read more text to the excerpt.', 'ditty-news-ticker' ),
353
+ 'std' => isset( $values['more'] ) ? $values['more'] : false,
354
+ ),
355
+ 'more_before' => array(
356
+ 'type' => 'text',
357
+ 'id' => 'more_before',
358
+ 'name' => esc_html__( 'Read More Before Text', 'ditty-news-ticker' ),
359
+ 'help' => esc_html__( 'Add text before the Read More text.', 'ditty-news-ticker' ),
360
+ 'std' => isset( $values['more_before'] ) ? $values['more_before'] : false,
361
+ ),
362
+ 'more_after' => array(
363
+ 'type' => 'text',
364
+ 'id' => 'more_after',
365
+ 'name' => esc_html__( 'Read More After Text', 'ditty-news-ticker' ),
366
+ 'help' => esc_html__( 'Add text after the Read More text.', 'ditty-news-ticker' ),
367
+ 'std' => isset( $values['more_after'] ) ? $values['more_after'] : false,
368
+ ),
369
+ 'more_link' => array(
370
+ 'type' => 'radio',
371
+ 'id' => 'more_link',
372
+ 'name' => esc_html__( 'Read More Link', 'ditty-news-ticker' ),
373
+ 'help' => esc_html__( 'Link the read more text to the post.', 'ditty-news-ticker' ),
374
+ 'options' => array(
375
+ 'post' => esc_html__( 'Yes', 'ditty-news-ticker' ),
376
+ 'false' => esc_html__( 'No', 'ditty-news-ticker' ),
377
+ ),
378
+ 'inline' => true,
379
+ 'std' => isset( $values['more_link'] ) ? $values['more_link'] : false,
380
+ ),
381
+ ),
382
+ );
383
+ return $content_settings;
384
+ }
385
+
386
+ /**
387
+ * Return the item link settings
388
+ *
389
+ * @since 3.0.18
390
+ * @var multiple $updated_value
391
+ */
392
+ public function link_settings( $values ) {
393
+ $link_settings = array(
394
+ 'type' => 'group',
395
+ 'id' => 'linkSettings',
396
+ 'collapsible' => true,
397
+ 'default_state' => 'expanded',
398
+ 'multiple_fields' => true,
399
+ 'name' => esc_html__( 'Link Settings', 'ditty-news-ticker' ),
400
+ 'help' => esc_html__( 'Configure the link settings for the item elements.', 'ditty-news-ticker' ),
401
+ 'fields' => array(
402
+ 'link_target' => array(
403
+ 'type' => 'select',
404
+ 'id' => 'link_target',
405
+ 'name' => esc_html__( 'Link Target', 'ditty-news-ticker' ),
406
+ 'help' => esc_html__( 'Set a target for your links.', 'ditty-news-ticker' ),
407
+ 'options' => array(
408
+ '_self' => '_self',
409
+ '_blank' => '_blank'
410
+ ),
411
+ 'std' => isset( $values['link_target'] ) ? $values['link_target'] : false,
412
+ ),
413
+ 'link_nofollow' => array(
414
+ 'type' => 'checkbox',
415
+ 'id' => 'link_nofollow',
416
+ 'name' => esc_html__( 'Link No Follow', 'ditty-news-ticker' ),
417
+ 'label' => esc_html__( 'Add "nofollow" to link', 'ditty-news-ticker' ),
418
+ 'help' => esc_html__( 'Enabling this setting will add an attribute called \'nofollow\' to your links. This tells search engines to not follow this link.', 'ditty-news-ticker' ),
419
+ 'std' => isset( $values['link_nofollow'] ) ? $values['link_nofollow'] : false,
420
+ ),
421
+ ),
422
+ );
423
+ return $link_settings;
424
+ }
425
  }
includes/class-ditty-layout.php CHANGED
@@ -420,32 +420,32 @@ class Ditty_Layout {
420
  /**
421
  * Render the layout
422
  * @access public
423
- * @since 3.0.12
424
  * @return html
425
  */
426
  public function render() {
427
  $tags = $this->get_layout_tags();
428
  $html = $this->get_html();
429
- $value = $this->get_item_value();
430
 
431
  // Return an error if there is one
432
- if ( isset( $value['ditty_feed_error'] ) ) {
433
- return $value['ditty_feed_error'];
434
  }
435
 
436
  $handlers = new HandlerContainer();
437
  if ( is_array( $tags ) && count( $tags ) > 0 ) {
438
  foreach ( $tags as $i => $tag ) {
439
- $handlers->add( $tag['tag'], function( ShortcodeInterface $s ) use ( $tag, $value ) {
440
- $value['item_meta'] = $this->get_item_meta();
441
  $defaults = isset( $tag['atts'] ) ? $tag['atts'] : array();
442
  $atts = $this->parse_atts( $defaults, $s );
443
- $atts = apply_filters( 'ditty_layout_tag_atts', $atts, $tag['tag'], $this->get_item_type(), $value );
444
  $content = $s->getContent();
445
  if ( isset( $tag['func'] ) && function_exists( $tag['func'] ) ) {
446
- return call_user_func( $tag['func'], $tag['tag'], $this->get_item_type(), $value, $atts, $content );
447
  } else {
448
- return $this->render_tag( $tag['tag'], $this->get_item_type(), $value, $atts, $content );
449
  }
450
  } );
451
  }
420
  /**
421
  * Render the layout
422
  * @access public
423
+ * @since 3.0.18
424
  * @return html
425
  */
426
  public function render() {
427
  $tags = $this->get_layout_tags();
428
  $html = $this->get_html();
429
+ $data = $this->get_item_value();
430
 
431
  // Return an error if there is one
432
+ if ( isset( $data['ditty_feed_error'] ) ) {
433
+ return $data['ditty_feed_error'];
434
  }
435
 
436
  $handlers = new HandlerContainer();
437
  if ( is_array( $tags ) && count( $tags ) > 0 ) {
438
  foreach ( $tags as $i => $tag ) {
439
+ $handlers->add( $tag['tag'], function( ShortcodeInterface $s ) use ( $tag, $data ) {
440
+ $data['item_meta'] = $this->get_item_meta();
441
  $defaults = isset( $tag['atts'] ) ? $tag['atts'] : array();
442
  $atts = $this->parse_atts( $defaults, $s );
443
+ $atts = apply_filters( 'ditty_layout_tag_atts', $atts, $tag['tag'], $this->get_item_type(), $data );
444
  $content = $s->getContent();
445
  if ( isset( $tag['func'] ) && function_exists( $tag['func'] ) ) {
446
+ return call_user_func( $tag['func'], $tag['tag'], $this->get_item_type(), $data, $atts, $content );
447
  } else {
448
+ return $this->render_tag( $tag['tag'], $this->get_item_type(), $data, $atts, $content );
449
  }
450
  } );
451
  }
includes/css/ditty-admin.css CHANGED
@@ -1,44 +1,51 @@
1
  .wp-admin.post-php.post-type-ditty #poststuff,
2
  .wp-admin.post-new-php.post-type-ditty #poststuff {
3
- min-width: inherit; }
4
-
5
  .wp-admin.post-php.post-type-ditty #post-body-content,
6
  .wp-admin.post-new-php.post-type-ditty #post-body-content {
7
- min-width: inherit; }
8
-
9
  .wp-admin.post-php.post-type-ditty #post-body.columns-2 #postbox-container-1,
10
  .wp-admin.post-new-php.post-type-ditty #post-body.columns-2 #postbox-container-1 {
11
  margin-right: -400px;
12
- width: 380px; }
13
-
14
  .wp-admin.post-php.post-type-ditty #poststuff #post-body.columns-2,
15
  .wp-admin.post-new-php.post-type-ditty #poststuff #post-body.columns-2 {
16
- margin-right: 400px; }
17
- .wp-admin.post-php.post-type-ditty #poststuff #post-body.columns-2 #side-sortables,
18
- .wp-admin.post-new-php.post-type-ditty #poststuff #post-body.columns-2 #side-sortables {
19
- width: 380px; }
20
-
 
21
  .wp-admin.post-php.post-type-ditty #titlediv,
22
  .wp-admin.post-new-php.post-type-ditty #titlediv {
23
- display: none; }
 
24
 
25
  @media only screen and (max-width: 850px) {
26
  .wp-admin.post-type-ditty #poststuff #post-body.columns-2 #side-sortables {
27
- width: auto; } }
28
-
 
29
  #adminmenu .menu-icon-ditty div.wp-menu-image.svg {
30
- background-size: 16px auto; }
 
31
 
32
  table.wp-list-table .type-ditty .row-actions,
33
  table.wp-list-table .type-ditty_layout .row-actions,
34
  table.wp-list-table .type-ditty_display .row-actions {
35
- color: #999; }
 
36
 
37
  .ditty_layout_ui--disabled #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_layout"] {
38
- display: none; }
 
39
 
40
  .ditty_display_ui--disabled #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_display"] {
41
- display: none; }
 
42
 
43
  .ditty-error-notice {
44
  line-height: 1.4em;
@@ -47,88 +54,106 @@ table.wp-list-table .type-ditty_display .row-actions {
47
  background: #fbeaea;
48
  border: 1px solid #E1362E;
49
  border-radius: 3px;
50
- padding: 7px 10px; }
 
51
 
52
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_news_ticker"],
53
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty&page=mtphr_dnt_settings"] {
54
  background-color: rgba(255, 255, 255, 0.1);
55
- box-shadow: -5px 0 0 0 rgba(255, 255, 255, 0.1); }
 
56
 
57
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_news_ticker"] {
58
  padding-top: 8px;
59
- margin-top: 8px; }
 
60
 
61
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty&page=mtphr_dnt_settings"] {
62
  padding-bottom: 8px;
63
- margin-bottom: -8px; }
 
64
 
65
  .ditty-dashboard-notice {
66
- position: relative; }
67
- .ditty-dashboard-notice.notice-info {
68
- border-left-color: #19BF7C; }
69
- .ditty-dashboard-notice__close {
70
- position: absolute;
71
- top: 10px;
72
- right: 10px;
73
- display: block;
74
- text-decoration: none;
75
- color: #3c434a; }
76
- .ditty-dashboard-notice__close i {
77
- font-size: 15px; }
78
- .ditty-dashboard-notice__close i:before {
79
- vertical-align: middle; }
80
- .ditty-dashboard-notice .ditty-features-list {
81
- display: flex;
82
- flex-direction: row;
83
- align-items: center;
84
- justify-content: flex-start;
85
- flex-wrap: wrap; }
86
- .ditty-dashboard-notice .ditty-features-list li {
87
- display: flex;
88
- flex-direction: row;
89
- align-items: center;
90
- justify-content: flex-start;
91
- color: #FFF;
92
- background: #19BF7C;
93
- border-radius: 3px;
94
- padding: 5px 10px;
95
- margin: 0 5px 5px 0; }
96
- .ditty-dashboard-notice .ditty-features-list li i {
97
- margin-right: 5px; }
 
 
 
 
 
 
 
 
98
 
99
  .ditty-upgrade__element {
100
  display: flex;
101
  flex-direction: row;
102
  align-items: stretch;
103
  justify-content: flex-start;
104
- flex-wrap: wrap; }
105
-
106
  .ditty-upgrade__start {
107
  flex: 0 0 auto;
108
  border-top-right-radius: 0 !important;
109
- border-bottom-right-radius: 0 !important; }
110
-
111
  .ditty-upgrade__bar {
112
  flex: 1;
113
  background: #F7F7F7;
114
  border: 1px solid #c3c4c7;
115
  border-top-right-radius: 3px;
116
- border-bottom-right-radius: 3px; }
 
117
 
118
  .fusion-module-icon.ditty {
119
  width: 15px;
120
  height: 15px;
121
- background: url("../img/d.svg"); }
 
122
 
123
  #menu-posts-ditty .wp-submenu {
124
  display: flex;
125
- flex-direction: column; }
126
- #menu-posts-ditty .wp-submenu li {
127
- order: 0; }
128
- #menu-posts-ditty .wp-submenu li.ditty_extensions, #menu-posts-ditty .wp-submenu li.ditty_settings, #menu-posts-ditty .wp-submenu li.ditty_export {
129
- order: 5; }
130
- #menu-posts-ditty .wp-submenu li.ditty_news_ticker, #menu-posts-ditty .wp-submenu li.mtphr_dnt_settings {
131
- order: 10; }
 
 
 
 
132
 
133
  .datepicker-container {
134
  background-color: #fff;
@@ -141,756 +166,880 @@ table.wp-list-table .type-ditty_display .row-actions {
141
  top: 0;
142
  touch-action: none;
143
  -webkit-touch-callout: none;
144
- -webkit-user-select: none;
145
- -moz-user-select: none;
146
- -ms-user-select: none;
147
- user-select: none;
148
  width: 210px;
149
- z-index: -1; }
150
- .datepicker-container::before, .datepicker-container::after {
151
- border: 5px solid transparent;
152
- content: " ";
153
- display: block;
154
- height: 0;
155
- position: absolute;
156
- width: 0; }
157
-
 
158
  .datepicker-dropdown {
159
  border: 1px solid #ccc;
160
  box-shadow: 0 3px 6px #ccc;
161
  box-sizing: content-box;
162
  position: absolute;
163
- z-index: 1; }
164
-
165
  .datepicker-inline {
166
- position: static; }
167
-
168
  .datepicker-top-left, .datepicker-top-right {
169
- border-top-color: #39f; }
170
- .datepicker-top-left::before, .datepicker-top-left::after, .datepicker-top-right::before, .datepicker-top-right::after {
171
- border-top: 0;
172
- left: 10px;
173
- top: -5px; }
174
- .datepicker-top-left::before, .datepicker-top-right::before {
175
- border-bottom-color: #39f; }
176
- .datepicker-top-left::after, .datepicker-top-right::after {
177
- border-bottom-color: #fff;
178
- top: -4px; }
179
-
 
 
 
180
  .datepicker-bottom-left, .datepicker-bottom-right {
181
- border-bottom-color: #39f; }
182
- .datepicker-bottom-left::before, .datepicker-bottom-left::after, .datepicker-bottom-right::before, .datepicker-bottom-right::after {
183
- border-bottom: 0;
184
- bottom: -5px;
185
- left: 10px; }
186
- .datepicker-bottom-left::before, .datepicker-bottom-right::before {
187
- border-top-color: #39f; }
188
- .datepicker-bottom-left::after, .datepicker-bottom-right::after {
189
- border-top-color: #fff;
190
- bottom: -4px; }
191
-
 
 
 
192
  .datepicker-top-right::before, .datepicker-top-right::after, .datepicker-bottom-right::before, .datepicker-bottom-right::after {
193
  left: auto;
194
- right: 10px; }
195
-
196
  .datepicker-panel > ul {
197
  margin: 0;
198
  padding: 0;
199
- width: 102%; }
200
- .datepicker-panel > ul::before, .datepicker-panel > ul::after {
201
- content: " ";
202
- display: table; }
203
- .datepicker-panel > ul::after {
204
- clear: both; }
205
- .datepicker-panel > ul > li {
206
- background-color: #fff;
207
- cursor: pointer;
208
- float: left;
209
- height: 30px;
210
- list-style: none;
211
- margin: 0;
212
- padding: 0;
213
- text-align: center;
214
- width: 30px; }
215
- .datepicker-panel > ul > li:hover {
216
- background-color: #e5f2ff; }
217
- .datepicker-panel > ul > li.muted, .datepicker-panel > ul > li.muted:hover {
218
- color: #999; }
219
- .datepicker-panel > ul > li.highlighted {
220
- background-color: #e5f2ff; }
221
- .datepicker-panel > ul > li.highlighted:hover {
222
- background-color: #cce5ff; }
223
- .datepicker-panel > ul > li.picked, .datepicker-panel > ul > li.picked:hover {
224
- color: #39f; }
225
- .datepicker-panel > ul > li.disabled, .datepicker-panel > ul > li.disabled:hover {
226
- background-color: #fff;
227
- color: #ccc;
228
- cursor: default; }
229
- .datepicker-panel > ul > li.disabled.highlighted, .datepicker-panel > ul > li.disabled:hover.highlighted {
230
- background-color: #e5f2ff; }
231
- .datepicker-panel > ul > li[data-view="years prev"], .datepicker-panel > ul > li[data-view="year prev"], .datepicker-panel > ul > li[data-view="month prev"], .datepicker-panel > ul > li[data-view="years next"], .datepicker-panel > ul > li[data-view="year next"], .datepicker-panel > ul > li[data-view="month next"], .datepicker-panel > ul > li[data-view="next"] {
232
- font-size: 18px; }
233
- .datepicker-panel > ul > li[data-view="years current"], .datepicker-panel > ul > li[data-view="year current"], .datepicker-panel > ul > li[data-view="month current"] {
234
- width: 150px; }
235
- .datepicker-panel > ul[data-view="years"] > li, .datepicker-panel > ul[data-view="months"] > li {
236
- height: 52.5px;
237
- line-height: 52.5px;
238
- width: 52.5px; }
239
- .datepicker-panel > ul[data-view="week"] > li,
240
- .datepicker-panel > ul[data-view="week"] > li:hover {
241
- background-color: #fff;
242
- cursor: default; }
243
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  .datepicker-hide {
245
- display: none; }
 
246
 
247
  #ditty-extensions {
248
- box-sizing: border-box; }
249
- #ditty-extensions * {
250
- box-sizing: border-box; }
251
- #ditty-extensions .ditty-extensions-grid {
252
- display: flex;
253
- flex-direction: row;
254
- align-items: flex-start;
255
- justify-content: flex-start;
256
- flex-wrap: wrap;
257
- margin: -5px; }
258
- #ditty-extensions .ditty-extensions-group {
259
- padding: 20px;
260
- background: #FFF; }
261
- #ditty-extensions .ditty-extensions-group > h3 {
262
- margin-top: 0; }
263
- #ditty-extensions .ditty-extensions-group--other {
264
- padding: 20px;
265
- margin-top: 40px;
266
- background: rgba(255, 255, 255, 0.9);
267
- border-radius: 5px; }
268
- #ditty-extensions .ditty-extension {
269
- width: 100%;
270
- padding: 5px; }
271
- #ditty-extensions .ditty-extension__note {
272
- text-align: left;
273
- padding: 10px;
274
- border: 1px solid;
275
- border-radius: 3px; }
276
- #ditty-extensions .ditty-extension__note--warning {
277
- background: #fff8e5;
278
- border-color: #FEBB00; }
279
- #ditty-extensions .ditty-extension__note--information {
280
- background: #e5f5fa;
281
- border-color: #159FD3; }
282
- #ditty-extensions .ditty-extension__contents {
283
- height: 100%;
284
- background: #f2f2f2;
285
- border-radius: 5px;
286
- overflow: hidden;
287
- box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); }
288
- #ditty-extensions .ditty-extension__header {
289
- position: relative;
290
- display: flex;
291
- flex-direction: row;
292
- align-items: center;
293
- justify-content: flex-start;
294
- background-color: #23282E;
295
- background-size: cover;
296
- background-position: center center;
297
- padding: 20px; }
298
- #ditty-extensions .ditty-extension__header__icon {
299
- position: absolute;
300
- top: 0;
301
- left: 0;
302
- width: 100%;
303
- height: 100%;
304
- display: flex;
305
- flex-direction: row;
306
- align-items: center;
307
- justify-content: flex-end;
308
- padding: 20px;
309
- overflow: hidden; }
310
- #ditty-extensions .ditty-extension__header__icon i {
311
- font-size: 260px;
312
- color: #FFF;
313
- -webkit-transform: scale(0.8) rotate(-25deg);
314
- transform: scale(0.8) rotate(-25deg);
315
- transition: -webkit-transform .5s ease;
316
- transition: transform .5s ease;
317
- transition: transform .5s ease, -webkit-transform .5s ease; }
318
- #ditty-extensions .ditty-extension__header__overlay {
319
- position: absolute;
320
- top: 0;
321
- left: 0;
322
- width: 100%;
323
- height: 100%;
324
- background: #23282e;
325
- -webkit-backdrop-filter: blur(5px);
326
- backdrop-filter: blur(5px);
327
- transition: background-color .5s ease;
328
- border-top-left-radius: 5px;
329
- border-top-right-radius: 5px;
330
- overflow: hidden; }
331
- #ditty-extensions .ditty-extension__icon {
332
- position: relative;
333
- flex: 0 0 auto;
334
- display: flex;
335
- flex-direction: column;
336
- align-items: center;
337
- justify-content: center;
338
- width: 80px;
339
- height: 80px;
340
- font-size: 40px;
341
- line-height: 40px;
342
- color: #FFF;
343
- margin-right: 10px;
344
- background: #23282E;
345
- border-radius: 50%;
346
- border: 4px solid #FFF;
347
- box-sizing: content-box;
348
- opacity: 0;
349
- -webkit-transform: translateX(-50px);
350
- transform: translateX(-50px);
351
- transition: opacity .25s ease, -webkit-transform .5s ease;
352
- transition: transform .5s ease, opacity .25s ease;
353
- transition: transform .5s ease, opacity .25s ease, -webkit-transform .5s ease;
354
- transition-delay: .25s;
355
- transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); }
356
- #ditty-extensions .ditty-extension__icon img {
357
- width: 80px;
358
- height: 80px;
359
- border-radius: 50%;
360
- -o-object-fit: cover;
361
- object-fit: cover; }
362
- #ditty-extensions .ditty-extension__icon__small {
363
- position: absolute;
364
- left: -4px;
365
- top: -4px;
366
- display: flex;
367
- flex-direction: column;
368
- align-items: center;
369
- justify-content: center;
370
- width: 80px;
371
- height: 80px;
372
- font-size: 40px;
373
- line-height: 40px;
374
- color: #FFF;
375
- background: #23282E;
376
- border-radius: 50%;
377
- border: 4px solid #FFF;
378
- box-sizing: content-box;
379
- transition: border-width .75s ease, -webkit-transform .75s ease;
380
- transition: transform .75s ease, border-width .75s ease;
381
- transition: transform .75s ease, border-width .75s ease, -webkit-transform .75s ease;
382
- transition-delay: .75s; }
383
- #ditty-extensions .ditty-extension__title {
384
- position: relative;
385
- color: #FFF;
386
- background: rgba(0, 0, 0, 0.8);
387
- padding: 5px 10px;
388
- border-radius: 5px;
389
- margin: 0;
390
- opacity: 0;
391
- transition: opacity 1s ease;
392
- transition-delay: .5s; }
393
- #ditty-extensions .ditty-extension__preview {
394
- padding: 20px; }
395
- #ditty-extensions .ditty-extension__preview__link {
396
- margin: 0; }
397
- #ditty-extensions .ditty-extension__tabs {
398
- display: flex;
399
- flex-direction: row;
400
- align-items: center;
401
- justify-content: flex-start;
402
- background: #32373C;
403
- padding: 5px; }
404
- #ditty-extensions .ditty-extension__tab {
405
- position: relative;
406
- display: flex;
407
- flex-direction: column;
408
- align-items: center;
409
- justify-content: center;
410
- font-weight: bold;
411
- color: #FFF;
412
- padding: 10px;
413
- text-align: center;
414
- text-decoration: none;
415
- background-color: rgba(255, 255, 255, 0.1);
416
- border: none;
417
- border-radius: 3px;
418
- transition: color .25s ease, background-color .25s ease;
419
- margin-right: 3px; }
420
- #ditty-extensions .ditty-extension__tab:last-child {
421
- margin-right: 0; }
422
- #ditty-extensions .ditty-extension__tab:hover {
423
- background-color: rgba(255, 255, 255, 0.2); }
424
- #ditty-extensions .ditty-extension__tab.active {
425
- background-color: #19BF7C; }
426
- #ditty-extensions .ditty-extension__panel {
427
- position: relative; }
428
- #ditty-extensions .ditty-extension__panel__sublabel {
429
- line-height: 1.4;
430
- text-transform: uppercase;
431
- margin: 0; }
432
- #ditty-extensions .ditty-extension__panel__label {
433
- line-height: 1.4;
434
- margin-top: 0;
435
- margin-bottom: auto; }
436
- #ditty-extensions .ditty-extension__form {
437
- padding: 20px; }
438
- #ditty-extensions .ditty-extension__form > *:first-child {
439
- margin-top: 0; }
440
- #ditty-extensions .ditty-extension__form > *:last-child {
441
- margin-bottom: 0; }
442
- #ditty-extensions .ditty-extension__form .ditty-field {
443
- padding-left: 0;
444
- padding-right: 0; }
445
- #ditty-extensions .ditty-extension__form .ditty-field:first-child {
446
- padding-top: 0; }
447
- #ditty-extensions .ditty-extension__form .ditty-field:last-child {
448
- padding-bottom: 0; }
449
- #ditty-extensions .ditty-extension__license__fields {
450
- display: flex;
451
- flex-direction: row;
452
- align-items: stretch;
453
- justify-content: flex-start; }
454
- #ditty-extensions .ditty-extension__license__input {
455
- flex: 1;
456
- min-width: 100px;
457
- margin-right: 0;
458
- border-right: none;
459
- border-top-right-radius: 0 !important;
460
- border-bottom-right-radius: 0 !important; }
461
- #ditty-extensions .ditty-extension__license__submit {
462
- width: 45px;
463
- text-align: center;
464
- color: #FFF;
465
- background-color: #32373C;
466
- margin: 0;
467
- border-bottom-left-radius: 0;
468
- border-top-left-radius: 0; }
469
- #ditty-extensions .ditty-extension__license__submit:hover {
470
- background-color: #19BF7C; }
471
- #ditty-extensions .ditty-extension__license__refresh {
472
- width: 45px;
473
- text-align: center;
474
- color: #FFF;
475
- background-color: #68737d;
476
- margin: 0;
477
- border-radius: 0; }
478
- #ditty-extensions .ditty-extension__license__refresh:hover {
479
- background-color: #19BF7C; }
480
- #ditty-extensions .ditty-extension__license__deactivate {
481
- width: 45px;
482
- text-align: center;
483
- color: #FFF;
484
- background-color: #32373C;
485
- margin: 0;
486
- border-bottom-left-radius: 0;
487
- border-top-left-radius: 0; }
488
- #ditty-extensions .ditty-extension__license__deactivate:hover {
489
- background-color: #19BF7C; }
490
- #ditty-extensions .ditty-extension__buttons .ditty-button {
491
- color: #FFF;
492
- margin: 10px 0 0; }
493
- #ditty-extensions .ditty-extension__buttons .ditty-button:hover {
494
- color: #FFF; }
495
- #ditty-extensions .ditty-extension__buttons .ditty-button:first-child {
496
- margin-top: 0; }
497
- #ditty-extensions .ditty-extension__buttons .ditty-button:last-child {
498
- margin-bottom: 0; }
499
- #ditty-extensions .ditty-extension__buttons:empty {
500
- display: none; }
501
- #ditty-extensions .ditty-extension__license-notification, #ditty-extensions .ditty-extension__custom-keys-notification {
502
- position: absolute;
503
- top: 0;
504
- left: 0;
505
- width: 100%;
506
- height: 100%;
507
- display: flex;
508
- flex-direction: row;
509
- align-items: center;
510
- justify-content: center;
511
- text-align: center;
512
- background: rgba(255, 255, 255, 0.8);
513
- -webkit-backdrop-filter: blur(5px);
514
- backdrop-filter: blur(5px);
515
- padding: 20px; }
516
- #ditty-extensions .ditty-extension__renewal-link {
517
- display: block;
518
- margin-top: 5px; }
519
- #ditty-extensions .ditty-extension__renewal-link a {
520
- font-weight: bold;
521
- color: inherit; }
522
- #ditty-extensions .ditty-extension[data-license_status="valid"] .ditty-extension__license-notification {
523
- display: none; }
524
- #ditty-extensions .ditty-extension[data-license_status="valid"] .ditty-extension__license__submit {
525
- display: none; }
526
- #ditty-extensions .ditty-extension:not([data-license_status="valid"]) .ditty-extension__license__refresh,
527
- #ditty-extensions .ditty-extension:not([data-license_status="valid"]) .ditty-extension__license__deactivate {
528
- display: none; }
529
- #ditty-extensions .ditty-extension:not([data-license_status="valid"])[data-api_keys="error"] .ditty-extension__custom-keys-notification {
530
- display: none; }
531
- #ditty-extensions .ditty-extension:not([data-api_keys="error"]) .ditty-extension__custom-keys-notification {
532
- display: none; }
533
- #ditty-extensions .ditty-extension[data-license_status="invalid"] .ditty-extension__header__overlay, #ditty-extensions .ditty-extension[data-license_status="deactivated"] .ditty-extension__header__overlay, #ditty-extensions .ditty-extension[data-license_status="error"] .ditty-extension__header__overlay {
534
- background-color: rgba(225, 54, 46, 0.5); }
535
- #ditty-extensions .ditty-extension[data-license_status="invalid"] .ditty-extension__tab[data-slide_id="license"], #ditty-extensions .ditty-extension[data-license_status="deactivated"] .ditty-extension__tab[data-slide_id="license"], #ditty-extensions .ditty-extension[data-license_status="error"] .ditty-extension__tab[data-slide_id="license"] {
536
- background-color: #E1362E; }
537
- #ditty-extensions .ditty-extension[data-license_status="invalid"] .ditty-extension__license__message, #ditty-extensions .ditty-extension[data-license_status="deactivated"] .ditty-extension__license__message, #ditty-extensions .ditty-extension[data-license_status="error"] .ditty-extension__license__message {
538
- color: #E1362E; }
539
- #ditty-extensions .ditty-extension[data-api="unauthorized"] .ditty-extension__tab[data-slide_id="api_connect"] {
540
- background-color: #FEBB00; }
541
- #ditty-extensions .ditty-extension--init .ditty-extension__header__overlay {
542
- background: rgba(35, 40, 46, 0.5); }
543
- #ditty-extensions .ditty-extension--init .ditty-extension__header__icon i {
544
- -webkit-transform: scale(1) rotate(0);
545
- transform: scale(1) rotate(0); }
546
- #ditty-extensions .ditty-extension--init .ditty-extension__icon {
547
- opacity: 1;
548
- -webkit-transform: translateX(0);
549
- transform: translateX(0); }
550
- #ditty-extensions .ditty-extension--init .ditty-extension__icon__small {
551
- border-width: 10px;
552
- -webkit-transform: scale(0.3) translate(-120px, -120px);
553
- transform: scale(0.3) translate(-120px, -120px); }
554
- #ditty-extensions .ditty-extension--init .ditty-extension__title {
555
- opacity: 1; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
556
 
557
  @media (min-width: 600px) {
558
  #ditty-extensions .ditty-extension {
559
- width: 50%; } }
560
-
 
561
  @media (min-width: 1200px) {
562
  #ditty-extensions .ditty-extension {
563
- width: 33.333%; } }
564
-
 
565
  #ditty-extensions-app {
566
- box-sizing: border-box; }
567
- #ditty-extensions-app * {
568
- box-sizing: border-box; }
569
- #ditty-extensions-app .ditty-extensions-grid {
570
- display: flex;
571
- flex-direction: row;
572
- align-items: stretch;
573
- justify-content: flex-start;
574
- flex-wrap: wrap;
575
- margin: -5px; }
576
- #ditty-extensions-app .ditty-extensions-group {
577
- margin: 10px 0; }
578
- #ditty-extensions-app .ditty-extensions-group > h3 {
579
- margin-top: 0; }
580
- #ditty-extensions-app .ditty-extensions-group--other {
581
- padding: 20px;
582
- margin-top: 40px;
583
- background: rgba(255, 255, 255, 0.9);
584
- border-radius: 5px; }
585
- #ditty-extensions-app .ditty-extension {
586
- width: 100%;
587
- padding: 5px; }
588
- #ditty-extensions-app .ditty-extension__note {
589
- padding: 10px;
590
- border: 1px solid;
591
- border-radius: 3px; }
592
- #ditty-extensions-app .ditty-extension__note--warning {
593
- background: #fff8e5;
594
- border-color: #FEBB00; }
595
- #ditty-extensions-app .ditty-extension__note--information {
596
- background: #e5f5fa;
597
- border-color: #159FD3; }
598
- #ditty-extensions-app .ditty-extension__contents {
599
- height: 100%;
600
- background: #FFF;
601
- border-radius: 5px;
602
- overflow: hidden;
603
- box-shadow: 0 0 1px rgba(0, 0, 0, 0.2); }
604
- #ditty-extensions-app .ditty-extension__header {
605
- position: relative;
606
- display: flex;
607
- flex-direction: row;
608
- align-items: center;
609
- justify-content: flex-start;
610
- background-color: #23282E;
611
- background-size: cover;
612
- background-position: center center;
613
- padding: 20px; }
614
- #ditty-extensions-app .ditty-extension__header__icon {
615
- position: absolute;
616
- top: 0;
617
- left: 0;
618
- width: 100%;
619
- height: 100%;
620
- display: flex;
621
- flex-direction: row;
622
- align-items: center;
623
- justify-content: flex-end;
624
- padding: 20px;
625
- overflow: hidden; }
626
- #ditty-extensions-app .ditty-extension__header__icon i {
627
- font-size: 260px;
628
- color: #FFF;
629
- -webkit-transform: scale(0.8) rotate(-25deg);
630
- transform: scale(0.8) rotate(-25deg);
631
- transition: -webkit-transform .5s ease;
632
- transition: transform .5s ease;
633
- transition: transform .5s ease, -webkit-transform .5s ease; }
634
- #ditty-extensions-app .ditty-extension__header__overlay {
635
- position: absolute;
636
- top: 0;
637
- left: 0;
638
- width: 100%;
639
- height: 100%;
640
- background: #23282e;
641
- -webkit-backdrop-filter: blur(5px);
642
- backdrop-filter: blur(5px);
643
- transition: background-color .5s ease; }
644
- #ditty-extensions-app .ditty-extension__icon {
645
- position: relative;
646
- flex: 0 0 auto;
647
- display: flex;
648
- flex-direction: column;
649
- align-items: center;
650
- justify-content: center;
651
- width: 80px;
652
- height: 80px;
653
- font-size: 40px;
654
- line-height: 40px;
655
- color: #FFF;
656
- margin-right: 10px;
657
- background: #23282E;
658
- border-radius: 50%;
659
- border: 4px solid #FFF;
660
- box-sizing: content-box;
661
- opacity: 0;
662
- -webkit-transform: translateX(-50px);
663
- transform: translateX(-50px);
664
- transition: opacity .25s ease, -webkit-transform .5s ease;
665
- transition: transform .5s ease, opacity .25s ease;
666
- transition: transform .5s ease, opacity .25s ease, -webkit-transform .5s ease;
667
- transition-delay: .25s;
668
- transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); }
669
- #ditty-extensions-app .ditty-extension__icon img {
670
- width: 80px;
671
- height: auto;
672
- border-radius: 50%; }
673
- #ditty-extensions-app .ditty-extension__icon__small {
674
- position: absolute;
675
- left: -4px;
676
- top: -4px;
677
- display: flex;
678
- flex-direction: column;
679
- align-items: center;
680
- justify-content: center;
681
- width: 80px;
682
- height: 80px;
683
- font-size: 40px;
684
- line-height: 40px;
685
- color: #FFF;
686
- background: #23282E;
687
- border-radius: 50%;
688
- border: 4px solid #FFF;
689
- box-sizing: content-box;
690
- transition: border-width .75s ease, -webkit-transform .75s ease;
691
- transition: transform .75s ease, border-width .75s ease;
692
- transition: transform .75s ease, border-width .75s ease, -webkit-transform .75s ease;
693
- transition-delay: .75s; }
694
- #ditty-extensions-app .ditty-extension__title {
695
- position: relative;
696
- color: #FFF;
697
- background: rgba(0, 0, 0, 0.8);
698
- padding: 5px 10px;
699
- border-radius: 5px;
700
- margin: 0;
701
- opacity: 0;
702
- transition: opacity 1s ease;
703
- transition-delay: .5s; }
704
- #ditty-extensions-app .ditty-extension__preview {
705
- padding: 20px; }
706
- #ditty-extensions-app .ditty-extension__preview__link {
707
- margin: 0; }
708
- #ditty-extensions-app .ditty-extension__tabs {
709
- display: flex;
710
- flex-direction: row;
711
- align-items: center;
712
- justify-content: flex-start;
713
- background: #32373C;
714
- padding: 5px; }
715
- #ditty-extensions-app .ditty-extension__tab {
716
- position: relative;
717
- display: flex;
718
- flex-direction: column;
719
- align-items: center;
720
- justify-content: center;
721
- font-weight: bold;
722
- color: #FFF;
723
- padding: 10px;
724
- text-align: center;
725
- text-decoration: none;
726
- background-color: rgba(255, 255, 255, 0.1);
727
- border: none;
728
- border-radius: 3px;
729
- transition: color .25s ease, background-color .25s ease;
730
- margin-right: 3px; }
731
- #ditty-extensions-app .ditty-extension__tab:last-child {
732
- margin-right: 0; }
733
- #ditty-extensions-app .ditty-extension__tab:hover {
734
- background-color: rgba(255, 255, 255, 0.2); }
735
- #ditty-extensions-app .ditty-extension__tab.active {
736
- background-color: #19BF7C; }
737
- #ditty-extensions-app .ditty-extension__panels {
738
- position: relative; }
739
- #ditty-extensions-app .ditty-extension__panel {
740
- position: absolute;
741
- top: 0;
742
- left: 0;
743
- width: 100%;
744
- background: #FFF; }
745
- #ditty-extensions-app .ditty-extension__panel__sublabel {
746
- line-height: 1.4;
747
- text-transform: uppercase;
748
- margin: 0; }
749
- #ditty-extensions-app .ditty-extension__panel__label {
750
- line-height: 1.4;
751
- margin-top: 0;
752
- margin-bottom: auto; }
753
- #ditty-extensions-app .ditty-extension__form {
754
- padding: 20px; }
755
- #ditty-extensions-app .ditty-extension__form > *:first-child {
756
- margin-top: 0; }
757
- #ditty-extensions-app .ditty-extension__form > *:last-child {
758
- margin-bottom: 0; }
759
- #ditty-extensions-app .ditty-extension__license__fields {
760
- display: flex;
761
- flex-direction: row;
762
- align-items: stretch;
763
- justify-content: flex-start; }
764
- #ditty-extensions-app .ditty-extension__license__input {
765
- flex: 1;
766
- min-width: 100px;
767
- margin-right: 0;
768
- border-right: none;
769
- border-top-right-radius: 0 !important;
770
- border-bottom-right-radius: 0 !important; }
771
- #ditty-extensions-app .ditty-extension__license__submit {
772
- width: 45px;
773
- text-align: center;
774
- color: #FFF;
775
- background-color: #32373C;
776
- margin: 0;
777
- border-bottom-left-radius: 0;
778
- border-top-left-radius: 0; }
779
- #ditty-extensions-app .ditty-extension__license__submit:hover {
780
- background-color: #19BF7C; }
781
- #ditty-extensions-app .ditty-extension__license__refresh {
782
- width: 45px;
783
- text-align: center;
784
- color: #FFF;
785
- background-color: #68737d;
786
- margin: 0;
787
- border-radius: 0; }
788
- #ditty-extensions-app .ditty-extension__license__refresh:hover {
789
- background-color: #19BF7C; }
790
- #ditty-extensions-app .ditty-extension__license__deactivate {
791
- width: 45px;
792
- text-align: center;
793
- color: #FFF;
794
- background-color: #32373C;
795
- margin: 0;
796
- border-bottom-left-radius: 0;
797
- border-top-left-radius: 0; }
798
- #ditty-extensions-app .ditty-extension__license__deactivate:hover {
799
- background-color: #19BF7C; }
800
- #ditty-extensions-app .ditty-extension__buttons .ditty-button {
801
- color: #FFF;
802
- margin: 10px 0 0; }
803
- #ditty-extensions-app .ditty-extension__buttons .ditty-button:hover {
804
- color: #FFF; }
805
- #ditty-extensions-app .ditty-extension__buttons .ditty-button:first-child {
806
- margin-top: 0; }
807
- #ditty-extensions-app .ditty-extension__buttons .ditty-button:last-child {
808
- margin-bottom: 0; }
809
- #ditty-extensions-app .ditty-extension__buttons:empty {
810
- display: none; }
811
- #ditty-extensions-app .ditty-extension__license-notification, #ditty-extensions-app .ditty-extension__custom-keys-notification {
812
- position: absolute;
813
- top: 0;
814
- left: 0;
815
- width: 100%;
816
- height: 100%;
817
- display: flex;
818
- flex-direction: row;
819
- align-items: center;
820
- justify-content: center;
821
- text-align: center;
822
- background: rgba(255, 255, 255, 0.8);
823
- -webkit-backdrop-filter: blur(5px);
824
- backdrop-filter: blur(5px);
825
- padding: 20px; }
826
- #ditty-extensions-app .ditty-extension__renewal-link {
827
- display: block;
828
- margin-top: 5px; }
829
- #ditty-extensions-app .ditty-extension__renewal-link a {
830
- font-weight: bold;
831
- color: inherit; }
832
- #ditty-extensions-app .ditty-extension--valid .ditty-extension__license-notification {
833
- display: none; }
834
- #ditty-extensions-app .ditty-extension:not([data-license_status="valid"])[data-api_keys="error"] .ditty-extension__custom-keys-notification {
835
- display: none; }
836
- #ditty-extensions-app .ditty-extension:not([data-api_keys="error"]) .ditty-extension__custom-keys-notification {
837
- display: none; }
838
- #ditty-extensions-app .ditty-extension--failed .ditty-extension__header__overlay, #ditty-extensions-app .ditty-extension--invalid .ditty-extension__header__overlay, #ditty-extensions-app .ditty-extension--deactivated .ditty-extension__header__overlay {
839
- background-color: rgba(225, 54, 46, 0.5) !important; }
840
- #ditty-extensions-app .ditty-extension--failed .ditty-extension__tab--license, #ditty-extensions-app .ditty-extension--invalid .ditty-extension__tab--license, #ditty-extensions-app .ditty-extension--deactivated .ditty-extension__tab--license {
841
- background-color: #E1362E !important; }
842
- #ditty-extensions-app .ditty-extension--failed .ditty-extension__license__message, #ditty-extensions-app .ditty-extension--invalid .ditty-extension__license__message, #ditty-extensions-app .ditty-extension--deactivated .ditty-extension__license__message {
843
- color: #E1362E; }
844
- #ditty-extensions-app .ditty-extension--unauthorized .ditty-extension__tab--api_connect {
845
- background-color: #FEBB00; }
846
- #ditty-extensions-app .ditty-extension--init .ditty-extension__header__overlay {
847
- background: rgba(35, 40, 46, 0.5); }
848
- #ditty-extensions-app .ditty-extension--init .ditty-extension__header__icon i {
849
- -webkit-transform: scale(1) rotate(0);
850
- transform: scale(1) rotate(0); }
851
- #ditty-extensions-app .ditty-extension--init .ditty-extension__icon {
852
- opacity: 1;
853
- -webkit-transform: translateX(0);
854
- transform: translateX(0); }
855
- #ditty-extensions-app .ditty-extension--init .ditty-extension__icon__small {
856
- border-width: 10px;
857
- -webkit-transform: scale(0.3) translate(-120px, -120px);
858
- transform: scale(0.3) translate(-120px, -120px); }
859
- #ditty-extensions-app .ditty-extension--init .ditty-extension__title {
860
- opacity: 1; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
861
 
862
  @media (min-width: 600px) {
863
  #ditty-extensions-app .ditty-extension {
864
- width: 50%; } }
865
-
 
866
  @media (min-width: 1200px) {
867
  #ditty-extensions-app .ditty-extension {
868
- width: 33.333%; } }
869
-
 
870
  @media (min-width: 1600px) {
871
  #ditty-extensions-app .ditty-extension {
872
- width: 25%; } }
873
-
 
874
  @media (min-width: 2000px) {
875
  #ditty-extensions-app .ditty-extension {
876
- width: 20%; } }
877
-
 
878
  #ditty-extensions .ditty-extension--instagram .ditty-extension__header,
879
  #ditty-extensions .ditty-extension--instagram .ditty-extension__icon,
880
  #ditty-extensions .ditty-extension--instagram .ditty-extension__icon__small,
881
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__header,
882
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__icon,
883
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__icon__small {
884
- background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d); }
885
-
886
  #ditty-extensions .ditty-extension--instagram .ditty-button:hover,
887
  #ditty-extensions .ditty-extension--instagram .ditty-button--primary,
888
  #ditty-extensions .ditty-extension--instagram .ditty-extension__tab.active,
889
  #ditty-extensions-app .ditty-extension--instagram .ditty-button:hover,
890
  #ditty-extensions-app .ditty-extension--instagram .ditty-button--primary,
891
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__tab.active {
892
- background-color: #e1306c; }
893
-
894
  #ditty-extensions .ditty-extension--images .ditty-extension__header,
895
  #ditty-extensions .ditty-extension--images .ditty-extension__header,
896
  #ditty-extensions .ditty-extension--images .ditty-extension__icon,
@@ -905,8 +1054,8 @@ table.wp-list-table .type-ditty_display .row-actions {
905
  #ditty-extensions-app .ditty-extension--images .ditty-button:hover,
906
  #ditty-extensions-app .ditty-extension--images .ditty-button--primary,
907
  #ditty-extensions-app .ditty-extension--images .ditty-extension__tab.active {
908
- background-color: #39B449; }
909
-
910
  #ditty-extensions .ditty-extension--facebook .ditty-extension__header,
911
  #ditty-extensions .ditty-extension--facebook .ditty-extension__icon,
912
  #ditty-extensions .ditty-extension--facebook .ditty-extension__icon__small,
@@ -919,8 +1068,8 @@ table.wp-list-table .type-ditty_display .row-actions {
919
  #ditty-extensions-app .ditty-extension--facebook .ditty-button:hover,
920
  #ditty-extensions-app .ditty-extension--facebook .ditty-button--primary,
921
  #ditty-extensions-app .ditty-extension--facebook .ditty-extension__tab.active {
922
- background-color: #3b5998; }
923
-
924
  #ditty-extensions .ditty-extension--rss .ditty-extension__header,
925
  #ditty-extensions .ditty-extension--rss .ditty-extension__icon,
926
  #ditty-extensions .ditty-extension--rss .ditty-extension__icon__small,
@@ -933,8 +1082,8 @@ table.wp-list-table .type-ditty_display .row-actions {
933
  #ditty-extensions-app .ditty-extension--rss .ditty-button:hover,
934
  #ditty-extensions-app .ditty-extension--rss .ditty-button--primary,
935
  #ditty-extensions-app .ditty-extension--rss .ditty-extension__tab.active {
936
- background-color: #ee802f; }
937
-
938
  #ditty-extensions .ditty-extension--timing .ditty-extension__header,
939
  #ditty-extensions .ditty-extension--timing .ditty-extension__icon,
940
  #ditty-extensions .ditty-extension--timing .ditty-extension__icon__small,
@@ -947,8 +1096,8 @@ table.wp-list-table .type-ditty_display .row-actions {
947
  #ditty-extensions-app .ditty-extension--timing .ditty-button:hover,
948
  #ditty-extensions-app .ditty-extension--timing .ditty-button--primary,
949
  #ditty-extensions-app .ditty-extension--timing .ditty-extension__tab.active {
950
- background-color: #19BF7C; }
951
-
952
  #ditty-extensions .ditty-extension--twitter .ditty-extension__header,
953
  #ditty-extensions .ditty-extension--twitter .ditty-extension__icon,
954
  #ditty-extensions .ditty-extension--twitter .ditty-extension__icon__small,
@@ -961,8 +1110,8 @@ table.wp-list-table .type-ditty_display .row-actions {
961
  #ditty-extensions-app .ditty-extension--twitter .ditty-button:hover,
962
  #ditty-extensions-app .ditty-extension--twitter .ditty-button--primary,
963
  #ditty-extensions-app .ditty-extension--twitter .ditty-extension__tab.active {
964
- background-color: #1DA1F2; }
965
-
966
  #ditty-extensions .ditty-extension--posts .ditty-extension__header,
967
  #ditty-extensions .ditty-extension--posts .ditty-extension__icon,
968
  #ditty-extensions .ditty-extension--posts .ditty-extension__icon__small,
@@ -975,82 +1124,96 @@ table.wp-list-table .type-ditty_display .row-actions {
975
  #ditty-extensions-app .ditty-extension--posts .ditty-button:hover,
976
  #ditty-extensions-app .ditty-extension--posts .ditty-button--primary,
977
  #ditty-extensions-app .ditty-extension--posts .ditty-extension__tab.active {
978
- background-color: #21759b; }
 
979
 
980
  #ditty-layout-html .inside,
981
  #ditty-layout-html .ditty-field,
982
  #ditty-layout-css .inside,
983
  #ditty-layout-css .ditty-field {
984
  padding: 0;
985
- margin: 0; }
986
- #ditty-layout-html .inside__input,
987
- #ditty-layout-html .ditty-field__input,
988
- #ditty-layout-css .inside__input,
989
- #ditty-layout-css .ditty-field__input {
990
- margin: 0; }
991
-
 
992
  #ditty-layout-html .CodeMirror,
993
  #ditty-layout-css .CodeMirror {
994
- resize: vertical; }
 
995
 
996
  #ditty-page {
997
  width: 1200px;
998
- max-width: calc( 100% - 20px);
999
  border-radius: 5px;
1000
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
1001
  margin-top: 22px;
1002
- overflow: hidden; }
1003
- #ditty-page__header {
1004
- box-sizing: border-box;
1005
- padding: 20px;
1006
- background: #FFF;
1007
- overflow: hidden;
1008
- border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
1009
- #ditty-page__version {
1010
- margin-bottom: 20px; }
1011
- #ditty-page__title {
1012
- font-weight: bold; }
1013
- #ditty-page__logo__image {
1014
- display: block;
1015
- line-height: 0;
1016
- width: 200px;
1017
- height: auto; }
1018
- #ditty-page__content {
1019
- box-sizing: border-box;
1020
- width: 1200px;
1021
- max-width: 100%;
1022
- margin: 0 auto; }
1023
- #ditty-page__content hr {
1024
- margin: 40px 0; }
 
 
 
 
 
 
 
1025
 
1026
  @media screen and (max-width: 782px) {
1027
  #ditty-page {
1028
- max-width: calc( 100% - 10px);
1029
- margin-top: 10px; } }
1030
-
 
1031
  #ditty-settings {
1032
  display: flex;
1033
  flex-direction: row;
1034
  align-items: stretch;
1035
- justify-content: flex-start; }
1036
- #ditty-settings.updating .ditty-updating-overlay {
1037
- display: block; }
 
 
1038
 
1039
  .ditty-settings__header, .ditty-settings__footer {
1040
  display: flex;
1041
  flex-direction: row;
1042
  align-items: center;
1043
  justify-content: flex-end;
1044
- padding: 20px; }
1045
- .ditty-settings__header .ditty-button, .ditty-settings__footer .ditty-button {
1046
- margin: 0; }
1047
-
 
1048
  .ditty-settings__header {
1049
- border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
1050
-
1051
  .ditty-settings__footer {
1052
- border-top: 1px solid rgba(0, 0, 0, 0.05); }
1053
-
1054
  .ditty-settings__tabs {
1055
  display: flex;
1056
  flex-direction: column;
@@ -1059,8 +1222,8 @@ table.wp-list-table .type-ditty_display .row-actions {
1059
  width: 250px;
1060
  background: #32373C;
1061
  padding-top: 1em !important;
1062
- padding-bottom: 1em !important; }
1063
-
1064
  .ditty-settings__tab {
1065
  box-sizing: border-box;
1066
  position: relative;
@@ -1076,91 +1239,108 @@ table.wp-list-table .type-ditty_display .row-actions {
1076
  text-align: center;
1077
  text-decoration: none;
1078
  background-color: #32373C;
1079
- border: none; }
1080
- .ditty-settings__tab i {
1081
- position: absolute;
1082
- top: 10px;
1083
- display: block;
1084
- font-size: 14px;
1085
- width: 14px; }
1086
- .ditty-settings__tab svg {
1087
- position: absolute;
1088
- top: 10px;
1089
- display: block;
1090
- width: 14px; }
1091
- .ditty-settings__tab span {
1092
- display: block;
1093
- padding-left: 30px; }
1094
- .ditty-settings__tab:focus {
1095
- color: #FFF;
1096
- outline: none;
1097
- box-shadow: none; }
1098
- .ditty-settings__tab:active {
1099
- color: #FFF;
1100
- outline: none;
1101
- box-shadow: none; }
1102
- .ditty-settings__tab:not(.active):hover {
1103
- color: #19BF7C;
1104
- background-color: rgba(0, 0, 0, 0.5); }
1105
- .ditty-settings__tab.active {
1106
- background-color: #19BF7C; }
1107
- .ditty-settings__tab.active:hover {
1108
- color: #FFF; }
1109
- .ditty-settings__tab.active:after {
1110
- right: 0;
1111
- border: 9px solid transparent;
1112
- content: " ";
1113
- height: 0;
1114
- width: 0;
1115
- position: absolute;
1116
- pointer-events: none;
1117
- border-right-color: #fff;
1118
- top: 50%;
1119
- margin-top: -8px; }
1120
-
 
 
 
 
 
 
 
 
 
1121
  .ditty-settings__panel {
1122
- display: none; }
1123
- .ditty-settings__panel > .ditty-field {
1124
- padding: 25px 30px; }
1125
-
 
1126
  .ditty-settings__form {
1127
  position: relative;
1128
  flex: 1;
1129
- background: #FFF; }
1130
-
1131
  .ditty-settings__save.has-updates {
1132
- background-color: orange; }
 
1133
 
1134
  /* Default Layouts Variations */
1135
  .ditty-field--layout_variation_defaults > .ditty-field__heading {
1136
- display: none; }
 
1137
 
1138
  .ditty-field--variation_defaults .ditty-input--group .ditty-field {
1139
  display: flex;
1140
  flex-direction: row;
1141
  align-items: flex-start;
1142
- justify-content: flex-start; }
1143
- .ditty-field--variation_defaults .ditty-input--group .ditty-field .ditty-field__heading {
1144
- flex: 0 0 200px;
1145
- margin-right: 30px; }
1146
- .ditty-field--variation_defaults .ditty-input--group .ditty-field .ditty-field__input__container {
1147
- width: 100%; }
1148
- .ditty-field--variation_defaults .ditty-input--group .ditty-field .ditty-field__input {
1149
- margin: 0; }
 
 
 
 
1150
 
1151
  /* Default Layouts & Displays */
1152
  .ditty-field--layout_templates > .ditty-field__heading,
1153
  .ditty-field--display_templates > .ditty-field__heading {
1154
- display: none; }
1155
-
1156
  .ditty-field--layout_templates .ditty-templates-list__type,
1157
  .ditty-field--display_templates .ditty-templates-list__type {
1158
- margin-bottom: 30px; }
1159
- .ditty-field--layout_templates .ditty-templates-list__type h3,
1160
- .ditty-field--display_templates .ditty-templates-list__type h3 {
1161
- font-size: 1.2em;
1162
- margin: 0 0 10px; }
1163
-
 
1164
  .ditty-field--layout_templates .ditty-templates-list__template,
1165
  .ditty-field--display_templates .ditty-templates-list__template {
1166
  display: flex;
@@ -1169,92 +1349,121 @@ table.wp-list-table .type-ditty_display .row-actions {
1169
  justify-content: space-between;
1170
  padding: 10px;
1171
  background: #F2F2F2;
1172
- border-radius: 3px; }
1173
- .ditty-field--layout_templates .ditty-templates-list__template h4,
1174
- .ditty-field--display_templates .ditty-templates-list__template h4 {
1175
- font-size: 1.1em;
1176
- margin: 0 0 3px; }
1177
- .ditty-field--layout_templates .ditty-templates-list__template p,
1178
- .ditty-field--display_templates .ditty-templates-list__template p {
1179
- margin: 0; }
1180
- .ditty-field--layout_templates .ditty-templates-list__template .ditty-button,
1181
- .ditty-field--display_templates .ditty-templates-list__template .ditty-button {
1182
- margin: 0; }
1183
- .ditty-field--layout_templates .ditty-templates-list__template .ditty-button i,
1184
- .ditty-field--display_templates .ditty-templates-list__template .ditty-button i {
1185
- margin-left: 10px; }
 
 
 
 
 
1186
 
1187
  /* Global Dittys */
1188
  .ditty-field--global_ditty .ditty-input--clone {
1189
- margin-bottom: 5px; }
1190
-
1191
  .ditty-field--global_ditty .ditty-field-type--group-child {
1192
- width: 100%; }
 
1193
 
1194
  @media (max-width: 600px) {
1195
  .ditty-settings__tabs {
1196
  width: 44px;
1197
- flex: 0 0 44px; }
 
1198
  .ditty-settings__tab {
1199
  padding: 10px 4px 10px 14px;
1200
- width: auto; }
1201
- .ditty-settings__tab span {
1202
- display: none; }
 
 
1203
  .ditty-settings__panel > .ditty-field {
1204
  padding-left: 20px;
1205
- padding-right: 20px; } }
1206
-
 
1207
  @media (min-width: 500px) {
1208
  /* Global Dittys */
1209
  .ditty-field--global_ditty .ditty-field--selector {
1210
- width: 60%; }
 
1211
  .ditty-field--global_ditty .ditty-field--position {
1212
- width: 40%; }
 
1213
  .ditty-field--global_ditty .ditty-field--ditty,
1214
- .ditty-field--global_ditty .ditty-field--display {
1215
- width: 50%; }
 
1216
  .ditty-field--global_ditty .ditty-field--custom_id {
1217
- width: 40%; }
 
1218
  .ditty-field--global_ditty .ditty-field--custom_classes {
1219
- width: 60%; } }
1220
-
 
1221
  @media (min-width: 1000px) {
1222
  .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) {
1223
  display: flex;
1224
  flex-direction: row;
1225
  align-items: flex-start;
1226
- justify-content: flex-start; }
1227
- .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__heading {
1228
- flex: 0 0 50%;
1229
- padding-right: 60px; }
1230
- .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__heading > .ditty-field__label,
1231
- .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__heading > .ditty-field__description {
1232
- margin-bottom: 0; }
1233
- .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__input__container {
1234
- width: 100%; }
1235
- .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__input__container > .ditty-field__input {
1236
- margin-top: 0; } }
1237
-
 
 
 
 
 
1238
  /* Post import/exports */
1239
  .ditty-import-button i,
1240
  .ditty-export-button i {
1241
- display: none; }
 
1242
 
1243
  .ditty-input--checkboxes__option--select_all {
1244
  width: 100%;
1245
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
1246
  padding-bottom: 10px;
1247
- margin-bottom: 10px !important; }
 
 
 
 
 
1248
 
1249
  .ditty-section {
1250
  background: #FFF;
1251
- padding: 40px; }
1252
- .ditty-section--intro {
1253
- color: #FFF;
1254
- text-align: center;
1255
- background: #1D2327; }
1256
- .ditty-section--intro p {
1257
- font-weight: 300; }
 
 
 
1258
 
1259
  .ditty-row {
1260
  display: flex;
@@ -1264,112 +1473,132 @@ table.wp-list-table .type-ditty_display .row-actions {
1264
  flex-wrap: wrap;
1265
  box-sizing: border-box;
1266
  margin-left: -20px;
1267
- margin-right: -20px; }
 
1268
 
1269
  .ditty-column {
1270
  width: 100%;
1271
  padding: 0 20px;
1272
- box-sizing: border-box; }
 
1273
 
1274
  .ditty-container {
1275
- margin-bottom: 30px; }
1276
- .ditty-container--details {
1277
- display: flex;
1278
- flex-direction: row;
1279
- align-items: flex-start;
1280
- justify-content: flex-start; }
1281
- .ditty-container--details i {
1282
- flex: 0 0 auto;
1283
- width: 35px;
1284
- font-size: 30px;
1285
- line-height: 30px;
1286
- margin-right: 10px; }
1287
- .ditty-container--details__content {
1288
- flex: 1; }
1289
- .ditty-container--details h3 {
1290
- margin-top: 0;
1291
- margin-bottom: 5px; }
1292
- .ditty-container--details p {
1293
- margin-top: 5px; }
 
 
 
 
 
 
1294
 
1295
  @media (min-width: 651px) {
1296
  .ditty-column--1_2 {
1297
- width: 50%; } }
1298
-
 
1299
  .ditty-header {
1300
  color: #FFF;
1301
  background: #1ABF7D;
1302
- margin-left: -20px; }
1303
- .ditty-header__wrapper {
1304
- align-items: center;
1305
- display: flex;
1306
- flex-wrap: wrap;
1307
- justify-content: space-between;
1308
- transition: padding 0.3s ease;
1309
- margin-left: auto;
1310
- margin-right: auto;
1311
- padding: 1.5rem;
1312
- padding-bottom: 1.375rem;
1313
- padding-top: 1.375rem; }
1314
- .ditty-header svg {
1315
- width: 100px; }
 
 
 
1316
 
1317
  .ditty-page__contents {
1318
- padding: 20px; }
1319
-
1320
  .ditty-page__header h2 {
1321
  font-size: 23px;
1322
  line-height: 30px;
1323
  font-weight: 400;
1324
  color: #FFF;
1325
- margin: 0; }
 
1326
 
1327
  @media only screen and (max-width: 960px) {
1328
  .ditty-header {
1329
- margin-left: -20px; } }
1330
-
 
1331
  @media screen and (max-width: 782px) {
1332
  .ditty-header {
1333
- margin-left: -10px; } }
1334
-
 
1335
  .ditty-import__group {
1336
- margin-bottom: 40px; }
1337
-
1338
  .ditty-field--ditty_new_import_button .ditty-button {
1339
  display: inline-block;
1340
- width: auto; }
 
1341
 
1342
  .wp-admin.post-new-php.post-type-ditty.ditty-wizard-enabled .wp-heading-inline,
1343
  .wp-admin.post-new-php.post-type-ditty.ditty-wizard-enabled .wp-header-end {
1344
- display: none; }
 
1345
 
1346
  #ditty-page.ditty-wizard #ditty-page__header {
1347
  display: flex;
1348
  flex-direction: column;
1349
  align-items: flex-start;
1350
- justify-content: flex-start; }
1351
-
1352
- #ditty-page.ditty-wizard input[name="ditty_title"] {
1353
  width: 100%;
1354
  height: 52px;
1355
  font-size: 1.3em;
1356
  font-weight: 600;
1357
  color: #1d2327;
1358
- border-color: #e0e3e7; }
 
1359
 
1360
  .ditty-wizard-header * {
1361
- box-sizing: border-box; }
1362
-
1363
  .ditty-wizard-header__contents ul {
1364
  display: flex;
1365
  flex-direction: row;
1366
  align-items: center;
1367
  justify-content: flex-start;
1368
- gap: 5px; }
1369
- .ditty-wizard-header__contents ul li {
1370
- padding: 10px;
1371
- border: 1px solid #e0e3e7;
1372
- border-radius: 3px; }
 
 
1373
 
1374
  .ditty-instruction-number {
1375
  flex: 0 0 auto;
@@ -1381,12 +1610,14 @@ table.wp-list-table .type-ditty_display .row-actions {
1381
  justify-content: center;
1382
  border: 2px solid #e0e3e7;
1383
  border-radius: 50%;
1384
- margin-right: 15px; }
1385
- .ditty-instruction-number span {
1386
- font-size: 20px;
1387
- line-height: 20px;
1388
- font-weight: bold;
1389
- color: #e0e3e7; }
 
 
1390
 
1391
  .ditty-wizard-setting {
1392
  position: relative;
@@ -1396,55 +1627,74 @@ table.wp-list-table .type-ditty_display .row-actions {
1396
  justify-content: flex-start;
1397
  background: #FFF;
1398
  border-bottom: 1px solid #f7f7f7;
1399
- padding: 20px; }
1400
- .ditty-wizard-setting .ditty-wizard-setting__content {
1401
- flex: 1; }
1402
- .ditty-wizard-setting:hover {
1403
- background: #f7f7f7; }
1404
- .ditty-wizard-setting:hover .ditty-instruction-number {
1405
- border-color: #19BF7C; }
1406
- .ditty-wizard-setting:hover .ditty-instruction-number span {
1407
- color: #19BF7C; }
1408
- .ditty-wizard-setting.complete .ditty-instruction-number {
1409
- background-color: #19BF7C;
1410
- border-color: #19BF7C; }
1411
- .ditty-wizard-setting.complete .ditty-instruction-number span {
1412
- color: #FFF; }
1413
- .ditty-wizard-setting__title {
1414
- margin: 0 0 5px; }
1415
- .ditty-wizard-setting__description {
1416
- margin: 5px 0 15px; }
1417
- .ditty-wizard-setting--title input {
1418
- width: 100%;
1419
- padding-left: 15px;
1420
- padding-right: 15px; }
1421
- .ditty-wizard-setting--item-type, .ditty-wizard-setting--item-type-settings, .ditty-wizard-setting--layout, .ditty-wizard-setting--display, .ditty-wizard-setting--submit {
1422
- display: none; }
1423
- .ditty-wizard-setting--layout .ditty-option-grid__item {
1424
- width: 250px;
1425
- padding-bottom: 30px; }
1426
- .ditty-wizard-setting--layout__variation {
1427
- display: none;
1428
- padding: 20px;
1429
- border: 1px solid #e0e3e7;
1430
- border-radius: 3px;
1431
- margin-top: 15px; }
1432
- .ditty-wizard-setting--layout__variation__title {
1433
- margin: 0; }
1434
- .ditty-wizard-setting--layout__variation .ditty-option-grid {
1435
- margin-top: 15px; }
1436
- .ditty-wizard-setting--display .ditty-option-grid__item {
1437
- width: 250px;
1438
- padding-bottom: 30px; }
1439
- .ditty-wizard-setting--display .ditty-option-grid__item__title {
1440
- margin-bottom: 0; }
1441
- .ditty-wizard-setting--submit {
1442
- justify-content: flex-end;
1443
- padding-top: 20px;
1444
- padding-bottom: 10px;
1445
- border-top: 1px solid rgba(0, 0, 0, 0.05); }
1446
- .ditty-wizard-setting--submit .ditty-button {
1447
- margin: 0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1448
 
1449
  .ditty-option-grid {
1450
  display: flex;
@@ -1452,55 +1702,66 @@ table.wp-list-table .type-ditty_display .row-actions {
1452
  align-items: stretch;
1453
  justify-content: flex-start;
1454
  flex-wrap: wrap;
1455
- gap: 5px; }
1456
- .ditty-option-grid__item {
1457
- position: relative;
1458
- display: flex;
1459
- flex-direction: column;
1460
- align-items: center;
1461
- justify-content: flex-start;
1462
- box-sizing: border-box;
1463
- font-size: 12px;
1464
- line-height: 18px;
1465
- text-align: center;
1466
- color: #3c434a;
1467
- padding: 20px;
1468
- background: #FFF;
1469
- border: 2px solid #e0e3e7;
1470
- border-radius: 3px;
1471
- width: 200px;
1472
- transition: border-color .25s ease, background-color .25s ease;
1473
- -webkit-appearance: none; }
1474
- .ditty-option-grid__item i {
1475
- font-size: 30px;
1476
- line-height: 30px;
1477
- transition: color .25s ease; }
1478
- .ditty-option-grid__item__title {
1479
- font-size: 14px;
1480
- line-height: 18px;
1481
- margin: 15px 0 5px; }
1482
- .ditty-option-grid__item__description {
1483
- display: none;
1484
- color: #93999f; }
1485
- .ditty-option-grid__item__id {
1486
- position: absolute;
1487
- bottom: 2px;
1488
- left: 5px;
1489
- color: #93999f; }
1490
- .ditty-option-grid__item__date {
1491
- position: absolute;
1492
- bottom: 2px;
1493
- right: 5px;
1494
- color: #93999f; }
1495
- .ditty-option-grid__item:not(.active) {
1496
- cursor: pointer; }
1497
- .ditty-option-grid__item:not(.active):hover {
1498
- border-color: #c2c9d0; }
1499
- .ditty-option-grid__item.active {
1500
- background-color: #EDF8ED;
1501
- border-color: #19BF7C; }
1502
- .ditty-option-grid__item.active .ditty-option-grid__item__description {
1503
- display: block; }
 
 
 
 
 
 
 
 
 
 
 
1504
 
1505
  .ditty-option-list {
1506
  display: flex;
@@ -1508,96 +1769,109 @@ table.wp-list-table .type-ditty_display .row-actions {
1508
  align-items: flex;
1509
  justify-content: flex-start;
1510
  flex-wrap: wrap;
1511
- gap: 5px; }
1512
- .ditty-option-list__item {
1513
- display: flex;
1514
- flex-direction: column;
1515
- align-items: flex-start;
1516
- justify-content: flex-start;
1517
- box-sizing: border-box;
1518
- font-size: 12px;
1519
- line-height: 18px;
1520
- text-align: left;
1521
- color: #3c434a;
1522
- padding: 5px 10px;
1523
- background: #FFF;
1524
- border: 2px solid #e0e3e7;
1525
- border-radius: 3px;
1526
- min-width: 150px;
1527
- transition: border-color .25s ease, background-color .25s ease;
1528
- -webkit-appearance: none; }
1529
- .ditty-option-list__item__title {
1530
- font-size: 14px;
1531
- line-height: 18px;
1532
- margin: 0;
1533
- transition: color .25s ease; }
1534
- .ditty-option-list__item__description {
1535
- color: #93999f;
1536
- transition: color .25s ease;
1537
- margin: 0; }
1538
- .ditty-option-list__item__date {
1539
- font-size: 11px;
1540
- color: #93999f;
1541
- transition: color .25s ease;
1542
- margin: 0; }
1543
- .ditty-option-list__item:not(.active) {
1544
- cursor: pointer; }
1545
- .ditty-option-list__item:not(.active):hover {
1546
- border-color: #c2c9d0; }
1547
- .ditty-option-list__item.active {
1548
- background-color: #EDF8ED;
1549
- border-color: #19BF7C; }
1550
- .ditty-option-list__item.active .ditty-option-grid__item__description {
1551
- display: block; }
 
 
 
 
 
 
 
 
 
1552
 
1553
  body.rtl #ditty-editor .ditty-editor__tab span {
1554
  padding-left: 0;
1555
- padding-right: 20px; }
1556
-
1557
  body.rtl .ditty-data-list__filter i {
1558
  margin-right: 0;
1559
- margin-left: 5px; }
1560
-
1561
  body.rtl .ditty-editor-options__buttons--start a:not(.ditty-button), body.rtl .ditty-editor-options__buttons--start button:not(.ditty-button) {
1562
  margin-right: 0;
1563
- margin-left: 5px; }
1564
-
1565
  body.rtl .ditty-editor-options__buttons--end a:not(.ditty-button), body.rtl .ditty-editor-options__buttons--end button:not(.ditty-button) {
1566
  margin-left: 0;
1567
- margin-right: 5px; }
1568
-
1569
  body.rtl .ditty-data-list__item {
1570
  padding-right: 0;
1571
- padding-left: 8px; }
1572
- body.rtl .ditty-data-list__item__label {
1573
- padding-right: 0;
1574
- padding-left: 5px;
1575
- margin-right: 0;
1576
- margin-left: auto; }
1577
- body.rtl .ditty-data-list__item__label .ditty-display-version {
1578
- margin-right: 5px; }
1579
-
 
 
 
1580
  body.rtl .ditty-layout-variation {
1581
- padding: 5px 10px 0 8px; }
1582
-
1583
  body.rtl .ditty-editor__panel--items .ditty-data-list__item a.ditty-data-list__item__icon {
1584
  border-right: none;
1585
  border-left: 1px solid rgba(0, 0, 0, 0.05);
1586
  margin-right: 0;
1587
- margin-left: 10px; }
1588
-
1589
  body.rtl .ditty-field-type--checkbox .ditty-field__input__primary label {
1590
  margin-left: 0;
1591
- margin-right: 7px; }
1592
-
1593
  body.rtl .ditty-field-type--radio .ditty-input--radio__option label {
1594
  margin-left: 0;
1595
- margin-right: 7px; }
1596
-
1597
  body.rtl .ditty-field-type--radio .ditty-input--radio--inline .ditty-input--radio__option {
1598
  margin-right: 0;
1599
- margin-left: 15px; }
1600
-
1601
- body.rtl .ditty-field-type--color input[type="text"] {
1602
  padding-left: 1px !important;
1603
- padding-right: 40px !important; }
 
1
  .wp-admin.post-php.post-type-ditty #poststuff,
2
  .wp-admin.post-new-php.post-type-ditty #poststuff {
3
+ min-width: inherit;
4
+ }
5
  .wp-admin.post-php.post-type-ditty #post-body-content,
6
  .wp-admin.post-new-php.post-type-ditty #post-body-content {
7
+ min-width: inherit;
8
+ }
9
  .wp-admin.post-php.post-type-ditty #post-body.columns-2 #postbox-container-1,
10
  .wp-admin.post-new-php.post-type-ditty #post-body.columns-2 #postbox-container-1 {
11
  margin-right: -400px;
12
+ width: 380px;
13
+ }
14
  .wp-admin.post-php.post-type-ditty #poststuff #post-body.columns-2,
15
  .wp-admin.post-new-php.post-type-ditty #poststuff #post-body.columns-2 {
16
+ margin-right: 400px;
17
+ }
18
+ .wp-admin.post-php.post-type-ditty #poststuff #post-body.columns-2 #side-sortables,
19
+ .wp-admin.post-new-php.post-type-ditty #poststuff #post-body.columns-2 #side-sortables {
20
+ width: 380px;
21
+ }
22
  .wp-admin.post-php.post-type-ditty #titlediv,
23
  .wp-admin.post-new-php.post-type-ditty #titlediv {
24
+ display: none;
25
+ }
26
 
27
  @media only screen and (max-width: 850px) {
28
  .wp-admin.post-type-ditty #poststuff #post-body.columns-2 #side-sortables {
29
+ width: auto;
30
+ }
31
+ }
32
  #adminmenu .menu-icon-ditty div.wp-menu-image.svg {
33
+ background-size: 16px auto;
34
+ }
35
 
36
  table.wp-list-table .type-ditty .row-actions,
37
  table.wp-list-table .type-ditty_layout .row-actions,
38
  table.wp-list-table .type-ditty_display .row-actions {
39
+ color: #999;
40
+ }
41
 
42
  .ditty_layout_ui--disabled #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_layout"] {
43
+ display: none;
44
+ }
45
 
46
  .ditty_display_ui--disabled #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_display"] {
47
+ display: none;
48
+ }
49
 
50
  .ditty-error-notice {
51
  line-height: 1.4em;
54
  background: #fbeaea;
55
  border: 1px solid #E1362E;
56
  border-radius: 3px;
57
+ padding: 7px 10px;
58
+ }
59
 
60
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_news_ticker"],
61
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty&page=mtphr_dnt_settings"] {
62
  background-color: rgba(255, 255, 255, 0.1);
63
+ box-shadow: -5px 0 0 0 rgba(255, 255, 255, 0.1);
64
+ }
65
 
66
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty_news_ticker"] {
67
  padding-top: 8px;
68
+ margin-top: 8px;
69
+ }
70
 
71
  #adminmenu .wp-submenu > li > a[href="edit.php?post_type=ditty&page=mtphr_dnt_settings"] {
72
  padding-bottom: 8px;
73
+ margin-bottom: -8px;
74
+ }
75
 
76
  .ditty-dashboard-notice {
77
+ position: relative;
78
+ }
79
+ .ditty-dashboard-notice.notice-info {
80
+ border-left-color: #19BF7C;
81
+ }
82
+ .ditty-dashboard-notice__close {
83
+ position: absolute;
84
+ top: 10px;
85
+ right: 10px;
86
+ display: block;
87
+ text-decoration: none;
88
+ color: #3c434a;
89
+ }
90
+ .ditty-dashboard-notice__close i {
91
+ font-size: 15px;
92
+ }
93
+ .ditty-dashboard-notice__close i:before {
94
+ vertical-align: middle;
95
+ }
96
+ .ditty-dashboard-notice .ditty-features-list {
97
+ display: flex;
98
+ flex-direction: row;
99
+ align-items: center;
100
+ justify-content: flex-start;
101
+ flex-wrap: wrap;
102
+ }
103
+ .ditty-dashboard-notice .ditty-features-list li {
104
+ display: flex;
105
+ flex-direction: row;
106
+ align-items: center;
107
+ justify-content: flex-start;
108
+ color: #FFF;
109
+ background: #19BF7C;
110
+ border-radius: 3px;
111
+ padding: 5px 10px;
112
+ margin: 0 5px 5px 0;
113
+ }
114
+ .ditty-dashboard-notice .ditty-features-list li i {
115
+ margin-right: 5px;
116
+ }
117
 
118
  .ditty-upgrade__element {
119
  display: flex;
120
  flex-direction: row;
121
  align-items: stretch;
122
  justify-content: flex-start;
123
+ flex-wrap: wrap;
124
+ }
125
  .ditty-upgrade__start {
126
  flex: 0 0 auto;
127
  border-top-right-radius: 0 !important;
128
+ border-bottom-right-radius: 0 !important;
129
+ }
130
  .ditty-upgrade__bar {
131
  flex: 1;
132
  background: #F7F7F7;
133
  border: 1px solid #c3c4c7;
134
  border-top-right-radius: 3px;
135
+ border-bottom-right-radius: 3px;
136
+ }
137
 
138
  .fusion-module-icon.ditty {
139
  width: 15px;
140
  height: 15px;
141
+ background: url("../img/d.svg");
142
+ }
143
 
144
  #menu-posts-ditty .wp-submenu {
145
  display: flex;
146
+ flex-direction: column;
147
+ }
148
+ #menu-posts-ditty .wp-submenu li {
149
+ order: 0;
150
+ }
151
+ #menu-posts-ditty .wp-submenu li.ditty_extensions, #menu-posts-ditty .wp-submenu li.ditty_settings, #menu-posts-ditty .wp-submenu li.ditty_export {
152
+ order: 5;
153
+ }
154
+ #menu-posts-ditty .wp-submenu li.ditty_news_ticker, #menu-posts-ditty .wp-submenu li.mtphr_dnt_settings {
155
+ order: 10;
156
+ }
157
 
158
  .datepicker-container {
159
  background-color: #fff;
166
  top: 0;
167
  touch-action: none;
168
  -webkit-touch-callout: none;
169
+ user-select: none;
 
 
 
170
  width: 210px;
171
+ z-index: -1;
172
+ }
173
+ .datepicker-container::before, .datepicker-container::after {
174
+ border: 5px solid transparent;
175
+ content: " ";
176
+ display: block;
177
+ height: 0;
178
+ position: absolute;
179
+ width: 0;
180
+ }
181
  .datepicker-dropdown {
182
  border: 1px solid #ccc;
183
  box-shadow: 0 3px 6px #ccc;
184
  box-sizing: content-box;
185
  position: absolute;
186
+ z-index: 1;
187
+ }
188
  .datepicker-inline {
189
+ position: static;
190
+ }
191
  .datepicker-top-left, .datepicker-top-right {
192
+ border-top-color: #39f;
193
+ }
194
+ .datepicker-top-left::before, .datepicker-top-left::after, .datepicker-top-right::before, .datepicker-top-right::after {
195
+ border-top: 0;
196
+ left: 10px;
197
+ top: -5px;
198
+ }
199
+ .datepicker-top-left::before, .datepicker-top-right::before {
200
+ border-bottom-color: #39f;
201
+ }
202
+ .datepicker-top-left::after, .datepicker-top-right::after {
203
+ border-bottom-color: #fff;
204
+ top: -4px;
205
+ }
206
  .datepicker-bottom-left, .datepicker-bottom-right {
207
+ border-bottom-color: #39f;
208
+ }
209
+ .datepicker-bottom-left::before, .datepicker-bottom-left::after, .datepicker-bottom-right::before, .datepicker-bottom-right::after {
210
+ border-bottom: 0;
211
+ bottom: -5px;
212
+ left: 10px;
213
+ }
214
+ .datepicker-bottom-left::before, .datepicker-bottom-right::before {
215
+ border-top-color: #39f;
216
+ }
217
+ .datepicker-bottom-left::after, .datepicker-bottom-right::after {
218
+ border-top-color: #fff;
219
+ bottom: -4px;
220
+ }
221
  .datepicker-top-right::before, .datepicker-top-right::after, .datepicker-bottom-right::before, .datepicker-bottom-right::after {
222
  left: auto;
223
+ right: 10px;
224
+ }
225
  .datepicker-panel > ul {
226
  margin: 0;
227
  padding: 0;
228
+ width: 102%;
229
+ }
230
+ .datepicker-panel > ul::before, .datepicker-panel > ul::after {
231
+ content: " ";
232
+ display: table;
233
+ }
234
+ .datepicker-panel > ul::after {
235
+ clear: both;
236
+ }
237
+ .datepicker-panel > ul > li {
238
+ background-color: #fff;
239
+ cursor: pointer;
240
+ float: left;
241
+ height: 30px;
242
+ list-style: none;
243
+ margin: 0;
244
+ padding: 0;
245
+ text-align: center;
246
+ width: 30px;
247
+ }
248
+ .datepicker-panel > ul > li:hover {
249
+ background-color: #e5f2ff;
250
+ }
251
+ .datepicker-panel > ul > li.muted, .datepicker-panel > ul > li.muted:hover {
252
+ color: #999;
253
+ }
254
+ .datepicker-panel > ul > li.highlighted {
255
+ background-color: #e5f2ff;
256
+ }
257
+ .datepicker-panel > ul > li.highlighted:hover {
258
+ background-color: #cce5ff;
259
+ }
260
+ .datepicker-panel > ul > li.picked, .datepicker-panel > ul > li.picked:hover {
261
+ color: #39f;
262
+ }
263
+ .datepicker-panel > ul > li.disabled, .datepicker-panel > ul > li.disabled:hover {
264
+ background-color: #fff;
265
+ color: #ccc;
266
+ cursor: default;
267
+ }
268
+ .datepicker-panel > ul > li.disabled.highlighted, .datepicker-panel > ul > li.disabled:hover.highlighted {
269
+ background-color: #e5f2ff;
270
+ }
271
+ .datepicker-panel > ul > li[data-view="years prev"], .datepicker-panel > ul > li[data-view="year prev"], .datepicker-panel > ul > li[data-view="month prev"], .datepicker-panel > ul > li[data-view="years next"], .datepicker-panel > ul > li[data-view="year next"], .datepicker-panel > ul > li[data-view="month next"], .datepicker-panel > ul > li[data-view=next] {
272
+ font-size: 18px;
273
+ }
274
+ .datepicker-panel > ul > li[data-view="years current"], .datepicker-panel > ul > li[data-view="year current"], .datepicker-panel > ul > li[data-view="month current"] {
275
+ width: 150px;
276
+ }
277
+ .datepicker-panel > ul[data-view=years] > li, .datepicker-panel > ul[data-view=months] > li {
278
+ height: 52.5px;
279
+ line-height: 52.5px;
280
+ width: 52.5px;
281
+ }
282
+ .datepicker-panel > ul[data-view=week] > li,
283
+ .datepicker-panel > ul[data-view=week] > li:hover {
284
+ background-color: #fff;
285
+ cursor: default;
286
+ }
287
  .datepicker-hide {
288
+ display: none;
289
+ }
290
 
291
  #ditty-extensions {
292
+ box-sizing: border-box;
293
+ }
294
+ #ditty-extensions * {
295
+ box-sizing: border-box;
296
+ }
297
+ #ditty-extensions .ditty-extensions-grid {
298
+ display: flex;
299
+ flex-direction: row;
300
+ align-items: flex-start;
301
+ justify-content: flex-start;
302
+ flex-wrap: wrap;
303
+ margin: -5px;
304
+ }
305
+ #ditty-extensions .ditty-extensions-group {
306
+ padding: 20px;
307
+ background: #FFF;
308
+ }
309
+ #ditty-extensions .ditty-extensions-group > h3 {
310
+ margin-top: 0;
311
+ }
312
+ #ditty-extensions .ditty-extensions-group--other {
313
+ padding: 20px;
314
+ margin-top: 40px;
315
+ background: rgba(255, 255, 255, 0.9);
316
+ border-radius: 5px;
317
+ }
318
+ #ditty-extensions .ditty-extension {
319
+ width: 100%;
320
+ padding: 5px;
321
+ }
322
+ #ditty-extensions .ditty-extension__note {
323
+ text-align: left;
324
+ padding: 10px;
325
+ border: 1px solid;
326
+ border-radius: 3px;
327
+ }
328
+ #ditty-extensions .ditty-extension__note--warning {
329
+ background: #fff8e5;
330
+ border-color: #FEBB00;
331
+ }
332
+ #ditty-extensions .ditty-extension__note--information {
333
+ background: #e5f5fa;
334
+ border-color: #159FD3;
335
+ }
336
+ #ditty-extensions .ditty-extension__contents {
337
+ height: 100%;
338
+ background: #f2f2f2;
339
+ border-radius: 5px;
340
+ overflow: hidden;
341
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
342
+ }
343
+ #ditty-extensions .ditty-extension__header {
344
+ position: relative;
345
+ display: flex;
346
+ flex-direction: row;
347
+ align-items: center;
348
+ justify-content: flex-start;
349
+ background-color: #23282E;
350
+ background-size: cover;
351
+ background-position: center center;
352
+ padding: 20px;
353
+ }
354
+ #ditty-extensions .ditty-extension__header__icon {
355
+ position: absolute;
356
+ top: 0;
357
+ left: 0;
358
+ width: 100%;
359
+ height: 100%;
360
+ display: flex;
361
+ flex-direction: row;
362
+ align-items: center;
363
+ justify-content: flex-end;
364
+ padding: 20px;
365
+ overflow: hidden;
366
+ }
367
+ #ditty-extensions .ditty-extension__header__icon i {
368
+ font-size: 260px;
369
+ color: #FFF;
370
+ transform: scale(0.8) rotate(-25deg);
371
+ transition: transform 0.5s ease;
372
+ }
373
+ #ditty-extensions .ditty-extension__header__overlay {
374
+ position: absolute;
375
+ top: 0;
376
+ left: 0;
377
+ width: 100%;
378
+ height: 100%;
379
+ background: #23282e;
380
+ backdrop-filter: blur(5px);
381
+ transition: background-color 0.5s ease;
382
+ border-top-left-radius: 5px;
383
+ border-top-right-radius: 5px;
384
+ overflow: hidden;
385
+ }
386
+ #ditty-extensions .ditty-extension__icon {
387
+ position: relative;
388
+ flex: 0 0 auto;
389
+ display: flex;
390
+ flex-direction: column;
391
+ align-items: center;
392
+ justify-content: center;
393
+ width: 80px;
394
+ height: 80px;
395
+ font-size: 40px;
396
+ line-height: 40px;
397
+ color: #FFF;
398
+ margin-right: 10px;
399
+ background: #23282E;
400
+ border-radius: 50%;
401
+ border: 4px solid #FFF;
402
+ box-sizing: content-box;
403
+ opacity: 0;
404
+ transform: translateX(-50px);
405
+ transition: transform 0.5s ease, opacity 0.25s ease;
406
+ transition-delay: 0.25s;
407
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
408
+ }
409
+ #ditty-extensions .ditty-extension__icon img {
410
+ width: 80px;
411
+ height: 80px;
412
+ border-radius: 50%;
413
+ object-fit: cover;
414
+ }
415
+ #ditty-extensions .ditty-extension__icon__small {
416
+ position: absolute;
417
+ left: -4px;
418
+ top: -4px;
419
+ display: flex;
420
+ flex-direction: column;
421
+ align-items: center;
422
+ justify-content: center;
423
+ width: 80px;
424
+ height: 80px;
425
+ font-size: 40px;
426
+ line-height: 40px;
427
+ color: #FFF;
428
+ background: #23282E;
429
+ border-radius: 50%;
430
+ border: 4px solid #FFF;
431
+ box-sizing: content-box;
432
+ transition: transform 0.75s ease, border-width 0.75s ease;
433
+ transition-delay: 0.75s;
434
+ }
435
+ #ditty-extensions .ditty-extension__title {
436
+ position: relative;
437
+ color: #FFF;
438
+ background: rgba(0, 0, 0, 0.8);
439
+ padding: 5px 10px;
440
+ border-radius: 5px;
441
+ margin: 0;
442
+ opacity: 0;
443
+ transition: opacity 1s ease;
444
+ transition-delay: 0.5s;
445
+ }
446
+ #ditty-extensions .ditty-extension__preview {
447
+ padding: 20px;
448
+ }
449
+ #ditty-extensions .ditty-extension__preview__link {
450
+ margin: 0;
451
+ }
452
+ #ditty-extensions .ditty-extension__tabs {
453
+ display: flex;
454
+ flex-direction: row;
455
+ align-items: center;
456
+ justify-content: flex-start;
457
+ background: #32373C;
458
+ padding: 5px;
459
+ }
460
+ #ditty-extensions .ditty-extension__tab {
461
+ position: relative;
462
+ display: flex;
463
+ flex-direction: column;
464
+ align-items: center;
465
+ justify-content: center;
466
+ font-weight: bold;
467
+ color: #FFF;
468
+ padding: 10px;
469
+ text-align: center;
470
+ text-decoration: none;
471
+ background-color: rgba(255, 255, 255, 0.1);
472
+ border: none;
473
+ border-radius: 3px;
474
+ transition: color 0.25s ease, background-color 0.25s ease;
475
+ margin-right: 3px;
476
+ }
477
+ #ditty-extensions .ditty-extension__tab:last-child {
478
+ margin-right: 0;
479
+ }
480
+ #ditty-extensions .ditty-extension__tab:hover {
481
+ background-color: rgba(255, 255, 255, 0.2);
482
+ }
483
+ #ditty-extensions .ditty-extension__tab.active {
484
+ background-color: #19BF7C;
485
+ }
486
+ #ditty-extensions .ditty-extension__panel {
487
+ position: relative;
488
+ }
489
+ #ditty-extensions .ditty-extension__panel__sublabel {
490
+ line-height: 1.4;
491
+ text-transform: uppercase;
492
+ margin: 0;
493
+ }
494
+ #ditty-extensions .ditty-extension__panel__label {
495
+ line-height: 1.4;
496
+ margin-top: 0;
497
+ margin-bottom: auto;
498
+ }
499
+ #ditty-extensions .ditty-extension__form {
500
+ padding: 20px;
501
+ }
502
+ #ditty-extensions .ditty-extension__form > *:first-child {
503
+ margin-top: 0;
504
+ }
505
+ #ditty-extensions .ditty-extension__form > *:last-child {
506
+ margin-bottom: 0;
507
+ }
508
+ #ditty-extensions .ditty-extension__form .ditty-field {
509
+ padding-left: 0;
510
+ padding-right: 0;
511
+ }
512
+ #ditty-extensions .ditty-extension__form .ditty-field:first-child {
513
+ padding-top: 0;
514
+ }
515
+ #ditty-extensions .ditty-extension__form .ditty-field:last-child {
516
+ padding-bottom: 0;
517
+ }
518
+ #ditty-extensions .ditty-extension__license__fields {
519
+ display: flex;
520
+ flex-direction: row;
521
+ align-items: stretch;
522
+ justify-content: flex-start;
523
+ }
524
+ #ditty-extensions .ditty-extension__license__input {
525
+ flex: 1;
526
+ min-width: 100px;
527
+ margin-right: 0;
528
+ border-right: none;
529
+ border-top-right-radius: 0 !important;
530
+ border-bottom-right-radius: 0 !important;
531
+ }
532
+ #ditty-extensions .ditty-extension__license__submit {
533
+ width: 45px;
534
+ text-align: center;
535
+ color: #FFF;
536
+ background-color: #32373C;
537
+ margin: 0;
538
+ border-bottom-left-radius: 0;
539
+ border-top-left-radius: 0;
540
+ }
541
+ #ditty-extensions .ditty-extension__license__submit:hover {
542
+ background-color: #19BF7C;
543
+ }
544
+ #ditty-extensions .ditty-extension__license__refresh {
545
+ width: 45px;
546
+ text-align: center;
547
+ color: #FFF;
548
+ background-color: #68737d;
549
+ margin: 0;
550
+ border-radius: 0;
551
+ }
552
+ #ditty-extensions .ditty-extension__license__refresh:hover {
553
+ background-color: #19BF7C;
554
+ }
555
+ #ditty-extensions .ditty-extension__license__deactivate {
556
+ width: 45px;
557
+ text-align: center;
558
+ color: #FFF;
559
+ background-color: #32373C;
560
+ margin: 0;
561
+ border-bottom-left-radius: 0;
562
+ border-top-left-radius: 0;
563
+ }
564
+ #ditty-extensions .ditty-extension__license__deactivate:hover {
565
+ background-color: #19BF7C;
566
+ }
567
+ #ditty-extensions .ditty-extension__buttons .ditty-button {
568
+ color: #FFF;
569
+ margin: 10px 0 0;
570
+ }
571
+ #ditty-extensions .ditty-extension__buttons .ditty-button:hover {
572
+ color: #FFF;
573
+ }
574
+ #ditty-extensions .ditty-extension__buttons .ditty-button:first-child {
575
+ margin-top: 0;
576
+ }
577
+ #ditty-extensions .ditty-extension__buttons .ditty-button:last-child {
578
+ margin-bottom: 0;
579
+ }
580
+ #ditty-extensions .ditty-extension__buttons:empty {
581
+ display: none;
582
+ }
583
+ #ditty-extensions .ditty-extension__license-notification, #ditty-extensions .ditty-extension__custom-keys-notification {
584
+ position: absolute;
585
+ top: 0;
586
+ left: 0;
587
+ width: 100%;
588
+ height: 100%;
589
+ display: flex;
590
+ flex-direction: row;
591
+ align-items: center;
592
+ justify-content: center;
593
+ text-align: center;
594
+ background: rgba(255, 255, 255, 0.8);
595
+ backdrop-filter: blur(5px);
596
+ padding: 20px;
597
+ }
598
+ #ditty-extensions .ditty-extension__renewal-link {
599
+ display: block;
600
+ margin-top: 5px;
601
+ }
602
+ #ditty-extensions .ditty-extension__renewal-link a {
603
+ font-weight: bold;
604
+ color: inherit;
605
+ }
606
+ #ditty-extensions .ditty-extension[data-license_status=valid] .ditty-extension__license-notification {
607
+ display: none;
608
+ }
609
+ #ditty-extensions .ditty-extension[data-license_status=valid] .ditty-extension__license__submit {
610
+ display: none;
611
+ }
612
+ #ditty-extensions .ditty-extension:not([data-license_status=valid]) .ditty-extension__license__refresh,
613
+ #ditty-extensions .ditty-extension:not([data-license_status=valid]) .ditty-extension__license__deactivate {
614
+ display: none;
615
+ }
616
+ #ditty-extensions .ditty-extension:not([data-license_status=valid])[data-api_keys=error] .ditty-extension__custom-keys-notification {
617
+ display: none;
618
+ }
619
+ #ditty-extensions .ditty-extension:not([data-api_keys=error]) .ditty-extension__custom-keys-notification {
620
+ display: none;
621
+ }
622
+ #ditty-extensions .ditty-extension[data-license_status=invalid] .ditty-extension__header__overlay, #ditty-extensions .ditty-extension[data-license_status=deactivated] .ditty-extension__header__overlay, #ditty-extensions .ditty-extension[data-license_status=error] .ditty-extension__header__overlay {
623
+ background-color: rgba(225, 54, 46, 0.5);
624
+ }
625
+ #ditty-extensions .ditty-extension[data-license_status=invalid] .ditty-extension__tab[data-slide_id=license], #ditty-extensions .ditty-extension[data-license_status=deactivated] .ditty-extension__tab[data-slide_id=license], #ditty-extensions .ditty-extension[data-license_status=error] .ditty-extension__tab[data-slide_id=license] {
626
+ background-color: #E1362E;
627
+ }
628
+ #ditty-extensions .ditty-extension[data-license_status=invalid] .ditty-extension__license__message, #ditty-extensions .ditty-extension[data-license_status=deactivated] .ditty-extension__license__message, #ditty-extensions .ditty-extension[data-license_status=error] .ditty-extension__license__message {
629
+ color: #E1362E;
630
+ }
631
+ #ditty-extensions .ditty-extension[data-api=unauthorized] .ditty-extension__tab[data-slide_id=api_connect] {
632
+ background-color: #FEBB00;
633
+ }
634
+ #ditty-extensions .ditty-extension--init .ditty-extension__header__overlay {
635
+ background: rgba(35, 40, 46, 0.5);
636
+ }
637
+ #ditty-extensions .ditty-extension--init .ditty-extension__header__icon i {
638
+ transform: scale(1) rotate(0);
639
+ }
640
+ #ditty-extensions .ditty-extension--init .ditty-extension__icon {
641
+ opacity: 1;
642
+ transform: translateX(0);
643
+ }
644
+ #ditty-extensions .ditty-extension--init .ditty-extension__icon__small {
645
+ border-width: 10px;
646
+ transform: scale(0.3) translate(-120px, -120px);
647
+ }
648
+ #ditty-extensions .ditty-extension--init .ditty-extension__title {
649
+ opacity: 1;
650
+ }
651
 
652
  @media (min-width: 600px) {
653
  #ditty-extensions .ditty-extension {
654
+ width: 50%;
655
+ }
656
+ }
657
  @media (min-width: 1200px) {
658
  #ditty-extensions .ditty-extension {
659
+ width: 33.333%;
660
+ }
661
+ }
662
  #ditty-extensions-app {
663
+ box-sizing: border-box;
664
+ }
665
+ #ditty-extensions-app * {
666
+ box-sizing: border-box;
667
+ }
668
+ #ditty-extensions-app .ditty-extensions-grid {
669
+ display: flex;
670
+ flex-direction: row;
671
+ align-items: stretch;
672
+ justify-content: flex-start;
673
+ flex-wrap: wrap;
674
+ margin: -5px;
675
+ }
676
+ #ditty-extensions-app .ditty-extensions-group {
677
+ margin: 10px 0;
678
+ }
679
+ #ditty-extensions-app .ditty-extensions-group > h3 {
680
+ margin-top: 0;
681
+ }
682
+ #ditty-extensions-app .ditty-extensions-group--other {
683
+ padding: 20px;
684
+ margin-top: 40px;
685
+ background: rgba(255, 255, 255, 0.9);
686
+ border-radius: 5px;
687
+ }
688
+ #ditty-extensions-app .ditty-extension {
689
+ width: 100%;
690
+ padding: 5px;
691
+ }
692
+ #ditty-extensions-app .ditty-extension__note {
693
+ padding: 10px;
694
+ border: 1px solid;
695
+ border-radius: 3px;
696
+ }
697
+ #ditty-extensions-app .ditty-extension__note--warning {
698
+ background: #fff8e5;
699
+ border-color: #FEBB00;
700
+ }
701
+ #ditty-extensions-app .ditty-extension__note--information {
702
+ background: #e5f5fa;
703
+ border-color: #159FD3;
704
+ }
705
+ #ditty-extensions-app .ditty-extension__contents {
706
+ height: 100%;
707
+ background: #FFF;
708
+ border-radius: 5px;
709
+ overflow: hidden;
710
+ box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
711
+ }
712
+ #ditty-extensions-app .ditty-extension__header {
713
+ position: relative;
714
+ display: flex;
715
+ flex-direction: row;
716
+ align-items: center;
717
+ justify-content: flex-start;
718
+ background-color: #23282E;
719
+ background-size: cover;
720
+ background-position: center center;
721
+ padding: 20px;
722
+ }
723
+ #ditty-extensions-app .ditty-extension__header__icon {
724
+ position: absolute;
725
+ top: 0;
726
+ left: 0;
727
+ width: 100%;
728
+ height: 100%;
729
+ display: flex;
730
+ flex-direction: row;
731
+ align-items: center;
732
+ justify-content: flex-end;
733
+ padding: 20px;
734
+ overflow: hidden;
735
+ }
736
+ #ditty-extensions-app .ditty-extension__header__icon i {
737
+ font-size: 260px;
738
+ color: #FFF;
739
+ transform: scale(0.8) rotate(-25deg);
740
+ transition: transform 0.5s ease;
741
+ }
742
+ #ditty-extensions-app .ditty-extension__header__overlay {
743
+ position: absolute;
744
+ top: 0;
745
+ left: 0;
746
+ width: 100%;
747
+ height: 100%;
748
+ background: #23282e;
749
+ backdrop-filter: blur(5px);
750
+ transition: background-color 0.5s ease;
751
+ }
752
+ #ditty-extensions-app .ditty-extension__icon {
753
+ position: relative;
754
+ flex: 0 0 auto;
755
+ display: flex;
756
+ flex-direction: column;
757
+ align-items: center;
758
+ justify-content: center;
759
+ width: 80px;
760
+ height: 80px;
761
+ font-size: 40px;
762
+ line-height: 40px;
763
+ color: #FFF;
764
+ margin-right: 10px;
765
+ background: #23282E;
766
+ border-radius: 50%;
767
+ border: 4px solid #FFF;
768
+ box-sizing: content-box;
769
+ opacity: 0;
770
+ transform: translateX(-50px);
771
+ transition: transform 0.5s ease, opacity 0.25s ease;
772
+ transition-delay: 0.25s;
773
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
774
+ }
775
+ #ditty-extensions-app .ditty-extension__icon img {
776
+ width: 80px;
777
+ height: auto;
778
+ border-radius: 50%;
779
+ }
780
+ #ditty-extensions-app .ditty-extension__icon__small {
781
+ position: absolute;
782
+ left: -4px;
783
+ top: -4px;
784
+ display: flex;
785
+ flex-direction: column;
786
+ align-items: center;
787
+ justify-content: center;
788
+ width: 80px;
789
+ height: 80px;
790
+ font-size: 40px;
791
+ line-height: 40px;
792
+ color: #FFF;
793
+ background: #23282E;
794
+ border-radius: 50%;
795
+ border: 4px solid #FFF;
796
+ box-sizing: content-box;
797
+ transition: transform 0.75s ease, border-width 0.75s ease;
798
+ transition-delay: 0.75s;
799
+ }
800
+ #ditty-extensions-app .ditty-extension__title {
801
+ position: relative;
802
+ color: #FFF;
803
+ background: rgba(0, 0, 0, 0.8);
804
+ padding: 5px 10px;
805
+ border-radius: 5px;
806
+ margin: 0;
807
+ opacity: 0;
808
+ transition: opacity 1s ease;
809
+ transition-delay: 0.5s;
810
+ }
811
+ #ditty-extensions-app .ditty-extension__preview {
812
+ padding: 20px;
813
+ }
814
+ #ditty-extensions-app .ditty-extension__preview__link {
815
+ margin: 0;
816
+ }
817
+ #ditty-extensions-app .ditty-extension__tabs {
818
+ display: flex;
819
+ flex-direction: row;
820
+ align-items: center;
821
+ justify-content: flex-start;
822
+ background: #32373C;
823
+ padding: 5px;
824
+ }
825
+ #ditty-extensions-app .ditty-extension__tab {
826
+ position: relative;
827
+ display: flex;
828
+ flex-direction: column;
829
+ align-items: center;
830
+ justify-content: center;
831
+ font-weight: bold;
832
+ color: #FFF;
833
+ padding: 10px;
834
+ text-align: center;
835
+ text-decoration: none;
836
+ background-color: rgba(255, 255, 255, 0.1);
837
+ border: none;
838
+ border-radius: 3px;
839
+ transition: color 0.25s ease, background-color 0.25s ease;
840
+ margin-right: 3px;
841
+ }
842
+ #ditty-extensions-app .ditty-extension__tab:last-child {
843
+ margin-right: 0;
844
+ }
845
+ #ditty-extensions-app .ditty-extension__tab:hover {
846
+ background-color: rgba(255, 255, 255, 0.2);
847
+ }
848
+ #ditty-extensions-app .ditty-extension__tab.active {
849
+ background-color: #19BF7C;
850
+ }
851
+ #ditty-extensions-app .ditty-extension__panels {
852
+ position: relative;
853
+ }
854
+ #ditty-extensions-app .ditty-extension__panel {
855
+ position: absolute;
856
+ top: 0;
857
+ left: 0;
858
+ width: 100%;
859
+ background: #FFF;
860
+ }
861
+ #ditty-extensions-app .ditty-extension__panel__sublabel {
862
+ line-height: 1.4;
863
+ text-transform: uppercase;
864
+ margin: 0;
865
+ }
866
+ #ditty-extensions-app .ditty-extension__panel__label {
867
+ line-height: 1.4;
868
+ margin-top: 0;
869
+ margin-bottom: auto;
870
+ }
871
+ #ditty-extensions-app .ditty-extension__form {
872
+ padding: 20px;
873
+ }
874
+ #ditty-extensions-app .ditty-extension__form > *:first-child {
875
+ margin-top: 0;
876
+ }
877
+ #ditty-extensions-app .ditty-extension__form > *:last-child {
878
+ margin-bottom: 0;
879
+ }
880
+ #ditty-extensions-app .ditty-extension__license__fields {
881
+ display: flex;
882
+ flex-direction: row;
883
+ align-items: stretch;
884
+ justify-content: flex-start;
885
+ }
886
+ #ditty-extensions-app .ditty-extension__license__input {
887
+ flex: 1;
888
+ min-width: 100px;
889
+ margin-right: 0;
890
+ border-right: none;
891
+ border-top-right-radius: 0 !important;
892
+ border-bottom-right-radius: 0 !important;
893
+ }
894
+ #ditty-extensions-app .ditty-extension__license__submit {
895
+ width: 45px;
896
+ text-align: center;
897
+ color: #FFF;
898
+ background-color: #32373C;
899
+ margin: 0;
900
+ border-bottom-left-radius: 0;
901
+ border-top-left-radius: 0;
902
+ }
903
+ #ditty-extensions-app .ditty-extension__license__submit:hover {
904
+ background-color: #19BF7C;
905
+ }
906
+ #ditty-extensions-app .ditty-extension__license__refresh {
907
+ width: 45px;
908
+ text-align: center;
909
+ color: #FFF;
910
+ background-color: #68737d;
911
+ margin: 0;
912
+ border-radius: 0;
913
+ }
914
+ #ditty-extensions-app .ditty-extension__license__refresh:hover {
915
+ background-color: #19BF7C;
916
+ }
917
+ #ditty-extensions-app .ditty-extension__license__deactivate {
918
+ width: 45px;
919
+ text-align: center;
920
+ color: #FFF;
921
+ background-color: #32373C;
922
+ margin: 0;
923
+ border-bottom-left-radius: 0;
924
+ border-top-left-radius: 0;
925
+ }
926
+ #ditty-extensions-app .ditty-extension__license__deactivate:hover {
927
+ background-color: #19BF7C;
928
+ }
929
+ #ditty-extensions-app .ditty-extension__buttons .ditty-button {
930
+ color: #FFF;
931
+ margin: 10px 0 0;
932
+ }
933
+ #ditty-extensions-app .ditty-extension__buttons .ditty-button:hover {
934
+ color: #FFF;
935
+ }
936
+ #ditty-extensions-app .ditty-extension__buttons .ditty-button:first-child {
937
+ margin-top: 0;
938
+ }
939
+ #ditty-extensions-app .ditty-extension__buttons .ditty-button:last-child {
940
+ margin-bottom: 0;
941
+ }
942
+ #ditty-extensions-app .ditty-extension__buttons:empty {
943
+ display: none;
944
+ }
945
+ #ditty-extensions-app .ditty-extension__license-notification, #ditty-extensions-app .ditty-extension__custom-keys-notification {
946
+ position: absolute;
947
+ top: 0;
948
+ left: 0;
949
+ width: 100%;
950
+ height: 100%;
951
+ display: flex;
952
+ flex-direction: row;
953
+ align-items: center;
954
+ justify-content: center;
955
+ text-align: center;
956
+ background: rgba(255, 255, 255, 0.8);
957
+ backdrop-filter: blur(5px);
958
+ padding: 20px;
959
+ }
960
+ #ditty-extensions-app .ditty-extension__renewal-link {
961
+ display: block;
962
+ margin-top: 5px;
963
+ }
964
+ #ditty-extensions-app .ditty-extension__renewal-link a {
965
+ font-weight: bold;
966
+ color: inherit;
967
+ }
968
+ #ditty-extensions-app .ditty-extension--valid .ditty-extension__license-notification {
969
+ display: none;
970
+ }
971
+ #ditty-extensions-app .ditty-extension:not([data-license_status=valid])[data-api_keys=error] .ditty-extension__custom-keys-notification {
972
+ display: none;
973
+ }
974
+ #ditty-extensions-app .ditty-extension:not([data-api_keys=error]) .ditty-extension__custom-keys-notification {
975
+ display: none;
976
+ }
977
+ #ditty-extensions-app .ditty-extension--failed .ditty-extension__header__overlay, #ditty-extensions-app .ditty-extension--invalid .ditty-extension__header__overlay, #ditty-extensions-app .ditty-extension--deactivated .ditty-extension__header__overlay {
978
+ background-color: rgba(225, 54, 46, 0.5) !important;
979
+ }
980
+ #ditty-extensions-app .ditty-extension--failed .ditty-extension__tab--license, #ditty-extensions-app .ditty-extension--invalid .ditty-extension__tab--license, #ditty-extensions-app .ditty-extension--deactivated .ditty-extension__tab--license {
981
+ background-color: #E1362E !important;
982
+ }
983
+ #ditty-extensions-app .ditty-extension--failed .ditty-extension__license__message, #ditty-extensions-app .ditty-extension--invalid .ditty-extension__license__message, #ditty-extensions-app .ditty-extension--deactivated .ditty-extension__license__message {
984
+ color: #E1362E;
985
+ }
986
+ #ditty-extensions-app .ditty-extension--unauthorized .ditty-extension__tab--api_connect {
987
+ background-color: #FEBB00;
988
+ }
989
+ #ditty-extensions-app .ditty-extension--init .ditty-extension__header__overlay {
990
+ background: rgba(35, 40, 46, 0.5);
991
+ }
992
+ #ditty-extensions-app .ditty-extension--init .ditty-extension__header__icon i {
993
+ transform: scale(1) rotate(0);
994
+ }
995
+ #ditty-extensions-app .ditty-extension--init .ditty-extension__icon {
996
+ opacity: 1;
997
+ transform: translateX(0);
998
+ }
999
+ #ditty-extensions-app .ditty-extension--init .ditty-extension__icon__small {
1000
+ border-width: 10px;
1001
+ transform: scale(0.3) translate(-120px, -120px);
1002
+ }
1003
+ #ditty-extensions-app .ditty-extension--init .ditty-extension__title {
1004
+ opacity: 1;
1005
+ }
1006
 
1007
  @media (min-width: 600px) {
1008
  #ditty-extensions-app .ditty-extension {
1009
+ width: 50%;
1010
+ }
1011
+ }
1012
  @media (min-width: 1200px) {
1013
  #ditty-extensions-app .ditty-extension {
1014
+ width: 33.333%;
1015
+ }
1016
+ }
1017
  @media (min-width: 1600px) {
1018
  #ditty-extensions-app .ditty-extension {
1019
+ width: 25%;
1020
+ }
1021
+ }
1022
  @media (min-width: 2000px) {
1023
  #ditty-extensions-app .ditty-extension {
1024
+ width: 20%;
1025
+ }
1026
+ }
1027
  #ditty-extensions .ditty-extension--instagram .ditty-extension__header,
1028
  #ditty-extensions .ditty-extension--instagram .ditty-extension__icon,
1029
  #ditty-extensions .ditty-extension--instagram .ditty-extension__icon__small,
1030
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__header,
1031
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__icon,
1032
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__icon__small {
1033
+ background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
1034
+ }
1035
  #ditty-extensions .ditty-extension--instagram .ditty-button:hover,
1036
  #ditty-extensions .ditty-extension--instagram .ditty-button--primary,
1037
  #ditty-extensions .ditty-extension--instagram .ditty-extension__tab.active,
1038
  #ditty-extensions-app .ditty-extension--instagram .ditty-button:hover,
1039
  #ditty-extensions-app .ditty-extension--instagram .ditty-button--primary,
1040
  #ditty-extensions-app .ditty-extension--instagram .ditty-extension__tab.active {
1041
+ background-color: #e1306c;
1042
+ }
1043
  #ditty-extensions .ditty-extension--images .ditty-extension__header,
1044
  #ditty-extensions .ditty-extension--images .ditty-extension__header,
1045
  #ditty-extensions .ditty-extension--images .ditty-extension__icon,
1054
  #ditty-extensions-app .ditty-extension--images .ditty-button:hover,
1055
  #ditty-extensions-app .ditty-extension--images .ditty-button--primary,
1056
  #ditty-extensions-app .ditty-extension--images .ditty-extension__tab.active {
1057
+ background-color: #39B449;
1058
+ }
1059
  #ditty-extensions .ditty-extension--facebook .ditty-extension__header,
1060
  #ditty-extensions .ditty-extension--facebook .ditty-extension__icon,
1061
  #ditty-extensions .ditty-extension--facebook .ditty-extension__icon__small,
1068
  #ditty-extensions-app .ditty-extension--facebook .ditty-button:hover,
1069
  #ditty-extensions-app .ditty-extension--facebook .ditty-button--primary,
1070
  #ditty-extensions-app .ditty-extension--facebook .ditty-extension__tab.active {
1071
+ background-color: #3b5998;
1072
+ }
1073
  #ditty-extensions .ditty-extension--rss .ditty-extension__header,
1074
  #ditty-extensions .ditty-extension--rss .ditty-extension__icon,
1075
  #ditty-extensions .ditty-extension--rss .ditty-extension__icon__small,
1082
  #ditty-extensions-app .ditty-extension--rss .ditty-button:hover,
1083
  #ditty-extensions-app .ditty-extension--rss .ditty-button--primary,
1084
  #ditty-extensions-app .ditty-extension--rss .ditty-extension__tab.active {
1085
+ background-color: #ee802f;
1086
+ }
1087
  #ditty-extensions .ditty-extension--timing .ditty-extension__header,
1088
  #ditty-extensions .ditty-extension--timing .ditty-extension__icon,
1089
  #ditty-extensions .ditty-extension--timing .ditty-extension__icon__small,
1096
  #ditty-extensions-app .ditty-extension--timing .ditty-button:hover,
1097
  #ditty-extensions-app .ditty-extension--timing .ditty-button--primary,
1098
  #ditty-extensions-app .ditty-extension--timing .ditty-extension__tab.active {
1099
+ background-color: #19BF7C;
1100
+ }
1101
  #ditty-extensions .ditty-extension--twitter .ditty-extension__header,
1102
  #ditty-extensions .ditty-extension--twitter .ditty-extension__icon,
1103
  #ditty-extensions .ditty-extension--twitter .ditty-extension__icon__small,
1110
  #ditty-extensions-app .ditty-extension--twitter .ditty-button:hover,
1111
  #ditty-extensions-app .ditty-extension--twitter .ditty-button--primary,
1112
  #ditty-extensions-app .ditty-extension--twitter .ditty-extension__tab.active {
1113
+ background-color: #1DA1F2;
1114
+ }
1115
  #ditty-extensions .ditty-extension--posts .ditty-extension__header,
1116
  #ditty-extensions .ditty-extension--posts .ditty-extension__icon,
1117
  #ditty-extensions .ditty-extension--posts .ditty-extension__icon__small,
1124
  #ditty-extensions-app .ditty-extension--posts .ditty-button:hover,
1125
  #ditty-extensions-app .ditty-extension--posts .ditty-button--primary,
1126
  #ditty-extensions-app .ditty-extension--posts .ditty-extension__tab.active {
1127
+ background-color: #21759b;
1128
+ }
1129
 
1130
  #ditty-layout-html .inside,
1131
  #ditty-layout-html .ditty-field,
1132
  #ditty-layout-css .inside,
1133
  #ditty-layout-css .ditty-field {
1134
  padding: 0;
1135
+ margin: 0;
1136
+ }
1137
+ #ditty-layout-html .inside__input,
1138
+ #ditty-layout-html .ditty-field__input,
1139
+ #ditty-layout-css .inside__input,
1140
+ #ditty-layout-css .ditty-field__input {
1141
+ margin: 0;
1142
+ }
1143
  #ditty-layout-html .CodeMirror,
1144
  #ditty-layout-css .CodeMirror {
1145
+ resize: vertical;
1146
+ }
1147
 
1148
  #ditty-page {
1149
  width: 1200px;
1150
+ max-width: calc(100% - 20px);
1151
  border-radius: 5px;
1152
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
1153
  margin-top: 22px;
1154
+ overflow: hidden;
1155
+ }
1156
+ #ditty-page__header {
1157
+ box-sizing: border-box;
1158
+ padding: 20px;
1159
+ background: #FFF;
1160
+ overflow: hidden;
1161
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
1162
+ }
1163
+ #ditty-page__version {
1164
+ margin-bottom: 20px;
1165
+ }
1166
+ #ditty-page__title {
1167
+ font-weight: bold;
1168
+ }
1169
+ #ditty-page__logo__image {
1170
+ display: block;
1171
+ line-height: 0;
1172
+ width: 200px;
1173
+ height: auto;
1174
+ }
1175
+ #ditty-page__content {
1176
+ box-sizing: border-box;
1177
+ width: 1200px;
1178
+ max-width: 100%;
1179
+ margin: 0 auto;
1180
+ }
1181
+ #ditty-page__content hr {
1182
+ margin: 40px 0;
1183
+ }
1184
 
1185
  @media screen and (max-width: 782px) {
1186
  #ditty-page {
1187
+ max-width: calc(100% - 10px);
1188
+ margin-top: 10px;
1189
+ }
1190
+ }
1191
  #ditty-settings {
1192
  display: flex;
1193
  flex-direction: row;
1194
  align-items: stretch;
1195
+ justify-content: flex-start;
1196
+ }
1197
+ #ditty-settings.updating .ditty-updating-overlay {
1198
+ display: block;
1199
+ }
1200
 
1201
  .ditty-settings__header, .ditty-settings__footer {
1202
  display: flex;
1203
  flex-direction: row;
1204
  align-items: center;
1205
  justify-content: flex-end;
1206
+ padding: 20px;
1207
+ }
1208
+ .ditty-settings__header .ditty-button, .ditty-settings__footer .ditty-button {
1209
+ margin: 0;
1210
+ }
1211
  .ditty-settings__header {
1212
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
1213
+ }
1214
  .ditty-settings__footer {
1215
+ border-top: 1px solid rgba(0, 0, 0, 0.05);
1216
+ }
1217
  .ditty-settings__tabs {
1218
  display: flex;
1219
  flex-direction: column;
1222
  width: 250px;
1223
  background: #32373C;
1224
  padding-top: 1em !important;
1225
+ padding-bottom: 1em !important;
1226
+ }
1227
  .ditty-settings__tab {
1228
  box-sizing: border-box;
1229
  position: relative;
1239
  text-align: center;
1240
  text-decoration: none;
1241
  background-color: #32373C;
1242
+ border: none;
1243
+ }
1244
+ .ditty-settings__tab i {
1245
+ position: absolute;
1246
+ top: 10px;
1247
+ display: block;
1248
+ font-size: 14px;
1249
+ width: 14px;
1250
+ }
1251
+ .ditty-settings__tab svg {
1252
+ position: absolute;
1253
+ top: 10px;
1254
+ display: block;
1255
+ width: 14px;
1256
+ }
1257
+ .ditty-settings__tab span {
1258
+ display: block;
1259
+ padding-left: 30px;
1260
+ }
1261
+ .ditty-settings__tab:focus {
1262
+ color: #FFF;
1263
+ outline: none;
1264
+ box-shadow: none;
1265
+ }
1266
+ .ditty-settings__tab:active {
1267
+ color: #FFF;
1268
+ outline: none;
1269
+ box-shadow: none;
1270
+ }
1271
+ .ditty-settings__tab:not(.active):hover {
1272
+ color: #19BF7C;
1273
+ background-color: rgba(0, 0, 0, 0.5);
1274
+ }
1275
+ .ditty-settings__tab.active {
1276
+ background-color: #19BF7C;
1277
+ }
1278
+ .ditty-settings__tab.active:hover {
1279
+ color: #FFF;
1280
+ }
1281
+ .ditty-settings__tab.active:after {
1282
+ right: 0;
1283
+ border: 9px solid transparent;
1284
+ content: " ";
1285
+ height: 0;
1286
+ width: 0;
1287
+ position: absolute;
1288
+ pointer-events: none;
1289
+ border-right-color: #fff;
1290
+ top: 50%;
1291
+ margin-top: -8px;
1292
+ }
1293
  .ditty-settings__panel {
1294
+ display: none;
1295
+ }
1296
+ .ditty-settings__panel > .ditty-field {
1297
+ padding: 25px 30px;
1298
+ }
1299
  .ditty-settings__form {
1300
  position: relative;
1301
  flex: 1;
1302
+ background: #FFF;
1303
+ }
1304
  .ditty-settings__save.has-updates {
1305
+ background-color: orange;
1306
+ }
1307
 
1308
  /* Default Layouts Variations */
1309
  .ditty-field--layout_variation_defaults > .ditty-field__heading {
1310
+ display: none;
1311
+ }
1312
 
1313
  .ditty-field--variation_defaults .ditty-input--group .ditty-field {
1314
  display: flex;
1315
  flex-direction: row;
1316
  align-items: flex-start;
1317
+ justify-content: flex-start;
1318
+ }
1319
+ .ditty-field--variation_defaults .ditty-input--group .ditty-field .ditty-field__heading {
1320
+ flex: 0 0 200px;
1321
+ margin-right: 30px;
1322
+ }
1323
+ .ditty-field--variation_defaults .ditty-input--group .ditty-field .ditty-field__input__container {
1324
+ width: 100%;
1325
+ }
1326
+ .ditty-field--variation_defaults .ditty-input--group .ditty-field .ditty-field__input {
1327
+ margin: 0;
1328
+ }
1329
 
1330
  /* Default Layouts & Displays */
1331
  .ditty-field--layout_templates > .ditty-field__heading,
1332
  .ditty-field--display_templates > .ditty-field__heading {
1333
+ display: none;
1334
+ }
1335
  .ditty-field--layout_templates .ditty-templates-list__type,
1336
  .ditty-field--display_templates .ditty-templates-list__type {
1337
+ margin-bottom: 30px;
1338
+ }
1339
+ .ditty-field--layout_templates .ditty-templates-list__type h3,
1340
+ .ditty-field--display_templates .ditty-templates-list__type h3 {
1341
+ font-size: 1.2em;
1342
+ margin: 0 0 10px;
1343
+ }
1344
  .ditty-field--layout_templates .ditty-templates-list__template,
1345
  .ditty-field--display_templates .ditty-templates-list__template {
1346
  display: flex;
1349
  justify-content: space-between;
1350
  padding: 10px;
1351
  background: #F2F2F2;
1352
+ border-radius: 3px;
1353
+ }
1354
+ .ditty-field--layout_templates .ditty-templates-list__template h4,
1355
+ .ditty-field--display_templates .ditty-templates-list__template h4 {
1356
+ font-size: 1.1em;
1357
+ margin: 0 0 3px;
1358
+ }
1359
+ .ditty-field--layout_templates .ditty-templates-list__template p,
1360
+ .ditty-field--display_templates .ditty-templates-list__template p {
1361
+ margin: 0;
1362
+ }
1363
+ .ditty-field--layout_templates .ditty-templates-list__template .ditty-button,
1364
+ .ditty-field--display_templates .ditty-templates-list__template .ditty-button {
1365
+ margin: 0;
1366
+ }
1367
+ .ditty-field--layout_templates .ditty-templates-list__template .ditty-button i,
1368
+ .ditty-field--display_templates .ditty-templates-list__template .ditty-button i {
1369
+ margin-left: 10px;
1370
+ }
1371
 
1372
  /* Global Dittys */
1373
  .ditty-field--global_ditty .ditty-input--clone {
1374
+ margin-bottom: 5px;
1375
+ }
1376
  .ditty-field--global_ditty .ditty-field-type--group-child {
1377
+ width: 100%;
1378
+ }
1379
 
1380
  @media (max-width: 600px) {
1381
  .ditty-settings__tabs {
1382
  width: 44px;
1383
+ flex: 0 0 44px;
1384
+ }
1385
  .ditty-settings__tab {
1386
  padding: 10px 4px 10px 14px;
1387
+ width: auto;
1388
+ }
1389
+ .ditty-settings__tab span {
1390
+ display: none;
1391
+ }
1392
  .ditty-settings__panel > .ditty-field {
1393
  padding-left: 20px;
1394
+ padding-right: 20px;
1395
+ }
1396
+ }
1397
  @media (min-width: 500px) {
1398
  /* Global Dittys */
1399
  .ditty-field--global_ditty .ditty-field--selector {
1400
+ width: 60%;
1401
+ }
1402
  .ditty-field--global_ditty .ditty-field--position {
1403
+ width: 40%;
1404
+ }
1405
  .ditty-field--global_ditty .ditty-field--ditty,
1406
+ .ditty-field--global_ditty .ditty-field--display {
1407
+ width: 50%;
1408
+ }
1409
  .ditty-field--global_ditty .ditty-field--custom_id {
1410
+ width: 40%;
1411
+ }
1412
  .ditty-field--global_ditty .ditty-field--custom_classes {
1413
+ width: 60%;
1414
+ }
1415
+ }
1416
  @media (min-width: 1000px) {
1417
  .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) {
1418
  display: flex;
1419
  flex-direction: row;
1420
  align-items: flex-start;
1421
+ justify-content: flex-start;
1422
+ }
1423
+ .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__heading {
1424
+ flex: 0 0 50%;
1425
+ padding-right: 60px;
1426
+ }
1427
+ .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__heading > .ditty-field__label,
1428
+ .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__heading > .ditty-field__description {
1429
+ margin-bottom: 0;
1430
+ }
1431
+ .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__input__container {
1432
+ width: 100%;
1433
+ }
1434
+ .ditty-settings__panel:not(.ditty-settings__panel--global_ditty) > .ditty-field:not(.ditty-field-heading--top) > .ditty-field__input__container > .ditty-field__input {
1435
+ margin-top: 0;
1436
+ }
1437
+ }
1438
  /* Post import/exports */
1439
  .ditty-import-button i,
1440
  .ditty-export-button i {
1441
+ display: none;
1442
+ }
1443
 
1444
  .ditty-input--checkboxes__option--select_all {
1445
  width: 100%;
1446
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
1447
  padding-bottom: 10px;
1448
+ margin-bottom: 10px !important;
1449
+ }
1450
+
1451
+ .ditty-data-list__item__label small {
1452
+ margin-left: 5px;
1453
+ }
1454
 
1455
  .ditty-section {
1456
  background: #FFF;
1457
+ padding: 40px;
1458
+ }
1459
+ .ditty-section--intro {
1460
+ color: #FFF;
1461
+ text-align: center;
1462
+ background: #1D2327;
1463
+ }
1464
+ .ditty-section--intro p {
1465
+ font-weight: 300;
1466
+ }
1467
 
1468
  .ditty-row {
1469
  display: flex;
1473
  flex-wrap: wrap;
1474
  box-sizing: border-box;
1475
  margin-left: -20px;
1476
+ margin-right: -20px;
1477
+ }
1478
 
1479
  .ditty-column {
1480
  width: 100%;
1481
  padding: 0 20px;
1482
+ box-sizing: border-box;
1483
+ }
1484
 
1485
  .ditty-container {
1486
+ margin-bottom: 30px;
1487
+ }
1488
+ .ditty-container--details {
1489
+ display: flex;
1490
+ flex-direction: row;
1491
+ align-items: flex-start;
1492
+ justify-content: flex-start;
1493
+ }
1494
+ .ditty-container--details i {
1495
+ flex: 0 0 auto;
1496
+ width: 35px;
1497
+ font-size: 30px;
1498
+ line-height: 30px;
1499
+ margin-right: 10px;
1500
+ }
1501
+ .ditty-container--details__content {
1502
+ flex: 1;
1503
+ }
1504
+ .ditty-container--details h3 {
1505
+ margin-top: 0;
1506
+ margin-bottom: 5px;
1507
+ }
1508
+ .ditty-container--details p {
1509
+ margin-top: 5px;
1510
+ }
1511
 
1512
  @media (min-width: 651px) {
1513
  .ditty-column--1_2 {
1514
+ width: 50%;
1515
+ }
1516
+ }
1517
  .ditty-header {
1518
  color: #FFF;
1519
  background: #1ABF7D;
1520
+ margin-left: -20px;
1521
+ }
1522
+ .ditty-header__wrapper {
1523
+ align-items: center;
1524
+ display: flex;
1525
+ flex-wrap: wrap;
1526
+ justify-content: space-between;
1527
+ transition: padding 0.3s ease;
1528
+ margin-left: auto;
1529
+ margin-right: auto;
1530
+ padding: 1.5rem;
1531
+ padding-bottom: 1.375rem;
1532
+ padding-top: 1.375rem;
1533
+ }
1534
+ .ditty-header svg {
1535
+ width: 100px;
1536
+ }
1537
 
1538
  .ditty-page__contents {
1539
+ padding: 20px;
1540
+ }
1541
  .ditty-page__header h2 {
1542
  font-size: 23px;
1543
  line-height: 30px;
1544
  font-weight: 400;
1545
  color: #FFF;
1546
+ margin: 0;
1547
+ }
1548
 
1549
  @media only screen and (max-width: 960px) {
1550
  .ditty-header {
1551
+ margin-left: -20px;
1552
+ }
1553
+ }
1554
  @media screen and (max-width: 782px) {
1555
  .ditty-header {
1556
+ margin-left: -10px;
1557
+ }
1558
+ }
1559
  .ditty-import__group {
1560
+ margin-bottom: 40px;
1561
+ }
1562
  .ditty-field--ditty_new_import_button .ditty-button {
1563
  display: inline-block;
1564
+ width: auto;
1565
+ }
1566
 
1567
  .wp-admin.post-new-php.post-type-ditty.ditty-wizard-enabled .wp-heading-inline,
1568
  .wp-admin.post-new-php.post-type-ditty.ditty-wizard-enabled .wp-header-end {
1569
+ display: none;
1570
+ }
1571
 
1572
  #ditty-page.ditty-wizard #ditty-page__header {
1573
  display: flex;
1574
  flex-direction: column;
1575
  align-items: flex-start;
1576
+ justify-content: flex-start;
1577
+ }
1578
+ #ditty-page.ditty-wizard input[name=ditty_title] {
1579
  width: 100%;
1580
  height: 52px;
1581
  font-size: 1.3em;
1582
  font-weight: 600;
1583
  color: #1d2327;
1584
+ border-color: #e0e3e7;
1585
+ }
1586
 
1587
  .ditty-wizard-header * {
1588
+ box-sizing: border-box;
1589
+ }
1590
  .ditty-wizard-header__contents ul {
1591
  display: flex;
1592
  flex-direction: row;
1593
  align-items: center;
1594
  justify-content: flex-start;
1595
+ gap: 5px;
1596
+ }
1597
+ .ditty-wizard-header__contents ul li {
1598
+ padding: 10px;
1599
+ border: 1px solid #e0e3e7;
1600
+ border-radius: 3px;
1601
+ }
1602
 
1603
  .ditty-instruction-number {
1604
  flex: 0 0 auto;
1610
  justify-content: center;
1611
  border: 2px solid #e0e3e7;
1612
  border-radius: 50%;
1613
+ margin-right: 15px;
1614
+ }
1615
+ .ditty-instruction-number span {
1616
+ font-size: 20px;
1617
+ line-height: 20px;
1618
+ font-weight: bold;
1619
+ color: #e0e3e7;
1620
+ }
1621
 
1622
  .ditty-wizard-setting {
1623
  position: relative;
1627
  justify-content: flex-start;
1628
  background: #FFF;
1629
  border-bottom: 1px solid #f7f7f7;
1630
+ padding: 20px;
1631
+ }
1632
+ .ditty-wizard-setting .ditty-wizard-setting__content {
1633
+ flex: 1;
1634
+ }
1635
+ .ditty-wizard-setting:hover {
1636
+ background: #f7f7f7;
1637
+ }
1638
+ .ditty-wizard-setting:hover .ditty-instruction-number {
1639
+ border-color: #19BF7C;
1640
+ }
1641
+ .ditty-wizard-setting:hover .ditty-instruction-number span {
1642
+ color: #19BF7C;
1643
+ }
1644
+ .ditty-wizard-setting.complete .ditty-instruction-number {
1645
+ background-color: #19BF7C;
1646
+ border-color: #19BF7C;
1647
+ }
1648
+ .ditty-wizard-setting.complete .ditty-instruction-number span {
1649
+ color: #FFF;
1650
+ }
1651
+ .ditty-wizard-setting__title {
1652
+ margin: 0 0 5px;
1653
+ }
1654
+ .ditty-wizard-setting__description {
1655
+ margin: 5px 0 15px;
1656
+ }
1657
+ .ditty-wizard-setting--title input {
1658
+ width: 100%;
1659
+ padding-left: 15px;
1660
+ padding-right: 15px;
1661
+ }
1662
+ .ditty-wizard-setting--item-type, .ditty-wizard-setting--item-type-settings, .ditty-wizard-setting--layout, .ditty-wizard-setting--display, .ditty-wizard-setting--submit {
1663
+ display: none;
1664
+ }
1665
+ .ditty-wizard-setting--layout .ditty-option-grid__item {
1666
+ width: 250px;
1667
+ padding-bottom: 30px;
1668
+ }
1669
+ .ditty-wizard-setting--layout__variation {
1670
+ display: none;
1671
+ padding: 20px;
1672
+ border: 1px solid #e0e3e7;
1673
+ border-radius: 3px;
1674
+ margin-top: 15px;
1675
+ }
1676
+ .ditty-wizard-setting--layout__variation__title {
1677
+ margin: 0;
1678
+ }
1679
+ .ditty-wizard-setting--layout__variation .ditty-option-grid {
1680
+ margin-top: 15px;
1681
+ }
1682
+ .ditty-wizard-setting--display .ditty-option-grid__item {
1683
+ width: 250px;
1684
+ padding-bottom: 30px;
1685
+ }
1686
+ .ditty-wizard-setting--display .ditty-option-grid__item__title {
1687
+ margin-bottom: 0;
1688
+ }
1689
+ .ditty-wizard-setting--submit {
1690
+ justify-content: flex-end;
1691
+ padding-top: 20px;
1692
+ padding-bottom: 10px;
1693
+ border-top: 1px solid rgba(0, 0, 0, 0.05);
1694
+ }
1695
+ .ditty-wizard-setting--submit .ditty-button {
1696
+ margin: 0;
1697
+ }
1698
 
1699
  .ditty-option-grid {
1700
  display: flex;
1702
  align-items: stretch;
1703
  justify-content: flex-start;
1704
  flex-wrap: wrap;
1705
+ gap: 5px;
1706
+ }
1707
+ .ditty-option-grid__item {
1708
+ position: relative;
1709
+ display: flex;
1710
+ flex-direction: column;
1711
+ align-items: center;
1712
+ justify-content: flex-start;
1713
+ box-sizing: border-box;
1714
+ font-size: 12px;
1715
+ line-height: 18px;
1716
+ text-align: center;
1717
+ color: #3c434a;
1718
+ padding: 20px;
1719
+ background: #FFF;
1720
+ border: 2px solid #e0e3e7;
1721
+ border-radius: 3px;
1722
+ width: 200px;
1723
+ transition: border-color 0.25s ease, background-color 0.25s ease;
1724
+ -webkit-appearance: none;
1725
+ }
1726
+ .ditty-option-grid__item i {
1727
+ font-size: 30px;
1728
+ line-height: 30px;
1729
+ transition: color 0.25s ease;
1730
+ }
1731
+ .ditty-option-grid__item__title {
1732
+ font-size: 14px;
1733
+ line-height: 18px;
1734
+ margin: 15px 0 5px;
1735
+ }
1736
+ .ditty-option-grid__item__description {
1737
+ display: none;
1738
+ color: #93999f;
1739
+ }
1740
+ .ditty-option-grid__item__id {
1741
+ position: absolute;
1742
+ bottom: 2px;
1743
+ left: 5px;
1744
+ color: #93999f;
1745
+ }
1746
+ .ditty-option-grid__item__date {
1747
+ position: absolute;
1748
+ bottom: 2px;
1749
+ right: 5px;
1750
+ color: #93999f;
1751
+ }
1752
+ .ditty-option-grid__item:not(.active) {
1753
+ cursor: pointer;
1754
+ }
1755
+ .ditty-option-grid__item:not(.active):hover {
1756
+ border-color: #c2c9d0;
1757
+ }
1758
+ .ditty-option-grid__item.active {
1759
+ background-color: #EDF8ED;
1760
+ border-color: #19BF7C;
1761
+ }
1762
+ .ditty-option-grid__item.active .ditty-option-grid__item__description {
1763
+ display: block;
1764
+ }
1765
 
1766
  .ditty-option-list {
1767
  display: flex;
1769
  align-items: flex;
1770
  justify-content: flex-start;
1771
  flex-wrap: wrap;
1772
+ gap: 5px;
1773
+ }
1774
+ .ditty-option-list__item {
1775
+ display: flex;
1776
+ flex-direction: column;
1777
+ align-items: flex-start;
1778
+ justify-content: flex-start;
1779
+ box-sizing: border-box;
1780
+ font-size: 12px;
1781
+ line-height: 18px;
1782
+ text-align: left;
1783
+ color: #3c434a;
1784
+ padding: 5px 10px;
1785
+ background: #FFF;
1786
+ border: 2px solid #e0e3e7;
1787
+ border-radius: 3px;
1788
+ min-width: 150px;
1789
+ transition: border-color 0.25s ease, background-color 0.25s ease;
1790
+ -webkit-appearance: none;
1791
+ }
1792
+ .ditty-option-list__item__title {
1793
+ font-size: 14px;
1794
+ line-height: 18px;
1795
+ margin: 0;
1796
+ transition: color 0.25s ease;
1797
+ }
1798
+ .ditty-option-list__item__description {
1799
+ color: #93999f;
1800
+ transition: color 0.25s ease;
1801
+ margin: 0;
1802
+ }
1803
+ .ditty-option-list__item__date {
1804
+ font-size: 11px;
1805
+ color: #93999f;
1806
+ transition: color 0.25s ease;
1807
+ margin: 0;
1808
+ }
1809
+ .ditty-option-list__item:not(.active) {
1810
+ cursor: pointer;
1811
+ }
1812
+ .ditty-option-list__item:not(.active):hover {
1813
+ border-color: #c2c9d0;
1814
+ }
1815
+ .ditty-option-list__item.active {
1816
+ background-color: #EDF8ED;
1817
+ border-color: #19BF7C;
1818
+ }
1819
+ .ditty-option-list__item.active .ditty-option-grid__item__description {
1820
+ display: block;
1821
+ }
1822
 
1823
  body.rtl #ditty-editor .ditty-editor__tab span {
1824
  padding-left: 0;
1825
+ padding-right: 20px;
1826
+ }
1827
  body.rtl .ditty-data-list__filter i {
1828
  margin-right: 0;
1829
+ margin-left: 5px;
1830
+ }
1831
  body.rtl .ditty-editor-options__buttons--start a:not(.ditty-button), body.rtl .ditty-editor-options__buttons--start button:not(.ditty-button) {
1832
  margin-right: 0;
1833
+ margin-left: 5px;
1834
+ }
1835
  body.rtl .ditty-editor-options__buttons--end a:not(.ditty-button), body.rtl .ditty-editor-options__buttons--end button:not(.ditty-button) {
1836
  margin-left: 0;
1837
+ margin-right: 5px;
1838
+ }
1839
  body.rtl .ditty-data-list__item {
1840
  padding-right: 0;
1841
+ padding-left: 8px;
1842
+ }
1843
+ body.rtl .ditty-data-list__item__label {
1844
+ padding-right: 0;
1845
+ padding-left: 5px;
1846
+ margin-right: 0;
1847
+ margin-left: auto;
1848
+ }
1849
+ body.rtl .ditty-data-list__item__label small {
1850
+ margin-left: 0;
1851
+ margin-right: 5px;
1852
+ }
1853
  body.rtl .ditty-layout-variation {
1854
+ padding: 5px 10px 0 8px;
1855
+ }
1856
  body.rtl .ditty-editor__panel--items .ditty-data-list__item a.ditty-data-list__item__icon {
1857
  border-right: none;
1858
  border-left: 1px solid rgba(0, 0, 0, 0.05);
1859
  margin-right: 0;
1860
+ margin-left: 10px;
1861
+ }
1862
  body.rtl .ditty-field-type--checkbox .ditty-field__input__primary label {
1863
  margin-left: 0;
1864
+ margin-right: 7px;
1865
+ }
1866
  body.rtl .ditty-field-type--radio .ditty-input--radio__option label {
1867
  margin-left: 0;
1868
+ margin-right: 7px;
1869
+ }
1870
  body.rtl .ditty-field-type--radio .ditty-input--radio--inline .ditty-input--radio__option {
1871
  margin-right: 0;
1872
+ margin-left: 15px;
1873
+ }
1874
+ body.rtl .ditty-field-type--color input[type=text] {
1875
  padding-left: 1px !important;
1876
+ padding-right: 40px !important;
1877
+ }
includes/fields/ditty-field.php CHANGED
@@ -319,7 +319,7 @@ class Ditty_Field {
319
  'type' => 'text',
320
  'class' => ( $this->args['input_class'] ) ? $this->args['input_class'] : false,
321
  'placeholder' => ( $this->args['placeholder'] ) ? $this->args['placeholder'] : false,
322
- 'value' => $std,
323
  );
324
  if ( is_array( $this->args['atts'] ) && count( $this->args['atts'] ) > 0 ) {
325
  foreach ( $this->args['atts'] as $key => $value ) {
319
  'type' => 'text',
320
  'class' => ( $this->args['input_class'] ) ? $this->args['input_class'] : false,
321
  'placeholder' => ( $this->args['placeholder'] ) ? $this->args['placeholder'] : false,
322
+ 'value' => htmlspecialchars( $std ),
323
  );
324
  if ( is_array( $this->args['atts'] ) && count( $this->args['atts'] ) > 0 ) {
325
  foreach ( $this->args['atts'] as $key => $value ) {
includes/js/ditty-editor-hooks.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function($){!function(){"use strict";function i(i,t){0===parseInt(t)?i.hide():i.show()}function t(i,t){"none"===t?i.hide():i.show()}function n(i,t){"none"===t?i.hide():i.show()}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(e,d){if("list"===d.displayType){var o=d.$form,f=o.find(".ditty-field--perPage"),l=o.find(".ditty-field--arrows").siblings(),a=o.find(".ditty-field--bullets").siblings();i(f,o.find('input[name="paging"]:checked').val()),o.find('input[name="paging"]').on("change",(function(){i(f,$(this).val())})),t(l,o.find('select[name="arrows"]').val()),o.find('select[name="arrows"]').on("change",(function(){t(l,$(this).val())})),n(a,o.find('select[name="bullets"]').val()),o.find('select[name="bullets"]').on("change",(function(){n(a,$(this).val())}))}}))}()})),jQuery((function($){!function(){"use strict";function i(i,t){var n=i.find('input[name="direction"]:checked').val(),e=i.find(".ditty-field--minHeight"),d=i.find(".ditty-field--maxHeight"),o=i.find('input[name="minHeight"]');if("down"===n||"up"===n){if(e.show(),d.show(),""===o.val()){var f="300px";o.val(f),t.options("minHeight",f)}}else e.hide(),d.hide()}function t(i){"filled"===i.find('input[name="scrollInit"]:checked').val()?i.find(".ditty-field--scrollDelay").show():i.find(".ditty-field--scrollDelay").hide()}function n(i){"no"===i.find('input[name="cloneItems"]:checked').val()?i.find(".ditty-field--wrapItems").show():i.find(".ditty-field--wrapItems").hide()}function e(i){var t=i.find('select[name="titleDisplay"]').val(),n=i.find(".ditty-field--titleDisplay");"none"===t?n.siblings().hide():n.siblings().show()}function d(d,o){i(d,o),d.find('input[name="direction"]').on("click",(function(){i(d,o)})),t(d),d.find('input[name="scrollInit"]').on("click",(function(){t(d)})),n(d),d.find('input[name="cloneItems"]').on("click",(function(){n(d)})),e(d),d.find('select[name="titleDisplay"]').on("change",(function(){e(d)}))}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(i,t){if("ticker"===t.displayType){var n=t.$form,e=n.parents("#ditty-editor__settings")[0];d(n,e._ditty_editor.ditty)}})),$(".ditty-sandbox").on("ditty_sandbox_init",(function(i,t,n){"ticker"===t.displayType&&d($(this).find("form"),n)}))}()})),jQuery((function($){!function(){"use strict";function i(i){"full"===i.find('input[name="content_display"]:checked').val()?(i.find(".ditty-field--more_link").hide(),i.find(".ditty-field--excerpt_length").hide(),i.find(".ditty-field--more").hide(),i.find(".ditty-field--more_before").hide(),i.find(".ditty-field--more_after").hide()):(i.find(".ditty-field--more_link").show(),i.find(".ditty-field--excerpt_length").show(),i.find(".ditty-field--more").show(),i.find(".ditty-field--more_before").show(),i.find(".ditty-field--more_after").show())}$("#ditty-editor").on("ditty_item_editor_panel_init",".ditty-editor__panel--item_editor",(function(t,n){if("posts_feed"!==n.itemType&&"post"!==n.itemType)return!1;var e=n.$form;i(e),e.on("click",'input[name="content_display"]',(function(){i(e)}))}))}()}));
1
+ jQuery((function($){!function(){"use strict";function i(i,t){0===parseInt(t)?i.hide():i.show()}function t(i,t){"none"===t?i.hide():i.show()}function n(i,t){"none"===t?i.hide():i.show()}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(e,d){if("list"===d.displayType){var o=d.$form,f=o.find(".ditty-field--perPage"),l=o.find(".ditty-field--arrows").siblings(),s=o.find(".ditty-field--bullets").siblings();i(f,o.find('input[name="paging"]:checked').val()),o.find('input[name="paging"]').on("change",(function(){i(f,$(this).val())})),t(l,o.find('select[name="arrows"]').val()),o.find('select[name="arrows"]').on("change",(function(){t(l,$(this).val())})),n(s,o.find('select[name="bullets"]').val()),o.find('select[name="bullets"]').on("change",(function(){n(s,$(this).val())}))}}))}()})),jQuery((function($){!function(){"use strict";function i(i,t){var n=i.find('input[name="direction"]:checked').val(),e=i.find(".ditty-field--minHeight"),d=i.find(".ditty-field--maxHeight"),o=i.find('input[name="minHeight"]');if("down"===n||"up"===n){if(e.show(),d.show(),""===o.val()){var f="300px";o.val(f),t.options("minHeight",f)}}else e.hide(),d.hide()}function t(i){"filled"===i.find('input[name="scrollInit"]:checked').val()?i.find(".ditty-field--scrollDelay").show():i.find(".ditty-field--scrollDelay").hide()}function n(i){"no"===i.find('input[name="cloneItems"]:checked').val()?i.find(".ditty-field--wrapItems").show():i.find(".ditty-field--wrapItems").hide()}function e(i){var t=i.find('select[name="titleDisplay"]').val(),n=i.find(".ditty-field--titleDisplay");"none"===t?n.siblings().hide():n.siblings().show()}function d(d,o){i(d,o),d.find('input[name="direction"]').on("click",(function(){i(d,o)})),t(d),d.find('input[name="scrollInit"]').on("click",(function(){t(d)})),n(d),d.find('input[name="cloneItems"]').on("click",(function(){n(d)})),e(d),d.find('select[name="titleDisplay"]').on("change",(function(){e(d)}))}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(i,t){if("ticker"===t.displayType){var n=t.$form,e=n.parents("#ditty-editor__settings")[0];d(n,e._ditty_editor.ditty)}})),$(".ditty-sandbox").on("ditty_sandbox_init",(function(i,t,n){"ticker"===t.displayType&&d($(this).find("form"),n)}))}()})),jQuery((function($){!function(){"use strict";function i(i){"full"===i.find('input[name="content_display"]:checked').val()?(i.find(".ditty-field--excerpt_length").hide(),i.find(".ditty-field--excerpt_element").hide(),i.find(".ditty-field--more").hide(),i.find(".ditty-field--more_before").hide(),i.find(".ditty-field--more_after").hide(),i.find(".ditty-field--more_link").hide()):(i.find(".ditty-field--excerpt_length").show(),i.find(".ditty-field--excerpt_element").show(),i.find(".ditty-field--more").show(),i.find(".ditty-field--more_before").show(),i.find(".ditty-field--more_after").show(),i.find(".ditty-field--more_link").show())}$("#ditty-editor").on("ditty_item_editor_panel_init",".ditty-editor__panel--item_editor",(function(t,n){if("posts_feed"!==n.itemType&&"post"!==n.itemType)return!1;var e=n.$form;i(e),e.on("click",'input[name="content_display"]',(function(){i(e)}))}))}()}));
includes/js/ditty-editor.min.js CHANGED
@@ -1,3 +1,3 @@
1
  function dittyEditorInit(t){if(!t)return!1;jQuery("#ditty-editor__settings").ditty_editor({ditty:t})}function dittyGetItemsById(t,i){var e=[];return jQuery.each(t,(function(t,s){String(s.id)===String(i)&&e.push(s)})),e}function dittyItemsReorder(t,i){var e=[];return jQuery.each(i,(function(i,s){e=jQuery.merge(e,dittyGetItemsById(t,s))})),e}function dittyDraftUpdate(t,i,e,s){var a=t.settings.editor.getDraftValues(i);return a||(a={}),e?a[e]=s:a=s,t.settings.editor.updateDraftValues(i,a)}function dittyDraftGet(t,i,e){var s=t.settings.editor.getDraftValues(i);return!!s&&(e&&s[e]?s[e]:s)}function dittyDraftDelete(t,i,e){var s=i.settings.editor.getDraftValues(t),a={};return jQuery.each(s,(function(t,i){String(e)!==String(t)&&(a[t]=i)})),"new-"!==String(e).substring(0,4)&&(a[e]="DELETE"),i.settings.editor.updateDraftValues(t,a)}function dittyDraftItemDelete(t,i){return dittyDraftDelete("items",t,i)}function dittyDraftLayoutDelete(t,i){return dittyDraftDelete("layouts",t,i)}function dittyDraftDisplayDelete(t,i){return dittyDraftDelete("displays",t,i)}function dittyDraftItemUpdateData(t,i,e,s){var a=t.settings.editor.getDraftValues("items");return a||(a={}),a[i]||(a[i]={}),a[i].data||(a[i].data={}),e?a[i].data[e]=s:a[i].data=s,t.settings.editor.updateDraftValues("items",a)}function dittyDraftItemGetData(t,i,e){var s=t.settings.editor.getDraftValues("items");return!!s[i]&&(!!s[i].data&&(e?s[i].data[e]?s[i].data[e]:void 0:s[i].data))}function dittyDraftItemUpdateMeta(t,i,e,s){var a=t.settings.editor.getDraftValues("items");return a||(a={}),a[i]||(a[i]={}),a[i].meta||(a[i].meta={}),e?a[i].meta[e]=s:a[i].meta=s,t.settings.editor.updateDraftValues("items",a)}function dittyDraftItemGetMeta(t,i,e){var s=t.settings.editor.getDraftValues("items");return!!s[i]&&(!!s[i].meta&&(e?s[i].meta[e]?s[i].meta[e]:void 0:s[i].meta))}function dittyDraftLayoutUpdate(t,i,e,s){var a=t.settings.editor.getDraftValues("layouts");return a||(a={}),a[i]||(a[i]={}),e?a[i][e]=s:a[i]=s,t.settings.editor.updateDraftValues("layouts",a)}function dittyDraftLayoutGet(t,i,e){var s=t.settings.editor.getDraftValues("layouts");return!!s[i]&&(e?s[i][e]?s[i][e]:void 0:s[i])}function dittyDraftDisplayUpdate(t,i,e,s){var a=t.settings.editor.getDraftValues("displays");return a||(a={}),a[i]||(a[i]={}),e?a[i][e]=s:a[i]=s,t.settings.editor.updateDraftValues("displays",a)}function dittyDraftDisplayGet(t,i,e){var s=t.settings.editor.getDraftValues("layouts");return!!s[i]&&(e?s[i][e]?s[i][e]:void 0:s[i])}jQuery((function($){!function(){"use strict";$("body").on("ditty_editor_before_panel_update",(function(t,i,e,s,a,d){switch(d.delayedSubmitDisable(),$.protip({defaults:{position:"top",size:"small",scheme:"black",classes:"ditty-protip"}}),i){case"settings":e.hasClass("init")||e.ditty_settings_panel({editor:d});break;case"items":e.hasClass("init")?e.ditty_items_panel("panelVisible"):e.ditty_items_panel({editor:d});break;case"displays":e.find(".ditty-data-list__item").removeClass("editing"),e.hasClass("init")?e.ditty_displays_panel("panelVisible"):e.ditty_displays_panel({editor:d});break;case"item_types":e.find(".ditty-data-list__item").removeClass("editing"),e.hasClass("init")?e.ditty_item_types_panel("panelVisible"):e.ditty_item_types_panel({editor:d});break;case"item_editor":e.ditty_item_editor_panel({editor:d});break;case"display_editor":e.ditty_display_editor_panel({editor:d});break;case"layouts":"layoutHtmlEditor"!==s&&"layoutCssEditor"!==s&&e.ditty_layouts_panel({editor:d});break;case"layout_variations":e.hasClass("init")?e.ditty_layout_variations_panel("panelVisible"):e.ditty_layout_variations_panel({editor:d});break;case"layout_html_editor":e.ditty_layout_html_editor_panel({editor:d,prevPanel:s});break;case"layout_css_editor":e.ditty_layout_css_editor_panel({editor:d,prevPanel:s})}})),$("body").on("ditty_editor_panel_removed",(function(t,i,e){switch(i){case"item_editor":e.ditty_item_editor_panel&&e.ditty_item_editor_panel("destroy");break;case"display_editor":e.ditty_display_editor_panel&&e.ditty_display_editor_panel("destroy");break;case"layouts":case"layouts":e.ditty_layouts_panel&&e.ditty_layouts_panel("destroy");break;case"layout_variations":e.ditty_layout_variations_panel&&e.ditty_layout_variations_panel("destroy");break;case"layout_html_editor":e.ditty_layout_html_editor_panel&&e.ditty_layout_html_editor_panel("destroy");break;case"layout_css_editor":e.ditty_layout_css_editor_panel&&e.ditty_layout_css_editor_panel("destroy")}}))}()})),dittyEditorInit(),function($){"use strict";var t={listType:"toggle",showAll:!0,activeFilter:"*",filter:".ditty-data-list__filter",filterSelector:"filter",item:".ditty-data-list__item",itemSelector:"filter"},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_ui_data_list.defaults,e),this.$elmt=$(i),this.filters=[],this._init()};i.prototype={_init:function(){var t=this;this.$elmt.on("click",this.settings.filter,{self:this},this._filterClick),this.$elmt.find(this.settings.filter+".active").each((function(){t._filterList($(this).data(t.settings.filterSelector))})),"*"!==this.settings.activeFilter&&this._filterList(this.settings.activeFilter),setTimeout((function(){t.trigger("init")}),1)},_filterList:function(t){var i=this,e=this.filters;if("toggle"===this.settings.listType)this.filters.includes(t)?this.settings.showAll&&(this.filters=[],this.$elmt.find(this.settings.filter).removeClass("active"),this.$elmt.find(this.settings.item).show()):(this.filters=[t],this.$elmt.find(this.settings.filter).removeClass("active"),this.$elmt.find(this.settings.filter+"[data-"+this.settings.filterSelector+'="'+t+'"]').addClass("active"),this.$elmt.find(this.settings.item).hide(),this.$elmt.find(this.settings.item+"[data-"+this.settings.itemSelector+'="'+t+'"]').show());else if("filter"===this.settings.listType){if(this.$elmt.find(this.settings.item).hide(),this.filters.includes(t)){this.$elmt.find(this.settings.filter+"[data-"+this.settings.filterSelector+'="'+t+'"]').removeClass("active");for(var s=0;s<this.filters.length;s++)i.filters[s]===t&&i.filters.splice(s,1)}else this.$elmt.find(this.settings.filter+"[data-"+this.settings.filterSelector+'="'+t+'"]').addClass("active"),this.filters.push(t);$.each(this.filters,(function(t,e){i.$elmt.find(this.settings.item+"[data-"+this.settings.itemSelector+'="'+e+'"]').show()})),0===this.filters.length&&i.$elmt.find(this.settings.item).show()}e!==this.filters&&i.trigger("update")},_filterClick:function(t){t.preventDefault();var i=t.data.self,e=$(t.target);e.is("a")||(e=e.parents("a")),i._filterList(e.data(i.settings.filterSelector))},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings,this.filters];i&&(e=i),this.$elmt.trigger("ditty_ui_data_list_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_ui_data_list.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.off("click",this.settings.filter,{self:this},this._filterClick),this.trigger("destroy"),this.elmt._ditty_ui_data_list=null}},$.fn.ditty_ui_data_list=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_ui_data_list||(this._ditty_ui_data_list=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_ui_data_list;if(!i)throw new Error("No Ditty_UI_Data_List applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_UI_Data_List.');return void 0!==e?e:this}},$.ditty_ui_data_list={},$.ditty_ui_data_list.defaults=t}(jQuery),function($){"use strict";var t={screen:"admin",ditty:null,panel:""},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_editor.defaults,e),this.$elmt=$(i),this.ditty=this.settings.ditty,this.dittyId=this.settings.ditty.options("id"),this.dittyType=this.settings.ditty.options("type"),this.displayId=0,this.panelsLoaded=0,this.unsavedUpdates={},this.draftValues={},this.$overlay=null,this.$contents=null,this.$header=null,this.$update=null,this.$updateCount=null,this.$updateLabel=null,this.$tabs=null,this.$panels=null,this.currentTab=0,this.currentPanel=this.settings.panel,this.delayedSubmit=!1,this.tabs=[],this.panels=[],this.activeItems=[],this._init()};i.prototype={_init:function(){var t,i,e,s,a,d,n,r=this;t=$('<div class="ditty-editor__contents"></div>'),this.$contents=t,i=$('<div class="ditty-editor__header"></div>'),this.$header=i,e=$('<span class="ditty-editor__update__count"></span>'),this.$updateCount=e,s=$('<span class="ditty-editor__update__label">Save Ditty</span>'),this.$updateLabel=s,a=$('<button type="submit" class="ditty-editor__update ditty-button ditty-button--primary"></button>'),this.$update=a,d=$('<div class="ditty-editor__tabs"></div>'),this.$tabs=d,n=$('<div class="ditty-editor__panels"></div>'),this.$panels=n,a.prepend(e,s),i.append(a),t.append(i,d,n),this.$elmt.append(t),this.$overlay=$('<div class="ditty-updating-overlay ditty-admin-item__overlay"><div class="ditty-updating-overlay__inner"><i class="fas fa-sync-alt fa-spin"></i></div></div>'),this.$elmt.append(this.$overlay),$(document).on("postbox-moved",{self:this},this._postboxMoved),$(document).on("postboxes-columnchange",{self:this},this._postboxMoved),$(window).on("beforeunload",{self:this},this._beforeunload),this.ditty.$elmt.on("ditty_active_items_update",{self:this},this._dittyItemsUpdated),this.ditty.$elmt.on("ditty_disabled_items_update",{self:this},this._disabledItemsUpdate),this.$tabs.on("click",".ditty-editor__tab",{self:this},this._showPanel),this.$update.on("click",{self:this},this._saveClick),this.$panels.on("ditty_slider_init",{self:this},this._editorLoaded),this.$panels.on("ditty_slider_before_slide_update",{self:this},this._beforeSlideUpdate),this.$panels.on("ditty_slider_after_slide_update",{self:this},this._afterSlideUpdate),this.$panels.on("ditty_slider_slide_removed",{self:this},this._slideRemoved),this._loadContents(),this.trigger("stop_live_updates"),setTimeout((function(){r.trigger("init")}),1)},_loadContents:function(){var t=this,i={action:"ditty_editor_load_contents",ditty_id:this.dittyId,security:dittyVars.security};$.post(dittyVars.ajaxurl,i,(function(i){t._initTabs(i.tabs),t._initPanels(i.panels),t._initSlider()}),"json")},_editorLoaded:function(t){var i=t.data.self;$("body").trigger("ditty_editor_loaded",[i])},_setUpdateCount:function(){},_initSlider:function(){var t=this.tabs[0].id;this.currentPanel&&""!==this.currentPanel&&(t=this.currentPanel),this.$panels.ditty_slider({transition:"fade",transitionSpeed:.75,heightSpeed:.75,touchSwipe:!1,slides:this.panels,slideId:t})},_beforeSlideUpdate:function(t,i,e,s,a){var d=t.data.self;d.updateStart(),d._updateTab(e.id),$("body").trigger("ditty_editor_before_panel_update",[e.id,e.$elmt,a.id,a.$elmt,d])},_afterSlideUpdate:function(t,i,e,s,a){var d=t.data.self;d.updateStop(),$("body").trigger("ditty_editor_after_panel_update",[e.id,e.$elmt,a.id,a.$elmt,d])},_slideRemoved:function(t,i){var e=t.data.self;$("body").trigger("ditty_editor_panel_removed",[i.id,i.$elmt,e])},_showPanel:function(t){t.preventDefault();var i=t.data.self,e=$(t.target).is("a")?$(t.target):$(t.target).parent("a"),s=e.data("panel"),a=parseInt(e.data("index"));if(s===i.currentTab)return!1;var d=a>i.currentTab?"slideLeft":"slideRight";i.$panels.ditty_slider("options","transition",d),i.$panels.ditty_slider("showSlideById",s),i.currentTab=a,i.$elmt.trigger("ditty_editor_add_drafts")},_updateTab:function(t){var i=$('.ditty-editor__tab[data-panel="'+t+'"]');void 0!==i[0]&&($(".ditty-editor__tab").removeClass("active"),i.addClass("active"),this.currentTab=parseInt(i.data("index")))},_initTabs:function(t){var i=this,e=0;$.each(t,(function(t,s){var a=$('<a href="#" class="ditty-editor__tab ditty-editor__tab--'+t+'" data-panel="'+t+'" data-index="'+e+'"><i class="'+s.icon+'"></i><span>'+s.label+"</span></a>");i.$tabs.append(a),i.tabs.push({id:t,tab:a}),e++}))},_initPanels:function(t){var i=this;$.each(t,(function(t,e){var s='<div class="ditty-editor__panel ditty-editor__panel--'+t+'">'+e+"</div>";i.panels.push({id:t,html:s,cache:!0})}))},_initFields:function(t){t.find(".ditty-data-list").ditty_ui_data_list(),t.trigger("ditty_init_fields"),$.protip({defaults:{position:"top",size:"small",scheme:"black",classes:"ditty-protip"}})},saveDitty:function(t){var i=this,e=i.dittyId;i.$updateLabel.text("Updating..."),i.updateStart();var s={action:"ditty_editor_save",ditty_id:e,draft_values:i.draftValues,return_items:1,security:dittyVars.security};s=$.extend({},s,t),$.post(dittyVars.ajaxurl,s,(function(t){$("body").trigger("ditty_editor_save_ditty_response",[t]),t.display_items&&i.ditty.options("items",t.display_items),i.draftValues={},i.unsavedUpdates={},i._setUpdateCount(),i.$elmt.removeClass("ditty-editor--updates-exist"),i.$updateLabel.text("Ditty Saved!"),setTimeout((function(){i.$updateLabel.text("Save Ditty")}),2e3),i.updateStop(),t.new_ditty_url&&window.history.pushState(null,"","/wp-admin/post.php?post="+e+"&action=edit")}))},_saveClick:function(t){t.preventDefault();var i=t.data.self;i.$elmt.trigger("ditty_editor_save_drafts"),i.delayedSubmit||i.saveDitty()},_dittyItemsUpdated:function(t,i,e){var s=t.data.self;s.activeItems=e,s.trigger("active_items_update")},_disabledItemsUpdate:function(t,i){var e=t.data.self;$.each(i,(function(t,i){"disabled"===i?e.$elmt.find("#ditty-editor-item--"+t).addClass("ditty-editor-item--disabled"):e.$elmt.find("#ditty-editor-item--"+t).removeClass("ditty-editor-item--disabled")}))},_postboxMoved:function(t,i){if(!window.tinymce)return!1;$(i).find(".wp-editor-area").each((function(){var t=$(this).attr("id");tinymce.execCommand("mceRemoveEditor",!0,t),tinymce.execCommand("mceAddEditor",!0,t)}))},_beforeunload:function(t){var i=t.data.self;return Object.keys(i.unsavedUpdates).length>0||void 0},_windowResize:function(t){t.preventDefault()},_options:function(t){return this.settings[t]},panelExists:function(t){var i=this.$panels.ditty_slider("options","slides"),e=!1;return $.each(i,(function(i,s){String(s.id)!==String(t)||(e=!0)})),e},showPanel:function(t,i){i&&this.$panels.ditty_slider("addSlideById",t,i),this.$panels.ditty_slider("showSlideById",t,!0)},updateExists:function(t,i){if(void 0===this.unsavedUpdates[t]&&(this.unsavedUpdates[t]=[]),-1!==$.inArray(i,this.unsavedUpdates[t]))return!0},addUpdate:function(t,i){var e=!1;return void 0===this.unsavedUpdates[t]&&(this.unsavedUpdates[t]=[]),-1===$.inArray(i,this.unsavedUpdates[t])&&(e=!0,this.unsavedUpdates[t].push(i)),this._setUpdateCount(),this.$elmt.addClass("ditty-editor--updates-exist"),e},removeUpdate:function(t,i){if(void 0===this.unsavedUpdates[t])return!1;if(-1===$.inArray(i,this.unsavedUpdates[t]))return!1;var e=!1,s=[];return $.each(this.unsavedUpdates[t],(function(t,a){String(i)===String(a)?e=!0:s.push(a)})),this.unsavedUpdates[t]=s,this._setUpdateCount(),""===this.$updateCount.text()&&this.$elmt.removeClass("ditty-editor--updates-exist"),e},updateStart:function(){this.$overlay.fadeIn()},updateStop:function(){this.$overlay.fadeOut()},initFields:function(t){this._initFields(t)},updateDraftValues:function(t,i){return this.$elmt.addClass("ditty-editor--updates-exist"),t?(this.draftValues[t]=i,"development"===dittyVars.mode&&window.console&&console.log("draftValues:",this.draftValues),this.draftValues[t]):(this.draftValues=i,"development"===dittyVars.mode&&window.console&&console.log("draftValues:",this.draftValues),this.draftValues)},getDraftValues:function(t){return t?!!this.draftValues[t]&&this.draftValues[t]:this.draftValues},delayedSubmitEnable:function(){this.delayedSubmit=!0},delayedSubmitDisable:function(){this.delayedSubmit=!1},trigger:function(t,i){var e=[];switch(t){case"active_items_update":e=[this.ditty,this.activeItems];break;case"stop_live_updates":e=[this.dittyId];break;default:e=[this.settings]}i&&(e=i),this.$elmt.trigger("ditty_editor_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e),$("body").trigger("ditty_"+t,e)},_getPanelOption:function(t){return"elmnt"===t?this.$panels:this.settings[t]},_setPanelOption:function(t,i){if(void 0===i)return!1;this.$panels.ditty_slider("options",t,i),this.trigger("update")},panelOptions:function(t,i){var e=this;if("object"==typeof t)$.each(t,(function(t,i){e._setPanelOption(t,i)}));else{if("string"!=typeof t)return e.$panels.ditty_slider("options");if(void 0===i)return e._getPanelOption(t);e._setPanelOption(t,i)}},_getOption:function(t){return"elmnt"===t?this:this.settings[t]},_setOption:function(t,i){if(void 0===i)return!1;this.settings[t]=i,this.trigger("update")},options:function(t,i){var e=this;if("object"==typeof t)$.each(t,(function(t,i){e._setOption(t,i)}));else{if("string"!=typeof t)return e.settings;if(void 0===i)return e._getOption(t);e._setOption(t,i)}},destroy:function(){this.$panels.ditty_slider&&this.$panels.ditty_slider("destroy"),$(document).off("postbox-moved",{self:this},this._postboxMoved),$(document).off("postboxes-columnchange",{self:this},this._postboxMoved),$(window).off("beforeunload",{self:this},this._beforeunload),this.ditty.$elmt.off("ditty_active_items_update",{self:this},this._dittyItemsUpdated),this.ditty.$elmt.off("ditty_disabled_items_update",{self:this},this._disabledItemsUpdate),this.$tabs.off("click","ditty-editor__tab",{self:this},this._showPanel),this.$update.off("click",{self:this},this._saveClick),this.$panels.off("ditty_slider_init",{self:this},this._editorLoaded),this.$panels.off("ditty_slider_before_slide_update",{self:this},this._beforeSlideUpdate),this.$panels.off("ditty_slider_after_slide_update",{self:this},this._afterSlideUpdate),this.$panels.off("ditty_slider_slide_removed",{self:this},this._slideRemoved),this.trigger("destroy"),this.elmt._ditty_editor=null}},$.fn.ditty_editor=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_editor||(this._ditty_editor=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_editor;if(!i)throw new Error("No Ditty_Editor applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Editor.');return void 0!==e?e:this}},$.ditty_editor={},$.ditty_editor.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_settings_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$title=this.$elmt.find('input[name="title]'),this.$previewBg=this.$elmt.find('input[name="previewBg"]'),this.$previewPaddingTop=this.$elmt.find('input[name="previewPadding[paddingTop]"]'),this.$previewPaddingBottom=this.$elmt.find('input[name="previewPadding[paddingBottom]"]'),this.$previewPaddingLeft=this.$elmt.find('input[name="previewPadding[paddingLeft]"]'),this.$previewPaddingRight=this.$elmt.find('input[name="previewPadding[paddingRight]"]'),this.$postTitle=$(".ditty-post__title"),this.$editorPreview=$("#ditty-editor__preview"),this.dittyId=this.$form.data("ditty_id"),this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){this.initData=this.$form.serialize(),this.settings.editor.initFields(this.$elmt),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.on("submit",{self:this},this._submitForm),this.$form.on("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.on("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.on("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.$form.on("keyup change",'input[name="title"]',{self:this},this._titleChange),this.$form.on("keyup change",".ditty-field--preview_settings *",{self:this},this._previewBgChange),this.$elmt.addClass("init")},_checkUpdates:function(t){var i=t?t.data.self:this;i.$form.serialize()!==i.initData?(i.settings.editor.addUpdate("settings",i.itemId),i.settings.editor.delayedSubmitEnable()):i.settings.editor.removeUpdate("settings",i.itemId)},_titleChange:function(t){var i=t?t.data.self:this,e=$(t.target).val();i.$postTitle.text(e)},_previewBgChange:function(t){var i=t?t.data.self:this,e={backgroundColor:i.$previewBg.val(),paddingTop:i.$previewPaddingTop.val(),paddingBottom:i.$previewPaddingBottom.val(),paddingLeft:i.$previewPaddingLeft.val(),paddingRight:i.$previewPaddingRight.val()};i.$editorPreview.css(e)},_addDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.dittyId;i.settings.editor.updateStart();var s={action:"ditty_editor_settings_update",ditty_id:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:s,success:function(t){i.initData=i.$form.serialize(),dittyDraftUpdate(i,"settings",!1,t),i.settings.editor.delayedSubmitDisable(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty({return_items:0}),i.afterUpdateAction=""}})},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_settings_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_settings_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.$form.off("submit",{self:this},this._submitForm),this.$form.off("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.off("keyup change",'input[name="previewBg"]',{self:this},this._previewBg_cahnge),this.$form.off("keyup change",'input[name="title"]',{self:this},this._titleChange),this.$form.off("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.off("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.trigger("destroy"),this.elmt._ditty_settings_panel=null}},$.fn.ditty_settings_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_settings_panel||(this._ditty_settings_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_settings_panel;if(!i)throw new Error("No Ditty_Settings_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Settings_Panel.');return void 0!==e?e:this}},$.ditty_settings_panel={},$.ditty_settings_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_items_panel.defaults,e),this.$elmt=$(i),this.$add=$(i).find(".ditty-editor-options__add"),this.$contents=$(i).find(".ditty-editor__panel__contents"),this.$list=$(i).find(".ditty-data-list"),this.$listItems=$(i).find(".ditty-data-list__items"),this.isEmptyTicker=!1,this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.settings.editor.$elmt.on("ditty_editor_active_items_update",{self:this},this._dittyActiveItemsUpdated),this.$add.on("click",{self:this},this._add_item),this.$elmt.on("click",".ditty-data-list__item",{self:this},this._showItem),this.$elmt.on("click",".ditty-data-list__item__icon",{self:this},this._editType),this.$elmt.on("click",".ditty-data-list__item__edit",{self:this},this._editItem),this.$elmt.on("click",".ditty-data-list__item__layout",{self:this},this._editLayoutVariations),this.$elmt.on("click",".ditty-data-list__item__clone",{self:this},this._cloneItem),this.$elmt.on("click",".ditty-data-list__item__delete",{self:this},this._deleteItem),this.$list.on("click",".ditty-editor-item > a",{self:this},this._actionClick),$("body").on("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),1>this.$elmt.find(".ditty-data-list__item").length&&(this.isEmptyTicker=!0,this.$add.trigger("click")),this._initializeSorting(),this._highlightListItems(this.settings.editor.activeItems)},dittyUpdateSavedDraftLayouts:function(t,i){$.each($(".ditty-editor-item"),(function(){var e=$(this).data("layout_value");$.each(e,(function(s,a){String(a)===String(t)&&(e[s]=String(i))})),$(this).attr("data-layout_value",e).data("layout_value",e)}))},_dittyEditorSaveResponse:function(t,i){var e=t.data.self;i.ditty_new_item_ids&&$.each(i.ditty_new_item_ids,(function(t,i){var e=$("#ditty-editor-item--"+t);e.length&&(e.attr("id","ditty-editor-item--"+i),e.attr("data-item_id",i).data("item_id",i))})),i.ditty_new_layout_ids&&$.each(i.ditty_new_layout_ids,(function(t,i){e.dittyUpdateSavedDraftLayouts(t,i)}))},_highlightListItem:function(t){var i=t.id+"";i=i.split("_"),this.$elmt.find("#ditty-editor-item--"+i[0]).addClass("active")},_highlightListItems:function(t){this.$elmt.find(".ditty-data-list__item").removeClass("active");var i=this;Array.isArray(t)?$.each(t,(function(t,e){i._highlightListItem(e)})):i._highlightListItem(t)},_dittyActiveItemsUpdated:function(t,i,e){t.data.self._highlightListItems(e)},_initializeSorting:function(){var t=this;this.$listItems.sortable({handle:".ditty-data-list__item__move",items:".ditty-data-list__item",axis:"y",start:function(t,i){$(i.item).addClass("ditty-data-list__item--moving")},stop:function(i,e){$(e.item).removeClass("ditty-data-list__item--moving"),t.settings.editor.addUpdate("item_order",t.settings.editor.dittyId)},update:function(){t._updateItemIndexes("updateDitty")}})},_showItem:function(t){t.preventDefault();var i=t.data.self;if(!$(t.target).is("a")&&!$(t.target).parent().is("a")){var e=($(t.target).is(".ditty-data-list__item")?$(t.target):$(t.target).parents(".ditty-data-list__item")).data("item_id");i.settings.editor.ditty.showItem(e)}},_actionClick:function(t){t.preventDefault();var i=t.data.self,e=$(t.target).is("a")?$(t.target):$(t.target).parent("a"),s=e.parents(".ditty-data-list__item"),a=s.data("ditty_id"),d=s.data("item_id");dittyVars.editor.currentItem=s,$("body").trigger("ditty_editor_item_action_click",[e,s,d,a,i.settings.editor])},_editType:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item");e.trigger("click"),e.addClass("editing"),i.settings.editor.updateStart(),i.settings.editor.panelOptions("transition","slideRight"),i.settings.editor.showPanel("item_types")},_editItem:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_id");e.trigger("click"),e.addClass("editing"),i.settings.editor.updateStart();var a={action:"ditty_editor_item_fields",item_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--item_editor">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("item_editor",e)}}))},_editLayoutVariations:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_type"),a=e.data("layout_value"),d=e.find(".ditty-data-list__item__label").html();e.trigger("click"),e.addClass("editing"),i.settings.editor.updateStart();var n={action:"ditty_editor_layout_variations",ditty_id:i.settings.editor.dittyId,item_type:s,item_label:d,layout_value:a,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,n,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--layout-variations">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("layout_variations",e)}}))},_add_item:function(t){t.preventDefault();var i=t.data.self,e={action:"ditty_editor_item_add",ditty_id:i.settings.editor.dittyId,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,e,(function(t){if(t.display_items){if(i.isEmptyTicker){var e=i.settings.editor.ditty.options("items");$.each(e,(function(t,e){i.settings.editor.ditty.deleteItem(e.id)})),i.isEmptyTicker=!1}$.each(t.display_items,(function(t,e){i.settings.editor.ditty.addItem(e,0)}))}if(t.editor_item){var s=$(t.editor_item);s.hide(),i.$listItems.prepend(s),s.slideDown(),i._updateItemIndexes()}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),t.draft_id&&t.draft_meta&&dittyDraftItemUpdateMeta(i,t.draft_id,null,t.draft_meta)}),"json")},_cloneItem:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_id");i.settings.editor.updateStart();var a={action:"ditty_editor_item_clone",item_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t.display_items&&t.display_items.length&&i.settings.editor.ditty.updateItems(t.display_items,s,"after"),t.editor_item){var a=$(t.editor_item);a.hide(),e.after(a),a.slideDown(),i._updateItemIndexes()}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),t.draft_id&&t.draft_meta&&dittyDraftItemUpdateMeta(i,t.draft_id,null,t.draft_meta),i.settings.editor.updateStop()}),"json")},_deleteItem:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_id");1>=i.$elmt.find(".ditty-data-list__item").length&&i.$add.trigger("click"),e.slideUp((function(){$(this).remove()})),i.settings.editor.ditty.deleteItem(s),dittyDraftItemDelete(i,s)},_updateItemIndexes:function(t){var i=this,e=[];if(this.$elmt.find(".ditty-data-list__item").each((function(t){var s=$(this).data("item_id");e.push(s),dittyDraftItemUpdateData(i,s,"item_index",t)})),"updateDitty"===t){var s=dittyItemsReorder(i.settings.editor.ditty.options("items"),e);i.settings.editor.ditty.options("items",s)}},panelVisible:function(){this.$elmt.find(".ditty-data-list__item").removeClass("editing")},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_items_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_items_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.settings.editor.$elmt.off("ditty_editor_active_items_update",{self:this},this._dittyActiveItemsUpdated),this.$add.off("click",{self:this},this._add_item),this.$elmt.off("click",".ditty-data-list__item",{self:this},this._showItem),this.$elmt.off("click",".ditty-data-list__item__icon",{self:this},this._editType),this.$elmt.off("click",".ditty-data-list__item__edit",{self:this},this._editItem),this.$elmt.off("click",".ditty-data-list__item__layout",{self:this
2
  },this._editLayoutVariations),this.$elmt.off("click",".ditty-data-list__item__clone",{self:this},this._cloneItem),this.$elmt.off("click",".ditty-data-list__item__delete",{self:this},this._deleteItem),this.$list.off("click",".ditty-editor-item > a",{self:this},this._actionClick),$("body").off("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this.trigger("destroy"),this.elmt._ditty_items_panel=null}},$.fn.ditty_items_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_items_panel||(this._ditty_items_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_items_panel;if(!i)throw new Error("No Ditty_Items_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Items_Panel.');return void 0!==e?e:this}},$.ditty_items_panel={},$.ditty_items_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_item_types_panel.defaults,e),this.$elmt=$(i),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$editorItem=this.settings.editor.$panels.find(".ditty-editor__panel--items").find(".ditty-data-list__item.editing"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.currentType=null,this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.settings.editor.initFields(this.$elmt),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("click",".ditty-editor-item-type",{self:this},this._typeClick),this.panelVisible()},_showItemsList:function(){this.settings.editor.panelOptions("transition","slideLeft"),this.settings.editor.showPanel("items")},_backClick:function(t){t.preventDefault(),t.data.self._showItemsList()},_typeClick:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is(".ditty-editor-item-type")?$(t.target):$(t.target).parents(".ditty-editor-item-type")).data("item_type");if(e===i.currentType)i._showItemsList();else{i.settings.editor.updateStart();var s={action:"ditty_editor_item_type_update",item_id:i.editorItemId,item_type:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,s,(function(t){if(t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,i.editorItemId),t.editor_item){var e=$(t.editor_item);i.$editorItem.after(e),i.$editorItem.remove(),i.$editorItem=e}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),i._showItemsList(),i.settings.editor.updateStop()}),"json")}},panelVisible:function(){this.$editorItem=this.settings.editor.$panels.find(".ditty-editor__panel--items").find(".ditty-data-list__item.editing"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.currentType=this.$editorItem.data("item_type"),this.$elmt.find(".ditty-editor-item-type").removeClass("active"),this.$elmt.find('.ditty-editor-item-type[data-item_type="'+this.currentType+'"]').addClass("active")},panelHidden:function(){var t=this.$editorItem.find(".ditty-data-list__item__icon").children("i");t.attr("class",t.data("class"))},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_item_types_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_item_types_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$back.off("click",{self:this},this._backClick),this.$elmt.off("click",".ditty-editor-item-type",{self:this},this._typeClick),this.trigger("destroy"),this.elmt._ditty_item_types_panel=null}},$.fn.ditty_item_types_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_item_types_panel||(this._ditty_item_types_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_item_types_panel;if(!i)throw new Error("No Ditty_Item_Types_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Item_Types_Panel.');return void 0!==e?e:this}},$.ditty_item_types_panel={},$.ditty_item_types_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_item_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$preview=this.$elmt.find(".ditty-editor-options__preview"),this.$title=this.$elmt.find(".ditty-editor-options__title"),this.itemId=this.$form.data("item_id"),this.itemType=this.$form.data("item_type"),this.dittyId=this.$form.data("ditty_id"),this.$editorItem=this.settings.editor.$panels.find(".ditty-editor__panel--items").find(".ditty-data-list__item.editing"),this.$editorItemTitle=this.$editorItem.find(".ditty-data-list__item__label"),this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){var t=this;this.initData=this.$form.serialize(),this.settings.editor.initFields(this.$elmt),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.on("submit",{self:this},this._submitForm),this.$back.on("click",{self:this},this._backClick),this.$preview.on("click",{self:this},this._previewClick),this.$form.on("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.on("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.on("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.$form.on("ditty_field_update",".ditty-field__input",{self:this},this._checkUpdates),setTimeout((function(){t.trigger("init",[t])}),1)},_showItemList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","items")},_enablePreviewButton:function(){this.$preview.addClass("ditty-has-updates")},_disablePreviewButton:function(){this.$preview.removeClass("ditty-has-updates"),this.$preview.children("i").attr("class",this.$preview.children("i").data("class"))},_checkUpdates:function(t){var i=t?t.data.self:this;i.$form.serialize()!==i.initData?(i._enablePreviewButton(),i.settings.editor.addUpdate("item_settings",i.itemId),i.settings.editor.delayedSubmitEnable()):(i._disablePreviewButton(),i.settings.editor.removeUpdate("item_settings",i.itemId))},_addDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.$form.serialize()===i.initData?i._showItemList():(i.afterUpdateAction="return",i.$form.trigger("submit"))},_previewClick:function(t){t.preventDefault();var i=t.data.self;i.$form.serialize()!==i.initData&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit"))},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.itemId;i.settings.editor.updateStart();var s={action:"ditty_editor_item_update",item_id:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:s,error:function(){},success:function(t){if(t.value_updates&&i._updateValues(t.value_updates),i.initData=i.$form.serialize(),i._disablePreviewButton(),t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,e),t.editor_item){var s=$(t.editor_item).children(".ditty-data-list__item__label").html();i.$title.html(s),i.$editorItemTitle.html(s)}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),t.draft_id&&t.draft_meta&&dittyDraftItemUpdateMeta(i,t.draft_id,null,t.draft_meta),i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showItemList(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty({return_items:0}),i.afterUpdateAction=""}})},_updateValues:function(t){var i=this;$.each(t,(function(t,e){var s=i.$form.find('[name="'+t+'"]');s.length&&s.val(e)}))},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_item_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_item_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._saveDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.off("submit",{self:this},this._submitForm),this.$back.off("click",{self:this},this._backClick),this.$preview.off("click",{self:this},this._previewClick),this.$form.off("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.off("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.off("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.$form.off("ditty_field_update",".ditty-field__input",{self:this},this._checkUpdates),this.elmt._ditty_item_editor_panel=null}},$.fn.ditty_item_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_item_editor_panel||(this._ditty_item_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_item_editor_panel;if(!i)throw new Error("No Ditty_Item_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Item_Editor_Panel.');return void 0!==e?e:this}},$.ditty_item_editor_panel={},$.ditty_item_editor_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_displays_panel.defaults,e),this.$elmt=$(i),this.$list=$(i).find(".ditty-data-list__items"),this.$contents=$(i).find(".ditty-editor__panel__contents"),this.initDisplay=null,this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.$elmt.ditty_ui_data_list({filter:".ditty-display-panel__filter",item:".ditty-editor-display",itemSelector:"display_type"}),this.initDisplay=this.$list.data("active"),this._activateDisplay(this.$list.find("#ditty-editor-display--"+this.initDisplay)),this.$elmt.on("click",".ditty-data-list__item",{self:this},this._selectDisplay),this.$elmt.on("click",".ditty-data-list__item__edit",{self:this},this._editDisplay),this.$elmt.on("click",".ditty-data-list__item__clone",{self:this},this._cloneDisplay),this.$elmt.on("click",".ditty-data-list__item__delete",{self:this},this._deleteDisplay),this.settings.editor.$elmt.on("ditty_editor_saveDrafts",{self:this},this._saveDrafts)},_saveDrafts:function(t){var i=t.data.self;i.initDisplay=i.$list.find(".ditty-editor-display.active").data("display_id")},_activateDisplay:function(t){this.$list.find(".ditty-editor-display").removeClass("active"),t.addClass("active")},_initDitty:function(t,i,e){var s=this.settings.editor.ditty.$elmt;e.display=i,e.id=this.settings.editor.ditty.options("id"),e.items=this.settings.editor.ditty.options("items"),e.height=this.settings.editor.ditty.options("height"),this.settings.editor.ditty.destroy(),s["ditty_"+t](e),this.settings.editor.ditty=s["ditty_"+t]("options","ditty")},_selectDisplay:function(t){t.preventDefault();var i=t.data.self;if($(t.target).parent().is("a"))return!1;var e=$(t.target).is(".ditty-data-list__item")?$(t.target):$(t.target).parents(".ditty-data-list__item"),s=e.data("display_id"),a=e.data("display_type");if(e.hasClass("active"))return!1;i.settings.editor.updateStart(),dittyDraftUpdate(i,"post_meta","_ditty_display",s),i._activateDisplay(e);var d={action:"ditty_editor_select_display",display_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,d,(function(t){if(!t)return!1;i._initDitty(a,s,t),i.settings.editor.updateStop()}),"json")},_cloneDisplay:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("display_id");i.settings.editor.updateStart();var a={action:"ditty_editor_display_clone",display_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t.editor_display){var s=$(t.editor_display);s.hide(),e.after(s),s.slideDown()}t.draft_id&&t.draft_data&&dittyDraftDisplayUpdate(i,t.draft_id,null,t.draft_data),i.settings.editor.updateStop()}),"json")},_deleteDisplay:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=null,a=e.data("display_id");e.hasClass("active")&&(e.prev().length?s=e.prev():e.next().length&&(s=e.next())),e.slideUp((function(){$(this).remove()})),dittyDraftDisplayDelete(i,a),null!==s&&s.trigger("click")},_editDisplay:function(t){t.preventDefault();var i=t.data.self;i.$displayEdit=$(this).parents(".ditty-data-list__item");var e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("display_id");i.settings.editor.updateStart(),e.addClass("editing");var a={action:"ditty_editor_display_fields",display_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--displayEditor">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("display_editor",e)}}))},panelVisible:function(){this.$elmt.find(".ditty-data-list__item").removeClass("editing")},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_displays_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_displays_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$elmt.ditty_ui_data_list("destroy"),this.$elmt.off("click",".ditty-data-list__item",{self:this},this._selectDisplay),this.$elmt.off("click",".ditty-data-list__item__edit",{self:this},this._editDisplay),this.$elmt.off("click",".ditty-data-list__item__clone",{self:this},this._cloneDisplay),this.$elmt.off("click",".ditty-data-list__item__delete",{self:this},this._deleteDisplay),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.trigger("destroy"),this.elmt._ditty_displays_panel=null}},$.fn.ditty_displays_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_displays_panel||(this._ditty_displays_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_displays_panel;if(!i)throw new Error("No Ditty_Displays_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Displays_Panel.');return void 0!==e?e:this}},$.ditty_displays_panel={},$.ditty_displays_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_display_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$optionsTitle=this.$elmt.find(".ditty-editor-options__title"),this.$importExportField=this.$elmt.find(".ditty-editor__import-export__field"),this.$importExportUpdate=this.$elmt.find(".ditty-editor__import-export__update"),this.displayTitle=null,this.displayId=this.settings.editor.ditty.options("display"),this.displayType=this.settings.editor.ditty.options("type"),this.$editorDisplay=this.settings.editor.$panels.find(".ditty-editor__panel--displays").find(".ditty-data-list__item.editing"),this.$editorDisplayTitle=this.$editorDisplay.find(".ditty-data-list__item__label"),this.displayOptions=null,this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){var t,i=this;this.initData=this.$form.serialize(),this.settings.editor.initFields(this.$elmt),t=this.settings.editor.ditty.$elmt["ditty_"+this.displayType]("options"),this.displayOptions=$.extend({},t),this.displayTitle=this.$optionsTitle.val(),this.$importExportUpdate.on("click",{self:this},this._importUpdate),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.on("submit",{self:this},this._submitForm),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("change",'input[type="text"], input[type="number"]',{self:this},this._textfieldListeners),this.$form.on("click",'input[type="radio"]',{self:this},this._radioListeners),this.$form.on("click",'input[type="checkbox"]',{self:this},this._checkboxListeners),this.$form.on("change","select",{self:this},this._selectListeners),this.$form.on("ditty_field_clone_update",{self:this},this._cloneListeners),setTimeout((function(){i.trigger("init",[i])}),1)},_showDisplayList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","displays")},_checkUpdates:function(){this.$form.serialize()!==this.initData?(this.settings.editor.addUpdate("displaySettings",this.displayId),this.settings.editor.delayedSubmitEnable()):this.settings.editor.removeUpdate("displaySettings",this.displayId)},_addDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.$form.serialize()===i.initData?i._showDisplayList():(i.afterUpdateAction="return",i.$form.trigger("submit"))},_submitForm:function(t){t.preventDefault();var i=t.data.self;i.settings.editor.updateStart();var e={action:"ditty_editor_display_update",display_id:i.displayId,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:e,success:function(t){i.initData=i.$form.serialize(),t.draft_id&&t.draft_label&&(i.displayTitle=t.draft_label,i.$editorDisplayTitle.text(t.draft_label),dittyDraftDisplayUpdate(i,t.draft_id,"label",t.draft_label)),t.draft_id&&t.draft_settings&&(i.displayOptions=t.draft_settings,dittyDraftDisplayUpdate(i,t.draft_id,"settings",t.draft_settings)),t.draft_settings_json&&i.$importExportField.length&&i.$importExportField.val(t.draft_settings_json),i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showDisplayList(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty(),i.afterUpdateAction=""}})},_importUpdate:function(t){t.preventDefault()},_cloneListeners:function(t,i,e){var s=t.data.self;$(t.target);s.settings.editor.ditty.options(e,i)},_textfieldListeners:function(t){var i=t.data.self,e=$(t.target),s=e.attr("name"),a=e.parents(".ditty-input--spacing__group, .ditty-input--radius__group");if(a.length){var d="",n={};a.find("input").each((function(){s=$(this).attr("name"),d=(d=s.split("["))[0];var t=s.match(/\[(.*)\]/);n[t[1]]=$(this).val()})),i.settings.editor.ditty.options(d,n)}else i.settings.editor.ditty.options(s,e.val());i._checkUpdates()},_radioListeners:function(t){var i=t.data.self,e=$(t.target),s=e.val(),a=e.attr("name");i.settings.editor.ditty.options(a,s),i._checkUpdates()},_checkboxListeners:function(t){var i=t.data.self,e=$(t.target),s=!!e.is(":checked")&&$(this).val(),a=e.attr("name");i.settings.editor.ditty.options(a,s),i._checkUpdates()},_selectListeners:function(t){var i=t.data.self,e=$(t.target),s=e.val(),a=e.attr("name");i.settings.editor.ditty.options(a,s),i._checkUpdates()},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_display_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_display_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.trigger("destroy",[this]),this.$importExportUpdate.off("click",{this:this},this._importUpdate),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.off("submit",{this:this},this._submitForm),this.$back.off("click",{this:this},this._cancel_click),this.$elmt.off("change",'input[type="text"], input[type="number"]',{self:this},this._textfieldListeners),this.$form.off("click",'input[type="radio"]',{self:this},this._radioListeners),this.$form.off("click",'input[type="checkbox"]',{self:this},this._checkboxListeners),this.$form.off("change","select",{self:this},this._selectListeners),this.$form.off("ditty_field_clone_update",{self:this},this._cloneListeners),this.elmt._ditty_display_editor_panel=null}},$.fn.ditty_display_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_display_editor_panel||(this._ditty_display_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_display_editor_panel;if(!i)throw new Error("No Ditty_Display_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Display_Editor_Panel.');return void 0!==e?e:this}},$.ditty_display_editor_panel={},$.ditty_display_editor_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layout_variations_panel.defaults,e),this.$elmt=$(i),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$list=$(i).find(".ditty-data-list__items"),this.$editorItem=dittyVars.editor.currentItem,this.editorItemLabel=this.$editorItem.find(".ditty-data-list__item__label").text(),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemType=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("click",".ditty-layout-variation__change",{self:this},this._changeTemplate),this.$elmt.on("click",".ditty-layout-variation__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.on("click",".ditty-layout-variation__edit_css",{self:this,editType:"css"},this._editLayout),$("body").on("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse)},_showItemList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","items")},_backClick:function(t){t.preventDefault(),t.data.self._showItemList()},_dittyEditorSaveResponse:function(t,i){t.data.self;i.ditty_new_layout_ids&&$.each(i.ditty_new_layout_ids,(function(t,i){var e=$('.ditty-layout-variation[data-layout_id="'+t+'"]');e.length&&e.attr("data-layout_id",i).data("layout_id",i)}))},_changeTemplate:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("layout_id"),a=e.data("layout_variation_id"),d=e.data("layout_variation_label");dittyVars.editor.currentLayoutVariation=e,i.settings.editor.updateStart(),e.addClass("editing");var n={action:"ditty_editor_layouts",ditty_id:i.editorDittyId,item_type:i.editorItemType,variation_id:a,variation_label:d,layout_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,n,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--layouts">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("layouts",e)}}))},_editLayout:function(t){t.preventDefault();var i=t.data.self,e=t.data.editType,s=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),a=s.data("layout_id");dittyVars.editor.currentLayoutVariation=s,i.settings.editor.updateStart(),i.$list.find(".ditty-data-list__item").removeClass("editing"),s.addClass("editing");var d=[],n=i.settings.editor.ditty.options("items");$.each(n,(function(t,i){d.push(i.uniqId)}));var r={action:"ditty_editor_layout_fields",layout_id:a,item_type:i.editorItemType,item_value:i.editorItemValue,ditty_id:i.editorDittyId,item_id:i.editorItemId,item_ids:d,edit_type:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,r,(function(t){if(t){var s="layout_"+e+"_editor",a='<div class="ditty-editor__panel ditty-editor__panel--'+s+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel(s,a)}}),"json")},panelVisible:function(){this.$list.find(".ditty-layout-variation").removeClass("editing")},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layout_variations_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layout_variations_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$back.off("click",{self:this},this._backClick),this.$elmt.off("click",".ditty-layout-variation__change",{self:this},this._changeTemplate),this.$elmt.off("click",".ditty-layout-variation__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.off("click",".ditty-layout-variation__edit_css",{self:this,editType:"css"},this._editLayout),$("body").off("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this.elmt._ditty_layout_variations_panel=null}},$.fn.ditty_layout_variations_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layout_variations_panel||(this._ditty_layout_variations_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layout_variations_panel;if(!i)throw new Error("No Ditty_Layout_Variations_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layout_Variations_Panel.');return void 0!==e?e:this}},$.ditty_layout_variations_panel={},$.ditty_layout_variations_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layouts_panel.defaults,e),this.$elmt=$(i),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$list=$(i).find(".ditty-data-list__items"),this.$editorItem=dittyVars.editor.currentItem,this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemtype=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this.$editorVariation=dittyVars.editor.currentLayoutVariation,this.editorVariationId=this.$editorVariation.data("layout_variation_id"),this.editorLayoutId=this.$editorVariation.data("layout_id"),this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("click",".ditty-data-list__item",{self:this},this._selectLayout),this.$elmt.on("click",".ditty-data-list__item__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.on("click",".ditty-data-list__item__edit_css",{self:this,editType:"css"},this._editLayout),this.$elmt.on("click",".ditty-data-list__item__clone",{self:this},this._cloneLayout),this.$elmt.on("click",".ditty-data-list__item__delete",{self:this},this._deleteLayout),this.$elmt.on("click",".ditty-data-list__item__save",{self:this},this._saveLayout),this.$list.on("click",".ditty-editor-layout > a",{self:this},this._actionClick),$("body").on("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this._activateLayout(this.$list.find("#ditty-editor-layout--"+this.editorLayoutId))},_activateLayout:function(t){this.$list.find(".ditty-editor-layout").removeClass("active"),t.addClass("active")},_showVariationsList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","layout_variations")},_backClick:function(t){t.preventDefault(),t.data.self._showVariationsList()},_dittyEditorSaveResponse:function(t,i){t.data.self;i.ditty_new_layout_ids&&$.each(i.ditty_new_layout_ids,(function(t,i){var e=$("#ditty-editor-layout--"+t);e.length&&(e.attr("id","ditty-editor-layout--"+i),e.attr("data-layout_id",i).data("layout_id",i))}))},_selectLayout:function(t){t.preventDefault();var i=t.data.self;if($(t.target).parent().is("a"))return!1;var e=$(t.target).is(".ditty-data-list__item")?$(t.target):$(t.target).parents(".ditty-data-list__item"),s=e.data("layout_id"),a=e.data("layout_version"),d=i.$editorItem.data("layout_value");if(e.hasClass("active"))return!1;$.each(d,(function(t){i.editorVariationId===t&&(d[t]=String(s))})),i.settings.editor.updateStart(),dittyDraftItemUpdateData(i,i.editorItemId,"layout_value",d),i._activateLayout(e);var n={action:"ditty_editor_select_layout",layout_id:s,item_id:i.editorItemId,ditty_id:i.editorDittyId,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,n,(function(t){if(i.settings.editor.updateStop(),t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,i.editorItemId),t.editor_item){var e=$(t.editor_item);i.$editorItem.replaceWith(e)}i.$editorItem.attr("data-layout_value",d).data("layout_value",d),i.$editorVariation.attr("data-layout_id",s).data("layout_id",s),i.$editorVariation.find(".ditty-layout-variation__template > span").text(t.layout_label),a?i.$editorVariation.find(".ditty-layout-variation__template > small").text("("+a+")"):i.$editorVariation.find(".ditty-layout-variation__template > small").text("")}),"json")},_cloneLayout:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("layout_id");i.settings.editor.updateStart();var a={action:"ditty_editor_layout_clone",
3
- layout_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t.editor_layout){var s=$(t.editor_layout);s.hide(),e.after(s),s.slideDown()}t.draft_id&&t.draft_meta&&dittyDraftLayoutUpdate(i,t.draft_id,null,t.draft_meta),i.settings.editor.updateStop()}),"json")},_saveLayout:function(t){t.preventDefault();t.data.self,($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item").data("layout_id")},_deleteLayout:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=null,a=e.data("layout_id");e.hasClass("active")&&(e.prev().length?s=e.prev():e.next().length&&(s=e.next())),e.slideUp((function(){$(this).remove()})),dittyDraftLayoutDelete(i,a),null!==s&&s.trigger("click")},_editLayout:function(t){t.preventDefault();var i=t.data.self,e=t.data.editType,s=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),a=s.data("layout_id");i.settings.editor.updateStart(),i.$list.find(".ditty-data-list__item").removeClass("editing"),s.addClass("editing");var d={action:"ditty_editor_layout_fields",layout_id:a,item_id:i.editorItemId,item_type:i.editorItemtype,item_value:i.editorItemValue,edit_type:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,d,(function(t){if(t){var s="layout_"+e+"_editor",a='<div class="ditty-editor__panel ditty-editor__panel--'+s+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel(s,a)}}),"json")},_actionClick:function(t){t.preventDefault();var i=t.data.self,e=$(t.target).is("a")?$(t.target):$(t.target).parent("a"),s=e.parents(".ditty-data-list__item"),a=s.data("layout_id");dittyVars.editor.currentLayout=s,$("body").trigger("ditty_editor_layout_action_click",[e,s,a,i.editorDittyId,i.settings.editor])},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layouts_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layouts_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$back.off("click",{self:this},this._backClick),this.$elmt.off("click",".ditty-data-list__item",{self:this},this._selectLayout),this.$elmt.off("click",".ditty-data-list__item__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.off("click",".ditty-data-list__item__edit_css",{self:this,editType:"css"},this._editLayout),this.$elmt.off("click",".ditty-data-list__item__clone",{self:this},this._cloneLayout),this.$elmt.off("click",".ditty-data-list__item__delete",{self:this},this._deleteLayout),this.$elmt.off("click",".ditty-data-list__item__save",{self:this},this._saveLayout),this.$list.off("click",".ditty-editor-layout > a",{self:this},this._actionClick),$("body").off("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this.elmt._ditty_layouts_panel=null}},$.fn.ditty_layouts_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layouts_panel||(this._ditty_layouts_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layouts_panel;if(!i)throw new Error("No Ditty_Layouts_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layouts_Panel.');return void 0!==e?e:this}},$.ditty_layouts_panel={},$.ditty_layouts_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null,prevPanel:""},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layout_html_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$textarea=this.$elmt.find(".ditty-editor-options__code"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$preview=this.$elmt.find(".ditty-editor-options__preview"),this.$editCss=this.$elmt.find(".ditty-editor-options__edit-css"),this.$title=this.$elmt.find(".ditty-editor-options__title"),this.$tags=this.$elmt.find(".ditty-editor-options__tags"),this.itemType=this.$form.data("item_type"),this.layoutId=this.$form.data("layout_id"),this.$editorItem=dittyVars.editor.currentItem,this.$editorLayout=dittyVars.editor.currentLayout,this.$editorLayoutTitle=!!this.$editorLayout&&this.$editorLayout.find(".ditty-data-list__item__label"),this.$editorLayoutVariation=dittyVars.editor.currentLayoutVariation,this.$editorLayoutVariationTitle=this.$editorLayoutVariation.find(".ditty-layout-variation__template span"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemType=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this.codeEditor=null,this.codeHasUpdates=!1,this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){this.initData=this.$form.serialize(),this._initEditor(),this.$back.on("click",{self:this},this._backClick),this.$preview.on("click",{self:this},this._previewClick),this.$editCss.on("click",{self:this},this._editCss),this.$form.on("submit",{self:this},this._submitForm),this.$form.on("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.on("keyup",{self:this},this._titleUpdate),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts)},_showPrevPanel:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById",this.settings.prevPanel)},_titleUpdate:function(t){var i=t.data.self;i.settings.editor.addUpdate("layoutUpdate",i.layoutId)},_enablePreviewButton:function(){this.$preview.addClass("ditty-has-updates")},_disablePreviewButton:function(){this.$preview.removeClass("ditty-has-updates"),this.$preview.children("i").attr("class",this.$preview.children("i").data("class"))},_getLayoutItems:function(){var t=this.settings.editor.ditty.options("items"),i=[];return $.each(t,(function(t,e){String(e.layoutId)===String(this.layoutId)&&i.push(e.id)})),i},_addDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),i.$form.serialize()!==i.initData||i.codeHasUpdates?(i.afterUpdateAction="return",i.$form.trigger("submit")):i._showPrevPanel()},_previewClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit"))},_editCss:function(t){t.preventDefault();var i=t.data.self,e="layout_css_editor";if(i.settings.editor.updateStart(),i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit")),i.settings.editor.panelExists(e))i.settings.editor.$elmt.find(".ditty-editor__panel--layout_css_editor input.ditty-editor-options__title").val(i.$title.val()),i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e);else{var s={action:"ditty_editor_layout_fields",layout_id:i.layoutId,layout_title:i.$title.val(),ditty_id:i.editorDittyId,item_id:i.editorItemId,item_type:i.editorItemType,item_value:i.editorItemValue,edit_type:"css",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,s,(function(t){if(t){var s='<div class="ditty-editor__panel ditty-editor__panel--'+e+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e,s)}}),"json")}},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.layoutId,s=i.itemType,a=i._getLayoutItems();if(i.$form.hasClass("ditty-editor-has-errors"))return!1;i.codeEditor.codemirror.save(),i.settings.editor.updateStart();var d={action:"ditty_editor_layout_update",layout_id:e,item_type:s,item_ids:a,edit_type:"html",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:d,success:function(t){i.initData=i.$form.serialize(),i._disablePreviewButton(),t.label&&(i.$editorLayoutTitle&&i.$editorLayoutTitle.html(t.label),i.$editorLayoutVariationTitle.html(t.label)),i.$editorLayoutTitle&&i.$editorLayoutTitle.find(".ditty-layout-version").remove(),i.$editorLayoutVariationTitle&&i.$editorLayoutVariationTitle.find(".ditty-layout-version").remove(),t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,!1,!1,!0),t.draft_id&&t.draft_meta&&dittyDraftLayoutUpdate(i,t.draft_id,null,t.draft_meta),i.codeHasUpdates=!1,i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showPrevPanel(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty({return_items:0}),i.afterUpdateAction=""}})},_initEditor:function(){var t=this,i=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{};i.codemirror=_.extend({},i.codemirror,{indentUnit:2,tabSize:2}),this.codeEditor=wp.codeEditor.initialize(this.$textarea[0],i),this.codeEditor.codemirror.on("change",(function(){t.codeEditor.codemirror.save(),t.settings.editor.addUpdate("layout_html_update",t.layoutId),t.codeHasUpdates=!0,t._enablePreviewButton(),t.settings.editor.delayedSubmitEnable()}))},_insertTag:function(t){var i=t.data.self,e=$(t.target),s=e.text(),a=e.data("atts"),d=i.codeEditor.codemirror.getCursor();if(t.shiftKey&&a){var n="",r=s.length-1;$.each(a,(function(t,i){n+=" "+t+'="'+i.toString()+'"'})),s=s.substring(0,r)+n+s.substring(r)}i.codeEditor.codemirror.replaceRange(s,d),d.ch=d.ch+s.length,i.codeEditor.codemirror.setCursor(d)},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layout_html_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layout_html_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$back.off("click",{self:this},this._backClick),this.$preview.off("click",{self:this},this._previewClick),this.$editCss.off("click",{self:this},this._editCss),this.$form.off("submit",{self:this},this._submitForm),this.$form.off("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.off("keyup",{self:this},this._titleUpdate),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.codeEditor.codemirror.off("change"),this.codeEditor.codemirror.toTextArea(),this.elmt._ditty_layout_html_editor_panel=null}},$.fn.ditty_layout_html_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layout_html_editor_panel||(this._ditty_layout_html_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layout_html_editor_panel;if(!i)throw new Error("No Ditty_Layout_Html_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layout_Html_Editor_Panel.');return void 0!==e?e:this}},$.ditty_layout_html_editor_panel={},$.ditty_layout_html_editor_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null,prevPanel:""},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layout_css_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$textarea=this.$elmt.find(".ditty-editor-options__code"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$preview=this.$elmt.find(".ditty-editor-options__preview"),this.$editHtml=this.$elmt.find(".ditty-editor-options__edit-html"),this.$title=this.$elmt.find(".ditty-editor-options__title"),this.$body=this.$elmt.find(".ditty-editor-options__body"),this.$tags=this.$elmt.find(".ditty-editor-options__tags"),this.itemType=this.$form.data("item_type"),this.layoutId=this.$form.data("layout_id"),this.$editorItem=dittyVars.editor.currentItem,this.$editorLayout=dittyVars.editor.currentLayout,this.$editorLayoutTitle=!!this.$editorLayout&&this.$editorLayout.find(".ditty-data-list__item__label"),this.$editorLayoutVariation=dittyVars.editor.currentLayoutVariation,this.$editorLayoutVariationTitle=this.$editorLayoutVariation.find(".ditty-layout-variation__template span"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemType=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this.itemSelector="",this.codeEditor=null,this.codeHasUpdates=!1,this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){this.initData=this.$form.serialize(),this._setCssSelector(),this._initEditor(),this.$back.on("click",{self:this},this._backClick),this.$preview.on("click",{self:this},this._previewClick),this.$editHtml.on("click",{self:this},this._editHtml),this.$form.on("submit",{self:this},this._submitForm),this.$form.on("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.on("keyup",{self:this},this._titleUpdate),this.$body.on("click",".ditty-editor-options__body__error",{self:this},this._removeErrorNotice),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts)},_setCssSelector:function(){dittyVars.isTickerPost?this.itemSelector="#poststuff .ditty-layout--"+this.layoutId:this.itemSelector=".ditty-layout--"+this.layoutId},_showPrevPanel:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById",this.settings.prevPanel)},_titleUpdate:function(t){var i=t.data.self;i.settings.editor.addUpdate("layoutUpdate",i.layoutId)},_enablePreviewButton:function(){this.$preview.addClass("ditty-has-updates")},_disablePreviewButton:function(){this.$preview.removeClass("ditty-has-updates"),this.$preview.children("i").attr("class",this.$preview.children("i").data("class"))},_addDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),i.$form.serialize()!==i.initData||i.codeHasUpdates?(i.afterUpdateAction="return",i.$form.trigger("submit")):i._showPrevPanel()},_previewClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit"))},_editHtml:function(t){t.preventDefault();var i=t.data.self,e="layout_html_editor";if(i.settings.editor.updateStart(),i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit")),i.settings.editor.panelExists(e))i.settings.editor.$elmt.find(".ditty-editor__panel--layout_html_editor input.ditty-editor-options__title").val(i.$title.val()),i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e);else{var s={action:"ditty_editor_layout_fields",layout_id:i.layoutId,layout_title:i.$title.val(),ditty_id:i.editorDittyId,item_id:i.editorItemId,item_type:i.editorItemType,item_value:i.editorItemValue,edit_type:"html",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,s,(function(t){if(t){var s='<div class="ditty-editor__panel ditty-editor__panel--'+e+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e,s)}}),"json")}},_showErrorNotice:function(){var t=$('<div class="ditty-editor-options__body__error"><span>'+dittyVars.strings.layout_css_error+"</span></div>");this.$body.append(t)},_removeErrorNotice:function(t){t.data.self.$body.find(".ditty-editor-options__body__error").remove()},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.layoutId,s=i.itemType;if(i.$form.hasClass("ditty-editor-has-errors"))return!1;i.codeEditor.codemirror.save(),i.settings.editor.updateStart();var a={action:"ditty_editor_layout_update",layout_id:e,item_type:s,edit_type:"css",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:a,success:function(t){i.initData=i.$form.serialize(),i._disablePreviewButton(),t.label&&(i.$editorLayoutTitle&&i.$editorLayoutTitle.html(t.label),i.$editorLayoutVariationTitle.html(t.label)),i.$editorLayoutTitle&&i.$editorLayoutTitle.find(".ditty-layout-version").remove(),i.$editorLayoutVariationTitle&&i.$editorLayoutVariationTitle.find(".ditty-layout-version").remove(),t.code?dittyLayoutCss(t.code,i.layoutId,"update"):i._showErrorNotice(),t.draft_id&&t.draft_meta&&dittyDraftLayoutUpdate(i,t.draft_id,null,t.draft_meta),i.codeHasUpdates=!1,i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showPrevPanel(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty(),i.afterUpdateAction=""}})},_initEditor:function(){var t=this,i=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{},e=dittyVars.editor.ditty_layouts_sass?"sass":"css";i.codemirror=_.extend({},i.codemirror,{mode:e,indentUnit:2,tabSize:2}),this.codeEditor=wp.codeEditor.initialize(this.$textarea[0],i),this.codeEditor.codemirror.on("change",(function(){t.codeEditor.codemirror.save(),t.settings.editor.addUpdate("layoutCssUpdate",t.layoutId),t.codeHasUpdates=!0,t._enablePreviewButton(),t.settings.editor.delayedSubmitEnable()}))},_insertTag:function(t){var i=t.data.self,e=$(t.target).text(),s=i.codeEditor.codemirror.getCursor();i.codeEditor.codemirror.replaceRange(e,s),s.ch=s.ch+e.length,i.codeEditor.codemirror.setCursor(s)},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layout_css_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layout_css_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$back.off("click",{self:this},this._backClick),this.$preview.off("click",{self:this},this._previewClick),this.$editHtml.off("click",{self:this},this._editHtml),this.$form.off("submit",{self:this},this._submitForm),this.$form.off("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.off("keyup",{self:this},this._titleUpdate),this.$body.off("click",".ditty-editor-options__body__error",{self:this},this._removeErrorNotice),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.codeEditor.codemirror.off("change"),this.codeEditor.codemirror.toTextArea(),this.elmt._ditty_layout_css_editor_panel=null}},$.fn.ditty_layout_css_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layout_css_editor_panel||(this._ditty_layout_css_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layout_css_editor_panel;if(!i)throw new Error("No Ditty_Layout_Css_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layout_Css_Editor_Panel.');return void 0!==e?e:this}},$.ditty_layout_css_editor_panel={},$.ditty_layout_css_editor_panel.defaults=t}(jQuery),jQuery((function($){!function(){"use strict";function t(t,i){0===parseInt(i)?t.hide():t.show()}function i(t,i){"none"===i?t.hide():t.show()}function e(t,i){"none"===i?t.hide():t.show()}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(s,a){if("list"===a.displayType){var d=a.$form,n=d.find(".ditty-field--perPage"),r=d.find(".ditty-field--arrows").siblings(),o=d.find(".ditty-field--bullets").siblings();t(n,d.find('input[name="paging"]:checked').val()),d.find('input[name="paging"]').on("change",(function(){t(n,$(this).val())})),i(r,d.find('select[name="arrows"]').val()),d.find('select[name="arrows"]').on("change",(function(){i(r,$(this).val())})),e(o,d.find('select[name="bullets"]').val()),d.find('select[name="bullets"]').on("change",(function(){e(o,$(this).val())}))}}))}()})),jQuery((function($){!function(){"use strict";function t(t,i){var e=t.find('input[name="direction"]:checked').val(),s=t.find(".ditty-field--minHeight"),a=t.find(".ditty-field--maxHeight"),d=t.find('input[name="minHeight"]');if("down"===e||"up"===e){if(s.show(),a.show(),""===d.val()){var n="300px";d.val(n),i.options("minHeight",n)}}else s.hide(),a.hide()}function i(t){"filled"===t.find('input[name="scrollInit"]:checked').val()?t.find(".ditty-field--scrollDelay").show():t.find(".ditty-field--scrollDelay").hide()}function e(t){"no"===t.find('input[name="cloneItems"]:checked').val()?t.find(".ditty-field--wrapItems").show():t.find(".ditty-field--wrapItems").hide()}function s(t){var i=t.find('select[name="titleDisplay"]').val(),e=t.find(".ditty-field--titleDisplay");"none"===i?e.siblings().hide():e.siblings().show()}function a(a,d){t(a,d),a.find('input[name="direction"]').on("click",(function(){t(a,d)})),i(a),a.find('input[name="scrollInit"]').on("click",(function(){i(a)})),e(a),a.find('input[name="cloneItems"]').on("click",(function(){e(a)})),s(a),a.find('select[name="titleDisplay"]').on("change",(function(){s(a)}))}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(t,i){if("ticker"===i.displayType){var e=i.$form,s=e.parents("#ditty-editor__settings")[0];a(e,s._ditty_editor.ditty)}})),$(".ditty-sandbox").on("ditty_sandbox_init",(function(t,i,e){"ticker"===i.displayType&&a($(this).find("form"),e)}))}()})),jQuery((function($){!function(){"use strict";function t(t){"full"===t.find('input[name="content_display"]:checked').val()?(t.find(".ditty-field--more_link").hide(),t.find(".ditty-field--excerpt_length").hide(),t.find(".ditty-field--more").hide(),t.find(".ditty-field--more_before").hide(),t.find(".ditty-field--more_after").hide()):(t.find(".ditty-field--more_link").show(),t.find(".ditty-field--excerpt_length").show(),t.find(".ditty-field--more").show(),t.find(".ditty-field--more_before").show(),t.find(".ditty-field--more_after").show())}$("#ditty-editor").on("ditty_item_editor_panel_init",".ditty-editor__panel--item_editor",(function(i,e){if("posts_feed"!==e.itemType&&"post"!==e.itemType)return!1;var s=e.$form;t(s),s.on("click",'input[name="content_display"]',(function(){t(s)}))}))}()}));
1
  function dittyEditorInit(t){if(!t)return!1;jQuery("#ditty-editor__settings").ditty_editor({ditty:t})}function dittyGetItemsById(t,i){var e=[];return jQuery.each(t,(function(t,s){String(s.id)===String(i)&&e.push(s)})),e}function dittyItemsReorder(t,i){var e=[];return jQuery.each(i,(function(i,s){e=jQuery.merge(e,dittyGetItemsById(t,s))})),e}function dittyDraftUpdate(t,i,e,s){var a=t.settings.editor.getDraftValues(i);return a||(a={}),e?a[e]=s:a=s,t.settings.editor.updateDraftValues(i,a)}function dittyDraftGet(t,i,e){var s=t.settings.editor.getDraftValues(i);return!!s&&(e&&s[e]?s[e]:s)}function dittyDraftDelete(t,i,e){var s=i.settings.editor.getDraftValues(t),a={};return jQuery.each(s,(function(t,i){String(e)!==String(t)&&(a[t]=i)})),"new-"!==String(e).substring(0,4)&&(a[e]="DELETE"),i.settings.editor.updateDraftValues(t,a)}function dittyDraftItemDelete(t,i){return dittyDraftDelete("items",t,i)}function dittyDraftLayoutDelete(t,i){return dittyDraftDelete("layouts",t,i)}function dittyDraftDisplayDelete(t,i){return dittyDraftDelete("displays",t,i)}function dittyDraftItemUpdateData(t,i,e,s){var a=t.settings.editor.getDraftValues("items");return a||(a={}),a[i]||(a[i]={}),a[i].data||(a[i].data={}),e?a[i].data[e]=s:a[i].data=s,t.settings.editor.updateDraftValues("items",a)}function dittyDraftItemGetData(t,i,e){var s=t.settings.editor.getDraftValues("items");return!!s[i]&&(!!s[i].data&&(e?s[i].data[e]?s[i].data[e]:void 0:s[i].data))}function dittyDraftItemUpdateMeta(t,i,e,s){var a=t.settings.editor.getDraftValues("items");return a||(a={}),a[i]||(a[i]={}),a[i].meta||(a[i].meta={}),e?a[i].meta[e]=s:a[i].meta=s,t.settings.editor.updateDraftValues("items",a)}function dittyDraftItemGetMeta(t,i,e){var s=t.settings.editor.getDraftValues("items");return!!s[i]&&(!!s[i].meta&&(e?s[i].meta[e]?s[i].meta[e]:void 0:s[i].meta))}function dittyDraftLayoutUpdate(t,i,e,s){var a=t.settings.editor.getDraftValues("layouts");return a||(a={}),a[i]||(a[i]={}),e?a[i][e]=s:a[i]=s,t.settings.editor.updateDraftValues("layouts",a)}function dittyDraftLayoutGet(t,i,e){var s=t.settings.editor.getDraftValues("layouts");return!!s[i]&&(e?s[i][e]?s[i][e]:void 0:s[i])}function dittyDraftDisplayUpdate(t,i,e,s){var a=t.settings.editor.getDraftValues("displays");return a||(a={}),a[i]||(a[i]={}),e?a[i][e]=s:a[i]=s,t.settings.editor.updateDraftValues("displays",a)}function dittyDraftDisplayGet(t,i,e){var s=t.settings.editor.getDraftValues("layouts");return!!s[i]&&(e?s[i][e]?s[i][e]:void 0:s[i])}jQuery((function($){!function(){"use strict";$("body").on("ditty_editor_before_panel_update",(function(t,i,e,s,a,d){switch(d.delayedSubmitDisable(),$.protip({defaults:{position:"top",size:"small",scheme:"black",classes:"ditty-protip"}}),i){case"settings":e.hasClass("init")||e.ditty_settings_panel({editor:d});break;case"items":e.hasClass("init")?e.ditty_items_panel("panelVisible"):e.ditty_items_panel({editor:d});break;case"displays":e.find(".ditty-data-list__item").removeClass("editing"),e.hasClass("init")?e.ditty_displays_panel("panelVisible"):e.ditty_displays_panel({editor:d});break;case"item_types":e.find(".ditty-data-list__item").removeClass("editing"),e.hasClass("init")?e.ditty_item_types_panel("panelVisible"):e.ditty_item_types_panel({editor:d});break;case"item_editor":e.ditty_item_editor_panel({editor:d});break;case"display_editor":e.ditty_display_editor_panel({editor:d});break;case"layouts":"layoutHtmlEditor"!==s&&"layoutCssEditor"!==s&&e.ditty_layouts_panel({editor:d});break;case"layout_variations":e.hasClass("init")?e.ditty_layout_variations_panel("panelVisible"):e.ditty_layout_variations_panel({editor:d});break;case"layout_html_editor":e.ditty_layout_html_editor_panel({editor:d,prevPanel:s});break;case"layout_css_editor":e.ditty_layout_css_editor_panel({editor:d,prevPanel:s})}})),$("body").on("ditty_editor_panel_removed",(function(t,i,e){switch(i){case"item_editor":e.ditty_item_editor_panel&&e.ditty_item_editor_panel("destroy");break;case"display_editor":e.ditty_display_editor_panel&&e.ditty_display_editor_panel("destroy");break;case"layouts":case"layouts":e.ditty_layouts_panel&&e.ditty_layouts_panel("destroy");break;case"layout_variations":e.ditty_layout_variations_panel&&e.ditty_layout_variations_panel("destroy");break;case"layout_html_editor":e.ditty_layout_html_editor_panel&&e.ditty_layout_html_editor_panel("destroy");break;case"layout_css_editor":e.ditty_layout_css_editor_panel&&e.ditty_layout_css_editor_panel("destroy")}}))}()})),dittyEditorInit(),function($){"use strict";var t={listType:"toggle",showAll:!0,activeFilter:"*",filter:".ditty-data-list__filter",filterSelector:"filter",item:".ditty-data-list__item",itemSelector:"filter"},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_ui_data_list.defaults,e),this.$elmt=$(i),this.filters=[],this._init()};i.prototype={_init:function(){var t=this;this.$elmt.on("click",this.settings.filter,{self:this},this._filterClick),this.$elmt.find(this.settings.filter+".active").each((function(){t._filterList($(this).data(t.settings.filterSelector))})),"*"!==this.settings.activeFilter&&this._filterList(this.settings.activeFilter),setTimeout((function(){t.trigger("init")}),1)},_filterList:function(t){var i=this,e=this.filters;if("toggle"===this.settings.listType)this.filters.includes(t)?this.settings.showAll&&(this.filters=[],this.$elmt.find(this.settings.filter).removeClass("active"),this.$elmt.find(this.settings.item).show()):(this.filters=[t],this.$elmt.find(this.settings.filter).removeClass("active"),this.$elmt.find(this.settings.filter+"[data-"+this.settings.filterSelector+'="'+t+'"]').addClass("active"),this.$elmt.find(this.settings.item).hide(),this.$elmt.find(this.settings.item+"[data-"+this.settings.itemSelector+'="'+t+'"]').show());else if("filter"===this.settings.listType){if(this.$elmt.find(this.settings.item).hide(),this.filters.includes(t)){this.$elmt.find(this.settings.filter+"[data-"+this.settings.filterSelector+'="'+t+'"]').removeClass("active");for(var s=0;s<this.filters.length;s++)i.filters[s]===t&&i.filters.splice(s,1)}else this.$elmt.find(this.settings.filter+"[data-"+this.settings.filterSelector+'="'+t+'"]').addClass("active"),this.filters.push(t);$.each(this.filters,(function(t,e){i.$elmt.find(this.settings.item+"[data-"+this.settings.itemSelector+'="'+e+'"]').show()})),0===this.filters.length&&i.$elmt.find(this.settings.item).show()}e!==this.filters&&i.trigger("update")},_filterClick:function(t){t.preventDefault();var i=t.data.self,e=$(t.target);e.is("a")||(e=e.parents("a")),i._filterList(e.data(i.settings.filterSelector))},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings,this.filters];i&&(e=i),this.$elmt.trigger("ditty_ui_data_list_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_ui_data_list.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.off("click",this.settings.filter,{self:this},this._filterClick),this.trigger("destroy"),this.elmt._ditty_ui_data_list=null}},$.fn.ditty_ui_data_list=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_ui_data_list||(this._ditty_ui_data_list=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_ui_data_list;if(!i)throw new Error("No Ditty_UI_Data_List applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_UI_Data_List.');return void 0!==e?e:this}},$.ditty_ui_data_list={},$.ditty_ui_data_list.defaults=t}(jQuery),function($){"use strict";var t={screen:"admin",ditty:null,panel:""},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_editor.defaults,e),this.$elmt=$(i),this.ditty=this.settings.ditty,this.dittyId=this.settings.ditty.options("id"),this.dittyType=this.settings.ditty.options("type"),this.displayId=0,this.panelsLoaded=0,this.unsavedUpdates={},this.draftValues={},this.$overlay=null,this.$contents=null,this.$header=null,this.$update=null,this.$updateCount=null,this.$updateLabel=null,this.$tabs=null,this.$panels=null,this.currentTab=0,this.currentPanel=this.settings.panel,this.delayedSubmit=!1,this.tabs=[],this.panels=[],this.activeItems=[],this._init()};i.prototype={_init:function(){var t,i,e,s,a,d,n,r=this;t=$('<div class="ditty-editor__contents"></div>'),this.$contents=t,i=$('<div class="ditty-editor__header"></div>'),this.$header=i,e=$('<span class="ditty-editor__update__count"></span>'),this.$updateCount=e,s=$('<span class="ditty-editor__update__label">Save Ditty</span>'),this.$updateLabel=s,a=$('<button type="submit" class="ditty-editor__update ditty-button ditty-button--primary"></button>'),this.$update=a,d=$('<div class="ditty-editor__tabs"></div>'),this.$tabs=d,n=$('<div class="ditty-editor__panels"></div>'),this.$panels=n,a.prepend(e,s),i.append(a),t.append(i,d,n),this.$elmt.append(t),this.$overlay=$('<div class="ditty-updating-overlay ditty-admin-item__overlay"><div class="ditty-updating-overlay__inner"><i class="fas fa-sync-alt fa-spin"></i></div></div>'),this.$elmt.append(this.$overlay),$(document).on("postbox-moved",{self:this},this._postboxMoved),$(document).on("postboxes-columnchange",{self:this},this._postboxMoved),$(window).on("beforeunload",{self:this},this._beforeunload),this.ditty.$elmt.on("ditty_active_items_update",{self:this},this._dittyItemsUpdated),this.ditty.$elmt.on("ditty_disabled_items_update",{self:this},this._disabledItemsUpdate),this.$tabs.on("click",".ditty-editor__tab",{self:this},this._showPanel),this.$update.on("click",{self:this},this._saveClick),this.$panels.on("ditty_slider_init",{self:this},this._editorLoaded),this.$panels.on("ditty_slider_before_slide_update",{self:this},this._beforeSlideUpdate),this.$panels.on("ditty_slider_after_slide_update",{self:this},this._afterSlideUpdate),this.$panels.on("ditty_slider_slide_removed",{self:this},this._slideRemoved),this._loadContents(),this.trigger("stop_live_updates"),setTimeout((function(){r.trigger("init")}),1)},_loadContents:function(){var t=this,i={action:"ditty_editor_load_contents",ditty_id:this.dittyId,security:dittyVars.security};$.post(dittyVars.ajaxurl,i,(function(i){t._initTabs(i.tabs),t._initPanels(i.panels),t._initSlider()}),"json")},_editorLoaded:function(t){var i=t.data.self;$("body").trigger("ditty_editor_loaded",[i])},_setUpdateCount:function(){},_initSlider:function(){var t=this.tabs[0].id;this.currentPanel&&""!==this.currentPanel&&(t=this.currentPanel),this.$panels.ditty_slider({transition:"fade",transitionSpeed:.75,heightSpeed:.75,touchSwipe:!1,slides:this.panels,slideId:t})},_beforeSlideUpdate:function(t,i,e,s,a){var d=t.data.self;d.updateStart(),d._updateTab(e.id),$("body").trigger("ditty_editor_before_panel_update",[e.id,e.$elmt,a.id,a.$elmt,d])},_afterSlideUpdate:function(t,i,e,s,a){var d=t.data.self;d.updateStop(),$("body").trigger("ditty_editor_after_panel_update",[e.id,e.$elmt,a.id,a.$elmt,d])},_slideRemoved:function(t,i){var e=t.data.self;$("body").trigger("ditty_editor_panel_removed",[i.id,i.$elmt,e])},_showPanel:function(t){t.preventDefault();var i=t.data.self,e=$(t.target).is("a")?$(t.target):$(t.target).parent("a"),s=e.data("panel"),a=parseInt(e.data("index"));if(s===i.currentTab)return!1;var d=a>i.currentTab?"slideLeft":"slideRight";i.$panels.ditty_slider("options","transition",d),i.$panels.ditty_slider("showSlideById",s),i.currentTab=a,i.$elmt.trigger("ditty_editor_add_drafts")},_updateTab:function(t){var i=$('.ditty-editor__tab[data-panel="'+t+'"]');void 0!==i[0]&&($(".ditty-editor__tab").removeClass("active"),i.addClass("active"),this.currentTab=parseInt(i.data("index")))},_initTabs:function(t){var i=this,e=0;$.each(t,(function(t,s){var a=$('<a href="#" class="ditty-editor__tab ditty-editor__tab--'+t+'" data-panel="'+t+'" data-index="'+e+'"><i class="'+s.icon+'"></i><span>'+s.label+"</span></a>");i.$tabs.append(a),i.tabs.push({id:t,tab:a}),e++}))},_initPanels:function(t){var i=this;$.each(t,(function(t,e){var s='<div class="ditty-editor__panel ditty-editor__panel--'+t+'">'+e+"</div>";i.panels.push({id:t,html:s,cache:!0})}))},_initFields:function(t){t.find(".ditty-data-list").ditty_ui_data_list(),t.trigger("ditty_init_fields"),$.protip({defaults:{position:"top",size:"small",scheme:"black",classes:"ditty-protip"}})},saveDitty:function(t){var i=this,e=i.dittyId;i.$updateLabel.text("Updating..."),i.updateStart();var s={action:"ditty_editor_save",ditty_id:e,draft_values:i.draftValues,return_items:1,security:dittyVars.security};s=$.extend({},s,t),$.post(dittyVars.ajaxurl,s,(function(t){$("body").trigger("ditty_editor_save_ditty_response",[t]),t.display_items&&i.ditty.options("items",t.display_items),i.draftValues={},i.unsavedUpdates={},i._setUpdateCount(),i.$elmt.removeClass("ditty-editor--updates-exist"),i.$updateLabel.text("Ditty Saved!"),setTimeout((function(){i.$updateLabel.text("Save Ditty")}),2e3),i.updateStop(),t.new_ditty_url&&window.history.pushState(null,"","/wp-admin/post.php?post="+e+"&action=edit")}))},_saveClick:function(t){t.preventDefault();var i=t.data.self;i.$elmt.trigger("ditty_editor_save_drafts"),i.delayedSubmit||i.saveDitty()},_dittyItemsUpdated:function(t,i,e){var s=t.data.self;s.activeItems=e,s.trigger("active_items_update")},_disabledItemsUpdate:function(t,i){var e=t.data.self;$.each(i,(function(t,i){"disabled"===i?e.$elmt.find("#ditty-editor-item--"+t).addClass("ditty-editor-item--disabled"):e.$elmt.find("#ditty-editor-item--"+t).removeClass("ditty-editor-item--disabled")}))},_postboxMoved:function(t,i){if(!window.tinymce)return!1;$(i).find(".wp-editor-area").each((function(){var t=$(this).attr("id");tinymce.execCommand("mceRemoveEditor",!0,t),tinymce.execCommand("mceAddEditor",!0,t)}))},_beforeunload:function(t){var i=t.data.self;return Object.keys(i.unsavedUpdates).length>0||void 0},_windowResize:function(t){t.preventDefault()},_options:function(t){return this.settings[t]},panelExists:function(t){var i=this.$panels.ditty_slider("options","slides"),e=!1;return $.each(i,(function(i,s){String(s.id)!==String(t)||(e=!0)})),e},showPanel:function(t,i){i&&this.$panels.ditty_slider("addSlideById",t,i),this.$panels.ditty_slider("showSlideById",t,!0)},updateExists:function(t,i){if(void 0===this.unsavedUpdates[t]&&(this.unsavedUpdates[t]=[]),-1!==$.inArray(i,this.unsavedUpdates[t]))return!0},addUpdate:function(t,i){var e=!1;return void 0===this.unsavedUpdates[t]&&(this.unsavedUpdates[t]=[]),-1===$.inArray(i,this.unsavedUpdates[t])&&(e=!0,this.unsavedUpdates[t].push(i)),this._setUpdateCount(),this.$elmt.addClass("ditty-editor--updates-exist"),e},removeUpdate:function(t,i){if(void 0===this.unsavedUpdates[t])return!1;if(-1===$.inArray(i,this.unsavedUpdates[t]))return!1;var e=!1,s=[];return $.each(this.unsavedUpdates[t],(function(t,a){String(i)===String(a)?e=!0:s.push(a)})),this.unsavedUpdates[t]=s,this._setUpdateCount(),""===this.$updateCount.text()&&this.$elmt.removeClass("ditty-editor--updates-exist"),e},updateStart:function(){this.$overlay.fadeIn()},updateStop:function(){this.$overlay.fadeOut()},initFields:function(t){this._initFields(t)},updateDraftValues:function(t,i){return this.$elmt.addClass("ditty-editor--updates-exist"),t?(this.draftValues[t]=i,"development"===dittyVars.mode&&window.console&&console.log("draftValues:",this.draftValues),this.draftValues[t]):(this.draftValues=i,"development"===dittyVars.mode&&window.console&&console.log("draftValues:",this.draftValues),this.draftValues)},getDraftValues:function(t){return t?!!this.draftValues[t]&&this.draftValues[t]:this.draftValues},delayedSubmitEnable:function(){this.delayedSubmit=!0},delayedSubmitDisable:function(){this.delayedSubmit=!1},trigger:function(t,i){var e=[];switch(t){case"active_items_update":e=[this.ditty,this.activeItems];break;case"stop_live_updates":e=[this.dittyId];break;default:e=[this.settings]}i&&(e=i),this.$elmt.trigger("ditty_editor_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e),$("body").trigger("ditty_"+t,e)},_getPanelOption:function(t){return"elmnt"===t?this.$panels:this.settings[t]},_setPanelOption:function(t,i){if(void 0===i)return!1;this.$panels.ditty_slider("options",t,i),this.trigger("update")},panelOptions:function(t,i){var e=this;if("object"==typeof t)$.each(t,(function(t,i){e._setPanelOption(t,i)}));else{if("string"!=typeof t)return e.$panels.ditty_slider("options");if(void 0===i)return e._getPanelOption(t);e._setPanelOption(t,i)}},_getOption:function(t){return"elmnt"===t?this:this.settings[t]},_setOption:function(t,i){if(void 0===i)return!1;this.settings[t]=i,this.trigger("update")},options:function(t,i){var e=this;if("object"==typeof t)$.each(t,(function(t,i){e._setOption(t,i)}));else{if("string"!=typeof t)return e.settings;if(void 0===i)return e._getOption(t);e._setOption(t,i)}},destroy:function(){this.$panels.ditty_slider&&this.$panels.ditty_slider("destroy"),$(document).off("postbox-moved",{self:this},this._postboxMoved),$(document).off("postboxes-columnchange",{self:this},this._postboxMoved),$(window).off("beforeunload",{self:this},this._beforeunload),this.ditty.$elmt.off("ditty_active_items_update",{self:this},this._dittyItemsUpdated),this.ditty.$elmt.off("ditty_disabled_items_update",{self:this},this._disabledItemsUpdate),this.$tabs.off("click","ditty-editor__tab",{self:this},this._showPanel),this.$update.off("click",{self:this},this._saveClick),this.$panels.off("ditty_slider_init",{self:this},this._editorLoaded),this.$panels.off("ditty_slider_before_slide_update",{self:this},this._beforeSlideUpdate),this.$panels.off("ditty_slider_after_slide_update",{self:this},this._afterSlideUpdate),this.$panels.off("ditty_slider_slide_removed",{self:this},this._slideRemoved),this.trigger("destroy"),this.elmt._ditty_editor=null}},$.fn.ditty_editor=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_editor||(this._ditty_editor=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_editor;if(!i)throw new Error("No Ditty_Editor applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Editor.');return void 0!==e?e:this}},$.ditty_editor={},$.ditty_editor.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_settings_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$title=this.$elmt.find('input[name="title]'),this.$previewBg=this.$elmt.find('input[name="previewBg"]'),this.$previewPaddingTop=this.$elmt.find('input[name="previewPadding[paddingTop]"]'),this.$previewPaddingBottom=this.$elmt.find('input[name="previewPadding[paddingBottom]"]'),this.$previewPaddingLeft=this.$elmt.find('input[name="previewPadding[paddingLeft]"]'),this.$previewPaddingRight=this.$elmt.find('input[name="previewPadding[paddingRight]"]'),this.$postTitle=$(".ditty-post__title"),this.$editorPreview=$("#ditty-editor__preview"),this.dittyId=this.$form.data("ditty_id"),this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){this.initData=this.$form.serialize(),this.settings.editor.initFields(this.$elmt),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.on("submit",{self:this},this._submitForm),this.$form.on("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.on("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.on("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.$form.on("keyup change",'input[name="title"]',{self:this},this._titleChange),this.$form.on("keyup change",".ditty-field--preview_settings *",{self:this},this._previewBgChange),this.$elmt.addClass("init")},_checkUpdates:function(t){var i=t?t.data.self:this;i.$form.serialize()!==i.initData?(i.settings.editor.addUpdate("settings",i.itemId),i.settings.editor.delayedSubmitEnable()):i.settings.editor.removeUpdate("settings",i.itemId)},_titleChange:function(t){var i=t?t.data.self:this,e=$(t.target).val();i.$postTitle.text(e)},_previewBgChange:function(t){var i=t?t.data.self:this,e={backgroundColor:i.$previewBg.val(),paddingTop:i.$previewPaddingTop.val(),paddingBottom:i.$previewPaddingBottom.val(),paddingLeft:i.$previewPaddingLeft.val(),paddingRight:i.$previewPaddingRight.val()};i.$editorPreview.css(e)},_addDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.dittyId;i.settings.editor.updateStart();var s={action:"ditty_editor_settings_update",ditty_id:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:s,success:function(t){i.initData=i.$form.serialize(),dittyDraftUpdate(i,"settings",!1,t),i.settings.editor.delayedSubmitDisable(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty({return_items:0}),i.afterUpdateAction=""}})},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_settings_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_settings_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.$form.off("submit",{self:this},this._submitForm),this.$form.off("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.off("keyup change",'input[name="previewBg"]',{self:this},this._previewBg_cahnge),this.$form.off("keyup change",'input[name="title"]',{self:this},this._titleChange),this.$form.off("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.off("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.trigger("destroy"),this.elmt._ditty_settings_panel=null}},$.fn.ditty_settings_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_settings_panel||(this._ditty_settings_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_settings_panel;if(!i)throw new Error("No Ditty_Settings_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Settings_Panel.');return void 0!==e?e:this}},$.ditty_settings_panel={},$.ditty_settings_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_items_panel.defaults,e),this.$elmt=$(i),this.$add=$(i).find(".ditty-editor-options__add"),this.$contents=$(i).find(".ditty-editor__panel__contents"),this.$list=$(i).find(".ditty-data-list"),this.$listItems=$(i).find(".ditty-data-list__items"),this.isEmptyTicker=!1,this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.settings.editor.$elmt.on("ditty_editor_active_items_update",{self:this},this._dittyActiveItemsUpdated),this.$add.on("click",{self:this},this._add_item),this.$elmt.on("click",".ditty-data-list__item",{self:this},this._showItem),this.$elmt.on("click",".ditty-data-list__item__icon",{self:this},this._editType),this.$elmt.on("click",".ditty-data-list__item__edit",{self:this},this._editItem),this.$elmt.on("click",".ditty-data-list__item__layout",{self:this},this._editLayoutVariations),this.$elmt.on("click",".ditty-data-list__item__clone",{self:this},this._cloneItem),this.$elmt.on("click",".ditty-data-list__item__delete",{self:this},this._deleteItem),this.$list.on("click",".ditty-editor-item > a",{self:this},this._actionClick),$("body").on("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),1>this.$elmt.find(".ditty-data-list__item").length&&(this.isEmptyTicker=!0,this.$add.trigger("click")),this._initializeSorting(),this._highlightListItems(this.settings.editor.activeItems)},dittyUpdateSavedDraftLayouts:function(t,i){$.each($(".ditty-editor-item"),(function(){var e=$(this).data("layout_value");$.each(e,(function(s,a){String(a)===String(t)&&(e[s]=String(i))})),$(this).attr("data-layout_value",e).data("layout_value",e)}))},_dittyEditorSaveResponse:function(t,i){var e=t.data.self;i.ditty_new_item_ids&&$.each(i.ditty_new_item_ids,(function(t,i){var e=$("#ditty-editor-item--"+t);e.length&&(e.attr("id","ditty-editor-item--"+i),e.attr("data-item_id",i).data("item_id",i))})),i.ditty_new_layout_ids&&$.each(i.ditty_new_layout_ids,(function(t,i){e.dittyUpdateSavedDraftLayouts(t,i)}))},_highlightListItem:function(t){var i=t.id+"";i=i.split("_"),this.$elmt.find("#ditty-editor-item--"+i[0]).addClass("active")},_highlightListItems:function(t){this.$elmt.find(".ditty-data-list__item").removeClass("active");var i=this;Array.isArray(t)?$.each(t,(function(t,e){i._highlightListItem(e)})):i._highlightListItem(t)},_dittyActiveItemsUpdated:function(t,i,e){t.data.self._highlightListItems(e)},_initializeSorting:function(){var t=this;this.$listItems.sortable({handle:".ditty-data-list__item__move",items:".ditty-data-list__item",axis:"y",start:function(t,i){$(i.item).addClass("ditty-data-list__item--moving")},stop:function(i,e){$(e.item).removeClass("ditty-data-list__item--moving"),t.settings.editor.addUpdate("item_order",t.settings.editor.dittyId)},update:function(){t._updateItemIndexes("updateDitty")}})},_showItem:function(t){t.preventDefault();var i=t.data.self;if(!$(t.target).is("a")&&!$(t.target).parent().is("a")){var e=($(t.target).is(".ditty-data-list__item")?$(t.target):$(t.target).parents(".ditty-data-list__item")).data("item_id");i.settings.editor.ditty.showItem(e)}},_actionClick:function(t){t.preventDefault();var i=t.data.self,e=$(t.target).is("a")?$(t.target):$(t.target).parent("a"),s=e.parents(".ditty-data-list__item"),a=s.data("ditty_id"),d=s.data("item_id");dittyVars.editor.currentItem=s,$("body").trigger("ditty_editor_item_action_click",[e,s,d,a,i.settings.editor])},_editType:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item");e.trigger("click"),e.addClass("editing"),i.settings.editor.updateStart(),i.settings.editor.panelOptions("transition","slideRight"),i.settings.editor.showPanel("item_types")},_editItem:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_id");e.trigger("click"),e.addClass("editing"),i.settings.editor.updateStart();var a={action:"ditty_editor_item_fields",item_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--item_editor">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("item_editor",e)}}))},_editLayoutVariations:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_type"),a=e.data("layout_value"),d=e.find(".ditty-data-list__item__label").html();e.trigger("click"),e.addClass("editing"),i.settings.editor.updateStart();var n={action:"ditty_editor_layout_variations",ditty_id:i.settings.editor.dittyId,item_type:s,item_label:d,layout_value:a,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,n,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--layout-variations">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("layout_variations",e)}}))},_add_item:function(t){t.preventDefault();var i=t.data.self,e={action:"ditty_editor_item_add",ditty_id:i.settings.editor.dittyId,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,e,(function(t){if(t.display_items){if(i.isEmptyTicker){var e=i.settings.editor.ditty.options("items");$.each(e,(function(t,e){i.settings.editor.ditty.deleteItem(e.id)})),i.isEmptyTicker=!1}$.each(t.display_items,(function(t,e){i.settings.editor.ditty.addItem(e,0)}))}if(t.editor_item){var s=$(t.editor_item);s.hide(),i.$listItems.prepend(s),s.slideDown(),i._updateItemIndexes()}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),t.draft_id&&t.draft_meta&&dittyDraftItemUpdateMeta(i,t.draft_id,null,t.draft_meta)}),"json")},_cloneItem:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_id");i.settings.editor.updateStart();var a={action:"ditty_editor_item_clone",item_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t.display_items&&t.display_items.length&&i.settings.editor.ditty.updateItems(t.display_items,s,"after"),t.editor_item){var a=$(t.editor_item);a.hide(),e.after(a),a.slideDown(),i._updateItemIndexes()}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),t.draft_id&&t.draft_meta&&dittyDraftItemUpdateMeta(i,t.draft_id,null,t.draft_meta),i.settings.editor.updateStop()}),"json")},_deleteItem:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("item_id");1>=i.$elmt.find(".ditty-data-list__item").length&&i.$add.trigger("click"),e.slideUp((function(){$(this).remove()})),i.settings.editor.ditty.deleteItem(s),dittyDraftItemDelete(i,s)},_updateItemIndexes:function(t){var i=this,e=[];if(this.$elmt.find(".ditty-data-list__item").each((function(t){var s=$(this).data("item_id");e.push(s),dittyDraftItemUpdateData(i,s,"item_index",t)})),"updateDitty"===t){var s=dittyItemsReorder(i.settings.editor.ditty.options("items"),e);i.settings.editor.ditty.options("items",s)}},panelVisible:function(){this.$elmt.find(".ditty-data-list__item").removeClass("editing")},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_items_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_items_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.settings.editor.$elmt.off("ditty_editor_active_items_update",{self:this},this._dittyActiveItemsUpdated),this.$add.off("click",{self:this},this._add_item),this.$elmt.off("click",".ditty-data-list__item",{self:this},this._showItem),this.$elmt.off("click",".ditty-data-list__item__icon",{self:this},this._editType),this.$elmt.off("click",".ditty-data-list__item__edit",{self:this},this._editItem),this.$elmt.off("click",".ditty-data-list__item__layout",{self:this
2
  },this._editLayoutVariations),this.$elmt.off("click",".ditty-data-list__item__clone",{self:this},this._cloneItem),this.$elmt.off("click",".ditty-data-list__item__delete",{self:this},this._deleteItem),this.$list.off("click",".ditty-editor-item > a",{self:this},this._actionClick),$("body").off("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this.trigger("destroy"),this.elmt._ditty_items_panel=null}},$.fn.ditty_items_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_items_panel||(this._ditty_items_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_items_panel;if(!i)throw new Error("No Ditty_Items_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Items_Panel.');return void 0!==e?e:this}},$.ditty_items_panel={},$.ditty_items_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_item_types_panel.defaults,e),this.$elmt=$(i),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$editorItem=this.settings.editor.$panels.find(".ditty-editor__panel--items").find(".ditty-data-list__item.editing"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.currentType=null,this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.settings.editor.initFields(this.$elmt),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("click",".ditty-editor-item-type",{self:this},this._typeClick),this.panelVisible()},_showItemsList:function(){this.settings.editor.panelOptions("transition","slideLeft"),this.settings.editor.showPanel("items")},_backClick:function(t){t.preventDefault(),t.data.self._showItemsList()},_typeClick:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is(".ditty-editor-item-type")?$(t.target):$(t.target).parents(".ditty-editor-item-type")).data("item_type");if(e===i.currentType)i._showItemsList();else{i.settings.editor.updateStart();var s={action:"ditty_editor_item_type_update",item_id:i.editorItemId,item_type:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,s,(function(t){if(t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,i.editorItemId),t.editor_item){var e=$(t.editor_item);i.$editorItem.after(e),i.$editorItem.remove(),i.$editorItem=e}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),i._showItemsList(),i.settings.editor.updateStop()}),"json")}},panelVisible:function(){this.$editorItem=this.settings.editor.$panels.find(".ditty-editor__panel--items").find(".ditty-data-list__item.editing"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.currentType=this.$editorItem.data("item_type"),this.$elmt.find(".ditty-editor-item-type").removeClass("active"),this.$elmt.find('.ditty-editor-item-type[data-item_type="'+this.currentType+'"]').addClass("active")},panelHidden:function(){var t=this.$editorItem.find(".ditty-data-list__item__icon").children("i");t.attr("class",t.data("class"))},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_item_types_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_item_types_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$back.off("click",{self:this},this._backClick),this.$elmt.off("click",".ditty-editor-item-type",{self:this},this._typeClick),this.trigger("destroy"),this.elmt._ditty_item_types_panel=null}},$.fn.ditty_item_types_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_item_types_panel||(this._ditty_item_types_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_item_types_panel;if(!i)throw new Error("No Ditty_Item_Types_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Item_Types_Panel.');return void 0!==e?e:this}},$.ditty_item_types_panel={},$.ditty_item_types_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_item_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$preview=this.$elmt.find(".ditty-editor-options__preview"),this.$title=this.$elmt.find(".ditty-editor-options__title"),this.itemId=this.$form.data("item_id"),this.itemType=this.$form.data("item_type"),this.dittyId=this.$form.data("ditty_id"),this.$editorItem=this.settings.editor.$panels.find(".ditty-editor__panel--items").find(".ditty-data-list__item.editing"),this.$editorItemTitle=this.$editorItem.find(".ditty-data-list__item__label"),this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){var t=this;this.initData=this.$form.serialize(),this.settings.editor.initFields(this.$elmt),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.on("submit",{self:this},this._submitForm),this.$back.on("click",{self:this},this._backClick),this.$preview.on("click",{self:this},this._previewClick),this.$form.on("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.on("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.on("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.$form.on("ditty_field_update",".ditty-field__input",{self:this},this._checkUpdates),setTimeout((function(){t.trigger("init",[t])}),1)},_showItemList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","items")},_enablePreviewButton:function(){this.$preview.addClass("ditty-has-updates")},_disablePreviewButton:function(){this.$preview.removeClass("ditty-has-updates"),this.$preview.children("i").attr("class",this.$preview.children("i").data("class"))},_checkUpdates:function(t){var i=t?t.data.self:this;i.$form.serialize()!==i.initData?(i._enablePreviewButton(),i.settings.editor.addUpdate("item_settings",i.itemId),i.settings.editor.delayedSubmitEnable()):(i._disablePreviewButton(),i.settings.editor.removeUpdate("item_settings",i.itemId))},_addDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.$form.serialize()===i.initData?i._showItemList():(i.afterUpdateAction="return",i.$form.trigger("submit"))},_previewClick:function(t){t.preventDefault();var i=t.data.self;i.$form.serialize()!==i.initData&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit"))},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.itemId;i.settings.editor.updateStart();var s={action:"ditty_editor_item_update",item_id:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:s,error:function(){},success:function(t){if(t.value_updates&&i._updateValues(t.value_updates),i.initData=i.$form.serialize(),i._disablePreviewButton(),t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,e),t.editor_item){var s=$(t.editor_item).children(".ditty-data-list__item__label").html();i.$title.html(s),i.$editorItemTitle.html(s)}t.draft_id&&t.draft_data&&dittyDraftItemUpdateData(i,t.draft_id,null,t.draft_data),t.draft_id&&t.draft_meta&&dittyDraftItemUpdateMeta(i,t.draft_id,null,t.draft_meta),i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showItemList(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty({return_items:0}),i.afterUpdateAction=""}})},_updateValues:function(t){var i=this;$.each(t,(function(t,e){var s=i.$form.find('[name="'+t+'"]');s.length&&s.val(e)}))},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_item_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_item_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._saveDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.off("submit",{self:this},this._submitForm),this.$back.off("click",{self:this},this._backClick),this.$preview.off("click",{self:this},this._previewClick),this.$form.off("keyup change",'input[type="text"], input[type="number"], textarea, select',{self:this},this._checkUpdates),this.$form.off("click",'input[type="radio"], input[type="checkbox"]',{self:this},this._checkUpdates),this.$form.off("ditty_input_wysiwyg_update",".ditty-input--wysiwyg",{self:this},this._checkUpdates),this.$form.off("ditty_field_update",".ditty-field__input",{self:this},this._checkUpdates),this.elmt._ditty_item_editor_panel=null}},$.fn.ditty_item_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_item_editor_panel||(this._ditty_item_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_item_editor_panel;if(!i)throw new Error("No Ditty_Item_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Item_Editor_Panel.');return void 0!==e?e:this}},$.ditty_item_editor_panel={},$.ditty_item_editor_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_displays_panel.defaults,e),this.$elmt=$(i),this.$list=$(i).find(".ditty-data-list__items"),this.$contents=$(i).find(".ditty-editor__panel__contents"),this.initDisplay=null,this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.$elmt.ditty_ui_data_list({filter:".ditty-display-panel__filter",item:".ditty-editor-display",itemSelector:"display_type"}),this.initDisplay=this.$list.data("active"),this._activateDisplay(this.$list.find("#ditty-editor-display--"+this.initDisplay)),this.$elmt.on("click",".ditty-data-list__item",{self:this},this._selectDisplay),this.$elmt.on("click",".ditty-data-list__item__edit",{self:this},this._editDisplay),this.$elmt.on("click",".ditty-data-list__item__clone",{self:this},this._cloneDisplay),this.$elmt.on("click",".ditty-data-list__item__delete",{self:this},this._deleteDisplay),this.settings.editor.$elmt.on("ditty_editor_saveDrafts",{self:this},this._saveDrafts)},_saveDrafts:function(t){var i=t.data.self;i.initDisplay=i.$list.find(".ditty-editor-display.active").data("display_id")},_activateDisplay:function(t){this.$list.find(".ditty-editor-display").removeClass("active"),t.addClass("active")},_initDitty:function(t,i,e){var s=this.settings.editor.ditty.$elmt;e.display=i,e.id=this.settings.editor.ditty.options("id"),e.items=this.settings.editor.ditty.options("items"),e.height=this.settings.editor.ditty.options("height"),this.settings.editor.ditty.destroy(),s["ditty_"+t](e),this.settings.editor.ditty=s["ditty_"+t]("options","ditty")},_selectDisplay:function(t){t.preventDefault();var i=t.data.self;if($(t.target).parent().is("a"))return!1;var e=$(t.target).is(".ditty-data-list__item")?$(t.target):$(t.target).parents(".ditty-data-list__item"),s=e.data("display_id"),a=e.data("display_type");if(e.hasClass("active"))return!1;i.settings.editor.updateStart(),dittyDraftUpdate(i,"post_meta","_ditty_display",s),i._activateDisplay(e);var d={action:"ditty_editor_select_display",display_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,d,(function(t){if(!t)return!1;i._initDitty(a,s,t),i.settings.editor.updateStop()}),"json")},_cloneDisplay:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("display_id");i.settings.editor.updateStart();var a={action:"ditty_editor_display_clone",display_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t.editor_display){var s=$(t.editor_display);s.hide(),e.after(s),s.slideDown()}t.draft_id&&t.draft_data&&dittyDraftDisplayUpdate(i,t.draft_id,null,t.draft_data),i.settings.editor.updateStop()}),"json")},_deleteDisplay:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=null,a=e.data("display_id");e.hasClass("active")&&(e.prev().length?s=e.prev():e.next().length&&(s=e.next())),e.slideUp((function(){$(this).remove()})),dittyDraftDisplayDelete(i,a),null!==s&&s.trigger("click")},_editDisplay:function(t){t.preventDefault();var i=t.data.self;i.$displayEdit=$(this).parents(".ditty-data-list__item");var e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("display_id");i.settings.editor.updateStart(),e.addClass("editing");var a={action:"ditty_editor_display_fields",display_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--displayEditor">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("display_editor",e)}}))},panelVisible:function(){this.$elmt.find(".ditty-data-list__item").removeClass("editing")},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_displays_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_displays_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$elmt.ditty_ui_data_list("destroy"),this.$elmt.off("click",".ditty-data-list__item",{self:this},this._selectDisplay),this.$elmt.off("click",".ditty-data-list__item__edit",{self:this},this._editDisplay),this.$elmt.off("click",".ditty-data-list__item__clone",{self:this},this._cloneDisplay),this.$elmt.off("click",".ditty-data-list__item__delete",{self:this},this._deleteDisplay),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.trigger("destroy"),this.elmt._ditty_displays_panel=null}},$.fn.ditty_displays_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_displays_panel||(this._ditty_displays_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_displays_panel;if(!i)throw new Error("No Ditty_Displays_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Displays_Panel.');return void 0!==e?e:this}},$.ditty_displays_panel={},$.ditty_displays_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_display_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$optionsTitle=this.$elmt.find(".ditty-editor-options__title"),this.$importExportField=this.$elmt.find(".ditty-editor__import-export__field"),this.$importExportUpdate=this.$elmt.find(".ditty-editor__import-export__update"),this.displayTitle=null,this.displayId=this.settings.editor.ditty.options("display"),this.displayType=this.settings.editor.ditty.options("type"),this.$editorDisplay=this.settings.editor.$panels.find(".ditty-editor__panel--displays").find(".ditty-data-list__item.editing"),this.$editorDisplayTitle=this.$editorDisplay.find(".ditty-data-list__item__label"),this.displayOptions=null,this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){var t,i=this;this.initData=this.$form.serialize(),this.settings.editor.initFields(this.$elmt),t=this.settings.editor.ditty.$elmt["ditty_"+this.displayType]("options"),this.displayOptions=$.extend({},t),this.displayTitle=this.$optionsTitle.val(),this.$importExportUpdate.on("click",{self:this},this._importUpdate),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.on("submit",{self:this},this._submitForm),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("change",'input[type="text"], input[type="number"]',{self:this},this._textfieldListeners),this.$form.on("click",'input[type="radio"]',{self:this},this._radioListeners),this.$form.on("click",'input[type="checkbox"]',{self:this},this._checkboxListeners),this.$form.on("change","select",{self:this},this._selectListeners),this.$form.on("ditty_field_clone_update",{self:this},this._cloneListeners),setTimeout((function(){i.trigger("init",[i])}),1)},_showDisplayList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","displays")},_checkUpdates:function(){this.$form.serialize()!==this.initData?(this.settings.editor.addUpdate("displaySettings",this.displayId),this.settings.editor.delayedSubmitEnable()):this.settings.editor.removeUpdate("displaySettings",this.displayId)},_addDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.$form.serialize()!==i.initData&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.$form.serialize()===i.initData?i._showDisplayList():(i.afterUpdateAction="return",i.$form.trigger("submit"))},_submitForm:function(t){t.preventDefault();var i=t.data.self;i.settings.editor.updateStart();var e={action:"ditty_editor_display_update",display_id:i.displayId,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:e,success:function(t){i.initData=i.$form.serialize(),t.draft_id&&t.draft_label&&(i.displayTitle=t.draft_label,i.$editorDisplayTitle.text(t.draft_label),dittyDraftDisplayUpdate(i,t.draft_id,"label",t.draft_label)),t.draft_id&&t.draft_settings&&(i.displayOptions=t.draft_settings,dittyDraftDisplayUpdate(i,t.draft_id,"settings",t.draft_settings)),t.draft_settings_json&&i.$importExportField.length&&i.$importExportField.val(t.draft_settings_json),i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showDisplayList(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty(),i.afterUpdateAction=""}})},_importUpdate:function(t){t.preventDefault()},_cloneListeners:function(t,i,e){var s=t.data.self;$(t.target);s.settings.editor.ditty.options(e,i)},_textfieldListeners:function(t){var i=t.data.self,e=$(t.target),s=e.attr("name"),a=e.parents(".ditty-input--spacing__group, .ditty-input--radius__group");if(a.length){var d="",n={};a.find("input").each((function(){s=$(this).attr("name"),d=(d=s.split("["))[0];var t=s.match(/\[(.*)\]/);n[t[1]]=$(this).val()})),i.settings.editor.ditty.options(d,n)}else i.settings.editor.ditty.options(s,e.val());i._checkUpdates()},_radioListeners:function(t){var i=t.data.self,e=$(t.target),s=e.val(),a=e.attr("name");i.settings.editor.ditty.options(a,s),i._checkUpdates()},_checkboxListeners:function(t){var i=t.data.self,e=$(t.target),s=!!e.is(":checked")&&$(this).val(),a=e.attr("name");i.settings.editor.ditty.options(a,s),i._checkUpdates()},_selectListeners:function(t){var i=t.data.self,e=$(t.target),s=e.val(),a=e.attr("name");i.settings.editor.ditty.options(a,s),i._checkUpdates()},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_display_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_display_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.trigger("destroy",[this]),this.$importExportUpdate.off("click",{this:this},this._importUpdate),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.$form.off("submit",{this:this},this._submitForm),this.$back.off("click",{this:this},this._cancel_click),this.$elmt.off("change",'input[type="text"], input[type="number"]',{self:this},this._textfieldListeners),this.$form.off("click",'input[type="radio"]',{self:this},this._radioListeners),this.$form.off("click",'input[type="checkbox"]',{self:this},this._checkboxListeners),this.$form.off("change","select",{self:this},this._selectListeners),this.$form.off("ditty_field_clone_update",{self:this},this._cloneListeners),this.elmt._ditty_display_editor_panel=null}},$.fn.ditty_display_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_display_editor_panel||(this._ditty_display_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_display_editor_panel;if(!i)throw new Error("No Ditty_Display_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Display_Editor_Panel.');return void 0!==e?e:this}},$.ditty_display_editor_panel={},$.ditty_display_editor_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layout_variations_panel.defaults,e),this.$elmt=$(i),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$list=$(i).find(".ditty-data-list__items"),this.$editorItem=dittyVars.editor.currentItem,this.editorItemLabel=this.$editorItem.find(".ditty-data-list__item__label").text(),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemType=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("click",".ditty-layout-variation__change",{self:this},this._changeTemplate),this.$elmt.on("click",".ditty-layout-variation__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.on("click",".ditty-layout-variation__edit_css",{self:this,editType:"css"},this._editLayout),$("body").on("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse)},_showItemList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","items")},_backClick:function(t){t.preventDefault(),t.data.self._showItemList()},_dittyEditorSaveResponse:function(t,i){t.data.self;i.ditty_new_layout_ids&&$.each(i.ditty_new_layout_ids,(function(t,i){var e=$('.ditty-layout-variation[data-layout_id="'+t+'"]');e.length&&e.attr("data-layout_id",i).data("layout_id",i)}))},_changeTemplate:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("layout_id"),a=e.data("layout_variation_id"),d=e.data("layout_variation_label");dittyVars.editor.currentLayoutVariation=e,i.settings.editor.updateStart(),e.addClass("editing");var n={action:"ditty_editor_layouts",ditty_id:i.editorDittyId,item_type:i.editorItemType,variation_id:a,variation_label:d,layout_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,n,(function(t){if(t){var e='<div class="ditty-editor__panel ditty-editor__panel--layouts">'+t+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel("layouts",e)}}))},_editLayout:function(t){t.preventDefault();var i=t.data.self,e=t.data.editType,s=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),a=s.data("layout_id");dittyVars.editor.currentLayoutVariation=s,i.settings.editor.updateStart(),i.$list.find(".ditty-data-list__item").removeClass("editing"),s.addClass("editing");var d=[],n=i.settings.editor.ditty.options("items");$.each(n,(function(t,i){d.push(i.uniqId)}));var r={action:"ditty_editor_layout_fields",layout_id:a,item_type:i.editorItemType,item_value:i.editorItemValue,ditty_id:i.editorDittyId,item_id:i.editorItemId,item_ids:d,edit_type:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,r,(function(t){if(t){var s="layout_"+e+"_editor",a='<div class="ditty-editor__panel ditty-editor__panel--'+s+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel(s,a)}}),"json")},panelVisible:function(){this.$list.find(".ditty-layout-variation").removeClass("editing")},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layout_variations_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layout_variations_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$back.off("click",{self:this},this._backClick),this.$elmt.off("click",".ditty-layout-variation__change",{self:this},this._changeTemplate),this.$elmt.off("click",".ditty-layout-variation__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.off("click",".ditty-layout-variation__edit_css",{self:this,editType:"css"},this._editLayout),$("body").off("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this.elmt._ditty_layout_variations_panel=null}},$.fn.ditty_layout_variations_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layout_variations_panel||(this._ditty_layout_variations_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layout_variations_panel;if(!i)throw new Error("No Ditty_Layout_Variations_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layout_Variations_Panel.');return void 0!==e?e:this}},$.ditty_layout_variations_panel={},$.ditty_layout_variations_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layouts_panel.defaults,e),this.$elmt=$(i),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$list=$(i).find(".ditty-data-list__items"),this.$editorItem=dittyVars.editor.currentItem,this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemtype=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this.$editorVariation=dittyVars.editor.currentLayoutVariation,this.editorVariationId=this.$editorVariation.data("layout_variation_id"),this.editorLayoutId=this.$editorVariation.data("layout_id"),this._init()};i.prototype={_init:function(){this.$elmt.addClass("init"),this.$back.on("click",{self:this},this._backClick),this.$elmt.on("click",".ditty-data-list__item",{self:this},this._selectLayout),this.$elmt.on("click",".ditty-data-list__item__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.on("click",".ditty-data-list__item__edit_css",{self:this,editType:"css"},this._editLayout),this.$elmt.on("click",".ditty-data-list__item__clone",{self:this},this._cloneLayout),this.$elmt.on("click",".ditty-data-list__item__delete",{self:this},this._deleteLayout),this.$elmt.on("click",".ditty-data-list__item__save",{self:this},this._saveLayout),this.$list.on("click",".ditty-editor-layout > a",{self:this},this._actionClick),$("body").on("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this._activateLayout(this.$list.find("#ditty-editor-layout--"+this.editorLayoutId))},_activateLayout:function(t){this.$list.find(".ditty-editor-layout").removeClass("active"),t.addClass("active")},_showVariationsList:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById","layout_variations")},_backClick:function(t){t.preventDefault(),t.data.self._showVariationsList()},_dittyEditorSaveResponse:function(t,i){t.data.self;i.ditty_new_layout_ids&&$.each(i.ditty_new_layout_ids,(function(t,i){var e=$("#ditty-editor-layout--"+t);e.length&&(e.attr("id","ditty-editor-layout--"+i),e.attr("data-layout_id",i).data("layout_id",i))}))},_selectLayout:function(t){t.preventDefault();var i=t.data.self;if($(t.target).parent().is("a"))return!1;var e=$(t.target).is(".ditty-data-list__item")?$(t.target):$(t.target).parents(".ditty-data-list__item"),s=e.data("layout_id"),a=e.data("layout_version"),d=i.$editorItem.data("layout_value");if(e.hasClass("active"))return!1;$.each(d,(function(t){i.editorVariationId===t&&(d[t]=String(s))})),i.settings.editor.updateStart(),dittyDraftItemUpdateData(i,i.editorItemId,"layout_value",d),i._activateLayout(e);var n={action:"ditty_editor_select_layout",layout_id:s,item_id:i.editorItemId,ditty_id:i.editorDittyId,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,n,(function(t){if(i.settings.editor.updateStop(),t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,i.editorItemId),t.editor_item){var e=$(t.editor_item);i.$editorItem.replaceWith(e)}i.$editorItem.attr("data-layout_value",d).data("layout_value",d),i.$editorVariation.attr("data-layout_id",s).data("layout_id",s),i.$editorVariation.find(".ditty-layout-variation__template > span").text(t.layout_label),a?i.$editorVariation.find(".ditty-layout-variation__template > small").text("("+a+")"):i.$editorVariation.find(".ditty-layout-variation__template > small").text("")}),"json")},_cloneLayout:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=e.data("layout_id");i.settings.editor.updateStart();var a={action:"ditty_editor_layout_clone",
3
+ layout_id:s,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,a,(function(t){if(t.editor_layout){var s=$(t.editor_layout);s.hide(),e.after(s),s.slideDown()}t.draft_id&&t.draft_meta&&dittyDraftLayoutUpdate(i,t.draft_id,null,t.draft_meta),i.settings.editor.updateStop()}),"json")},_saveLayout:function(t){t.preventDefault();t.data.self,($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item").data("layout_id")},_deleteLayout:function(t){t.preventDefault();var i=t.data.self,e=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),s=null,a=e.data("layout_id");e.hasClass("active")&&(e.prev().length?s=e.prev():e.next().length&&(s=e.next())),e.slideUp((function(){$(this).remove()})),dittyDraftLayoutDelete(i,a),null!==s&&s.trigger("click")},_editLayout:function(t){t.preventDefault();var i=t.data.self,e=t.data.editType,s=($(t.target).is("a")?$(t.target):$(t.target).parent("a")).parents(".ditty-data-list__item"),a=s.data("layout_id");i.settings.editor.updateStart(),i.$list.find(".ditty-data-list__item").removeClass("editing"),s.addClass("editing");var d={action:"ditty_editor_layout_fields",layout_id:a,item_id:i.editorItemId,item_type:i.editorItemtype,item_value:i.editorItemValue,edit_type:e,draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,d,(function(t){if(t){var s="layout_"+e+"_editor",a='<div class="ditty-editor__panel ditty-editor__panel--'+s+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","slideLeft"),i.settings.editor.showPanel(s,a)}}),"json")},_actionClick:function(t){t.preventDefault();var i=t.data.self,e=$(t.target).is("a")?$(t.target):$(t.target).parent("a"),s=e.parents(".ditty-data-list__item"),a=s.data("layout_id");dittyVars.editor.currentLayout=s,$("body").trigger("ditty_editor_layout_action_click",[e,s,a,i.editorDittyId,i.settings.editor])},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layouts_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layouts_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$elmt.removeClass("init"),this.$back.off("click",{self:this},this._backClick),this.$elmt.off("click",".ditty-data-list__item",{self:this},this._selectLayout),this.$elmt.off("click",".ditty-data-list__item__edit_html",{self:this,editType:"html"},this._editLayout),this.$elmt.off("click",".ditty-data-list__item__edit_css",{self:this,editType:"css"},this._editLayout),this.$elmt.off("click",".ditty-data-list__item__clone",{self:this},this._cloneLayout),this.$elmt.off("click",".ditty-data-list__item__delete",{self:this},this._deleteLayout),this.$elmt.off("click",".ditty-data-list__item__save",{self:this},this._saveLayout),this.$list.off("click",".ditty-editor-layout > a",{self:this},this._actionClick),$("body").off("ditty_editor_save_ditty_response",{self:this},this._dittyEditorSaveResponse),this.elmt._ditty_layouts_panel=null}},$.fn.ditty_layouts_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layouts_panel||(this._ditty_layouts_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layouts_panel;if(!i)throw new Error("No Ditty_Layouts_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layouts_Panel.');return void 0!==e?e:this}},$.ditty_layouts_panel={},$.ditty_layouts_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null,prevPanel:""},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layout_html_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$textarea=this.$elmt.find(".ditty-editor-options__code"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$preview=this.$elmt.find(".ditty-editor-options__preview"),this.$editCss=this.$elmt.find(".ditty-editor-options__edit-css"),this.$title=this.$elmt.find(".ditty-editor-options__title"),this.$tags=this.$elmt.find(".ditty-editor-options__tags"),this.itemType=this.$form.data("item_type"),this.layoutId=this.$form.data("layout_id"),this.$editorItem=dittyVars.editor.currentItem,this.$editorLayout=dittyVars.editor.currentLayout,this.$editorLayoutTitle=!!this.$editorLayout&&this.$editorLayout.find(".ditty-data-list__item__label"),this.$editorLayoutVariation=dittyVars.editor.currentLayoutVariation,this.$editorLayoutVariationTitle=this.$editorLayoutVariation.find(".ditty-layout-variation__template span"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemType=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this.codeEditor=null,this.codeHasUpdates=!1,this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){this.initData=this.$form.serialize(),this._initEditor(),this.$back.on("click",{self:this},this._backClick),this.$preview.on("click",{self:this},this._previewClick),this.$editCss.on("click",{self:this},this._editCss),this.$form.on("submit",{self:this},this._submitForm),this.$form.on("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.on("keyup",{self:this},this._titleUpdate),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts)},_showPrevPanel:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById",this.settings.prevPanel)},_titleUpdate:function(t){var i=t.data.self;i.settings.editor.addUpdate("layoutUpdate",i.layoutId)},_enablePreviewButton:function(){this.$preview.addClass("ditty-has-updates")},_disablePreviewButton:function(){this.$preview.removeClass("ditty-has-updates"),this.$preview.children("i").attr("class",this.$preview.children("i").data("class"))},_getLayoutItems:function(){var t=this.settings.editor.ditty.options("items"),i=[];return $.each(t,(function(t,e){String(e.layoutId)===String(this.layoutId)&&i.push(e.id)})),i},_addDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),i.$form.serialize()!==i.initData||i.codeHasUpdates?(i.afterUpdateAction="return",i.$form.trigger("submit")):i._showPrevPanel()},_previewClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit"))},_editCss:function(t){t.preventDefault();var i=t.data.self,e="layout_css_editor";if(i.settings.editor.updateStart(),i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit")),i.settings.editor.panelExists(e))i.settings.editor.$elmt.find(".ditty-editor__panel--layout_css_editor input.ditty-editor-options__title").val(i.$title.val()),i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e);else{var s={action:"ditty_editor_layout_fields",layout_id:i.layoutId,layout_title:i.$title.val(),ditty_id:i.editorDittyId,item_id:i.editorItemId,item_type:i.editorItemType,item_value:i.editorItemValue,edit_type:"css",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,s,(function(t){if(t){var s='<div class="ditty-editor__panel ditty-editor__panel--'+e+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e,s)}}),"json")}},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.layoutId,s=i.itemType,a=i._getLayoutItems();if(i.$form.hasClass("ditty-editor-has-errors"))return!1;i.codeEditor.codemirror.save(),i.settings.editor.updateStart();var d={action:"ditty_editor_layout_update",layout_id:e,item_type:s,item_ids:a,edit_type:"html",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:d,success:function(t){i.initData=i.$form.serialize(),i._disablePreviewButton(),t.label&&(i.$editorLayoutTitle&&i.$editorLayoutTitle.html(t.label),i.$editorLayoutVariationTitle.html(t.label)),i.$editorLayoutTitle&&i.$editorLayoutTitle.find(".ditty-layout-version").remove(),i.$editorLayoutVariationTitle&&i.$editorLayoutVariationTitle.find(".ditty-layout-version").remove(),t.display_items&&i.settings.editor.ditty.updateItems(t.display_items,!1,!1,!0),t.draft_id&&t.draft_meta&&dittyDraftLayoutUpdate(i,t.draft_id,null,t.draft_meta),i.codeHasUpdates=!1,i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showPrevPanel(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty({return_items:0}),i.afterUpdateAction=""}})},_initEditor:function(){var t=this,i=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{};i.codemirror=_.extend({},i.codemirror,{indentUnit:2,tabSize:2}),this.codeEditor=wp.codeEditor.initialize(this.$textarea[0],i),this.codeEditor.codemirror.on("change",(function(){t.codeEditor.codemirror.save(),t.settings.editor.addUpdate("layout_html_update",t.layoutId),t.codeHasUpdates=!0,t._enablePreviewButton(),t.settings.editor.delayedSubmitEnable()}))},_insertTag:function(t){var i=t.data.self,e=$(t.target),s=e.text(),a=e.data("atts"),d=i.codeEditor.codemirror.getCursor();if(t.shiftKey&&a){var n="",r=s.length-1;$.each(a,(function(t,i){n+=" "+t+'="'+i.toString()+'"'})),s=s.substring(0,r)+n+s.substring(r)}i.codeEditor.codemirror.replaceRange(s,d),d.ch=d.ch+s.length,i.codeEditor.codemirror.setCursor(d)},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layout_html_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layout_html_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$back.off("click",{self:this},this._backClick),this.$preview.off("click",{self:this},this._previewClick),this.$editCss.off("click",{self:this},this._editCss),this.$form.off("submit",{self:this},this._submitForm),this.$form.off("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.off("keyup",{self:this},this._titleUpdate),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.codeEditor.codemirror.off("change"),this.codeEditor.codemirror.toTextArea(),this.elmt._ditty_layout_html_editor_panel=null}},$.fn.ditty_layout_html_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layout_html_editor_panel||(this._ditty_layout_html_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layout_html_editor_panel;if(!i)throw new Error("No Ditty_Layout_Html_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layout_Html_Editor_Panel.');return void 0!==e?e:this}},$.ditty_layout_html_editor_panel={},$.ditty_layout_html_editor_panel.defaults=t}(jQuery),function($){"use strict";var t={editor:null,prevPanel:""},i=function(i,e){this.elmt=i,this.settings=$.extend({},t,$.ditty_layout_css_editor_panel.defaults,e),this.$elmt=$(i),this.$form=this.$elmt.find(".ditty-editor-options"),this.$textarea=this.$elmt.find(".ditty-editor-options__code"),this.$back=this.$elmt.find(".ditty-editor-options__back"),this.$preview=this.$elmt.find(".ditty-editor-options__preview"),this.$editHtml=this.$elmt.find(".ditty-editor-options__edit-html"),this.$title=this.$elmt.find(".ditty-editor-options__title"),this.$body=this.$elmt.find(".ditty-editor-options__body"),this.$tags=this.$elmt.find(".ditty-editor-options__tags"),this.itemType=this.$form.data("item_type"),this.layoutId=this.$form.data("layout_id"),this.$editorItem=dittyVars.editor.currentItem,this.$editorLayout=dittyVars.editor.currentLayout,this.$editorLayoutTitle=!!this.$editorLayout&&this.$editorLayout.find(".ditty-data-list__item__label"),this.$editorLayoutVariation=dittyVars.editor.currentLayoutVariation,this.$editorLayoutVariationTitle=this.$editorLayoutVariation.find(".ditty-layout-variation__template span"),this.editorDittyId=this.$editorItem.data("ditty_id"),this.editorItemId=this.$editorItem.data("item_id"),this.editorItemType=this.$editorItem.data("item_type"),this.editorItemValue=this.$editorItem.data("item_value"),this.itemSelector="",this.codeEditor=null,this.codeHasUpdates=!1,this.initData=null,this.afterUpdateAction="",this._init()};i.prototype={_init:function(){this.initData=this.$form.serialize(),this._setCssSelector(),this._initEditor(),this.$back.on("click",{self:this},this._backClick),this.$preview.on("click",{self:this},this._previewClick),this.$editHtml.on("click",{self:this},this._editHtml),this.$form.on("submit",{self:this},this._submitForm),this.$form.on("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.on("keyup",{self:this},this._titleUpdate),this.$body.on("click",".ditty-editor-options__body__error",{self:this},this._removeErrorNotice),this.settings.editor.$elmt.on("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.on("ditty_editor_save_drafts",{self:this},this._saveDrafts)},_setCssSelector:function(){dittyVars.isTickerPost?this.itemSelector="#poststuff .ditty-layout--"+this.layoutId:this.itemSelector=".ditty-layout--"+this.layoutId},_showPrevPanel:function(){this.settings.editor.$panels.ditty_slider("options","transition","slideRight"),this.settings.editor.$panels.ditty_slider("showSlideById",this.settings.prevPanel)},_titleUpdate:function(t){var i=t.data.self;i.settings.editor.addUpdate("layoutUpdate",i.layoutId)},_enablePreviewButton:function(){this.$preview.addClass("ditty-has-updates")},_disablePreviewButton:function(){this.$preview.removeClass("ditty-has-updates"),this.$preview.children("i").attr("class",this.$preview.children("i").data("class"))},_addDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&i.$form.trigger("submit")},_saveDrafts:function(t){var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.afterUpdateAction="save",i.$form.trigger("submit"))},_backClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),i.$form.serialize()!==i.initData||i.codeHasUpdates?(i.afterUpdateAction="return",i.$form.trigger("submit")):i._showPrevPanel()},_previewClick:function(t){t.preventDefault();var i=t.data.self;i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit"))},_editHtml:function(t){t.preventDefault();var i=t.data.self,e="layout_html_editor";if(i.settings.editor.updateStart(),i.codeEditor.codemirror.save(),(i.$form.serialize()!==i.initData||i.codeHasUpdates)&&(i.$preview.children("i").attr("class",dittyVars.updateIcon),i.$form.trigger("submit")),i.settings.editor.panelExists(e))i.settings.editor.$elmt.find(".ditty-editor__panel--layout_html_editor input.ditty-editor-options__title").val(i.$title.val()),i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e);else{var s={action:"ditty_editor_layout_fields",layout_id:i.layoutId,layout_title:i.$title.val(),ditty_id:i.editorDittyId,item_id:i.editorItemId,item_type:i.editorItemType,item_value:i.editorItemValue,edit_type:"html",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};$.post(dittyVars.ajaxurl,s,(function(t){if(t){var s='<div class="ditty-editor__panel ditty-editor__panel--'+e+'">'+t.form+"</div>";i.settings.editor.panelOptions("transition","fade"),i.settings.editor.showPanel(e,s)}}),"json")}},_showErrorNotice:function(){var t=$('<div class="ditty-editor-options__body__error"><span>'+dittyVars.strings.layout_css_error+"</span></div>");this.$body.append(t)},_removeErrorNotice:function(t){t.data.self.$body.find(".ditty-editor-options__body__error").remove()},_submitForm:function(t){t.preventDefault();var i=t.data.self,e=i.layoutId,s=i.itemType;if(i.$form.hasClass("ditty-editor-has-errors"))return!1;i.codeEditor.codemirror.save(),i.settings.editor.updateStart();var a={action:"ditty_editor_layout_update",layout_id:e,item_type:s,edit_type:"css",draft_values:i.settings.editor.getDraftValues(),security:dittyVars.security};i.$form.ajaxSubmit({url:dittyVars.ajaxurl,type:"post",dataType:"json",data:a,success:function(t){i.initData=i.$form.serialize(),i._disablePreviewButton(),t.label&&(i.$editorLayoutTitle&&i.$editorLayoutTitle.html(t.label),i.$editorLayoutVariationTitle.html(t.label)),i.$editorLayoutTitle&&i.$editorLayoutTitle.find(".ditty-layout-version").remove(),i.$editorLayoutVariationTitle&&i.$editorLayoutVariationTitle.find(".ditty-layout-version").remove(),t.code?dittyLayoutCss(t.code,i.layoutId,"update"):i._showErrorNotice(),t.draft_id&&t.draft_meta&&dittyDraftLayoutUpdate(i,t.draft_id,null,t.draft_meta),i.codeHasUpdates=!1,i.settings.editor.updateStop(),i.settings.editor.delayedSubmitDisable(),"return"===i.afterUpdateAction&&i._showPrevPanel(),"save"===i.afterUpdateAction&&i.settings.editor.saveDitty(),i.afterUpdateAction=""}})},_initEditor:function(){var t=this,i=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{},e=dittyVars.editor.ditty_layouts_sass?"sass":"css";i.codemirror=_.extend({},i.codemirror,{mode:e,indentUnit:2,tabSize:2}),this.codeEditor=wp.codeEditor.initialize(this.$textarea[0],i),this.codeEditor.codemirror.on("change",(function(){t.codeEditor.codemirror.save(),t.settings.editor.addUpdate("layoutCssUpdate",t.layoutId),t.codeHasUpdates=!0,t._enablePreviewButton(),t.settings.editor.delayedSubmitEnable()}))},_insertTag:function(t){var i=t.data.self,e=$(t.target).text(),s=i.codeEditor.codemirror.getCursor();i.codeEditor.codemirror.replaceRange(e,s),s.ch=s.ch+e.length,i.codeEditor.codemirror.setCursor(s)},_options:function(t){return this.settings[t]},trigger:function(t,i){var e=[this.settings];i&&(e=i),this.$elmt.trigger("ditty_layout_css_editor_panel_"+t,e),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,e)},options:function(i,e){if("object"==typeof i)this.settings=$.extend({},t,$.ditty_layout_css_editor_panel.defaults,i);else{if("string"!=typeof i)return this.settings;if(void 0===e)return this.settings[i];this.settings[i]=e}this.trigger("options_update")},destroy:function(){this.$back.off("click",{self:this},this._backClick),this.$preview.off("click",{self:this},this._previewClick),this.$editHtml.off("click",{self:this},this._editHtml),this.$form.off("submit",{self:this},this._submitForm),this.$form.off("click",".ditty-editor-options__tag",{self:this},this._insertTag),this.$title.off("keyup",{self:this},this._titleUpdate),this.$body.off("click",".ditty-editor-options__body__error",{self:this},this._removeErrorNotice),this.settings.editor.$elmt.off("ditty_editor_add_drafts",{self:this},this._addDrafts),this.settings.editor.$elmt.off("ditty_editor_save_drafts",{self:this},this._saveDrafts),this.codeEditor.codemirror.off("change"),this.codeEditor.codemirror.toTextArea(),this.elmt._ditty_layout_css_editor_panel=null}},$.fn.ditty_layout_css_editor_panel=function(t){var e,s=arguments,a=!1;if(void 0===t||"object"==typeof t)return this.each((function(){this._ditty_layout_css_editor_panel||(this._ditty_layout_css_editor_panel=new i(this,t))}));if("string"==typeof t){if(this.each((function(){var i=this._ditty_layout_css_editor_panel;if(!i)throw new Error("No Ditty_Layout_Css_Editor_Panel applied to this element.");"function"==typeof i[t]&&"_"!==t[0]?e=i[t].apply(i,[].slice.call(s,1)):a=!0})),a)throw new Error('No method "'+t+'" in Ditty_Layout_Css_Editor_Panel.');return void 0!==e?e:this}},$.ditty_layout_css_editor_panel={},$.ditty_layout_css_editor_panel.defaults=t}(jQuery),jQuery((function($){!function(){"use strict";function t(t,i){0===parseInt(i)?t.hide():t.show()}function i(t,i){"none"===i?t.hide():t.show()}function e(t,i){"none"===i?t.hide():t.show()}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(s,a){if("list"===a.displayType){var d=a.$form,n=d.find(".ditty-field--perPage"),r=d.find(".ditty-field--arrows").siblings(),o=d.find(".ditty-field--bullets").siblings();t(n,d.find('input[name="paging"]:checked').val()),d.find('input[name="paging"]').on("change",(function(){t(n,$(this).val())})),i(r,d.find('select[name="arrows"]').val()),d.find('select[name="arrows"]').on("change",(function(){i(r,$(this).val())})),e(o,d.find('select[name="bullets"]').val()),d.find('select[name="bullets"]').on("change",(function(){e(o,$(this).val())}))}}))}()})),jQuery((function($){!function(){"use strict";function t(t,i){var e=t.find('input[name="direction"]:checked').val(),s=t.find(".ditty-field--minHeight"),a=t.find(".ditty-field--maxHeight"),d=t.find('input[name="minHeight"]');if("down"===e||"up"===e){if(s.show(),a.show(),""===d.val()){var n="300px";d.val(n),i.options("minHeight",n)}}else s.hide(),a.hide()}function i(t){"filled"===t.find('input[name="scrollInit"]:checked').val()?t.find(".ditty-field--scrollDelay").show():t.find(".ditty-field--scrollDelay").hide()}function e(t){"no"===t.find('input[name="cloneItems"]:checked').val()?t.find(".ditty-field--wrapItems").show():t.find(".ditty-field--wrapItems").hide()}function s(t){var i=t.find('select[name="titleDisplay"]').val(),e=t.find(".ditty-field--titleDisplay");"none"===i?e.siblings().hide():e.siblings().show()}function a(a,d){t(a,d),a.find('input[name="direction"]').on("click",(function(){t(a,d)})),i(a),a.find('input[name="scrollInit"]').on("click",(function(){i(a)})),e(a),a.find('input[name="cloneItems"]').on("click",(function(){e(a)})),s(a),a.find('select[name="titleDisplay"]').on("change",(function(){s(a)}))}$("#ditty-editor").on("ditty_display_editor_panel_init",".ditty-editor__panel--displayEditor",(function(t,i){if("ticker"===i.displayType){var e=i.$form,s=e.parents("#ditty-editor__settings")[0];a(e,s._ditty_editor.ditty)}})),$(".ditty-sandbox").on("ditty_sandbox_init",(function(t,i,e){"ticker"===i.displayType&&a($(this).find("form"),e)}))}()})),jQuery((function($){!function(){"use strict";function t(t){"full"===t.find('input[name="content_display"]:checked').val()?(t.find(".ditty-field--excerpt_length").hide(),t.find(".ditty-field--excerpt_element").hide(),t.find(".ditty-field--more").hide(),t.find(".ditty-field--more_before").hide(),t.find(".ditty-field--more_after").hide(),t.find(".ditty-field--more_link").hide()):(t.find(".ditty-field--excerpt_length").show(),t.find(".ditty-field--excerpt_element").show(),t.find(".ditty-field--more").show(),t.find(".ditty-field--more_before").show(),t.find(".ditty-field--more_after").show(),t.find(".ditty-field--more_link").show())}$("#ditty-editor").on("ditty_item_editor_panel_init",".ditty-editor__panel--item_editor",(function(i,e){if("posts_feed"!==e.itemType&&"post"!==e.itemType)return!1;var s=e.$form;t(s),s.on("click",'input[name="content_display"]',(function(){t(s)}))}))}()}));
includes/js/editor_hooks/ditty-item-edit-editor.js CHANGED
@@ -8,17 +8,20 @@ jQuery( function( $ ) {
8
  function toggle_content_fields( $form ) {
9
  var val = $form.find( 'input[name="content_display"]:checked' ).val();
10
  if ( 'full' === val ) {
11
- $form.find( '.ditty-field--more_link' ).hide();
12
  $form.find( '.ditty-field--excerpt_length' ).hide();
 
13
  $form.find( '.ditty-field--more' ).hide();
14
  $form.find( '.ditty-field--more_before' ).hide();
15
  $form.find( '.ditty-field--more_after' ).hide();
 
16
  } else {
17
- $form.find( '.ditty-field--more_link' ).show();
18
  $form.find( '.ditty-field--excerpt_length' ).show();
 
19
  $form.find( '.ditty-field--more' ).show();
20
  $form.find( '.ditty-field--more_before' ).show();
21
  $form.find( '.ditty-field--more_after' ).show();
 
22
  }
23
  }
24
 
8
  function toggle_content_fields( $form ) {
9
  var val = $form.find( 'input[name="content_display"]:checked' ).val();
10
  if ( 'full' === val ) {
 
11
  $form.find( '.ditty-field--excerpt_length' ).hide();
12
+ $form.find( '.ditty-field--excerpt_element' ).hide();
13
  $form.find( '.ditty-field--more' ).hide();
14
  $form.find( '.ditty-field--more_before' ).hide();
15
  $form.find( '.ditty-field--more_after' ).hide();
16
+ $form.find( '.ditty-field--more_link' ).hide();
17
  } else {
18
+
19
  $form.find( '.ditty-field--excerpt_length' ).show();
20
+ $form.find( '.ditty-field--excerpt_element' ).show();
21
  $form.find( '.ditty-field--more' ).show();
22
  $form.find( '.ditty-field--more_before' ).show();
23
  $form.find( '.ditty-field--more_after' ).show();
24
+ $form.find( '.ditty-field--more_link' ).show();
25
  }
26
  }
27
 
includes/layout-tag-hooks-posts.php CHANGED
@@ -1,12 +1,69 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * Add to the item tags for layouts
5
  *
6
  * @since 3.0
7
  */
8
  function ditty_posts_lite_layout_tags( $tags, $item_type ) {
9
- if( 'posts_feed' == $item_type || 'post' == $item_type ) {
10
  if ( isset( $tags['image'] ) ) {
11
  $tags['image']['atts']['size'] = 'large';
12
  }
@@ -155,7 +212,7 @@ add_filter( 'ditty_layout_tag_category_data', 'ditty_posts_lite_layout_tag_categ
155
  /**
156
  * Modify the layout content
157
  *
158
- * @since 3.0.12
159
  * @var html
160
  */
161
  function ditty_posts_lite_layout_tag_content( $content, $item_type, $data, $atts ) {
1
  <?php
2
 
3
+ /**
4
+ * Modify tag attributes based on settings
5
+ *
6
+ * @since 3.0.18
7
+ */
8
+ function ditty_posts_lite_layout_tags_atts( $atts, $tag, $item_type, $data ) {
9
+ if ( 'posts_feed' != $item_type && 'post' != $item_type ) {
10
+ return $atts;
11
+ }
12
+ switch( $tag ) {
13
+ case 'title':
14
+ if ( isset( $data['title_element'] ) ) {
15
+ switch ( $data['title_element'] ) {
16
+ case 'default':
17
+ break;
18
+ case 'none':
19
+ $atts['wrapper'] = false;
20
+ break;
21
+ default:
22
+ $atts['wrapper'] = esc_attr( $data['title_element'] );
23
+ break;
24
+ }
25
+ }
26
+ if ( isset( $data['title_link'] ) ) {
27
+ switch ( $data['title_link'] ) {
28
+ case 'off':
29
+ $atts['link'] = false;
30
+ break;
31
+ case 'on':
32
+ $atts['link'] = 'post';
33
+ break;
34
+ default:
35
+ break;
36
+ }
37
+ }
38
+ break;
39
+ case 'content':
40
+ if ( isset( $data['content_display'] ) && 'excerpt' == $data['content_display'] && isset( $data['excerpt_element'] ) ) {
41
+ switch ( $data['excerpt_element'] ) {
42
+ case 'default':
43
+ break;
44
+ case 'none':
45
+ $atts['wrapper'] = false;
46
+ break;
47
+ default:
48
+ $atts['wrapper'] = esc_attr( $data['excerpt_element'] );
49
+ break;
50
+ }
51
+ }
52
+ break;
53
+ default:
54
+ break;
55
+ }
56
+ return $atts;
57
+ }
58
+ add_filter( 'ditty_layout_tag_atts', 'ditty_posts_lite_layout_tags_atts', 10, 4 );
59
+
60
  /**
61
  * Add to the item tags for layouts
62
  *
63
  * @since 3.0
64
  */
65
  function ditty_posts_lite_layout_tags( $tags, $item_type ) {
66
+ if ( 'posts_feed' == $item_type || 'post' == $item_type ) {
67
  if ( isset( $tags['image'] ) ) {
68
  $tags['image']['atts']['size'] = 'large';
69
  }
212
  /**
213
  * Modify the layout content
214
  *
215
+ * @since 3.0.18
216
  * @var html
217
  */
218
  function ditty_posts_lite_layout_tag_content( $content, $item_type, $data, $atts ) {
includes/layout-templates.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Return all possible layout templates
5
  *
6
- * @since 3.0.12
7
  * @var html
8
  */
9
  function ditty_layout_templates() {
@@ -27,7 +27,7 @@ function ditty_layout_templates() {
27
  'description' => __( 'Default layout for Posts.', 'ditty-news-ticker' ),
28
  'html' => ditty_layout_default_post_html(),
29
  'css' => ditty_layout_default_post_css(),
30
- 'version' => '1.1',
31
  ),
32
  );
33
  return apply_filters( 'ditty_layout_templates', $layout_templates );
@@ -174,7 +174,7 @@ function ditty_layout_default_image_css() {
174
  /**
175
  * The default post template
176
  *
177
- * @since 3.0.12
178
  * @access private
179
  * @var string
180
  */
@@ -191,7 +191,7 @@ function ditty_layout_default_post_html() {
191
  </div>
192
  </div>
193
  {title link="post"}
194
- {excerpt}
195
  <?php
196
  return ob_get_clean();
197
  }
@@ -275,11 +275,19 @@ function ditty_layout_default_post_css() {
275
  font-size: 18px;
276
  margin: 0;
277
  }
278
- .ditty-item__content {
279
- margin-top: 5px;
280
- }
281
  .ditty-item__excerpt {
282
- margin-top: 5px;
 
 
 
 
 
 
 
 
 
 
283
  }
284
  <?php
285
  return ob_get_clean();
3
  /**
4
  * Return all possible layout templates
5
  *
6
+ * @since 3.0.18
7
  * @var html
8
  */
9
  function ditty_layout_templates() {
27
  'description' => __( 'Default layout for Posts.', 'ditty-news-ticker' ),
28
  'html' => ditty_layout_default_post_html(),
29
  'css' => ditty_layout_default_post_css(),
30
+ 'version' => '1.2',
31
  ),
32
  );
33
  return apply_filters( 'ditty_layout_templates', $layout_templates );
174
  /**
175
  * The default post template
176
  *
177
+ * @since 3.0.18
178
  * @access private
179
  * @var string
180
  */
191
  </div>
192
  </div>
193
  {title link="post"}
194
+ {content}
195
  <?php
196
  return ob_get_clean();
197
  }
275
  font-size: 18px;
276
  margin: 0;
277
  }
278
+ .ditty-item__content,
 
 
279
  .ditty-item__excerpt {
280
+ font-size: 15px;
281
+ line-height: 1.3125;
282
+ margin: 5px 0 0 0;
283
+ }
284
+ .ditty-item__content p {
285
+ font-size: 15px;
286
+ line-height: 1.3125;
287
+ margin-top: 0;
288
+ }
289
+ .ditty-item__content p:last-child {
290
+ margin-bottom: 0;
291
  }
292
  <?php
293
  return ob_get_clean();
includes/sass/admin/_rtl.scss CHANGED
@@ -29,7 +29,8 @@ body.rtl {
29
  padding-left: 5px;
30
  margin-right: 0;
31
  margin-left: auto;
32
- .ditty-display-version {
 
33
  margin-right: 5px;
34
  }
35
  }
29
  padding-left: 5px;
30
  margin-right: 0;
31
  margin-left: auto;
32
+ small {
33
+ margin-left: 0;
34
  margin-right: 5px;
35
  }
36
  }
includes/sass/admin/_settings.scss CHANGED
@@ -340,4 +340,10 @@
340
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
341
  padding-bottom: 10px;
342
  margin-bottom: 10px !important;
 
 
 
 
 
 
343
  }
340
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
341
  padding-bottom: 10px;
342
  margin-bottom: 10px !important;
343
+ }
344
+
345
+ .ditty-data-list__item__label {
346
+ small {
347
+ margin-left: 5px;
348
+ }
349
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: ticker, post ticker, news ticker, content aggregator, latest posts, live refresh, rotator, data rotator, lists, data, aggregator
5
  Requires at least: 4.5
6
  Tested up to: 5.9.2
7
- Stable tag: 3.0.17
8
  License: GPL2
9
 
10
  Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
@@ -66,6 +66,11 @@ The most common cause for an unresponsive Ditty (when using scroll or rotate mod
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
69
  = 3.0.17 =
70
  * Added Import/Export functionality
71
  * Added Ditty shortcode to Ditty edit screen
@@ -695,4 +700,4 @@ The most common cause for an unresponsive Ditty (when using scroll or rotate mod
695
 
696
  == Upgrade Notice ==
697
 
698
- Added Import/Export functionality and other updates
4
  Tags: ticker, post ticker, news ticker, content aggregator, latest posts, live refresh, rotator, data rotator, lists, data, aggregator
5
  Requires at least: 4.5
6
  Tested up to: 5.9.2
7
+ Stable tag: 3.0.18
8
  License: GPL2
9
 
10
  Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
66
 
67
  == Changelog ==
68
 
69
+ = 3.0.18 =
70
+ * Added Title settings for Posts feed lite
71
+ * Added Content settings for Posts feed lite
72
+ * Updated the default post Layout
73
+
74
  = 3.0.17 =
75
  * Added Import/Export functionality
76
  * Added Ditty shortcode to Ditty edit screen
700
 
701
  == Upgrade Notice ==
702
 
703
+ Added additional Post feed lite settings