Serious Slider - Version 1.0.0

Version Description

  • Added 4 new design styles (Square, Tall, Caption Left & Caption Bottom)
  • Totally revamped design of existing styles (Light, Dark, Bootstrap & Cryout)
  • Added slider buttons with up to 2 buttons per slide (with customizable label and link); removed in-caption links styling
  • Added caption alignment and caption max-width options
  • Added caption text styling option
  • Added accent color option
  • Added caption animation option with 4 effects
  • Added quick image management (add/change/remove) in the slides list section
  • Added 'orderby', 'hidecaption', 'hidetitle' slider shortcode parameters
  • Updated caption markup for compatibility with our Kahuna and Anima themes built-in styling
  • Several minor tweaks:
    • link to slides management in the slider section, added 'Insert Slider' button next to 'Insert Media';
    • moved toolbar button to secondary TinyMCE Editor row;
    • updated plugin info and links;
    • new banner and icon images;
    • added missing 'no sliders' message;
Download this release

Release Info

Developer Cryout Creations
Plugin Icon 128x128 Serious Slider
Version 1.0.0
Comparing to
See all releases

Code changes from version 0.6.5 to 1.0.0

cryout-serious-slider.php CHANGED
@@ -1,683 +1,866 @@
1
- <?php
2
- /*
3
- Plugin Name: Cryout Serious Slider
4
- Plugin URI: http://www.cryoutcreations.eu/serious-slider
5
- Description: Responsive slider, built on Bootstrap Carousel, uses core WordPress functionality, easy to use, seriously.
6
- Version: 0.6.5
7
- Author: Cryout Creations
8
- Author URI: http://www.cryoutcreations.eu
9
- Text Domain: cryout-serious-slider
10
- License: GPLv3
11
- License URI: http://www.gnu.org/licenses/gpl.html
12
- */
13
-
14
- class Cryout_Serious_Slider {
15
-
16
- public $version = "0.6.5";
17
- public $options = array();
18
- public $shortcode_tag = 'serious-slider';
19
- public $mce_tag = 'serious_slider';
20
-
21
- public $slug = 'cryout-serious-slider';
22
- public $posttype = 'cryout_serious_slide'; // 20 chars!
23
- public $taxonomy = 'cryout_serious_slider_category';
24
- private $title = '';
25
- private $thepage = '';
26
- private $aboutpage = '';
27
- private $addnewpage = '';
28
- public $defaults = array(
29
- 'cryout_serious_slider_sort' => 'date', // date, order
30
- 'cryout_serious_slider_sizing' => 0, // 1 = force slider size
31
- 'cryout_serious_slider_width' => '1920', // px
32
- 'cryout_serious_slider_height' => '700', // px
33
- 'cryout_serious_slider_theme' => 'light', // light, dark, theme, bootstrap
34
- 'cryout_serious_slider_textsize' => '1.0', // em
35
- 'cryout_serious_slider_overlay' => 1, // 1 = autohide, 2 = visible
36
- 'cryout_serious_slider_animation' => 'slide', // fade, slide, overslide, underslide, parallax, hflip, vflip
37
- 'cryout_serious_slider_hover' => 'hover', // hover, false
38
- 'cryout_serious_slider_delay' => 5000, // ms
39
- 'cryout_serious_slider_transition' => 1000 // ms
40
- );
41
-
42
- public function __construct(){
43
- require_once( plugin_dir_path( __FILE__ ) . 'inc/shortcodes.php' );
44
- require_once( plugin_dir_path( __FILE__ ) . 'inc/widgets.php' );
45
- add_action( 'init', array( $this, 'register' ) );
46
- add_action( 'init', array( $this, 'register_post_types' ) );
47
- //add_action( 'init', array( $this, 'register_taxonomies' ), 0 );
48
- add_action( 'setup_theme', array( $this, 'register_taxonomies' ) );
49
- } // __construct()
50
-
51
-
52
- /**********************
53
- * main class registration function
54
- ***********************/
55
- public function register(){
56
-
57
- $this->title = __( 'Serious Slider', 'cryout-serious-slider' );
58
- $this->aboutpage = 'edit.php?post_type=' . $this->posttype . '&page=' . $this->slug . '-about';
59
- $this->addnewpage = 'post-new.php?post_type=' . $this->posttype;
60
-
61
- //$this->options = $this->get_settings();
62
-
63
- if (! is_admin() ) {
64
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
65
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
66
- } // if (! is_admin())
67
-
68
- if (is_admin() ) {
69
-
70
- //add_action( 'admin_init', array( $this, 'register_settings' ) );
71
- add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'actions_links' ), -10 );
72
- add_filter( 'plugin_row_meta', array( $this, 'meta_links' ), 10, 2 );
73
- add_action( 'admin_menu', array( $this, 'settings_menu' ) );
74
-
75
- // slides list page columns customizations
76
- add_filter( 'manage_edit-'.$this->posttype.'_columns', array($this, 'columns_edit' ) );
77
- add_action( 'manage_'.$this->posttype.'_posts_custom_column', array($this, 'columns_content'), 10, 2 );
78
- add_filter( 'manage_edit-'.$this->posttype.'_sortable_columns', array($this, 'order_column_register_sortable') );
79
- // taxonomy list columns customizations
80
- add_filter( 'manage_edit-'.$this->taxonomy.'_columns', array($this, 'columns_edit_taxonomy' ) );
81
- add_action( 'manage_'.$this->taxonomy.'_custom_column', array($this, 'custom_content_taxonomy' ), 10, 3);
82
- //add_action( 'admin_head-edit.php', array($this, 'custom_list_css') );
83
- //add_action( 'admin_head-edit-tags.php', array($this, 'custom_list_css') );
84
- //add_action( 'admin_head-post-new.php', array($this, 'custom_list_css') );
85
- add_action( 'restrict_manage_posts', array($this, 'add_taxonomy_filters') );
86
- add_action( 'save_post', array($this, 'metabox_save') );
87
-
88
- // shortcode button
89
- add_action( 'admin_head', array( $this, 'admin_head') );
90
- add_action( 'admin_enqueue_scripts', array($this , 'admin_enqueue_scripts' ) );
91
-
92
- $localized_mce_strings = array(
93
- 'text_retrieving_sliders' => __('Retrieving sliders...', 'cryout-serious-slider'),
94
- 'text_retrieving_sliders_error' => __('Error retrieving sliders', 'cryout-serious-slider'),
95
- 'text_serious_slider' => __('Cryout Serious Slider', 'cryout-serious-slider'),
96
- 'text_serious_slider_tooltip' => __('Serious Slider', 'cryout-serious-slider'),
97
- 'text_insert_slider' => __('Insert Slider', 'cryout-serious-slider'),
98
- 'text_cancel' => __('Cancel', 'cryout-serious-slider'),
99
- 'text_select_slider' => __('Select Slider', 'cryout-serious-slider'),
100
- 'text_add_slider' => __('Add Slider', 'cryout-serious-slider'),
101
- );
102
-
103
- // ajax handling for slider parameters in shortcode button generator
104
- wp_enqueue_script( 'cryout-serious-slider-ajax', plugins_url( 'resources/backend.js', __FILE__ ), NULL, $this->version );
105
- wp_localize_script( 'cryout-serious-slider-ajax', 'cryout_serious_slider_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
106
- wp_localize_script( 'cryout-serious-slider-ajax', 'CRYOUT_MCE_LOCALIZED', $localized_mce_strings );
107
- add_action( 'wp_ajax_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // auth users
108
- add_action( 'wp_ajax_nopriv_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // no auth users
109
-
110
- //add_action( 'admin_notices', array( $this, 'admin_notice' ) );
111
-
112
- } // if (is_admin())
113
-
114
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
115
-
116
- } // register()
117
-
118
-
119
- /**********************
120
- * translation domain
121
- ***********************/
122
- function load_textdomain() {
123
- load_plugin_textdomain( 'cryout-serious-slider', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
124
- }
125
-
126
-
127
- /**********************
128
- * enqueues
129
- ***********************/
130
- public function enqueue_scripts() {
131
- wp_enqueue_script( 'cryout-serious-slider-jquerymobile', plugins_url( 'resources/jquery.mobile.custom.min.js', __FILE__ ), array('jquery'), $this->version );
132
- wp_enqueue_script( 'cryout-serious-slider-script', plugins_url( 'resources/slider.js', __FILE__ ), NULL, $this->version );
133
- } // enqueue_scripts()
134
-
135
- public function enqueue_styles() {
136
- wp_register_style( 'cryout-serious-slider-style', plugins_url( 'resources/style.css', __FILE__ ), NULL, $this->version );
137
- wp_enqueue_style( 'cryout-serious-slider-style' );
138
- } // enqueue_styles()
139
-
140
- /**********************
141
- * notification
142
- ***********************/
143
- /*public static function admin_notice() {
144
- ?>
145
- <div class="notice notice-success is-dismissible">
146
- <p></p>
147
- </div>
148
- <?php
149
- } // admin_notice_on_activation()
150
-
151
- public static function admin_notice_on_activation() {
152
- add_action('init', array('Cryout_Serious_Slider', 'admin_notice') );
153
- }*/
154
-
155
- /**********************
156
- * settings
157
- ***********************/
158
- /* // register plugin settings
159
- public function register_settings() {
160
- register_setting( 'cryout_serious_slider_group', 'cryout_serious_slider' );
161
- } // register_settings()*/
162
-
163
- // register settings page to dashboard menu
164
- public function settings_menu() {
165
- $this->thepage = add_submenu_page( 'edit.php?post_type='.$this->posttype, __('About', 'cryout-serious-slider'), __('About', 'cryout-serious-slider'), 'edit_others_posts', $this->slug . '-about', array( $this, 'settings_page' ) );
166
- } // settings_menu()
167
-
168
- public function settings_page() {
169
- if (!empty($_GET['add_sample_content'])&&current_user_can('edit_others_posts'))
170
- include_once( plugin_dir_path( __FILE__ ) . 'demo/demo-content.php' );
171
- require_once( plugin_dir_path( __FILE__ ) . 'inc/settings.php' );
172
- } // settings_page()
173
-
174
- // add plugin actions links
175
- public function actions_links( $links ) {
176
- array_unshift( $links, '<a href="' . $this->aboutpage . '">' . __( 'About Plugin', 'cryout-serious-slider' ) . '</a>' );
177
- return $links;
178
- }
179
-
180
- // add plugin meta links
181
- public function meta_links( $links, $file ) {
182
- // Check plugin
183
- if ( $file === plugin_basename( __FILE__ ) ) {
184
- unset( $links[2] );
185
- $links[] = '<a href="http://www.cryoutcreations.eu/cryout-serious-slider/" target="_blank">' . __( 'Plugin homepage', 'cryout-serious-slider' ) . '</a>';
186
- $links[] = '<a href="http://www.cryoutcreations.eu/forum/" target="_blank">' . __( 'Support forum', 'cryout-serious-slider' ) . '</a>';
187
- $links[] = '<a href="http://wordpress.org/plugins/cryout-serious-slider/changelog/" target="_blank">' . __( 'Changelog', 'cryout-serious-slider' ) . '</a>';
188
- }
189
- return $links;
190
- }
191
-
192
- /* settings handlers */
193
- /* public function get_settings() {
194
- $options = get_option('cryout_serious_slider');
195
- $options = array_merge($this->defaults,(array)$options);
196
- $this->options = $options;
197
- return $options;
198
- } // get_settings()
199
-
200
- public function save_settings() {
201
- if ( isset( $_POST['settings_submit'] ) && check_admin_referer( 'cryout_serious_slider', '_wpnonce' ) ):
202
- $saved_options = $_POST['cryout_serious_slider'];
203
-
204
- foreach ($saved_options as $option => $value):
205
- $saved_options[$option] = wp_kses_data($value);
206
- endforeach;
207
-
208
- update_option( 'cryout_serious_slider', $saved_options );
209
- wp_redirect( 'edit.php?post_type='.$this->posttype.'&page='.$this->slug.'-settings'.'&updated=true' );
210
- endif;
211
- } // save_settings() */
212
-
213
-
214
- /**********************
215
- * helpers
216
- ***********************/
217
-
218
- /* return taxonomy id for slide id */
219
- public function get_slide_slider( $slide_ID, $taxonomy = '') {
220
- if (empty($taxonomy)) $taxonomy = $this->taxonomy;
221
- $tax = wp_get_object_terms( $slide_ID, $taxonomy );
222
- if (!empty($tax))
223
- return $tax[0]->term_id;
224
- else
225
- return 0;
226
- } // get_slide_slider()
227
-
228
- /* return sliders list for mce insert window */
229
- public function get_sliders_json() {
230
- $sliders = $this->get_sliders();
231
- echo json_encode($sliders);
232
- wp_die();
233
- } // get_sliders_json()
234
-
235
- public function get_sliders() {
236
- $data = get_terms( $this->taxonomy, array( 'hide_empty' => false ) );
237
-
238
- $sliders = array();
239
- foreach ($data as $slider) {
240
- $sliders[] = array('text'=>$slider->name, 'value'=>$slider->term_id);
241
- }
242
-
243
- if (count($sliders)<1) $sliders = array( array('text' => __('No sliders available. Create a slider first...', 'cryout-serious-slider'), 'value' => 0) );
244
-
245
- return $sliders;
246
- } // get_sliders()
247
-
248
- /* theme compatibility function */
249
- public function get_sliders_list() {
250
- $data = get_terms( $this->taxonomy, array( 'hide_empty' => false ) );
251
-
252
- $sliders = array();
253
- foreach ($data as $slider) {
254
- if (!empty($slider->term_id)) $sliders[$slider->term_id] = $slider->name;
255
- }
256
- return $sliders;
257
- } // get_sliders_list()
258
-
259
- /* customize taxonomy selection box in add slide window */
260
- function custom_category_picker( $post, $box ) {
261
- $defaults = array( 'taxonomy' => 'category' );
262
- if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) {
263
- $args = array();
264
- } else {
265
- $args = $box['args'];
266
- }
267
- $r = wp_parse_args( $args, $defaults );
268
- $tax_name = esc_attr( $r['taxonomy'] );
269
- $taxonomy = get_taxonomy( $r['taxonomy'] );
270
- ?>
271
- <div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
272
- <?php
273
- $name = ( $tax_name == 'category' ) ? 'post_category' : 'tax_input[' . $tax_name . ']';
274
- ?>
275
- <ul id="<?php echo $tax_name; ?>_selector" data-wp-lists="list:<?php echo $tax_name; ?>" class="form-no-clear">
276
- <?php
277
- $cat_dropdown_args = array(
278
- 'taxonomy' => $tax_name,
279
- 'hide_empty' => 0,
280
- 'name' => 'tax_input[' . $tax_name . ']',
281
- 'orderby' => 'name',
282
- 'selected' => $this->get_slide_slider( $post->ID ),
283
- 'hierarchical' => 0,
284
- 'show_option_none' => '&mdash; ' . __('Select slider', 'cryout-serious-slider') . ' &mdash;',
285
- );
286
-
287
- wp_dropdown_categories( $cat_dropdown_args );
288
- ?>
289
- </ul>
290
- <a class="taxonomy-add-new" href="edit-tags.php?taxonomy=<?php echo $this->taxonomy ?>&post_type=<?php echo $this->posttype; ?>" id=""><?php _e(
291
- 'Define Sliders', 'cryout-serious-slider') ?></a>
292
- </div>
293
- <?php
294
- } // slide_custom_category()
295
-
296
-
297
- /**********************
298
- * custom post types
299
- ***********************/
300
- public function register_post_types() {
301
-
302
- /* Set up arguments for the custom post type. */
303
- $args = array(
304
- 'public' => false,
305
- 'show_ui' => true,
306
- 'show_admin_column' => true,
307
- 'show_in_admin_bar' => true,
308
- 'query_var' => true,
309
- 'description' => __( 'Description.', 'cryout-serious-slider' ),
310
- 'show_in_nav_menus' => false,
311
- 'menu_position' => 21,
312
- 'menu_icon' => plugins_url('/resources/images/serious-slider-icon.png',__FILE__),
313
- 'capability_type' => 'page',
314
- 'supports' => array(
315
- 'title',
316
- 'editor',
317
- //'excerpt',
318
- 'thumbnail',
319
- 'page-attributes',
320
- ),
321
- 'labels' => array(
322
- 'name' => _x( 'Slides', 'post type general name', 'cryout-serious-slider' ),
323
- 'singular_name' => _x( 'Slide', 'post type singular name', 'cryout-serious-slider' ),
324
- 'menu_name' => _x( 'Serious Slider', 'admin menu', 'cryout-serious-slider' ),
325
- 'name_admin_bar' => _x( 'Serious Slide', 'add new on admin bar', 'cryout-serious-slider' ),
326
- 'add_new' => _x( 'Add New Slide', 'and new in menu', 'cryout-serious-slider' ),
327
- 'add_new_item' => __( 'Add New Slide', 'cryout-serious-slider' ),
328
- 'new_item' => __( 'New Slide', 'cryout-serious-slider' ),
329
- 'edit_item' => __( 'Edit Slide', 'cryout-serious-slider' ),
330
- 'view_item' => __( 'View Slide', 'cryout-serious-slider' ),
331
- 'all_items' => __( 'All Slides', 'cryout-serious-slider' ),
332
- 'search_items' => __( 'Search Slide', 'cryout-serious-slider' ),
333
- 'parent_item_colon' => __( 'Parent Slides:', 'cryout-serious-slider' ),
334
- 'not_found' => sprintf( __( 'No slides found. Go ahead and add <a href="%1$s">add some</a> or <a href="%2$s">load sample content</a>.', 'cryout-serious-slider' ), $this->addnewpage, $this->aboutpage ),
335
- 'not_found_in_trash' => __( 'No slides found in Trash.', 'cryout-serious-slider' )
336
- ),
337
- 'taxonomies' => array(
338
- $this->taxonomy,
339
- ),
340
- 'register_meta_box_cb' => array( $this, 'metabox_register' ),
341
- );
342
-
343
- /* Register the post type. */
344
- register_post_type( $this->posttype, $args );
345
-
346
- } // register_post_types()
347
-
348
- /* Set up custom taxonomies for the custom post type */
349
- public function register_taxonomies() {
350
-
351
- $cat_args = array(
352
- 'public' => false,
353
- 'hierarchical' => true,
354
- 'labels' => array(
355
- 'name' => _x( 'Sliders', 'taxonomy general name', 'cryout-serious-slider' ),
356
- 'singular_name' => _x( 'Slider', 'taxonomy singular name', 'cryout-serious-slider' ),
357
- 'search_items' => __( 'Search Sliders', 'cryout-serious-slider' ),
358
- 'all_items' => __( 'All Sliders', 'cryout-serious-slider' ),
359
- 'parent_item' => __( 'Parent Slider', 'cryout-serious-slider' ),
360
- 'parent_item_colon' => __( 'Parent Slider:', 'cryout-serious-slider' ),
361
- 'edit_item' => __( 'Edit Slider', 'cryout-serious-slider' ),
362
- 'update_item' => __( 'Update Slider', 'cryout-serious-slider' ),
363
- 'add_new_item' => __( 'Add New Slider', 'cryout-serious-slider' ),
364
- 'new_item_name' => __( 'New Slider', 'cryout-serious-slider' ),
365
- 'menu_name' => __( 'Define Sliders', 'cryout-serious-slider' ),
366
- ),
367
- 'show_ui' => true,
368
- 'show_admin_column' => true,
369
- 'query_var' => true,
370
-
371
- 'meta_box_cb' => array( $this, 'custom_category_picker' ), // customize taxonomy box selector
372
- );
373
-
374
- register_taxonomy( $this->taxonomy, array( $this->posttype ), $cat_args );
375
- add_action( $this->taxonomy . '_add_form_fields', array($this, 'metatax_main_add'), 10, 2 );
376
- add_action( $this->taxonomy . '_edit_form_fields', array($this, 'metatax_main_edit'), 10, 2 );
377
- add_action( $this->taxonomy . '_edit_form', array($this, 'right_column'), 10, 2 ); // _pre_edit_form // _edit_form
378
-
379
- add_action( 'edited_' . $this->taxonomy, array($this, 'save_taxonomy_custom_meta'), 10, 2 );
380
- add_action( 'create_' . $this->taxonomy, array($this, 'save_taxonomy_custom_meta'), 10, 2 );
381
- add_action( 'delete_' . $this->taxonomy, array($this, 'delete_taxonomy_custom_meta'), 10, 2 );
382
-
383
- } // register_taxonomies()
384
-
385
-
386
- /**********************
387
- * dashboard layout customization
388
- ***********************/
389
- public function columns_edit( $columns ) {
390
-
391
- $columns = array(
392
- 'cb' => '<input type="checkbox" />',
393
- 'title' => __( 'Title', 'cryout-serious-slider' ),
394
- $this->taxonomy => __( 'Slider', 'cryout-serious-slider' ),
395
- 'featured_image' => __( 'Featured Image', 'cryout-serious-slider' ),
396
- 'date' => __( 'Date', 'cryout-serious-slider' ),
397
- 'menu_order' => __( 'Order', 'cryout-serious-slider' ),
398
- );
399
- return $columns;
400
- } // columns_edit()
401
-
402
- // Show the featured image & taxonomy in posts list
403
- public function columns_content($column_name, $post_ID) {
404
- global $post;
405
-
406
- switch ($column_name) {
407
- case 'featured_image':
408
-
409
- $featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_ID ), 'medium' );
410
- $featured_image = $featured_image[0];
411
- if ($featured_image) {
412
- echo '<img style="max-width: 100%;" src="' . $featured_image . '" />';
413
- } else {
414
- _e('No featured image set.', 'cryout-serious-slider');
415
- }
416
-
417
- break;
418
-
419
- case $this->taxonomy:
420
-
421
- $terms = get_the_terms( $post->ID, $this->taxonomy );
422
- if ( !empty( $terms ) ) {
423
-
424
- $out = array();
425
- foreach ( $terms as $term ) {
426
- $out[] = sprintf( '<a href="%1$s">%2$s</a><div class="row-actions"><span class="edit"><a href="%3$s">%4$s</a></span></div>',
427
- esc_url( add_query_arg( array( 'post_type' => $post->post_type, $this->taxonomy => $term->slug ), 'edit.php' ) ),
428
- esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, $this->taxonomy, 'display' ) ),
429
- esc_url( add_query_arg( array( 'action' => 'edit', 'taxonomy' => $this->taxonomy, 'tag_ID' => $term->term_id, 'post_type' => $post->post_type ), 'edit-tags.php' ) ),
430
- __('Edit slider', 'cryout-serious-slider')
431
- );
432
-
433
- }
434
- echo join( ', ', $out );
435
-
436
- }
437
-
438
- else {
439
- _e( 'No Slider', 'cryout-serious-slider' );
440
- }
441
-
442
- break;
443
-
444
- case 'menu_order':
445
-
446
- $order = $post->menu_order;
447
- echo $order;
448
-
449
- break;
450
- }
451
- } // columns_content()
452
-
453
- /* Add sort by columns support */
454
- public function order_column_register_sortable($columns){
455
- $columns['menu_order'] = 'menu_order';
456
- $columns[$this->taxonomy] = $this->taxonomy;
457
- return $columns;
458
- } // order_column_register_sortable()
459
-
460
- /* Add shortcode column in taxonomy screen */
461
- public function columns_edit_taxonomy( $columns ){
462
- return array_merge(
463
- array_splice( $columns, 0, count($columns)-1 ),
464
- array( 'shortcode' => __('Shortcode', 'cryout-serious-slider') ),
465
- array_splice( $columns, count($columns)-1, 1 )
466
- );
467
- } // columns_edit_taxonomy()
468
- public function custom_content_taxonomy( $empty, $column, $id ) {
469
- switch ($column) {
470
- case 'shortcode':
471
- echo '[serious-slider id="' . $id . '"]';
472
- break;
473
- default:
474
- break;
475
- } // end switch
476
- } // custom_content_taxonomy()
477
-
478
- /*
479
- public function custom_list_css() {
480
-
481
- } // custom_list_css() */
482
-
483
- function add_taxonomy_filters() {
484
- global $typenow;
485
-
486
- $taxonomies = array( $this->taxonomy );
487
-
488
- // must set this to the post type you want the filter(s) displayed on
489
- if( $typenow == $this->posttype ){
490
-
491
- foreach ($taxonomies as $tax_slug) {
492
- $tax_obj = get_taxonomy($tax_slug);
493
- $tax_name = $tax_obj->labels->name;
494
- $terms = get_terms($tax_slug);
495
- if (!empty($_GET[$tax_slug])) $filtered_tax = sanitize_text_field($_GET[$tax_slug]); else $filtered_tax = '';
496
- if(count($terms) > 0) {
497
- echo "<select name='$tax_slug' id='filter_$tax_slug' class='postform'>";
498
- printf( "<option value=''>%s</option>", sprintf( _x('Select %s', 'select terms', 'cryout-serious-slider'), $tax_name ) );
499
- foreach ($terms as $term) {
500
- echo '<option value='. $term->slug, $filtered_tax == $term->slug ? ' selected="selected"' : '','>' . $term->name .' (' . $term->count .')</option>';
501
- }
502
- echo "</select>";
503
- }
504
- }
505
- }
506
- } // add_taxonomy_filters()
507
-
508
- // add right column content (with shortcode hint) on edit slider page */
509
- function right_column( $tag, $taxonomy ) {
510
- $term_ID = $tag->term_id;
511
- include_once( plugin_dir_path( __FILE__ ) . 'inc/right-column.php' );
512
- } // right_column()
513
-
514
- /*public function custom_js() {
515
- global $post_type;
516
- //
517
- } // custom_js()*/
518
-
519
-
520
- /**********************
521
- * slide meta
522
- ***********************/
523
- /* Custom post types metaboxes */
524
- function metabox_register() {
525
- add_meta_box('serious_slider_metaboxes', __( 'Slide Link', 'cryout-serious-slider' ), array($this, 'metabox_main'), $this->posttype, 'normal', 'high');
526
- } // metabox_register()
527
-
528
- function metabox_main() {
529
-
530
- global $post;
531
- $values = get_post_custom( $post->ID );
532
- $text = isset( $values['cryout_serious_slider_link'] ) ? $values['cryout_serious_slider_link'][0] : '';
533
- $check = isset( $values['cryout_serious_slider_target'] ) ? esc_attr( $values['cryout_serious_slider_target'][0] ) : '';
534
-
535
- wp_nonce_field( 'cryout_serious_slider_meta_nonce', 'cryout_serious_slider_meta_nonce' ); ?>
536
-
537
- <p>
538
- <label for="cryout_serious_slider_link"><?php _e('Link URL', 'cryout-serious-slider') ?></label>
539
- <input type="text" size="40" name="cryout_serious_slider_link" id="cryout_serious_slider_link" value="<?php echo $text; ?>" />
540
- <span>&nbsp;&nbsp;</span>
541
- <input type="checkbox" id="cryout_serious_slider_target" name="cryout_serious_slider_target" <?php checked( $check ); ?> />
542
- <label for="cryout_serious_slider_target"><?php _e('Open In New Window', 'cryout-serious-slider') ?></label>
543
- <br><em><?php _e('Leave empty to disable link.', 'cryout-serious-slider') ?></em></p>
544
- <?php
545
-
546
- } // metabox_main()
547
-
548
- function metabox_save( $post_id ) {
549
-
550
- if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
551
- if( !isset( $_POST['cryout_serious_slider_meta_nonce'] ) || !wp_verify_nonce( $_POST['cryout_serious_slider_meta_nonce'], 'cryout_serious_slider_meta_nonce' ) ) return;
552
- if( !current_user_can( 'edit_post' ) ) return;
553
- $allowed = '';
554
-
555
- if( isset( $_POST['cryout_serious_slider_link'] ) )
556
- update_post_meta( $post_id, 'cryout_serious_slider_link', esc_url_raw( $_POST['cryout_serious_slider_link'], $allowed ) );
557
- $chk = isset( $_POST['cryout_serious_slider_target'] );
558
- update_post_meta( $post_id, 'cryout_serious_slider_target', $chk );
559
-
560
- } // metabox_save()
561
-
562
-
563
- /**********************
564
- * slider/taxonomy meta
565
- ***********************/
566
- public function metatax_main_add() {
567
-
568
- $the_meta = $this->defaults;
569
- require_once( plugin_dir_path( __FILE__ ) . 'inc/taxmeta.php' );
570
-
571
- } // metabox_main_add()
572
-
573
- public function metatax_main_edit($term) {
574
-
575
- $tid = $term->term_id;
576
- $the_meta = get_option( "cryout_serious_slider_${tid}_meta" );
577
- if ( empty($the_meta) ) $the_meta = $this->defaults; ?>
578
- <tr class="form-field">
579
- <td colspan="2">
580
- <?php require_once( plugin_dir_path( __FILE__ ) . 'inc/taxmeta.php' );?>
581
- </td>
582
- </tr><?php
583
-
584
- } // metatax_main_edit()
585
-
586
- function save_taxonomy_custom_meta( $tid ) {
587
- if ( isset( $_POST['term_meta'] ) ) {
588
- $term_meta = get_option( "cryout_serious_slider_${tid}_meta" );
589
- $cat_keys = array_keys( $_POST['term_meta'] );
590
- foreach ( $cat_keys as $key ) {
591
- if ( isset ( $_POST['term_meta'][$key] ) ) {
592
- $term_meta[$key] = sanitize_text_field($_POST['term_meta'][$key]);
593
- }
594
- }
595
- // Save the option array.
596
- update_option( "cryout_serious_slider_${tid}_meta", $term_meta );
597
- }
598
- } // save_taxonomy_custom_meta()
599
-
600
- function delete_taxonomy_custom_meta( $term_id ) {
601
- delete_option( "cryout_serious_slider_${term_id}_meta" );
602
- } // delete_taxonomy_custom_meta()
603
-
604
-
605
- /**********************
606
- * mce extension
607
- ***********************/
608
- function admin_head() {
609
- global $post_type;
610
- global $pagenow;
611
-
612
- // don't allow slider shortcode inside slide posts
613
- if( $this->posttype != $post_type && in_array( $pagenow, array( 'edit.php', 'post-new.php', 'post.php' ) ) ) {
614
- // check user permissions
615
- if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
616
- return;
617
- }
618
-
619
- // check if WYSIWYG is enabled
620
- if ( 'true' == get_user_option( 'rich_editing' ) ) {
621
- add_filter( 'mce_external_plugins', array( $this ,'register_mce_external_plugins' ) );
622
- add_filter( 'mce_buttons', array( $this, 'regiter_mce_buttons' ) );
623
- }
624
- }
625
- } // admin_head()
626
-
627
- function register_mce_external_plugins( $plugin_array ) {
628
- $plugin_array[$this->mce_tag] = plugins_url( 'resources/mce-button.js' , __FILE__ );
629
- return $plugin_array;
630
- } // register_mce_external_plugins()
631
-
632
- function regiter_mce_buttons( $buttons ) {
633
- array_push( $buttons, $this->mce_tag );
634
- return $buttons;
635
- } // regiter_mce_buttons()
636
-
637
- function admin_enqueue_scripts($hook){
638
- global $post_type;
639
- global $pagenow;
640
- if ( in_array( $pagenow, array( 'edit.php', 'post-new.php', 'post.php' ) ) ) {
641
- wp_enqueue_style('serious-slider-shortcode', plugins_url( 'resources/mce-button.css' , __FILE__ ) );
642
- };
643
- if( ($hook == $this->thepage) || ( $this->posttype == $post_type ) ) {
644
- wp_enqueue_style('serious-slider-admincss', plugins_url( 'resources/backend.css' , __FILE__ ) );
645
- };
646
- } // admin_enqueue_scripts()
647
-
648
-
649
- /**********************
650
- * form helpers
651
- ***********************/
652
- function inputfield( $id, $current, $title='', $desc='', $class='', $extra='', $extra2='' ) {
653
- /* wordpress/wp-admin/js/tags.js empties all text input elements with
654
- $('input[type="text"]:visible, textarea:visible', form).val('');
655
- as of 4.4.2; using type="number" as workaround */
656
- ?>
657
- <tr><th scope="row"><?php echo $title ?></th>
658
- <td><input id="<?php echo $id ?>" name="<?php echo $id ?>" class="<?php echo $class ?>" type="number" value="<?php echo $current ?>" <?php echo $extra2 ?>> <?php echo $extra ?>
659
- <p class="description"><?php echo $desc ?></p>
660
- </td>
661
- </tr>
662
- <?php
663
- } // inputfield()
664
- function selectfield( $id, $options=array(), $current, $title='', $desc='', $class='', $extra='' ) {
665
- ?>
666
- <tr><th scope="row"><?php echo $title ?></th>
667
- <td><select id="<?php echo $id ?>" name="<?php echo $id ?>" class="<?php echo $class ?>">
668
- <?php foreach ($options as $value => $label) { ?>
669
- <option value="<?php echo $value ?>" <?php selected( $current, $value); ?>><?php echo $label ?></option>
670
- <?php } ?>
671
- </select>
672
- <p class="description"><?php echo $desc ?></p>
673
- </td>
674
- </tr>
675
- <?php
676
- } // selectfield()
677
-
678
- } // class Cryout_Serious_Slider
679
-
680
- /* * * * get things going * * * */
681
- $cryout_serious_slider = new Cryout_Serious_Slider;
682
-
683
- // EOF
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Cryout Serious Slider
4
+ Plugin URI: http://www.cryoutcreations.eu/serious-slider
5
+ Description: A highly efficient SEO friendly fully translatable accessibility ready free image slider for WordPress. Seriously!
6
+ Version: 1.0.0
7
+ Author: Cryout Creations
8
+ Author URI: http://www.cryoutcreations.eu
9
+ Text Domain: cryout-serious-slider
10
+ License: GPLv3
11
+ License URI: http://www.gnu.org/licenses/gpl.html
12
+ */
13
+
14
+ class Cryout_Serious_Slider {
15
+
16
+ public $version = "1.0.0";
17
+ public $options = array();
18
+ public $shortcode_tag = 'serious-slider';
19
+ public $mce_tag = 'serious_slider';
20
+
21
+ public $slug = 'cryout-serious-slider';
22
+ public $posttype = 'cryout_serious_slide'; // 20 chars!
23
+ public $taxonomy = 'cryout_serious_slider_category';
24
+ private $butts = 2;
25
+ private $title = '';
26
+ private $thepage = '';
27
+ private $aboutpage = '';
28
+ private $addnewpage = '';
29
+ private $plugin_dir = '';
30
+ public $defaults = array(
31
+ 'cryout_serious_slider_sort' => 'date', // date, order
32
+ 'cryout_serious_slider_sizing' => 0, // 1 = force slider size
33
+ 'cryout_serious_slider_width' => '1920', // px
34
+ 'cryout_serious_slider_height' => '800', // px
35
+
36
+ 'cryout_serious_slider_theme' => 'light', // light, dark, square, theme, bootstrap
37
+ 'cryout_serious_slider_overlay' => 1, // 1 = autohide, 2 = visible
38
+ 'cryout_serious_slider_textsize' => '1.0', // em
39
+ 'cryout_serious_slider_align' => 'center', // left, center, right, justify
40
+ 'cryout_serious_slider_caption_width' => '1030',// px
41
+ 'cryout_serious_slider_textstyle' => 'textshadow',// none, textshadow, bgcolor
42
+ 'cryout_serious_slider_accent' => '#2D939F', // color code
43
+
44
+ 'cryout_serious_slider_animation' => 'slide', // fade, slide, overslide, underslide, parallax, hflip, vflip
45
+ 'cryout_serious_slider_hover' => 'hover', // hover, false
46
+ 'cryout_serious_slider_delay' => 5000, // ms
47
+ 'cryout_serious_slider_transition' => 1000, // ms
48
+ 'cryout_serious_slider_captionanimation' => 'slide' // ms
49
+ );
50
+
51
+ public function __construct(){
52
+
53
+ // plugin variables
54
+ $this->plugin_dir = plugin_dir_path( __FILE__ );
55
+ $this->plugin_url = plugin_dir_url( __FILE__ );
56
+
57
+ // plugin externals
58
+ require_once( $this->plugin_dir . 'inc/helpers.php' );
59
+ require_once( $this->plugin_dir . 'inc/shortcodes.php' );
60
+ require_once( $this->plugin_dir . 'inc/widgets.php' );
61
+
62
+ $this->sanitizer = new Cryout_Serious_Slider_Sanitizers;
63
+
64
+ // plugin init
65
+ add_action( 'init', array( $this, 'register' ) );
66
+
67
+ // cpt and taxonomy
68
+ add_action( 'init', array( $this, 'register_post_types' ) );
69
+ add_action( 'setup_theme', array( $this, 'register_taxonomies' ) );
70
+
71
+ // disable wp auto-p on cpt
72
+ add_filter( 'the_post', array( $this, 'autop_control' ) );
73
+
74
+ // create slides from media images
75
+ add_action( 'created_term', array( $this, 'generate_slider' ), 10, 3 );
76
+
77
+ // slider buttons filter support
78
+ $this->butts = apply_filters( 'cryout_serious_slider_buttoncount', $this->butts );
79
+
80
+ } // __construct()
81
+
82
+ /**
83
+ * handles slider+slides generation via
84
+ * the quick image selection feature
85
+ */
86
+ public function generate_slider( $term_id, $tt_id, $taxonomy ) {
87
+ if ( !empty($_POST['cryout_serious_slider_imagelist']) ) {
88
+ $image_list = esc_attr( $_POST['cryout_serious_slider_imagelist'] );
89
+ $image_list = explode( ',', $image_list );
90
+ foreach ($image_list as $image_id) {
91
+ // fetch image info
92
+ $metadata = get_post( $image_id );
93
+ if ( $metadata ) {
94
+ $post = array(
95
+ 'post_title' => $metadata->post_title,
96
+ 'post_content' => ( !empty( $metadata->post_excerpt ) ? $metadata->post_excerpt : $metadata->post_content ),
97
+ 'post_status' => 'publish',
98
+ 'post_type' => 'cryout_serious_slide',
99
+ 'menu_order' => 1,
100
+ );
101
+ // create sample slide
102
+ $pid = wp_insert_post( $post );
103
+ // add featured image
104
+ set_post_thumbnail( $pid, $image_id );
105
+ // assign slide to slider 'category'
106
+ wp_set_object_terms($pid, $term_id, $taxonomy, true);
107
+ }
108
+ } // foreach
109
+ } // if
110
+ } // generate_slider()
111
+
112
+
113
+ /**********************
114
+ * main class registration function
115
+ ***********************/
116
+ public function register(){
117
+
118
+ $this->title = __( 'Serious Slider', 'cryout-serious-slider' );
119
+ $this->aboutpage = 'edit.php?post_type=' . $this->posttype . '&page=' . $this->slug . '-about';
120
+ $this->addnewpage = 'post-new.php?post_type=' . $this->posttype;
121
+
122
+ if (! is_admin() ) {
123
+ // frontend script and style
124
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
125
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
126
+ } // if (! is_admin())
127
+
128
+ if (is_admin() ) {
129
+
130
+ // plugin info hooks
131
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'actions_links' ), -10 );
132
+ add_filter( 'plugin_row_meta', array( $this, 'meta_links' ), 10, 2 );
133
+ add_action( 'admin_menu', array( $this, 'settings_menu' ) );
134
+
135
+ // slides list page columns customizations
136
+ add_filter( 'manage_edit-'.$this->posttype.'_columns', array($this, 'columns_edit' ) );
137
+ add_action( 'manage_'.$this->posttype.'_posts_custom_column', array($this, 'columns_content'), 10, 2 );
138
+ add_filter( 'manage_edit-'.$this->posttype.'_sortable_columns', array($this, 'order_column_register_sortable') );
139
+ // taxonomy list columns customizations
140
+ add_filter( 'manage_edit-'.$this->taxonomy.'_columns', array($this, 'columns_edit_taxonomy' ) );
141
+ add_action( 'manage_'.$this->taxonomy.'_custom_column', array($this, 'custom_content_taxonomy' ), 10, 3);
142
+ add_action( 'restrict_manage_posts', array($this, 'add_taxonomy_filters') );
143
+
144
+ // meta
145
+ add_action( 'save_post', array($this, 'metabox_save') );
146
+
147
+ // shortcode button
148
+ add_action( 'admin_head', array( $this, 'admin_head') );
149
+ add_action( 'admin_enqueue_scripts', array($this , 'admin_enqueue_scripts' ) );
150
+
151
+ // mce slider button
152
+ add_filter( 'media_buttons_context', array( $this, 'media_slider_button' ) );
153
+ $localized_mce_strings = array(
154
+ 'text_retrieving_sliders' => __('Retrieving sliders...', 'cryout-serious-slider'),
155
+ 'text_retrieving_sliders_error' => __('Error retrieving sliders', 'cryout-serious-slider'),
156
+ 'text_serious_slider' => __('Cryout Serious Slider', 'cryout-serious-slider'),
157
+ 'text_serious_slider_tooltip' => __('Serious Slider', 'cryout-serious-slider'),
158
+ 'text_insert_slider' => __('Insert Slider', 'cryout-serious-slider'),
159
+ 'text_cancel' => __('Cancel', 'cryout-serious-slider'),
160
+ 'text_select_slider' => __('Select Slider', 'cryout-serious-slider'),
161
+ 'text_add_slider' => __('Add Slider', 'cryout-serious-slider'),
162
+ 'nonce' => wp_create_nonce( 'cryout-sslider-column-image' ),
163
+ );
164
+
165
+ wp_enqueue_script( 'cryout-serious-slider', plugins_url( 'resources/backend.js', __FILE__ ), array('wp-color-picker'), $this->version );
166
+ wp_enqueue_script( 'jquery-ui-tabs' );
167
+ wp_localize_script( 'cryout-serious-slider', 'cryout_serious_slider_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
168
+ wp_localize_script( 'cryout-serious-slider', 'CRYOUT_MCE_LOCALIZED', $localized_mce_strings );
169
+
170
+ // ajax handling for slider parameters in shortcode button generator
171
+ add_action( 'wp_ajax_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // auth users
172
+ add_action( 'wp_ajax_nopriv_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // no auth users
173
+
174
+ // ajax handling for slider image
175
+ add_action( 'wp_ajax_cryout_serious_slider_set_image', array( $this, 'ajax_set_image' ) );
176
+ add_action( 'wp_ajax_cryout_serious_slider_delete_image', array( $this, 'ajax_delete_image' ) );
177
+
178
+
179
+ } // if (is_admin())
180
+
181
+ add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
182
+
183
+ } // register()
184
+
185
+
186
+ /**********************
187
+ * translation domain
188
+ ***********************/
189
+ function load_textdomain() {
190
+ load_plugin_textdomain( 'cryout-serious-slider', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
191
+ }
192
+
193
+
194
+ /**********************
195
+ * frontend enqueues
196
+ ***********************/
197
+ public function enqueue_scripts() {
198
+ wp_enqueue_script( 'cryout-serious-slider-jquerymobile', plugins_url( 'resources/jquery.mobile.custom.min.js', __FILE__ ), array('jquery'), $this->version );
199
+ wp_enqueue_script( 'cryout-serious-slider-script', plugins_url( 'resources/slider.js', __FILE__ ), NULL, $this->version );
200
+ } // enqueue_scripts()
201
+
202
+ public function enqueue_styles() {
203
+ wp_register_style( 'cryout-serious-slider-style', plugins_url( 'resources/style.css', __FILE__ ), NULL, $this->version );
204
+ wp_enqueue_style( 'cryout-serious-slider-style' );
205
+ } // enqueue_styles()
206
+
207
+
208
+ /**********************
209
+ * plugin page
210
+ ***********************/
211
+
212
+ // register about page to dashboard menu
213
+ public function settings_menu() {
214
+ $this->thepage = add_submenu_page( 'edit.php?post_type='.$this->posttype, __('About', 'cryout-serious-slider'), __('About', 'cryout-serious-slider'), 'edit_others_posts', $this->slug . '-about', array( $this, 'settings_page' ) );
215
+ } // settings_menu()
216
+
217
+ // about page callback
218
+ public function settings_page() {
219
+ if (!empty($_GET['add_sample_content'])&&current_user_can('edit_others_posts'))
220
+ include_once( $this->plugin_dir . 'demo/demo-content.php' );
221
+ require_once( $this->plugin_dir . 'inc/settings.php' );
222
+ } // settings_page()
223
+
224
+ // add plugin actions links
225
+ public function actions_links( $links ) {
226
+ array_unshift( $links, '<a href="' . $this->aboutpage . '">' . __( 'About Plugin', 'cryout-serious-slider' ) . '</a>' );
227
+ return $links;
228
+ }
229
+
230
+ // add plugin meta links
231
+ public function meta_links( $links, $file ) {
232
+ // Check plugin
233
+ if ( $file === plugin_basename( __FILE__ ) ) {
234
+ unset( $links[2] );
235
+ $links[] = '<a href="http://www.cryoutcreations.eu/cryout-serious-slider/" target="_blank">' . __( 'Plugin homepage', 'cryout-serious-slider' ) . '</a>';
236
+ $links[] = '<a href="https://www.cryoutcreations.eu/forums/f/wordpress/plugins/serious-slider" target="_blank">' . __( 'Support forum', 'cryout-serious-slider' ) . '</a>';
237
+ $links[] = '<a href="http://wordpress.org/plugins/cryout-serious-slider/#developers" target="_blank">' . __( 'Changelog', 'cryout-serious-slider' ) . '</a>';
238
+ }
239
+ return $links;
240
+ }
241
+
242
+
243
+ /**********************
244
+ * helpers
245
+ ***********************/
246
+
247
+ /* return taxonomy id for slide id */
248
+ public function get_slide_slider( $slide_ID, $taxonomy = '') {
249
+ if (empty($taxonomy)) $taxonomy = $this->taxonomy;
250
+ $tax = wp_get_object_terms( $slide_ID, $taxonomy );
251
+ if (!empty($tax))
252
+ return $tax[0]->term_id;
253
+ else
254
+ return 0;
255
+ } // get_slide_slider()
256
+
257
+ /* return sliders list for mce insert window */
258
+ public function get_sliders_json() {
259
+ $sliders = $this->get_sliders();
260
+ echo json_encode($sliders);
261
+ wp_die();
262
+ } // get_sliders_json()
263
+
264
+ /* prototype slider retrieval function */
265
+ public function get_sliders() {
266
+ $data = get_terms( $this->taxonomy, array( 'hide_empty' => false ) );
267
+
268
+ $sliders = array();
269
+ foreach ($data as $slider) {
270
+ $sliders[] = array('text'=>$slider->name, 'value'=>$slider->term_id);
271
+ }
272
+
273
+ if (count($sliders)<1) $sliders = array( array('text' => __('No sliders available. Create a slider first...', 'cryout-serious-slider'), 'value' => 0) );
274
+
275
+ return $sliders;
276
+ } // get_sliders()
277
+
278
+ /* theme compatibility function */
279
+ public function get_sliders_list() {
280
+ $data = get_terms( $this->taxonomy, array( 'hide_empty' => false ) );
281
+
282
+ $sliders = array();
283
+ foreach ($data as $slider) {
284
+ if (!empty($slider->term_id)) $sliders[$slider->term_id] = $slider->name;
285
+ }
286
+ return $sliders;
287
+ } // get_sliders_list()
288
+
289
+ /* customize taxonomy selection box in add slide window */
290
+ function custom_category_picker( $post, $box ) {
291
+ $defaults = array( 'taxonomy' => 'category' );
292
+ if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) {
293
+ $args = array();
294
+ } else {
295
+ $args = $box['args'];
296
+ }
297
+ $r = wp_parse_args( $args, $defaults );
298
+ $tax_name = esc_attr( $r['taxonomy'] );
299
+ $taxonomy = get_taxonomy( $r['taxonomy'] );
300
+ ?>
301
+ <div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
302
+ <?php
303
+ $name = ( $tax_name == 'category' ) ? 'post_category' : 'tax_input[' . $tax_name . ']';
304
+ ?>
305
+ <ul id="<?php echo $tax_name; ?>_selector" data-wp-lists="list:<?php echo $tax_name; ?>" class="form-no-clear">
306
+ <?php
307
+ $cat_dropdown_args = array(
308
+ 'taxonomy' => $tax_name,
309
+ 'hide_empty' => 0,
310
+ 'name' => 'tax_input[' . $tax_name . ']',
311
+ 'orderby' => 'name',
312
+ 'selected' => $this->get_slide_slider( $post->ID ),
313
+ 'hierarchical' => 0,
314
+ 'show_option_none' => '&mdash; ' . __('Select slider', 'cryout-serious-slider') . ' &mdash;',
315
+ );
316
+
317
+ wp_dropdown_categories( $cat_dropdown_args );
318
+ ?>
319
+ </ul>
320
+ <a class="taxonomy-add-new" href="edit-tags.php?taxonomy=<?php echo $this->taxonomy ?>&post_type=<?php echo $this->posttype; ?>" id=""><?php _e(
321
+ 'Manage Sliders', 'cryout-serious-slider') ?></a>
322
+ </div>
323
+ <?php
324
+ } // slide_custom_category()
325
+
326
+ // set slide image via ajax
327
+ public function ajax_set_image() {
328
+
329
+ if ( ! isset( $_POST[ 'cryout_sslider_column_nonce' ] ) || ! wp_verify_nonce( $_POST[ 'cryout_sslider_column_nonce' ], 'cryout-sslider-column-image' ) ) {
330
+ die( __( 'Sorry, you are not allowed to edit this item.', 'cryout-serious-slider' ) );
331
+ }
332
+ if ( isset( $_POST[ 'post_id' ] ) && isset( $_POST[ 'thumbnail_id' ] ) ) {
333
+ // sanitze ids
334
+ $post_id = absint( $_POST[ 'post_id' ][ 0 ] );
335
+ $thumbnail_id = absint( $_POST[ 'thumbnail_id' ] );
336
+ // try to set thumbnail; returns true if successful
337
+ $success = set_post_thumbnail( $post_id, $thumbnail_id );
338
+ if ( $success ) {
339
+
340
+ $post_title = _draft_or_post_title( $post_id );
341
+ // image selection link
342
+ $html .= sprintf(
343
+ '<a href="%1$s" id="sslide_set_%2$s" class="sslide_set_link" title="%3$s">%4$s<br />%5$s</a>',
344
+ esc_url( get_upload_iframe_src( 'image', $post_id ) ),
345
+ $post_id,
346
+ esc_attr( sprintf( __( 'Change image for "%s"', 'cryout-serious-slider' ), $post_title ) ),
347
+ get_the_post_thumbnail( $post_id, 'thumbnail' ),
348
+ esc_html( __( 'Change Image', 'cryout-serious-slider' ) )
349
+ );
350
+
351
+ // 'remove' image link
352
+ $html .= sprintf(
353
+ '<br><a href="#" id="sslide_delete_%1$s" class="sslide_delete_link hide-if-no-js" title="%2$s">%3$s</a>',
354
+ $post_id,
355
+ esc_attr( sprintf( __( 'Remove image from "%s"', 'cryout-serious-slider' ), $post_title ) ),
356
+ esc_html( __( 'Remove Image', 'cryout-serious-slider') )
357
+ );
358
+
359
+ // return response to Ajax script
360
+ echo $html;
361
+
362
+ } else {
363
+ // return error message to Ajax script
364
+ esc_html_e( 'Item not added.', 'cryout-serious-slider' );
365
+ }
366
+ }
367
+ die();
368
+ } // ajax_set_image()
369
+
370
+ // remove slider image via ajax
371
+ public function ajax_delete_image() {
372
+ if ( ! isset( $_POST[ 'cryout_sslider_column_nonce' ] ) || ! wp_verify_nonce( $_POST[ 'cryout_sslider_column_nonce' ], 'cryout-sslider-column-image' ) ) {
373
+ die( __( 'Sorry, you are not allowed to edit this item.', 'cryout-serious-slider' ) );
374
+ }
375
+ if ( isset( $_POST[ 'post_id' ] ) ) {
376
+ // sanitze post id
377
+ $post_id = absint( $_POST[ 'post_id' ][ 0 ] );
378
+ // try to delete thumbnail; returns true if successful
379
+ $success = delete_post_thumbnail( $post_id );
380
+ if ( $success ) {
381
+
382
+ // 'set thumbnail' link
383
+ $html = sprintf(
384
+ '%5$s<br><a href="%1$s" id="sslide_set_%2$s" class="sslide_set_link" title="%3$s">%4$s</a>',
385
+ esc_url( get_upload_iframe_src( 'image', $post_id ) ),
386
+ $post_id,
387
+ esc_attr( sprintf( __( 'Set image for "%s"', 'quick-featured-images' ), _draft_or_post_title( $post_id ) ) ),
388
+ esc_html( __( 'Set Image', 'cryout-serious-slider' ) ),
389
+ __( 'None', 'cryout-serious-slider' )
390
+ );
391
+
392
+ // return response to Ajax script
393
+ echo $html;
394
+
395
+ } else {
396
+ // return error message to Ajax script
397
+ $text = 'Item not updated.';
398
+ esc_html_e( $text );
399
+ }
400
+ }
401
+ die();
402
+ } // ajax_delete_image()
403
+
404
+ /* removes autop filtering from the slider's cpt */
405
+ function autop_control( $post ) {
406
+ if( $this->posttype === $post->post_type ) {
407
+ remove_filter( 'the_content', 'wpautop' );
408
+ }
409
+ } // autop_control()
410
+
411
+
412
+ /**********************
413
+ * custom post types
414
+ ***********************/
415
+ public function register_post_types() {
416
+
417
+ /* Set up arguments for the custom post type. */
418
+ $args = array(
419
+ 'public' => false,
420
+ 'show_ui' => true,
421
+ 'show_admin_column' => true,
422
+ 'show_in_admin_bar' => true,
423
+ 'query_var' => true,
424
+ 'description' => __( 'Description.', 'cryout-serious-slider' ),
425
+ 'show_in_nav_menus' => false,
426
+ 'menu_position' => 21,
427
+ 'menu_icon' => plugins_url('/resources/images/serious-slider-icon.png',__FILE__),
428
+ 'capability_type' => 'page',
429
+ 'supports' => array(
430
+ 'title',
431
+ 'editor',
432
+ //'excerpt',
433
+ 'thumbnail',
434
+ 'page-attributes',
435
+ ),
436
+ 'labels' => array(
437
+ 'name' => _x( 'Slides', 'post type general name', 'cryout-serious-slider' ),
438
+ 'singular_name' => _x( 'Slide', 'post type singular name', 'cryout-serious-slider' ),
439
+ 'menu_name' => _x( 'Serious Slider', 'admin menu', 'cryout-serious-slider' ),
440
+ 'name_admin_bar' => _x( 'Serious Slide', 'add new on admin bar', 'cryout-serious-slider' ),
441
+ 'add_new' => _x( 'Add New Slide', 'and new in menu', 'cryout-serious-slider' ),
442
+ 'add_new_item' => __( 'Add New Slide', 'cryout-serious-slider' ),
443
+ 'new_item' => __( 'New Slide', 'cryout-serious-slider' ),
444
+ 'edit_item' => __( 'Edit Slide', 'cryout-serious-slider' ),
445
+ 'view_item' => __( 'View Slide', 'cryout-serious-slider' ),
446
+ 'all_items' => __( 'All Slides', 'cryout-serious-slider' ),
447
+ 'search_items' => __( 'Search Slide', 'cryout-serious-slider' ),
448
+ 'parent_item_colon' => __( 'Parent Slides:', 'cryout-serious-slider' ),
449
+ 'not_found' => sprintf( __( 'No slides found. Go ahead and add <a href="%1$s">add some</a> or <a href="%2$s">load sample content</a>.', 'cryout-serious-slider' ), $this->addnewpage, $this->aboutpage ),
450
+ 'not_found_in_trash' => __( 'No slides found in Trash.', 'cryout-serious-slider' )
451
+ ),
452
+ 'taxonomies' => array(
453
+ $this->taxonomy,
454
+ ),
455
+ 'register_meta_box_cb' => array( $this, 'metabox_register' ),
456
+ );
457
+
458
+ /* Register the post type. */
459
+ register_post_type( $this->posttype, $args );
460
+
461
+ } // register_post_types()
462
+
463
+ /* Set up custom taxonomies for the custom post type */
464
+ public function register_taxonomies() {
465
+
466
+ $cat_args = array(
467
+ 'public' => false,
468
+ 'hierarchical' => true,
469
+ 'labels' => array(
470
+ 'name' => _x( 'Sliders', 'taxonomy general name', 'cryout-serious-slider' ),
471
+ 'singular_name' => _x( 'Slider', 'taxonomy singular name', 'cryout-serious-slider' ),
472
+ 'search_items' => __( 'Search Sliders', 'cryout-serious-slider' ),
473
+ 'all_items' => __( 'All Sliders', 'cryout-serious-slider' ),
474
+ 'parent_item' => __( 'Parent Slider', 'cryout-serious-slider' ),
475
+ 'parent_item_colon' => __( 'Parent Slider:', 'cryout-serious-slider' ),
476
+ 'edit_item' => __( 'Edit Slider', 'cryout-serious-slider' ),
477
+ 'update_item' => __( 'Update Slider', 'cryout-serious-slider' ),
478
+ 'add_new_item' => __( 'Add New Slider', 'cryout-serious-slider' ),
479
+ 'new_item_name' => __( 'New Slider', 'cryout-serious-slider' ),
480
+ 'menu_name' => __( 'Manage Sliders', 'cryout-serious-slider' ),
481
+ 'not_found' => __( 'No sliders found', 'cryout-serious-slider' ),
482
+ ),
483
+ 'show_ui' => true,
484
+ 'show_admin_column' => true,
485
+ 'query_var' => true,
486
+
487
+ 'meta_box_cb' => array( $this, 'custom_category_picker' ), // customize taxonomy box selector
488
+ );
489
+
490
+ register_taxonomy( $this->taxonomy, array( $this->posttype ), $cat_args );
491
+ add_action( $this->taxonomy . '_add_form_fields', array($this, 'metatax_main_add'), 10, 2 );
492
+ add_action( $this->taxonomy . '_edit_form_fields', array($this, 'metatax_main_edit'), 10, 2 );
493
+ add_action( $this->taxonomy . '_edit_form', array($this, 'right_column'), 10, 2 ); // _pre_edit_form // _edit_form
494
+
495
+ add_action( 'edited_' . $this->taxonomy, array($this, 'save_taxonomy_custom_meta'), 10, 2 );
496
+ add_action( 'create_' . $this->taxonomy, array($this, 'save_taxonomy_custom_meta'), 10, 2 );
497
+ add_action( 'delete_' . $this->taxonomy, array($this, 'delete_taxonomy_custom_meta'), 10, 2 );
498
+
499
+ } // register_taxonomies()
500
+
501
+ /**********************
502
+ * dashboard layout customization
503
+ ***********************/
504
+ public function columns_edit( $columns ) {
505
+
506
+ $columns = array(
507
+ 'cb' => '<input type="checkbox" />',
508
+ 'title' => __( 'Title', 'cryout-serious-slider' ),
509
+ $this->taxonomy => __( 'Slider', 'cryout-serious-slider' ),
510
+ 'featured_image' => __( 'Slide Image', 'cryout-serious-slider' ),
511
+ 'date' => __( 'Date', 'cryout-serious-slider' ),
512
+ 'menu_order' => __( 'Order', 'cryout-serious-slider' ),
513
+ );
514
+ return $columns;
515
+ } // columns_edit()
516
+
517
+ // Show the featured image & taxonomy in posts list
518
+ public function columns_content($column_name, $post_id) {
519
+ global $post;
520
+ $post_id = $post->ID;
521
+
522
+ switch ($column_name) {
523
+
524
+ case $this->taxonomy:
525
+
526
+ $terms = get_the_terms( $post->ID, $this->taxonomy );
527
+ if ( !empty( $terms ) ) {
528
+
529
+ $out = array();
530
+ foreach ( $terms as $term ) {
531
+ $out[] = sprintf( '<a href="%1$s">%2$s</a><div class="row-actions"><span class="edit"><a href="%3$s">%4$s</a></span></div>',
532
+ esc_url( add_query_arg( array( 'post_type' => $post->post_type, $this->taxonomy => $term->slug ), 'edit.php' ) ),
533
+ esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, $this->taxonomy, 'display' ) ),
534
+ esc_url( add_query_arg( array( 'action' => 'edit', 'taxonomy' => $this->taxonomy, 'tag_ID' => $term->term_id, 'post_type' => $post->post_type ), 'edit-tags.php' ) ),
535
+ __('Edit slider', 'cryout-serious-slider')
536
+ );
537
+
538
+ }
539
+ echo join( ', ', $out );
540
+
541
+ }
542
+
543
+ else {
544
+ _e( 'None', 'cryout-serious-slider' );
545
+ }
546
+
547
+ break;
548
+
549
+ case 'featured_image':
550
+
551
+ $thumbnail_id = get_post_thumbnail_id( $post_id );
552
+ // check if image file exists, omit filters in get_attached_file() ('true')
553
+ if ( $thumbnail_id ) {
554
+ if ( $thumb = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) ) {
555
+ if ( current_user_can( 'edit_others_posts', $thumbnail_id ) ) {
556
+ $post_title = _draft_or_post_title( $post_id );
557
+ // image selection link
558
+ printf(
559
+ '<a href="%1$s" id="sslide_set_%2$s" class="sslide_set_link" title="%3$s">%4$s<br />%5$s</a>',
560
+ esc_url( get_upload_iframe_src( 'image', $post_id ) ),
561
+ $post_id,
562
+ esc_attr( sprintf( __( 'Change image for "%s"', 'cryout-serious-slider' ), $post_title ) ),
563
+ $thumb,
564
+ esc_html( __( 'Change', 'cryout-serious-slider' ) )
565
+ );
566
+
567
+ // 'remove' image link
568
+ printf(
569
+ ' / <a href="#" id="sslide_delete_%1$s" class="sslide_delete_link hide-if-no-js" title="%2$s">%3$s</a>',
570
+ $post_id,
571
+ esc_attr( sprintf( __( 'Remove image from "%s"', 'cryout-serious-slider' ), $post_title ) ),
572
+ esc_html( __( 'Remove', 'cryout-serious-slider') )
573
+ );
574
+ } else {
575
+ // if no edit capatibilities show image only
576
+ echo $thumb;
577
+ } // if user can
578
+ } // if thumb
579
+ } else {
580
+ // no featured image set
581
+ if ( current_user_can( 'edit_others_posts' ) ) {
582
+ printf(
583
+ '%5$s<br><a href="%1$s" id="sslide_set_%2$s" class="sslide_set_link" title="%3$s">%4$s</a>',
584
+ esc_url( get_upload_iframe_src( 'image', $post_id ) ),
585
+ $post_id,
586
+ esc_attr( sprintf( __( 'Set image for "%s"', 'quick-featured-images' ), _draft_or_post_title( $post_id ) ) ),
587
+ esc_html( __( 'Set Image', 'cryout-serious-slider' ) ),
588
+ __( 'None', 'cryout-serious-slider' )
589
+ );
590
+ } // if user can
591
+ } // if thumbnail_id
592
+
593
+ break;
594
+
595
+ case 'menu_order':
596
+
597
+ $order = $post->menu_order;
598
+ echo $order;
599
+
600
+ break;
601
+ }
602
+ } // columns_content()
603
+
604
+ /* Add sort by columns support */
605
+ public function order_column_register_sortable($columns){
606
+ $columns['menu_order'] = 'menu_order';
607
+ $columns[$this->taxonomy] = $this->taxonomy;
608
+ return $columns;
609
+ } // order_column_register_sortable()
610
+
611
+ /* Add shortcode column in taxonomy screen */
612
+ public function columns_edit_taxonomy( $columns ){
613
+ return array_merge(
614
+ array_splice( $columns, 0, count($columns)-1 ),
615
+ array( 'shortcode' => __('Shortcode', 'cryout-serious-slider') ),
616
+ array_splice( $columns, count($columns)-1, 1 )
617
+ );
618
+ } // columns_edit_taxonomy()
619
+
620
+ public function custom_content_taxonomy( $empty, $column, $id ) {
621
+ switch ($column) {
622
+ case 'shortcode':
623
+ echo '[serious-slider id="' . $id . '"]';
624
+ break;
625
+ default:
626
+ break;
627
+ } // end switch
628
+ } // custom_content_taxonomy()
629
+
630
+ /* filter cpt by taxonomy */
631
+ function add_taxonomy_filters() {
632
+ global $typenow;
633
+
634
+ $taxonomies = array( $this->taxonomy );
635
+
636
+ // must set this to the post type you want the filter(s) displayed on
637
+ if( $typenow == $this->posttype ){
638
+
639
+ foreach ($taxonomies as $tax_slug) {
640
+ $tax_obj = get_taxonomy($tax_slug);
641
+ $tax_name = $tax_obj->labels->name;
642
+ $terms = get_terms($tax_slug);
643
+ if (!empty($_GET[$tax_slug])) $filtered_tax = sanitize_text_field($_GET[$tax_slug]); else $filtered_tax = '';
644
+ if(count($terms) > 0) {
645
+ echo "<select name='$tax_slug' id='filter_$tax_slug' class='postform'>";
646
+ printf( "<option value=''>%s</option>", sprintf( _x('Select %s', 'select terms', 'cryout-serious-slider'), $tax_name ) );
647
+ foreach ($terms as $term) {
648
+ echo '<option value='. $term->slug, $filtered_tax == $term->slug ? ' selected="selected"' : '','>' . $term->name .' (' . $term->count .')</option>';
649
+ }
650
+ echo "</select>";
651
+ }
652
+ }
653
+ }
654
+ } // add_taxonomy_filters()
655
+
656
+ // add right column content (with shortcode hint) on edit slider page */
657
+ function right_column( $tag, $taxonomy ) {
658
+ $term_ID = $tag->term_id;
659
+ $term_slug = $tag->slug;
660
+ include_once( $this->plugin_dir . 'inc/right-column.php' );
661
+ } // right_column()
662
+
663
+
664
+ /**********************
665
+ * slide meta
666
+ ***********************/
667
+ /* Custom post types metaboxes */
668
+ function metabox_register() {
669
+ add_meta_box('serious_slider_metaboxes', __( 'Slide Properties', 'cryout-serious-slider' ), array($this, 'metabox_main'), $this->posttype, 'normal', 'high');
670
+ } // metabox_register()
671
+
672
+ function metabox_main() {
673
+ global $post;
674
+ $values = get_post_custom( $post->ID );
675
+ $text = isset( $values['cryout_serious_slider_link'] ) ? $values['cryout_serious_slider_link'][0] : '';
676
+ $check = isset( $values['cryout_serious_slider_target'] ) ? esc_attr( $values['cryout_serious_slider_target'][0] ) : '';
677
+
678
+ for ($i=1;$i<=$this->butts;$i++) {
679
+ ${'button'.$i} = isset( $values['cryout_serious_slider_button'.$i] ) ? esc_attr( $values['cryout_serious_slider_button'.$i][0] ) : '';
680
+ ${'button'.$i.'_url'} = isset( $values['cryout_serious_slider_button'.$i.'_url'] ) ? esc_attr( $values['cryout_serious_slider_button'.$i.'_url'][0] ) : '';
681
+ ${'button'.$i.'_target'} = isset( $values['cryout_serious_slider_button'.$i.'_target'] ) ? esc_attr( $values['cryout_serious_slider_button'.$i.'_target'][0] ) : '';
682
+ }
683
+
684
+ require_once( $this->plugin_dir . 'inc/meta.php' );
685
+
686
+ } // metabox_main()
687
+
688
+ function metabox_save( $post_id ) {
689
+
690
+ if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
691
+ if( !isset( $_POST['cryout_serious_slider_meta_nonce'] ) || !wp_verify_nonce( $_POST['cryout_serious_slider_meta_nonce'], 'cryout_serious_slider_meta_nonce' ) ) return;
692
+ if( !current_user_can( 'edit_post' ) ) return;
693
+ $allowed = '';
694
+
695
+ // main slide image link & target
696
+ if( isset( $_POST['cryout_serious_slider_link'] ) )
697
+ update_post_meta( $post_id, 'cryout_serious_slider_link', esc_url_raw( $_POST['cryout_serious_slider_link'], $allowed ) );
698
+ $chk = isset( $_POST['cryout_serious_slider_target'] );
699
+ update_post_meta( $post_id, 'cryout_serious_slider_target', $chk );
700
+
701
+ // buttons, links and targets
702
+ for ($i=1;$i<=$this->butts;$i++) {
703
+ if ( isset( $_POST['cryout_serious_slider_button'.$i] ) )
704
+ update_post_meta( $post_id, 'cryout_serious_slider_button'.$i, esc_attr( $_POST['cryout_serious_slider_button'.$i] ) );
705
+ if ( isset( $_POST['cryout_serious_slider_button'.$i.'_url'] ) )
706
+ update_post_meta( $post_id, 'cryout_serious_slider_button'.$i.'_url', esc_url_raw( $_POST['cryout_serious_slider_button'.$i.'_url'], $allowed ) );
707
+ ${'chk_btn'.$i} = isset( $_POST['cryout_serious_slider_button'.$i.'_target'] );
708
+ update_post_meta( $post_id, 'cryout_serious_slider_button'.$i.'_target', ${'chk_btn'.$i} );
709
+ }
710
+
711
+ } // metabox_save()
712
+
713
+
714
+ /**********************
715
+ * slider/taxonomy meta
716
+ ***********************/
717
+ public function metatax_main_add() {
718
+
719
+ $the_meta = $this->defaults;
720
+ require_once( $this->plugin_dir . 'inc/taxmeta.php' );
721
+
722
+ } // metabox_main_add()
723
+
724
+ public function metatax_main_edit($term) {
725
+
726
+ $tid = $term->term_id;
727
+ $the_meta = get_option( "cryout_serious_slider_${tid}_meta" );
728
+ $the_meta = wp_parse_args( $the_meta, $this->defaults ); ?>
729
+ <tr class="form-field">
730
+ <td colspan="2">
731
+ <?php require_once( $this->plugin_dir . 'inc/taxmeta.php' );?>
732
+ </td>
733
+ </tr><?php
734
+
735
+ } // metatax_main_edit()
736
+
737
+ function save_taxonomy_custom_meta( $tid ) {
738
+ if ( isset( $_POST['term_meta'] ) ) {
739
+ $term_meta = get_option( "cryout_serious_slider_${tid}_meta" );
740
+ $cat_keys = array_keys( $_POST['term_meta'] );
741
+ foreach ( $cat_keys as $key ) {
742
+ if ( isset ( $_POST['term_meta'][$key] ) ) {
743
+ $term_meta[$key] = sanitize_text_field($_POST['term_meta'][$key]);
744
+ }
745
+ }
746
+ // Save the option array.
747
+ update_option( "cryout_serious_slider_${tid}_meta", $term_meta );
748
+ }
749
+ } // save_taxonomy_custom_meta()
750
+
751
+ function delete_taxonomy_custom_meta( $term_id ) {
752
+ delete_option( "cryout_serious_slider_${term_id}_meta" );
753
+ } // delete_taxonomy_custom_meta()
754
+
755
+
756
+ /**********************
757
+ * mce extension
758
+ ***********************/
759
+
760
+ // media button
761
+ public function media_slider_button( $context ) {
762
+
763
+ if ( ! current_user_can( 'edit_others_posts' ) ) {
764
+ return $context;
765
+ }
766
+
767
+ global $post_type;
768
+ global $pagenow;
769
+
770
+ if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) && ( $this->posttype != $post_type ) ) {
771
+ $context .= '<a href="#" class="button media-serious-slider-button" title="' .
772
+ __( "Insert Serious Slider into post", "cryout-serious-slider" ) .
773
+ '" onclick="window.tinymce.activeEditor.execCommand(\'serious_slider_popup\',\'\',{});"><span class="wp-media-buttons-icon" style="background: url(\'' . $this->plugin_url . 'resources/images/serious-slider-editor-icon.png\'); background-repeat: no-repeat; background-position: center 1px;"></span> ' .
774
+ __( 'Add Slider', 'cryout-serious-slider' ) . '</a>';
775
+ }
776
+
777
+ return $context;
778
+ } // media_slider_button()
779
+
780
+ // mce button
781
+ function admin_head() {
782
+ global $post_type;
783
+ global $pagenow;
784
+
785
+ // don't allow slider shortcode inside slide posts
786
+ if( $this->posttype != $post_type && in_array( $pagenow, array( 'edit.php', 'post-new.php', 'post.php' ) ) ) {
787
+ // check user permissions
788
+ if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
789
+ return;
790
+ }
791
+
792
+ // check if WYSIWYG is enabled
793
+ if ( 'true' == get_user_option( 'rich_editing' ) ) {
794
+ add_filter( 'mce_external_plugins', array( $this ,'register_mce_external_plugins' ) );
795
+ add_filter( 'mce_buttons_2', array( $this, 'regiter_mce_buttons' ) );
796
+ }
797
+ }
798
+ } // admin_head()
799
+
800
+ function register_mce_external_plugins( $plugin_array ) {
801
+ $plugin_array[$this->mce_tag] = plugins_url( 'resources/mce-button.js' , __FILE__ );
802
+ return $plugin_array;
803
+ } // register_mce_external_plugins()
804
+
805
+ function regiter_mce_buttons( $buttons ) {
806
+ array_push( $buttons, $this->mce_tag );
807
+ return $buttons;
808
+ } // regiter_mce_buttons()
809
+
810
+ /* admin styles and scripts */
811
+ function admin_enqueue_scripts($hook){
812
+ global $post_type;
813
+ global $pagenow;
814
+ // slides
815
+ if ( in_array( $pagenow, array( 'edit.php', 'post-new.php', 'post.php' ) ) ) {
816
+ wp_enqueue_style('serious-slider-shortcode', plugins_url( 'resources/mce-button.css' , __FILE__ ), NULL, $this->version );
817
+ wp_enqueue_media();
818
+ };
819
+ // slides, sliders or plugin about page
820
+ if( ($hook == $this->thepage) || ( $this->posttype == $post_type ) ) {
821
+ wp_enqueue_style('wp-color-picker');
822
+ wp_enqueue_style('serious-slider-admincss', plugins_url( 'resources/backend.css' , __FILE__ ), NULL, $this->version );
823
+ wp_enqueue_media();
824
+ };
825
+ } // admin_enqueue_scripts()
826
+
827
+
828
+ /**********************
829
+ * form helpers
830
+ ***********************/
831
+ function inputfield( $id, $current, $title='', $desc='', $class='', $extra='', $extra2='', $type='number' ) {
832
+ /* wordpress/wp-admin/js/tags.js empties all text input elements with
833
+ $('input[type="text"]:visible, textarea:visible', form).val('');
834
+ on form submit as of 4.4.2; using type="number" by default as workaround */
835
+ ?>
836
+ <div class="seriousslider-option seriousslider-option-input">
837
+ <span><?php echo $title ?></span>
838
+ <input id="<?php echo $id ?>" name="<?php echo $id ?>" class="<?php echo $class ?>" type="<?php echo $type ?>" value="<?php echo $current ?>" <?php echo $extra2 ?>> <?php echo $extra ?>
839
+ <p class="description"><?php echo $desc ?></p>
840
+ </div>
841
+
842
+ <?php
843
+ } // inputfield()
844
+ function selectfield( $id, $options=array(), $current, $title='', $desc='', $class='', $extra='' ) { ?>
845
+ <div class="seriousslider-option seriousslider-option-input">
846
+ <span><?php echo $title ?></span>
847
+ <select id="<?php echo $id ?>" name="<?php echo $id ?>" class="<?php echo $class ?>">
848
+ <?php foreach ($options as $value => $label) { ?>
849
+ <option value="<?php echo $value ?>" <?php selected( $current, $value); ?>><?php echo $label ?></option>
850
+ <?php } ?>
851
+ </select>
852
+ <p class="description"><?php echo $desc ?></p>
853
+ </div>
854
+ <?php
855
+ } // selectfield()
856
+
857
+ function titlefield( $text ) {
858
+ echo $text;
859
+ } /// titlefield()
860
+
861
+ } // class Cryout_Serious_Slider
862
+
863
+ /* * * * get things going * * * */
864
+ $cryout_serious_slider = new Cryout_Serious_Slider;
865
+
866
+ // EOF
demo/demo-content.php CHANGED
@@ -1,93 +1,127 @@
1
- <?php
2
-
3
- class Cryout_Serious_Slider_DemoContent {
4
-
5
- private $sample_slides = array(
6
- array(
7
- 'post_title' => 'Are You Looking At Me?',
8
- 'post_content' => 'More Lorem ipsum.....',
9
- 'post_status' => 'publish',
10
- 'post_type' => 'cryout_serious_slide',
11
- 'menu_order' => 3,
12
- 'image' => '/demo/sample-slide-3.jpg',
13
- ),
14
- array(
15
- 'post_title' => 'Another Sample Slide',
16
- 'post_content' => "Serious Slider takes your slides seriously.\n\n<a href=\"#\">First Link</a> <a href=\"#\">Second Link</a>",
17
- 'post_status' => 'publish',
18
- 'post_type' => 'cryout_serious_slide',
19
- 'menu_order' => 2,
20
- 'image' => '/demo/sample-slide-2.jpg',
21
- ),
22
- array(
23
- 'post_title' => 'Why So Serious?',
24
- 'post_content' => "Lorem Ipsum dolor ist atmet...\n\n<a href=\"#\">Seriously!</a>",
25
- 'post_status' => 'publish',
26
- 'post_type' => 'cryout_serious_slide',
27
- 'menu_order' => 1,
28
- 'image' => '/demo/sample-slide-1.jpg',
29
- ),
30
- ); // sample_slides
31
-
32
- function __construct() {
33
-
34
- // create sample slider ('category')
35
- $term = wp_insert_term(
36
- 'Sample Slider', // the term
37
- 'cryout_serious_slider_category', // the taxonomy
38
- array(
39
- 'description' => '',
40
- 'slug' => 'sample-slider',
41
- )
42
- );
43
-
44
- // create the slides
45
- foreach ($this->sample_slides as $post) {
46
- // create sample slide
47
- $pid = wp_insert_post( $post );
48
- // add featured image
49
- $post['image'] = plugins_url( $post['image'], dirname(__FILE__) );
50
- $this->image_helper($pid, $post['image']);
51
- unset($post['image']);
52
- // assign slide to slider 'category'
53
- wp_set_object_terms($pid, 'Sample Slider', 'cryout_serious_slider_category', true);
54
- }
55
- } // __construct()
56
-
57
-
58
- function image_helper($id, $image) {
59
- // magic sideload image returns an HTML image, not an ID
60
- $media = media_sideload_image($image, $id);
61
-
62
- // therefore we must find it so we can set it as featured ID
63
- if(!empty($media) && !is_wp_error($media)){
64
- $args = array(
65
- 'post_type' => 'attachment',
66
- 'posts_per_page' => -1,
67
- 'post_status' => 'any',
68
- 'post_parent' => $id
69
- );
70
-
71
- // reference new image to set as featured
72
- $attachments = get_posts($args);
73
-
74
- if(isset($attachments) && is_array($attachments)){
75
- foreach($attachments as $attachment){
76
- // grab source of full size images (so no 300x150 nonsense in path)
77
- $image = wp_get_attachment_image_src($attachment->ID, 'full');
78
- // determine if in the $media image we created, the string of the URL exists
79
- if(strpos($media, $image[0]) !== false){
80
- // if so, we found our image. set it as thumbnail
81
- set_post_thumbnail($id, $attachment->ID);
82
- // only want one image
83
- break;
84
- }
85
- }
86
- }
87
- }
88
-
89
- } // image_helper()
90
-
91
- } // class Cryout_Serious_Slider_DemoContent
92
-
93
- new Cryout_Serious_Slider_DemoContent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Cryout_Serious_Slider_DemoContent {
4
+
5
+ private $sample_slides = array(
6
+ array(
7
+ 'post' => array(
8
+ 'post_title' => 'Customizable Slider',
9
+ 'post_content' => "Donec mollis elit et odio consectetur mattis. In pellentesque aliquam euismod. Mauris condimentum dui nunc, in congue dui sodales et. Pellentesque quis arcu lorem. Nam scelerisque fermentum ligula, eu ultrices purus congue non. Nullam fringilla mi in venenatis blandit. Curabitur iaculis sagittis leo vitae egestas. Donec eros nisl, dignissim eget arcu sit amet, tincidunt fermentum augue.",
10
+ 'post_status' => 'publish',
11
+ 'post_type' => 'cryout_serious_slide',
12
+ 'menu_order' => 3,
13
+ 'image' => '/demo/sample-slide-3.jpg',
14
+ ),
15
+ 'meta' => array(
16
+ 'cryout_serious_slider_button1' => 'Button 1',
17
+ 'cryout_serious_slider_button1url' => '#',
18
+ 'cryout_serious_slider_button2' => 'Button 2',
19
+ 'cryout_serious_slider_button2url' => '#',
20
+ ),
21
+ ),
22
+ array(
23
+ 'post' => array(
24
+ 'post_title' => 'WordPress Responsive Slider',
25
+ 'post_content' => "Integer maximus tellus neque, a rhoncus augue finibus non. Praesent ullamcorper dui non justo blandit dictum. Sed placerat elit eu lacus congue, in ultricies felis sodales. In convallis risus et enim convallis suscipit.",
26
+ 'post_status' => 'publish',
27
+ 'post_type' => 'cryout_serious_slide',
28
+ 'menu_order' => 2,
29
+ 'image' => '/demo/sample-slide-2.jpg',
30
+ ),
31
+ 'meta' => array(
32
+ 'cryout_serious_slider_button1' => 'Sample Button',
33
+ 'cryout_serious_slider_button1url' => '#',
34
+ ),
35
+ ),
36
+ array(
37
+ 'post' => array(
38
+ 'post_title' => 'Serious Slider',
39
+ 'post_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris lorem felis, egestas in posuere ac, pellentesque et nisl. Etiam id aliquam nulla. Nunc id commodo erat, at aliquet enim. Maecenas ut tempus est.',
40
+ 'post_status' => 'publish',
41
+ 'post_type' => 'cryout_serious_slide',
42
+ 'menu_order' => 1,
43
+ 'image' => '/demo/sample-slide-1.jpg',
44
+ ),
45
+ 'meta' => array(
46
+ 'cryout_serious_slider_button1' => 'Read more',
47
+ 'cryout_serious_slider_button1url' => '#',
48
+ 'cryout_serious_slider_button2' => 'Read less',
49
+ 'cryout_serious_slider_button2url' => '#',
50
+ ),
51
+ ),
52
+ ); // sample_slides
53
+
54
+ function __construct() {
55
+
56
+ // create sample slider ('category')
57
+ $term = wp_insert_term(
58
+ 'Sample Slider', // the term
59
+ 'cryout_serious_slider_category', // the taxonomy
60
+ array(
61
+ 'description' => '',
62
+ 'slug' => 'sample-slider',
63
+ )
64
+ );
65
+
66
+ // create the slides
67
+ foreach ($this->sample_slides as $i=>$slide) {
68
+ $post = $slide['post'];
69
+ $meta = $slide['meta'];
70
+
71
+ // create sample slide
72
+ $pid = wp_insert_post( $post );
73
+
74
+ // add featured image
75
+ $post['image'] = plugins_url( $post['image'], dirname(__FILE__) );
76
+ $this->image_helper($pid, $post['image']);
77
+ unset($post['image']);
78
+
79
+ // assign slide to slider 'category'
80
+ wp_set_object_terms($pid, 'Sample Slider', 'cryout_serious_slider_category', true);
81
+
82
+ // add meta
83
+ foreach( $meta as $id=>$value ) {
84
+ update_post_meta( $pid, $id, $value );
85
+ }
86
+ }
87
+
88
+
89
+ } // __construct()
90
+
91
+
92
+ function image_helper($id, $image) {
93
+ // magic sideload image returns an HTML image, not an ID
94
+ $media = media_sideload_image($image, $id);
95
+
96
+ // therefore we must find it so we can set it as featured ID
97
+ if(!empty($media) && !is_wp_error($media)){
98
+ $args = array(
99
+ 'post_type' => 'attachment',
100
+ 'posts_per_page' => -1,
101
+ 'post_status' => 'any',
102
+ 'post_parent' => $id
103
+ );
104
+
105
+ // reference new image to set as featured
106
+ $attachments = get_posts($args);
107
+
108
+ if(isset($attachments) && is_array($attachments)){
109
+ foreach($attachments as $attachment){
110
+ // grab source of full size images (so no 300x150 nonsense in path)
111
+ $image = wp_get_attachment_image_src($attachment->ID, 'full');
112
+ // determine if in the $media image we created, the string of the URL exists
113
+ if(strpos($media, $image[0]) !== false){
114
+ // if so, we found our image. set it as thumbnail
115
+ set_post_thumbnail($id, $attachment->ID);
116
+ // only want one image
117
+ break;
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ } // image_helper()
124
+
125
+ } // class Cryout_Serious_Slider_DemoContent
126
+
127
+ new Cryout_Serious_Slider_DemoContent;
demo/sample-slide-1.jpg CHANGED
Binary file
demo/sample-slide-2.jpg CHANGED
Binary file
demo/sample-slide-3.jpg CHANGED
Binary file
inc/helpers.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Serious Slider helper functions
4
+ * inherited from Cryout Framework
5
+ */
6
+
7
+ class Cryout_Serious_Slider_Sanitizers {
8
+
9
+ /* sanitizes a RGB colour code to make sure it has proper structure and starts with # */
10
+ public function color_clean( $color ){
11
+ if ( '' === $color ) return '';
12
+ if ( preg_match( '/^#?(([a-f0-9]{3}){1,2})$/i', $color, $matches ) )
13
+ return '#' . $matches[1];
14
+ return '';
15
+ } // color_clean()
16
+
17
+ /* converts hex colour code to RGB series to be used in a rgba() CSS colour definition */
18
+ public function hex2rgb( $hex ) {
19
+ $hex = str_replace("#", "", $hex);
20
+ if (preg_match("/^([a-f0-9]{3}|[a-f0-9]{6})$/i",$hex)):
21
+ if(strlen($hex) == 3) {
22
+ $r = hexdec(substr($hex,0,1).substr($hex,0,1));
23
+ $g = hexdec(substr($hex,1,1).substr($hex,1,1));
24
+ $b = hexdec(substr($hex,2,1).substr($hex,2,1));
25
+ } else {
26
+ $r = hexdec(substr($hex,0,2));
27
+ $g = hexdec(substr($hex,2,2));
28
+ $b = hexdec(substr($hex,4,2));
29
+ }
30
+ $rgb = array($r, $g, $b);
31
+ return implode(",", $rgb); // returns the rgb values separated by commas
32
+ else: return ""; // input string is not a valid hex color code
33
+ endif;
34
+ } // hex2rgb()
35
+
36
+ /* adds a differential value to a RGB colour code; returns a hex colour code */
37
+ public function hexadder( $hex, $inc ) {
38
+ $hex = str_replace("#", "", $hex);
39
+ if (preg_match("/^([a-f0-9]{3}|[a-f0-9]{6})$/i",$hex)):
40
+ if(strlen($hex) == 3) {
41
+ $r = hexdec(substr($hex,0,1).substr($hex,0,1));
42
+ $g = hexdec(substr($hex,1,1).substr($hex,1,1));
43
+ $b = hexdec(substr($hex,2,1).substr($hex,2,1));
44
+ } else {
45
+ $r = hexdec(substr($hex,0,2));
46
+ $g = hexdec(substr($hex,2,2));
47
+ $b = hexdec(substr($hex,4,2));
48
+ }
49
+
50
+ $rgb_array = array($r,$g,$b);
51
+ $newhex="#";
52
+ foreach ($rgb_array as $el) {
53
+ $el+=$inc;
54
+ if ($el<=0) { $el='00'; }
55
+ elseif ($el>=255) {$el='ff';}
56
+ else {$el=dechex($el);}
57
+ if(strlen($el)==1) {$el='0'.$el;}
58
+ $newhex.=$el;
59
+ }
60
+ return $newhex;
61
+ else: return ""; // input string is not a valid hex color code
62
+ endif;
63
+ } // hexadder()
64
+
65
+ /* adds or subtracts a differential value to or from a RGB colour code; returns a hex colour code;
66
+ sign of the operation is decided based on the colour lightness */
67
+ public function hexdiff($hex,$inc,$f='') {
68
+ // $f = '-' | '+'
69
+ $hex = str_replace("#", "", $hex);
70
+ if (preg_match("/^([a-f0-9]{3}|[a-f0-9]{6})$/i",$hex)):
71
+ if(strlen($hex) == 3) {
72
+ $r = hexdec(substr($hex,0,1).substr($hex,0,1));
73
+ $g = hexdec(substr($hex,1,1).substr($hex,1,1));
74
+ $b = hexdec(substr($hex,2,1).substr($hex,2,1));
75
+ } else {
76
+ $r = hexdec(substr($hex,0,2));
77
+ $g = hexdec(substr($hex,2,2));
78
+ $b = hexdec(substr($hex,4,2));
79
+ }
80
+
81
+ $rgb_array = array($r,$g,$b);
82
+ $newhex="#";
83
+
84
+ // guess decimal lightness
85
+ if ( ((int)$r < 102) && ((int)$g < 102) && ((int)$b < 102) ) $sign = +1; else $sign = -1;
86
+
87
+ // forced sign handling
88
+ if (!empty($f)) $sign = ($f == '-'? -1 : +1);
89
+
90
+ foreach ($rgb_array as $el) {
91
+ $el += $sign * (int)$inc;
92
+ if ( $el<0 ) { $el='00'; }
93
+ elseif ( $el>255 ) { $el='ff'; }
94
+ else { $el = dechex($el); }
95
+ if ( strlen($el)==1 ) { $el='0'.$el; }
96
+ $newhex .= $el;
97
+ }
98
+
99
+ return $newhex;
100
+ else: return ""; // input string is not a valid hex color code
101
+ endif;
102
+ } // hexdiff()
103
+
104
+ } // Cryout_Serious_Slider_Sanitizer()
105
+
106
+ // FIN
inc/meta.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php wp_nonce_field( 'cryout_serious_slider_meta_nonce', 'cryout_serious_slider_meta_nonce' ); ?>
2
+
3
+ <?php for ($i=1;$i<=$this->butts;$i++) { ?>
4
+ <p>
5
+ <label for="cryout_serious_slider_button<?php echo $i ?>"><?php printf( __('Button %s Label:', 'cryout-serious-slider'), $i ) ?></label>
6
+ <input type="text" size="30" name="cryout_serious_slider_button<?php echo $i ?>" id="cryout_serious_slider_button<?php echo $i ?>" value="<?php echo ${'button'.$i} ?>" />
7
+ <span>&nbsp;&nbsp;</span>
8
+ <label for="cryout_serious_slider_button<?php echo $i ?>_url"><?php printf( __('Link URL:', 'cryout-serious-slider'), $i ) ?></label>
9
+ <input type="text" size="40" name="cryout_serious_slider_button<?php echo $i ?>_url" id="cryout_serious_slider_button<?php echo $i ?>_url" value="<?php echo ${'button'.$i.'_url'} ?>" />
10
+ <span>&nbsp;&nbsp;</span>
11
+ <input type="checkbox" id="cryout_serious_slider_button<?php echo $i ?>_target" name="cryout_serious_slider_button<?php echo $i ?>_target" <?php checked( ${'button'.$i.'_target'} ); ?> />
12
+ <label for="cryout_serious_slider_button<?php echo $i ?>_target"><?php _e('Open in New Window', 'cryout-serious-slider') ?></label>
13
+ </p>
14
+ <?php } ?>
15
+
16
+ <p>
17
+ <label for="cryout_serious_slider_link"><?php _e('Slide Image Link URL:', 'cryout-serious-slider') ?></label>
18
+ <input type="text" size="60" name="cryout_serious_slider_link" id="cryout_serious_slider_link" value="<?php echo $text; ?>" />
19
+ <span>&nbsp;&nbsp;</span>
20
+ <input type="checkbox" id="cryout_serious_slider_target" name="cryout_serious_slider_target" <?php checked( $check ); ?> />
21
+ <label for="cryout_serious_slider_target"><?php _e('Open in New Window', 'cryout-serious-slider') ?></label>
22
+ </p>
23
+ <p> <em><?php _e('Leave fields empty to disable elements.', 'cryout-serious-slider') ?></em> </p>
inc/right-column.php CHANGED
@@ -1,16 +1,17 @@
1
- <div id="floater-right">
2
- <div class="col-wrap">
3
- <div class="form-wrap">
4
- <h3 class="hndle"><?php //_e('Usage', 'cryout-serious-slider') ?></h3>
5
- <div class="inside">
6
- <h3><?php _e('Shortcode', 'cryout-serious-slider') ?></h3>
7
- <p><?php _e('Use the shortcode to include the slider in posts, pages or widgets', 'cryout-serious-slider') ?></p>
8
- <input type="text" readonly="readonly" value="[serious-slider id=<?php echo $term_ID ?>]"><br>
9
- <br><hr>
10
- <h3><?php _e('Template', 'cryout-serious-slider') ?></h3>
11
- <p><?php _e('Use the PHP code to include the slider directly in files', 'cryout-serious-slider') ?></p>
12
- <textarea readonly="readonly" rows="3"><?php printf( "&lt;?php\n echo do_shortcode( '[serious-slider id=%s]' );\n ?&gt;", $term_ID ) ?></textarea>
13
- </div>
14
- </div>
15
- </div>
16
- </div>
 
1
+ <div id="floater-right">
2
+ <div class="col-wrap">
3
+ <div class="form-wrap">
4
+ <h3 class="hndle"><?php //_e('Usage', 'cryout-serious-slider') ?></h3>
5
+ <div class="inside">
6
+ <?php echo '<a id="cryout-manage-slides" href="edit.php?post_type='. $this->posttype . '&'. $this->taxonomy . '=' . $term_slug . '">' . __('&laquo; Manage Slides &raquo;', 'cryout-serious-slider') . '</a>'; ?>
7
+ <h3><?php _e('Shortcode', 'cryout-serious-slider') ?></h3>
8
+ <p><?php _e('Use the shortcode to include the slider in posts, pages or widgets', 'cryout-serious-slider') ?></p>
9
+ <input type="text" readonly="readonly" value="[serious-slider id=<?php echo $term_ID ?>]"><br>
10
+ <br><hr>
11
+ <h3><?php _e('Template', 'cryout-serious-slider') ?></h3>
12
+ <p><?php _e('Use the PHP code to include the slider directly in files', 'cryout-serious-slider') ?></p>
13
+ <textarea readonly="readonly" rows="3"><?php printf( "&lt;?php\n echo do_shortcode( '[serious-slider id=%s]' );\n ?&gt;", $term_ID ) ?></textarea>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </div>
inc/settings.php CHANGED
@@ -1,106 +1,108 @@
1
- <div class="wrap" id="serious-slider-about">
2
- <h2><?php //echo $this->title; ?></h2>
3
-
4
- <?php
5
-
6
- //$options = $this->get_settings();
7
- //$this->save_settings();
8
-
9
- if ( ! isset( $_REQUEST['add_sample_content'] ) )
10
- $_REQUEST['add_sample_content'] = false;
11
-
12
- if ( $_REQUEST['add_sample_content'] ) {
13
- if (current_user_can('edit_others_posts')) {
14
- /* because wp doesn't auto display saved notice on non-options pages */ ?>
15
- <div class="updated settings-error notice is-dismissible" id="setting-error-settings_updated">
16
- <p><strong><?php _e('Sample slider created.', 'cryout-serious-slider');?></strong><br>
17
- <?php _e('Navigate to Slider and Slides sections to see the sample content.') ?></p>
18
- <button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'cryout-serious-slider' ) ?></span></button>
19
- </div>
20
- <?php } else { ?>
21
- <div class="notice notice-warning is-dismissible">
22
- <p><?php _e('You do not have sufficient permissions to create sample content.') ?></p>
23
- <button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'cryout-serious-slider' ) ?></span></button>
24
- </div>
25
- <?php } } ?>
26
-
27
- <div id="poststuff">
28
- <div id="post-body" class="metabox-holder columns-2">
29
- <div id="post-body-content">
30
-
31
- <div class="postbox" id="serious-slider-header">
32
- <img src="<?php echo plugins_url('../resources/images/serious-slider-header.png', __FILE__); ?>" />
33
- <div id="serious-slider-description">
34
- <p>Responsive slider, built on Bootstrap Carousel, uses core WordPress functionality, easy to use, seriously.</p>
35
- <h3> Features: </h3>
36
-
37
- <ul>
38
- <li>Unlimited sliders with unlimited slides</li>
39
- <li>Seriously configurable </li>
40
- <li>Fully responsive </li>
41
- <li>Touch Swipe Navigation </li>
42
- <li>Customization options for each individual slider </li>
43
- <li>Slide attributes: image, caption title, caption text (with HTML support), target link</li>
44
- <li>Easy to use - uses WordPress custom post types</li>
45
- <li>Translation ready and compatible with translation plugins </li>
46
- <li>Accessibility ready</li>
47
- <li>Lightweight (uses CSS and iconfont only)</li>
48
- <li>CSS transitions – fast and powerful hardware accelerated CSS3 3D transforms </li>
49
- <li>HTML5 valid</li>
50
- <li>Sample content</li>
51
- </ul>
52
-
53
- </div>
54
- </div>
55
-
56
- </div> <!-- post-body-content-->
57
-
58
- <div class="postbox-container" id="postbox-container-1">
59
-
60
- <div class="meta-box-sortables">
61
-
62
- <div class="postbox">
63
- <h3 style="text-align: center;" class="hndle">
64
- <span><strong><?php echo $this->title; ?></strong></span>
65
- </h3>
66
-
67
- <div class="inside">
68
- <div style="text-align: center; margin: auto">
69
- <strong><?php printf( __('version: %s','cryout-serious-slider'), $this->version ); ?></strong><br>
70
- <?php _e('by','cryout-serious-slider') ?> Cryout Creations<br>
71
- <a target="_blank" href="http://www.cryoutcreations.eu/cryout-serious-slider/">www.cryoutcreations.eu</a>
72
- </div>
73
- </div>
74
- </div>
75
-
76
- <div class="postbox">
77
- <h3 style="text-align: center;" class="hndle">
78
- <span><?php _e('Support','cryout-serious-slider') ?></span>
79
- </h3><div class="inside">
80
- <div style="text-align: center; margin: auto">
81
- <?php printf ( '%1$s <a target="_blank" href="http://www.cryoutcreations.eu/forum">%2$s</a>.',
82
- __('For support questions please use', 'cryout-serious-slider'),
83
- __('our forum', 'cryout-serious-slider')
84
- );
85
- ?>
86
- </div>
87
- </div>
88
- </div>
89
-
90
- <div class="postbox">
91
- <div class="inside">
92
- <p class="description"><?php _e('Automatically set up a sample slider with 3 slides to use as a guide for your own content.', 'cryout-serious-slider') ?></p>
93
- <a class="button-primary" href="<?php echo $this->aboutpage . '&add_sample_content=1' ?>" style="float:left; margin-right: 20px;">
94
- <?php _e('Create Sample Slider', 'cryout-serious-slider');?>
95
- </a>
96
- </div> <!--inside-->
97
- </div> <!--postbox-->
98
-
99
- </div>
100
- </div> <!-- postbox-container -->
101
-
102
- </div> <!-- post-body -->
103
- <br class="clear">
104
- </div> <!-- poststuff -->
105
-
106
- </div><!--end wrap-->
 
 
1
+ <div class="wrap" id="serious-slider-about">
2
+ <h2><?php //echo $this->title; ?></h2>
3
+
4
+ <?php
5
+
6
+
7
+ if ( ! isset( $_REQUEST['add_sample_content'] ) )
8
+ $_REQUEST['add_sample_content'] = false;
9
+
10
+ if ( $_REQUEST['add_sample_content'] ) {
11
+ if (current_user_can('edit_others_posts')) {
12
+ /* because wp doesn't auto display saved notice on non-options pages */ ?>
13
+ <div class="updated settings-error notice is-dismissible" id="setting-error-settings_updated">
14
+ <p><strong><?php _e('Sample slider created.', 'cryout-serious-slider');?></strong><br>
15
+ <?php _e('Navigate to Slider and Slides sections to see the sample content.') ?></p>
16
+ <button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'cryout-serious-slider' ) ?></span></button>
17
+ </div>
18
+ <?php } else { ?>
19
+ <div class="notice notice-warning is-dismissible">
20
+ <p><?php _e('You do not have sufficient permissions to create sample content.') ?></p>
21
+ <button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'cryout-serious-slider' ) ?></span></button>
22
+ </div>
23
+ <?php } } // endif ?>
24
+
25
+ <div id="poststuff">
26
+ <div id="post-body" class="metabox-holder columns-2">
27
+ <div id="post-body-content">
28
+
29
+ <div class="postbox" id="serious-slider-header">
30
+ <img src="<?php echo plugins_url('../resources/images/serious-slider-header.png', __FILE__); ?>" />
31
+ <div id="serious-slider-description">
32
+ <p>Responsive slider, built on Bootstrap Carousel, uses core WordPress functionality, easy to use, seriously.</p>
33
+ <h3> Features: </h3>
34
+
35
+ <ul>
36
+ <li>Unlimited sliders with unlimited slides</li>
37
+ <li>Seriously configurable </li>
38
+ <li>Fully responsive </li>
39
+ <li>Touch Swipe Navigation </li>
40
+ <li>Customization options for each individual slider </li>
41
+ <li>Slide attributes: image, caption title, caption text (with HTML support), target link</li>
42
+ <li>Easy to use - uses WordPress custom post types</li>
43
+ <li>Translation ready and compatible with translation plugins </li>
44
+ <li>Accessibility ready</li>
45
+ <li>Lightweight (uses CSS and iconfont only)</li>
46
+ <li>CSS transitions – fast and powerful hardware accelerated CSS3 3D transforms </li>
47
+ <li>HTML5 valid</li>
48
+ <li>Sample content</li>
49
+ </ul>
50
+
51
+ </div>
52
+ </div>
53
+
54
+ </div> <!-- post-body-content-->
55
+
56
+ <div class="postbox-container" id="postbox-container-1">
57
+
58
+ <div class="meta-box-sortables">
59
+
60
+ <div class="postbox">
61
+ <h3 style="text-align: center;" class="hndle">
62
+ <img id="serious-slider-logo" src="<?php echo plugins_url('../resources/images/serious-slider-128.png', __FILE__); ?>" />
63
+ <span><strong><?php echo $this->title; ?></strong></span>
64
+ </h3>
65
+
66
+ <div class="inside">
67
+ <div style="text-align: center; margin: auto">
68
+ <strong><?php printf( __('version: %s','cryout-serious-slider'), $this->version ); ?></strong><br>
69
+ <?php _e('by','cryout-serious-slider') ?> Cryout Creations<br>
70
+ <a target="_blank" href="http://www.cryoutcreations.eu/cryout-serious-slider/">www.cryoutcreations.eu</a>
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="postbox">
76
+ <h3 style="text-align: center;" class="hndle">
77
+ <span><?php _e('Support','cryout-serious-slider') ?></span>
78
+ </h3><div class="inside">
79
+ <div style="text-align: center; margin: auto">
80
+ <p><?php _e('Need help?', 'cryout-serious-slider') ?></p>
81
+ <a class="button button-primary" href="http://www.cryoutcreations.eu/priority-support"><?php _e('Priority Support', 'cryout-serious-slider') ?></a>
82
+ <a class="button button-secondary" href="http://www.cryoutcreations.eu/forums/f/wordpress/plugins/serious-slider"><?php _e('Support Forum', 'cryout-serious-slider') ?></a>
83
+ </div>
84
+ </div>
85
+ </div>
86
+
87
+ <div class="postbox">
88
+ <h3 style="text-align: center;" class="hndle">
89
+ <span><?php _e('Demo Content','cryout-serious-slider') ?></span>
90
+ </h3>
91
+ <div class="inside">
92
+ <div style="text-align: center; margin: auto">
93
+ <a class="button button-secondary" href="<?php echo $this->aboutpage . '&add_sample_content=1' ?>">
94
+ <?php _e('Create Sample Slider', 'cryout-serious-slider');?>
95
+ </a>
96
+ <p class="description"><small><?php _e('This will create a sample slider with 3 slides which you can use as a basis for your own content.', 'cryout-serious-slider') ?></small></p>
97
+ </div>
98
+ </div> <!--inside-->
99
+ </div> <!--postbox-->
100
+
101
+ </div>
102
+ </div> <!-- postbox-container -->
103
+
104
+ </div> <!-- post-body -->
105
+ <br class="clear">
106
+ </div> <!-- poststuff -->
107
+
108
+ </div><!--end wrap-->
inc/shortcodes.php CHANGED
@@ -1,217 +1,350 @@
1
- <?php
2
-
3
- /* The shortcode class */
4
- class Cryout_Serious_Slider_Shortcode {
5
-
6
- public $shortcode_tag = 'serious-slider';
7
- private $id = 0;
8
- private $cid = 0;
9
- private $custom_style = array();
10
- private $custom_script = array();
11
-
12
- function __construct($args = array()){
13
- //register shortcode
14
- add_shortcode( $this->shortcode_tag, array( $this, 'shortcode_render' ) );
15
- }
16
-
17
- function shortcode_style() {
18
- $sid = $this->id;
19
- $cid = $this->cid;
20
- $options = $this->shortcode_options($sid);
21
- foreach ($options as $id => $opt) ${$id} = $opt;
22
-
23
- ob_start();
24
- ?><style type="text/css">
25
- <!-- cryout serious slider styles -->
26
- <?php echo implode("\n", $this->custom_style); ?>
27
- </style><?php
28
- $custom_style = ob_get_clean();
29
-
30
- echo $custom_style;
31
- } // shortcode_slyle()
32
-
33
- function shortcode_script() {
34
- $sid = $this->id;
35
- $cid = $this->cid;
36
- $options = $this->shortcode_options($sid);
37
- foreach ($options as $id => $opt) ${$id} = $opt;
38
-
39
- ob_start();
40
- ?>
41
- <script type="text/javascript">
42
- /* cryout serious slider scripts */
43
- <?php echo implode("\n", $this->custom_script); ?>
44
- </script>
45
- <?php
46
- $custom_script = ob_get_clean();
47
-
48
- echo $custom_script;
49
- } // shortcode_slyle()
50
-
51
- function shortcode_render($attr) {
52
-
53
- global $cryout_serious_slider;
54
-
55
- if (!empty($attr['id'])) {
56
-
57
- $options = $this->shortcode_options($attr['id']);
58
- foreach ($options as $id => $opt) ${$id} = $opt;
59
-
60
- $slider_classes = array();
61
- $slider_classes[] = 'seriousslider-overlay' . $overlay;
62
- $slider_classes[] = 'seriousslider-' . $theme;
63
- $slider_classes[] = 'seriousslider-' . $animation;
64
- $slider_classes[] = 'seriousslider-sizing' . $sizing;
65
- $slider_classes = implode(' ', $slider_classes);
66
-
67
- if (!empty($attr['count'])) $count = esc_attr($attr['count']); else $count = -1;
68
-
69
- if ($sort == 'order'):
70
- // sort by order param
71
- $s1 = 'menu_order';
72
- $s2 = 'ASC';
73
- else:
74
- // sort by publish date (default)
75
- $s1 = 'date';
76
- $s2 = 'DESC';
77
- endif;
78
-
79
- $cid = abs($attr['id']).'_'.rand(1000,9999);
80
-
81
- $the_query = new WP_Query(
82
- array(
83
- 'post_type' => array( $cryout_serious_slider->posttype ),
84
- 'order' => $s2,
85
- 'orderby' => $s1,
86
- 'showposts' => $count,
87
- 'tax_query' => array(
88
- array(
89
- 'taxonomy' => $cryout_serious_slider->taxonomy,
90
- 'field' => 'id',
91
- 'terms' => array( $cid ),
92
- ),
93
- ),
94
- )
95
- );
96
-
97
- $counter = 0;
98
- $this->id = $attr['id'];
99
- $this->cid = $cid;
100
-
101
- ob_start(); ?>
102
- .serious-slider-<?php echo $cid ?> { max-width: <?php echo $width; ?>px; max-height: <?php echo $height; ?>px; }
103
- .serious-slider-<?php echo $cid ?>.seriousslider-sizing1 img { max-height: <?php echo $height; ?>px; }
104
- .serious-slider-<?php echo $cid ?> .seriousslider-caption-title { font-size: <?php echo round($textsize*2,2) ?>em; }
105
- .serious-slider-<?php echo $cid ?> .seriousslider-caption-text { font-size: <?php echo round($textsize,2) ?>em; }
106
- .serious-slider-<?php echo $cid ?> .seriousslider-caption-text a { font-size: <?php echo round($textsize*0.8,2) ?>em; }
107
-
108
- .serious-slider-<?php echo $cid ?> .seriousslider-inner > .item {
109
- -webkit-transition-duration: <?php echo round($transition/1000,2) ?>s;
110
- -o-transition-duration: <?php echo round($transition/1000,2) ?>s;
111
- transition-duration: <?php echo round($transition/1000,2) ?>s; }
112
- <?php
113
- $this->custom_style[] = ob_get_clean();
114
- add_action( 'wp_footer', array($this, 'shortcode_style') );
115
- ob_start() ?>
116
- jQuery('#serious-slider-<?php echo $cid ?>').carousel({
117
- interval: <?php echo $delay ?>,
118
- pause: '<?php echo $hover ?>',
119
- stransition: <?php echo $transition ?>
120
- })
121
- <?php
122
- $this->custom_script[] = ob_get_clean();
123
- add_action( 'wp_footer', array($this, 'shortcode_script') );
124
-
125
- if ( $the_query->have_posts() ):
126
- ob_start(); ?>
127
- <div id="serious-slider-<?php echo $cid ?>" class="cryout-serious-slider seriousslider serious-slider-<?php echo $cid ?> cryout-serious-slider-<?php echo $attr['id'] ?> <?php echo $slider_classes ?>" data-ride="seriousslider">
128
- <div class="seriousslider-inner" role="listbox">
129
-
130
- <?php while ($the_query->have_posts()):
131
- $the_query->the_post();
132
- $counter++;
133
-
134
- // default parameters
135
- $meta_link = '';
136
- $meta_target = '';
137
- $sizes = '';
138
-
139
- // retrieve parameters
140
- $slide_link = get_post_meta( get_the_ID(), 'cryout_serious_slider_link', TRUE );
141
- $slide_target = get_post_meta( get_the_ID(), 'cryout_serious_slider_target', TRUE );
142
- if ( !empty($slide_link) ) $meta_link = ' href="' . $slide_link . '"';
143
- if ( !empty($slide_target) && $slide_target ) $meta_target = 'target="_blank"';
144
-
145
- $image_data = wp_get_attachment_image_src (get_post_thumbnail_ID( get_the_ID() ), 'full' );
146
-
147
- if ( !empty($sizing) && $sizing ) $sizes = 'width="' . $width . '" height="' . $height . '"';
148
-
149
- $slide_title = get_the_title();
150
- $slide_text = get_the_content();
151
-
152
- ?>
153
-
154
- <div class="item slide-<?php echo $counter ?> <?php if ($counter==1) echo 'active' ?>">
155
- <?php if (!empty($image_data[0])): ?>
156
- <a <?php echo $meta_link; ?> <?php echo $meta_target; ?>>
157
- <img src="<?php echo $image_data[0] ?>" alt="<?php the_title(); ?>" <?php echo $sizes ?>>
158
- </a>
159
- <?php endif; ?>
160
- <?php if ( !empty($slide_title) || !empty($slide_text) ): ?>
161
- <div class="seriousslider-caption">
162
- <?php if (!empty($slide_title)) { ?><h3 class="seriousslider-caption-title"><?php the_title(); ?></h3><?php } ?>
163
- <?php if (!empty($slide_text)) { ?><div class="seriousslider-caption-text"><?php the_content() ?></div><?php } ?>
164
- </div>
165
- <?php endif; ?>
166
- </div>
167
-
168
- <?php endwhile; ?>
169
- </div>
170
-
171
- <ol class="seriousslider-indicators">
172
- <?php for ($i=0;$i<$counter;$i++) { ?>
173
- <li data-target="#serious-slider-<?php echo $cid ?>" data-slide-to="<?php echo $i?>" <?php if ($i==0) echo 'class="active"' ?>></li>
174
- <?php } ?>
175
- </ol>
176
-
177
- <button class="left seriousslider-control" data-target="#serious-slider-<?php echo $cid ?>" role="button" data-slide="prev">
178
- <span class="sicon-prev" aria-hidden="true"></span>
179
- <span class="sr-only"><?php _e('Previous','cryout-serious-slider') ?></span>
180
- </button>
181
- <button class="right seriousslider-control" data-target="#serious-slider-<?php echo $cid; ?>" role="button" data-slide="next">
182
- <span class="sicon-next" aria-hidden="true"></span>
183
- <span class="sr-only"><?php _e('Next','cryout-serious-slider') ?></span>
184
- </button>
185
- </div>
186
- <?php
187
- wp_reset_query(); /* clean up the query */
188
- return ob_get_clean();
189
- endif; ?>
190
- <!-- end cryout serious slider -->
191
- <?php
192
- } // if id defined
193
-
194
- } // shortcode_render()
195
-
196
- function shortcode_options($sid) {
197
-
198
- global $cryout_serious_slider;
199
-
200
- if (is_numeric($sid)) {
201
- $data = get_option( "cryout_serious_slider_${sid}_meta" );
202
- if ( empty($data) ) $data = $cryout_serious_slider->defaults;
203
- } else {
204
- $data = $cryout_serious_slider->defaults;
205
- }
206
- foreach ($data as $id=>$value){
207
- $options[str_replace('cryout_serious_slider_','',$id)] = $value;
208
- }
209
- return $options;
210
- } // shortcode_options()
211
-
212
- } // class
213
-
214
- /* Initialize the shortcode class */
215
- $cryout_serious_slider_shortcode = new Cryout_Serious_Slider_Shortcode;
216
-
217
- /* END */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* The shortcode class */
4
+ class Cryout_Serious_Slider_Shortcode {
5
+
6
+ public $shortcode_tag = 'serious-slider';
7
+ private $id = 0;
8
+ private $cid = 0;
9
+ private $custom_style = array();
10
+ private $custom_script = array();
11
+ private $butts = 2;
12
+
13
+ function __construct($args = array()){
14
+ //register shortcode
15
+ add_shortcode( $this->shortcode_tag, array( $this, 'shortcode_render' ) );
16
+ $this->butts = apply_filters( 'cryout_serious_slider_buttoncount', $this->butts );
17
+
18
+ include_once( plugin_dir_path(__FILE__) . '/helpers.php' );
19
+ $this->sanitizer = new Cryout_Serious_Slider_Sanitizers;
20
+ }
21
+
22
+ function shortcode_style() {
23
+ $sid = $this->id;
24
+ $cid = $this->cid;
25
+ $options = $this->shortcode_options($sid);
26
+ foreach ($options as $id => $opt) ${$id} = $opt;
27
+
28
+ ob_start();
29
+ ?><style type="text/css">
30
+ <!-- cryout serious slider styles -->
31
+ <?php echo implode("\n", $this->custom_style); ?>
32
+ </style><?php
33
+ $custom_style = ob_get_clean();
34
+
35
+ echo $custom_style;
36
+ } // shortcode_slyle()
37
+
38
+ function shortcode_script() {
39
+ ob_start();
40
+ ?>
41
+ <script type="text/javascript">
42
+ /* cryout serious slider scripts */
43
+ <?php echo implode("\n", $this->custom_script); ?>
44
+ </script>
45
+ <?php
46
+ ob_end_fluch();
47
+ } // shortcode_slyle()
48
+
49
+ function shortcode_render($attr) {
50
+
51
+ global $cryout_serious_slider;
52
+
53
+ // exit silently if slider is is not defined
54
+ if ( empty($attr['id'])) { return; }
55
+
56
+ $options = apply_filters('cryout_serious_slider_shortcode_attributes', $this->shortcode_options( $attr['id'] ), $attr, $attr['id']);
57
+ $options = $this->shortcode_options( $attr['id'] );
58
+ extract($options);
59
+
60
+ if (!empty($attr['count'])) $count = esc_attr($attr['count']); else $count = -1;
61
+
62
+ $hidecaption = !empty($attr['hidecaption']);
63
+ $hidetitle = !empty($attr['hidetitle']);
64
+
65
+ if ($sort == 'order'):
66
+ // sort by order param
67
+ $orderby = 'menu_order';
68
+ $order = 'ASC';
69
+ else:
70
+ // sort by publish date (default)
71
+ $orderby = 'date';
72
+ $order = 'DESC';
73
+ endif;
74
+
75
+ if (!empty($attr['orderby'])) $orderby = esc_attr($attr['orderby']);
76
+
77
+ $slider_classes = array();
78
+ $slider_classes[] = 'seriousslider-overlay' . $overlay;
79
+ $slider_classes[] = 'seriousslider-' . $theme;
80
+ $slider_classes[] = 'seriousslider-' . $animation;
81
+ $slider_classes[] = 'seriousslider-sizing' . $sizing;
82
+ $slider_classes[] = 'seriousslider-align' . $align;
83
+ $slider_classes[] = 'seriousslider-caption-animation-' . $captionanimation;
84
+ $slider_classes[] = 'seriousslider-textstyle-' . $textstyle;
85
+ $slider_classes = implode(' ', $slider_classes);
86
+
87
+
88
+ $cid = abs($attr['id']).'-rnd'.rand(1000,9999);
89
+
90
+ $the_query = new WP_Query(
91
+ array(
92
+ 'post_type' => array( $cryout_serious_slider->posttype ),
93
+ 'order' => $order,
94
+ 'orderby' => $orderby,
95
+ 'showposts' => $count,
96
+ 'tax_query' => array(
97
+ array(
98
+ 'taxonomy' => $cryout_serious_slider->taxonomy,
99
+ 'field' => 'id',
100
+ 'terms' => array( $cid ),
101
+ ),
102
+ ),
103
+ )
104
+ );
105
+
106
+ $counter = 0;
107
+ $this->id = $attr['id'];
108
+ $this->cid = $cid;
109
+
110
+ ob_start(); ?>
111
+ .serious-slider-<?php echo $cid ?> { max-width: <?php echo intval( $width ); ?>px; max-height: <?php echo intval( $height ); ?>px; }
112
+ .serious-slider-<?php echo $cid ?>.seriousslider-sizing1 img { max-height: <?php echo intval( $height ); ?>px; }
113
+ .serious-slider-<?php echo $cid ?> .seriousslider-caption-inside { max-width: <?php echo intval($caption_width) ?>px; font-size: <?php echo round($textsize,2) ?>em; }
114
+
115
+ .serious-slider-<?php echo $cid ?> .seriousslider-inner > .item {
116
+ -webkit-transition-duration: <?php echo round($transition/1000,2) ?>s;
117
+ -o-transition-duration: <?php echo round($transition/1000,2) ?>s;
118
+ transition-duration: <?php echo round($transition/1000,2) ?>s; }
119
+
120
+ .seriousslider.seriousslider-textstyle-bgcolor .seriousslider-caption-title span {
121
+ background-color: rgba( <?php echo $this->sanitizer->hex2rgb( $accent ); ?>, 0.6);
122
+ }
123
+
124
+ /* Indicators */
125
+ .seriousslider-dark .seriousslider-indicators li.active,
126
+ .seriousslider-square .seriousslider-indicators li.active,
127
+ .seriousslider-tall .seriousslider-indicators li.active,
128
+ .seriousslider-captionleft .seriousslider-indicators li.active,
129
+ .seriousslider-captionbottom .seriousslider-indicators li.active {
130
+ background-color: rgba( <?php echo $this->sanitizer->hex2rgb( $accent ); ?>, 0.8);
131
+ }
132
+
133
+ /* Arrows */
134
+ .seriousslider-dark .seriousslider-control:hover .control-arrow,
135
+ .seriousslider-square .seriousslider-control:hover .control-arrow,
136
+ .seriousslider-tall .seriousslider-control .control-arrow {
137
+ background-color: rgba( <?php echo $this->sanitizer->hex2rgb( $accent ); ?>, 0.8);
138
+ }
139
+
140
+ .seriousslider-tall .seriousslider-control:hover .control-arrow {
141
+ color: rgba( <?php echo $this->sanitizer->hex2rgb( $accent ); ?>, 1);
142
+ background-color: #FFF;
143
+ }
144
+
145
+ .seriousslider-captionbottom .seriousslider-control .control-arrow,
146
+ .seriousslider-captionleft .seriousslider-control .control-arrow {
147
+ color: rgba( <?php echo $this->sanitizer->hex2rgb( $accent ); ?>, .8);
148
+ }
149
+
150
+ .seriousslider-captionleft .seriousslider-control:hover .control-arrow {
151
+ color: rgba( <?php echo $this->sanitizer->hex2rgb( $accent ); ?>, 1);
152
+ }
153
+
154
+ /* Buttons */
155
+
156
+ /* Light */
157
+ .seriousslider-light .seriousslider-caption-buttons a:nth-child(2n+1),
158
+ .seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n) {
159
+ color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
160
+ }
161
+
162
+ .seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
163
+ background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
164
+ border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
165
+ }
166
+
167
+ /* Dark */
168
+ .seriousslider-dark .seriousslider-caption-buttons a:nth-child(2n) {
169
+ color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
170
+ }
171
+
172
+ .seriousslider-dark .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
173
+ border-color: #FFF;
174
+ }
175
+
176
+ .seriousslider-dark .seriousslider-caption-buttons a:hover:nth-child(2n) {
177
+ border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
178
+ }
179
+
180
+ .seriousslider-dark .seriousslider-caption-buttons a:nth-child(2n+1) {
181
+ background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
182
+ border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
183
+ }
184
+
185
+ /* Square */
186
+ .seriousslider-square .seriousslider-caption-buttons a:nth-child(2n+1) {
187
+ background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
188
+ }
189
+
190
+ .seriousslider-square .seriousslider-caption-buttons a:nth-child(2n) {
191
+ background: #fff;
192
+ color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
193
+ }
194
+
195
+ .seriousslider-square .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
196
+ color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
197
+ background: #FFF;
198
+ }
199
+
200
+ .seriousslider-square .seriousslider-caption-buttons a:hover:nth-child(2n) {
201
+ color: #fff;
202
+ background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
203
+ }
204
+
205
+ /* Tall */
206
+ .seriousslider-tall .seriousslider-caption-buttons a:nth-child(2n+1) {
207
+ background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
208
+ }
209
+
210
+ .seriousslider-tall .seriousslider-caption-buttons a:nth-child(2n) {
211
+ background: #FFF;
212
+ color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
213
+ }
214
+
215
+ .seriousslider-tall .seriousslider-caption-buttons a:hover {
216
+ opacity: 0.8;
217
+ }
218
+
219
+ /* Left caption */
220
+ .seriousslider-captionleft .seriousslider-caption-buttons a:hover {
221
+ color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
222
+ }
223
+
224
+ <?php
225
+ $this->custom_style[] = ob_get_clean();
226
+ add_action( 'wp_footer', array($this, 'shortcode_style') );
227
+ ob_start() ?>
228
+ jQuery('#serious-slider-<?php echo $cid ?>').carousel({
229
+ interval: <?php echo $delay ?>,
230
+ pause: '<?php echo $hover ?>',
231
+ stransition: <?php echo $transition ?>
232
+ })
233
+ <?php
234
+ $this->custom_script[] = ob_get_clean();
235
+ add_action( 'wp_footer', array($this, 'shortcode_script') );
236
+
237
+ if ( $the_query->have_posts() ):
238
+ ob_start(); ?>
239
+ <div id="serious-slider-<?php echo $cid ?>" class="cryout-serious-slider seriousslider serious-slider-<?php echo $cid ?> cryout-serious-slider-<?php echo $attr['id'] ?> <?php echo $slider_classes ?>" data-ride="seriousslider">
240
+ <div class="seriousslider-inner" role="listbox">
241
+
242
+ <?php while ($the_query->have_posts()):
243
+ $the_query->the_post();
244
+ $counter++;
245
+
246
+ // retrieve parameters
247
+ $slide_meta = get_post_meta( get_the_ID() );
248
+
249
+ if ( !empty($slide_meta['cryout_serious_slider_link'][0]) )
250
+ $meta_link = ' href="' . esc_url($slide_meta['cryout_serious_slider_link'][0]) . '"';
251
+ else $meta_link = '';
252
+ if ( !empty($slide_meta['cryout_serious_slider_target'][0]) && $slide_meta['cryout_serious_slider_target'][0] )
253
+ $meta_target = 'target="_blank"';
254
+ else $meta_target = '';
255
+ for ( $i=1; $i<=$this->butts; $i++ ) {
256
+ if ( !empty($slide_meta['cryout_serious_slider_button'.$i][0]) )
257
+ ${'meta_button'.$i} = $slide_meta['cryout_serious_slider_button'.$i][0]; else ${'meta_button'.$i} = FALSE;
258
+ if ( !empty($slide_meta['cryout_serious_slider_button'.$i.'_url'][0]) )
259
+ ${'meta_button'.$i.'_url'} = $slide_meta['cryout_serious_slider_button'.$i.'_url'][0]; else ${'meta_button'.$i.'_url'} = '';
260
+ if ( !empty($slide_meta['cryout_serious_slider_button'.$i.'_target'][0]) && $slide_meta['cryout_serious_slider_button'.$i.'_target'][0] )
261
+ ${'meta_button'.$i.'_target'} = 'target="_blank"'; else ${'meta_button'.$i.'_target'} = '';
262
+ }
263
+
264
+ $image_data = wp_get_attachment_image_src (get_post_thumbnail_ID( get_the_ID() ), 'full' );
265
+
266
+ if ( !empty($sizing) && $sizing ) $sizes = 'width="' . $width . '" height="' . $height . '"'; else $sizes = '';
267
+
268
+ $slide_title = get_the_title();
269
+ $slide_text = get_the_content();
270
+
271
+ ?>
272
+
273
+ <div class="item slide-<?php echo $counter ?> <?php if ($counter==1) echo 'active' ?>">
274
+ <?php if (!empty($image_data[0])): ?>
275
+ <a <?php echo $meta_link; ?> <?php echo $meta_target; ?>>
276
+ <img class="item-image" src="<?php echo $image_data[0] ?>" alt="<?php the_title_attribute(); ?>" <?php echo $sizes ?>>
277
+ </a>
278
+ <?php endif; ?>
279
+ <?php if (( !empty($slide_title) || !empty($slide_text) ) && !$hidecaption): ?>
280
+ <div class="seriousslider-caption">
281
+ <div class="seriousslider-caption-inside">
282
+ <?php if (!empty($slide_title) && !$hidetitle) { ?><h3 class="seriousslider-caption-title"><span><?php the_title(); ?></span></h3><?php } ?>
283
+ <?php if (!empty($slide_text)) { ?><div class="seriousslider-caption-text"><span><?php the_content() ?></span></div><?php } ?>
284
+ <div class="seriousslider-caption-buttons">
285
+ <?php for ( $i=1; $i<=$this->butts; $i++ ) { ?>
286
+ <?php if ( !empty(${'meta_button'.$i}) ) { ?>
287
+ <a class="seriousslider-button" href="<?php echo esc_url( ${'meta_button'.$i.'_url'}) ?>" <?php echo ${'meta_button'.$i.'_target'} ?>><?php echo esc_attr( ${'meta_button'.$i} ) ?></a>
288
+ <?php } ?>
289
+ <?php } ?>
290
+ </div>
291
+ </div><!--seriousslider-caption-inside-->
292
+ </div><!--seriousslider-caption-->
293
+ <?php endif; ?>
294
+ <div class="seriousslider-hloader"></div>
295
+ <figure class="seriousslider-cloader">
296
+ <svg width="200" height="200">
297
+ <circle cx="95" cy="95" r="20" transform="rotate(-90, 95, 95)"/>
298
+ </svg>
299
+ </figure>
300
+ </div>
301
+
302
+ <?php endwhile; ?>
303
+ </div>
304
+
305
+ <ol class="seriousslider-indicators">
306
+ <?php for ($i=0;$i<$counter;$i++) { ?>
307
+ <li data-target="#serious-slider-<?php echo $cid ?>" data-slide-to="<?php echo $i?>" <?php if ($i==0) echo 'class="active"' ?>></li>
308
+ <?php } ?>
309
+ </ol>
310
+
311
+ <button class="left seriousslider-control" data-target="#serious-slider-<?php echo $cid ?>" role="button" data-slide="prev">
312
+ <span class="sicon-prev control-arrow" aria-hidden="true"></span>
313
+ <span class="sr-only"><?php _e('Previous','cryout-serious-slider') ?></span>
314
+ </button>
315
+ <button class="right seriousslider-control" data-target="#serious-slider-<?php echo $cid; ?>" role="button" data-slide="next">
316
+ <span class="sicon-next control-arrow" aria-hidden="true"></span>
317
+ <span class="sr-only"><?php _e('Next','cryout-serious-slider') ?></span>
318
+ </button>
319
+ </div>
320
+ <?php
321
+ wp_reset_query(); /* clean up the query */
322
+ return ob_get_clean();
323
+ endif; ?>
324
+ <!-- end cryout serious slider -->
325
+ <?php
326
+
327
+ } // shortcode_render()
328
+
329
+ function shortcode_options($sid) {
330
+
331
+ global $cryout_serious_slider;
332
+
333
+ if (is_numeric($sid)) {
334
+ $data = get_option( "cryout_serious_slider_${sid}_meta" );
335
+ $data = wp_parse_args( $data, $cryout_serious_slider->defaults );
336
+ } else {
337
+ $data = $cryout_serious_slider->defaults;
338
+ }
339
+ foreach ($data as $id=>$value){
340
+ $options[str_replace('cryout_serious_slider_','',$id)] = $value;
341
+ }
342
+ return $options;
343
+ } // shortcode_options()
344
+
345
+ } // class
346
+
347
+ /* Initialize the shortcode class */
348
+ $cryout_serious_slider_shortcode = new Cryout_Serious_Slider_Shortcode;
349
+
350
+ /* END */
inc/slider.php DELETED
@@ -1,77 +0,0 @@
1
- <style type="text/css">
2
- #Serious-Slider-<?php echo $cid ?> { max-width: <?php echo $width; ?>px; <?php if ($sizing) { ?>max-height: <?php echo $height; ?>px;<?php } ?> }
3
- #Serious-Slider-<?php echo $cid ?> .seriousslider-caption-title { font-size: <?php echo round($textsize*2,2) ?>em; }
4
- #Serious-Slider-<?php echo $cid ?> .seriousslider-caption-text { font-size: <?php echo round($textsize,2) ?>em; }
5
- #Serious-Slider-<?php echo $cid ?> .seriousslider-caption-text a { font-size: <?php echo round($textsize*0.8,2) ?>em; }
6
- <?php if ($sizing) { ?> #Serious-Slider-<?php echo $cid ?> .seriousslider-inner img.item-image { height: <?php echo $height; ?>px; } <?php } ?>
7
-
8
- #Serious-Slider-<?php echo $cid ?> .seriousslider-inner > .item {
9
- -webkit-transition-duration: <?php echo round($transition/1000,2) ?>s;
10
- -o-transition-duration: <?php echo round($transition/1000,2) ?>s;
11
- transition-duration: <?php echo round($transition/1000,2) ?>s; }
12
- </style>
13
- <!-- cryout serious slider -->
14
- <?php if ( $the_query->have_posts() ): ?>
15
- <div id="Serious-Slider-<?php echo $cid ?>" class="cryout-serious-slider seriousslider <?php echo $slider_classes ?>" data-ride="seriousslider">
16
- <div class="seriousslider-inner" role="listbox">
17
-
18
- <?php while ($the_query->have_posts()):
19
- $the_query->the_post();
20
- $counter++;
21
-
22
- // default parameters
23
- $meta_link = '';
24
- $meta_target = '';
25
- $sizes = '';
26
-
27
- // retrieve parameters
28
- $slide_link = get_post_meta( get_the_ID(), 'cryout_serious_slider_link' );
29
- $slide_target = get_post_meta( get_the_ID(), 'cryout_serious_slider_target' );
30
- if ( !empty($slide_link) ) $meta_link = ' href="' . $slide_link[0] . '"';
31
- if ( !empty($slide_target) ) $meta_target = 'target="_blank"';
32
-
33
- $image_data = wp_get_attachment_image_src (get_post_thumbnail_ID( get_the_ID() ), 'full' );
34
-
35
- if ( !empty($sizing) && $sizing ) $sizes = 'width="' . $width . '" height="' . $height . '"';
36
-
37
- ?>
38
-
39
- <div class="item slide-<?php echo $counter ?> <?php if ($counter==1) echo 'active' ?>">
40
- <a <?php echo $meta_link; ?> <?php echo $meta_target; ?>>
41
- <img src="<?php echo $image_data[0] ?>" alt="<?php the_title(); ?>" <?php echo $sizes ?> class="item-image">
42
- </a>
43
- <div class="seriousslider-caption">
44
- <h3 class="seriousslider-caption-title">
45
- <a <?php echo $meta_link?> <?php echo $meta_target ?>><?php the_title(); ?></a>
46
- </h3>
47
- <div class="seriousslider-caption-text"><?php the_content() ?></div>
48
- </div>
49
- </div>
50
-
51
- <?php endwhile; ?>
52
- </div>
53
-
54
- <ol class="seriousslider-indicators">
55
- <?php for ($i=0;$i<$counter;$i++) { ?>
56
- <li data-target="#Serious-Slider-<?php echo $cid ?>" data-slide-to="<?php echo $i?>" <?php if ($i==0) echo 'class="active"' ?>></li>
57
- <?php } ?>
58
- </ol>
59
-
60
- <a class="left seriousslider-control" href="#Serious-Slider-<?php echo $cid ?>" role="button" data-slide="prev">
61
- <span class="sicon-prev" aria-hidden="true"></span>
62
- <span class="sr-only"><?php _e('Previous','cryout-serious-slider') ?></span>
63
- </a>
64
- <a class="right seriousslider-control" href="#Serious-Slider-<?php echo $cid; ?>" role="button" data-slide="next">
65
- <span class="sicon-next" aria-hidden="true"></span>
66
- <span class="sr-only"><?php _e('Next','cryout-serious-slider') ?></span>
67
- </a>
68
- </div>
69
- <script type='text/javascript'>
70
- jQuery('#Serious-Slider-<?php echo $cid ?>').carousel({
71
- interval: <?php echo $delay ?>,
72
- pause: '<?php echo $hover ?>',
73
- stransition: <?php echo $transition ?>
74
- })
75
- </script>
76
- <?php endif; ?>
77
- <!-- end cryout serious slider -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/taxmeta.php CHANGED
@@ -1,109 +1,196 @@
1
- <table class="form-table serious-table">
2
- <?php
3
- echo $this->selectfield(
4
- 'term_meta[cryout_serious_slider_sort]',
5
- array( 'date' => __('by date','cryout-serious-slider'), 'order' => __('by order value','cryout-serious-slider') ),
6
- $the_meta['cryout_serious_slider_sort'],
7
- __('Sort Order','cryout-serious-slider'),
8
- '',
9
- 'short'
10
- );
11
- echo $this->selectfield(
12
- 'term_meta[cryout_serious_slider_sizing]',
13
- array( 0 => __('Adapt to images','cryout-serious-slider'), 1 => __('Force constraints','cryout-serious-slider') ),
14
- $the_meta['cryout_serious_slider_sizing'],
15
- __('Slider Size','cryout-serious-slider'),
16
- '',
17
- 'short'
18
- );
19
- ?>
20
-
21
- <?php
22
- echo $this->inputfield(
23
- 'term_meta[cryout_serious_slider_width]',
24
- $the_meta['cryout_serious_slider_width'],
25
- __('Width','cryout-serious-slider'),
26
- '',
27
- 'short',
28
- 'px'
29
- );
30
- echo $this->inputfield(
31
- 'term_meta[cryout_serious_slider_height]',
32
- $the_meta['cryout_serious_slider_height'],
33
- __('Height','cryout-serious-slider'),
34
- '',
35
- 'short',
36
- 'px'
37
- );
38
- echo $this->selectfield(
39
- 'term_meta[cryout_serious_slider_theme]',
40
- array( 'light' => __('Light','cryout-serious-slider'),
41
- 'dark' => __('Dark','cryout-serious-slider'),
42
- 'theme' => __('Cryout Theme','cryout-serious-slider'),
43
- 'boots' => __('Bootstrap','cryout-serious-slider') ),
44
- $the_meta['cryout_serious_slider_theme'],
45
- __('Color Scheme','cryout-serious-slider'),
46
- '',
47
- 'short'
48
- );
49
- echo $this->inputfield(
50
- 'term_meta[cryout_serious_slider_textsize]',
51
- $the_meta['cryout_serious_slider_textsize'],
52
- __('Base Font Size','cryout-serious-slider'),
53
- '',
54
- 'short',
55
- 'em',
56
- 'step="0.1"'
57
- );
58
- echo $this->selectfield(
59
- 'term_meta[cryout_serious_slider_overlay]',
60
- array( 0 => __('Always hidden', 'cryout-serious-slider'), 1 => __('Appear on hover','cryout-serious-slider'), 2 => __('Always visible','cryout-serious-slider') ),
61
- $the_meta['cryout_serious_slider_overlay'],
62
- __('Bullets and Navigation','cryout-serious-slider'),
63
- '',
64
- 'short'
65
- );
66
- echo $this->selectfield(
67
- 'term_meta[cryout_serious_slider_animation]',
68
- array(
69
- 'fade' => __('Fade','cryout-serious-slider'),
70
- 'slide' => __('Slide','cryout-serious-slider'),
71
- 'overslide' => __('Overslide','cryout-serious-slider'),
72
- 'underslide' => __('Underslide','cryout-serious-slider'),
73
- 'parallax' => __('Parallax','cryout-serious-slider'),
74
- 'hflip' => __('Horizontal Flip','cryout-serious-slider'),
75
- 'vflip' => __('Vertical Flip','cryout-serious-slider'),
76
- ),
77
- $the_meta['cryout_serious_slider_animation'],
78
- __('Transition Effect','cryout-serious-slider'),
79
- '',
80
- 'short'
81
- );
82
- echo $this->selectfield(
83
- 'term_meta[cryout_serious_slider_hover]',
84
- array( 'hover' => __('Enabled','cryout-serious-slider'), 'false' => __('Disabled','cryout-serious-slider') ),
85
- $the_meta['cryout_serious_slider_hover'],
86
- __('Transition Pause on Hover','cryout-serious-slider'),
87
- '',
88
- 'short'
89
- );
90
-
91
- echo $this->inputfield(
92
- 'term_meta[cryout_serious_slider_delay]',
93
- $the_meta['cryout_serious_slider_delay'],
94
- __('Transition Delay','cryout-serious-slider'),
95
- '',
96
- 'short',
97
- 'ms'
98
- );
99
- echo $this->inputfield(
100
- 'term_meta[cryout_serious_slider_transition]',
101
- $the_meta['cryout_serious_slider_transition'],
102
- __('Transition Duration','cryout-serious-slider'),
103
- '',
104
- 'short',
105
- 'ms'
106
- ); ?>
107
-
108
- </table>
109
- <br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="seriousslider-media">
3
+ <div class="seriousslider-media-container"></div>
4
+ <a href="#" class="button" id="seriousslider-media"><?php _e( 'Select Images', 'cryout-serious-slider' ) ?></a>
5
+ </div>
6
+
7
+ <div id="seriousslider-tabs">
8
+ <ul>
9
+ <li><a href="#general"><?php _e( 'General', 'cryout-serious-slider' ) ?></a></li>
10
+ <li><a href="#appearance"><?php _e( 'Appearance', 'cryout-serious-slider' ) ?></a></li>
11
+ <li><a href="#animation"><?php _e( 'Animation', 'cryout-serious-slider' ) ?></a></li>
12
+ </ul>
13
+
14
+
15
+ <div id="general">
16
+ <input id="cryout_serious_slider_imagelist" class="cryout-serious-slider-imagelist" name="cryout_serious_slider_imagelist" type="hidden" value="">
17
+
18
+ <?php
19
+
20
+ echo $this->selectfield(
21
+ 'term_meta[cryout_serious_slider_sort]',
22
+ array( 'date' => __('by date','cryout-serious-slider'), 'order' => __('by order value','cryout-serious-slider') ),
23
+ $the_meta['cryout_serious_slider_sort'],
24
+ __('Sort Order','cryout-serious-slider'),
25
+ '',
26
+ 'short'
27
+ );
28
+ echo $this->selectfield(
29
+ 'term_meta[cryout_serious_slider_sizing]',
30
+ array( 0 => __('Adapt to images','cryout-serious-slider'), 1 => __('Force constraints','cryout-serious-slider') ),
31
+ $the_meta['cryout_serious_slider_sizing'],
32
+ __('Slider Size','cryout-serious-slider'),
33
+ '',
34
+ 'short'
35
+ );
36
+ echo $this->inputfield(
37
+ 'term_meta[cryout_serious_slider_width]',
38
+ $the_meta['cryout_serious_slider_width'],
39
+ __('Width','cryout-serious-slider'),
40
+ '',
41
+ 'short',
42
+ 'px'
43
+ );
44
+ echo $this->inputfield(
45
+ 'term_meta[cryout_serious_slider_height]',
46
+ $the_meta['cryout_serious_slider_height'],
47
+ __('Height','cryout-serious-slider'),
48
+ '',
49
+ 'short',
50
+ 'px'
51
+ ); ?>
52
+ </div><!--#general-->
53
+
54
+ <div id="appearance">
55
+ <?php
56
+ echo $this->selectfield(
57
+ 'term_meta[cryout_serious_slider_theme]',
58
+ array( 'light' => __( 'Light', 'cryout-serious-slider' ),
59
+ 'light2' => __( 'Light 2', 'cryout-serious-slider' ),
60
+ 'dark' => __( 'Dark', 'cryout-serious-slider' ),
61
+ 'square' => __( 'Square', 'cryout-serious-slider' ),
62
+ 'tall' => __( 'Tall', 'cryout-serious-slider' ),
63
+ 'captionleft' => __( 'Caption Left', 'cryout-serious-slider' ),
64
+ 'captionbottom' => __( 'Caption Bottom', 'cryout-serious-slider' ),
65
+ 'theme' => __( 'Cryout Theme', 'cryout-serious-slider' )
66
+ ),
67
+ $the_meta['cryout_serious_slider_theme'],
68
+ __('Style','cryout-serious-slider'),
69
+ '',
70
+ 'short'
71
+ );
72
+ echo $this->selectfield(
73
+ 'term_meta[cryout_serious_slider_overlay]',
74
+ array( 0 => __('Always hidden', 'cryout-serious-slider'),
75
+ 1 => __('Appear on hover','cryout-serious-slider'),
76
+ 2 => __('Always visible','cryout-serious-slider')
77
+ ),
78
+ $the_meta['cryout_serious_slider_overlay'],
79
+ __('Bullets and Navigation','cryout-serious-slider'),
80
+ '',
81
+ 'short'
82
+ );
83
+ echo $this->inputfield(
84
+ 'term_meta[cryout_serious_slider_textsize]',
85
+ $the_meta['cryout_serious_slider_textsize'],
86
+ __('Base Font Size','cryout-serious-slider'),
87
+ '',
88
+ 'short',
89
+ 'em',
90
+ 'step="0.05"'
91
+ );
92
+
93
+ echo $this->selectfield(
94
+ 'term_meta[cryout_serious_slider_align]',
95
+ array( 'left' => __('Left', 'cryout-serious-slider'),
96
+ 'center' => __('Center','cryout-serious-slider'),
97
+ 'right' => __('Right','cryout-serious-slider'),
98
+ 'justify' => __('Justify','cryout-serious-slider'),
99
+ ),
100
+ $the_meta['cryout_serious_slider_align'],
101
+ __('Caption Alignment','cryout-serious-slider'),
102
+ '',
103
+ 'short'
104
+ );
105
+ echo $this->inputfield(
106
+ 'term_meta[cryout_serious_slider_caption_width]',
107
+ $the_meta['cryout_serious_slider_caption_width'],
108
+ __('Caption Width','cryout-serious-slider'),
109
+ '',
110
+ 'short',
111
+ 'px'
112
+ );
113
+ echo $this->selectfield(
114
+ 'term_meta[cryout_serious_slider_textstyle]',
115
+ array( 'none' => __('None', 'cryout-serious-slider'),
116
+ 'textshadow' => __('Text Shadow','cryout-serious-slider'),
117
+ 'bgcolor' => __('Background Color','cryout-serious-slider'),
118
+ ),
119
+ $the_meta['cryout_serious_slider_textstyle'],
120
+ __('Text Style','cryout-serious-slider'),
121
+ '',
122
+ 'short'
123
+ );
124
+ echo $this->inputfield(
125
+ 'term_meta[cryout_serious_slider_accent]',
126
+ $the_meta['cryout_serious_slider_accent'],
127
+ __('Accent Color','cryout-serious-slider'),
128
+ '',
129
+ 'short',
130
+ '',
131
+ 'data-default-color="'.$the_meta['cryout_serious_slider_accent'].'"',
132
+ '' // type workaround for "text" inputs clear
133
+ ); ?>
134
+ </div><!--appearance-->
135
+
136
+ <div id="animation">
137
+ <?php
138
+ echo $this->selectfield(
139
+ 'term_meta[cryout_serious_slider_animation]',
140
+ array(
141
+ 'fade' => __('Fade','cryout-serious-slider'),
142
+ 'slide' => __('Slide','cryout-serious-slider'),
143
+ 'overslide' => __('Overslide','cryout-serious-slider'),
144
+ 'underslide' => __('Underslide','cryout-serious-slider'),
145
+ 'parallax' => __('Parallax','cryout-serious-slider'),
146
+ 'hflip' => __('Horizontal Flip','cryout-serious-slider'),
147
+ 'vflip' => __('Vertical Flip','cryout-serious-slider'),
148
+ ),
149
+ $the_meta['cryout_serious_slider_animation'],
150
+ __('Transition Effect','cryout-serious-slider'),
151
+ '',
152
+ 'short'
153
+ );
154
+ echo $this->selectfield(
155
+ 'term_meta[cryout_serious_slider_hover]',
156
+ array( 'hover' => __('Enabled','cryout-serious-slider'), 'false' => __('Disabled','cryout-serious-slider') ),
157
+ $the_meta['cryout_serious_slider_hover'],
158
+ __('Transition Pause on Hover','cryout-serious-slider'),
159
+ '',
160
+ 'short'
161
+ );
162
+ echo $this->inputfield(
163
+ 'term_meta[cryout_serious_slider_delay]',
164
+ $the_meta['cryout_serious_slider_delay'],
165
+ __('Transition Delay','cryout-serious-slider'),
166
+ '',
167
+ 'short',
168
+ 'ms'
169
+ );
170
+ echo $this->inputfield(
171
+ 'term_meta[cryout_serious_slider_transition]',
172
+ $the_meta['cryout_serious_slider_transition'],
173
+ __('Transition Duration','cryout-serious-slider'),
174
+ '',
175
+ 'short',
176
+ 'ms'
177
+ );
178
+ echo $this->selectfield(
179
+ 'term_meta[cryout_serious_slider_captionanimation]',
180
+ array(
181
+ 'none' => __('None','cryout-serious-slider'),
182
+ 'fade' => __('Fade','cryout-serious-slider'),
183
+ 'slide' => __('Slide','cryout-serious-slider'),
184
+ 'blur' => __('Blur','cryout-serious-slider'),
185
+ 'zoomin' => __('Zoom In','cryout-serious-slider'),
186
+ 'zoomout' => __('Zoom Out','cryout-serious-slider'),
187
+ ),
188
+ $the_meta['cryout_serious_slider_captionanimation'],
189
+ __('Caption Text Animation','cryout-serious-slider'),
190
+ '',
191
+ 'short'
192
+ ); ?>
193
+ </div><!--animation-->
194
+
195
+ </div><!--#seriousslider-tabs-->
196
+ <br>
inc/widgets.php CHANGED
@@ -1,53 +1,53 @@
1
- <?php
2
-
3
- class Cryout_Serious_Slider_Widget extends WP_Widget {
4
-
5
- public $shortcode_tag = 'serious-slider';
6
-
7
- public function __construct() {
8
- $widget_ops = array('classname' => 'serious-slider-widget', 'description' => 'Insert a Serious Slider in a widget area' );
9
- $control_ops = array('width' => 350, 'height' => 350); // making widget window larger
10
- parent::__construct('cryout_serious_slider_widget', 'Serious Slider', $widget_ops, $control_ops);
11
- } // construct()
12
-
13
- public function ColumnsWidget() {
14
- self::__construct();
15
- } // PHP4 constructor
16
-
17
- function form($instance) {
18
-
19
- global $cryout_serious_slider;
20
-
21
- $instance = wp_parse_args( (array) $instance, array( 'sid' => '' ) );
22
- $sid = $instance['sid'];
23
- $sliders = $cryout_serious_slider->get_sliders();
24
- ?>
25
- <div>
26
- <p><label for="<?php echo $this->get_field_id('sid'); ?>"><?php _e('Displayed Slider', 'cryout-serious-slider') ?>:</label>
27
- <select class="widefat" id="<?php echo $this->get_field_id('sid'); ?>" name="<?php echo $this->get_field_name('sid'); ?>">
28
- <?php foreach ($sliders as $slider) { ?>
29
- <option value="<?php echo $slider['value'] ?>" <?php selected($slider['value'],$sid) ?>><?php echo $slider['text'] ?></option>
30
- <?php } ?>
31
- </select>
32
- </p>
33
- </div> <?php
34
- } // form()
35
-
36
- function update($new_instance, $old_instance) {
37
- $instance = $old_instance;
38
- $instance['sid'] = $new_instance['sid'];
39
- return $instance;
40
- } // update()
41
-
42
- function widget($args, $instance) {
43
- if(!empty($instance['sid'])) {
44
- $slider_id = $instance['sid'];
45
- echo $args['before_widget'];
46
- echo do_shortcode( '[' . $this->shortcode_tag . ' id=' . $slider_id. ']' );
47
- echo $args['after_widget'];
48
- };
49
- } // widget()
50
-
51
- } // class Cryout_Serious_Slider_Widget
52
-
53
  add_action( 'widgets_init', create_function('', 'return register_widget("Cryout_Serious_Slider_Widget");') );
1
+ <?php
2
+
3
+ class Cryout_Serious_Slider_Widget extends WP_Widget {
4
+
5
+ public $shortcode_tag = 'serious-slider';
6
+
7
+ public function __construct() {
8
+ $widget_ops = array('classname' => 'serious-slider-widget', 'description' => 'Insert a Serious Slider in a widget area' );
9
+ $control_ops = array('width' => 350, 'height' => 350); // making widget window larger
10
+ parent::__construct('cryout_serious_slider_widget', 'Serious Slider', $widget_ops, $control_ops);
11
+ } // construct()
12
+
13
+ public function ColumnsWidget() {
14
+ self::__construct();
15
+ } // PHP4 constructor
16
+
17
+ function form($instance) {
18
+
19
+ global $cryout_serious_slider;
20
+
21
+ $instance = wp_parse_args( (array) $instance, array( 'sid' => '' ) );
22
+ $sid = $instance['sid'];
23
+ $sliders = $cryout_serious_slider->get_sliders();
24
+ ?>
25
+ <div>
26
+ <p><label for="<?php echo $this->get_field_id('sid'); ?>"><?php _e('Displayed Slider', 'cryout-serious-slider') ?>:</label>
27
+ <select class="widefat" id="<?php echo $this->get_field_id('sid'); ?>" name="<?php echo $this->get_field_name('sid'); ?>">
28
+ <?php foreach ($sliders as $slider) { ?>
29
+ <option value="<?php echo $slider['value'] ?>" <?php selected($slider['value'],$sid) ?>><?php echo $slider['text'] ?></option>
30
+ <?php } ?>
31
+ </select>
32
+ </p>
33
+ </div> <?php
34
+ } // form()
35
+
36
+ function update($new_instance, $old_instance) {
37
+ $instance = $old_instance;
38
+ $instance['sid'] = $new_instance['sid'];
39
+ return $instance;
40
+ } // update()
41
+
42
+ function widget($args, $instance) {
43
+ if(!empty($instance['sid'])) {
44
+ $slider_id = $instance['sid'];
45
+ echo $args['before_widget'];
46
+ echo do_shortcode( '[' . $this->shortcode_tag . ' id=' . $slider_id. ']' );
47
+ echo $args['after_widget'];
48
+ };
49
+ } // widget()
50
+
51
+ } // class Cryout_Serious_Slider_Widget
52
+
53
  add_action( 'widgets_init', create_function('', 'return register_widget("Cryout_Serious_Slider_Widget");') );
languages/default.mo CHANGED
Binary file
languages/default.po CHANGED
@@ -1,401 +1,574 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Cryout Serious Slider\n"
4
- "POT-Creation-Date: 2016-05-06 14:26+0200\n"
5
- "PO-Revision-Date: 2016-05-06 14:27+0200\n"
6
- "Last-Translator: Cryout Creations\n"
7
- "Language-Team: Cryout Creations\n"
8
- "Language: en_US\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.5.5\n"
13
- "X-Poedit-KeywordsList: _e;_x;_n;__\n"
14
- "X-Poedit-Basepath: .\n"
15
- "X-Poedit-SearchPath-0: ..\n"
16
-
17
- #: ../cryout-serious-slider.php:53 ../cryout-serious-slider.php:88
18
- #: ../cryout-serious-slider.php:287
19
- msgid "Serious Slider"
20
- msgstr ""
21
-
22
- #: ../cryout-serious-slider.php:85
23
- msgid "Retrieving sliders..."
24
- msgstr ""
25
-
26
- #: ../cryout-serious-slider.php:86
27
- msgid "Error retrieving sliders"
28
- msgstr ""
29
-
30
- #: ../cryout-serious-slider.php:87
31
- msgid "Cryout Serious Slider"
32
- msgstr ""
33
-
34
- #: ../cryout-serious-slider.php:89
35
- msgid "Insert Slider"
36
- msgstr ""
37
-
38
- #: ../cryout-serious-slider.php:90
39
- msgid "Cancel"
40
- msgstr ""
41
-
42
- #: ../cryout-serious-slider.php:91
43
- msgid "Select Slider"
44
- msgstr ""
45
-
46
- #: ../cryout-serious-slider.php:92
47
- msgid "Add Slider"
48
- msgstr ""
49
-
50
- #: ../cryout-serious-slider.php:140
51
- msgid "About"
52
- msgstr ""
53
-
54
- #: ../cryout-serious-slider.php:151
55
- msgid "About Plugin"
56
- msgstr ""
57
-
58
- #: ../cryout-serious-slider.php:160
59
- msgid "Plugin homepage"
60
- msgstr ""
61
-
62
- #: ../cryout-serious-slider.php:161
63
- msgid "Support forum"
64
- msgstr ""
65
-
66
- #: ../cryout-serious-slider.php:162
67
- msgid "Changelog"
68
- msgstr ""
69
-
70
- #: ../cryout-serious-slider.php:255 ../cryout-serious-slider.php:328
71
- msgid "Define Sliders"
72
- msgstr ""
73
-
74
- #: ../cryout-serious-slider.php:272
75
- msgid "Description."
76
- msgstr ""
77
-
78
- #: ../cryout-serious-slider.php:285
79
- msgid "Slides"
80
- msgstr ""
81
-
82
- #: ../cryout-serious-slider.php:286 ../cryout-serious-slider.php:288
83
- #: ../inc/taxmeta.php:70
84
- msgid "Slide"
85
- msgstr ""
86
-
87
- #: ../cryout-serious-slider.php:289 ../cryout-serious-slider.php:290
88
- msgid "Add New Slide"
89
- msgstr ""
90
-
91
- #: ../cryout-serious-slider.php:291
92
- msgid "New Slide"
93
- msgstr ""
94
-
95
- #: ../cryout-serious-slider.php:292
96
- msgid "Edit Slide"
97
- msgstr ""
98
-
99
- #: ../cryout-serious-slider.php:293
100
- msgid "View Slide"
101
- msgstr ""
102
-
103
- #: ../cryout-serious-slider.php:294
104
- msgid "All Slides"
105
- msgstr ""
106
-
107
- #: ../cryout-serious-slider.php:295
108
- msgid "Search Slide"
109
- msgstr ""
110
-
111
- #: ../cryout-serious-slider.php:296
112
- msgid "Parent Slides:"
113
- msgstr ""
114
-
115
- #: ../cryout-serious-slider.php:297
116
- msgid "No slides found."
117
- msgstr ""
118
-
119
- #: ../cryout-serious-slider.php:298
120
- msgid "No slides found in Trash."
121
- msgstr ""
122
-
123
- #: ../cryout-serious-slider.php:318
124
- msgid "Sliders"
125
- msgstr ""
126
-
127
- #: ../cryout-serious-slider.php:319 ../cryout-serious-slider.php:357
128
- msgid "Slider"
129
- msgstr ""
130
-
131
- #: ../cryout-serious-slider.php:320
132
- msgid "Search Sliders"
133
- msgstr ""
134
-
135
- #: ../cryout-serious-slider.php:321
136
- msgid "All Sliders"
137
- msgstr ""
138
-
139
- #: ../cryout-serious-slider.php:322
140
- msgid "Parent Slider"
141
- msgstr ""
142
-
143
- #: ../cryout-serious-slider.php:323
144
- msgid "Parent Slider:"
145
- msgstr ""
146
-
147
- #: ../cryout-serious-slider.php:324
148
- msgid "Edit Slider"
149
- msgstr ""
150
-
151
- #: ../cryout-serious-slider.php:325
152
- msgid "Update Slider"
153
- msgstr ""
154
-
155
- #: ../cryout-serious-slider.php:326
156
- msgid "Add New Slider"
157
- msgstr ""
158
-
159
- #: ../cryout-serious-slider.php:327
160
- msgid "New Slider"
161
- msgstr ""
162
-
163
- #: ../cryout-serious-slider.php:356
164
- msgid "Title"
165
- msgstr ""
166
-
167
- #: ../cryout-serious-slider.php:358
168
- msgid "Featured Image"
169
- msgstr ""
170
-
171
- #: ../cryout-serious-slider.php:359
172
- msgid "Date"
173
- msgstr ""
174
-
175
- #: ../cryout-serious-slider.php:360
176
- msgid "Order"
177
- msgstr ""
178
-
179
- #: ../cryout-serious-slider.php:377
180
- msgid "No featured image set."
181
- msgstr ""
182
-
183
- #: ../cryout-serious-slider.php:393
184
- msgid "Edit slider"
185
- msgstr ""
186
-
187
- #: ../cryout-serious-slider.php:402
188
- msgid "No Slider"
189
- msgstr ""
190
-
191
- #: ../cryout-serious-slider.php:443
192
- #, php-format
193
- msgid "All %s"
194
- msgstr ""
195
-
196
- #: ../cryout-serious-slider.php:480
197
- msgid "Slide Link"
198
- msgstr ""
199
-
200
- #: ../cryout-serious-slider.php:493
201
- msgid "Link URL"
202
- msgstr ""
203
-
204
- #: ../cryout-serious-slider.php:497
205
- msgid "Open In New Window"
206
- msgstr ""
207
-
208
- #: ../cryout-serious-slider.php:498
209
- msgid "Leave empty to disable link."
210
- msgstr ""
211
-
212
- #: ../inc/right-column.php:6
213
- msgid "Shortcode"
214
- msgstr ""
215
-
216
- #: ../inc/right-column.php:7
217
- msgid "Use the shortcode to include the slider in posts, pages or widgets"
218
- msgstr ""
219
-
220
- #: ../inc/right-column.php:10
221
- msgid "Template"
222
- msgstr ""
223
-
224
- #: ../inc/right-column.php:11
225
- msgid "Use the PHP code to include the slider directly in files"
226
- msgstr ""
227
-
228
- #: ../inc/settings.php:15
229
- msgid "Sample slider created."
230
- msgstr ""
231
-
232
- #: ../inc/settings.php:16
233
- msgid "Navigate to Slider and Slides sections to see the sample content."
234
- msgstr ""
235
-
236
- #: ../inc/settings.php:17
237
- msgid "Dismiss this notice."
238
- msgstr ""
239
-
240
- #: ../inc/settings.php:63
241
- #, php-format
242
- msgid "version: %s"
243
- msgstr ""
244
-
245
- #: ../inc/settings.php:64
246
- msgid "by"
247
- msgstr ""
248
-
249
- #: ../inc/settings.php:72
250
- msgid "Support"
251
- msgstr ""
252
-
253
- #: ../inc/settings.php:76
254
- msgid "For support questions please use"
255
- msgstr ""
256
-
257
- #: ../inc/settings.php:77
258
- msgid "our forum"
259
- msgstr ""
260
-
261
- #: ../inc/settings.php:86
262
- msgid ""
263
- "Automatically set up a sample slider with 3 slides to use as a guide for "
264
- "your own content."
265
- msgstr ""
266
-
267
- #: ../inc/settings.php:88
268
- msgid "Create Sample Slider"
269
- msgstr ""
270
-
271
- #: ../inc/shortcodes.php:119
272
- msgid "Previous"
273
- msgstr ""
274
-
275
- #: ../inc/shortcodes.php:123
276
- msgid "Next"
277
- msgstr ""
278
-
279
- #: ../inc/taxmeta.php:5
280
- msgid "by date"
281
- msgstr ""
282
-
283
- #: ../inc/taxmeta.php:5
284
- msgid "by order value"
285
- msgstr ""
286
-
287
- #: ../inc/taxmeta.php:7
288
- msgid "Sort Order"
289
- msgstr ""
290
-
291
- #: ../inc/taxmeta.php:13
292
- msgid "Adapt to images"
293
- msgstr ""
294
-
295
- #: ../inc/taxmeta.php:13
296
- msgid "Force constraints"
297
- msgstr ""
298
-
299
- #: ../inc/taxmeta.php:15
300
- msgid "Slider Size"
301
- msgstr ""
302
-
303
- #: ../inc/taxmeta.php:25
304
- msgid "Width"
305
- msgstr ""
306
-
307
- #: ../inc/taxmeta.php:33
308
- msgid "Height"
309
- msgstr ""
310
-
311
- #: ../inc/taxmeta.php:40
312
- msgid "Light"
313
- msgstr ""
314
-
315
- #: ../inc/taxmeta.php:41
316
- msgid "Dark"
317
- msgstr ""
318
-
319
- #: ../inc/taxmeta.php:42
320
- msgid "Blank"
321
- msgstr ""
322
-
323
- #: ../inc/taxmeta.php:43
324
- msgid "Bootstrap"
325
- msgstr ""
326
-
327
- #: ../inc/taxmeta.php:45
328
- msgid "Color Scheme"
329
- msgstr ""
330
-
331
- #: ../inc/taxmeta.php:52
332
- msgid "Base Font Size"
333
- msgstr ""
334
-
335
- #: ../inc/taxmeta.php:60
336
- msgid "Always hidden"
337
- msgstr ""
338
-
339
- #: ../inc/taxmeta.php:60
340
- msgid "Appear on hover"
341
- msgstr ""
342
-
343
- #: ../inc/taxmeta.php:60
344
- msgid "Always visible"
345
- msgstr ""
346
-
347
- #: ../inc/taxmeta.php:62
348
- msgid "Bullets and Navigation"
349
- msgstr ""
350
-
351
- #: ../inc/taxmeta.php:69
352
- msgid "Fade"
353
- msgstr ""
354
-
355
- #: ../inc/taxmeta.php:71
356
- msgid "Overslide"
357
- msgstr ""
358
-
359
- #: ../inc/taxmeta.php:72
360
- msgid "Underslide"
361
- msgstr ""
362
-
363
- #: ../inc/taxmeta.php:73
364
- msgid "Parallax"
365
- msgstr ""
366
-
367
- #: ../inc/taxmeta.php:74
368
- msgid "Horizontal Flip"
369
- msgstr ""
370
-
371
- #: ../inc/taxmeta.php:75
372
- msgid "Vertical Flip"
373
- msgstr ""
374
-
375
- #: ../inc/taxmeta.php:78
376
- msgid "Transition Effect"
377
- msgstr ""
378
-
379
- #: ../inc/taxmeta.php:84
380
- msgid "Enabled"
381
- msgstr ""
382
-
383
- #: ../inc/taxmeta.php:84
384
- msgid "Disabled"
385
- msgstr ""
386
-
387
- #: ../inc/taxmeta.php:86
388
- msgid "Transition Pause on Hover"
389
- msgstr ""
390
-
391
- #: ../inc/taxmeta.php:94
392
- msgid "Transition Delay"
393
- msgstr ""
394
-
395
- #: ../inc/taxmeta.php:102
396
- msgid "Transition Duration"
397
- msgstr ""
398
-
399
- #: ../inc/widgets.php:26
400
- msgid "Displayed Slider"
401
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Cryout Serious Slider\n"
4
+ "POT-Creation-Date: 2017-10-26 12:19+0200\n"
5
+ "PO-Revision-Date: 2017-10-26 12:20+0200\n"
6
+ "Last-Translator: Cryout Creations\n"
7
+ "Language-Team: Cryout Creations\n"
8
+ "Language: en_US\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.5\n"
13
+ "X-Poedit-KeywordsList: _e;_x;_n;__\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SearchPath-0: ..\n"
16
+
17
+ #: ../cryout-serious-slider.php:118 ../cryout-serious-slider.php:157
18
+ #: ../cryout-serious-slider.php:439
19
+ msgid "Serious Slider"
20
+ msgstr ""
21
+
22
+ #: ../cryout-serious-slider.php:154
23
+ msgid "Retrieving sliders..."
24
+ msgstr ""
25
+
26
+ #: ../cryout-serious-slider.php:155
27
+ msgid "Error retrieving sliders"
28
+ msgstr ""
29
+
30
+ #: ../cryout-serious-slider.php:156
31
+ msgid "Cryout Serious Slider"
32
+ msgstr ""
33
+
34
+ #: ../cryout-serious-slider.php:158
35
+ msgid "Insert Slider"
36
+ msgstr ""
37
+
38
+ #: ../cryout-serious-slider.php:159
39
+ msgid "Cancel"
40
+ msgstr ""
41
+
42
+ #: ../cryout-serious-slider.php:160
43
+ msgid "Select Slider"
44
+ msgstr ""
45
+
46
+ #: ../cryout-serious-slider.php:161 ../cryout-serious-slider.php:774
47
+ msgid "Add Slider"
48
+ msgstr ""
49
+
50
+ #: ../cryout-serious-slider.php:214
51
+ msgid "About"
52
+ msgstr ""
53
+
54
+ #: ../cryout-serious-slider.php:226
55
+ msgid "About Plugin"
56
+ msgstr ""
57
+
58
+ #: ../cryout-serious-slider.php:235
59
+ msgid "Plugin homepage"
60
+ msgstr ""
61
+
62
+ #: ../cryout-serious-slider.php:236
63
+ msgid "Support forum"
64
+ msgstr ""
65
+
66
+ #: ../cryout-serious-slider.php:237
67
+ msgid "Changelog"
68
+ msgstr ""
69
+
70
+ #: ../cryout-serious-slider.php:273
71
+ msgid "No sliders available. Create a slider first..."
72
+ msgstr ""
73
+
74
+ #: ../cryout-serious-slider.php:314
75
+ msgid "Select slider"
76
+ msgstr ""
77
+
78
+ #: ../cryout-serious-slider.php:321 ../cryout-serious-slider.php:480
79
+ msgid "Manage Sliders"
80
+ msgstr ""
81
+
82
+ #: ../cryout-serious-slider.php:330 ../cryout-serious-slider.php:373
83
+ msgid "Sorry, you are not allowed to edit this item."
84
+ msgstr ""
85
+
86
+ #: ../cryout-serious-slider.php:346 ../cryout-serious-slider.php:562
87
+ #, php-format
88
+ msgid "Change image for \"%s\""
89
+ msgstr ""
90
+
91
+ #: ../cryout-serious-slider.php:348
92
+ msgid "Change Image"
93
+ msgstr ""
94
+
95
+ #: ../cryout-serious-slider.php:355 ../cryout-serious-slider.php:571
96
+ #, php-format
97
+ msgid "Remove image from \"%s\""
98
+ msgstr ""
99
+
100
+ #: ../cryout-serious-slider.php:356
101
+ msgid "Remove Image"
102
+ msgstr ""
103
+
104
+ #: ../cryout-serious-slider.php:387 ../cryout-serious-slider.php:586
105
+ #, php-format
106
+ msgid "Set image for \"%s\""
107
+ msgstr ""
108
+
109
+ #: ../cryout-serious-slider.php:388 ../cryout-serious-slider.php:587
110
+ msgid "Set Image"
111
+ msgstr ""
112
+
113
+ #: ../cryout-serious-slider.php:389 ../cryout-serious-slider.php:544
114
+ #: ../cryout-serious-slider.php:588 ../inc/taxmeta.php:115
115
+ #: ../inc/taxmeta.php:181
116
+ msgid "None"
117
+ msgstr ""
118
+
119
+ #: ../cryout-serious-slider.php:424
120
+ msgid "Description."
121
+ msgstr ""
122
+
123
+ #: ../cryout-serious-slider.php:437
124
+ msgid "Slides"
125
+ msgstr ""
126
+
127
+ #: ../cryout-serious-slider.php:438 ../inc/taxmeta.php:142
128
+ #: ../inc/taxmeta.php:183
129
+ msgid "Slide"
130
+ msgstr ""
131
+
132
+ #: ../cryout-serious-slider.php:440
133
+ msgid "Serious Slide"
134
+ msgstr ""
135
+
136
+ #: ../cryout-serious-slider.php:441 ../cryout-serious-slider.php:442
137
+ msgid "Add New Slide"
138
+ msgstr ""
139
+
140
+ #: ../cryout-serious-slider.php:443
141
+ msgid "New Slide"
142
+ msgstr ""
143
+
144
+ #: ../cryout-serious-slider.php:444
145
+ msgid "Edit Slide"
146
+ msgstr ""
147
+
148
+ #: ../cryout-serious-slider.php:445
149
+ msgid "View Slide"
150
+ msgstr ""
151
+
152
+ #: ../cryout-serious-slider.php:446
153
+ msgid "All Slides"
154
+ msgstr ""
155
+
156
+ #: ../cryout-serious-slider.php:447
157
+ msgid "Search Slide"
158
+ msgstr ""
159
+
160
+ #: ../cryout-serious-slider.php:448
161
+ msgid "Parent Slides:"
162
+ msgstr ""
163
+
164
+ #: ../cryout-serious-slider.php:449
165
+ #, php-format
166
+ msgid ""
167
+ "No slides found. Go ahead and add <a href=\"%1$s\">add some</a> or <a href="
168
+ "\"%2$s\">load sample content</a>."
169
+ msgstr ""
170
+
171
+ #: ../cryout-serious-slider.php:450
172
+ msgid "No slides found in Trash."
173
+ msgstr ""
174
+
175
+ #: ../cryout-serious-slider.php:470
176
+ msgid "Sliders"
177
+ msgstr ""
178
+
179
+ #: ../cryout-serious-slider.php:471 ../cryout-serious-slider.php:509
180
+ msgid "Slider"
181
+ msgstr ""
182
+
183
+ #: ../cryout-serious-slider.php:472
184
+ msgid "Search Sliders"
185
+ msgstr ""
186
+
187
+ #: ../cryout-serious-slider.php:473
188
+ msgid "All Sliders"
189
+ msgstr ""
190
+
191
+ #: ../cryout-serious-slider.php:474
192
+ msgid "Parent Slider"
193
+ msgstr ""
194
+
195
+ #: ../cryout-serious-slider.php:475
196
+ msgid "Parent Slider:"
197
+ msgstr ""
198
+
199
+ #: ../cryout-serious-slider.php:476
200
+ msgid "Edit Slider"
201
+ msgstr ""
202
+
203
+ #: ../cryout-serious-slider.php:477
204
+ msgid "Update Slider"
205
+ msgstr ""
206
+
207
+ #: ../cryout-serious-slider.php:478
208
+ msgid "Add New Slider"
209
+ msgstr ""
210
+
211
+ #: ../cryout-serious-slider.php:479
212
+ msgid "New Slider"
213
+ msgstr ""
214
+
215
+ #: ../cryout-serious-slider.php:481
216
+ msgid "No sliders found"
217
+ msgstr ""
218
+
219
+ #: ../cryout-serious-slider.php:508
220
+ msgid "Title"
221
+ msgstr ""
222
+
223
+ #: ../cryout-serious-slider.php:510
224
+ msgid "Slide Image"
225
+ msgstr ""
226
+
227
+ #: ../cryout-serious-slider.php:511
228
+ msgid "Date"
229
+ msgstr ""
230
+
231
+ #: ../cryout-serious-slider.php:512
232
+ msgid "Order"
233
+ msgstr ""
234
+
235
+ #: ../cryout-serious-slider.php:535
236
+ msgid "Edit slider"
237
+ msgstr ""
238
+
239
+ #: ../cryout-serious-slider.php:564
240
+ msgid "Change"
241
+ msgstr ""
242
+
243
+ #: ../cryout-serious-slider.php:572
244
+ msgid "Remove"
245
+ msgstr ""
246
+
247
+ #: ../cryout-serious-slider.php:615 ../inc/right-column.php:7
248
+ msgid "Shortcode"
249
+ msgstr ""
250
+
251
+ #: ../cryout-serious-slider.php:646
252
+ #, php-format
253
+ msgid "Select %s"
254
+ msgstr ""
255
+
256
+ #: ../cryout-serious-slider.php:669
257
+ msgid "Slide Properties"
258
+ msgstr ""
259
+
260
+ #: ../cryout-serious-slider.php:772
261
+ msgid "Insert Serious Slider into post"
262
+ msgstr ""
263
+
264
+ #: ../inc/meta.php:5
265
+ #, php-format
266
+ msgid "Button %s Label:"
267
+ msgstr ""
268
+
269
+ #: ../inc/meta.php:8
270
+ msgid "Link URL:"
271
+ msgstr ""
272
+
273
+ #: ../inc/meta.php:12 ../inc/meta.php:21
274
+ msgid "Open in New Window"
275
+ msgstr ""
276
+
277
+ #: ../inc/meta.php:17
278
+ msgid "Slide Image Link URL:"
279
+ msgstr ""
280
+
281
+ #: ../inc/meta.php:23
282
+ msgid "Leave fields empty to disable elements."
283
+ msgstr ""
284
+
285
+ #: ../inc/right-column.php:6
286
+ msgid "&laquo; Manage Slides &raquo;"
287
+ msgstr ""
288
+
289
+ #: ../inc/right-column.php:8
290
+ msgid "Use the shortcode to include the slider in posts, pages or widgets"
291
+ msgstr ""
292
+
293
+ #: ../inc/right-column.php:11
294
+ msgid "Template"
295
+ msgstr ""
296
+
297
+ #: ../inc/right-column.php:12
298
+ msgid "Use the PHP code to include the slider directly in files"
299
+ msgstr ""
300
+
301
+ #: ../inc/settings.php:14
302
+ msgid "Sample slider created."
303
+ msgstr ""
304
+
305
+ #: ../inc/settings.php:15
306
+ msgid "Navigate to Slider and Slides sections to see the sample content."
307
+ msgstr ""
308
+
309
+ #: ../inc/settings.php:16 ../inc/settings.php:21
310
+ msgid "Dismiss this notice."
311
+ msgstr ""
312
+
313
+ #: ../inc/settings.php:20
314
+ msgid "You do not have sufficient permissions to create sample content."
315
+ msgstr ""
316
+
317
+ #: ../inc/settings.php:68
318
+ #, php-format
319
+ msgid "version: %s"
320
+ msgstr ""
321
+
322
+ #: ../inc/settings.php:69
323
+ msgid "by"
324
+ msgstr ""
325
+
326
+ #: ../inc/settings.php:77
327
+ msgid "Support"
328
+ msgstr ""
329
+
330
+ #: ../inc/settings.php:80
331
+ msgid "Need help?"
332
+ msgstr ""
333
+
334
+ #: ../inc/settings.php:81
335
+ msgid "Priority Support"
336
+ msgstr ""
337
+
338
+ #: ../inc/settings.php:82
339
+ msgid "Support Forum"
340
+ msgstr ""
341
+
342
+ #: ../inc/settings.php:89
343
+ msgid "Demo Content"
344
+ msgstr ""
345
+
346
+ #: ../inc/settings.php:94
347
+ msgid "Create Sample Slider"
348
+ msgstr ""
349
+
350
+ #: ../inc/settings.php:96
351
+ msgid ""
352
+ "This will create a sample slider with 3 slides which you can use as a basis "
353
+ "for your own content."
354
+ msgstr ""
355
+
356
+ #: ../inc/shortcodes.php:313
357
+ msgid "Previous"
358
+ msgstr ""
359
+
360
+ #: ../inc/shortcodes.php:317
361
+ msgid "Next"
362
+ msgstr ""
363
+
364
+ #: ../inc/taxmeta.php:4
365
+ msgid "Select Images"
366
+ msgstr ""
367
+
368
+ #: ../inc/taxmeta.php:9
369
+ msgid "General"
370
+ msgstr ""
371
+
372
+ #: ../inc/taxmeta.php:10
373
+ msgid "Appearance"
374
+ msgstr ""
375
+
376
+ #: ../inc/taxmeta.php:11
377
+ msgid "Animation"
378
+ msgstr ""
379
+
380
+ #: ../inc/taxmeta.php:22
381
+ msgid "by date"
382
+ msgstr ""
383
+
384
+ #: ../inc/taxmeta.php:22
385
+ msgid "by order value"
386
+ msgstr ""
387
+
388
+ #: ../inc/taxmeta.php:24
389
+ msgid "Sort Order"
390
+ msgstr ""
391
+
392
+ #: ../inc/taxmeta.php:30
393
+ msgid "Adapt to images"
394
+ msgstr ""
395
+
396
+ #: ../inc/taxmeta.php:30
397
+ msgid "Force constraints"
398
+ msgstr ""
399
+
400
+ #: ../inc/taxmeta.php:32
401
+ msgid "Slider Size"
402
+ msgstr ""
403
+
404
+ #: ../inc/taxmeta.php:39
405
+ msgid "Width"
406
+ msgstr ""
407
+
408
+ #: ../inc/taxmeta.php:47
409
+ msgid "Height"
410
+ msgstr ""
411
+
412
+ #: ../inc/taxmeta.php:58
413
+ msgid "Light"
414
+ msgstr ""
415
+
416
+ #: ../inc/taxmeta.php:59
417
+ msgid "Light 2"
418
+ msgstr ""
419
+
420
+ #: ../inc/taxmeta.php:60
421
+ msgid "Dark"
422
+ msgstr ""
423
+
424
+ #: ../inc/taxmeta.php:61
425
+ msgid "Square"
426
+ msgstr ""
427
+
428
+ #: ../inc/taxmeta.php:62
429
+ msgid "Tall"
430
+ msgstr ""
431
+
432
+ #: ../inc/taxmeta.php:63
433
+ msgid "Caption Left"
434
+ msgstr ""
435
+
436
+ #: ../inc/taxmeta.php:64
437
+ msgid "Caption Bottom"
438
+ msgstr ""
439
+
440
+ #: ../inc/taxmeta.php:65
441
+ msgid "Cryout Theme"
442
+ msgstr ""
443
+
444
+ #: ../inc/taxmeta.php:68
445
+ msgid "Style"
446
+ msgstr ""
447
+
448
+ #: ../inc/taxmeta.php:74
449
+ msgid "Always hidden"
450
+ msgstr ""
451
+
452
+ #: ../inc/taxmeta.php:75
453
+ msgid "Appear on hover"
454
+ msgstr ""
455
+
456
+ #: ../inc/taxmeta.php:76
457
+ msgid "Always visible"
458
+ msgstr ""
459
+
460
+ #: ../inc/taxmeta.php:79
461
+ msgid "Bullets and Navigation"
462
+ msgstr ""
463
+
464
+ #: ../inc/taxmeta.php:86
465
+ msgid "Base Font Size"
466
+ msgstr ""
467
+
468
+ #: ../inc/taxmeta.php:95
469
+ msgid "Left"
470
+ msgstr ""
471
+
472
+ #: ../inc/taxmeta.php:96
473
+ msgid "Center"
474
+ msgstr ""
475
+
476
+ #: ../inc/taxmeta.php:97
477
+ msgid "Right"
478
+ msgstr ""
479
+
480
+ #: ../inc/taxmeta.php:98
481
+ msgid "Justify"
482
+ msgstr ""
483
+
484
+ #: ../inc/taxmeta.php:101
485
+ msgid "Caption Alignment"
486
+ msgstr ""
487
+
488
+ #: ../inc/taxmeta.php:108
489
+ msgid "Caption Width"
490
+ msgstr ""
491
+
492
+ #: ../inc/taxmeta.php:116
493
+ msgid "Text Shadow"
494
+ msgstr ""
495
+
496
+ #: ../inc/taxmeta.php:117
497
+ msgid "Background Color"
498
+ msgstr ""
499
+
500
+ #: ../inc/taxmeta.php:120
501
+ msgid "Text Style"
502
+ msgstr ""
503
+
504
+ #: ../inc/taxmeta.php:127
505
+ msgid "Accent Color"
506
+ msgstr ""
507
+
508
+ #: ../inc/taxmeta.php:141 ../inc/taxmeta.php:182
509
+ msgid "Fade"
510
+ msgstr ""
511
+
512
+ #: ../inc/taxmeta.php:143
513
+ msgid "Overslide"
514
+ msgstr ""
515
+
516
+ #: ../inc/taxmeta.php:144
517
+ msgid "Underslide"
518
+ msgstr ""
519
+
520
+ #: ../inc/taxmeta.php:145
521
+ msgid "Parallax"
522
+ msgstr ""
523
+
524
+ #: ../inc/taxmeta.php:146
525
+ msgid "Horizontal Flip"
526
+ msgstr ""
527
+
528
+ #: ../inc/taxmeta.php:147
529
+ msgid "Vertical Flip"
530
+ msgstr ""
531
+
532
+ #: ../inc/taxmeta.php:150
533
+ msgid "Transition Effect"
534
+ msgstr ""
535
+
536
+ #: ../inc/taxmeta.php:156
537
+ msgid "Enabled"
538
+ msgstr ""
539
+
540
+ #: ../inc/taxmeta.php:156
541
+ msgid "Disabled"
542
+ msgstr ""
543
+
544
+ #: ../inc/taxmeta.php:158
545
+ msgid "Transition Pause on Hover"
546
+ msgstr ""
547
+
548
+ #: ../inc/taxmeta.php:165
549
+ msgid "Transition Delay"
550
+ msgstr ""
551
+
552
+ #: ../inc/taxmeta.php:173
553
+ msgid "Transition Duration"
554
+ msgstr ""
555
+
556
+ #: ../inc/taxmeta.php:184
557
+ msgid "Blur"
558
+ msgstr ""
559
+
560
+ #: ../inc/taxmeta.php:185
561
+ msgid "Zoom In"
562
+ msgstr ""
563
+
564
+ #: ../inc/taxmeta.php:186
565
+ msgid "Zoom Out"
566
+ msgstr ""
567
+
568
+ #: ../inc/taxmeta.php:189
569
+ msgid "Caption Text Animation"
570
+ msgstr ""
571
+
572
+ #: ../inc/widgets.php:26
573
+ msgid "Displayed Slider"
574
+ msgstr ""
readme.txt CHANGED
@@ -1,97 +1,171 @@
1
- === Plugin Name ===
2
- Contributors: Cryout Creations
3
- Donate link: https://www.cryoutcreations.eu/donate/
4
- Tags: slider, carousel, shortcode, bootstrap, responsive, responsive slider
5
- Requires at least: 4.0
6
- Tested up to: 4.8.0
7
- Stable tag: 0.6.5
8
- Text Domain: cryout-serious-slider
9
- License: GPLv3
10
- License URI: http://www.gnu.org/licenses/gpl.html
11
-
12
- Responsive slider, built on Bootstrap Carousel, uses core WordPress functionality, easy to use. Seriously!
13
-
14
- == Description ==
15
-
16
- = Features: =
17
-
18
- * Unlimited sliders with unlimited slides
19
- * Seriously configurable
20
- * Fully responsive
21
- * Touch Swipe Navigation
22
- * Customization options for each individual slider
23
- * Slide attributes: image, caption title, caption text (with HTML support), target link
24
- * Easy to use - uses WordPress custom post types
25
- * Translation ready and compatible with translation plugins
26
- * Accessibility ready
27
- * Lightweight (uses CSS and iconfont only)
28
- * CSS transitions – fast and powerful hardware accelerated CSS3 3D transforms
29
- * HTML5 valid
30
- * Sample content
31
-
32
- == Installation ==
33
-
34
- = Automatic installation =
35
-
36
- 1. Navigate to Plugins in your dashboard and click the Add New button.
37
- 2. Type in "Cryout Serious Slider" in the search box on the right and press Enter, then click the Install button next to the plugin title.
38
- 3. After installation Activate the plugin, look for Serious Slider in the dashboard menu to set up a slider.
39
-
40
- = Manual installation =
41
-
42
- 1. Upload `cryout-serious-slider` folder to the `/wp-content/plugins/` directory
43
- 2. Activate the plugin through the 'Plugins' menu in WordPress
44
- 3. Navigate to Serious Slider in the dashboard menu to set up a slider.
45
-
46
- == Changelog ==
47
-
48
- = 0.6.5 =
49
- * Added 'shortcode' column in sliders list
50
- * Fixed animation hiccup on some versions of Safari
51
- * Fixed slider bullets alignment
52
- * Fixed unclosed label in widget HTML markup
53
- * Changed class initialization hook to 'setup_theme'
54
-
55
- = 0.6.4 =
56
- * Added check to hide caption titles and text when they are not defined
57
- * Fixed widget slider no longer displaying slider output buffering shortcode in 0.6.1
58
- * Improved styling to remove prev/next buttons border on some themes
59
-
60
- = 0.6.3 =
61
- * Fixed leftover debug output in 0.6.2
62
-
63
- = 0.6.2 =
64
- * Fixed slides links always opening in a new window
65
-
66
- = 0.6.1 =
67
- * Fixed extraneous slide/term fields being visible after double quick edit
68
- * Fixed version information not updated in about page
69
- * Fixed slide image not vertically center-aligned when image is narrower than screen
70
- * Improved slider captions responsiveness
71
- * Fixed slider being displayed at top of content due to improper outputting (also separated inline script and moved to footer enqueue)
72
- * Removed some log messages that would appear in the browser's console
73
- * Fixed overslide, underslide and parallax transitions functionality on 3D-enabled browsers
74
-
75
- = 0.6 =
76
- * Enabled quick-edit functionality on the sliders
77
- * Fixed slider query overlapping WordPress query in specific usage scenarios (thanks to webdragon)
78
- * Limited dashboard resource loading only to plugin's sections
79
- * Fixed multiple instances of the same slider missing styling after moving inline styling to footer in 0.5.1
80
- * Added extra taxonomy hook for support in Cryout themes
81
- * Fixed animation glitch on Fluida theme
82
-
83
- = 0.5.1 =
84
- * Moved inline styling to footer
85
- * Fixed responsive styling issue on about page
86
- * Added widget HTML wrapper for better compatibility with themes
87
- * Added get_sliders_list() function for custom theme integration
88
- * Improved 'No slides' message to link to slider management / sample slider loader.
89
- * Corrected slider selection label in slider metabox
90
- * Corrected insert slider window to display 'no slider available' message when there are no sliders
91
- * Fixed missing closing bracked in template code example
92
- * Fixed slider image tag to only be outputted when an image was defined
93
- * Improved contrained slider layout
94
- * Fixed missing insert slider icon in TinyMCE editor
95
-
96
- = 0.5 =
97
- * Initial release.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Serious Slider ===
2
+ Contributors: Cryout Creations
3
+ Donate link: https://www.cryoutcreations.eu/donate/
4
+ License: GPLv3
5
+ License URI: http://www.gnu.org/licenses/gpl.html
6
+ Tags: slider, slideshow, image slider, carousel, responsive slider, WordPress slider
7
+ Text Domain: cryout-serious-slider
8
+ Requires at least: 4.0
9
+ Tested up to: 4.9
10
+ Stable tag: 1.0.0
11
+
12
+ Serious Slider is a highly efficient SEO friendly fully translatable accessibility ready free image slider for WordPress. Seriously!
13
+
14
+ == Description ==
15
+
16
+ = Overview =
17
+
18
+ Serious Slider is a highly efficient SEO friendly fully translatable accessibility ready free image slider for WordPress. Create beautiful, responsive slideshows within seconds. Use minimum styling and JavaScript with hardware accelerated CSS3 transitions to create a really fluid experience.
19
+
20
+ > [Live Demo](http://demos.cryoutcreations.eu/wordpress/serious-slider/) | [Documentation](https://www.cryoutcreations.eu/wordpress-tutorials/create-slider-serious-slider-plugin) | [Features](https://www.cryoutcreations.eu/wordpress-plugins/cryout-serious-slider) | [Support](https://www.cryoutcreations.eu/forums/f/wordpress/plugins/serious-slider)
21
+
22
+ Serious Slider uses the very familiar WordPress dashboard interface for creating slides and sliders so there's absolutely no learning curve. You just select the media image and press "Create Slider". After that it's like adding or editing WordPress posts, using featured images and other meta information like buttons and URLs.
23
+ Serious Slider works with all WordPress themes and has been designed to integrate seamlessly with our own [selected themes](https://wordpress.org/themes/author/cryout-creations/ "Cryout Creations Wordpress Themes").
24
+
25
+ = Main Features =
26
+
27
+ * **Create unlimited sliders with unlimited slides.** The only limit is your imagination on how to use them.
28
+ * **Add titles, texts, buttons and links to each slide.** All slide texts support HTML tags and even other shortcodes.
29
+ * **Easy to use media button.** Effortlessly add slideshows in posts, pages or custom post types via the "Add Slider" media button in the WordPress text editor. Then just select your desired image slider from a dropdown list, no need to remember or copy slider IDs
30
+ * **Auto-generated Shortcodes and PHP integration.** Use the auto generated shortcode to include slideshows with themes or other plugins. Copy-paste the auto generated PHP code to integrate with custom code.
31
+ * **Serious Slider Widget.** Display slideshows in sidebars via the provided Serious Slider widget
32
+ * **Use multiple sliders in the same page.**
33
+ * **Familiar admin user interface.** Create sliders and slides with the familiarity of managing posts and categories, without having to learn another user interface
34
+ * **Lightweight and powerful.** Only minimum JavaScript and CSS3 are being loaded on your site
35
+ * **Fast slider creation.** Create awesome, responsive WordPress slideshows in a matter of seconds
36
+ * **Browser compatibility.** The image slider looks and behaves great on various devices and browsers
37
+ * **7+ Appearance Styles.** Choose from different appearance styles to make the navigation arrows, bullets, buttons and colors match your site.
38
+ * **7+ Transition Effects.** Fade, Slide, Overslide, Underslide, Parallax, Horizontal flip and Vertical Flip.
39
+ * **5+ Caption Text Animations.** Choose how caption text appears on the slide: Fade, Slide, Blur and Zoom In/Out.
40
+ * **Highly customizable.** Customize image sizes, timings, text size and alignment, text shadow, background color and accent color.
41
+ * **Individual options for each slider.** All the customization options and set individually for every slider.
42
+ * **Translation ready.** Every single line of text in the slider is translatable both in the front-end as well in the back-end. Compatible with multi-language plugins (WPML, qTranslate, PolyLang).
43
+ * **SEO friendly.** Built with search engines in mind, the slider uses correct HTML semantics.
44
+ * **Accessibility ready.**
45
+ * **Once click demo content.** It's that easy, you're one click away from a working image slider to get you started.
46
+
47
+ = Customization Features =
48
+
49
+ * Add individual URLs to target specific pages
50
+ * Add slide buttons with customizable link, link text and "open in new window" option
51
+ * Choose how to make text over images more visible: either add text shadow, multiline text background or full caption background
52
+ * Choose from 7 slider styles, 7 transition effects and 5 caption text animations
53
+ * Customize your slider's transition duration and delay
54
+ * Choose between auto-height and fixed size for your images
55
+ * Customize your slider's font size, text alignment, caption size and accent color
56
+
57
+ = Functionality Features =
58
+
59
+ * Our image slider uses WordPress core functionality only, providing you with the familiar WordPress interface for creating both slides and slides.
60
+ * Easily transfer existing slides from one slider to another
61
+ * Schedule slides to automatically become visible at any time in the future.
62
+ * Quickly restore deleted slides from the Trash
63
+ * Use WordPress' text editor to add HTML content and even shortcodes to your slides
64
+ * Bulk edit slides and slides
65
+
66
+
67
+ == Installation ==
68
+
69
+ = Automatic installation =
70
+
71
+ 1. Navigate to Plugins in your dashboard and click the Add New button.
72
+ 2. Type in "Cryout Serious Slider" in the search box on the right and press Enter, then click the Install button next to the plugin title.
73
+ 3. After installation Activate the plugin, look for Serious Slider in the dashboard menu to set up a slider.
74
+
75
+ = Manual installation =
76
+
77
+ 1. Upload `cryout-serious-slider` folder to the `/wp-content/plugins/` directory
78
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
79
+ 3. Navigate to Serious Slider in the dashboard menu to set up a slider.
80
+
81
+ = Creating the first slider =
82
+
83
+ * Create a sample slider using the plugin's demo content functionality, or
84
+ * Follow our [slider set-up tutorial](https://www.cryoutcreations.eu/wordpress-tutorials/create-slider-serious-slider-plugin)
85
+
86
+
87
+ == Screenshots ==
88
+
89
+ 1. Serious Slider default (Light) style
90
+ 2. Serious Slider Dark style with caption text background
91
+ 3. Serious Slider Caption Left style
92
+ 4. Dashboard - create new slider
93
+ 5. Dashboard - manage slides overview
94
+ 6. Dashboard - slider integration
95
+
96
+
97
+ == Upgrade Notice ==
98
+
99
+ Serious Slider version 1.0.0 brings a lot of new features but removes styling of inside caption links and replaces it with with separate slide buttons. Make sure you review your slides setup after updating.
100
+
101
+
102
+ == Changelog ==
103
+
104
+ = 1.0.0 =
105
+ * Added 4 new design styles (Square, Tall, Caption Left & Caption Bottom)
106
+ * Totally revamped design of existing styles (Light, Dark, Bootstrap & Cryout)
107
+ * Added slider buttons with up to 2 buttons per slide (with customizable label and link); removed in-caption links styling
108
+ * Added caption alignment and caption max-width options
109
+ * Added caption text styling option
110
+ * Added accent color option
111
+ * Added caption animation option with 4 effects
112
+ * Added quick image management (add/change/remove) in the slides list section
113
+ * Added 'orderby', 'hidecaption', 'hidetitle' slider shortcode parameters
114
+ * Updated caption markup for compatibility with our Kahuna and Anima themes built-in styling
115
+ * Several minor tweaks:
116
+ - link to slides management in the slider section, added 'Insert Slider' button next to 'Insert Media';
117
+ - moved toolbar button to secondary TinyMCE Editor row;
118
+ - updated plugin info and links;
119
+ - new banner and icon images;
120
+ - added missing 'no sliders' message;
121
+
122
+ = 0.6.5 =
123
+ * Added 'shortcode' column in sliders list
124
+ * Fixed animation hiccup on some versions of Safari
125
+ * Fixed slider bullets alignment
126
+ * Fixed unclosed label in widget HTML markup
127
+ * Changed class initialization hook to 'setup_theme'
128
+
129
+ = 0.6.4 =
130
+ * Added check to hide caption titles and text when they are not defined
131
+ * Fixed widget slider no longer displaying slider output buffering shortcode in 0.6.1
132
+ * Improved styling to remove prev/next buttons border on some themes
133
+
134
+ = 0.6.3 =
135
+ * Fixed leftover debug output in 0.6.2
136
+
137
+ = 0.6.2 =
138
+ * Fixed slides links always opening in a new window
139
+
140
+ = 0.6.1 =
141
+ * Fixed extraneous slide/term fields being visible after double quick edit
142
+ * Fixed version information not updated in about page
143
+ * Fixed slide image not vertically center-aligned when image is narrower than screen
144
+ * Improved slider captions responsiveness
145
+ * Fixed slider being displayed at top of content due to improper outputting (also separated inline script and moved to footer enqueue)
146
+ * Removed some log messages that would appear in the browser's console
147
+ * Fixed overslide, underslide and parallax transitions functionality on 3D-enabled browsers
148
+
149
+ = 0.6 =
150
+ * Enabled quick-edit functionality on the sliders
151
+ * Fixed slider query overlapping WordPress query in specific usage scenarios (thanks to webdragon)
152
+ * Limited dashboard resource loading only to plugin's sections
153
+ * Fixed multiple instances of the same slider missing styling after moving inline styling to footer in 0.5.1
154
+ * Added extra taxonomy hook for support in Cryout themes
155
+ * Fixed animation glitch on Fluida theme
156
+
157
+ = 0.5.1 =
158
+ * Moved inline styling to footer
159
+ * Fixed responsive styling issue on about page
160
+ * Added widget HTML wrapper for better compatibility with themes
161
+ * Added get_sliders_list() function for custom theme integration
162
+ * Improved 'No slides' message to link to slider management / sample slider loader.
163
+ * Corrected slider selection label in slider metabox
164
+ * Corrected insert slider window to display 'no slider available' message when there are no sliders
165
+ * Fixed missing closing bracked in template code example
166
+ * Fixed slider image tag to only be outputted when an image was defined
167
+ * Improved contrained slider layout
168
+ * Fixed missing insert slider icon in TinyMCE editor
169
+
170
+ = 0.5 =
171
+ * Initial release.
resources/backend.css CHANGED
@@ -1,130 +1,322 @@
1
- /* Cryout Serious Slider About page */
2
- #serious-slider-about,
3
- #serious-slider-about p,
4
- #serious-slider-about ul {
5
- font-size: 1.1em;
6
- line-height: 1.7;
7
- }
8
-
9
- #serious-slider-about ul {
10
- line-height: 1.3;
11
- list-style: inside disc;
12
- }
13
-
14
-
15
- #serious-slider-about input[type='text'],
16
- #serious-slider-about textarea,
17
- #serious-slider-about select {
18
- min-width: 200px;
19
- width: 80%;
20
- max-width: 600px;
21
- }
22
-
23
- #serious-slider-about input.short,
24
- #serious-slider-about select.short {
25
- width: 50px;
26
- }
27
-
28
- #serious-slider-about #post-body {
29
- margin-right: 0;
30
- max-width: 800px;
31
- }
32
-
33
- #serious-slider-about .postbox {
34
- padding: 3em;
35
- -webkit-box-sizing: border-box;
36
- -moz-box-sizing: border-box;
37
- box-sizing: border-box;
38
- }
39
-
40
- #serious-slider-about #serious-slider-header {
41
- }
42
-
43
- #serious-slider-about #serious-slider-description {
44
- margin-top: 3em;
45
- }
46
-
47
- /* Edit pages */
48
-
49
- #cryout_serious_slider_category,
50
- #menu_order {width: 10%;}
51
-
52
- .form-wrap, #edittag {
53
- background: #FFF;
54
- border: 1px solid #e5e5e5;
55
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
56
- padding: 1em 2em;
57
- }
58
-
59
- #edittag {
60
- position: relative;
61
- }
62
-
63
- .form-wrap .form-table tr th, .form-wrap .form-table tr td,
64
- #edittag .form-table tr th, #edittag .form-table tr td {
65
- padding: 7px 10px;
66
- }
67
-
68
- .form-wrap .short, #edittag .short { min-width: 220px; width: auto; }
69
- .form-wrap input[type=number] { text-align: right; }
70
-
71
- @media (min-width: 780px) {
72
- #col-left, #col-right, #edittag { width: 50%; }
73
- }
74
-
75
- div.term-slug-wrap,
76
- div.term-parent-wrap,
77
- div.term-description-wrap,
78
- tr.term-slug-wrap,
79
- tr.term-parent-wrap,
80
- tr.term-description-wrap {
81
- display: none;
82
- }
83
-
84
- div.term-name-wrap p,
85
- tr.term-name-wrap p{
86
- display: none;
87
- }
88
-
89
- /* temporarily hide quick edit button on slides */
90
- /*div.row-actions .editinline { display: none; }
91
- div.row-actions .edit + .inline { display: none; } */
92
-
93
- #the-list ul.cat-checklist { max-height: 12em; height: auto; }
94
-
95
- .type-cryout_serious_slide .column-featured_image img { max-height: 120px; }
96
-
97
- #posts-filter table.wp-list-table th.column-description, #posts-filter table.wp-list-table th.column-slug,
98
- #posts-filter table.wp-list-table td.column-description, #posts-filter table.wp-list-table td.column-slug,
99
- select#filter-by-date {
100
- display: none;
101
- }
102
-
103
- /* Taxonomy shortcode box */
104
-
105
- #floater-right {
106
- display: block;
107
- width: 450px;
108
- position: absolute;
109
- top: 0;
110
- left: 100%;
111
- }
112
- #floater-right textarea, #floater-right input[type="text"] {
113
- width: 100%;
114
- border: 0;
115
- padding: 10px;
116
- box-shadow: none;
117
- font-weight: bold;
118
- }
119
-
120
- @media (max-width: 960px) {
121
- #floater-right { width: 40%; }
122
- }
123
-
124
- @media (max-width: 780px) {
125
- #floater-right {
126
- width: 98%;
127
- position: static; }
128
- }
129
-
130
- /* FIN */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Cryout Serious Slider Styling
3
+ **/
4
+
5
+ /* About page */
6
+ #serious-slider-about,
7
+ #serious-slider-about p,
8
+ #serious-slider-about ul {
9
+ font-size: 1.1em;
10
+ line-height: 1.7;
11
+ }
12
+
13
+ #serious-slider-about small {
14
+ display: block;
15
+ font-size: 12px;
16
+ line-height: 1.5;
17
+ margin-top: 1em;
18
+ }
19
+
20
+ #serious-slider-about ul {
21
+ line-height: 1.3;
22
+ list-style: inside disc;
23
+ }
24
+
25
+ #serious-slider-about #post-body {
26
+ margin-right: 0;
27
+ max-width: 900px;
28
+ }
29
+
30
+ #serious-slider-about .postbox {
31
+ padding: 3em;
32
+ -webkit-box-sizing: border-box;
33
+ -moz-box-sizing: border-box;
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ #serious-slider-about #serious-slider-header {
38
+ }
39
+
40
+ #serious-slider-about #serious-slider-header > img {
41
+ max-width: 100%;
42
+ }
43
+
44
+ #serious-slider-logo {
45
+ display: block;
46
+ float: none;
47
+ max-width: 100px;
48
+ margin: 0 auto 20px;
49
+ }
50
+
51
+ #serious-slider-about .hndle {
52
+ cursor: default;
53
+ }
54
+
55
+ #serious-slider-about #serious-slider-description {
56
+ margin-top: 3em;
57
+ }
58
+
59
+ #serious-slider-about .button {
60
+ display: block;
61
+ margin: 1em auto 0;
62
+ padding: 5px;
63
+ height: auto;
64
+ }
65
+
66
+ /* Taxonomy pages */
67
+ #cryout_serious_slider_category,
68
+ #menu_order {width: 10%;}
69
+
70
+ .form-wrap,
71
+ #edittag {
72
+ background: #FFF;
73
+ border: 1px solid #e5e5e5;
74
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
75
+ padding: 2.5em;
76
+ }
77
+
78
+ #edittag {
79
+ position: relative;
80
+ }
81
+
82
+ .form-wrap .form-table tr th, .form-wrap .form-table tr td,
83
+ #edittag .form-table tr th, #edittag .form-table tr td {
84
+ padding: 8px 10px;
85
+ }
86
+
87
+ .term-name-wrap {
88
+ overflow: auto;
89
+ padding: 2em 0;
90
+ }
91
+
92
+ .term-name-wrap label {
93
+ display: block;
94
+ padding: 10px 2em;
95
+ height: auto;
96
+ }
97
+
98
+ #addtag .term-name-wrap label {
99
+ display: none;
100
+ }
101
+
102
+ .term-name-wrap input {
103
+ display: inline-block;
104
+ float: left;
105
+ width: 100%;
106
+ padding: 10px;
107
+ }
108
+
109
+ .edit-tag-actions .button-primary,
110
+ .form-wrap .submit .button-primary {
111
+ height: auto;
112
+ margin-top: 2em;
113
+ padding: .5em 2em;
114
+ float: right;
115
+ }
116
+
117
+ .edit-tag-actions #delete-link {
118
+ display: none;
119
+ }
120
+
121
+ .form-wrap .submit {
122
+ overflow: hidden;
123
+ }
124
+
125
+ .seriousslider-media {
126
+ position: relative;
127
+ display: block;
128
+ width: 100%;
129
+ min-height: 120px;
130
+ height: auto;
131
+ margin: 40px auto;
132
+ border: 1px dashed #CCC;
133
+ text-align: center;
134
+ overflow: hidden;
135
+ }
136
+
137
+ #edittag .seriousslider-media {
138
+ display: none;
139
+ }
140
+
141
+ .seriousslider-media-container {
142
+ display: block;
143
+ width: 100%;
144
+ overflow: hidden;
145
+ }
146
+
147
+ .seriousslider-media-container > img {
148
+ width: 150px;
149
+ height: auto;
150
+ display: inline-block;
151
+ float: left;
152
+ }
153
+
154
+ .seriousslider-single-thumb {
155
+ float: left;
156
+ height: 80px;
157
+ margin: 2px;
158
+ overflow: hidden;
159
+ position: relative;
160
+ text-align: center;
161
+ width: 80px;
162
+ background: #eee;
163
+ }
164
+
165
+
166
+ .seriousslider-single-thumb img {
167
+ left: 50%;
168
+ top: 50%;
169
+ position: absolute;
170
+ transform: translateX(-50%) translateY(-50%);
171
+ }
172
+
173
+
174
+ #seriousslider-media {
175
+ position: absolute;
176
+ top: 50%;
177
+ left: 50%;
178
+ -webkit-transform: translateY(-50%) translateX(-50%);
179
+ transform: translateY(-50%) translateX(-50%);
180
+ z-index: 9;
181
+ display: inline-block;
182
+ height: auto;
183
+ text-decoration: none;
184
+ border: 2px solid #DDD;
185
+ min-width: 130px;
186
+ padding: 0.5em 1em;
187
+ }
188
+
189
+ .ui-tabs { position: relative; padding: .2em; zoom: 1; width: 100%; margin-top: 3em; }
190
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em 1em 0; }
191
+ .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 2px; margin: 0 1em 1px 0; border-bottom: 0 !important; font-weight: bold; padding: 6px 15px; white-space: nowrap; transition: .2s ease-out all; border: 1px solid transparent; border-bottom: none; }
192
+ .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
193
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
194
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active { background: #FFF; border-color: #DDD; color: #555; }
195
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active a { color: #555; }
196
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
197
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; outline: none; border: none; box-shadow: none; }
198
+ .ui-tabs .ui-tabs-panel { display: block; clear: both; border-width: 0; padding: 2em 2.5em; background: none; background: #FFF; border-top: 1px solid #ddd; }
199
+ .ui-tabs .ui-tabs-hide { display: none !important; }
200
+
201
+ .seriousslider-option {
202
+ padding: 8px 0;
203
+ }
204
+
205
+ .seriousslider-option > span {
206
+ display: inline-block;
207
+ float: left;
208
+ min-width: 220px;
209
+ padding: 10px 0;
210
+ font-size: 14px;
211
+ }
212
+
213
+ .form-wrap .short,
214
+ #edittag .short {
215
+ min-width: 200px;
216
+ width: auto;
217
+ }
218
+
219
+ .form-wrap input[type=number] {
220
+ /*text-align: right;*/
221
+ }
222
+
223
+
224
+ div.term-slug-wrap,
225
+ div.term-parent-wrap,
226
+ div.term-description-wrap,
227
+ tr.term-slug-wrap,
228
+ tr.term-parent-wrap,
229
+ tr.term-description-wrap {
230
+ display: none;
231
+ }
232
+
233
+ div.term-name-wrap p,
234
+ tr.term-name-wrap p{
235
+ display: none;
236
+ }
237
+
238
+ #the-list ul.cat-checklist { max-height: 12em; height: auto; }
239
+
240
+ .type-cryout_serious_slide .column-featured_image img { max-height: 120px; }
241
+
242
+ #posts-filter table.wp-list-table th.column-description, #posts-filter table.wp-list-table th.column-slug,
243
+ #posts-filter table.wp-list-table td.column-description, #posts-filter table.wp-list-table td.column-slug,
244
+ select#filter-by-date {
245
+ display: none;
246
+ }
247
+
248
+ #seriousslider-tabs input[name*='cryout'],
249
+ #seriousslider-tabs select[name*='cryout'],
250
+ #seriousslider-tabs textarea[name*='cryout'] {
251
+ background-color: #fff;
252
+ height: auto;
253
+ padding: 10px 5px;
254
+ border: 1px solid #ddd;
255
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
256
+ color: #32373c;
257
+ outline: 0 none;
258
+ transition: border-color 50ms ease-in-out 0s;
259
+ }
260
+
261
+ #seriousslider-tabs input[name*='cryout']:focus,
262
+ #seriousslider-tabs select[name*='cryout']:focus,
263
+ #seriousslider-tabs textarea[name*='cryout']:focus {
264
+ border-color: #5b9dd9;
265
+ box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
266
+ }
267
+
268
+ /* Taxonomy shortcode box */
269
+ #floater-right {
270
+ display: block;
271
+ width: 450px;
272
+ position: absolute;
273
+ top: -1px;
274
+ left: 100%;
275
+ }
276
+
277
+ #floater-right textarea,
278
+ #floater-right input[type="text"] {
279
+ width: 100%;
280
+ border: 0;
281
+ padding: 1.5em 1em;
282
+ box-shadow: none;
283
+ font-weight: bold;
284
+ background: #FFF;
285
+ border: 2px solid #DDD;
286
+ }
287
+
288
+ @media (min-width: 780px) {
289
+ #col-left, #col-right, #edittag { width: 50%; }
290
+ }
291
+
292
+ @media (max-width: 960px) {
293
+ #floater-right { width: 40%; }
294
+ }
295
+
296
+ @media (max-width: 780px) {
297
+ #floater-right {
298
+ width: 98%;
299
+ position: static; }
300
+ }
301
+
302
+ #cryout-manage-slides {
303
+ display: block;
304
+ margin-bottom: 2em;
305
+ padding: 1em;
306
+ border: 2px solid;
307
+ background: #0073aa;
308
+ color: #FFF;
309
+ font-weight: bold;
310
+ text-decoration: none;
311
+ text-align: center;
312
+ box-sizing: border-box;
313
+ -webkit-transition: .2s ease all;
314
+ transition: .2s ease all;
315
+ }
316
+
317
+ #cryout-manage-slides:hover {
318
+ opacity: 0.9;
319
+ }
320
+
321
+
322
+ /* FIN */
resources/backend.js CHANGED
@@ -1,9 +1,147 @@
1
-
2
- jQuery(document).ready( function() {
3
- jQuery('div.row-actions a.editinline').on('click', function( event ) {
4
- setTimeout( function() {
5
- jQuery('#the-list').find('input[name="post_name"]').parents('label').hide();
6
- jQuery('#the-list').find('input[name="post_password"]').parents('label').parent().hide();
7
- }, 3);
8
- });
9
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ jQuery(document).ready( function() {
3
+ jQuery('#the-list').on('click', 'div.row-actions a.editinline', function( event ) {
4
+ setTimeout( function() {
5
+ jQuery('#the-list').find('input[name="post_name"]').parents('label').hide();
6
+ jQuery('#the-list').find('input[name="post_password"]').parents('label').parent().hide();
7
+ }, 3);
8
+ });
9
+ if (jQuery.isFunction(jQuery.fn.wpColorPicker)) {
10
+ jQuery('input[name*="cryout_serious_slider_accent"]').wpColorPicker();
11
+ }
12
+
13
+ /*
14
+ * bind the media uploader at current and future ( 'live()' ) image upload buttons
15
+ * single image selection
16
+ */
17
+ jQuery( document ).on( 'click', '.sslide_set_link', function( e ) {
18
+
19
+ e.preventDefault();
20
+
21
+ // get number of post
22
+ var post_id = this.id.match( /[0-9]+/ );
23
+
24
+ // get parent jQ object of clicked link
25
+ var origin_parent = jQuery( this ).parent();
26
+
27
+ // Extend the wp.media object for selection of a single image
28
+ var text_link = jQuery( this ).text();
29
+ var custom_uploader = wp.media.frames.file_frame = wp.media( {
30
+ title: text_link,
31
+ library: {
32
+ type: 'image'
33
+ },
34
+ button: {
35
+ text: text_link
36
+ },
37
+ multiple: false
38
+ } );
39
+
40
+ // When a file is selected, grab the URL and set it as the text field's value
41
+ custom_uploader.on( 'select', function() {
42
+ // get selected image
43
+ var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
44
+
45
+ // set image as featured for current post via Ajax and print response
46
+ jQuery.post( ajaxurl, {
47
+ action: 'cryout_serious_slider_set_image',
48
+ post_id: post_id,
49
+ thumbnail_id: attachment.id,
50
+ cryout_sslider_column_nonce: CRYOUT_MCE_LOCALIZED.nonce,
51
+ cookie: encodeURIComponent( document.cookie )
52
+ }, function( response ) {
53
+ // fade in new content
54
+ origin_parent.html( response ).hide().fadeIn();
55
+ });
56
+
57
+ } );
58
+
59
+ //Open the uploader dialog
60
+ custom_uploader.open();
61
+
62
+ // prevent following the link href
63
+ return false;
64
+
65
+ } );
66
+
67
+ /*
68
+ * remove featured image from post and
69
+ * display 'set image' link
70
+ */
71
+ jQuery( document ).on( 'click', '.sslide_delete_link', function( e ) {
72
+
73
+ e.preventDefault();
74
+
75
+ // get number of post
76
+ var post_id = this.id.match( /[0-9]+/ );
77
+
78
+ // get parent jQ object of clicked link
79
+ var origin_parent = jQuery( this ).parent();
80
+
81
+ // remove featured image
82
+ jQuery.post( ajaxurl, {
83
+ action: 'cryout_serious_slider_delete_image',
84
+ post_id: post_id,
85
+ cryout_sslider_column_nonce: CRYOUT_MCE_LOCALIZED.nonce,
86
+ cookie: encodeURIComponent( document.cookie )
87
+ }, function( response ) {
88
+ // fade in new content
89
+ origin_parent.html( response ).hide().fadeIn();
90
+ });
91
+
92
+ // prevent following the link href
93
+ return false;
94
+
95
+ } );
96
+
97
+ } );
98
+
99
+
100
+ jQuery(document).ready(function($){
101
+
102
+ jQuery('input#tag-name').attr('placeholder', jQuery( '.term-name-wrap > label' ).text() );
103
+
104
+ /* Tabs */
105
+ jQuery( function() {
106
+ jQuery( "#seriousslider-tabs" ).tabs();
107
+ } );
108
+
109
+ /* Image selector */
110
+ var custom_uploader;
111
+ $('#seriousslider-media').click(function(e) {
112
+ e.preventDefault();
113
+ //If the uploader object has already been created, reopen the dialog
114
+ if (custom_uploader) {
115
+ custom_uploader.open();
116
+ return;
117
+ }
118
+ //Extend the wp.media object
119
+ custom_uploader = wp.media.frames.file_frame = wp.media({
120
+ title: jQuery('#seriousslider-media').text(),
121
+ /* button: {
122
+ text: 'Choose Images'
123
+ }, */
124
+ library: {
125
+ type: [ 'image' ]
126
+ },
127
+ multiple: true
128
+ });
129
+ custom_uploader.on('select', function() {
130
+
131
+ $(".seriousslider-media-container").empty();
132
+ $(".cryout-serious-slider-imagelist").val('');
133
+
134
+ var selection = custom_uploader.state().get('selection');
135
+ var ids = [];
136
+ selection.map( function( attachment ) {
137
+ thumbnail_url = attachment.attributes.sizes.thumbnail.url;
138
+ attachment = attachment.toJSON();
139
+ $(".seriousslider-media-container").append("<div class='seriousslider-single-thumb'><img src=" +thumbnail_url+"></div>");
140
+ ids.push( attachment.id );
141
+ });
142
+ $(".cryout-serious-slider-imagelist").val( ids );
143
+ });
144
+ custom_uploader.open();
145
+ });
146
+
147
+ });
resources/fonts/serioussliderglyphs.svg CHANGED
@@ -1,22 +1,22 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="serioussliderglyphs" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
- <glyph unicode="&#xe051;" glyph-name="rewind" d="M768 768q17.667 0 30.167-12.5t12.5-30.167-12.667-30.333l-268.333-268.333 268.333-268.333q12.667-12.667 12.667-30.333t-12.5-30.167-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 12.333-12.333 30.333t12.333 30.333l298.667 298.667q12.333 12.333 30.333 12.333zM512 768q17.667 0 30.167-12.5t12.5-30.167-12.667-30.333l-268.333-268.333 268.333-268.333q12.667-12.667 12.667-30.333t-12.5-30.167-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 12.333-12.333 30.333t12.333 30.333l298.667 298.667q12.333 12.333 30.333 12.333z" />
11
- <glyph unicode="&#xe055;" glyph-name="fast-forward" d="M469.333 768q17.667 0 30-12.333l298.667-298.667q12.667-12.667 12.667-30.333t-12.667-30.333l-298.667-298.667q-12.333-12.333-30-12.333t-30.167 12.5-12.5 30.167q0 18 12.333 30.333l268.333 268.333-268.333 268.333q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167zM213.333 768q17.667 0 30-12.333l298.667-298.667q12.667-12.667 12.667-30.333t-12.667-30.333l-298.667-298.667q-12.333-12.333-30-12.333t-30.167 12.5-12.5 30.167q0 18 12.333 30.333l268.333 268.333-268.333 268.333q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167z" />
12
- <glyph unicode="&#xe900;" glyph-name="chevron-left2" d="M637.542 741.581c22.835-22.323 24.627-53.402 0-80.691l-191.846-200.090 191.846-200.090c24.627-27.29 22.835-58.419 0-80.589-22.784-22.323-61.286-20.89-82.688 0-21.402 20.787-230.502 240.384-230.502 240.384-11.418 11.11-17.152 25.702-17.152 40.294s5.734 29.184 17.152 40.397c0 0 209.101 219.494 230.502 240.384 21.402 20.941 59.904 22.323 82.688 0z" />
13
- <glyph unicode="&#xe901;" glyph-name="chevron-right2" d="M469.146 741.581c21.402-20.89 230.502-240.384 230.502-240.384 11.418-11.213 17.152-25.805 17.152-40.397s-5.734-29.184-17.152-40.294c0 0-209.101-219.597-230.502-240.384-21.402-20.89-59.904-22.323-82.688 0-22.835 22.221-24.627 53.299 0 80.589l191.846 200.090-191.846 200.090c-24.627 27.29-22.835 58.419 0 80.691 22.784 22.323 61.286 20.941 82.688 0z" />
14
- <glyph unicode="&#xe902;" glyph-name="chevron-small-left" d="M621.619 285.798c13.722-13.875 13.722-36.301 0-50.074-13.722-13.824-35.891-13.926-49.613 0l-196.096 200.090c-13.722 13.824-13.722 36.198 0 50.125l196.096 200.090c13.67 13.824 35.891 13.824 49.613 0 13.722-13.875 13.722-36.301 0-50.074l-160.819-175.155 160.819-175.002z" />
15
- <glyph unicode="&#xe903;" glyph-name="chevron-small-right" d="M563.2 460.8l-160.819 175.104c-13.722 13.824-13.722 36.198 0 50.074 13.722 13.824 35.891 13.824 49.613 0l196.096-200.090c13.722-13.875 13.722-36.301 0-50.125l-196.096-200.090c-13.67-13.926-35.891-13.824-49.613 0-13.722 13.773-13.722 36.198 0 50.074l160.819 175.053z" />
16
- <glyph unicode="&#xe904;" glyph-name="chevron-thin-left" d="M711.219 80.998c13.722-13.926 13.722-36.301 0-50.125s-35.891-13.875-49.613 0l-400.896 404.89c-13.722 13.824-13.722 36.198 0 50.125l400.896 404.89c13.722 13.824 35.891 13.824 49.613 0 13.722-13.875 13.722-36.301 0-50.125l-365.619-379.853 365.619-379.802z" />
17
- <glyph unicode="&#xe905;" glyph-name="chevron-thin-right" d="M678.4 460.8l-365.619 379.904c-13.722 13.824-13.722 36.198 0 50.125 13.722 13.824 35.891 13.824 49.613 0l400.896-404.89c13.722-13.875 13.722-36.301 0-50.125l-400.896-404.89c-13.722-13.875-35.891-13.824-49.613 0-13.722 13.773-13.722 36.198 0 50.125l365.619 379.75z" />
18
- <glyph unicode="&#xe906;" glyph-name="chevron-with-circle-left" d="M578.662 625.869c-10.035 10.086-26.368 10.086-36.352 0l-143.718-146.688c-10.035-10.189-10.035-26.624 0-36.71l143.718-146.637c9.984-10.189 26.317-10.138 36.352 0 10.035 10.086 10.035 26.522 0 36.71l-117.862 128.256 117.862 128.307c10.035 10.138 10.035 26.522 0 36.762zM512 952.32c-271.462 0-491.52-220.058-491.52-491.52 0-271.514 220.058-491.52 491.52-491.52s491.52 220.006 491.52 491.52c0 271.462-220.058 491.52-491.52 491.52zM512 33.075c-236.288 0-427.725 191.488-427.725 427.725s191.437 427.725 427.725 427.725c236.186 0 427.725-191.488 427.725-427.725s-191.539-427.725-427.725-427.725z" />
19
- <glyph unicode="&#xe907;" glyph-name="chevron-with-circle-right" d="M563.2 460.8l-117.862 128.307c-10.035 10.138-10.035 26.573 0 36.762 10.035 10.086 26.368 10.086 36.352 0l143.718-146.637c10.035-10.189 10.035-26.624 0-36.71l-143.718-146.637c-9.984-10.189-26.317-10.138-36.352 0-10.035 10.086-10.035 26.522 0 36.71l117.862 128.205zM512 952.32c271.462 0 491.52-220.058 491.52-491.52 0-271.514-220.058-491.52-491.52-491.52s-491.52 220.006-491.52 491.52c0 271.462 220.058 491.52 491.52 491.52zM512 33.075c236.186 0 427.725 191.488 427.725 427.725s-191.539 427.725-427.725 427.725c-236.288 0-427.725-191.488-427.725-427.725-0.051-236.237 191.437-427.725 427.725-427.725z" />
20
- <glyph unicode="&#xf053;" glyph-name="chevron-left" horiz-adv-x="768" d="M669.143 778.857l-303.429-303.429 303.429-303.429q10.857-10.857 10.857-25.714t-10.857-25.714l-94.857-94.857q-10.857-10.857-25.714-10.857t-25.714 10.857l-424 424q-10.857 10.857-10.857 25.714t10.857 25.714l424 424q10.857 10.857 25.714 10.857t25.714-10.857l94.857-94.857q10.857-10.857 10.857-25.714t-10.857-25.714z" />
21
- <glyph unicode="&#xf054;" glyph-name="chevron-right" horiz-adv-x="695" d="M632.571 449.714l-424-424q-10.857-10.857-25.714-10.857t-25.714 10.857l-94.857 94.857q-10.857 10.857-10.857 25.714t10.857 25.714l303.429 303.429-303.429 303.429q-10.857 10.857-10.857 25.714t10.857 25.714l94.857 94.857q10.857 10.857 25.714 10.857t25.714-10.857l424-424q10.857-10.857 10.857-25.714t-10.857-25.714z" />
22
  </font></defs></svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="serioussliderglyphs" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xe051;" glyph-name="rewind" d="M768 768q17.667 0 30.167-12.5t12.5-30.167-12.667-30.333l-268.333-268.333 268.333-268.333q12.667-12.667 12.667-30.333t-12.5-30.167-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 12.333-12.333 30.333t12.333 30.333l298.667 298.667q12.333 12.333 30.333 12.333zM512 768q17.667 0 30.167-12.5t12.5-30.167-12.667-30.333l-268.333-268.333 268.333-268.333q12.667-12.667 12.667-30.333t-12.5-30.167-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 12.333-12.333 30.333t12.333 30.333l298.667 298.667q12.333 12.333 30.333 12.333z" />
11
+ <glyph unicode="&#xe055;" glyph-name="fast-forward" d="M469.333 768q17.667 0 30-12.333l298.667-298.667q12.667-12.667 12.667-30.333t-12.667-30.333l-298.667-298.667q-12.333-12.333-30-12.333t-30.167 12.5-12.5 30.167q0 18 12.333 30.333l268.333 268.333-268.333 268.333q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167zM213.333 768q17.667 0 30-12.333l298.667-298.667q12.667-12.667 12.667-30.333t-12.667-30.333l-298.667-298.667q-12.333-12.333-30-12.333t-30.167 12.5-12.5 30.167q0 18 12.333 30.333l268.333 268.333-268.333 268.333q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167z" />
12
+ <glyph unicode="&#xe900;" glyph-name="chevron-left2" d="M637.542 741.581c22.835-22.323 24.627-53.402 0-80.691l-191.846-200.090 191.846-200.090c24.627-27.29 22.835-58.419 0-80.589-22.784-22.323-61.286-20.89-82.688 0-21.402 20.787-230.502 240.384-230.502 240.384-11.418 11.11-17.152 25.702-17.152 40.294s5.734 29.184 17.152 40.397c0 0 209.101 219.494 230.502 240.384 21.402 20.941 59.904 22.323 82.688 0z" />
13
+ <glyph unicode="&#xe901;" glyph-name="chevron-right2" d="M469.146 741.581c21.402-20.89 230.502-240.384 230.502-240.384 11.418-11.213 17.152-25.805 17.152-40.397s-5.734-29.184-17.152-40.294c0 0-209.101-219.597-230.502-240.384-21.402-20.89-59.904-22.323-82.688 0-22.835 22.221-24.627 53.299 0 80.589l191.846 200.090-191.846 200.090c-24.627 27.29-22.835 58.419 0 80.691 22.784 22.323 61.286 20.941 82.688 0z" />
14
+ <glyph unicode="&#xe902;" glyph-name="chevron-small-left" d="M621.619 285.798c13.722-13.875 13.722-36.301 0-50.074-13.722-13.824-35.891-13.926-49.613 0l-196.096 200.090c-13.722 13.824-13.722 36.198 0 50.125l196.096 200.090c13.67 13.824 35.891 13.824 49.613 0 13.722-13.875 13.722-36.301 0-50.074l-160.819-175.155 160.819-175.002z" />
15
+ <glyph unicode="&#xe903;" glyph-name="chevron-small-right" d="M563.2 460.8l-160.819 175.104c-13.722 13.824-13.722 36.198 0 50.074 13.722 13.824 35.891 13.824 49.613 0l196.096-200.090c13.722-13.875 13.722-36.301 0-50.125l-196.096-200.090c-13.67-13.926-35.891-13.824-49.613 0-13.722 13.773-13.722 36.198 0 50.074l160.819 175.053z" />
16
+ <glyph unicode="&#xe904;" glyph-name="chevron-thin-left" d="M711.219 80.998c13.722-13.926 13.722-36.301 0-50.125s-35.891-13.875-49.613 0l-400.896 404.89c-13.722 13.824-13.722 36.198 0 50.125l400.896 404.89c13.722 13.824 35.891 13.824 49.613 0 13.722-13.875 13.722-36.301 0-50.125l-365.619-379.853 365.619-379.802z" />
17
+ <glyph unicode="&#xe905;" glyph-name="chevron-thin-right" d="M678.4 460.8l-365.619 379.904c-13.722 13.824-13.722 36.198 0 50.125 13.722 13.824 35.891 13.824 49.613 0l400.896-404.89c13.722-13.875 13.722-36.301 0-50.125l-400.896-404.89c-13.722-13.875-35.891-13.824-49.613 0-13.722 13.773-13.722 36.198 0 50.125l365.619 379.75z" />
18
+ <glyph unicode="&#xe906;" glyph-name="chevron-with-circle-left" d="M578.662 625.869c-10.035 10.086-26.368 10.086-36.352 0l-143.718-146.688c-10.035-10.189-10.035-26.624 0-36.71l143.718-146.637c9.984-10.189 26.317-10.138 36.352 0 10.035 10.086 10.035 26.522 0 36.71l-117.862 128.256 117.862 128.307c10.035 10.138 10.035 26.522 0 36.762zM512 952.32c-271.462 0-491.52-220.058-491.52-491.52 0-271.514 220.058-491.52 491.52-491.52s491.52 220.006 491.52 491.52c0 271.462-220.058 491.52-491.52 491.52zM512 33.075c-236.288 0-427.725 191.488-427.725 427.725s191.437 427.725 427.725 427.725c236.186 0 427.725-191.488 427.725-427.725s-191.539-427.725-427.725-427.725z" />
19
+ <glyph unicode="&#xe907;" glyph-name="chevron-with-circle-right" d="M563.2 460.8l-117.862 128.307c-10.035 10.138-10.035 26.573 0 36.762 10.035 10.086 26.368 10.086 36.352 0l143.718-146.637c10.035-10.189 10.035-26.624 0-36.71l-143.718-146.637c-9.984-10.189-26.317-10.138-36.352 0-10.035 10.086-10.035 26.522 0 36.71l117.862 128.205zM512 952.32c271.462 0 491.52-220.058 491.52-491.52 0-271.514-220.058-491.52-491.52-491.52s-491.52 220.006-491.52 491.52c0 271.462 220.058 491.52 491.52 491.52zM512 33.075c236.186 0 427.725 191.488 427.725 427.725s-191.539 427.725-427.725 427.725c-236.288 0-427.725-191.488-427.725-427.725-0.051-236.237 191.437-427.725 427.725-427.725z" />
20
+ <glyph unicode="&#xf053;" glyph-name="chevron-left" horiz-adv-x="768" d="M669.143 778.857l-303.429-303.429 303.429-303.429q10.857-10.857 10.857-25.714t-10.857-25.714l-94.857-94.857q-10.857-10.857-25.714-10.857t-25.714 10.857l-424 424q-10.857 10.857-10.857 25.714t10.857 25.714l424 424q10.857 10.857 25.714 10.857t25.714-10.857l94.857-94.857q10.857-10.857 10.857-25.714t-10.857-25.714z" />
21
+ <glyph unicode="&#xf054;" glyph-name="chevron-right" horiz-adv-x="695" d="M632.571 449.714l-424-424q-10.857-10.857-25.714-10.857t-25.714 10.857l-94.857 94.857q-10.857 10.857-10.857 25.714t10.857 25.714l303.429 303.429-303.429 303.429q-10.857 10.857-10.857 25.714t10.857 25.714l94.857 94.857q10.857 10.857 25.714 10.857t25.714-10.857l424-424q10.857-10.857 10.857-25.714t-10.857-25.714z" />
22
  </font></defs></svg>
resources/images/serious-slider-128.png ADDED
Binary file
resources/images/serious-slider-editor-icon.png CHANGED
Binary file
resources/images/serious-slider-header.png CHANGED
Binary file
resources/images/serious-slider-icon.png CHANGED
Binary file
resources/images/serious-slider-mce-icon.png ADDED
Binary file
resources/jquery.mobile.custom.js CHANGED
@@ -1,864 +1,864 @@
1
- /*
2
- * jQuery Mobile v1.4.5
3
- * http://jquerymobile.com
4
- *
5
- * Copyright 2010, 2014 jQuery Foundation, Inc. and other contributors
6
- * Released under the MIT license.
7
- * http://jquery.org/license
8
- *
9
- */
10
-
11
- (function ( root, doc, factory ) {
12
- if ( typeof define === "function" && define.amd ) {
13
- // AMD. Register as an anonymous module.
14
- define( [ "jquery" ], function ( $ ) {
15
- factory( $, root, doc );
16
- return $.mobile;
17
- });
18
- } else {
19
- // Browser globals
20
- factory( root.jQuery, root, doc );
21
- }
22
- }( this, document, function ( jQuery, window, document, undefined ) {// This plugin is an experiment for abstracting away the touch and mouse
23
- // events so that developers don't have to worry about which method of input
24
- // the device their document is loaded on supports.
25
- //
26
- // The idea here is to allow the developer to register listeners for the
27
- // basic mouse events, such as mousedown, mousemove, mouseup, and click,
28
- // and the plugin will take care of registering the correct listeners
29
- // behind the scenes to invoke the listener at the fastest possible time
30
- // for that device, while still retaining the order of event firing in
31
- // the traditional mouse environment, should multiple handlers be registered
32
- // on the same element for different events.
33
- //
34
- // The current version exposes the following virtual events to jQuery bind methods:
35
- // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
36
-
37
- (function( $, window, document, undefined ) {
38
-
39
- var dataPropertyName = "virtualMouseBindings",
40
- touchTargetPropertyName = "virtualTouchID",
41
- virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
42
- touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
43
- mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [],
44
- mouseEventProps = $.event.props.concat( mouseHookProps ),
45
- activeDocHandlers = {},
46
- resetTimerID = 0,
47
- startX = 0,
48
- startY = 0,
49
- didScroll = false,
50
- clickBlockList = [],
51
- blockMouseTriggers = false,
52
- blockTouchTriggers = false,
53
- eventCaptureSupported = "addEventListener" in document,
54
- $document = $( document ),
55
- nextTouchID = 1,
56
- lastTouchID = 0, threshold,
57
- i;
58
-
59
- $.vmouse = {
60
- moveDistanceThreshold: 10,
61
- clickDistanceThreshold: 10,
62
- resetTimerDuration: 1500
63
- };
64
-
65
- function getNativeEvent( event ) {
66
-
67
- while ( event && typeof event.originalEvent !== "undefined" ) {
68
- event = event.originalEvent;
69
- }
70
- return event;
71
- }
72
-
73
- function createVirtualEvent( event, eventType ) {
74
-
75
- var t = event.type,
76
- oe, props, ne, prop, ct, touch, i, j, len;
77
-
78
- event = $.Event( event );
79
- event.type = eventType;
80
-
81
- oe = event.originalEvent;
82
- props = $.event.props;
83
-
84
- // addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
85
- // https://github.com/jquery/jquery-mobile/issues/3280
86
- if ( t.search( /^(mouse|click)/ ) > -1 ) {
87
- props = mouseEventProps;
88
- }
89
-
90
- // copy original event properties over to the new event
91
- // this would happen if we could call $.event.fix instead of $.Event
92
- // but we don't have a way to force an event to be fixed multiple times
93
- if ( oe ) {
94
- for ( i = props.length, prop; i; ) {
95
- prop = props[ --i ];
96
- event[ prop ] = oe[ prop ];
97
- }
98
- }
99
-
100
- // make sure that if the mouse and click virtual events are generated
101
- // without a .which one is defined
102
- if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ) {
103
- event.which = 1;
104
- }
105
-
106
- if ( t.search(/^touch/) !== -1 ) {
107
- ne = getNativeEvent( oe );
108
- t = ne.touches;
109
- ct = ne.changedTouches;
110
- touch = ( t && t.length ) ? t[0] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined );
111
-
112
- if ( touch ) {
113
- for ( j = 0, len = touchEventProps.length; j < len; j++) {
114
- prop = touchEventProps[ j ];
115
- event[ prop ] = touch[ prop ];
116
- }
117
- }
118
- }
119
-
120
- return event;
121
- }
122
-
123
- function getVirtualBindingFlags( element ) {
124
-
125
- var flags = {},
126
- b, k;
127
-
128
- while ( element ) {
129
-
130
- b = $.data( element, dataPropertyName );
131
-
132
- for ( k in b ) {
133
- if ( b[ k ] ) {
134
- flags[ k ] = flags.hasVirtualBinding = true;
135
- }
136
- }
137
- element = element.parentNode;
138
- }
139
- return flags;
140
- }
141
-
142
- function getClosestElementWithVirtualBinding( element, eventType ) {
143
- var b;
144
- while ( element ) {
145
-
146
- b = $.data( element, dataPropertyName );
147
-
148
- if ( b && ( !eventType || b[ eventType ] ) ) {
149
- return element;
150
- }
151
- element = element.parentNode;
152
- }
153
- return null;
154
- }
155
-
156
- function enableTouchBindings() {
157
- blockTouchTriggers = false;
158
- }
159
-
160
- function disableTouchBindings() {
161
- blockTouchTriggers = true;
162
- }
163
-
164
- function enableMouseBindings() {
165
- lastTouchID = 0;
166
- clickBlockList.length = 0;
167
- blockMouseTriggers = false;
168
-
169
- // When mouse bindings are enabled, our
170
- // touch bindings are disabled.
171
- disableTouchBindings();
172
- }
173
-
174
- function disableMouseBindings() {
175
- // When mouse bindings are disabled, our
176
- // touch bindings are enabled.
177
- enableTouchBindings();
178
- }
179
-
180
- function startResetTimer() {
181
- clearResetTimer();
182
- resetTimerID = setTimeout( function() {
183
- resetTimerID = 0;
184
- enableMouseBindings();
185
- }, $.vmouse.resetTimerDuration );
186
- }
187
-
188
- function clearResetTimer() {
189
- if ( resetTimerID ) {
190
- clearTimeout( resetTimerID );
191
- resetTimerID = 0;
192
- }
193
- }
194
-
195
- function triggerVirtualEvent( eventType, event, flags ) {
196
- var ve;
197
-
198
- if ( ( flags && flags[ eventType ] ) ||
199
- ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) {
200
-
201
- ve = createVirtualEvent( event, eventType );
202
-
203
- $( event.target).trigger( ve );
204
- }
205
-
206
- return ve;
207
- }
208
-
209
- function mouseEventCallback( event ) {
210
- var touchID = $.data( event.target, touchTargetPropertyName ),
211
- ve;
212
-
213
- if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) {
214
- ve = triggerVirtualEvent( "v" + event.type, event );
215
- if ( ve ) {
216
- if ( ve.isDefaultPrevented() ) {
217
- event.preventDefault();
218
- }
219
- if ( ve.isPropagationStopped() ) {
220
- event.stopPropagation();
221
- }
222
- if ( ve.isImmediatePropagationStopped() ) {
223
- event.stopImmediatePropagation();
224
- }
225
- }
226
- }
227
- }
228
-
229
- function handleTouchStart( event ) {
230
-
231
- var touches = getNativeEvent( event ).touches,
232
- target, flags, t;
233
-
234
- if ( touches && touches.length === 1 ) {
235
-
236
- target = event.target;
237
- flags = getVirtualBindingFlags( target );
238
-
239
- if ( flags.hasVirtualBinding ) {
240
-
241
- lastTouchID = nextTouchID++;
242
- $.data( target, touchTargetPropertyName, lastTouchID );
243
-
244
- clearResetTimer();
245
-
246
- disableMouseBindings();
247
- didScroll = false;
248
-
249
- t = getNativeEvent( event ).touches[ 0 ];
250
- startX = t.pageX;
251
- startY = t.pageY;
252
-
253
- triggerVirtualEvent( "vmouseover", event, flags );
254
- triggerVirtualEvent( "vmousedown", event, flags );
255
- }
256
- }
257
- }
258
-
259
- function handleScroll( event ) {
260
- if ( blockTouchTriggers ) {
261
- return;
262
- }
263
-
264
- if ( !didScroll ) {
265
- triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) );
266
- }
267
-
268
- didScroll = true;
269
- startResetTimer();
270
- }
271
-
272
- function handleTouchMove( event ) {
273
- if ( blockTouchTriggers ) {
274
- return;
275
- }
276
-
277
- var t = getNativeEvent( event ).touches[ 0 ],
278
- didCancel = didScroll,
279
- moveThreshold = $.vmouse.moveDistanceThreshold,
280
- flags = getVirtualBindingFlags( event.target );
281
-
282
- didScroll = didScroll ||
283
- ( Math.abs( t.pageX - startX ) > moveThreshold ||
284
- Math.abs( t.pageY - startY ) > moveThreshold );
285
-
286
- if ( didScroll && !didCancel ) {
287
- triggerVirtualEvent( "vmousecancel", event, flags );
288
- }
289
-
290
- triggerVirtualEvent( "vmousemove", event, flags );
291
- startResetTimer();
292
- }
293
-
294
- function handleTouchEnd( event ) {
295
- if ( blockTouchTriggers ) {
296
- return;
297
- }
298
-
299
- disableTouchBindings();
300
-
301
- var flags = getVirtualBindingFlags( event.target ),
302
- ve, t;
303
- triggerVirtualEvent( "vmouseup", event, flags );
304
-
305
- if ( !didScroll ) {
306
- ve = triggerVirtualEvent( "vclick", event, flags );
307
- if ( ve && ve.isDefaultPrevented() ) {
308
- // The target of the mouse events that follow the touchend
309
- // event don't necessarily match the target used during the
310
- // touch. This means we need to rely on coordinates for blocking
311
- // any click that is generated.
312
- t = getNativeEvent( event ).changedTouches[ 0 ];
313
- clickBlockList.push({
314
- touchID: lastTouchID,
315
- x: t.clientX,
316
- y: t.clientY
317
- });
318
-
319
- // Prevent any mouse events that follow from triggering
320
- // virtual event notifications.
321
- blockMouseTriggers = true;
322
- }
323
- }
324
- triggerVirtualEvent( "vmouseout", event, flags);
325
- didScroll = false;
326
-
327
- startResetTimer();
328
- }
329
-
330
- function hasVirtualBindings( ele ) {
331
- var bindings = $.data( ele, dataPropertyName ),
332
- k;
333
-
334
- if ( bindings ) {
335
- for ( k in bindings ) {
336
- if ( bindings[ k ] ) {
337
- return true;
338
- }
339
- }
340
- }
341
- return false;
342
- }
343
-
344
- function dummyMouseHandler() {}
345
-
346
- function getSpecialEventObject( eventType ) {
347
- var realType = eventType.substr( 1 );
348
-
349
- return {
350
- setup: function(/* data, namespace */) {
351
- // If this is the first virtual mouse binding for this element,
352
- // add a bindings object to its data.
353
-
354
- if ( !hasVirtualBindings( this ) ) {
355
- $.data( this, dataPropertyName, {} );
356
- }
357
-
358
- // If setup is called, we know it is the first binding for this
359
- // eventType, so initialize the count for the eventType to zero.
360
- var bindings = $.data( this, dataPropertyName );
361
- bindings[ eventType ] = true;
362
-
363
- // If this is the first virtual mouse event for this type,
364
- // register a global handler on the document.
365
-
366
- activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1;
367
-
368
- if ( activeDocHandlers[ eventType ] === 1 ) {
369
- $document.bind( realType, mouseEventCallback );
370
- }
371
-
372
- // Some browsers, like Opera Mini, won't dispatch mouse/click events
373
- // for elements unless they actually have handlers registered on them.
374
- // To get around this, we register dummy handlers on the elements.
375
-
376
- $( this ).bind( realType, dummyMouseHandler );
377
-
378
- // For now, if event capture is not supported, we rely on mouse handlers.
379
- if ( eventCaptureSupported ) {
380
- // If this is the first virtual mouse binding for the document,
381
- // register our touchstart handler on the document.
382
-
383
- activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1;
384
-
385
- if ( activeDocHandlers[ "touchstart" ] === 1 ) {
386
- $document.bind( "touchstart", handleTouchStart )
387
- .bind( "touchend", handleTouchEnd )
388
-
389
- // On touch platforms, touching the screen and then dragging your finger
390
- // causes the window content to scroll after some distance threshold is
391
- // exceeded. On these platforms, a scroll prevents a click event from being
392
- // dispatched, and on some platforms, even the touchend is suppressed. To
393
- // mimic the suppression of the click event, we need to watch for a scroll
394
- // event. Unfortunately, some platforms like iOS don't dispatch scroll
395
- // events until *AFTER* the user lifts their finger (touchend). This means
396
- // we need to watch both scroll and touchmove events to figure out whether
397
- // or not a scroll happenens before the touchend event is fired.
398
-
399
- .bind( "touchmove", handleTouchMove )
400
- .bind( "scroll", handleScroll );
401
- }
402
- }
403
- },
404
-
405
- teardown: function(/* data, namespace */) {
406
- // If this is the last virtual binding for this eventType,
407
- // remove its global handler from the document.
408
-
409
- --activeDocHandlers[ eventType ];
410
-
411
- if ( !activeDocHandlers[ eventType ] ) {
412
- $document.unbind( realType, mouseEventCallback );
413
- }
414
-
415
- if ( eventCaptureSupported ) {
416
- // If this is the last virtual mouse binding in existence,
417
- // remove our document touchstart listener.
418
-
419
- --activeDocHandlers[ "touchstart" ];
420
-
421
- if ( !activeDocHandlers[ "touchstart" ] ) {
422
- $document.unbind( "touchstart", handleTouchStart )
423
- .unbind( "touchmove", handleTouchMove )
424
- .unbind( "touchend", handleTouchEnd )
425
- .unbind( "scroll", handleScroll );
426
- }
427
- }
428
-
429
- var $this = $( this ),
430
- bindings = $.data( this, dataPropertyName );
431
-
432
- // teardown may be called when an element was
433
- // removed from the DOM. If this is the case,
434
- // jQuery core may have already stripped the element
435
- // of any data bindings so we need to check it before
436
- // using it.
437
- if ( bindings ) {
438
- bindings[ eventType ] = false;
439
- }
440
-
441
- // Unregister the dummy event handler.
442
-
443
- $this.unbind( realType, dummyMouseHandler );
444
-
445
- // If this is the last virtual mouse binding on the
446
- // element, remove the binding data from the element.
447
-
448
- if ( !hasVirtualBindings( this ) ) {
449
- $this.removeData( dataPropertyName );
450
- }
451
- }
452
- };
453
- }
454
-
455
- // Expose our custom events to the jQuery bind/unbind mechanism.
456
-
457
- for ( i = 0; i < virtualEventNames.length; i++ ) {
458
- $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] );
459
- }
460
-
461
- // Add a capture click handler to block clicks.
462
- // Note that we require event capture support for this so if the device
463
- // doesn't support it, we punt for now and rely solely on mouse events.
464
- if ( eventCaptureSupported ) {
465
- document.addEventListener( "click", function( e ) {
466
- var cnt = clickBlockList.length,
467
- target = e.target,
468
- x, y, ele, i, o, touchID;
469
-
470
- if ( cnt ) {
471
- x = e.clientX;
472
- y = e.clientY;
473
- threshold = $.vmouse.clickDistanceThreshold;
474
-
475
- // The idea here is to run through the clickBlockList to see if
476
- // the current click event is in the proximity of one of our
477
- // vclick events that had preventDefault() called on it. If we find
478
- // one, then we block the click.
479
- //
480
- // Why do we have to rely on proximity?
481
- //
482
- // Because the target of the touch event that triggered the vclick
483
- // can be different from the target of the click event synthesized
484
- // by the browser. The target of a mouse/click event that is synthesized
485
- // from a touch event seems to be implementation specific. For example,
486
- // some browsers will fire mouse/click events for a link that is near
487
- // a touch event, even though the target of the touchstart/touchend event
488
- // says the user touched outside the link. Also, it seems that with most
489
- // browsers, the target of the mouse/click event is not calculated until the
490
- // time it is dispatched, so if you replace an element that you touched
491
- // with another element, the target of the mouse/click will be the new
492
- // element underneath that point.
493
- //
494
- // Aside from proximity, we also check to see if the target and any
495
- // of its ancestors were the ones that blocked a click. This is necessary
496
- // because of the strange mouse/click target calculation done in the
497
- // Android 2.1 browser, where if you click on an element, and there is a
498
- // mouse/click handler on one of its ancestors, the target will be the
499
- // innermost child of the touched element, even if that child is no where
500
- // near the point of touch.
501
-
502
- ele = target;
503
-
504
- while ( ele ) {
505
- for ( i = 0; i < cnt; i++ ) {
506
- o = clickBlockList[ i ];
507
- touchID = 0;
508
-
509
- if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) ||
510
- $.data( ele, touchTargetPropertyName ) === o.touchID ) {
511
- // XXX: We may want to consider removing matches from the block list
512
- // instead of waiting for the reset timer to fire.
513
- e.preventDefault();
514
- e.stopPropagation();
515
- return;
516
- }
517
- }
518
- ele = ele.parentNode;
519
- }
520
- }
521
- }, true);
522
- }
523
- })( jQuery, window, document );
524
-
525
- (function( $ ) {
526
- $.mobile = {};
527
- }( jQuery ));
528
-
529
- (function( $, undefined ) {
530
- var support = {
531
- touch: "ontouchend" in document
532
- };
533
-
534
- $.mobile.support = $.mobile.support || {};
535
- $.extend( $.support, support );
536
- $.extend( $.mobile.support, support );
537
- }( jQuery ));
538
-
539
-
540
- (function( $, window, undefined ) {
541
- var $document = $( document ),
542
- supportTouch = $.mobile.support.touch,
543
- scrollEvent = "touchmove scroll",
544
- touchStartEvent = supportTouch ? "touchstart" : "mousedown",
545
- touchStopEvent = supportTouch ? "touchend" : "mouseup",
546
- touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
547
-
548
- // setup new event shortcuts
549
- $.each( ( "touchstart touchmove touchend " +
550
- "tap taphold " +
551
- "swipe swipeleft swiperight " +
552
- "scrollstart scrollstop" ).split( " " ), function( i, name ) {
553
-
554
- $.fn[ name ] = function( fn ) {
555
- return fn ? this.bind( name, fn ) : this.trigger( name );
556
- };
557
-
558
- // jQuery < 1.8
559
- if ( $.attrFn ) {
560
- $.attrFn[ name ] = true;
561
- }
562
- });
563
-
564
- function triggerCustomEvent( obj, eventType, event, bubble ) {
565
- var originalType = event.type;
566
- event.type = eventType;
567
- if ( bubble ) {
568
- $.event.trigger( event, undefined, obj );
569
- } else {
570
- $.event.dispatch.call( obj, event );
571
- }
572
- event.type = originalType;
573
- }
574
-
575
- // also handles scrollstop
576
- $.event.special.scrollstart = {
577
-
578
- enabled: true,
579
- setup: function() {
580
-
581
- var thisObject = this,
582
- $this = $( thisObject ),
583
- scrolling,
584
- timer;
585
-
586
- function trigger( event, state ) {
587
- scrolling = state;
588
- triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event );
589
- }
590
-
591
- // iPhone triggers scroll after a small delay; use touchmove instead
592
- $this.bind( scrollEvent, function( event ) {
593
-
594
- if ( !$.event.special.scrollstart.enabled ) {
595
- return;
596
- }
597
-
598
- if ( !scrolling ) {
599
- trigger( event, true );
600
- }
601
-
602
- clearTimeout( timer );
603
- timer = setTimeout( function() {
604
- trigger( event, false );
605
- }, 50 );
606
- });
607
- },
608
- teardown: function() {
609
- $( this ).unbind( scrollEvent );
610
- }
611
- };
612
-
613
- // also handles taphold
614
- $.event.special.tap = {
615
- tapholdThreshold: 750,
616
- emitTapOnTaphold: true,
617
- setup: function() {
618
- var thisObject = this,
619
- $this = $( thisObject ),
620
- isTaphold = false;
621
-
622
- $this.bind( "vmousedown", function( event ) {
623
- isTaphold = false;
624
- if ( event.which && event.which !== 1 ) {
625
- return false;
626
- }
627
-
628
- var origTarget = event.target,
629
- timer;
630
-
631
- function clearTapTimer() {
632
- clearTimeout( timer );
633
- }
634
-
635
- function clearTapHandlers() {
636
- clearTapTimer();
637
-
638
- $this.unbind( "vclick", clickHandler )
639
- .unbind( "vmouseup", clearTapTimer );
640
- $document.unbind( "vmousecancel", clearTapHandlers );
641
- }
642
-
643
- function clickHandler( event ) {
644
- clearTapHandlers();
645
-
646
- // ONLY trigger a 'tap' event if the start target is
647
- // the same as the stop target.
648
- if ( !isTaphold && origTarget === event.target ) {
649
- triggerCustomEvent( thisObject, "tap", event );
650
- } else if ( isTaphold ) {
651
- event.preventDefault();
652
- }
653
- }
654
-
655
- $this.bind( "vmouseup", clearTapTimer )
656
- .bind( "vclick", clickHandler );
657
- $document.bind( "vmousecancel", clearTapHandlers );
658
-
659
- timer = setTimeout( function() {
660
- if ( !$.event.special.tap.emitTapOnTaphold ) {
661
- isTaphold = true;
662
- }
663
- triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) );
664
- }, $.event.special.tap.tapholdThreshold );
665
- });
666
- },
667
- teardown: function() {
668
- $( this ).unbind( "vmousedown" ).unbind( "vclick" ).unbind( "vmouseup" );
669
- $document.unbind( "vmousecancel" );
670
- }
671
- };
672
-
673
- // Also handles swipeleft, swiperight
674
- $.event.special.swipe = {
675
-
676
- // More than this horizontal displacement, and we will suppress scrolling.
677
- scrollSupressionThreshold: 30,
678
-
679
- // More time than this, and it isn't a swipe.
680
- durationThreshold: 1000,
681
-
682
- // Swipe horizontal displacement must be more than this.
683
- horizontalDistanceThreshold: 30,
684
-
685
- // Swipe vertical displacement must be less than this.
686
- verticalDistanceThreshold: 30,
687
-
688
- getLocation: function ( event ) {
689
- var winPageX = window.pageXOffset,
690
- winPageY = window.pageYOffset,
691
- x = event.clientX,
692
- y = event.clientY;
693
-
694
- if ( event.pageY === 0 && Math.floor( y ) > Math.floor( event.pageY ) ||
695
- event.pageX === 0 && Math.floor( x ) > Math.floor( event.pageX ) ) {
696
-
697
- // iOS4 clientX/clientY have the value that should have been
698
- // in pageX/pageY. While pageX/page/ have the value 0
699
- x = x - winPageX;
700
- y = y - winPageY;
701
- } else if ( y < ( event.pageY - winPageY) || x < ( event.pageX - winPageX ) ) {
702
-
703
- // Some Android browsers have totally bogus values for clientX/Y
704
- // when scrolling/zooming a page. Detectable since clientX/clientY
705
- // should never be smaller than pageX/pageY minus page scroll
706
- x = event.pageX - winPageX;
707
- y = event.pageY - winPageY;
708
- }
709
-
710
- return {
711
- x: x,
712
- y: y
713
- };
714
- },
715
-
716
- start: function( event ) {
717
- var data = event.originalEvent.touches ?
718
- event.originalEvent.touches[ 0 ] : event,
719
- location = $.event.special.swipe.getLocation( data );
720
- return {
721
- time: ( new Date() ).getTime(),
722
- coords: [ location.x, location.y ],
723
- origin: $( event.target )
724
- };
725
- },
726
-
727
- stop: function( event ) {
728
- var data = event.originalEvent.touches ?
729
- event.originalEvent.touches[ 0 ] : event,
730
- location = $.event.special.swipe.getLocation( data );
731
- return {
732
- time: ( new Date() ).getTime(),
733
- coords: [ location.x, location.y ]
734
- };
735
- },
736
-
737
- handleSwipe: function( start, stop, thisObject, origTarget ) {
738
- if ( stop.time - start.time < $.event.special.swipe.durationThreshold &&
739
- Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold &&
740
- Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
741
- var direction = start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight";
742
-
743
- triggerCustomEvent( thisObject, "swipe", $.Event( "swipe", { target: origTarget, swipestart: start, swipestop: stop }), true );
744
- triggerCustomEvent( thisObject, direction,$.Event( direction, { target: origTarget, swipestart: start, swipestop: stop } ), true );
745
- return true;
746
- }
747
- return false;
748
-
749
- },
750
-
751
- // This serves as a flag to ensure that at most one swipe event event is
752
- // in work at any given time
753
- eventInProgress: false,
754
-
755
- setup: function() {
756
- var events,
757
- thisObject = this,
758
- $this = $( thisObject ),
759
- context = {};
760
-
761
- // Retrieve the events data for this element and add the swipe context
762
- events = $.data( this, "mobile-events" );
763
- if ( !events ) {
764
- events = { length: 0 };
765
- $.data( this, "mobile-events", events );
766
- }
767
- events.length++;
768
- events.swipe = context;
769
-
770
- context.start = function( event ) {
771
-
772
- // Bail if we're already working on a swipe event
773
- if ( $.event.special.swipe.eventInProgress ) {
774
- return;
775
- }
776
- $.event.special.swipe.eventInProgress = true;
777
-
778
- var stop,
779
- start = $.event.special.swipe.start( event ),
780
- origTarget = event.target,
781
- emitted = false;
782
-
783
- context.move = function( event ) {
784
- if ( !start || event.isDefaultPrevented() ) {
785
- return;
786
- }
787
-
788
- stop = $.event.special.swipe.stop( event );
789
- if ( !emitted ) {
790
- emitted = $.event.special.swipe.handleSwipe( start, stop, thisObject, origTarget );
791
- if ( emitted ) {
792
-
793
- // Reset the context to make way for the next swipe event
794
- $.event.special.swipe.eventInProgress = false;
795
- }
796
- }
797
- // prevent scrolling
798
- if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
799
- event.preventDefault();
800
- }
801
- };
802
-
803
- context.stop = function() {
804
- emitted = true;
805
-
806
- // Reset the context to make way for the next swipe event
807
- $.event.special.swipe.eventInProgress = false;
808
- $document.off( touchMoveEvent, context.move );
809
- context.move = null;
810
- };
811
-
812
- $document.on( touchMoveEvent, context.move )
813
- .one( touchStopEvent, context.stop );
814
- };
815
- $this.on( touchStartEvent, context.start );
816
- },
817
-
818
- teardown: function() {
819
- var events, context;
820
-
821
- events = $.data( this, "mobile-events" );
822
- if ( events ) {
823
- context = events.swipe;
824
- delete events.swipe;
825
- events.length--;
826
- if ( events.length === 0 ) {
827
- $.removeData( this, "mobile-events" );
828
- }
829
- }
830
-
831
- if ( context ) {
832
- if ( context.start ) {
833
- $( this ).off( touchStartEvent, context.start );
834
- }
835
- if ( context.move ) {
836
- $document.off( touchMoveEvent, context.move );
837
- }
838
- if ( context.stop ) {
839
- $document.off( touchStopEvent, context.stop );
840
- }
841
- }
842
- }
843
- };
844
- $.each({
845
- scrollstop: "scrollstart",
846
- taphold: "tap",
847
- swipeleft: "swipe.left",
848
- swiperight: "swipe.right"
849
- }, function( event, sourceEvent ) {
850
-
851
- $.event.special[ event ] = {
852
- setup: function() {
853
- $( this ).bind( sourceEvent, $.noop );
854
- },
855
- teardown: function() {
856
- $( this ).unbind( sourceEvent );
857
- }
858
- };
859
- });
860
-
861
- })( jQuery, this );
862
-
863
-
864
- }));
1
+ /*
2
+ * jQuery Mobile v1.4.5
3
+ * http://jquerymobile.com
4
+ *
5
+ * Copyright 2010, 2014 jQuery Foundation, Inc. and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ */
10
+
11
+ (function ( root, doc, factory ) {
12
+ if ( typeof define === "function" && define.amd ) {
13
+ // AMD. Register as an anonymous module.
14
+ define( [ "jquery" ], function ( $ ) {
15
+ factory( $, root, doc );
16
+ return $.mobile;
17
+ });
18
+ } else {
19
+ // Browser globals
20
+ factory( root.jQuery, root, doc );
21
+ }
22
+ }( this, document, function ( jQuery, window, document, undefined ) {// This plugin is an experiment for abstracting away the touch and mouse
23
+ // events so that developers don't have to worry about which method of input
24
+ // the device their document is loaded on supports.
25
+ //
26
+ // The idea here is to allow the developer to register listeners for the
27
+ // basic mouse events, such as mousedown, mousemove, mouseup, and click,
28
+ // and the plugin will take care of registering the correct listeners
29
+ // behind the scenes to invoke the listener at the fastest possible time
30
+ // for that device, while still retaining the order of event firing in
31
+ // the traditional mouse environment, should multiple handlers be registered
32
+ // on the same element for different events.
33
+ //
34
+ // The current version exposes the following virtual events to jQuery bind methods:
35
+ // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
36
+
37
+ (function( $, window, document, undefined ) {
38
+
39
+ var dataPropertyName = "virtualMouseBindings",
40
+ touchTargetPropertyName = "virtualTouchID",
41
+ virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
42
+ touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
43
+ mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [],
44
+ mouseEventProps = $.event.props.concat( mouseHookProps ),
45
+ activeDocHandlers = {},
46
+ resetTimerID = 0,
47
+ startX = 0,
48
+ startY = 0,
49
+ didScroll = false,
50
+ clickBlockList = [],
51
+ blockMouseTriggers = false,
52
+ blockTouchTriggers = false,
53
+ eventCaptureSupported = "addEventListener" in document,
54
+ $document = $( document ),
55
+ nextTouchID = 1,
56
+ lastTouchID = 0, threshold,
57
+ i;
58
+
59
+ $.vmouse = {
60
+ moveDistanceThreshold: 10,
61
+ clickDistanceThreshold: 10,
62
+ resetTimerDuration: 1500
63
+ };
64
+
65
+ function getNativeEvent( event ) {
66
+
67
+ while ( event && typeof event.originalEvent !== "undefined" ) {
68
+ event = event.originalEvent;
69
+ }
70
+ return event;
71
+ }
72
+
73
+ function createVirtualEvent( event, eventType ) {
74
+
75
+ var t = event.type,
76
+ oe, props, ne, prop, ct, touch, i, j, len;
77
+
78
+ event = $.Event( event );
79
+ event.type = eventType;
80
+
81
+ oe = event.originalEvent;
82
+ props = $.event.props;
83
+
84
+ // addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
85
+ // https://github.com/jquery/jquery-mobile/issues/3280
86
+ if ( t.search( /^(mouse|click)/ ) > -1 ) {
87
+ props = mouseEventProps;
88
+ }
89
+
90
+ // copy original event properties over to the new event
91
+ // this would happen if we could call $.event.fix instead of $.Event
92
+ // but we don't have a way to force an event to be fixed multiple times
93
+ if ( oe ) {
94
+ for ( i = props.length, prop; i; ) {
95
+ prop = props[ --i ];
96
+ event[ prop ] = oe[ prop ];
97
+ }
98
+ }
99
+
100
+ // make sure that if the mouse and click virtual events are generated
101
+ // without a .which one is defined
102
+ if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ) {
103
+ event.which = 1;
104
+ }
105
+
106
+ if ( t.search(/^touch/) !== -1 ) {
107
+ ne = getNativeEvent( oe );
108
+ t = ne.touches;
109
+ ct = ne.changedTouches;
110
+ touch = ( t && t.length ) ? t[0] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined );
111
+
112
+ if ( touch ) {
113
+ for ( j = 0, len = touchEventProps.length; j < len; j++) {
114
+ prop = touchEventProps[ j ];
115
+ event[ prop ] = touch[ prop ];
116
+ }
117
+ }
118
+ }
119
+
120
+ return event;
121
+ }
122
+
123
+ function getVirtualBindingFlags( element ) {
124
+
125
+ var flags = {},
126
+ b, k;
127
+
128
+ while ( element ) {
129
+
130
+ b = $.data( element, dataPropertyName );
131
+
132
+ for ( k in b ) {
133
+ if ( b[ k ] ) {
134
+ flags[ k ] = flags.hasVirtualBinding = true;
135
+ }
136
+ }
137
+ element = element.parentNode;
138
+ }
139
+ return flags;
140
+ }
141
+
142
+ function getClosestElementWithVirtualBinding( element, eventType ) {
143
+ var b;
144
+ while ( element ) {
145
+
146
+ b = $.data( element, dataPropertyName );
147
+
148
+ if ( b && ( !eventType || b[ eventType ] ) ) {
149
+ return element;
150
+ }
151
+ element = element.parentNode;
152
+ }
153
+ return null;
154
+ }
155
+
156
+ function enableTouchBindings() {
157
+ blockTouchTriggers = false;
158
+ }
159
+
160
+ function disableTouchBindings() {
161
+ blockTouchTriggers = true;
162
+ }
163
+
164
+ function enableMouseBindings() {
165
+ lastTouchID = 0;
166
+ clickBlockList.length = 0;
167
+ blockMouseTriggers = false;
168
+
169
+ // When mouse bindings are enabled, our
170
+ // touch bindings are disabled.
171
+ disableTouchBindings();
172
+ }
173
+
174
+ function disableMouseBindings() {
175
+ // When mouse bindings are disabled, our
176
+ // touch bindings are enabled.
177
+ enableTouchBindings();
178
+ }
179
+
180
+ function startResetTimer() {
181
+ clearResetTimer();
182
+ resetTimerID = setTimeout( function() {
183
+ resetTimerID = 0;
184
+ enableMouseBindings();
185
+ }, $.vmouse.resetTimerDuration );
186
+ }
187
+
188
+ function clearResetTimer() {
189
+ if ( resetTimerID ) {
190
+ clearTimeout( resetTimerID );
191
+ resetTimerID = 0;
192
+ }
193
+ }
194
+
195
+ function triggerVirtualEvent( eventType, event, flags ) {
196
+ var ve;
197
+
198
+ if ( ( flags && flags[ eventType ] ) ||
199
+ ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) {
200
+
201
+ ve = createVirtualEvent( event, eventType );
202
+
203
+ $( event.target).trigger( ve );
204
+ }
205
+
206
+ return ve;
207
+ }
208
+
209
+ function mouseEventCallback( event ) {
210
+ var touchID = $.data( event.target, touchTargetPropertyName ),
211
+ ve;
212
+
213
+ if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) {
214
+ ve = triggerVirtualEvent( "v" + event.type, event );
215
+ if ( ve ) {
216
+ if ( ve.isDefaultPrevented() ) {
217
+ event.preventDefault();
218
+ }
219
+ if ( ve.isPropagationStopped() ) {
220
+ event.stopPropagation();
221
+ }
222
+ if ( ve.isImmediatePropagationStopped() ) {
223
+ event.stopImmediatePropagation();
224
+ }
225
+ }
226
+ }
227
+ }
228
+
229
+ function handleTouchStart( event ) {
230
+
231
+ var touches = getNativeEvent( event ).touches,
232
+ target, flags, t;
233
+
234
+ if ( touches && touches.length === 1 ) {
235
+
236
+ target = event.target;
237
+ flags = getVirtualBindingFlags( target );
238
+
239
+ if ( flags.hasVirtualBinding ) {
240
+
241
+ lastTouchID = nextTouchID++;
242
+ $.data( target, touchTargetPropertyName, lastTouchID );
243
+
244
+ clearResetTimer();
245
+
246
+ disableMouseBindings();
247
+ didScroll = false;
248
+
249
+ t = getNativeEvent( event ).touches[ 0 ];
250
+ startX = t.pageX;
251
+ startY = t.pageY;
252
+
253
+ triggerVirtualEvent( "vmouseover", event, flags );
254
+ triggerVirtualEvent( "vmousedown", event, flags );
255
+ }
256
+ }
257
+ }
258
+
259
+ function handleScroll( event ) {
260
+ if ( blockTouchTriggers ) {
261
+ return;
262
+ }
263
+
264
+ if ( !didScroll ) {
265
+ triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) );
266
+ }
267
+
268
+ didScroll = true;
269
+ startResetTimer();
270
+ }
271
+
272
+ function handleTouchMove( event ) {
273
+ if ( blockTouchTriggers ) {
274
+ return;
275
+ }
276
+
277
+ var t = getNativeEvent( event ).touches[ 0 ],
278
+ didCancel = didScroll,
279
+ moveThreshold = $.vmouse.moveDistanceThreshold,
280
+ flags = getVirtualBindingFlags( event.target );
281
+
282
+ didScroll = didScroll ||
283
+ ( Math.abs( t.pageX - startX ) > moveThreshold ||
284
+ Math.abs( t.pageY - startY ) > moveThreshold );
285
+
286
+ if ( didScroll && !didCancel ) {
287
+ triggerVirtualEvent( "vmousecancel", event, flags );
288
+ }
289
+
290
+ triggerVirtualEvent( "vmousemove", event, flags );
291
+ startResetTimer();
292
+ }
293
+
294
+ function handleTouchEnd( event ) {
295
+ if ( blockTouchTriggers ) {
296
+ return;
297
+ }
298
+
299
+ disableTouchBindings();
300
+
301
+ var flags = getVirtualBindingFlags( event.target ),
302
+ ve, t;
303
+ triggerVirtualEvent( "vmouseup", event, flags );
304
+
305
+ if ( !didScroll ) {
306
+ ve = triggerVirtualEvent( "vclick", event, flags );
307
+ if ( ve && ve.isDefaultPrevented() ) {
308
+ // The target of the mouse events that follow the touchend
309
+ // event don't necessarily match the target used during the
310
+ // touch. This means we need to rely on coordinates for blocking
311
+ // any click that is generated.
312
+ t = getNativeEvent( event ).changedTouches[ 0 ];
313
+ clickBlockList.push({
314
+ touchID: lastTouchID,
315
+ x: t.clientX,
316
+ y: t.clientY
317
+ });
318
+
319
+ // Prevent any mouse events that follow from triggering
320
+ // virtual event notifications.
321
+ blockMouseTriggers = true;
322
+ }
323
+ }
324
+ triggerVirtualEvent( "vmouseout", event, flags);
325
+ didScroll = false;
326
+
327
+ startResetTimer();
328
+ }
329
+
330
+ function hasVirtualBindings( ele ) {
331
+ var bindings = $.data( ele, dataPropertyName ),
332
+ k;
333
+
334
+ if ( bindings ) {
335
+ for ( k in bindings ) {
336
+ if ( bindings[ k ] ) {
337
+ return true;
338
+ }
339
+ }
340
+ }
341
+ return false;
342
+ }
343
+
344
+ function dummyMouseHandler() {}
345
+
346
+ function getSpecialEventObject( eventType ) {
347
+ var realType = eventType.substr( 1 );
348
+
349
+ return {
350
+ setup: function(/* data, namespace */) {
351
+ // If this is the first virtual mouse binding for this element,
352
+ // add a bindings object to its data.
353
+
354
+ if ( !hasVirtualBindings( this ) ) {
355
+ $.data( this, dataPropertyName, {} );
356
+ }
357
+
358
+ // If setup is called, we know it is the first binding for this
359
+ // eventType, so initialize the count for the eventType to zero.
360
+ var bindings = $.data( this, dataPropertyName );
361
+ bindings[ eventType ] = true;
362
+
363
+ // If this is the first virtual mouse event for this type,
364
+ // register a global handler on the document.
365
+
366
+ activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1;
367
+
368
+ if ( activeDocHandlers[ eventType ] === 1 ) {
369
+ $document.bind( realType, mouseEventCallback );
370
+ }
371
+
372
+ // Some browsers, like Opera Mini, won't dispatch mouse/click events
373
+ // for elements unless they actually have handlers registered on them.
374
+ // To get around this, we register dummy handlers on the elements.
375
+
376
+ $( this ).bind( realType, dummyMouseHandler );
377
+
378
+ // For now, if event capture is not supported, we rely on mouse handlers.
379
+ if ( eventCaptureSupported ) {
380
+ // If this is the first virtual mouse binding for the document,
381
+ // register our touchstart handler on the document.
382
+
383
+ activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1;
384
+
385
+ if ( activeDocHandlers[ "touchstart" ] === 1 ) {
386
+ $document.bind( "touchstart", handleTouchStart )
387
+ .bind( "touchend", handleTouchEnd )
388
+
389
+ // On touch platforms, touching the screen and then dragging your finger
390
+ // causes the window content to scroll after some distance threshold is
391
+ // exceeded. On these platforms, a scroll prevents a click event from being
392
+ // dispatched, and on some platforms, even the touchend is suppressed. To
393
+ // mimic the suppression of the click event, we need to watch for a scroll
394
+ // event. Unfortunately, some platforms like iOS don't dispatch scroll
395
+ // events until *AFTER* the user lifts their finger (touchend). This means
396
+ // we need to watch both scroll and touchmove events to figure out whether
397
+ // or not a scroll happenens before the touchend event is fired.
398
+
399
+ .bind( "touchmove", handleTouchMove )
400
+ .bind( "scroll", handleScroll );
401
+ }
402
+ }
403
+ },
404
+
405
+ teardown: function(/* data, namespace */) {
406
+ // If this is the last virtual binding for this eventType,
407
+ // remove its global handler from the document.
408
+
409
+ --activeDocHandlers[ eventType ];
410
+
411
+ if ( !activeDocHandlers[ eventType ] ) {
412
+ $document.unbind( realType, mouseEventCallback );
413
+ }
414
+
415
+ if ( eventCaptureSupported ) {
416
+ // If this is the last virtual mouse binding in existence,
417
+ // remove our document touchstart listener.
418
+
419
+ --activeDocHandlers[ "touchstart" ];
420
+
421
+ if ( !activeDocHandlers[ "touchstart" ] ) {
422
+ $document.unbind( "touchstart", handleTouchStart )
423
+ .unbind( "touchmove", handleTouchMove )
424
+ .unbind( "touchend", handleTouchEnd )
425
+ .unbind( "scroll", handleScroll );
426
+ }
427
+ }
428
+
429
+ var $this = $( this ),
430
+ bindings = $.data( this, dataPropertyName );
431
+
432
+ // teardown may be called when an element was
433
+ // removed from the DOM. If this is the case,
434
+ // jQuery core may have already stripped the element
435
+ // of any data bindings so we need to check it before
436
+ // using it.
437
+ if ( bindings ) {
438
+ bindings[ eventType ] = false;
439
+ }
440
+
441
+ // Unregister the dummy event handler.
442
+
443
+ $this.unbind( realType, dummyMouseHandler );
444
+
445
+ // If this is the last virtual mouse binding on the
446
+ // element, remove the binding data from the element.
447
+
448
+ if ( !hasVirtualBindings( this ) ) {
449
+ $this.removeData( dataPropertyName );
450
+ }
451
+ }
452
+ };
453
+ }
454
+
455
+ // Expose our custom events to the jQuery bind/unbind mechanism.
456
+
457
+ for ( i = 0; i < virtualEventNames.length; i++ ) {
458
+ $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] );
459
+ }
460
+
461
+ // Add a capture click handler to block clicks.
462
+ // Note that we require event capture support for this so if the device
463
+ // doesn't support it, we punt for now and rely solely on mouse events.
464
+ if ( eventCaptureSupported ) {
465
+ document.addEventListener( "click", function( e ) {
466
+ var cnt = clickBlockList.length,
467
+ target = e.target,
468
+ x, y, ele, i, o, touchID;
469
+
470
+ if ( cnt ) {
471
+ x = e.clientX;
472
+ y = e.clientY;
473
+ threshold = $.vmouse.clickDistanceThreshold;
474
+
475
+ // The idea here is to run through the clickBlockList to see if
476
+ // the current click event is in the proximity of one of our
477
+ // vclick events that had preventDefault() called on it. If we find
478
+ // one, then we block the click.
479
+ //
480
+ // Why do we have to rely on proximity?
481
+ //
482
+ // Because the target of the touch event that triggered the vclick
483
+ // can be different from the target of the click event synthesized
484
+ // by the browser. The target of a mouse/click event that is synthesized
485
+ // from a touch event seems to be implementation specific. For example,
486
+ // some browsers will fire mouse/click events for a link that is near
487
+ // a touch event, even though the target of the touchstart/touchend event
488
+ // says the user touched outside the link. Also, it seems that with most
489
+ // browsers, the target of the mouse/click event is not calculated until the
490
+ // time it is dispatched, so if you replace an element that you touched
491
+ // with another element, the target of the mouse/click will be the new
492
+ // element underneath that point.
493
+ //
494
+ // Aside from proximity, we also check to see if the target and any
495
+ // of its ancestors were the ones that blocked a click. This is necessary
496
+ // because of the strange mouse/click target calculation done in the
497
+ // Android 2.1 browser, where if you click on an element, and there is a
498
+ // mouse/click handler on one of its ancestors, the target will be the
499
+ // innermost child of the touched element, even if that child is no where
500
+ // near the point of touch.
501
+
502
+ ele = target;
503
+
504
+ while ( ele ) {
505
+ for ( i = 0; i < cnt; i++ ) {
506
+ o = clickBlockList[ i ];
507
+ touchID = 0;
508
+
509
+ if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) ||
510
+ $.data( ele, touchTargetPropertyName ) === o.touchID ) {
511
+ // XXX: We may want to consider removing matches from the block list
512
+ // instead of waiting for the reset timer to fire.
513
+ e.preventDefault();
514
+ e.stopPropagation();
515
+ return;
516
+ }
517
+ }
518
+ ele = ele.parentNode;
519
+ }
520
+ }
521
+ }, true);
522
+ }
523
+ })( jQuery, window, document );
524
+
525
+ (function( $ ) {
526
+ $.mobile = {};
527
+ }( jQuery ));
528
+
529
+ (function( $, undefined ) {
530
+ var support = {
531
+ touch: "ontouchend" in document
532
+ };
533
+
534
+ $.mobile.support = $.mobile.support || {};
535
+ $.extend( $.support, support );
536
+ $.extend( $.mobile.support, support );
537
+ }( jQuery ));
538
+
539
+
540
+ (function( $, window, undefined ) {
541
+ var $document = $( document ),
542
+ supportTouch = $.mobile.support.touch,
543
+ scrollEvent = "touchmove scroll",
544
+ touchStartEvent = supportTouch ? "touchstart" : "mousedown",
545
+ touchStopEvent = supportTouch ? "touchend" : "mouseup",
546
+ touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
547
+
548
+ // setup new event shortcuts
549
+ $.each( ( "touchstart touchmove touchend " +
550
+ "tap taphold " +
551
+ "swipe swipeleft swiperight " +
552
+ "scrollstart scrollstop" ).split( " " ), function( i, name ) {
553
+
554
+ $.fn[ name ] = function( fn ) {
555
+ return fn ? this.bind( name, fn ) : this.trigger( name );
556
+ };
557
+
558
+ // jQuery < 1.8
559
+ if ( $.attrFn ) {
560
+ $.attrFn[ name ] = true;
561
+ }
562
+ });
563
+
564
+ function triggerCustomEvent( obj, eventType, event, bubble ) {
565
+ var originalType = event.type;
566
+ event.type = eventType;
567
+ if ( bubble ) {
568
+ $.event.trigger( event, undefined, obj );
569
+ } else {
570
+ $.event.dispatch.call( obj, event );
571
+ }
572
+ event.type = originalType;
573
+ }
574
+
575
+ // also handles scrollstop
576
+ $.event.special.scrollstart = {
577
+
578
+ enabled: true,
579
+ setup: function() {
580
+
581
+ var thisObject = this,
582
+ $this = $( thisObject ),
583
+ scrolling,
584
+ timer;
585
+
586
+ function trigger( event, state ) {
587
+ scrolling = state;
588
+ triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event );
589
+ }
590
+
591
+ // iPhone triggers scroll after a small delay; use touchmove instead
592
+ $this.bind( scrollEvent, function( event ) {
593
+
594
+ if ( !$.event.special.scrollstart.enabled ) {
595
+ return;
596
+ }
597
+
598
+ if ( !scrolling ) {
599
+ trigger( event, true );
600
+ }
601
+
602
+ clearTimeout( timer );
603
+ timer = setTimeout( function() {
604
+ trigger( event, false );
605
+ }, 50 );
606
+ });
607
+ },
608
+ teardown: function() {
609
+ $( this ).unbind( scrollEvent );
610
+ }
611
+ };
612
+
613
+ // also handles taphold
614
+ $.event.special.tap = {
615
+ tapholdThreshold: 750,
616
+ emitTapOnTaphold: true,
617
+ setup: function() {
618
+ var thisObject = this,
619
+ $this = $( thisObject ),
620
+ isTaphold = false;
621
+
622
+ $this.bind( "vmousedown", function( event ) {
623
+ isTaphold = false;
624
+ if ( event.which && event.which !== 1 ) {
625
+ return false;
626
+ }
627
+
628
+ var origTarget = event.target,
629
+ timer;
630
+
631
+ function clearTapTimer() {
632
+ clearTimeout( timer );
633
+ }
634
+
635
+ function clearTapHandlers() {
636
+ clearTapTimer();
637
+
638
+ $this.unbind( "vclick", clickHandler )
639
+ .unbind( "vmouseup", clearTapTimer );
640
+ $document.unbind( "vmousecancel", clearTapHandlers );
641
+ }
642
+
643
+ function clickHandler( event ) {
644
+ clearTapHandlers();
645
+
646
+ // ONLY trigger a 'tap' event if the start target is
647
+ // the same as the stop target.
648
+ if ( !isTaphold && origTarget === event.target ) {
649
+ triggerCustomEvent( thisObject, "tap", event );
650
+ } else if ( isTaphold ) {
651
+ event.preventDefault();
652
+ }
653
+ }
654
+
655
+ $this.bind( "vmouseup", clearTapTimer )
656
+ .bind( "vclick", clickHandler );
657
+ $document.bind( "vmousecancel", clearTapHandlers );
658
+
659
+ timer = setTimeout( function() {
660
+ if ( !$.event.special.tap.emitTapOnTaphold ) {
661
+ isTaphold = true;
662
+ }
663
+ triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) );
664
+ }, $.event.special.tap.tapholdThreshold );
665
+ });
666
+ },
667
+ teardown: function() {
668
+ $( this ).unbind( "vmousedown" ).unbind( "vclick" ).unbind( "vmouseup" );
669
+ $document.unbind( "vmousecancel" );
670
+ }
671
+ };
672
+
673
+ // Also handles swipeleft, swiperight
674
+ $.event.special.swipe = {
675
+
676
+ // More than this horizontal displacement, and we will suppress scrolling.
677
+ scrollSupressionThreshold: 30,
678
+
679
+ // More time than this, and it isn't a swipe.
680
+ durationThreshold: 1000,
681
+
682
+ // Swipe horizontal displacement must be more than this.
683
+ horizontalDistanceThreshold: 30,
684
+
685
+ // Swipe vertical displacement must be less than this.
686
+ verticalDistanceThreshold: 30,
687
+
688
+ getLocation: function ( event ) {
689
+ var winPageX = window.pageXOffset,
690
+ winPageY = window.pageYOffset,
691
+ x = event.clientX,
692
+ y = event.clientY;
693
+
694
+ if ( event.pageY === 0 && Math.floor( y ) > Math.floor( event.pageY ) ||
695
+ event.pageX === 0 && Math.floor( x ) > Math.floor( event.pageX ) ) {
696
+
697
+ // iOS4 clientX/clientY have the value that should have been
698
+ // in pageX/pageY. While pageX/page/ have the value 0
699
+ x = x - winPageX;
700
+ y = y - winPageY;
701
+ } else if ( y < ( event.pageY - winPageY) || x < ( event.pageX - winPageX ) ) {
702
+
703
+ // Some Android browsers have totally bogus values for clientX/Y
704
+ // when scrolling/zooming a page. Detectable since clientX/clientY
705
+ // should never be smaller than pageX/pageY minus page scroll
706
+ x = event.pageX - winPageX;
707
+ y = event.pageY - winPageY;
708
+ }
709
+
710
+ return {
711
+ x: x,
712
+ y: y
713
+ };
714
+ },
715
+
716
+ start: function( event ) {
717
+ var data = event.originalEvent.touches ?
718
+ event.originalEvent.touches[ 0 ] : event,
719
+ location = $.event.special.swipe.getLocation( data );
720
+ return {
721
+ time: ( new Date() ).getTime(),
722
+ coords: [ location.x, location.y ],
723
+ origin: $( event.target )
724
+ };
725
+ },
726
+
727
+ stop: function( event ) {
728
+ var data = event.originalEvent.touches ?
729
+ event.originalEvent.touches[ 0 ] : event,
730
+ location = $.event.special.swipe.getLocation( data );
731
+ return {
732
+ time: ( new Date() ).getTime(),
733
+ coords: [ location.x, location.y ]
734
+ };
735
+ },
736
+
737
+ handleSwipe: function( start, stop, thisObject, origTarget ) {
738
+ if ( stop.time - start.time < $.event.special.swipe.durationThreshold &&
739
+ Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold &&
740
+ Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
741
+ var direction = start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight";
742
+
743
+ triggerCustomEvent( thisObject, "swipe", $.Event( "swipe", { target: origTarget, swipestart: start, swipestop: stop }), true );
744
+ triggerCustomEvent( thisObject, direction,$.Event( direction, { target: origTarget, swipestart: start, swipestop: stop } ), true );
745
+ return true;
746
+ }
747
+ return false;
748
+
749
+ },
750
+
751
+ // This serves as a flag to ensure that at most one swipe event event is
752
+ // in work at any given time
753
+ eventInProgress: false,
754
+
755
+ setup: function() {
756
+ var events,
757
+ thisObject = this,
758
+ $this = $( thisObject ),
759
+ context = {};
760
+
761
+ // Retrieve the events data for this element and add the swipe context
762
+ events = $.data( this, "mobile-events" );
763
+ if ( !events ) {
764
+ events = { length: 0 };
765
+ $.data( this, "mobile-events", events );
766
+ }
767
+ events.length++;
768
+ events.swipe = context;
769
+
770
+ context.start = function( event ) {
771
+
772
+ // Bail if we're already working on a swipe event
773
+ if ( $.event.special.swipe.eventInProgress ) {
774
+ return;
775
+ }
776
+ $.event.special.swipe.eventInProgress = true;
777
+
778
+ var stop,
779
+ start = $.event.special.swipe.start( event ),
780
+ origTarget = event.target,
781
+ emitted = false;
782
+
783
+ context.move = function( event ) {
784
+ if ( !start || event.isDefaultPrevented() ) {
785
+ return;
786
+ }
787
+
788
+ stop = $.event.special.swipe.stop( event );
789
+ if ( !emitted ) {
790
+ emitted = $.event.special.swipe.handleSwipe( start, stop, thisObject, origTarget );
791
+ if ( emitted ) {
792
+
793
+ // Reset the context to make way for the next swipe event
794
+ $.event.special.swipe.eventInProgress = false;
795
+ }
796
+ }
797
+ // prevent scrolling
798
+ if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
799
+ event.preventDefault();
800
+ }
801
+ };
802
+
803
+ context.stop = function() {
804
+ emitted = true;
805
+
806
+ // Reset the context to make way for the next swipe event
807
+ $.event.special.swipe.eventInProgress = false;
808
+ $document.off( touchMoveEvent, context.move );
809
+ context.move = null;
810
+ };
811
+
812
+ $document.on( touchMoveEvent, context.move )
813
+ .one( touchStopEvent, context.stop );
814
+ };
815
+ $this.on( touchStartEvent, context.start );
816
+ },
817
+
818
+ teardown: function() {
819
+ var events, context;
820
+
821
+ events = $.data( this, "mobile-events" );
822
+ if ( events ) {
823
+ context = events.swipe;
824
+ delete events.swipe;
825
+ events.length--;
826
+ if ( events.length === 0 ) {
827
+ $.removeData( this, "mobile-events" );
828
+ }
829
+ }
830
+
831
+ if ( context ) {
832
+ if ( context.start ) {
833
+ $( this ).off( touchStartEvent, context.start );
834
+ }
835
+ if ( context.move ) {
836
+ $document.off( touchMoveEvent, context.move );
837
+ }
838
+ if ( context.stop ) {
839
+ $document.off( touchStopEvent, context.stop );
840
+ }
841
+ }
842
+ }
843
+ };
844
+ $.each({
845
+ scrollstop: "scrollstart",
846
+ taphold: "tap",
847
+ swipeleft: "swipe.left",
848
+ swiperight: "swipe.right"
849
+ }, function( event, sourceEvent ) {
850
+
851
+ $.event.special[ event ] = {
852
+ setup: function() {
853
+ $( this ).bind( sourceEvent, $.noop );
854
+ },
855
+ teardown: function() {
856
+ $( this ).unbind( sourceEvent );
857
+ }
858
+ };
859
+ });
860
+
861
+ })( jQuery, this );
862
+
863
+
864
+ }));
resources/jquery.mobile.custom.min.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
-
3
  (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
1
+ /*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
+
3
  (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});
resources/mce-button.css CHANGED
@@ -1,8 +1,8 @@
1
- /*i.mce-i-serious_slider:before {
2
- font-family: "dashicons";
3
- content: "\f116";
4
- }*/
5
-
6
- i.mce-i-serious_slider {
7
- background: #FFF url(images/serious-slider-editor-icon.png) no-repeat;
8
- }
1
+ /*i.mce-i-serious_slider:before {
2
+ font-family: "dashicons";
3
+ content: "\f116";
4
+ }*/
5
+
6
+ i.mce-i-serious_slider {
7
+ background: transparent url(images/serious-slider-mce-icon.png) no-repeat;
8
+ }
resources/mce-button.js CHANGED
@@ -1,137 +1,137 @@
1
-
2
- function cryout_serious_slider_getsliders() {
3
- output = [ {text: CRYOUT_MCE_LOCALIZED.text_retrieving_sliders, value: '0'} ]
4
-
5
- jQuery.ajax(
6
- cryout_serious_slider_ajax.ajaxurl,
7
- { 'method': 'POST', 'data' : { 'action': 'cryout_serious_slider_ajax' }, async: false, dataType: 'json',
8
- 'success': function( data ) {
9
- output = data;
10
- } }
11
- ).fail(function() {
12
- output = [ {text: CRYOUT_MCE_LOCALIZED.text_retrieving_sliders_error, value: '0'} ]
13
- });
14
- return output;
15
- }
16
-
17
- (function() {
18
- tinymce.PluginManager.add('serious_slider', function( editor, url ) {
19
- var sh_tag = 'serious-slider';
20
-
21
- //helper functions
22
- function getAttr(s, n) {
23
- n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
24
- return n ? window.decodeURIComponent(n[1]) : '';
25
- };
26
-
27
- function html( cls, data ,con) {
28
- var placeholder = url + '/img/' + getAttr(data,'type') + '.jpg';
29
- data = window.encodeURIComponent( data );
30
- content = window.encodeURIComponent( con );
31
-
32
- return '<img src="' + placeholder + '" class="mceItem ' + cls + '" ' + 'data-sh-attr="' + data + '" data-sh-content="'+ con+'" data-mce-resize="false" data-mce-placeholder="1" />';
33
- }
34
-
35
- function replaceShortcodes( content ) {
36
- return content.replace( /\[serious_slider([^\]]*)\]([^\]]*)\[\/serious_slider\]/g, function( all,attr,con) {
37
- return html( 'wp-serious_slider', attr , con);
38
- });
39
- }
40
-
41
- function restoreShortcodes( content ) {
42
- return content.replace( /(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g, function( match, image ) {
43
- var data = getAttr( image, 'data-sh-attr' );
44
- var con = getAttr( image, 'data-sh-content' );
45
-
46
- if ( data ) {
47
- return '<p>[' + sh_tag + data + ']' + con + '[/'+sh_tag+']</p>';
48
- }
49
- return match;
50
- });
51
- }
52
-
53
- //add popup
54
- editor.addCommand('serious_slider_popup', function(ui, v) {
55
-
56
- //setup defaults
57
- var sid = '0'; if (v.sid) sid = v.sid;
58
-
59
- editor.windowManager.open( {
60
- title: CRYOUT_MCE_LOCALIZED.text_serious_slider,
61
- width: 500,
62
- height: 150,
63
- // style: 'padding: 2em',
64
- buttons: [{
65
- text: CRYOUT_MCE_LOCALIZED.text_insert_slider,
66
- classes: 'widget btn primary first',
67
- style: 'width: 150px',
68
- onclick: 'submit'
69
- },
70
- {
71
- text: CRYOUT_MCE_LOCALIZED.text_cancel,
72
- classes: 'widget btn',
73
- onclick: 'close'
74
- }],
75
- body: [
76
- {
77
- type: 'listbox',
78
- name: 'sid',
79
- label: CRYOUT_MCE_LOCALIZED.text_select_slider,
80
- value: sid,
81
- 'values': cryout_serious_slider_getsliders(),
82
- tooltip: ''
83
- },
84
-
85
- ],
86
- onsubmit: function( e ) {
87
- var shortcode_str = '[' + sh_tag;
88
-
89
- if ( typeof e.data.sid != 'undefined')
90
- shortcode_str += ' id="' + e.data.sid + '"';
91
- shortcode_str += ']';
92
-
93
- //insert shortcode to tinymce
94
- editor.insertContent( shortcode_str);
95
- }
96
- });
97
- });
98
-
99
- //add button
100
- editor.addButton('serious_slider', {
101
- title: CRYOUT_MCE_LOCALIZED.text_add_slider,
102
- icon: 'serious_slider',
103
- tooltip: CRYOUT_MCE_LOCALIZED.text_serious_slider_tooltip,
104
- onclick: function() {
105
- editor.execCommand('serious_slider_popup','',{
106
- });
107
- }
108
- });
109
-
110
- /*//replace from shortcode to an image placeholder
111
- editor.on('BeforeSetcontent', function(event){
112
- event.content = replaceShortcodes( event.content );
113
- });
114
-
115
- //replace from image placeholder to shortcode
116
- editor.on('GetContent', function(event){
117
- event.content = restoreShortcodes(event.content);
118
- });
119
-
120
- //open popup on placeholder double click
121
- editor.on('DblClick',function(e) {
122
- var cls = e.target.className.indexOf('wp-serious_slider');
123
- if ( e.target.nodeName == 'IMG' && e.target.className.indexOf('wp-serious_slider') > -1 ) {
124
- var title = e.target.attributes['data-sh-attr'].value;
125
- title = window.decodeURIComponent(title);
126
- console.log(title);
127
- var content = e.target.attributes['data-sh-content'].value;
128
- editor.execCommand('serious_slider_popup','',{
129
- header : getAttr(title,'header'),
130
- footer : getAttr(title,'footer'),
131
- type : getAttr(title,'type'),
132
- content: content
133
- });
134
- }
135
- }); */
136
- });
137
- })();
1
+
2
+ function cryout_serious_slider_getsliders() {
3
+ output = [ {text: CRYOUT_MCE_LOCALIZED.text_retrieving_sliders, value: '0'} ]
4
+
5
+ jQuery.ajax(
6
+ cryout_serious_slider_ajax.ajaxurl,
7
+ { 'method': 'POST', 'data' : { 'action': 'cryout_serious_slider_ajax' }, async: false, dataType: 'json',
8
+ 'success': function( data ) {
9
+ output = data;
10
+ } }
11
+ ).fail(function() {
12
+ output = [ {text: CRYOUT_MCE_LOCALIZED.text_retrieving_sliders_error, value: '0'} ]
13
+ });
14
+ return output;
15
+ }
16
+
17
+ (function() {
18
+ tinymce.PluginManager.add('serious_slider', function( editor, url ) {
19
+ var sh_tag = 'serious-slider';
20
+
21
+ //helper functions
22
+ function getAttr(s, n) {
23
+ n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
24
+ return n ? window.decodeURIComponent(n[1]) : '';
25
+ };
26
+
27
+ function html( cls, data ,con) {
28
+ var placeholder = url + '/img/' + getAttr(data,'type') + '.jpg';
29
+ data = window.encodeURIComponent( data );
30
+ content = window.encodeURIComponent( con );
31
+
32
+ return '<img src="' + placeholder + '" class="mceItem ' + cls + '" ' + 'data-sh-attr="' + data + '" data-sh-content="'+ con+'" data-mce-resize="false" data-mce-placeholder="1" />';
33
+ }
34
+
35
+ function replaceShortcodes( content ) {
36
+ return content.replace( /\[serious_slider([^\]]*)\]([^\]]*)\[\/serious_slider\]/g, function( all,attr,con) {
37
+ return html( 'wp-serious_slider', attr , con);
38
+ });
39
+ }
40
+
41
+ function restoreShortcodes( content ) {
42
+ return content.replace( /(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g, function( match, image ) {
43
+ var data = getAttr( image, 'data-sh-attr' );
44
+ var con = getAttr( image, 'data-sh-content' );
45
+
46
+ if ( data ) {
47
+ return '<p>[' + sh_tag + data + ']' + con + '[/'+sh_tag+']</p>';
48
+ }
49
+ return match;
50
+ });
51
+ }
52
+
53
+ //add popup
54
+ editor.addCommand('serious_slider_popup', function(ui, v) {
55
+
56
+ //setup defaults
57
+ var sid = '0'; if (v.sid) sid = v.sid;
58
+
59
+ editor.windowManager.open( {
60
+ title: CRYOUT_MCE_LOCALIZED.text_serious_slider,
61
+ width: 500,
62
+ height: 150,
63
+ // style: 'padding: 2em',
64
+ buttons: [{
65
+ text: CRYOUT_MCE_LOCALIZED.text_insert_slider,
66
+ classes: 'widget btn primary first',
67
+ style: 'width: 150px',
68
+ onclick: 'submit'
69
+ },
70
+ {
71
+ text: CRYOUT_MCE_LOCALIZED.text_cancel,
72
+ classes: 'widget btn',
73
+ onclick: 'close'
74
+ }],
75
+ body: [
76
+ {
77
+ type: 'listbox',
78
+ name: 'sid',
79
+ label: CRYOUT_MCE_LOCALIZED.text_select_slider,
80
+ value: sid,
81
+ 'values': cryout_serious_slider_getsliders(),
82
+ tooltip: ''
83
+ },
84
+
85
+ ],
86
+ onsubmit: function( e ) {
87
+ var shortcode_str = '[' + sh_tag;
88
+
89
+ if ( typeof e.data.sid != 'undefined')
90
+ shortcode_str += ' id="' + e.data.sid + '"';
91
+ shortcode_str += ']';
92
+
93
+ //insert shortcode to tinymce
94
+ editor.insertContent( shortcode_str);
95
+ }
96
+ });
97
+ });
98
+
99
+ //add button
100
+ editor.addButton('serious_slider', {
101
+ title: CRYOUT_MCE_LOCALIZED.text_add_slider,
102
+ icon: 'serious_slider',
103
+ tooltip: CRYOUT_MCE_LOCALIZED.text_serious_slider_tooltip,
104
+ onclick: function() {
105
+ editor.execCommand('serious_slider_popup','',{
106
+ });
107
+ }
108
+ });
109
+
110
+ /*//replace from shortcode to an image placeholder
111
+ editor.on('BeforeSetcontent', function(event){
112
+ event.content = replaceShortcodes( event.content );
113
+ });
114
+
115
+ //replace from image placeholder to shortcode
116
+ editor.on('GetContent', function(event){
117
+ event.content = restoreShortcodes(event.content);
118
+ });
119
+
120
+ //open popup on placeholder double click
121
+ editor.on('DblClick',function(e) {
122
+ var cls = e.target.className.indexOf('wp-serious_slider');
123
+ if ( e.target.nodeName == 'IMG' && e.target.className.indexOf('wp-serious_slider') > -1 ) {
124
+ var title = e.target.attributes['data-sh-attr'].value;
125
+ title = window.decodeURIComponent(title);
126
+ console.log(title);
127
+ var content = e.target.attributes['data-sh-content'].value;
128
+ editor.execCommand('serious_slider_popup','',{
129
+ header : getAttr(title,'header'),
130
+ footer : getAttr(title,'footer'),
131
+ type : getAttr(title,'type'),
132
+ content: content
133
+ });
134
+ }
135
+ }); */
136
+ });
137
+ })();
resources/slider.js CHANGED
@@ -1,332 +1,332 @@
1
- /*!
2
- * Bootstrap v3.3.6 (http://getbootstrap.com)
3
- * Copyright 2011-2015 Twitter, Inc.
4
- * Licensed under the MIT license
5
- */
6
-
7
- if (typeof jQuery === 'undefined') {
8
- throw new Error('Bootstrap\'s JavaScript requires jQuery')
9
- }
10
-
11
- +function ($) {
12
- 'use strict';
13
- var version = $.fn.jquery.split(' ')[0].split('.')
14
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
15
- throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
16
- }
17
- }(jQuery);
18
-
19
- /* ========================================================================
20
- * Bootstrap: transition.js v3.3.6
21
- * http://getbootstrap.com/javascript/#transitions
22
- * ========================================================================
23
- * Copyright 2011-2015 Twitter, Inc.
24
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25
- * ======================================================================== */
26
-
27
-
28
- +function ($) {
29
- 'use strict';
30
-
31
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
32
- // ============================================================
33
-
34
- function transitionEnd() {
35
- var el = document.createElement('bootstrap')
36
-
37
- var transEndEventNames = {
38
- WebkitTransition : 'webkitTransitionEnd',
39
- MozTransition : 'transitionend',
40
- OTransition : 'oTransitionEnd otransitionend',
41
- transition : 'transitionend'
42
- }
43
-
44
- for (var name in transEndEventNames) {
45
- if (el.style[name] !== undefined) {
46
- return { end: transEndEventNames[name] }
47
- }
48
- }
49
-
50
- return false // explicit for ie8 (._.)
51
- }
52
-
53
- // http://blog.alexmaccaw.com/css-transitions
54
- $.fn.emulateTransitionEnd = function (duration) {
55
- var called = false
56
- var $el = this
57
- $(this).one('bsTransitionEnd', function () { called = true })
58
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59
- setTimeout(callback, duration)
60
- return this
61
- }
62
-
63
- $(function () {
64
- $.support.transition = transitionEnd()
65
-
66
- if (!$.support.transition) return
67
-
68
- $.event.special.bsTransitionEnd = {
69
- bindType: $.support.transition.end,
70
- delegateType: $.support.transition.end,
71
- handle: function (e) {
72
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73
- }
74
- }
75
- })
76
-
77
- }(jQuery);
78
-
79
-
80
-
81
- /* ========================================================================
82
- * Bootstrap: carousel.js v3.3.6
83
- * http://getbootstrap.com/javascript/#carousel
84
- * ========================================================================
85
- * Copyright 2011-2015 Twitter, Inc.
86
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
87
- * ======================================================================== */
88
-
89
-
90
- +function ($) {
91
- 'use strict';
92
-
93
- // CAROUSEL CLASS DEFINITION
94
- // =========================
95
-
96
- var Carousel = function (element, options) {
97
- this.$element = $(element)
98
- this.$indicators = this.$element.find('.seriousslider-indicators')
99
- this.options = options
100
- this.paused = null
101
- this.sliding = null
102
- this.interval = null
103
- this.$active = null
104
- this.$items = null
105
-
106
- this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
107
-
108
- this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
109
- .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
110
- .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
111
- }
112
-
113
- Carousel.VERSION = '3.3.6'
114
-
115
- Carousel.DEFAULTS = {
116
- interval: 5000,
117
- stransition: 600,
118
- pause: 'hover',
119
- wrap: true,
120
- keyboard: true
121
- }
122
-
123
-
124
- Carousel.prototype.keydown = function (e) {
125
- if (/input|textarea/i.test(e.target.tagName)) return
126
- switch (e.which) {
127
- case 37: this.prev(); break
128
- case 39: this.next(); break
129
- default: return
130
- }
131
-
132
- e.preventDefault()
133
- }
134
-
135
- Carousel.prototype.cycle = function (e) {
136
- e || (this.paused = false)
137
-
138
- this.interval && clearInterval(this.interval)
139
-
140
- this.options.interval
141
- && !this.paused
142
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
143
-
144
- return this
145
- }
146
-
147
- Carousel.prototype.getItemIndex = function (item) {
148
- this.$items = item.parent().children('.item')
149
- return this.$items.index(item || this.$active)
150
- }
151
-
152
- Carousel.prototype.getItemForDirection = function (direction, active) {
153
- var activeIndex = this.getItemIndex(active)
154
- var willWrap = (direction == 'prev' && activeIndex === 0)
155
- || (direction == 'next' && activeIndex == (this.$items.length - 1))
156
- if (willWrap && !this.options.wrap) return active
157
- var delta = direction == 'prev' ? -1 : 1
158
- var itemIndex = (activeIndex + delta) % this.$items.length
159
- return this.$items.eq(itemIndex)
160
- }
161
-
162
- Carousel.prototype.to = function (pos) {
163
- var that = this
164
- var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
165
-
166
- if (pos > (this.$items.length - 1) || pos < 0) return
167
-
168
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
169
- if (activeIndex == pos) return this.pause().cycle()
170
-
171
- return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
172
- }
173
-
174
- Carousel.prototype.pause = function (e) {
175
- e || (this.paused = true)
176
-
177
- if (this.$element.find('.next, .prev').length && $.support.transition) {
178
- this.$element.trigger($.support.transition.end)
179
- this.cycle(true)
180
- }
181
-
182
- this.interval = clearInterval(this.interval)
183
-
184
- return this
185
- }
186
-
187
- Carousel.prototype.next = function () {
188
- if (this.sliding) return
189
- return this.slide('next')
190
- }
191
-
192
- Carousel.prototype.prev = function () {
193
- if (this.sliding) return
194
- return this.slide('prev')
195
- }
196
-
197
- Carousel.prototype.slide = function (type, next) {
198
- var $active = this.$element.find('.item.active')
199
- var $next = next || this.getItemForDirection(type, $active)
200
- var isCycling = this.interval
201
- var direction = type == 'next' ? 'left' : 'right'
202
- var that = this
203
-
204
- if ($next.hasClass('active')) return (this.sliding = false)
205
-
206
- var relatedTarget = $next[0]
207
- var slideEvent = $.Event('slide.bs.carousel', {
208
- relatedTarget: relatedTarget,
209
- direction: direction
210
- })
211
- this.$element.trigger(slideEvent)
212
- if (slideEvent.isDefaultPrevented()) return
213
-
214
- this.sliding = true
215
-
216
- isCycling && this.pause()
217
-
218
- if (this.$indicators.length) {
219
- this.$indicators.find('.active').removeClass('active')
220
- var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
221
- $nextIndicator && $nextIndicator.addClass('active')
222
- }
223
-
224
- var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
225
- if ($.support.transition && this.$element.hasClass('seriousslider')) {
226
- $next.addClass(type)
227
- $next[0].offsetWidth // force reflow
228
- $active.addClass(direction)
229
- $next.addClass(direction)
230
- $active
231
- .one('bsTransitionEnd', function () {
232
- $next.removeClass([type, direction].join(' ')).addClass('active')
233
- $active.removeClass(['active', direction].join(' '))
234
- that.sliding = false
235
- setTimeout(function () {
236
- that.$element.trigger(slidEvent)
237
- }, 0)
238
- })
239
- .emulateTransitionEnd(this.options.stransition)
240
- //.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
241
- } else {
242
- $active.removeClass('active')
243
- $next.addClass('active')
244
- this.sliding = false
245
- this.$element.trigger(slidEvent)
246
- }
247
-
248
- isCycling && this.cycle()
249
-
250
- return this
251
- }
252
-
253
-
254
- // CAROUSEL PLUGIN DEFINITION
255
- // ==========================
256
-
257
- function Plugin(option) {
258
- return this.each(function () {
259
- var $this = $(this);
260
- var data = $this.data('bs.carousel');
261
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option);
262
- var action = typeof option == 'string' ? option : options.slide;
263
- //console.log(data);
264
-
265
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
266
- //console.log(data);
267
- if (typeof option == 'number') data.to(option)
268
- else if (action) data[action]()
269
- else if (options.interval) data.pause().cycle()
270
- })
271
- }
272
-
273
- var old = $.fn.carousel
274
-
275
- $.fn.carousel = Plugin
276
- $.fn.carousel.Constructor = Carousel
277
-
278
-
279
- // CAROUSEL NO CONFLICT
280
- // ====================
281
-
282
- $.fn.carousel.noConflict = function () {
283
- $.fn.carousel = old
284
- return this
285
- }
286
-
287
-
288
- // CAROUSEL DATA-API
289
- // =================
290
-
291
- var clickHandler = function (e) {
292
- var href
293
- var $this = $(this)
294
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
295
- if (!$target.hasClass('seriousslider')) return
296
- var options = $.extend({}, $target.data(), $this.data())
297
- var slideIndex = $this.attr('data-slide-to')
298
- if (slideIndex) options.interval = false
299
-
300
- Plugin.call($target, options)
301
-
302
- if (slideIndex) {
303
- $target.data('bs.carousel').to(slideIndex)
304
- }
305
-
306
- e.preventDefault()
307
- }
308
-
309
- $(document)
310
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
311
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
312
-
313
- /*$(window).on('load', function () {
314
- $('[data-ride="carousel"]').each(function () {
315
- var $carousel = $(this)
316
- Plugin.call($carousel, $carousel.data())
317
- })
318
- })*/
319
-
320
- }(jQuery);
321
-
322
- /* swipe support for mobile devices */
323
- jQuery(document).ready(function() {
324
- jQuery(".cryout-serious-slider").swiperight(function() {
325
- jQuery(".cryout-serious-slider").carousel('prev');
326
- });
327
- jQuery(".cryout-serious-slider").swipeleft(function() {
328
- jQuery(".cryout-serious-slider").carousel('next');
329
- });
330
- });
331
-
332
- /* FIN */
1
+ /*!
2
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under the MIT license
5
+ */
6
+
7
+ if (typeof jQuery === 'undefined') {
8
+ throw new Error('Bootstrap\'s JavaScript requires jQuery')
9
+ }
10
+
11
+ +function ($) {
12
+ 'use strict';
13
+ var version = $.fn.jquery.split(' ')[0].split('.')
14
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
15
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
16
+ }
17
+ }(jQuery);
18
+
19
+ /* ========================================================================
20
+ * Bootstrap: transition.js v3.3.6
21
+ * http://getbootstrap.com/javascript/#transitions
22
+ * ========================================================================
23
+ * Copyright 2011-2015 Twitter, Inc.
24
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25
+ * ======================================================================== */
26
+
27
+
28
+ +function ($) {
29
+ 'use strict';
30
+
31
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
32
+ // ============================================================
33
+
34
+ function transitionEnd() {
35
+ var el = document.createElement('bootstrap')
36
+
37
+ var transEndEventNames = {
38
+ WebkitTransition : 'webkitTransitionEnd',
39
+ MozTransition : 'transitionend',
40
+ OTransition : 'oTransitionEnd otransitionend',
41
+ transition : 'transitionend'
42
+ }
43
+
44
+ for (var name in transEndEventNames) {
45
+ if (el.style[name] !== undefined) {
46
+ return { end: transEndEventNames[name] }
47
+ }
48
+ }
49
+
50
+ return false // explicit for ie8 (._.)
51
+ }
52
+
53
+ // http://blog.alexmaccaw.com/css-transitions
54
+ $.fn.emulateTransitionEnd = function (duration) {
55
+ var called = false
56
+ var $el = this
57
+ $(this).one('bsTransitionEnd', function () { called = true })
58
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59
+ setTimeout(callback, duration)
60
+ return this
61
+ }
62
+
63
+ $(function () {
64
+ $.support.transition = transitionEnd()
65
+
66
+ if (!$.support.transition) return
67
+
68
+ $.event.special.bsTransitionEnd = {
69
+ bindType: $.support.transition.end,
70
+ delegateType: $.support.transition.end,
71
+ handle: function (e) {
72
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73
+ }
74
+ }
75
+ })
76
+
77
+ }(jQuery);
78
+
79
+
80
+
81
+ /* ========================================================================
82
+ * Bootstrap: carousel.js v3.3.6
83
+ * http://getbootstrap.com/javascript/#carousel
84
+ * ========================================================================
85
+ * Copyright 2011-2015 Twitter, Inc.
86
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
87
+ * ======================================================================== */
88
+
89
+
90
+ +function ($) {
91
+ 'use strict';
92
+
93
+ // CAROUSEL CLASS DEFINITION
94
+ // =========================
95
+
96
+ var Carousel = function (element, options) {
97
+ this.$element = $(element)
98
+ this.$indicators = this.$element.find('.seriousslider-indicators')
99
+ this.options = options
100
+ this.paused = null
101
+ this.sliding = null
102
+ this.interval = null
103
+ this.$active = null
104
+ this.$items = null
105
+
106
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
107
+
108
+ this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
109
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
110
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
111
+ }
112
+
113
+ Carousel.VERSION = '3.3.6'
114
+
115
+ Carousel.DEFAULTS = {
116
+ interval: 5000,
117
+ stransition: 600,
118
+ pause: 'hover',
119
+ wrap: true,
120
+ keyboard: true
121
+ }
122
+
123
+
124
+ Carousel.prototype.keydown = function (e) {
125
+ if (/input|textarea/i.test(e.target.tagName)) return
126
+ switch (e.which) {
127
+ case 37: this.prev(); break
128
+ case 39: this.next(); break
129
+ default: return
130
+ }
131
+
132
+ e.preventDefault()
133
+ }
134
+
135
+ Carousel.prototype.cycle = function (e) {
136
+ e || (this.paused = false)
137
+
138
+ this.interval && clearInterval(this.interval)
139
+
140
+ this.options.interval
141
+ && !this.paused
142
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
143
+
144
+ return this
145
+ }
146
+
147
+ Carousel.prototype.getItemIndex = function (item) {
148
+ this.$items = item.parent().children('.item')
149
+ return this.$items.index(item || this.$active)
150
+ }
151
+
152
+ Carousel.prototype.getItemForDirection = function (direction, active) {
153
+ var activeIndex = this.getItemIndex(active)
154
+ var willWrap = (direction == 'prev' && activeIndex === 0)
155
+ || (direction == 'next' && activeIndex == (this.$items.length - 1))
156
+ if (willWrap && !this.options.wrap) return active
157
+ var delta = direction == 'prev' ? -1 : 1
158
+ var itemIndex = (activeIndex + delta) % this.$items.length
159
+ return this.$items.eq(itemIndex)
160
+ }
161
+
162
+ Carousel.prototype.to = function (pos) {
163
+ var that = this
164
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
165
+
166
+ if (pos > (this.$items.length - 1) || pos < 0) return
167
+
168
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
169
+ if (activeIndex == pos) return this.pause().cycle()
170
+
171
+ return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
172
+ }
173
+
174
+ Carousel.prototype.pause = function (e) {
175
+ e || (this.paused = true)
176
+
177
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
178
+ this.$element.trigger($.support.transition.end)
179
+ this.cycle(true)
180
+ }
181
+
182
+ this.interval = clearInterval(this.interval)
183
+
184
+ return this
185
+ }
186
+
187
+ Carousel.prototype.next = function () {
188
+ if (this.sliding) return
189
+ return this.slide('next')
190
+ }
191
+
192
+ Carousel.prototype.prev = function () {
193
+ if (this.sliding) return
194
+ return this.slide('prev')
195
+ }
196
+
197
+ Carousel.prototype.slide = function (type, next) {
198
+ var $active = this.$element.find('.item.active')
199
+ var $next = next || this.getItemForDirection(type, $active)
200
+ var isCycling = this.interval
201
+ var direction = type == 'next' ? 'left' : 'right'
202
+ var that = this
203
+
204
+ if ($next.hasClass('active')) return (this.sliding = false)
205
+
206
+ var relatedTarget = $next[0]
207
+ var slideEvent = $.Event('slide.bs.carousel', {
208
+ relatedTarget: relatedTarget,
209
+ direction: direction
210
+ })
211
+ this.$element.trigger(slideEvent)
212
+ if (slideEvent.isDefaultPrevented()) return
213
+
214
+ this.sliding = true
215
+
216
+ isCycling && this.pause()
217
+
218
+ if (this.$indicators.length) {
219
+ this.$indicators.find('.active').removeClass('active')
220
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
221
+ $nextIndicator && $nextIndicator.addClass('active')
222
+ }
223
+
224
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
225
+ if ($.support.transition && this.$element.hasClass('seriousslider')) {
226
+ $next.addClass(type)
227
+ $next[0].offsetWidth // force reflow
228
+ $active.addClass(direction)
229
+ $next.addClass(direction)
230
+ $active
231
+ .one('bsTransitionEnd', function () {
232
+ $next.removeClass([type, direction].join(' ')).addClass('active')
233
+ $active.removeClass(['active', direction].join(' '))
234
+ that.sliding = false
235
+ setTimeout(function () {
236
+ that.$element.trigger(slidEvent)
237
+ }, 0)
238
+ })
239
+ .emulateTransitionEnd(this.options.stransition)
240
+ //.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
241
+ } else {
242
+ $active.removeClass('active')
243
+ $next.addClass('active')
244
+ this.sliding = false
245
+ this.$element.trigger(slidEvent)
246
+ }
247
+
248
+ isCycling && this.cycle()
249
+
250
+ return this
251
+ }
252
+
253
+
254
+ // CAROUSEL PLUGIN DEFINITION
255
+ // ==========================
256
+
257
+ function Plugin(option) {
258
+ return this.each(function () {
259
+ var $this = $(this);
260
+ var data = $this.data('bs.carousel');
261
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option);
262
+ var action = typeof option == 'string' ? option : options.slide;
263
+ //console.log(data);
264
+
265
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
266
+ //console.log(data);
267
+ if (typeof option == 'number') data.to(option)
268
+ else if (action) data[action]()
269
+ else if (options.interval) data.pause().cycle()
270
+ })
271
+ }
272
+
273
+ var old = $.fn.carousel
274
+
275
+ $.fn.carousel = Plugin
276
+ $.fn.carousel.Constructor = Carousel
277
+
278
+
279
+ // CAROUSEL NO CONFLICT
280
+ // ====================
281
+
282
+ $.fn.carousel.noConflict = function () {
283
+ $.fn.carousel = old
284
+ return this
285
+ }
286
+
287
+
288
+ // CAROUSEL DATA-API
289
+ // =================
290
+
291
+ var clickHandler = function (e) {
292
+ var href
293
+ var $this = $(this)
294
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
295
+ if (!$target.hasClass('seriousslider')) return
296
+ var options = $.extend({}, $target.data(), $this.data())
297
+ var slideIndex = $this.attr('data-slide-to')
298
+ if (slideIndex) options.interval = false
299
+
300
+ Plugin.call($target, options)
301
+
302
+ if (slideIndex) {
303
+ $target.data('bs.carousel').to(slideIndex)
304
+ }
305
+
306
+ e.preventDefault()
307
+ }
308
+
309
+ $(document)
310
+ .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
311
+ .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
312
+
313
+ /*$(window).on('load', function () {
314
+ $('[data-ride="carousel"]').each(function () {
315
+ var $carousel = $(this)
316
+ Plugin.call($carousel, $carousel.data())
317
+ })
318
+ })*/
319
+
320
+ }(jQuery);
321
+
322
+ /* swipe support for mobile devices */
323
+ jQuery(document).ready(function() {
324
+ jQuery(".cryout-serious-slider").swiperight(function() {
325
+ jQuery(".cryout-serious-slider").carousel('prev');
326
+ });
327
+ jQuery(".cryout-serious-slider").swipeleft(function() {
328
+ jQuery(".cryout-serious-slider").carousel('next');
329
+ });
330
+ });
331
+
332
+ /* FIN */
resources/style.css CHANGED
@@ -1,812 +1,1761 @@
1
- /*!
2
- * Bootstrap v3.3.6 (http://getbootstrap.com)
3
- * Copyright 2011-2015 Twitter, Inc.
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
- */
6
-
7
- @font-face {
8
- font-family: 'serioussliderglyphs';
9
- src: url('fonts/serioussliderglyphs.eot?ap45ke');
10
- src: url('fonts/serioussliderglyphs.eot?ap45ke#iefix') format('embedded-opentype'),
11
- url('fonts/serioussliderglyphs.ttf?ap45ke') format('truetype'),
12
- url('fonts/serioussliderglyphs.woff?ap45ke') format('woff'),
13
- url('fonts/serioussliderglyphs.svg?ap45ke#serioussliderglyphs') format('svg');
14
- font-weight: normal;
15
- font-style: normal;
16
- }
17
-
18
- [class^="sicon-"], [class*=" sicon-"] {
19
- /* use !important to prevent issues with browser extensions that change fonts */
20
- font-family: 'serioussliderglyphs' !important;
21
- speak: none;
22
- font-style: normal;
23
- font-weight: normal;
24
- font-variant: normal;
25
- text-transform: none;
26
- line-height: 1;
27
-
28
- /* Better Font Rendering =========== */
29
- -webkit-font-smoothing: antialiased;
30
- -moz-osx-font-smoothing: grayscale;
31
- }
32
-
33
- .sicon-chevron-left:before {
34
- content: "\f053";
35
- }
36
- .sicon-chevron-right:before {
37
- content: "\f054";
38
- }
39
- .sicon-chevron-left2:before {
40
- content: "\e900";
41
- }
42
- .sicon-chevron-right2:before {
43
- content: "\e901";
44
- }
45
- .sicon-chevron-small-left:before {
46
- content: "\e902";
47
- }
48
- .sicon-chevron-small-right:before {
49
- content: "\e903";
50
- }
51
- .sicon-chevron-thin-left:before {
52
- content: "\e904";
53
- }
54
- .sicon-chevron-thin-right:before {
55
- content: "\e905";
56
- }
57
- .sicon-chevron-with-circle-left:before {
58
- content: "\e906";
59
- }
60
- .sicon-chevron-with-circle-right:before {
61
- content: "\e907";
62
- }
63
- .sicon-rewind:before {
64
- content: "\e051";
65
- }
66
- .sicon-fast-forward:before {
67
- content: "\e055";
68
- }
69
-
70
- .seriousslider-inner > .item img.item-image {
71
- display: block;
72
- max-width: 100%;
73
- height: auto;
74
- }
75
-
76
- .seriousslider {
77
- position: relative;
78
- margin: 0 auto;
79
- width: 100%;
80
- }
81
- .seriousslider-inner {
82
- position: relative;
83
- width: 100%;
84
- height: 100%;
85
- overflow: hidden;
86
- }
87
- .seriousslider-inner > .item {
88
- position: relative;
89
- display: none;
90
- text-align: center;
91
- }
92
- .seriousslider-inner > .item > img,
93
- .seriousslider-inner > .item > a > img {
94
- line-height: 1;
95
- }
96
-
97
- @media all and (transform-3d), (-webkit-transform-3d) {
98
- .seriousslider-inner > .item {
99
- -webkit-backface-visibility: hidden;
100
- backface-visibility: hidden;
101
- -webkit-perspective: 1000px;
102
- perspective: 1000px;
103
- }
104
- .seriousslider-inner > .item.next,
105
- .seriousslider-inner > .item.active.right {
106
- left: 0;
107
- -webkit-transform: translate3d(100%, 0, 0);
108
- transform: translate3d(100%, 0, 0);
109
- }
110
- .seriousslider-inner > .item.prev,
111
- .seriousslider-inner > .item.active.left {
112
- left: 0;
113
- -webkit-transform: translate3d(-100%, 0, 0);
114
- transform: translate3d(-100%, 0, 0);
115
- }
116
- .seriousslider-inner > .item.next.left,
117
- .seriousslider-inner > .item.prev.right,
118
- .seriousslider-inner > .item.active {
119
- left: 0;
120
- -webkit-transform: translate3d(0, 0, 0);
121
- transform: translate3d(0, 0, 0);
122
- }
123
- }
124
-
125
-
126
- .seriousslider-inner > .item {
127
- width: 100%;
128
- }
129
-
130
- .seriousslider-inner > .active,
131
- .seriousslider-inner > .next,
132
- .seriousslider-inner > .prev {
133
- display: block;
134
- }
135
- .seriousslider-inner > .active {
136
- left: 0;
137
- }
138
- .seriousslider-inner > .next,
139
- .seriousslider-inner > .prev {
140
- position: absolute;
141
- top: 0;
142
- }
143
- .seriousslider-inner > .next {
144
- left: 100%;
145
- }
146
- .seriousslider-inner > .prev {
147
- left: -100%;
148
- }
149
- .seriousslider-inner > .next.left,
150
- .seriousslider-inner > .prev.right {
151
- left: 0;
152
- }
153
- .seriousslider-inner > .active.left {
154
- left: -100%;
155
- }
156
- .seriousslider-inner > .active.right {
157
- left: 100%;
158
- }
159
-
160
- .seriousslider-overlay0 .seriousslider-control,
161
- .seriousslider-overlay0 .seriousslider-indicators {
162
- display: none;
163
- }
164
-
165
- .seriousslider-overlay1 .seriousslider-control,
166
- .seriousslider-overlay1 .seriousslider-indicators {
167
- opacity: 0;
168
- filter: alpha(opacity=0);
169
- transition: .6s ease-in-out opacity;
170
- }
171
-
172
- .seriousslider-overlay1:hover .seriousslider-control,
173
- .seriousslider-overlay1:hover .seriousslider-indicators {
174
- opacity: 1;
175
- filter: alpha(opacity=100);
176
- }
177
-
178
- .seriousslider-overlay2 .seriousslider-control {
179
- opacity: 0.5;
180
- filter: alpha(opacity=50);
181
- }
182
-
183
- /*********************
184
- =Transition Effects
185
- **********************/
186
-
187
- /* Fade transition */
188
- .seriousslider-fade .seriousslider-inner > .item {
189
- opacity: 0;
190
- -webkit-transition: .6s ease-in-out all;
191
- -o-transition: .6s ease-in-out all;
192
- transition: .6s ease-in-out all;
193
- left: 0;
194
- }
195
-
196
- .seriousslider-fade .seriousslider-inner .active {
197
- opacity: 1;
198
- }
199
-
200
- .seriousslider-fade .seriousslider-inner .active.left,
201
- .seriousslider-fade .seriousslider-inner .active.right {
202
- left: 0;
203
- opacity: 0;
204
- z-index: 1;
205
- }
206
-
207
- .seriousslider-fade .seriousslider-inner .next.left,
208
- .seriousslider-fade .seriousslider-inner .prev.right {
209
- opacity: 1;
210
- left: 0;
211
- }
212
-
213
- .seriousslider-fade .seriousslider-control {
214
- z-index: 2;
215
- }
216
-
217
- @media all and (transform-3d), (-webkit-transform-3d) {
218
- .seriousslider-fade .seriousslider-inner > .item.next,
219
- .seriousslider-fade .seriousslider-inner > .item.active.right {
220
- opacity: 0;
221
- -webkit-transform: translate3d(0, 0, 0);
222
- transform: translate3d(0, 0, 0);
223
- }
224
- .seriousslider-fade .seriousslider-inner > .item.prev,
225
- .seriousslider-fade .seriousslider-inner > .item.active.left {
226
- opacity: 0;
227
- -webkit-transform: translate3d(0, 0, 0);
228
- transform: translate3d(0, 0, 0);
229
- }
230
- .seriousslider-fade .seriousslider-inner > .item.next.left,
231
- .seriousslider-fade .seriousslider-inner > .item.prev.right,
232
- .seriousslider-fade .seriousslider-inner > .item.active {
233
- opacity: 1;
234
- -webkit-transform: translate3d(0, 0, 0);
235
- transform: translate3d(0, 0, 0);
236
- }
237
- }
238
-
239
- /*
240
- * Overslide animation
241
- **/
242
-
243
- .seriousslider-overslide .seriousslider-inner > .item {
244
- -webkit-transition: .6s ease-in-out all;
245
- -o-transition: .6s ease-in-out all;
246
- transition: .6s ease-in-out all;
247
- }
248
-
249
- .seriousslider-overslide .seriousslider-inner > .active.left,
250
- .seriousslider-overslide .seriousslider-inner > .active.right {
251
- left: 0;
252
- z-index: 0;
253
- }
254
-
255
- .seriousslider-overslide .seriousslider-inner > .next,
256
- .seriousslider-overslide .seriousslider-inner > .prev {
257
- z-index: 1;
258
-
259
- }
260
-
261
- @media all and (transform-3d), (-webkit-transform-3d) {
262
- .seriousslider-overslide .seriousslider-inner > .active.left,
263
- .seriousslider-overslide .seriousslider-inner > .active.right {
264
- -webkit-transform: translate3d(0, 0, 0);
265
- transform: translate3d(0, 0, 0);
266
- }
267
- }
268
-
269
- /*
270
- * Underslide animation
271
- **/
272
-
273
- .seriousslider-underslide .seriousslider-inner > .item {
274
- -webkit-transition: .6s ease-in-out all;
275
- -o-transition: .6s ease-in-out all;
276
- transition: .6s ease-in-out all;
277
- }
278
-
279
- .seriousslider-underslide .seriousslider-inner > .active.left,
280
- .seriousslider-underslide .seriousslider-inner > .active.right {
281
- z-index: 1;
282
- }
283
-
284
- .seriousslider-underslide .seriousslider-inner > .next,
285
- .seriousslider-underslide .seriousslider-inner > .prev {
286
- z-index: 0;
287
- left: 0;
288
- }
289
-
290
- @media all and (transform-3d), (-webkit-transform-3d) {
291
- .seriousslider-underslide .seriousslider-inner > .next,
292
- .seriousslider-underslide .seriousslider-inner > .prev {
293
- -webkit-transform: translate3d(0, 0, 0);
294
- transform: translate3d(0, 0, 0);
295
- }
296
- }
297
-
298
- /* Parallax animation */
299
-
300
- .seriousslider-parallax .seriousslider-inner > .item {
301
- -webkit-transition: .6s ease-in-out all;
302
- -o-transition: .6s ease-in-out all;
303
- transition: .6s ease-in-out all;
304
- }
305
-
306
- .seriousslider-parallax .seriousslider-inner > .active.left {
307
- left: -30%;
308
- z-index: 0;
309
- }
310
-
311
- .seriousslider-parallax .seriousslider-inner > .active.right {
312
- left: 30%;
313
- z-index: 0;
314
- }
315
-
316
- .seriousslider-parallax .seriousslider-inner > .next,
317
- .seriousslider-parallax .seriousslider-inner > .prev {
318
- z-index: 1;
319
- }
320
-
321
- @media all and (transform-3d), (-webkit-transform-3d) {
322
- .seriousslider-parallax .seriousslider-inner > .active.left {
323
- left: 0;
324
- -webkit-transform: translate3d(-30%, 0, 0);
325
- transform: translate3d(-30%, 0, 0);
326
- }
327
- .seriousslider-parallax .seriousslider-inner > .active.right {
328
- left: 0;
329
- -webkit-transform: translate3d(30%, 0, 0);
330
- transform: translate3d(30%, 0, 0);
331
- }
332
- }
333
-
334
- /* Horizontal Flip */
335
- .seriousslider-hflip .seriousslider-inner {
336
- -webkit-transform-style: preserve-3d;
337
- transform-style: preserve-3d;
338
- }
339
-
340
- .seriousslider-hflip .seriousslider-inner > .active {
341
- transform: perspective( 2000px ) rotateY( 0deg );
342
- backface-visibility: hidden;
343
- }
344
- .seriousslider-hflip .seriousslider-inner > .prev {
345
- transform: perspective( 2000px ) rotateY( -180deg );
346
- backface-visibility: hidden;
347
- left: 0;
348
- }
349
- .seriousslider-hflip .seriousslider-inner > .next {
350
- transform: perspective( 2000px ) rotateY( 180deg );
351
- backface-visibility: hidden;
352
- left: 0;
353
- }
354
-
355
- .seriousslider-hflip .seriousslider-inner > .active.left {
356
- transform: perspective( 2000px ) rotateY( -180deg );
357
- left: 0;
358
- }
359
- .seriousslider-hflip .seriousslider-inner > .active.right {
360
- transform: perspective( 2000px ) rotateY( 180deg );
361
- left: 0;
362
- }
363
- .seriousslider-hflip .seriousslider-inner > .next.left,
364
- .seriousslider-hflip .seriousslider-inner > .prev.right {
365
- transform: perspective( 2000px ) rotateY( 0deg );
366
- }
367
-
368
- /* Vertical Flip */
369
- .seriousslider-vflip .seriousslider-inner {
370
- -webkit-transform-style: preserve-3d;
371
- transform-style: preserve-3d;
372
- }
373
-
374
- .seriousslider-vflip .seriousslider-inner > .active {
375
- transform: perspective( 2000px ) rotateX( 0deg );
376
- backface-visibility: hidden;
377
- }
378
- .seriousslider-vflip .seriousslider-inner > .prev {
379
- transform: perspective( 2000px ) rotateX( -180deg );
380
- backface-visibility: hidden;
381
- left: 0;
382
- }
383
- .seriousslider-vflip .seriousslider-inner > .next {
384
- transform: perspective( 2000px ) rotateX( 180deg );
385
- backface-visibility: hidden;
386
- left: 0;
387
- }
388
- .seriousslider-vflip .seriousslider-inner > .active.left {
389
- transform: perspective( 2000px ) rotateX( -180deg );
390
- left: 0;
391
- }
392
- .seriousslider-vflip .seriousslider-inner > .active.right {
393
- transform: perspective( 2000px ) rotateX( 180deg );
394
- left: 0;
395
- }
396
- .seriousslider-vflip .seriousslider-inner > .next.left,
397
- .seriousslider-vflip .seriousslider-inner > .prev.right {
398
- transform: perspective( 2000px ) rotateX( 0deg );
399
- }
400
-
401
- /***************
402
- =Appearance
403
- ***************/
404
-
405
- /* General */
406
-
407
- .seriousslider .seriousslider-caption-title {
408
- margin: 0;
409
- line-height: 1.2;
410
- }
411
-
412
- .seriousslider-caption-text {
413
- margin-top: 1em;
414
- }
415
-
416
- .seriousslider-control {
417
- position: absolute;
418
- top: 0;
419
- bottom: 0;
420
- left: 0;
421
- text-align: center;
422
- z-index: 15;
423
- width: 10%;
424
- font-size: 30px;
425
- cursor: pointer;
426
- background: transparent;
427
- border: 0;
428
- }
429
-
430
- .seriousslider-control:hover {
431
- background: transparent;
432
- }
433
-
434
- .seriousslider-control.left {}
435
- .seriousslider-control.right {
436
- right: 0;
437
- left: auto;
438
- }
439
-
440
- .seriousslider-control:hover,
441
- .seriousslider-control:focus {
442
- }
443
-
444
- .seriousslider-control .sicon-prev,
445
- .seriousslider-control .sicon-next {
446
- position: absolute;
447
- top: 50%;
448
- z-index: 5;
449
- display: inline-block;
450
- margin-top: -0.5em;
451
- }
452
-
453
- .seriousslider-control .sicon-prev {
454
- left: 50%;
455
- margin-left: -10px;
456
- }
457
-
458
- .seriousslider-control .sicon-next {
459
- right: 50%;
460
- margin-right: -10px;
461
- }
462
-
463
- .seriousslider-control .sicon-prev,
464
- .seriousslider-control .sicon-next {}
465
-
466
- .seriousslider-control .sicon-prev:before {
467
- content: '\f053';
468
- }
469
- .seriousslider-control .sicon-next:before {
470
- content: '\f054';
471
- }
472
-
473
- .cryout-serious-slider .seriousslider-indicators {
474
- position: absolute;
475
- bottom: 10px;
476
- left: 0;
477
- right: 0;
478
- z-index: 15;
479
- padding-left: 0;
480
- text-align: center;
481
- list-style: none;
482
- margin: 0 auto;
483
- }
484
-
485
- ol.seriousslider-indicators li {
486
- display: inline-block;
487
- width: 10px;
488
- height: 10px;
489
- margin: 1px;
490
- text-indent: -999px;
491
- cursor: pointer;
492
- }
493
- ol.seriousslider-indicators .active {}
494
-
495
- .seriousslider-caption {
496
- position: absolute;
497
- right: 15%;
498
- bottom: 20px;
499
- left: 15%;
500
- z-index: 10;
501
- padding-top: 20px;
502
- padding-bottom: 20px;
503
- text-align: center;
504
- text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
505
- }
506
- .seriousslider-caption .btn {
507
- text-shadow: none;
508
- }
509
- @media screen and (min-width: 768px) {
510
- .seriousslider-caption {
511
- right: 20%;
512
- left: 20%;
513
- top: 20%;
514
- padding-bottom: 30px;
515
- }
516
- .seriousslider-indicators {
517
- bottom: 20px;
518
- }
519
- }
520
-
521
- .sr-only {
522
- position: absolute;
523
- width: 1px;
524
- height: 1px;
525
- padding: 0;
526
- margin: -1px;
527
- overflow: hidden;
528
- clip: rect(0, 0, 0, 0);
529
- border: 0;
530
- }
531
- .sr-only-focusable:active,
532
- .sr-only-focusable:focus {
533
- position: static;
534
- width: auto;
535
- height: auto;
536
- margin: 0;
537
- overflow: visible;
538
- clip: auto;
539
- }
540
-
541
- /* Default Theme */
542
- .seriousslider-boots .seriousslider-control {
543
- width: 15%;
544
- font-size: 34px;
545
- color: #fff;
546
- text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
547
- background-color: rgba(0, 0, 0, 0);
548
- transition: .3s ease-out;
549
- }
550
-
551
- .seriousslider-boots .seriousslider-control.left {
552
- background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
553
- background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
554
- background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
555
- background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
556
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
557
- background-repeat: repeat-x;
558
- }
559
- .seriousslider-boots .seriousslider-control.right {
560
- background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
561
- background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
562
- background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
563
- background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
564
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
565
- background-repeat: repeat-x;
566
- }
567
-
568
- .seriousslider-boots .seriousslider-control:hover,
569
- .seriousslider-boots .seriousslider-control:focus {
570
- color: #fff;
571
- text-decoration: none;
572
- filter: alpha(opacity=90);
573
- outline: 0;
574
- opacity: .9;
575
- }
576
-
577
- .seriousslider-boots .seriousslider-control .sicon-prev,
578
- .seriousslider-boots .seriousslider-control .sicon-next {
579
- font-family: serif;
580
- line-height: 1;
581
- }
582
- .seriousslider-boots .seriousslider-control .sicon-prev:before {
583
- content: '\f053';
584
- }
585
- .seriousslider-boots .seriousslider-control .sicon-next:before {
586
- content: '\f054';
587
- }
588
-
589
- .seriousslider-boots .seriousslider-indicators li {
590
- background-color: #000 \9;
591
- background-color: rgba(0, 0, 0, 0);
592
- border: 1px solid #fff;
593
- border-radius: 10px;
594
- transition: .3s ease-out;
595
- }
596
- .seriousslider-boots .seriousslider-indicators .active {
597
- background-color: rgba(255, 255, 255, .8);
598
- }
599
-
600
- .seriousslider-boots .seriousslider-caption-title {
601
- color: #FFF;
602
- }
603
-
604
- .seriousslider-boots .seriousslider-caption-text {
605
- color: #EEE;
606
- }
607
-
608
- .seriousslider-boots .seriousslider-caption-text a {
609
- border: 2px solid #FFF;
610
- border-radius: 100px;
611
- color: #444;
612
- background: #FFF;
613
- display: inline-block;
614
- font-weight: 400;
615
- letter-spacing: 1px;
616
- margin-top: 1em;
617
- padding: 8px 30px;
618
- text-shadow: 0 0;
619
- transition: .3s ease-out;
620
- font-size: .8em;
621
- }
622
-
623
- .seriousslider-boots .seriousslider-caption-text a:hover {
624
- color: #FFF;
625
- background: rgba(0, 0, 0, .15);
626
- }
627
-
628
- /* Light Theme */
629
- .seriousslider-light .seriousslider-caption-title {
630
- text-transform: uppercase;
631
- color: #FFF;
632
- font-weight: bold;
633
- }
634
-
635
- .seriousslider-light .seriousslider-caption-text {
636
- color: #EEE;
637
- font-weight: normal;
638
- }
639
- .seriousslider-light .seriousslider-caption-text a {
640
- border: 2px solid #FFF;
641
- color: #FFF;
642
- padding: 10px 30px;
643
- text-transform: uppercase;
644
- font-weight: bold;
645
- display: inline-block;
646
- margin-top: 1em;
647
- transition: .3s ease-out;
648
- letter-spacing: 1px;
649
- }
650
- .seriousslider-light .seriousslider-caption-text a:hover {
651
- background: rgba(255, 255, 255, .15);
652
- }
653
- .seriousslider-light .seriousslider-control {
654
- width: 7%;
655
- font-size: 44px;
656
- color: #fff;
657
- transition: .3s ease-out;
658
- }
659
-
660
- .seriousslider-light .seriousslider-control:hover {
661
- opacity: 1;
662
- }
663
-
664
- .seriousslider-light .seriousslider-control:active {
665
- opacity: .5;
666
- }
667
-
668
- .seriousslider-light .seriousslider-control .sicon-prev:before {
669
- content: '\e904';
670
- }
671
- .seriousslider-light .seriousslider-control .sicon-next:before {
672
- content: '\e905';
673
- }
674
-
675
- .seriousslider-light .seriousslider-indicators li {
676
- width: 14px;
677
- height: 5px;
678
- border: 1px solid #FFF;
679
- transition: .3s ease-out;
680
- }
681
-
682
- .seriousslider-light .seriousslider-indicators li:hover {
683
- background: rgba(255, 255, 255, .5);
684
- }
685
-
686
- .seriousslider-light .seriousslider-indicators li.active {
687
- background: rgba(255, 255, 255, .8);
688
- }
689
-
690
-
691
- /* Dark Theme */
692
- .seriousslider-dark .seriousslider-caption-title {
693
- text-transform: uppercase;
694
- color: #000;
695
- font-weight: bold;
696
- text-shadow: none;
697
- }
698
-
699
- .seriousslider-dark .seriousslider-caption-text {
700
- color: #111;
701
- font-weight: normal;
702
- text-shadow: none;
703
- }
704
- .seriousslider-dark .seriousslider-caption-text a {
705
- color: #FFF;
706
- background: rgba(0, 0, 0, .5);
707
- padding: 10px 30px;
708
- text-transform: uppercase;
709
- font-weight: bold;
710
- display: inline-block;
711
- margin-top: 1em;
712
- transition: .3s ease-out;
713
- font-size: 14px;
714
- letter-spacing: 1px;
715
- text-shadow: 0 0;
716
- border-radius: 100px;
717
- }
718
- .seriousslider-dark .seriousslider-caption-text a:hover {
719
- background: rgba(0, 0, 0, .75);
720
- }
721
- .seriousslider-dark .seriousslider-control {
722
- width: 7%;
723
- font-size: 34px;
724
- color: #fff;
725
- transition: .3s ease-out;
726
- }
727
-
728
- .seriousslider-dark .seriousslider-control:hover {
729
- opacity: 1;
730
- }
731
-
732
- .seriousslider-dark .seriousslider-control:active {
733
- opacity: .5;
734
- }
735
-
736
- .seriousslider-dark .seriousslider-control .sicon-prev:before {
737
- content: '\e900';
738
- }
739
- .seriousslider-dark .seriousslider-control .sicon-next:before {
740
- content: '\e901';
741
- }
742
- .seriousslider-dark .seriousslider-control .sicon-prev,
743
- .seriousslider-dark .seriousslider-control .sicon-next {
744
- background: rgba(0, 0, 0, .5);
745
- padding: 7px;
746
- border-radius: 100px;
747
- }
748
-
749
- .seriousslider-dark .seriousslider-indicators {
750
- }
751
-
752
- .seriousslider-dark .seriousslider-indicators li {
753
- width: 8px;
754
- height: 8px;
755
- border: 1px solid #FFF;
756
- transition: .3s ease-out;
757
- border-radius: 8px;
758
- background: rgba(0, 0, 0, .5);
759
- }
760
-
761
- .seriousslider-dark .seriousslider-indicators li:hover {
762
- background: rgba(255, 255, 255, .5);
763
- }
764
-
765
- .seriousslider-dark .seriousslider-indicators li.active {
766
- background: rgba(255, 255, 255, .8);
767
- }
768
-
769
- /* Responsiveness */
770
- @media (max-width: 1200px) {
771
-
772
- body .lp-staticslider .staticslider-caption-title,
773
- body .seriousslider.seriousslider-theme .seriousslider-caption-title {
774
- letter-spacing: 0;
775
- }
776
-
777
- .lp-staticslider .staticslider-caption,
778
- .seriousslider.seriousslider-theme .seriousslider-caption {
779
- font-size: .9em;
780
- }
781
-
782
- }
783
-
784
- @media (max-width: 800px) {
785
-
786
- .lp-staticslider .staticslider-caption,
787
- .seriousslider.seriousslider-theme .seriousslider-caption {
788
- font-size: .75em;
789
- }
790
-
791
- .seriousslider-control {
792
- font-size: 20px;
793
- }
794
-
795
- }
796
-
797
- @media (max-width: 480px) {
798
-
799
- .lp-staticslider .staticslider-caption,
800
- .seriousslider.seriousslider-theme .seriousslider-caption {
801
- font-size: .65em;
802
- }
803
-
804
- .seriousslider-control {
805
- font-size: 15px;
806
- }
807
-
808
- }
809
-
810
-
811
-
812
- /* FIN */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Based on Bootstrap v3.3.6 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+
6
+ --------------------------------------------------------------
7
+ == IMPORTANT ==
8
+ --------------------------------------------------------------
9
+
10
+ Any changes made to this or any other of the plugin's files will be lost at the next update.
11
+
12
+
13
+ -----------------------------
14
+ == TABLE OF CONTENTS ==
15
+ -----------------------------
16
+ # Glyphs
17
+ # General styling
18
+ # Transition effects
19
+ ## Fade
20
+ ## Overlisde
21
+ ## Underlisde
22
+ ## Parallax
23
+ ## Horizontal Flip
24
+ ## Vertical Flip
25
+ # Appearance
26
+ # Themes
27
+ ## Light Theme
28
+ ## Light 2 Theme
29
+ ## Dark Theme
30
+ ## Square Theme
31
+ ## Tall Theme
32
+ ## Caption Left Theme
33
+ ## Caption Bottom Theme
34
+ # Caption Animations
35
+ ## Fade
36
+ ## Slide
37
+ ## Blur
38
+ ## Zoom In
39
+ ## Zoom Out
40
+ # Caption Text Styles
41
+ # Loaders
42
+ ## Horizontal Loader
43
+ ## Circle Loader
44
+ # Responsiveness
45
+
46
+
47
+ /*********************
48
+ # GLYPHS
49
+ **********************/
50
+ @font-face {
51
+ font-family: 'serioussliderglyphs';
52
+ src: url('fonts/serioussliderglyphs.eot?ap45ke');
53
+ src: url('fonts/serioussliderglyphs.eot?ap45ke#iefix') format('embedded-opentype'),
54
+ url('fonts/serioussliderglyphs.ttf?ap45ke') format('truetype'),
55
+ url('fonts/serioussliderglyphs.woff?ap45ke') format('woff'),
56
+ url('fonts/serioussliderglyphs.svg?ap45ke#serioussliderglyphs') format('svg');
57
+ font-weight: normal;
58
+ font-style: normal;
59
+ }
60
+
61
+ [class^="sicon-"],
62
+ [class*=" sicon-"] {
63
+ /* use !important to prevent issues with browser extensions that change fonts */
64
+ font-family: 'serioussliderglyphs' !important;
65
+ speak: none;
66
+ font-style: normal;
67
+ font-weight: normal;
68
+ font-variant: normal;
69
+ text-transform: none;
70
+ line-height: 1;
71
+
72
+ /* Better Font Rendering =========== */
73
+ -webkit-font-smoothing: antialiased;
74
+ -moz-osx-font-smoothing: grayscale;
75
+ }
76
+
77
+ .sicon-chevron-left:before {
78
+ content: "\f053";
79
+ }
80
+ .sicon-chevron-right:before {
81
+ content: "\f054";
82
+ }
83
+ .sicon-chevron-left2:before {
84
+ content: "\e900";
85
+ }
86
+ .sicon-chevron-right2:before {
87
+ content: "\e901";
88
+ }
89
+ .sicon-chevron-small-left:before {
90
+ content: "\e902";
91
+ }
92
+ .sicon-chevron-small-right:before {
93
+ content: "\e903";
94
+ }
95
+ .sicon-chevron-thin-left:before {
96
+ content: "\e904";
97
+ }
98
+ .sicon-chevron-thin-right:before {
99
+ content: "\e905";
100
+ }
101
+ .sicon-chevron-with-circle-left:before {
102
+ content: "\e906";
103
+ }
104
+ .sicon-chevron-with-circle-right:before {
105
+ content: "\e907";
106
+ }
107
+ .sicon-rewind:before {
108
+ content: "\e051";
109
+ }
110
+ .sicon-fast-forward:before {
111
+ content: "\e055";
112
+ }
113
+
114
+ .seriousslider-inner > .item > a {
115
+ display: block;
116
+ overflow: hidden;
117
+ }
118
+
119
+ /*********************
120
+ # GENERAL STYLING
121
+ **********************/
122
+
123
+ .seriousslider-inner > .item img.item-image {
124
+ position: relative;
125
+ left: 50%;
126
+ display: block;
127
+ height: auto;
128
+ width: auto;
129
+ max-width: 100.1%;
130
+ max-width: cal(100% + 1px);
131
+ line-height: 1;
132
+ -webkit-transform: translateX(-50%);
133
+ -ms-transform: translateX(-50%);
134
+ transform: translateX(-50%);
135
+ }
136
+
137
+ .seriousslider {
138
+ position: relative;
139
+ width: 100%;
140
+ margin: 0 auto;
141
+ font-size: 17px;
142
+ }
143
+
144
+ .seriousslider-inner {
145
+ position: relative;
146
+ width: 100%;
147
+ height: 100%;
148
+ overflow: hidden;
149
+ }
150
+
151
+ .seriousslider-inner > .item {
152
+ position: relative;
153
+ display: none;
154
+ /* text-align: center; */
155
+ }
156
+
157
+ @media all and (transform-3d), (-webkit-transform-3d) {
158
+
159
+ .seriousslider-inner > .item {
160
+ -webkit-backface-visibility: hidden;
161
+ backface-visibility: hidden;
162
+ -webkit-perspective: 1000px;
163
+ perspective: 1000px;
164
+ }
165
+
166
+ .seriousslider-inner > .item.next,
167
+ .seriousslider-inner > .item.active.right {
168
+ left: 0;
169
+ -webkit-transform: translate3d(100%, 0, 0);
170
+ -ms-transform: translate3d(100%, 0, 0);
171
+ transform: translate3d(100%, 0, 0);
172
+ }
173
+
174
+ .seriousslider-inner > .item.prev,
175
+ .seriousslider-inner > .item.active.left {
176
+ left: 0;
177
+ -webkit-transform: translate3d(-100%, 0, 0);
178
+ -ms-transform: translate3d(-100%, 0, 0);
179
+ transform: translate3d(-100%, 0, 0);
180
+ }
181
+
182
+ .seriousslider-inner > .item.next.left,
183
+ .seriousslider-inner > .item.prev.right,
184
+ .seriousslider-inner > .item.active {
185
+ left: 0;
186
+ -webkit-transform: translate3d(0, 0, 0);
187
+ -ms-transform: translate3d(0, 0, 0);
188
+ transform: translate3d(0, 0, 0);
189
+ }
190
+
191
+ }
192
+
193
+ .seriousslider-inner > .item {
194
+ width: 100%;
195
+ }
196
+
197
+ .seriousslider-inner > .active,
198
+ .seriousslider-inner > .next,
199
+ .seriousslider-inner > .prev {
200
+ display: block;
201
+ }
202
+
203
+ .seriousslider-inner > .active {
204
+ left: 0;
205
+ }
206
+
207
+ .seriousslider-inner > .next,
208
+ .seriousslider-inner > .prev {
209
+ position: absolute;
210
+ top: 0;
211
+ }
212
+
213
+ .seriousslider-inner > .next {
214
+ left: 100%;
215
+ }
216
+
217
+ .seriousslider-inner > .prev {
218
+ left: -100%;
219
+ }
220
+
221
+ .seriousslider-inner > .next.left,
222
+ .seriousslider-inner > .prev.right {
223
+ left: 0;
224
+ }
225
+
226
+ .seriousslider-inner > .active.left {
227
+ left: -100%;
228
+ }
229
+
230
+ .seriousslider-inner > .active.right {
231
+ left: 100%;
232
+ }
233
+
234
+ .seriousslider-overlay0 .seriousslider-control,
235
+ .seriousslider-overlay0 .seriousslider-indicators {
236
+ display: none;
237
+ }
238
+
239
+ .seriousslider-overlay1 .seriousslider-control,
240
+ .seriousslider-overlay1 .seriousslider-indicators {
241
+ opacity: 0;
242
+ filter: alpha(opacity=0);
243
+ -webkit-transition: .6s ease-in-out opacity;
244
+ transition: .6s ease-in-out opacity;
245
+ }
246
+
247
+ .seriousslider-overlay1:hover .seriousslider-control,
248
+ .seriousslider-overlay1:hover .seriousslider-indicators {
249
+ opacity: 1;
250
+ filter: alpha(opacity=100);
251
+ }
252
+
253
+ .seriousslider-overlay2 .seriousslider-control {
254
+ /*opacity: 0.75;
255
+ filter: alpha(opacity=75);*/
256
+ }
257
+
258
+ /*********************
259
+ # TRANSITION EFFECTS
260
+ **********************/
261
+
262
+ /* ## Fade */
263
+ .seriousslider-fade .seriousslider-inner > .item {
264
+ left: 0;
265
+ opacity: 0;
266
+ -webkit-transition: .6s ease-in-out all;
267
+ transition: .6s ease-in-out all;
268
+ }
269
+
270
+ .seriousslider-fade .seriousslider-inner .active {
271
+ opacity: 1;
272
+ }
273
+
274
+ .seriousslider-fade .seriousslider-inner .active.left,
275
+ .seriousslider-fade .seriousslider-inner .active.right {
276
+ left: 0;
277
+ z-index: 1;
278
+ opacity: 0;
279
+ }
280
+
281
+ .seriousslider-fade .seriousslider-inner .next.left,
282
+ .seriousslider-fade .seriousslider-inner .prev.right {
283
+ left: 0;
284
+ opacity: 1;
285
+ }
286
+
287
+ .seriousslider-fade .seriousslider-control {
288
+ z-index: 2;
289
+ }
290
+
291
+ @media all and (transform-3d), (-webkit-transform-3d) {
292
+
293
+ .seriousslider-fade .seriousslider-inner > .item.next,
294
+ .seriousslider-fade .seriousslider-inner > .item.active.right {
295
+ opacity: 0;
296
+ -webkit-transform: translate3d(0, 0, 0);
297
+ -ms-transform: translate3d(0, 0, 0);
298
+ transform: translate3d(0, 0, 0);
299
+ }
300
+
301
+ .seriousslider-fade .seriousslider-inner > .item.prev,
302
+ .seriousslider-fade .seriousslider-inner > .item.active.left {
303
+ opacity: 0;
304
+ -webkit-transform: translate3d(0, 0, 0);
305
+ -ms-transform: translate3d(0, 0, 0);
306
+ transform: translate3d(0, 0, 0);
307
+ }
308
+
309
+ .seriousslider-fade .seriousslider-inner > .item.next.left,
310
+ .seriousslider-fade .seriousslider-inner > .item.prev.right,
311
+ .seriousslider-fade .seriousslider-inner > .item.active {
312
+ opacity: 1;
313
+ -webkit-transform: translate3d(0, 0, 0);
314
+ -ms-transform: translate3d(0, 0, 0);
315
+ transform: translate3d(0, 0, 0);
316
+ }
317
+
318
+ }
319
+
320
+ /* ## Overslide */
321
+ .seriousslider-overslide .seriousslider-inner > .item {
322
+ -webkit-transition: .6s ease-in-out all;
323
+ transition: .6s ease-in-out all;
324
+ }
325
+
326
+ .seriousslider-overslide .seriousslider-inner > .active.left,
327
+ .seriousslider-overslide .seriousslider-inner > .active.right {
328
+ left: 0;
329
+ z-index: 0;
330
+ }
331
+
332
+ .seriousslider-overslide .seriousslider-inner > .next,
333
+ .seriousslider-overslide .seriousslider-inner > .prev {
334
+ z-index: 1;
335
+
336
+ }
337
+
338
+ @media all and (transform-3d), (-webkit-transform-3d) {
339
+ .seriousslider-overslide .seriousslider-inner > .active.left,
340
+ .seriousslider-overslide .seriousslider-inner > .active.right {
341
+ -webkit-transform: translate3d(0, 0, 0);
342
+ -ms-transform: translate3d(0, 0, 0);
343
+ transform: translate3d(0, 0, 0);
344
+ }
345
+ }
346
+
347
+ /* ## Underslide */
348
+ .seriousslider-underslide .seriousslider-inner > .item {
349
+ -webkit-transition: .6s ease-in-out all;
350
+ transition: .6s ease-in-out all;
351
+ }
352
+
353
+ .seriousslider-underslide .seriousslider-inner > .active.left,
354
+ .seriousslider-underslide .seriousslider-inner > .active.right {
355
+ z-index: 1;
356
+ }
357
+
358
+ .seriousslider-underslide .seriousslider-inner > .next,
359
+ .seriousslider-underslide .seriousslider-inner > .prev {
360
+ z-index: 0;
361
+ left: 0;
362
+ }
363
+
364
+ @media all and (transform-3d), (-webkit-transform-3d) {
365
+
366
+ .seriousslider-underslide .seriousslider-inner > .next,
367
+ .seriousslider-underslide .seriousslider-inner > .prev {
368
+ -webkit-transform: translate3d(0, 0, 0);
369
+ -ms-transform: translate3d(0, 0, 0);
370
+ transform: translate3d(0, 0, 0);
371
+ }
372
+
373
+ }
374
+
375
+ /* ## Parallax */
376
+ .seriousslider-parallax .seriousslider-inner > .item {
377
+ -webkit-transition: .6s ease-in-out all;
378
+ transition: .6s ease-in-out all;
379
+ }
380
+
381
+ .seriousslider-parallax .seriousslider-inner > .active.left {
382
+ left: -30%;
383
+ z-index: 0;
384
+ }
385
+
386
+ .seriousslider-parallax .seriousslider-inner > .active.right {
387
+ left: 30%;
388
+ z-index: 0;
389
+ }
390
+
391
+ .seriousslider-parallax .seriousslider-inner > .next,
392
+ .seriousslider-parallax .seriousslider-inner > .prev {
393
+ z-index: 1;
394
+ }
395
+
396
+ @media all and (transform-3d), (-webkit-transform-3d) {
397
+
398
+ .seriousslider-parallax .seriousslider-inner > .active.left {
399
+ left: 0;
400
+ -webkit-transform: translate3d(-30%, 0, 0);
401
+ -ms-transform: translate3d(-30%, 0, 0);
402
+ transform: translate3d(-30%, 0, 0);
403
+ }
404
+
405
+ .seriousslider-parallax .seriousslider-inner > .active.right {
406
+ left: 0;
407
+ -webkit-transform: translate3d(30%, 0, 0);
408
+ -ms-transform: translate3d(30%, 0, 0);
409
+ transform: translate3d(30%, 0, 0);
410
+ }
411
+
412
+ }
413
+
414
+ /* ## Horizontal Flip */
415
+ .seriousslider-hflip .seriousslider-inner {
416
+ -webkit-transform-style: preserve-3d;
417
+ transform-style: preserve-3d;
418
+ }
419
+
420
+ .seriousslider-hflip .seriousslider-inner > .active {
421
+ -webkit-transform: perspective( 2000px ) rotateY( 0deg );
422
+ -ms-transform: perspective( 2000px ) rotateY( 0deg );
423
+ transform: perspective( 2000px ) rotateY( 0deg );
424
+ -webkit-backface-visibility: hidden;
425
+ backface-visibility: hidden;
426
+ }
427
+
428
+ .seriousslider-hflip .seriousslider-inner > .prev {
429
+ -webkit-transform: perspective( 2000px ) rotateY( -180deg );
430
+ -ms-transform: perspective( 2000px ) rotateY( -180deg );
431
+ transform: perspective( 2000px ) rotateY( -180deg );
432
+ -webkit-backface-visibility: hidden;
433
+ backface-visibility: hidden;
434
+ left: 0;
435
+ }
436
+
437
+ .seriousslider-hflip .seriousslider-inner > .next {
438
+ -webkit-transform: perspective( 2000px ) rotateY( 180deg );
439
+ -ms-transform: perspective( 2000px ) rotateY( 180deg );
440
+ transform: perspective( 2000px ) rotateY( 180deg );
441
+ -webkit-backface-visibility: hidden;
442
+ backface-visibility: hidden;
443
+ left: 0;
444
+ }
445
+
446
+ .seriousslider-hflip .seriousslider-inner > .active.left {
447
+ -webkit-transform: perspective( 2000px ) rotateY( -180deg );
448
+ -ms-transform: perspective( 2000px ) rotateY( -180deg );
449
+ transform: perspective( 2000px ) rotateY( -180deg );
450
+ left: 0;
451
+ }
452
+
453
+ .seriousslider-hflip .seriousslider-inner > .active.right {
454
+ -webkit-transform: perspective( 2000px ) rotateY( 180deg );
455
+ -ms-transform: perspective( 2000px ) rotateY( 180deg );
456
+ transform: perspective( 2000px ) rotateY( 180deg );
457
+ left: 0;
458
+ }
459
+
460
+ .seriousslider-hflip .seriousslider-inner > .next.left,
461
+ .seriousslider-hflip .seriousslider-inner > .prev.right {
462
+ -webkit-transform: perspective( 2000px ) rotateY( 0deg );
463
+ -ms-transform: perspective( 2000px ) rotateY( 0deg );
464
+ transform: perspective( 2000px ) rotateY( 0deg );
465
+ }
466
+
467
+ /* ## Vertical Flip */
468
+ .seriousslider-vflip .seriousslider-inner {
469
+ -webkit-transform-style: preserve-3d;
470
+ transform-style: preserve-3d;
471
+ }
472
+
473
+ .seriousslider-vflip .seriousslider-inner > .active {
474
+ -webkit-transform: perspective( 2000px ) rotateX( 0deg );
475
+ -ms-transform: perspective( 2000px ) rotateX( 0deg );
476
+ transform: perspective( 2000px ) rotateX( 0deg );
477
+ -webkit-backface-visibility: hidden;
478
+ backface-visibility: hidden;
479
+ }
480
+
481
+ .seriousslider-vflip .seriousslider-inner > .prev {
482
+ -webkit-transform: perspective( 2000px ) rotateX( -180deg );
483
+ -ms-transform: perspective( 2000px ) rotateX( -180deg );
484
+ transform: perspective( 2000px ) rotateX( -180deg );
485
+ -webkit-backface-visibility: hidden;
486
+ backface-visibility: hidden;
487
+ left: 0;
488
+ }
489
+
490
+ .seriousslider-vflip .seriousslider-inner > .next {
491
+ -webkit-transform: perspective( 2000px ) rotateX( 180deg );
492
+ -ms-transform: perspective( 2000px ) rotateX( 180deg );
493
+ transform: perspective( 2000px ) rotateX( 180deg );
494
+ -webkit-backface-visibility: hidden;
495
+ backface-visibility: hidden;
496
+ left: 0;
497
+ }
498
+
499
+ .seriousslider-vflip .seriousslider-inner > .active.left {
500
+ -webkit-transform: perspective( 2000px ) rotateX( -180deg );
501
+ -ms-transform: perspective( 2000px ) rotateX( -180deg );
502
+ transform: perspective( 2000px ) rotateX( -180deg );
503
+ left: 0;
504
+ }
505
+
506
+ .seriousslider-vflip .seriousslider-inner > .active.right {
507
+ -webkit-transform: perspective( 2000px ) rotateX( 180deg );
508
+ -ms-transform: perspective( 2000px ) rotateX( 180deg );
509
+ transform: perspective( 2000px ) rotateX( 180deg );
510
+ left: 0;
511
+ }
512
+
513
+ .seriousslider-vflip .seriousslider-inner > .next.left,
514
+ .seriousslider-vflip .seriousslider-inner > .prev.right {
515
+ -webkit-transform: perspective( 2000px ) rotateX( 0deg );
516
+ -ms-transform: perspective( 2000px ) rotateX( 0deg );
517
+ transform: perspective( 2000px ) rotateX( 0deg );
518
+ }
519
+
520
+ /***************
521
+ # APPEARANCE
522
+ ***************/
523
+
524
+ .seriousslider-alignleft .seriousslider-caption {
525
+ text-align: left;
526
+ }
527
+ .seriousslider-aligncenter .seriousslider-caption {
528
+ text-align: center;
529
+ }
530
+ .seriousslider-alignright .seriousslider-caption {
531
+ text-align: right;
532
+ }
533
+ .seriousslider-alignjustify .seriousslider-caption {
534
+ text-align: justify;
535
+ }
536
+
537
+ .seriousslider-caption {
538
+ color: #FFF;
539
+ }
540
+
541
+ .seriousslider-caption-title {
542
+ margin: 0;
543
+ font-size: 2.6em;
544
+ line-height: 1.6;
545
+ }
546
+
547
+ .seriousslider-caption-text {
548
+ margin-top: 1em;
549
+ font-size: 1.3em;
550
+ line-height: 1.5;
551
+ }
552
+
553
+ .seriousslider-caption-buttons {
554
+ margin-top: 2em;
555
+ }
556
+
557
+ .seriousslider-caption-buttons a + a {
558
+ margin-left: 1em;
559
+ }
560
+
561
+ .seriousslider-control {
562
+ position: absolute;
563
+ z-index: 15;
564
+ top: 0;
565
+ bottom: 0;
566
+ left: 2%;
567
+ width: auto;
568
+ height: auto;
569
+ margin: auto;
570
+ padding: 0;
571
+ border: 0;
572
+ text-align: center;
573
+ font-size: 30px;
574
+ cursor: pointer;
575
+ background: transparent;
576
+ }
577
+
578
+ .seriousslider-control:hover {
579
+ background: transparent;
580
+ }
581
+
582
+ .seriousslider-control .control-arrow {
583
+ -webkit-transition: .3s ease-out all;
584
+ transition: .3s ease-out all;
585
+ }
586
+
587
+ .seriousslider-control.left {}
588
+ .seriousslider-control.right {
589
+ right: 2%;
590
+ left: auto;
591
+ }
592
+
593
+ .seriousslider-control:hover,
594
+ .seriousslider-control:focus {
595
+ outline: 0;
596
+ }
597
+
598
+ .seriousslider-control .sicon-prev:before {
599
+ content: '\f053';
600
+ }
601
+ .seriousslider-control .sicon-next:before {
602
+ content: '\f054';
603
+ }
604
+
605
+ .cryout-serious-slider .seriousslider-indicators {
606
+ position: absolute;
607
+ bottom: 10px;
608
+ left: 0;
609
+ right: 0;
610
+ z-index: 15;
611
+ padding-left: 0;
612
+ text-align: center;
613
+ list-style: none;
614
+ margin: 0 auto;
615
+ cursor: default;
616
+ }
617
+
618
+ ol.seriousslider-indicators li {
619
+ display: inline-block;
620
+ width: 11px;
621
+ height: 11px;
622
+ margin: 1px;
623
+ text-indent: -999px;
624
+ cursor: pointer;
625
+ }
626
+
627
+ ol.seriousslider-indicators li + li {
628
+ margin-left: 5px;
629
+ }
630
+
631
+ ol.seriousslider-indicators .active {}
632
+
633
+ .seriousslider-caption {
634
+ position: absolute;
635
+ right: 15%;
636
+ left: 15%;
637
+ top: 50%;
638
+ margin: 0 auto;
639
+ z-index: 10;
640
+ padding-top: 20px;
641
+ padding-bottom: 20px;
642
+ /*text-align: center;*/
643
+ pointer-events: none;
644
+ -webkit-transform: translateY(-50%);
645
+ -ms-transform: translateY(-50%);
646
+ transform: translateY(-50%);
647
+ }
648
+
649
+ .seriousslider-caption-inside {
650
+ display: block;
651
+ margin: 0 auto;
652
+ }
653
+
654
+ .seriousslider-caption > * {
655
+ pointer-events: auto;
656
+ }
657
+
658
+ .seriousslider-caption .btn {
659
+ text-shadow: none;
660
+ }
661
+
662
+ @media screen and (min-width: 768px) {
663
+
664
+ .seriousslider-caption {
665
+ /*right: 20%;
666
+ left: 20%;*/
667
+ }
668
+
669
+ .seriousslider-indicators {
670
+ bottom: 20px;
671
+ }
672
+
673
+ }
674
+
675
+ .sr-only {
676
+ position: absolute;
677
+ width: 1px;
678
+ height: 1px;
679
+ padding: 0;
680
+ margin: -1px;
681
+ overflow: hidden;
682
+ clip: rect(0, 0, 0, 0);
683
+ border: 0;
684
+ }
685
+
686
+ .sr-only-focusable:active,
687
+ .sr-only-focusable:focus {
688
+ position: static;
689
+ width: auto;
690
+ height: auto;
691
+ margin: 0;
692
+ overflow: visible;
693
+ clip: auto;
694
+ }
695
+
696
+ /*********************
697
+ # THEMES
698
+ **********************/
699
+
700
+ /* ## Light Theme */
701
+ .seriousslider-light .seriousslider-caption-title {
702
+ font-size: 3.1em;
703
+ color: #FFF;
704
+ font-weight: normal;
705
+ }
706
+
707
+ .seriousslider-light .seriousslider-caption-text {
708
+ font-size: 1.4em;
709
+ color: #EEE;
710
+ font-weight: normal;
711
+ }
712
+
713
+ .seriousslider-light .seriousslider-caption-buttons a {
714
+ display: inline-block;
715
+ padding: 10px 30px;
716
+ border: 2px solid #FFF;
717
+ border-radius: 100px;
718
+ text-transform: uppercase;
719
+ font-weight: bold;
720
+ letter-spacing: 1px;
721
+ color: #FFF;
722
+ -webkit-transition: .3s ease-out;
723
+ transition: .3s ease-out;
724
+ }
725
+
726
+ .seriousslider-light .seriousslider-caption-buttons a:hover {
727
+ background: rgba(255, 255, 255, 1);
728
+ color: #000;
729
+ }
730
+
731
+ .seriousslider-light .seriousslider-caption-buttons a:nth-child(2n+1) {
732
+ background-color: #fff;
733
+ color: #333;
734
+ }
735
+
736
+ .seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
737
+ background-color: #444;
738
+ border-color: #444;
739
+ color: #FFF;
740
+ }
741
+
742
+ .seriousslider-light .seriousslider-control {
743
+ width: 50px;
744
+ height: 50px;
745
+ font-size: 44px;
746
+ color: #fff;
747
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
748
+ -webkit-transition: .3s ease-out;
749
+ transition: .3s ease-out;
750
+ }
751
+
752
+ .seriousslider-light .seriousslider-control.left:hover {
753
+ opacity: 1;
754
+ padding-right: 10px;
755
+ }
756
+
757
+ .seriousslider-light .seriousslider-control.right:hover {
758
+ opacity: 1;
759
+ padding-left: 10px;
760
+ }
761
+
762
+ .seriousslider-light .seriousslider-control:active {
763
+ opacity: .5;
764
+ }
765
+
766
+ .seriousslider-light .seriousslider-control .sicon-prev:before {
767
+ content: '\e904';
768
+ }
769
+
770
+ .seriousslider-light .seriousslider-control .sicon-next:before {
771
+ content: '\e905';
772
+ }
773
+
774
+ .seriousslider-light .seriousslider-indicators li {
775
+ width: 12px;
776
+ height: 12px;
777
+ border: 2px solid #FFF;
778
+ box-shadow: 0 1px 1px rgba(0,0,0,.2);
779
+ border-radius: 100px;
780
+ -webkit-transition: .3s ease-out;
781
+ transition: .3s ease-out;
782
+ }
783
+
784
+ .seriousslider-light .seriousslider-indicators li:hover {
785
+ background: rgba(255, 255, 255, .5);
786
+ }
787
+
788
+ .seriousslider-light .seriousslider-indicators li.active {
789
+ background: rgba(255, 255, 255, 1);
790
+ }
791
+
792
+ /* ## Light 2 Theme */
793
+ .seriousslider-light2 .seriousslider-control {
794
+ font-size: 36px;
795
+ color: #fff;
796
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
797
+ background-color: rgba(0, 0, 0, 0);
798
+ -webkit-transition: .3s ease;
799
+ transition: .3s ease;
800
+ }
801
+
802
+ .seriousslider-light2 .seriousslider-control:hover,
803
+ .seriousslider-light2 .seriousslider-control:focus {
804
+ color: #fff;
805
+ text-decoration: none;
806
+ outline: 0;
807
+ }
808
+
809
+ .seriousslider-light2 .seriousslider-control .control-arrow {
810
+ line-height: 1;
811
+ }
812
+
813
+ .seriousslider-light2 .seriousslider-control:hover {
814
+ transform: scale(1.1);
815
+ }
816
+
817
+ .seriousslider-light2 .seriousslider-control .sicon-prev:before {
818
+ content: '\f053';
819
+ }
820
+
821
+ .seriousslider-light2 .seriousslider-control .sicon-next:before {
822
+ content: '\f054';
823
+ }
824
+
825
+ .seriousslider-light2 .seriousslider-indicators li {
826
+ background-color: rgba(0, 0, 0, 0.4);
827
+ border: 2px solid #fff;
828
+ border-radius: 10px;
829
+ -webkit-transition: .3s ease-out;
830
+ transition: .3s ease-out;
831
+ }
832
+
833
+ .seriousslider-light2 .seriousslider-indicators li:hover {
834
+ background-color: rgba(0,0,0,0);
835
+ }
836
+
837
+ .seriousslider-light2 .seriousslider-indicators .active {
838
+ background-color: rgba(255, 255, 255, .8);
839
+ }
840
+
841
+ .seriousslider-light2 .seriousslider-caption-title {
842
+ font-size: 2.5em;
843
+ color: #FFF;
844
+ }
845
+
846
+ .seriousslider-light2 .seriousslider-caption-text {
847
+ color: #EEE;
848
+ }
849
+
850
+ .seriousslider-light2 .seriousslider-caption-buttons a {
851
+ display: inline-block;
852
+ padding: 8px 24px;
853
+ border: 2px solid #FFF;
854
+ font-weight: 400;
855
+ text-shadow: 0 0;
856
+ letter-spacing: 1px;
857
+ color: #444;
858
+ background: #FFF;
859
+ -webkit-transition: .3s ease-out;
860
+ transition: .3s ease-out;
861
+ }
862
+
863
+ .seriousslider-light2 .seriousslider-caption-buttons a:hover {
864
+ color: #FFF;
865
+ background: rgba(0, 0, 0, .15);
866
+ }
867
+
868
+ /* ## Dark Theme */
869
+ .seriousslider-dark .seriousslider-caption-title {
870
+ font-weight: bold;
871
+ color: #FFF;
872
+ }
873
+
874
+ .seriousslider-dark .seriousslider-caption-text {
875
+ font-weight: normal;
876
+ color: #EEE;
877
+ }
878
+
879
+ .seriousslider-dark .seriousslider-caption-buttons a {
880
+ display: inline-block;
881
+ padding: 10px 30px;
882
+ border: 2px solid rgba(0, 0, 0, .75);;
883
+ border-radius: 100px;
884
+ font-weight: bold;
885
+ letter-spacing: 1px;
886
+ text-shadow: 0 0;
887
+ text-transform: uppercase;
888
+ color: #FFF;
889
+ background: rgba(0, 0, 0, .75);
890
+ -webkit-transition: .3s ease-out;
891
+ transition: .3s ease-out;
892
+ }
893
+
894
+ .seriousslider-dark .seriousslider-caption-buttons a:nth-child(2n) {
895
+ background: #FFF;
896
+ border-color: #FFF;
897
+ }
898
+
899
+ .seriousslider-dark .seriousslider-control {
900
+ font-size: 34px;
901
+ color: #fff;
902
+ -webkit-transition: .3s ease-out;
903
+ transition: .3s ease-out;
904
+ }
905
+
906
+ .seriousslider-dark .seriousslider-control:hover {
907
+ opacity: 1;
908
+ }
909
+
910
+ .seriousslider-dark .seriousslider-control:active {
911
+ opacity: .5;
912
+ }
913
+
914
+ .seriousslider-dark .seriousslider-control .sicon-prev:before {
915
+ content: '\e900';
916
+ }
917
+
918
+ .seriousslider-dark .seriousslider-control .sicon-next:before {
919
+ content: '\e901';
920
+ }
921
+
922
+ .seriousslider-dark .seriousslider-control .control-arrow {
923
+ padding: 12px;
924
+ border-radius: 100px;
925
+ background: rgba(0, 0, 0, .5);
926
+ }
927
+
928
+ .seriousslider-dark .seriousslider-indicators {
929
+ }
930
+
931
+ .seriousslider-dark .seriousslider-indicators li {
932
+ width: 14px;
933
+ height: 14px;
934
+ border-radius: 100px;
935
+ border: 3px solid rgba(255, 255, 255, 0.5);
936
+ background-color: rgba(0, 0, 0, 0.5);
937
+ background-clip: padding-box;
938
+ -webkit-transition: .3s ease-out;
939
+ transition: .3s ease-out;
940
+ }
941
+
942
+ .seriousslider-dark .seriousslider-indicators li:hover {
943
+ background-color: rgba(255, 255, 255, .5);
944
+ }
945
+
946
+ .seriousslider-dark .seriousslider-indicators li.active {
947
+ background-color: rgba(255, 255, 255, 1);
948
+ }
949
+
950
+ /* ## Square Theme */
951
+ .seriousslider-square .seriousslider-caption-title {
952
+ font-weight: bold;
953
+ text-transform: uppercase;
954
+ color: #FFF;
955
+ }
956
+
957
+ .seriousslider-square .seriousslider-caption-text {
958
+ font-weight: normal;
959
+ color: #EEE;
960
+ }
961
+
962
+ .seriousslider-square .seriousslider-caption-buttons a {
963
+ display: inline-block;
964
+ padding: 10px 30px;
965
+ font-weight: bold;
966
+ letter-spacing: 1px;
967
+ text-shadow: 0 0;
968
+ text-transform: uppercase;
969
+ color: #FFF;
970
+ background: rgba(0, 0, 0, .5);
971
+ -webkit-transition: .3s ease-out;
972
+ transition: .3s ease-out;
973
+ }
974
+
975
+ .seriousslider-square .seriousslider-caption-buttons a:hover {
976
+ background: rgba(0, 0, 0, .75);
977
+ }
978
+
979
+ .seriousslider-square .seriousslider-control {
980
+ font-size: 34px;
981
+ color: #fff;
982
+ -webkit-transition: .3s ease-out;
983
+ transition: .3s ease-out;
984
+ }
985
+
986
+ .seriousslider-square .seriousslider-control.left {
987
+ left: 0;
988
+ }
989
+
990
+ .seriousslider-square .seriousslider-control.right {
991
+ right: 0;
992
+ }
993
+
994
+ .seriousslider-square .seriousslider-control:hover {
995
+ opacity: 1;
996
+ }
997
+
998
+ .seriousslider-square .seriousslider-control:active {
999
+ opacity: .5;
1000
+ }
1001
+
1002
+ .seriousslider-square .seriousslider-control .sicon-prev:before {
1003
+ content: '\e902';
1004
+ }
1005
+
1006
+ .seriousslider-square .seriousslider-control .sicon-next:before {
1007
+ content: '\e903';
1008
+ }
1009
+
1010
+ .seriousslider-square .seriousslider-control .control-arrow {
1011
+ padding: 14px;
1012
+ background: rgba(0, 0, 0, 0.5);
1013
+ }
1014
+
1015
+ .seriousslider-square .seriousslider-indicators {
1016
+ }
1017
+
1018
+ .seriousslider-square .seriousslider-indicators li {
1019
+ width: 12px;
1020
+ height: 12px;
1021
+ background: rgba(0, 0, 0, .5);
1022
+ -webkit-transition: .3s ease-out;
1023
+ transition: .3s ease-out;
1024
+ }
1025
+
1026
+ .seriousslider-square .seriousslider-indicators li:hover {
1027
+ background: rgba(255, 255, 255, .5);
1028
+ }
1029
+
1030
+ .seriousslider-square .seriousslider-indicators li.active {
1031
+ background: rgba(255, 255, 255, 1);
1032
+ }
1033
+
1034
+ /* ## Square Theme */
1035
+ .seriousslider-tall .seriousslider-caption-title {
1036
+ font-size: 3.1em;
1037
+ font-weight: 300;
1038
+ color: #FFF;
1039
+ }
1040
+
1041
+ .seriousslider-tall .seriousslider-caption-text {
1042
+ font-size: 1.4em;
1043
+ font-weight: 300;
1044
+ color: #EEE;
1045
+ }
1046
+
1047
+ .seriousslider-tall .seriousslider-caption-buttons a {
1048
+ display: inline-block;
1049
+ padding: 10px 30px;
1050
+ font-weight: bold;
1051
+ letter-spacing: 1px;
1052
+ text-shadow: 0 0;
1053
+ color: #FFF;
1054
+ border-radius: 2px;
1055
+ background: rgba(0, 0, 0, .75);
1056
+ -webkit-transition: .3s ease-out;
1057
+ transition: .3s ease-out;
1058
+ }
1059
+
1060
+ .seriousslider-tall .seriousslider-caption-buttons a:hover {
1061
+ background: rgba(0, 0, 0, 1);
1062
+ }
1063
+
1064
+ .seriousslider-tall .seriousslider-control {
1065
+ font-size: 34px;
1066
+ color: #fff;
1067
+ -webkit-transition: .3s ease-out;
1068
+ transition: .3s ease-out;
1069
+ }
1070
+
1071
+ .seriousslider-tall .seriousslider-control.left {
1072
+ left: 2%;
1073
+ }
1074
+
1075
+ .seriousslider-tall .seriousslider-control.right {
1076
+ right: 2%;
1077
+ }
1078
+
1079
+ .seriousslider-tall .seriousslider-control:hover {
1080
+ opacity: 1;
1081
+ }
1082
+
1083
+ .seriousslider-tall .seriousslider-control:active {
1084
+ opacity: .5;
1085
+ }
1086
+
1087
+ .seriousslider-tall .seriousslider-control .sicon-prev:before {
1088
+ content: '\e902';
1089
+ }
1090
+
1091
+ .seriousslider-tall .seriousslider-control .sicon-next:before {
1092
+ content: '\e903';
1093
+ }
1094
+
1095
+ .seriousslider-tall .seriousslider-control .control-arrow {
1096
+ padding: 20px 5px;
1097
+ border-radius: 2px;
1098
+ background: rgba(0, 0, 0, .75);
1099
+ }
1100
+
1101
+ .seriousslider-tall .seriousslider-indicators {
1102
+ }
1103
+
1104
+ .seriousslider-tall .seriousslider-indicators li {
1105
+ width: 8px;
1106
+ height: 14px;
1107
+ border-radius: 100px;
1108
+ background: rgba(255,255,255,.8);
1109
+ -webkit-transition: .3s ease-out;
1110
+ transition: .3s ease-out;
1111
+ }
1112
+
1113
+ .seriousslider-tall ol.seriousslider-indicators li + li {
1114
+ margin-left: 3px;
1115
+ }
1116
+
1117
+ .seriousslider-tall .seriousslider-indicators li:hover {
1118
+ background: rgba(255, 255, 255, 1);
1119
+ height: 16px;
1120
+ }
1121
+
1122
+ .seriousslider-tall .seriousslider-indicators li.active {
1123
+ background: transparent;
1124
+ height: 17px;
1125
+ }
1126
+
1127
+
1128
+ /* Left Caption Theme */
1129
+ .seriousslider-captionleft .seriousslider-caption {
1130
+ left: 10%;
1131
+ right: auto;
1132
+ padding: 2em;
1133
+ background: rgba(0,0,0,.5);
1134
+ }
1135
+
1136
+ .seriousslider-captionleft .seriousslider-caption-title {
1137
+ font-size: 1.75em;
1138
+ font-weight: bold;
1139
+ text-shadow: none;
1140
+ color: #FFF;
1141
+ }
1142
+
1143
+ .seriousslider-captionleft .seriousslider-caption-text {
1144
+ font-weight: normal;
1145
+ text-shadow: none;
1146
+ color: #EEE;
1147
+ font-size: 1.1em;
1148
+ }
1149
+
1150
+ .seriousslider-captionleft .seriousslider-caption-buttons a {
1151
+ display: inline-block;
1152
+ padding-top: 5px;
1153
+ border-bottom: 2px solid;
1154
+ font-weight: bold;
1155
+ text-transform: uppercase;
1156
+ letter-spacing: 1px;
1157
+ text-shadow: 0 0;
1158
+ color: #FFF;
1159
+ -webkit-transition: .3s ease-out;
1160
+ transition: .3s ease-out;
1161
+ }
1162
+
1163
+ .seriousslider-captionleft .seriousslider-control {
1164
+ font-size: 34px;
1165
+ color: #fff;
1166
+ -webkit-transition: .3s ease-out;
1167
+ transition: .3s ease-out;
1168
+ }
1169
+
1170
+ .seriousslider-captionleft .seriousslider-control.left {
1171
+ left: 0;
1172
+ }
1173
+
1174
+
1175
+ .seriousslider-captionleft .seriousslider-control.right {
1176
+ right: 0;
1177
+ }
1178
+
1179
+ .seriousslider-captionleft .seriousslider-control:hover {
1180
+ opacity: 1;
1181
+ }
1182
+
1183
+ .seriousslider-captionleft .seriousslider-control:active {
1184
+ opacity: .5;
1185
+ }
1186
+
1187
+ .seriousslider-captionleft .seriousslider-control .sicon-prev:before {
1188
+ content: '\e902';
1189
+ left: 0;
1190
+ position: relative;
1191
+ -webkit-transition: .3s ease-out;
1192
+ transition: .3s ease-out;
1193
+ }
1194
+
1195
+ .seriousslider-captionleft .seriousslider-control .sicon-next:before {
1196
+ content: '\e903';
1197
+ right: 0;
1198
+ position: relative;
1199
+ -webkit-transition: .3s ease-out;
1200
+ transition: .3s ease-out;
1201
+ }
1202
+
1203
+ .seriousslider-captionleft .seriousslider-control:hover .sicon-prev:before {
1204
+ left: -5px;
1205
+ }
1206
+
1207
+ .seriousslider-captionleft .seriousslider-control:hover .sicon-next:before {
1208
+ right: -5px;
1209
+ }
1210
+
1211
+ .seriousslider-captionleft .seriousslider-control .control-arrow {
1212
+ padding: 16px 12px;
1213
+ background: rgba(255, 255, 255, 1);
1214
+ color: #222;
1215
+ }
1216
+
1217
+ .seriousslider-captionleft .seriousslider-control .sicon-prev {
1218
+ border-radius: 0 100px 100px 0;
1219
+ box-shadow: 3px 0 2px rgba(0, 0, 0, 0.3)
1220
+ }
1221
+
1222
+ .seriousslider-captionleft .seriousslider-control .sicon-next {
1223
+ border-radius: 100px 0 0 100px;
1224
+ box-shadow: -3px 0 2px rgba(0, 0, 0, 0.3)
1225
+ }
1226
+
1227
+ .seriousslider-captionleft .seriousslider-indicators {
1228
+ bottom: 0;
1229
+ display: table;
1230
+ padding: 0.2em 2em;
1231
+ border-radius: 100px 100px 0 0;
1232
+ box-shadow: 0 -3px 2px rgba(0, 0, 0, 0.2);
1233
+ background: rgba(255,255,255,1);
1234
+ }
1235
+
1236
+ .seriousslider-captionleft .seriousslider-indicators li {
1237
+ width: 12px;
1238
+ height: 12px;
1239
+ border-radius: 100px;
1240
+ background: rgba(0,0,0,.15);
1241
+ box-shadow: 1px 1px 1px rgba(0,0,0,.15) inset;
1242
+ -webkit-transition: .3s ease-out;
1243
+ transition: .3s ease-out;
1244
+ }
1245
+
1246
+ .seriousslider-captionleft .seriousslider-indicators li:hover {
1247
+ background: rgba(0,0,0,1);
1248
+ }
1249
+
1250
+ .seriousslider-captionleft .seriousslider-indicators li.active {
1251
+ background: rgba(0, 0, 0, 0.5);
1252
+ }
1253
+
1254
+ /* Bottom Caption Theme */
1255
+ .seriousslider-captionbottom .seriousslider-caption {
1256
+ left: 0;
1257
+ right: 0;
1258
+ top: auto;
1259
+ bottom: 0;
1260
+ padding: 1em 1em 4em;
1261
+ background: rgba(0,0,0,.5);
1262
+ -webkit-transform: none;
1263
+ transform: none;
1264
+ }
1265
+
1266
+ .seriousslider-captionbottom .seriousslider-caption-title {
1267
+ font-size: 1.75em;
1268
+ font-weight: normal;
1269
+ text-shadow: none;
1270
+ color: #FFF;
1271
+ }
1272
+
1273
+ .seriousslider-captionbottom .seriousslider-caption-text {
1274
+ font-weight: normal;
1275
+ text-shadow: none;
1276
+ color: #EEE;
1277
+ font-size: 1.1em;
1278
+ }
1279
+
1280
+ .seriousslider-captionbottom .seriousslider-caption-buttons a {
1281
+ display: inline-block;
1282
+ padding: 5px 15px;
1283
+ background: rgba(0,0,0,.5);
1284
+ font-size: 0.9em;
1285
+ font-weight: 400;
1286
+ text-transform: uppercase;
1287
+ letter-spacing: 1px;
1288
+ text-shadow: 0 0;
1289
+ color: #FFF;
1290
+ -webkit-transition: .3s ease-out;
1291
+ transition: .3s ease-out;
1292
+ }
1293
+
1294
+ .seriousslider-captionbottom .seriousslider-caption-buttons a:hover {
1295
+ background: rgba(0,0,0,.3);
1296
+ }
1297
+
1298
+ .seriousslider-captionbottom .seriousslider-control {
1299
+ font-size: 34px;
1300
+ color: #fff;
1301
+ -webkit-transition: .3s ease-out;
1302
+ transition: .3s ease-out;
1303
+ }
1304
+
1305
+ .seriousslider-captionbottom .seriousslider-control.left {
1306
+ left: 0;
1307
+ }
1308
+
1309
+ .seriousslider-captionbottom .seriousslider-control.right {
1310
+ right: 0;
1311
+ }
1312
+
1313
+ .seriousslider-captionbottom .seriousslider-control:hover {
1314
+ opacity: 1;
1315
+ }
1316
+
1317
+ .seriousslider-captionbottom .seriousslider-control:active {
1318
+ opacity: .5;
1319
+ }
1320
+
1321
+ .seriousslider-captionbottom .seriousslider-control .sicon-prev:before {
1322
+ content: '\e902';
1323
+ }
1324
+
1325
+ .seriousslider-captionbottom .seriousslider-control .sicon-next:before {
1326
+ content: '\e903';
1327
+ }
1328
+
1329
+ .seriousslider-captionbottom .seriousslider-control .control-arrow {
1330
+ padding: 14px;
1331
+ background: rgba(255, 255, 255, 1);
1332
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
1333
+ color: #222;
1334
+ }
1335
+
1336
+ .seriousslider-captionbottom .seriousslider-control:hover .control-arrow {
1337
+ color: rgba(0,0,0,.8);
1338
+ }
1339
+
1340
+ .seriousslider-captionbottom .seriousslider-indicators {
1341
+ bottom: 12px;
1342
+ display: table;
1343
+ padding: 0.2em 2em;
1344
+ }
1345
+
1346
+ .seriousslider-captionbottom .seriousslider-indicators li {
1347
+ width: 10px;
1348
+ height: 10px;
1349
+ background: rgba(255,255,255,.75);
1350
+ -webkit-transition: .3s ease-out;
1351
+ transition: .3s ease-out;
1352
+ }
1353
+
1354
+ .seriousslider-captionbottom .seriousslider-indicators li:hover {
1355
+ background: rgba(255,255,255,1);
1356
+ }
1357
+
1358
+
1359
+ /*********************
1360
+ # CAPTION ANIMATIONS
1361
+ **********************/
1362
+
1363
+ .seriousslider .seriousslider-caption {
1364
+ opacity: 0;
1365
+ -webkit-animation: .75s .25s animation-fadeIn ease forwards;
1366
+ animation: .75s .25s animation-fadeIn ease forwards;
1367
+ }
1368
+
1369
+ /* ## Fade */
1370
+ .seriousslider.seriousslider-caption-animation-fade .seriousslider-caption-title,
1371
+ .seriousslider.seriousslider-caption-animation-fade .seriousslider-caption-text,
1372
+ .seriousslider.seriousslider-caption-animation-fade .seriousslider-caption-buttons {
1373
+ opacity: 0;
1374
+ -webkit-animation: .75s .5s animation-fadeIn ease forwards;
1375
+ animation: .75s .5s animation-fadeIn ease forwards;
1376
+ }
1377
+
1378
+ .seriousslider.seriousslider-caption-animation-fade .seriousslider-caption-text {
1379
+ -webkit-animation-delay: .75s;
1380
+ animation-delay: .75s;
1381
+ }
1382
+
1383
+ .seriousslider.seriousslider-caption-animation-fade .seriousslider-caption-buttons {
1384
+ -webkit-animation-delay: .1s;
1385
+ animation-delay: 1s;
1386
+ }
1387
+
1388
+ @-webkit-keyframes animation-fadeIn {
1389
+ from {
1390
+ opacity: 0;
1391
+ }
1392
+ to {
1393
+ opacity: 1;
1394
+ }
1395
+ }
1396
+
1397
+ @keyframes animation-fadeIn {
1398
+ from {
1399
+ opacity: 0;
1400
+ }
1401
+ to {
1402
+ opacity: 1;
1403
+ }
1404
+ }
1405
+
1406
+ /* ## Slide */
1407
+ .seriousslider.seriousslider-caption-animation-slide .seriousslider-caption-title,
1408
+ .seriousslider.seriousslider-caption-animation-slide .seriousslider-caption-text,
1409
+ .seriousslider.seriousslider-caption-animation-slide .seriousslider-caption-buttons {
1410
+ opacity: 0;
1411
+ -webkit-animation: .75s .5s animation-slide ease forwards;
1412
+ animation: .75s .5s animation-slide ease forwards;
1413
+ }
1414
+
1415
+ .seriousslider.seriousslider-caption-animation-slide .seriousslider-caption-text {
1416
+ -webkit-animation-delay: .75s;
1417
+ animation-delay: .75s;
1418
+ }
1419
+
1420
+ .seriousslider.seriousslider-caption-animation-slide .seriousslider-caption-buttons {
1421
+ -webkit-animation-delay: .1s;
1422
+ animation-delay: 1s;
1423
+ }
1424
+
1425
+ @-webkit-keyframes animation-slide {
1426
+ 0% {
1427
+ opacity: 0;
1428
+ -webkit-transform: translateX(100px);
1429
+ -ms-transform: translateX(100px);
1430
+ transform: translateX(100px);
1431
+ }
1432
+ 100% {
1433
+ opacity: 1;
1434
+ -webkit-transform: translateX(0);
1435
+ -ms-transform: translateX(0);
1436
+ transform: translateX(0);
1437
+ }
1438
+ }
1439
+
1440
+ @keyframes animation-slide {
1441
+ 0% {
1442
+ opacity: 0;
1443
+ -webkit-transform: translateX(100px);
1444
+ -ms-transform: translateX(100px);
1445
+ transform: translateX(100px);
1446
+ }
1447
+ 100% {
1448
+ opacity: 1;
1449
+ -webkit-transform: translateX(0);
1450
+ -ms-transform: translateX(0);
1451
+ transform: translateX(0);
1452
+ }
1453
+ }
1454
+
1455
+ /* ## Blur */
1456
+ .seriousslider.seriousslider-caption-animation-blur .seriousslider-caption-title,
1457
+ .seriousslider.seriousslider-caption-animation-blur .seriousslider-caption-text,
1458
+ .seriousslider.seriousslider-caption-animation-blur .seriousslider-caption-buttons {
1459
+ opacity: 0;
1460
+ -webkit-animation: .75s .5s animation-blur ease forwards;
1461
+ animation: .75s .5s animation-blur ease forwards;
1462
+ }
1463
+
1464
+ .seriousslider.seriousslider-caption-animation-blur .seriousslider-caption-text {
1465
+ -webkit-animation-delay: .75s;
1466
+ animation-delay: .75s;
1467
+ }
1468
+
1469
+ .seriousslider.seriousslider-caption-animation-blur .seriousslider-caption-buttons {
1470
+ -webkit-animation-delay: .1s;
1471
+ animation-delay: 1s;
1472
+ }
1473
+
1474
+ @-webkit-keyframes animation-blur {
1475
+ 0% {
1476
+ opacity: 0;
1477
+ -webkit-filter: blur(5px);
1478
+ filter: blur(5px);
1479
+ }
1480
+ 100% {
1481
+ opacity: 1;
1482
+ -webkit-filter: blur(0);
1483
+ filter: blur(0);
1484
+ }
1485
+ }
1486
+
1487
+ @keyframes animation-blur {
1488
+ 0% {
1489
+ opacity: 0;
1490
+ -webkit-filter: blur(5px);
1491
+ filter: blur(5px);
1492
+ }
1493
+ 100% {
1494
+ opacity: 1;
1495
+ -webkit-filter: blur(0);
1496
+ filter: blur(0);
1497
+ }
1498
+ }
1499
+
1500
+ /* ## ZoomIn */
1501
+ .seriousslider.seriousslider-caption-animation-zoomin .seriousslider-caption-title,
1502
+ .seriousslider.seriousslider-caption-animation-zoomin .seriousslider-caption-text,
1503
+ .seriousslider.seriousslider-caption-animation-zoomin .seriousslider-caption-buttons {
1504
+ opacity: 0;
1505
+ -webkit-animation: .75s .5s animation-zoomIn ease forwards;
1506
+ animation: .75s .5s animation-zoomIn ease forwards;
1507
+ }
1508
+
1509
+ .seriousslider.seriousslider-caption-animation-zoomin .seriousslider-caption-text {
1510
+ -webkit-animation-delay: .75s;
1511
+ animation-delay: .75s;
1512
+ }
1513
+
1514
+ .seriousslider.seriousslider-caption-animation-zoomin .seriousslider-caption-buttons {
1515
+ -webkit-animation-delay: .1s;
1516
+ animation-delay: 1s;
1517
+ }
1518
+
1519
+ @-webkit-keyframes animation-zoomIn {
1520
+ 0% {
1521
+ opacity: 0;
1522
+ -webkit-transform: scale(0.8);
1523
+ -ms-transform: scale(0.8);
1524
+ transform: scale(0.8);
1525
+ }
1526
+ 100% {
1527
+ opacity: 1;
1528
+ -webkit-transform: scale(1);
1529
+ -ms-transform: scale(1);
1530
+ transform: scale(1);
1531
+ }
1532
+ }
1533
+
1534
+ @keyframes animation-zoomIn {
1535
+ 0% {
1536
+ opacity: 0;
1537
+ -webkit-transform: scale(0.8);
1538
+ -ms-transform: scale(0.8);
1539
+ transform: scale(0.8);
1540
+ }
1541
+ 100% {
1542
+ opacity: 1;
1543
+ -webkit-transform: scale(1);
1544
+ -ms-transform: scale(1);
1545
+ transform: scale(1);
1546
+ }
1547
+ }
1548
+
1549
+ /* ## ZoomOut */
1550
+ .seriousslider.seriousslider-caption-animation-zoomout .seriousslider-caption-title,
1551
+ .seriousslider.seriousslider-caption-animation-zoomout .seriousslider-caption-text,
1552
+ .seriousslider.seriousslider-caption-animation-zoomout .seriousslider-caption-buttons {
1553
+ opacity: 0;
1554
+ -webkit-animation: .75s .5s animation-zoomOut ease forwards;
1555
+ animation: .75s .5s animation-zoomOut ease forwards;
1556
+ }
1557
+
1558
+ .seriousslider.seriousslider-caption-animation-zoomout .seriousslider-caption-text {
1559
+ -webkit-animation-delay: .75s;
1560
+ animation-delay: .75s;
1561
+ }
1562
+
1563
+ .seriousslider.seriousslider-caption-animation-zoomout .seriousslider-caption-buttons {
1564
+ -webkit-animation-delay: .1s;
1565
+ animation-delay: 1s;
1566
+ }
1567
+
1568
+ @-webkit-keyframes animation-zoomOut {
1569
+ 0% {
1570
+ opacity: 0;
1571
+ -webkit-transform: scale(3);
1572
+ -ms-transform: scale(3);
1573
+ transform: scale(3);
1574
+ }
1575
+ 100% {
1576
+ opacity: 1;
1577
+ -webkit-transform: scale(1);
1578
+ -ms-transform: scale(1);
1579
+ transform: scale(1);
1580
+ }
1581
+ }
1582
+
1583
+ @keyframes animation-zoomOut {
1584
+ 0% {
1585
+ opacity: 0;
1586
+ -webkit-transform: scale(3);
1587
+ -ms-transform: scale(3);
1588
+ transform: scale(3);
1589
+ }
1590
+ 100% {
1591
+ opacity: 1;
1592
+ -webkit-transform: scale(1);
1593
+ -ms-transform: scale(1);
1594
+ transform: scale(1);
1595
+ }
1596
+ }
1597
+
1598
+ /*********************
1599
+ # CAPTION TEXT STYLES
1600
+ **********************/
1601
+
1602
+ .seriousslider.seriousslider-textstyle-textshadow .seriousslider-caption-title,
1603
+ .seriousslider.seriousslider-textstyle-textshadow .seriousslider-caption-text {
1604
+ text-shadow: 0 1px 2px rgba(0,0,0,.6);
1605
+ }
1606
+
1607
+ .seriousslider.seriousslider-textstyle-bgcolor .seriousslider-caption-title span,
1608
+ .seriousslider.seriousslider-textstyle-bgcolor .seriousslider-caption-text span {
1609
+ padding: 0 20px;
1610
+ background: rgba(0,0,0,.25);
1611
+ -webkit-box-decoration-break: clone;
1612
+ box-decoration-break: clone;
1613
+ }
1614
+
1615
+ .seriousslider.seriousslider-textstyle-bgcolor .seriousslider-caption-text span {
1616
+ padding: 0 10px;
1617
+ }
1618
+
1619
+ /*********************
1620
+ # LOADERS
1621
+ **********************/
1622
+
1623
+ .seriousslider-cloader {
1624
+ display: none;
1625
+ }
1626
+
1627
+ /* ## Horizontal loader */
1628
+ /*.seriousslider-hloader {
1629
+ position: absolute;
1630
+ z-index: 999;
1631
+ bottom: 0;
1632
+ left: 0;
1633
+ height: 4px;
1634
+ width: 0;
1635
+ background: red;
1636
+ -webkit-animation: 5s 1s animation-hloader linear forwards;
1637
+ animation: 5s 1s animation-hloader linear forwards;
1638
+ }
1639
+
1640
+ .cryout-serious-slider:hover .seriousslider-hloader {
1641
+ -webkit-animation-play-state:paused;
1642
+ animation-play-state:paused;
1643
+ }
1644
+
1645
+ @keyframes animation-hloader {
1646
+ from {
1647
+ width: 0;
1648
+ }
1649
+ to {
1650
+ width: 100%;
1651
+ }
1652
+ }
1653
+
1654
+ @-webkit-keyframes animation-hloader {
1655
+ from {
1656
+ width: 0;
1657
+ }
1658
+ to {
1659
+ width: 100%;
1660
+ }
1661
+ }*/
1662
+
1663
+ /* ## Circle loader */
1664
+ /*.seriousslider-cloader {
1665
+ position: absolute;
1666
+ left: 20px;
1667
+ top: 20px;
1668
+ display: inline-block;
1669
+ }
1670
+
1671
+ .seriousslider-cloader circle {
1672
+ fill: transparent;
1673
+ stroke: rgba(0,0,0,.4);
1674
+ stroke-width: 8;
1675
+ stroke-dasharray: 126;
1676
+ }
1677
+
1678
+ .seriousslider-cloader circle {
1679
+ stroke-dashoffset: 0;
1680
+ -webkit-animation: show100 5s linear forwards;
1681
+ animation: show100 5s linear forwards;
1682
+ }
1683
+
1684
+ .cryout-serious-slider:hover .seriousslider-cloader circle {
1685
+ -webkit-animation-play-state:paused;
1686
+ animation-play-state:paused;
1687
+ }
1688
+
1689
+
1690
+ @-webkit-keyframes show100 {
1691
+ from {
1692
+ stroke-dashoffset: 126;
1693
+ }
1694
+
1695
+ to {
1696
+ stroke-dashoffset: 0;
1697
+ }
1698
+ }
1699
+
1700
+ @keyframes show100 {
1701
+ from {
1702
+ stroke-dashoffset: 126;
1703
+ }
1704
+
1705
+ to {
1706
+ stroke-dashoffset: 0;
1707
+ }
1708
+ }*/
1709
+
1710
+
1711
+ /*********************
1712
+ # RESPONSIVENESS
1713
+ **********************/
1714
+ @media (max-width: 1200px) {
1715
+
1716
+ body .lp-staticslider .staticslider-caption-title,
1717
+ body .seriousslider .seriousslider-caption-title {
1718
+ letter-spacing: 0;
1719
+ }
1720
+
1721
+ .lp-staticslider .staticslider-caption,
1722
+ .seriousslider .seriousslider-caption {
1723
+ font-size: .9em;
1724
+ }
1725
+
1726
+ }
1727
+
1728
+ @media (max-width: 800px) {
1729
+
1730
+ .seriousslider-inner > .item img.item-image {
1731
+ max-height: 70vmax;
1732
+ max-width: none;
1733
+ width: auto;
1734
+ }
1735
+
1736
+ .seriousslider-control {
1737
+ font-size: 20px;
1738
+ }
1739
+
1740
+ }
1741
+
1742
+ @media (max-width: 480px) {
1743
+
1744
+ .lp-staticslider .staticslider-caption,
1745
+ .seriousslider .seriousslider-caption {
1746
+ font-size: .8em;
1747
+ }
1748
+
1749
+ .seriousslider-caption {
1750
+ left: 5%;
1751
+ right: 5%;
1752
+ }
1753
+
1754
+ .seriousslider-control,
1755
+ .seriousslider-indicators {
1756
+ display: none;
1757
+ }
1758
+
1759
+ }
1760
+
1761
+ /* FIN */