Version Description
Download this release
Release Info
Developer | simonpedge |
Plugin | Slide Anything – Responsive Content / HTML Slider and Carousel |
Version | 2.1.14 |
Comparing to | |
See all releases |
Code changes from version 2.1.13 to 2.1.14
- php/slide-anything-admin.php +6 -6
- readme.txt +3 -3
- slide-anything.php +1 -1
- trunk/css/admin-user-interface.min.css +7 -0
- trunk/css/slide-anything-admin.css +1127 -0
- trunk/css/tinymce_style.css +15 -0
- trunk/images/black_icon_next.png +0 -0
- trunk/images/black_icon_prev.png +0 -0
- trunk/images/black_lightbox_video.png +0 -0
- trunk/images/black_lightbox_zoom.png +0 -0
- trunk/images/black_slide_link.png +0 -0
- trunk/images/icon_copy.png +0 -0
- trunk/images/icon_info.png +0 -0
- trunk/images/icon_next.png +0 -0
- trunk/images/icon_prev.png +0 -0
- trunk/images/image_placeholder.jpg +0 -0
- trunk/images/image_placeholder_popup.jpg +0 -0
- trunk/images/lightbox_video.png +0 -0
- trunk/images/lightbox_zoom.png +0 -0
- trunk/images/padding_bottom.png +0 -0
- trunk/images/padding_left.png +0 -0
- trunk/images/padding_left_right.png +0 -0
- trunk/images/padding_right.png +0 -0
- trunk/images/padding_top.png +0 -0
- trunk/images/padding_top_bottom.png +0 -0
- trunk/images/sample_logo1.png +0 -0
- trunk/images/sample_logo2.png +0 -0
- trunk/images/sample_logo3.png +0 -0
- trunk/images/sample_logo4.png +0 -0
- trunk/images/sample_logo5.png +0 -0
- trunk/images/sample_logo6.png +0 -0
- trunk/images/sample_logo7.png +0 -0
- trunk/images/sample_logo8.png +0 -0
- trunk/images/slide_link.png +0 -0
- trunk/images/ui-icons_444444_256x240.png +0 -0
- trunk/images/ui-icons_555555_256x240.png +0 -0
- trunk/images/ui-icons_777620_256x240.png +0 -0
- trunk/images/ui-icons_777777_256x240.png +0 -0
- trunk/images/ui-icons_cc0000_256x240.png +0 -0
- trunk/images/ui-icons_ffffff_256x240.png +0 -0
- trunk/images/video_placeholder.jpg +0 -0
- trunk/images/video_placeholder_admin.jpg +0 -0
- trunk/js/add_tinymce_button.js +36 -0
- trunk/js/slide-anything-admin.js +914 -0
- trunk/magnific-popup/jquery.magnific-popup.min.js +4 -0
- trunk/magnific-popup/magnific-popup.css +346 -0
- trunk/owl-carousel/animate.min.css +7 -0
- trunk/owl-carousel/owl.carousel.css +183 -0
- trunk/owl-carousel/owl.carousel.min.js +7 -0
- trunk/owl-carousel/sa-owl-theme.css +187 -0
- trunk/php/slide-anything-admin.php +2092 -0
- trunk/php/slide-anything-frontend.php +691 -0
- trunk/readme.txt +375 -0
- trunk/slide-anything.php +36 -0
- trunk/spectrum/spectrum.css +507 -0
- trunk/spectrum/spectrum.js +2323 -0
php/slide-anything-admin.php
CHANGED
@@ -118,17 +118,17 @@ function version_20_upgrade_notice() {
|
|
118 |
if (!get_user_meta($user_id, 'sa_ignore_notice')) {
|
119 |
echo "<div class='notice notice-info' style='padding-top:10px;'>";
|
120 |
|
121 |
-
echo "<div style='float:left; width:170px; margin-right:15px;'><a href='
|
122 |
-
echo "<img style='width:100%;' src='
|
123 |
echo "<h3 style='margin:0px !important; padding:10px 0px !important;'>SLIDE ANYTHING PRO</h3>";
|
124 |
-
echo "<p style='margin:0px 0px 10px !important;'><a href='
|
125 |
echo "adds POPUPS into the mix!!</p>";
|
126 |
-
echo "<p style='margin:0px 0px 10px !important;'>With <a href='
|
127 |
echo "each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup containing ";
|
128 |
echo "HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to Slide Anything, if you are ";
|
129 |
echo "wanting to create Image or Video galleries for your websites.</p>";
|
130 |
echo "<p style='margin:0px 0px 10px !important;'>For more information about Slide Anything PRO, ";
|
131 |
-
echo "<a href='
|
132 |
|
133 |
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
134 |
echo "<a style='display:inline-block; float:right; padding:7px 10px; background:crimson; color:white; text-decoration:none; ";
|
@@ -1260,7 +1260,7 @@ function cpt_slider_slides_content($post) {
|
|
1260 |
echo "<li>Or your Slide Anything sliders can conatin a combination of image, video, HTML and shortcode popups!</li>\n";
|
1261 |
echo "</ul>\n";
|
1262 |
echo "<p>To find out more about <strong>SLIDE ANYTHING PRO</strong>, view demos or get your hands on a copy, click ";
|
1263 |
-
echo "<a href='
|
1264 |
echo "</div>\n";
|
1265 |
}
|
1266 |
echo "</div>\n";
|
118 |
if (!get_user_meta($user_id, 'sa_ignore_notice')) {
|
119 |
echo "<div class='notice notice-info' style='padding-top:10px;'>";
|
120 |
|
121 |
+
echo "<div style='float:left; width:170px; margin-right:15px;'><a href='https://edgewebpages.com/' target='_blank'>";
|
122 |
+
echo "<img style='width:100%;' src='https://edgewebpages.com/wp-content/uploads/2017/06/slide_anything_pro_product_image.png' /></a></div>";
|
123 |
echo "<h3 style='margin:0px !important; padding:10px 0px !important;'>SLIDE ANYTHING PRO</h3>";
|
124 |
+
echo "<p style='margin:0px 0px 10px !important;'><a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
125 |
echo "adds POPUPS into the mix!!</p>";
|
126 |
+
echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
127 |
echo "each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup containing ";
|
128 |
echo "HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to Slide Anything, if you are ";
|
129 |
echo "wanting to create Image or Video galleries for your websites.</p>";
|
130 |
echo "<p style='margin:0px 0px 10px !important;'>For more information about Slide Anything PRO, ";
|
131 |
+
echo "<a href='https://edgewebpages.com/' target='_blank'>CLICK HERE.</a></p>";
|
132 |
|
133 |
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
134 |
echo "<a style='display:inline-block; float:right; padding:7px 10px; background:crimson; color:white; text-decoration:none; ";
|
1260 |
echo "<li>Or your Slide Anything sliders can conatin a combination of image, video, HTML and shortcode popups!</li>\n";
|
1261 |
echo "</ul>\n";
|
1262 |
echo "<p>To find out more about <strong>SLIDE ANYTHING PRO</strong>, view demos or get your hands on a copy, click ";
|
1263 |
+
echo "<a href='https://edgewebpages.com' title='Slide Anything PRO' target='_blank'>HERE</a>.</p>";
|
1264 |
echo "</div>\n";
|
1265 |
}
|
1266 |
echo "</div>\n";
|
readme.txt
CHANGED
@@ -25,11 +25,11 @@ Slide Anything has now been rebuilt using Owl Carousel 2, and this now provides
|
|
25 |
|
26 |
= Slide Anything PRO =
|
27 |
|
28 |
-
[SLIDE ANYTHING PRO](
|
29 |
|
30 |
-
With [SLIDE ANYTHING PRO](
|
31 |
|
32 |
-
For more information about Slide Anything PRO, [CLICK HERE](
|
33 |
|
34 |
= Owl Carousel =
|
35 |
|
25 |
|
26 |
= Slide Anything PRO =
|
27 |
|
28 |
+
[SLIDE ANYTHING PRO](https://edgewebpages.com/) adds POPUPS into the mix!!
|
29 |
|
30 |
+
With [SLIDE ANYTHING PRO](https://edgewebpages.com/) each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup containing HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to Slide Anything, if you are wanting to create Image or Video galleries for your websites.
|
31 |
|
32 |
+
For more information about Slide Anything PRO, [CLICK HERE](https://edgewebpages.com/).
|
33 |
|
34 |
= Owl Carousel =
|
35 |
|
slide-anything.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
* Author: Simon Edge
|
7 |
-
* Version: 2.1.
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|
4 |
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
* Author: Simon Edge
|
7 |
+
* Version: 2.1.14
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|
trunk/css/admin-user-interface.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.11.4 - 2015-12-12
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, button.css, dialog.css, slider.css, spinner.css, tooltip.css, theme.css
|
4 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px
|
5 |
+
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
6 |
+
|
7 |
+
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("../images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("../images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("../images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("../images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("../images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("../images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("../images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
|
trunk/css/slide-anything-admin.css
ADDED
@@ -0,0 +1,1127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
##################################################################
|
3 |
+
### SLIDE ANYTHING PLUGIN - JAVASCRIPT FOR WORDPRESS DASHBOARD ###
|
4 |
+
##################################################################
|
5 |
+
*/
|
6 |
+
|
7 |
+
/* ### GENERAL STYLE ### */
|
8 |
+
.postbox-container .meta-box-sortables .postbox h3 span {
|
9 |
+
font-family:'Open Sans', sans-serif !important;
|
10 |
+
font-weight:600 !important;
|
11 |
+
font-size:20px !important;
|
12 |
+
line-height:26px !important;
|
13 |
+
}
|
14 |
+
.sa_hidden {
|
15 |
+
display:none !important;
|
16 |
+
}
|
17 |
+
|
18 |
+
/* ### METABOX 'Slider Settings' ### */
|
19 |
+
#sa_slider_settings {
|
20 |
+
padding:10px 0px 0px;
|
21 |
+
}
|
22 |
+
#sa_slider_settings hr {
|
23 |
+
margin:20px 0px !important;
|
24 |
+
border-top-style:none !important;
|
25 |
+
border-bottom:solid 1px #e8e8e8 !important;
|
26 |
+
}
|
27 |
+
#sa_slider_settings .sa_slider_value {
|
28 |
+
position:relative;
|
29 |
+
margin:0px 5px 15px;
|
30 |
+
}
|
31 |
+
#sa_slider_settings .sa_slider_value span {
|
32 |
+
display:inline-block;
|
33 |
+
padding-right:10px;
|
34 |
+
color:#303030;
|
35 |
+
font-family:'Open Sans', sans-serif;
|
36 |
+
font-size:14px;
|
37 |
+
line-height:20px;
|
38 |
+
}
|
39 |
+
#sa_slider_settings .sa_slider_value .sa_tooltip {
|
40 |
+
position:absolute;
|
41 |
+
top:4px;
|
42 |
+
margin-left:5px !important;
|
43 |
+
cursor:help;
|
44 |
+
}
|
45 |
+
#sa_slider_settings .sa_slider_value input {
|
46 |
+
width:40px !important;
|
47 |
+
margin:0px !important;
|
48 |
+
border-style:none !important;
|
49 |
+
border-radius:3px !important;
|
50 |
+
outline-color:transparent !important;
|
51 |
+
box-shadow:none !important;
|
52 |
+
-webkit-box-shadow:none !important;
|
53 |
+
background-color:#f0f0f0 !important;
|
54 |
+
}
|
55 |
+
#sa_slider_settings .sa_slider_value em {
|
56 |
+
display:inline-block;
|
57 |
+
padding-left:5px;
|
58 |
+
color:#a0a0a0;
|
59 |
+
font-family:'Open Sans', sans-serif;
|
60 |
+
font-size:14px;
|
61 |
+
line-height:20px;
|
62 |
+
}
|
63 |
+
#sa_slider_settings .jquery_ui_slider {
|
64 |
+
margin:0px 5px 5px !important;
|
65 |
+
background-color:#007fff !important;
|
66 |
+
border-radius:0px !important;
|
67 |
+
}
|
68 |
+
#sa_slider_settings .jquery_ui_slider .ui-slider-handle {
|
69 |
+
outline-color:transparent !important;
|
70 |
+
background-color:#f0f0f0 !important;
|
71 |
+
border-color:#c0c0c0 !important;
|
72 |
+
transition:background .3s ease-in-out;
|
73 |
+
-webkit-transition:background .3s ease-in-out;
|
74 |
+
-moz-transition:background .3s ease-in-out;
|
75 |
+
-o-transition:background .3s ease-in-out;
|
76 |
+
}
|
77 |
+
#sa_slider_settings .jquery_ui_slider .ui-slider-handle:hover,
|
78 |
+
#sa_slider_settings .jquery_ui_slider .ui-slider-handle:focus {
|
79 |
+
background-color:#d0d0d0 !important;
|
80 |
+
}
|
81 |
+
#sa_slider_settings .jquery_ui_slider .ui-slider-range {
|
82 |
+
border-radius:0px !important;
|
83 |
+
}
|
84 |
+
.half_width_column {
|
85 |
+
float:left;
|
86 |
+
width:50%;
|
87 |
+
}
|
88 |
+
.half_width_column .sa_setting_checkbox {
|
89 |
+
position:relative;
|
90 |
+
padding:0px 5px 10px 5px;
|
91 |
+
}
|
92 |
+
.half_width_column .sa_setting_checkbox span {
|
93 |
+
display:inline-block;
|
94 |
+
width:125px;
|
95 |
+
color:#303030;
|
96 |
+
font-family:'Open Sans', sans-serif;
|
97 |
+
font-size:14px;
|
98 |
+
line-height:20px;
|
99 |
+
}
|
100 |
+
.half_width_column .sa_setting_checkbox .sa_tooltip {
|
101 |
+
position:absolute;
|
102 |
+
top:2px;
|
103 |
+
margin-left:5px !important;
|
104 |
+
cursor:help;
|
105 |
+
}
|
106 |
+
@media only screen and (max-width:479px) {
|
107 |
+
.half_width_column { float:none; width:100%; }
|
108 |
+
}
|
109 |
+
|
110 |
+
/* ### METABOX 'Slides' - DISABLE VISUAL EDITOR CHECKBOX ### */
|
111 |
+
#sa_visual_editor_checkbox {
|
112 |
+
padding:10px 5px 0px;
|
113 |
+
}
|
114 |
+
#sa_visual_editor_checkbox span {
|
115 |
+
display:inline-block;
|
116 |
+
padding-right:10px;
|
117 |
+
color:#303030;
|
118 |
+
font-family:'Open Sans', sans-serif;
|
119 |
+
font-size:14px;
|
120 |
+
line-height:20px;
|
121 |
+
}
|
122 |
+
/* ### METABOX 'Slides' - ACCORDION CONTAINING SLIDE CONTENT ### */
|
123 |
+
#slider_accordion {
|
124 |
+
margin:20px 0px 10px !important;
|
125 |
+
}
|
126 |
+
#slider_accordion > h3 {
|
127 |
+
margin-top:3px !important;
|
128 |
+
padding:7px 10px !important;
|
129 |
+
font-family:Arial, Helvetica, sans-serif !important;
|
130 |
+
font-weight:normal !important;
|
131 |
+
font-size:16px !important;
|
132 |
+
line-height:22px !important;
|
133 |
+
letter-spacing:1px;
|
134 |
+
text-transform:uppercase !important;
|
135 |
+
background-color:#f0f0f0;
|
136 |
+
border-color:#e0e0e0;
|
137 |
+
color:#505050;
|
138 |
+
outline:none;
|
139 |
+
box-shadow:none;
|
140 |
+
-webkit-box-shadow:none;
|
141 |
+
transition:all .3s ease-in-out;
|
142 |
+
-webkit-transition:all .3s ease-in-out;
|
143 |
+
-moz-transition:all .3s ease-in-out;
|
144 |
+
-o-transition:all .3s ease-in-out;
|
145 |
+
}
|
146 |
+
#slider_accordion > h3 span {
|
147 |
+
float:right !important;
|
148 |
+
display:block !important;
|
149 |
+
padding:2px 0px 0px 10px !important;
|
150 |
+
font-weight:400 !important;
|
151 |
+
font-size:12px !important;
|
152 |
+
line-height:18px !important;
|
153 |
+
text-transform:none !important;
|
154 |
+
color:#a0a0a0;
|
155 |
+
}
|
156 |
+
#slider_accordion > h3:hover {
|
157 |
+
background-color:#e8e8e8;
|
158 |
+
}
|
159 |
+
#slider_accordion > h3.ui-state-active {
|
160 |
+
background-color:#007fff;
|
161 |
+
color:#f0f0f0;
|
162 |
+
}
|
163 |
+
#slider_accordion > h3.ui-state-active span {
|
164 |
+
color:#f0f0f0;
|
165 |
+
}
|
166 |
+
#slider_accordion > h3 .ui-accordion-header-icon {
|
167 |
+
display:none !important;
|
168 |
+
}
|
169 |
+
#slider_accordion > div {
|
170 |
+
padding:15px 15px !important;
|
171 |
+
}
|
172 |
+
#slider_accordion > div .wp-editor-container {
|
173 |
+
border-color:#e0e0e0;
|
174 |
+
border-radius:3px;
|
175 |
+
}
|
176 |
+
|
177 |
+
/* ### METABOX 'Slides' - TABS FOR EACH SLIDE ### */
|
178 |
+
.sa_slide_tabs {
|
179 |
+
border:solid 1px #e0e0e0;
|
180 |
+
margin:5px 0px 0px;
|
181 |
+
}
|
182 |
+
.sa_slide_tabs .ui-tabs-nav {
|
183 |
+
border-style:none;
|
184 |
+
}
|
185 |
+
.sa_slide_tabs .ui-tabs-nav {
|
186 |
+
padding:0px 3px;
|
187 |
+
background-color:#f0f0f0;
|
188 |
+
border-bottom:solid 1px #e0e0e0;
|
189 |
+
}
|
190 |
+
.sa_slide_tabs .ui-tabs-nav li {
|
191 |
+
display:block;
|
192 |
+
float:left;
|
193 |
+
width:130px;
|
194 |
+
margin:0px;
|
195 |
+
border-style:none;
|
196 |
+
outline:none;
|
197 |
+
box-shadow:none;
|
198 |
+
-webkit-box-shadow:none;
|
199 |
+
margin:5px 2px;
|
200 |
+
}
|
201 |
+
.sa_slide_tabs .ui-tabs-nav li a {
|
202 |
+
display:inline-block;
|
203 |
+
width:100%;
|
204 |
+
text-align:center;
|
205 |
+
color:#707070;
|
206 |
+
background-color:#ffffff;
|
207 |
+
font-size:14px;
|
208 |
+
line-height:14px;
|
209 |
+
padding:5px 0px;
|
210 |
+
box-shadow:none;
|
211 |
+
-webkit-box-shadow:none;
|
212 |
+
transition:all .3s ease-in-out;
|
213 |
+
-webkit-transition:all .3s ease-in-out;
|
214 |
+
-moz-transition:all .3s ease-in-out;
|
215 |
+
-o-transition:all .3s ease-in-out;
|
216 |
+
}
|
217 |
+
.sa_slide_tabs .ui-tabs-nav li a:hover {
|
218 |
+
color:#000000;
|
219 |
+
}
|
220 |
+
.sa_slide_tabs .ui-tabs-nav li.ui-state-active a {
|
221 |
+
background-color:#007fff;
|
222 |
+
color:#f0f0f0;
|
223 |
+
}
|
224 |
+
.sa_slide_tabs .sa_slide_tab {
|
225 |
+
padding:15px;
|
226 |
+
border-style:none;
|
227 |
+
}
|
228 |
+
.sa_slide_tabs .sa_slide_tab p {
|
229 |
+
margin:0px;
|
230 |
+
}
|
231 |
+
|
232 |
+
/* ##### METABOX 'Slides' - TAB 1 (Slide Background) ##### */
|
233 |
+
.popup_background_wrapper {
|
234 |
+
display:inline-block;
|
235 |
+
margin:0px 0px 15px;
|
236 |
+
padding:10px;
|
237 |
+
width:auto;
|
238 |
+
background-color:#f5f5f5;
|
239 |
+
border:solid 1px #e0e0e0;
|
240 |
+
border-radius:5px;
|
241 |
+
}
|
242 |
+
.popup_background_wrapper div {
|
243 |
+
position:relative;
|
244 |
+
width:auto;
|
245 |
+
padding:0px 21px 5px 0px;
|
246 |
+
color:#303030;
|
247 |
+
font-family:'Open Sans', sans-serif;
|
248 |
+
font-weight:400;
|
249 |
+
font-size:13px;
|
250 |
+
line-height:18px;
|
251 |
+
}
|
252 |
+
.popup_background_wrapper div .sa_tooltip {
|
253 |
+
position:absolute;
|
254 |
+
top:0px;
|
255 |
+
margin-left:5px;
|
256 |
+
cursor:help;
|
257 |
+
}
|
258 |
+
.sa_slide_bg_popup {
|
259 |
+
display:none;
|
260 |
+
position:relative;
|
261 |
+
float:left;
|
262 |
+
margin-right:15px;
|
263 |
+
border:solid 1px #e0e0e0;
|
264 |
+
padding:5px;
|
265 |
+
background-color:#f3f3f3;
|
266 |
+
}
|
267 |
+
.sa_slide_bg_popup div {
|
268 |
+
width:170px;
|
269 |
+
height:170px;
|
270 |
+
background:transparent url('../images/image_placeholder_popup.jpg') no-repeat top left;
|
271 |
+
background-size:cover;
|
272 |
+
}
|
273 |
+
.sa_slide_bg_wrapper .sa_slide_thumb {
|
274 |
+
position:relative;
|
275 |
+
float:left;
|
276 |
+
margin-right:15px;
|
277 |
+
border:solid 1px #e0e0e0;
|
278 |
+
padding:5px;
|
279 |
+
background-color:#f3f3f3;
|
280 |
+
}
|
281 |
+
.sa_slide_bg_wrapper .sa_slide_thumb > div {
|
282 |
+
height:170px;
|
283 |
+
width:170px;
|
284 |
+
background-repeat:no-repeat;
|
285 |
+
background-position:top left;
|
286 |
+
background-size:100% auto;
|
287 |
+
}
|
288 |
+
.sa_slide_bg_wrapper .sa_slide_thumb > span {
|
289 |
+
display:inline-block;
|
290 |
+
position:absolute;
|
291 |
+
top:0px;
|
292 |
+
right:0px;
|
293 |
+
font-family:Arial, Helvetica, sans-serif;
|
294 |
+
font-size:14px;
|
295 |
+
line-height:14px;
|
296 |
+
padding:3px 3px;
|
297 |
+
background-color:rgba(0,0,0,0.5);
|
298 |
+
color:#ffffff;
|
299 |
+
cursor:pointer;
|
300 |
+
transition:all .3s ease-in-out;
|
301 |
+
-webkit-transition:all .3s ease-in-out;
|
302 |
+
-moz-transition:all .3s ease-in-out;
|
303 |
+
-o-transition:all .3s ease-in-out;
|
304 |
+
}
|
305 |
+
.sa_slide_bg_wrapper .sa_slide_thumb > span:hover {
|
306 |
+
background-color:crimson;
|
307 |
+
}
|
308 |
+
.sa_slide_bg_wrapper .slide_image_add {
|
309 |
+
margin:3px 0px 0px !important;
|
310 |
+
}
|
311 |
+
.sa_slide_bg_wrapper .slide_image_settings_line {
|
312 |
+
margin:7px 0px 0px 197px;
|
313 |
+
}
|
314 |
+
.sa_slide_bg_wrapper .slide_image_settings_line span {
|
315 |
+
display:inline-block;
|
316 |
+
width:130px;
|
317 |
+
color:#303030;
|
318 |
+
font-family:'Open Sans', sans-serif;
|
319 |
+
font-weight:400;
|
320 |
+
font-size:13px;
|
321 |
+
}
|
322 |
+
.sa_slide_bg_wrapper .slide_image_settings_line select {
|
323 |
+
min-width:110px;
|
324 |
+
}
|
325 |
+
.sa_slide_bg_wrapper .slide_image_settings_line .sp-replacer { /* spectrum color picker */
|
326 |
+
background-color:#f0f0f0 !important;
|
327 |
+
border:solid 1px #e0e0e0 !important;
|
328 |
+
margin:2px 1px !important;
|
329 |
+
padding:2px !important;
|
330 |
+
border-radius:3px !important;
|
331 |
+
}
|
332 |
+
.sa_slide_bg_wrapper .slide_image_settings_line .sp-replacer .sp-preview { /* spectrum color picker */
|
333 |
+
width:87px !important;
|
334 |
+
height:18px !important;
|
335 |
+
border:solid 1px #c0c0c0 !important;
|
336 |
+
margin-right:3px !important;
|
337 |
+
}
|
338 |
+
.sa_slide_bg_wrapper .slide_image_settings_line .sp-replacer .sp-dd { /* spectrum color picker */
|
339 |
+
height:18px !important;
|
340 |
+
padding:0px !important;
|
341 |
+
margin-right:2px !important;
|
342 |
+
}
|
343 |
+
|
344 |
+
/* ##### METABOX 'Slides' - TAB 2 (Slide Link) ##### */
|
345 |
+
.slide_link_settings_wrapper {
|
346 |
+
padding:0px;
|
347 |
+
}
|
348 |
+
.slide_link_settings_wrapper p {
|
349 |
+
font-weight:600;
|
350 |
+
font-size:14px;
|
351 |
+
line-height:20px;
|
352 |
+
color:#303030;
|
353 |
+
padding-bottom:5px;
|
354 |
+
}
|
355 |
+
.slide_link_settings_wrapper div {
|
356 |
+
padding:10px 0px 0px;
|
357 |
+
}
|
358 |
+
.slide_link_settings_wrapper div span {
|
359 |
+
display:inline-block;
|
360 |
+
width:100%;
|
361 |
+
padding:0px 0px 2px 2px;
|
362 |
+
font-weight:400;
|
363 |
+
font-size:13px;
|
364 |
+
line-height:18px;
|
365 |
+
color:#505050;
|
366 |
+
}
|
367 |
+
.slide_link_settings_wrapper div input[type=text] {
|
368 |
+
width:100%;
|
369 |
+
margin:0px;
|
370 |
+
font-size:14px !important;
|
371 |
+
line-height:20px !important;
|
372 |
+
padding:5px 7px !important;
|
373 |
+
}
|
374 |
+
.slide_link_settings_wrapper div select {
|
375 |
+
padding:3px;
|
376 |
+
line-height:28px;
|
377 |
+
height:28px;
|
378 |
+
}
|
379 |
+
|
380 |
+
/* ##### METABOX 'Slides' - TAB 2 (Slide Popup) ##### */
|
381 |
+
/* pro version info message */
|
382 |
+
.slide_popup_pro_version > h4 {
|
383 |
+
margin:5px 0px 15px;
|
384 |
+
padding:5px 0px;
|
385 |
+
text-align:center;
|
386 |
+
font-size:16px;
|
387 |
+
line-height:22px;
|
388 |
+
font-weight:normal;
|
389 |
+
background-color:#f0f0f0;
|
390 |
+
color:crimson;
|
391 |
+
border:solid 1px #e0e0e0;
|
392 |
+
border-radius:5px;
|
393 |
+
}
|
394 |
+
.slide_popup_pro_version > p {
|
395 |
+
margin:0px;
|
396 |
+
padding:0px;
|
397 |
+
font-size:14px;
|
398 |
+
line-height:22px;
|
399 |
+
color:#606060;
|
400 |
+
}
|
401 |
+
.slide_popup_pro_version ul {
|
402 |
+
margin:0px 0px 10px 30px;
|
403 |
+
padding:0px;
|
404 |
+
list-style-type: disc;
|
405 |
+
}
|
406 |
+
.slide_popup_pro_version ul li {
|
407 |
+
margin:0px;
|
408 |
+
padding:2px 0px 0px;
|
409 |
+
font-size:14px;
|
410 |
+
line-height:22px;
|
411 |
+
color:#606060;
|
412 |
+
}
|
413 |
+
.slide_popup_pro_version > p a {
|
414 |
+
font-weight:bold;
|
415 |
+
text-decoration:none;
|
416 |
+
letter-spacing:1px;
|
417 |
+
color:#007fff;
|
418 |
+
}
|
419 |
+
.slide_popup_pro_version > p a:hover {
|
420 |
+
text-decoration:underline;
|
421 |
+
}
|
422 |
+
/* popup settings - general */
|
423 |
+
.slide_popup_settings_line {
|
424 |
+
position:relative;
|
425 |
+
margin:0px 0px 10px;
|
426 |
+
}
|
427 |
+
.slide_popup_settings_line span {
|
428 |
+
display:inline-block;
|
429 |
+
width:130px;
|
430 |
+
color:#303030;
|
431 |
+
font-family:'Open Sans', sans-serif;
|
432 |
+
font-weight:400;
|
433 |
+
font-size:13px;
|
434 |
+
}
|
435 |
+
.slide_popup_settings_line select {
|
436 |
+
min-width:110px;
|
437 |
+
}
|
438 |
+
.slide_popup_settings_line .sa_tooltip {
|
439 |
+
position:absolute;
|
440 |
+
top:-2px;
|
441 |
+
margin-left:5px !important;
|
442 |
+
cursor:help;
|
443 |
+
}
|
444 |
+
/* image popup settings */
|
445 |
+
.image_popup_wrapper {
|
446 |
+
}
|
447 |
+
.image_popup_wrapper .slide_popup_thumb {
|
448 |
+
position:relative;
|
449 |
+
float:left;
|
450 |
+
max-width:320px;
|
451 |
+
margin:5px 10px 0px 0px;
|
452 |
+
padding:5px;
|
453 |
+
border:solid 1px #e0e0e0;
|
454 |
+
border-radius:5px;
|
455 |
+
background-color:#ffffff;
|
456 |
+
}
|
457 |
+
.image_popup_wrapper .slide_popup_thumb img {
|
458 |
+
display:block;
|
459 |
+
width:100%;
|
460 |
+
}
|
461 |
+
.image_popup_wrapper .slide_popup_thumb span {
|
462 |
+
display:inline-block;
|
463 |
+
position:absolute;
|
464 |
+
top:0px;
|
465 |
+
right:0px;
|
466 |
+
font-family:Arial, Helvetica, sans-serif;
|
467 |
+
font-size:14px;
|
468 |
+
line-height:14px;
|
469 |
+
padding:3px 3px;
|
470 |
+
background-color:rgba(0,0,0,0.5);
|
471 |
+
color:#ffffff;
|
472 |
+
cursor:pointer;
|
473 |
+
transition:all .3s ease-in-out;
|
474 |
+
-webkit-transition:all .3s ease-in-out;
|
475 |
+
-moz-transition:all .3s ease-in-out;
|
476 |
+
-o-transition:all .3s ease-in-out;
|
477 |
+
}
|
478 |
+
.image_popup_wrapper .slide_popup_thumb span:hover {
|
479 |
+
background-color:crimson;
|
480 |
+
}
|
481 |
+
.image_popup_wrapper .slide_popup_image_preview {
|
482 |
+
display:inline-block;
|
483 |
+
}
|
484 |
+
.image_popup_wrapper .slide_popup_info {
|
485 |
+
padding:0px;
|
486 |
+
}
|
487 |
+
.image_popup_wrapper .sa_slide_popup_imagetitle {
|
488 |
+
width:300px;
|
489 |
+
margin:10px 0px 0px;
|
490 |
+
font-size:14px !important;
|
491 |
+
line-height:20px !important;
|
492 |
+
padding:5px 7px !important;
|
493 |
+
}
|
494 |
+
input.sa_slide_popup_imagetitle::-webkit-input-placeholder { color:#c0c0c0 !important; }
|
495 |
+
input.sa_slide_popup_imagetitle:-moz-placeholder { color:#c0c0c0 !important; }
|
496 |
+
input.sa_slide_popup_imagetitle::-moz-placeholder { color:#c0c0c0 !important; }
|
497 |
+
input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important; }
|
498 |
+
@media only screen and (max-width:1279px) {
|
499 |
+
.image_popup_wrapper .slide_popup_thumb { max-width:200px; }
|
500 |
+
.image_popup_wrapper .sa_slide_popup_imagetitle { width:200px; }
|
501 |
+
}
|
502 |
+
@media only screen and (max-width:1049px) {
|
503 |
+
.image_popup_wrapper .slide_popup_thumb { float:none !important; }
|
504 |
+
.image_popup_wrapper .popup_image_add { clear:both; }
|
505 |
+
.image_popup_wrapper .sa_slide_popup_imagetitle { clear:both; width:100%; }
|
506 |
+
}
|
507 |
+
.image_popup_wrapper .slide_popup_info div {
|
508 |
+
padding:10px 0px 0px;
|
509 |
+
font-size:13px;
|
510 |
+
line-height:16px;
|
511 |
+
color:#707070;
|
512 |
+
}
|
513 |
+
/* video popup settings */
|
514 |
+
.video_popup_wrapper {
|
515 |
+
}
|
516 |
+
.video_popup_wrapper .slide_video_thumb {
|
517 |
+
float:left;
|
518 |
+
box-sizing:content-box;
|
519 |
+
width:320px;
|
520 |
+
height:180px;
|
521 |
+
margin:5px 10px 0px 0px;
|
522 |
+
padding:5px;
|
523 |
+
border:solid 1px #e0e0e0;
|
524 |
+
border-radius:5px;
|
525 |
+
background-color:transparent;
|
526 |
+
}
|
527 |
+
.video_popup_wrapper .slide_video_thumb > img,
|
528 |
+
.video_popup_wrapper .slide_video_thumb > iframe {
|
529 |
+
width:100%;
|
530 |
+
height:100%;
|
531 |
+
}
|
532 |
+
.video_popup_wrapper .sa_slide_video_url input {
|
533 |
+
width:400px;
|
534 |
+
margin:10px 0px 5px;
|
535 |
+
font-size:14px !important;
|
536 |
+
line-height:20px !important;
|
537 |
+
padding:5px 7px !important;
|
538 |
+
}
|
539 |
+
.video_popup_wrapper .sa_popup_video_invalid_url {
|
540 |
+
display:none;
|
541 |
+
padding:10px 0px 0px;
|
542 |
+
color:crimson;
|
543 |
+
font-family:'Open Sans', sans-serif;
|
544 |
+
font-weight:400;
|
545 |
+
font-size:13px;
|
546 |
+
}
|
547 |
+
.video_popup_wrapper .slide_popup_video_preview {
|
548 |
+
display:inline-block !important;
|
549 |
+
}
|
550 |
+
.video_popup_wrapper .sa_slide_video_url input::-webkit-input-placeholder { color:#c0c0c0 !important; }
|
551 |
+
.video_popup_wrapper .sa_slide_video_url input:-moz-placeholder { color:#c0c0c0 !important; }
|
552 |
+
.video_popup_wrapper .sa_slide_video_url input::-moz-placeholder { color:#c0c0c0 !important; }
|
553 |
+
.video_popup_wrapper .sa_slide_video_url input:-ms-input-placeholder { color:#c0c0c0 !important; }
|
554 |
+
@media only screen and (max-width:1399px) {
|
555 |
+
.video_popup_wrapper .sa_slide_video_url input { width:300px !important; }
|
556 |
+
}
|
557 |
+
@media only screen and (max-width:1279px) {
|
558 |
+
.video_popup_wrapper .sa_slide_video_url input { clear:both !important; width:100% !important; margin-top:10px !important; }
|
559 |
+
}
|
560 |
+
/* content popup settings */
|
561 |
+
.html_popup_wrapper textarea {
|
562 |
+
width:100%;
|
563 |
+
margin:5px 0px 10px;
|
564 |
+
padding:4px 8px;
|
565 |
+
font-size:13px;
|
566 |
+
line-height:20px;
|
567 |
+
height:150px;
|
568 |
+
background-color:#fcfcfc;
|
569 |
+
}
|
570 |
+
.html_popup_wrapper .slide_popup_settings_line .sp-replacer { /* spectrum color picker */
|
571 |
+
background-color:#fafafa !important;
|
572 |
+
border:solid 1px #e0e0e0 !important;
|
573 |
+
margin:2px 1px !important;
|
574 |
+
padding:2px !important;
|
575 |
+
border-radius:5px !important;
|
576 |
+
}
|
577 |
+
.html_popup_wrapper .slide_popup_settings_line .sp-replacer .sp-preview { /* spectrum color picker */
|
578 |
+
width:87px !important;
|
579 |
+
height:18px !important;
|
580 |
+
border:solid 1px #c0c0c0 !important;
|
581 |
+
margin-right:3px !important;
|
582 |
+
}
|
583 |
+
.html_popup_wrapper .slide_popup_settings_line .sp-replacer .sp-dd { /* spectrum color picker */
|
584 |
+
height:18px !important;
|
585 |
+
padding:0px !important;
|
586 |
+
margin-right:2px !important;
|
587 |
+
}
|
588 |
+
.html_popup_wrapper .slide_popup_settings_line .ui-spinner {
|
589 |
+
width:auto !important;
|
590 |
+
}
|
591 |
+
.html_popup_wrapper .slide_popup_settings_line .ui-spinner-input {
|
592 |
+
width:50px !important;
|
593 |
+
margin:3px 5px !important;
|
594 |
+
outline-style:none !important;
|
595 |
+
border-style:none !important;
|
596 |
+
box-shadow:none !important;
|
597 |
+
-webkit-box-shadow:none !important;
|
598 |
+
color:#303030 !important;
|
599 |
+
font-size:13px !important;
|
600 |
+
}
|
601 |
+
.html_popup_wrapper .slide_popup_settings_line em,
|
602 |
+
.html_popup_wrapper .slide_popup_settings_line strong {
|
603 |
+
display: inline-block;
|
604 |
+
padding: 0px 10px 0px 5px;
|
605 |
+
font-style: normal;
|
606 |
+
font-weight: normal;
|
607 |
+
color: #a0a0a0;
|
608 |
+
font-family: 'Open Sans', sans-serif;
|
609 |
+
font-size: 14px;
|
610 |
+
line-height: 18px;
|
611 |
+
}
|
612 |
+
.html_popup_wrapper .slide_popup_css {
|
613 |
+
display:inline-block;
|
614 |
+
padding: 4px 10px 4px 33px;
|
615 |
+
background: #f0f0f0 url(../images/icon_copy.png) no-repeat 5px 2px;
|
616 |
+
font-size: 13px;
|
617 |
+
line-height: 20px;
|
618 |
+
height: 20px;
|
619 |
+
color: #000000;
|
620 |
+
border-radius:5px;
|
621 |
+
cursor: pointer;
|
622 |
+
}
|
623 |
+
@media only screen and (max-width:1199px) {
|
624 |
+
.html_popup_wrapper .slide_popup_settings_line strong { display:none; }
|
625 |
+
}
|
626 |
+
|
627 |
+
|
628 |
+
|
629 |
+
/* ### SLIDE BUTTONS (DELETE SLIDE, DUPLICATE SLIDE) ### */
|
630 |
+
#slider_accordion > div .button-secondary {
|
631 |
+
margin:10px 0px 0px;
|
632 |
+
}
|
633 |
+
|
634 |
+
/* ### METABOX 'Slider Shortcode' ### */
|
635 |
+
#sa_slider_shortcode {
|
636 |
+
display:block;
|
637 |
+
margin:10px 0px 0px;
|
638 |
+
padding:7px 10px;
|
639 |
+
background-color:#f0f0f0;
|
640 |
+
color:firebrick;
|
641 |
+
font-family:'Open Sans', sans-serif;
|
642 |
+
font-weight:normal;
|
643 |
+
font-size:14px;
|
644 |
+
line-height:20px;
|
645 |
+
border-radius:3px;
|
646 |
+
text-align:center;
|
647 |
+
cursor:default;
|
648 |
+
}
|
649 |
+
#sa_shortcode_copy {
|
650 |
+
float:none;
|
651 |
+
margin:10px 0px 0px;
|
652 |
+
}
|
653 |
+
#sa_preview_slider {
|
654 |
+
float:right;
|
655 |
+
margin:10px 0px 0px;
|
656 |
+
}
|
657 |
+
#sa_preview_popup {
|
658 |
+
position:fixed;
|
659 |
+
top:0px;
|
660 |
+
left:0px;
|
661 |
+
width:100%;
|
662 |
+
height:100%;
|
663 |
+
background-color:rgba(0,0,0,0.8);
|
664 |
+
z-index:100041;
|
665 |
+
}
|
666 |
+
#sa_preview_popup #sa_preview_wrapper {
|
667 |
+
position:absolute;
|
668 |
+
box-sizing:border-box;
|
669 |
+
width:96%;
|
670 |
+
top:4%;
|
671 |
+
left:2%;
|
672 |
+
padding:20px 30px;
|
673 |
+
background-color:#ffffff;
|
674 |
+
}
|
675 |
+
#sa_preview_popup #sa_preview_wrapper #sa_preview_close {
|
676 |
+
position:absolute;
|
677 |
+
top:0px;
|
678 |
+
right:0px;
|
679 |
+
padding:3px 0px;
|
680 |
+
width:30px;
|
681 |
+
text-align:center;
|
682 |
+
font-weight:bold;
|
683 |
+
font-size:24px;
|
684 |
+
line-height:24px;
|
685 |
+
color:#000000;
|
686 |
+
cursor:pointer;
|
687 |
+
transition:background .3s ease-in-out;
|
688 |
+
-webkit-transition:background .3s ease-in-out;
|
689 |
+
-moz-transition:background .3s ease-in-out;
|
690 |
+
-o-transition:background .3s ease-in-out;
|
691 |
+
}
|
692 |
+
#sa_preview_popup #sa_preview_wrapper #sa_preview_close:hover {
|
693 |
+
background-color:#d0d0d0;
|
694 |
+
}
|
695 |
+
|
696 |
+
/* ### METABOX 'Items Displayed' ### */
|
697 |
+
#items_displayed_metabox > h4 {
|
698 |
+
color:#303030;
|
699 |
+
margin:10px 0px 5px;
|
700 |
+
font-family:'Open Sans', sans-serif;
|
701 |
+
font-size:14px;
|
702 |
+
font-weight:600;
|
703 |
+
line-height:20px;
|
704 |
+
}
|
705 |
+
#items_displayed_metabox > div {
|
706 |
+
clear:both;
|
707 |
+
}
|
708 |
+
#items_displayed_metabox > div em {
|
709 |
+
display:block;
|
710 |
+
float:left;
|
711 |
+
margin-left:10px;
|
712 |
+
line-height:30px !important;
|
713 |
+
height:32px !important;
|
714 |
+
background-position:0px 8px !important;
|
715 |
+
cursor:help;
|
716 |
+
}
|
717 |
+
#items_displayed_metabox > div span {
|
718 |
+
display:block;
|
719 |
+
float:left;
|
720 |
+
padding-left:5px;
|
721 |
+
color:#303030;
|
722 |
+
width:120px;
|
723 |
+
font-family:'Open Sans', sans-serif;
|
724 |
+
font-weight:400;
|
725 |
+
font-size:13px;
|
726 |
+
line-height:32px;
|
727 |
+
height:32px !important;
|
728 |
+
}
|
729 |
+
#items_displayed_metabox > div select {
|
730 |
+
margin:1px 1px 3px !important;
|
731 |
+
max-width:50px !important;
|
732 |
+
}
|
733 |
+
|
734 |
+
/* ### METABOX 'Slider Style' ### */
|
735 |
+
#slider_style_metabox h4 {
|
736 |
+
position:relative;
|
737 |
+
color:#303030;
|
738 |
+
margin:15px 0px 3px;
|
739 |
+
font-family:'Open Sans', sans-serif;
|
740 |
+
font-size:14px;
|
741 |
+
font-weight:600;
|
742 |
+
line-height:20px;
|
743 |
+
}
|
744 |
+
#slider_style_metabox h4 span {
|
745 |
+
color:#909090 !important;
|
746 |
+
font-weight:400;
|
747 |
+
}
|
748 |
+
#slider_style_metabox h4 span {
|
749 |
+
color:firebrick;
|
750 |
+
}
|
751 |
+
#slider_style_metabox h4 em {
|
752 |
+
display:inline-block;
|
753 |
+
position:absolute;
|
754 |
+
top:1px;
|
755 |
+
width:16px;
|
756 |
+
height:16px;
|
757 |
+
background-position:0px 0px !important;
|
758 |
+
cursor:help;
|
759 |
+
margin-left:5px;
|
760 |
+
}
|
761 |
+
#slider_style_metabox #sa_css_id {
|
762 |
+
width:100%;
|
763 |
+
margin-bottom:15px;
|
764 |
+
font-size:14px !important;
|
765 |
+
line-height:20px !important;
|
766 |
+
padding:5px 7px !important;
|
767 |
+
}
|
768 |
+
#slider_style_metabox #css_note_text {
|
769 |
+
padding-left:3px;
|
770 |
+
padding-bottom:5px;
|
771 |
+
}
|
772 |
+
#slider_style_metabox #css_note_value {
|
773 |
+
margin-left:3px;
|
774 |
+
margin-bottom:25px !important;
|
775 |
+
padding:4px 5px 4px 32px;
|
776 |
+
background:#f0f0f0 url('../images/icon_copy.png') no-repeat 2px 2px;
|
777 |
+
font-size:13px;
|
778 |
+
line-height:20px;
|
779 |
+
height:20px;
|
780 |
+
color:firebrick;
|
781 |
+
cursor:pointer;
|
782 |
+
}
|
783 |
+
#slider_style_metabox .ca_style_hr {
|
784 |
+
border-top:solid 1px #e0e0e0;
|
785 |
+
width:80%;
|
786 |
+
margin:0px 10%;
|
787 |
+
}
|
788 |
+
/* slider padding*/
|
789 |
+
#slider_style_metabox .ca_style_padding > div {
|
790 |
+
float:left;
|
791 |
+
display:inline-block;
|
792 |
+
background-color:transparent;
|
793 |
+
background-repeat:no-repeat;
|
794 |
+
background-position:0px 2px;
|
795 |
+
width:45px;
|
796 |
+
height:23px;
|
797 |
+
padding:0px 0px 3px 19px;
|
798 |
+
}
|
799 |
+
#slider_style_metabox .ca_style_padding #padd_top { background-image:url('../images/padding_top.png'); }
|
800 |
+
#slider_style_metabox .ca_style_padding #padd_right { background-image:url('../images/padding_right.png'); }
|
801 |
+
#slider_style_metabox .ca_style_padding #padd_bottom { background-image:url('../images/padding_bottom.png'); }
|
802 |
+
#slider_style_metabox .ca_style_padding #padd_left { background-image:url('../images/padding_left.png'); width:38px !important; }
|
803 |
+
|
804 |
+
#slider_style_metabox .ca_style_padding div input {
|
805 |
+
width:33px !important;
|
806 |
+
margin:3px 2px !important;
|
807 |
+
outline-style:none !important;
|
808 |
+
border-style:none !important;
|
809 |
+
box-shadow:none !important;
|
810 |
+
-webkit-box-shadow:none !important;
|
811 |
+
color:#303030 !important;
|
812 |
+
font-size:13px !important;
|
813 |
+
}
|
814 |
+
/* slide style & Style for Slides */
|
815 |
+
#slider_style_metabox .ca_style_setting_line {
|
816 |
+
padding-left:5px;
|
817 |
+
padding-bottom:10px;
|
818 |
+
}
|
819 |
+
#slider_style_metabox .ca_style_setting_line span {
|
820 |
+
display:inline-block;
|
821 |
+
width:110px;
|
822 |
+
font-family:'Open Sans', sans-serif;
|
823 |
+
font-size:13px;
|
824 |
+
line-height:18px;
|
825 |
+
}
|
826 |
+
#slider_style_metabox .ca_style_setting_line .ui-spinner {
|
827 |
+
width:auto !important;
|
828 |
+
}
|
829 |
+
#slider_style_metabox .ca_style_setting_line input[type='text'] {
|
830 |
+
width:50px !important;
|
831 |
+
margin:3px 5px !important;
|
832 |
+
outline-style:none !important;
|
833 |
+
border-style:none !important;
|
834 |
+
box-shadow:none !important;
|
835 |
+
-webkit-box-shadow:none !important;
|
836 |
+
color:#303030 !important;
|
837 |
+
font-size:13px !important;
|
838 |
+
}
|
839 |
+
#slider_style_metabox .ca_style_setting_line input[type='checkbox'] {
|
840 |
+
margin-left:5px !important;
|
841 |
+
margin-right:5px !important;
|
842 |
+
}
|
843 |
+
#slider_style_metabox .ca_style_setting_line em {
|
844 |
+
display:inline-block;
|
845 |
+
padding:0px 10px 0px 5px;
|
846 |
+
font-style:normal;
|
847 |
+
color:#a0a0a0;
|
848 |
+
font-family:'Open Sans', sans-serif;
|
849 |
+
font-size:14px;
|
850 |
+
line-height:18px;
|
851 |
+
}
|
852 |
+
#slider_style_metabox .ca_style_setting_line .sp-replacer { /* spectrum color picker */
|
853 |
+
background-color:#f0f0f0 !important;
|
854 |
+
border:solid 1px #e0e0e0 !important;
|
855 |
+
padding:2px !important;
|
856 |
+
border-radius:3px !important;
|
857 |
+
}
|
858 |
+
#slider_style_metabox .ca_style_setting_line .sp-replacer .sp-preview { /* spectrum color picker */
|
859 |
+
width:28px !important;
|
860 |
+
height:16px !important;
|
861 |
+
border:solid 1px #c0c0c0 !important;
|
862 |
+
margin-right:3px !important;
|
863 |
+
}
|
864 |
+
#slider_style_metabox .ca_style_setting_line .sp-replacer .sp-dd { /* spectrum color picker */
|
865 |
+
height:16px !important;
|
866 |
+
padding:0px !important;
|
867 |
+
margin-right:2px !important;
|
868 |
+
}
|
869 |
+
#slider_style_metabox #sa_border_width,
|
870 |
+
#slider_style_metabox #sa_border_radius {
|
871 |
+
width:35px !important;
|
872 |
+
}
|
873 |
+
#slider_style_metabox #ca_style_min_height span {
|
874 |
+
width:80px;
|
875 |
+
background-position:0px 1px !important;
|
876 |
+
height:20px !important;
|
877 |
+
padding-left:20px !important;
|
878 |
+
padding-bottom:3px !important;
|
879 |
+
cursor:help;
|
880 |
+
}
|
881 |
+
#slider_style_metabox #ca_style_min_height em {
|
882 |
+
padding:0px 8px 0px 0px !important;
|
883 |
+
color:#404040 !important;
|
884 |
+
font-size:13px !important;
|
885 |
+
line-height:18px !important;
|
886 |
+
}
|
887 |
+
#slider_style_metabox #ca_style_padding_top_bottom {
|
888 |
+
background:transparent url('../images/padding_top_bottom.png') no-repeat 5px 0px !important;
|
889 |
+
padding-left:28px !important;
|
890 |
+
}
|
891 |
+
#slider_style_metabox #ca_style_padding_left_right,
|
892 |
+
#slider_style_metabox #ca_style_margin_left_right {
|
893 |
+
background:transparent url('../images/padding_left_right.png') no-repeat 5px 0px !important;
|
894 |
+
padding-left:28px !important;
|
895 |
+
}
|
896 |
+
#slider_style_metabox #ca_style_padding_top_bottom > span,
|
897 |
+
#slider_style_metabox #ca_style_padding_left_right > span,
|
898 |
+
#slider_style_metabox #ca_style_margin_left_right > span {
|
899 |
+
width:87px;
|
900 |
+
background-position:67px 2px !important;
|
901 |
+
height:20px !important;
|
902 |
+
cursor:help;
|
903 |
+
}
|
904 |
+
/* other settings */
|
905 |
+
#slider_style_metabox #sa_window_onload_line {
|
906 |
+
padding:5px 0px 10px 0px !important;
|
907 |
+
font-size:13px !important;
|
908 |
+
line-height:18px !important;
|
909 |
+
cursor:help !important;
|
910 |
+
}
|
911 |
+
#slider_style_metabox #sa_window_onload_line span {
|
912 |
+
margin-right:5px;
|
913 |
+
float:left !important;
|
914 |
+
display:block !important;
|
915 |
+
}
|
916 |
+
#slider_style_metabox #sa_window_onload_line input[type=checkbox] {
|
917 |
+
margin-left:10px !important;
|
918 |
+
margin-right:0px !important;
|
919 |
+
}
|
920 |
+
|
921 |
+
/* ### METABOX 'Information' - 'SLIDE ADDED', 'SLIDE DELETED', 'SLIDE DUPLICATED' & 'SLIDE MOVED' INFO MESSAGES ### */
|
922 |
+
#sa_slide_added_mess,
|
923 |
+
#sa_slide_duplicated_mess,
|
924 |
+
#sa_slide_moved_mess {
|
925 |
+
margin:0px !important;
|
926 |
+
color:#4285F4;
|
927 |
+
font-family:'Open Sans', sans-serif;
|
928 |
+
font-weight:normal;
|
929 |
+
font-size:20px !important;
|
930 |
+
line-height:26px !important;
|
931 |
+
}
|
932 |
+
#sa_slide_deleted_mess {
|
933 |
+
margin:0px !important;
|
934 |
+
color:crimson;
|
935 |
+
font-family:'Open Sans', sans-serif;
|
936 |
+
font-weight:normal;
|
937 |
+
font-size:20px !important;
|
938 |
+
line-height:26px !important;
|
939 |
+
}
|
940 |
+
|
941 |
+
/* ### JQUERY UI - TOOLTIPS ### */
|
942 |
+
.sa_tooltip {
|
943 |
+
display:inline-block;
|
944 |
+
width:16px;
|
945 |
+
height:16px;
|
946 |
+
background:transparent url('../images/icon_info.png') no-repeat top left;
|
947 |
+
}
|
948 |
+
|
949 |
+
/* ### JQUERY UI - CONFIRMATION DIALOG BOXES ### */
|
950 |
+
#sa_dialog_box {
|
951 |
+
display:none;
|
952 |
+
}
|
953 |
+
.ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar {
|
954 |
+
padding:7px 12px !important;
|
955 |
+
line-height:22px !important;
|
956 |
+
height:22px !important;
|
957 |
+
}
|
958 |
+
.ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar .ui-dialog-title {
|
959 |
+
color:#333333 !important;
|
960 |
+
font-family:Arial, Helvetica, sans-serif !important;
|
961 |
+
font-weight:bold !important;
|
962 |
+
font-size:16px !important;
|
963 |
+
line-height:22px !important;
|
964 |
+
}
|
965 |
+
.ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar button:before {
|
966 |
+
font-size:16px !important;
|
967 |
+
line-height:16px !important;
|
968 |
+
height:16px !important;
|
969 |
+
width:16px !important;
|
970 |
+
}
|
971 |
+
.ui-dialog[aria-describedby='sa_dialog_box'] #sa_dialog_box {
|
972 |
+
padding:15px 10px 10px !important;
|
973 |
+
}
|
974 |
+
|
975 |
+
/* ### JQUERY UI - PREVIEW SLIDER DIALOG BOX ### */
|
976 |
+
#sa_preview_box {
|
977 |
+
display:none;
|
978 |
+
}
|
979 |
+
.ui-dialog[aria-describedby='sa_preview_box'] {
|
980 |
+
position:fixed !important;
|
981 |
+
width:90% !important;
|
982 |
+
top:60px !important;
|
983 |
+
z-index:9999 !important;
|
984 |
+
}
|
985 |
+
.ui-dialog[aria-describedby='sa_preview_box'] .ui-dialog-titlebar {
|
986 |
+
padding:7px 12px !important;
|
987 |
+
line-height:22px !important;
|
988 |
+
height:22px !important;
|
989 |
+
}
|
990 |
+
.ui-dialog[aria-describedby='sa_preview_box'] .ui-dialog-titlebar .ui-dialog-title {
|
991 |
+
color:#333333 !important;
|
992 |
+
font-family:Arial, Helvetica, sans-serif !important;
|
993 |
+
font-weight:bold !important;
|
994 |
+
font-size:16px !important;
|
995 |
+
line-height:22px !important;
|
996 |
+
}
|
997 |
+
.ui-dialog[aria-describedby='sa_preview_box'] .ui-dialog-titlebar button:before {
|
998 |
+
font-size:16px !important;
|
999 |
+
line-height:16px !important;
|
1000 |
+
height:16px !important;
|
1001 |
+
width:16px !important;
|
1002 |
+
}
|
1003 |
+
.ui-dialog[aria-describedby='sa_preview_box'] #sa_preview_box {
|
1004 |
+
padding:20px 15px 15px !important;
|
1005 |
+
}
|
1006 |
+
.ui-dialog[aria-describedby='sa_preview_box'] #sa_preview_box #sa_preview_note {
|
1007 |
+
padding-top:20px;
|
1008 |
+
font-size:13px;
|
1009 |
+
line-height:20px;
|
1010 |
+
color:#a0a0a0;
|
1011 |
+
}
|
1012 |
+
.ui-widget-overlay {
|
1013 |
+
background-color:rgba(0,0,0,0.7) !important;
|
1014 |
+
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
1015 |
+
filter:alpha(opacity=100);
|
1016 |
+
-moz-opacity:1.0;
|
1017 |
+
-khtml-opacity:1.0;
|
1018 |
+
opacity:1.0;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
/* ### JQUERY UI - SPINNER ### */
|
1022 |
+
.ui-state-default .ui-icon {
|
1023 |
+
background-image:url('../images/ui-icons_777777_256x240.png') !important;
|
1024 |
+
}
|
1025 |
+
.ui-state-hover .ui-icon {
|
1026 |
+
background-image:url('../images/ui-icons_444444_256x240.png') !important;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
|
1030 |
+
|
1031 |
+
/*
|
1032 |
+
####################################
|
1033 |
+
### SLIDE ANYTHING SETTINGS PAGE ###
|
1034 |
+
####################################
|
1035 |
+
*/
|
1036 |
+
#sa_settings_page_wrapper h1 {
|
1037 |
+
margin:0px;
|
1038 |
+
padding:20px 0px 10px;
|
1039 |
+
font-size:26px !important;
|
1040 |
+
line-height:32px !important;
|
1041 |
+
}
|
1042 |
+
#sa_settings_page_wrapper h2 {
|
1043 |
+
margin:0px;
|
1044 |
+
padding:20px 0px 20px;
|
1045 |
+
font-size:18px !important;
|
1046 |
+
line-height:24px !important;
|
1047 |
+
}
|
1048 |
+
#sa_settings_page_wrapper > p,
|
1049 |
+
#sa_settings_page_wrapper > form > p {
|
1050 |
+
margin:0px;
|
1051 |
+
padding:0px 0px 10px;
|
1052 |
+
font-size:15px;
|
1053 |
+
line-height:22px;
|
1054 |
+
}
|
1055 |
+
#sa_settings_page_wrapper > p a {
|
1056 |
+
color:#0073aa;
|
1057 |
+
text-decoration:none;
|
1058 |
+
}
|
1059 |
+
#sa_settings_page_wrapper > p a:hover {
|
1060 |
+
text-decoration:underline;
|
1061 |
+
}
|
1062 |
+
#sa_settings_page_wrapper ol {
|
1063 |
+
margin:0px 0px 0px 20px;
|
1064 |
+
}
|
1065 |
+
#sa_settings_page_wrapper ol li {
|
1066 |
+
font-size:15px;
|
1067 |
+
line-height:22px;
|
1068 |
+
margin:2px 0px 0px;
|
1069 |
+
padding:0px;
|
1070 |
+
}
|
1071 |
+
#sa_settings_page_wrapper ol li h4 {
|
1072 |
+
margin:0px;
|
1073 |
+
padding:0px;
|
1074 |
+
font-size:15px !important;
|
1075 |
+
line-height:22px !important;
|
1076 |
+
}
|
1077 |
+
#sa_settings_page_wrapper ol li p {
|
1078 |
+
margin:0px;
|
1079 |
+
padding:0px;
|
1080 |
+
font-size:14px;
|
1081 |
+
line-height:22px;
|
1082 |
+
}
|
1083 |
+
#sa_settings_page_wrapper ol li ul {
|
1084 |
+
list-style-type:disc;
|
1085 |
+
margin:0px 0px 10px 25px;
|
1086 |
+
}
|
1087 |
+
#sa_settings_page_wrapper ol li ul li {
|
1088 |
+
margin:0px;
|
1089 |
+
padding:0px;
|
1090 |
+
font-size:14px !important;
|
1091 |
+
line-height:22px !important;
|
1092 |
+
}
|
1093 |
+
#sa_settings_page_wrapper > form > table {
|
1094 |
+
margin:0px;
|
1095 |
+
}
|
1096 |
+
#sa_settings_page_wrapper > form > table tr th {
|
1097 |
+
width:180px;
|
1098 |
+
padding:10px 10px 10px 20px;
|
1099 |
+
line-height:27px;
|
1100 |
+
}
|
1101 |
+
#sa_settings_page_wrapper > form > table tr td {
|
1102 |
+
padding:10px 0px 10px 10px;
|
1103 |
+
}
|
1104 |
+
#sa_settings_page_wrapper > form > table tr td input[type=text] {
|
1105 |
+
width:300px;
|
1106 |
+
max-width:90%;
|
1107 |
+
}
|
1108 |
+
#sa_settings_page_wrapper > form input[type=submit] {
|
1109 |
+
margin:10px 0px 0px 20px;
|
1110 |
+
}
|
1111 |
+
#sa_settings_page_wrapper #sa_settings_page_message {
|
1112 |
+
display:inline-block;
|
1113 |
+
margin:20px 0px 0px 20px;
|
1114 |
+
padding:7px 12px;
|
1115 |
+
background-color:#ffffff;
|
1116 |
+
color:green;
|
1117 |
+
border:solid 1px #d8d8d8;
|
1118 |
+
border-radius:5px;
|
1119 |
+
font-size:18px;
|
1120 |
+
line-height:24px;
|
1121 |
+
font-weight:normal;
|
1122 |
+
}
|
1123 |
+
@media screen and (max-width:782px) {
|
1124 |
+
#sa_settings_page_wrapper > form > table tr th { padding:10px 0px 0px 2px; }
|
1125 |
+
#sa_settings_page_wrapper > form > table tr td { padding:0px 0px 10px 0px; }
|
1126 |
+
#sa_settings_page_wrapper #sa_settings_page_message { margin:20px 0px 0px 0px; font-size:16px; line-height:22px; }
|
1127 |
+
}
|
trunk/css/tinymce_style.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
################################################################
|
3 |
+
### SLIDE ANYTHING PLUGIN - STYLE FOR TINYMCE EDITOR BUTTOND ###
|
4 |
+
################################################################
|
5 |
+
*/
|
6 |
+
i.mce-i-icon {
|
7 |
+
font:400 20px/1 dashicons;
|
8 |
+
padding:0px;
|
9 |
+
vertical-align:top;
|
10 |
+
speak:none;
|
11 |
+
-webkit-font-smoothing:antialiased;
|
12 |
+
-moz-osx-font-smoothing:grayscale;
|
13 |
+
margin-left:-2px;
|
14 |
+
padding-right:2px
|
15 |
+
}
|
trunk/images/black_icon_next.png
ADDED
Binary file
|
trunk/images/black_icon_prev.png
ADDED
Binary file
|
trunk/images/black_lightbox_video.png
ADDED
Binary file
|
trunk/images/black_lightbox_zoom.png
ADDED
Binary file
|
trunk/images/black_slide_link.png
ADDED
Binary file
|
trunk/images/icon_copy.png
ADDED
Binary file
|
trunk/images/icon_info.png
ADDED
Binary file
|
trunk/images/icon_next.png
ADDED
Binary file
|
trunk/images/icon_prev.png
ADDED
Binary file
|
trunk/images/image_placeholder.jpg
ADDED
Binary file
|
trunk/images/image_placeholder_popup.jpg
ADDED
Binary file
|
trunk/images/lightbox_video.png
ADDED
Binary file
|
trunk/images/lightbox_zoom.png
ADDED
Binary file
|
trunk/images/padding_bottom.png
ADDED
Binary file
|
trunk/images/padding_left.png
ADDED
Binary file
|
trunk/images/padding_left_right.png
ADDED
Binary file
|
trunk/images/padding_right.png
ADDED
Binary file
|
trunk/images/padding_top.png
ADDED
Binary file
|
trunk/images/padding_top_bottom.png
ADDED
Binary file
|
trunk/images/sample_logo1.png
ADDED
Binary file
|
trunk/images/sample_logo2.png
ADDED
Binary file
|
trunk/images/sample_logo3.png
ADDED
Binary file
|
trunk/images/sample_logo4.png
ADDED
Binary file
|
trunk/images/sample_logo5.png
ADDED
Binary file
|
trunk/images/sample_logo6.png
ADDED
Binary file
|
trunk/images/sample_logo7.png
ADDED
Binary file
|
trunk/images/sample_logo8.png
ADDED
Binary file
|
trunk/images/slide_link.png
ADDED
Binary file
|
trunk/images/ui-icons_444444_256x240.png
ADDED
Binary file
|
trunk/images/ui-icons_555555_256x240.png
ADDED
Binary file
|
trunk/images/ui-icons_777620_256x240.png
ADDED
Binary file
|
trunk/images/ui-icons_777777_256x240.png
ADDED
Binary file
|
trunk/images/ui-icons_cc0000_256x240.png
ADDED
Binary file
|
trunk/images/ui-icons_ffffff_256x240.png
ADDED
Binary file
|
trunk/images/video_placeholder.jpg
ADDED
Binary file
|
trunk/images/video_placeholder_admin.jpg
ADDED
Binary file
|
trunk/js/add_tinymce_button.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
############################################################################
|
3 |
+
### SLIDE ANYTHING PLUGIN - JAVASCRIPT/JQUERY FOR TINYMCE EDITOR BUTTOND ###
|
4 |
+
############################################################################
|
5 |
+
*/
|
6 |
+
(function() {
|
7 |
+
tinymce.PluginManager.add('tinymce_button', function(editor, url) {
|
8 |
+
// get a list of shortcode values from previously defined array 'sa_title_arr' and 'sa_id_arr'
|
9 |
+
var shortcode_values = [];
|
10 |
+
jQuery.each(sa_title_arr, function(i) {
|
11 |
+
shortcode_values.push({text: sa_title_arr[i], value:sa_id_arr[i]});
|
12 |
+
});
|
13 |
+
|
14 |
+
// add TinyMCE editor button, which opens a popup containing a dropdown list of slider titles
|
15 |
+
// when a slider title is selected the corresponing SA shortcode is generated and displayed within the editor content
|
16 |
+
editor.addButton('tinymce_button', {
|
17 |
+
title: 'Slide Anything Sliders',
|
18 |
+
type: 'menubutton',
|
19 |
+
icon: 'icon dashicons-images-alt2',
|
20 |
+
onClick: function() {
|
21 |
+
editor.windowManager.open({
|
22 |
+
title: 'Insert Slider Anywhere Shortcode',
|
23 |
+
body: [{
|
24 |
+
type: 'listbox',
|
25 |
+
name: 'sa_id',
|
26 |
+
label: 'Slider Title',
|
27 |
+
values: shortcode_values
|
28 |
+
}],
|
29 |
+
onsubmit: function(e) {
|
30 |
+
editor.insertContent("[slide-anything id='" + e.data.sa_id + "']");
|
31 |
+
}
|
32 |
+
});
|
33 |
+
}
|
34 |
+
});
|
35 |
+
});
|
36 |
+
})();
|
trunk/js/slide-anything-admin.js
ADDED
@@ -0,0 +1,914 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// ##################################################################
|
2 |
+
// ### SLIDE ANYTHING PLUGIN - JAVASCRIPT FOR WORDPRESS DASHBOARD ###
|
3 |
+
// ##################################################################
|
4 |
+
|
5 |
+
jQuery(function() {
|
6 |
+
// ##### JQUERY-UI TOOLTIPS #####
|
7 |
+
jQuery(".sa_tooltip").tooltip();
|
8 |
+
|
9 |
+
// ##### JQUERY-UI - SLIDE DURATION SLIDER/INPUT #####
|
10 |
+
var init_value = jQuery("#sa_slide_duration").val();
|
11 |
+
jQuery("#jq_slider_duration").slider({
|
12 |
+
range:"max",
|
13 |
+
min:0,
|
14 |
+
max:30,
|
15 |
+
step:0.1,
|
16 |
+
value:init_value,
|
17 |
+
slide:function(event, ui) {
|
18 |
+
jQuery("#sa_slide_duration").val(ui.value);
|
19 |
+
}
|
20 |
+
});
|
21 |
+
jQuery("#sa_slide_duration").val(jQuery("#jq_slider_duration").slider("value"));
|
22 |
+
|
23 |
+
// ##### JQUERY-UI - SLIDE BY SLIDER/INPUT #####
|
24 |
+
var init_value = jQuery("#sa_slide_by").val();
|
25 |
+
jQuery("#jq_slider_by").slider({
|
26 |
+
range:"max",
|
27 |
+
min:0,
|
28 |
+
max:12,
|
29 |
+
step:1,
|
30 |
+
value:init_value,
|
31 |
+
slide:function(event, ui) {
|
32 |
+
jQuery("#sa_slide_by").val(ui.value);
|
33 |
+
}
|
34 |
+
});
|
35 |
+
jQuery("#sa_slide_by").val(jQuery("#jq_slider_by").slider("value"));
|
36 |
+
|
37 |
+
// ##### JQUERY-UI - SLIDE TRANSITION SLIDER/INPUT #####
|
38 |
+
var init_value = jQuery("#sa_slide_transition").val();
|
39 |
+
jQuery("#jq_slider_transition").slider({
|
40 |
+
range:"max",
|
41 |
+
min:0,
|
42 |
+
max:3,
|
43 |
+
step:0.1,
|
44 |
+
value:init_value,
|
45 |
+
slide:function(event, ui) {
|
46 |
+
jQuery("#sa_slide_transition").val(ui.value);
|
47 |
+
}
|
48 |
+
});
|
49 |
+
jQuery("#sa_slide_transition").val(jQuery("#jq_slider_transition").slider("value"));
|
50 |
+
|
51 |
+
// ##### CHANGE EVENT HANDLER FOR 'Disable Visual Editor' CHECKBOX #####
|
52 |
+
jQuery('#sa_disable_visual_editor').change(function() {
|
53 |
+
// save the custom post type
|
54 |
+
jQuery('#sa_disable_visual_editor').css('cursor', 'wait');
|
55 |
+
jQuery('body').css('cursor', 'wait');
|
56 |
+
jQuery('#publish').click();
|
57 |
+
})
|
58 |
+
|
59 |
+
// ##### JQUERY-UI ACCORDION CONTAINING CONTENT FOR ALL SLIDES #####
|
60 |
+
jQuery("#slider_accordion").accordion({
|
61 |
+
heightStyle: "content"
|
62 |
+
});
|
63 |
+
|
64 |
+
// ##### JQUERY-UI TABS FOR EACH SLIDE #####
|
65 |
+
var slide_count = jQuery("#num_slides_id").val();
|
66 |
+
for (i = 1; i <= slide_count; i++) {
|
67 |
+
var slide_tabs_id = 'slide_' + i + '_tabs';
|
68 |
+
jQuery('#' + slide_tabs_id).tabs();
|
69 |
+
change_slide_popup_background(i);
|
70 |
+
}
|
71 |
+
|
72 |
+
// ##### CLICK EVENT HANDLER FOR THE 'Add Slide' BUTTON #####
|
73 |
+
// increment the hidden 'number of slides' input field and save the custom post type
|
74 |
+
jQuery('#sa_add_slide').click(function() {
|
75 |
+
var num = jQuery("#num_slides_id").val();
|
76 |
+
var num = parseInt(num) + 1;
|
77 |
+
jQuery("#num_slides_id").val(num);
|
78 |
+
// set hidden input field to notify that a status message must be displayed
|
79 |
+
var info_added = document.getElementById('sa_info_added');
|
80 |
+
info_added.value = "1";
|
81 |
+
// save the custom post type
|
82 |
+
jQuery('#sa_add_slide').css('cursor', 'wait');
|
83 |
+
jQuery('body').css('cursor', 'wait');
|
84 |
+
jQuery('#publish').click();
|
85 |
+
});
|
86 |
+
|
87 |
+
// ##### CLICK EVENT HANDLER FOR THE SHORTCODE 'Copy to Clipboard' BUTTON #####
|
88 |
+
jQuery('#sa_shortcode_copy').click(function() {
|
89 |
+
var shortcode = document.getElementById('sa_slider_shortcode').innerHTML;
|
90 |
+
var aux = document.createElement("input"); // Create a "hidden" input
|
91 |
+
aux.setAttribute("value", shortcode); // Assign it the value of the specified element
|
92 |
+
document.body.appendChild(aux); // Append it to the body
|
93 |
+
aux.select(); // Highlight its content
|
94 |
+
document.execCommand("copy"); // Copy the highlighted text
|
95 |
+
document.body.removeChild(aux); // Remove it from the body
|
96 |
+
// DISPLAY 'Shortcode Copied' message
|
97 |
+
document.getElementById('sa_slider_shortcode').innerHTML = "Copied!";
|
98 |
+
setTimeout(function(){ document.getElementById('sa_slider_shortcode').innerHTML = shortcode; }, 1000);
|
99 |
+
});
|
100 |
+
|
101 |
+
// ##### CHANGE EVENT HANDLER FOR CSS ID INPUT BOX #####
|
102 |
+
jQuery('#sa_css_id').change(function() {
|
103 |
+
var css_id = document.getElementById('sa_css_id').value;
|
104 |
+
document.getElementById('css_note_value').innerHTML = '#' + css_id + ' .owl-item';
|
105 |
+
});
|
106 |
+
|
107 |
+
// ##### CLICK EVENT HANDLER FOR THE CSS SELECTOR 'Copy to Clipboard' BUTTON #####
|
108 |
+
jQuery('#css_note_value').click(function() {
|
109 |
+
var css_selector = document.getElementById('css_note_value').innerHTML;
|
110 |
+
var aux = document.createElement("input"); // Create a "hidden" input
|
111 |
+
aux.setAttribute("value", css_selector); // Assign it the value of the specified element
|
112 |
+
document.body.appendChild(aux); // Append it to the body
|
113 |
+
aux.select(); // Highlight its content
|
114 |
+
document.execCommand("copy"); // Copy the highlighted text
|
115 |
+
document.body.removeChild(aux); // Remove it from the body
|
116 |
+
// DISPLAY 'Shortcode Copied' message
|
117 |
+
document.getElementById('css_note_value').innerHTML = "Copied!";
|
118 |
+
setTimeout(function(){ document.getElementById('css_note_value').innerHTML = css_selector; }, 1000);
|
119 |
+
});
|
120 |
+
|
121 |
+
// ##### SPECTRUM COLOR PICKER - SLIDER BACKGROUND COLOR #####
|
122 |
+
if (document.getElementById('sa_background_color')) {
|
123 |
+
var background_color = document.getElementById('sa_background_color').value;
|
124 |
+
jQuery("#sa_background_color").spectrum({
|
125 |
+
showPaletteOnly: true,
|
126 |
+
togglePaletteOnly: true,
|
127 |
+
togglePaletteMoreText: 'more',
|
128 |
+
togglePaletteLessText: 'less',
|
129 |
+
showInput: true,
|
130 |
+
allowEmpty:true,
|
131 |
+
preferredFormat: "rgb",
|
132 |
+
showAlpha: true,
|
133 |
+
color: background_color,
|
134 |
+
palette: [
|
135 |
+
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
136 |
+
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
137 |
+
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
138 |
+
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
139 |
+
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
140 |
+
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
141 |
+
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
142 |
+
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
143 |
+
]
|
144 |
+
});
|
145 |
+
}
|
146 |
+
|
147 |
+
// ##### JQUERY-UI SPINNER - SLIDER BORDER WIDTH #####
|
148 |
+
jQuery("#sa_border_width").spinner({
|
149 |
+
step: 1,
|
150 |
+
min: 0,
|
151 |
+
max: 10,
|
152 |
+
numberFormat: "n"
|
153 |
+
});
|
154 |
+
// ##### CHANGE EVENT HANDLER - SLIDER BORDER WIDTH #####
|
155 |
+
jQuery('#sa_border_width').change(function() {
|
156 |
+
var border_width = document.getElementById('sa_border_width').value;
|
157 |
+
if (jQuery.isNumeric(border_width)) {
|
158 |
+
if ((border_width >= 0) && (border_width <= 10)) {
|
159 |
+
// valid number
|
160 |
+
} else {
|
161 |
+
document.getElementById('sa_border_width').value = '0'; // number out of range
|
162 |
+
}
|
163 |
+
} else {
|
164 |
+
document.getElementById('sa_border_width').value = '0'; // not a valid number
|
165 |
+
}
|
166 |
+
});
|
167 |
+
// ##### SPECTRUM COLOR PICKER - SLIDER BORDER COLOR #####
|
168 |
+
if (document.getElementById('sa_border_color')) {
|
169 |
+
var border_color = document.getElementById('sa_border_color').value;
|
170 |
+
jQuery("#sa_border_color").spectrum({
|
171 |
+
showPaletteOnly: true,
|
172 |
+
togglePaletteOnly: true,
|
173 |
+
togglePaletteMoreText: 'more',
|
174 |
+
togglePaletteLessText: 'less',
|
175 |
+
showInput: true,
|
176 |
+
allowEmpty:true,
|
177 |
+
preferredFormat: "rgb",
|
178 |
+
showAlpha: true,
|
179 |
+
color: border_color,
|
180 |
+
palette: [
|
181 |
+
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
182 |
+
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
183 |
+
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
184 |
+
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
185 |
+
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
186 |
+
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
187 |
+
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
188 |
+
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
189 |
+
]
|
190 |
+
});
|
191 |
+
}
|
192 |
+
|
193 |
+
// ##### JQUERY-UI SPINNER - SLIDER BORDER RADIUS #####
|
194 |
+
jQuery("#sa_border_radius").spinner({
|
195 |
+
step: 1,
|
196 |
+
min: 0,
|
197 |
+
max: 20,
|
198 |
+
numberFormat: "n"
|
199 |
+
});
|
200 |
+
// ##### CHANGE EVENT HANDLER - SLIDER BORDER RADIUS #####
|
201 |
+
jQuery('#sa_border_radius').change(function() {
|
202 |
+
var border_radius = document.getElementById('sa_border_radius').value;
|
203 |
+
if (jQuery.isNumeric(border_radius)) {
|
204 |
+
if ((border_radius >= 0) && (border_radius <= 20)) {
|
205 |
+
// valid number
|
206 |
+
} else {
|
207 |
+
document.getElementById('sa_border_radius').value = '0'; // number out of range
|
208 |
+
}
|
209 |
+
} else {
|
210 |
+
document.getElementById('sa_border_radius').value = '0'; // not a valid number
|
211 |
+
}
|
212 |
+
});
|
213 |
+
|
214 |
+
// ##### JQUERY-UI SPINNERS - WRAPPER PADDING (TOP, RIGHT, BOTTOM, LEFT) #####
|
215 |
+
jQuery("#sa_wrapper_padd_top").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
|
216 |
+
jQuery("#sa_wrapper_padd_right").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
|
217 |
+
jQuery("#sa_wrapper_padd_bottom").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
|
218 |
+
jQuery("#sa_wrapper_padd_left").spinner({ step: 1, min: 0, max: 99, numberFormat: "n" });
|
219 |
+
// ##### CHANGE EVENT HANDLER - WRAPPER PADDING TOP #####
|
220 |
+
jQuery('#sa_wrapper_padd_top').change(function() {
|
221 |
+
var wrapper_padding = document.getElementById('sa_wrapper_padd_top').value;
|
222 |
+
if (jQuery.isNumeric(wrapper_padding)) {
|
223 |
+
if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
|
224 |
+
// valid number
|
225 |
+
} else {
|
226 |
+
document.getElementById('sa_wrapper_padd_top').value = '0'; // number out of range
|
227 |
+
}
|
228 |
+
} else {
|
229 |
+
document.getElementById('sa_wrapper_padd_top').value = '0'; // not a valid number
|
230 |
+
}
|
231 |
+
});
|
232 |
+
// ##### CHANGE EVENT HANDLER - WRAPPER PADDING RIGHT #####
|
233 |
+
jQuery('#sa_wrapper_padd_right').change(function() {
|
234 |
+
var wrapper_padding = document.getElementById('sa_wrapper_padd_right').value;
|
235 |
+
if (jQuery.isNumeric(wrapper_padding)) {
|
236 |
+
if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
|
237 |
+
// valid number
|
238 |
+
} else {
|
239 |
+
document.getElementById('sa_wrapper_padd_right').value = '0'; // number out of range
|
240 |
+
}
|
241 |
+
} else {
|
242 |
+
document.getElementById('sa_wrapper_padd_right').value = '0'; // not a valid number
|
243 |
+
}
|
244 |
+
});
|
245 |
+
// ##### CHANGE EVENT HANDLER - WRAPPER PADDING BOTTOM #####
|
246 |
+
jQuery('#sa_wrapper_padd_bottom').change(function() {
|
247 |
+
var wrapper_padding = document.getElementById('sa_wrapper_padd_bottom').value;
|
248 |
+
if (jQuery.isNumeric(wrapper_padding)) {
|
249 |
+
if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
|
250 |
+
// valid number
|
251 |
+
} else {
|
252 |
+
document.getElementById('sa_wrapper_padd_bottom').value = '0'; // number out of range
|
253 |
+
}
|
254 |
+
} else {
|
255 |
+
document.getElementById('sa_wrapper_padd_bottom').value = '0'; // not a valid number
|
256 |
+
}
|
257 |
+
});
|
258 |
+
// ##### CHANGE EVENT HANDLER - WRAPPER PADDING LEFT #####
|
259 |
+
jQuery('#sa_wrapper_padd_left').change(function() {
|
260 |
+
var wrapper_padding = document.getElementById('sa_wrapper_padd_left').value;
|
261 |
+
if (jQuery.isNumeric(wrapper_padding)) {
|
262 |
+
if ((wrapper_padding >= 0) && (wrapper_padding <= 30)) {
|
263 |
+
// valid number
|
264 |
+
} else {
|
265 |
+
document.getElementById('sa_wrapper_padd_left').value = '0'; // number out of range
|
266 |
+
}
|
267 |
+
} else {
|
268 |
+
document.getElementById('sa_wrapper_padd_left').value = '0'; // not a valid number
|
269 |
+
}
|
270 |
+
});
|
271 |
+
|
272 |
+
// ##### CHANGE EVENT FOR SLIDE MINIMUM HEIGHT RADIO BUTTONS #####
|
273 |
+
jQuery('.sa_slide_min_height_type').change(function() {
|
274 |
+
var slide_min_height_type = this.value;
|
275 |
+
if (slide_min_height_type == "percent") {
|
276 |
+
document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
|
277 |
+
document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
|
278 |
+
document.getElementById('mh_suffix').innerHTML = '%';
|
279 |
+
} else if (slide_min_height_type == 'px') {
|
280 |
+
document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
|
281 |
+
document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
|
282 |
+
document.getElementById('mh_suffix').innerHTML = 'px';
|
283 |
+
} else if (slide_min_height_type == '43') {
|
284 |
+
document.getElementById('sa_slide_min_height').value = 'aspect43';
|
285 |
+
document.getElementById('sa_slide_min_height_wrapper').style.display = 'none';
|
286 |
+
} else if (slide_min_height_type == '169') {
|
287 |
+
document.getElementById('sa_slide_min_height').value = 'aspect169';
|
288 |
+
document.getElementById('sa_slide_min_height_wrapper').style.display = 'none';
|
289 |
+
}
|
290 |
+
});
|
291 |
+
|
292 |
+
// ##### JQUERY-UI SPINNER FOR SLIDE MINIMUM HEIGHT (PIXELS) #####
|
293 |
+
jQuery("#sa_slide_min_height").spinner({
|
294 |
+
step: 1,
|
295 |
+
min: 0,
|
296 |
+
max: 999,
|
297 |
+
numberFormat: "n"
|
298 |
+
});
|
299 |
+
jQuery('#sa_slide_min_height_wrapper .ui-spinner-button').click(function() {
|
300 |
+
jQuery(this).siblings('input').change();
|
301 |
+
});
|
302 |
+
// ##### CHANGE EVENT HANDLER FOR SLIDE MINIMUM HEIGHT (PERCENT/PIXELS) #####
|
303 |
+
jQuery('#sa_slide_min_height').change(function() {
|
304 |
+
var slide_min_height = document.getElementById('sa_slide_min_height').value;
|
305 |
+
var min_height_type = jQuery('input[name=sa_slide_min_height_type]:checked').val();
|
306 |
+
if (jQuery.isNumeric(slide_min_height)) {
|
307 |
+
if ((slide_min_height >= 0) && (slide_min_height <= 999)) {
|
308 |
+
// valid number
|
309 |
+
if (min_height_type == 'percent') {
|
310 |
+
document.getElementById('sa_slide_min_height_hidden').value = slide_min_height;
|
311 |
+
} else {
|
312 |
+
document.getElementById('sa_slide_min_height_hidden').value = slide_min_height + 'px';
|
313 |
+
}
|
314 |
+
} else {
|
315 |
+
document.getElementById('sa_slide_min_height').value = '0'; // number out of range
|
316 |
+
document.getElementById('sa_slide_min_height_hidden').value = '0';
|
317 |
+
}
|
318 |
+
} else {
|
319 |
+
document.getElementById('sa_slide_min_height').value = '0'; // not a valid number
|
320 |
+
document.getElementById('sa_slide_min_height_hidden').value = '0';
|
321 |
+
}
|
322 |
+
});
|
323 |
+
|
324 |
+
// ##### JQUERY-UI SPINNER FOR SLIDE PADDING TOP/BOTTOM #####
|
325 |
+
jQuery("#sa_slide_padding_tb").spinner({
|
326 |
+
step: 0.1,
|
327 |
+
min: 0,
|
328 |
+
max: 30,
|
329 |
+
numberFormat: "n"
|
330 |
+
});
|
331 |
+
// ##### CHANGE EVENT HANDLER FOR SLIDE PADDING TOP/BOTTOM #####
|
332 |
+
jQuery('#sa_slide_padding_tb').change(function() {
|
333 |
+
var slide_padding_tb = document.getElementById('sa_slide_padding_tb').value;
|
334 |
+
if (jQuery.isNumeric(slide_padding_tb)) {
|
335 |
+
if ((slide_padding_tb >= 0) && (slide_padding_tb <= 30)) {
|
336 |
+
// valid number
|
337 |
+
} else {
|
338 |
+
document.getElementById('sa_slide_padding_tb').value = '0'; // number out of range
|
339 |
+
}
|
340 |
+
} else {
|
341 |
+
document.getElementById('sa_slide_padding_tb').value = '0'; // not a valid number
|
342 |
+
}
|
343 |
+
});
|
344 |
+
|
345 |
+
// ##### JQUERY-UI SPINNER FOR SLIDE PADDING LEFT/RIGHT #####
|
346 |
+
jQuery("#sa_slide_padding_lr").spinner({
|
347 |
+
step: 0.1,
|
348 |
+
min: 0,
|
349 |
+
max: 30,
|
350 |
+
numberFormat: "n"
|
351 |
+
});
|
352 |
+
// ##### CHANGE EVENT HANDLER FOR SLIDE PADDING LEFT/RIGHT #####
|
353 |
+
jQuery('#sa_slide_padding_lr').change(function() {
|
354 |
+
var slide_padding_lr = document.getElementById('sa_slide_padding_lr').value;
|
355 |
+
if (jQuery.isNumeric(slide_padding_lr)) {
|
356 |
+
if ((slide_padding_lr >= 0) && (slide_padding_lr <= 30)) {
|
357 |
+
// valid number
|
358 |
+
} else {
|
359 |
+
document.getElementById('sa_slide_padding_lr').value = '0'; // number out of range
|
360 |
+
}
|
361 |
+
} else {
|
362 |
+
document.getElementById('sa_slide_padding_lr').value = '0'; // not a valid number
|
363 |
+
}
|
364 |
+
});
|
365 |
+
|
366 |
+
// ##### JQUERY-UI SPINNER FOR SLIDE MARGIN LEFT/RIGHT #####
|
367 |
+
jQuery("#sa_slide_margin_lr").spinner({
|
368 |
+
step: 0.1,
|
369 |
+
min: 0,
|
370 |
+
max: 20,
|
371 |
+
numberFormat: "n"
|
372 |
+
});
|
373 |
+
// ##### CHANGE EVENT HANDLER FOR SLIDE MARGIN LEFT/RIGHT #####
|
374 |
+
jQuery('#sa_slide_margin_lr').change(function() {
|
375 |
+
var slide_margin_lr = document.getElementById('sa_slide_margin_lr').value;
|
376 |
+
if (jQuery.isNumeric(slide_margin_lr)) {
|
377 |
+
if ((slide_margin_lr >= 0) && (slide_margin_lr <= 30)) {
|
378 |
+
// valid number
|
379 |
+
} else {
|
380 |
+
document.getElementById('sa_slide_margin_lr').value = '0'; // number out of range
|
381 |
+
}
|
382 |
+
} else {
|
383 |
+
document.getElementById('sa_slide_margin_lr').value = '0'; // not a valid number
|
384 |
+
}
|
385 |
+
});
|
386 |
+
})
|
387 |
+
|
388 |
+
|
389 |
+
|
390 |
+
// ##### CHANGE EVENT HANDLER FOR 'Use Popup Image as Slide Background' #####
|
391 |
+
function change_slide_popup_background(slide_no) {
|
392 |
+
var pro_version = document.getElementById('sa_pro_version').value;
|
393 |
+
if (pro_version == '1') {
|
394 |
+
var curr_value = jQuery('#sa_slide'+slide_no+'_popup_background').val();
|
395 |
+
if (curr_value != 'no') {
|
396 |
+
jQuery("#slide"+slide_no+"_thumb").css("display", "none");
|
397 |
+
jQuery("#slide"+slide_no+"_image_add").css("display", "none");
|
398 |
+
jQuery("#slide"+slide_no+"_imagebg_popup").css("display", "block");
|
399 |
+
} else {
|
400 |
+
jQuery("#slide"+slide_no+"_thumb").css("display", "block");
|
401 |
+
jQuery("#slide"+slide_no+"_image_add").css("display", "inline-block");
|
402 |
+
jQuery("#slide"+slide_no+"_imagebg_popup").css("display", "none");
|
403 |
+
}
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
|
408 |
+
|
409 |
+
jQuery(function() {
|
410 |
+
// THE VAIRABLE THAT HOLDS THE IFRAME FOR WORDPRESS MEDIA UPLOADS
|
411 |
+
var frame;
|
412 |
+
|
413 |
+
// ##### CLICK EVENT HANDLER - 'Set Background Image' LINK (BUTTON) FOR ALL SLIDES #####
|
414 |
+
jQuery('.slide_image_add').click(function(event) {
|
415 |
+
// GET THE SLIDE NUMBER (GET parameter within anchor 'href' attribute)
|
416 |
+
var anchor_element = event.target;
|
417 |
+
var upload_url = anchor_element.getAttribute('href');
|
418 |
+
var split_arr = upload_url.split("&slide=");
|
419 |
+
var slide_no = split_arr[1];
|
420 |
+
|
421 |
+
// PREVENT THE ANCHOR LINK FROM OPENING HREF TARGET PAGE
|
422 |
+
event.preventDefault();
|
423 |
+
|
424 |
+
// SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
|
425 |
+
var thumb_preview = "#slide" + slide_no + "_thumb div";
|
426 |
+
var image_id = "#sa_slide" + slide_no + "_image_id";
|
427 |
+
var del_img_but = "#slide" + slide_no + "_image_del";
|
428 |
+
|
429 |
+
// CREATE A NEW MEDIA UPLOAD FRAME
|
430 |
+
frame = wp.media({
|
431 |
+
title: 'Select the background image for your slide',
|
432 |
+
button: {
|
433 |
+
text: 'Use selected image'
|
434 |
+
},
|
435 |
+
multiple: false // only a single file may be selected
|
436 |
+
});
|
437 |
+
|
438 |
+
// AN IMAGE HAS BEEN SELECTED WITHIN THE MEDIA UPLOAD FRAME...
|
439 |
+
frame.on('select', function() {
|
440 |
+
// Get media attachment details from the frame state
|
441 |
+
var attachment = frame.state().get('selection').first().toJSON();
|
442 |
+
// Set the background image of the thumbnail preview DIV to the attachment URL
|
443 |
+
if (attachment.sizes.medium && attachment.sizes.medium.url) {
|
444 |
+
jQuery(thumb_preview).css('background-image', 'url(' + attachment.sizes.medium.url + ')');
|
445 |
+
} else {
|
446 |
+
jQuery(thumb_preview).css('background-image', 'url(' + attachment.sizes.full.url + ')');
|
447 |
+
}
|
448 |
+
// Send the attachment id to our hidden input box
|
449 |
+
jQuery(image_id).val(attachment.id);
|
450 |
+
// Unhide the delete image button
|
451 |
+
jQuery(del_img_but).removeClass('sa_hidden');
|
452 |
+
});
|
453 |
+
// Finally, open the modal on click
|
454 |
+
frame.open();
|
455 |
+
});
|
456 |
+
})
|
457 |
+
|
458 |
+
|
459 |
+
|
460 |
+
// ##### CLICK EVENT HANDLER - 'Remove Background Image' BUTTON FOR ALL SLIDES #####
|
461 |
+
function remove_slide_bg_image(slide_no) {
|
462 |
+
// SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
|
463 |
+
var thumb_preview = "#slide" + slide_no + "_thumb div";
|
464 |
+
var image_id = "#sa_slide" + slide_no + "_image_id";
|
465 |
+
var del_img_but = "#slide" + slide_no + "_image_del";
|
466 |
+
|
467 |
+
// Reset the background image of the thumbnail preview div
|
468 |
+
jQuery(thumb_preview).css('background-image', '');
|
469 |
+
// Delete the image id from the hidden input
|
470 |
+
jQuery(image_id).val('');
|
471 |
+
// Hide the delete image button
|
472 |
+
jQuery(del_img_but).addClass('sa_hidden');
|
473 |
+
}
|
474 |
+
|
475 |
+
|
476 |
+
|
477 |
+
// ##### CHANGE EVENT HANDLER - BACKGROUND POSITION DROPDOWN FOR ALL SLIDES #####
|
478 |
+
function change_slide_image_pos(slide_no) {
|
479 |
+
var background_pos = document.getElementById("sa_slide" + slide_no + "_image_pos").value;
|
480 |
+
var thumb_preview = "#slide" + slide_no + "_thumb div";
|
481 |
+
jQuery(thumb_preview).css('background-position', background_pos);
|
482 |
+
}
|
483 |
+
|
484 |
+
|
485 |
+
|
486 |
+
// ##### CHANGE EVENT HANDLER - BACKGROUND SIZE DROPDOWN FOR ALL SLIDES #####
|
487 |
+
function change_slide_image_size(slide_no) {
|
488 |
+
var background_size = document.getElementById("sa_slide" + slide_no + "_image_size").value;
|
489 |
+
var thumb_preview = "#slide" + slide_no + "_thumb div";
|
490 |
+
jQuery(thumb_preview).css('background-size', background_size);
|
491 |
+
}
|
492 |
+
|
493 |
+
|
494 |
+
|
495 |
+
// ##### CHANGE EVENT HANDLER - BACKGROUND REPEAT DROPDOWN FOR ALL SLIDES #####
|
496 |
+
function change_slide_image_repeat(slide_no) {
|
497 |
+
var background_repeat = document.getElementById("sa_slide" + slide_no + "_image_repeat").value;
|
498 |
+
var thumb_preview = "#slide" + slide_no + "_thumb div";
|
499 |
+
jQuery(thumb_preview).css('background-repeat', background_repeat);
|
500 |
+
}
|
501 |
+
|
502 |
+
|
503 |
+
|
504 |
+
jQuery(function() {
|
505 |
+
if (document.getElementById('num_slides_id')) {
|
506 |
+
var num_slides = parseInt(document.getElementById('num_slides_id').value);
|
507 |
+
// ##### LOOP THRU EACH SLIDE #####
|
508 |
+
for (i = 1; i <= num_slides; i++) {
|
509 |
+
// ##### SPECTRUM COLOR PICKER - SLIDE BACKGROUND COLOR #####
|
510 |
+
var color_picker_id = 'sa_slide' + i + '_image_color';
|
511 |
+
var background_color = document.getElementById(color_picker_id).value;
|
512 |
+
jQuery('#' + color_picker_id).spectrum({
|
513 |
+
showPaletteOnly: true,
|
514 |
+
togglePaletteOnly: true,
|
515 |
+
togglePaletteMoreText: 'more',
|
516 |
+
togglePaletteLessText: 'less',
|
517 |
+
showInput: true,
|
518 |
+
allowEmpty: true,
|
519 |
+
preferredFormat: "rgb",
|
520 |
+
showAlpha: true,
|
521 |
+
color: background_color,
|
522 |
+
palette: [
|
523 |
+
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
524 |
+
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
525 |
+
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
526 |
+
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
527 |
+
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
528 |
+
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
529 |
+
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
530 |
+
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
531 |
+
]
|
532 |
+
});
|
533 |
+
}
|
534 |
+
}
|
535 |
+
})
|
536 |
+
// ##### CHANGE EVENT HANDLER - SLIDE BACKGROUND COLOR PICKER #####
|
537 |
+
function change_slide_image_color(slide_no) {
|
538 |
+
var background_color = document.getElementById("sa_slide" + slide_no + "_image_color").value;
|
539 |
+
var thumb_preview = "#slide" + slide_no + "_thumb div";
|
540 |
+
jQuery(thumb_preview).css('background-color', background_color);
|
541 |
+
}
|
542 |
+
|
543 |
+
|
544 |
+
// ##############################################
|
545 |
+
// ##### SLIDE POPUP TAB - IMAGE POPUP TYPE #####
|
546 |
+
// ##############################################
|
547 |
+
|
548 |
+
// ##### CHANGE EVENT HANDLER - SA POPUP TYPE #####
|
549 |
+
function change_slide_popup_type(slide_no) {
|
550 |
+
var popup_type = document.getElementById("sa_slide" + slide_no + "_popup_type").value;
|
551 |
+
var image_popup_wrapper = "#slide" + slide_no + "_image_popup_wrapper";
|
552 |
+
var video_popup_wrapper = "#slide" + slide_no + "_video_popup_wrapper";
|
553 |
+
var html_popup_wrapper = "#slide" + slide_no + "_html_popup_wrapper";
|
554 |
+
if (popup_type == 'IMAGE') {
|
555 |
+
jQuery(image_popup_wrapper).css('display', 'block');
|
556 |
+
jQuery(video_popup_wrapper).css('display', 'none');
|
557 |
+
jQuery(html_popup_wrapper).css('display', 'none');
|
558 |
+
} else if (popup_type == 'VIDEO') {
|
559 |
+
jQuery(image_popup_wrapper).css('display', 'none');
|
560 |
+
jQuery(video_popup_wrapper).css('display', 'block');
|
561 |
+
jQuery(html_popup_wrapper).css('display', 'none');
|
562 |
+
} else if (popup_type == 'HTML') {
|
563 |
+
jQuery(image_popup_wrapper).css('display', 'none');
|
564 |
+
jQuery(video_popup_wrapper).css('display', 'none');
|
565 |
+
jQuery(html_popup_wrapper).css('display', 'block');
|
566 |
+
} else {
|
567 |
+
jQuery(image_popup_wrapper).css('display', 'none');
|
568 |
+
jQuery(video_popup_wrapper).css('display', 'none');
|
569 |
+
jQuery(html_popup_wrapper).css('display', 'none');
|
570 |
+
}
|
571 |
+
}
|
572 |
+
|
573 |
+
jQuery(function() {
|
574 |
+
if (jQuery('#sa_pro_version').length > 0) {
|
575 |
+
var pro_version = document.getElementById('sa_pro_version').value;
|
576 |
+
if (pro_version == '1') {
|
577 |
+
// THE VAIRABLE THAT HOLDS THE IFRAME FOR WORDPRESS MEDIA UPLOADS
|
578 |
+
var frame;
|
579 |
+
|
580 |
+
// ##### CLICK EVENT HANDLER - SLIDE IMAGE POPUP 'Set Image' BUTTON FOR ALL SLIDES #####
|
581 |
+
jQuery('.popup_image_add').click(function(event) {
|
582 |
+
// GET THE SLIDE NUMBER (GET parameter within anchor 'href' attribute)
|
583 |
+
var anchor_element = event.target;
|
584 |
+
var upload_url = anchor_element.getAttribute('href');
|
585 |
+
var split_arr = upload_url.split("&popup=");
|
586 |
+
var slide_no = split_arr[1];
|
587 |
+
|
588 |
+
// PREVENT THE ANCHOR LINK FROM OPENING HREF TARGET PAGE
|
589 |
+
event.preventDefault();
|
590 |
+
|
591 |
+
// SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
|
592 |
+
var thumb_preview = "#slide" + slide_no + "_popup_thumb";
|
593 |
+
var image_id = "#sa_slide" + slide_no + "_popup_imageid";
|
594 |
+
var del_img_but = "#slide" + slide_no + "_popup_image_del";
|
595 |
+
var preview_img_but = "#slide" + slide_no + "_popup_image_preview";
|
596 |
+
var info_dim = "#slide" + slide_no + "_popup_info_dim";
|
597 |
+
var info_size = "#slide" + slide_no + "_popup_info_size";
|
598 |
+
|
599 |
+
// CREATE A NEW MEDIA UPLOAD FRAME
|
600 |
+
frame = wp.media({
|
601 |
+
title: 'Select the popup image for your slide',
|
602 |
+
button: {
|
603 |
+
text: 'Use selected image'
|
604 |
+
},
|
605 |
+
multiple: false // only a single file may be selected
|
606 |
+
});
|
607 |
+
|
608 |
+
// AN IMAGE HAS BEEN SELECTED WITHIN THE MEDIA UPLOAD FRAME...
|
609 |
+
frame.on('select', function() {
|
610 |
+
// Get media attachment details from the frame state
|
611 |
+
var attachment = frame.state().get('selection').first().toJSON();
|
612 |
+
// Set the image source of the thumbnail preview IMG to the attachment URL
|
613 |
+
if (attachment.sizes.medium && attachment.sizes.medium.url) {
|
614 |
+
jQuery(thumb_preview+" div").html("<img src='" + attachment.sizes.medium.url + "'/>");
|
615 |
+
} else {
|
616 |
+
jQuery(thumb_preview+" div").html("<img src='" + attachment.sizes.full.url + "'/>");
|
617 |
+
}
|
618 |
+
// Send the attachment id to our hidden input box
|
619 |
+
jQuery(image_id).val(attachment.id);
|
620 |
+
// Unhide the delete image button
|
621 |
+
jQuery(del_img_but).removeClass('sa_hidden');
|
622 |
+
// Set the image URL for the popup
|
623 |
+
jQuery(preview_img_but + " a").attr("href", attachment.url);
|
624 |
+
// Update image info for the popup image
|
625 |
+
display_image_info(attachment.url, info_dim, info_size);
|
626 |
+
});
|
627 |
+
// Finally, open the modal on click
|
628 |
+
frame.open();
|
629 |
+
});
|
630 |
+
}
|
631 |
+
}
|
632 |
+
})
|
633 |
+
|
634 |
+
// ##### CLICK EVENT HANDLER - 'Remove Popup Image' BUTTON FOR ALL SLIDES #####
|
635 |
+
function remove_popup_image(slide_no, placeholder) {
|
636 |
+
// SET THE HTML ELEMENTS TO BE USED WITHIN THIS FUNCTION
|
637 |
+
var thumb_preview = "#slide" + slide_no + "_popup_thumb";
|
638 |
+
var image_id = "#sa_slide" + slide_no + "_popup_imageid";
|
639 |
+
var del_img_but = "#slide" + slide_no + "_popup_image_del";
|
640 |
+
var preview_img_but = "#slide" + slide_no + "_popup_image_preview";
|
641 |
+
var info_dim = "#slide" + slide_no + "_popup_info_dim";
|
642 |
+
var info_size = "#slide" + slide_no + "_popup_info_size";
|
643 |
+
|
644 |
+
// Reset the image source of the thumbnail preview div
|
645 |
+
jQuery(thumb_preview+" div").html("<div><img src='" + placeholder + "'/></div>");
|
646 |
+
// Delete the image id from the hidden input
|
647 |
+
jQuery(image_id).val('');
|
648 |
+
// Hide the delete image button
|
649 |
+
jQuery(del_img_but).addClass('sa_hidden');
|
650 |
+
// Set the image URL for the popup to a placeholder image
|
651 |
+
jQuery(preview_img_but + " a").attr("href", placeholder);
|
652 |
+
// clear image info
|
653 |
+
jQuery(info_dim).html('<strong>Dimensions:</strong>');
|
654 |
+
jQuery(info_size).html('<strong>File Size:</strong>');
|
655 |
+
}
|
656 |
+
|
657 |
+
// ##### CHANGE EVENT HANDLER - 'Popup Title' TEXT INPUT BOX #####
|
658 |
+
function change_popup_image_title(new_title, preview_img_but) {
|
659 |
+
var preview_link = "#" + preview_img_but + " a";
|
660 |
+
jQuery(preview_link).attr("title", new_title);
|
661 |
+
}
|
662 |
+
|
663 |
+
// ###### GET IMAGE INFO (WIDTH, HEIGHT, SIZE) FOR PROVIDED IMAGE URL AND DISPLAY WITHIN PROVIDED DIV ID ######
|
664 |
+
function display_image_info(image_url, info_dim, info_size) {
|
665 |
+
var img = new Image();
|
666 |
+
var img_width = 0;
|
667 |
+
var img_height = 0;
|
668 |
+
img.onload = function() {
|
669 |
+
img_width = this.width;
|
670 |
+
img_height = this.height;
|
671 |
+
jQuery(info_dim).html("<strong>Dimensions:</strong> " + img_width + " x " + img_height + " pixels");
|
672 |
+
};
|
673 |
+
img.src = image_url;
|
674 |
+
|
675 |
+
var request;
|
676 |
+
request = jQuery.ajax({
|
677 |
+
type: "HEAD",
|
678 |
+
url: image_url,
|
679 |
+
success: function () {
|
680 |
+
var img_size = request.getResponseHeader("Content-Length");
|
681 |
+
if ((img_size != '') && (img_size != 'null') && (img_size != 0)) {
|
682 |
+
var unit = 'bytes';
|
683 |
+
if (img_size > 1048576) {
|
684 |
+
img_size = img_size / 1048576;
|
685 |
+
img_size = Math.round(img_size * 10) / 10;
|
686 |
+
unit = 'MB';
|
687 |
+
} else if (img_size > 1024) {
|
688 |
+
img_size = img_size / 1024;
|
689 |
+
img_size = Math.round(img_size * 10) / 10;
|
690 |
+
unit = 'kb';
|
691 |
+
}
|
692 |
+
jQuery(info_size).html("<strong>File Size:</strong> " + img_size + " " + unit);
|
693 |
+
}
|
694 |
+
}
|
695 |
+
});
|
696 |
+
}
|
697 |
+
|
698 |
+
|
699 |
+
|
700 |
+
// ##############################################
|
701 |
+
// ##### SLIDE POPUP TAB - VIDEO POPUP TYPE #####
|
702 |
+
// ##############################################
|
703 |
+
|
704 |
+
// ##### CLICK EVENT HANDLER - SLIDE VIDEO POPUP 'Set Video' BUTTON #####
|
705 |
+
function update_popup_video(slide_no) {
|
706 |
+
// Get the contents of video URL input box
|
707 |
+
var video_url = document.getElementById("sa_slide" + slide_no + "_video_url").value;
|
708 |
+
var preview_button = "#slide" + slide_no + "_popup_video_preview a";
|
709 |
+
var video_type = '';
|
710 |
+
if (video_url != '') {
|
711 |
+
// Check if the URL is a valid YouTube URL - if so then extract YouTube ID
|
712 |
+
var video_id = video_url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);
|
713 |
+
if (video_id != null) {
|
714 |
+
valid_video_id = video_id[1];
|
715 |
+
video_type = 'youtube';
|
716 |
+
} else {
|
717 |
+
// Check if the URL is a valid Vimeo URL - if so then extract Vimeo ID
|
718 |
+
var regex = new RegExp(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);
|
719 |
+
if (regex.test(video_url)) {
|
720 |
+
valid_video_id = regex.exec(video_url)[5];
|
721 |
+
video_type = 'vimeo';
|
722 |
+
} else {
|
723 |
+
// URL entered is not a valid YouTube or Vimeo video URL
|
724 |
+
document.getElementById("sa_slide" + slide_no + "_video_url").value = '';
|
725 |
+
document.getElementById("sa_slide" + slide_no + "_video_invalid_url").style.display = "block";
|
726 |
+
setTimeout(function(){ document.getElementById("sa_slide" + slide_no + "_video_invalid_url").style.display = "none"; }, 3000);
|
727 |
+
}
|
728 |
+
}
|
729 |
+
}
|
730 |
+
if (video_type == 'youtube') {
|
731 |
+
// clear video url input field
|
732 |
+
document.getElementById("sa_slide" + slide_no + "_video_url").value = '';
|
733 |
+
// update hidden video id and video type fields
|
734 |
+
document.getElementById("sa_slide" + slide_no + "_popup_video_id").value = valid_video_id;
|
735 |
+
document.getElementById("sa_slide" + slide_no + "_popup_video_type").value = 'youtube';
|
736 |
+
// Display YouTube video within video preview DIV
|
737 |
+
var embed_html = "<iframe src='https://www.youtube.com/embed/" + valid_video_id + "' frameborder='0' allowfullscreen></iframe>";
|
738 |
+
document.getElementById("slide" + slide_no + "_video_thumb").innerHTML = embed_html;
|
739 |
+
// Set the video URL for the preview popup
|
740 |
+
jQuery(preview_button).attr("href", "http://www.youtube.com/watch?v=" + valid_video_id);
|
741 |
+
}
|
742 |
+
if (video_type == 'vimeo') {
|
743 |
+
// clear video url input field
|
744 |
+
document.getElementById("sa_slide" + slide_no + "_video_url").value = '';
|
745 |
+
// update hidden video id and video type fields
|
746 |
+
document.getElementById("sa_slide" + slide_no + "_popup_video_id").value = valid_video_id;
|
747 |
+
document.getElementById("sa_slide" + slide_no + "_popup_video_type").value = 'vimeo';
|
748 |
+
// Display Vimeo video within video preview DIV
|
749 |
+
var embed_html = "<iframe src='https://player.vimeo.com/video/" + valid_video_id + "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
750 |
+
document.getElementById("slide" + slide_no + "_video_thumb").innerHTML = embed_html;
|
751 |
+
// Set the video URL for the preview popup
|
752 |
+
jQuery(preview_button).attr("href", "http://vimeo.com/" + valid_video_id);
|
753 |
+
}
|
754 |
+
}
|
755 |
+
|
756 |
+
|
757 |
+
|
758 |
+
// #############################################
|
759 |
+
// ##### SLIDE POPUP TAB - HTML POPUP TYPE #####
|
760 |
+
// #############################################
|
761 |
+
|
762 |
+
// ##### SLIDE HTML POPUP 'Background Color' & 'Popup Width' #####
|
763 |
+
jQuery(function() {
|
764 |
+
if (jQuery('#sa_pro_version').length > 0) {
|
765 |
+
var pro_version = document.getElementById('sa_pro_version').value;
|
766 |
+
if (pro_version == '1') {
|
767 |
+
var num_slides = parseInt(document.getElementById('num_slides_id').value);
|
768 |
+
// ##### LOOP THRU EACH SLIDE #####
|
769 |
+
for (i = 1; i <= num_slides; i++) {
|
770 |
+
// ##### SPECTRUM COLOR PICKER - SLIDE HTML POPUP 'Background Color' #####
|
771 |
+
var color_picker_id = 'sa_slide' + i + '_popup_bgcol';
|
772 |
+
var background_color = document.getElementById(color_picker_id).value;
|
773 |
+
jQuery('#' + color_picker_id).spectrum({
|
774 |
+
showPaletteOnly: true,
|
775 |
+
togglePaletteOnly: true,
|
776 |
+
togglePaletteMoreText: 'more',
|
777 |
+
togglePaletteLessText: 'less',
|
778 |
+
showInput: true,
|
779 |
+
allowEmpty: true,
|
780 |
+
preferredFormat: "rgb",
|
781 |
+
showAlpha: true,
|
782 |
+
color: background_color,
|
783 |
+
palette: [
|
784 |
+
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
785 |
+
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
786 |
+
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
787 |
+
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
788 |
+
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
789 |
+
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
790 |
+
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
791 |
+
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
792 |
+
]
|
793 |
+
});
|
794 |
+
// ##### JQUERY-UI SPINNER - SLIDE HTML POPUP 'Popup Width' #####
|
795 |
+
var spinner_id = 'sa_slide' + i + '_popup_width';
|
796 |
+
jQuery("#" + spinner_id).spinner({
|
797 |
+
step: 1,
|
798 |
+
min: 200,
|
799 |
+
max: 2000,
|
800 |
+
numberFormat: "n"
|
801 |
+
});
|
802 |
+
|
803 |
+
// ##### CLICK EVENT FOR 'Popup CSS ID' (HTML POPUP) #####
|
804 |
+
var popup_cssid = 'sa_slide' + i + '_popup_css';
|
805 |
+
jQuery("#" + popup_cssid).click(function() {
|
806 |
+
var css_selector = jQuery(this).html();
|
807 |
+
var aux = document.createElement("input"); // Create a "hidden" input
|
808 |
+
aux.setAttribute("value", css_selector); // Assign it the value of the specified element
|
809 |
+
document.body.appendChild(aux); // Append it to the body
|
810 |
+
aux.select(); // Highlight its content
|
811 |
+
document.execCommand("copy"); // Copy the highlighted text
|
812 |
+
document.body.removeChild(aux); // Remove it from the body
|
813 |
+
var curr_col = jQuery(this).css("color");
|
814 |
+
if (curr_col == "rgb(0, 0, 0)") {
|
815 |
+
jQuery(this).css("color", "firebrick");
|
816 |
+
} else {
|
817 |
+
jQuery(this).css("color", "#000000");
|
818 |
+
}
|
819 |
+
});
|
820 |
+
}
|
821 |
+
}
|
822 |
+
}
|
823 |
+
})
|
824 |
+
|
825 |
+
|
826 |
+
|
827 |
+
// ##### CLICK EVENT HANDLER FOR THE 'Delete Slide' BUTTON (FOR EACH SLIDE) #####
|
828 |
+
// Set the hidden 'delete status' input field to zero and save the custom post type
|
829 |
+
function delete_sa_slide(delete_id) {
|
830 |
+
jQuery(function() {
|
831 |
+
var dialog_box = document.getElementById('sa_dialog_box');
|
832 |
+
dialog_box.innerHTML = "Click the <strong>OK</strong> button to delete this slide.";
|
833 |
+
jQuery("#sa_dialog_box").dialog({ title: 'DELETE SLIDE' });
|
834 |
+
jQuery("#sa_dialog_box").dialog({
|
835 |
+
buttons: {
|
836 |
+
OK: function() {
|
837 |
+
var del_status = document.getElementById(delete_id);
|
838 |
+
del_status.value = "0";
|
839 |
+
// set hidden input field to notify that a status message must be displayed
|
840 |
+
var info_deleted = document.getElementById('sa_info_deleted');
|
841 |
+
info_deleted.value = "1";
|
842 |
+
// save the custom post type
|
843 |
+
jQuery('body').css('cursor', 'wait');
|
844 |
+
jQuery('.ui-button').css('cursor', 'wait');
|
845 |
+
jQuery('#publish').click();
|
846 |
+
},
|
847 |
+
Cancel: function() {
|
848 |
+
jQuery(this).dialog("close");
|
849 |
+
}
|
850 |
+
}
|
851 |
+
});
|
852 |
+
jQuery("#sa_dialog_box").dialog("open");
|
853 |
+
})
|
854 |
+
}
|
855 |
+
|
856 |
+
// ##### CLICK EVENT HANDLER FOR THE 'Duplicate Slide' BUTTON (FOR EACH SLIDE) #####
|
857 |
+
// Set the hidden 'duplicate slide' input field to the slide number to be duplicated and save the custom post type
|
858 |
+
function duplicate_slide(slide_no) {
|
859 |
+
jQuery(function() {
|
860 |
+
var dialog_box = document.getElementById('sa_dialog_box');
|
861 |
+
dialog_box.innerHTML = "Click the <strong>OK</strong> button to make a duplicate (copy) of this slide.";
|
862 |
+
jQuery("#sa_dialog_box").dialog({ title: 'DUPLICATE SLIDE' });
|
863 |
+
jQuery("#sa_dialog_box").dialog({
|
864 |
+
buttons: {
|
865 |
+
OK: function() {
|
866 |
+
// set hidden 'duplicate slide' input field to the slide number to be duplicated
|
867 |
+
var duplicate_slide = document.getElementById('sa_duplicate_slide');
|
868 |
+
duplicate_slide.value = slide_no;
|
869 |
+
// set hidden input field to notify that a status message must be displayed
|
870 |
+
var info_duplicated = document.getElementById('sa_info_duplicated');
|
871 |
+
info_duplicated.value = "1";
|
872 |
+
// save the custom post type
|
873 |
+
jQuery('body').css('cursor', 'wait');
|
874 |
+
jQuery('.ui-button').css('cursor', 'wait');
|
875 |
+
jQuery('#publish').click();
|
876 |
+
},
|
877 |
+
Cancel: function() {
|
878 |
+
jQuery(this).dialog("close");
|
879 |
+
}
|
880 |
+
}
|
881 |
+
});
|
882 |
+
jQuery("#sa_dialog_box").dialog("open");
|
883 |
+
})
|
884 |
+
}
|
885 |
+
|
886 |
+
// ##### CLICK EVENT HANDLER FOR THE 'Move Slide Up' BUTTON (FOR EACH SLIDE) #####
|
887 |
+
// Set the hidden 'move slide up' input field to the slide number to be moved up and save the custom post type
|
888 |
+
function move_slide_up(slide_no) {
|
889 |
+
jQuery(function() {
|
890 |
+
var dialog_box = document.getElementById('sa_dialog_box');
|
891 |
+
dialog_box.innerHTML = "Click the <strong>OK</strong> button to move this slide up within the slide order.";
|
892 |
+
jQuery("#sa_dialog_box").dialog({ title: 'MOVE SLIDE UP' });
|
893 |
+
jQuery("#sa_dialog_box").dialog({
|
894 |
+
buttons: {
|
895 |
+
OK: function() {
|
896 |
+
// set hidden 'move slide up' input field to the slide number to be moved
|
897 |
+
var move_slide_up = document.getElementById('sa_move_slide_up');
|
898 |
+
move_slide_up.value = slide_no;
|
899 |
+
// set hidden input field to notify that a status message must be displayed
|
900 |
+
var info_moved = document.getElementById('sa_info_moved');
|
901 |
+
info_moved.value = "1";
|
902 |
+
// save the custom post type
|
903 |
+
jQuery('body').css('cursor', 'wait');
|
904 |
+
jQuery('.ui-button').css('cursor', 'wait');
|
905 |
+
jQuery('#publish').click();
|
906 |
+
},
|
907 |
+
Cancel: function() {
|
908 |
+
jQuery(this).dialog("close");
|
909 |
+
}
|
910 |
+
}
|
911 |
+
});
|
912 |
+
jQuery("#sa_dialog_box").dialog("open");
|
913 |
+
})
|
914 |
+
}
|
trunk/magnific-popup/jquery.magnific-popup.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! Magnific Popup - v1.1.0 - 2016-02-20
|
2 |
+
* http://dimsemenov.com/plugins/magnific-popup/
|
3 |
+
* Copyright (c) 2016 Dmitry Semenov; */
|
4 |
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?rel=0&autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
|
trunk/magnific-popup/magnific-popup.css
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Magnific Popup CSS */
|
2 |
+
.mfp-bg {
|
3 |
+
top: 0px !important;
|
4 |
+
left: 0px !important;
|
5 |
+
width: 100% !important;
|
6 |
+
height: 100% !important;
|
7 |
+
z-index: 100042 !important;
|
8 |
+
overflow: hidden !important;
|
9 |
+
position: fixed !important;
|
10 |
+
background: #000000 !important;
|
11 |
+
opacity: 0.8 !important;
|
12 |
+
}
|
13 |
+
.sa_popup {
|
14 |
+
top: 0 !important;
|
15 |
+
left: 0 !important;
|
16 |
+
width: 100% !important;
|
17 |
+
height: 100% !important;
|
18 |
+
z-index: 100043 !important;
|
19 |
+
position: fixed !important;
|
20 |
+
outline: none !important;
|
21 |
+
-webkit-backface-visibility: hidden !important;
|
22 |
+
}
|
23 |
+
.sa_popup .mfp-container {
|
24 |
+
text-align: center !important;
|
25 |
+
position: absolute !important;
|
26 |
+
width: 100% !important;
|
27 |
+
height: 100% !important;
|
28 |
+
left: 0px !important;
|
29 |
+
top: 0px !important;
|
30 |
+
padding: 0 8px !important;
|
31 |
+
box-sizing: border-box !important;
|
32 |
+
}
|
33 |
+
.sa_popup .mfp-container:before {
|
34 |
+
content: '' !important;
|
35 |
+
display: inline-block !important;
|
36 |
+
height: 100% !important;
|
37 |
+
vertical-align: middle !important;
|
38 |
+
}
|
39 |
+
.sa_popup .mfp-align-top .mfp-container:before {
|
40 |
+
display: none !important;
|
41 |
+
}
|
42 |
+
.sa_popup .mfp-content {
|
43 |
+
position: relative !important;
|
44 |
+
display: inline-block !important;
|
45 |
+
vertical-align: middle !important;
|
46 |
+
margin: 0px auto !important;
|
47 |
+
text-align: left !important;
|
48 |
+
z-index: 100045 !important;
|
49 |
+
}
|
50 |
+
.sa_popup .mfp-inline-holder .mfp-content,
|
51 |
+
.sa_popup .mfp-ajax-holder .mfp-content {
|
52 |
+
width: 100% !important;
|
53 |
+
cursor: auto !important;
|
54 |
+
}
|
55 |
+
.sa_popup .mfp-ajax-cur {
|
56 |
+
cursor: progress !important;
|
57 |
+
}
|
58 |
+
.sa_popup .mfp-zoom-out-cur, .sa_popup .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
59 |
+
cursor: -moz-zoom-out !important;
|
60 |
+
cursor: -webkit-zoom-out !important;
|
61 |
+
cursor: zoom-out !important;
|
62 |
+
}
|
63 |
+
.sa_popup .mfp-zoom {
|
64 |
+
cursor: pointer !important;
|
65 |
+
cursor: -webkit-zoom-in !important;
|
66 |
+
cursor: -moz-zoom-in !important;
|
67 |
+
cursor: zoom-in !important;
|
68 |
+
}
|
69 |
+
.sa_popup .mfp-auto-cursor .mfp-content {
|
70 |
+
cursor: auto !important;
|
71 |
+
}
|
72 |
+
.sa_popup .mfp-close,
|
73 |
+
.sa_popup .mfp-arrow,
|
74 |
+
.sa_popup .mfp-preloader,
|
75 |
+
.sa_popup .mfp-counter {
|
76 |
+
-webkit-user-select: none !important;
|
77 |
+
-moz-user-select: none !important;
|
78 |
+
user-select: none !important;
|
79 |
+
}
|
80 |
+
.sa_popup .mfp-loading.mfp-figure {
|
81 |
+
display: none !important;
|
82 |
+
}
|
83 |
+
.sa_popup .mfp-hide {
|
84 |
+
display: none !important;
|
85 |
+
}
|
86 |
+
.sa_popup .mfp-preloader {
|
87 |
+
color: #cccccc !important;
|
88 |
+
position: absolute !important;
|
89 |
+
top: 50% !important;
|
90 |
+
width: auto !important;
|
91 |
+
text-align: center !important;
|
92 |
+
margin-top: -0.8em !important;
|
93 |
+
left: 8px !important;
|
94 |
+
right: 8px !important;
|
95 |
+
z-index: 100044 !important;
|
96 |
+
}
|
97 |
+
.sa_popup .mfp-preloader a {
|
98 |
+
color: #cccccc !important;
|
99 |
+
}
|
100 |
+
.sa_popup .mfp-preloader a:hover {
|
101 |
+
color: #ffffff !important;
|
102 |
+
}
|
103 |
+
.sa_popup .mfp-s-ready .mfp-preloader {
|
104 |
+
display: none !important;
|
105 |
+
}
|
106 |
+
.sa_popup .mfp-s-error .mfp-content {
|
107 |
+
display: none !important;
|
108 |
+
}
|
109 |
+
.sa_popup button.mfp-close,
|
110 |
+
.sa_popup button.mfp-arrow {
|
111 |
+
overflow: visible !important;
|
112 |
+
cursor: pointer !important;
|
113 |
+
background: transparent !important;
|
114 |
+
border: 0 !important;
|
115 |
+
-webkit-appearance: none !important;
|
116 |
+
display: block !important;
|
117 |
+
outline: none !important;
|
118 |
+
padding: 0 !important;
|
119 |
+
z-index: 100046 !important;
|
120 |
+
box-shadow: none !important;
|
121 |
+
touch-action: manipulation !important;
|
122 |
+
}
|
123 |
+
.sa_popup button::-moz-focus-inner {
|
124 |
+
padding: 0 !important;
|
125 |
+
border: 0 !important;
|
126 |
+
}
|
127 |
+
.sa_popup .mfp-close {
|
128 |
+
width: 44px !important;
|
129 |
+
height: 44px !important;
|
130 |
+
line-height: 44px !important;
|
131 |
+
position: absolute !important;
|
132 |
+
right: 0px !important;
|
133 |
+
top: 0px !important;
|
134 |
+
text-decoration: none !important;
|
135 |
+
text-align: center !important;
|
136 |
+
opacity: 0.6 !important;
|
137 |
+
padding:0px 5px 0px 0px !important;
|
138 |
+
color: #ffff !important;
|
139 |
+
font-style: normal !important;
|
140 |
+
font-size: 32px !important;
|
141 |
+
font-family: Arial, Baskerville, monospace !important;
|
142 |
+
}
|
143 |
+
.sa_popup .mfp-close:hover {
|
144 |
+
opacity: 1.0 !important;
|
145 |
+
}
|
146 |
+
.sa_popup .mfp-close-btn-in .mfp-close {
|
147 |
+
color: #333 !important;
|
148 |
+
}
|
149 |
+
.sa_popup .mfp-image-holder .mfp-close,
|
150 |
+
.sa_popup .mfp-iframe-holder .mfp-close {
|
151 |
+
color: #ffffff !important;
|
152 |
+
right: 0px !important;
|
153 |
+
text-align: right !important;
|
154 |
+
padding-right: 0px !important;
|
155 |
+
width: 100% !important;
|
156 |
+
transition:all .3s ease-in-out;
|
157 |
+
-webkit-transition:all .3s ease-in-out;
|
158 |
+
-moz-transition:all .3s ease-in-out;
|
159 |
+
-o-transition:all .3s ease-in-out;
|
160 |
+
}
|
161 |
+
.sa_popup .mfp-counter {
|
162 |
+
position: absolute !important;
|
163 |
+
top: 0px !important;
|
164 |
+
right: 3px !important;
|
165 |
+
color: #c0c0c0 !important;
|
166 |
+
font-size: 12px !important;
|
167 |
+
line-height: 18px !important;
|
168 |
+
white-space: nowrap !important;
|
169 |
+
}
|
170 |
+
.sa_popup .mfp-arrow {
|
171 |
+
position: absolute !important;
|
172 |
+
opacity: 0.6 !important;
|
173 |
+
margin: 0 !important;
|
174 |
+
top: 50% !important;
|
175 |
+
margin-top: -24px !important;
|
176 |
+
padding: 0 !important;
|
177 |
+
width: 48px !important;
|
178 |
+
height: 48px !important;
|
179 |
+
background-color:rgba(255,255,255,0.0) !important;
|
180 |
+
-webkit-tap-highlight-color: transparent;
|
181 |
+
transition:all .3s ease-in-out;
|
182 |
+
-webkit-transition:all .3s ease-in-out;
|
183 |
+
-moz-transition:all .3s ease-in-out;
|
184 |
+
-o-transition:all .3s ease-in-out;
|
185 |
+
}
|
186 |
+
.sa_popup .mfp-container .mfp-arrow:hover {
|
187 |
+
opacity: 1.0 !important;
|
188 |
+
background-color:rgba(255,255,255,0.2) !important;
|
189 |
+
}
|
190 |
+
.sa_popup .mfp-arrow:before,
|
191 |
+
.sa_popup .mfp-arrow:after {
|
192 |
+
content: '' !important;
|
193 |
+
display: block !important;
|
194 |
+
width: 0 !important;
|
195 |
+
height: 0 !important;
|
196 |
+
position: absolute !important;
|
197 |
+
left: 0 !important;
|
198 |
+
top: 0 !important;
|
199 |
+
margin-top: 11px !important;
|
200 |
+
margin-left: 35px !important;
|
201 |
+
border: medium inset transparent;
|
202 |
+
}
|
203 |
+
.sa_popup .mfp-arrow:after {
|
204 |
+
display:none !important;
|
205 |
+
border-top-width: 13px !important;
|
206 |
+
border-bottom-width: 13px !important;
|
207 |
+
}
|
208 |
+
.sa_popup .mfp-arrow:before {
|
209 |
+
border-top-width: 13px !important;
|
210 |
+
border-bottom-width: 13px !important;
|
211 |
+
opacity: 1.0 !important;
|
212 |
+
}
|
213 |
+
.sa_popup .mfp-arrow-left {
|
214 |
+
left: 0 !important;
|
215 |
+
}
|
216 |
+
.sa_popup .mfp-arrow-left:before {
|
217 |
+
margin-left: 12px !important;
|
218 |
+
margin-right: 16px !important;
|
219 |
+
border-right: 17px solid #ffffff !important;
|
220 |
+
}
|
221 |
+
.sa_popup .mfp-arrow-left:after {
|
222 |
+
border-right: 17px solid #ffffff !important;
|
223 |
+
margin-left: 31px !important;
|
224 |
+
margin-right: 0px !important;
|
225 |
+
}
|
226 |
+
.sa_popup .mfp-arrow-right {
|
227 |
+
right: 0 !important;
|
228 |
+
}
|
229 |
+
.sa_popup .mfp-arrow-right:before {
|
230 |
+
margin-left: 16px !important;
|
231 |
+
margin-right: 12px !important;
|
232 |
+
border-left: 17px solid #ffffff !important;
|
233 |
+
}
|
234 |
+
.sa_popup .mfp-arrow-right:after {
|
235 |
+
border-left: 17px solid #ffffff !important;
|
236 |
+
margin-left: 39px !important;
|
237 |
+
margin-right: 0px !important;
|
238 |
+
}
|
239 |
+
.sa_popup .mfp-iframe-holder {
|
240 |
+
padding-top: 40px !important;
|
241 |
+
padding-bottom: 40px !important;
|
242 |
+
}
|
243 |
+
.sa_popup .mfp-iframe-holder .mfp-content {
|
244 |
+
line-height: 0 !important;
|
245 |
+
width: 100% !important;
|
246 |
+
max-width: 900px !important;
|
247 |
+
}
|
248 |
+
.sa_popup .mfp-iframe-holder .mfp-close {
|
249 |
+
top: -40px !important;
|
250 |
+
}
|
251 |
+
.sa_popup .mfp-iframe-scaler {
|
252 |
+
width: 100% !important;
|
253 |
+
height: 0 !important;
|
254 |
+
overflow: hidden !important;
|
255 |
+
padding-top: 56.25% !important;
|
256 |
+
}
|
257 |
+
.sa_popup .mfp-iframe-scaler iframe {
|
258 |
+
position: absolute !important;
|
259 |
+
display: block !important;
|
260 |
+
top: 0px !important;
|
261 |
+
left: 0px !important;
|
262 |
+
width: 100% !important;
|
263 |
+
height: 100% !important;
|
264 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !important;
|
265 |
+
background: #000000 !important;
|
266 |
+
}
|
267 |
+
/* Main image in popup */
|
268 |
+
.sa_popup img.mfp-img {
|
269 |
+
width: auto !important;
|
270 |
+
max-width: 100% !important;
|
271 |
+
height: auto !important;
|
272 |
+
display: block !important;
|
273 |
+
line-height: 0 !important;
|
274 |
+
box-sizing: border-box !important;
|
275 |
+
padding: 40px 0 40px !important;
|
276 |
+
margin: 0 auto !important;
|
277 |
+
}
|
278 |
+
/* The shadow behind the image */
|
279 |
+
.sa_popup .mfp-figure {
|
280 |
+
line-height: 0 !important;
|
281 |
+
}
|
282 |
+
.sa_popup .mfp-figure:after {
|
283 |
+
content: '' !important;
|
284 |
+
position: absolute !important;
|
285 |
+
left: 0 !important;
|
286 |
+
top: 40px !important;
|
287 |
+
bottom: 40px !important;
|
288 |
+
display: block !important;
|
289 |
+
right: 0px !important;
|
290 |
+
width: auto !important;
|
291 |
+
height: auto !important;
|
292 |
+
z-index: -1 !important;
|
293 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !important;
|
294 |
+
background: #444444 !important;
|
295 |
+
}
|
296 |
+
.sa_popup .mfp-figure small {
|
297 |
+
color: #c0c0c0 !important;
|
298 |
+
display: block !important;
|
299 |
+
font-size: 12px !important;
|
300 |
+
line-height: 14px !important;
|
301 |
+
}
|
302 |
+
.sa_popup .mfp-figure figure {
|
303 |
+
margin: 0 !important;
|
304 |
+
}
|
305 |
+
.sa_popup .mfp-bottom-bar {
|
306 |
+
box-sizing: border-box !important;
|
307 |
+
margin-top: -36px !important;
|
308 |
+
padding: 0px 3px !important;
|
309 |
+
position: absolute !important;
|
310 |
+
top: 100% !important;
|
311 |
+
left: 0 !important;
|
312 |
+
width: 100% !important;
|
313 |
+
cursor: auto !important;
|
314 |
+
}
|
315 |
+
.sa_popup .mfp-title {
|
316 |
+
text-align: left !important;
|
317 |
+
font-size:16px !important;
|
318 |
+
line-height: 20px !important;
|
319 |
+
color: #ffffff !important;
|
320 |
+
word-wrap: break-word !important;
|
321 |
+
padding-right: 45px !important;
|
322 |
+
}
|
323 |
+
.sa_popup .mfp-image-holder .mfp-content {
|
324 |
+
max-width: 100% !important;
|
325 |
+
}
|
326 |
+
.sa_popup .mfp-gallery .mfp-image-holder .mfp-figure {
|
327 |
+
cursor: pointer !important;
|
328 |
+
}
|
329 |
+
|
330 |
+
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
331 |
+
/* Remove all paddings around the image on small screen */
|
332 |
+
.sa_popup .mfp-img-mobile .mfp-image-holder { padding-left: 0px !important; padding-right: 0px !important; }
|
333 |
+
.sa_popup .mfp-img-mobile img.mfp-img { padding: 0px !important; }
|
334 |
+
.sa_popup .mfp-img-mobile .mfp-figure:after { top: 0px !important; bottom: 0px !important; }
|
335 |
+
.sa_popup .mfp-img-mobile .mfp-figure small { display: inline !important; margin-left: 5px !important; }
|
336 |
+
.sa_popup .mfp-img-mobile .mfp-bottom-bar {
|
337 |
+
background: rgba(0, 0, 0, 0.6) !important; bottom: 0px !important; margin: 0px !important; top: auto !important;
|
338 |
+
padding: 3px 5px !important; position: fixed !important; box-sizing: border-box !important; }
|
339 |
+
}
|
340 |
+
@media all and (max-width: 767px) {
|
341 |
+
.sa_popup .mfp-title { font-size: 14px !important; line-height: 18px !important; }
|
342 |
+
.sa_popup .mfp-arrow { -webkit-transform: scale(0.75) !important; transform: scale(0.75) !important; }
|
343 |
+
.sa_popup .mfp-arrow-left { -webkit-transform-origin: 0 !important; transform-origin: 0 !important; }
|
344 |
+
.sa_popup .mfp-arrow-right { -webkit-transform-origin: 100% !important; transform-origin: 100% !important; }
|
345 |
+
.sa_popup .mfp-container { padding-left: 5px !important; padding-right: 5px !important; }
|
346 |
+
}
|
trunk/owl-carousel/animate.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "UTF-8";/*!
|
2 |
+
* animate.css -http://daneden.me/animate
|
3 |
+
* Version - 3.5.1
|
4 |
+
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
5 |
+
*
|
6 |
+
* Copyright (c) 2016 Daniel Eden
|
7 |
+
*/.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}@keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}@keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}@keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}.flipInY,.flipOutX{-webkit-backface-visibility:visible!important}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}
|
trunk/owl-carousel/owl.carousel.css
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Owl Carousel v2.3.3
|
3 |
+
* Copyright 2013-2018 David Deutsch
|
4 |
+
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
5 |
+
*/
|
6 |
+
/*
|
7 |
+
* Owl Carousel - Core
|
8 |
+
*/
|
9 |
+
.owl-carousel {
|
10 |
+
display: none;
|
11 |
+
width: 100%;
|
12 |
+
-webkit-tap-highlight-color: transparent;
|
13 |
+
/* position relative and z-index fix webkit rendering fonts issue */
|
14 |
+
position: relative;
|
15 |
+
z-index: 1; }
|
16 |
+
.owl-carousel .owl-stage {
|
17 |
+
position: relative;
|
18 |
+
-ms-touch-action: pan-Y;
|
19 |
+
touch-action: manipulation;
|
20 |
+
-moz-backface-visibility: hidden;
|
21 |
+
/* fix firefox animation glitch */ }
|
22 |
+
.owl-carousel .owl-stage:after {
|
23 |
+
content: ".";
|
24 |
+
display: block;
|
25 |
+
clear: both;
|
26 |
+
visibility: hidden;
|
27 |
+
line-height: 0;
|
28 |
+
height: 0; }
|
29 |
+
.owl-carousel .owl-stage-outer {
|
30 |
+
position: relative;
|
31 |
+
overflow: hidden;
|
32 |
+
/* fix for flashing background */
|
33 |
+
-webkit-transform: translate3d(0px, 0px, 0px); }
|
34 |
+
.owl-carousel .owl-wrapper,
|
35 |
+
.owl-carousel .owl-item {
|
36 |
+
-webkit-backface-visibility: hidden;
|
37 |
+
-moz-backface-visibility: hidden;
|
38 |
+
-ms-backface-visibility: hidden;
|
39 |
+
-webkit-transform: translate3d(0, 0, 0);
|
40 |
+
-moz-transform: translate3d(0, 0, 0);
|
41 |
+
-ms-transform: translate3d(0, 0, 0); }
|
42 |
+
.owl-carousel .owl-item {
|
43 |
+
position: relative;
|
44 |
+
min-height: 1px;
|
45 |
+
float: left;
|
46 |
+
-webkit-backface-visibility: hidden;
|
47 |
+
-webkit-tap-highlight-color: transparent;
|
48 |
+
-webkit-touch-callout: none; }
|
49 |
+
/* CHANGED CSS STYLE USED FOR SLIDE IMAGES - SLIDE ANYTHING (SIMON EDGE) - 26/02/2018 */
|
50 |
+
.owl-carousel .owl-item img {
|
51 |
+
display: inline;
|
52 |
+
width: auto;
|
53 |
+
height: auto;
|
54 |
+
max-width: 100%; }
|
55 |
+
.owl-carousel .owl-nav.disabled,
|
56 |
+
.owl-carousel .owl-dots.disabled {
|
57 |
+
display: none; }
|
58 |
+
.owl-carousel .owl-nav .owl-prev,
|
59 |
+
.owl-carousel .owl-nav .owl-next,
|
60 |
+
.owl-carousel .owl-dot {
|
61 |
+
cursor: pointer;
|
62 |
+
-webkit-user-select: none;
|
63 |
+
-khtml-user-select: none;
|
64 |
+
-moz-user-select: none;
|
65 |
+
-ms-user-select: none;
|
66 |
+
user-select: none; }
|
67 |
+
.owl-carousel .owl-nav button.owl-prev,
|
68 |
+
.owl-carousel .owl-nav button.owl-next,
|
69 |
+
.owl-carousel button.owl-dot {
|
70 |
+
background: none;
|
71 |
+
color: inherit;
|
72 |
+
border: none;
|
73 |
+
padding: 0 !important;
|
74 |
+
font: inherit; }
|
75 |
+
.owl-carousel.owl-loaded {
|
76 |
+
display: block; }
|
77 |
+
.owl-carousel.owl-loading {
|
78 |
+
opacity: 0;
|
79 |
+
display: block; }
|
80 |
+
.owl-carousel.owl-hidden {
|
81 |
+
opacity: 0; }
|
82 |
+
.owl-carousel.owl-refresh .owl-item {
|
83 |
+
visibility: hidden; }
|
84 |
+
.owl-carousel.owl-drag .owl-item {
|
85 |
+
-ms-touch-action: none;
|
86 |
+
touch-action: none;
|
87 |
+
-webkit-user-select: none;
|
88 |
+
-moz-user-select: none;
|
89 |
+
-ms-user-select: none;
|
90 |
+
user-select: none; }
|
91 |
+
.owl-carousel.owl-grab {
|
92 |
+
cursor: move;
|
93 |
+
cursor: grab; }
|
94 |
+
.owl-carousel.owl-rtl {
|
95 |
+
direction: rtl; }
|
96 |
+
.owl-carousel.owl-rtl .owl-item {
|
97 |
+
float: right; }
|
98 |
+
|
99 |
+
/* No Js */
|
100 |
+
.no-js .owl-carousel {
|
101 |
+
display: block; }
|
102 |
+
|
103 |
+
/*
|
104 |
+
* Owl Carousel - Animate Plugin
|
105 |
+
*/
|
106 |
+
.owl-carousel .animated {
|
107 |
+
animation-duration: 1000ms;
|
108 |
+
animation-fill-mode: both; }
|
109 |
+
|
110 |
+
.owl-carousel .owl-animated-in {
|
111 |
+
z-index: 0; }
|
112 |
+
|
113 |
+
.owl-carousel .owl-animated-out {
|
114 |
+
z-index: 1; }
|
115 |
+
|
116 |
+
.owl-carousel .fadeOut {
|
117 |
+
animation-name: fadeOut; }
|
118 |
+
|
119 |
+
@keyframes fadeOut {
|
120 |
+
0% {
|
121 |
+
opacity: 1; }
|
122 |
+
100% {
|
123 |
+
opacity: 0; } }
|
124 |
+
|
125 |
+
/*
|
126 |
+
* Owl Carousel - Auto Height Plugin
|
127 |
+
*/
|
128 |
+
.owl-height {
|
129 |
+
transition: height 500ms ease-in-out; }
|
130 |
+
|
131 |
+
/*
|
132 |
+
* Owl Carousel - Lazy Load Plugin
|
133 |
+
*/
|
134 |
+
.owl-carousel .owl-item .owl-lazy {
|
135 |
+
opacity: 0;
|
136 |
+
transition: opacity 400ms ease; }
|
137 |
+
|
138 |
+
.owl-carousel .owl-item img.owl-lazy {
|
139 |
+
transform-style: preserve-3d; }
|
140 |
+
|
141 |
+
/*
|
142 |
+
* Owl Carousel - Video Plugin
|
143 |
+
*/
|
144 |
+
.owl-carousel .owl-video-wrapper {
|
145 |
+
position: relative;
|
146 |
+
height: 100%;
|
147 |
+
background: #000; }
|
148 |
+
|
149 |
+
.owl-carousel .owl-video-play-icon {
|
150 |
+
position: absolute;
|
151 |
+
height: 80px;
|
152 |
+
width: 80px;
|
153 |
+
left: 50%;
|
154 |
+
top: 50%;
|
155 |
+
margin-left: -40px;
|
156 |
+
margin-top: -40px;
|
157 |
+
background: url("owl.video.play.png") no-repeat;
|
158 |
+
cursor: pointer;
|
159 |
+
z-index: 1;
|
160 |
+
-webkit-backface-visibility: hidden;
|
161 |
+
transition: transform 100ms ease; }
|
162 |
+
|
163 |
+
.owl-carousel .owl-video-play-icon:hover {
|
164 |
+
-ms-transform: scale(1.3, 1.3);
|
165 |
+
transform: scale(1.3, 1.3); }
|
166 |
+
|
167 |
+
.owl-carousel .owl-video-playing .owl-video-tn,
|
168 |
+
.owl-carousel .owl-video-playing .owl-video-play-icon {
|
169 |
+
display: none; }
|
170 |
+
|
171 |
+
.owl-carousel .owl-video-tn {
|
172 |
+
opacity: 0;
|
173 |
+
height: 100%;
|
174 |
+
background-position: center center;
|
175 |
+
background-repeat: no-repeat;
|
176 |
+
background-size: contain;
|
177 |
+
transition: opacity 400ms ease; }
|
178 |
+
|
179 |
+
.owl-carousel .owl-video-frame {
|
180 |
+
position: relative;
|
181 |
+
z-index: 1;
|
182 |
+
height: 100%;
|
183 |
+
width: 100%; }
|
trunk/owl-carousel/owl.carousel.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Owl Carousel v2.3.3
|
3 |
+
* Copyright 2013-2018 David Deutsch
|
4 |
+
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
5 |
+
*/
|
6 |
+
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&(console.log("update called"),this.update())},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};if(b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&rel=0&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){
|
7 |
+
this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">‹</span>','<span aria-label="Next">›</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
|
trunk/owl-carousel/sa-owl-theme.css
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
##############################################################
|
3 |
+
### OWL CAROUSEL THEME (CSS) FOR THE SLIDE ANYTHING PLUGIN ###
|
4 |
+
##############################################################
|
5 |
+
*/
|
6 |
+
|
7 |
+
.owl-carousel .owl-stage-outer {
|
8 |
+
width:100% !important;
|
9 |
+
}
|
10 |
+
/* ### ERROR MESSAGES ### */
|
11 |
+
#sa_invalid_postid {
|
12 |
+
width:100% !important;
|
13 |
+
padding:20px 0px !important;
|
14 |
+
font-size:16px !important;
|
15 |
+
line-height:22px !important;
|
16 |
+
color:crimson !important;
|
17 |
+
}
|
18 |
+
/* ### PAGINATION BUTTONS ### */
|
19 |
+
.sa_owl_theme .owl-dots {
|
20 |
+
position:absolute;
|
21 |
+
width:100%;
|
22 |
+
padding:10px 0px 0px !important;
|
23 |
+
bottom:-22px !important;
|
24 |
+
text-align:center !important;
|
25 |
+
font-size:12px !important;
|
26 |
+
line-height:12px !important;
|
27 |
+
}
|
28 |
+
.sa_owl_theme .owl-dots .owl-dot {
|
29 |
+
display: inline-block !important;
|
30 |
+
}
|
31 |
+
.sa_owl_theme .owl-dots .owl-dot span {
|
32 |
+
display:inline-block !important;
|
33 |
+
border-style:none !important;
|
34 |
+
background-color:rgba(0,0,0,0.2) !important;
|
35 |
+
width:10px !important;
|
36 |
+
height:10px !important;
|
37 |
+
border-radius:50% !important;
|
38 |
+
margin:0px 3px !important;
|
39 |
+
transition:all .3s ease-in-out !important;
|
40 |
+
-webkit-transition:all .3s ease-in-out !important;
|
41 |
+
-moz-transition:all .3s ease-in-out !important;
|
42 |
+
-o-transition:all .3s ease-in-out !important;
|
43 |
+
}
|
44 |
+
.sa_owl_theme .owl-dots .active span {
|
45 |
+
background-color:rgba(0,0,0,0.5) !important;
|
46 |
+
}
|
47 |
+
.sa_owl_theme .owl-dots .owl-dot span:hover {
|
48 |
+
background-color:rgba(0,0,0,0.5) !important;
|
49 |
+
}
|
50 |
+
.owl-pagination-true {
|
51 |
+
margin-bottom:22px !important;
|
52 |
+
}
|
53 |
+
|
54 |
+
/* ### PREVIOUS AND NEXT ARROW BUTTONS ### */
|
55 |
+
.sa_owl_theme .owl-nav {
|
56 |
+
display:block !important;
|
57 |
+
}
|
58 |
+
.autohide-arrows .owl-nav {
|
59 |
+
display:none !important;
|
60 |
+
}
|
61 |
+
.autohide-arrows:hover .owl-nav {
|
62 |
+
display:block !important;
|
63 |
+
}
|
64 |
+
.sa_owl_theme .owl-nav div,
|
65 |
+
.sa_owl_theme .owl-nav button {
|
66 |
+
position:absolute;
|
67 |
+
top:50%;
|
68 |
+
padding:2px 0px !important;
|
69 |
+
display:inline-block;
|
70 |
+
margin-top:-20px !important;
|
71 |
+
line-height:30px !important;
|
72 |
+
height:40px !important;
|
73 |
+
width:30px !important;
|
74 |
+
transition:all .3s ease-in-out !important;
|
75 |
+
-webkit-transition:all .3s ease-in-out !important;
|
76 |
+
-moz-transition:all .3s ease-in-out !important;
|
77 |
+
-o-transition:all .3s ease-in-out !important;
|
78 |
+
}
|
79 |
+
.sa_owl_theme .owl-nav .owl-prev {
|
80 |
+
left:10px;
|
81 |
+
}
|
82 |
+
.sa_owl_theme .owl-nav .owl-next {
|
83 |
+
right:10px;
|
84 |
+
}
|
85 |
+
.sa_owl_theme .disabled .owl-prev,
|
86 |
+
.sa_owl_theme .disabled .owl-next {
|
87 |
+
display:none !important;
|
88 |
+
}
|
89 |
+
/* WHITE COLOR SCHEME */
|
90 |
+
.white .sa_owl_theme .owl-nav .owl-prev {
|
91 |
+
background:rgba(0,0,0,0.3) url('../images/icon_prev.png') no-repeat center center !important;
|
92 |
+
}
|
93 |
+
.white .sa_owl_theme .owl-nav .owl-next {
|
94 |
+
background:rgba(0,0,0,0.3) url('../images/icon_next.png') no-repeat center center !important;
|
95 |
+
}
|
96 |
+
.white .sa_owl_theme .owl-nav .owl-prev:hover,
|
97 |
+
.white .sa_owl_theme .owl-nav .owl-next:hover {
|
98 |
+
background-color:rgba(0,0,0,0.8) !important;
|
99 |
+
}
|
100 |
+
/* BLACK COLOR SCHEME */
|
101 |
+
.black .sa_owl_theme .owl-nav .owl-prev {
|
102 |
+
background:rgba(255,255,255,0.3) url('../images/black_icon_prev.png') no-repeat center center !important;
|
103 |
+
}
|
104 |
+
.black .sa_owl_theme .owl-nav .owl-next {
|
105 |
+
background:rgba(255,255,255,0.3) url('../images/black_icon_next.png') no-repeat center center !important;
|
106 |
+
}
|
107 |
+
.black .sa_owl_theme .owl-nav .owl-prev:hover,
|
108 |
+
.black .sa_owl_theme .owl-nav .owl-next:hover {
|
109 |
+
background-color:rgba(255,255,255,0.8) !important;
|
110 |
+
}
|
111 |
+
|
112 |
+
/* ### LINK, ZOOM AND VIDEO POPUP ICONS ### */
|
113 |
+
.sa_owl_theme .owl-item .sa_hover_container .sa_hover_buttons {
|
114 |
+
width:auto;
|
115 |
+
height:auto;
|
116 |
+
position:absolute;
|
117 |
+
border-radius:0px !important;
|
118 |
+
z-index:2;
|
119 |
+
cursor:pointer;
|
120 |
+
background:transparent !important;
|
121 |
+
}
|
122 |
+
.sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_slide_link_icon,
|
123 |
+
.sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_zoom_icon,
|
124 |
+
.sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_video_icon,
|
125 |
+
.sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon,
|
126 |
+
.sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon,
|
127 |
+
.sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon {
|
128 |
+
display:block;
|
129 |
+
float:left;
|
130 |
+
width:40px;
|
131 |
+
height:40px;
|
132 |
+
}
|
133 |
+
.sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon:hover,
|
134 |
+
.sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon:hover,
|
135 |
+
.sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon:hover {
|
136 |
+
transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
|
137 |
+
-webkit-transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
|
138 |
+
-moz-transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
|
139 |
+
-o-transition:background-color .3s ease-in-out, background-image .3s ease-in-out !important;
|
140 |
+
}
|
141 |
+
/* WHITE COLOR SCHEME */
|
142 |
+
.white .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_slide_link_icon,
|
143 |
+
.white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon {
|
144 |
+
background:rgba(0,0,0,0.3) url('../images/slide_link.png') no-repeat center center !important;
|
145 |
+
}
|
146 |
+
.white .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_zoom_icon,
|
147 |
+
.white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon {
|
148 |
+
background:rgba(0,0,0,0.3) url('../images/lightbox_zoom.png') no-repeat center center !important;
|
149 |
+
}
|
150 |
+
.white .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_video_icon,
|
151 |
+
.white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon {
|
152 |
+
background:rgba(0,0,0,0.3) url('../images/lightbox_video.png') no-repeat center center !important;
|
153 |
+
}
|
154 |
+
.white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon:hover,
|
155 |
+
.white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon:hover,
|
156 |
+
.white .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon:hover {
|
157 |
+
background-color:rgba(0,0,0,0.8) !important;
|
158 |
+
}
|
159 |
+
/* BLACK COLOR SCHEME */
|
160 |
+
.black .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_slide_link_icon,
|
161 |
+
.black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon {
|
162 |
+
background:rgba(255,255,255,0.3) url('../images/black_slide_link.png') no-repeat center center !important;
|
163 |
+
}
|
164 |
+
.black .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_zoom_icon,
|
165 |
+
.black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon {
|
166 |
+
background:rgba(255,255,255,0.3) url('../images/black_lightbox_zoom.png') no-repeat center center !important;
|
167 |
+
}
|
168 |
+
.black .sa_owl_theme .owl-item .sa_hover_container .always_visible .sa_popup_video_icon,
|
169 |
+
.black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon {
|
170 |
+
background:rgba(255,255,255,0.3) url('../images/black_lightbox_video.png') no-repeat center center !important;
|
171 |
+
}
|
172 |
+
.black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_slide_link_icon:hover,
|
173 |
+
.black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_zoom_icon:hover,
|
174 |
+
.black .sa_owl_theme .owl-item .sa_hover_container:hover .sa_hover_buttons .sa_popup_video_icon:hover {
|
175 |
+
background-color:rgba(255,255,255,0.8) !important;
|
176 |
+
}
|
177 |
+
|
178 |
+
/* MAGNIFIC POPUP */
|
179 |
+
.sa_custom_popup {
|
180 |
+
position:relative;
|
181 |
+
padding:20px;
|
182 |
+
width:auto;
|
183 |
+
margin:20px auto;
|
184 |
+
}
|
185 |
+
.mfp-hide {
|
186 |
+
display: none !important;
|
187 |
+
}
|
trunk/php/slide-anything-admin.php
ADDED
@@ -0,0 +1,2092 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// #####################################################################
|
3 |
+
// ### SLIDE ANYTHING PLUGIN - PHP FUNCTIONS FOR WORDPRESS DASHBOARD ###
|
4 |
+
// #####################################################################
|
5 |
+
|
6 |
+
// ##### PLUGIN REGISTRATION HOOK - RUN WHEN THE PLUGIN IS ACTIVATED #####
|
7 |
+
function cpt_slider_plugin_activation() {
|
8 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
9 |
+
|
10 |
+
// INSERT A 'SAMPLE SLIDER' CUSTOM POST INTO THE DATABASE
|
11 |
+
$sample_post_title = 'Sample Slider';
|
12 |
+
|
13 |
+
// check if the 'sample slider' already exists (plugin has been activated before)
|
14 |
+
$cpt_post = get_page_by_title($sample_post_title, 'OBJECT', 'sa_slider');
|
15 |
+
|
16 |
+
if (is_null($cpt_post)) {
|
17 |
+
// create the post object
|
18 |
+
$sample_post = array(
|
19 |
+
'post_title' => $sample_post_title,
|
20 |
+
'post_content' => '',
|
21 |
+
'post_status' => 'publish',
|
22 |
+
'post_type' => 'sa_slider'
|
23 |
+
);
|
24 |
+
// insert the post into the database
|
25 |
+
$cpt_id = wp_insert_post($sample_post);
|
26 |
+
|
27 |
+
// insert meta data for the 'sample slider' slides
|
28 |
+
for ($i = 1; $i <= 8; $i++) {
|
29 |
+
if ($i == 1) {
|
30 |
+
$color = "#f4cccc"; $image = "sample_logo1.png";
|
31 |
+
} elseif ($i == 2) {
|
32 |
+
$color = "#d9ead3"; $image = "sample_logo2.png";
|
33 |
+
} elseif ($i == 3) {
|
34 |
+
$color = "#fce5cd"; $image = "sample_logo3.png";
|
35 |
+
} elseif ($i == 4) {
|
36 |
+
$color = "#d0e0e3"; $image = "sample_logo4.png";
|
37 |
+
} elseif ($i == 5) {
|
38 |
+
$color = "#fff2cc"; $image = "sample_logo5.png";
|
39 |
+
} elseif ($i == 6) {
|
40 |
+
$color = "#cfe2f3"; $image = "sample_logo6.png";
|
41 |
+
} elseif ($i == 7) {
|
42 |
+
$color = "#d9d2e9"; $image = "sample_logo7.png";
|
43 |
+
} elseif ($i == 8) {
|
44 |
+
$color = "#ead1dc"; $image = "sample_logo8.png";
|
45 |
+
}
|
46 |
+
$content = "<div style='text-align: center; padding-bottom: 10px;'>\n";
|
47 |
+
$content .= "<div><img src='".plugins_url()."/slide-anything/images/".$image."' alt='Logo ".$i."' /></div>\n";
|
48 |
+
$content .= "<h3>Company Name</h3>\n";
|
49 |
+
$content .= "<p>Lorem ipsum dolor sit amet, cu usu cibo vituperata, id ius probo maiestatis inciderint, sit eu vide volutpat.</p>\n";
|
50 |
+
$content .= "</div>\n";
|
51 |
+
update_post_meta($cpt_id, "sa_slide".$i."_content", $content);
|
52 |
+
update_post_meta($cpt_id, "sa_slide".$i."_image_id", "");
|
53 |
+
update_post_meta($cpt_id, "sa_slide".$i."_image_pos", "left top");
|
54 |
+
update_post_meta($cpt_id, "sa_slide".$i."_image_size", "contain");
|
55 |
+
update_post_meta($cpt_id, "sa_slide".$i."_image_repeat", "no-repeat");
|
56 |
+
update_post_meta($cpt_id, "sa_slide".$i."_image_color", $color);
|
57 |
+
update_post_meta($cpt_id, "sa_slide".$i."_link_url", "");
|
58 |
+
update_post_meta($cpt_id, "sa_slide".$i."_link_target", "_self");
|
59 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_type", "NONE");
|
60 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_imageid", "");
|
61 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_imagetitle", "");
|
62 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_video_id", "");
|
63 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_video_type", "");
|
64 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_background", "no");
|
65 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_html", "");
|
66 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_shortcode", "0");
|
67 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_bgcol", "#ffffff");
|
68 |
+
update_post_meta($cpt_id, "sa_slide".$i."_popup_width", "600");
|
69 |
+
}
|
70 |
+
// insert meta data for the 'sample slider' configuration
|
71 |
+
update_post_meta($cpt_id, 'sa_disable_visual_editor', '0');
|
72 |
+
update_post_meta($cpt_id, 'sa_num_slides', 8);
|
73 |
+
update_post_meta($cpt_id, 'sa_slide_duration', 4);
|
74 |
+
update_post_meta($cpt_id, 'sa_slide_transition', 0.3);
|
75 |
+
update_post_meta($cpt_id, 'sa_slide_by', 1);
|
76 |
+
update_post_meta($cpt_id, 'sa_loop_slider', '1');
|
77 |
+
update_post_meta($cpt_id, 'sa_stop_hover', '1');
|
78 |
+
update_post_meta($cpt_id, 'sa_nav_arrows', '1');
|
79 |
+
update_post_meta($cpt_id, 'sa_pagination', '1');
|
80 |
+
update_post_meta($cpt_id, 'sa_shortcodes', '0');
|
81 |
+
update_post_meta($cpt_id, 'sa_random_order', '1');
|
82 |
+
update_post_meta($cpt_id, 'sa_reverse_order', '0');
|
83 |
+
update_post_meta($cpt_id, 'sa_mouse_drag', '1');
|
84 |
+
update_post_meta($cpt_id, 'sa_touch_drag', '1');
|
85 |
+
update_post_meta($cpt_id, 'sa_auto_height', '0');
|
86 |
+
update_post_meta($cpt_id, 'sa_items_width1', 1);
|
87 |
+
update_post_meta($cpt_id, 'sa_items_width2', 2);
|
88 |
+
update_post_meta($cpt_id, 'sa_items_width3', 3);
|
89 |
+
update_post_meta($cpt_id, 'sa_items_width4', 4);
|
90 |
+
update_post_meta($cpt_id, 'sa_items_width5', 4);
|
91 |
+
update_post_meta($cpt_id, 'sa_items_width6', 4);
|
92 |
+
update_post_meta($cpt_id, 'sa_transition', 'fade');
|
93 |
+
update_post_meta($cpt_id, 'sa_css_id', 'sample_slider');
|
94 |
+
update_post_meta($cpt_id, 'sa_background_color', '#fafafa');
|
95 |
+
update_post_meta($cpt_id, 'sa_border_width', 1);
|
96 |
+
update_post_meta($cpt_id, 'sa_border_color', '#f0f0f0');
|
97 |
+
update_post_meta($cpt_id, 'sa_border_radius', 5);
|
98 |
+
update_post_meta($cpt_id, 'sa_wrapper_padd_top', 8);
|
99 |
+
update_post_meta($cpt_id, 'sa_wrapper_padd_right', 8);
|
100 |
+
update_post_meta($cpt_id, 'sa_wrapper_padd_bottom', 8);
|
101 |
+
update_post_meta($cpt_id, 'sa_wrapper_padd_left', 8);
|
102 |
+
update_post_meta($cpt_id, 'sa_slide_min_height_perc', 50);
|
103 |
+
update_post_meta($cpt_id, 'sa_slide_padding_tb', 5);
|
104 |
+
update_post_meta($cpt_id, 'sa_slide_padding_lr', 5);
|
105 |
+
update_post_meta($cpt_id, 'sa_slide_margin_lr', 0);
|
106 |
+
update_post_meta($cpt_id, 'sa_autohide_arrows', '1');
|
107 |
+
update_post_meta($cpt_id, 'sa_slide_icons_location', 'Center Center');
|
108 |
+
update_post_meta($cpt_id, 'sa_slide_icons_visible', '0');
|
109 |
+
update_post_meta($cpt_id, 'sa_slide_icons_color', 'white');
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
// SLIDE ANYTHING 2.0 UPGRADE NOTICE
|
114 |
+
function version_20_upgrade_notice() {
|
115 |
+
global $current_user ;
|
116 |
+
$user_id = $current_user->ID;
|
117 |
+
/* Check that the user hasn't already clicked to ignore the message */
|
118 |
+
if (!get_user_meta($user_id, 'sa_ignore_notice')) {
|
119 |
+
echo "<div class='notice notice-info' style='padding-top:10px;'>";
|
120 |
+
|
121 |
+
echo "<div style='float:left; width:170px; margin-right:15px;'><a href='https://edgewebpages.com/' target='_blank'>";
|
122 |
+
echo "<img style='width:100%;' src='https://edgewebpages.com/wp-content/uploads/2017/06/slide_anything_pro_product_image.png' /></a></div>";
|
123 |
+
echo "<h3 style='margin:0px !important; padding:10px 0px !important;'>SLIDE ANYTHING PRO</h3>";
|
124 |
+
echo "<p style='margin:0px 0px 10px !important;'><a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
125 |
+
echo "adds POPUPS into the mix!!</p>";
|
126 |
+
echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
127 |
+
echo "each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup containing ";
|
128 |
+
echo "HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to Slide Anything, if you are ";
|
129 |
+
echo "wanting to create Image or Video galleries for your websites.</p>";
|
130 |
+
echo "<p style='margin:0px 0px 10px !important;'>For more information about Slide Anything PRO, ";
|
131 |
+
echo "<a href='https://edgewebpages.com/' target='_blank'>CLICK HERE.</a></p>";
|
132 |
+
|
133 |
+
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
134 |
+
echo "<a style='display:inline-block; float:right; padding:7px 10px; background:crimson; color:white; text-decoration:none; ";
|
135 |
+
echo "border-radius:5px; font-size:16px;' href='?sa_nag_ignore=0'>Hide this notice</a>";
|
136 |
+
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
137 |
+
|
138 |
+
echo "</div>";
|
139 |
+
}
|
140 |
+
}
|
141 |
+
function slide_anything_notice_ignore() {
|
142 |
+
global $current_user;
|
143 |
+
$user_id = $current_user->ID;
|
144 |
+
// If user clicks to ignore the notice, add that to their user meta
|
145 |
+
if (isset($_GET['sa_nag_ignore']) && ($_GET['sa_nag_ignore'] == '0')) {
|
146 |
+
add_user_meta($user_id, 'sa_ignore_notice', 'true', true);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
/* ##### ACTION HOOK - REGISTER SCRIPTS (JS AND CSS) FOR WORDPRESS DASHBOARD ONLY ##### */
|
151 |
+
function cpt_register_admin_scripts() {
|
152 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
153 |
+
$screen = get_current_screen();
|
154 |
+
if ($screen->post_type == 'sa_slider') {
|
155 |
+
// ONLY LOAD SCRIPTS (JS & CSS) WITHIN 'Slide Anything' SCREENS IN WORDPRESS DASHBOARD
|
156 |
+
// load 'wordpress jquery-ui' scripts
|
157 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
158 |
+
wp_enqueue_script( 'jquery-ui-accordion' );
|
159 |
+
wp_enqueue_script( 'jquery-ui-tabs' );
|
160 |
+
wp_enqueue_script( 'jquery-ui-slider' );
|
161 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
162 |
+
wp_enqueue_script( 'jquery-ui-draggable' );
|
163 |
+
wp_enqueue_script( 'jquery-ui-droppable' );
|
164 |
+
wp_enqueue_script( 'jquery-ui-resize' );
|
165 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
166 |
+
wp_enqueue_script( 'jquery-ui-button' );
|
167 |
+
wp_enqueue_script( 'jquery-ui-tooltip' );
|
168 |
+
wp_enqueue_script( 'jquery-ui-spinner' );
|
169 |
+
// load 'spectrum colorpicker' script and css
|
170 |
+
wp_register_script('spectrum_js', SA_PLUGIN_PATH.'spectrum/spectrum.js', array('jquery'));
|
171 |
+
wp_enqueue_script('spectrum_js');
|
172 |
+
wp_register_style('spectrum_css', SA_PLUGIN_PATH.'spectrum/spectrum.css');
|
173 |
+
wp_enqueue_style('spectrum_css');
|
174 |
+
// load 'jquery-ui' css
|
175 |
+
wp_register_style('admin_ui_css', SA_PLUGIN_PATH.'css/admin-user-interface.min.css');
|
176 |
+
wp_enqueue_style('admin_ui_css');
|
177 |
+
// load 'slide-anything' custom javasript and css for wordpress admin
|
178 |
+
wp_register_script('sa-slider-admin-script', SA_PLUGIN_PATH.'js/slide-anything-admin.js', array( 'jquery' ));
|
179 |
+
wp_enqueue_script('sa-slider-admin-script');
|
180 |
+
wp_register_style('sa-slider-admin-css', SA_PLUGIN_PATH.'css/slide-anything-admin.css', array(), '2.0', 'all');
|
181 |
+
wp_enqueue_style('sa-slider-admin-css');
|
182 |
+
if ($sa_pro_version) {
|
183 |
+
// load 'magnific popup' script and css
|
184 |
+
wp_register_script('magnific-popup_js', SA_PLUGIN_PATH.'magnific-popup/jquery.magnific-popup.min.js', array('jquery'));
|
185 |
+
wp_enqueue_script('magnific-popup_js');
|
186 |
+
wp_register_style('magnific-popup_css', SA_PLUGIN_PATH.'magnific-popup/magnific-popup.css');
|
187 |
+
wp_enqueue_style('magnific-popup_css');
|
188 |
+
}
|
189 |
+
// DISABLE AUTOSAVE FOR THIS CUSTOM POST TYPE (causes issues with preview modal popup)
|
190 |
+
wp_dequeue_script('autosave');
|
191 |
+
}
|
192 |
+
if ($screen->id == 'settings_page_sa-settings-page') {
|
193 |
+
// SLIDE ANYTHING SETTINGS PAGE - load custom css script
|
194 |
+
wp_register_style('sa-slider-admin-css', SA_PLUGIN_PATH.'css/slide-anything-admin.css');
|
195 |
+
wp_enqueue_style('sa-slider-admin-css');
|
196 |
+
}
|
197 |
+
// style for TINYMCE editor 'Slide Anything sliders' button
|
198 |
+
wp_register_style('tinymce-css', SA_PLUGIN_PATH.'css/tinymce_style.css');
|
199 |
+
wp_enqueue_style('tinymce-css');
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
// ##### ACTION HOOK - REGISTER THE 'Slide Anything' CUSTOM POST TYPE #####
|
205 |
+
function cpt_slider_register() {
|
206 |
+
$labels = array(
|
207 |
+
'name' => _x('SA Sliders', 'post type general name', 'sa_slider_textdomain'),
|
208 |
+
'singular_name' => _x('Slider', 'post type singular name', 'sa_slider_textdomain'),
|
209 |
+
'menu_name' => __('SA Sliders', 'sa_slider_textdomain'),
|
210 |
+
'add_new' => __('Add New Slider', 'sa_slider_textdomain'),
|
211 |
+
'add_new_item' => __('Add New Slider', 'sa_slider_textdomain'),
|
212 |
+
'edit_item' => __('Edit Slider', 'sa_slider_textdomain'),
|
213 |
+
'new_item' => __('New Slider', 'sa_slider_textdomain'),
|
214 |
+
'view_item' => __('View Slider', 'sa_slider_textdomain'),
|
215 |
+
'not_found' => __('No sliders found', 'sa_slider_textdomain'),
|
216 |
+
'not_found_in_trash' => __('No sliders found in Trash', 'sa_slider_textdomain'),
|
217 |
+
);
|
218 |
+
$args = array(
|
219 |
+
'labels' => $labels,
|
220 |
+
'description' => __('Slide Anything carousel/slider', 'sa_slider_textdomain'),
|
221 |
+
'public' => false,
|
222 |
+
'exclude_from_search' => true,
|
223 |
+
'publicly_queryable' => false,
|
224 |
+
'show_ui' => true,
|
225 |
+
'show_in_nav_menus' => false,
|
226 |
+
'show_in_menu' => true,
|
227 |
+
'menu_position' => 10,
|
228 |
+
'menu_icon' => 'dashicons-images-alt2',
|
229 |
+
'hierarchical' => false,
|
230 |
+
'supports' => array('title'),
|
231 |
+
'has_archive' => false,
|
232 |
+
'query_var' => false,
|
233 |
+
'can_export' => true,
|
234 |
+
'rewrite' => true,
|
235 |
+
'capability_type' => 'post'
|
236 |
+
);
|
237 |
+
register_post_type('sa_slider', $args);
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
|
242 |
+
// ##### WP DASHBOARD - SLIDER LIST PAGE #####
|
243 |
+
// ACTION HOOK - ADD/REMOVE (HOVER-OVER) ROW ACTIONS WHEN THIS CUSTOM POST TYPE IS LISTED IN DASHBOARD
|
244 |
+
function cpt_slider_row_actions($actions, $post) {
|
245 |
+
if ($post->post_type == 'sa_slider') {
|
246 |
+
// REMOVE 'Quick Edit' ROW ACTION
|
247 |
+
unset($actions['inline hide-if-no-js']);
|
248 |
+
}
|
249 |
+
return $actions;
|
250 |
+
}
|
251 |
+
// FILTER TO ADD/REMOVE COLUMNS DISPLAYED FOR THIS CUSTOM POST TYPE WITHIN THE DASHBOARD
|
252 |
+
function cpt_slider_modify_columns($columns) {
|
253 |
+
// new columns to be added
|
254 |
+
$new_columns = array(
|
255 |
+
'slides' => 'Slides',
|
256 |
+
'shortcode' => 'Shortcode',
|
257 |
+
'css-id' => 'CSS ID'
|
258 |
+
);
|
259 |
+
$columns = array_slice($columns, 0, 2, true) + $new_columns + array_slice($columns, 2, NULL, true);
|
260 |
+
return $columns;
|
261 |
+
}
|
262 |
+
// DEFINE OUTPUT FOR EACH CUSTOM COLUMN DISPLAYED FOR THIS CUSTOM POST TYPE WITHIN THE DASHBOARD
|
263 |
+
function cpt_slider_custom_column_content($column) {
|
264 |
+
// get post object for this row
|
265 |
+
global $post;
|
266 |
+
|
267 |
+
// output for the 'Slides' column
|
268 |
+
if ($column == 'slides') {
|
269 |
+
$num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
|
270 |
+
if ($num_slides == '') {
|
271 |
+
$num_slides = '-';
|
272 |
+
}
|
273 |
+
echo esc_html($num_slides);
|
274 |
+
}
|
275 |
+
|
276 |
+
// output for the 'Shortcode' column
|
277 |
+
if ($column == 'shortcode') {
|
278 |
+
$shortcode = "[slide-anything id='".$post->ID."']";
|
279 |
+
echo esc_html($shortcode);
|
280 |
+
}
|
281 |
+
|
282 |
+
// output for the 'CSS ID' column
|
283 |
+
if ($column == 'css-id') {
|
284 |
+
$css_id = get_post_meta($post->ID, 'sa_css_id', true);
|
285 |
+
if ($css_id == '') {
|
286 |
+
$css_id = '-';
|
287 |
+
} else {
|
288 |
+
$css_id = "#".$css_id;
|
289 |
+
}
|
290 |
+
echo esc_html($css_id);
|
291 |
+
}
|
292 |
+
}
|
293 |
+
|
294 |
+
|
295 |
+
|
296 |
+
// ##### ADD A CUSTOM BUTTON TO WORDPRESS TINYMCE EDITOR (ON PAGES AND POSTS ONLY) #####
|
297 |
+
function add_tinymce_button() {
|
298 |
+
global $typenow;
|
299 |
+
// check user permissions
|
300 |
+
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
|
301 |
+
return;
|
302 |
+
}
|
303 |
+
// verify the post type - only display button on posts and pages
|
304 |
+
if (!in_array($typenow, array('post', 'page'))) {
|
305 |
+
return;
|
306 |
+
}
|
307 |
+
// check if WYSIWYG is enabled
|
308 |
+
if (get_user_option('rich_editing') == 'true') {
|
309 |
+
add_filter('mce_external_plugins', 'add_tinymce_plugin');
|
310 |
+
add_filter('mce_buttons', 'register_tinymce_button');
|
311 |
+
}
|
312 |
+
}
|
313 |
+
function add_tinymce_plugin($plugin_array) {
|
314 |
+
$plugin_array['tinymce_button'] = SA_PLUGIN_PATH.'js/add_tinymce_button.js';
|
315 |
+
return $plugin_array;
|
316 |
+
}
|
317 |
+
function register_tinymce_button($buttons) {
|
318 |
+
array_push($buttons, 'tinymce_button');
|
319 |
+
return $buttons;
|
320 |
+
}
|
321 |
+
function get_tinymce_shortcode_array() {
|
322 |
+
$screen = get_current_screen();
|
323 |
+
if ($screen->post_type != 'envira') { // ### BUG FIX - CLASHING WITH ENVIRA GALLERY (VER 2.0.13) ###
|
324 |
+
// display 2 javascript arrays (in footer) containing all the slide anything post titles and post ids
|
325 |
+
// these 2 arrays are used to display the shortcode options by the TinyMCE button
|
326 |
+
echo "<script type='text/javascript'>\n";
|
327 |
+
echo "var sa_title_arr = new Array();\n";
|
328 |
+
echo "var sa_id_arr = new Array();\n";
|
329 |
+
|
330 |
+
$args = array('post_type' => 'sa_slider', 'post_status' => 'publish', 'posts_per_page' => -1);
|
331 |
+
$sa_slider_query = new WP_Query($args);
|
332 |
+
$count = 0;
|
333 |
+
while ($sa_slider_query->have_posts()) : $sa_slider_query->the_post();
|
334 |
+
$title = get_the_title();
|
335 |
+
echo "sa_title_arr[".$count."] = '".$title."';\n";
|
336 |
+
echo "sa_id_arr[".$count."] = '".get_the_ID()."';\n";
|
337 |
+
$count++;
|
338 |
+
endwhile;
|
339 |
+
echo "</script>\n";
|
340 |
+
}
|
341 |
+
}
|
342 |
+
|
343 |
+
|
344 |
+
|
345 |
+
// ##### ACTION HOOK - ADD META BOXES TO THE 'Slide Anything' CUSTOM POST TYPE #####
|
346 |
+
function cpt_slider_add_meta_boxes() {
|
347 |
+
global $post;
|
348 |
+
|
349 |
+
$info_added = get_post_meta($post->ID, 'sa_info_added', true);
|
350 |
+
$info_deleted = get_post_meta($post->ID, 'sa_info_deleted', true);
|
351 |
+
$info_duplicated = get_post_meta($post->ID, 'sa_info_duplicated', true);
|
352 |
+
$info_moved = get_post_meta($post->ID, 'sa_info_moved', true);
|
353 |
+
if ($info_added == '1') {
|
354 |
+
add_meta_box('cpt_slide_added', __('Information'), 'cpt_slide_added_content', 'sa_slider', 'normal', 'high');
|
355 |
+
update_post_meta($post->ID, 'sa_info_added', '0');
|
356 |
+
}
|
357 |
+
if ($info_deleted == '1') {
|
358 |
+
add_meta_box('cpt_slide_deleted', __('Information'), 'cpt_slide_deleted_content', 'sa_slider', 'normal', 'high');
|
359 |
+
update_post_meta($post->ID, 'sa_info_deleted', '0');
|
360 |
+
}
|
361 |
+
if ($info_duplicated == '1') {
|
362 |
+
add_meta_box('cpt_slide_duplicated', __('Information'), 'cpt_slide_duplicated_content', 'sa_slider', 'normal', 'high');
|
363 |
+
update_post_meta($post->ID, 'sa_info_duplicated', '0');
|
364 |
+
}
|
365 |
+
if ($info_moved == '1') {
|
366 |
+
add_meta_box('cpt_slide_moved', __('Information'), 'cpt_slide_moved_content', 'sa_slider', 'normal', 'high');
|
367 |
+
update_post_meta($post->ID, 'sa_info_moved', '0');
|
368 |
+
}
|
369 |
+
add_meta_box('cpt_slider_settings', __('Slider Settings'), 'cpt_slider_settings_content', 'sa_slider', 'normal', 'high');
|
370 |
+
add_meta_box('cpt_slider_slides', __('Slides'), 'cpt_slider_slides_content', 'sa_slider', 'normal', 'high');
|
371 |
+
add_meta_box('cpt_slider_shortcode', __('Shortcode / Preview'), 'cpt_slider_shortcode_content', 'sa_slider', 'side', 'high');
|
372 |
+
add_meta_box('cpt_slider_items', __('Items Displayed'), 'cpt_slider_items_content', 'sa_slider', 'side', 'default');
|
373 |
+
add_meta_box('cpt_slider_style', __('Slider Style'), 'cpt_slider_style_content', 'sa_slider', 'side', 'default');
|
374 |
+
remove_meta_box( 'mymetabox_revslider_0', 'sa_slider', 'normal' ); // remove revolution slider meta box
|
375 |
+
}
|
376 |
+
|
377 |
+
|
378 |
+
|
379 |
+
// ##### META BOX CONTENT - 'Information' (slide added) BOX #####
|
380 |
+
function cpt_slide_added_content() {
|
381 |
+
echo "<h3 id='sa_slide_added_mess'>A new slide has been added to this slider.</h3>";
|
382 |
+
}
|
383 |
+
|
384 |
+
|
385 |
+
|
386 |
+
// ##### META BOX CONTENT - 'Information' (slide deleted) BOX #####
|
387 |
+
function cpt_slide_deleted_content() {
|
388 |
+
echo "<h3 id='sa_slide_deleted_mess'>A slide has been deleted from this slider.</h3>";
|
389 |
+
}
|
390 |
+
|
391 |
+
|
392 |
+
|
393 |
+
// ##### META BOX CONTENT - 'Information' (slide duplicated) BOX #####
|
394 |
+
function cpt_slide_duplicated_content() {
|
395 |
+
echo "<h3 id='sa_slide_duplicated_mess'>A slide has been duplicated (copied) within this slider.</h3>";
|
396 |
+
}
|
397 |
+
|
398 |
+
|
399 |
+
|
400 |
+
// ##### META BOX CONTENT - 'Information' (slide moved) BOX #####
|
401 |
+
function cpt_slide_moved_content() {
|
402 |
+
echo "<h3 id='sa_slide_moved_mess'>The slide order of this slider has been has changed.</h3>";
|
403 |
+
}
|
404 |
+
|
405 |
+
|
406 |
+
|
407 |
+
// ##### META BOX CONTENT - 'Slider Settings' BOX #####
|
408 |
+
function cpt_slider_settings_content($post) {
|
409 |
+
$num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
|
410 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
411 |
+
|
412 |
+
echo "<div id='sa_slider_settings'>\n";
|
413 |
+
// NONCE TO PREVENT CSRF SECURITY ATTACKS
|
414 |
+
wp_nonce_field(basename(__FILE__), 'nonce_save_slider');
|
415 |
+
|
416 |
+
// HIDDEN FIELD - NUMBER OF SLIDES
|
417 |
+
if ($num_slides == '') {
|
418 |
+
// new slider is being created
|
419 |
+
echo "<input type='hidden' id='num_slides_id' name='sa_num_slides' value='3'/>\n";
|
420 |
+
} else {
|
421 |
+
// existing slider
|
422 |
+
$num_slides = intval($num_slides);
|
423 |
+
echo "<input type='hidden' id='num_slides_id' name='sa_num_slides' value='".esc_attr($num_slides)."'/>\n";
|
424 |
+
}
|
425 |
+
// HIDDEN FIELD - SLIDE ADDED INDICATOR
|
426 |
+
echo "<input type='hidden' id='sa_info_added' name='sa_info_added' value='0'/>\n";
|
427 |
+
// HIDDEN FIELD - SLIDE DELETED INDICATOR
|
428 |
+
echo "<input type='hidden' id='sa_info_deleted' name='sa_info_deleted' value='0'/>\n";
|
429 |
+
// HIDDEN FIELD - SLIDE DUPLICATED INDICATOR
|
430 |
+
echo "<input type='hidden' id='sa_info_duplicated' name='sa_info_duplicated' value='0'/>\n";
|
431 |
+
// HIDDEN FIELD - SLIDE MOVED UP INDICATOR
|
432 |
+
echo "<input type='hidden' id='sa_info_moved' name='sa_info_moved' value='0'/>\n";
|
433 |
+
// HIDDEN FIELD - DUPLICATE SLIDE NUMBER
|
434 |
+
echo "<input type='hidden' id='sa_duplicate_slide' name='sa_duplicate_slide' value='0'/>\n";
|
435 |
+
// HIDDEN FIELD - MOVE SLIDE UP (SLIDE NUMBER)
|
436 |
+
echo "<input type='hidden' id='sa_move_slide_up' name='sa_move_slide_up' value='0'/>\n";
|
437 |
+
// HIDDEN FIELD - PRO VERSION
|
438 |
+
if ($sa_pro_version) {
|
439 |
+
echo "<input type='hidden' id='sa_pro_version' name='sa_pro_version' value='1'/>\n";
|
440 |
+
} else {
|
441 |
+
echo "<input type='hidden' id='sa_pro_version' name='sa_pro_version' value='0'/>\n";
|
442 |
+
}
|
443 |
+
// SLIDE DURATION
|
444 |
+
$slide_duration = get_post_meta($post->ID, 'sa_slide_duration', true);
|
445 |
+
if ($slide_duration == '') {
|
446 |
+
$slide_duration = 5;
|
447 |
+
}
|
448 |
+
echo "<div class='sa_slider_value'><span>Slide Duration:</span>";
|
449 |
+
echo "<input type='text' id='sa_slide_duration' name='sa_slide_duration' readonly value='".esc_attr($slide_duration)."'><em>seconds (0 = manual navigation)</em>";
|
450 |
+
echo "<em class='sa_tooltip' href='' title='Set to 0 to disable slider autoplay (manual slider navigation only)'></em></div>\n";
|
451 |
+
echo "<div class='jquery_ui_slider' id='jq_slider_duration'></div><hr/>\n";
|
452 |
+
// SLIDE TRANSITION
|
453 |
+
$slide_transition = get_post_meta($post->ID, 'sa_slide_transition', true);
|
454 |
+
if ($slide_transition == '') {
|
455 |
+
$slide_transition = 0.2;
|
456 |
+
}
|
457 |
+
echo "<div class='sa_slider_value'><span>Slide Transition:</span>";
|
458 |
+
echo "<input type='text' id='sa_slide_transition' name='sa_slide_transition' readonly value='".esc_attr($slide_transition)."'><em>seconds</em>\n";
|
459 |
+
echo "<em class='sa_tooltip' href='' title='The time it takes to change from one slide to the next slide'></em></div>\n";
|
460 |
+
echo "<div class='jquery_ui_slider' id='jq_slider_transition'></div><hr/>\n";
|
461 |
+
// SLIDE BY
|
462 |
+
$slide_by = get_post_meta($post->ID, 'sa_slide_by', true);
|
463 |
+
if ($slide_by == '') {
|
464 |
+
$slide_by = 1;
|
465 |
+
}
|
466 |
+
echo "<div class='sa_slider_value'><span>Slide By:</span>";
|
467 |
+
echo "<input type='text' id='sa_slide_by' name='sa_slide_by' readonly value='".esc_attr($slide_by)."'><em>slides (0 = slide by page)</em>";
|
468 |
+
echo "<em class='sa_tooltip' href='' title='The number of slides to slide per transition. Set to 0 to enable the Slide by Page option.'></em></div>\n";
|
469 |
+
echo "<div class='jquery_ui_slider' id='jq_slider_by'></div><hr/>\n";
|
470 |
+
echo "<div class='half_width_column'>\n";
|
471 |
+
// LOOP SLIDER
|
472 |
+
$loop_slider = get_post_meta($post->ID, 'sa_loop_slider', true);
|
473 |
+
if ($loop_slider == '') {
|
474 |
+
$loop_slider = '1';
|
475 |
+
}
|
476 |
+
echo "<div class='sa_setting_checkbox'><span>Loop Slider:</span>";
|
477 |
+
if ($loop_slider == '1') {
|
478 |
+
echo "<input type='checkbox' id='sa_loop_slider' name='sa_loop_slider' value='1' checked/>";
|
479 |
+
} else {
|
480 |
+
echo "<input type='checkbox' id='sa_loop_slider' name='sa_loop_slider' value='1'/>";
|
481 |
+
}
|
482 |
+
echo "<em class='sa_tooltip' href='' title='Only applies when slide duration is NOT zero (loops back to first slide after last slide is displayed)'></em>";
|
483 |
+
echo "</div>\n";
|
484 |
+
// STOP ON HOVER
|
485 |
+
$stop_hover = get_post_meta($post->ID, 'sa_stop_hover', true);
|
486 |
+
if ($stop_hover == '') {
|
487 |
+
$stop_hover = '1';
|
488 |
+
}
|
489 |
+
echo "<div class='sa_setting_checkbox'><span>Stop on Hover:</span>";
|
490 |
+
if ($stop_hover == '1') {
|
491 |
+
echo "<input type='checkbox' id='sa_stop_hover' name='sa_stop_hover' value='1' checked/>";
|
492 |
+
} else {
|
493 |
+
echo "<input type='checkbox' id='sa_stop_hover' name='sa_stop_hover' value='1'/>";
|
494 |
+
}
|
495 |
+
echo "<em class='sa_tooltip' href='' title='Only applies when slide duration is NOT zero (slideshow is paused when hovering over a slide)'></em>";
|
496 |
+
echo "</div>\n";
|
497 |
+
// RANDOM ORDER
|
498 |
+
$random_order = get_post_meta($post->ID, 'sa_random_order', true);
|
499 |
+
if ($random_order == '') {
|
500 |
+
$random_order = '0';
|
501 |
+
}
|
502 |
+
echo "<div class='sa_setting_checkbox'><span>Random Order:</span>";
|
503 |
+
if ($random_order == '1') {
|
504 |
+
echo "<input type='checkbox' id='sa_random_order' name='sa_random_order' value='1' checked/>";
|
505 |
+
} else {
|
506 |
+
echo "<input type='checkbox' id='sa_random_order' name='sa_random_order' value='1'/>";
|
507 |
+
}
|
508 |
+
echo "<em class='sa_tooltip' title='When checked slides will be randomly re-ordered whenever the slider is displayed'></em>";
|
509 |
+
echo "</div>\n";
|
510 |
+
// REVERSE ORDER
|
511 |
+
$reverse_order = get_post_meta($post->ID, 'sa_reverse_order', true);
|
512 |
+
if ($reverse_order == '') {
|
513 |
+
$reverse_order = '0';
|
514 |
+
}
|
515 |
+
echo "<div class='sa_setting_checkbox'><span>Reverse Order:</span>";
|
516 |
+
if ($reverse_order == '1') {
|
517 |
+
echo "<input type='checkbox' id='sa_reverse_order' name='sa_reverse_order' value='1' checked/>";
|
518 |
+
} else {
|
519 |
+
echo "<input type='checkbox' id='sa_reverse_order' name='sa_reverse_order' value='1'/>";
|
520 |
+
}
|
521 |
+
echo "<em class='sa_tooltip' title='When checked your slides will be shown in the reverse order (i.e. last slide first)'></em>";
|
522 |
+
echo "</div>\n";
|
523 |
+
// ALLOW SHORTCODES
|
524 |
+
$shortcodes = get_post_meta($post->ID, 'sa_shortcodes', true);
|
525 |
+
if ($shortcodes == '') {
|
526 |
+
$shortcodes = '0';
|
527 |
+
}
|
528 |
+
echo "<div class='sa_setting_checkbox'><span>Allow Shortcodes:</span>";
|
529 |
+
if ($shortcodes == '1') {
|
530 |
+
echo "<input type='checkbox' id='sa_shortcodes' name='sa_shortcodes' value='1' checked/>";
|
531 |
+
} else {
|
532 |
+
echo "<input type='checkbox' id='sa_shortcodes' name='sa_shortcodes' value='1'/>";
|
533 |
+
}
|
534 |
+
echo "<em class='sa_tooltip' href='' title='Include WordPree shorcodes within slide content. NOTE: Running shortcodes in Slide Anything may cause issues with some Wordpress Page Builders'></em>\n";
|
535 |
+
echo "</div>\n";
|
536 |
+
echo "</div>\n";
|
537 |
+
echo "<div class='half_width_column'>\n";
|
538 |
+
// NAVIGATE ARROWS
|
539 |
+
$nav_arrows = get_post_meta($post->ID, 'sa_nav_arrows', true);
|
540 |
+
if ($nav_arrows == '') {
|
541 |
+
$nav_arrows = '1';
|
542 |
+
}
|
543 |
+
echo "<div class='sa_setting_checkbox'><span>Navigate Arrows:</span>";
|
544 |
+
if ($nav_arrows == '1') {
|
545 |
+
echo "<input type='checkbox' id='sa_nav_arrows' name='sa_nav_arrows' value='1' checked/>";
|
546 |
+
} else {
|
547 |
+
echo "<input type='checkbox' id='sa_nav_arrows' name='sa_nav_arrows' value='1'/>";
|
548 |
+
}
|
549 |
+
echo "<em class='sa_tooltip' href='' title='Display the \"next slide\" amd \"previous slide\" buttons'></em>\n";
|
550 |
+
echo "</div>\n";
|
551 |
+
// SHOW PAGINATION
|
552 |
+
$pagination = get_post_meta($post->ID, 'sa_pagination', true);
|
553 |
+
if ($pagination == '') {
|
554 |
+
$pagination = '1';
|
555 |
+
}
|
556 |
+
echo "<div class='sa_setting_checkbox'><span>Show Pagination:</span>";
|
557 |
+
if ($pagination == '1') {
|
558 |
+
echo "<input type='checkbox' id='sa_pagination' name='sa_pagination' value='1' checked/>";
|
559 |
+
} else {
|
560 |
+
echo "<input type='checkbox' id='sa_pagination' name='sa_pagination' value='1'/>";
|
561 |
+
}
|
562 |
+
echo "<em class='sa_tooltip' href='' title='Display slider pagination below the slider'></em>\n";
|
563 |
+
echo "</div>\n";
|
564 |
+
|
565 |
+
// MOUSE DRAG
|
566 |
+
$mouse_drag = get_post_meta($post->ID, 'sa_mouse_drag', true);
|
567 |
+
if ($mouse_drag == '') {
|
568 |
+
$mouse_drag = '1';
|
569 |
+
}
|
570 |
+
echo "<div class='sa_setting_checkbox'><span>Mouse Drag:</span>";
|
571 |
+
if ($mouse_drag == '1') {
|
572 |
+
echo "<input type='checkbox' id='sa_mouse_drag' name='sa_mouse_drag' value='1' checked/>";
|
573 |
+
} else {
|
574 |
+
echo "<input type='checkbox' id='sa_mouse_drag' name='sa_mouse_drag' value='1'/>";
|
575 |
+
}
|
576 |
+
echo "<em class='sa_tooltip' href='' title='Allow navigation to previous/next slides by holding down left mouse button and dragging left/right'></em>\n";
|
577 |
+
echo "</div>\n";
|
578 |
+
// TOUCH DRAG
|
579 |
+
$touch_drag = get_post_meta($post->ID, 'sa_touch_drag', true);
|
580 |
+
if ($touch_drag == '') {
|
581 |
+
$touch_drag = '1';
|
582 |
+
}
|
583 |
+
echo "<div class='sa_setting_checkbox'><span>Touch Drag:</span>";
|
584 |
+
if ($touch_drag == '1') {
|
585 |
+
echo "<input type='checkbox' id='sa_touch_drag' name='sa_touch_drag' value='1' checked/>";
|
586 |
+
} else {
|
587 |
+
echo "<input type='checkbox' id='sa_touch_drag' name='sa_touch_drag' value='1'/>";
|
588 |
+
}
|
589 |
+
echo "<em class='sa_tooltip' href='' title='Allow navigation to previous/next slides on mobile devices by touching screen and dragging left/right'></em>\n";
|
590 |
+
echo "</div>\n";
|
591 |
+
// AUTO HEIGHT
|
592 |
+
$auto_height = get_post_meta($post->ID, 'sa_auto_height', true);
|
593 |
+
if ($auto_height == '') {
|
594 |
+
$auto_height = '0';
|
595 |
+
}
|
596 |
+
echo "<div class='sa_setting_checkbox'><span>Auto Height:</span>";
|
597 |
+
if ($auto_height == '1') {
|
598 |
+
echo "<input type='checkbox' id='sa_auto_height' name='sa_auto_height' value='1' checked/>";
|
599 |
+
} else {
|
600 |
+
echo "<input type='checkbox' id='sa_auto_height' name='sa_auto_height' value='1'/>";
|
601 |
+
}
|
602 |
+
echo "<em class='sa_tooltip' title='Only works with 1 item on the screen. When checked the height of slider is automatically changed to match the height for each slide.'></em>";
|
603 |
+
echo "</div>\n";
|
604 |
+
echo "</div>\n";
|
605 |
+
echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
|
606 |
+
echo "</div>\n";
|
607 |
+
}
|
608 |
+
|
609 |
+
|
610 |
+
|
611 |
+
// ##### META BOX CONTENT - 'Slides' BOX #####
|
612 |
+
function cpt_slider_slides_content($post) {
|
613 |
+
$num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
|
614 |
+
$slider_css_id = get_post_meta($post->ID, 'sa_css_id', true);
|
615 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
616 |
+
// DISABLE VISUAL EDITOR CHECKBOX
|
617 |
+
$disable_visual_editor = get_post_meta($post->ID, 'sa_disable_visual_editor', true);
|
618 |
+
if ($disable_visual_editor == '') {
|
619 |
+
$disable_visual_editor = '0';
|
620 |
+
}
|
621 |
+
echo "<div id='sa_visual_editor_checkbox'><span>Disable Visual Editor:</span>";
|
622 |
+
if ($disable_visual_editor == '1') {
|
623 |
+
echo "<input type='checkbox' id='sa_disable_visual_editor' name='sa_disable_visual_editor' value='1' checked/></div>\n";
|
624 |
+
} else {
|
625 |
+
echo "<input type='checkbox' id='sa_disable_visual_editor' name='sa_disable_visual_editor' value='1'/></div>\n";
|
626 |
+
}
|
627 |
+
// SLIDER EDITOR BOX SETTINGS
|
628 |
+
if ($disable_visual_editor == '1') {
|
629 |
+
$editor_args = array('tinymce' => false, 'wpautop' => false, 'media_buttons' => true, 'editor_class' => 'sa_slide_content', 'editor_height' => '250');
|
630 |
+
} else {
|
631 |
+
$editor_args = array('tinymce' => true, 'wpautop' => false, 'media_buttons' => true, 'editor_class' => 'sa_slide_content', 'editor_height' => '250');
|
632 |
+
}
|
633 |
+
if ($num_slides == '') {
|
634 |
+
// A NEW SLIDER IS BEING CREATED - ADD 3 INITIAL SLIDES
|
635 |
+
$num_slides = 3;
|
636 |
+
$slide_data[0]['edit_id'] = "sa_slide1_content";
|
637 |
+
$slide_data[0]['content'] = "Slide content";
|
638 |
+
$slide_data[0]['del_id'] = "sa_slide1_delete";
|
639 |
+
$slide_data[0]['image_id'] = "sa_slide1_image_id";
|
640 |
+
$slide_data[0]['thumb'] = "slide1_thumb";
|
641 |
+
$slide_data[0]['image_del'] = "slide1_image_del";
|
642 |
+
$slide_data[0]['image_pos'] = "sa_slide1_image_pos";
|
643 |
+
$slide_data[0]['image_size'] = "sa_slide1_image_size";
|
644 |
+
$slide_data[0]['image_repeat'] = "sa_slide1_image_repeat";
|
645 |
+
$slide_data[0]['image_color'] = "sa_slide1_image_color";
|
646 |
+
$slide_data[0]['link_url'] = "sa_slide1_link_url";
|
647 |
+
$slide_data[0]['link_target'] = "sa_slide1_link_target";
|
648 |
+
$slide_data[0]['slide_no'] = 1;
|
649 |
+
$slide_data[1]['edit_id'] = "sa_slide2_content";
|
650 |
+
$slide_data[1]['content'] = "Slide content";
|
651 |
+
$slide_data[1]['del_id'] = "sa_slide2_delete";
|
652 |
+
$slide_data[1]['image_id'] = "sa_slide2_image_id";
|
653 |
+
$slide_data[1]['thumb'] = "slide2_thumb";
|
654 |
+
$slide_data[1]['image_del'] = "slide2_image_del";
|
655 |
+
$slide_data[1]['image_pos'] = "sa_slide2_image_pos";
|
656 |
+
$slide_data[1]['image_size'] = "sa_slide2_image_size";
|
657 |
+
$slide_data[1]['image_repeat'] = "sa_slide2_image_repeat";
|
658 |
+
$slide_data[1]['image_color'] = "sa_slide2_image_color";
|
659 |
+
$slide_data[1]['link_url'] = "sa_slide2_link_url";
|
660 |
+
$slide_data[1]['link_target'] = "sa_slide2_link_target";
|
661 |
+
$slide_data[1]['slide_no'] = 2;
|
662 |
+
$slide_data[2]['edit_id'] = "sa_slide3_content";
|
663 |
+
$slide_data[2]['content'] = "Slide content";
|
664 |
+
$slide_data[2]['del_id'] = "sa_slide3_delete";
|
665 |
+
$slide_data[2]['image_id'] = "sa_slide3_image_id";
|
666 |
+
$slide_data[2]['thumb'] = "slide3_thumb";
|
667 |
+
$slide_data[2]['image_del'] = "slide3_image_del";
|
668 |
+
$slide_data[2]['image_pos'] = "sa_slide3_image_pos";
|
669 |
+
$slide_data[2]['image_size'] = "sa_slide3_image_size";
|
670 |
+
$slide_data[2]['image_repeat'] = "sa_slide3_image_repeat";
|
671 |
+
$slide_data[2]['image_color'] = "sa_slide3_image_color";
|
672 |
+
$slide_data[2]['link_url'] = "sa_slide3_link_url";
|
673 |
+
$slide_data[2]['link_target'] = "sa_slide3_link_target";
|
674 |
+
$slide_data[2]['slide_no'] = 3;
|
675 |
+
if ($sa_pro_version) {
|
676 |
+
$slide_data[0]['popup_type'] = "sa_slide1_popup_type";
|
677 |
+
$slide_data[0]['popup_imageid'] = "sa_slide1_popup_imageid";
|
678 |
+
$slide_data[0]['popup_imagetitle'] = "sa_slide1_popup_imagetitle";
|
679 |
+
$slide_data[0]['popup_video_id'] = "sa_slide1_popup_video_id";
|
680 |
+
$slide_data[0]['popup_video_type'] = "sa_slide1_popup_video_type";
|
681 |
+
$slide_data[0]['popup_background'] = "sa_slide1_popup_background";
|
682 |
+
$slide_data[0]['popup_html'] = "sa_slide1_popup_html";
|
683 |
+
$slide_data[0]['popup_shortcode'] = "sa_slide1_popup_shortcode";
|
684 |
+
$slide_data[0]['popup_bgcol'] = "sa_slide1_popup_bgcol";
|
685 |
+
$slide_data[0]['popup_width'] = "sa_slide1_popup_width";
|
686 |
+
$slide_data[1]['popup_type'] = "sa_slide2_popup_type";
|
687 |
+
$slide_data[1]['popup_imageid'] = "sa_slide2_popup_imageid";
|
688 |
+
$slide_data[1]['popup_imagetitle'] = "sa_slide2_popup_imagetitle";
|
689 |
+
$slide_data[1]['popup_video_id'] = "sa_slide2_popup_video_id";
|
690 |
+
$slide_data[1]['popup_video_type'] = "sa_slide2_popup_video_type";
|
691 |
+
$slide_data[1]['popup_background'] = "sa_slide2_popup_background";
|
692 |
+
$slide_data[1]['popup_html'] = "sa_slide2_popup_html";
|
693 |
+
$slide_data[1]['popup_shortcode'] = "sa_slide2_popup_shortcode";
|
694 |
+
$slide_data[1]['popup_bgcol'] = "sa_slide2_popup_bgcol";
|
695 |
+
$slide_data[1]['popup_width'] = "sa_slide2_popup_width";
|
696 |
+
$slide_data[2]['popup_type'] = "sa_slide3_popup_type";
|
697 |
+
$slide_data[2]['popup_imageid'] = "sa_slide3_popup_imageid";
|
698 |
+
$slide_data[2]['popup_imagetitle'] = "sa_slide3_popup_imagetitle";
|
699 |
+
$slide_data[2]['popup_video_id'] = "sa_slide3_popup_video_id";
|
700 |
+
$slide_data[2]['popup_video_type'] = "sa_slide3_popup_video_type";
|
701 |
+
$slide_data[2]['popup_background'] = "sa_slide3_popup_background";
|
702 |
+
$slide_data[2]['popup_html'] = "sa_slide3_popup_html";
|
703 |
+
$slide_data[2]['popup_shortcode'] = "sa_slide3_popup_shortcode";
|
704 |
+
$slide_data[2]['popup_bgcol'] = "sa_slide3_popup_bgcol";
|
705 |
+
$slide_data[2]['popup_width'] = "sa_slide3_popup_width";
|
706 |
+
}
|
707 |
+
} else {
|
708 |
+
// AN EXISTING SLIDER - GET SLIDE DATA FROM THE DATABASE AND SAVE WITHIN AN ARRAY
|
709 |
+
$num_slides = intval($num_slides);
|
710 |
+
$slide_data = array();
|
711 |
+
$count = 0;
|
712 |
+
for ($i = 1; $i <= $num_slides; $i++) {
|
713 |
+
$slide_edit_id = "sa_slide".$i."_content";
|
714 |
+
$slide_char_count = "sa_slide".$i."_char_count";
|
715 |
+
$slide_data[$count]['edit_id'] = $slide_edit_id;
|
716 |
+
$slide_data[$count]['content'] = get_post_meta($post->ID, $slide_edit_id, true);
|
717 |
+
$slide_data[$count]['char_count'] = get_post_meta($post->ID, $slide_char_count, true);
|
718 |
+
$slide_data[$count]['del_id'] = "sa_slide".$i."_delete";
|
719 |
+
$slide_data[$count]['image_id'] = "sa_slide".$i."_image_id";
|
720 |
+
$slide_data[$count]['thumb'] = "slide".$i."_thumb";
|
721 |
+
$slide_data[$count]['image_del'] = "slide".$i."_image_del";
|
722 |
+
$slide_data[$count]['image_pos'] = "sa_slide".$i."_image_pos";
|
723 |
+
$slide_data[$count]['image_size'] = "sa_slide".$i."_image_size";
|
724 |
+
$slide_data[$count]['image_repeat'] = "sa_slide".$i."_image_repeat";
|
725 |
+
$slide_data[$count]['image_color'] = "sa_slide".$i."_image_color";
|
726 |
+
$slide_data[$count]['link_url'] = "sa_slide".$i."_link_url";
|
727 |
+
$slide_data[$count]['link_target'] = "sa_slide".$i."_link_target";
|
728 |
+
if ($sa_pro_version) {
|
729 |
+
$slide_data[$count]['popup_type'] = "sa_slide".$i."_popup_type";
|
730 |
+
$slide_data[$count]['popup_imageid'] = "sa_slide".$i."_popup_imageid";
|
731 |
+
$slide_data[$count]['popup_imagetitle'] = "sa_slide".$i."_popup_imagetitle";
|
732 |
+
$slide_data[$count]['popup_video_id'] = "sa_slide".$i."_popup_video_id";
|
733 |
+
$slide_data[$count]['popup_video_type'] = "sa_slide".$i."_popup_video_type";
|
734 |
+
$slide_data[$count]['popup_background'] = "sa_slide".$i."_popup_background";
|
735 |
+
$slide_data[$count]['popup_html'] = "sa_slide".$i."_popup_html";
|
736 |
+
$slide_data[$count]['popup_shortcode'] = "sa_slide".$i."_popup_shortcode";
|
737 |
+
$slide_data[$count]['popup_bgcol'] = "sa_slide".$i."_popup_bgcol";
|
738 |
+
$slide_data[$count]['popup_width'] = "sa_slide".$i."_popup_width";
|
739 |
+
}
|
740 |
+
$slide_data[$count]['slide_no'] = $i;
|
741 |
+
$count++;
|
742 |
+
}
|
743 |
+
}
|
744 |
+
// GET AVAILABLE WORDPRESS IMAGE SIZES AND SAVE WITHIN AN ARRAY
|
745 |
+
if ($sa_pro_version) {
|
746 |
+
// SLIDE ANYTHING PRO VERSION ONLY
|
747 |
+
global $_wp_additional_image_sizes;
|
748 |
+
$image_size_arr = array();
|
749 |
+
$image_size_arr[0]['value'] = "no";
|
750 |
+
$image_size_arr[0]['desc'] = "NO";
|
751 |
+
$count = 1;
|
752 |
+
foreach (get_intermediate_image_sizes() as $image_size) {
|
753 |
+
if (in_array($image_size, array('thumbnail', 'medium', 'medium_large', 'large'))) {
|
754 |
+
$width = get_option("{$image_size}_size_w");
|
755 |
+
$height = get_option("{$image_size}_size_h");
|
756 |
+
} elseif (isset($_wp_additional_image_sizes[$image_size])) {
|
757 |
+
$width = $_wp_additional_image_sizes[$image_size]['width'];
|
758 |
+
$height = $_wp_additional_image_sizes[$image_size]['height'];
|
759 |
+
}
|
760 |
+
if (($width != 0) && ($height != 0)) {
|
761 |
+
$image_size_arr[$count]['value'] = $image_size;
|
762 |
+
$image_size_arr[$count]['desc'] = $image_size." (".$width."×".$height.")";
|
763 |
+
$count++;
|
764 |
+
}
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
// ###### LOOP TO DISPLAY INPUT ELEMENTS FOR EACH SLIDE ######
|
769 |
+
echo "<div id='slider_accordion'>\n";
|
770 |
+
for ($i = 0; $i < count($slide_data); $i++) {
|
771 |
+
// DISPLAY ACCORDION HEADING
|
772 |
+
echo "<h3>Slide ".$slide_data[$i]['slide_no'];
|
773 |
+
$css_id = $slider_css_id."_slide".sprintf('%02d', $slide_data[$i]['slide_no']);
|
774 |
+
// display CSS ID for the current slide
|
775 |
+
echo "<span>#".$css_id."</span>";
|
776 |
+
echo "</h3>\n";
|
777 |
+
echo "<div>\n";
|
778 |
+
|
779 |
+
// ### DISPLAY THE SLIDE CONTENT EDITOR (textarea field) ###
|
780 |
+
//wp_editor($slide_data[$i]['content'], wp_kses_post($slide_data[$i]['edit_id']), $editor_args);
|
781 |
+
wp_editor($slide_data[$i]['content'], $slide_data[$i]['edit_id'], $editor_args);
|
782 |
+
|
783 |
+
// ##############################
|
784 |
+
// ##### SLIDE TABS - START #####
|
785 |
+
// ##############################
|
786 |
+
$tabs_num = $i + 1;
|
787 |
+
echo "<div id='slide_".$tabs_num."_tabs' class='sa_slide_tabs'>\n";
|
788 |
+
echo "<ul>\n";
|
789 |
+
echo "<li><a href='#slide".$tabs_num."_background_tab'>Slide Background</a></li>\n";
|
790 |
+
echo "<li><a href='#slide".$tabs_num."_link_tab'>Slide Link</a></li>\n";
|
791 |
+
echo "<li><a href='#slide".$tabs_num."_popup_tab'>Slide Popup</a></li>\n";
|
792 |
+
echo "</ul>\n";
|
793 |
+
|
794 |
+
// ####### SLIDE TAB 1 - SLIDE BACKGROUND #######
|
795 |
+
echo "<div id='slide".$tabs_num."_background_tab' class='sa_slide_tab'>\n";
|
796 |
+
|
797 |
+
// GET BACKGROUND IMAGE DATA FOR THIS SLIDE (image id, position, size, repeat and color) FROM DATABASE
|
798 |
+
$slide_image_id = get_post_meta($post->ID, $slide_data[$i]['image_id'], true);
|
799 |
+
$slide_image_pos = get_post_meta($post->ID, $slide_data[$i]['image_pos'], true);
|
800 |
+
if ($slide_image_pos == '') {
|
801 |
+
$slide_image_pos = 'left top';
|
802 |
+
}
|
803 |
+
$slide_image_size = get_post_meta($post->ID, $slide_data[$i]['image_size'], true);
|
804 |
+
if ($slide_image_size == '') {
|
805 |
+
$slide_image_size = 'contain';
|
806 |
+
}
|
807 |
+
$slide_image_repeat = get_post_meta($post->ID, $slide_data[$i]['image_repeat'], true);
|
808 |
+
if ($slide_image_repeat == '') {
|
809 |
+
$slide_image_repeat = 'no-repeat';
|
810 |
+
}
|
811 |
+
$slide_image_color = get_post_meta($post->ID, $slide_data[$i]['image_color'], true);
|
812 |
+
if ($slide_image_color == '') {
|
813 |
+
$slide_image_color = "rgba(0,0,0,0)";
|
814 |
+
}
|
815 |
+
|
816 |
+
echo "<div class='sa_slide_bg_wrapper'>\n";
|
817 |
+
|
818 |
+
// ### 'USE POPUP IMAGE AS SLIDE BACKGROUND' SETTING ###
|
819 |
+
if ($sa_pro_version) {
|
820 |
+
// SLIDE ANYTHING PRO VERSION ONLY
|
821 |
+
$slide_popup_background = get_post_meta($post->ID, $slide_data[$i]['popup_background'], true);
|
822 |
+
if ($slide_popup_background == '') {
|
823 |
+
$slide_popup_background = 'no';
|
824 |
+
}
|
825 |
+
echo "<div class='popup_background_wrapper'>\n";
|
826 |
+
echo "<div>Use Popup Image as Slide Background:";
|
827 |
+
$tooltip = "Allows you to use the same image you defined as the popup image as the slide background image. You can use a smaller version of the popup image.";
|
828 |
+
echo "<em class='sa_tooltip' href='' title='".$tooltip."'></em></div>\n";
|
829 |
+
echo "<select id='".esc_attr($slide_data[$i]['popup_background'])."' name='".esc_attr($slide_data[$i]['popup_background'])."' ";
|
830 |
+
echo "onChange='change_slide_popup_background(".esc_attr($slide_data[$i]['slide_no']).");'>";
|
831 |
+
for ($j = 0; $j < count($image_size_arr); $j++) {
|
832 |
+
if ($slide_popup_background == $image_size_arr[$j]['value']) {
|
833 |
+
echo "<option value='".esc_attr($image_size_arr[$j]['value'])."' selected>".esc_html($image_size_arr[$j]['desc'])."</option>";
|
834 |
+
} else {
|
835 |
+
echo "<option value='".esc_attr($image_size_arr[$j]['value'])."'>".esc_html($image_size_arr[$j]['desc'])."</option>";
|
836 |
+
}
|
837 |
+
}
|
838 |
+
echo "</select>";
|
839 |
+
echo "</div>\n"; // .popup_background_wrapper
|
840 |
+
echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
|
841 |
+
echo "<div id='slide".esc_attr($slide_data[$i]['slide_no'])."_imagebg_popup' class='sa_slide_bg_popup'><div></div></div>\n";
|
842 |
+
}
|
843 |
+
|
844 |
+
// SLIDE BACKGROUND IMAGE - THUMBNAIL AND 'SET IMAGE' BUTTON
|
845 |
+
// get wordpress media upload frame url
|
846 |
+
$upload_frame_url = esc_url(get_upload_iframe_src('image', $post->ID)."&slide=".$slide_data[$i]['slide_no']);
|
847 |
+
// Get image src for slide background image
|
848 |
+
$slide_image_src = wp_get_attachment_image_src($slide_image_id, 'medium');
|
849 |
+
// check if the slide background image id already exists
|
850 |
+
$image_exists = is_array($slide_image_src);
|
851 |
+
// slide backround image - thumbnail (and delete button)
|
852 |
+
echo "<div id='".$slide_data[$i]['thumb']."' class='sa_slide_thumb'>\n";
|
853 |
+
if ($image_exists) {
|
854 |
+
echo "<div style='background-image:url(\"".esc_attr($slide_image_src[0])."\"); background-size:".esc_attr($slide_image_size)."; ";
|
855 |
+
echo "background-repeat:".esc_attr($slide_image_repeat)."; background-color:".esc_attr($slide_image_color)."; ";
|
856 |
+
echo "background-position:".esc_attr($slide_image_pos).";'></div>\n";
|
857 |
+
echo "<span id='".esc_attr($slide_data[$i]['image_del'])."' onClick='remove_slide_bg_image(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Delete the background image for this slide'>X</span>\n";
|
858 |
+
echo "</div>\n";
|
859 |
+
} else {
|
860 |
+
echo "<div style='background-color:#ffffff; background-size:".esc_attr($slide_image_size)."; ";
|
861 |
+
echo "background-repeat:".esc_attr($slide_image_repeat)."; background-color:".esc_attr($slide_image_color)."; ";
|
862 |
+
echo "background-position:".esc_attr($slide_image_pos).";'></div>\n";
|
863 |
+
echo "<span id='".esc_attr($slide_data[$i]['image_del'])."' class='sa_hidden' onClick='remove_slide_bg_image(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Delete the background image for this slide'>X</span>\n";
|
864 |
+
echo "</div>\n";
|
865 |
+
}
|
866 |
+
// slide background image - 'set image' button
|
867 |
+
echo "<a class='button button-secondary slide_image_add' id='slide".esc_attr($slide_data[$i]['slide_no'])."_image_add' ";
|
868 |
+
echo "href='".esc_attr($upload_frame_url)."' title='Set the background image for this slide'>Set Image</a>\n";
|
869 |
+
// slide background image - image id text field
|
870 |
+
echo "<input type='hidden' id='".esc_attr($slide_data[$i]['image_id'])."' name='".esc_attr($slide_data[$i]['image_id'])."' value='".esc_attr($slide_image_id)."'/>\n";
|
871 |
+
|
872 |
+
// SLIDE BACKGROUND IMAGE - BACKGROUND POSITION (dropdown box)
|
873 |
+
echo "<div class='slide_image_settings_line'>";
|
874 |
+
echo "<span>Background Position:</span>";
|
875 |
+
$option_arr = array();
|
876 |
+
$option_arr[0]['desc'] = 'Top Left'; $option_arr[0]['value'] = 'left top';
|
877 |
+
$option_arr[1]['desc'] = 'Top Center'; $option_arr[1]['value'] = 'center top';
|
878 |
+
$option_arr[2]['desc'] = 'Top Right'; $option_arr[2]['value'] = 'right top';
|
879 |
+
$option_arr[3]['desc'] = 'Center Left'; $option_arr[3]['value'] = 'left center';
|
880 |
+
$option_arr[4]['desc'] = 'Center'; $option_arr[4]['value'] = 'center center';
|
881 |
+
$option_arr[5]['desc'] = 'Center Right'; $option_arr[5]['value'] = 'right center';
|
882 |
+
$option_arr[6]['desc'] = 'Bottom Left'; $option_arr[6]['value'] = 'left bottom';
|
883 |
+
$option_arr[7]['desc'] = 'Bottom Center'; $option_arr[7]['value'] = 'center bottom';
|
884 |
+
$option_arr[8]['desc'] = 'Bottom Right'; $option_arr[8]['value'] = 'right bottom';
|
885 |
+
echo "<select id='".esc_attr($slide_data[$i]['image_pos'])."' name='".esc_attr($slide_data[$i]['image_pos'])."' onChange='change_slide_image_pos(".esc_attr($slide_data[$i]['slide_no']).");'>";
|
886 |
+
for ($j = 0; $j < count($option_arr); $j++) {
|
887 |
+
if ($slide_image_pos == $option_arr[$j]['value']) {
|
888 |
+
echo "<option value='".esc_attr($option_arr[$j]['value'])."' selected>".esc_html($option_arr[$j]['desc'])."</option>";
|
889 |
+
} else {
|
890 |
+
echo "<option value='".esc_attr($option_arr[$j]['value'])."'>".esc_html($option_arr[$j]['desc'])."</option>";
|
891 |
+
}
|
892 |
+
}
|
893 |
+
echo "</select>";
|
894 |
+
echo "</div>\n";
|
895 |
+
|
896 |
+
// SLIDE BACKGROUND IMAGE - BACKGROUND SIZE (dropdown box)
|
897 |
+
echo "<div class='slide_image_settings_line'>";
|
898 |
+
echo "<span>Background Size:</span>";
|
899 |
+
$option_arr = array();
|
900 |
+
$option_arr[0]['value'] = 'auto'; $option_arr[0]['desc'] = 'no resize';
|
901 |
+
$option_arr[1]['value'] = 'contain'; $option_arr[1]['desc'] = 'contain';
|
902 |
+
$option_arr[2]['value'] = 'cover'; $option_arr[2]['desc'] = 'cover';
|
903 |
+
$option_arr[3]['value'] = '100% 100%'; $option_arr[3]['desc'] = '100%';
|
904 |
+
$option_arr[4]['value'] = '100% auto'; $option_arr[4]['desc'] = '100% width';
|
905 |
+
$option_arr[5]['value'] = 'auto 100%'; $option_arr[5]['desc'] = '100% height';
|
906 |
+
echo "<select id='".esc_attr($slide_data[$i]['image_size'])."' name='".esc_attr($slide_data[$i]['image_size'])."' onChange='change_slide_image_size(".esc_attr($slide_data[$i]['slide_no']).");'>";
|
907 |
+
for ($j = 0; $j < count($option_arr); $j++) {
|
908 |
+
if ($slide_image_size == $option_arr[$j]['value']) {
|
909 |
+
echo "<option value='".esc_attr($option_arr[$j]['value'])."' selected>".esc_html($option_arr[$j]['desc'])."</option>";
|
910 |
+
} else {
|
911 |
+
echo "<option value='".esc_attr($option_arr[$j]['value'])."'>".esc_html($option_arr[$j]['desc'])."</option>";
|
912 |
+
}
|
913 |
+
}
|
914 |
+
echo "</select>";
|
915 |
+
echo "</div>\n";
|
916 |
+
|
917 |
+
// SLIDER BACKGROUND IMAGE - BACKGROUND REPEAT (dropdown box)
|
918 |
+
echo "<div class='slide_image_settings_line'>";
|
919 |
+
echo "<span>Background Repeat:</span>";
|
920 |
+
$option_arr = array();
|
921 |
+
$option_arr[0] = 'no-repeat';
|
922 |
+
$option_arr[1] = 'repeat';
|
923 |
+
$option_arr[2] = 'repeat-x';
|
924 |
+
$option_arr[3] = 'repeat-y';
|
925 |
+
echo "<select id='".esc_attr($slide_data[$i]['image_repeat'])."' name='".esc_attr($slide_data[$i]['image_repeat'])."' ";
|
926 |
+
echo "onChange='change_slide_image_repeat(".esc_attr($slide_data[$i]['slide_no']).");'>";
|
927 |
+
for ($j = 0; $j < count($option_arr); $j++) {
|
928 |
+
if ($slide_image_repeat == $option_arr[$j]) {
|
929 |
+
echo "<option value='".esc_attr($option_arr[$j])."' selected>".esc_html($option_arr[$j])."</option>";
|
930 |
+
} else {
|
931 |
+
echo "<option value='".esc_attr($option_arr[$j])."'>".esc_html($option_arr[$j])."</option>";
|
932 |
+
}
|
933 |
+
}
|
934 |
+
echo "</select>";
|
935 |
+
echo "</div>\n";
|
936 |
+
|
937 |
+
// SLIDER BACKGROUND IMAGE - BACKGROUND COLOR (color picker)
|
938 |
+
echo "<div class='slide_image_settings_line'>";
|
939 |
+
echo "<span>Background Color:</span>";
|
940 |
+
echo "<input type='text' id='".esc_attr($slide_data[$i]['image_color'])."' name='".esc_attr($slide_data[$i]['image_color'])."' value='".esc_attr($slide_image_color)."' ";
|
941 |
+
echo "onChange='change_slide_image_color(".esc_attr($slide_data[$i]['slide_no']).");'>";
|
942 |
+
echo "</div>\n";
|
943 |
+
|
944 |
+
echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
|
945 |
+
echo "</div>\n";
|
946 |
+
echo "</div>\n";
|
947 |
+
|
948 |
+
// ####### SLIDE TAB 2 - SLIDE LINK #######
|
949 |
+
echo "<div id='slide".$tabs_num."_link_tab' class='sa_slide_tab'>\n";
|
950 |
+
|
951 |
+
// GET SLIDE LINK DATA FOR THIS SLIDE FROM THE DATABASE
|
952 |
+
$slide_link_url = get_post_meta($post->ID, $slide_data[$i]['link_url'], true);
|
953 |
+
$slide_link_target = get_post_meta($post->ID, $slide_data[$i]['link_target'], true);
|
954 |
+
if ($slide_link_target == '') {
|
955 |
+
$slide_link_target = '_self';
|
956 |
+
}
|
957 |
+
|
958 |
+
// DISPLAY INPUT FIELDS FOR SLIDE LINK SETTINGS
|
959 |
+
echo "<div class='slide_link_settings_wrapper'>";
|
960 |
+
echo "<p>Specify a link URL that this slide opens</h3>";
|
961 |
+
// LINK URL
|
962 |
+
echo "<div><span>Link URL:</span>";
|
963 |
+
echo "<input type='text' id='".esc_attr($slide_data[$i]['link_url'])."' name='".esc_attr($slide_data[$i]['link_url'])."' ";
|
964 |
+
echo "value='".esc_attr($slide_link_url)."'/></div>\n";
|
965 |
+
// LINK TARGET
|
966 |
+
echo "<div><span>Link Target:</span>";
|
967 |
+
echo "<select id='".esc_attr($slide_data[$i]['link_target'])."' name='".esc_attr($slide_data[$i]['link_target'])."'>";
|
968 |
+
if ($slide_link_target == '_blank') {
|
969 |
+
echo "<option value='_self'>Same Tab/Window</option>";
|
970 |
+
echo "<option value='_blank' selected>New Tab/Window</option>";
|
971 |
+
} else {
|
972 |
+
echo "<option value='_self' selected>Same Tab/Window</option>";
|
973 |
+
echo "<option value='_blank'>New Tab/Window</option>";
|
974 |
+
}
|
975 |
+
echo "</select>";
|
976 |
+
echo "</div>\n";
|
977 |
+
|
978 |
+
// URL HASH NAVIGATION
|
979 |
+
/*
|
980 |
+
$css_id = get_post_meta($post->ID, 'sa_css_id', true);
|
981 |
+
$data_hash = "#".$css_id."_slide".sprintf('%02d', $slide_data[$i]['slide_no']);
|
982 |
+
echo "<p style='padding:20px 0px 0px;'>URL Hash Navigation</h3>";
|
983 |
+
echo "<div><span><em>URL Hash Navication</em> is an Owl Carousel 2.0 feature where you can create links or buttons to navigate ";
|
984 |
+
echo "to a specific slide within your slider. See this <a href='https://owlcarousel2.github.io/OwlCarousel2/demos/urlhashnav.html' ";
|
985 |
+
echo "target='_blank' style='color:blue;'>EXAMPLE</a> to see how this works.<br/>The link for this slide is:</span>";
|
986 |
+
echo "<strong style='padding-left:3px; color:firebrick;'>".$data_hash."</strong></div>";
|
987 |
+
*/
|
988 |
+
echo "</div>\n";
|
989 |
+
echo "</div>\n";
|
990 |
+
|
991 |
+
// ####### SLIDE TAB 3 - SLIDE POPUP #######
|
992 |
+
echo "<div id='slide".$tabs_num."_popup_tab' class='sa_slide_tab'>\n";
|
993 |
+
|
994 |
+
if ($sa_pro_version) {
|
995 |
+
// ### SLIDE ANYTHING PRO VERSION ONLY ###
|
996 |
+
|
997 |
+
// GET SLIDE POPUP DATA FOR THIS SLIDE FROM THE DATABASE
|
998 |
+
$slide_popup_type = get_post_meta($post->ID, $slide_data[$i]['popup_type'], true);
|
999 |
+
if ($slide_popup_type == '') {
|
1000 |
+
$slide_popup_type = 'NONE';
|
1001 |
+
}
|
1002 |
+
$popup_imageid = intval(get_post_meta($post->ID, $slide_data[$i]['popup_imageid'], true));
|
1003 |
+
$popup_video_id = get_post_meta($post->ID, $slide_data[$i]['popup_video_id'], true);
|
1004 |
+
$popup_video_type = get_post_meta($post->ID, $slide_data[$i]['popup_video_type'], true);
|
1005 |
+
$popup_imagetitle = get_post_meta($post->ID, $slide_data[$i]['popup_imagetitle'], true);
|
1006 |
+
$popup_html = get_post_meta($post->ID, $slide_data[$i]['popup_html'], true);
|
1007 |
+
$popup_shortcode = get_post_meta($post->ID, $slide_data[$i]['popup_shortcode'], true);
|
1008 |
+
$popup_bgcol = get_post_meta($post->ID, $slide_data[$i]['popup_bgcol'], true);
|
1009 |
+
$popup_width = intval(get_post_meta($post->ID, $slide_data[$i]['popup_width'], true));
|
1010 |
+
$css_id = get_post_meta($post->ID, 'sa_css_id', true);
|
1011 |
+
|
1012 |
+
// POPUP TYPE
|
1013 |
+
echo "<div class='slide_popup_settings_line'>";
|
1014 |
+
echo "<span>SA Popup Type:</span>";
|
1015 |
+
$option_arr = array();
|
1016 |
+
$option_arr[0] = 'NONE';
|
1017 |
+
$option_arr[1] = 'IMAGE';
|
1018 |
+
$option_arr[2] = 'VIDEO';
|
1019 |
+
$option_arr[3] = 'HTML';
|
1020 |
+
echo "<select id='".esc_attr($slide_data[$i]['popup_type'])."' name='".esc_attr($slide_data[$i]['popup_type'])."' ";
|
1021 |
+
echo "onChange='change_slide_popup_type(".esc_attr($slide_data[$i]['slide_no']).");'>";
|
1022 |
+
for ($j = 0; $j < count($option_arr); $j++) {
|
1023 |
+
if ($slide_popup_type == $option_arr[$j]) {
|
1024 |
+
echo "<option value='".esc_attr($option_arr[$j])."' selected>".esc_html($option_arr[$j])."</option>";
|
1025 |
+
} else {
|
1026 |
+
echo "<option value='".esc_attr($option_arr[$j])."'>".esc_html($option_arr[$j])."</option>";
|
1027 |
+
}
|
1028 |
+
}
|
1029 |
+
echo "</select>";
|
1030 |
+
echo "</div>\n";
|
1031 |
+
|
1032 |
+
// A) IMAGE POPUP SETTINGS
|
1033 |
+
if ($slide_popup_type == 'IMAGE') {
|
1034 |
+
echo "<div id='slide".($i+1)."_image_popup_wrapper' class='image_popup_wrapper'>\n";
|
1035 |
+
} else {
|
1036 |
+
echo "<div id='slide".($i+1)."_image_popup_wrapper' class='image_popup_wrapper' style='display:none;'>\n";
|
1037 |
+
}
|
1038 |
+
// get wordpress media upload frame url
|
1039 |
+
$upload_popup_frame_url = esc_url(get_upload_iframe_src('image', $post->ID)."&popup=".$slide_data[$i]['slide_no']);
|
1040 |
+
// Get image src for slide popup image
|
1041 |
+
$popup_image_src = wp_get_attachment_image_src($popup_imageid, 'medium');
|
1042 |
+
// check if the slide background image id already exists
|
1043 |
+
$image_exists = is_array($popup_image_src);
|
1044 |
+
echo "<div id='slide".($i+1)."_popup_thumb' class='slide_popup_thumb'>\n";
|
1045 |
+
$placeholder = SA_PLUGIN_PATH."images/image_placeholder.jpg";
|
1046 |
+
if ($image_exists) {
|
1047 |
+
// media library image id exists - display thumbnail image
|
1048 |
+
echo "<div><img src='".$popup_image_src[0]."'/></div>";
|
1049 |
+
// display image delete button
|
1050 |
+
echo "<span onClick='remove_popup_image(\"".esc_attr($slide_data[$i]['slide_no'])."\", \"".$placeholder."\");' ";
|
1051 |
+
echo "id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_image_del' title='Delete the popup image for this slide'>X</span>\n";
|
1052 |
+
// get popup image info (size & dimensions)
|
1053 |
+
$popup_image_meta = wp_get_attachment_metadata($popup_imageid);
|
1054 |
+
$image_width = $popup_image_meta['width'];
|
1055 |
+
$image_height = $popup_image_meta['height'];
|
1056 |
+
$info_dim = $image_width." x ".$image_height." pixels";
|
1057 |
+
$popup_image_full = wp_get_attachment_image_src($popup_imageid, 'full');
|
1058 |
+
$img_headers = get_headers($popup_image_full[0], 1);
|
1059 |
+
$info_size = $img_headers["Content-Length"];
|
1060 |
+
if ($info_size != '') {
|
1061 |
+
$size_unit = 'bytes';
|
1062 |
+
if ($info_size > 1048576) {
|
1063 |
+
if (!is_array($info_size)) {
|
1064 |
+
$info_size = round($info_size / 1048576)." MB";
|
1065 |
+
} else {
|
1066 |
+
$info_size = '';
|
1067 |
+
}
|
1068 |
+
} else if ($info_size > 1024) {
|
1069 |
+
if (!is_array($info_size)) {
|
1070 |
+
$info_size = round($info_size / 1024)." kb";
|
1071 |
+
} else {
|
1072 |
+
$info_size = '';
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
} else {
|
1077 |
+
// no image selected yet - display placeholder image
|
1078 |
+
$popup_image_id = 0;
|
1079 |
+
echo "<div><img src='".$placeholder."'/></div>";
|
1080 |
+
// display image delete button (hidden state)
|
1081 |
+
echo "<span class='sa_hidden' onClick='remove_popup_image(\"".esc_attr($slide_data[$i]['slide_no'])."\", \"".esc_attr($placeholder)."\");' ";
|
1082 |
+
echo "id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_image_del' title='Delete the popup image for this slide'>X</span>\n";
|
1083 |
+
// reset popup image info (size & dimensions)
|
1084 |
+
$info_dim = '';
|
1085 |
+
$info_size = '';
|
1086 |
+
}
|
1087 |
+
echo "</div>\n";
|
1088 |
+
// slide popup image - 'set image' button
|
1089 |
+
echo "<a class='button button-secondary popup_image_add' href='".esc_attr($upload_popup_frame_url)."' ";
|
1090 |
+
echo "title='Set the background image for this slide'>Set Image</a>\n";
|
1091 |
+
// slide popup image - 'preview' button
|
1092 |
+
$preview_button = "slide".esc_attr($slide_data[$i]['slide_no'])."_popup_image_preview";
|
1093 |
+
echo "<div id='".esc_attr($preview_button)."' class='slide_popup_image_preview'>";
|
1094 |
+
if ($image_exists) {
|
1095 |
+
echo "<a class='button button-secondary' href='".esc_attr($popup_image_full[0])."' title='".esc_attr($popup_imagetitle)."'>Preview</a>";
|
1096 |
+
} else {
|
1097 |
+
echo "<a class='button button-secondary' href='".esc_attr($placeholder)."' title='".esc_attr($popup_imagetitle)."'>Preview</a>";
|
1098 |
+
}
|
1099 |
+
echo "</div>\n";
|
1100 |
+
// slide popup image - jquery code to generate 'magnific popup' preview
|
1101 |
+
echo "<script type='text/javascript'>\n";
|
1102 |
+
echo "jQuery(document).ready(function() {\n";
|
1103 |
+
echo " jQuery('#".esc_attr($preview_button)." a').magnificPopup({\n";
|
1104 |
+
echo " mainClass: 'sa_popup',\n";
|
1105 |
+
echo " closeBtnInside: true,\n";
|
1106 |
+
echo " type: 'image'\n";
|
1107 |
+
echo " });\n";
|
1108 |
+
echo "});\n";
|
1109 |
+
echo "</script>\n";
|
1110 |
+
// slide popup image - popup image id hidden field
|
1111 |
+
echo "<input type='hidden' id='".esc_attr($slide_data[$i]['popup_imageid'])."' name='".esc_attr($slide_data[$i]['popup_imageid']);
|
1112 |
+
echo "' value='".esc_attr($popup_imageid)."' />\n";
|
1113 |
+
// slide popup image - popup image info (title, dimensions & size)
|
1114 |
+
echo "<div class='slide_popup_info'>\n";
|
1115 |
+
// popup image title
|
1116 |
+
echo "<input class='sa_slide_popup_imagetitle' type='text' id='".esc_attr($slide_data[$i]['popup_imagetitle'])."' ";
|
1117 |
+
echo "name='".esc_attr($slide_data[$i]['popup_imagetitle'])."' value='".esc_attr($popup_imagetitle)."' ";
|
1118 |
+
echo "onChange='change_popup_image_title(this.value, \"".$preview_button."\")' placeholder='Enter popup title'/>\n";
|
1119 |
+
// popup dimensions
|
1120 |
+
echo "<div id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_info_dim' class='slide_popup_info_dim'>";
|
1121 |
+
echo "<strong>Dimensions:</strong> ".$info_dim."</div>\n";
|
1122 |
+
// popup file size
|
1123 |
+
echo "<div id='slide".esc_attr($slide_data[$i]['slide_no'])."_popup_info_size' class='slide_popup_info_size'>";
|
1124 |
+
if ($info_size != '') {
|
1125 |
+
echo "<strong>File Size:</strong> ".$info_size;
|
1126 |
+
}
|
1127 |
+
echo "</div>\n";
|
1128 |
+
echo "</div>\n";
|
1129 |
+
echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
|
1130 |
+
echo "</div>\n";
|
1131 |
+
|
1132 |
+
// B) VIDEO POPUP SETTINGS
|
1133 |
+
if ($slide_popup_type == 'VIDEO') {
|
1134 |
+
echo "<div id='slide".($i+1)."_video_popup_wrapper' class='video_popup_wrapper'>\n";
|
1135 |
+
} else {
|
1136 |
+
echo "<div id='slide".($i+1)."_video_popup_wrapper' class='video_popup_wrapper' style='display:none;'>\n";
|
1137 |
+
}
|
1138 |
+
// set default video values
|
1139 |
+
if (($popup_video_type != 'youtube') && ($popup_video_type != 'vimeo')) {
|
1140 |
+
$popup_video_type = '';
|
1141 |
+
$popup_video_id = '';
|
1142 |
+
}
|
1143 |
+
if ($popup_video_id == '') {
|
1144 |
+
$popup_video_type = '';
|
1145 |
+
}
|
1146 |
+
// video preview
|
1147 |
+
echo "<div id='slide".($i+1)."_video_thumb' class='slide_video_thumb'>\n";
|
1148 |
+
if ($popup_video_id != '') {
|
1149 |
+
if ($popup_video_type == 'youtube') {
|
1150 |
+
echo "<iframe src='https://www.youtube.com/embed/".$popup_video_id."' frameborder='0' allowfullscreen></iframe>\n";
|
1151 |
+
} elseif ($popup_video_type == 'vimeo') {
|
1152 |
+
echo "<iframe src='https://player.vimeo.com/video/".$popup_video_id."' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
1153 |
+
} else {
|
1154 |
+
echo "<img src='".SA_PLUGIN_PATH."images/video_placeholder.jpg'/>";
|
1155 |
+
}
|
1156 |
+
} else {
|
1157 |
+
echo "<img src='".SA_PLUGIN_PATH."images/video_placeholder.jpg'/>";
|
1158 |
+
}
|
1159 |
+
echo "<div style='float:none; clear:both; width:100%; height:1px;'></div>\n";
|
1160 |
+
echo "</div>\n";
|
1161 |
+
// video url (youtube/vimeo) input text box
|
1162 |
+
echo "<div class='sa_slide_video_url'>";
|
1163 |
+
echo "<input type='text' id='sa_slide".($i+1)."_video_url' name='sa_slide".($i+1)."_video_url' ";
|
1164 |
+
echo "placeholder='Enter YouTube or Vimeo URL'/></div>\n";
|
1165 |
+
// 'update video' button
|
1166 |
+
echo "<a class='button button-secondary' title='Update popup video using the above video URL' ";
|
1167 |
+
echo "onClick='update_popup_video(".($i+1).");'>Set Video</a>\n";
|
1168 |
+
|
1169 |
+
// slide popup video - 'preview' button
|
1170 |
+
$video_preview_url = SA_PLUGIN_PATH."images/video_placeholder_admin.jpg";
|
1171 |
+
if ($popup_video_id != '') {
|
1172 |
+
if ($popup_video_type == 'youtube') {
|
1173 |
+
$video_preview_url = "http://www.youtube.com/watch?v=".$popup_video_id;
|
1174 |
+
} elseif ($popup_video_type == 'vimeo') {
|
1175 |
+
$video_preview_url = "http://vimeo.com/".$popup_video_id;
|
1176 |
+
}
|
1177 |
+
}
|
1178 |
+
$preview_button = "slide".esc_attr($slide_data[$i]['slide_no'])."_popup_video_preview";
|
1179 |
+
echo "<div id='".esc_attr($preview_button)."' class='slide_popup_video_preview'>";
|
1180 |
+
echo "<a class='button button-secondary' href='".$video_preview_url."'>Preview</a>";
|
1181 |
+
echo "</div>\n";
|
1182 |
+
// slide popup image - jquery code to generate 'magnific popup' preview
|
1183 |
+
echo "<script type='text/javascript'>\n";
|
1184 |
+
echo "jQuery(document).ready(function() {\n";
|
1185 |
+
echo " jQuery('#".esc_attr($preview_button)." a').magnificPopup({\n";
|
1186 |
+
echo " mainClass: 'sa_popup',\n";
|
1187 |
+
echo " closeBtnInside: true,\n";
|
1188 |
+
echo " type: 'iframe'\n";
|
1189 |
+
echo " });\n";
|
1190 |
+
echo "});\n";
|
1191 |
+
echo "</script>\n";
|
1192 |
+
// invalid url error message
|
1193 |
+
echo "<div id='sa_slide".($i+1)."_video_invalid_url' class='sa_popup_video_invalid_url'>";
|
1194 |
+
echo "URL entered is NOT a valid YouTube or Vimeo URL!</div>\n";
|
1195 |
+
// hidden video id text field
|
1196 |
+
echo "<input type='hidden' id='".esc_attr($slide_data[$i]['popup_video_id'])."' name='".esc_attr($slide_data[$i]['popup_video_id'])."' ";
|
1197 |
+
echo "value='".esc_attr($popup_video_id)."'/>\n";
|
1198 |
+
// hidden video type (youtube/vimeo) text field
|
1199 |
+
echo "<input type='hidden' id='".esc_attr($slide_data[$i]['popup_video_type'])."' name='".esc_attr($slide_data[$i]['popup_video_type'])."' ";
|
1200 |
+
echo "value='".esc_attr($popup_video_type)."'/>\n";
|
1201 |
+
echo "<div style='float:none; clear:both; width:100%; height:1px;'></div>\n";
|
1202 |
+
echo "</div>\n";
|
1203 |
+
|
1204 |
+
// C) CONTENT POPUP SETTINGS
|
1205 |
+
if ($slide_popup_type == 'HTML') {
|
1206 |
+
echo "<div id='slide".($i+1)."_html_popup_wrapper' class='html_popup_wrapper'>\n";
|
1207 |
+
} else {
|
1208 |
+
echo "<div id='slide".($i+1)."_html_popup_wrapper' class='html_popup_wrapper' style='display:none;'>\n";
|
1209 |
+
}
|
1210 |
+
// content popup - html
|
1211 |
+
echo "<textarea id='".esc_attr($slide_data[$i]['popup_html'])."' name='".esc_attr($slide_data[$i]['popup_html'])."' ";
|
1212 |
+
echo "placeholder='Enter HTML Code or WordPress Shortcode'>".esc_attr($popup_html)."</textarea>\n";
|
1213 |
+
// content popup - shortcode
|
1214 |
+
if ($popup_shortcode == '') {
|
1215 |
+
$popup_shortcode = '0';
|
1216 |
+
}
|
1217 |
+
echo "<div class='slide_popup_settings_line' style='margin:3px 0px 15px;'><span>Shortcode Content:</span>";
|
1218 |
+
if ($popup_shortcode == '1') {
|
1219 |
+
echo "<input type='checkbox' id='".esc_attr($slide_data[$i]['popup_shortcode'])."' name='".esc_attr($slide_data[$i]['popup_shortcode'])."' value='1' checked/>";
|
1220 |
+
} else {
|
1221 |
+
echo "<input type='checkbox' id='".esc_attr($slide_data[$i]['popup_shortcode'])."' name='".esc_attr($slide_data[$i]['popup_shortcode'])."' value='1'/>";
|
1222 |
+
}
|
1223 |
+
echo "<em class='sa_tooltip' href='' title='Use a WordPress shortcode instead of HTML as your popup content'></em>\n";
|
1224 |
+
echo "</div>\n";
|
1225 |
+
// content popup - css id
|
1226 |
+
$popup_id = $css_id."_popup".($i+1);
|
1227 |
+
echo "<div class='slide_popup_settings_line'>";
|
1228 |
+
echo "<span>Popup CSS ID:</span><div id='sa_slide".($i+1)."_popup_css' class='slide_popup_css'>#".$popup_id."</div>";
|
1229 |
+
echo "<strong>(click to copy to clipboard)</strong></div>";
|
1230 |
+
// content popup - background color
|
1231 |
+
if ($popup_bgcol == '') {
|
1232 |
+
$popup_bgcol = "#ffffff";
|
1233 |
+
}
|
1234 |
+
echo "<div class='slide_popup_settings_line'>";
|
1235 |
+
echo "<span>Background Color:</span>";
|
1236 |
+
echo "<input type='text' id='".esc_attr($slide_data[$i]['popup_bgcol'])."' name='".esc_attr($slide_data[$i]['popup_bgcol'])."' ";
|
1237 |
+
echo "value='".esc_attr($popup_bgcol)."'>";
|
1238 |
+
echo "</div>\n";
|
1239 |
+
// content popup - width
|
1240 |
+
if ($popup_width== '') {
|
1241 |
+
$popup_width = '600';
|
1242 |
+
}
|
1243 |
+
echo "<div class='slide_popup_settings_line'>";
|
1244 |
+
echo "<span>Popup Width:</span>";
|
1245 |
+
echo "<input type='text' id='".esc_attr($slide_data[$i]['popup_width'])."' name='".esc_attr($slide_data[$i]['popup_width'])."' ";
|
1246 |
+
echo "value='".esc_attr($popup_width)."'><em>px</em>";
|
1247 |
+
echo "</div>\n";
|
1248 |
+
|
1249 |
+
echo "</div>\n";
|
1250 |
+
} else {
|
1251 |
+
// ### SLIDE ANYTHING FREE VERSION - DISPLAY PRO INFORMATION ###
|
1252 |
+
echo "<div class='slide_popup_pro_version'>\n";
|
1253 |
+
echo "<h4>Available in the PRO VERSION only!</h4>\n";
|
1254 |
+
echo "<p>With <strong>SLIDE ANYTHING PRO </strong> each slide can now open a <strong>MODAL POPUP</strong>, which may be one ";
|
1255 |
+
echo "of the following:</p>\n";
|
1256 |
+
echo "<ul>\n";
|
1257 |
+
echo "<li>An <strong>IMAGE</strong> popup, and with multiple image popups you can create a lightbox image gallery.</li>\n";
|
1258 |
+
echo "<li>An embedded <strong>VIDEO</strong> popup or gallery, which can contain <em>YouTube</em> or <em>Vimeo</em> videos.</li>\n";
|
1259 |
+
echo "<li>Popups containing any custom <strong>HTML</strong> content or WordPress <strong>SHORTCODES</strong> (such as an HTML form).</li>\n";
|
1260 |
+
echo "<li>Or your Slide Anything sliders can conatin a combination of image, video, HTML and shortcode popups!</li>\n";
|
1261 |
+
echo "</ul>\n";
|
1262 |
+
echo "<p>To find out more about <strong>SLIDE ANYTHING PRO</strong>, view demos or get your hands on a copy, click ";
|
1263 |
+
echo "<a href='https://edgewebpages.com' title='Slide Anything PRO' target='_blank'>HERE</a>.</p>";
|
1264 |
+
echo "</div>\n";
|
1265 |
+
}
|
1266 |
+
echo "</div>\n";
|
1267 |
+
|
1268 |
+
// ############################
|
1269 |
+
// ##### SLIDE TABS - END #####
|
1270 |
+
// ############################
|
1271 |
+
echo "</div>\n";
|
1272 |
+
|
1273 |
+
// 3. DELETE STATUS FIELD (hidden) AND DELETE SLIDE BUTTON
|
1274 |
+
echo "<input type='hidden' id='".esc_attr($slide_data[$i]['del_id'])."' name='".esc_attr($slide_data[$i]['del_id'])."' value='1'/>\n";
|
1275 |
+
echo "<div class='button button-secondary' onClick='delete_sa_slide(\"".esc_attr($slide_data[$i]['del_id'])."\");' title='Delete this slide'>Delete Slide</div>\n";
|
1276 |
+
|
1277 |
+
// 4. DUPLICATE SLIDE BUTTON
|
1278 |
+
echo "<div class='button button-secondary' onClick='duplicate_slide(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Duplicate this slide'>Duplicate Slide</div>\n";
|
1279 |
+
|
1280 |
+
// 5. MOVE SLIDE UP BUTTON
|
1281 |
+
if ($slide_data[$i]['slide_no'] != 1) {
|
1282 |
+
echo "<div class='button button-secondary' onClick='move_slide_up(\"".esc_attr($slide_data[$i]['slide_no'])."\");' title='Move this slide up within the slide order'>Move Slide Up</div>\n";
|
1283 |
+
}
|
1284 |
+
|
1285 |
+
echo "</div>\n";
|
1286 |
+
}
|
1287 |
+
echo "</div>\n";
|
1288 |
+
|
1289 |
+
// ADD SLIDE BUTTON
|
1290 |
+
if ($num_slides < 99) {
|
1291 |
+
// a maximum of 99 slides allowed
|
1292 |
+
echo "<div id='sa_add_slide' class='button button-primary button-large' title='Add a new slide'>Add Slide</div>\n";
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
// JQUERY-UI DIALOG BOX DIV - FOR CONFIRMATION DIALOG BOXES
|
1296 |
+
echo "<div id='sa_dialog_box'></div>\n";
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
|
1300 |
+
|
1301 |
+
// ##### META BOX CONTENT - 'Slider Preview/Shortcode' BOX #####
|
1302 |
+
function cpt_slider_shortcode_content($post) {
|
1303 |
+
$post_status = get_post_status($post->ID);
|
1304 |
+
$allow_shortcodes = get_post_meta($post->ID, 'sa_shortcodes', true);
|
1305 |
+
$shortcode = '[slide-anything id="'.$post->ID.'"]';
|
1306 |
+
echo "<div id='sa_slider_shortcode'>".esc_html($shortcode)."</div>\n";
|
1307 |
+
echo "<div id='sa_shortcode_copy' class='button button-secondary'>Copy to Clipboard</div>\n";
|
1308 |
+
if (($post_status == 'publish') && ($allow_shortcodes != '1')) {
|
1309 |
+
echo "<div id='sa_preview_slider' class='button button-secondary' ";
|
1310 |
+
echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"block\";'>Preview Slider</div>\n";
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
if (($post_status == 'publish') && ($allow_shortcodes != '1')) {
|
1314 |
+
// DISPLAY SLIDER PREVIEW POPUP
|
1315 |
+
echo "<div id='sa_preview_popup' style='display:none;'>\n";
|
1316 |
+
echo "<div id='sa_preview_wrapper'>\n";
|
1317 |
+
echo "<div id='sa_preview_close' title='Close Slider Preview' ";
|
1318 |
+
echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"none\";'>X</div>\n";
|
1319 |
+
echo do_shortcode("[slide-anything id='".$post->ID."']");
|
1320 |
+
echo "</div>\n";
|
1321 |
+
echo "</div>\n";
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
|
1326 |
+
|
1327 |
+
// ##### META BOX CONTENT - 'Items Displayed' BOX #####
|
1328 |
+
function cpt_slider_items_content($post) {
|
1329 |
+
$items_width1 = intval(get_post_meta($post->ID, 'sa_items_width1', true));
|
1330 |
+
$items_width2 = intval(get_post_meta($post->ID, 'sa_items_width2', true));
|
1331 |
+
$items_width3 = intval(get_post_meta($post->ID, 'sa_items_width3', true));
|
1332 |
+
$items_width4 = intval(get_post_meta($post->ID, 'sa_items_width4', true));
|
1333 |
+
$items_width5 = intval(get_post_meta($post->ID, 'sa_items_width5', true));
|
1334 |
+
$items_width6 = intval(get_post_meta($post->ID, 'sa_items_width6', true));
|
1335 |
+
if ($items_width1 == 0) { $items_width1 = 1; }
|
1336 |
+
if ($items_width2 == 0) { $items_width2 = 1; }
|
1337 |
+
if ($items_width3 == 0) { $items_width3 = 1; }
|
1338 |
+
if ($items_width4 == 0) { $items_width4 = 1; }
|
1339 |
+
if ($items_width5 == 0) { $items_width5 = 1; }
|
1340 |
+
if ($items_width6 == 0) { $items_width6 = $items_width5; }
|
1341 |
+
|
1342 |
+
echo "<div id='items_displayed_metabox'>\n";
|
1343 |
+
echo "<h4>Browser/Device Width:</h4>\n";
|
1344 |
+
// items for browser width category 1
|
1345 |
+
echo "<div><em class='sa_tooltip' href='' title='Up to 479 pixels'></em><span>Mobile Portrait</span><select name='sa_items_width1'>";
|
1346 |
+
for ($i = 1; $i <= 12; $i++) {
|
1347 |
+
if ($i == $items_width1) {
|
1348 |
+
echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
|
1349 |
+
} else {
|
1350 |
+
echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
echo "</select></div>\n";
|
1354 |
+
// items for browser width category 2
|
1355 |
+
echo "<div><em class='sa_tooltip' href='' title='480 to 767 pixels'></em><span>Mobile Landscape</span><select name='sa_items_width2'>";
|
1356 |
+
for ($i = 1; $i <= 12; $i++) {
|
1357 |
+
if ($i == $items_width2) {
|
1358 |
+
echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
|
1359 |
+
} else {
|
1360 |
+
echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
|
1361 |
+
}
|
1362 |
+
}
|
1363 |
+
echo "</select></div>\n";
|
1364 |
+
// items for browser width category 3
|
1365 |
+
echo "<div><em class='sa_tooltip' href='' title='768 to 979 pixels'></em><span>Tablet Portrait</span><select name='sa_items_width3'>";
|
1366 |
+
for ($i = 1; $i <= 12; $i++) {
|
1367 |
+
if ($i == $items_width3) {
|
1368 |
+
echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
|
1369 |
+
} else {
|
1370 |
+
echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
|
1371 |
+
}
|
1372 |
+
}
|
1373 |
+
echo "</select></div>\n";
|
1374 |
+
// items for browser width category 4
|
1375 |
+
echo "<div><em class='sa_tooltip' href='' title='980 to 1199 pixels'></em><span>Desktop Small</span><select name='sa_items_width4'>";
|
1376 |
+
for ($i = 1; $i <= 12; $i++) {
|
1377 |
+
if ($i == $items_width4) {
|
1378 |
+
echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
|
1379 |
+
} else {
|
1380 |
+
echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
|
1381 |
+
}
|
1382 |
+
}
|
1383 |
+
echo "</select></div>\n";
|
1384 |
+
// items for browser width category 5
|
1385 |
+
echo "<div><em class='sa_tooltip' href='' title='1200 to 1499 pixels'></em><span>Desktop Large</span><select name='sa_items_width5'>";
|
1386 |
+
for ($i = 1; $i <= 12; $i++) {
|
1387 |
+
if ($i == $items_width5) {
|
1388 |
+
echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
|
1389 |
+
} else {
|
1390 |
+
echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
|
1391 |
+
}
|
1392 |
+
}
|
1393 |
+
echo "</select></div>\n";
|
1394 |
+
// items for browser width category 6
|
1395 |
+
echo "<div><em class='sa_tooltip' href='' title='Over 1500 pixels'></em><span>Desktop X-Large</span><select name='sa_items_width6'>";
|
1396 |
+
for ($i = 1; $i <= 12; $i++) {
|
1397 |
+
if ($i == $items_width6) {
|
1398 |
+
echo "<option value='".esc_attr($i)."' selected>".esc_html($i)."</option>";
|
1399 |
+
} else {
|
1400 |
+
echo "<option value='".esc_attr($i)."'>".esc_html($i)."</option>";
|
1401 |
+
}
|
1402 |
+
}
|
1403 |
+
echo "</select></div>\n";
|
1404 |
+
// slide transition effect
|
1405 |
+
$transition = get_post_meta($post->ID, 'sa_transition', true);
|
1406 |
+
if ($transition == '') {
|
1407 |
+
$transition = 'fade';
|
1408 |
+
}
|
1409 |
+
$option_arr = array();
|
1410 |
+
$option_arr[0] = 'Slide';
|
1411 |
+
$option_arr[1] = 'Fade';
|
1412 |
+
$option_arr[2] = 'Zoom In';
|
1413 |
+
$option_arr[3] = 'Zoom Out';
|
1414 |
+
$option_arr[4] = 'Flip Out X';
|
1415 |
+
$option_arr[5] = 'Flip Out Y';
|
1416 |
+
$option_arr[6] = 'Rotate Left';
|
1417 |
+
$option_arr[7] = 'Rotate Right';
|
1418 |
+
$option_arr[8] = 'Bounce Out';
|
1419 |
+
$option_arr[9] = 'Roll Out';
|
1420 |
+
$option_arr[10] = 'Slide Down';
|
1421 |
+
echo "<div><em class='sa_tooltip' href='' title='NOTE: Slide transitions only work when the above items displayed are ALL SET TO 1'></em>";
|
1422 |
+
echo "<span style='color:firebrick !important;'>Slide Transition</span><select style='max-width:100px !important;' name='sa_transition'>";
|
1423 |
+
for ($i = 0; $i < count($option_arr); $i++) {
|
1424 |
+
if ($transition == $option_arr[$i]) {
|
1425 |
+
echo "<option value='".esc_attr($option_arr[$i])."' selected>".esc_html($option_arr[$i])."</option>";
|
1426 |
+
} else {
|
1427 |
+
echo "<option value='".esc_attr($option_arr[$i])."'>".esc_html($option_arr[$i])."</option>";
|
1428 |
+
}
|
1429 |
+
}
|
1430 |
+
echo "</select></div>\n";
|
1431 |
+
|
1432 |
+
echo "</div>\n";
|
1433 |
+
}
|
1434 |
+
|
1435 |
+
|
1436 |
+
|
1437 |
+
// ##### META BOX CONTENT - 'Slider Style' BOX #####
|
1438 |
+
function cpt_slider_style_content($post) {
|
1439 |
+
// CSS ID
|
1440 |
+
$css_id = get_post_meta($post->ID, 'sa_css_id', true);
|
1441 |
+
if ($css_id == '') {
|
1442 |
+
$css_id = "slider_".$post->ID;
|
1443 |
+
}
|
1444 |
+
echo "<div id='slider_style_metabox'>\n";
|
1445 |
+
echo "<h4>CSS <span>#id</span> for Slider:</h4>\n";
|
1446 |
+
echo "<div style='padding-bottom:10px; color:#909090;'>Must consist of letters (upper/lowercase) or Underscore '_' characters <span style='color:firebrick;'>ONLY!</span></div>\n";
|
1447 |
+
echo "<input type='text' id='sa_css_id' name='sa_css_id' value='".esc_attr($css_id)."'/>\n";
|
1448 |
+
echo "<div id='css_note_text'>To style slides use CSS selector:</div>";
|
1449 |
+
echo "<div id='css_note_value'>#".esc_html($css_id)." .owl-item</div>";
|
1450 |
+
echo "<div class='ca_style_hr'></div>\n";
|
1451 |
+
|
1452 |
+
// SLIDER PADDING (TOP, RIGHT, BOTTOM, LEFT)
|
1453 |
+
$wrapper_padd_top = get_post_meta($post->ID, 'sa_wrapper_padd_top', true);
|
1454 |
+
if ($wrapper_padd_top == '') { $wrapper_padd_top = '0'; }
|
1455 |
+
$wrapper_padd_right = get_post_meta($post->ID, 'sa_wrapper_padd_right', true);
|
1456 |
+
if ($wrapper_padd_right == '') { $wrapper_padd_right = '0'; }
|
1457 |
+
$wrapper_padd_bottom = get_post_meta($post->ID, 'sa_wrapper_padd_bottom', true);
|
1458 |
+
if ($wrapper_padd_bottom == '') { $wrapper_padd_bottom = '0'; }
|
1459 |
+
$wrapper_padd_left = get_post_meta($post->ID, 'sa_wrapper_padd_left', true);
|
1460 |
+
if ($wrapper_padd_left == '') { $wrapper_padd_left = '0'; }
|
1461 |
+
$tooltip = "Padding space around the entire carousel/slider";
|
1462 |
+
echo "<h4>Padding <span>(pixels)</span>:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
|
1463 |
+
echo "<div class='ca_style_padding'>";
|
1464 |
+
echo "<div id='padd_top'>";
|
1465 |
+
echo "<input type='text' id='sa_wrapper_padd_top' name='sa_wrapper_padd_top' value='".esc_attr($wrapper_padd_top)."'></div>";
|
1466 |
+
echo "<div id='padd_right'>";
|
1467 |
+
echo "<input type='text' id='sa_wrapper_padd_right' name='sa_wrapper_padd_right' value='".esc_attr($wrapper_padd_right)."'></div>";
|
1468 |
+
echo "<div type='text' id='padd_bottom'>";
|
1469 |
+
echo "<input type='text' id='sa_wrapper_padd_bottom' name='sa_wrapper_padd_bottom' value='".esc_attr($wrapper_padd_bottom)."'></div>";
|
1470 |
+
echo "<div id='padd_left'>";
|
1471 |
+
echo "<input type='text' id='sa_wrapper_padd_left' name='sa_wrapper_padd_left' value='".esc_attr($wrapper_padd_left)."'></div>";
|
1472 |
+
echo "</div>\n";
|
1473 |
+
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
1474 |
+
|
1475 |
+
$tooltip = "Style settings for the slider navigation arrows and slider pagination";
|
1476 |
+
echo "<h4>Slider Navigation:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
|
1477 |
+
|
1478 |
+
// AUTOHIDE ARROWS
|
1479 |
+
$autohide_arrows = get_post_meta($post->ID, 'sa_autohide_arrows', true);
|
1480 |
+
if ($autohide_arrows == '') {
|
1481 |
+
$autohide_arrows = '1';
|
1482 |
+
}
|
1483 |
+
echo "<div class='ca_style_setting_line'><span>Autohide Arrows</span>";
|
1484 |
+
if ($autohide_arrows == '1') {
|
1485 |
+
echo "<input type='checkbox' id='sa_autohide_arrows' name='sa_autohide_arrows' value='1' checked/>";
|
1486 |
+
} else {
|
1487 |
+
echo "<input type='checkbox' id='sa_autohide_arrows' name='sa_autohide_arrows' value='1'/>";
|
1488 |
+
}
|
1489 |
+
echo "</div>\n";
|
1490 |
+
|
1491 |
+
$tooltip = "The background color and border around the entire carousel/slider";
|
1492 |
+
echo "<h4>Background/Border:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
|
1493 |
+
|
1494 |
+
// SLIDER BACKGROUND COLOR
|
1495 |
+
$background_color = get_post_meta($post->ID, 'sa_background_color', true);
|
1496 |
+
if ($background_color == '') {
|
1497 |
+
$background_color = 'rgba(0,0,0,0)';
|
1498 |
+
}
|
1499 |
+
echo "<div class='ca_style_setting_line'><span>Background:</span>";
|
1500 |
+
echo "<input type='text' id='sa_background_color' name='sa_background_color' value='".esc_attr($background_color)."'></div>\n";
|
1501 |
+
|
1502 |
+
// SLIDER BORDER (WIDTH & COLOR)
|
1503 |
+
$border_width = get_post_meta($post->ID, 'sa_border_width', true);
|
1504 |
+
if ($border_width == '') {
|
1505 |
+
$border_width = '0';
|
1506 |
+
}
|
1507 |
+
$border_color = get_post_meta($post->ID, 'sa_border_color', true);
|
1508 |
+
if ($border_color == '') {
|
1509 |
+
$border_color = 'rgba(0,0,0,0)';
|
1510 |
+
}
|
1511 |
+
echo "<div class='ca_style_setting_line'><span>Border Style:</span>";
|
1512 |
+
echo "<input type='text' id='sa_border_width' name='sa_border_width' value='".esc_attr($border_width)."'><em>px</em>";
|
1513 |
+
echo "<input type='text' id='sa_border_color' name='sa_border_color' value='".esc_attr($border_color)."'></div>\n";
|
1514 |
+
|
1515 |
+
// SLIDER BORDER RADIUS
|
1516 |
+
$border_radius = get_post_meta($post->ID, 'sa_border_radius', true);
|
1517 |
+
if ($border_radius == '') {
|
1518 |
+
$border_radius = '0';
|
1519 |
+
}
|
1520 |
+
echo "<div class='ca_style_setting_line'><span>Border Radius:</span>";
|
1521 |
+
echo "<input type='text' id='sa_border_radius' name='sa_border_radius' value='".esc_attr($border_radius)."'></div>\n";
|
1522 |
+
|
1523 |
+
echo "<div class='ca_style_hr' style='margin-top:10px;'></div>\n";
|
1524 |
+
|
1525 |
+
$tooltip = "The style settings for all slides (within the slider/carousel)";
|
1526 |
+
echo "<h4>Slide Style:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
|
1527 |
+
|
1528 |
+
// SLIDE - MINIMUM HEIGHT
|
1529 |
+
$slide_min_height = get_post_meta($post->ID, 'sa_slide_min_height_perc', true);
|
1530 |
+
if ($slide_min_height == '') {
|
1531 |
+
$slide_min_height = '50';
|
1532 |
+
}
|
1533 |
+
echo "<div style='padding:5px 0px 10px;'>\n";
|
1534 |
+
$tooltip = "The minimum height of each slide. Can be set to a percentage of the slide width, or for image sliders set to a 4:3 or 16:9 aspect ratio.";
|
1535 |
+
echo "<div class='ca_style_setting_line' id='ca_style_min_height' style='padding-bottom:7px !important;'>";
|
1536 |
+
echo "<span class='sa_tooltip' title='".esc_attr($tooltip)."'>Min Height:</span><br/>";
|
1537 |
+
if ($slide_min_height == 'aspect43') {
|
1538 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
|
1539 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
|
1540 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43' checked/><em>4:3</em>";
|
1541 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1542 |
+
} elseif ($slide_min_height == 'aspect169') {
|
1543 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
|
1544 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
|
1545 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1546 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169' checked/><em>16:9</em>";
|
1547 |
+
} elseif (strpos($slide_min_height, 'px') !== false) {
|
1548 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
|
1549 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px' checked/><em>px</em>";
|
1550 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1551 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1552 |
+
} else {
|
1553 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;' checked/><em>%</em>";
|
1554 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
|
1555 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1556 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1557 |
+
}
|
1558 |
+
echo "</div>\n";
|
1559 |
+
if (($slide_min_height == 'aspect43') || ($slide_min_height == 'aspect169')) {
|
1560 |
+
echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper' style='display:none;'>";
|
1561 |
+
echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($slide_min_height)."'/>";
|
1562 |
+
echo "<em id='mh_suffix'>".$mh_suffix."</em></div>\n";
|
1563 |
+
echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='0'/>\n";
|
1564 |
+
} else {
|
1565 |
+
if (strpos($slide_min_height, 'px') !== false) {
|
1566 |
+
$mh_value = str_replace('px', '', $slide_min_height);
|
1567 |
+
$mh_suffix = 'px';
|
1568 |
+
} else {
|
1569 |
+
$mh_value = $slide_min_height;
|
1570 |
+
$mh_suffix = '%';
|
1571 |
+
}
|
1572 |
+
echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper'><span style='width:20px;'> </span>";
|
1573 |
+
echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($mh_value)."'/>";
|
1574 |
+
echo "<em id='mh_suffix'>".$mh_suffix."</em></div>\n";
|
1575 |
+
echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='".esc_attr($mh_value)."'/>\n";
|
1576 |
+
}
|
1577 |
+
echo "</div>\n";
|
1578 |
+
|
1579 |
+
// SLIDE - PADDING TOP/BOTTOM
|
1580 |
+
$slide_padding_tb = get_post_meta($post->ID, 'sa_slide_padding_tb', true);
|
1581 |
+
if ($slide_padding_tb == '') {
|
1582 |
+
$slide_padding_tb = '5';
|
1583 |
+
}
|
1584 |
+
$tooltip = "Padding space top/bottom for each individual slide";
|
1585 |
+
echo "<div class='ca_style_setting_line' id='ca_style_padding_top_bottom'><span class='sa_tooltip' title='".esc_attr($tooltip)."'>Padding:</span>";
|
1586 |
+
echo "<input type='text' id='sa_slide_padding_tb' name='sa_slide_padding_tb' value='".esc_attr($slide_padding_tb)."'><em>%</em></div>\n";
|
1587 |
+
|
1588 |
+
// SLIDE - PADDING LEFT/RIGHT
|
1589 |
+
$slide_padding_lr = get_post_meta($post->ID, 'sa_slide_padding_lr', true);
|
1590 |
+
if ($slide_padding_lr == '') {
|
1591 |
+
$slide_padding_lr = '5';
|
1592 |
+
}
|
1593 |
+
$tooltip = "Padding space left/right for each individual slide";
|
1594 |
+
echo "<div class='ca_style_setting_line' id='ca_style_padding_left_right'><span class='sa_tooltip' title='".esc_attr($tooltip)."'>Padding:</span>";
|
1595 |
+
echo "<input type='text' id='sa_slide_padding_lr' name='sa_slide_padding_lr' value='".esc_attr($slide_padding_lr)."'><em>%</em></div>\n";
|
1596 |
+
|
1597 |
+
// SLIDE - MARGIN LEFT/RIGHT
|
1598 |
+
$slide_margin_lr = get_post_meta($post->ID, 'sa_slide_margin_lr', true);
|
1599 |
+
if ($slide_margin_lr == '') {
|
1600 |
+
$slide_margin_lr = '0';
|
1601 |
+
}
|
1602 |
+
$tooltip = "Margin space left and right of each slide";
|
1603 |
+
echo "<div class='ca_style_setting_line' id='ca_style_margin_left_right'><span class='sa_tooltip' title='".esc_attr($tooltip)."'>Margin:</span>";
|
1604 |
+
echo "<input type='text' id='sa_slide_margin_lr' name='sa_slide_margin_lr' value='".esc_attr($slide_margin_lr)."'><em>%</em></div>\n";
|
1605 |
+
|
1606 |
+
$tooltip = "The link/popup buttons that appear on a slide";
|
1607 |
+
echo "<h4>Link/Popup Icons:<em class='sa_tooltip' title='".esc_attr($tooltip)."'></em></h4>";
|
1608 |
+
|
1609 |
+
// LINK/POPUP ICONS - ICON LOCATION
|
1610 |
+
$slide_icons_location = get_post_meta($post->ID, 'sa_slide_icons_location', true);
|
1611 |
+
if ($slide_icons_location == '') {
|
1612 |
+
$slide_icons_location = 'Center Center';
|
1613 |
+
}
|
1614 |
+
echo "<div class='ca_style_setting_line'><span>Icon Location</span>";
|
1615 |
+
echo "<select id='sa_slide_icons_location' name='sa_slide_icons_location'>";
|
1616 |
+
$option_arr = array();
|
1617 |
+
$option_arr[0] = 'Center Center';
|
1618 |
+
$option_arr[1] = 'Top Left';
|
1619 |
+
$option_arr[2] = 'Top Center';
|
1620 |
+
$option_arr[3] = 'Top Right';
|
1621 |
+
$option_arr[4] = 'Bottom Left';
|
1622 |
+
$option_arr[5] = 'Bottom Center';
|
1623 |
+
$option_arr[6] = 'Bottom Right';
|
1624 |
+
for ($i = 0; $i < count($option_arr); $i++) {
|
1625 |
+
if ($option_arr[$i] == $slide_icons_location) {
|
1626 |
+
echo "<option value='".$option_arr[$i]."' selected>".$option_arr[$i]."</option>";
|
1627 |
+
} else {
|
1628 |
+
echo "<option value='".$option_arr[$i]."'>".$option_arr[$i]."</option>";
|
1629 |
+
}
|
1630 |
+
}
|
1631 |
+
echo "</select></div>\n";
|
1632 |
+
|
1633 |
+
// LINK/POPUP ICONS - ALWAYS VISIBLE
|
1634 |
+
$slide_icons_visible = get_post_meta($post->ID, 'sa_slide_icons_visible', true);
|
1635 |
+
if ($slide_icons_visible != '1') {
|
1636 |
+
$slide_icons_visible = '0';
|
1637 |
+
}
|
1638 |
+
echo "<div class='ca_style_setting_line'><span>Always Visible</span>";
|
1639 |
+
if ($slide_icons_visible == '1') {
|
1640 |
+
echo "<input type='checkbox' id='sa_slide_icons_visible' name='sa_slide_icons_visible' value='1' checked/>";
|
1641 |
+
} else {
|
1642 |
+
echo "<input type='checkbox' id='sa_slide_icons_visible' name='sa_slide_icons_visible' value='1'/>";
|
1643 |
+
}
|
1644 |
+
echo "</div>\n";
|
1645 |
+
|
1646 |
+
// LINK/POPUP ICONS - COLOR SCHEME
|
1647 |
+
$slide_icons_color = get_post_meta($post->ID, 'sa_slide_icons_color', true);
|
1648 |
+
if ($slide_icons_color == '') {
|
1649 |
+
$slide_icons_location = 'white';
|
1650 |
+
}
|
1651 |
+
echo "<div class='ca_style_setting_line'><span>Color Scheme</span>";
|
1652 |
+
echo "<select id='sa_slide_icons_color' name='sa_slide_icons_color'>";
|
1653 |
+
if ($slide_icons_color == 'black') {
|
1654 |
+
echo "<option value='white'>White</option>";
|
1655 |
+
echo "<option value='black' selected>Black</option>";
|
1656 |
+
} else {
|
1657 |
+
echo "<option value='white selected'>White</option>";
|
1658 |
+
echo "<option value='black'>Black</option>";
|
1659 |
+
}
|
1660 |
+
echo "</select></div>\n";
|
1661 |
+
|
1662 |
+
echo "<h4 style='margin-top:10px !important;'>Other Settings:</h4>";
|
1663 |
+
|
1664 |
+
// USE 'window.onload' EVENT (checkbox)
|
1665 |
+
$window_onload = get_post_meta($post->ID, 'sa_window_onload', true);
|
1666 |
+
if ($window_onload == '') {
|
1667 |
+
$window_onload = '0';
|
1668 |
+
}
|
1669 |
+
$tooltip = 'Use window.onload event (not document.ready). Use this option if your slider is ';
|
1670 |
+
$tooltip .= 'not being sized correctly within your page container (sometimes occurs with Visual Composer full-width sections).';
|
1671 |
+
echo "<div id='sa_window_onload_line'>";
|
1672 |
+
echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Use 'window.onload' event:</span>";
|
1673 |
+
if ($window_onload == '1') {
|
1674 |
+
echo "<input type='checkbox' id='sa_window_onload' name='sa_window_onload' value='1' checked/>";
|
1675 |
+
} else {
|
1676 |
+
echo "<input type='checkbox' id='sa_window_onload' name='sa_window_onload' value='1'/>";
|
1677 |
+
}
|
1678 |
+
echo "</div>\n";
|
1679 |
+
|
1680 |
+
// Strip JavaScript from Content
|
1681 |
+
$strip_javascript = get_post_meta($post->ID, 'sa_strip_javascript', true);
|
1682 |
+
if ($strip_javascript == '') {
|
1683 |
+
$strip_javascript = '0';
|
1684 |
+
}
|
1685 |
+
$tooltip = 'Remove JavaScript (<script> tags) from slide content for extra security.';
|
1686 |
+
echo "<div id='sa_window_onload_line'>";
|
1687 |
+
echo "<span class='sa_tooltip' title='".$tooltip."'></span><span style='min-width:160px;'>Remove JavaScript Content:</span>";
|
1688 |
+
if ($strip_javascript == '1') {
|
1689 |
+
echo "<input type='checkbox' id='sa_strip_javascript' name='sa_strip_javascript' value='1' checked/>";
|
1690 |
+
} else {
|
1691 |
+
echo "<input type='checkbox' id='sa_strip_javascript' name='sa_strip_javascript' value='1'/>";
|
1692 |
+
}
|
1693 |
+
echo "</div>\n";
|
1694 |
+
|
1695 |
+
echo "</div>\n";
|
1696 |
+
}
|
1697 |
+
|
1698 |
+
|
1699 |
+
|
1700 |
+
// ##### ACTION HOOK - SAVE CUSTOM POST TYPE ('Slide Anything') DATA #####
|
1701 |
+
function cpt_slider_save_postdata() {
|
1702 |
+
global $post;
|
1703 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
1704 |
+
|
1705 |
+
// ### VERIFY 1) LOGGED-IN USER IS ADMINISTRATOR AND 2) VALID NONCE TO PREVENT CSRF HACKER ATTACKS ###
|
1706 |
+
if (current_user_can('edit_pages') &&
|
1707 |
+
isset($_POST['nonce_save_slider']) && wp_verify_nonce($_POST['nonce_save_slider'], basename(__FILE__))) {
|
1708 |
+
$total_slides = intval($_POST['sa_num_slides']);
|
1709 |
+
if (($_POST['sa_duplicate_slide'] == '') || ($_POST['sa_duplicate_slide'] == '0')) {
|
1710 |
+
$duplicate_slide = 0;
|
1711 |
+
} else {
|
1712 |
+
// A SLIDE NEEDS TO BE DUPLICATED
|
1713 |
+
$duplicate_slide = intval($_POST['sa_duplicate_slide']);
|
1714 |
+
}
|
1715 |
+
if (($_POST['sa_move_slide_up'] == '') || ($_POST['sa_move_slide_up'] == '0')) {
|
1716 |
+
$move_slide_up = 0;
|
1717 |
+
} else {
|
1718 |
+
// A SLIDE NEEDS TO BE MOVED
|
1719 |
+
$move_slide_up = intval($_POST['sa_move_slide_up']);
|
1720 |
+
}
|
1721 |
+
|
1722 |
+
// UPDATE CONTENT FOR EACH SLIDE
|
1723 |
+
$slides_saved = 0;
|
1724 |
+
for ($i = 1; $i <= $total_slides; $i++) {
|
1725 |
+
$slide_edit_id = "sa_slide".$i."_content";
|
1726 |
+
$slide_image_id = "sa_slide".$i."_image_id";
|
1727 |
+
$slide_image_pos = "sa_slide".$i."_image_pos";
|
1728 |
+
$slide_image_size = "sa_slide".$i."_image_size";
|
1729 |
+
$slide_image_repeat = "sa_slide".$i."_image_repeat";
|
1730 |
+
$slide_image_color = "sa_slide".$i."_image_color";
|
1731 |
+
$slide_link_url = "sa_slide".$i."_link_url";
|
1732 |
+
$slide_link_target = "sa_slide".$i."_link_target";
|
1733 |
+
if ($sa_pro_version) {
|
1734 |
+
$slide_popup_type = "sa_slide".$i."_popup_type";
|
1735 |
+
$slide_popup_imageid = "sa_slide".$i."_popup_imageid";
|
1736 |
+
$slide_popup_imagetitle = "sa_slide".$i."_popup_imagetitle";
|
1737 |
+
$slide_popup_video_id = "sa_slide".$i."_popup_video_id";
|
1738 |
+
$slide_popup_video_type = "sa_slide".$i."_popup_video_type";
|
1739 |
+
$slide_popup_background = "sa_slide".$i."_popup_background";
|
1740 |
+
$slide_popup_html = "sa_slide".$i."_popup_html";
|
1741 |
+
$slide_popup_shortcode = "sa_slide".$i."_popup_shortcode";
|
1742 |
+
$slide_popup_bgcol = "sa_slide".$i."_popup_bgcol";
|
1743 |
+
$slide_popup_width = "sa_slide".$i."_popup_width";
|
1744 |
+
}
|
1745 |
+
//$slide_content = wp_kses_post($_POST[$slide_edit_id]); // SANATIZE
|
1746 |
+
$slide_content = balanceTags($_POST[$slide_edit_id], true); // FIX MISSING CLOSING TAGS
|
1747 |
+
$slide_image_id_val = abs(intval($_POST[$slide_image_id])); // SANATIZE
|
1748 |
+
$slide_image_pos_val = sanitize_text_field($_POST[$slide_image_pos]); // SANATIZE
|
1749 |
+
$slide_image_size_val = sanitize_text_field($_POST[$slide_image_size]); // SANATIZE
|
1750 |
+
$slide_image_repeat_val = sanitize_text_field($_POST[$slide_image_repeat]); // SANATIZE
|
1751 |
+
$slide_image_color_val = sanitize_text_field($_POST[$slide_image_color]); // SANATIZE
|
1752 |
+
$slide_link_url_val = sanitize_text_field($_POST[$slide_link_url]); // SANATIZE
|
1753 |
+
$slide_link_target_val = sanitize_text_field($_POST[$slide_link_target]); // SANATIZE
|
1754 |
+
if ($sa_pro_version) {
|
1755 |
+
$slide_popup_type_val = sanitize_text_field($_POST[$slide_popup_type]); // SANATIZE
|
1756 |
+
$slide_popup_imageid_val = sanitize_text_field($_POST[$slide_popup_imageid]); // SANATIZE
|
1757 |
+
$slide_popup_imagetitle_val = sanitize_text_field($_POST[$slide_popup_imagetitle]); // SANATIZE
|
1758 |
+
$slide_popup_video_id_val = sanitize_text_field($_POST[$slide_popup_video_id]); // SANATIZE
|
1759 |
+
$slide_popup_video_type_val = sanitize_text_field($_POST[$slide_popup_video_type]); // SANATIZE
|
1760 |
+
$slide_popup_background_val = sanitize_text_field($_POST[$slide_popup_background]); // SANATIZE
|
1761 |
+
$slide_popup_html_val = balanceTags($_POST[$slide_popup_html], true); // FIX MISSING CLOSING TAGS
|
1762 |
+
$slide_popup_shortcode_val = sanitize_text_field($_POST[$slide_popup_shortcode]); // SANATIZE
|
1763 |
+
$slide_popup_bgcol_val = sanitize_text_field($_POST[$slide_popup_bgcol]); // SANATIZE
|
1764 |
+
$slide_popup_width_val = abs(intval($_POST[$slide_popup_width])); // SANATIZE
|
1765 |
+
}
|
1766 |
+
// check delete status for slide
|
1767 |
+
$del_status_id = "sa_slide".$i."_delete";
|
1768 |
+
if (isset($_POST[$del_status_id]) && ($_POST[$del_status_id] != '')) {
|
1769 |
+
$del_status = $_POST[$del_status_id];
|
1770 |
+
} else {
|
1771 |
+
// a new slide has been added
|
1772 |
+
$del_status = '1';
|
1773 |
+
$slide_content = '';
|
1774 |
+
}
|
1775 |
+
if ($del_status == '1') {
|
1776 |
+
// save slide content only if slide has not been marked for deletion
|
1777 |
+
$slides_saved++;
|
1778 |
+
$slide_edit_id_save = "sa_slide".$slides_saved."_content";
|
1779 |
+
$slide_image_id_saved = "sa_slide".$slides_saved."_image_id";
|
1780 |
+
$slide_image_pos_saved = "sa_slide".$slides_saved."_image_pos";
|
1781 |
+
$slide_image_size_saved = "sa_slide".$slides_saved."_image_size";
|
1782 |
+
$slide_image_repeat_saved = "sa_slide".$slides_saved."_image_repeat";
|
1783 |
+
$slide_image_color_saved = "sa_slide".$slides_saved."_image_color";
|
1784 |
+
$slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
|
1785 |
+
$slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
|
1786 |
+
if ($sa_pro_version) {
|
1787 |
+
$slide_popup_type_saved = "sa_slide".$slides_saved."_popup_type";
|
1788 |
+
$slide_popup_imageid_saved = "sa_slide".$slides_saved."_popup_imageid";
|
1789 |
+
$slide_popup_imagetitle_saved = "sa_slide".$slides_saved."_popup_imagetitle";
|
1790 |
+
$slide_popup_video_id_saved = "sa_slide".$slides_saved."_popup_video_id";
|
1791 |
+
$slide_popup_video_type_saved = "sa_slide".$slides_saved."_popup_video_type";
|
1792 |
+
$slide_popup_background_saved = "sa_slide".$slides_saved."_popup_background";
|
1793 |
+
$slide_popup_html_saved = "sa_slide".$slides_saved."_popup_html";
|
1794 |
+
$slide_popup_shortcode_saved = "sa_slide".$slides_saved."_popup_shortcode";
|
1795 |
+
$slide_popup_bgcol_saved = "sa_slide".$slides_saved."_popup_bgcol";
|
1796 |
+
$slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
|
1797 |
+
}
|
1798 |
+
update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
|
1799 |
+
update_post_meta($post->ID, $slide_image_id_saved, $slide_image_id_val);
|
1800 |
+
update_post_meta($post->ID, $slide_image_pos_saved, $slide_image_pos_val);
|
1801 |
+
update_post_meta($post->ID, $slide_image_size_saved, $slide_image_size_val);
|
1802 |
+
update_post_meta($post->ID, $slide_image_repeat_saved, $slide_image_repeat_val);
|
1803 |
+
update_post_meta($post->ID, $slide_image_color_saved, $slide_image_color_val);
|
1804 |
+
update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
|
1805 |
+
update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
|
1806 |
+
if ($sa_pro_version) {
|
1807 |
+
update_post_meta($post->ID, $slide_popup_type_saved, $slide_popup_type_val);
|
1808 |
+
update_post_meta($post->ID, $slide_popup_imageid_saved, $slide_popup_imageid_val);
|
1809 |
+
update_post_meta($post->ID, $slide_popup_imagetitle_saved, $slide_popup_imagetitle_val);
|
1810 |
+
update_post_meta($post->ID, $slide_popup_video_id_saved, $slide_popup_video_id_val);
|
1811 |
+
update_post_meta($post->ID, $slide_popup_video_type_saved, $slide_popup_video_type_val);
|
1812 |
+
update_post_meta($post->ID, $slide_popup_background_saved, $slide_popup_background_val);
|
1813 |
+
update_post_meta($post->ID, $slide_popup_html_saved, $slide_popup_html_val);
|
1814 |
+
update_post_meta($post->ID, $slide_popup_shortcode_saved, $slide_popup_shortcode_val);
|
1815 |
+
update_post_meta($post->ID, $slide_popup_bgcol_saved, $slide_popup_bgcol_val);
|
1816 |
+
update_post_meta($post->ID, $slide_popup_width_saved, $slide_popup_width_val);
|
1817 |
+
}
|
1818 |
+
if ($i == $duplicate_slide) {
|
1819 |
+
// the 'duplicate slide' button has been click for this slide - create a new slide that is an exact copy of previous slide
|
1820 |
+
// (REPEAT THE CODE ABOVE HERE!!!)
|
1821 |
+
$slides_saved++;
|
1822 |
+
$slide_edit_id_save = "sa_slide".$slides_saved."_content";
|
1823 |
+
$slide_image_id_saved = "sa_slide".$slides_saved."_image_id";
|
1824 |
+
$slide_image_pos_saved = "sa_slide".$slides_saved."_image_pos";
|
1825 |
+
$slide_image_size_saved = "sa_slide".$slides_saved."_image_size";
|
1826 |
+
$slide_image_repeat_saved = "sa_slide".$slides_saved."_image_repeat";
|
1827 |
+
$slide_image_color_saved = "sa_slide".$slides_saved."_image_color";
|
1828 |
+
$slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
|
1829 |
+
$slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
|
1830 |
+
if ($sa_pro_version) {
|
1831 |
+
$slide_popup_type_saved = "sa_slide".$slides_saved."_popup_type";
|
1832 |
+
$slide_popup_imageid_saved = "sa_slide".$slides_saved."_popup_imageid";
|
1833 |
+
$slide_popup_imagetitle_saved = "sa_slide".$slides_saved."_popup_imagetitle";
|
1834 |
+
$slide_popup_video_id_saved = "sa_slide".$slides_saved."_popup_video_id";
|
1835 |
+
$slide_popup_video_type_saved = "sa_slide".$slides_saved."_popup_video_type";
|
1836 |
+
$slide_popup_background_saved = "sa_slide".$slides_saved."_popup_background";
|
1837 |
+
$slide_popup_html_saved = "sa_slide".$slides_saved."_popup_html";
|
1838 |
+
$slide_popup_shortcode_saved = "sa_slide".$slides_saved."_popup_shortcode";
|
1839 |
+
$slide_popup_bgcol_saved = "sa_slide".$slides_saved."_popup_bgcol";
|
1840 |
+
$slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
|
1841 |
+
}
|
1842 |
+
update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
|
1843 |
+
update_post_meta($post->ID, $slide_image_id_saved, $slide_image_id_val);
|
1844 |
+
update_post_meta($post->ID, $slide_image_pos_saved, $slide_image_pos_val);
|
1845 |
+
update_post_meta($post->ID, $slide_image_size_saved, $slide_image_size_val);
|
1846 |
+
update_post_meta($post->ID, $slide_image_repeat_saved, $slide_image_repeat_val);
|
1847 |
+
update_post_meta($post->ID, $slide_image_color_saved, $slide_image_color_val);
|
1848 |
+
update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
|
1849 |
+
update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
|
1850 |
+
if ($sa_pro_version) {
|
1851 |
+
update_post_meta($post->ID, $slide_popup_type_saved, $slide_popup_type_val);
|
1852 |
+
update_post_meta($post->ID, $slide_popup_imageid_saved, $slide_popup_imageid_val);
|
1853 |
+
update_post_meta($post->ID, $slide_popup_imagetitle_saved, $slide_popup_imagetitle_val);
|
1854 |
+
update_post_meta($post->ID, $slide_popup_video_id_saved, $slide_popup_video_id_val);
|
1855 |
+
update_post_meta($post->ID, $slide_popup_video_type_saved, $slide_popup_video_type_val);
|
1856 |
+
update_post_meta($post->ID, $slide_popup_background_saved, $slide_popup_background_val);
|
1857 |
+
update_post_meta($post->ID, $slide_popup_html_saved, $slide_popup_html_val);
|
1858 |
+
update_post_meta($post->ID, $slide_popup_shortcode_saved, $slide_popup_shortcode_val);
|
1859 |
+
update_post_meta($post->ID, $slide_popup_bgcol_saved, $slide_popup_bgcol_val);
|
1860 |
+
update_post_meta($post->ID, $slide_popup_width_saved, $slide_popup_width_val);
|
1861 |
+
}
|
1862 |
+
}
|
1863 |
+
}
|
1864 |
+
}
|
1865 |
+
|
1866 |
+
if ($move_slide_up != 0) {
|
1867 |
+
// A SLIDE NEEDS TO BE MOVED (TWO SLIDES ARE SWAPPED)
|
1868 |
+
$slide2 = $move_slide_up;
|
1869 |
+
$slide1 = intval($move_slide_up) - 1;
|
1870 |
+
//$slide1_content = wp_kses_post($_POST["sa_slide".$slide1."_content"]); // SANATIZE
|
1871 |
+
$slide1_content = balanceTags($_POST["sa_slide".$slide1."_content"], true); // FIX MISSING CLOSING TAGS
|
1872 |
+
$slide1_image_id = abs(intval($_POST["sa_slide".$slide1."_image_id"])); // SANATIZE
|
1873 |
+
$slide1_image_pos = sanitize_text_field($_POST["sa_slide".$slide1."_image_pos"]); // SANATIZE
|
1874 |
+
$slide1_image_size = sanitize_text_field($_POST["sa_slide".$slide1."_image_size"]); // SANATIZE
|
1875 |
+
$slide1_image_repeat = sanitize_text_field($_POST["sa_slide".$slide1."_image_repeat"]); // SANATIZE
|
1876 |
+
$slide1_image_color = sanitize_text_field($_POST["sa_slide".$slide1."_image_color"]); // SANATIZE
|
1877 |
+
$slide1_link_url = sanitize_text_field($_POST["sa_slide".$slide1."_link_url"]); // SANATIZE
|
1878 |
+
$slide1_link_target = sanitize_text_field($_POST["sa_slide".$slide1."_link_target"]); // SANATIZE
|
1879 |
+
if ($sa_pro_version) {
|
1880 |
+
$slide1_popup_type = sanitize_text_field($_POST["sa_slide".$slide1."_popup_type"]); // SANATIZE
|
1881 |
+
$slide1_popup_imageid = sanitize_text_field($_POST["sa_slide".$slide1."_popup_imageid"]); // SANATIZE
|
1882 |
+
$slide1_popup_imagetitle = sanitize_text_field($_POST["sa_slide".$slide1."_popup_imagetitle"]); // SANATIZE
|
1883 |
+
$slide1_popup_video_id = sanitize_text_field($_POST["sa_slide".$slide1."_popup_video_id"]); // SANATIZE
|
1884 |
+
$slide1_popup_video_type = sanitize_text_field($_POST["sa_slide".$slide1."_popup_video_type"]); // SANATIZE
|
1885 |
+
$slide1_popup_background = sanitize_text_field($_POST["sa_slide".$slide1."_popup_background"]); // SANATIZE
|
1886 |
+
$slide1_popup_html = balanceTags($_POST["sa_slide".$slide1."_popup_html"], true); // FIX MISSING CLOSING TAGS
|
1887 |
+
$slide1_popup_shortcode = sanitize_text_field($_POST["sa_slide".$slide1."_popup_shortcode"]); // SANATIZE
|
1888 |
+
$slide1_popup_bgcol = sanitize_text_field($_POST["sa_slide".$slide1."_popup_bgcol"]); // SANATIZE
|
1889 |
+
$slide1_popup_width = abs(intval($_POST["sa_slide".$slide1."_popup_width"])); // SANATIZE
|
1890 |
+
}
|
1891 |
+
//$slide2_content = wp_kses_post($_POST["sa_slide".$slide2."_content"]); // SANATIZE
|
1892 |
+
$slide2_content = balanceTags($_POST["sa_slide".$slide2."_content"], true); // FIX MISSING CLOSING TAGS
|
1893 |
+
$slide2_image_id = abs(intval($_POST["sa_slide".$slide2."_image_id"])); // SANATIZE
|
1894 |
+
$slide2_image_pos = sanitize_text_field($_POST["sa_slide".$slide2."_image_pos"]); // SANATIZE
|
1895 |
+
$slide2_image_size = sanitize_text_field($_POST["sa_slide".$slide2."_image_size"]); // SANATIZE
|
1896 |
+
$slide2_image_repeat = sanitize_text_field($_POST["sa_slide".$slide2."_image_repeat"]); // SANATIZE
|
1897 |
+
$slide2_image_color = sanitize_text_field($_POST["sa_slide".$slide2."_image_color"]); // SANATIZE
|
1898 |
+
$slide2_link_url = sanitize_text_field($_POST["sa_slide".$slide2."_link_url"]); // SANATIZE
|
1899 |
+
$slide2_link_target = sanitize_text_field($_POST["sa_slide".$slide2."_link_target"]); // SANATIZE
|
1900 |
+
if ($sa_pro_version) {
|
1901 |
+
$slide2_popup_type = sanitize_text_field($_POST["sa_slide".$slide2."_popup_type"]); // SANATIZE
|
1902 |
+
$slide2_popup_imageid = sanitize_text_field($_POST["sa_slide".$slide2."_popup_imageid"]); // SANATIZE
|
1903 |
+
$slide2_popup_imagetitle = sanitize_text_field($_POST["sa_slide".$slide2."_popup_imagetitle"]); // SANATIZE
|
1904 |
+
$slide2_popup_video_id = sanitize_text_field($_POST["sa_slide".$slide2."_popup_video_id"]); // SANATIZE
|
1905 |
+
$slide2_popup_video_type = sanitize_text_field($_POST["sa_slide".$slide2."_popup_video_type"]); // SANATIZE
|
1906 |
+
$slide2_popup_background = sanitize_text_field($_POST["sa_slide".$slide2."_popup_background"]); // SANATIZE
|
1907 |
+
$slide2_popup_html = balanceTags($_POST["sa_slide".$slide2."_popup_html"], true); // FIX MISSING CLOSING TAGS
|
1908 |
+
$slide2_popup_shortcode = sanitize_text_field($_POST["sa_slide".$slide2."_popup_shortcode"]); // SANATIZE
|
1909 |
+
$slide2_popup_bgcol = sanitize_text_field($_POST["sa_slide".$slide2."_popup_bgcol"]); // SANATIZE
|
1910 |
+
$slide2_popup_width = abs(intval($_POST["sa_slide".$slide2."_popup_width"])); // SANATIZE
|
1911 |
+
}
|
1912 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_content", $slide1_content);
|
1913 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_image_id", $slide1_image_id);
|
1914 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_image_pos", $slide1_image_pos);
|
1915 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_image_size", $slide1_image_size);
|
1916 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_image_repeat", $slide1_image_repeat);
|
1917 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_image_color", $slide1_image_color);
|
1918 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_link_url", $slide1_link_url);
|
1919 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_link_target", $slide1_link_target);
|
1920 |
+
if ($sa_pro_version) {
|
1921 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_type", $slide1_popup_type);
|
1922 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_imageid", $slide1_popup_imageid);
|
1923 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_imagetitle", $slide1_popup_imagetitle);
|
1924 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_video_id", $slide1_popup_video_id);
|
1925 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_video_type", $slide1_popup_video_type);
|
1926 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_background", $slide1_popup_background);
|
1927 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_html", $slide1_popup_html);
|
1928 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_shortcode", $slide1_popup_shortcode);
|
1929 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_bgcol", $slide1_popup_bgcol);
|
1930 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_popup_width", $slide1_popup_width);
|
1931 |
+
}
|
1932 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_content", $slide2_content);
|
1933 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_image_id", $slide2_image_id);
|
1934 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_image_pos", $slide2_image_pos);
|
1935 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_image_size", $slide2_image_size);
|
1936 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_image_repeat", $slide2_image_repeat);
|
1937 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_image_color", $slide2_image_color);
|
1938 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_link_url", $slide2_link_url);
|
1939 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_link_target", $slide2_link_target);
|
1940 |
+
if ($sa_pro_version) {
|
1941 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_type", $slide2_popup_type);
|
1942 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_imageid", $slide2_popup_imageid);
|
1943 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_imagetitle", $slide2_popup_imagetitle);
|
1944 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_video_id", $slide2_popup_video_id);
|
1945 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_video_type", $slide2_popup_video_type);
|
1946 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_background", $slide2_popup_background);
|
1947 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_html", $slide2_popup_html);
|
1948 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_shortcode", $slide2_popup_shortcode);
|
1949 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_bgcol", $slide2_popup_bgcol);
|
1950 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_popup_width", $slide2_popup_width);
|
1951 |
+
}
|
1952 |
+
}
|
1953 |
+
|
1954 |
+
// UPDATE SLIDE CONTENT CHARACTER COUNT
|
1955 |
+
$total_slides = get_post_meta($post->ID, 'sa_num_slides', true);
|
1956 |
+
for ($i = 1; $i <= $total_slides; $i++) {
|
1957 |
+
$slide_content = get_post_meta($post->ID, "sa_slide".$i."_content", true);
|
1958 |
+
$char_count = strlen($slide_content);
|
1959 |
+
update_post_meta($post->ID, "sa_slide".$i."_char_count", $char_count);
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
// UPDATE SLIDER SETTINGS
|
1963 |
+
update_post_meta($post->ID, 'sa_num_slides', abs(intval($slides_saved))); // SANATIZE
|
1964 |
+
if (isset($_POST['sa_disable_visual_editor']) && ($_POST['sa_disable_visual_editor'] == '1')) {
|
1965 |
+
update_post_meta($post->ID, 'sa_disable_visual_editor', '1');
|
1966 |
+
} else {
|
1967 |
+
update_post_meta($post->ID, 'sa_disable_visual_editor', '0');
|
1968 |
+
}
|
1969 |
+
update_post_meta($post->ID, 'sa_info_added', abs(intval($_POST['sa_info_added']))); // SANATIZE
|
1970 |
+
update_post_meta($post->ID, 'sa_info_deleted', abs(intval($_POST['sa_info_deleted']))); // SANATIZE
|
1971 |
+
update_post_meta($post->ID, 'sa_duplicate_slide', abs(intval($_POST['sa_duplicate_slide']))); // SANATIZE
|
1972 |
+
update_post_meta($post->ID, 'sa_info_duplicated', abs(intval($_POST['sa_info_duplicated']))); // SANATIZE
|
1973 |
+
update_post_meta($post->ID, 'sa_move_slide_up', abs(intval($_POST['sa_move_slide_up']))); // SANATIZE
|
1974 |
+
update_post_meta($post->ID, 'sa_info_moved', abs(intval($_POST['sa_info_moved']))); // SANATIZE
|
1975 |
+
update_post_meta($post->ID, 'sa_slide_duration', abs(floatval($_POST['sa_slide_duration']))); // SANATIZE
|
1976 |
+
update_post_meta($post->ID, 'sa_slide_transition', abs(floatval($_POST['sa_slide_transition']))); // SANATIZE
|
1977 |
+
update_post_meta($post->ID, 'sa_slide_by', abs(floatval($_POST['sa_slide_by']))); // SANATIZE
|
1978 |
+
if (isset($_POST['sa_loop_slider']) && ($_POST['sa_loop_slider'] == '1')) {
|
1979 |
+
update_post_meta($post->ID, 'sa_loop_slider', '1');
|
1980 |
+
} else {
|
1981 |
+
update_post_meta($post->ID, 'sa_loop_slider', '0');
|
1982 |
+
}
|
1983 |
+
if (isset($_POST['sa_stop_hover']) && ($_POST['sa_stop_hover'] == '1')) {
|
1984 |
+
update_post_meta($post->ID, 'sa_stop_hover', '1');
|
1985 |
+
} else {
|
1986 |
+
update_post_meta($post->ID, 'sa_stop_hover', '0');
|
1987 |
+
}
|
1988 |
+
if (isset($_POST['sa_nav_arrows']) && ($_POST['sa_nav_arrows'] == '1')) {
|
1989 |
+
update_post_meta($post->ID, 'sa_nav_arrows', '1');
|
1990 |
+
} else {
|
1991 |
+
update_post_meta($post->ID, 'sa_nav_arrows', '0');
|
1992 |
+
}
|
1993 |
+
if (isset($_POST['sa_pagination']) && ($_POST['sa_pagination'] == '1')) {
|
1994 |
+
update_post_meta($post->ID, 'sa_pagination', '1');
|
1995 |
+
} else {
|
1996 |
+
update_post_meta($post->ID, 'sa_pagination', '0');
|
1997 |
+
}
|
1998 |
+
if (isset($_POST['sa_random_order']) && ($_POST['sa_random_order'] == '1')) {
|
1999 |
+
update_post_meta($post->ID, 'sa_random_order', '1');
|
2000 |
+
} else {
|
2001 |
+
update_post_meta($post->ID, 'sa_random_order', '0');
|
2002 |
+
}
|
2003 |
+
if (isset($_POST['sa_reverse_order']) && ($_POST['sa_reverse_order'] == '1')) {
|
2004 |
+
update_post_meta($post->ID, 'sa_reverse_order', '1');
|
2005 |
+
} else {
|
2006 |
+
update_post_meta($post->ID, 'sa_reverse_order', '0');
|
2007 |
+
}
|
2008 |
+
if (isset($_POST['sa_shortcodes']) && ($_POST['sa_shortcodes'] == '1')) {
|
2009 |
+
update_post_meta($post->ID, 'sa_shortcodes', '1');
|
2010 |
+
} else {
|
2011 |
+
update_post_meta($post->ID, 'sa_shortcodes', '0');
|
2012 |
+
}
|
2013 |
+
if (isset($_POST['sa_mouse_drag']) && ($_POST['sa_mouse_drag'] == '1')) {
|
2014 |
+
update_post_meta($post->ID, 'sa_mouse_drag', '1');
|
2015 |
+
} else {
|
2016 |
+
update_post_meta($post->ID, 'sa_mouse_drag', '0');
|
2017 |
+
}
|
2018 |
+
if (isset($_POST['sa_touch_drag']) && ($_POST['sa_touch_drag'] == '1')) {
|
2019 |
+
update_post_meta($post->ID, 'sa_touch_drag', '1');
|
2020 |
+
} else {
|
2021 |
+
update_post_meta($post->ID, 'sa_touch_drag', '0');
|
2022 |
+
}
|
2023 |
+
if (isset($_POST['sa_auto_height']) && ($_POST['sa_auto_height'] == '1')) {
|
2024 |
+
update_post_meta($post->ID, 'sa_auto_height', '1');
|
2025 |
+
} else {
|
2026 |
+
update_post_meta($post->ID, 'sa_auto_height', '0');
|
2027 |
+
}
|
2028 |
+
|
2029 |
+
// UPDATE SLIDER ITEMS DISPLAYED
|
2030 |
+
update_post_meta($post->ID, 'sa_items_width1', abs(intval($_POST['sa_items_width1']))); // SANATIZE
|
2031 |
+
update_post_meta($post->ID, 'sa_items_width2', abs(intval($_POST['sa_items_width2']))); // SANATIZE
|
2032 |
+
update_post_meta($post->ID, 'sa_items_width3', abs(intval($_POST['sa_items_width3']))); // SANATIZE
|
2033 |
+
update_post_meta($post->ID, 'sa_items_width4', abs(intval($_POST['sa_items_width4']))); // SANATIZE
|
2034 |
+
update_post_meta($post->ID, 'sa_items_width5', abs(intval($_POST['sa_items_width5']))); // SANATIZE
|
2035 |
+
update_post_meta($post->ID, 'sa_items_width6', abs(intval($_POST['sa_items_width6']))); // SANATIZE
|
2036 |
+
update_post_meta($post->ID, 'sa_transition', sanitize_text_field($_POST['sa_transition'])); // SANATIZE
|
2037 |
+
|
2038 |
+
// UPDATE SLIDER STYLE
|
2039 |
+
$post_css_id = str_replace("-", "_", $_POST['sa_css_id']);
|
2040 |
+
update_post_meta($post->ID, 'sa_css_id', sanitize_text_field($post_css_id)); // SANATIZE
|
2041 |
+
update_post_meta($post->ID, 'sa_background_color', sanitize_text_field($_POST['sa_background_color'])); // SANATIZE
|
2042 |
+
update_post_meta($post->ID, 'sa_border_width', abs(intval($_POST['sa_border_width']))); // SANATIZE
|
2043 |
+
update_post_meta($post->ID, 'sa_border_color', sanitize_text_field($_POST['sa_border_color'])); // SANATIZE
|
2044 |
+
update_post_meta($post->ID, 'sa_border_radius', abs(intval($_POST['sa_border_radius']))); // SANATIZE
|
2045 |
+
update_post_meta($post->ID, 'sa_wrapper_padd_top', abs(intval($_POST['sa_wrapper_padd_top']))); // SANATIZE
|
2046 |
+
update_post_meta($post->ID, 'sa_wrapper_padd_right', abs(intval($_POST['sa_wrapper_padd_right']))); // SANATIZE
|
2047 |
+
update_post_meta($post->ID, 'sa_wrapper_padd_bottom', abs(intval($_POST['sa_wrapper_padd_bottom']))); // SANATIZE
|
2048 |
+
update_post_meta($post->ID, 'sa_wrapper_padd_left', abs(intval($_POST['sa_wrapper_padd_left']))); // SANATIZE
|
2049 |
+
if ($_POST['sa_slide_min_height_type'] == 'px') {
|
2050 |
+
update_post_meta($post->ID, 'sa_slide_min_height_perc', sanitize_text_field($_POST['sa_slide_min_height']).'px'); // SANATIZE
|
2051 |
+
} else {
|
2052 |
+
update_post_meta($post->ID, 'sa_slide_min_height_perc', sanitize_text_field($_POST['sa_slide_min_height'])); // SANATIZE
|
2053 |
+
}
|
2054 |
+
update_post_meta($post->ID, 'sa_slide_padding_tb', abs(floatval($_POST['sa_slide_padding_tb']))); // SANATIZE
|
2055 |
+
update_post_meta($post->ID, 'sa_slide_padding_lr', abs(floatval($_POST['sa_slide_padding_lr']))); // SANATIZE
|
2056 |
+
update_post_meta($post->ID, 'sa_slide_margin_lr', abs(floatval($_POST['sa_slide_margin_lr']))); // SANATIZE
|
2057 |
+
update_post_meta($post->ID, 'sa_slide_icons_location', sanitize_text_field($_POST['sa_slide_icons_location'])); // SANATIZE
|
2058 |
+
update_post_meta($post->ID, 'sa_slide_icons_color', sanitize_text_field($_POST['sa_slide_icons_color'])); // SANATIZE
|
2059 |
+
if (isset($_POST['sa_autohide_arrows']) && ($_POST['sa_autohide_arrows'] == '1')) {
|
2060 |
+
update_post_meta($post->ID, 'sa_autohide_arrows', '1');
|
2061 |
+
} else {
|
2062 |
+
update_post_meta($post->ID, 'sa_autohide_arrows', '0');
|
2063 |
+
}
|
2064 |
+
if (isset($_POST['sa_slide_icons_visible']) && ($_POST['sa_slide_icons_visible'] == '1')) {
|
2065 |
+
update_post_meta($post->ID, 'sa_slide_icons_visible', '1');
|
2066 |
+
} else {
|
2067 |
+
update_post_meta($post->ID, 'sa_slide_icons_visible', '0');
|
2068 |
+
}
|
2069 |
+
|
2070 |
+
// OTHER SETTINGS
|
2071 |
+
if (isset($_POST['sa_window_onload']) && ($_POST['sa_window_onload'] == '1')) {
|
2072 |
+
update_post_meta($post->ID, 'sa_window_onload', '1');
|
2073 |
+
} else {
|
2074 |
+
update_post_meta($post->ID, 'sa_window_onload', '0');
|
2075 |
+
}
|
2076 |
+
if (isset($_POST['sa_strip_javascript']) && ($_POST['sa_strip_javascript'] == '1')) {
|
2077 |
+
update_post_meta($post->ID, 'sa_strip_javascript', '1');
|
2078 |
+
} else {
|
2079 |
+
update_post_meta($post->ID, 'sa_strip_javascript', '0');
|
2080 |
+
}
|
2081 |
+
}
|
2082 |
+
}
|
2083 |
+
|
2084 |
+
// ##### FUNCTIONS CHECKS WHETHER SLIDE ANYTHING PRO IS REGISTERED - RETURNS TRUE OR FALSE #####
|
2085 |
+
function validate_slide_anything_pro_registration() {
|
2086 |
+
if (!function_exists('validate_slide_anything_pro_license_key')) {
|
2087 |
+
return false;
|
2088 |
+
}
|
2089 |
+
$valid_key = validate_slide_anything_pro_license_key();
|
2090 |
+
return $valid_key;
|
2091 |
+
}
|
2092 |
+
?>
|
trunk/php/slide-anything-frontend.php
ADDED
@@ -0,0 +1,691 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// #####################################################################
|
3 |
+
// ### SLIDE ANYTHING PLUGIN - PHP FUNCTIONS FOR WORDPRESS FRONT-END ###
|
4 |
+
// #####################################################################
|
5 |
+
|
6 |
+
add_shortcode('slide-anything', 'slide_anything_shortcode');
|
7 |
+
|
8 |
+
/* ##### ROOT FUNCTION THAT IS CALLED TO BY THE 'slide-anything' SHORTCODE ##### */
|
9 |
+
function slide_anything_shortcode($atts) {
|
10 |
+
$sa_pro_version = esc_attr(get_option('sap_valid_license'));
|
11 |
+
wp_enqueue_script('jquery');
|
12 |
+
wp_register_script('owl_carousel_js', SA_PLUGIN_PATH.'owl-carousel/owl.carousel.min.js', array('jquery'), '2.2.1', true);
|
13 |
+
wp_enqueue_script('owl_carousel_js');
|
14 |
+
wp_register_style('owl_carousel_css', SA_PLUGIN_PATH.'owl-carousel/owl.carousel.css', array(), '2.2.1.1', 'all');
|
15 |
+
wp_enqueue_style('owl_carousel_css');
|
16 |
+
wp_register_style('owl_theme_css', SA_PLUGIN_PATH.'owl-carousel/sa-owl-theme.css', array(), '2.0', 'all');
|
17 |
+
wp_enqueue_style('owl_theme_css');
|
18 |
+
wp_register_style('owl_animate_css', SA_PLUGIN_PATH.'owl-carousel/animate.min.css', array(), '2.0', 'all');
|
19 |
+
wp_enqueue_style('owl_animate_css');
|
20 |
+
if ($sa_pro_version) {
|
21 |
+
// JAVASCRIPT/CSS FOR MAGNIFIC POPUP
|
22 |
+
wp_register_script('magnific-popup_js', SA_PLUGIN_PATH.'magnific-popup/jquery.magnific-popup.min.js', array('jquery'), '1.1.0', true);
|
23 |
+
wp_enqueue_script('magnific-popup_js');
|
24 |
+
wp_register_style('magnific-popup_css', SA_PLUGIN_PATH.'magnific-popup/magnific-popup.css', array(), '1.1.0', 'all');
|
25 |
+
wp_enqueue_style('magnific-popup_css');
|
26 |
+
}
|
27 |
+
|
28 |
+
// EXTRACT SHORTCODE ATTRIBUTES
|
29 |
+
extract(shortcode_atts(array(
|
30 |
+
'id' => 0,
|
31 |
+
), $atts));
|
32 |
+
$output = '';
|
33 |
+
if ($id == 0) {
|
34 |
+
// SHORTCODE 'id' PARAMETER PROVIDED IS INVALID
|
35 |
+
$output .= "<div id='sa_invalid_postid'>Slide Anything shortcode error: A valid ID has not been provided</div>\n";
|
36 |
+
} else {
|
37 |
+
$post_status = get_post_status($id);
|
38 |
+
if ($post_status == 'publish') {
|
39 |
+
$metadata = get_metadata('post', $id);
|
40 |
+
}
|
41 |
+
if (($post_status != 'publish') || (count($metadata) == 0)) {
|
42 |
+
// SHORTCODE 'id' PARAMETER PROVIDED IS INVALID
|
43 |
+
$output .= "<div id='sa_invalid_postid'>Slide Anything shortcode error: A valid ID has not been provided</div>\n";
|
44 |
+
} else {
|
45 |
+
// ### VALID 'id' PROVIDED - PROCESS SHORTCODE ###
|
46 |
+
// GET SLIDE DATA FROM DATABASE AND SAVE IN ARRAY
|
47 |
+
$slide_data = array();
|
48 |
+
$slide_data['num_slides'] = $metadata['sa_num_slides'][0];
|
49 |
+
$slide_data['shortcodes'] = $metadata['sa_shortcodes'][0];
|
50 |
+
if ($slide_data['shortcodes'] == '1') {
|
51 |
+
$slide_data['shortcodes'] = 'true';
|
52 |
+
} else {
|
53 |
+
$slide_data['shortcodes'] = 'false';
|
54 |
+
}
|
55 |
+
$slide_data['css_id'] = $metadata['sa_css_id'][0];
|
56 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
57 |
+
$slide_data["slide".$i."_num"] = $i;
|
58 |
+
// apply 'the_content' filter to slide content to process any shortcodes
|
59 |
+
if ($slide_data['shortcodes'] == 'true') {
|
60 |
+
$slide_data["slide".$i."_content"] = do_shortcode($metadata["sa_slide".$i."_content"][0]);
|
61 |
+
} else {
|
62 |
+
$slide_data["slide".$i."_content"] = $metadata["sa_slide".$i."_content"][0];
|
63 |
+
}
|
64 |
+
$slide_data["slide".$i."_image_id"] = $metadata["sa_slide".$i."_image_id"][0];
|
65 |
+
$slide_data["slide".$i."_image_pos"] = $metadata["sa_slide".$i."_image_pos"][0];
|
66 |
+
$slide_data["slide".$i."_image_size"] = $metadata["sa_slide".$i."_image_size"][0];
|
67 |
+
$slide_data["slide".$i."_image_repeat"] = $metadata["sa_slide".$i."_image_repeat"][0];
|
68 |
+
$slide_data["slide".$i."_image_color"] = $metadata["sa_slide".$i."_image_color"][0];
|
69 |
+
$slide_data["slide".$i."_link_url"] = $metadata["sa_slide".$i."_link_url"][0];
|
70 |
+
$slide_data["slide".$i."_link_target"] = $metadata["sa_slide".$i."_link_target"][0];
|
71 |
+
if ($slide_data["slide".$i."_link_target"] == '') {
|
72 |
+
$slide_data["slide".$i."_link_target"] = '_self';
|
73 |
+
}
|
74 |
+
if ($sa_pro_version) {
|
75 |
+
// ### PRO VERSION - GET POPUP DATA ###
|
76 |
+
$slide_data["slide".$i."_popup_type"] = $metadata["sa_slide".$i."_popup_type"][0];
|
77 |
+
$slide_data["slide".$i."_popup_imageid"] = $metadata["sa_slide".$i."_popup_imageid"][0];
|
78 |
+
$slide_data["slide".$i."_popup_imagetitle"] = $metadata["sa_slide".$i."_popup_imagetitle"][0];
|
79 |
+
$slide_data["slide".$i."_popup_image"] = '';
|
80 |
+
$slide_data["slide".$i."_popup_background"] = 'no';
|
81 |
+
if ($slide_data["slide".$i."_popup_type"] == 'IMAGE') {
|
82 |
+
if (($slide_data["slide".$i."_popup_imageid"] != '') && ($slide_data["slide".$i."_popup_imageid"] != 0)) {
|
83 |
+
$popup_full_images = wp_get_attachment_image_src($slide_data["slide".$i."_popup_imageid"], 'full');
|
84 |
+
$slide_data["slide".$i."_popup_image"] = $popup_full_images[0];
|
85 |
+
$slide_data["slide".$i."_popup_background"] = $metadata["sa_slide".$i."_popup_background"][0];
|
86 |
+
if ($slide_data["slide".$i."_popup_background"] == '') {
|
87 |
+
$slide_data["slide".$i."_popup_background"] = 'no';
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
$slide_data["slide".$i."_popup_video_id"] = $metadata["sa_slide".$i."_popup_video_id"][0];
|
92 |
+
$slide_data["slide".$i."_popup_video_type"] = $metadata["sa_slide".$i."_popup_video_type"][0];
|
93 |
+
$slide_data["slide".$i."_popup_html"] = $metadata["sa_slide".$i."_popup_html"][0];
|
94 |
+
$slide_data["slide".$i."_popup_shortcode"] = $metadata["sa_slide".$i."_popup_shortcode"][0];
|
95 |
+
$slide_data["slide".$i."_popup_bgcol"] = $metadata["sa_slide".$i."_popup_bgcol"][0];
|
96 |
+
$slide_data["slide".$i."_popup_width"] = $metadata["sa_slide".$i."_popup_width"][0];
|
97 |
+
if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
|
98 |
+
$slide_data["slide".$i."_popup_css_id"] = $slide_data['css_id']."_popup".$i;
|
99 |
+
} else {
|
100 |
+
$slide_data["slide".$i."_popup_css_id"] = '';
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
$slide_data['slide_duration'] = floatval($metadata['sa_slide_duration'][0]) * 1000;
|
105 |
+
if ($slide_data['slide_duration'] == 0) {
|
106 |
+
$slide_data['slide_duration'] = 'false';
|
107 |
+
}
|
108 |
+
$slide_data['slide_transition'] = floatval($metadata['sa_slide_transition'][0]) * 1000;
|
109 |
+
if (isset($metadata['sa_slide_by'][0]) && ($metadata['sa_slide_by'][0] != '')) {
|
110 |
+
$slide_data['slide_by'] = $metadata['sa_slide_by'][0];
|
111 |
+
if ($slide_data['slide_by'] == '0') {
|
112 |
+
$slide_data['slide_by'] = 'page';
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
$slide_data['slide_by'] = 1;
|
116 |
+
}
|
117 |
+
$slide_data['loop_slider'] = $metadata['sa_loop_slider'][0];
|
118 |
+
if ($slide_data['loop_slider'] == '1') {
|
119 |
+
$slide_data['loop_slider'] = 'true';
|
120 |
+
} else {
|
121 |
+
$slide_data['loop_slider'] = 'false';
|
122 |
+
}
|
123 |
+
$slide_data['stop_hover'] = $metadata['sa_stop_hover'][0];
|
124 |
+
if ($slide_data['stop_hover'] == '1') {
|
125 |
+
$slide_data['stop_hover'] = 'true';
|
126 |
+
} else {
|
127 |
+
$slide_data['stop_hover'] = 'false';
|
128 |
+
}
|
129 |
+
$slide_data['random_order'] = $metadata['sa_random_order'][0];
|
130 |
+
if ($slide_data['random_order'] == '1') {
|
131 |
+
$slide_data['random_order'] = 'true';
|
132 |
+
} else {
|
133 |
+
$slide_data['random_order'] = 'false';
|
134 |
+
}
|
135 |
+
$slide_data['reverse_order'] = $metadata['sa_reverse_order'][0];
|
136 |
+
if ($slide_data['reverse_order'] == '1') {
|
137 |
+
$slide_data['reverse_order'] = 'true';
|
138 |
+
} else {
|
139 |
+
$slide_data['reverse_order'] = 'false';
|
140 |
+
}
|
141 |
+
$slide_data['nav_arrows'] = $metadata['sa_nav_arrows'][0];
|
142 |
+
if ($slide_data['nav_arrows'] == '1') {
|
143 |
+
$slide_data['nav_arrows'] = 'true';
|
144 |
+
} else {
|
145 |
+
$slide_data['nav_arrows'] = 'false';
|
146 |
+
}
|
147 |
+
$slide_data['pagination'] = $metadata['sa_pagination'][0];
|
148 |
+
if ($slide_data['pagination'] == '1') {
|
149 |
+
$slide_data['pagination'] = 'true';
|
150 |
+
} else {
|
151 |
+
$slide_data['pagination'] = 'false';
|
152 |
+
}
|
153 |
+
$slide_data['mouse_drag'] = $metadata['sa_mouse_drag'][0];
|
154 |
+
if ($slide_data['mouse_drag'] == '1') {
|
155 |
+
$slide_data['mouse_drag'] = 'true';
|
156 |
+
} else {
|
157 |
+
$slide_data['mouse_drag'] = 'false';
|
158 |
+
}
|
159 |
+
$slide_data['touch_drag'] = $metadata['sa_touch_drag'][0];
|
160 |
+
if ($slide_data['touch_drag'] == '1') {
|
161 |
+
$slide_data['touch_drag'] = 'true';
|
162 |
+
} else {
|
163 |
+
$slide_data['touch_drag'] = 'false';
|
164 |
+
}
|
165 |
+
if (isset($metadata['sa_auto_height'])) {
|
166 |
+
$slide_data['auto_height'] = $metadata['sa_auto_height'][0];
|
167 |
+
if ($slide_data['auto_height'] == '1') {
|
168 |
+
$slide_data['auto_height'] = 'true';
|
169 |
+
} else {
|
170 |
+
$slide_data['auto_height'] = 'false';
|
171 |
+
}
|
172 |
+
} else {
|
173 |
+
$slide_data['auto_height'] = 'false';
|
174 |
+
}
|
175 |
+
$slide_data['items_width1'] = $metadata['sa_items_width1'][0];
|
176 |
+
$slide_data['items_width2'] = $metadata['sa_items_width2'][0];
|
177 |
+
$slide_data['items_width3'] = $metadata['sa_items_width3'][0];
|
178 |
+
$slide_data['items_width4'] = $metadata['sa_items_width4'][0];
|
179 |
+
$slide_data['items_width5'] = $metadata['sa_items_width5'][0];
|
180 |
+
$slide_data['items_width6'] = $metadata['sa_items_width6'][0];
|
181 |
+
if ($slide_data['items_width6'] == '') {
|
182 |
+
$slide_data['items_width6'] = $slide_data['items_width5'];
|
183 |
+
}
|
184 |
+
$slide_data['transition'] = $metadata['sa_transition'][0];
|
185 |
+
$slide_data['background_color'] = $metadata['sa_background_color'][0];
|
186 |
+
$slide_data['border_width'] = $metadata['sa_border_width'][0];
|
187 |
+
$slide_data['border_color'] = $metadata['sa_border_color'][0];
|
188 |
+
$slide_data['border_radius'] = $metadata['sa_border_radius'][0];
|
189 |
+
$slide_data['wrapper_padd_top'] = $metadata['sa_wrapper_padd_top'][0];
|
190 |
+
$slide_data['wrapper_padd_right'] = $metadata['sa_wrapper_padd_right'][0];
|
191 |
+
$slide_data['wrapper_padd_bottom'] = $metadata['sa_wrapper_padd_bottom'][0];
|
192 |
+
$slide_data['wrapper_padd_left'] = $metadata['sa_wrapper_padd_left'][0];
|
193 |
+
$slide_data['slide_min_height_perc'] = $metadata['sa_slide_min_height_perc'][0];
|
194 |
+
$slide_data['slide_padding_tb'] = $metadata['sa_slide_padding_tb'][0];
|
195 |
+
$slide_data['slide_padding_lr'] = $metadata['sa_slide_padding_lr'][0];
|
196 |
+
$slide_data['slide_margin_lr'] = $metadata['sa_slide_margin_lr'][0];
|
197 |
+
$slide_data['slide_icons_location'] = $metadata['sa_slide_icons_location'][0];
|
198 |
+
$slide_data['autohide_arrows'] = $metadata['sa_autohide_arrows'][0];
|
199 |
+
if ($slide_data['autohide_arrows'] == '1') {
|
200 |
+
$slide_data['autohide_arrows'] = 'true';
|
201 |
+
} else {
|
202 |
+
$slide_data['autohide_arrows'] = 'false';
|
203 |
+
}
|
204 |
+
$slide_data['slide_icons_visible'] = $metadata['sa_slide_icons_visible'][0];
|
205 |
+
if ($slide_data['slide_icons_visible'] == '1') {
|
206 |
+
$slide_data['slide_icons_visible'] = 'true';
|
207 |
+
} else {
|
208 |
+
$slide_data['slide_icons_visible'] = 'false';
|
209 |
+
}
|
210 |
+
$slide_data['slide_icons_color'] = $metadata['sa_slide_icons_color'][0];
|
211 |
+
if ($slide_data['slide_icons_color'] != 'black') {
|
212 |
+
$slide_data['slide_icons_color'] = 'white';
|
213 |
+
}
|
214 |
+
$slide_data['sa_window_onload'] = '0';
|
215 |
+
if (isset($metadata['sa_window_onload'])) {
|
216 |
+
$slide_data['sa_window_onload'] = $metadata['sa_window_onload'][0];
|
217 |
+
if ($slide_data['sa_window_onload'] != '1') {
|
218 |
+
$slide_data['sa_window_onload'] = '0';
|
219 |
+
}
|
220 |
+
}
|
221 |
+
$slide_data['strip_javascript'] = '0';
|
222 |
+
if (isset($metadata['sa_strip_javascript'])) {
|
223 |
+
$slide_data['strip_javascript'] = $metadata['sa_strip_javascript'][0];
|
224 |
+
if ($slide_data['strip_javascript'] != '1') {
|
225 |
+
$slide_data['strip_javascript'] = '0';
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
// REVERSE THE ORDER OF THE SLIDES IF 'Random Order' CHECKBOX IS CHECKED OR
|
230 |
+
// RE-ORDER SLIDES IN A RANDOM ORDER IF 'Random Order' CHECKBOX IS CHECKED
|
231 |
+
if (($slide_data['reverse_order'] == 'true') || ($slide_data['random_order'] == 'true')) {
|
232 |
+
$reorder_arr = array();
|
233 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
234 |
+
$reorder_arr[$i-1]['num'] = $slide_data["slide".$i."_num"];
|
235 |
+
$reorder_arr[$i-1]['content'] = $slide_data["slide".$i."_content"];
|
236 |
+
$reorder_arr[$i-1]['image_id'] = $slide_data["slide".$i."_image_id"];
|
237 |
+
$reorder_arr[$i-1]['image_pos'] = $slide_data["slide".$i."_image_pos"];
|
238 |
+
$reorder_arr[$i-1]['image_size'] = $slide_data["slide".$i."_image_size"];
|
239 |
+
$reorder_arr[$i-1]['image_repeat'] = $slide_data["slide".$i."_image_repeat"];
|
240 |
+
$reorder_arr[$i-1]['image_color'] = $slide_data["slide".$i."_image_color"];
|
241 |
+
$reorder_arr[$i-1]['link_url'] = $slide_data["slide".$i."_link_url"];
|
242 |
+
$reorder_arr[$i-1]['link_target'] = $slide_data["slide".$i."_link_target"];
|
243 |
+
if ($sa_pro_version) {
|
244 |
+
$reorder_arr[$i-1]['popup_type'] = $slide_data["slide".$i."_popup_type"];
|
245 |
+
$reorder_arr[$i-1]['popup_imageid'] = $slide_data["slide".$i."_popup_imageid"];
|
246 |
+
$reorder_arr[$i-1]['popup_imagetitle'] = $slide_data["slide".$i."_popup_imagetitle"];
|
247 |
+
$reorder_arr[$i-1]['popup_image'] = $slide_data["slide".$i."_popup_image"];
|
248 |
+
$reorder_arr[$i-1]['popup_background'] = $slide_data["slide".$i."_popup_background"];
|
249 |
+
$reorder_arr[$i-1]['popup_video_id'] = $slide_data["slide".$i."_popup_video_id"];
|
250 |
+
$reorder_arr[$i-1]['popup_video_type'] = $slide_data["slide".$i."_popup_video_type"];
|
251 |
+
$reorder_arr[$i-1]['popup_html'] = $slide_data["slide".$i."_popup_html"];
|
252 |
+
$reorder_arr[$i-1]['popup_shortcode'] = $slide_data["slide".$i."_popup_shortcode"];
|
253 |
+
$reorder_arr[$i-1]['popup_bgcol'] = $slide_data["slide".$i."_popup_bgcol"];
|
254 |
+
$reorder_arr[$i-1]['popup_width'] = $slide_data["slide".$i."_popup_width"];
|
255 |
+
$reorder_arr[$i-1]['popup_css_id'] = $slide_data["slide".$i."_popup_css_id"];
|
256 |
+
}
|
257 |
+
}
|
258 |
+
if ($slide_data['random_order'] == 'true') {
|
259 |
+
// SORT SLIDE ARRAY DATA IN A RANDOM ORDER
|
260 |
+
shuffle($reorder_arr);
|
261 |
+
} else {
|
262 |
+
// REVERSE THE ORDER OF THE SLIDE DATA ARRAY
|
263 |
+
$reverse_arr = array_reverse($reorder_arr);
|
264 |
+
$reorder_arr = $reverse_arr;
|
265 |
+
}
|
266 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
267 |
+
$slide_data["slide".$i."_num"] = $reorder_arr[$i-1]['num'];
|
268 |
+
$slide_data["slide".$i."_content"] = $reorder_arr[$i-1]['content'];
|
269 |
+
$slide_data["slide".$i."_image_id"] = $reorder_arr[$i-1]['image_id'];
|
270 |
+
$slide_data["slide".$i."_image_pos"] = $reorder_arr[$i-1]['image_pos'];
|
271 |
+
$slide_data["slide".$i."_image_size"] = $reorder_arr[$i-1]['image_size'];
|
272 |
+
$slide_data["slide".$i."_image_repeat"] = $reorder_arr[$i-1]['image_repeat'];
|
273 |
+
$slide_data["slide".$i."_image_color"] = $reorder_arr[$i-1]['image_color'];
|
274 |
+
$slide_data["slide".$i."_link_url"] = $reorder_arr[$i-1]['link_url'];
|
275 |
+
$slide_data["slide".$i."_link_target"] = $reorder_arr[$i-1]['link_target'];
|
276 |
+
if ($sa_pro_version) {
|
277 |
+
$slide_data["slide".$i."_popup_type"] = $reorder_arr[$i-1]['popup_type'];
|
278 |
+
$slide_data["slide".$i."_popup_imageid"] = $reorder_arr[$i-1]['popup_imageid'];
|
279 |
+
$slide_data["slide".$i."_popup_imagetitle"] = $reorder_arr[$i-1]['popup_imagetitle'];
|
280 |
+
$slide_data["slide".$i."_popup_image"] = $reorder_arr[$i-1]['popup_image'];
|
281 |
+
$slide_data["slide".$i."_popup_background"] = $reorder_arr[$i-1]['popup_background'];
|
282 |
+
$slide_data["slide".$i."_popup_video_id"] = $reorder_arr[$i-1]['popup_video_id'];
|
283 |
+
$slide_data["slide".$i."_popup_video_type"] = $reorder_arr[$i-1]['popup_video_type'];
|
284 |
+
$slide_data["slide".$i."_popup_html"] = $reorder_arr[$i-1]['popup_html'];
|
285 |
+
$slide_data["slide".$i."_popup_shortcode"] = $reorder_arr[$i-1]['popup_shortcode'];
|
286 |
+
$slide_data["slide".$i."_popup_bgcol"] = $reorder_arr[$i-1]['popup_bgcol'];
|
287 |
+
$slide_data["slide".$i."_popup_width"] = $reorder_arr[$i-1]['popup_width'];
|
288 |
+
$slide_data["slide".$i."_popup_css_id"] = $reorder_arr[$i-1]['popup_css_id'];
|
289 |
+
}
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
// GENERATE HTML CODE FOR THE OWL CAROUSEL SLIDER
|
294 |
+
$wrapper_style = "background:".$slide_data['background_color']."; ";
|
295 |
+
$wrapper_style .= "border:solid ".$slide_data['border_width']."px ".$slide_data['border_color']."; ";
|
296 |
+
$wrapper_style .= "border-radius:".$slide_data['border_radius']."px; ";
|
297 |
+
$wrapper_style .= "padding:".$slide_data['wrapper_padd_top']."px ";
|
298 |
+
$wrapper_style .= $slide_data['wrapper_padd_right']."px ";
|
299 |
+
$wrapper_style .= $slide_data['wrapper_padd_bottom']."px ";
|
300 |
+
$wrapper_style .= $slide_data['wrapper_padd_left']."px;";
|
301 |
+
$output .= "<div class='".$slide_data['slide_icons_color']."' style='".esc_attr($wrapper_style)."'>\n";
|
302 |
+
if ($slide_data['pagination'] == 'true') {
|
303 |
+
if ($slide_data['autohide_arrows'] == 'true') {
|
304 |
+
$output .= "<div id='".esc_attr($slide_data['css_id'])."' class='owl-carousel owl-pagination-true autohide-arrows sa_owl_theme'>\n";
|
305 |
+
} else {
|
306 |
+
$output .= "<div id='".esc_attr($slide_data['css_id'])."' class='owl-carousel owl-pagination-true sa_owl_theme'>\n";
|
307 |
+
}
|
308 |
+
} else {
|
309 |
+
if ($slide_data['autohide_arrows'] == 'true') {
|
310 |
+
$output .= "<div id='".esc_attr($slide_data['css_id'])."' class='owl-carousel autohide-arrows sa_owl_theme'>\n";
|
311 |
+
} else {
|
312 |
+
$output .= "<div id='".esc_attr($slide_data['css_id'])."' class='owl-carousel sa_owl_theme'>\n";
|
313 |
+
}
|
314 |
+
}
|
315 |
+
if ($sa_pro_version) {
|
316 |
+
// PRO VERSION - INITIALISE VAIRABLES FOR MAGNIFIC POPUP
|
317 |
+
$lightbox_function = "open_lightbox_gallery_".$slide_data['css_id'];
|
318 |
+
$lightbox_gallery_id = "lightbox_button_".$slide_data['css_id'];
|
319 |
+
$lightbox_count = 0;
|
320 |
+
}
|
321 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
322 |
+
$slide_content = $slide_data["slide".$i."_content"];
|
323 |
+
$slide_image_src = wp_get_attachment_image_src($slide_data["slide".$i."_image_id"], 'full');
|
324 |
+
// SA PRO VERSION - USE POPUP IMAGE AS SLIDE BACKGROUND IMAGE (IF THIS OPTION SELECTED)
|
325 |
+
if (($sa_pro_version) && ($slide_data["slide".$i."_popup_type"] == 'IMAGE')) {
|
326 |
+
if (($slide_data["slide".$i."_popup_background"] != 'no') && ($slide_data["slide".$i."_popup_image"] != '')) {
|
327 |
+
$slide_image_src = wp_get_attachment_image_src($slide_data["slide".$i."_popup_imageid"], $slide_data["slide".$i."_popup_background"]);
|
328 |
+
}
|
329 |
+
}
|
330 |
+
$slide_image_size = $slide_data["slide".$i."_image_size"];
|
331 |
+
$slide_image_pos = $slide_data["slide".$i."_image_pos"];
|
332 |
+
$slide_image_repeat = $slide_data["slide".$i."_image_repeat"];
|
333 |
+
$slide_image_color = $slide_data["slide".$i."_image_color"];
|
334 |
+
$slide_style = "padding:".$slide_data['slide_padding_tb']."% ".$slide_data['slide_padding_lr']."%; ";
|
335 |
+
$slide_style .= "margin:0px ".$slide_data['slide_margin_lr']."%; ";
|
336 |
+
$slide_style .= "background-image:url(\"".$slide_image_src[0]."\"); ";
|
337 |
+
$slide_style .= "background-position:".$slide_image_pos."; ";
|
338 |
+
$slide_style .= "background-size:".$slide_image_size."; ";
|
339 |
+
$slide_style .= "background-repeat:".$slide_image_repeat."; ";
|
340 |
+
$slide_style .= "background-color:".$slide_image_color."; ";
|
341 |
+
if (strpos($slide_data['slide_min_height_perc'], 'px') !== false) {
|
342 |
+
$slide_style .= "min-height:".$slide_data['slide_min_height_perc']."; ";
|
343 |
+
}
|
344 |
+
|
345 |
+
// BUILD SLIDE LINK HOVER BUTTON
|
346 |
+
$link_output = '';
|
347 |
+
if ($slide_data["slide".$i."_link_url"] != '') {
|
348 |
+
$link_output = "<a class='sa_slide_link_icon' href='".$slide_data["slide".$i."_link_url"]."' ";
|
349 |
+
$link_output .= "target='".$slide_data["slide".$i."_link_target"]."'></a>";
|
350 |
+
}
|
351 |
+
|
352 |
+
// BUILD POPUP HOVER BUTTON - PRO VERSION ONLY!
|
353 |
+
$popup_output = '';
|
354 |
+
if ($sa_pro_version) {
|
355 |
+
if (($slide_data["slide".$i."_popup_type"] == 'IMAGE') && ($slide_data["slide".$i."_popup_image"] != '')) {
|
356 |
+
$lightbox_count++;
|
357 |
+
$popup_output = "<div class='sa_popup_zoom_icon' onClick='".$lightbox_function."(".$lightbox_count.");'></div>";
|
358 |
+
}
|
359 |
+
if (($slide_data["slide".$i."_popup_type"] == 'VIDEO') && ($slide_data["slide".$i."_popup_video_id"] != '')) {
|
360 |
+
$lightbox_count++;
|
361 |
+
$popup_output = "<div class='sa_popup_video_icon' onClick='".$lightbox_function."(".$lightbox_count.");'></div>";
|
362 |
+
}
|
363 |
+
if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
|
364 |
+
$lightbox_count++;
|
365 |
+
$popup_output = "<div class='sa_popup_zoom_icon' onClick='".$lightbox_function."(".$lightbox_count.");'></div>";
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
// DISPLAY SLIDE OUTPUT
|
370 |
+
//$data_hash = $slide_data['css_id']."_slide".sprintf('%02d', $i);
|
371 |
+
//$output .= "<div class='sa_hover_container' data-hash='".$data_hash."' style='".esc_attr($slide_style)."'>";
|
372 |
+
$css_id = $slide_data['css_id']."_slide".sprintf('%02d', $slide_data["slide".$i."_num"]);
|
373 |
+
$output .= "<div id='".$css_id."' class='sa_hover_container' style='".esc_attr($slide_style)."'>";
|
374 |
+
if (($link_output != '') || ($popup_output != '')) {
|
375 |
+
if ($slide_data['slide_icons_location'] == 'Top Left') {
|
376 |
+
// icons location - top left
|
377 |
+
$style = "top:0px; left:0px; margin:0px;";
|
378 |
+
} elseif ($slide_data['slide_icons_location'] == 'Top Center') {
|
379 |
+
// icons location - top center
|
380 |
+
if (($link_output != '') && ($popup_output != '')) { $hov_marginL = '-40px'; }
|
381 |
+
else { $hov_marginL = '-20px'; }
|
382 |
+
$style = "top:0px; left:50%; margin-left:".$hov_marginL.";";
|
383 |
+
} elseif ($slide_data['slide_icons_location'] == 'Top Right') {
|
384 |
+
// icons location - top right
|
385 |
+
$style = "top:0px; right:0px; margin:0px;";
|
386 |
+
} elseif ($slide_data['slide_icons_location'] == 'Bottom Left') {
|
387 |
+
// icons location - bottom left
|
388 |
+
$style = "bottom:0px; left:0px; margin:0px;";
|
389 |
+
} elseif ($slide_data['slide_icons_location'] == 'Bottom Center') {
|
390 |
+
// icons location - bottom center
|
391 |
+
if (($link_output != '') && ($popup_output != '')) { $hov_marginL = '-40px'; }
|
392 |
+
else { $hov_marginL = '-20px'; }
|
393 |
+
$style = "bottom:0px; left:50%; margin-left:".$hov_marginL.";";
|
394 |
+
} elseif ($slide_data['slide_icons_location'] == 'Bottom Right') {
|
395 |
+
// icons location - bottom right
|
396 |
+
$style = "bottom:0px; right:0px; margin:0px;";
|
397 |
+
} else {
|
398 |
+
// icons location - center center (default)
|
399 |
+
if (($link_output != '') && ($popup_output != '')) { $hov_marginL = '-40px'; }
|
400 |
+
else { $hov_marginL = '-20px'; }
|
401 |
+
$style = "top:50%; left:50%; margin-top:-20px; margin-left:".$hov_marginL.";";
|
402 |
+
}
|
403 |
+
if ($slide_data['slide_icons_visible'] == 'true') {
|
404 |
+
$output .= "<div class='sa_hover_buttons always_visible' style='".$style."'>";
|
405 |
+
} else {
|
406 |
+
$output .= "<div class='sa_hover_buttons' style='".$style."'>";
|
407 |
+
}
|
408 |
+
if ($link_output != '') {
|
409 |
+
$output .= $link_output;
|
410 |
+
}
|
411 |
+
if ($popup_output != '') {
|
412 |
+
$output .= $popup_output;
|
413 |
+
}
|
414 |
+
$output .= "</div>\n"; // .sa_hover_buttons
|
415 |
+
}
|
416 |
+
if ($slide_data['strip_javascript'] == '1') {
|
417 |
+
// strip JavaScript code (<script> tags) from slide content
|
418 |
+
$slide_content = remove_javascript_from_content($slide_content);
|
419 |
+
}
|
420 |
+
$output .= $slide_content."</div>\n"; // .sa_hover_container
|
421 |
+
}
|
422 |
+
$output .= "</div>\n";
|
423 |
+
$output .= "</div>\n";
|
424 |
+
|
425 |
+
|
426 |
+
|
427 |
+
// PRO VERSION - CREATE A (HIDDEN) DIV FOR EACH 'HTML' POPUP
|
428 |
+
if ($sa_pro_version) {
|
429 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
430 |
+
if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
|
431 |
+
$popup_css_id = $slide_data["slide".$i."_popup_css_id"];
|
432 |
+
$popup_bgcol = $slide_data["slide".$i."_popup_bgcol"];
|
433 |
+
$popup_width = $slide_data["slide".$i."_popup_width"];
|
434 |
+
$output .= "<div id='".$popup_css_id."' class='mfp-hide sa_custom_popup' ";
|
435 |
+
$output .= "style='background:".$popup_bgcol."; max-width:".$popup_width."px;'>\n";
|
436 |
+
if ($slide_data["slide".$i."_popup_shortcode"] == '1') {
|
437 |
+
$output .= do_shortcode($slide_data["slide".$i."_popup_html"]);
|
438 |
+
} else {
|
439 |
+
$output .= $slide_data["slide".$i."_popup_html"];
|
440 |
+
}
|
441 |
+
$output .= "</div>\n";
|
442 |
+
}
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
|
447 |
+
|
448 |
+
// ### ENQUEUE JQUERY SCRIPT IF IT HAS NOT ALREADY BEEN LOADED ###
|
449 |
+
if (!wp_script_is('jquery', 'done')) {
|
450 |
+
wp_enqueue_script('jquery');
|
451 |
+
}
|
452 |
+
|
453 |
+
|
454 |
+
|
455 |
+
// ### GENERATE JQUERY CODE FOR THE OWL CAROUSEL SLIDER ###
|
456 |
+
if (wp_script_is('jquery', 'done')) { // Only generate JQuery code if JQuery has been loaded
|
457 |
+
if (($slide_data['items_width1'] == 1) && ($slide_data['items_width2'] == 1) && ($slide_data['items_width3'] == 1) &&
|
458 |
+
($slide_data['items_width4'] == 1) && ($slide_data['items_width5'] == 1) && ($slide_data['items_width6'] == 1)) {
|
459 |
+
$single_item = 1;
|
460 |
+
} else {
|
461 |
+
$single_item = 0;
|
462 |
+
}
|
463 |
+
$output .= "<script type='text/javascript'>\n";
|
464 |
+
if ($slide_data['sa_window_onload'] == '1') {
|
465 |
+
$output .= " jQuery(window).load(function() {\n";
|
466 |
+
} else {
|
467 |
+
$output .= " jQuery(document).ready(function() {\n";
|
468 |
+
}
|
469 |
+
|
470 |
+
// JQUERY CODE FOR OWN CAROUSEL
|
471 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."').owlCarousel({\n";
|
472 |
+
if ($single_item == 1) {
|
473 |
+
$output .= " items : 1,\n";
|
474 |
+
if (($slide_data['transition'] == 'Fade') || ($slide_data['transition'] == 'fade')) {
|
475 |
+
$output .= " animateOut : 'fadeOut',\n";
|
476 |
+
} elseif (($slide_data['transition'] == 'Slide Down') || ($slide_data['transition'] == 'goDown')) {
|
477 |
+
$output .= " animateOut : 'slideOutDown',\n";
|
478 |
+
$output .= " animateIn : 'fadeIn',\n";
|
479 |
+
} elseif ($slide_data['transition'] == 'Zoom In') {
|
480 |
+
$output .= " animateOut : 'fadeOut',\n";
|
481 |
+
$output .= " animateIn : 'zoomIn',\n";
|
482 |
+
} elseif ($slide_data['transition'] == 'Zoom Out') {
|
483 |
+
$output .= " animateOut : 'zoomOut',\n";
|
484 |
+
$output .= " animateIn : 'fadeIn',\n";
|
485 |
+
} elseif ($slide_data['transition'] == 'Flip Out X') {
|
486 |
+
$output .= " animateOut : 'flipOutX',\n";
|
487 |
+
$output .= " animateIn : 'fadeIn',\n";
|
488 |
+
} elseif ($slide_data['transition'] == 'Flip Out Y') {
|
489 |
+
$output .= " animateOut : 'flipOutY',\n";
|
490 |
+
$output .= " animateIn : 'fadeIn',\n";
|
491 |
+
} elseif ($slide_data['transition'] == 'Rotate Left') {
|
492 |
+
$output .= " animateOut : 'rotateOutDownLeft',\n";
|
493 |
+
$output .= " animateIn : 'fadeIn',\n";
|
494 |
+
} elseif ($slide_data['transition'] == 'Rotate Right') {
|
495 |
+
$output .= " animateOut : 'rotateOutDownRight',\n";
|
496 |
+
$output .= " animateIn : 'fadeIn',\n";
|
497 |
+
} elseif ($slide_data['transition'] == 'Bounce Out') {
|
498 |
+
$output .= " animateOut : 'bounceOut',\n";
|
499 |
+
$output .= " animateIn : 'fadeIn',\n";
|
500 |
+
} elseif ($slide_data['transition'] == 'Roll Out') {
|
501 |
+
$output .= " animateOut : 'rollOut',\n";
|
502 |
+
$output .= " animateIn : 'fadeIn',\n";
|
503 |
+
}
|
504 |
+
$output .= " smartSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
|
505 |
+
} else {
|
506 |
+
$output .= " responsive:{\n";
|
507 |
+
$output .= " 0:{ items:".esc_attr($slide_data['items_width1'])." },\n";
|
508 |
+
$output .= " 480:{ items:".esc_attr($slide_data['items_width2'])." },\n";
|
509 |
+
$output .= " 768:{ items:".esc_attr($slide_data['items_width3'])." },\n";
|
510 |
+
$output .= " 980:{ items:".esc_attr($slide_data['items_width4'])." },\n";
|
511 |
+
$output .= " 1200:{ items:".esc_attr($slide_data['items_width5'])." },\n";
|
512 |
+
$output .= " 1500:{ items:".esc_attr($slide_data['items_width6'])." }\n";
|
513 |
+
$output .= " },\n";
|
514 |
+
}
|
515 |
+
if ($slide_data['slide_duration'] == 0) {
|
516 |
+
$output .= " autoplay : false,\n";
|
517 |
+
} else {
|
518 |
+
$output .= " autoplay : true,\n";
|
519 |
+
$output .= " autoplayTimeout : ".esc_attr($slide_data['slide_duration']).",\n";
|
520 |
+
}
|
521 |
+
$output .= " smartSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
|
522 |
+
$output .= " fluidSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
|
523 |
+
$output .= " autoplaySpeed : ".esc_attr($slide_data['slide_transition']).",\n";
|
524 |
+
$output .= " navSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
|
525 |
+
$output .= " dotsSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
|
526 |
+
$output .= " loop : ".esc_attr($slide_data['loop_slider']).",\n";
|
527 |
+
$output .= " autoplayHoverPause : ".esc_attr($slide_data['stop_hover']).",\n";
|
528 |
+
$output .= " nav : ".esc_attr($slide_data['nav_arrows']).",\n";
|
529 |
+
$output .= " navText : ['',''],\n";
|
530 |
+
$output .= " dots : ".esc_attr($slide_data['pagination']).",\n";
|
531 |
+
$output .= " responsiveRefreshRate : 200,\n";
|
532 |
+
if ($slide_data['slide_by'] == 'page') {
|
533 |
+
$output .= " slideBy : 'page',\n";
|
534 |
+
} else {
|
535 |
+
$output .= " slideBy : ".esc_attr($slide_data['slide_by']).",\n";
|
536 |
+
}
|
537 |
+
$output .= " mergeFit : true,\n";
|
538 |
+
//$output .= " URLhashListener : true,\n";
|
539 |
+
$output .= " autoHeight : ".esc_attr($slide_data['auto_height']).",\n";
|
540 |
+
$output .= " mouseDrag : ".esc_attr($slide_data['mouse_drag']).",\n";
|
541 |
+
$output .= " touchDrag : ".esc_attr($slide_data['touch_drag'])."\n";
|
542 |
+
$output .= " });\n";
|
543 |
+
|
544 |
+
// JAVASCRIPT 'WINDOW RESIZE' EVENT TO SET CSS 'min-height' OF SLIDES WITHIN THIS SLIDER
|
545 |
+
$slide_min_height = $slide_data['slide_min_height_perc'];
|
546 |
+
if (strpos($slide_min_height, 'px') !== false) {
|
547 |
+
$slide_min_height = 0;
|
548 |
+
}
|
549 |
+
if (($slide_min_height != '') && ($slide_min_height != '0')) {
|
550 |
+
$output .= " sa_resize_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
|
551 |
+
$output .= " window.addEventListener('resize', sa_resize_".esc_attr($slide_data['css_id']).");\n"; // create resize event
|
552 |
+
// RESIZE EVENT FUNCTION (to set slide CSS 'min-heigh')
|
553 |
+
$output .= " function sa_resize_".esc_attr($slide_data['css_id'])."() {\n";
|
554 |
+
// get slide min height setting
|
555 |
+
$output .= " var min_height = '".$slide_min_height."';\n";
|
556 |
+
// get window width
|
557 |
+
$output .= " var win_width = jQuery(window).width();\n";
|
558 |
+
$output .= " var slider_width = jQuery('#".esc_attr($slide_data['css_id'])."').width();\n";
|
559 |
+
// calculate slide width according to window width & number of slides
|
560 |
+
$output .= " if (win_width < 480) {\n";
|
561 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width1']).";\n";
|
562 |
+
$output .= " } else if (win_width < 768) {\n";
|
563 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width2']).";\n";
|
564 |
+
$output .= " } else if (win_width < 980) {\n";
|
565 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width3']).";\n";
|
566 |
+
$output .= " } else if (win_width < 1200) {\n";
|
567 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width4']).";\n";
|
568 |
+
$output .= " } else if (win_width < 1500) {\n";
|
569 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width5']).";\n";
|
570 |
+
$output .= " } else {\n";
|
571 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width6']).";\n";
|
572 |
+
$output .= " }\n";
|
573 |
+
$output .= " slide_width = Math.round(slide_width);\n";
|
574 |
+
// calculate CSS 'min-height' using the captured 'min-height' data settings for this slider
|
575 |
+
$output .= " var slide_height = '0';\n";
|
576 |
+
$output .= " if (min_height == 'aspect43') {\n";
|
577 |
+
$output .= " slide_height = (slide_width / 4) * 3;";
|
578 |
+
$output .= " slide_height = Math.round(slide_height);\n";
|
579 |
+
$output .= " } else if (min_height == 'aspect169') {\n";
|
580 |
+
$output .= " slide_height = (slide_width / 16) * 9;";
|
581 |
+
$output .= " slide_height = Math.round(slide_height);\n";
|
582 |
+
$output .= " } else {\n";
|
583 |
+
$output .= " slide_height = (slide_width / 100) * min_height;";
|
584 |
+
$output .= " slide_height = Math.round(slide_height);\n";
|
585 |
+
$output .= " }\n";
|
586 |
+
// set the slide 'min-height' css value
|
587 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])." .owl-item .sa_hover_container').css('min-height', slide_height+'px');\n";
|
588 |
+
$output .= " }\n";
|
589 |
+
}
|
590 |
+
$output .= " });\n";
|
591 |
+
$output .= "</script>\n";
|
592 |
+
}
|
593 |
+
|
594 |
+
|
595 |
+
|
596 |
+
// ### GENERATE JQUERY CODE FOR THE MAGNIFIC POPUP ###
|
597 |
+
if (wp_script_is('jquery', 'done')) { // Only generate JQuery code if JQuery has been loaded
|
598 |
+
if (($sa_pro_version) && ($lightbox_count > 0)) {
|
599 |
+
$output .= "<script type='text/javascript'>\n";
|
600 |
+
$output .= "jQuery(document).ready(function() {\n";
|
601 |
+
$output .= " jQuery('#".$lightbox_gallery_id."').magnificPopup({\n";
|
602 |
+
$output .= " items: [\n";
|
603 |
+
$count = 0;
|
604 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
605 |
+
// LOOP THROUGH EACH SLIDE
|
606 |
+
if (($slide_data["slide".$i."_popup_type"] == 'IMAGE') && ($slide_data["slide".$i."_popup_image"] != '')) {
|
607 |
+
// SLIDE CONTAINS AN IMAGE POPUP
|
608 |
+
$img_url = $slide_data["slide".$i."_popup_image"];
|
609 |
+
$img_title = $slide_data["slide".$i."_popup_imagetitle"];
|
610 |
+
if ($img_title != '') {
|
611 |
+
$output .= " { src: '".esc_attr($img_url)."', title: '".esc_attr($img_title)."' }";
|
612 |
+
} else {
|
613 |
+
$output .= " { src: '".esc_attr($img_url)."' }";
|
614 |
+
}
|
615 |
+
$count++;
|
616 |
+
if ($count < $lightbox_count) { $output .= ",\n"; }
|
617 |
+
else { $output .= "\n"; }
|
618 |
+
}
|
619 |
+
if (($slide_data["slide".$i."_popup_type"] == 'VIDEO') && ($slide_data["slide".$i."_popup_video_id"] != '')) {
|
620 |
+
// SLIDE CONTAINS A VIDEO POPUP
|
621 |
+
$video_id = $slide_data["slide".$i."_popup_video_id"];
|
622 |
+
$video_type = $slide_data["slide".$i."_popup_video_type"];
|
623 |
+
if ($video_type == 'youtube') {
|
624 |
+
$video_url = "http://www.youtube.com/watch?v=".$video_id;
|
625 |
+
} elseif ($video_type == 'vimeo') {
|
626 |
+
$video_url = "http://vimeo.com/".$video_id;
|
627 |
+
}
|
628 |
+
$output .= " { src: '".esc_attr($video_url)."', type: 'iframe' }";
|
629 |
+
$count++;
|
630 |
+
if ($count < $lightbox_count) { $output .= ",\n"; }
|
631 |
+
else { $output .= "\n"; }
|
632 |
+
}
|
633 |
+
if ($slide_data["slide".$i."_popup_type"] == 'HTML') {
|
634 |
+
// SLIDE CONTAINS A HTML POPUP
|
635 |
+
$popup_css_id = "#".$slide_data["slide".$i."_popup_css_id"];
|
636 |
+
$output .= " { src: '".esc_attr($popup_css_id)."', type: 'inline' }";
|
637 |
+
$count++;
|
638 |
+
if ($count < $lightbox_count) { $output .= ",\n"; }
|
639 |
+
else { $output .= "\n"; }
|
640 |
+
}
|
641 |
+
}
|
642 |
+
$output .= " ],\n";
|
643 |
+
$output .= " gallery: { enabled: true, tCounter: '' },\n";
|
644 |
+
$output .= " mainClass: 'sa_popup',\n";
|
645 |
+
$output .= " closeBtnInside: true,\n";
|
646 |
+
$output .= " fixedContentPos: true,\n";
|
647 |
+
$output .= " callbacks: {\n";
|
648 |
+
$output .= " open: function() {\n";
|
649 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."').trigger('stop.owl.autoplay');\n";
|
650 |
+
$output .= " },\n";
|
651 |
+
$output .= " close: function() {\n";
|
652 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."').trigger('play.owl.autoplay');\n";
|
653 |
+
$output .= " }\n";
|
654 |
+
$output .= " },\n";
|
655 |
+
$output .= " type: 'image'\n";
|
656 |
+
$output .= " });\n";
|
657 |
+
$output .= "});\n";
|
658 |
+
|
659 |
+
// JAVASCRIPT FUNCTION WHICH OPENS THIS MAGNIFIC POPUP ON A SPECIFIED SLIDE
|
660 |
+
$output .= "function ".$lightbox_function."(slide) {\n";
|
661 |
+
$output .= " jQuery('#".$lightbox_gallery_id."').magnificPopup('open');\n";
|
662 |
+
$output .= " jQuery('#".$lightbox_gallery_id."').magnificPopup('goTo', slide-1);\n";
|
663 |
+
$output .= "}\n";
|
664 |
+
$output .= "</script>\n";
|
665 |
+
|
666 |
+
// DIV CONTAINER WHICH HOLDS THIS MAGNIFIC POPUP CONTENT (HIDDEN)
|
667 |
+
$output .= "<div id='".$lightbox_gallery_id."' style='display:none;'></div>\n";
|
668 |
+
}
|
669 |
+
}
|
670 |
+
}
|
671 |
+
}
|
672 |
+
return $output;
|
673 |
+
}
|
674 |
+
|
675 |
+
|
676 |
+
|
677 |
+
// ### STRIP JAVASCRIPT ('<script>' tags) FROM SUPPLIED STRING ARGUMENT ###
|
678 |
+
function remove_javascript_from_content($slide_content) {
|
679 |
+
if ($slide_content != '') {
|
680 |
+
$dom = new DOMDocument();
|
681 |
+
$dom->loadHTML($slide_content);
|
682 |
+
$script = $dom->getElementsByTagName('script');
|
683 |
+
$remove = array();
|
684 |
+
foreach($script as $item) {
|
685 |
+
$item->parentNode->removeChild($item);
|
686 |
+
}
|
687 |
+
$slide_content = $dom->saveHTML();
|
688 |
+
}
|
689 |
+
return $slide_content;
|
690 |
+
}
|
691 |
+
?>
|
trunk/readme.txt
ADDED
@@ -0,0 +1,375 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Slide Anything - Responsive Content / HTML Slider and Carousel ===
|
2 |
+
Contributors: simonpedge
|
3 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RP7JLGK6VT252
|
4 |
+
Tags: slider, carousel, content slider, responsive slider, html slider, owl carousel
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9.8
|
7 |
+
Stable tag: trunk
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Create responsive carousels or sliders where the content for each slide can be anything you want - images, text, HTML, and even shortcodes.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel 2 jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
16 |
+
|
17 |
+
= Slide Anything Version 2 =
|
18 |
+
|
19 |
+
Slide Anything has now been rebuilt using Owl Carousel 2, and this now provides many improvements and new features:
|
20 |
+
|
21 |
+
* Infinite Looping - a much requested Owl Carousel 2 feature, which means that the first slide is now seamlessly displayed after the last slide without any carousel rewind.
|
22 |
+
* New Transition Effects - New Owl Carousel transitions include Slide, Fade, Zoom In, Zoom Out, Flip Out X/Y, Rotate Left/Right, Bounce Out, Roll Out and Slide Down.
|
23 |
+
* Slide Link Feature - A new feature which allows you to create a hover-over link button for any slide within your carousels.
|
24 |
+
* Modern Browsers - Owl Carousel 2 Uses hardware acceleration with CSS3 Translate3D transitions. Its fast and works like a charm! Slide Anything has CSS2 fallback built-in to support older browsers.
|
25 |
+
|
26 |
+
= Slide Anything PRO =
|
27 |
+
|
28 |
+
[SLIDE ANYTHING PRO](https://edgewebpages.com/) adds POPUPS into the mix!!
|
29 |
+
|
30 |
+
With [SLIDE ANYTHING PRO](https://edgewebpages.com/) each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup containing HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to Slide Anything, if you are wanting to create Image or Video galleries for your websites.
|
31 |
+
|
32 |
+
For more information about Slide Anything PRO, [CLICK HERE](https://edgewebpages.com/).
|
33 |
+
|
34 |
+
= Owl Carousel =
|
35 |
+
|
36 |
+
[Owl Carousel](https://owlcarousel2.github.io/OwlCarousel2/) is an extremely powerful and flexible carousel/slider JQuery plugin, and it is also free to use! Unfortunately, it's not easy to integrate Owl Carousel into a WordPress site if you are a non-developer, and requires JQuery and PHP coding skills. That is why I developed this plugin.
|
37 |
+
|
38 |
+
I use Owl Carousel a in various WordPress sites I develop, specifically where I need the additional flexibility to develop a carousel with a more complex layout, or use a layout not catered for by any existing carousel plugin product.
|
39 |
+
|
40 |
+
Owl Carousel has been tested in following browsers/devices: Chrome, Firefox, Opera, IE7/8/10/11, Microsoft Edge, iPhone/iPad/Mac Safari and Android Chrome.
|
41 |
+
|
42 |
+
Please view the [FAQ Page](https://wordpress.org/plugins/slide-anything/faq/) for information on how to use `Slide Anything`.
|
43 |
+
|
44 |
+
== Installation ==
|
45 |
+
|
46 |
+
1. Upload the entire `slide-anything` folder to the `/wp-content/plugins/` directory.
|
47 |
+
1. Activate the plugin through the 'Plugins' menu within the WordPress Dashboard.
|
48 |
+
|
49 |
+
You will now see the `Sliders` menu in your WordPress admin panel.
|
50 |
+
|
51 |
+
== Frequently Asked Questions ==
|
52 |
+
|
53 |
+
= How do I insert `Slide Anything` sliders into my WordPress pages or posts? =
|
54 |
+
|
55 |
+
There are two ways to do this. If you are using the visual editor to edit a page or post, you will see a `Slide Anything Sliders` button/icon in the toolbar of the editor. Click this button and a popup will be displayed containing a list of sliders that you have created. Select the title of a slider within this list and click `OK` to insert the shortcode for the selected slider into your page or post content.
|
56 |
+
|
57 |
+
The other method: When you are editing your slider within the WordPress Dashboard, you will see a box with the heading `Shortcode / Preview` on the right-hand side. Click the `Copy to Clipboard` button within this box to copy the slider shortcode to your clipboard. Paste this copied shortcode into the page or post where you would like your slider to appear. This is also the method to use if you want to insert your slider into a text widget or another custom content type, such as a portfolio post.
|
58 |
+
|
59 |
+
= The difference between a Slider and a Carousel, and how to create either =
|
60 |
+
|
61 |
+
By definition a `slider` has a single slide displayed on-page at a time, whilst a `carousel` has multiple slides displayed 'on-page' at a time. The `Items Displayed` box, on the right-hand side of the slider edit page in the WordPress dashboard controls how many slides are displayed on-page at a time.
|
62 |
+
|
63 |
+
To define a slider, all the settings within this box must be set to `1`. When these are set to values greater than `1`, a carousel will be displayed, for example you may want to display a carousel with 4 slides visible on desktop devices, 3 slides visible on tablets and only 2 slides visible on mobile phones.
|
64 |
+
|
65 |
+
= How do I define slide background images? =
|
66 |
+
|
67 |
+
The `Slide Background` box for each slide in your slider allows you to define a background image or a background color for each slide. Note that the content you add to each slide within the slide editor box for each slide is foreground content and sits on `top` of the slide background - this content can be other images and textual content.
|
68 |
+
|
69 |
+
To set a slide background image, click the `Set Image` button. The `Background Size` setting determines if, and how the background image is stretched/shrunk to cover the slide content area and the `Background Repeat` setting determines if the backgroung image should be repeated, like tiles. The `Background Color` setting allows you set a color for the slide background - note that you can have both a slide background color AND a slide background image. The small background preview window to the left of these settings give you an indication on how the settings you choose will look.
|
70 |
+
|
71 |
+
The `Min Height` setting (within the `Slider Style` box), is often used in conjunction with defining slide backgrounds, as this setting controls how much of the slide background is visible if the slide contains no (foreground) content.
|
72 |
+
|
73 |
+
= How do I use the `Slider Style` settings? =
|
74 |
+
|
75 |
+
At the top of this box, which appears on the right-hand side when editing a slider, you can set and copy the CSS `ID` for the slider. This is useful for developers who are familiar with CSS coding, and this CSS `ID` can be used to create custom styles for your slider within your theme or child-theme's style/CSS file.
|
76 |
+
|
77 |
+
The `Padding (pixels)` settings are used to define the amount of padding space around the entire slider - top, right, bottom and left. The `Background/Border` settings define the background colour for the entire slider (`Note:` each slide's background image/color will appear on top of this slider background), and also if a border should appear around the entire slider - the width, color and border radius of this border.
|
78 |
+
|
79 |
+
The `SLIDE STYLE` settings are the style settings for each individual slide with the slider/carousel. Here you can define the minimum height each slide and also the padding space around each slide.
|
80 |
+
|
81 |
+
== Screenshots ==
|
82 |
+
|
83 |
+
1. The Create/Edit slider page within the WordPress Dashboard - this is where you define the settings and create the slides for your `Slide Anything` slider or carousel.
|
84 |
+
2. How a carousel created using `Slide Anything` appears within the slider preview popup.
|
85 |
+
|
86 |
+
== Changelog ==
|
87 |
+
|
88 |
+
= 1.0 =
|
89 |
+
* Initial release of this plugin.
|
90 |
+
|
91 |
+
= 1.1 =
|
92 |
+
* Added a slider preview feature to the slider edit page - pressing the 'Preview' button displays the slider within a popup window.
|
93 |
+
|
94 |
+
= 1.2 =
|
95 |
+
* Added a button to the visual editor on pages and posts which displays a list of all sliders you have created, allow you to select a slider and the corresponding shortcode is automatically inserted into your page or post.
|
96 |
+
* Added the 'Random Order' checkbox to the edit slider page, and when checked slides will be randomly re-ordered whenever the slider is displayed
|
97 |
+
* Fixed issue with the 'delete plugin' function, which was crashing
|
98 |
+
|
99 |
+
= 1.3 =
|
100 |
+
* Added setting to add a margin left and right of each slide
|
101 |
+
|
102 |
+
= 1.4 =
|
103 |
+
* Bug Fix: Added `Allow Shortcodes` setting. Running shortcodes within `Slide Anything` may cause issues with some Wordpress Page Builders, and disable this setting will resolve this issue if it occurs.
|
104 |
+
* Added a new `Items Displayed` setting to set the number of slides to be displayed on screen resolutions over 1400 pixels
|
105 |
+
* Added a new `Autohide Arrows` setting to enable/displayed the autohide feature for slider navigation arrows
|
106 |
+
|
107 |
+
= 1.5 =
|
108 |
+
* Bug Fix: Fixed issue with some HTML elements/attributes being stripped out when certain shortcodes are used within slide content - found an alternative to KSES sanitization for slide content.
|
109 |
+
* Added a new dropdown option 'Background Position' for the slide background of each slide
|
110 |
+
|
111 |
+
= 1.6 =
|
112 |
+
* Added `Slide Transition` setting to set the transition of 1-Items Sliders to a 'fade', 'backSlide', 'goDown' or 'fadeUp' transition effect
|
113 |
+
* Added checkboxes to enable/disable `mouseDrag` and `touchDrag` carousel settings
|
114 |
+
* Some small bug fixes
|
115 |
+
|
116 |
+
= 1.6.1 =
|
117 |
+
* Bug Fix: Fixed minor issue when editing slide content within the WordPress Dashboard using the Text Editor. If HTML tags are not properly closed, then this was causing an issue - added the WordPress 'balanceTags()' function to correct this issue.
|
118 |
+
|
119 |
+
= 1.6.2 =
|
120 |
+
* Bug Fix: Fixed minor issue with IE 10 and IE 11 - the 'fade' and 'fade up' transition effects were not working.
|
121 |
+
|
122 |
+
= 2.0 =
|
123 |
+
* Rebuilt Slide Anything using Owl Carousel version 2.
|
124 |
+
|
125 |
+
= 2.0.1 =
|
126 |
+
* Some required CSS files were missing from the WordPress repository and therefore ZIP download. Quick patch to rectify this.
|
127 |
+
|
128 |
+
= 2.0.2 =
|
129 |
+
* Some small 'post version 2' bug fixes.
|
130 |
+
|
131 |
+
= 2.0.3 =
|
132 |
+
* Removed array dereferencing from PHP code, which causes a fatal error on web hosts using a PHP version prior to version 5.4.
|
133 |
+
|
134 |
+
= 2.0.4 =
|
135 |
+
* Fixed CSS bug with slide images (IMG tags) being resized to 100% of slide width.
|
136 |
+
|
137 |
+
= 2.0.5 =
|
138 |
+
* Fixed bug with slide 'min-height' percentage calculation.
|
139 |
+
* Changed Slide Anything Javascript loading to now load using '$(document).ready' instead of '$(window).load'.
|
140 |
+
|
141 |
+
= 2.0.6 =
|
142 |
+
* Increase number of slides allowed from 50 to 99.
|
143 |
+
* Added Owl Carousel 2.0 URL Hash Navigation feature
|
144 |
+
* Minor bug fixes
|
145 |
+
|
146 |
+
= 2.0.7 =
|
147 |
+
* Removed Owl Carousel 2.0 URL Hash Navigation feature
|
148 |
+
|
149 |
+
= 2.0.8 =
|
150 |
+
* Minor bug fix
|
151 |
+
|
152 |
+
= 2.0.9 =
|
153 |
+
* Added new 'Reverse Order' Checkbox to backend editor, which reverses the order of the slides created
|
154 |
+
* Added a 'Preview Slider' button to the backend editor - when clicked a popup modal is displayed containing a preview of the Slide Anything Slider
|
155 |
+
|
156 |
+
= 2.0.10 =
|
157 |
+
* Minor Bug Fix
|
158 |
+
|
159 |
+
= 2.0.11 =
|
160 |
+
* Bug Fix - Before generating Slide Anything JavaScript code, check if jQuery has been loaded loaded. If not, then 'Enqueue' jQuery script
|
161 |
+
|
162 |
+
= 2.0.12 =
|
163 |
+
* Bug Fix - Changed the location where the jQuery script is enqueued
|
164 |
+
|
165 |
+
= 2.0.13 =
|
166 |
+
* Bug Fix - Fixed a clash with the 'Envira Gallery' plugin
|
167 |
+
|
168 |
+
= 2.0.14 =
|
169 |
+
* Fix for using shortcodes inside of anything that already hooks into 'the_content'
|
170 |
+
|
171 |
+
= 2.0.15 =
|
172 |
+
* Modified plugin so that WordPress users with an 'Editor' role can save/update sliders
|
173 |
+
|
174 |
+
= 2.0.16 =
|
175 |
+
* Bug Fix: Modified WP Dashboard PHP code so that only a Slider 'CSS ID' containing letters (upper/lowercase) or Underscore '_' characters will be accepted. Using Dashes '-' within the CSS ID would cause a Javascript error.
|
176 |
+
|
177 |
+
= 2.0.17 =
|
178 |
+
* Added a new 'Slide By' setting to set the number of slides to slide per transition
|
179 |
+
|
180 |
+
= 2.0.18 =
|
181 |
+
* Minor Bug Fix
|
182 |
+
|
183 |
+
= 2.1.0 =
|
184 |
+
* Replaced 'Owl Carousel 2.2.1' with 'Owl Carousel 2.3 BETA'.
|
185 |
+
* Upgrading Owl Carousel fixes an issue with Slide Anything that has been reported to me on numerous occasions - namely if you switch TABS within your browser, switch to another application, or minimise your browser window, then the Slider/Carousel stops (i.e. no more transitions), and the page needs to be reloaded to 'restart' the slider.
|
186 |
+
* Although a BETA, version 2.3 seems pretty stable, and OC has been sitting at version 2.1.1 for over a year now.
|
187 |
+
|
188 |
+
= 2.1.1 =
|
189 |
+
* Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
|
190 |
+
|
191 |
+
= 2.1.2 =
|
192 |
+
* Added a new feature to allow you to set slider minimum height in pixels
|
193 |
+
* Added a new feature so that each slide within a slider has its own unique CSS ID
|
194 |
+
|
195 |
+
= 2.1.3 =
|
196 |
+
* Minor bug fix with Slide Anything PRO Software Licensing integration
|
197 |
+
|
198 |
+
= 2.1.4 =
|
199 |
+
* Upgraded Owl Carousel from version 2.3 BETA to version 2.3.3 (production release)
|
200 |
+
|
201 |
+
= 2.1.5 =
|
202 |
+
* Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
|
203 |
+
|
204 |
+
= 2.1.6 =
|
205 |
+
* Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.
|
206 |
+
|
207 |
+
= 2.1.7 =
|
208 |
+
* Minor bug fix with new 'Auto Height' feature
|
209 |
+
|
210 |
+
= 2.1.8 =
|
211 |
+
* Added the Slide By 'page' option, which is set by setting the 'Slide By' slider input to 0.
|
212 |
+
* For Slide Anything PRO YouTube video popups, added the 'rel=0' paramerter so that related videos are not displayed at the end of a video playback. This has been requested quite a bit, and I have modified the 'Magnific Popup' code so that this parameter is added to the iframe code generated.
|
213 |
+
|
214 |
+
= 2.1.9 =
|
215 |
+
* Added a new 'Use window.onload event' checkbox setting. By default, Slide Anything loads it JavaSctipt/jQuery code during the 'document.ready' event. If this new option is checked, then the JavaSctipt/jQuery code is loaded during the 'window.onload' event, and this event is only executed after all the assets for the page have been loaded - all images, CSS etc. Using this option solves an issue that sometimes occurs when inserting a Slide Anything slider into a Visual Composer full-width section, and these full-width containers are created/calculated dynamically by adding negative left/right margins to the container after the SA JavaScript/jQuery code is executed.
|
216 |
+
|
217 |
+
= 2.1.10 =
|
218 |
+
* Minor bug fix for the new 'Use window.onload event' checkbox setting.
|
219 |
+
|
220 |
+
= 2.1.11 =
|
221 |
+
* Fixed a bug that occurred when migrating a WP site to another domain location (e.g. transferring a staging/test WP site to a Live WP site). The SA slider would not work on the new domain unless it was re-saved in the back-end. This has now been fixed with this release.
|
222 |
+
|
223 |
+
= 2.1.12 =
|
224 |
+
* Added the new feature (checkbox) 'Remove JavaScript Content'. When checked, JavaScript content (<script> tags) are removed from slide content.
|
225 |
+
|
226 |
+
= 2.1.13 =
|
227 |
+
* Bug fix - An array initialisation was causing a crash on hosts using a PHP version prior to 5.4. Changed this array initialisation to now be backwards compatible.
|
228 |
+
|
229 |
+
= 2.1.14 =
|
230 |
+
* Bug fix - Fixed a small bug with the "Remove JavaScript Content" feature.
|
231 |
+
|
232 |
+
== Upgrade Notice ==
|
233 |
+
|
234 |
+
= 1.0 =
|
235 |
+
* Initial release of this plugin.
|
236 |
+
|
237 |
+
= 1.1 =
|
238 |
+
* Preview sliders created within the WordPress Dashboard.
|
239 |
+
|
240 |
+
= 1.2 =
|
241 |
+
* Added button to visual editor in pages/popsts to automatically insert slider shortcode
|
242 |
+
* Added 'Random Order' option to randomly display slides for sliders
|
243 |
+
|
244 |
+
= 1.3 =
|
245 |
+
* Added setting to add a margin left and right of each slide
|
246 |
+
|
247 |
+
= 1.4 =
|
248 |
+
* Bug Fix: Added `Allow Shortcodes` setting. Running shortcodes within `Slide Anything` may cause issues with some Wordpress Page Builders, and disable this setting will resolve this issue if it occurs.
|
249 |
+
* Added a new `Items Displayed` setting to set the number of slides to be displayed on screen resolutions over 1400 pixels
|
250 |
+
* Added a new `Autohide Arrows` setting to enable/displayed the autohide feature for slider navigation arrows
|
251 |
+
|
252 |
+
= 1.5 =
|
253 |
+
* Bug Fix: Fixed issue with some HTML elements/attributes being stripped out when certain shortcodes are used within slide content - found an alternative to KSES sanitization for slide content.
|
254 |
+
* Added a new dropdown option 'Background Position' for the slide background of each slide
|
255 |
+
|
256 |
+
= 1.6 =
|
257 |
+
* Added `Slide Transition` setting to set the transition of 1-Items Sliders to a 'fade', 'backSlide', 'goDown' or 'fadeUp' transition effect
|
258 |
+
* Added checkboxes to enable/disable `mouseDrag` and `touchDrag` carousel settings
|
259 |
+
* Some small bug fixes
|
260 |
+
|
261 |
+
= 1.6.1 =
|
262 |
+
* Bug Fix: Fixed minor issue when editing slide content within the WordPress Dashboard using the Text Editor. If HTML tags are not properly closed, then this was causing an issue - added the WordPress 'balanceTags()' function to correct this issue.
|
263 |
+
|
264 |
+
= 1.6.2 =
|
265 |
+
* Bug Fix: Fixed minor issue with IE 10 and IE 11 - the 'fade' and 'fade up' transition effects were not working.
|
266 |
+
|
267 |
+
= 2.0 =
|
268 |
+
* Rebuilt Slide Anything using Owl Carousel version 2.
|
269 |
+
|
270 |
+
= 2.0.1 =
|
271 |
+
* Some required CSS files were missing from the WordPress repository and therefore ZIP download. Quick patch to rectify this.
|
272 |
+
|
273 |
+
= 2.0.2 =
|
274 |
+
* Some small 'post version 2' bug fixes.
|
275 |
+
|
276 |
+
= 2.0.3 =
|
277 |
+
* Removed array dereferencing from PHP code, which causes a fatal error on web hosts using a PHP version prior to version 5.4.
|
278 |
+
|
279 |
+
= 2.0.4 =
|
280 |
+
* Fixed CSS bug with slide images (IMG tags) being resized to 100% of slide width.
|
281 |
+
|
282 |
+
= 2.0.5 =
|
283 |
+
* Fixed bug with slide 'min-height' percentage calculation.
|
284 |
+
* Changed Slide Anything Javascript loading to now load using '$(document).ready' instead of '$(window).load'.
|
285 |
+
|
286 |
+
= 2.0.6 =
|
287 |
+
* Increase number of slides allowed from 50 to 99.
|
288 |
+
* Added Owl Carousel 2.0 URL Hash Navigation feature
|
289 |
+
* Minor bug fixes
|
290 |
+
|
291 |
+
= 2.0.7 =
|
292 |
+
* Removed Owl Carousel 2.0 URL Hash Navigation feature
|
293 |
+
|
294 |
+
= 2.0.8 =
|
295 |
+
* Minor bug fix
|
296 |
+
|
297 |
+
= 2.0.9 =
|
298 |
+
* Added new 'Reverse Order' Checkbox to backend editor, which reverses the order of the slides created
|
299 |
+
* Added a 'Preview Slider' button to the backend editor - when clicked a popup modal is displayed containing a preview of the Slide Anything Slider
|
300 |
+
|
301 |
+
= 2.0.10 =
|
302 |
+
* Minor Bug Fix
|
303 |
+
|
304 |
+
= 2.0.11 =
|
305 |
+
* Bug Fix - Before generating Slide Anything JavaScript code, check if jQuery has been loaded loaded. If not, then 'Enqueue' jQuery script
|
306 |
+
|
307 |
+
= 2.0.12 =
|
308 |
+
* Bug Fix - Changed the location where the jQuery script is enqueued
|
309 |
+
|
310 |
+
= 2.0.13 =
|
311 |
+
* Bug Fix - Fixed a clash with the 'Envira Gallery' plugin
|
312 |
+
|
313 |
+
= 2.0.14 =
|
314 |
+
* Fix for using shortcodes inside of anything that already hooks into 'the_content'
|
315 |
+
|
316 |
+
= 2.0.15 =
|
317 |
+
* Modified plugin so that WordPress users with an 'Editor' role can save/update sliders
|
318 |
+
|
319 |
+
= 2.0.16 =
|
320 |
+
* Bug Fix: Modified WP Dashboard PHP code so that only a Slider 'CSS ID' containing letters (upper/lowercase) or Underscore '_' characters will be accepted. Using Dashes '-' within the CSS ID would cause a Javascript error.
|
321 |
+
|
322 |
+
= 2.0.17 =
|
323 |
+
* Added a new 'Slide By' setting to set the number of slides to slide per transition
|
324 |
+
|
325 |
+
= 2.0.18 =
|
326 |
+
* Minor Bug Fix
|
327 |
+
|
328 |
+
= 2.1.0 =
|
329 |
+
* Replaced 'Owl Carousel 2.2.1' with 'Owl Carousel 2.3 BETA'.
|
330 |
+
* Upgrading Owl Carousel fixes an issue with Slide Anything that has been reported to me on numerous occasions - namely if you switch TABS within your browser, switch to another application, or minimise your browser window, then the Slider/Carousel stops (i.e. no more transitions), and the page needs to be reloaded to 'restart' the slider.
|
331 |
+
* Although a BETA, version 2.3 seems pretty stable, and OC has been sitting at version 2.1.1 for over a year now.
|
332 |
+
|
333 |
+
= 2.1.1 =
|
334 |
+
* Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
|
335 |
+
|
336 |
+
= 2.1.2 =
|
337 |
+
* Added a new feature to allow you to set slider minimum height in pixels
|
338 |
+
* Added a new feature so that each slide within a slider has its own unique CSS ID
|
339 |
+
|
340 |
+
= 2.1.3 =
|
341 |
+
* Minor bug fix with Slide Anything PRO Software Licensing integration
|
342 |
+
|
343 |
+
= 2.1.4 =
|
344 |
+
* Upgraded Owl Carousel from version 2.3 BETA to version 2.3.3 (production release)
|
345 |
+
|
346 |
+
= 2.1.5 =
|
347 |
+
* Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
|
348 |
+
|
349 |
+
= 2.1.6 =
|
350 |
+
* Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.
|
351 |
+
|
352 |
+
= 2.1.7 =
|
353 |
+
* Minor bug fix with new 'Auto Height' feature
|
354 |
+
|
355 |
+
= 2.1.8 =
|
356 |
+
* Added the Slide By 'page' option, which is set by setting the 'Slide By' slider input to 0.
|
357 |
+
* For Slide Anything PRO YouTube video popups, added the 'rel=0' paramerter so that related videos are not displayed at the end of a video playback. This has been requested quite a bit, and I have modified the 'Magnific Popup' code so that this parameter is added to the iframe code generated.
|
358 |
+
|
359 |
+
= 2.1.9 =
|
360 |
+
* Added a new 'Use window.onload event' checkbox setting. By default, Slide Anything loads it JavaSctipt/jQuery code during the 'document.ready' event. If this new option is checked, then the JavaSctipt/jQuery code is loaded during the 'window.onload' event, and this event is only executed after all the assets for the page have been loaded - all images, CSS etc. Using this option solves an issue that sometimes occurs when inserting a Slide Anything slider into a Visual Composer full-width section, and these full-width containers are created/calculated dynamically by adding negative left/right margins to the container after the SA JavaScript/jQuery code is executed.
|
361 |
+
|
362 |
+
= 2.1.10 =
|
363 |
+
* Minor bug fix for the new 'Use window.onload event' checkbox setting.
|
364 |
+
|
365 |
+
= 2.1.11 =
|
366 |
+
* Fixed a bug that occurred when migrating a WP site to another domain location (e.g. transferring a staging/test WP site to a Live WP site). The SA slider would not work on the new domain unless it was re-saved in the back-end. This has now been fixed with this release.
|
367 |
+
|
368 |
+
= 2.1.12 =
|
369 |
+
* Added the new feature (checkbox) 'Remove JavaScript Content'. When checked, JavaScript content (<script> tags) are removed from slide content.
|
370 |
+
|
371 |
+
= 2.1.13 =
|
372 |
+
* Bug fix - An array initialisation was causing a crash on hosts using a PHP version prior to 5.4. Changed this array initialisation to now be backwards compatible.
|
373 |
+
|
374 |
+
= 2.1.14 =
|
375 |
+
* Bug fix - Fixed a small bug with the "Remove JavaScript Content" feature.
|
trunk/slide-anything.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Slide Anything - Responsive Content / HTML Slider and Carousel
|
4 |
+
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
+
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
+
* Author: Simon Edge
|
7 |
+
* Version: 2.1.14
|
8 |
+
* License: GPLv2 or later
|
9 |
+
*/
|
10 |
+
|
11 |
+
if (!defined('ABSPATH')) exit; // EXIT IF ACCESSED DIRECTLY
|
12 |
+
|
13 |
+
// SET CONSTANT FOR PLUGIN PATH
|
14 |
+
define('SA_PLUGIN_PATH', plugins_url('/', __FILE__));
|
15 |
+
|
16 |
+
require 'php/slide-anything-admin.php';
|
17 |
+
require 'php/slide-anything-frontend.php';
|
18 |
+
|
19 |
+
/* ##### PLUGIN ACTIVATION HOOK ##### */
|
20 |
+
register_activation_hook(__FILE__, 'cpt_slider_plugin_activation' );
|
21 |
+
|
22 |
+
/* ##### ADD ACTION HOOKS & FILTERS FOR PLUGIN ##### */
|
23 |
+
add_action('admin_enqueue_scripts', 'cpt_register_admin_scripts', 999999);
|
24 |
+
add_action('init', 'cpt_slider_register');
|
25 |
+
add_action('post_row_actions', 'cpt_slider_row_actions', 10, 2);
|
26 |
+
add_action('add_meta_boxes', 'cpt_slider_add_meta_boxes');
|
27 |
+
add_action('save_post', 'cpt_slider_save_postdata');
|
28 |
+
add_filter('manage_sa_slider_posts_columns', 'cpt_slider_modify_columns');
|
29 |
+
add_filter('manage_sa_slider_posts_custom_column', 'cpt_slider_custom_column_content');
|
30 |
+
add_action('admin_head', 'add_tinymce_button');
|
31 |
+
add_action('admin_footer', 'get_tinymce_shortcode_array', 9999999);
|
32 |
+
|
33 |
+
// SLIDE ANYTHING 2.0 UPGRADE NOTICE
|
34 |
+
add_action('admin_notices', 'version_20_upgrade_notice');
|
35 |
+
add_action('admin_init', 'slide_anything_notice_ignore');
|
36 |
+
?>
|
trunk/spectrum/spectrum.css
ADDED
@@ -0,0 +1,507 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/***
|
2 |
+
Spectrum Colorpicker v1.8.0
|
3 |
+
https://github.com/bgrins/spectrum
|
4 |
+
Author: Brian Grinstead
|
5 |
+
License: MIT
|
6 |
+
***/
|
7 |
+
|
8 |
+
.sp-container {
|
9 |
+
position:absolute;
|
10 |
+
top:0;
|
11 |
+
left:0;
|
12 |
+
display:inline-block;
|
13 |
+
*display: inline;
|
14 |
+
*zoom: 1;
|
15 |
+
/* https://github.com/bgrins/spectrum/issues/40 */
|
16 |
+
z-index: 9999994;
|
17 |
+
overflow: hidden;
|
18 |
+
}
|
19 |
+
.sp-container.sp-flat {
|
20 |
+
position: relative;
|
21 |
+
}
|
22 |
+
|
23 |
+
/* Fix for * { box-sizing: border-box; } */
|
24 |
+
.sp-container,
|
25 |
+
.sp-container * {
|
26 |
+
-webkit-box-sizing: content-box;
|
27 |
+
-moz-box-sizing: content-box;
|
28 |
+
box-sizing: content-box;
|
29 |
+
}
|
30 |
+
|
31 |
+
/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
|
32 |
+
.sp-top {
|
33 |
+
position:relative;
|
34 |
+
width: 100%;
|
35 |
+
display:inline-block;
|
36 |
+
}
|
37 |
+
.sp-top-inner {
|
38 |
+
position:absolute;
|
39 |
+
top:0;
|
40 |
+
left:0;
|
41 |
+
bottom:0;
|
42 |
+
right:0;
|
43 |
+
}
|
44 |
+
.sp-color {
|
45 |
+
position: absolute;
|
46 |
+
top:0;
|
47 |
+
left:0;
|
48 |
+
bottom:0;
|
49 |
+
right:20%;
|
50 |
+
}
|
51 |
+
.sp-hue {
|
52 |
+
position: absolute;
|
53 |
+
top:0;
|
54 |
+
right:0;
|
55 |
+
bottom:0;
|
56 |
+
left:84%;
|
57 |
+
height: 100%;
|
58 |
+
}
|
59 |
+
|
60 |
+
.sp-clear-enabled .sp-hue {
|
61 |
+
top:33px;
|
62 |
+
height: 77.5%;
|
63 |
+
}
|
64 |
+
|
65 |
+
.sp-fill {
|
66 |
+
padding-top: 80%;
|
67 |
+
}
|
68 |
+
.sp-sat, .sp-val {
|
69 |
+
position: absolute;
|
70 |
+
top:0;
|
71 |
+
left:0;
|
72 |
+
right:0;
|
73 |
+
bottom:0;
|
74 |
+
}
|
75 |
+
|
76 |
+
.sp-alpha-enabled .sp-top {
|
77 |
+
margin-bottom: 18px;
|
78 |
+
}
|
79 |
+
.sp-alpha-enabled .sp-alpha {
|
80 |
+
display: block;
|
81 |
+
}
|
82 |
+
.sp-alpha-handle {
|
83 |
+
position:absolute;
|
84 |
+
top:-4px;
|
85 |
+
bottom: -4px;
|
86 |
+
width: 6px;
|
87 |
+
left: 50%;
|
88 |
+
cursor: pointer;
|
89 |
+
border: 1px solid black;
|
90 |
+
background: white;
|
91 |
+
opacity: .8;
|
92 |
+
}
|
93 |
+
.sp-alpha {
|
94 |
+
display: none;
|
95 |
+
position: absolute;
|
96 |
+
bottom: -14px;
|
97 |
+
right: 0;
|
98 |
+
left: 0;
|
99 |
+
height: 8px;
|
100 |
+
}
|
101 |
+
.sp-alpha-inner {
|
102 |
+
border: solid 1px #333;
|
103 |
+
}
|
104 |
+
|
105 |
+
.sp-clear {
|
106 |
+
display: none;
|
107 |
+
}
|
108 |
+
|
109 |
+
.sp-clear.sp-clear-display {
|
110 |
+
background-position: center;
|
111 |
+
}
|
112 |
+
|
113 |
+
.sp-clear-enabled .sp-clear {
|
114 |
+
display: block;
|
115 |
+
position:absolute;
|
116 |
+
top:0px;
|
117 |
+
right:0;
|
118 |
+
bottom:0;
|
119 |
+
left:84%;
|
120 |
+
height: 28px;
|
121 |
+
}
|
122 |
+
|
123 |
+
/* Don't allow text selection */
|
124 |
+
.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
|
125 |
+
-webkit-user-select:none;
|
126 |
+
-moz-user-select: -moz-none;
|
127 |
+
-o-user-select:none;
|
128 |
+
user-select: none;
|
129 |
+
}
|
130 |
+
|
131 |
+
.sp-container.sp-input-disabled .sp-input-container {
|
132 |
+
display: none;
|
133 |
+
}
|
134 |
+
.sp-container.sp-buttons-disabled .sp-button-container {
|
135 |
+
display: none;
|
136 |
+
}
|
137 |
+
.sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
|
138 |
+
display: none;
|
139 |
+
}
|
140 |
+
.sp-palette-only .sp-picker-container {
|
141 |
+
display: none;
|
142 |
+
}
|
143 |
+
.sp-palette-disabled .sp-palette-container {
|
144 |
+
display: none;
|
145 |
+
}
|
146 |
+
|
147 |
+
.sp-initial-disabled .sp-initial {
|
148 |
+
display: none;
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
|
153 |
+
.sp-sat {
|
154 |
+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
|
155 |
+
background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
|
156 |
+
background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
157 |
+
background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
158 |
+
background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
159 |
+
background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
|
160 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
|
161 |
+
filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
|
162 |
+
}
|
163 |
+
.sp-val {
|
164 |
+
background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
|
165 |
+
background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
|
166 |
+
background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
167 |
+
background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
168 |
+
background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
169 |
+
background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
|
170 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
|
171 |
+
filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
|
172 |
+
}
|
173 |
+
|
174 |
+
.sp-hue {
|
175 |
+
background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
176 |
+
background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
177 |
+
background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
178 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
|
179 |
+
background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
180 |
+
background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
181 |
+
}
|
182 |
+
|
183 |
+
/* IE filters do not support multiple color stops.
|
184 |
+
Generate 6 divs, line them up, and do two color gradients for each.
|
185 |
+
Yes, really.
|
186 |
+
*/
|
187 |
+
.sp-1 {
|
188 |
+
height:17%;
|
189 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
|
190 |
+
}
|
191 |
+
.sp-2 {
|
192 |
+
height:16%;
|
193 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
|
194 |
+
}
|
195 |
+
.sp-3 {
|
196 |
+
height:17%;
|
197 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
|
198 |
+
}
|
199 |
+
.sp-4 {
|
200 |
+
height:17%;
|
201 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
|
202 |
+
}
|
203 |
+
.sp-5 {
|
204 |
+
height:16%;
|
205 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
|
206 |
+
}
|
207 |
+
.sp-6 {
|
208 |
+
height:17%;
|
209 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
|
210 |
+
}
|
211 |
+
|
212 |
+
.sp-hidden {
|
213 |
+
display: none !important;
|
214 |
+
}
|
215 |
+
|
216 |
+
/* Clearfix hack */
|
217 |
+
.sp-cf:before, .sp-cf:after { content: ""; display: table; }
|
218 |
+
.sp-cf:after { clear: both; }
|
219 |
+
.sp-cf { *zoom: 1; }
|
220 |
+
|
221 |
+
/* Mobile devices, make hue slider bigger so it is easier to slide */
|
222 |
+
@media (max-device-width: 480px) {
|
223 |
+
.sp-color { right: 40%; }
|
224 |
+
.sp-hue { left: 63%; }
|
225 |
+
.sp-fill { padding-top: 60%; }
|
226 |
+
}
|
227 |
+
.sp-dragger {
|
228 |
+
border-radius: 5px;
|
229 |
+
height: 5px;
|
230 |
+
width: 5px;
|
231 |
+
border: 1px solid #fff;
|
232 |
+
background: #000;
|
233 |
+
cursor: pointer;
|
234 |
+
position:absolute;
|
235 |
+
top:0;
|
236 |
+
left: 0;
|
237 |
+
}
|
238 |
+
.sp-slider {
|
239 |
+
position: absolute;
|
240 |
+
top:0;
|
241 |
+
cursor:pointer;
|
242 |
+
height: 3px;
|
243 |
+
left: -1px;
|
244 |
+
right: -1px;
|
245 |
+
border: 1px solid #000;
|
246 |
+
background: white;
|
247 |
+
opacity: .8;
|
248 |
+
}
|
249 |
+
|
250 |
+
/*
|
251 |
+
Theme authors:
|
252 |
+
Here are the basic themeable display options (colors, fonts, global widths).
|
253 |
+
See http://bgrins.github.io/spectrum/themes/ for instructions.
|
254 |
+
*/
|
255 |
+
|
256 |
+
.sp-container {
|
257 |
+
border-radius: 0;
|
258 |
+
background-color: #ECECEC;
|
259 |
+
border: solid 1px #f0c49B;
|
260 |
+
padding: 0;
|
261 |
+
}
|
262 |
+
.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
|
263 |
+
font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
264 |
+
-webkit-box-sizing: border-box;
|
265 |
+
-moz-box-sizing: border-box;
|
266 |
+
-ms-box-sizing: border-box;
|
267 |
+
box-sizing: border-box;
|
268 |
+
}
|
269 |
+
.sp-top {
|
270 |
+
margin-bottom: 3px;
|
271 |
+
}
|
272 |
+
.sp-color, .sp-hue, .sp-clear {
|
273 |
+
border: solid 1px #666;
|
274 |
+
}
|
275 |
+
|
276 |
+
/* Input */
|
277 |
+
.sp-input-container {
|
278 |
+
float:right;
|
279 |
+
width: 100px;
|
280 |
+
margin-bottom: 4px;
|
281 |
+
}
|
282 |
+
.sp-initial-disabled .sp-input-container {
|
283 |
+
width: 100%;
|
284 |
+
}
|
285 |
+
.sp-input {
|
286 |
+
font-size: 12px !important;
|
287 |
+
border: 1px inset;
|
288 |
+
padding: 4px 5px;
|
289 |
+
margin: 0;
|
290 |
+
width: 100%;
|
291 |
+
background:transparent;
|
292 |
+
border-radius: 3px;
|
293 |
+
color: #222;
|
294 |
+
}
|
295 |
+
.sp-input:focus {
|
296 |
+
border: 1px solid orange;
|
297 |
+
}
|
298 |
+
.sp-input.sp-validation-error {
|
299 |
+
border: 1px solid red;
|
300 |
+
background: #fdd;
|
301 |
+
}
|
302 |
+
.sp-picker-container , .sp-palette-container {
|
303 |
+
float:left;
|
304 |
+
position: relative;
|
305 |
+
padding: 10px;
|
306 |
+
padding-bottom: 300px;
|
307 |
+
margin-bottom: -290px;
|
308 |
+
}
|
309 |
+
.sp-picker-container {
|
310 |
+
width: 172px;
|
311 |
+
border-left: solid 1px #fff;
|
312 |
+
}
|
313 |
+
|
314 |
+
/* Palettes */
|
315 |
+
.sp-palette-container {
|
316 |
+
border-right: solid 1px #ccc;
|
317 |
+
}
|
318 |
+
|
319 |
+
.sp-palette-only .sp-palette-container {
|
320 |
+
border: 0;
|
321 |
+
}
|
322 |
+
|
323 |
+
.sp-palette .sp-thumb-el {
|
324 |
+
display: block;
|
325 |
+
position:relative;
|
326 |
+
float:left;
|
327 |
+
width: 24px;
|
328 |
+
height: 15px;
|
329 |
+
margin: 3px;
|
330 |
+
cursor: pointer;
|
331 |
+
border:solid 2px transparent;
|
332 |
+
}
|
333 |
+
.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
|
334 |
+
border-color: orange;
|
335 |
+
}
|
336 |
+
.sp-thumb-el {
|
337 |
+
position:relative;
|
338 |
+
}
|
339 |
+
|
340 |
+
/* Initial */
|
341 |
+
.sp-initial {
|
342 |
+
float: left;
|
343 |
+
border: solid 1px #333;
|
344 |
+
}
|
345 |
+
.sp-initial span {
|
346 |
+
width: 30px;
|
347 |
+
height: 25px;
|
348 |
+
border:none;
|
349 |
+
display:block;
|
350 |
+
float:left;
|
351 |
+
margin:0;
|
352 |
+
}
|
353 |
+
|
354 |
+
.sp-initial .sp-clear-display {
|
355 |
+
background-position: center;
|
356 |
+
}
|
357 |
+
|
358 |
+
/* Buttons */
|
359 |
+
.sp-palette-button-container,
|
360 |
+
.sp-button-container {
|
361 |
+
float: right;
|
362 |
+
}
|
363 |
+
|
364 |
+
/* Replacer (the little preview div that shows up instead of the <input>) */
|
365 |
+
.sp-replacer {
|
366 |
+
margin:0;
|
367 |
+
overflow:hidden;
|
368 |
+
cursor:pointer;
|
369 |
+
padding: 4px;
|
370 |
+
display:inline-block;
|
371 |
+
*zoom: 1;
|
372 |
+
*display: inline;
|
373 |
+
border: solid 1px #91765d;
|
374 |
+
background: #eee;
|
375 |
+
color: #333;
|
376 |
+
vertical-align: middle;
|
377 |
+
}
|
378 |
+
.sp-replacer:hover, .sp-replacer.sp-active {
|
379 |
+
border-color: #F0C49B;
|
380 |
+
color: #111;
|
381 |
+
}
|
382 |
+
.sp-replacer.sp-disabled {
|
383 |
+
cursor:default;
|
384 |
+
border-color: silver;
|
385 |
+
color: silver;
|
386 |
+
}
|
387 |
+
.sp-dd {
|
388 |
+
padding: 2px 0;
|
389 |
+
height: 16px;
|
390 |
+
line-height: 16px;
|
391 |
+
float:left;
|
392 |
+
font-size:10px;
|
393 |
+
}
|
394 |
+
.sp-preview {
|
395 |
+
position:relative;
|
396 |
+
width:25px;
|
397 |
+
height: 20px;
|
398 |
+
border: solid 1px #222;
|
399 |
+
margin-right: 5px;
|
400 |
+
float:left;
|
401 |
+
z-index: 0;
|
402 |
+
}
|
403 |
+
|
404 |
+
.sp-palette {
|
405 |
+
*width: 220px;
|
406 |
+
max-width: 220px;
|
407 |
+
}
|
408 |
+
.sp-palette .sp-thumb-el {
|
409 |
+
width:16px;
|
410 |
+
height: 16px;
|
411 |
+
margin:2px 1px;
|
412 |
+
border: solid 1px #d0d0d0;
|
413 |
+
}
|
414 |
+
|
415 |
+
.sp-container {
|
416 |
+
padding-bottom:0;
|
417 |
+
}
|
418 |
+
|
419 |
+
|
420 |
+
/* Buttons: http://hellohappy.org/css3-buttons/ */
|
421 |
+
.sp-container button {
|
422 |
+
background-color: #eeeeee;
|
423 |
+
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
|
424 |
+
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
|
425 |
+
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
|
426 |
+
background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
|
427 |
+
background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
|
428 |
+
border: 1px solid #ccc;
|
429 |
+
border-bottom: 1px solid #bbb;
|
430 |
+
border-radius: 3px;
|
431 |
+
color: #333;
|
432 |
+
font-size: 14px;
|
433 |
+
line-height: 1;
|
434 |
+
padding: 5px 4px;
|
435 |
+
text-align: center;
|
436 |
+
text-shadow: 0 1px 0 #eee;
|
437 |
+
vertical-align: middle;
|
438 |
+
}
|
439 |
+
.sp-container button:hover {
|
440 |
+
background-color: #dddddd;
|
441 |
+
background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
|
442 |
+
background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
|
443 |
+
background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
|
444 |
+
background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
|
445 |
+
background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
|
446 |
+
border: 1px solid #bbb;
|
447 |
+
border-bottom: 1px solid #999;
|
448 |
+
cursor: pointer;
|
449 |
+
text-shadow: 0 1px 0 #ddd;
|
450 |
+
}
|
451 |
+
.sp-container button:active {
|
452 |
+
border: 1px solid #aaa;
|
453 |
+
border-bottom: 1px solid #888;
|
454 |
+
-webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
455 |
+
-moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
456 |
+
-ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
457 |
+
-o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
458 |
+
box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
459 |
+
}
|
460 |
+
.sp-cancel {
|
461 |
+
font-size: 11px;
|
462 |
+
color: #d93f3f !important;
|
463 |
+
margin:0;
|
464 |
+
padding:2px;
|
465 |
+
margin-right: 5px;
|
466 |
+
vertical-align: middle;
|
467 |
+
text-decoration:none;
|
468 |
+
|
469 |
+
}
|
470 |
+
.sp-cancel:hover {
|
471 |
+
color: #d93f3f !important;
|
472 |
+
text-decoration: underline;
|
473 |
+
}
|
474 |
+
|
475 |
+
|
476 |
+
.sp-palette span:hover, .sp-palette span.sp-thumb-active {
|
477 |
+
border-color: #000;
|
478 |
+
}
|
479 |
+
|
480 |
+
.sp-preview, .sp-alpha, .sp-thumb-el {
|
481 |
+
position:relative;
|
482 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
483 |
+
}
|
484 |
+
.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {
|
485 |
+
display:block;
|
486 |
+
position:absolute;
|
487 |
+
top:0;left:0;bottom:0;right:0;
|
488 |
+
}
|
489 |
+
|
490 |
+
.sp-palette .sp-thumb-inner {
|
491 |
+
background-position: 50% 50%;
|
492 |
+
background-repeat: no-repeat;
|
493 |
+
}
|
494 |
+
|
495 |
+
.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
|
496 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
|
497 |
+
}
|
498 |
+
|
499 |
+
.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
|
500 |
+
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
|
501 |
+
}
|
502 |
+
|
503 |
+
.sp-clear-display {
|
504 |
+
background-repeat:no-repeat;
|
505 |
+
background-position: center;
|
506 |
+
background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);
|
507 |
+
}
|
trunk/spectrum/spectrum.js
ADDED
@@ -0,0 +1,2323 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Spectrum Colorpicker v1.8.0
|
2 |
+
// https://github.com/bgrins/spectrum
|
3 |
+
// Author: Brian Grinstead
|
4 |
+
// License: MIT
|
5 |
+
|
6 |
+
(function (factory) {
|
7 |
+
"use strict";
|
8 |
+
|
9 |
+
if (typeof define === 'function' && define.amd) { // AMD
|
10 |
+
define(['jquery'], factory);
|
11 |
+
}
|
12 |
+
else if (typeof exports == "object" && typeof module == "object") { // CommonJS
|
13 |
+
module.exports = factory(require('jquery'));
|
14 |
+
}
|
15 |
+
else { // Browser
|
16 |
+
factory(jQuery);
|
17 |
+
}
|
18 |
+
})(function($, undefined) {
|
19 |
+
"use strict";
|
20 |
+
|
21 |
+
var defaultOpts = {
|
22 |
+
|
23 |
+
// Callbacks
|
24 |
+
beforeShow: noop,
|
25 |
+
move: noop,
|
26 |
+
change: noop,
|
27 |
+
show: noop,
|
28 |
+
hide: noop,
|
29 |
+
|
30 |
+
// Options
|
31 |
+
color: false,
|
32 |
+
flat: false,
|
33 |
+
showInput: false,
|
34 |
+
allowEmpty: false,
|
35 |
+
showButtons: true,
|
36 |
+
clickoutFiresChange: true,
|
37 |
+
showInitial: false,
|
38 |
+
showPalette: false,
|
39 |
+
showPaletteOnly: false,
|
40 |
+
hideAfterPaletteSelect: false,
|
41 |
+
togglePaletteOnly: false,
|
42 |
+
showSelectionPalette: true,
|
43 |
+
localStorageKey: false,
|
44 |
+
appendTo: "body",
|
45 |
+
maxSelectionSize: 7,
|
46 |
+
cancelText: "cancel",
|
47 |
+
chooseText: "choose",
|
48 |
+
togglePaletteMoreText: "more",
|
49 |
+
togglePaletteLessText: "less",
|
50 |
+
clearText: "Clear Color Selection",
|
51 |
+
noColorSelectedText: "No Color Selected",
|
52 |
+
preferredFormat: false,
|
53 |
+
className: "", // Deprecated - use containerClassName and replacerClassName instead.
|
54 |
+
containerClassName: "",
|
55 |
+
replacerClassName: "",
|
56 |
+
showAlpha: false,
|
57 |
+
theme: "sp-light",
|
58 |
+
palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
|
59 |
+
selectionPalette: [],
|
60 |
+
disabled: false,
|
61 |
+
offset: null
|
62 |
+
},
|
63 |
+
spectrums = [],
|
64 |
+
IE = !!/msie/i.exec( window.navigator.userAgent ),
|
65 |
+
rgbaSupport = (function() {
|
66 |
+
function contains( str, substr ) {
|
67 |
+
return !!~('' + str).indexOf(substr);
|
68 |
+
}
|
69 |
+
|
70 |
+
var elem = document.createElement('div');
|
71 |
+
var style = elem.style;
|
72 |
+
style.cssText = 'background-color:rgba(0,0,0,.5)';
|
73 |
+
return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
|
74 |
+
})(),
|
75 |
+
replaceInput = [
|
76 |
+
"<div class='sp-replacer'>",
|
77 |
+
"<div class='sp-preview'><div class='sp-preview-inner'></div></div>",
|
78 |
+
"<div class='sp-dd'>▼</div>",
|
79 |
+
"</div>"
|
80 |
+
].join(''),
|
81 |
+
markup = (function () {
|
82 |
+
|
83 |
+
// IE does not support gradients with multiple stops, so we need to simulate
|
84 |
+
// that for the rainbow slider with 8 divs that each have a single gradient
|
85 |
+
var gradientFix = "";
|
86 |
+
if (IE) {
|
87 |
+
for (var i = 1; i <= 6; i++) {
|
88 |
+
gradientFix += "<div class='sp-" + i + "'></div>";
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
return [
|
93 |
+
"<div class='sp-container sp-hidden'>",
|
94 |
+
"<div class='sp-palette-container'>",
|
95 |
+
"<div class='sp-palette sp-thumb sp-cf'></div>",
|
96 |
+
"<div class='sp-palette-button-container sp-cf'>",
|
97 |
+
"<button type='button' class='sp-palette-toggle'></button>",
|
98 |
+
"</div>",
|
99 |
+
"</div>",
|
100 |
+
"<div class='sp-picker-container'>",
|
101 |
+
"<div class='sp-top sp-cf'>",
|
102 |
+
"<div class='sp-fill'></div>",
|
103 |
+
"<div class='sp-top-inner'>",
|
104 |
+
"<div class='sp-color'>",
|
105 |
+
"<div class='sp-sat'>",
|
106 |
+
"<div class='sp-val'>",
|
107 |
+
"<div class='sp-dragger'></div>",
|
108 |
+
"</div>",
|
109 |
+
"</div>",
|
110 |
+
"</div>",
|
111 |
+
"<div class='sp-clear sp-clear-display'>",
|
112 |
+
"</div>",
|
113 |
+
"<div class='sp-hue'>",
|
114 |
+
"<div class='sp-slider'></div>",
|
115 |
+
gradientFix,
|
116 |
+
"</div>",
|
117 |
+
"</div>",
|
118 |
+
"<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",
|
119 |
+
"</div>",
|
120 |
+
"<div class='sp-input-container sp-cf'>",
|
121 |
+
"<input class='sp-input' type='text' spellcheck='false' />",
|
122 |
+
"</div>",
|
123 |
+
"<div class='sp-initial sp-thumb sp-cf'></div>",
|
124 |
+
"<div class='sp-button-container sp-cf'>",
|
125 |
+
"<a class='sp-cancel' href='#'></a>",
|
126 |
+
"<button type='button' class='sp-choose'></button>",
|
127 |
+
"</div>",
|
128 |
+
"</div>",
|
129 |
+
"</div>"
|
130 |
+
].join("");
|
131 |
+
})();
|
132 |
+
|
133 |
+
function paletteTemplate (p, color, className, opts) {
|
134 |
+
var html = [];
|
135 |
+
for (var i = 0; i < p.length; i++) {
|
136 |
+
var current = p[i];
|
137 |
+
if(current) {
|
138 |
+
var tiny = tinycolor(current);
|
139 |
+
var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
|
140 |
+
c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : "";
|
141 |
+
var formattedString = tiny.toString(opts.preferredFormat || "rgb");
|
142 |
+
var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
|
143 |
+
html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>');
|
144 |
+
} else {
|
145 |
+
var cls = 'sp-clear-display';
|
146 |
+
html.push($('<div />')
|
147 |
+
.append($('<span data-color="" style="background-color:transparent;" class="' + cls + '"></span>')
|
148 |
+
.attr('title', opts.noColorSelectedText)
|
149 |
+
)
|
150 |
+
.html()
|
151 |
+
);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
return "<div class='sp-cf " + className + "'>" + html.join('') + "</div>";
|
155 |
+
}
|
156 |
+
|
157 |
+
function hideAll() {
|
158 |
+
for (var i = 0; i < spectrums.length; i++) {
|
159 |
+
if (spectrums[i]) {
|
160 |
+
spectrums[i].hide();
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
function instanceOptions(o, callbackContext) {
|
166 |
+
var opts = $.extend({}, defaultOpts, o);
|
167 |
+
opts.callbacks = {
|
168 |
+
'move': bind(opts.move, callbackContext),
|
169 |
+
'change': bind(opts.change, callbackContext),
|
170 |
+
'show': bind(opts.show, callbackContext),
|
171 |
+
'hide': bind(opts.hide, callbackContext),
|
172 |
+
'beforeShow': bind(opts.beforeShow, callbackContext)
|
173 |
+
};
|
174 |
+
|
175 |
+
return opts;
|
176 |
+
}
|
177 |
+
|
178 |
+
function spectrum(element, o) {
|
179 |
+
|
180 |
+
var opts = instanceOptions(o, element),
|
181 |
+
flat = opts.flat,
|
182 |
+
showSelectionPalette = opts.showSelectionPalette,
|
183 |
+
localStorageKey = opts.localStorageKey,
|
184 |
+
theme = opts.theme,
|
185 |
+
callbacks = opts.callbacks,
|
186 |
+
resize = throttle(reflow, 10),
|
187 |
+
visible = false,
|
188 |
+
isDragging = false,
|
189 |
+
dragWidth = 0,
|
190 |
+
dragHeight = 0,
|
191 |
+
dragHelperHeight = 0,
|
192 |
+
slideHeight = 0,
|
193 |
+
slideWidth = 0,
|
194 |
+
alphaWidth = 0,
|
195 |
+
alphaSlideHelperWidth = 0,
|
196 |
+
slideHelperHeight = 0,
|
197 |
+
currentHue = 0,
|
198 |
+
currentSaturation = 0,
|
199 |
+
currentValue = 0,
|
200 |
+
currentAlpha = 1,
|
201 |
+
palette = [],
|
202 |
+
paletteArray = [],
|
203 |
+
paletteLookup = {},
|
204 |
+
selectionPalette = opts.selectionPalette.slice(0),
|
205 |
+
maxSelectionSize = opts.maxSelectionSize,
|
206 |
+
draggingClass = "sp-dragging",
|
207 |
+
shiftMovementDirection = null;
|
208 |
+
|
209 |
+
var doc = element.ownerDocument,
|
210 |
+
body = doc.body,
|
211 |
+
boundElement = $(element),
|
212 |
+
disabled = false,
|
213 |
+
container = $(markup, doc).addClass(theme),
|
214 |
+
pickerContainer = container.find(".sp-picker-container"),
|
215 |
+
dragger = container.find(".sp-color"),
|
216 |
+
dragHelper = container.find(".sp-dragger"),
|
217 |
+
slider = container.find(".sp-hue"),
|
218 |
+
slideHelper = container.find(".sp-slider"),
|
219 |
+
alphaSliderInner = container.find(".sp-alpha-inner"),
|
220 |
+
alphaSlider = container.find(".sp-alpha"),
|
221 |
+
alphaSlideHelper = container.find(".sp-alpha-handle"),
|
222 |
+
textInput = container.find(".sp-input"),
|
223 |
+
paletteContainer = container.find(".sp-palette"),
|
224 |
+
initialColorContainer = container.find(".sp-initial"),
|
225 |
+
cancelButton = container.find(".sp-cancel"),
|
226 |
+
clearButton = container.find(".sp-clear"),
|
227 |
+
chooseButton = container.find(".sp-choose"),
|
228 |
+
toggleButton = container.find(".sp-palette-toggle"),
|
229 |
+
isInput = boundElement.is("input"),
|
230 |
+
isInputTypeColor = isInput && boundElement.attr("type") === "color" && inputTypeColorSupport(),
|
231 |
+
shouldReplace = isInput && !flat,
|
232 |
+
replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]),
|
233 |
+
offsetElement = (shouldReplace) ? replacer : boundElement,
|
234 |
+
previewElement = replacer.find(".sp-preview-inner"),
|
235 |
+
initialColor = opts.color || (isInput && boundElement.val()),
|
236 |
+
colorOnShow = false,
|
237 |
+
currentPreferredFormat = opts.preferredFormat,
|
238 |
+
clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,
|
239 |
+
isEmpty = !initialColor,
|
240 |
+
allowEmpty = opts.allowEmpty && !isInputTypeColor;
|
241 |
+
|
242 |
+
function applyOptions() {
|
243 |
+
|
244 |
+
if (opts.showPaletteOnly) {
|
245 |
+
opts.showPalette = true;
|
246 |
+
}
|
247 |
+
|
248 |
+
toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
|
249 |
+
|
250 |
+
if (opts.palette) {
|
251 |
+
palette = opts.palette.slice(0);
|
252 |
+
paletteArray = $.isArray(palette[0]) ? palette : [palette];
|
253 |
+
paletteLookup = {};
|
254 |
+
for (var i = 0; i < paletteArray.length; i++) {
|
255 |
+
for (var j = 0; j < paletteArray[i].length; j++) {
|
256 |
+
var rgb = tinycolor(paletteArray[i][j]).toRgbString();
|
257 |
+
paletteLookup[rgb] = true;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
container.toggleClass("sp-flat", flat);
|
263 |
+
container.toggleClass("sp-input-disabled", !opts.showInput);
|
264 |
+
container.toggleClass("sp-alpha-enabled", opts.showAlpha);
|
265 |
+
container.toggleClass("sp-clear-enabled", allowEmpty);
|
266 |
+
container.toggleClass("sp-buttons-disabled", !opts.showButtons);
|
267 |
+
container.toggleClass("sp-palette-buttons-disabled", !opts.togglePaletteOnly);
|
268 |
+
container.toggleClass("sp-palette-disabled", !opts.showPalette);
|
269 |
+
container.toggleClass("sp-palette-only", opts.showPaletteOnly);
|
270 |
+
container.toggleClass("sp-initial-disabled", !opts.showInitial);
|
271 |
+
container.addClass(opts.className).addClass(opts.containerClassName);
|
272 |
+
|
273 |
+
reflow();
|
274 |
+
}
|
275 |
+
|
276 |
+
function initialize() {
|
277 |
+
|
278 |
+
if (IE) {
|
279 |
+
container.find("*:not(input)").attr("unselectable", "on");
|
280 |
+
}
|
281 |
+
|
282 |
+
applyOptions();
|
283 |
+
|
284 |
+
if (shouldReplace) {
|
285 |
+
boundElement.after(replacer).hide();
|
286 |
+
}
|
287 |
+
|
288 |
+
if (!allowEmpty) {
|
289 |
+
clearButton.hide();
|
290 |
+
}
|
291 |
+
|
292 |
+
if (flat) {
|
293 |
+
boundElement.after(container).hide();
|
294 |
+
}
|
295 |
+
else {
|
296 |
+
|
297 |
+
var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo);
|
298 |
+
if (appendTo.length !== 1) {
|
299 |
+
appendTo = $("body");
|
300 |
+
}
|
301 |
+
|
302 |
+
appendTo.append(container);
|
303 |
+
}
|
304 |
+
|
305 |
+
updateSelectionPaletteFromStorage();
|
306 |
+
|
307 |
+
offsetElement.bind("click.spectrum touchstart.spectrum", function (e) {
|
308 |
+
if (!disabled) {
|
309 |
+
toggle();
|
310 |
+
}
|
311 |
+
|
312 |
+
e.stopPropagation();
|
313 |
+
|
314 |
+
if (!$(e.target).is("input")) {
|
315 |
+
e.preventDefault();
|
316 |
+
}
|
317 |
+
});
|
318 |
+
|
319 |
+
if(boundElement.is(":disabled") || (opts.disabled === true)) {
|
320 |
+
disable();
|
321 |
+
}
|
322 |
+
|
323 |
+
// Prevent clicks from bubbling up to document. This would cause it to be hidden.
|
324 |
+
container.click(stopPropagation);
|
325 |
+
|
326 |
+
// Handle user typed input
|
327 |
+
textInput.change(setFromTextInput);
|
328 |
+
textInput.bind("paste", function () {
|
329 |
+
setTimeout(setFromTextInput, 1);
|
330 |
+
});
|
331 |
+
textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } });
|
332 |
+
|
333 |
+
cancelButton.text(opts.cancelText);
|
334 |
+
cancelButton.bind("click.spectrum", function (e) {
|
335 |
+
e.stopPropagation();
|
336 |
+
e.preventDefault();
|
337 |
+
revert();
|
338 |
+
hide();
|
339 |
+
});
|
340 |
+
|
341 |
+
clearButton.attr("title", opts.clearText);
|
342 |
+
clearButton.bind("click.spectrum", function (e) {
|
343 |
+
e.stopPropagation();
|
344 |
+
e.preventDefault();
|
345 |
+
isEmpty = true;
|
346 |
+
move();
|
347 |
+
|
348 |
+
if(flat) {
|
349 |
+
//for the flat style, this is a change event
|
350 |
+
updateOriginalInput(true);
|
351 |
+
}
|
352 |
+
});
|
353 |
+
|
354 |
+
chooseButton.text(opts.chooseText);
|
355 |
+
chooseButton.bind("click.spectrum", function (e) {
|
356 |
+
e.stopPropagation();
|
357 |
+
e.preventDefault();
|
358 |
+
|
359 |
+
if (IE && textInput.is(":focus")) {
|
360 |
+
textInput.trigger('change');
|
361 |
+
}
|
362 |
+
|
363 |
+
if (isValid()) {
|
364 |
+
updateOriginalInput(true);
|
365 |
+
hide();
|
366 |
+
}
|
367 |
+
});
|
368 |
+
|
369 |
+
toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
|
370 |
+
toggleButton.bind("click.spectrum", function (e) {
|
371 |
+
e.stopPropagation();
|
372 |
+
e.preventDefault();
|
373 |
+
|
374 |
+
opts.showPaletteOnly = !opts.showPaletteOnly;
|
375 |
+
|
376 |
+
// To make sure the Picker area is drawn on the right, next to the
|
377 |
+
// Palette area (and not below the palette), first move the Palette
|
378 |
+
// to the left to make space for the picker, plus 5px extra.
|
379 |
+
// The 'applyOptions' function puts the whole container back into place
|
380 |
+
// and takes care of the button-text and the sp-palette-only CSS class.
|
381 |
+
if (!opts.showPaletteOnly && !flat) {
|
382 |
+
container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));
|
383 |
+
}
|
384 |
+
applyOptions();
|
385 |
+
});
|
386 |
+
|
387 |
+
draggable(alphaSlider, function (dragX, dragY, e) {
|
388 |
+
currentAlpha = (dragX / alphaWidth);
|
389 |
+
isEmpty = false;
|
390 |
+
if (e.shiftKey) {
|
391 |
+
currentAlpha = Math.round(currentAlpha * 10) / 10;
|
392 |
+
}
|
393 |
+
|
394 |
+
move();
|
395 |
+
}, dragStart, dragStop);
|
396 |
+
|
397 |
+
draggable(slider, function (dragX, dragY) {
|
398 |
+
currentHue = parseFloat(dragY / slideHeight);
|
399 |
+
isEmpty = false;
|
400 |
+
if (!opts.showAlpha) {
|
401 |
+
currentAlpha = 1;
|
402 |
+
}
|
403 |
+
move();
|
404 |
+
}, dragStart, dragStop);
|
405 |
+
|
406 |
+
draggable(dragger, function (dragX, dragY, e) {
|
407 |
+
|
408 |
+
// shift+drag should snap the movement to either the x or y axis.
|
409 |
+
if (!e.shiftKey) {
|
410 |
+
shiftMovementDirection = null;
|
411 |
+
}
|
412 |
+
else if (!shiftMovementDirection) {
|
413 |
+
var oldDragX = currentSaturation * dragWidth;
|
414 |
+
var oldDragY = dragHeight - (currentValue * dragHeight);
|
415 |
+
var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);
|
416 |
+
|
417 |
+
shiftMovementDirection = furtherFromX ? "x" : "y";
|
418 |
+
}
|
419 |
+
|
420 |
+
var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x";
|
421 |
+
var setValue = !shiftMovementDirection || shiftMovementDirection === "y";
|
422 |
+
|
423 |
+
if (setSaturation) {
|
424 |
+
currentSaturation = parseFloat(dragX / dragWidth);
|
425 |
+
}
|
426 |
+
if (setValue) {
|
427 |
+
currentValue = parseFloat((dragHeight - dragY) / dragHeight);
|
428 |
+
}
|
429 |
+
|
430 |
+
isEmpty = false;
|
431 |
+
if (!opts.showAlpha) {
|
432 |
+
currentAlpha = 1;
|
433 |
+
}
|
434 |
+
|
435 |
+
move();
|
436 |
+
|
437 |
+
}, dragStart, dragStop);
|
438 |
+
|
439 |
+
if (!!initialColor) {
|
440 |
+
set(initialColor);
|
441 |
+
|
442 |
+
// In case color was black - update the preview UI and set the format
|
443 |
+
// since the set function will not run (default color is black).
|
444 |
+
updateUI();
|
445 |
+
currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).format;
|
446 |
+
|
447 |
+
addColorToSelectionPalette(initialColor);
|
448 |
+
}
|
449 |
+
else {
|
450 |
+
updateUI();
|
451 |
+
}
|
452 |
+
|
453 |
+
if (flat) {
|
454 |
+
show();
|
455 |
+
}
|
456 |
+
|
457 |
+
function paletteElementClick(e) {
|
458 |
+
if (e.data && e.data.ignore) {
|
459 |
+
set($(e.target).closest(".sp-thumb-el").data("color"));
|
460 |
+
move();
|
461 |
+
}
|
462 |
+
else {
|
463 |
+
set($(e.target).closest(".sp-thumb-el").data("color"));
|
464 |
+
move();
|
465 |
+
updateOriginalInput(true);
|
466 |
+
if (opts.hideAfterPaletteSelect) {
|
467 |
+
hide();
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
return false;
|
472 |
+
}
|
473 |
+
|
474 |
+
var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum";
|
475 |
+
paletteContainer.delegate(".sp-thumb-el", paletteEvent, paletteElementClick);
|
476 |
+
initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, paletteElementClick);
|
477 |
+
}
|
478 |
+
|
479 |
+
function updateSelectionPaletteFromStorage() {
|
480 |
+
|
481 |
+
if (localStorageKey && window.localStorage) {
|
482 |
+
|
483 |
+
// Migrate old palettes over to new format. May want to remove this eventually.
|
484 |
+
try {
|
485 |
+
var oldPalette = window.localStorage[localStorageKey].split(",#");
|
486 |
+
if (oldPalette.length > 1) {
|
487 |
+
delete window.localStorage[localStorageKey];
|
488 |
+
$.each(oldPalette, function(i, c) {
|
489 |
+
addColorToSelectionPalette(c);
|
490 |
+
});
|
491 |
+
}
|
492 |
+
}
|
493 |
+
catch(e) { }
|
494 |
+
|
495 |
+
try {
|
496 |
+
selectionPalette = window.localStorage[localStorageKey].split(";");
|
497 |
+
}
|
498 |
+
catch (e) { }
|
499 |
+
}
|
500 |
+
}
|
501 |
+
|
502 |
+
function addColorToSelectionPalette(color) {
|
503 |
+
if (showSelectionPalette) {
|
504 |
+
var rgb = tinycolor(color).toRgbString();
|
505 |
+
if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {
|
506 |
+
selectionPalette.push(rgb);
|
507 |
+
while(selectionPalette.length > maxSelectionSize) {
|
508 |
+
selectionPalette.shift();
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
if (localStorageKey && window.localStorage) {
|
513 |
+
try {
|
514 |
+
window.localStorage[localStorageKey] = selectionPalette.join(";");
|
515 |
+
}
|
516 |
+
catch(e) { }
|
517 |
+
}
|
518 |
+
}
|
519 |
+
}
|
520 |
+
|
521 |
+
function getUniqueSelectionPalette() {
|
522 |
+
var unique = [];
|
523 |
+
if (opts.showPalette) {
|
524 |
+
for (var i = 0; i < selectionPalette.length; i++) {
|
525 |
+
var rgb = tinycolor(selectionPalette[i]).toRgbString();
|
526 |
+
|
527 |
+
if (!paletteLookup[rgb]) {
|
528 |
+
unique.push(selectionPalette[i]);
|
529 |
+
}
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
return unique.reverse().slice(0, opts.maxSelectionSize);
|
534 |
+
}
|
535 |
+
|
536 |
+
function drawPalette() {
|
537 |
+
|
538 |
+
var currentColor = get();
|
539 |
+
|
540 |
+
var html = $.map(paletteArray, function (palette, i) {
|
541 |
+
return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts);
|
542 |
+
});
|
543 |
+
|
544 |
+
updateSelectionPaletteFromStorage();
|
545 |
+
|
546 |
+
if (selectionPalette) {
|
547 |
+
html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts));
|
548 |
+
}
|
549 |
+
|
550 |
+
paletteContainer.html(html.join(""));
|
551 |
+
}
|
552 |
+
|
553 |
+
function drawInitial() {
|
554 |
+
if (opts.showInitial) {
|
555 |
+
var initial = colorOnShow;
|
556 |
+
var current = get();
|
557 |
+
initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts));
|
558 |
+
}
|
559 |
+
}
|
560 |
+
|
561 |
+
function dragStart() {
|
562 |
+
if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {
|
563 |
+
reflow();
|
564 |
+
}
|
565 |
+
isDragging = true;
|
566 |
+
container.addClass(draggingClass);
|
567 |
+
shiftMovementDirection = null;
|
568 |
+
boundElement.trigger('dragstart.spectrum', [ get() ]);
|
569 |
+
}
|
570 |
+
|
571 |
+
function dragStop() {
|
572 |
+
isDragging = false;
|
573 |
+
container.removeClass(draggingClass);
|
574 |
+
boundElement.trigger('dragstop.spectrum', [ get() ]);
|
575 |
+
}
|
576 |
+
|
577 |
+
function setFromTextInput() {
|
578 |
+
|
579 |
+
var value = textInput.val();
|
580 |
+
|
581 |
+
if ((value === null || value === "") && allowEmpty) {
|
582 |
+
set(null);
|
583 |
+
updateOriginalInput(true);
|
584 |
+
}
|
585 |
+
else {
|
586 |
+
var tiny = tinycolor(value);
|
587 |
+
if (tiny.isValid()) {
|
588 |
+
set(tiny);
|
589 |
+
updateOriginalInput(true);
|
590 |
+
}
|
591 |
+
else {
|
592 |
+
textInput.addClass("sp-validation-error");
|
593 |
+
}
|
594 |
+
}
|
595 |
+
}
|
596 |
+
|
597 |
+
function toggle() {
|
598 |
+
if (visible) {
|
599 |
+
hide();
|
600 |
+
}
|
601 |
+
else {
|
602 |
+
show();
|
603 |
+
}
|
604 |
+
}
|
605 |
+
|
606 |
+
function show() {
|
607 |
+
var event = $.Event('beforeShow.spectrum');
|
608 |
+
|
609 |
+
if (visible) {
|
610 |
+
reflow();
|
611 |
+
return;
|
612 |
+
}
|
613 |
+
|
614 |
+
boundElement.trigger(event, [ get() ]);
|
615 |
+
|
616 |
+
if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {
|
617 |
+
return;
|
618 |
+
}
|
619 |
+
|
620 |
+
hideAll();
|
621 |
+
visible = true;
|
622 |
+
|
623 |
+
$(doc).bind("keydown.spectrum", onkeydown);
|
624 |
+
$(doc).bind("click.spectrum", clickout);
|
625 |
+
$(window).bind("resize.spectrum", resize);
|
626 |
+
replacer.addClass("sp-active");
|
627 |
+
container.removeClass("sp-hidden");
|
628 |
+
|
629 |
+
reflow();
|
630 |
+
updateUI();
|
631 |
+
|
632 |
+
colorOnShow = get();
|
633 |
+
|
634 |
+
drawInitial();
|
635 |
+
callbacks.show(colorOnShow);
|
636 |
+
boundElement.trigger('show.spectrum', [ colorOnShow ]);
|
637 |
+
}
|
638 |
+
|
639 |
+
function onkeydown(e) {
|
640 |
+
// Close on ESC
|
641 |
+
if (e.keyCode === 27) {
|
642 |
+
hide();
|
643 |
+
}
|
644 |
+
}
|
645 |
+
|
646 |
+
function clickout(e) {
|
647 |
+
// Return on right click.
|
648 |
+
if (e.button == 2) { return; }
|
649 |
+
|
650 |
+
// If a drag event was happening during the mouseup, don't hide
|
651 |
+
// on click.
|
652 |
+
if (isDragging) { return; }
|
653 |
+
|
654 |
+
if (clickoutFiresChange) {
|
655 |
+
updateOriginalInput(true);
|
656 |
+
}
|
657 |
+
else {
|
658 |
+
revert();
|
659 |
+
}
|
660 |
+
hide();
|
661 |
+
}
|
662 |
+
|
663 |
+
function hide() {
|
664 |
+
// Return if hiding is unnecessary
|
665 |
+
if (!visible || flat) { return; }
|
666 |
+
visible = false;
|
667 |
+
|
668 |
+
$(doc).unbind("keydown.spectrum", onkeydown);
|
669 |
+
$(doc).unbind("click.spectrum", clickout);
|
670 |
+
$(window).unbind("resize.spectrum", resize);
|
671 |
+
|
672 |
+
replacer.removeClass("sp-active");
|
673 |
+
container.addClass("sp-hidden");
|
674 |
+
|
675 |
+
callbacks.hide(get());
|
676 |
+
boundElement.trigger('hide.spectrum', [ get() ]);
|
677 |
+
}
|
678 |
+
|
679 |
+
function revert() {
|
680 |
+
set(colorOnShow, true);
|
681 |
+
}
|
682 |
+
|
683 |
+
function set(color, ignoreFormatChange) {
|
684 |
+
if (tinycolor.equals(color, get())) {
|
685 |
+
// Update UI just in case a validation error needs
|
686 |
+
// to be cleared.
|
687 |
+
updateUI();
|
688 |
+
return;
|
689 |
+
}
|
690 |
+
|
691 |
+
var newColor, newHsv;
|
692 |
+
if (!color && allowEmpty) {
|
693 |
+
isEmpty = true;
|
694 |
+
} else {
|
695 |
+
isEmpty = false;
|
696 |
+
newColor = tinycolor(color);
|
697 |
+
newHsv = newColor.toHsv();
|
698 |
+
|
699 |
+
currentHue = (newHsv.h % 360) / 360;
|
700 |
+
currentSaturation = newHsv.s;
|
701 |
+
currentValue = newHsv.v;
|
702 |
+
currentAlpha = newHsv.a;
|
703 |
+
}
|
704 |
+
updateUI();
|
705 |
+
|
706 |
+
if (newColor && newColor.isValid() && !ignoreFormatChange) {
|
707 |
+
currentPreferredFormat = opts.preferredFormat || newColor.getFormat();
|
708 |
+
}
|
709 |
+
}
|
710 |
+
|
711 |
+
function get(opts) {
|
712 |
+
opts = opts || { };
|
713 |
+
|
714 |
+
if (allowEmpty && isEmpty) {
|
715 |
+
return null;
|
716 |
+
}
|
717 |
+
|
718 |
+
return tinycolor.fromRatio({
|
719 |
+
h: currentHue,
|
720 |
+
s: currentSaturation,
|
721 |
+
v: currentValue,
|
722 |
+
a: Math.round(currentAlpha * 100) / 100
|
723 |
+
}, { format: opts.format || currentPreferredFormat });
|
724 |
+
}
|
725 |
+
|
726 |
+
function isValid() {
|
727 |
+
return !textInput.hasClass("sp-validation-error");
|
728 |
+
}
|
729 |
+
|
730 |
+
function move() {
|
731 |
+
updateUI();
|
732 |
+
|
733 |
+
callbacks.move(get());
|
734 |
+
boundElement.trigger('move.spectrum', [ get() ]);
|
735 |
+
}
|
736 |
+
|
737 |
+
function updateUI() {
|
738 |
+
|
739 |
+
textInput.removeClass("sp-validation-error");
|
740 |
+
|
741 |
+
updateHelperLocations();
|
742 |
+
|
743 |
+
// Update dragger background color (gradients take care of saturation and value).
|
744 |
+
var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });
|
745 |
+
dragger.css("background-color", flatColor.toHexString());
|
746 |
+
|
747 |
+
// Get a format that alpha will be included in (hex and names ignore alpha)
|
748 |
+
var format = currentPreferredFormat;
|
749 |
+
if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) {
|
750 |
+
if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") {
|
751 |
+
format = "rgb";
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
var realColor = get({ format: format }),
|
756 |
+
displayColor = '';
|
757 |
+
|
758 |
+
//reset background info for preview element
|
759 |
+
previewElement.removeClass("sp-clear-display");
|
760 |
+
previewElement.css('background-color', 'transparent');
|
761 |
+
|
762 |
+
if (!realColor && allowEmpty) {
|
763 |
+
// Update the replaced elements background with icon indicating no color selection
|
764 |
+
previewElement.addClass("sp-clear-display");
|
765 |
+
}
|
766 |
+
else {
|
767 |
+
var realHex = realColor.toHexString(),
|
768 |
+
realRgb = realColor.toRgbString();
|
769 |
+
|
770 |
+
// Update the replaced elements background color (with actual selected color)
|
771 |
+
if (rgbaSupport || realColor.alpha === 1) {
|
772 |
+
previewElement.css("background-color", realRgb);
|
773 |
+
}
|
774 |
+
else {
|
775 |
+
previewElement.css("background-color", "transparent");
|
776 |
+
previewElement.css("filter", realColor.toFilter());
|
777 |
+
}
|
778 |
+
|
779 |
+
if (opts.showAlpha) {
|
780 |
+
var rgb = realColor.toRgb();
|
781 |
+
rgb.a = 0;
|
782 |
+
var realAlpha = tinycolor(rgb).toRgbString();
|
783 |
+
var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";
|
784 |
+
|
785 |
+
if (IE) {
|
786 |
+
alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
|
787 |
+
}
|
788 |
+
else {
|
789 |
+
alphaSliderInner.css("background", "-webkit-" + gradient);
|
790 |
+
alphaSliderInner.css("background", "-moz-" + gradient);
|
791 |
+
alphaSliderInner.css("background", "-ms-" + gradient);
|
792 |
+
// Use current syntax gradient on unprefixed property.
|
793 |
+
alphaSliderInner.css("background",
|
794 |
+
"linear-gradient(to right, " + realAlpha + ", " + realHex + ")");
|
795 |
+
}
|
796 |
+
}
|
797 |
+
|
798 |
+
displayColor = realColor.toString(format);
|
799 |
+
}
|
800 |
+
|
801 |
+
// Update the text entry input as it changes happen
|
802 |
+
if (opts.showInput) {
|
803 |
+
textInput.val(displayColor);
|
804 |
+
}
|
805 |
+
|
806 |
+
if (opts.showPalette) {
|
807 |
+
drawPalette();
|
808 |
+
}
|
809 |
+
|
810 |
+
drawInitial();
|
811 |
+
}
|
812 |
+
|
813 |
+
function updateHelperLocations() {
|
814 |
+
var s = currentSaturation;
|
815 |
+
var v = currentValue;
|
816 |
+
|
817 |
+
if(allowEmpty && isEmpty) {
|
818 |
+
//if selected color is empty, hide the helpers
|
819 |
+
alphaSlideHelper.hide();
|
820 |
+
slideHelper.hide();
|
821 |
+
dragHelper.hide();
|
822 |
+
}
|
823 |
+
else {
|
824 |
+
//make sure helpers are visible
|
825 |
+
alphaSlideHelper.show();
|
826 |
+
slideHelper.show();
|
827 |
+
dragHelper.show();
|
828 |
+
|
829 |
+
// Where to show the little circle in that displays your current selected color
|
830 |
+
var dragX = s * dragWidth;
|
831 |
+
var dragY = dragHeight - (v * dragHeight);
|
832 |
+
dragX = Math.max(
|
833 |
+
-dragHelperHeight,
|
834 |
+
Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
|
835 |
+
);
|
836 |
+
dragY = Math.max(
|
837 |
+
-dragHelperHeight,
|
838 |
+
Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
|
839 |
+
);
|
840 |
+
dragHelper.css({
|
841 |
+
"top": dragY + "px",
|
842 |
+
"left": dragX + "px"
|
843 |
+
});
|
844 |
+
|
845 |
+
var alphaX = currentAlpha * alphaWidth;
|
846 |
+
alphaSlideHelper.css({
|
847 |
+
"left": (alphaX - (alphaSlideHelperWidth / 2)) + "px"
|
848 |
+
});
|
849 |
+
|
850 |
+
// Where to show the bar that displays your current selected hue
|
851 |
+
var slideY = (currentHue) * slideHeight;
|
852 |
+
slideHelper.css({
|
853 |
+
"top": (slideY - slideHelperHeight) + "px"
|
854 |
+
});
|
855 |
+
}
|
856 |
+
}
|
857 |
+
|
858 |
+
function updateOriginalInput(fireCallback) {
|
859 |
+
var color = get(),
|
860 |
+
displayColor = '',
|
861 |
+
hasChanged = !tinycolor.equals(color, colorOnShow);
|
862 |
+
|
863 |
+
if (color) {
|
864 |
+
displayColor = color.toString(currentPreferredFormat);
|
865 |
+
// Update the selection palette with the current color
|
866 |
+
addColorToSelectionPalette(color);
|
867 |
+
}
|
868 |
+
|
869 |
+
if (isInput) {
|
870 |
+
boundElement.val(displayColor);
|
871 |
+
}
|
872 |
+
|
873 |
+
if (fireCallback && hasChanged) {
|
874 |
+
callbacks.change(color);
|
875 |
+
boundElement.trigger('change', [ color ]);
|
876 |
+
}
|
877 |
+
}
|
878 |
+
|
879 |
+
function reflow() {
|
880 |
+
if (!visible) {
|
881 |
+
return; // Calculations would be useless and wouldn't be reliable anyways
|
882 |
+
}
|
883 |
+
dragWidth = dragger.width();
|
884 |
+
dragHeight = dragger.height();
|
885 |
+
dragHelperHeight = dragHelper.height();
|
886 |
+
slideWidth = slider.width();
|
887 |
+
slideHeight = slider.height();
|
888 |
+
slideHelperHeight = slideHelper.height();
|
889 |
+
alphaWidth = alphaSlider.width();
|
890 |
+
alphaSlideHelperWidth = alphaSlideHelper.width();
|
891 |
+
|
892 |
+
if (!flat) {
|
893 |
+
container.css("position", "absolute");
|
894 |
+
if (opts.offset) {
|
895 |
+
container.offset(opts.offset);
|
896 |
+
} else {
|
897 |
+
container.offset(getOffset(container, offsetElement));
|
898 |
+
}
|
899 |
+
}
|
900 |
+
|
901 |
+
updateHelperLocations();
|
902 |
+
|
903 |
+
if (opts.showPalette) {
|
904 |
+
drawPalette();
|
905 |
+
}
|
906 |
+
|
907 |
+
boundElement.trigger('reflow.spectrum');
|
908 |
+
}
|
909 |
+
|
910 |
+
function destroy() {
|
911 |
+
boundElement.show();
|
912 |
+
offsetElement.unbind("click.spectrum touchstart.spectrum");
|
913 |
+
container.remove();
|
914 |
+
replacer.remove();
|
915 |
+
spectrums[spect.id] = null;
|
916 |
+
}
|
917 |
+
|
918 |
+
function option(optionName, optionValue) {
|
919 |
+
if (optionName === undefined) {
|
920 |
+
return $.extend({}, opts);
|
921 |
+
}
|
922 |
+
if (optionValue === undefined) {
|
923 |
+
return opts[optionName];
|
924 |
+
}
|
925 |
+
|
926 |
+
opts[optionName] = optionValue;
|
927 |
+
|
928 |
+
if (optionName === "preferredFormat") {
|
929 |
+
currentPreferredFormat = opts.preferredFormat;
|
930 |
+
}
|
931 |
+
applyOptions();
|
932 |
+
}
|
933 |
+
|
934 |
+
function enable() {
|
935 |
+
disabled = false;
|
936 |
+
boundElement.attr("disabled", false);
|
937 |
+
offsetElement.removeClass("sp-disabled");
|
938 |
+
}
|
939 |
+
|
940 |
+
function disable() {
|
941 |
+
hide();
|
942 |
+
disabled = true;
|
943 |
+
boundElement.attr("disabled", true);
|
944 |
+
offsetElement.addClass("sp-disabled");
|
945 |
+
}
|
946 |
+
|
947 |
+
function setOffset(coord) {
|
948 |
+
opts.offset = coord;
|
949 |
+
reflow();
|
950 |
+
}
|
951 |
+
|
952 |
+
initialize();
|
953 |
+
|
954 |
+
var spect = {
|
955 |
+
show: show,
|
956 |
+
hide: hide,
|
957 |
+
toggle: toggle,
|
958 |
+
reflow: reflow,
|
959 |
+
option: option,
|
960 |
+
enable: enable,
|
961 |
+
disable: disable,
|
962 |
+
offset: setOffset,
|
963 |
+
set: function (c) {
|
964 |
+
set(c);
|
965 |
+
updateOriginalInput();
|
966 |
+
},
|
967 |
+
get: get,
|
968 |
+
destroy: destroy,
|
969 |
+
container: container
|
970 |
+
};
|
971 |
+
|
972 |
+
spect.id = spectrums.push(spect) - 1;
|
973 |
+
|
974 |
+
return spect;
|
975 |
+
}
|
976 |
+
|
977 |
+
/**
|
978 |
+
* checkOffset - get the offset below/above and left/right element depending on screen position
|
979 |
+
* Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
|
980 |
+
*/
|
981 |
+
function getOffset(picker, input) {
|
982 |
+
var extraY = 0;
|
983 |
+
var dpWidth = picker.outerWidth();
|
984 |
+
var dpHeight = picker.outerHeight();
|
985 |
+
var inputHeight = input.outerHeight();
|
986 |
+
var doc = picker[0].ownerDocument;
|
987 |
+
var docElem = doc.documentElement;
|
988 |
+
var viewWidth = docElem.clientWidth + $(doc).scrollLeft();
|
989 |
+
var viewHeight = docElem.clientHeight + $(doc).scrollTop();
|
990 |
+
var offset = input.offset();
|
991 |
+
offset.top += inputHeight;
|
992 |
+
|
993 |
+
offset.left -=
|
994 |
+
Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
995 |
+
Math.abs(offset.left + dpWidth - viewWidth) : 0);
|
996 |
+
|
997 |
+
offset.top -=
|
998 |
+
Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
|
999 |
+
Math.abs(dpHeight + inputHeight - extraY) : extraY));
|
1000 |
+
|
1001 |
+
return offset;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
/**
|
1005 |
+
* noop - do nothing
|
1006 |
+
*/
|
1007 |
+
function noop() {
|
1008 |
+
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
/**
|
1012 |
+
* stopPropagation - makes the code only doing this a little easier to read in line
|
1013 |
+
*/
|
1014 |
+
function stopPropagation(e) {
|
1015 |
+
e.stopPropagation();
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
/**
|
1019 |
+
* Create a function bound to a given object
|
1020 |
+
* Thanks to underscore.js
|
1021 |
+
*/
|
1022 |
+
function bind(func, obj) {
|
1023 |
+
var slice = Array.prototype.slice;
|
1024 |
+
var args = slice.call(arguments, 2);
|
1025 |
+
return function () {
|
1026 |
+
return func.apply(obj, args.concat(slice.call(arguments)));
|
1027 |
+
};
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
/**
|
1031 |
+
* Lightweight drag helper. Handles containment within the element, so that
|
1032 |
+
* when dragging, the x is within [0,element.width] and y is within [0,element.height]
|
1033 |
+
*/
|
1034 |
+
function draggable(element, onmove, onstart, onstop) {
|
1035 |
+
onmove = onmove || function () { };
|
1036 |
+
onstart = onstart || function () { };
|
1037 |
+
onstop = onstop || function () { };
|
1038 |
+
var doc = document;
|
1039 |
+
var dragging = false;
|
1040 |
+
var offset = {};
|
1041 |
+
var maxHeight = 0;
|
1042 |
+
var maxWidth = 0;
|
1043 |
+
var hasTouch = ('ontouchstart' in window);
|
1044 |
+
|
1045 |
+
var duringDragEvents = {};
|
1046 |
+
duringDragEvents["selectstart"] = prevent;
|
1047 |
+
duringDragEvents["dragstart"] = prevent;
|
1048 |
+
duringDragEvents["touchmove mousemove"] = move;
|
1049 |
+
duringDragEvents["touchend mouseup"] = stop;
|
1050 |
+
|
1051 |
+
function prevent(e) {
|
1052 |
+
if (e.stopPropagation) {
|
1053 |
+
e.stopPropagation();
|
1054 |
+
}
|
1055 |
+
if (e.preventDefault) {
|
1056 |
+
e.preventDefault();
|
1057 |
+
}
|
1058 |
+
e.returnValue = false;
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
function move(e) {
|
1062 |
+
if (dragging) {
|
1063 |
+
// Mouseup happened outside of window
|
1064 |
+
if (IE && doc.documentMode < 9 && !e.button) {
|
1065 |
+
return stop();
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0];
|
1069 |
+
var pageX = t0 && t0.pageX || e.pageX;
|
1070 |
+
var pageY = t0 && t0.pageY || e.pageY;
|
1071 |
+
|
1072 |
+
var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));
|
1073 |
+
var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));
|
1074 |
+
|
1075 |
+
if (hasTouch) {
|
1076 |
+
// Stop scrolling in iOS
|
1077 |
+
prevent(e);
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
onmove.apply(element, [dragX, dragY, e]);
|
1081 |
+
}
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
function start(e) {
|
1085 |
+
var rightclick = (e.which) ? (e.which == 3) : (e.button == 2);
|
1086 |
+
|
1087 |
+
if (!rightclick && !dragging) {
|
1088 |
+
if (onstart.apply(element, arguments) !== false) {
|
1089 |
+
dragging = true;
|
1090 |
+
maxHeight = $(element).height();
|
1091 |
+
maxWidth = $(element).width();
|
1092 |
+
offset = $(element).offset();
|
1093 |
+
|
1094 |
+
$(doc).bind(duringDragEvents);
|
1095 |
+
$(doc.body).addClass("sp-dragging");
|
1096 |
+
|
1097 |
+
move(e);
|
1098 |
+
|
1099 |
+
prevent(e);
|
1100 |
+
}
|
1101 |
+
}
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
function stop() {
|
1105 |
+
if (dragging) {
|
1106 |
+
$(doc).unbind(duringDragEvents);
|
1107 |
+
$(doc.body).removeClass("sp-dragging");
|
1108 |
+
|
1109 |
+
// Wait a tick before notifying observers to allow the click event
|
1110 |
+
// to fire in Chrome.
|
1111 |
+
setTimeout(function() {
|
1112 |
+
onstop.apply(element, arguments);
|
1113 |
+
}, 0);
|
1114 |
+
}
|
1115 |
+
dragging = false;
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
$(element).bind("touchstart mousedown", start);
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
function throttle(func, wait, debounce) {
|
1122 |
+
var timeout;
|
1123 |
+
return function () {
|
1124 |
+
var context = this, args = arguments;
|
1125 |
+
var throttler = function () {
|
1126 |
+
timeout = null;
|
1127 |
+
func.apply(context, args);
|
1128 |
+
};
|
1129 |
+
if (debounce) clearTimeout(timeout);
|
1130 |
+
if (debounce || !timeout) timeout = setTimeout(throttler, wait);
|
1131 |
+
};
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
function inputTypeColorSupport() {
|
1135 |
+
return $.fn.spectrum.inputTypeColorSupport();
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
/**
|
1139 |
+
* Define a jQuery plugin
|
1140 |
+
*/
|
1141 |
+
var dataID = "spectrum.id";
|
1142 |
+
$.fn.spectrum = function (opts, extra) {
|
1143 |
+
|
1144 |
+
if (typeof opts == "string") {
|
1145 |
+
|
1146 |
+
var returnValue = this;
|
1147 |
+
var args = Array.prototype.slice.call( arguments, 1 );
|
1148 |
+
|
1149 |
+
this.each(function () {
|
1150 |
+
var spect = spectrums[$(this).data(dataID)];
|
1151 |
+
if (spect) {
|
1152 |
+
var method = spect[opts];
|
1153 |
+
if (!method) {
|
1154 |
+
throw new Error( "Spectrum: no such method: '" + opts + "'" );
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
if (opts == "get") {
|
1158 |
+
returnValue = spect.get();
|
1159 |
+
}
|
1160 |
+
else if (opts == "container") {
|
1161 |
+
returnValue = spect.container;
|
1162 |
+
}
|
1163 |
+
else if (opts == "option") {
|
1164 |
+
returnValue = spect.option.apply(spect, args);
|
1165 |
+
}
|
1166 |
+
else if (opts == "destroy") {
|
1167 |
+
spect.destroy();
|
1168 |
+
$(this).removeData(dataID);
|
1169 |
+
}
|
1170 |
+
else {
|
1171 |
+
method.apply(spect, args);
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
});
|
1175 |
+
|
1176 |
+
return returnValue;
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
// Initializing a new instance of spectrum
|
1180 |
+
return this.spectrum("destroy").each(function () {
|
1181 |
+
var options = $.extend({}, opts, $(this).data());
|
1182 |
+
var spect = spectrum(this, options);
|
1183 |
+
$(this).data(dataID, spect.id);
|
1184 |
+
});
|
1185 |
+
};
|
1186 |
+
|
1187 |
+
$.fn.spectrum.load = true;
|
1188 |
+
$.fn.spectrum.loadOpts = {};
|
1189 |
+
$.fn.spectrum.draggable = draggable;
|
1190 |
+
$.fn.spectrum.defaults = defaultOpts;
|
1191 |
+
$.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {
|
1192 |
+
if (typeof inputTypeColorSupport._cachedResult === "undefined") {
|
1193 |
+
var colorInput = $("<input type='color'/>")[0]; // if color element is supported, value will default to not null
|
1194 |
+
inputTypeColorSupport._cachedResult = colorInput.type === "color" && colorInput.value !== "";
|
1195 |
+
}
|
1196 |
+
return inputTypeColorSupport._cachedResult;
|
1197 |
+
};
|
1198 |
+
|
1199 |
+
$.spectrum = { };
|
1200 |
+
$.spectrum.localization = { };
|
1201 |
+
$.spectrum.palettes = { };
|
1202 |
+
|
1203 |
+
$.fn.spectrum.processNativeColorInputs = function () {
|
1204 |
+
var colorInputs = $("input[type=color]");
|
1205 |
+
if (colorInputs.length && !inputTypeColorSupport()) {
|
1206 |
+
colorInputs.spectrum({
|
1207 |
+
preferredFormat: "hex6"
|
1208 |
+
});
|
1209 |
+
}
|
1210 |
+
};
|
1211 |
+
|
1212 |
+
// TinyColor v1.1.2
|
1213 |
+
// https://github.com/bgrins/TinyColor
|
1214 |
+
// Brian Grinstead, MIT License
|
1215 |
+
|
1216 |
+
(function() {
|
1217 |
+
|
1218 |
+
var trimLeft = /^[\s,#]+/,
|
1219 |
+
trimRight = /\s+$/,
|
1220 |
+
tinyCounter = 0,
|
1221 |
+
math = Math,
|
1222 |
+
mathRound = math.round,
|
1223 |
+
mathMin = math.min,
|
1224 |
+
mathMax = math.max,
|
1225 |
+
mathRandom = math.random;
|
1226 |
+
|
1227 |
+
var tinycolor = function(color, opts) {
|
1228 |
+
|
1229 |
+
color = (color) ? color : '';
|
1230 |
+
opts = opts || { };
|
1231 |
+
|
1232 |
+
// If input is already a tinycolor, return itself
|
1233 |
+
if (color instanceof tinycolor) {
|
1234 |
+
return color;
|
1235 |
+
}
|
1236 |
+
// If we are called as a function, call using new instead
|
1237 |
+
if (!(this instanceof tinycolor)) {
|
1238 |
+
return new tinycolor(color, opts);
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
var rgb = inputToRGB(color);
|
1242 |
+
this._originalInput = color,
|
1243 |
+
this._r = rgb.r,
|
1244 |
+
this._g = rgb.g,
|
1245 |
+
this._b = rgb.b,
|
1246 |
+
this._a = rgb.a,
|
1247 |
+
this._roundA = mathRound(100*this._a) / 100,
|
1248 |
+
this._format = opts.format || rgb.format;
|
1249 |
+
this._gradientType = opts.gradientType;
|
1250 |
+
|
1251 |
+
// Don't let the range of [0,255] come back in [0,1].
|
1252 |
+
// Potentially lose a little bit of precision here, but will fix issues where
|
1253 |
+
// .5 gets interpreted as half of the total, instead of half of 1
|
1254 |
+
// If it was supposed to be 128, this was already taken care of by `inputToRgb`
|
1255 |
+
if (this._r < 1) { this._r = mathRound(this._r); }
|
1256 |
+
if (this._g < 1) { this._g = mathRound(this._g); }
|
1257 |
+
if (this._b < 1) { this._b = mathRound(this._b); }
|
1258 |
+
|
1259 |
+
this._ok = rgb.ok;
|
1260 |
+
this._tc_id = tinyCounter++;
|
1261 |
+
};
|
1262 |
+
|
1263 |
+
tinycolor.prototype = {
|
1264 |
+
isDark: function() {
|
1265 |
+
return this.getBrightness() < 128;
|
1266 |
+
},
|
1267 |
+
isLight: function() {
|
1268 |
+
return !this.isDark();
|
1269 |
+
},
|
1270 |
+
isValid: function() {
|
1271 |
+
return this._ok;
|
1272 |
+
},
|
1273 |
+
getOriginalInput: function() {
|
1274 |
+
return this._originalInput;
|
1275 |
+
},
|
1276 |
+
getFormat: function() {
|
1277 |
+
return this._format;
|
1278 |
+
},
|
1279 |
+
getAlpha: function() {
|
1280 |
+
return this._a;
|
1281 |
+
},
|
1282 |
+
getBrightness: function() {
|
1283 |
+
var rgb = this.toRgb();
|
1284 |
+
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
|
1285 |
+
},
|
1286 |
+
setAlpha: function(value) {
|
1287 |
+
this._a = boundAlpha(value);
|
1288 |
+
this._roundA = mathRound(100*this._a) / 100;
|
1289 |
+
return this;
|
1290 |
+
},
|
1291 |
+
toHsv: function() {
|
1292 |
+
var hsv = rgbToHsv(this._r, this._g, this._b);
|
1293 |
+
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
|
1294 |
+
},
|
1295 |
+
toHsvString: function() {
|
1296 |
+
var hsv = rgbToHsv(this._r, this._g, this._b);
|
1297 |
+
var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
|
1298 |
+
return (this._a == 1) ?
|
1299 |
+
"hsv(" + h + ", " + s + "%, " + v + "%)" :
|
1300 |
+
"hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
|
1301 |
+
},
|
1302 |
+
toHsl: function() {
|
1303 |
+
var hsl = rgbToHsl(this._r, this._g, this._b);
|
1304 |
+
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
|
1305 |
+
},
|
1306 |
+
toHslString: function() {
|
1307 |
+
var hsl = rgbToHsl(this._r, this._g, this._b);
|
1308 |
+
var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
|
1309 |
+
return (this._a == 1) ?
|
1310 |
+
"hsl(" + h + ", " + s + "%, " + l + "%)" :
|
1311 |
+
"hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
|
1312 |
+
},
|
1313 |
+
toHex: function(allow3Char) {
|
1314 |
+
return rgbToHex(this._r, this._g, this._b, allow3Char);
|
1315 |
+
},
|
1316 |
+
toHexString: function(allow3Char) {
|
1317 |
+
return '#' + this.toHex(allow3Char);
|
1318 |
+
},
|
1319 |
+
toHex8: function() {
|
1320 |
+
return rgbaToHex(this._r, this._g, this._b, this._a);
|
1321 |
+
},
|
1322 |
+
toHex8String: function() {
|
1323 |
+
return '#' + this.toHex8();
|
1324 |
+
},
|
1325 |
+
toRgb: function() {
|
1326 |
+
return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
|
1327 |
+
},
|
1328 |
+
toRgbString: function() {
|
1329 |
+
return (this._a == 1) ?
|
1330 |
+
"rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
|
1331 |
+
"rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
|
1332 |
+
},
|
1333 |
+
toPercentageRgb: function() {
|
1334 |
+
return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
|
1335 |
+
},
|
1336 |
+
toPercentageRgbString: function() {
|
1337 |
+
return (this._a == 1) ?
|
1338 |
+
"rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
|
1339 |
+
"rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
1340 |
+
},
|
1341 |
+
toName: function() {
|
1342 |
+
if (this._a === 0) {
|
1343 |
+
return "transparent";
|
1344 |
+
}
|
1345 |
+
|
1346 |
+
if (this._a < 1) {
|
1347 |
+
return false;
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
|
1351 |
+
},
|
1352 |
+
toFilter: function(secondColor) {
|
1353 |
+
var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);
|
1354 |
+
var secondHex8String = hex8String;
|
1355 |
+
var gradientType = this._gradientType ? "GradientType = 1, " : "";
|
1356 |
+
|
1357 |
+
if (secondColor) {
|
1358 |
+
var s = tinycolor(secondColor);
|
1359 |
+
secondHex8String = s.toHex8String();
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
|
1363 |
+
},
|
1364 |
+
toString: function(format) {
|
1365 |
+
var formatSet = !!format;
|
1366 |
+
format = format || this._format;
|
1367 |
+
|
1368 |
+
var formattedString = false;
|
1369 |
+
var hasAlpha = this._a < 1 && this._a >= 0;
|
1370 |
+
var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");
|
1371 |
+
|
1372 |
+
if (needsAlphaFormat) {
|
1373 |
+
// Special case for "transparent", all other non-alpha formats
|
1374 |
+
// will return rgba when there is transparency.
|
1375 |
+
if (format === "name" && this._a === 0) {
|
1376 |
+
return this.toName();
|
1377 |
+
}
|
1378 |
+
return this.toRgbString();
|
1379 |
+
}
|
1380 |
+
if (format === "rgb") {
|
1381 |
+
formattedString = this.toRgbString();
|
1382 |
+
}
|
1383 |
+
if (format === "prgb") {
|
1384 |
+
formattedString = this.toPercentageRgbString();
|
1385 |
+
}
|
1386 |
+
if (format === "hex" || format === "hex6") {
|
1387 |
+
formattedString = this.toHexString();
|
1388 |
+
}
|
1389 |
+
if (format === "hex3") {
|
1390 |
+
formattedString = this.toHexString(true);
|
1391 |
+
}
|
1392 |
+
if (format === "hex8") {
|
1393 |
+
formattedString = this.toHex8String();
|
1394 |
+
}
|
1395 |
+
if (format === "name") {
|
1396 |
+
formattedString = this.toName();
|
1397 |
+
}
|
1398 |
+
if (format === "hsl") {
|
1399 |
+
formattedString = this.toHslString();
|
1400 |
+
}
|
1401 |
+
if (format === "hsv") {
|
1402 |
+
formattedString = this.toHsvString();
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
return formattedString || this.toHexString();
|
1406 |
+
},
|
1407 |
+
|
1408 |
+
_applyModification: function(fn, args) {
|
1409 |
+
var color = fn.apply(null, [this].concat([].slice.call(args)));
|
1410 |
+
this._r = color._r;
|
1411 |
+
this._g = color._g;
|
1412 |
+
this._b = color._b;
|
1413 |
+
this.setAlpha(color._a);
|
1414 |
+
return this;
|
1415 |
+
},
|
1416 |
+
lighten: function() {
|
1417 |
+
return this._applyModification(lighten, arguments);
|
1418 |
+
},
|
1419 |
+
brighten: function() {
|
1420 |
+
return this._applyModification(brighten, arguments);
|
1421 |
+
},
|
1422 |
+
darken: function() {
|
1423 |
+
return this._applyModification(darken, arguments);
|
1424 |
+
},
|
1425 |
+
desaturate: function() {
|
1426 |
+
return this._applyModification(desaturate, arguments);
|
1427 |
+
},
|
1428 |
+
saturate: function() {
|
1429 |
+
return this._applyModification(saturate, arguments);
|
1430 |
+
},
|
1431 |
+
greyscale: function() {
|
1432 |
+
return this._applyModification(greyscale, arguments);
|
1433 |
+
},
|
1434 |
+
spin: function() {
|
1435 |
+
return this._applyModification(spin, arguments);
|
1436 |
+
},
|
1437 |
+
|
1438 |
+
_applyCombination: function(fn, args) {
|
1439 |
+
return fn.apply(null, [this].concat([].slice.call(args)));
|
1440 |
+
},
|
1441 |
+
analogous: function() {
|
1442 |
+
return this._applyCombination(analogous, arguments);
|
1443 |
+
},
|
1444 |
+
complement: function() {
|
1445 |
+
return this._applyCombination(complement, arguments);
|
1446 |
+
},
|
1447 |
+
monochromatic: function() {
|
1448 |
+
return this._applyCombination(monochromatic, arguments);
|
1449 |
+
},
|
1450 |
+
splitcomplement: function() {
|
1451 |
+
return this._applyCombination(splitcomplement, arguments);
|
1452 |
+
},
|
1453 |
+
triad: function() {
|
1454 |
+
return this._applyCombination(triad, arguments);
|
1455 |
+
},
|
1456 |
+
tetrad: function() {
|
1457 |
+
return this._applyCombination(tetrad, arguments);
|
1458 |
+
}
|
1459 |
+
};
|
1460 |
+
|
1461 |
+
// If input is an object, force 1 into "1.0" to handle ratios properly
|
1462 |
+
// String input requires "1.0" as input, so 1 will be treated as 1
|
1463 |
+
tinycolor.fromRatio = function(color, opts) {
|
1464 |
+
if (typeof color == "object") {
|
1465 |
+
var newColor = {};
|
1466 |
+
for (var i in color) {
|
1467 |
+
if (color.hasOwnProperty(i)) {
|
1468 |
+
if (i === "a") {
|
1469 |
+
newColor[i] = color[i];
|
1470 |
+
}
|
1471 |
+
else {
|
1472 |
+
newColor[i] = convertToPercentage(color[i]);
|
1473 |
+
}
|
1474 |
+
}
|
1475 |
+
}
|
1476 |
+
color = newColor;
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
return tinycolor(color, opts);
|
1480 |
+
};
|
1481 |
+
|
1482 |
+
// Given a string or object, convert that input to RGB
|
1483 |
+
// Possible string inputs:
|
1484 |
+
//
|
1485 |
+
// "red"
|
1486 |
+
// "#f00" or "f00"
|
1487 |
+
// "#ff0000" or "ff0000"
|
1488 |
+
// "#ff000000" or "ff000000"
|
1489 |
+
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
1490 |
+
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
1491 |
+
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
1492 |
+
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
1493 |
+
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
1494 |
+
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
1495 |
+
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
1496 |
+
//
|
1497 |
+
function inputToRGB(color) {
|
1498 |
+
|
1499 |
+
var rgb = { r: 0, g: 0, b: 0 };
|
1500 |
+
var a = 1;
|
1501 |
+
var ok = false;
|
1502 |
+
var format = false;
|
1503 |
+
|
1504 |
+
if (typeof color == "string") {
|
1505 |
+
color = stringInputToObject(color);
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
if (typeof color == "object") {
|
1509 |
+
if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) {
|
1510 |
+
rgb = rgbToRgb(color.r, color.g, color.b);
|
1511 |
+
ok = true;
|
1512 |
+
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
1513 |
+
}
|
1514 |
+
else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
|
1515 |
+
color.s = convertToPercentage(color.s);
|
1516 |
+
color.v = convertToPercentage(color.v);
|
1517 |
+
rgb = hsvToRgb(color.h, color.s, color.v);
|
1518 |
+
ok = true;
|
1519 |
+
format = "hsv";
|
1520 |
+
}
|
1521 |
+
else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
|
1522 |
+
color.s = convertToPercentage(color.s);
|
1523 |
+
color.l = convertToPercentage(color.l);
|
1524 |
+
rgb = hslToRgb(color.h, color.s, color.l);
|
1525 |
+
ok = true;
|
1526 |
+
format = "hsl";
|
1527 |
+
}
|
1528 |
+
|
1529 |
+
if (color.hasOwnProperty("a")) {
|
1530 |
+
a = color.a;
|
1531 |
+
}
|
1532 |
+
}
|
1533 |
+
|
1534 |
+
a = boundAlpha(a);
|
1535 |
+
|
1536 |
+
return {
|
1537 |
+
ok: ok,
|
1538 |
+
format: color.format || format,
|
1539 |
+
r: mathMin(255, mathMax(rgb.r, 0)),
|
1540 |
+
g: mathMin(255, mathMax(rgb.g, 0)),
|
1541 |
+
b: mathMin(255, mathMax(rgb.b, 0)),
|
1542 |
+
a: a
|
1543 |
+
};
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
|
1547 |
+
// Conversion Functions
|
1548 |
+
// --------------------
|
1549 |
+
|
1550 |
+
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
1551 |
+
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
1552 |
+
|
1553 |
+
// `rgbToRgb`
|
1554 |
+
// Handle bounds / percentage checking to conform to CSS color spec
|
1555 |
+
// <http://www.w3.org/TR/css3-color/>
|
1556 |
+
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
1557 |
+
// *Returns:* { r, g, b } in [0, 255]
|
1558 |
+
function rgbToRgb(r, g, b){
|
1559 |
+
return {
|
1560 |
+
r: bound01(r, 255) * 255,
|
1561 |
+
g: bound01(g, 255) * 255,
|
1562 |
+
b: bound01(b, 255) * 255
|
1563 |
+
};
|
1564 |
+
}
|
1565 |
+
|
1566 |
+
// `rgbToHsl`
|
1567 |
+
// Converts an RGB color value to HSL.
|
1568 |
+
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
1569 |
+
// *Returns:* { h, s, l } in [0,1]
|
1570 |
+
function rgbToHsl(r, g, b) {
|
1571 |
+
|
1572 |
+
r = bound01(r, 255);
|
1573 |
+
g = bound01(g, 255);
|
1574 |
+
b = bound01(b, 255);
|
1575 |
+
|
1576 |
+
var max = mathMax(r, g, b), min = mathMin(r, g, b);
|
1577 |
+
var h, s, l = (max + min) / 2;
|
1578 |
+
|
1579 |
+
if(max == min) {
|
1580 |
+
h = s = 0; // achromatic
|
1581 |
+
}
|
1582 |
+
else {
|
1583 |
+
var d = max - min;
|
1584 |
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
1585 |
+
switch(max) {
|
1586 |
+
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
1587 |
+
case g: h = (b - r) / d + 2; break;
|
1588 |
+
case b: h = (r - g) / d + 4; break;
|
1589 |
+
}
|
1590 |
+
|
1591 |
+
h /= 6;
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
return { h: h, s: s, l: l };
|
1595 |
+
}
|
1596 |
+
|
1597 |
+
// `hslToRgb`
|
1598 |
+
// Converts an HSL color value to RGB.
|
1599 |
+
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
1600 |
+
// *Returns:* { r, g, b } in the set [0, 255]
|
1601 |
+
function hslToRgb(h, s, l) {
|
1602 |
+
var r, g, b;
|
1603 |
+
|
1604 |
+
h = bound01(h, 360);
|
1605 |
+
s = bound01(s, 100);
|
1606 |
+
l = bound01(l, 100);
|
1607 |
+
|
1608 |
+
function hue2rgb(p, q, t) {
|
1609 |
+
if(t < 0) t += 1;
|
1610 |
+
if(t > 1) t -= 1;
|
1611 |
+
if(t < 1/6) return p + (q - p) * 6 * t;
|
1612 |
+
if(t < 1/2) return q;
|
1613 |
+
if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
|
1614 |
+
return p;
|
1615 |
+
}
|
1616 |
+
|
1617 |
+
if(s === 0) {
|
1618 |
+
r = g = b = l; // achromatic
|
1619 |
+
}
|
1620 |
+
else {
|
1621 |
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
1622 |
+
var p = 2 * l - q;
|
1623 |
+
r = hue2rgb(p, q, h + 1/3);
|
1624 |
+
g = hue2rgb(p, q, h);
|
1625 |
+
b = hue2rgb(p, q, h - 1/3);
|
1626 |
+
}
|
1627 |
+
|
1628 |
+
return { r: r * 255, g: g * 255, b: b * 255 };
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
// `rgbToHsv`
|
1632 |
+
// Converts an RGB color value to HSV
|
1633 |
+
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
1634 |
+
// *Returns:* { h, s, v } in [0,1]
|
1635 |
+
function rgbToHsv(r, g, b) {
|
1636 |
+
|
1637 |
+
r = bound01(r, 255);
|
1638 |
+
g = bound01(g, 255);
|
1639 |
+
b = bound01(b, 255);
|
1640 |
+
|
1641 |
+
var max = mathMax(r, g, b), min = mathMin(r, g, b);
|
1642 |
+
var h, s, v = max;
|
1643 |
+
|
1644 |
+
var d = max - min;
|
1645 |
+
s = max === 0 ? 0 : d / max;
|
1646 |
+
|
1647 |
+
if(max == min) {
|
1648 |
+
h = 0; // achromatic
|
1649 |
+
}
|
1650 |
+
else {
|
1651 |
+
switch(max) {
|
1652 |
+
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
1653 |
+
case g: h = (b - r) / d + 2; break;
|
1654 |
+
case b: h = (r - g) / d + 4; break;
|
1655 |
+
}
|
1656 |
+
h /= 6;
|
1657 |
+
}
|
1658 |
+
return { h: h, s: s, v: v };
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
// `hsvToRgb`
|
1662 |
+
// Converts an HSV color value to RGB.
|
1663 |
+
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
1664 |
+
// *Returns:* { r, g, b } in the set [0, 255]
|
1665 |
+
function hsvToRgb(h, s, v) {
|
1666 |
+
|
1667 |
+
h = bound01(h, 360) * 6;
|
1668 |
+
s = bound01(s, 100);
|
1669 |
+
v = bound01(v, 100);
|
1670 |
+
|
1671 |
+
var i = math.floor(h),
|
1672 |
+
f = h - i,
|
1673 |
+
p = v * (1 - s),
|
1674 |
+
q = v * (1 - f * s),
|
1675 |
+
t = v * (1 - (1 - f) * s),
|
1676 |
+
mod = i % 6,
|
1677 |
+
r = [v, q, p, p, t, v][mod],
|
1678 |
+
g = [t, v, v, q, p, p][mod],
|
1679 |
+
b = [p, p, t, v, v, q][mod];
|
1680 |
+
|
1681 |
+
return { r: r * 255, g: g * 255, b: b * 255 };
|
1682 |
+
}
|
1683 |
+
|
1684 |
+
// `rgbToHex`
|
1685 |
+
// Converts an RGB color to hex
|
1686 |
+
// Assumes r, g, and b are contained in the set [0, 255]
|
1687 |
+
// Returns a 3 or 6 character hex
|
1688 |
+
function rgbToHex(r, g, b, allow3Char) {
|
1689 |
+
|
1690 |
+
var hex = [
|
1691 |
+
pad2(mathRound(r).toString(16)),
|
1692 |
+
pad2(mathRound(g).toString(16)),
|
1693 |
+
pad2(mathRound(b).toString(16))
|
1694 |
+
];
|
1695 |
+
|
1696 |
+
// Return a 3 character hex if possible
|
1697 |
+
if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
|
1698 |
+
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
1699 |
+
}
|
1700 |
+
|
1701 |
+
return hex.join("");
|
1702 |
+
}
|
1703 |
+
// `rgbaToHex`
|
1704 |
+
// Converts an RGBA color plus alpha transparency to hex
|
1705 |
+
// Assumes r, g, b and a are contained in the set [0, 255]
|
1706 |
+
// Returns an 8 character hex
|
1707 |
+
function rgbaToHex(r, g, b, a) {
|
1708 |
+
|
1709 |
+
var hex = [
|
1710 |
+
pad2(convertDecimalToHex(a)),
|
1711 |
+
pad2(mathRound(r).toString(16)),
|
1712 |
+
pad2(mathRound(g).toString(16)),
|
1713 |
+
pad2(mathRound(b).toString(16))
|
1714 |
+
];
|
1715 |
+
|
1716 |
+
return hex.join("");
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
// `equals`
|
1720 |
+
// Can be called with any tinycolor input
|
1721 |
+
tinycolor.equals = function (color1, color2) {
|
1722 |
+
if (!color1 || !color2) { return false; }
|
1723 |
+
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
|
1724 |
+
};
|
1725 |
+
tinycolor.random = function() {
|
1726 |
+
return tinycolor.fromRatio({
|
1727 |
+
r: mathRandom(),
|
1728 |
+
g: mathRandom(),
|
1729 |
+
b: mathRandom()
|
1730 |
+
});
|
1731 |
+
};
|
1732 |
+
|
1733 |
+
|
1734 |
+
// Modification Functions
|
1735 |
+
// ----------------------
|
1736 |
+
// Thanks to less.js for some of the basics here
|
1737 |
+
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
1738 |
+
|
1739 |
+
function desaturate(color, amount) {
|
1740 |
+
amount = (amount === 0) ? 0 : (amount || 10);
|
1741 |
+
var hsl = tinycolor(color).toHsl();
|
1742 |
+
hsl.s -= amount / 100;
|
1743 |
+
hsl.s = clamp01(hsl.s);
|
1744 |
+
return tinycolor(hsl);
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
function saturate(color, amount) {
|
1748 |
+
amount = (amount === 0) ? 0 : (amount || 10);
|
1749 |
+
var hsl = tinycolor(color).toHsl();
|
1750 |
+
hsl.s += amount / 100;
|
1751 |
+
hsl.s = clamp01(hsl.s);
|
1752 |
+
return tinycolor(hsl);
|
1753 |
+
}
|
1754 |
+
|
1755 |
+
function greyscale(color) {
|
1756 |
+
return tinycolor(color).desaturate(100);
|
1757 |
+
}
|
1758 |
+
|
1759 |
+
function lighten (color, amount) {
|
1760 |
+
amount = (amount === 0) ? 0 : (amount || 10);
|
1761 |
+
var hsl = tinycolor(color).toHsl();
|
1762 |
+
hsl.l += amount / 100;
|
1763 |
+
hsl.l = clamp01(hsl.l);
|
1764 |
+
return tinycolor(hsl);
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
function brighten(color, amount) {
|
1768 |
+
amount = (amount === 0) ? 0 : (amount || 10);
|
1769 |
+
var rgb = tinycolor(color).toRgb();
|
1770 |
+
rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
|
1771 |
+
rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
|
1772 |
+
rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
|
1773 |
+
return tinycolor(rgb);
|
1774 |
+
}
|
1775 |
+
|
1776 |
+
function darken (color, amount) {
|
1777 |
+
amount = (amount === 0) ? 0 : (amount || 10);
|
1778 |
+
var hsl = tinycolor(color).toHsl();
|
1779 |
+
hsl.l -= amount / 100;
|
1780 |
+
hsl.l = clamp01(hsl.l);
|
1781 |
+
return tinycolor(hsl);
|
1782 |
+
}
|
1783 |
+
|
1784 |
+
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
1785 |
+
// Values outside of this range will be wrapped into this range.
|
1786 |
+
function spin(color, amount) {
|
1787 |
+
var hsl = tinycolor(color).toHsl();
|
1788 |
+
var hue = (mathRound(hsl.h) + amount) % 360;
|
1789 |
+
hsl.h = hue < 0 ? 360 + hue : hue;
|
1790 |
+
return tinycolor(hsl);
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
// Combination Functions
|
1794 |
+
// ---------------------
|
1795 |
+
// Thanks to jQuery xColor for some of the ideas behind these
|
1796 |
+
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
1797 |
+
|
1798 |
+
function complement(color) {
|
1799 |
+
var hsl = tinycolor(color).toHsl();
|
1800 |
+
hsl.h = (hsl.h + 180) % 360;
|
1801 |
+
return tinycolor(hsl);
|
1802 |
+
}
|
1803 |
+
|
1804 |
+
function triad(color) {
|
1805 |
+
var hsl = tinycolor(color).toHsl();
|
1806 |
+
var h = hsl.h;
|
1807 |
+
return [
|
1808 |
+
tinycolor(color),
|
1809 |
+
tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
|
1810 |
+
tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
|
1811 |
+
];
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
function tetrad(color) {
|
1815 |
+
var hsl = tinycolor(color).toHsl();
|
1816 |
+
var h = hsl.h;
|
1817 |
+
return [
|
1818 |
+
tinycolor(color),
|
1819 |
+
tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
|
1820 |
+
tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
|
1821 |
+
tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
|
1822 |
+
];
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
function splitcomplement(color) {
|
1826 |
+
var hsl = tinycolor(color).toHsl();
|
1827 |
+
var h = hsl.h;
|
1828 |
+
return [
|
1829 |
+
tinycolor(color),
|
1830 |
+
tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
|
1831 |
+
tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
|
1832 |
+
];
|
1833 |
+
}
|
1834 |
+
|
1835 |
+
function analogous(color, results, slices) {
|
1836 |
+
results = results || 6;
|
1837 |
+
slices = slices || 30;
|
1838 |
+
|
1839 |
+
var hsl = tinycolor(color).toHsl();
|
1840 |
+
var part = 360 / slices;
|
1841 |
+
var ret = [tinycolor(color)];
|
1842 |
+
|
1843 |
+
for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
|
1844 |
+
hsl.h = (hsl.h + part) % 360;
|
1845 |
+
ret.push(tinycolor(hsl));
|
1846 |
+
}
|
1847 |
+
return ret;
|
1848 |
+
}
|
1849 |
+
|
1850 |
+
function monochromatic(color, results) {
|
1851 |
+
results = results || 6;
|
1852 |
+
var hsv = tinycolor(color).toHsv();
|
1853 |
+
var h = hsv.h, s = hsv.s, v = hsv.v;
|
1854 |
+
var ret = [];
|
1855 |
+
var modification = 1 / results;
|
1856 |
+
|
1857 |
+
while (results--) {
|
1858 |
+
ret.push(tinycolor({ h: h, s: s, v: v}));
|
1859 |
+
v = (v + modification) % 1;
|
1860 |
+
}
|
1861 |
+
|
1862 |
+
return ret;
|
1863 |
+
}
|
1864 |
+
|
1865 |
+
// Utility Functions
|
1866 |
+
// ---------------------
|
1867 |
+
|
1868 |
+
tinycolor.mix = function(color1, color2, amount) {
|
1869 |
+
amount = (amount === 0) ? 0 : (amount || 50);
|
1870 |
+
|
1871 |
+
var rgb1 = tinycolor(color1).toRgb();
|
1872 |
+
var rgb2 = tinycolor(color2).toRgb();
|
1873 |
+
|
1874 |
+
var p = amount / 100;
|
1875 |
+
var w = p * 2 - 1;
|
1876 |
+
var a = rgb2.a - rgb1.a;
|
1877 |
+
|
1878 |
+
var w1;
|
1879 |
+
|
1880 |
+
if (w * a == -1) {
|
1881 |
+
w1 = w;
|
1882 |
+
} else {
|
1883 |
+
w1 = (w + a) / (1 + w * a);
|
1884 |
+
}
|
1885 |
+
|
1886 |
+
w1 = (w1 + 1) / 2;
|
1887 |
+
|
1888 |
+
var w2 = 1 - w1;
|
1889 |
+
|
1890 |
+
var rgba = {
|
1891 |
+
r: rgb2.r * w1 + rgb1.r * w2,
|
1892 |
+
g: rgb2.g * w1 + rgb1.g * w2,
|
1893 |
+
b: rgb2.b * w1 + rgb1.b * w2,
|
1894 |
+
a: rgb2.a * p + rgb1.a * (1 - p)
|
1895 |
+
};
|
1896 |
+
|
1897 |
+
return tinycolor(rgba);
|
1898 |
+
};
|
1899 |
+
|
1900 |
+
|
1901 |
+
// Readability Functions
|
1902 |
+
// ---------------------
|
1903 |
+
// <http://www.w3.org/TR/AERT#color-contrast>
|
1904 |
+
|
1905 |
+
// `readability`
|
1906 |
+
// Analyze the 2 colors and returns an object with the following properties:
|
1907 |
+
// `brightness`: difference in brightness between the two colors
|
1908 |
+
// `color`: difference in color/hue between the two colors
|
1909 |
+
tinycolor.readability = function(color1, color2) {
|
1910 |
+
var c1 = tinycolor(color1);
|
1911 |
+
var c2 = tinycolor(color2);
|
1912 |
+
var rgb1 = c1.toRgb();
|
1913 |
+
var rgb2 = c2.toRgb();
|
1914 |
+
var brightnessA = c1.getBrightness();
|
1915 |
+
var brightnessB = c2.getBrightness();
|
1916 |
+
var colorDiff = (
|
1917 |
+
Math.max(rgb1.r, rgb2.r) - Math.min(rgb1.r, rgb2.r) +
|
1918 |
+
Math.max(rgb1.g, rgb2.g) - Math.min(rgb1.g, rgb2.g) +
|
1919 |
+
Math.max(rgb1.b, rgb2.b) - Math.min(rgb1.b, rgb2.b)
|
1920 |
+
);
|
1921 |
+
|
1922 |
+
return {
|
1923 |
+
brightness: Math.abs(brightnessA - brightnessB),
|
1924 |
+
color: colorDiff
|
1925 |
+
};
|
1926 |
+
};
|
1927 |
+
|
1928 |
+
// `readable`
|
1929 |
+
// http://www.w3.org/TR/AERT#color-contrast
|
1930 |
+
// Ensure that foreground and background color combinations provide sufficient contrast.
|
1931 |
+
// *Example*
|
1932 |
+
// tinycolor.isReadable("#000", "#111") => false
|
1933 |
+
tinycolor.isReadable = function(color1, color2) {
|
1934 |
+
var readability = tinycolor.readability(color1, color2);
|
1935 |
+
return readability.brightness > 125 && readability.color > 500;
|
1936 |
+
};
|
1937 |
+
|
1938 |
+
// `mostReadable`
|
1939 |
+
// Given a base color and a list of possible foreground or background
|
1940 |
+
// colors for that base, returns the most readable color.
|
1941 |
+
// *Example*
|
1942 |
+
// tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000"
|
1943 |
+
tinycolor.mostReadable = function(baseColor, colorList) {
|
1944 |
+
var bestColor = null;
|
1945 |
+
var bestScore = 0;
|
1946 |
+
var bestIsReadable = false;
|
1947 |
+
for (var i=0; i < colorList.length; i++) {
|
1948 |
+
|
1949 |
+
// We normalize both around the "acceptable" breaking point,
|
1950 |
+
// but rank brightness constrast higher than hue.
|
1951 |
+
|
1952 |
+
var readability = tinycolor.readability(baseColor, colorList[i]);
|
1953 |
+
var readable = readability.brightness > 125 && readability.color > 500;
|
1954 |
+
var score = 3 * (readability.brightness / 125) + (readability.color / 500);
|
1955 |
+
|
1956 |
+
if ((readable && ! bestIsReadable) ||
|
1957 |
+
(readable && bestIsReadable && score > bestScore) ||
|
1958 |
+
((! readable) && (! bestIsReadable) && score > bestScore)) {
|
1959 |
+
bestIsReadable = readable;
|
1960 |
+
bestScore = score;
|
1961 |
+
bestColor = tinycolor(colorList[i]);
|
1962 |
+
}
|
1963 |
+
}
|
1964 |
+
return bestColor;
|
1965 |
+
};
|
1966 |
+
|
1967 |
+
|
1968 |
+
// Big List of Colors
|
1969 |
+
// ------------------
|
1970 |
+
// <http://www.w3.org/TR/css3-color/#svg-color>
|
1971 |
+
var names = tinycolor.names = {
|
1972 |
+
aliceblue: "f0f8ff",
|
1973 |
+
antiquewhite: "faebd7",
|
1974 |
+
aqua: "0ff",
|
1975 |
+
aquamarine: "7fffd4",
|
1976 |
+
azure: "f0ffff",
|
1977 |
+
beige: "f5f5dc",
|
1978 |
+
bisque: "ffe4c4",
|
1979 |
+
black: "000",
|
1980 |
+
blanchedalmond: "ffebcd",
|
1981 |
+
blue: "00f",
|
1982 |
+
blueviolet: "8a2be2",
|
1983 |
+
brown: "a52a2a",
|
1984 |
+
burlywood: "deb887",
|
1985 |
+
burntsienna: "ea7e5d",
|
1986 |
+
cadetblue: "5f9ea0",
|
1987 |
+
chartreuse: "7fff00",
|
1988 |
+
chocolate: "d2691e",
|
1989 |
+
coral: "ff7f50",
|
1990 |
+
cornflowerblue: "6495ed",
|
1991 |
+
cornsilk: "fff8dc",
|
1992 |
+
crimson: "dc143c",
|
1993 |
+
cyan: "0ff",
|
1994 |
+
darkblue: "00008b",
|
1995 |
+
darkcyan: "008b8b",
|
1996 |
+
darkgoldenrod: "b8860b",
|
1997 |
+
darkgray: "a9a9a9",
|
1998 |
+
darkgreen: "006400",
|
1999 |
+
darkgrey: "a9a9a9",
|
2000 |
+
darkkhaki: "bdb76b",
|
2001 |
+
darkmagenta: "8b008b",
|
2002 |
+
darkolivegreen: "556b2f",
|
2003 |
+
darkorange: "ff8c00",
|
2004 |
+
darkorchid: "9932cc",
|
2005 |
+
darkred: "8b0000",
|
2006 |
+
darksalmon: "e9967a",
|
2007 |
+
darkseagreen: "8fbc8f",
|
2008 |
+
darkslateblue: "483d8b",
|
2009 |
+
darkslategray: "2f4f4f",
|
2010 |
+
darkslategrey: "2f4f4f",
|
2011 |
+
darkturquoise: "00ced1",
|
2012 |
+
darkviolet: "9400d3",
|
2013 |
+
deeppink: "ff1493",
|
2014 |
+
deepskyblue: "00bfff",
|
2015 |
+
dimgray: "696969",
|
2016 |
+
dimgrey: "696969",
|
2017 |
+
dodgerblue: "1e90ff",
|
2018 |
+
firebrick: "b22222",
|
2019 |
+
floralwhite: "fffaf0",
|
2020 |
+
forestgreen: "228b22",
|
2021 |
+
fuchsia: "f0f",
|
2022 |
+
gainsboro: "dcdcdc",
|
2023 |
+
ghostwhite: "f8f8ff",
|
2024 |
+
gold: "ffd700",
|
2025 |
+
goldenrod: "daa520",
|
2026 |
+
gray: "808080",
|
2027 |
+
green: "008000",
|
2028 |
+
greenyellow: "adff2f",
|
2029 |
+
grey: "808080",
|
2030 |
+
honeydew: "f0fff0",
|
2031 |
+
hotpink: "ff69b4",
|
2032 |
+
indianred: "cd5c5c",
|
2033 |
+
indigo: "4b0082",
|
2034 |
+
ivory: "fffff0",
|
2035 |
+
khaki: "f0e68c",
|
2036 |
+
lavender: "e6e6fa",
|
2037 |
+
lavenderblush: "fff0f5",
|
2038 |
+
lawngreen: "7cfc00",
|
2039 |
+
lemonchiffon: "fffacd",
|
2040 |
+
lightblue: "add8e6",
|
2041 |
+
lightcoral: "f08080",
|
2042 |
+
lightcyan: "e0ffff",
|
2043 |
+
lightgoldenrodyellow: "fafad2",
|
2044 |
+
lightgray: "d3d3d3",
|
2045 |
+
lightgreen: "90ee90",
|
2046 |
+
lightgrey: "d3d3d3",
|
2047 |
+
lightpink: "ffb6c1",
|
2048 |
+
lightsalmon: "ffa07a",
|
2049 |
+
lightseagreen: "20b2aa",
|
2050 |
+
lightskyblue: "87cefa",
|
2051 |
+
lightslategray: "789",
|
2052 |
+
lightslategrey: "789",
|
2053 |
+
lightsteelblue: "b0c4de",
|
2054 |
+
lightyellow: "ffffe0",
|
2055 |
+
lime: "0f0",
|
2056 |
+
limegreen: "32cd32",
|
2057 |
+
linen: "faf0e6",
|
2058 |
+
magenta: "f0f",
|
2059 |
+
maroon: "800000",
|
2060 |
+
mediumaquamarine: "66cdaa",
|
2061 |
+
mediumblue: "0000cd",
|
2062 |
+
mediumorchid: "ba55d3",
|
2063 |
+
mediumpurple: "9370db",
|
2064 |
+
mediumseagreen: "3cb371",
|
2065 |
+
mediumslateblue: "7b68ee",
|
2066 |
+
mediumspringgreen: "00fa9a",
|
2067 |
+
mediumturquoise: "48d1cc",
|
2068 |
+
mediumvioletred: "c71585",
|
2069 |
+
midnightblue: "191970",
|
2070 |
+
mintcream: "f5fffa",
|
2071 |
+
mistyrose: "ffe4e1",
|
2072 |
+
moccasin: "ffe4b5",
|
2073 |
+
navajowhite: "ffdead",
|
2074 |
+
navy: "000080",
|
2075 |
+
oldlace: "fdf5e6",
|
2076 |
+
olive: "808000",
|
2077 |
+
olivedrab: "6b8e23",
|
2078 |
+
orange: "ffa500",
|
2079 |
+
orangered: "ff4500",
|
2080 |
+
orchid: "da70d6",
|
2081 |
+
palegoldenrod: "eee8aa",
|
2082 |
+
palegreen: "98fb98",
|
2083 |
+
paleturquoise: "afeeee",
|
2084 |
+
palevioletred: "db7093",
|
2085 |
+
papayawhip: "ffefd5",
|
2086 |
+
peachpuff: "ffdab9",
|
2087 |
+
peru: "cd853f",
|
2088 |
+
pink: "ffc0cb",
|
2089 |
+
plum: "dda0dd",
|
2090 |
+
powderblue: "b0e0e6",
|
2091 |
+
purple: "800080",
|
2092 |
+
rebeccapurple: "663399",
|
2093 |
+
red: "f00",
|
2094 |
+
rosybrown: "bc8f8f",
|
2095 |
+
royalblue: "4169e1",
|
2096 |
+
saddlebrown: "8b4513",
|
2097 |
+
salmon: "fa8072",
|
2098 |
+
sandybrown: "f4a460",
|
2099 |
+
seagreen: "2e8b57",
|
2100 |
+
seashell: "fff5ee",
|
2101 |
+
sienna: "a0522d",
|
2102 |
+
silver: "c0c0c0",
|
2103 |
+
skyblue: "87ceeb",
|
2104 |
+
slateblue: "6a5acd",
|
2105 |
+
slategray: "708090",
|
2106 |
+
slategrey: "708090",
|
2107 |
+
snow: "fffafa",
|
2108 |
+
springgreen: "00ff7f",
|
2109 |
+
steelblue: "4682b4",
|
2110 |
+
tan: "d2b48c",
|
2111 |
+
teal: "008080",
|
2112 |
+
thistle: "d8bfd8",
|
2113 |
+
tomato: "ff6347",
|
2114 |
+
turquoise: "40e0d0",
|
2115 |
+
violet: "ee82ee",
|
2116 |
+
wheat: "f5deb3",
|
2117 |
+
white: "fff",
|
2118 |
+
whitesmoke: "f5f5f5",
|
2119 |
+
yellow: "ff0",
|
2120 |
+
yellowgreen: "9acd32"
|
2121 |
+
};
|
2122 |
+
|
2123 |
+
// Make it easy to access colors via `hexNames[hex]`
|
2124 |
+
var hexNames = tinycolor.hexNames = flip(names);
|
2125 |
+
|
2126 |
+
|
2127 |
+
// Utilities
|
2128 |
+
// ---------
|
2129 |
+
|
2130 |
+
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
2131 |
+
function flip(o) {
|
2132 |
+
var flipped = { };
|
2133 |
+
for (var i in o) {
|
2134 |
+
if (o.hasOwnProperty(i)) {
|
2135 |
+
flipped[o[i]] = i;
|
2136 |
+
}
|
2137 |
+
}
|
2138 |
+
return flipped;
|
2139 |
+
}
|
2140 |
+
|
2141 |
+
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
2142 |
+
function boundAlpha(a) {
|
2143 |
+
a = parseFloat(a);
|
2144 |
+
|
2145 |
+
if (isNaN(a) || a < 0 || a > 1) {
|
2146 |
+
a = 1;
|
2147 |
+
}
|
2148 |
+
|
2149 |
+
return a;
|
2150 |
+
}
|
2151 |
+
|
2152 |
+
// Take input from [0, n] and return it as [0, 1]
|
2153 |
+
function bound01(n, max) {
|
2154 |
+
if (isOnePointZero(n)) { n = "100%"; }
|
2155 |
+
|
2156 |
+
var processPercent = isPercentage(n);
|
2157 |
+
n = mathMin(max, mathMax(0, parseFloat(n)));
|
2158 |
+
|
2159 |
+
// Automatically convert percentage into number
|
2160 |
+
if (processPercent) {
|
2161 |
+
n = parseInt(n * max, 10) / 100;
|
2162 |
+
}
|
2163 |
+
|
2164 |
+
// Handle floating point rounding errors
|
2165 |
+
if ((math.abs(n - max) < 0.000001)) {
|
2166 |
+
return 1;
|
2167 |
+
}
|
2168 |
+
|
2169 |
+
// Convert into [0, 1] range if it isn't already
|
2170 |
+
return (n % max) / parseFloat(max);
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
// Force a number between 0 and 1
|
2174 |
+
function clamp01(val) {
|
2175 |
+
return mathMin(1, mathMax(0, val));
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
// Parse a base-16 hex value into a base-10 integer
|
2179 |
+
function parseIntFromHex(val) {
|
2180 |
+
return parseInt(val, 16);
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
2184 |
+
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
2185 |
+
function isOnePointZero(n) {
|
2186 |
+
return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
|
2187 |
+
}
|
2188 |
+
|
2189 |
+
// Check to see if string passed in is a percentage
|
2190 |
+
function isPercentage(n) {
|
2191 |
+
return typeof n === "string" && n.indexOf('%') != -1;
|
2192 |
+
}
|
2193 |
+
|
2194 |
+
// Force a hex value to have 2 characters
|
2195 |
+
function pad2(c) {
|
2196 |
+
return c.length == 1 ? '0' + c : '' + c;
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
// Replace a decimal with it's percentage value
|
2200 |
+
function convertToPercentage(n) {
|
2201 |
+
if (n <= 1) {
|
2202 |
+
n = (n * 100) + "%";
|
2203 |
+
}
|
2204 |
+
|
2205 |
+
return n;
|
2206 |
+
}
|
2207 |
+
|
2208 |
+
// Converts a decimal to a hex value
|
2209 |
+
function convertDecimalToHex(d) {
|
2210 |
+
return Math.round(parseFloat(d) * 255).toString(16);
|
2211 |
+
}
|
2212 |
+
// Converts a hex value to a decimal
|
2213 |
+
function convertHexToDecimal(h) {
|
2214 |
+
return (parseIntFromHex(h) / 255);
|
2215 |
+
}
|
2216 |
+
|
2217 |
+
var matchers = (function() {
|
2218 |
+
|
2219 |
+
// <http://www.w3.org/TR/css3-values/#integers>
|
2220 |
+
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
2221 |
+
|
2222 |
+
// <http://www.w3.org/TR/css3-values/#number-value>
|
2223 |
+
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
|
2224 |
+
|
2225 |
+
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
2226 |
+
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
2227 |
+
|
2228 |
+
// Actual matching.
|
2229 |
+
// Parentheses and commas are optional, but not required.
|
2230 |
+
// Whitespace can take the place of commas or opening paren
|
2231 |
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
2232 |
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
|
2233 |
+
|
2234 |
+
return {
|
2235 |
+
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
2236 |
+
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
2237 |
+
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
2238 |
+
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
2239 |
+
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
2240 |
+
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
2241 |
+
hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
2242 |
+
hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
2243 |
+
hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
2244 |
+
};
|
2245 |
+
})();
|
2246 |
+
|
2247 |
+
// `stringInputToObject`
|
2248 |
+
// Permissive string parsing. Take in a number of formats, and output an object
|
2249 |
+
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
2250 |
+
function stringInputToObject(color) {
|
2251 |
+
|
2252 |
+
color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
|
2253 |
+
var named = false;
|
2254 |
+
if (names[color]) {
|
2255 |
+
color = names[color];
|
2256 |
+
named = true;
|
2257 |
+
}
|
2258 |
+
else if (color == 'transparent') {
|
2259 |
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
2260 |
+
}
|
2261 |
+
|
2262 |
+
// Try to match string input using regular expressions.
|
2263 |
+
// Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
|
2264 |
+
// Just return an object and let the conversion functions handle that.
|
2265 |
+
// This way the result will be the same whether the tinycolor is initialized with string or object.
|
2266 |
+
var match;
|
2267 |
+
if ((match = matchers.rgb.exec(color))) {
|
2268 |
+
return { r: match[1], g: match[2], b: match[3] };
|
2269 |
+
}
|
2270 |
+
if ((match = matchers.rgba.exec(color))) {
|
2271 |
+
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
2272 |
+
}
|
2273 |
+
if ((match = matchers.hsl.exec(color))) {
|
2274 |
+
return { h: match[1], s: match[2], l: match[3] };
|
2275 |
+
}
|
2276 |
+
if ((match = matchers.hsla.exec(color))) {
|
2277 |
+
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
2278 |
+
}
|
2279 |
+
if ((match = matchers.hsv.exec(color))) {
|
2280 |
+
return { h: match[1], s: match[2], v: match[3] };
|
2281 |
+
}
|
2282 |
+
if ((match = matchers.hsva.exec(color))) {
|
2283 |
+
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
2284 |
+
}
|
2285 |
+
if ((match = matchers.hex8.exec(color))) {
|
2286 |
+
return {
|
2287 |
+
a: convertHexToDecimal(match[1]),
|
2288 |
+
r: parseIntFromHex(match[2]),
|
2289 |
+
g: parseIntFromHex(match[3]),
|
2290 |
+
b: parseIntFromHex(match[4]),
|
2291 |
+
format: named ? "name" : "hex8"
|
2292 |
+
};
|
2293 |
+
}
|
2294 |
+
if ((match = matchers.hex6.exec(color))) {
|
2295 |
+
return {
|
2296 |
+
r: parseIntFromHex(match[1]),
|
2297 |
+
g: parseIntFromHex(match[2]),
|
2298 |
+
b: parseIntFromHex(match[3]),
|
2299 |
+
format: named ? "name" : "hex"
|
2300 |
+
};
|
2301 |
+
}
|
2302 |
+
if ((match = matchers.hex3.exec(color))) {
|
2303 |
+
return {
|
2304 |
+
r: parseIntFromHex(match[1] + '' + match[1]),
|
2305 |
+
g: parseIntFromHex(match[2] + '' + match[2]),
|
2306 |
+
b: parseIntFromHex(match[3] + '' + match[3]),
|
2307 |
+
format: named ? "name" : "hex"
|
2308 |
+
};
|
2309 |
+
}
|
2310 |
+
|
2311 |
+
return false;
|
2312 |
+
}
|
2313 |
+
|
2314 |
+
window.tinycolor = tinycolor;
|
2315 |
+
})();
|
2316 |
+
|
2317 |
+
$(function () {
|
2318 |
+
if ($.fn.spectrum.load) {
|
2319 |
+
$.fn.spectrum.processNativeColorInputs();
|
2320 |
+
}
|
2321 |
+
});
|
2322 |
+
|
2323 |
+
});
|