Version Description
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Zoom Magnifier |
Version | 1.3.30 |
Comparing to | |
See all releases |
Code changes from version 1.3.29 to 1.3.30
- assets/css/admin.css +19 -19
- assets/css/frontend.css +64 -64
- assets/css/yith_magnifier.css +70 -70
- assets/js/jquery.carouFredSel.js +4253 -4253
- assets/js/jquery.carouFredSel.min.js +1 -1
- assets/js/ywzm_frontend.js +62 -62
- changelog.txt +190 -190
- class.yith-wcmg-admin.php +112 -112
- class.yith-wcmg-frontend.php +173 -173
- functions.yith-wcmg.php +78 -78
- init.php +157 -157
- languages/yith-woocommerce-zoom-magnifier.pot +2 -2
- lib/class.yith-woocommerce-zoom-magnifier.php +188 -188
- lib/class.yith-ywzm-custom-types.php +180 -180
- lib/class.yith-ywzm-plugin-fw-loader.php +253 -253
- plugin-fw/LICENSE.txt +695 -695
- plugin-fw/assets/css/admin.css +333 -333
- plugin-fw/assets/css/codemirror/codemirror.css +260 -260
- plugin-fw/assets/css/colorbox.css +65 -65
- plugin-fw/assets/css/elementor.css +35 -35
- plugin-fw/assets/css/metaboxes.css +751 -751
- plugin-fw/assets/css/yit-plugin-panel.css +1087 -1087
- plugin-fw/assets/css/yit-upgrade-to-pro.css +82 -82
- plugin-fw/assets/css/yit-upgrader.css +21 -21
- plugin-fw/assets/css/yith-fields.css +2248 -2248
- plugin-fw/assets/css/yith-icon.css +310 -310
- plugin-fw/assets/css/yith-select2-no-wc.css +740 -740
- plugin-fw/assets/images/arrow_down.svg +9 -9
- plugin-fw/assets/js/codemirror/codemirror.js +360 -5799
assets/css/admin.css
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
.yith_woocommerce_slider {
|
2 |
-
width: 300px;
|
3 |
-
float: left
|
4 |
-
}
|
5 |
-
.yith_woocommerce_slider_value {
|
6 |
-
margin-top: -5px;
|
7 |
-
margin-left: 10px;
|
8 |
-
width: 50px;
|
9 |
-
float: left;
|
10 |
-
text-align: center;
|
11 |
-
font-weight: bold;
|
12 |
-
}
|
13 |
-
|
14 |
-
.yith_banner {
|
15 |
-
margin-top: 10px;
|
16 |
-
}
|
17 |
-
|
18 |
-
#eg-wrap .select_fake {/* solve back-end conflict with Essential Grid */
|
19 |
-
height: 24px;
|
20 |
}
|
1 |
+
.yith_woocommerce_slider {
|
2 |
+
width: 300px;
|
3 |
+
float: left
|
4 |
+
}
|
5 |
+
.yith_woocommerce_slider_value {
|
6 |
+
margin-top: -5px;
|
7 |
+
margin-left: 10px;
|
8 |
+
width: 50px;
|
9 |
+
float: left;
|
10 |
+
text-align: center;
|
11 |
+
font-weight: bold;
|
12 |
+
}
|
13 |
+
|
14 |
+
.yith_banner {
|
15 |
+
margin-top: 10px;
|
16 |
+
}
|
17 |
+
|
18 |
+
#eg-wrap .select_fake {/* solve back-end conflict with Essential Grid */
|
19 |
+
height: 24px;
|
20 |
}
|
assets/css/frontend.css
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
/* gallery */
|
2 |
-
.yith_magnifier_gallery {
|
3 |
-
margin: 0;
|
4 |
-
padding: 0;
|
5 |
-
}
|
6 |
-
|
7 |
-
.yith_magnifier_gallery li {
|
8 |
-
position: relative;
|
9 |
-
float: left;
|
10 |
-
display: block;
|
11 |
-
}
|
12 |
-
|
13 |
-
.yith_magnifier_gallery li.last {
|
14 |
-
margin-right: 0;
|
15 |
-
}
|
16 |
-
|
17 |
-
.yith_magnifier_gallery li a {
|
18 |
-
width: 100% !important;
|
19 |
-
display: block;
|
20 |
-
margin-top: 10px;
|
21 |
-
height: auto !important;
|
22 |
-
}
|
23 |
-
|
24 |
-
/* next/prev */
|
25 |
-
.single-product.woocommerce .thumbnails {
|
26 |
-
position: relative;
|
27 |
-
}
|
28 |
-
|
29 |
-
.single-product.woocommerce .thumbnails #slider-prev,
|
30 |
-
.single-product.woocommerce .thumbnails #slider-next {
|
31 |
-
display: none !important;
|
32 |
-
cursor: pointer;
|
33 |
-
width: 27px;
|
34 |
-
height: 26px;
|
35 |
-
background: url('../images/slider-arrow.png') no-repeat left center;
|
36 |
-
position: absolute;
|
37 |
-
top: 48%;
|
38 |
-
margin-top: -2px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.single-product.woocommerce .thumbnails #slider-prev {
|
42 |
-
background-position: left center;
|
43 |
-
left: 0px;
|
44 |
-
}
|
45 |
-
|
46 |
-
.single-product.woocommerce .thumbnails #slider-next {
|
47 |
-
background-position: right center;
|
48 |
-
right: 0px;
|
49 |
-
}
|
50 |
-
|
51 |
-
.single-product.woocommerce .thumbnails:hover #slider-prev,
|
52 |
-
.single-product.woocommerce .thumbnails:hover #slider-next {
|
53 |
-
display: block !important;
|
54 |
-
}
|
55 |
-
|
56 |
-
span.onsale {
|
57 |
-
z-index: 10000
|
58 |
-
}
|
59 |
-
|
60 |
-
div.pp_woocommerce a.pp_expand {
|
61 |
-
display: inline;
|
62 |
-
bottom: 10px;
|
63 |
-
top: initial;
|
64 |
-
left: 10px;
|
65 |
}
|
1 |
+
/* gallery */
|
2 |
+
.yith_magnifier_gallery {
|
3 |
+
margin: 0;
|
4 |
+
padding: 0;
|
5 |
+
}
|
6 |
+
|
7 |
+
.yith_magnifier_gallery li {
|
8 |
+
position: relative;
|
9 |
+
float: left;
|
10 |
+
display: block;
|
11 |
+
}
|
12 |
+
|
13 |
+
.yith_magnifier_gallery li.last {
|
14 |
+
margin-right: 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
.yith_magnifier_gallery li a {
|
18 |
+
width: 100% !important;
|
19 |
+
display: block;
|
20 |
+
margin-top: 10px;
|
21 |
+
height: auto !important;
|
22 |
+
}
|
23 |
+
|
24 |
+
/* next/prev */
|
25 |
+
.single-product.woocommerce .thumbnails {
|
26 |
+
position: relative;
|
27 |
+
}
|
28 |
+
|
29 |
+
.single-product.woocommerce .thumbnails #slider-prev,
|
30 |
+
.single-product.woocommerce .thumbnails #slider-next {
|
31 |
+
display: none !important;
|
32 |
+
cursor: pointer;
|
33 |
+
width: 27px;
|
34 |
+
height: 26px;
|
35 |
+
background: url('../images/slider-arrow.png') no-repeat left center;
|
36 |
+
position: absolute;
|
37 |
+
top: 48%;
|
38 |
+
margin-top: -2px;
|
39 |
+
}
|
40 |
+
|
41 |
+
.single-product.woocommerce .thumbnails #slider-prev {
|
42 |
+
background-position: left center;
|
43 |
+
left: 0px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.single-product.woocommerce .thumbnails #slider-next {
|
47 |
+
background-position: right center;
|
48 |
+
right: 0px;
|
49 |
+
}
|
50 |
+
|
51 |
+
.single-product.woocommerce .thumbnails:hover #slider-prev,
|
52 |
+
.single-product.woocommerce .thumbnails:hover #slider-next {
|
53 |
+
display: block !important;
|
54 |
+
}
|
55 |
+
|
56 |
+
span.onsale {
|
57 |
+
z-index: 10000
|
58 |
+
}
|
59 |
+
|
60 |
+
div.pp_woocommerce a.pp_expand {
|
61 |
+
display: inline;
|
62 |
+
bottom: 10px;
|
63 |
+
top: initial;
|
64 |
+
left: 10px;
|
65 |
}
|
assets/css/yith_magnifier.css
CHANGED
@@ -1,70 +1,70 @@
|
|
1 |
-
.yith_magnifier_zoom_wrap {
|
2 |
-
top: 0;
|
3 |
-
position: relative;
|
4 |
-
}
|
5 |
-
|
6 |
-
.yith_magnifier_loading {
|
7 |
-
color:white;
|
8 |
-
background:#222;
|
9 |
-
padding:3px;
|
10 |
-
border:1px solid #000;
|
11 |
-
position: absolute;
|
12 |
-
text-align: center;
|
13 |
-
top: 10%;
|
14 |
-
z-index: 9999;
|
15 |
-
}
|
16 |
-
|
17 |
-
.yith_magnifier_zoom {
|
18 |
-
position: relative;
|
19 |
-
display: block;
|
20 |
-
}
|
21 |
-
|
22 |
-
.yith_magnifier_zoom img {
|
23 |
-
display: block;
|
24 |
-
}
|
25 |
-
|
26 |
-
.yith_magnifier_mousetrap {
|
27 |
-
z-index: 999;
|
28 |
-
position: absolute;
|
29 |
-
width: 0px;
|
30 |
-
height :0px;
|
31 |
-
left: 0;
|
32 |
-
top: 0;
|
33 |
-
}
|
34 |
-
|
35 |
-
/* ie fix */
|
36 |
-
.ie .yith_magnifier_mousetrap {
|
37 |
-
background-image: url(".");
|
38 |
-
}
|
39 |
-
|
40 |
-
.yith_magnifier_lens {
|
41 |
-
display: none;
|
42 |
-
z-index:98;
|
43 |
-
position:absolute;
|
44 |
-
overflow: hidden;
|
45 |
-
|
46 |
-
border: 1px solid #ccc;
|
47 |
-
}
|
48 |
-
|
49 |
-
.yith_magnifier_lens img {
|
50 |
-
width: auto !important;
|
51 |
-
max-width: none !important;
|
52 |
-
|
53 |
-
-webkit-transition: all ease-in-out 0s !important;
|
54 |
-
-moz-transition: all ease-in-out 0s !important;
|
55 |
-
-o-transition: all ease-in-out 0s !important;
|
56 |
-
transition: all ease-in-out 0s !important;
|
57 |
-
}
|
58 |
-
|
59 |
-
.yith_magnifier_zoom_magnifier {
|
60 |
-
display:none;
|
61 |
-
position:absolute;
|
62 |
-
z-index: 99;
|
63 |
-
|
64 |
-
border:4px solid #ccc;
|
65 |
-
overflow:hidden;
|
66 |
-
}
|
67 |
-
|
68 |
-
.yith_magnifier_gallery {
|
69 |
-
list-style: none;
|
70 |
-
}
|
1 |
+
.yith_magnifier_zoom_wrap {
|
2 |
+
top: 0;
|
3 |
+
position: relative;
|
4 |
+
}
|
5 |
+
|
6 |
+
.yith_magnifier_loading {
|
7 |
+
color:white;
|
8 |
+
background:#222;
|
9 |
+
padding:3px;
|
10 |
+
border:1px solid #000;
|
11 |
+
position: absolute;
|
12 |
+
text-align: center;
|
13 |
+
top: 10%;
|
14 |
+
z-index: 9999;
|
15 |
+
}
|
16 |
+
|
17 |
+
.yith_magnifier_zoom {
|
18 |
+
position: relative;
|
19 |
+
display: block;
|
20 |
+
}
|
21 |
+
|
22 |
+
.yith_magnifier_zoom img {
|
23 |
+
display: block;
|
24 |
+
}
|
25 |
+
|
26 |
+
.yith_magnifier_mousetrap {
|
27 |
+
z-index: 999;
|
28 |
+
position: absolute;
|
29 |
+
width: 0px;
|
30 |
+
height :0px;
|
31 |
+
left: 0;
|
32 |
+
top: 0;
|
33 |
+
}
|
34 |
+
|
35 |
+
/* ie fix */
|
36 |
+
.ie .yith_magnifier_mousetrap {
|
37 |
+
background-image: url(".");
|
38 |
+
}
|
39 |
+
|
40 |
+
.yith_magnifier_lens {
|
41 |
+
display: none;
|
42 |
+
z-index:98;
|
43 |
+
position:absolute;
|
44 |
+
overflow: hidden;
|
45 |
+
|
46 |
+
border: 1px solid #ccc;
|
47 |
+
}
|
48 |
+
|
49 |
+
.yith_magnifier_lens img {
|
50 |
+
width: auto !important;
|
51 |
+
max-width: none !important;
|
52 |
+
|
53 |
+
-webkit-transition: all ease-in-out 0s !important;
|
54 |
+
-moz-transition: all ease-in-out 0s !important;
|
55 |
+
-o-transition: all ease-in-out 0s !important;
|
56 |
+
transition: all ease-in-out 0s !important;
|
57 |
+
}
|
58 |
+
|
59 |
+
.yith_magnifier_zoom_magnifier {
|
60 |
+
display:none;
|
61 |
+
position:absolute;
|
62 |
+
z-index: 99;
|
63 |
+
|
64 |
+
border:4px solid #ccc;
|
65 |
+
overflow:hidden;
|
66 |
+
}
|
67 |
+
|
68 |
+
.yith_magnifier_gallery {
|
69 |
+
list-style: none;
|
70 |
+
}
|
assets/js/jquery.carouFredSel.js
CHANGED
@@ -1,4254 +1,4254 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery carouFredSel 6.2.1
|
3 |
-
* Demo's and documentation:
|
4 |
-
* caroufredsel.dev7studios.com
|
5 |
-
*
|
6 |
-
* Copyright (c) 2013 Fred Heusschen
|
7 |
-
* www.frebsite.nl
|
8 |
-
*
|
9 |
-
* Dual licensed under the MIT and GPL licenses.
|
10 |
-
* http://en.wikipedia.org/wiki/MIT_License
|
11 |
-
* http://en.wikipedia.org/wiki/GNU_General_Public_License
|
12 |
-
*/
|
13 |
-
|
14 |
-
|
15 |
-
(function($) {
|
16 |
-
|
17 |
-
|
18 |
-
// LOCAL
|
19 |
-
|
20 |
-
if ( $.fn.carouFredSel )
|
21 |
-
{
|
22 |
-
return;
|
23 |
-
}
|
24 |
-
|
25 |
-
$.fn.caroufredsel = $.fn.carouFredSel = function(options, configs)
|
26 |
-
{
|
27 |
-
|
28 |
-
// no element
|
29 |
-
if (this.length == 0)
|
30 |
-
{
|
31 |
-
debug( true, 'No element found for "' + this.selector + '".' );
|
32 |
-
return this;
|
33 |
-
}
|
34 |
-
|
35 |
-
// multiple elements
|
36 |
-
if (this.length > 1)
|
37 |
-
{
|
38 |
-
return this.each(function() {
|
39 |
-
$(this).carouFredSel(options, configs);
|
40 |
-
});
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
-
var $cfs = this,
|
45 |
-
$tt0 = this[0],
|
46 |
-
starting_position = false;
|
47 |
-
|
48 |
-
if ($cfs.data('_cfs_isCarousel'))
|
49 |
-
{
|
50 |
-
starting_position = $cfs.triggerHandler('_cfs_triggerEvent', 'currentPosition');
|
51 |
-
$cfs.trigger('_cfs_triggerEvent', ['destroy', true]);
|
52 |
-
}
|
53 |
-
|
54 |
-
var FN = {};
|
55 |
-
|
56 |
-
FN._init = function(o, setOrig, start)
|
57 |
-
{
|
58 |
-
o = go_getObject($tt0, o);
|
59 |
-
|
60 |
-
o.items = go_getItemsObject($tt0, o.items);
|
61 |
-
o.scroll = go_getScrollObject($tt0, o.scroll);
|
62 |
-
o.auto = go_getAutoObject($tt0, o.auto);
|
63 |
-
o.prev = go_getPrevNextObject($tt0, o.prev);
|
64 |
-
o.next = go_getPrevNextObject($tt0, o.next);
|
65 |
-
o.pagination = go_getPaginationObject($tt0, o.pagination);
|
66 |
-
o.swipe = go_getSwipeObject($tt0, o.swipe);
|
67 |
-
o.mousewheel = go_getMousewheelObject($tt0, o.mousewheel);
|
68 |
-
|
69 |
-
if (setOrig)
|
70 |
-
{
|
71 |
-
opts_orig = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
|
72 |
-
}
|
73 |
-
|
74 |
-
opts = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
|
75 |
-
opts.d = cf_getDimensions(opts);
|
76 |
-
|
77 |
-
crsl.direction = (opts.direction == 'up' || opts.direction == 'left') ? 'next' : 'prev';
|
78 |
-
|
79 |
-
var a_itm = $cfs.children(),
|
80 |
-
avail_primary = ms_getParentSize($wrp, opts, 'width');
|
81 |
-
|
82 |
-
if (is_true(opts.cookie))
|
83 |
-
{
|
84 |
-
opts.cookie = 'caroufredsel_cookie_' + conf.serialNumber;
|
85 |
-
}
|
86 |
-
|
87 |
-
opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
|
88 |
-
|
89 |
-
// complement items and sizes
|
90 |
-
opts.items = in_complementItems(opts.items, opts, a_itm, start);
|
91 |
-
opts[opts.d['width']] = in_complementPrimarySize(opts[opts.d['width']], opts, a_itm);
|
92 |
-
opts[opts.d['height']] = in_complementSecondarySize(opts[opts.d['height']], opts, a_itm);
|
93 |
-
|
94 |
-
// primary size not set for a responsive carousel
|
95 |
-
if (opts.responsive)
|
96 |
-
{
|
97 |
-
if (!is_percentage(opts[opts.d['width']]))
|
98 |
-
{
|
99 |
-
opts[opts.d['width']] = '100%';
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
// primary size is percentage
|
104 |
-
if (is_percentage(opts[opts.d['width']]))
|
105 |
-
{
|
106 |
-
crsl.upDateOnWindowResize = true;
|
107 |
-
crsl.primarySizePercentage = opts[opts.d['width']];
|
108 |
-
opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
|
109 |
-
if (!opts.items.visible)
|
110 |
-
{
|
111 |
-
opts.items.visibleConf.variable = true;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
if (opts.responsive)
|
116 |
-
{
|
117 |
-
opts.usePadding = false;
|
118 |
-
opts.padding = [0, 0, 0, 0];
|
119 |
-
opts.align = false;
|
120 |
-
opts.items.visibleConf.variable = false;
|
121 |
-
}
|
122 |
-
else
|
123 |
-
{
|
124 |
-
// visible-items not set
|
125 |
-
if (!opts.items.visible)
|
126 |
-
{
|
127 |
-
opts = in_complementVisibleItems(opts, avail_primary);
|
128 |
-
}
|
129 |
-
|
130 |
-
// primary size not set -> calculate it or set to "variable"
|
131 |
-
if (!opts[opts.d['width']])
|
132 |
-
{
|
133 |
-
if (!opts.items.visibleConf.variable && is_number(opts.items[opts.d['width']]) && opts.items.filter == '*')
|
134 |
-
{
|
135 |
-
opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']];
|
136 |
-
opts.align = false;
|
137 |
-
}
|
138 |
-
else
|
139 |
-
{
|
140 |
-
opts[opts.d['width']] = 'variable';
|
141 |
-
}
|
142 |
-
}
|
143 |
-
// align not set -> set to center if primary size is number
|
144 |
-
if (is_undefined(opts.align))
|
145 |
-
{
|
146 |
-
opts.align = (is_number(opts[opts.d['width']]))
|
147 |
-
? 'center'
|
148 |
-
: false;
|
149 |
-
}
|
150 |
-
// set variabe visible-items
|
151 |
-
if (opts.items.visibleConf.variable)
|
152 |
-
{
|
153 |
-
opts.items.visible = gn_getVisibleItemsNext(a_itm, opts, 0);
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
// set visible items by filter
|
158 |
-
if (opts.items.filter != '*' && !opts.items.visibleConf.variable)
|
159 |
-
{
|
160 |
-
opts.items.visibleConf.org = opts.items.visible;
|
161 |
-
opts.items.visible = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
|
162 |
-
}
|
163 |
-
|
164 |
-
opts.items.visible = cf_getItemsAdjust(opts.items.visible, opts, opts.items.visibleConf.adjust, $tt0);
|
165 |
-
opts.items.visibleConf.old = opts.items.visible;
|
166 |
-
|
167 |
-
if (opts.responsive)
|
168 |
-
{
|
169 |
-
if (!opts.items.visibleConf.min)
|
170 |
-
{
|
171 |
-
opts.items.visibleConf.min = opts.items.visible;
|
172 |
-
}
|
173 |
-
if (!opts.items.visibleConf.max)
|
174 |
-
{
|
175 |
-
opts.items.visibleConf.max = opts.items.visible;
|
176 |
-
}
|
177 |
-
opts = in_getResponsiveValues(opts, a_itm, avail_primary);
|
178 |
-
}
|
179 |
-
else
|
180 |
-
{
|
181 |
-
opts.padding = cf_getPadding(opts.padding);
|
182 |
-
|
183 |
-
if (opts.align == 'top')
|
184 |
-
{
|
185 |
-
opts.align = 'left';
|
186 |
-
}
|
187 |
-
else if (opts.align == 'bottom')
|
188 |
-
{
|
189 |
-
opts.align = 'right';
|
190 |
-
}
|
191 |
-
|
192 |
-
switch (opts.align)
|
193 |
-
{
|
194 |
-
// align: center, left or right
|
195 |
-
case 'center':
|
196 |
-
case 'left':
|
197 |
-
case 'right':
|
198 |
-
if (opts[opts.d['width']] != 'variable')
|
199 |
-
{
|
200 |
-
opts = in_getAlignPadding(opts, a_itm);
|
201 |
-
opts.usePadding = true;
|
202 |
-
}
|
203 |
-
break;
|
204 |
-
|
205 |
-
// padding
|
206 |
-
default:
|
207 |
-
opts.align = false;
|
208 |
-
opts.usePadding = (
|
209 |
-
opts.padding[0] == 0 &&
|
210 |
-
opts.padding[1] == 0 &&
|
211 |
-
opts.padding[2] == 0 &&
|
212 |
-
opts.padding[3] == 0
|
213 |
-
) ? false : true;
|
214 |
-
break;
|
215 |
-
}
|
216 |
-
}
|
217 |
-
|
218 |
-
if (!is_number(opts.scroll.duration))
|
219 |
-
{
|
220 |
-
opts.scroll.duration = 500;
|
221 |
-
}
|
222 |
-
if (is_undefined(opts.scroll.items))
|
223 |
-
{
|
224 |
-
opts.scroll.items = (opts.responsive || opts.items.visibleConf.variable || opts.items.filter != '*')
|
225 |
-
? 'visible'
|
226 |
-
: opts.items.visible;
|
227 |
-
}
|
228 |
-
|
229 |
-
opts.auto = $.extend(true, {}, opts.scroll, opts.auto);
|
230 |
-
opts.prev = $.extend(true, {}, opts.scroll, opts.prev);
|
231 |
-
opts.next = $.extend(true, {}, opts.scroll, opts.next);
|
232 |
-
opts.pagination = $.extend(true, {}, opts.scroll, opts.pagination);
|
233 |
-
// swipe and mousewheel extend later on, per direction
|
234 |
-
|
235 |
-
opts.auto = go_complementAutoObject($tt0, opts.auto);
|
236 |
-
opts.prev = go_complementPrevNextObject($tt0, opts.prev);
|
237 |
-
opts.next = go_complementPrevNextObject($tt0, opts.next);
|
238 |
-
opts.pagination = go_complementPaginationObject($tt0, opts.pagination);
|
239 |
-
opts.swipe = go_complementSwipeObject($tt0, opts.swipe);
|
240 |
-
opts.mousewheel = go_complementMousewheelObject($tt0, opts.mousewheel);
|
241 |
-
|
242 |
-
if (opts.synchronise)
|
243 |
-
{
|
244 |
-
opts.synchronise = cf_getSynchArr(opts.synchronise);
|
245 |
-
}
|
246 |
-
|
247 |
-
|
248 |
-
// DEPRECATED
|
249 |
-
if (opts.auto.onPauseStart)
|
250 |
-
{
|
251 |
-
opts.auto.onTimeoutStart = opts.auto.onPauseStart;
|
252 |
-
deprecated('auto.onPauseStart', 'auto.onTimeoutStart');
|
253 |
-
}
|
254 |
-
if (opts.auto.onPausePause)
|
255 |
-
{
|
256 |
-
opts.auto.onTimeoutPause = opts.auto.onPausePause;
|
257 |
-
deprecated('auto.onPausePause', 'auto.onTimeoutPause');
|
258 |
-
}
|
259 |
-
if (opts.auto.onPauseEnd)
|
260 |
-
{
|
261 |
-
opts.auto.onTimeoutEnd = opts.auto.onPauseEnd;
|
262 |
-
deprecated('auto.onPauseEnd', 'auto.onTimeoutEnd');
|
263 |
-
}
|
264 |
-
if (opts.auto.pauseDuration)
|
265 |
-
{
|
266 |
-
opts.auto.timeoutDuration = opts.auto.pauseDuration;
|
267 |
-
deprecated('auto.pauseDuration', 'auto.timeoutDuration');
|
268 |
-
}
|
269 |
-
// /DEPRECATED
|
270 |
-
|
271 |
-
|
272 |
-
}; // /init
|
273 |
-
|
274 |
-
|
275 |
-
FN._build = function() {
|
276 |
-
$cfs.data('_cfs_isCarousel', true);
|
277 |
-
|
278 |
-
var a_itm = $cfs.children(),
|
279 |
-
orgCSS = in_mapCss($cfs, ['textAlign', 'float', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'width', 'height', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft']),
|
280 |
-
newPosition = 'relative';
|
281 |
-
|
282 |
-
switch (orgCSS.position)
|
283 |
-
{
|
284 |
-
case 'absolute':
|
285 |
-
case 'fixed':
|
286 |
-
newPosition = orgCSS.position;
|
287 |
-
break;
|
288 |
-
}
|
289 |
-
|
290 |
-
if (conf.wrapper == 'parent')
|
291 |
-
{
|
292 |
-
sz_storeOrigCss($wrp);
|
293 |
-
}
|
294 |
-
else
|
295 |
-
{
|
296 |
-
$wrp.css(orgCSS);
|
297 |
-
}
|
298 |
-
$wrp.css({
|
299 |
-
'overflow' : 'hidden',
|
300 |
-
'position' : newPosition
|
301 |
-
});
|
302 |
-
|
303 |
-
sz_storeOrigCss($cfs);
|
304 |
-
$cfs.data('_cfs_origCssZindex', orgCSS.zIndex);
|
305 |
-
$cfs.css({
|
306 |
-
'textAlign' : 'left',
|
307 |
-
'float' : 'none',
|
308 |
-
'position' : 'absolute',
|
309 |
-
'top' : 0,
|
310 |
-
'right' : 'auto',
|
311 |
-
'bottom' : 'auto',
|
312 |
-
'left' : 0,
|
313 |
-
'marginTop' : 0,
|
314 |
-
'marginRight' : 0,
|
315 |
-
'marginBottom' : 0,
|
316 |
-
'marginLeft' : 0
|
317 |
-
});
|
318 |
-
|
319 |
-
sz_storeMargin(a_itm, opts);
|
320 |
-
sz_storeOrigCss(a_itm);
|
321 |
-
if (opts.responsive)
|
322 |
-
{
|
323 |
-
sz_setResponsiveSizes(opts, a_itm);
|
324 |
-
}
|
325 |
-
|
326 |
-
}; // /build
|
327 |
-
|
328 |
-
|
329 |
-
FN._bind_events = function() {
|
330 |
-
FN._unbind_events();
|
331 |
-
|
332 |
-
|
333 |
-
// stop event
|
334 |
-
$cfs.bind(cf_e('stop', conf), function(e, imm) {
|
335 |
-
e.stopPropagation();
|
336 |
-
|
337 |
-
// button
|
338 |
-
if (!crsl.isStopped)
|
339 |
-
{
|
340 |
-
if (opts.auto.button)
|
341 |
-
{
|
342 |
-
opts.auto.button.addClass(cf_c('stopped', conf));
|
343 |
-
}
|
344 |
-
}
|
345 |
-
|
346 |
-
// set stopped
|
347 |
-
crsl.isStopped = true;
|
348 |
-
|
349 |
-
if (opts.auto.play)
|
350 |
-
{
|
351 |
-
opts.auto.play = false;
|
352 |
-
$cfs.trigger(cf_e('pause', conf), imm);
|
353 |
-
}
|
354 |
-
return true;
|
355 |
-
});
|
356 |
-
|
357 |
-
|
358 |
-
// finish event
|
359 |
-
$cfs.bind(cf_e('finish', conf), function(e) {
|
360 |
-
e.stopPropagation();
|
361 |
-
if (crsl.isScrolling)
|
362 |
-
{
|
363 |
-
sc_stopScroll(scrl);
|
364 |
-
}
|
365 |
-
return true;
|
366 |
-
});
|
367 |
-
|
368 |
-
|
369 |
-
// pause event
|
370 |
-
$cfs.bind(cf_e('pause', conf), function(e, imm, res) {
|
371 |
-
e.stopPropagation();
|
372 |
-
tmrs = sc_clearTimers(tmrs);
|
373 |
-
|
374 |
-
// immediately pause
|
375 |
-
if (imm && crsl.isScrolling)
|
376 |
-
{
|
377 |
-
scrl.isStopped = true;
|
378 |
-
var nst = getTime() - scrl.startTime;
|
379 |
-
scrl.duration -= nst;
|
380 |
-
if (scrl.pre)
|
381 |
-
{
|
382 |
-
scrl.pre.duration -= nst;
|
383 |
-
}
|
384 |
-
if (scrl.post)
|
385 |
-
{
|
386 |
-
scrl.post.duration -= nst;
|
387 |
-
}
|
388 |
-
sc_stopScroll(scrl, false);
|
389 |
-
}
|
390 |
-
|
391 |
-
// update remaining pause-time
|
392 |
-
if (!crsl.isPaused && !crsl.isScrolling)
|
393 |
-
{
|
394 |
-
if (res)
|
395 |
-
{
|
396 |
-
tmrs.timePassed += getTime() - tmrs.startTime;
|
397 |
-
}
|
398 |
-
}
|
399 |
-
|
400 |
-
// button
|
401 |
-
if (!crsl.isPaused)
|
402 |
-
{
|
403 |
-
if (opts.auto.button)
|
404 |
-
{
|
405 |
-
opts.auto.button.addClass(cf_c('paused', conf));
|
406 |
-
}
|
407 |
-
}
|
408 |
-
|
409 |
-
// set paused
|
410 |
-
crsl.isPaused = true;
|
411 |
-
|
412 |
-
// pause pause callback
|
413 |
-
if (opts.auto.onTimeoutPause)
|
414 |
-
{
|
415 |
-
var dur1 = opts.auto.timeoutDuration - tmrs.timePassed,
|
416 |
-
perc = 100 - Math.ceil( dur1 * 100 / opts.auto.timeoutDuration );
|
417 |
-
|
418 |
-
opts.auto.onTimeoutPause.call($tt0, perc, dur1);
|
419 |
-
}
|
420 |
-
return true;
|
421 |
-
});
|
422 |
-
|
423 |
-
|
424 |
-
// play event
|
425 |
-
$cfs.bind(cf_e('play', conf), function(e, dir, del, res) {
|
426 |
-
e.stopPropagation();
|
427 |
-
tmrs = sc_clearTimers(tmrs);
|
428 |
-
|
429 |
-
// sort params
|
430 |
-
var v = [dir, del, res],
|
431 |
-
t = ['string', 'number', 'boolean'],
|
432 |
-
a = cf_sortParams(v, t);
|
433 |
-
|
434 |
-
dir = a[0];
|
435 |
-
del = a[1];
|
436 |
-
res = a[2];
|
437 |
-
|
438 |
-
if (dir != 'prev' && dir != 'next')
|
439 |
-
{
|
440 |
-
dir = crsl.direction;
|
441 |
-
}
|
442 |
-
if (!is_number(del))
|
443 |
-
{
|
444 |
-
del = 0;
|
445 |
-
}
|
446 |
-
if (!is_boolean(res))
|
447 |
-
{
|
448 |
-
res = false;
|
449 |
-
}
|
450 |
-
|
451 |
-
// stopped?
|
452 |
-
if (res)
|
453 |
-
{
|
454 |
-
crsl.isStopped = false;
|
455 |
-
opts.auto.play = true;
|
456 |
-
}
|
457 |
-
if (!opts.auto.play)
|
458 |
-
{
|
459 |
-
e.stopImmediatePropagation();
|
460 |
-
return debug(conf, 'Carousel stopped: Not scrolling.');
|
461 |
-
}
|
462 |
-
|
463 |
-
// button
|
464 |
-
if (crsl.isPaused)
|
465 |
-
{
|
466 |
-
if (opts.auto.button)
|
467 |
-
{
|
468 |
-
opts.auto.button.removeClass(cf_c('stopped', conf));
|
469 |
-
opts.auto.button.removeClass(cf_c('paused', conf));
|
470 |
-
}
|
471 |
-
}
|
472 |
-
|
473 |
-
// set playing
|
474 |
-
crsl.isPaused = false;
|
475 |
-
tmrs.startTime = getTime();
|
476 |
-
|
477 |
-
// timeout the scrolling
|
478 |
-
var dur1 = opts.auto.timeoutDuration + del;
|
479 |
-
dur2 = dur1 - tmrs.timePassed;
|
480 |
-
perc = 100 - Math.ceil(dur2 * 100 / dur1);
|
481 |
-
|
482 |
-
if (opts.auto.progress)
|
483 |
-
{
|
484 |
-
tmrs.progress = setInterval(function() {
|
485 |
-
var pasd = getTime() - tmrs.startTime + tmrs.timePassed,
|
486 |
-
perc = Math.ceil(pasd * 100 / dur1);
|
487 |
-
opts.auto.progress.updater.call(opts.auto.progress.bar[0], perc);
|
488 |
-
}, opts.auto.progress.interval);
|
489 |
-
}
|
490 |
-
|
491 |
-
tmrs.auto = setTimeout(function() {
|
492 |
-
if (opts.auto.progress)
|
493 |
-
{
|
494 |
-
opts.auto.progress.updater.call(opts.auto.progress.bar[0], 100);
|
495 |
-
}
|
496 |
-
if (opts.auto.onTimeoutEnd)
|
497 |
-
{
|
498 |
-
opts.auto.onTimeoutEnd.call($tt0, perc, dur2);
|
499 |
-
}
|
500 |
-
if (crsl.isScrolling)
|
501 |
-
{
|
502 |
-
$cfs.trigger(cf_e('play', conf), dir);
|
503 |
-
}
|
504 |
-
else
|
505 |
-
{
|
506 |
-
$cfs.trigger(cf_e(dir, conf), opts.auto);
|
507 |
-
}
|
508 |
-
}, dur2);
|
509 |
-
|
510 |
-
// pause start callback
|
511 |
-
if (opts.auto.onTimeoutStart)
|
512 |
-
{
|
513 |
-
opts.auto.onTimeoutStart.call($tt0, perc, dur2);
|
514 |
-
}
|
515 |
-
|
516 |
-
return true;
|
517 |
-
});
|
518 |
-
|
519 |
-
|
520 |
-
// resume event
|
521 |
-
$cfs.bind(cf_e('resume', conf), function(e) {
|
522 |
-
e.stopPropagation();
|
523 |
-
if (scrl.isStopped)
|
524 |
-
{
|
525 |
-
scrl.isStopped = false;
|
526 |
-
crsl.isPaused = false;
|
527 |
-
crsl.isScrolling = true;
|
528 |
-
scrl.startTime = getTime();
|
529 |
-
sc_startScroll(scrl, conf);
|
530 |
-
}
|
531 |
-
else
|
532 |
-
{
|
533 |
-
$cfs.trigger(cf_e('play', conf));
|
534 |
-
}
|
535 |
-
return true;
|
536 |
-
});
|
537 |
-
|
538 |
-
|
539 |
-
// prev + next events
|
540 |
-
$cfs.bind(cf_e('prev', conf)+' '+cf_e('next', conf), function(e, obj, num, clb, que) {
|
541 |
-
e.stopPropagation();
|
542 |
-
|
543 |
-
// stopped or hidden carousel, don't scroll, don't queue
|
544 |
-
if (crsl.isStopped || $cfs.is(':hidden'))
|
545 |
-
{
|
546 |
-
e.stopImmediatePropagation();
|
547 |
-
return debug(conf, 'Carousel stopped or hidden: Not scrolling.');
|
548 |
-
}
|
549 |
-
|
550 |
-
// not enough items
|
551 |
-
var minimum = (is_number(opts.items.minimum)) ? opts.items.minimum : opts.items.visible + 1;
|
552 |
-
if (minimum > itms.total)
|
553 |
-
{
|
554 |
-
e.stopImmediatePropagation();
|
555 |
-
return debug(conf, 'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.');
|
556 |
-
}
|
557 |
-
|
558 |
-
// get config
|
559 |
-
var v = [obj, num, clb, que],
|
560 |
-
t = ['object', 'number/string', 'function', 'boolean'],
|
561 |
-
a = cf_sortParams(v, t);
|
562 |
-
|
563 |
-
obj = a[0];
|
564 |
-
num = a[1];
|
565 |
-
clb = a[2];
|
566 |
-
que = a[3];
|
567 |
-
|
568 |
-
var eType = e.type.slice(conf.events.prefix.length);
|
569 |
-
|
570 |
-
if (!is_object(obj))
|
571 |
-
{
|
572 |
-
obj = {};
|
573 |
-
}
|
574 |
-
if (is_function(clb))
|
575 |
-
{
|
576 |
-
obj.onAfter = clb;
|
577 |
-
}
|
578 |
-
if (is_boolean(que))
|
579 |
-
{
|
580 |
-
obj.queue = que;
|
581 |
-
}
|
582 |
-
obj = $.extend(true, {}, opts[eType], obj);
|
583 |
-
|
584 |
-
// test conditions callback
|
585 |
-
if (obj.conditions && !obj.conditions.call($tt0, eType))
|
586 |
-
{
|
587 |
-
e.stopImmediatePropagation();
|
588 |
-
return debug(conf, 'Callback "conditions" returned false.');
|
589 |
-
}
|
590 |
-
|
591 |
-
if (!is_number(num))
|
592 |
-
{
|
593 |
-
if (opts.items.filter != '*')
|
594 |
-
{
|
595 |
-
num = 'visible';
|
596 |
-
}
|
597 |
-
else
|
598 |
-
{
|
599 |
-
var arr = [num, obj.items, opts[eType].items];
|
600 |
-
for (var a = 0, l = arr.length; a < l; a++)
|
601 |
-
{
|
602 |
-
if (is_number(arr[a]) || arr[a] == 'page' || arr[a] == 'visible') {
|
603 |
-
num = arr[a];
|
604 |
-
break;
|
605 |
-
}
|
606 |
-
}
|
607 |
-
}
|
608 |
-
switch(num) {
|
609 |
-
case 'page':
|
610 |
-
e.stopImmediatePropagation();
|
611 |
-
return $cfs.triggerHandler(cf_e(eType+'Page', conf), [obj, clb]);
|
612 |
-
break;
|
613 |
-
|
614 |
-
case 'visible':
|
615 |
-
if (!opts.items.visibleConf.variable && opts.items.filter == '*')
|
616 |
-
{
|
617 |
-
num = opts.items.visible;
|
618 |
-
}
|
619 |
-
break;
|
620 |
-
}
|
621 |
-
}
|
622 |
-
|
623 |
-
// resume animation, add current to queue
|
624 |
-
if (scrl.isStopped)
|
625 |
-
{
|
626 |
-
$cfs.trigger(cf_e('resume', conf));
|
627 |
-
$cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
|
628 |
-
e.stopImmediatePropagation();
|
629 |
-
return debug(conf, 'Carousel resumed scrolling.');
|
630 |
-
}
|
631 |
-
|
632 |
-
// queue if scrolling
|
633 |
-
if (obj.duration > 0)
|
634 |
-
{
|
635 |
-
if (crsl.isScrolling)
|
636 |
-
{
|
637 |
-
if (obj.queue)
|
638 |
-
{
|
639 |
-
if (obj.queue == 'last')
|
640 |
-
{
|
641 |
-
queu = [];
|
642 |
-
}
|
643 |
-
if (obj.queue != 'first' || queu.length == 0)
|
644 |
-
{
|
645 |
-
$cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
|
646 |
-
}
|
647 |
-
}
|
648 |
-
e.stopImmediatePropagation();
|
649 |
-
return debug(conf, 'Carousel currently scrolling.');
|
650 |
-
}
|
651 |
-
}
|
652 |
-
|
653 |
-
tmrs.timePassed = 0;
|
654 |
-
$cfs.trigger(cf_e('slide_'+eType, conf), [obj, num]);
|
655 |
-
|
656 |
-
// synchronise
|
657 |
-
if (opts.synchronise)
|
658 |
-
{
|
659 |
-
var s = opts.synchronise,
|
660 |
-
c = [obj, num];
|
661 |
-
|
662 |
-
for (var j = 0, l = s.length; j < l; j++) {
|
663 |
-
var d = eType;
|
664 |
-
if (!s[j][2])
|
665 |
-
{
|
666 |
-
d = (d == 'prev') ? 'next' : 'prev';
|
667 |
-
}
|
668 |
-
if (!s[j][1])
|
669 |
-
{
|
670 |
-
c[0] = s[j][0].triggerHandler('_cfs_triggerEvent', ['configuration', d]);
|
671 |
-
}
|
672 |
-
c[1] = num + s[j][3];
|
673 |
-
s[j][0].trigger('_cfs_triggerEvent', ['slide_'+d, c]);
|
674 |
-
}
|
675 |
-
}
|
676 |
-
return true;
|
677 |
-
});
|
678 |
-
|
679 |
-
|
680 |
-
// prev event
|
681 |
-
$cfs.bind(cf_e('slide_prev', conf), function(e, sO, nI) {
|
682 |
-
e.stopPropagation();
|
683 |
-
var a_itm = $cfs.children();
|
684 |
-
|
685 |
-
// non-circular at start, scroll to end
|
686 |
-
if (!opts.circular)
|
687 |
-
{
|
688 |
-
if (itms.first == 0)
|
689 |
-
{
|
690 |
-
if (opts.infinite)
|
691 |
-
{
|
692 |
-
$cfs.trigger(cf_e('next', conf), itms.total-1);
|
693 |
-
}
|
694 |
-
return e.stopImmediatePropagation();
|
695 |
-
}
|
696 |
-
}
|
697 |
-
|
698 |
-
sz_resetMargin(a_itm, opts);
|
699 |
-
|
700 |
-
// find number of items to scroll
|
701 |
-
if (!is_number(nI))
|
702 |
-
{
|
703 |
-
if (opts.items.visibleConf.variable)
|
704 |
-
{
|
705 |
-
nI = gn_getVisibleItemsPrev(a_itm, opts, itms.total-1);
|
706 |
-
}
|
707 |
-
else if (opts.items.filter != '*')
|
708 |
-
{
|
709 |
-
var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
|
710 |
-
nI = gn_getScrollItemsPrevFilter(a_itm, opts, itms.total-1, xI);
|
711 |
-
}
|
712 |
-
else
|
713 |
-
{
|
714 |
-
nI = opts.items.visible;
|
715 |
-
}
|
716 |
-
nI = cf_getAdjust(nI, opts, sO.items, $tt0);
|
717 |
-
}
|
718 |
-
|
719 |
-
// prevent non-circular from scrolling to far
|
720 |
-
if (!opts.circular)
|
721 |
-
{
|
722 |
-
if (itms.total - nI < itms.first)
|
723 |
-
{
|
724 |
-
nI = itms.total - itms.first;
|
725 |
-
}
|
726 |
-
}
|
727 |
-
|
728 |
-
// set new number of visible items
|
729 |
-
opts.items.visibleConf.old = opts.items.visible;
|
730 |
-
if (opts.items.visibleConf.variable)
|
731 |
-
{
|
732 |
-
var vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
|
733 |
-
if (opts.items.visible+nI <= vI && nI < itms.total)
|
734 |
-
{
|
735 |
-
nI++;
|
736 |
-
vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
|
737 |
-
}
|
738 |
-
opts.items.visible = vI;
|
739 |
-
}
|
740 |
-
else if (opts.items.filter != '*')
|
741 |
-
{
|
742 |
-
var vI = gn_getVisibleItemsNextFilter(a_itm, opts, itms.total-nI);
|
743 |
-
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
|
744 |
-
}
|
745 |
-
|
746 |
-
sz_resetMargin(a_itm, opts, true);
|
747 |
-
|
748 |
-
// scroll 0, don't scroll
|
749 |
-
if (nI == 0)
|
750 |
-
{
|
751 |
-
e.stopImmediatePropagation();
|
752 |
-
return debug(conf, '0 items to scroll: Not scrolling.');
|
753 |
-
}
|
754 |
-
debug(conf, 'Scrolling '+nI+' items backward.');
|
755 |
-
|
756 |
-
|
757 |
-
// save new config
|
758 |
-
itms.first += nI;
|
759 |
-
while (itms.first >= itms.total)
|
760 |
-
{
|
761 |
-
itms.first -= itms.total;
|
762 |
-
}
|
763 |
-
|
764 |
-
// non-circular callback
|
765 |
-
if (!opts.circular)
|
766 |
-
{
|
767 |
-
if (itms.first == 0 && sO.onEnd)
|
768 |
-
{
|
769 |
-
sO.onEnd.call($tt0, 'prev');
|
770 |
-
}
|
771 |
-
if (!opts.infinite)
|
772 |
-
{
|
773 |
-
nv_enableNavi(opts, itms.first, conf);
|
774 |
-
}
|
775 |
-
}
|
776 |
-
|
777 |
-
// rearrange items
|
778 |
-
$cfs.children().slice(itms.total-nI, itms.total).prependTo($cfs);
|
779 |
-
if (itms.total < opts.items.visible + nI)
|
780 |
-
{
|
781 |
-
$cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
|
782 |
-
}
|
783 |
-
|
784 |
-
// the needed items
|
785 |
-
var a_itm = $cfs.children(),
|
786 |
-
i_old = gi_getOldItemsPrev(a_itm, opts, nI),
|
787 |
-
i_new = gi_getNewItemsPrev(a_itm, opts),
|
788 |
-
i_cur_l = a_itm.eq(nI-1),
|
789 |
-
i_old_l = i_old.last(),
|
790 |
-
i_new_l = i_new.last();
|
791 |
-
|
792 |
-
sz_resetMargin(a_itm, opts);
|
793 |
-
|
794 |
-
var pL = 0,
|
795 |
-
pR = 0;
|
796 |
-
|
797 |
-
if (opts.align)
|
798 |
-
{
|
799 |
-
var p = cf_getAlignPadding(i_new, opts);
|
800 |
-
pL = p[0];
|
801 |
-
pR = p[1];
|
802 |
-
}
|
803 |
-
var oL = (pL < 0) ? opts.padding[opts.d[3]] : 0;
|
804 |
-
|
805 |
-
// hide items for fx directscroll
|
806 |
-
var hiddenitems = false,
|
807 |
-
i_skp = $();
|
808 |
-
if (opts.items.visible < nI)
|
809 |
-
{
|
810 |
-
i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
|
811 |
-
if (sO.fx == 'directscroll')
|
812 |
-
{
|
813 |
-
var orgW = opts.items[opts.d['width']];
|
814 |
-
hiddenitems = i_skp;
|
815 |
-
i_cur_l = i_new_l;
|
816 |
-
sc_hideHiddenItems(hiddenitems);
|
817 |
-
opts.items[opts.d['width']] = 'variable';
|
818 |
-
}
|
819 |
-
}
|
820 |
-
// save new sizes
|
821 |
-
var $cf2 = false,
|
822 |
-
i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
|
823 |
-
w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
|
824 |
-
i_siz_vis = 0,
|
825 |
-
a_cfs = {},
|
826 |
-
a_wsz = {},
|
827 |
-
a_cur = {},
|
828 |
-
a_old = {},
|
829 |
-
a_new = {},
|
830 |
-
a_lef = {},
|
831 |
-
a_lef_vis = {},
|
832 |
-
a_dur = sc_getDuration(sO, opts, nI, i_siz);
|
833 |
-
|
834 |
-
switch(sO.fx)
|
835 |
-
{
|
836 |
-
case 'cover':
|
837 |
-
case 'cover-fade':
|
838 |
-
i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visible), opts, 'width');
|
839 |
-
break;
|
840 |
-
}
|
841 |
-
|
842 |
-
if (hiddenitems)
|
843 |
-
{
|
844 |
-
opts.items[opts.d['width']] = orgW;
|
845 |
-
}
|
846 |
-
|
847 |
-
sz_resetMargin(a_itm, opts, true);
|
848 |
-
if (pR >= 0)
|
849 |
-
{
|
850 |
-
sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
|
851 |
-
}
|
852 |
-
if (pL >= 0)
|
853 |
-
{
|
854 |
-
sz_resetMargin(i_cur_l, opts, opts.padding[opts.d[3]]);
|
855 |
-
}
|
856 |
-
|
857 |
-
if (opts.align)
|
858 |
-
{
|
859 |
-
opts.padding[opts.d[1]] = pR;
|
860 |
-
opts.padding[opts.d[3]] = pL;
|
861 |
-
}
|
862 |
-
|
863 |
-
a_lef[opts.d['left']] = -(i_siz - oL);
|
864 |
-
a_lef_vis[opts.d['left']] = -(i_siz_vis - oL);
|
865 |
-
a_wsz[opts.d['left']] = w_siz[opts.d['width']];
|
866 |
-
|
867 |
-
// scrolling functions
|
868 |
-
var _s_wrapper = function() {},
|
869 |
-
_a_wrapper = function() {},
|
870 |
-
_s_paddingold = function() {},
|
871 |
-
_a_paddingold = function() {},
|
872 |
-
_s_paddingnew = function() {},
|
873 |
-
_a_paddingnew = function() {},
|
874 |
-
_s_paddingcur = function() {},
|
875 |
-
_a_paddingcur = function() {},
|
876 |
-
_onafter = function() {},
|
877 |
-
_moveitems = function() {},
|
878 |
-
_position = function() {};
|
879 |
-
|
880 |
-
// clone carousel
|
881 |
-
switch(sO.fx)
|
882 |
-
{
|
883 |
-
case 'crossfade':
|
884 |
-
case 'cover':
|
885 |
-
case 'cover-fade':
|
886 |
-
case 'uncover':
|
887 |
-
case 'uncover-fade':
|
888 |
-
$cf2 = $cfs.clone(true).appendTo($wrp);
|
889 |
-
break;
|
890 |
-
}
|
891 |
-
switch(sO.fx)
|
892 |
-
{
|
893 |
-
case 'crossfade':
|
894 |
-
case 'uncover':
|
895 |
-
case 'uncover-fade':
|
896 |
-
$cf2.children().slice(0, nI).remove();
|
897 |
-
$cf2.children().slice(opts.items.visibleConf.old).remove();
|
898 |
-
break;
|
899 |
-
|
900 |
-
case 'cover':
|
901 |
-
case 'cover-fade':
|
902 |
-
$cf2.children().slice(opts.items.visible).remove();
|
903 |
-
$cf2.css(a_lef_vis);
|
904 |
-
break;
|
905 |
-
}
|
906 |
-
|
907 |
-
$cfs.css(a_lef);
|
908 |
-
|
909 |
-
// reset all scrolls
|
910 |
-
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
911 |
-
|
912 |
-
// animate / set carousel
|
913 |
-
a_cfs[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
|
914 |
-
|
915 |
-
// animate / set wrapper
|
916 |
-
if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
|
917 |
-
{
|
918 |
-
_s_wrapper = function() {
|
919 |
-
$wrp.css(w_siz);
|
920 |
-
};
|
921 |
-
_a_wrapper = function() {
|
922 |
-
scrl.anims.push([$wrp, w_siz]);
|
923 |
-
};
|
924 |
-
}
|
925 |
-
|
926 |
-
// animate / set items
|
927 |
-
if (opts.usePadding)
|
928 |
-
{
|
929 |
-
if (i_new_l.not(i_cur_l).length)
|
930 |
-
{
|
931 |
-
a_cur[opts.d['marginRight']] = i_cur_l.data('_cfs_origCssMargin');
|
932 |
-
|
933 |
-
if (pL < 0)
|
934 |
-
{
|
935 |
-
i_cur_l.css(a_cur);
|
936 |
-
}
|
937 |
-
else
|
938 |
-
{
|
939 |
-
_s_paddingcur = function() {
|
940 |
-
i_cur_l.css(a_cur);
|
941 |
-
};
|
942 |
-
_a_paddingcur = function() {
|
943 |
-
scrl.anims.push([i_cur_l, a_cur]);
|
944 |
-
};
|
945 |
-
}
|
946 |
-
}
|
947 |
-
switch(sO.fx)
|
948 |
-
{
|
949 |
-
case 'cover':
|
950 |
-
case 'cover-fade':
|
951 |
-
$cf2.children().eq(nI-1).css(a_cur);
|
952 |
-
break;
|
953 |
-
}
|
954 |
-
|
955 |
-
if (i_new_l.not(i_old_l).length)
|
956 |
-
{
|
957 |
-
a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
|
958 |
-
_s_paddingold = function() {
|
959 |
-
i_old_l.css(a_old);
|
960 |
-
};
|
961 |
-
_a_paddingold = function() {
|
962 |
-
scrl.anims.push([i_old_l, a_old]);
|
963 |
-
};
|
964 |
-
}
|
965 |
-
|
966 |
-
if (pR >= 0)
|
967 |
-
{
|
968 |
-
a_new[opts.d['marginRight']] = i_new_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]];
|
969 |
-
_s_paddingnew = function() {
|
970 |
-
i_new_l.css(a_new);
|
971 |
-
};
|
972 |
-
_a_paddingnew = function() {
|
973 |
-
scrl.anims.push([i_new_l, a_new]);
|
974 |
-
};
|
975 |
-
}
|
976 |
-
}
|
977 |
-
|
978 |
-
// set position
|
979 |
-
_position = function() {
|
980 |
-
$cfs.css(a_cfs);
|
981 |
-
};
|
982 |
-
|
983 |
-
|
984 |
-
var overFill = opts.items.visible+nI-itms.total;
|
985 |
-
|
986 |
-
// rearrange items
|
987 |
-
_moveitems = function() {
|
988 |
-
if (overFill > 0)
|
989 |
-
{
|
990 |
-
$cfs.children().slice(itms.total).remove();
|
991 |
-
i_old = $( $cfs.children().slice(itms.total-(opts.items.visible-overFill)).get().concat( $cfs.children().slice(0, overFill).get() ) );
|
992 |
-
}
|
993 |
-
sc_showHiddenItems(hiddenitems);
|
994 |
-
|
995 |
-
if (opts.usePadding)
|
996 |
-
{
|
997 |
-
var l_itm = $cfs.children().eq(opts.items.visible+nI-1);
|
998 |
-
l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
|
999 |
-
}
|
1000 |
-
};
|
1001 |
-
|
1002 |
-
|
1003 |
-
var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'prev', a_dur, w_siz);
|
1004 |
-
|
1005 |
-
// fire onAfter callbacks
|
1006 |
-
_onafter = function() {
|
1007 |
-
sc_afterScroll($cfs, $cf2, sO);
|
1008 |
-
crsl.isScrolling = false;
|
1009 |
-
clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
|
1010 |
-
queu = sc_fireQueue($cfs, queu, conf);
|
1011 |
-
|
1012 |
-
if (!crsl.isPaused)
|
1013 |
-
{
|
1014 |
-
$cfs.trigger(cf_e('play', conf));
|
1015 |
-
}
|
1016 |
-
};
|
1017 |
-
|
1018 |
-
// fire onBefore callback
|
1019 |
-
crsl.isScrolling = true;
|
1020 |
-
tmrs = sc_clearTimers(tmrs);
|
1021 |
-
clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
|
1022 |
-
|
1023 |
-
switch(sO.fx)
|
1024 |
-
{
|
1025 |
-
case 'none':
|
1026 |
-
$cfs.css(a_cfs);
|
1027 |
-
_s_wrapper();
|
1028 |
-
_s_paddingold();
|
1029 |
-
_s_paddingnew();
|
1030 |
-
_s_paddingcur();
|
1031 |
-
_position();
|
1032 |
-
_moveitems();
|
1033 |
-
_onafter();
|
1034 |
-
break;
|
1035 |
-
|
1036 |
-
case 'fade':
|
1037 |
-
scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
|
1038 |
-
_s_wrapper();
|
1039 |
-
_s_paddingold();
|
1040 |
-
_s_paddingnew();
|
1041 |
-
_s_paddingcur();
|
1042 |
-
_position();
|
1043 |
-
_moveitems();
|
1044 |
-
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
1045 |
-
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1046 |
-
sc_startScroll(scrl, conf);
|
1047 |
-
}]);
|
1048 |
-
break;
|
1049 |
-
|
1050 |
-
case 'crossfade':
|
1051 |
-
$cfs.css({ 'opacity': 0 });
|
1052 |
-
scrl.anims.push([$cf2, { 'opacity': 0 }]);
|
1053 |
-
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1054 |
-
_a_wrapper();
|
1055 |
-
_s_paddingold();
|
1056 |
-
_s_paddingnew();
|
1057 |
-
_s_paddingcur();
|
1058 |
-
_position();
|
1059 |
-
_moveitems();
|
1060 |
-
break;
|
1061 |
-
|
1062 |
-
case 'cover':
|
1063 |
-
scrl.anims.push([$cf2, a_cfs, function() {
|
1064 |
-
_s_paddingold();
|
1065 |
-
_s_paddingnew();
|
1066 |
-
_s_paddingcur();
|
1067 |
-
_position();
|
1068 |
-
_moveitems();
|
1069 |
-
_onafter();
|
1070 |
-
}]);
|
1071 |
-
_a_wrapper();
|
1072 |
-
break;
|
1073 |
-
|
1074 |
-
case 'cover-fade':
|
1075 |
-
scrl.anims.push([$cfs, { 'opacity': 0 }]);
|
1076 |
-
scrl.anims.push([$cf2, a_cfs, function() {
|
1077 |
-
_s_paddingold();
|
1078 |
-
_s_paddingnew();
|
1079 |
-
_s_paddingcur();
|
1080 |
-
_position();
|
1081 |
-
_moveitems();
|
1082 |
-
_onafter();
|
1083 |
-
}]);
|
1084 |
-
_a_wrapper();
|
1085 |
-
break;
|
1086 |
-
|
1087 |
-
case 'uncover':
|
1088 |
-
scrl.anims.push([$cf2, a_wsz, _onafter]);
|
1089 |
-
_a_wrapper();
|
1090 |
-
_s_paddingold();
|
1091 |
-
_s_paddingnew();
|
1092 |
-
_s_paddingcur();
|
1093 |
-
_position();
|
1094 |
-
_moveitems();
|
1095 |
-
break;
|
1096 |
-
|
1097 |
-
case 'uncover-fade':
|
1098 |
-
$cfs.css({ 'opacity': 0 });
|
1099 |
-
scrl.anims.push([$cfs, { 'opacity': 1 }]);
|
1100 |
-
scrl.anims.push([$cf2, a_wsz, _onafter]);
|
1101 |
-
_a_wrapper();
|
1102 |
-
_s_paddingold();
|
1103 |
-
_s_paddingnew();
|
1104 |
-
_s_paddingcur();
|
1105 |
-
_position();
|
1106 |
-
_moveitems();
|
1107 |
-
break;
|
1108 |
-
|
1109 |
-
default:
|
1110 |
-
scrl.anims.push([$cfs, a_cfs, function() {
|
1111 |
-
_moveitems();
|
1112 |
-
_onafter();
|
1113 |
-
}]);
|
1114 |
-
_a_wrapper();
|
1115 |
-
_a_paddingold();
|
1116 |
-
_a_paddingnew();
|
1117 |
-
_a_paddingcur();
|
1118 |
-
break;
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
sc_startScroll(scrl, conf);
|
1122 |
-
cf_setCookie(opts.cookie, $cfs, conf);
|
1123 |
-
|
1124 |
-
$cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
|
1125 |
-
|
1126 |
-
return true;
|
1127 |
-
});
|
1128 |
-
|
1129 |
-
|
1130 |
-
// next event
|
1131 |
-
$cfs.bind(cf_e('slide_next', conf), function(e, sO, nI) {
|
1132 |
-
e.stopPropagation();
|
1133 |
-
var a_itm = $cfs.children();
|
1134 |
-
|
1135 |
-
// non-circular at end, scroll to start
|
1136 |
-
if (!opts.circular)
|
1137 |
-
{
|
1138 |
-
if (itms.first == opts.items.visible)
|
1139 |
-
{
|
1140 |
-
if (opts.infinite)
|
1141 |
-
{
|
1142 |
-
$cfs.trigger(cf_e('prev', conf), itms.total-1);
|
1143 |
-
}
|
1144 |
-
return e.stopImmediatePropagation();
|
1145 |
-
}
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
sz_resetMargin(a_itm, opts);
|
1149 |
-
|
1150 |
-
// find number of items to scroll
|
1151 |
-
if (!is_number(nI))
|
1152 |
-
{
|
1153 |
-
if (opts.items.filter != '*')
|
1154 |
-
{
|
1155 |
-
var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
|
1156 |
-
nI = gn_getScrollItemsNextFilter(a_itm, opts, 0, xI);
|
1157 |
-
}
|
1158 |
-
else
|
1159 |
-
{
|
1160 |
-
nI = opts.items.visible;
|
1161 |
-
}
|
1162 |
-
nI = cf_getAdjust(nI, opts, sO.items, $tt0);
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
var lastItemNr = (itms.first == 0) ? itms.total : itms.first;
|
1166 |
-
|
1167 |
-
// prevent non-circular from scrolling to far
|
1168 |
-
if (!opts.circular)
|
1169 |
-
{
|
1170 |
-
if (opts.items.visibleConf.variable)
|
1171 |
-
{
|
1172 |
-
var vI = gn_getVisibleItemsNext(a_itm, opts, nI),
|
1173 |
-
xI = gn_getVisibleItemsPrev(a_itm, opts, lastItemNr-1);
|
1174 |
-
}
|
1175 |
-
else
|
1176 |
-
{
|
1177 |
-
var vI = opts.items.visible,
|
1178 |
-
xI = opts.items.visible;
|
1179 |
-
}
|
1180 |
-
|
1181 |
-
if (nI + vI > lastItemNr)
|
1182 |
-
{
|
1183 |
-
nI = lastItemNr - xI;
|
1184 |
-
}
|
1185 |
-
}
|
1186 |
-
|
1187 |
-
// set new number of visible items
|
1188 |
-
opts.items.visibleConf.old = opts.items.visible;
|
1189 |
-
if (opts.items.visibleConf.variable)
|
1190 |
-
{
|
1191 |
-
var vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
|
1192 |
-
while (opts.items.visible-nI >= vI && nI < itms.total)
|
1193 |
-
{
|
1194 |
-
nI++;
|
1195 |
-
vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
|
1196 |
-
}
|
1197 |
-
opts.items.visible = vI;
|
1198 |
-
}
|
1199 |
-
else if (opts.items.filter != '*')
|
1200 |
-
{
|
1201 |
-
var vI = gn_getVisibleItemsNextFilter(a_itm, opts, nI);
|
1202 |
-
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
sz_resetMargin(a_itm, opts, true);
|
1206 |
-
|
1207 |
-
// scroll 0, don't scroll
|
1208 |
-
if (nI == 0)
|
1209 |
-
{
|
1210 |
-
e.stopImmediatePropagation();
|
1211 |
-
return debug(conf, '0 items to scroll: Not scrolling.');
|
1212 |
-
}
|
1213 |
-
debug(conf, 'Scrolling '+nI+' items forward.');
|
1214 |
-
|
1215 |
-
|
1216 |
-
// save new config
|
1217 |
-
itms.first -= nI;
|
1218 |
-
while (itms.first < 0)
|
1219 |
-
{
|
1220 |
-
itms.first += itms.total;
|
1221 |
-
}
|
1222 |
-
|
1223 |
-
// non-circular callback
|
1224 |
-
if (!opts.circular)
|
1225 |
-
{
|
1226 |
-
if (itms.first == opts.items.visible && sO.onEnd)
|
1227 |
-
{
|
1228 |
-
sO.onEnd.call($tt0, 'next');
|
1229 |
-
}
|
1230 |
-
if (!opts.infinite)
|
1231 |
-
{
|
1232 |
-
nv_enableNavi(opts, itms.first, conf);
|
1233 |
-
}
|
1234 |
-
}
|
1235 |
-
|
1236 |
-
// rearrange items
|
1237 |
-
if (itms.total < opts.items.visible+nI)
|
1238 |
-
{
|
1239 |
-
$cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
|
1240 |
-
}
|
1241 |
-
|
1242 |
-
// the needed items
|
1243 |
-
var a_itm = $cfs.children(),
|
1244 |
-
i_old = gi_getOldItemsNext(a_itm, opts),
|
1245 |
-
i_new = gi_getNewItemsNext(a_itm, opts, nI),
|
1246 |
-
i_cur_l = a_itm.eq(nI-1),
|
1247 |
-
i_old_l = i_old.last(),
|
1248 |
-
i_new_l = i_new.last();
|
1249 |
-
|
1250 |
-
sz_resetMargin(a_itm, opts);
|
1251 |
-
|
1252 |
-
var pL = 0,
|
1253 |
-
pR = 0;
|
1254 |
-
|
1255 |
-
if (opts.align)
|
1256 |
-
{
|
1257 |
-
var p = cf_getAlignPadding(i_new, opts);
|
1258 |
-
pL = p[0];
|
1259 |
-
pR = p[1];
|
1260 |
-
}
|
1261 |
-
|
1262 |
-
// hide items for fx directscroll
|
1263 |
-
var hiddenitems = false,
|
1264 |
-
i_skp = $();
|
1265 |
-
if (opts.items.visibleConf.old < nI)
|
1266 |
-
{
|
1267 |
-
i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
|
1268 |
-
if (sO.fx == 'directscroll')
|
1269 |
-
{
|
1270 |
-
var orgW = opts.items[opts.d['width']];
|
1271 |
-
hiddenitems = i_skp;
|
1272 |
-
i_cur_l = i_old_l;
|
1273 |
-
sc_hideHiddenItems(hiddenitems);
|
1274 |
-
opts.items[opts.d['width']] = 'variable';
|
1275 |
-
}
|
1276 |
-
}
|
1277 |
-
// save new sizes
|
1278 |
-
var $cf2 = false,
|
1279 |
-
i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
|
1280 |
-
w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
|
1281 |
-
i_siz_vis = 0,
|
1282 |
-
a_cfs = {},
|
1283 |
-
a_cfs_vis = {},
|
1284 |
-
a_cur = {},
|
1285 |
-
a_old = {},
|
1286 |
-
a_lef = {},
|
1287 |
-
a_dur = sc_getDuration(sO, opts, nI, i_siz);
|
1288 |
-
|
1289 |
-
switch(sO.fx)
|
1290 |
-
{
|
1291 |
-
case 'uncover':
|
1292 |
-
case 'uncover-fade':
|
1293 |
-
i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visibleConf.old), opts, 'width');
|
1294 |
-
break;
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
if (hiddenitems)
|
1298 |
-
{
|
1299 |
-
opts.items[opts.d['width']] = orgW;
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
if (opts.align)
|
1303 |
-
{
|
1304 |
-
if (opts.padding[opts.d[1]] < 0)
|
1305 |
-
{
|
1306 |
-
opts.padding[opts.d[1]] = 0;
|
1307 |
-
}
|
1308 |
-
}
|
1309 |
-
sz_resetMargin(a_itm, opts, true);
|
1310 |
-
sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
|
1311 |
-
|
1312 |
-
if (opts.align)
|
1313 |
-
{
|
1314 |
-
opts.padding[opts.d[1]] = pR;
|
1315 |
-
opts.padding[opts.d[3]] = pL;
|
1316 |
-
}
|
1317 |
-
|
1318 |
-
a_lef[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
|
1319 |
-
|
1320 |
-
// scrolling functions
|
1321 |
-
var _s_wrapper = function() {},
|
1322 |
-
_a_wrapper = function() {},
|
1323 |
-
_s_paddingold = function() {},
|
1324 |
-
_a_paddingold = function() {},
|
1325 |
-
_s_paddingcur = function() {},
|
1326 |
-
_a_paddingcur = function() {},
|
1327 |
-
_onafter = function() {},
|
1328 |
-
_moveitems = function() {},
|
1329 |
-
_position = function() {};
|
1330 |
-
|
1331 |
-
// clone carousel
|
1332 |
-
switch(sO.fx)
|
1333 |
-
{
|
1334 |
-
case 'crossfade':
|
1335 |
-
case 'cover':
|
1336 |
-
case 'cover-fade':
|
1337 |
-
case 'uncover':
|
1338 |
-
case 'uncover-fade':
|
1339 |
-
$cf2 = $cfs.clone(true).appendTo($wrp);
|
1340 |
-
$cf2.children().slice(opts.items.visibleConf.old).remove();
|
1341 |
-
break;
|
1342 |
-
}
|
1343 |
-
switch(sO.fx)
|
1344 |
-
{
|
1345 |
-
case 'crossfade':
|
1346 |
-
case 'cover':
|
1347 |
-
case 'cover-fade':
|
1348 |
-
$cfs.css('zIndex', 1);
|
1349 |
-
$cf2.css('zIndex', 0);
|
1350 |
-
break;
|
1351 |
-
}
|
1352 |
-
|
1353 |
-
// reset all scrolls
|
1354 |
-
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
1355 |
-
|
1356 |
-
// animate / set carousel
|
1357 |
-
a_cfs[opts.d['left']] = -i_siz;
|
1358 |
-
a_cfs_vis[opts.d['left']] = -i_siz_vis;
|
1359 |
-
|
1360 |
-
if (pL < 0)
|
1361 |
-
{
|
1362 |
-
a_cfs[opts.d['left']] += pL;
|
1363 |
-
}
|
1364 |
-
|
1365 |
-
// animate / set wrapper
|
1366 |
-
if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
|
1367 |
-
{
|
1368 |
-
_s_wrapper = function() {
|
1369 |
-
$wrp.css(w_siz);
|
1370 |
-
};
|
1371 |
-
_a_wrapper = function() {
|
1372 |
-
scrl.anims.push([$wrp, w_siz]);
|
1373 |
-
};
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
// animate / set items
|
1377 |
-
if (opts.usePadding)
|
1378 |
-
{
|
1379 |
-
var i_new_l_m = i_new_l.data('_cfs_origCssMargin');
|
1380 |
-
|
1381 |
-
if (pR >= 0)
|
1382 |
-
{
|
1383 |
-
i_new_l_m += opts.padding[opts.d[1]];
|
1384 |
-
}
|
1385 |
-
i_new_l.css(opts.d['marginRight'], i_new_l_m);
|
1386 |
-
|
1387 |
-
if (i_cur_l.not(i_old_l).length)
|
1388 |
-
{
|
1389 |
-
a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
|
1390 |
-
}
|
1391 |
-
_s_paddingold = function() {
|
1392 |
-
i_old_l.css(a_old);
|
1393 |
-
};
|
1394 |
-
_a_paddingold = function() {
|
1395 |
-
scrl.anims.push([i_old_l, a_old]);
|
1396 |
-
};
|
1397 |
-
|
1398 |
-
var i_cur_l_m = i_cur_l.data('_cfs_origCssMargin');
|
1399 |
-
if (pL > 0)
|
1400 |
-
{
|
1401 |
-
i_cur_l_m += opts.padding[opts.d[3]];
|
1402 |
-
}
|
1403 |
-
|
1404 |
-
a_cur[opts.d['marginRight']] = i_cur_l_m;
|
1405 |
-
|
1406 |
-
_s_paddingcur = function() {
|
1407 |
-
i_cur_l.css(a_cur);
|
1408 |
-
};
|
1409 |
-
_a_paddingcur = function() {
|
1410 |
-
scrl.anims.push([i_cur_l, a_cur]);
|
1411 |
-
};
|
1412 |
-
}
|
1413 |
-
|
1414 |
-
// set position
|
1415 |
-
_position = function() {
|
1416 |
-
$cfs.css(a_lef);
|
1417 |
-
};
|
1418 |
-
|
1419 |
-
|
1420 |
-
var overFill = opts.items.visible+nI-itms.total;
|
1421 |
-
|
1422 |
-
// rearrange items
|
1423 |
-
_moveitems = function() {
|
1424 |
-
if (overFill > 0)
|
1425 |
-
{
|
1426 |
-
$cfs.children().slice(itms.total).remove();
|
1427 |
-
}
|
1428 |
-
var l_itm = $cfs.children().slice(0, nI).appendTo($cfs).last();
|
1429 |
-
if (overFill > 0)
|
1430 |
-
{
|
1431 |
-
i_new = gi_getCurrentItems(a_itm, opts);
|
1432 |
-
}
|
1433 |
-
sc_showHiddenItems(hiddenitems);
|
1434 |
-
|
1435 |
-
if (opts.usePadding)
|
1436 |
-
{
|
1437 |
-
if (itms.total < opts.items.visible+nI) {
|
1438 |
-
var i_cur_l = $cfs.children().eq(opts.items.visible-1);
|
1439 |
-
i_cur_l.css(opts.d['marginRight'], i_cur_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]]);
|
1440 |
-
}
|
1441 |
-
l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
|
1442 |
-
}
|
1443 |
-
};
|
1444 |
-
|
1445 |
-
|
1446 |
-
var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'next', a_dur, w_siz);
|
1447 |
-
|
1448 |
-
// fire onAfter callbacks
|
1449 |
-
_onafter = function() {
|
1450 |
-
$cfs.css('zIndex', $cfs.data('_cfs_origCssZindex'));
|
1451 |
-
sc_afterScroll($cfs, $cf2, sO);
|
1452 |
-
crsl.isScrolling = false;
|
1453 |
-
clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
|
1454 |
-
queu = sc_fireQueue($cfs, queu, conf);
|
1455 |
-
|
1456 |
-
if (!crsl.isPaused)
|
1457 |
-
{
|
1458 |
-
$cfs.trigger(cf_e('play', conf));
|
1459 |
-
}
|
1460 |
-
};
|
1461 |
-
|
1462 |
-
// fire onBefore callbacks
|
1463 |
-
crsl.isScrolling = true;
|
1464 |
-
tmrs = sc_clearTimers(tmrs);
|
1465 |
-
clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
|
1466 |
-
|
1467 |
-
switch(sO.fx)
|
1468 |
-
{
|
1469 |
-
case 'none':
|
1470 |
-
$cfs.css(a_cfs);
|
1471 |
-
_s_wrapper();
|
1472 |
-
_s_paddingold();
|
1473 |
-
_s_paddingcur();
|
1474 |
-
_position();
|
1475 |
-
_moveitems();
|
1476 |
-
_onafter();
|
1477 |
-
break;
|
1478 |
-
|
1479 |
-
case 'fade':
|
1480 |
-
scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
|
1481 |
-
_s_wrapper();
|
1482 |
-
_s_paddingold();
|
1483 |
-
_s_paddingcur();
|
1484 |
-
_position();
|
1485 |
-
_moveitems();
|
1486 |
-
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
1487 |
-
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1488 |
-
sc_startScroll(scrl, conf);
|
1489 |
-
}]);
|
1490 |
-
break;
|
1491 |
-
|
1492 |
-
case 'crossfade':
|
1493 |
-
$cfs.css({ 'opacity': 0 });
|
1494 |
-
scrl.anims.push([$cf2, { 'opacity': 0 }]);
|
1495 |
-
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1496 |
-
_a_wrapper();
|
1497 |
-
_s_paddingold();
|
1498 |
-
_s_paddingcur();
|
1499 |
-
_position();
|
1500 |
-
_moveitems();
|
1501 |
-
break;
|
1502 |
-
|
1503 |
-
case 'cover':
|
1504 |
-
$cfs.css(opts.d['left'], $wrp[opts.d['width']]());
|
1505 |
-
scrl.anims.push([$cfs, a_lef, _onafter]);
|
1506 |
-
_a_wrapper();
|
1507 |
-
_s_paddingold();
|
1508 |
-
_s_paddingcur();
|
1509 |
-
_moveitems();
|
1510 |
-
break;
|
1511 |
-
|
1512 |
-
case 'cover-fade':
|
1513 |
-
$cfs.css(opts.d['left'], $wrp[opts.d['width']]());
|
1514 |
-
scrl.anims.push([$cf2, { 'opacity': 0 }]);
|
1515 |
-
scrl.anims.push([$cfs, a_lef, _onafter]);
|
1516 |
-
_a_wrapper();
|
1517 |
-
_s_paddingold();
|
1518 |
-
_s_paddingcur();
|
1519 |
-
_moveitems();
|
1520 |
-
break;
|
1521 |
-
|
1522 |
-
case 'uncover':
|
1523 |
-
scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
|
1524 |
-
_a_wrapper();
|
1525 |
-
_s_paddingold();
|
1526 |
-
_s_paddingcur();
|
1527 |
-
_position();
|
1528 |
-
_moveitems();
|
1529 |
-
break;
|
1530 |
-
|
1531 |
-
case 'uncover-fade':
|
1532 |
-
$cfs.css({ 'opacity': 0 });
|
1533 |
-
scrl.anims.push([$cfs, { 'opacity': 1 }]);
|
1534 |
-
scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
|
1535 |
-
_a_wrapper();
|
1536 |
-
_s_paddingold();
|
1537 |
-
_s_paddingcur();
|
1538 |
-
_position();
|
1539 |
-
_moveitems();
|
1540 |
-
break;
|
1541 |
-
|
1542 |
-
default:
|
1543 |
-
scrl.anims.push([$cfs, a_cfs, function() {
|
1544 |
-
_position();
|
1545 |
-
_moveitems();
|
1546 |
-
_onafter();
|
1547 |
-
}]);
|
1548 |
-
_a_wrapper();
|
1549 |
-
_a_paddingold();
|
1550 |
-
_a_paddingcur();
|
1551 |
-
break;
|
1552 |
-
}
|
1553 |
-
|
1554 |
-
sc_startScroll(scrl, conf);
|
1555 |
-
cf_setCookie(opts.cookie, $cfs, conf);
|
1556 |
-
|
1557 |
-
$cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
|
1558 |
-
|
1559 |
-
return true;
|
1560 |
-
});
|
1561 |
-
|
1562 |
-
|
1563 |
-
// slideTo event
|
1564 |
-
$cfs.bind(cf_e('slideTo', conf), function(e, num, dev, org, obj, dir, clb) {
|
1565 |
-
e.stopPropagation();
|
1566 |
-
|
1567 |
-
var v = [num, dev, org, obj, dir, clb],
|
1568 |
-
t = ['string/number/object', 'number', 'boolean', 'object', 'string', 'function'],
|
1569 |
-
a = cf_sortParams(v, t);
|
1570 |
-
|
1571 |
-
obj = a[3];
|
1572 |
-
dir = a[4];
|
1573 |
-
clb = a[5];
|
1574 |
-
|
1575 |
-
num = gn_getItemIndex(a[0], a[1], a[2], itms, $cfs);
|
1576 |
-
|
1577 |
-
if (num == 0)
|
1578 |
-
{
|
1579 |
-
return false;
|
1580 |
-
}
|
1581 |
-
if (!is_object(obj))
|
1582 |
-
{
|
1583 |
-
obj = false;
|
1584 |
-
}
|
1585 |
-
|
1586 |
-
if (dir != 'prev' && dir != 'next')
|
1587 |
-
{
|
1588 |
-
if (opts.circular)
|
1589 |
-
{
|
1590 |
-
dir = (num <= itms.total / 2) ? 'next' : 'prev';
|
1591 |
-
}
|
1592 |
-
else
|
1593 |
-
{
|
1594 |
-
dir = (itms.first == 0 || itms.first > num) ? 'next' : 'prev';
|
1595 |
-
}
|
1596 |
-
}
|
1597 |
-
|
1598 |
-
if (dir == 'prev')
|
1599 |
-
{
|
1600 |
-
num = itms.total-num;
|
1601 |
-
}
|
1602 |
-
$cfs.trigger(cf_e(dir, conf), [obj, num, clb]);
|
1603 |
-
|
1604 |
-
return true;
|
1605 |
-
});
|
1606 |
-
|
1607 |
-
|
1608 |
-
// prevPage event
|
1609 |
-
$cfs.bind(cf_e('prevPage', conf), function(e, obj, clb) {
|
1610 |
-
e.stopPropagation();
|
1611 |
-
var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
|
1612 |
-
return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur-1, obj, 'prev', clb]);
|
1613 |
-
});
|
1614 |
-
|
1615 |
-
|
1616 |
-
// nextPage event
|
1617 |
-
$cfs.bind(cf_e('nextPage', conf), function(e, obj, clb) {
|
1618 |
-
e.stopPropagation();
|
1619 |
-
var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
|
1620 |
-
return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur+1, obj, 'next', clb]);
|
1621 |
-
});
|
1622 |
-
|
1623 |
-
|
1624 |
-
// slideToPage event
|
1625 |
-
$cfs.bind(cf_e('slideToPage', conf), function(e, pag, obj, dir, clb) {
|
1626 |
-
e.stopPropagation();
|
1627 |
-
if (!is_number(pag))
|
1628 |
-
{
|
1629 |
-
pag = $cfs.triggerHandler(cf_e('currentPage', conf));
|
1630 |
-
}
|
1631 |
-
var ipp = opts.pagination.items || opts.items.visible,
|
1632 |
-
max = Math.ceil(itms.total / ipp)-1;
|
1633 |
-
|
1634 |
-
if (pag < 0)
|
1635 |
-
{
|
1636 |
-
pag = max;
|
1637 |
-
}
|
1638 |
-
if (pag > max)
|
1639 |
-
{
|
1640 |
-
pag = 0;
|
1641 |
-
}
|
1642 |
-
return $cfs.triggerHandler(cf_e('slideTo', conf), [pag*ipp, 0, true, obj, dir, clb]);
|
1643 |
-
});
|
1644 |
-
|
1645 |
-
// jumpToStart event
|
1646 |
-
$cfs.bind(cf_e('jumpToStart', conf), function(e, s) {
|
1647 |
-
e.stopPropagation();
|
1648 |
-
if (s)
|
1649 |
-
{
|
1650 |
-
s = gn_getItemIndex(s, 0, true, itms, $cfs);
|
1651 |
-
}
|
1652 |
-
else
|
1653 |
-
{
|
1654 |
-
s = 0;
|
1655 |
-
}
|
1656 |
-
|
1657 |
-
s += itms.first;
|
1658 |
-
if (s != 0)
|
1659 |
-
{
|
1660 |
-
if (itms.total > 0)
|
1661 |
-
{
|
1662 |
-
while (s > itms.total)
|
1663 |
-
{
|
1664 |
-
s -= itms.total;
|
1665 |
-
}
|
1666 |
-
}
|
1667 |
-
$cfs.prepend($cfs.children().slice(s, itms.total));
|
1668 |
-
}
|
1669 |
-
return true;
|
1670 |
-
});
|
1671 |
-
|
1672 |
-
|
1673 |
-
// synchronise event
|
1674 |
-
$cfs.bind(cf_e('synchronise', conf), function(e, s) {
|
1675 |
-
e.stopPropagation();
|
1676 |
-
if (s)
|
1677 |
-
{
|
1678 |
-
s = cf_getSynchArr(s);
|
1679 |
-
}
|
1680 |
-
else if (opts.synchronise)
|
1681 |
-
{
|
1682 |
-
s = opts.synchronise;
|
1683 |
-
}
|
1684 |
-
else
|
1685 |
-
{
|
1686 |
-
return debug(conf, 'No carousel to synchronise.');
|
1687 |
-
}
|
1688 |
-
|
1689 |
-
var n = $cfs.triggerHandler(cf_e('currentPosition', conf)),
|
1690 |
-
x = true;
|
1691 |
-
|
1692 |
-
for (var j = 0, l = s.length; j < l; j++)
|
1693 |
-
{
|
1694 |
-
if (!s[j][0].triggerHandler(cf_e('slideTo', conf), [n, s[j][3], true]))
|
1695 |
-
{
|
1696 |
-
x = false;
|
1697 |
-
}
|
1698 |
-
}
|
1699 |
-
return x;
|
1700 |
-
});
|
1701 |
-
|
1702 |
-
|
1703 |
-
// queue event
|
1704 |
-
$cfs.bind(cf_e('queue', conf), function(e, dir, opt) {
|
1705 |
-
e.stopPropagation();
|
1706 |
-
if (is_function(dir))
|
1707 |
-
{
|
1708 |
-
dir.call($tt0, queu);
|
1709 |
-
}
|
1710 |
-
else if (is_array(dir))
|
1711 |
-
{
|
1712 |
-
queu = dir;
|
1713 |
-
}
|
1714 |
-
else if (!is_undefined(dir))
|
1715 |
-
{
|
1716 |
-
queu.push([dir, opt]);
|
1717 |
-
}
|
1718 |
-
return queu;
|
1719 |
-
});
|
1720 |
-
|
1721 |
-
|
1722 |
-
// insertItem event
|
1723 |
-
$cfs.bind(cf_e('insertItem', conf), function(e, itm, num, org, dev) {
|
1724 |
-
e.stopPropagation();
|
1725 |
-
|
1726 |
-
var v = [itm, num, org, dev],
|
1727 |
-
t = ['string/object', 'string/number/object', 'boolean', 'number'],
|
1728 |
-
a = cf_sortParams(v, t);
|
1729 |
-
|
1730 |
-
itm = a[0];
|
1731 |
-
num = a[1];
|
1732 |
-
org = a[2];
|
1733 |
-
dev = a[3];
|
1734 |
-
|
1735 |
-
if (is_object(itm) && !is_jquery(itm))
|
1736 |
-
{
|
1737 |
-
itm = $(itm);
|
1738 |
-
}
|
1739 |
-
else if (is_string(itm))
|
1740 |
-
{
|
1741 |
-
itm = $(itm);
|
1742 |
-
}
|
1743 |
-
if (!is_jquery(itm) || itm.length == 0)
|
1744 |
-
{
|
1745 |
-
return debug(conf, 'Not a valid object.');
|
1746 |
-
}
|
1747 |
-
|
1748 |
-
if (is_undefined(num))
|
1749 |
-
{
|
1750 |
-
num = 'end';
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
sz_storeMargin(itm, opts);
|
1754 |
-
sz_storeOrigCss(itm);
|
1755 |
-
|
1756 |
-
var orgNum = num,
|
1757 |
-
before = 'before';
|
1758 |
-
|
1759 |
-
if (num == 'end')
|
1760 |
-
{
|
1761 |
-
if (org)
|
1762 |
-
{
|
1763 |
-
if (itms.first == 0)
|
1764 |
-
{
|
1765 |
-
num = itms.total-1;
|
1766 |
-
before = 'after';
|
1767 |
-
}
|
1768 |
-
else
|
1769 |
-
{
|
1770 |
-
num = itms.first;
|
1771 |
-
itms.first += itm.length;
|
1772 |
-
}
|
1773 |
-
if (num < 0)
|
1774 |
-
{
|
1775 |
-
num = 0;
|
1776 |
-
}
|
1777 |
-
}
|
1778 |
-
else
|
1779 |
-
{
|
1780 |
-
num = itms.total-1;
|
1781 |
-
before = 'after';
|
1782 |
-
}
|
1783 |
-
}
|
1784 |
-
else
|
1785 |
-
{
|
1786 |
-
num = gn_getItemIndex(num, dev, org, itms, $cfs);
|
1787 |
-
}
|
1788 |
-
|
1789 |
-
var $cit = $cfs.children().eq(num);
|
1790 |
-
if ($cit.length)
|
1791 |
-
{
|
1792 |
-
$cit[before](itm);
|
1793 |
-
}
|
1794 |
-
else
|
1795 |
-
{
|
1796 |
-
debug(conf, 'Correct insert-position not found! Appending item to the end.');
|
1797 |
-
$cfs.append(itm);
|
1798 |
-
}
|
1799 |
-
|
1800 |
-
if (orgNum != 'end' && !org)
|
1801 |
-
{
|
1802 |
-
if (num < itms.first)
|
1803 |
-
{
|
1804 |
-
itms.first += itm.length;
|
1805 |
-
}
|
1806 |
-
}
|
1807 |
-
itms.total = $cfs.children().length;
|
1808 |
-
if (itms.first >= itms.total)
|
1809 |
-
{
|
1810 |
-
itms.first -= itms.total;
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
$cfs.trigger(cf_e('updateSizes', conf));
|
1814 |
-
$cfs.trigger(cf_e('linkAnchors', conf));
|
1815 |
-
|
1816 |
-
return true;
|
1817 |
-
});
|
1818 |
-
|
1819 |
-
|
1820 |
-
// removeItem event
|
1821 |
-
$cfs.bind(cf_e('removeItem', conf), function(e, num, org, dev) {
|
1822 |
-
e.stopPropagation();
|
1823 |
-
|
1824 |
-
var v = [num, org, dev],
|
1825 |
-
t = ['string/number/object', 'boolean', 'number'],
|
1826 |
-
a = cf_sortParams(v, t);
|
1827 |
-
|
1828 |
-
num = a[0];
|
1829 |
-
org = a[1];
|
1830 |
-
dev = a[2];
|
1831 |
-
|
1832 |
-
var removed = false;
|
1833 |
-
|
1834 |
-
if (num instanceof $ && num.length > 1)
|
1835 |
-
{
|
1836 |
-
$removed = $();
|
1837 |
-
num.each(function(i, el) {
|
1838 |
-
var $rem = $cfs.trigger(cf_e('removeItem', conf), [$(this), org, dev]);
|
1839 |
-
if ( $rem )
|
1840 |
-
{
|
1841 |
-
$removed = $removed.add($rem);
|
1842 |
-
}
|
1843 |
-
});
|
1844 |
-
return $removed;
|
1845 |
-
}
|
1846 |
-
|
1847 |
-
if (is_undefined(num) || num == 'end')
|
1848 |
-
{
|
1849 |
-
$removed = $cfs.children().last();
|
1850 |
-
}
|
1851 |
-
else
|
1852 |
-
{
|
1853 |
-
num = gn_getItemIndex(num, dev, org, itms, $cfs);
|
1854 |
-
var $removed = $cfs.children().eq(num);
|
1855 |
-
if ( $removed.length )
|
1856 |
-
{
|
1857 |
-
if (num < itms.first)
|
1858 |
-
{
|
1859 |
-
itms.first -= $removed.length;
|
1860 |
-
}
|
1861 |
-
}
|
1862 |
-
}
|
1863 |
-
if ( $removed && $removed.length )
|
1864 |
-
{
|
1865 |
-
$removed.detach();
|
1866 |
-
itms.total = $cfs.children().length;
|
1867 |
-
$cfs.trigger(cf_e('updateSizes', conf));
|
1868 |
-
}
|
1869 |
-
|
1870 |
-
return $removed;
|
1871 |
-
});
|
1872 |
-
|
1873 |
-
|
1874 |
-
// onBefore and onAfter event
|
1875 |
-
$cfs.bind(cf_e('onBefore', conf)+' '+cf_e('onAfter', conf), function(e, fn) {
|
1876 |
-
e.stopPropagation();
|
1877 |
-
var eType = e.type.slice(conf.events.prefix.length);
|
1878 |
-
if (is_array(fn))
|
1879 |
-
{
|
1880 |
-
clbk[eType] = fn;
|
1881 |
-
}
|
1882 |
-
if (is_function(fn))
|
1883 |
-
{
|
1884 |
-
clbk[eType].push(fn);
|
1885 |
-
}
|
1886 |
-
return clbk[eType];
|
1887 |
-
});
|
1888 |
-
|
1889 |
-
|
1890 |
-
// currentPosition event
|
1891 |
-
$cfs.bind(cf_e('currentPosition', conf), function(e, fn) {
|
1892 |
-
e.stopPropagation();
|
1893 |
-
if (itms.first == 0)
|
1894 |
-
{
|
1895 |
-
var val = 0;
|
1896 |
-
}
|
1897 |
-
else
|
1898 |
-
{
|
1899 |
-
var val = itms.total - itms.first;
|
1900 |
-
}
|
1901 |
-
if (is_function(fn))
|
1902 |
-
{
|
1903 |
-
fn.call($tt0, val);
|
1904 |
-
}
|
1905 |
-
return val;
|
1906 |
-
});
|
1907 |
-
|
1908 |
-
|
1909 |
-
// currentPage event
|
1910 |
-
$cfs.bind(cf_e('currentPage', conf), function(e, fn) {
|
1911 |
-
e.stopPropagation();
|
1912 |
-
var ipp = opts.pagination.items || opts.items.visible,
|
1913 |
-
max = Math.ceil(itms.total/ipp-1),
|
1914 |
-
nr;
|
1915 |
-
if (itms.first == 0)
|
1916 |
-
{
|
1917 |
-
nr = 0;
|
1918 |
-
}
|
1919 |
-
else if (itms.first < itms.total % ipp)
|
1920 |
-
{
|
1921 |
-
nr = 0;
|
1922 |
-
}
|
1923 |
-
else if (itms.first == ipp && !opts.circular)
|
1924 |
-
{
|
1925 |
-
nr = max;
|
1926 |
-
}
|
1927 |
-
else
|
1928 |
-
{
|
1929 |
-
nr = Math.round((itms.total-itms.first)/ipp);
|
1930 |
-
}
|
1931 |
-
if (nr < 0)
|
1932 |
-
{
|
1933 |
-
nr = 0;
|
1934 |
-
}
|
1935 |
-
if (nr > max)
|
1936 |
-
{
|
1937 |
-
nr = max;
|
1938 |
-
}
|
1939 |
-
if (is_function(fn))
|
1940 |
-
{
|
1941 |
-
fn.call($tt0, nr);
|
1942 |
-
}
|
1943 |
-
return nr;
|
1944 |
-
});
|
1945 |
-
|
1946 |
-
|
1947 |
-
// currentVisible event
|
1948 |
-
$cfs.bind(cf_e('currentVisible', conf), function(e, fn) {
|
1949 |
-
e.stopPropagation();
|
1950 |
-
var $i = gi_getCurrentItems($cfs.children(), opts);
|
1951 |
-
if (is_function(fn))
|
1952 |
-
{
|
1953 |
-
fn.call($tt0, $i);
|
1954 |
-
}
|
1955 |
-
return $i;
|
1956 |
-
});
|
1957 |
-
|
1958 |
-
|
1959 |
-
// slice event
|
1960 |
-
$cfs.bind(cf_e('slice', conf), function(e, f, l, fn) {
|
1961 |
-
e.stopPropagation();
|
1962 |
-
|
1963 |
-
if (itms.total == 0)
|
1964 |
-
{
|
1965 |
-
return false;
|
1966 |
-
}
|
1967 |
-
|
1968 |
-
var v = [f, l, fn],
|
1969 |
-
t = ['number', 'number', 'function'],
|
1970 |
-
a = cf_sortParams(v, t);
|
1971 |
-
|
1972 |
-
f = (is_number(a[0])) ? a[0] : 0;
|
1973 |
-
l = (is_number(a[1])) ? a[1] : itms.total;
|
1974 |
-
fn = a[2];
|
1975 |
-
|
1976 |
-
f += itms.first;
|
1977 |
-
l += itms.first;
|
1978 |
-
|
1979 |
-
if (items.total > 0)
|
1980 |
-
{
|
1981 |
-
while (f > itms.total)
|
1982 |
-
{
|
1983 |
-
f -= itms.total;
|
1984 |
-
}
|
1985 |
-
while (l > itms.total)
|
1986 |
-
{
|
1987 |
-
l -= itms.total;
|
1988 |
-
}
|
1989 |
-
while (f < 0)
|
1990 |
-
{
|
1991 |
-
f += itms.total;
|
1992 |
-
}
|
1993 |
-
while (l < 0)
|
1994 |
-
{
|
1995 |
-
l += itms.total;
|
1996 |
-
}
|
1997 |
-
}
|
1998 |
-
var $iA = $cfs.children(),
|
1999 |
-
$i;
|
2000 |
-
|
2001 |
-
if (l > f)
|
2002 |
-
{
|
2003 |
-
$i = $iA.slice(f, l);
|
2004 |
-
}
|
2005 |
-
else
|
2006 |
-
{
|
2007 |
-
$i = $( $iA.slice(f, itms.total).get().concat( $iA.slice(0, l).get() ) );
|
2008 |
-
}
|
2009 |
-
|
2010 |
-
if (is_function(fn))
|
2011 |
-
{
|
2012 |
-
fn.call($tt0, $i);
|
2013 |
-
}
|
2014 |
-
return $i;
|
2015 |
-
});
|
2016 |
-
|
2017 |
-
|
2018 |
-
// isPaused, isStopped and isScrolling events
|
2019 |
-
$cfs.bind(cf_e('isPaused', conf)+' '+cf_e('isStopped', conf)+' '+cf_e('isScrolling', conf), function(e, fn) {
|
2020 |
-
e.stopPropagation();
|
2021 |
-
var eType = e.type.slice(conf.events.prefix.length),
|
2022 |
-
value = crsl[eType];
|
2023 |
-
if (is_function(fn))
|
2024 |
-
{
|
2025 |
-
fn.call($tt0, value);
|
2026 |
-
}
|
2027 |
-
return value;
|
2028 |
-
});
|
2029 |
-
|
2030 |
-
|
2031 |
-
// configuration event
|
2032 |
-
$cfs.bind(cf_e('configuration', conf), function(e, a, b, c) {
|
2033 |
-
e.stopPropagation();
|
2034 |
-
var reInit = false;
|
2035 |
-
|
2036 |
-
// return entire configuration-object
|
2037 |
-
if (is_function(a))
|
2038 |
-
{
|
2039 |
-
a.call($tt0, opts);
|
2040 |
-
}
|
2041 |
-
// set multiple options via object
|
2042 |
-
else if (is_object(a))
|
2043 |
-
{
|
2044 |
-
opts_orig = $.extend(true, {}, opts_orig, a);
|
2045 |
-
if (b !== false) reInit = true;
|
2046 |
-
else opts = $.extend(true, {}, opts, a);
|
2047 |
-
|
2048 |
-
}
|
2049 |
-
else if (!is_undefined(a))
|
2050 |
-
{
|
2051 |
-
|
2052 |
-
// callback function for specific option
|
2053 |
-
if (is_function(b))
|
2054 |
-
{
|
2055 |
-
var val = eval('opts.'+a);
|
2056 |
-
if (is_undefined(val))
|
2057 |
-
{
|
2058 |
-
val = '';
|
2059 |
-
}
|
2060 |
-
b.call($tt0, val);
|
2061 |
-
}
|
2062 |
-
// set individual option
|
2063 |
-
else if (!is_undefined(b))
|
2064 |
-
{
|
2065 |
-
if (typeof c !== 'boolean') c = true;
|
2066 |
-
eval('opts_orig.'+a+' = b');
|
2067 |
-
if (c !== false) reInit = true;
|
2068 |
-
else eval('opts.'+a+' = b');
|
2069 |
-
}
|
2070 |
-
// return value for specific option
|
2071 |
-
else
|
2072 |
-
{
|
2073 |
-
return eval('opts.'+a);
|
2074 |
-
}
|
2075 |
-
}
|
2076 |
-
if (reInit)
|
2077 |
-
{
|
2078 |
-
sz_resetMargin($cfs.children(), opts);
|
2079 |
-
FN._init(opts_orig);
|
2080 |
-
FN._bind_buttons();
|
2081 |
-
var sz = sz_setSizes($cfs, opts);
|
2082 |
-
$cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
|
2083 |
-
}
|
2084 |
-
return opts;
|
2085 |
-
});
|
2086 |
-
|
2087 |
-
|
2088 |
-
// linkAnchors event
|
2089 |
-
$cfs.bind(cf_e('linkAnchors', conf), function(e, $con, sel) {
|
2090 |
-
e.stopPropagation();
|
2091 |
-
|
2092 |
-
if (is_undefined($con))
|
2093 |
-
{
|
2094 |
-
$con = $('body');
|
2095 |
-
}
|
2096 |
-
else if (is_string($con))
|
2097 |
-
{
|
2098 |
-
$con = $($con);
|
2099 |
-
}
|
2100 |
-
if (!is_jquery($con) || $con.length == 0)
|
2101 |
-
{
|
2102 |
-
return debug(conf, 'Not a valid object.');
|
2103 |
-
}
|
2104 |
-
if (!is_string(sel))
|
2105 |
-
{
|
2106 |
-
sel = 'a.caroufredsel';
|
2107 |
-
}
|
2108 |
-
|
2109 |
-
$con.find(sel).each(function() {
|
2110 |
-
var h = this.hash || '';
|
2111 |
-
if (h.length > 0 && $cfs.children().index($(h)) != -1)
|
2112 |
-
{
|
2113 |
-
$(this).unbind('click').click(function(e) {
|
2114 |
-
e.preventDefault();
|
2115 |
-
$cfs.trigger(cf_e('slideTo', conf), h);
|
2116 |
-
});
|
2117 |
-
}
|
2118 |
-
});
|
2119 |
-
return true;
|
2120 |
-
});
|
2121 |
-
|
2122 |
-
|
2123 |
-
// updatePageStatus event
|
2124 |
-
$cfs.bind(cf_e('updatePageStatus', conf), function(e, build, sizes) {
|
2125 |
-
e.stopPropagation();
|
2126 |
-
if (!opts.pagination.container)
|
2127 |
-
{
|
2128 |
-
return;
|
2129 |
-
}
|
2130 |
-
|
2131 |
-
var ipp = opts.pagination.items || opts.items.visible,
|
2132 |
-
pgs = Math.ceil(itms.total/ipp);
|
2133 |
-
|
2134 |
-
if (build)
|
2135 |
-
{
|
2136 |
-
if (opts.pagination.anchorBuilder)
|
2137 |
-
{
|
2138 |
-
opts.pagination.container.children().remove();
|
2139 |
-
opts.pagination.container.each(function() {
|
2140 |
-
for (var a = 0; a < pgs; a++)
|
2141 |
-
{
|
2142 |
-
var i = $cfs.children().eq( gn_getItemIndex(a*ipp, 0, true, itms, $cfs) );
|
2143 |
-
$(this).append(opts.pagination.anchorBuilder.call(i[0], a+1));
|
2144 |
-
}
|
2145 |
-
});
|
2146 |
-
}
|
2147 |
-
opts.pagination.container.each(function() {
|
2148 |
-
$(this).children().unbind(opts.pagination.event).each(function(a) {
|
2149 |
-
$(this).bind(opts.pagination.event, function(e) {
|
2150 |
-
e.preventDefault();
|
2151 |
-
$cfs.trigger(cf_e('slideTo', conf), [a*ipp, -opts.pagination.deviation, true, opts.pagination]);
|
2152 |
-
});
|
2153 |
-
});
|
2154 |
-
});
|
2155 |
-
}
|
2156 |
-
|
2157 |
-
var selected = $cfs.triggerHandler(cf_e('currentPage', conf)) + opts.pagination.deviation;
|
2158 |
-
if (selected >= pgs)
|
2159 |
-
{
|
2160 |
-
selected = 0;
|
2161 |
-
}
|
2162 |
-
if (selected < 0)
|
2163 |
-
{
|
2164 |
-
selected = pgs-1;
|
2165 |
-
}
|
2166 |
-
opts.pagination.container.each(function() {
|
2167 |
-
$(this).children().removeClass(cf_c('selected', conf)).eq(selected).addClass(cf_c('selected', conf));
|
2168 |
-
});
|
2169 |
-
return true;
|
2170 |
-
});
|
2171 |
-
|
2172 |
-
|
2173 |
-
// updateSizes event
|
2174 |
-
$cfs.bind(cf_e('updateSizes', conf), function(e) {
|
2175 |
-
var vI = opts.items.visible,
|
2176 |
-
a_itm = $cfs.children(),
|
2177 |
-
avail_primary = ms_getParentSize($wrp, opts, 'width');
|
2178 |
-
|
2179 |
-
itms.total = a_itm.length;
|
2180 |
-
|
2181 |
-
if (crsl.primarySizePercentage)
|
2182 |
-
{
|
2183 |
-
opts.maxDimension = avail_primary;
|
2184 |
-
opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
|
2185 |
-
}
|
2186 |
-
else
|
2187 |
-
{
|
2188 |
-
opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
|
2189 |
-
}
|
2190 |
-
|
2191 |
-
if (opts.responsive)
|
2192 |
-
{
|
2193 |
-
opts.items.width = opts.items.sizesConf.width;
|
2194 |
-
opts.items.height = opts.items.sizesConf.height;
|
2195 |
-
opts = in_getResponsiveValues(opts, a_itm, avail_primary);
|
2196 |
-
vI = opts.items.visible;
|
2197 |
-
sz_setResponsiveSizes(opts, a_itm);
|
2198 |
-
}
|
2199 |
-
else if (opts.items.visibleConf.variable)
|
2200 |
-
{
|
2201 |
-
vI = gn_getVisibleItemsNext(a_itm, opts, 0);
|
2202 |
-
}
|
2203 |
-
else if (opts.items.filter != '*')
|
2204 |
-
{
|
2205 |
-
vI = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
|
2206 |
-
}
|
2207 |
-
|
2208 |
-
if (!opts.circular && itms.first != 0 && vI > itms.first) {
|
2209 |
-
if (opts.items.visibleConf.variable)
|
2210 |
-
{
|
2211 |
-
var nI = gn_getVisibleItemsPrev(a_itm, opts, itms.first) - itms.first;
|
2212 |
-
}
|
2213 |
-
else if (opts.items.filter != '*')
|
2214 |
-
{
|
2215 |
-
var nI = gn_getVisibleItemsPrevFilter(a_itm, opts, itms.first) - itms.first;
|
2216 |
-
}
|
2217 |
-
else
|
2218 |
-
{
|
2219 |
-
var nI = opts.items.visible - itms.first;
|
2220 |
-
}
|
2221 |
-
debug(conf, 'Preventing non-circular: sliding '+nI+' items backward.');
|
2222 |
-
$cfs.trigger(cf_e('prev', conf), nI);
|
2223 |
-
}
|
2224 |
-
|
2225 |
-
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
|
2226 |
-
opts.items.visibleConf.old = opts.items.visible;
|
2227 |
-
opts = in_getAlignPadding(opts, a_itm);
|
2228 |
-
|
2229 |
-
var sz = sz_setSizes($cfs, opts);
|
2230 |
-
$cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
|
2231 |
-
nv_showNavi(opts, itms.total, conf);
|
2232 |
-
nv_enableNavi(opts, itms.first, conf);
|
2233 |
-
|
2234 |
-
return sz;
|
2235 |
-
});
|
2236 |
-
|
2237 |
-
|
2238 |
-
// destroy event
|
2239 |
-
$cfs.bind(cf_e('destroy', conf), function(e, orgOrder) {
|
2240 |
-
e.stopPropagation();
|
2241 |
-
tmrs = sc_clearTimers(tmrs);
|
2242 |
-
|
2243 |
-
$cfs.data('_cfs_isCarousel', false);
|
2244 |
-
$cfs.trigger(cf_e('finish', conf));
|
2245 |
-
if (orgOrder)
|
2246 |
-
{
|
2247 |
-
$cfs.trigger(cf_e('jumpToStart', conf));
|
2248 |
-
}
|
2249 |
-
sz_restoreOrigCss($cfs.children());
|
2250 |
-
sz_restoreOrigCss($cfs);
|
2251 |
-
FN._unbind_events();
|
2252 |
-
FN._unbind_buttons();
|
2253 |
-
if (conf.wrapper == 'parent')
|
2254 |
-
{
|
2255 |
-
sz_restoreOrigCss($wrp);
|
2256 |
-
}
|
2257 |
-
else
|
2258 |
-
{
|
2259 |
-
$wrp.replaceWith($cfs);
|
2260 |
-
}
|
2261 |
-
|
2262 |
-
return true;
|
2263 |
-
});
|
2264 |
-
|
2265 |
-
|
2266 |
-
// debug event
|
2267 |
-
$cfs.bind(cf_e('debug', conf), function(e) {
|
2268 |
-
debug(conf, 'Carousel width: ' + opts.width);
|
2269 |
-
debug(conf, 'Carousel height: ' + opts.height);
|
2270 |
-
debug(conf, 'Item widths: ' + opts.items.width);
|
2271 |
-
debug(conf, 'Item heights: ' + opts.items.height);
|
2272 |
-
debug(conf, 'Number of items visible: ' + opts.items.visible);
|
2273 |
-
if (opts.auto.play)
|
2274 |
-
{
|
2275 |
-
debug(conf, 'Number of items scrolled automatically: ' + opts.auto.items);
|
2276 |
-
}
|
2277 |
-
if (opts.prev.button)
|
2278 |
-
{
|
2279 |
-
debug(conf, 'Number of items scrolled backward: ' + opts.prev.items);
|
2280 |
-
}
|
2281 |
-
if (opts.next.button)
|
2282 |
-
{
|
2283 |
-
debug(conf, 'Number of items scrolled forward: ' + opts.next.items);
|
2284 |
-
}
|
2285 |
-
return conf.debug;
|
2286 |
-
});
|
2287 |
-
|
2288 |
-
|
2289 |
-
// triggerEvent, making prefixed and namespaced events accessible from outside
|
2290 |
-
$cfs.bind('_cfs_triggerEvent', function(e, n, o) {
|
2291 |
-
e.stopPropagation();
|
2292 |
-
return $cfs.triggerHandler(cf_e(n, conf), o);
|
2293 |
-
});
|
2294 |
-
}; // /bind_events
|
2295 |
-
|
2296 |
-
|
2297 |
-
FN._unbind_events = function() {
|
2298 |
-
$cfs.unbind(cf_e('', conf));
|
2299 |
-
$cfs.unbind(cf_e('', conf, false));
|
2300 |
-
$cfs.unbind('_cfs_triggerEvent');
|
2301 |
-
}; // /unbind_events
|
2302 |
-
|
2303 |
-
|
2304 |
-
FN._bind_buttons = function() {
|
2305 |
-
FN._unbind_buttons();
|
2306 |
-
nv_showNavi(opts, itms.total, conf);
|
2307 |
-
nv_enableNavi(opts, itms.first, conf);
|
2308 |
-
|
2309 |
-
if (opts.auto.pauseOnHover)
|
2310 |
-
{
|
2311 |
-
var pC = bt_pauseOnHoverConfig(opts.auto.pauseOnHover);
|
2312 |
-
$wrp.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2313 |
-
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2314 |
-
}
|
2315 |
-
|
2316 |
-
// play button
|
2317 |
-
if (opts.auto.button)
|
2318 |
-
{
|
2319 |
-
opts.auto.button.bind(cf_e(opts.auto.event, conf, false), function(e) {
|
2320 |
-
e.preventDefault();
|
2321 |
-
var ev = false,
|
2322 |
-
pC = null;
|
2323 |
-
|
2324 |
-
if (crsl.isPaused)
|
2325 |
-
{
|
2326 |
-
ev = 'play';
|
2327 |
-
}
|
2328 |
-
else if (opts.auto.pauseOnEvent)
|
2329 |
-
{
|
2330 |
-
ev = 'pause';
|
2331 |
-
pC = bt_pauseOnHoverConfig(opts.auto.pauseOnEvent);
|
2332 |
-
}
|
2333 |
-
if (ev)
|
2334 |
-
{
|
2335 |
-
$cfs.trigger(cf_e(ev, conf), pC);
|
2336 |
-
}
|
2337 |
-
});
|
2338 |
-
}
|
2339 |
-
|
2340 |
-
// prev button
|
2341 |
-
if (opts.prev.button)
|
2342 |
-
{
|
2343 |
-
opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) {
|
2344 |
-
e.preventDefault();
|
2345 |
-
$cfs.trigger(cf_e('prev', conf));
|
2346 |
-
});
|
2347 |
-
if (opts.prev.pauseOnHover)
|
2348 |
-
{
|
2349 |
-
var pC = bt_pauseOnHoverConfig(opts.prev.pauseOnHover);
|
2350 |
-
opts.prev.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2351 |
-
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2352 |
-
}
|
2353 |
-
}
|
2354 |
-
|
2355 |
-
// next butotn
|
2356 |
-
if (opts.next.button)
|
2357 |
-
{
|
2358 |
-
opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) {
|
2359 |
-
e.preventDefault();
|
2360 |
-
$cfs.trigger(cf_e('next', conf));
|
2361 |
-
});
|
2362 |
-
if (opts.next.pauseOnHover)
|
2363 |
-
{
|
2364 |
-
var pC = bt_pauseOnHoverConfig(opts.next.pauseOnHover);
|
2365 |
-
opts.next.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2366 |
-
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2367 |
-
}
|
2368 |
-
}
|
2369 |
-
|
2370 |
-
// pagination
|
2371 |
-
if (opts.pagination.container)
|
2372 |
-
{
|
2373 |
-
if (opts.pagination.pauseOnHover)
|
2374 |
-
{
|
2375 |
-
var pC = bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);
|
2376 |
-
opts.pagination.container.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2377 |
-
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2378 |
-
}
|
2379 |
-
}
|
2380 |
-
|
2381 |
-
// prev/next keys
|
2382 |
-
if (opts.prev.key || opts.next.key)
|
2383 |
-
{
|
2384 |
-
$(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
|
2385 |
-
var k = e.keyCode;
|
2386 |
-
if (k == opts.next.key)
|
2387 |
-
{
|
2388 |
-
e.preventDefault();
|
2389 |
-
$cfs.trigger(cf_e('next', conf));
|
2390 |
-
}
|
2391 |
-
if (k == opts.prev.key)
|
2392 |
-
{
|
2393 |
-
e.preventDefault();
|
2394 |
-
$cfs.trigger(cf_e('prev', conf));
|
2395 |
-
}
|
2396 |
-
});
|
2397 |
-
}
|
2398 |
-
|
2399 |
-
// pagination keys
|
2400 |
-
if (opts.pagination.keys)
|
2401 |
-
{
|
2402 |
-
$(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
|
2403 |
-
var k = e.keyCode;
|
2404 |
-
if (k >= 49 && k < 58)
|
2405 |
-
{
|
2406 |
-
k = (k-49) * opts.items.visible;
|
2407 |
-
if (k <= itms.total)
|
2408 |
-
{
|
2409 |
-
e.preventDefault();
|
2410 |
-
$cfs.trigger(cf_e('slideTo', conf), [k, 0, true, opts.pagination]);
|
2411 |
-
}
|
2412 |
-
}
|
2413 |
-
});
|
2414 |
-
}
|
2415 |
-
|
2416 |
-
// swipe
|
2417 |
-
if ($.fn.swipe)
|
2418 |
-
{
|
2419 |
-
var isTouch = 'ontouchstart' in window;
|
2420 |
-
if ((isTouch && opts.swipe.onTouch) || (!isTouch && opts.swipe.onMouse))
|
2421 |
-
{
|
2422 |
-
var scP = $.extend(true, {}, opts.prev, opts.swipe),
|
2423 |
-
scN = $.extend(true, {}, opts.next, opts.swipe),
|
2424 |
-
swP = function() { $cfs.trigger(cf_e('prev', conf), [scP]) },
|
2425 |
-
swN = function() { $cfs.trigger(cf_e('next', conf), [scN]) };
|
2426 |
-
|
2427 |
-
switch (opts.direction)
|
2428 |
-
{
|
2429 |
-
case 'up':
|
2430 |
-
case 'down':
|
2431 |
-
opts.swipe.options.swipeUp = swN;
|
2432 |
-
opts.swipe.options.swipeDown = swP;
|
2433 |
-
break;
|
2434 |
-
default:
|
2435 |
-
opts.swipe.options.swipeLeft = swN;
|
2436 |
-
opts.swipe.options.swipeRight = swP;
|
2437 |
-
}
|
2438 |
-
if (crsl.swipe)
|
2439 |
-
{
|
2440 |
-
$cfs.swipe('destroy');
|
2441 |
-
}
|
2442 |
-
$wrp.swipe(opts.swipe.options);
|
2443 |
-
$wrp.css('cursor', 'move');
|
2444 |
-
crsl.swipe = true;
|
2445 |
-
}
|
2446 |
-
}
|
2447 |
-
|
2448 |
-
// mousewheel
|
2449 |
-
if ($.fn.mousewheel)
|
2450 |
-
{
|
2451 |
-
|
2452 |
-
if (opts.mousewheel)
|
2453 |
-
{
|
2454 |
-
var mcP = $.extend(true, {}, opts.prev, opts.mousewheel),
|
2455 |
-
mcN = $.extend(true, {}, opts.next, opts.mousewheel);
|
2456 |
-
|
2457 |
-
if (crsl.mousewheel)
|
2458 |
-
{
|
2459 |
-
$wrp.unbind(cf_e('mousewheel', conf, false));
|
2460 |
-
}
|
2461 |
-
$wrp.bind(cf_e('mousewheel', conf, false), function(e, delta) {
|
2462 |
-
e.preventDefault();
|
2463 |
-
if (delta > 0)
|
2464 |
-
{
|
2465 |
-
$cfs.trigger(cf_e('prev', conf), [mcP]);
|
2466 |
-
}
|
2467 |
-
else
|
2468 |
-
{
|
2469 |
-
$cfs.trigger(cf_e('next', conf), [mcN]);
|
2470 |
-
}
|
2471 |
-
});
|
2472 |
-
crsl.mousewheel = true;
|
2473 |
-
}
|
2474 |
-
}
|
2475 |
-
|
2476 |
-
if (opts.auto.play)
|
2477 |
-
{
|
2478 |
-
$cfs.trigger(cf_e('play', conf), opts.auto.delay);
|
2479 |
-
}
|
2480 |
-
|
2481 |
-
if (crsl.upDateOnWindowResize)
|
2482 |
-
{
|
2483 |
-
var resizeFn = function(e) {
|
2484 |
-
$cfs.trigger(cf_e('finish', conf));
|
2485 |
-
if (opts.auto.pauseOnResize && !crsl.isPaused)
|
2486 |
-
{
|
2487 |
-
$cfs.trigger(cf_e('play', conf));
|
2488 |
-
}
|
2489 |
-
sz_resetMargin($cfs.children(), opts);
|
2490 |
-
$cfs.trigger(cf_e('updateSizes', conf));
|
2491 |
-
};
|
2492 |
-
|
2493 |
-
var $w = $(window),
|
2494 |
-
onResize = null;
|
2495 |
-
|
2496 |
-
if ($.debounce && conf.onWindowResize == 'debounce')
|
2497 |
-
{
|
2498 |
-
onResize = $.debounce(200, resizeFn);
|
2499 |
-
}
|
2500 |
-
else if ($.throttle && conf.onWindowResize == 'throttle')
|
2501 |
-
{
|
2502 |
-
onResize = $.throttle(300, resizeFn);
|
2503 |
-
}
|
2504 |
-
else
|
2505 |
-
{
|
2506 |
-
var _windowWidth = 0,
|
2507 |
-
_windowHeight = 0;
|
2508 |
-
|
2509 |
-
onResize = function() {
|
2510 |
-
var nw = $w.width(),
|
2511 |
-
nh = $w.height();
|
2512 |
-
|
2513 |
-
if (nw != _windowWidth || nh != _windowHeight)
|
2514 |
-
{
|
2515 |
-
resizeFn();
|
2516 |
-
_windowWidth = nw;
|
2517 |
-
_windowHeight = nh;
|
2518 |
-
}
|
2519 |
-
};
|
2520 |
-
}
|
2521 |
-
$w.bind(cf_e('resize', conf, false, true, true), onResize);
|
2522 |
-
}
|
2523 |
-
}; // /bind_buttons
|
2524 |
-
|
2525 |
-
|
2526 |
-
FN._unbind_buttons = function() {
|
2527 |
-
var ns1 = cf_e('', conf),
|
2528 |
-
ns2 = cf_e('', conf, false);
|
2529 |
-
ns3 = cf_e('', conf, false, true, true);
|
2530 |
-
|
2531 |
-
$(document).unbind(ns3);
|
2532 |
-
$(window).unbind(ns3);
|
2533 |
-
$wrp.unbind(ns2);
|
2534 |
-
|
2535 |
-
if (opts.auto.button)
|
2536 |
-
{
|
2537 |
-
opts.auto.button.unbind(ns2);
|
2538 |
-
}
|
2539 |
-
if (opts.prev.button)
|
2540 |
-
{
|
2541 |
-
opts.prev.button.unbind(ns2);
|
2542 |
-
}
|
2543 |
-
if (opts.next.button)
|
2544 |
-
{
|
2545 |
-
opts.next.button.unbind(ns2);
|
2546 |
-
}
|
2547 |
-
if (opts.pagination.container)
|
2548 |
-
{
|
2549 |
-
opts.pagination.container.unbind(ns2);
|
2550 |
-
if (opts.pagination.anchorBuilder)
|
2551 |
-
{
|
2552 |
-
opts.pagination.container.children().remove();
|
2553 |
-
}
|
2554 |
-
}
|
2555 |
-
if (crsl.swipe)
|
2556 |
-
{
|
2557 |
-
$cfs.swipe('destroy');
|
2558 |
-
$wrp.css('cursor', 'default');
|
2559 |
-
crsl.swipe = false;
|
2560 |
-
}
|
2561 |
-
if (crsl.mousewheel)
|
2562 |
-
{
|
2563 |
-
crsl.mousewheel = false;
|
2564 |
-
}
|
2565 |
-
|
2566 |
-
nv_showNavi(opts, 'hide', conf);
|
2567 |
-
nv_enableNavi(opts, 'removeClass', conf);
|
2568 |
-
|
2569 |
-
}; // /unbind_buttons
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
// START
|
2574 |
-
|
2575 |
-
if (is_boolean(configs))
|
2576 |
-
{
|
2577 |
-
configs = {
|
2578 |
-
'debug': configs
|
2579 |
-
};
|
2580 |
-
}
|
2581 |
-
|
2582 |
-
// set vars
|
2583 |
-
var crsl = {
|
2584 |
-
'direction' : 'next',
|
2585 |
-
'isPaused' : true,
|
2586 |
-
'isScrolling' : false,
|
2587 |
-
'isStopped' : false,
|
2588 |
-
'mousewheel' : false,
|
2589 |
-
'swipe' : false
|
2590 |
-
},
|
2591 |
-
itms = {
|
2592 |
-
'total' : $cfs.children().length,
|
2593 |
-
'first' : 0
|
2594 |
-
},
|
2595 |
-
tmrs = {
|
2596 |
-
'auto' : null,
|
2597 |
-
'progress' : null,
|
2598 |
-
'startTime' : getTime(),
|
2599 |
-
'timePassed' : 0
|
2600 |
-
},
|
2601 |
-
scrl = {
|
2602 |
-
'isStopped' : false,
|
2603 |
-
'duration' : 0,
|
2604 |
-
'startTime' : 0,
|
2605 |
-
'easing' : '',
|
2606 |
-
'anims' : []
|
2607 |
-
},
|
2608 |
-
clbk = {
|
2609 |
-
'onBefore' : [],
|
2610 |
-
'onAfter' : []
|
2611 |
-
},
|
2612 |
-
queu = [],
|
2613 |
-
conf = $.extend(true, {}, $.fn.carouFredSel.configs, configs),
|
2614 |
-
opts = {},
|
2615 |
-
opts_orig = $.extend(true, {}, options),
|
2616 |
-
$wrp = (conf.wrapper == 'parent')
|
2617 |
-
? $cfs.parent()
|
2618 |
-
: $cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();
|
2619 |
-
|
2620 |
-
|
2621 |
-
conf.selector = $cfs.selector;
|
2622 |
-
conf.serialNumber = $.fn.carouFredSel.serialNumber++;
|
2623 |
-
|
2624 |
-
conf.transition = (conf.transition && $.fn.transition) ? 'transition' : 'animate';
|
2625 |
-
|
2626 |
-
// create carousel
|
2627 |
-
FN._init(opts_orig, true, starting_position);
|
2628 |
-
FN._build();
|
2629 |
-
FN._bind_events();
|
2630 |
-
FN._bind_buttons();
|
2631 |
-
|
2632 |
-
// find item to start
|
2633 |
-
if (is_array(opts.items.start))
|
2634 |
-
{
|
2635 |
-
var start_arr = opts.items.start;
|
2636 |
-
}
|
2637 |
-
else
|
2638 |
-
{
|
2639 |
-
var start_arr = [];
|
2640 |
-
if (opts.items.start != 0)
|
2641 |
-
{
|
2642 |
-
start_arr.push(opts.items.start);
|
2643 |
-
}
|
2644 |
-
}
|
2645 |
-
if (opts.cookie)
|
2646 |
-
{
|
2647 |
-
start_arr.unshift(parseInt(cf_getCookie(opts.cookie), 10));
|
2648 |
-
}
|
2649 |
-
|
2650 |
-
if (start_arr.length > 0)
|
2651 |
-
{
|
2652 |
-
for (var a = 0, l = start_arr.length; a < l; a++)
|
2653 |
-
{
|
2654 |
-
var s = start_arr[a];
|
2655 |
-
if (s == 0)
|
2656 |
-
{
|
2657 |
-
continue;
|
2658 |
-
}
|
2659 |
-
if (s === true)
|
2660 |
-
{
|
2661 |
-
s = window.location.hash;
|
2662 |
-
if (s.length < 1)
|
2663 |
-
{
|
2664 |
-
continue;
|
2665 |
-
}
|
2666 |
-
}
|
2667 |
-
else if (s === 'random')
|
2668 |
-
{
|
2669 |
-
s = Math.floor(Math.random()*itms.total);
|
2670 |
-
}
|
2671 |
-
if ($cfs.triggerHandler(cf_e('slideTo', conf), [s, 0, true, { fx: 'none' }]))
|
2672 |
-
{
|
2673 |
-
break;
|
2674 |
-
}
|
2675 |
-
}
|
2676 |
-
}
|
2677 |
-
var siz = sz_setSizes($cfs, opts),
|
2678 |
-
itm = gi_getCurrentItems($cfs.children(), opts);
|
2679 |
-
|
2680 |
-
if (opts.onCreate)
|
2681 |
-
{
|
2682 |
-
opts.onCreate.call($tt0, {
|
2683 |
-
'width': siz.width,
|
2684 |
-
'height': siz.height,
|
2685 |
-
'items': itm
|
2686 |
-
});
|
2687 |
-
}
|
2688 |
-
|
2689 |
-
$cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
|
2690 |
-
$cfs.trigger(cf_e('linkAnchors', conf));
|
2691 |
-
|
2692 |
-
if (conf.debug)
|
2693 |
-
{
|
2694 |
-
$cfs.trigger(cf_e('debug', conf));
|
2695 |
-
}
|
2696 |
-
|
2697 |
-
return $cfs;
|
2698 |
-
};
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
// GLOBAL PUBLIC
|
2703 |
-
|
2704 |
-
$.fn.carouFredSel.serialNumber = 1;
|
2705 |
-
$.fn.carouFredSel.defaults = {
|
2706 |
-
'synchronise' : false,
|
2707 |
-
'infinite' : true,
|
2708 |
-
'circular' : true,
|
2709 |
-
'responsive' : false,
|
2710 |
-
'direction' : 'left',
|
2711 |
-
'items' : {
|
2712 |
-
'start' : 0
|
2713 |
-
},
|
2714 |
-
'scroll' : {
|
2715 |
-
'easing' : 'swing',
|
2716 |
-
'duration' : 500,
|
2717 |
-
'pauseOnHover' : false,
|
2718 |
-
'event' : 'click',
|
2719 |
-
'queue' : false
|
2720 |
-
}
|
2721 |
-
};
|
2722 |
-
$.fn.carouFredSel.configs = {
|
2723 |
-
'debug' : false,
|
2724 |
-
'transition' : false,
|
2725 |
-
'onWindowResize': 'throttle',
|
2726 |
-
'events' : {
|
2727 |
-
'prefix' : '',
|
2728 |
-
'namespace' : 'cfs'
|
2729 |
-
},
|
2730 |
-
'wrapper' : {
|
2731 |
-
'element' : 'div',
|
2732 |
-
'classname' : 'caroufredsel_wrapper'
|
2733 |
-
},
|
2734 |
-
'classnames' : {}
|
2735 |
-
};
|
2736 |
-
$.fn.carouFredSel.pageAnchorBuilder = function(nr) {
|
2737 |
-
return '<a href="#"><span>'+nr+'</span></a>';
|
2738 |
-
};
|
2739 |
-
$.fn.carouFredSel.progressbarUpdater = function(perc) {
|
2740 |
-
$(this).css('width', perc+'%');
|
2741 |
-
};
|
2742 |
-
|
2743 |
-
$.fn.carouFredSel.cookie = {
|
2744 |
-
get: function(n) {
|
2745 |
-
n += '=';
|
2746 |
-
var ca = document.cookie.split(';');
|
2747 |
-
for (var a = 0, l = ca.length; a < l; a++)
|
2748 |
-
{
|
2749 |
-
var c = ca[a];
|
2750 |
-
while (c.charAt(0) == ' ')
|
2751 |
-
{
|
2752 |
-
c = c.slice(1);
|
2753 |
-
}
|
2754 |
-
if (c.indexOf(n) == 0)
|
2755 |
-
{
|
2756 |
-
return c.slice(n.length);
|
2757 |
-
}
|
2758 |
-
}
|
2759 |
-
return 0;
|
2760 |
-
},
|
2761 |
-
set: function(n, v, d) {
|
2762 |
-
var e = "";
|
2763 |
-
if (d)
|
2764 |
-
{
|
2765 |
-
var date = new Date();
|
2766 |
-
date.setTime(date.getTime() + (d * 24 * 60 * 60 * 1000));
|
2767 |
-
e = "; expires=" + date.toGMTString();
|
2768 |
-
}
|
2769 |
-
document.cookie = n + '=' + v + e + '; path=/';
|
2770 |
-
},
|
2771 |
-
remove: function(n) {
|
2772 |
-
$.fn.carouFredSel.cookie.set(n, "", -1);
|
2773 |
-
}
|
2774 |
-
};
|
2775 |
-
|
2776 |
-
|
2777 |
-
// GLOBAL PRIVATE
|
2778 |
-
|
2779 |
-
// scrolling functions
|
2780 |
-
function sc_setScroll(d, e, c) {
|
2781 |
-
if (c.transition == 'transition')
|
2782 |
-
{
|
2783 |
-
if (e == 'swing')
|
2784 |
-
{
|
2785 |
-
e = 'ease';
|
2786 |
-
}
|
2787 |
-
}
|
2788 |
-
return {
|
2789 |
-
anims: [],
|
2790 |
-
duration: d,
|
2791 |
-
orgDuration: d,
|
2792 |
-
easing: e,
|
2793 |
-
startTime: getTime()
|
2794 |
-
};
|
2795 |
-
}
|
2796 |
-
function sc_startScroll(s, c) {
|
2797 |
-
for (var a = 0, l = s.anims.length; a < l; a++)
|
2798 |
-
{
|
2799 |
-
var b = s.anims[a];
|
2800 |
-
if (!b)
|
2801 |
-
{
|
2802 |
-
continue;
|
2803 |
-
}
|
2804 |
-
b[0][c.transition](b[1], s.duration, s.easing, b[2]);
|
2805 |
-
}
|
2806 |
-
}
|
2807 |
-
function sc_stopScroll(s, finish) {
|
2808 |
-
if (!is_boolean(finish))
|
2809 |
-
{
|
2810 |
-
finish = true;
|
2811 |
-
}
|
2812 |
-
if (is_object(s.pre))
|
2813 |
-
{
|
2814 |
-
sc_stopScroll(s.pre, finish);
|
2815 |
-
}
|
2816 |
-
for (var a = 0, l = s.anims.length; a < l; a++)
|
2817 |
-
{
|
2818 |
-
var b = s.anims[a];
|
2819 |
-
b[0].stop(true);
|
2820 |
-
if (finish)
|
2821 |
-
{
|
2822 |
-
b[0].css(b[1]);
|
2823 |
-
if (is_function(b[2]))
|
2824 |
-
{
|
2825 |
-
b[2]();
|
2826 |
-
}
|
2827 |
-
}
|
2828 |
-
}
|
2829 |
-
if (is_object(s.post))
|
2830 |
-
{
|
2831 |
-
sc_stopScroll(s.post, finish);
|
2832 |
-
}
|
2833 |
-
}
|
2834 |
-
function sc_afterScroll( $c, $c2, o ) {
|
2835 |
-
if ($c2)
|
2836 |
-
{
|
2837 |
-
$c2.remove();
|
2838 |
-
}
|
2839 |
-
|
2840 |
-
switch(o.fx) {
|
2841 |
-
case 'fade':
|
2842 |
-
case 'crossfade':
|
2843 |
-
case 'cover-fade':
|
2844 |
-
case 'uncover-fade':
|
2845 |
-
$c.css('opacity', 1);
|
2846 |
-
$c.css('filter', '');
|
2847 |
-
break;
|
2848 |
-
}
|
2849 |
-
}
|
2850 |
-
function sc_fireCallbacks($t, o, b, a, c) {
|
2851 |
-
if (o[b])
|
2852 |
-
{
|
2853 |
-
o[b].call($t, a);
|
2854 |
-
}
|
2855 |
-
if (c[b].length)
|
2856 |
-
{
|
2857 |
-
for (var i = 0, l = c[b].length; i < l; i++)
|
2858 |
-
{
|
2859 |
-
c[b][i].call($t, a);
|
2860 |
-
}
|
2861 |
-
}
|
2862 |
-
return [];
|
2863 |
-
}
|
2864 |
-
function sc_fireQueue($c, q, c) {
|
2865 |
-
|
2866 |
-
if (q.length)
|
2867 |
-
{
|
2868 |
-
$c.trigger(cf_e(q[0][0], c), q[0][1]);
|
2869 |
-
q.shift();
|
2870 |
-
}
|
2871 |
-
return q;
|
2872 |
-
}
|
2873 |
-
function sc_hideHiddenItems(hiddenitems) {
|
2874 |
-
hiddenitems.each(function() {
|
2875 |
-
var hi = $(this);
|
2876 |
-
hi.data('_cfs_isHidden', hi.is(':hidden')).hide();
|
2877 |
-
});
|
2878 |
-
}
|
2879 |
-
function sc_showHiddenItems(hiddenitems) {
|
2880 |
-
if (hiddenitems)
|
2881 |
-
{
|
2882 |
-
hiddenitems.each(function() {
|
2883 |
-
var hi = $(this);
|
2884 |
-
if (!hi.data('_cfs_isHidden'))
|
2885 |
-
{
|
2886 |
-
hi.show();
|
2887 |
-
}
|
2888 |
-
});
|
2889 |
-
}
|
2890 |
-
}
|
2891 |
-
function sc_clearTimers(t) {
|
2892 |
-
if (t.auto)
|
2893 |
-
{
|
2894 |
-
clearTimeout(t.auto);
|
2895 |
-
}
|
2896 |
-
if (t.progress)
|
2897 |
-
{
|
2898 |
-
clearInterval(t.progress);
|
2899 |
-
}
|
2900 |
-
return t;
|
2901 |
-
}
|
2902 |
-
function sc_mapCallbackArguments(i_old, i_skp, i_new, s_itm, s_dir, s_dur, w_siz) {
|
2903 |
-
return {
|
2904 |
-
'width': w_siz.width,
|
2905 |
-
'height': w_siz.height,
|
2906 |
-
'items': {
|
2907 |
-
'old': i_old,
|
2908 |
-
'skipped': i_skp,
|
2909 |
-
'visible': i_new
|
2910 |
-
},
|
2911 |
-
'scroll': {
|
2912 |
-
'items': s_itm,
|
2913 |
-
'direction': s_dir,
|
2914 |
-
'duration': s_dur
|
2915 |
-
}
|
2916 |
-
};
|
2917 |
-
}
|
2918 |
-
function sc_getDuration( sO, o, nI, siz ) {
|
2919 |
-
var dur = sO.duration;
|
2920 |
-
if (sO.fx == 'none')
|
2921 |
-
{
|
2922 |
-
return 0;
|
2923 |
-
}
|
2924 |
-
if (dur == 'auto')
|
2925 |
-
{
|
2926 |
-
dur = o.scroll.duration / o.scroll.items * nI;
|
2927 |
-
}
|
2928 |
-
else if (dur < 10)
|
2929 |
-
{
|
2930 |
-
dur = siz / dur;
|
2931 |
-
}
|
2932 |
-
if (dur < 1)
|
2933 |
-
{
|
2934 |
-
return 0;
|
2935 |
-
}
|
2936 |
-
if (sO.fx == 'fade')
|
2937 |
-
{
|
2938 |
-
dur = dur / 2;
|
2939 |
-
}
|
2940 |
-
return Math.round(dur);
|
2941 |
-
}
|
2942 |
-
|
2943 |
-
// navigation functions
|
2944 |
-
function nv_showNavi(o, t, c) {
|
2945 |
-
var minimum = (is_number(o.items.minimum)) ? o.items.minimum : o.items.visible + 1;
|
2946 |
-
if (t == 'show' || t == 'hide')
|
2947 |
-
{
|
2948 |
-
var f = t;
|
2949 |
-
}
|
2950 |
-
else if (minimum > t)
|
2951 |
-
{
|
2952 |
-
debug(c, 'Not enough items ('+t+' total, '+minimum+' needed): Hiding navigation.');
|
2953 |
-
var f = 'hide';
|
2954 |
-
}
|
2955 |
-
else
|
2956 |
-
{
|
2957 |
-
var f = 'show';
|
2958 |
-
}
|
2959 |
-
var s = (f == 'show') ? 'removeClass' : 'addClass',
|
2960 |
-
h = cf_c('hidden', c);
|
2961 |
-
|
2962 |
-
if (o.auto.button)
|
2963 |
-
{
|
2964 |
-
o.auto.button[f]()[s](h);
|
2965 |
-
}
|
2966 |
-
if (o.prev.button)
|
2967 |
-
{
|
2968 |
-
o.prev.button[f]()[s](h);
|
2969 |
-
}
|
2970 |
-
if (o.next.button)
|
2971 |
-
{
|
2972 |
-
o.next.button[f]()[s](h);
|
2973 |
-
}
|
2974 |
-
if (o.pagination.container)
|
2975 |
-
{
|
2976 |
-
o.pagination.container[f]()[s](h);
|
2977 |
-
}
|
2978 |
-
}
|
2979 |
-
function nv_enableNavi(o, f, c) {
|
2980 |
-
if (o.circular || o.infinite) return;
|
2981 |
-
var fx = (f == 'removeClass' || f == 'addClass') ? f : false,
|
2982 |
-
di = cf_c('disabled', c);
|
2983 |
-
|
2984 |
-
if (o.auto.button && fx)
|
2985 |
-
{
|
2986 |
-
o.auto.button[fx](di);
|
2987 |
-
}
|
2988 |
-
if (o.prev.button)
|
2989 |
-
{
|
2990 |
-
var fn = fx || (f == 0) ? 'addClass' : 'removeClass';
|
2991 |
-
o.prev.button[fn](di);
|
2992 |
-
}
|
2993 |
-
if (o.next.button)
|
2994 |
-
{
|
2995 |
-
var fn = fx || (f == o.items.visible) ? 'addClass' : 'removeClass';
|
2996 |
-
o.next.button[fn](di);
|
2997 |
-
}
|
2998 |
-
}
|
2999 |
-
|
3000 |
-
// get object functions
|
3001 |
-
function go_getObject($tt, obj) {
|
3002 |
-
if (is_function(obj))
|
3003 |
-
{
|
3004 |
-
obj = obj.call($tt);
|
3005 |
-
}
|
3006 |
-
else if (is_undefined(obj))
|
3007 |
-
{
|
3008 |
-
obj = {};
|
3009 |
-
}
|
3010 |
-
return obj;
|
3011 |
-
}
|
3012 |
-
function go_getItemsObject($tt, obj) {
|
3013 |
-
obj = go_getObject($tt, obj);
|
3014 |
-
if (is_number(obj))
|
3015 |
-
{
|
3016 |
-
obj = {
|
3017 |
-
'visible': obj
|
3018 |
-
};
|
3019 |
-
}
|
3020 |
-
else if (obj == 'variable')
|
3021 |
-
{
|
3022 |
-
obj = {
|
3023 |
-
'visible': obj,
|
3024 |
-
'width': obj,
|
3025 |
-
'height': obj
|
3026 |
-
};
|
3027 |
-
}
|
3028 |
-
else if (!is_object(obj))
|
3029 |
-
{
|
3030 |
-
obj = {};
|
3031 |
-
}
|
3032 |
-
return obj;
|
3033 |
-
}
|
3034 |
-
function go_getScrollObject($tt, obj) {
|
3035 |
-
obj = go_getObject($tt, obj);
|
3036 |
-
if (is_number(obj))
|
3037 |
-
{
|
3038 |
-
if (obj <= 50)
|
3039 |
-
{
|
3040 |
-
obj = {
|
3041 |
-
'items': obj
|
3042 |
-
};
|
3043 |
-
}
|
3044 |
-
else
|
3045 |
-
{
|
3046 |
-
obj = {
|
3047 |
-
'duration': obj
|
3048 |
-
};
|
3049 |
-
}
|
3050 |
-
}
|
3051 |
-
else if (is_string(obj))
|
3052 |
-
{
|
3053 |
-
obj = {
|
3054 |
-
'easing': obj
|
3055 |
-
};
|
3056 |
-
}
|
3057 |
-
else if (!is_object(obj))
|
3058 |
-
{
|
3059 |
-
obj = {};
|
3060 |
-
}
|
3061 |
-
return obj;
|
3062 |
-
}
|
3063 |
-
function go_getNaviObject($tt, obj) {
|
3064 |
-
obj = go_getObject($tt, obj);
|
3065 |
-
if (is_string(obj))
|
3066 |
-
{
|
3067 |
-
var temp = cf_getKeyCode(obj);
|
3068 |
-
if (temp == -1)
|
3069 |
-
{
|
3070 |
-
obj = $(obj);
|
3071 |
-
}
|
3072 |
-
else
|
3073 |
-
{
|
3074 |
-
obj = temp;
|
3075 |
-
}
|
3076 |
-
}
|
3077 |
-
return obj;
|
3078 |
-
}
|
3079 |
-
|
3080 |
-
function go_getAutoObject($tt, obj) {
|
3081 |
-
obj = go_getNaviObject($tt, obj);
|
3082 |
-
if (is_jquery(obj))
|
3083 |
-
{
|
3084 |
-
obj = {
|
3085 |
-
'button': obj
|
3086 |
-
};
|
3087 |
-
}
|
3088 |
-
else if (is_boolean(obj))
|
3089 |
-
{
|
3090 |
-
obj = {
|
3091 |
-
'play': obj
|
3092 |
-
};
|
3093 |
-
}
|
3094 |
-
else if (is_number(obj))
|
3095 |
-
{
|
3096 |
-
obj = {
|
3097 |
-
'timeoutDuration': obj
|
3098 |
-
};
|
3099 |
-
}
|
3100 |
-
if (obj.progress)
|
3101 |
-
{
|
3102 |
-
if (is_string(obj.progress) || is_jquery(obj.progress))
|
3103 |
-
{
|
3104 |
-
obj.progress = {
|
3105 |
-
'bar': obj.progress
|
3106 |
-
};
|
3107 |
-
}
|
3108 |
-
}
|
3109 |
-
return obj;
|
3110 |
-
}
|
3111 |
-
function go_complementAutoObject($tt, obj) {
|
3112 |
-
if (is_function(obj.button))
|
3113 |
-
{
|
3114 |
-
obj.button = obj.button.call($tt);
|
3115 |
-
}
|
3116 |
-
if (is_string(obj.button))
|
3117 |
-
{
|
3118 |
-
obj.button = $(obj.button);
|
3119 |
-
}
|
3120 |
-
if (!is_boolean(obj.play))
|
3121 |
-
{
|
3122 |
-
obj.play = true;
|
3123 |
-
}
|
3124 |
-
if (!is_number(obj.delay))
|
3125 |
-
{
|
3126 |
-
obj.delay = 0;
|
3127 |
-
}
|
3128 |
-
if (is_undefined(obj.pauseOnEvent))
|
3129 |
-
{
|
3130 |
-
obj.pauseOnEvent = true;
|
3131 |
-
}
|
3132 |
-
if (!is_boolean(obj.pauseOnResize))
|
3133 |
-
{
|
3134 |
-
obj.pauseOnResize = true;
|
3135 |
-
}
|
3136 |
-
if (!is_number(obj.timeoutDuration))
|
3137 |
-
{
|
3138 |
-
obj.timeoutDuration = (obj.duration < 10)
|
3139 |
-
? 2500
|
3140 |
-
: obj.duration * 5;
|
3141 |
-
}
|
3142 |
-
if (obj.progress)
|
3143 |
-
{
|
3144 |
-
if (is_function(obj.progress.bar))
|
3145 |
-
{
|
3146 |
-
obj.progress.bar = obj.progress.bar.call($tt);
|
3147 |
-
}
|
3148 |
-
if (is_string(obj.progress.bar))
|
3149 |
-
{
|
3150 |
-
obj.progress.bar = $(obj.progress.bar);
|
3151 |
-
}
|
3152 |
-
if (obj.progress.bar)
|
3153 |
-
{
|
3154 |
-
if (!is_function(obj.progress.updater))
|
3155 |
-
{
|
3156 |
-
obj.progress.updater = $.fn.carouFredSel.progressbarUpdater;
|
3157 |
-
}
|
3158 |
-
if (!is_number(obj.progress.interval))
|
3159 |
-
{
|
3160 |
-
obj.progress.interval = 50;
|
3161 |
-
}
|
3162 |
-
}
|
3163 |
-
else
|
3164 |
-
{
|
3165 |
-
obj.progress = false;
|
3166 |
-
}
|
3167 |
-
}
|
3168 |
-
return obj;
|
3169 |
-
}
|
3170 |
-
|
3171 |
-
function go_getPrevNextObject($tt, obj) {
|
3172 |
-
obj = go_getNaviObject($tt, obj);
|
3173 |
-
if (is_jquery(obj))
|
3174 |
-
{
|
3175 |
-
obj = {
|
3176 |
-
'button': obj
|
3177 |
-
};
|
3178 |
-
}
|
3179 |
-
else if (is_number(obj))
|
3180 |
-
{
|
3181 |
-
obj = {
|
3182 |
-
'key': obj
|
3183 |
-
};
|
3184 |
-
}
|
3185 |
-
return obj;
|
3186 |
-
}
|
3187 |
-
function go_complementPrevNextObject($tt, obj) {
|
3188 |
-
if (is_function(obj.button))
|
3189 |
-
{
|
3190 |
-
obj.button = obj.button.call($tt);
|
3191 |
-
}
|
3192 |
-
if (is_string(obj.button))
|
3193 |
-
{
|
3194 |
-
obj.button = $(obj.button);
|
3195 |
-
}
|
3196 |
-
if (is_string(obj.key))
|
3197 |
-
{
|
3198 |
-
obj.key = cf_getKeyCode(obj.key);
|
3199 |
-
}
|
3200 |
-
return obj;
|
3201 |
-
}
|
3202 |
-
|
3203 |
-
function go_getPaginationObject($tt, obj) {
|
3204 |
-
obj = go_getNaviObject($tt, obj);
|
3205 |
-
if (is_jquery(obj))
|
3206 |
-
{
|
3207 |
-
obj = {
|
3208 |
-
'container': obj
|
3209 |
-
};
|
3210 |
-
}
|
3211 |
-
else if (is_boolean(obj))
|
3212 |
-
{
|
3213 |
-
obj = {
|
3214 |
-
'keys': obj
|
3215 |
-
};
|
3216 |
-
}
|
3217 |
-
return obj;
|
3218 |
-
}
|
3219 |
-
function go_complementPaginationObject($tt, obj) {
|
3220 |
-
if (is_function(obj.container))
|
3221 |
-
{
|
3222 |
-
obj.container = obj.container.call($tt);
|
3223 |
-
}
|
3224 |
-
if (is_string(obj.container))
|
3225 |
-
{
|
3226 |
-
obj.container = $(obj.container);
|
3227 |
-
}
|
3228 |
-
if (!is_number(obj.items))
|
3229 |
-
{
|
3230 |
-
obj.items = false;
|
3231 |
-
}
|
3232 |
-
if (!is_boolean(obj.keys))
|
3233 |
-
{
|
3234 |
-
obj.keys = false;
|
3235 |
-
}
|
3236 |
-
if (!is_function(obj.anchorBuilder) && !is_false(obj.anchorBuilder))
|
3237 |
-
{
|
3238 |
-
obj.anchorBuilder = $.fn.carouFredSel.pageAnchorBuilder;
|
3239 |
-
}
|
3240 |
-
if (!is_number(obj.deviation))
|
3241 |
-
{
|
3242 |
-
obj.deviation = 0;
|
3243 |
-
}
|
3244 |
-
return obj;
|
3245 |
-
}
|
3246 |
-
|
3247 |
-
function go_getSwipeObject($tt, obj) {
|
3248 |
-
if (is_function(obj))
|
3249 |
-
{
|
3250 |
-
obj = obj.call($tt);
|
3251 |
-
}
|
3252 |
-
if (is_undefined(obj))
|
3253 |
-
{
|
3254 |
-
obj = {
|
3255 |
-
'onTouch': false
|
3256 |
-
};
|
3257 |
-
}
|
3258 |
-
if (is_true(obj))
|
3259 |
-
{
|
3260 |
-
obj = {
|
3261 |
-
'onTouch': obj
|
3262 |
-
};
|
3263 |
-
}
|
3264 |
-
else if (is_number(obj))
|
3265 |
-
{
|
3266 |
-
obj = {
|
3267 |
-
'items': obj
|
3268 |
-
};
|
3269 |
-
}
|
3270 |
-
return obj;
|
3271 |
-
}
|
3272 |
-
function go_complementSwipeObject($tt, obj) {
|
3273 |
-
if (!is_boolean(obj.onTouch))
|
3274 |
-
{
|
3275 |
-
obj.onTouch = true;
|
3276 |
-
}
|
3277 |
-
if (!is_boolean(obj.onMouse))
|
3278 |
-
{
|
3279 |
-
obj.onMouse = false;
|
3280 |
-
}
|
3281 |
-
if (!is_object(obj.options))
|
3282 |
-
{
|
3283 |
-
obj.options = {};
|
3284 |
-
}
|
3285 |
-
if (!is_boolean(obj.options.triggerOnTouchEnd))
|
3286 |
-
{
|
3287 |
-
obj.options.triggerOnTouchEnd = false;
|
3288 |
-
}
|
3289 |
-
return obj;
|
3290 |
-
}
|
3291 |
-
function go_getMousewheelObject($tt, obj) {
|
3292 |
-
if (is_function(obj))
|
3293 |
-
{
|
3294 |
-
obj = obj.call($tt);
|
3295 |
-
}
|
3296 |
-
if (is_true(obj))
|
3297 |
-
{
|
3298 |
-
obj = {};
|
3299 |
-
}
|
3300 |
-
else if (is_number(obj))
|
3301 |
-
{
|
3302 |
-
obj = {
|
3303 |
-
'items': obj
|
3304 |
-
};
|
3305 |
-
}
|
3306 |
-
else if (is_undefined(obj))
|
3307 |
-
{
|
3308 |
-
obj = false;
|
3309 |
-
}
|
3310 |
-
return obj;
|
3311 |
-
}
|
3312 |
-
function go_complementMousewheelObject($tt, obj) {
|
3313 |
-
return obj;
|
3314 |
-
}
|
3315 |
-
|
3316 |
-
// get number functions
|
3317 |
-
function gn_getItemIndex(num, dev, org, items, $cfs) {
|
3318 |
-
if (is_string(num))
|
3319 |
-
{
|
3320 |
-
num = $(num, $cfs);
|
3321 |
-
}
|
3322 |
-
|
3323 |
-
if (is_object(num))
|
3324 |
-
{
|
3325 |
-
num = $(num, $cfs);
|
3326 |
-
}
|
3327 |
-
if (is_jquery(num))
|
3328 |
-
{
|
3329 |
-
num = $cfs.children().index(num);
|
3330 |
-
if (!is_boolean(org))
|
3331 |
-
{
|
3332 |
-
org = false;
|
3333 |
-
}
|
3334 |
-
}
|
3335 |
-
else
|
3336 |
-
{
|
3337 |
-
if (!is_boolean(org))
|
3338 |
-
{
|
3339 |
-
org = true;
|
3340 |
-
}
|
3341 |
-
}
|
3342 |
-
if (!is_number(num))
|
3343 |
-
{
|
3344 |
-
num = 0;
|
3345 |
-
}
|
3346 |
-
if (!is_number(dev))
|
3347 |
-
{
|
3348 |
-
dev = 0;
|
3349 |
-
}
|
3350 |
-
|
3351 |
-
if (org)
|
3352 |
-
{
|
3353 |
-
num += items.first;
|
3354 |
-
}
|
3355 |
-
num += dev;
|
3356 |
-
if (items.total > 0)
|
3357 |
-
{
|
3358 |
-
while (num >= items.total)
|
3359 |
-
{
|
3360 |
-
num -= items.total;
|
3361 |
-
}
|
3362 |
-
while (num < 0)
|
3363 |
-
{
|
3364 |
-
num += items.total;
|
3365 |
-
}
|
3366 |
-
}
|
3367 |
-
return num;
|
3368 |
-
}
|
3369 |
-
|
3370 |
-
// items prev
|
3371 |
-
function gn_getVisibleItemsPrev(i, o, s) {
|
3372 |
-
var t = 0,
|
3373 |
-
x = 0;
|
3374 |
-
|
3375 |
-
for (var a = s; a >= 0; a--)
|
3376 |
-
{
|
3377 |
-
var j = i.eq(a);
|
3378 |
-
t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
|
3379 |
-
if (t > o.maxDimension)
|
3380 |
-
{
|
3381 |
-
return x;
|
3382 |
-
}
|
3383 |
-
if (a == 0)
|
3384 |
-
{
|
3385 |
-
a = i.length;
|
3386 |
-
}
|
3387 |
-
x++;
|
3388 |
-
}
|
3389 |
-
}
|
3390 |
-
function gn_getVisibleItemsPrevFilter(i, o, s) {
|
3391 |
-
return gn_getItemsPrevFilter(i, o.items.filter, o.items.visibleConf.org, s);
|
3392 |
-
}
|
3393 |
-
function gn_getScrollItemsPrevFilter(i, o, s, m) {
|
3394 |
-
return gn_getItemsPrevFilter(i, o.items.filter, m, s);
|
3395 |
-
}
|
3396 |
-
function gn_getItemsPrevFilter(i, f, m, s) {
|
3397 |
-
var t = 0,
|
3398 |
-
x = 0;
|
3399 |
-
|
3400 |
-
for (var a = s, l = i.length; a >= 0; a--)
|
3401 |
-
{
|
3402 |
-
x++;
|
3403 |
-
if (x == l)
|
3404 |
-
{
|
3405 |
-
return x;
|
3406 |
-
}
|
3407 |
-
|
3408 |
-
var j = i.eq(a);
|
3409 |
-
if (j.is(f))
|
3410 |
-
{
|
3411 |
-
t++;
|
3412 |
-
if (t == m)
|
3413 |
-
{
|
3414 |
-
return x;
|
3415 |
-
}
|
3416 |
-
}
|
3417 |
-
if (a == 0)
|
3418 |
-
{
|
3419 |
-
a = l;
|
3420 |
-
}
|
3421 |
-
}
|
3422 |
-
}
|
3423 |
-
|
3424 |
-
function gn_getVisibleOrg($c, o) {
|
3425 |
-
return o.items.visibleConf.org || $c.children().slice(0, o.items.visible).filter(o.items.filter).length;
|
3426 |
-
}
|
3427 |
-
|
3428 |
-
// items next
|
3429 |
-
function gn_getVisibleItemsNext(i, o, s) {
|
3430 |
-
var t = 0,
|
3431 |
-
x = 0;
|
3432 |
-
|
3433 |
-
for (var a = s, l = i.length-1; a <= l; a++)
|
3434 |
-
{
|
3435 |
-
var j = i.eq(a);
|
3436 |
-
|
3437 |
-
t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
|
3438 |
-
if (t > o.maxDimension)
|
3439 |
-
{
|
3440 |
-
return x;
|
3441 |
-
}
|
3442 |
-
|
3443 |
-
x++;
|
3444 |
-
if (x == l+1)
|
3445 |
-
{
|
3446 |
-
return x;
|
3447 |
-
}
|
3448 |
-
if (a == l)
|
3449 |
-
{
|
3450 |
-
a = -1;
|
3451 |
-
}
|
3452 |
-
}
|
3453 |
-
}
|
3454 |
-
function gn_getVisibleItemsNextTestCircular(i, o, s, l) {
|
3455 |
-
var v = gn_getVisibleItemsNext(i, o, s);
|
3456 |
-
if (!o.circular)
|
3457 |
-
{
|
3458 |
-
if (s + v > l)
|
3459 |
-
{
|
3460 |
-
v = l - s;
|
3461 |
-
}
|
3462 |
-
}
|
3463 |
-
return v;
|
3464 |
-
}
|
3465 |
-
function gn_getVisibleItemsNextFilter(i, o, s) {
|
3466 |
-
return gn_getItemsNextFilter(i, o.items.filter, o.items.visibleConf.org, s, o.circular);
|
3467 |
-
}
|
3468 |
-
function gn_getScrollItemsNextFilter(i, o, s, m) {
|
3469 |
-
return gn_getItemsNextFilter(i, o.items.filter, m+1, s, o.circular) - 1;
|
3470 |
-
}
|
3471 |
-
function gn_getItemsNextFilter(i, f, m, s, c) {
|
3472 |
-
var t = 0,
|
3473 |
-
x = 0;
|
3474 |
-
|
3475 |
-
for (var a = s, l = i.length-1; a <= l; a++)
|
3476 |
-
{
|
3477 |
-
x++;
|
3478 |
-
if (x >= l)
|
3479 |
-
{
|
3480 |
-
return x;
|
3481 |
-
}
|
3482 |
-
|
3483 |
-
var j = i.eq(a);
|
3484 |
-
if (j.is(f))
|
3485 |
-
{
|
3486 |
-
t++;
|
3487 |
-
if (t == m)
|
3488 |
-
{
|
3489 |
-
return x;
|
3490 |
-
}
|
3491 |
-
}
|
3492 |
-
if (a == l)
|
3493 |
-
{
|
3494 |
-
a = -1;
|
3495 |
-
}
|
3496 |
-
}
|
3497 |
-
}
|
3498 |
-
|
3499 |
-
// get items functions
|
3500 |
-
function gi_getCurrentItems(i, o) {
|
3501 |
-
return i.slice(0, o.items.visible);
|
3502 |
-
}
|
3503 |
-
function gi_getOldItemsPrev(i, o, n) {
|
3504 |
-
return i.slice(n, o.items.visibleConf.old+n);
|
3505 |
-
}
|
3506 |
-
function gi_getNewItemsPrev(i, o) {
|
3507 |
-
return i.slice(0, o.items.visible);
|
3508 |
-
}
|
3509 |
-
function gi_getOldItemsNext(i, o) {
|
3510 |
-
return i.slice(0, o.items.visibleConf.old);
|
3511 |
-
}
|
3512 |
-
function gi_getNewItemsNext(i, o, n) {
|
3513 |
-
return i.slice(n, o.items.visible+n);
|
3514 |
-
}
|
3515 |
-
|
3516 |
-
// sizes functions
|
3517 |
-
function sz_storeMargin(i, o, d) {
|
3518 |
-
if (o.usePadding)
|
3519 |
-
{
|
3520 |
-
if (!is_string(d))
|
3521 |
-
{
|
3522 |
-
d = '_cfs_origCssMargin';
|
3523 |
-
}
|
3524 |
-
i.each(function() {
|
3525 |
-
var j = $(this),
|
3526 |
-
m = parseInt(j.css(o.d['marginRight']), 10);
|
3527 |
-
if (!is_number(m))
|
3528 |
-
{
|
3529 |
-
m = 0;
|
3530 |
-
}
|
3531 |
-
j.data(d, m);
|
3532 |
-
});
|
3533 |
-
}
|
3534 |
-
}
|
3535 |
-
function sz_resetMargin(i, o, m) {
|
3536 |
-
if (o.usePadding)
|
3537 |
-
{
|
3538 |
-
var x = (is_boolean(m)) ? m : false;
|
3539 |
-
if (!is_number(m))
|
3540 |
-
{
|
3541 |
-
m = 0;
|
3542 |
-
}
|
3543 |
-
sz_storeMargin(i, o, '_cfs_tempCssMargin');
|
3544 |
-
i.each(function() {
|
3545 |
-
var j = $(this);
|
3546 |
-
j.css(o.d['marginRight'], ((x) ? j.data('_cfs_tempCssMargin') : m + j.data('_cfs_origCssMargin')));
|
3547 |
-
});
|
3548 |
-
}
|
3549 |
-
}
|
3550 |
-
function sz_storeOrigCss(i) {
|
3551 |
-
i.each(function() {
|
3552 |
-
var j = $(this);
|
3553 |
-
j.data('_cfs_origCss', j.attr('style') || '');
|
3554 |
-
});
|
3555 |
-
}
|
3556 |
-
function sz_restoreOrigCss(i) {
|
3557 |
-
i.each(function() {
|
3558 |
-
var j = $(this);
|
3559 |
-
j.attr('style', j.data('_cfs_origCss') || '');
|
3560 |
-
});
|
3561 |
-
}
|
3562 |
-
function sz_setResponsiveSizes(o, all) {
|
3563 |
-
var visb = o.items.visible,
|
3564 |
-
newS = o.items[o.d['width']],
|
3565 |
-
seco = o[o.d['height']],
|
3566 |
-
secp = is_percentage(seco);
|
3567 |
-
|
3568 |
-
all.each(function() {
|
3569 |
-
var $t = $(this),
|
3570 |
-
nw = newS - ms_getPaddingBorderMargin($t, o, 'Width');
|
3571 |
-
|
3572 |
-
$t[o.d['width']](nw);
|
3573 |
-
if (secp)
|
3574 |
-
{
|
3575 |
-
$t[o.d['height']](ms_getPercentage(nw, seco));
|
3576 |
-
}
|
3577 |
-
});
|
3578 |
-
}
|
3579 |
-
function sz_setSizes($c, o) {
|
3580 |
-
var $w = $c.parent(),
|
3581 |
-
$i = $c.children(),
|
3582 |
-
$v = gi_getCurrentItems($i, o),
|
3583 |
-
sz = cf_mapWrapperSizes(ms_getSizes($v, o, true), o, false);
|
3584 |
-
|
3585 |
-
$w.css(sz);
|
3586 |
-
|
3587 |
-
if (o.usePadding)
|
3588 |
-
{
|
3589 |
-
var p = o.padding,
|
3590 |
-
r = p[o.d[1]];
|
3591 |
-
|
3592 |
-
if (o.align && r < 0)
|
3593 |
-
{
|
3594 |
-
r = 0;
|
3595 |
-
}
|
3596 |
-
var $l = $v.last();
|
3597 |
-
$l.css(o.d['marginRight'], $l.data('_cfs_origCssMargin') + r);
|
3598 |
-
$c.css(o.d['top'], p[o.d[0]]);
|
3599 |
-
$c.css(o.d['left'], p[o.d[3]]);
|
3600 |
-
}
|
3601 |
-
|
3602 |
-
$c.css(o.d['width'], sz[o.d['width']]+(ms_getTotalSize($i, o, 'width')*2));
|
3603 |
-
$c.css(o.d['height'], ms_getLargestSize($i, o, 'height'));
|
3604 |
-
return sz;
|
3605 |
-
}
|
3606 |
-
|
3607 |
-
// measuring functions
|
3608 |
-
function ms_getSizes(i, o, wrapper) {
|
3609 |
-
return [ms_getTotalSize(i, o, 'width', wrapper), ms_getLargestSize(i, o, 'height', wrapper)];
|
3610 |
-
}
|
3611 |
-
function ms_getLargestSize(i, o, dim, wrapper) {
|
3612 |
-
if (!is_boolean(wrapper))
|
3613 |
-
{
|
3614 |
-
wrapper = false;
|
3615 |
-
}
|
3616 |
-
if (is_number(o[o.d[dim]]) && wrapper)
|
3617 |
-
{
|
3618 |
-
return o[o.d[dim]];
|
3619 |
-
}
|
3620 |
-
if (is_number(o.items[o.d[dim]]))
|
3621 |
-
{
|
3622 |
-
return o.items[o.d[dim]];
|
3623 |
-
}
|
3624 |
-
dim = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight';
|
3625 |
-
return ms_getTrueLargestSize(i, o, dim);
|
3626 |
-
}
|
3627 |
-
function ms_getTrueLargestSize(i, o, dim) {
|
3628 |
-
var s = 0;
|
3629 |
-
|
3630 |
-
for (var a = 0, l = i.length; a < l; a++)
|
3631 |
-
{
|
3632 |
-
var j = i.eq(a);
|
3633 |
-
|
3634 |
-
var m = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
|
3635 |
-
if (s < m)
|
3636 |
-
{
|
3637 |
-
s = m;
|
3638 |
-
}
|
3639 |
-
}
|
3640 |
-
return s;
|
3641 |
-
}
|
3642 |
-
|
3643 |
-
function ms_getTotalSize(i, o, dim, wrapper) {
|
3644 |
-
if (!is_boolean(wrapper))
|
3645 |
-
{
|
3646 |
-
wrapper = false;
|
3647 |
-
}
|
3648 |
-
if (is_number(o[o.d[dim]]) && wrapper)
|
3649 |
-
{
|
3650 |
-
return o[o.d[dim]];
|
3651 |
-
}
|
3652 |
-
if (is_number(o.items[o.d[dim]]))
|
3653 |
-
{
|
3654 |
-
return o.items[o.d[dim]] * i.length;
|
3655 |
-
}
|
3656 |
-
|
3657 |
-
var d = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight',
|
3658 |
-
s = 0;
|
3659 |
-
|
3660 |
-
for (var a = 0, l = i.length; a < l; a++)
|
3661 |
-
{
|
3662 |
-
var j = i.eq(a);
|
3663 |
-
s += (j.is(':visible')) ? j[o.d[d]](true) : 0;
|
3664 |
-
}
|
3665 |
-
return s;
|
3666 |
-
}
|
3667 |
-
function ms_getParentSize($w, o, d) {
|
3668 |
-
var isVisible = $w.is(':visible');
|
3669 |
-
if (isVisible)
|
3670 |
-
{
|
3671 |
-
$w.hide();
|
3672 |
-
}
|
3673 |
-
var s = $w.parent()[o.d[d]]();
|
3674 |
-
if (isVisible)
|
3675 |
-
{
|
3676 |
-
$w.show();
|
3677 |
-
}
|
3678 |
-
return s;
|
3679 |
-
}
|
3680 |
-
function ms_getMaxDimension(o, a) {
|
3681 |
-
return (is_number(o[o.d['width']])) ? o[o.d['width']] : a;
|
3682 |
-
}
|
3683 |
-
function ms_hasVariableSizes(i, o, dim) {
|
3684 |
-
var s = false,
|
3685 |
-
v = false;
|
3686 |
-
|
3687 |
-
for (var a = 0, l = i.length; a < l; a++)
|
3688 |
-
{
|
3689 |
-
var j = i.eq(a);
|
3690 |
-
|
3691 |
-
var c = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
|
3692 |
-
if (s === false)
|
3693 |
-
{
|
3694 |
-
s = c;
|
3695 |
-
}
|
3696 |
-
else if (s != c)
|
3697 |
-
{
|
3698 |
-
v = true;
|
3699 |
-
}
|
3700 |
-
if (s == 0)
|
3701 |
-
{
|
3702 |
-
v = true;
|
3703 |
-
}
|
3704 |
-
}
|
3705 |
-
return v;
|
3706 |
-
}
|
3707 |
-
function ms_getPaddingBorderMargin(i, o, d) {
|
3708 |
-
return i[o.d['outer'+d]](true) - i[o.d[d.toLowerCase()]]();
|
3709 |
-
}
|
3710 |
-
function ms_getPercentage(s, o) {
|
3711 |
-
if (is_percentage(o))
|
3712 |
-
{
|
3713 |
-
o = parseInt( o.slice(0, -1), 10 );
|
3714 |
-
if (!is_number(o))
|
3715 |
-
{
|
3716 |
-
return s;
|
3717 |
-
}
|
3718 |
-
s *= o/100;
|
3719 |
-
}
|
3720 |
-
return s;
|
3721 |
-
}
|
3722 |
-
|
3723 |
-
// config functions
|
3724 |
-
function cf_e(n, c, pf, ns, rd) {
|
3725 |
-
if (!is_boolean(pf))
|
3726 |
-
{
|
3727 |
-
pf = true;
|
3728 |
-
}
|
3729 |
-
if (!is_boolean(ns))
|
3730 |
-
{
|
3731 |
-
ns = true;
|
3732 |
-
}
|
3733 |
-
if (!is_boolean(rd))
|
3734 |
-
{
|
3735 |
-
rd = false;
|
3736 |
-
}
|
3737 |
-
|
3738 |
-
if (pf)
|
3739 |
-
{
|
3740 |
-
n = c.events.prefix + n;
|
3741 |
-
}
|
3742 |
-
if (ns)
|
3743 |
-
{
|
3744 |
-
n = n +'.'+ c.events.namespace;
|
3745 |
-
}
|
3746 |
-
if (ns && rd)
|
3747 |
-
{
|
3748 |
-
n += c.serialNumber;
|
3749 |
-
}
|
3750 |
-
|
3751 |
-
return n;
|
3752 |
-
}
|
3753 |
-
function cf_c(n, c) {
|
3754 |
-
return (is_string(c.classnames[n])) ? c.classnames[n] : n;
|
3755 |
-
}
|
3756 |
-
function cf_mapWrapperSizes(ws, o, p) {
|
3757 |
-
|
3758 |
-
if (!is_boolean(p))
|
3759 |
-
{
|
3760 |
-
p = true;
|
3761 |
-
}
|
3762 |
-
var pad = (o.usePadding && p) ? o.padding : [0, 0, 0, 0];
|
3763 |
-
var wra = {};
|
3764 |
-
|
3765 |
-
wra[o.d['width']] = ws[0] + pad[1] + pad[3];
|
3766 |
-
wra[o.d['height']] = ws[1] + pad[0] + pad[2];
|
3767 |
-
|
3768 |
-
return wra;
|
3769 |
-
}
|
3770 |
-
function cf_sortParams(vals, typs) {
|
3771 |
-
var arr = [];
|
3772 |
-
for (var a = 0, l1 = vals.length; a < l1; a++)
|
3773 |
-
{
|
3774 |
-
for (var b = 0, l2 = typs.length; b < l2; b++)
|
3775 |
-
{
|
3776 |
-
if (typs[b].indexOf(typeof vals[a]) > -1 && is_undefined(arr[b]))
|
3777 |
-
{
|
3778 |
-
arr[b] = vals[a];
|
3779 |
-
break;
|
3780 |
-
}
|
3781 |
-
}
|
3782 |
-
}
|
3783 |
-
return arr;
|
3784 |
-
}
|
3785 |
-
function cf_getPadding(p) {
|
3786 |
-
if (is_undefined(p))
|
3787 |
-
{
|
3788 |
-
return [0, 0, 0, 0];
|
3789 |
-
}
|
3790 |
-
if (is_number(p))
|
3791 |
-
{
|
3792 |
-
return [p, p, p, p];
|
3793 |
-
}
|
3794 |
-
if (is_string(p))
|
3795 |
-
{
|
3796 |
-
p = p.split('px').join('').split('em').join('').split(' ');
|
3797 |
-
}
|
3798 |
-
|
3799 |
-
if (!is_array(p))
|
3800 |
-
{
|
3801 |
-
return [0, 0, 0, 0];
|
3802 |
-
}
|
3803 |
-
for (var i = 0; i < 4; i++)
|
3804 |
-
{
|
3805 |
-
p[i] = parseInt(p[i], 10);
|
3806 |
-
}
|
3807 |
-
switch (p.length)
|
3808 |
-
{
|
3809 |
-
case 0:
|
3810 |
-
return [0, 0, 0, 0];
|
3811 |
-
case 1:
|
3812 |
-
return [p[0], p[0], p[0], p[0]];
|
3813 |
-
case 2:
|
3814 |
-
return [p[0], p[1], p[0], p[1]];
|
3815 |
-
case 3:
|
3816 |
-
return [p[0], p[1], p[2], p[1]];
|
3817 |
-
default:
|
3818 |
-
return [p[0], p[1], p[2], p[3]];
|
3819 |
-
}
|
3820 |
-
}
|
3821 |
-
function cf_getAlignPadding(itm, o) {
|
3822 |
-
var x = (is_number(o[o.d['width']])) ? Math.ceil(o[o.d['width']] - ms_getTotalSize(itm, o, 'width')) : 0;
|
3823 |
-
switch (o.align)
|
3824 |
-
{
|
3825 |
-
case 'left':
|
3826 |
-
return [0, x];
|
3827 |
-
case 'right':
|
3828 |
-
return [x, 0];
|
3829 |
-
case 'center':
|
3830 |
-
default:
|
3831 |
-
return [Math.ceil(x/2), Math.floor(x/2)];
|
3832 |
-
}
|
3833 |
-
}
|
3834 |
-
function cf_getDimensions(o) {
|
3835 |
-
var dm = [
|
3836 |
-
['width' , 'innerWidth' , 'outerWidth' , 'height' , 'innerHeight' , 'outerHeight' , 'left', 'top' , 'marginRight' , 0, 1, 2, 3],
|
3837 |
-
['height' , 'innerHeight' , 'outerHeight' , 'width' , 'innerWidth' , 'outerWidth' , 'top' , 'left', 'marginBottom', 3, 2, 1, 0]
|
3838 |
-
];
|
3839 |
-
|
3840 |
-
var dl = dm[0].length,
|
3841 |
-
dx = (o.direction == 'right' || o.direction == 'left') ? 0 : 1;
|
3842 |
-
|
3843 |
-
var dimensions = {};
|
3844 |
-
for (var d = 0; d < dl; d++)
|
3845 |
-
{
|
3846 |
-
dimensions[dm[0][d]] = dm[dx][d];
|
3847 |
-
}
|
3848 |
-
return dimensions;
|
3849 |
-
}
|
3850 |
-
function cf_getAdjust(x, o, a, $t) {
|
3851 |
-
var v = x;
|
3852 |
-
if (is_function(a))
|
3853 |
-
{
|
3854 |
-
v = a.call($t, v);
|
3855 |
-
|
3856 |
-
}
|
3857 |
-
else if (is_string(a))
|
3858 |
-
{
|
3859 |
-
var p = a.split('+'),
|
3860 |
-
m = a.split('-');
|
3861 |
-
|
3862 |
-
if (m.length > p.length)
|
3863 |
-
{
|
3864 |
-
var neg = true,
|
3865 |
-
sta = m[0],
|
3866 |
-
adj = m[1];
|
3867 |
-
}
|
3868 |
-
else
|
3869 |
-
{
|
3870 |
-
var neg = false,
|
3871 |
-
sta = p[0],
|
3872 |
-
adj = p[1];
|
3873 |
-
}
|
3874 |
-
|
3875 |
-
switch(sta)
|
3876 |
-
{
|
3877 |
-
case 'even':
|
3878 |
-
v = (x % 2 == 1) ? x-1 : x;
|
3879 |
-
break;
|
3880 |
-
case 'odd':
|
3881 |
-
v = (x % 2 == 0) ? x-1 : x;
|
3882 |
-
break;
|
3883 |
-
default:
|
3884 |
-
v = x;
|
3885 |
-
break;
|
3886 |
-
}
|
3887 |
-
adj = parseInt(adj, 10);
|
3888 |
-
if (is_number(adj))
|
3889 |
-
{
|
3890 |
-
if (neg)
|
3891 |
-
{
|
3892 |
-
adj = -adj;
|
3893 |
-
}
|
3894 |
-
v += adj;
|
3895 |
-
}
|
3896 |
-
}
|
3897 |
-
if (!is_number(v) || v < 1)
|
3898 |
-
{
|
3899 |
-
v = 1;
|
3900 |
-
}
|
3901 |
-
return v;
|
3902 |
-
}
|
3903 |
-
function cf_getItemsAdjust(x, o, a, $t) {
|
3904 |
-
return cf_getItemAdjustMinMax(cf_getAdjust(x, o, a, $t), o.items.visibleConf);
|
3905 |
-
}
|
3906 |
-
function cf_getItemAdjustMinMax(v, i) {
|
3907 |
-
if (is_number(i.min) && v < i.min)
|
3908 |
-
{
|
3909 |
-
v = i.min;
|
3910 |
-
}
|
3911 |
-
if (is_number(i.max) && v > i.max)
|
3912 |
-
{
|
3913 |
-
v = i.max;
|
3914 |
-
}
|
3915 |
-
if (v < 1)
|
3916 |
-
{
|
3917 |
-
v = 1;
|
3918 |
-
}
|
3919 |
-
return v;
|
3920 |
-
}
|
3921 |
-
function cf_getSynchArr(s) {
|
3922 |
-
if (!is_array(s))
|
3923 |
-
{
|
3924 |
-
s = [[s]];
|
3925 |
-
}
|
3926 |
-
if (!is_array(s[0]))
|
3927 |
-
{
|
3928 |
-
s = [s];
|
3929 |
-
}
|
3930 |
-
for (var j = 0, l = s.length; j < l; j++)
|
3931 |
-
{
|
3932 |
-
if (is_string(s[j][0]))
|
3933 |
-
{
|
3934 |
-
s[j][0] = $(s[j][0]);
|
3935 |
-
}
|
3936 |
-
if (!is_boolean(s[j][1]))
|
3937 |
-
{
|
3938 |
-
s[j][1] = true;
|
3939 |
-
}
|
3940 |
-
if (!is_boolean(s[j][2]))
|
3941 |
-
{
|
3942 |
-
s[j][2] = true;
|
3943 |
-
}
|
3944 |
-
if (!is_number(s[j][3]))
|
3945 |
-
{
|
3946 |
-
s[j][3] = 0;
|
3947 |
-
}
|
3948 |
-
}
|
3949 |
-
return s;
|
3950 |
-
}
|
3951 |
-
function cf_getKeyCode(k) {
|
3952 |
-
if (k == 'right')
|
3953 |
-
{
|
3954 |
-
return 39;
|
3955 |
-
}
|
3956 |
-
if (k == 'left')
|
3957 |
-
{
|
3958 |
-
return 37;
|
3959 |
-
}
|
3960 |
-
if (k == 'up')
|
3961 |
-
{
|
3962 |
-
return 38;
|
3963 |
-
}
|
3964 |
-
if (k == 'down')
|
3965 |
-
{
|
3966 |
-
return 40;
|
3967 |
-
}
|
3968 |
-
return -1;
|
3969 |
-
}
|
3970 |
-
function cf_setCookie(n, $c, c) {
|
3971 |
-
if (n)
|
3972 |
-
{
|
3973 |
-
var v = $c.triggerHandler(cf_e('currentPosition', c));
|
3974 |
-
$.fn.carouFredSel.cookie.set(n, v);
|
3975 |
-
}
|
3976 |
-
}
|
3977 |
-
function cf_getCookie(n) {
|
3978 |
-
var c = $.fn.carouFredSel.cookie.get(n);
|
3979 |
-
return (c == '') ? 0 : c;
|
3980 |
-
}
|
3981 |
-
|
3982 |
-
// init function
|
3983 |
-
function in_mapCss($elem, props) {
|
3984 |
-
var css = {};
|
3985 |
-
for (var p = 0, l = props.length; p < l; p++)
|
3986 |
-
{
|
3987 |
-
css[props[p]] = $elem.css(props[p]);
|
3988 |
-
}
|
3989 |
-
return css;
|
3990 |
-
}
|
3991 |
-
function in_complementItems(obj, opt, itm, sta) {
|
3992 |
-
if (!is_object(obj.visibleConf))
|
3993 |
-
{
|
3994 |
-
obj.visibleConf = {};
|
3995 |
-
}
|
3996 |
-
if (!is_object(obj.sizesConf))
|
3997 |
-
{
|
3998 |
-
obj.sizesConf = {};
|
3999 |
-
}
|
4000 |
-
|
4001 |
-
if (obj.start == 0 && is_number(sta))
|
4002 |
-
{
|
4003 |
-
obj.start = sta;
|
4004 |
-
}
|
4005 |
-
|
4006 |
-
// visible items
|
4007 |
-
if (is_object(obj.visible))
|
4008 |
-
{
|
4009 |
-
obj.visibleConf.min = obj.visible.min;
|
4010 |
-
obj.visibleConf.max = obj.visible.max;
|
4011 |
-
obj.visible = false;
|
4012 |
-
}
|
4013 |
-
else if (is_string(obj.visible))
|
4014 |
-
{
|
4015 |
-
// variable visible items
|
4016 |
-
if (obj.visible == 'variable')
|
4017 |
-
{
|
4018 |
-
obj.visibleConf.variable = true;
|
4019 |
-
}
|
4020 |
-
// adjust string visible items
|
4021 |
-
else
|
4022 |
-
{
|
4023 |
-
obj.visibleConf.adjust = obj.visible;
|
4024 |
-
}
|
4025 |
-
obj.visible = false;
|
4026 |
-
}
|
4027 |
-
else if (is_function(obj.visible))
|
4028 |
-
{
|
4029 |
-
obj.visibleConf.adjust = obj.visible;
|
4030 |
-
obj.visible = false;
|
4031 |
-
}
|
4032 |
-
|
4033 |
-
// set items filter
|
4034 |
-
if (!is_string(obj.filter))
|
4035 |
-
{
|
4036 |
-
obj.filter = (itm.filter(':hidden').length > 0) ? ':visible' : '*';
|
4037 |
-
}
|
4038 |
-
|
4039 |
-
// primary item-size not set
|
4040 |
-
if (!obj[opt.d['width']])
|
4041 |
-
{
|
4042 |
-
// responsive carousel -> set to largest
|
4043 |
-
if (opt.responsive)
|
4044 |
-
{
|
4045 |
-
debug(true, 'Set a '+opt.d['width']+' for the items!');
|
4046 |
-
obj[opt.d['width']] = ms_getTrueLargestSize(itm, opt, 'outerWidth');
|
4047 |
-
}
|
4048 |
-
// non-responsive -> measure it or set to "variable"
|
4049 |
-
else
|
4050 |
-
{
|
4051 |
-
obj[opt.d['width']] = (ms_hasVariableSizes(itm, opt, 'outerWidth'))
|
4052 |
-
? 'variable'
|
4053 |
-
: itm[opt.d['outerWidth']](true);
|
4054 |
-
}
|
4055 |
-
}
|
4056 |
-
|
4057 |
-
// secondary item-size not set -> measure it or set to "variable"
|
4058 |
-
if (!obj[opt.d['height']])
|
4059 |
-
{
|
4060 |
-
obj[opt.d['height']] = (ms_hasVariableSizes(itm, opt, 'outerHeight'))
|
4061 |
-
? 'variable'
|
4062 |
-
: itm[opt.d['outerHeight']](true);
|
4063 |
-
}
|
4064 |
-
|
4065 |
-
obj.sizesConf.width = obj.width;
|
4066 |
-
obj.sizesConf.height = obj.height;
|
4067 |
-
return obj;
|
4068 |
-
}
|
4069 |
-
function in_complementVisibleItems(opt, avl) {
|
4070 |
-
// primary item-size variable -> set visible items variable
|
4071 |
-
if (opt.items[opt.d['width']] == 'variable')
|
4072 |
-
{
|
4073 |
-
opt.items.visibleConf.variable = true;
|
4074 |
-
}
|
4075 |
-
if (!opt.items.visibleConf.variable) {
|
4076 |
-
// primary size is number -> calculate visible-items
|
4077 |
-
if (is_number(opt[opt.d['width']]))
|
4078 |
-
{
|
4079 |
-
opt.items.visible = Math.floor(opt[opt.d['width']] / opt.items[opt.d['width']]);
|
4080 |
-
}
|
4081 |
-
// measure and calculate primary size and visible-items
|
4082 |
-
else
|
4083 |
-
{
|
4084 |
-
opt.items.visible = Math.floor(avl / opt.items[opt.d['width']]);
|
4085 |
-
opt[opt.d['width']] = opt.items.visible * opt.items[opt.d['width']];
|
4086 |
-
if (!opt.items.visibleConf.adjust)
|
4087 |
-
{
|
4088 |
-
opt.align = false;
|
4089 |
-
}
|
4090 |
-
}
|
4091 |
-
if (opt.items.visible == 'Infinity' || opt.items.visible < 1)
|
4092 |
-
{
|
4093 |
-
debug(true, 'Not a valid number of visible items: Set to "variable".');
|
4094 |
-
opt.items.visibleConf.variable = true;
|
4095 |
-
}
|
4096 |
-
}
|
4097 |
-
return opt;
|
4098 |
-
}
|
4099 |
-
function in_complementPrimarySize(obj, opt, all) {
|
4100 |
-
// primary size set to auto -> measure largest item-size and set it
|
4101 |
-
if (obj == 'auto')
|
4102 |
-
{
|
4103 |
-
obj = ms_getTrueLargestSize(all, opt, 'outerWidth');
|
4104 |
-
}
|
4105 |
-
return obj;
|
4106 |
-
}
|
4107 |
-
function in_complementSecondarySize(obj, opt, all) {
|
4108 |
-
// secondary size set to auto -> measure largest item-size and set it
|
4109 |
-
if (obj == 'auto')
|
4110 |
-
{
|
4111 |
-
obj = ms_getTrueLargestSize(all, opt, 'outerHeight');
|
4112 |
-
}
|
4113 |
-
// secondary size not set -> set to secondary item-size
|
4114 |
-
if (!obj)
|
4115 |
-
{
|
4116 |
-
obj = opt.items[opt.d['height']];
|
4117 |
-
}
|
4118 |
-
return obj;
|
4119 |
-
}
|
4120 |
-
function in_getAlignPadding(o, all) {
|
4121 |
-
var p = cf_getAlignPadding(gi_getCurrentItems(all, o), o);
|
4122 |
-
o.padding[o.d[1]] = p[1];
|
4123 |
-
o.padding[o.d[3]] = p[0];
|
4124 |
-
return o;
|
4125 |
-
}
|
4126 |
-
function in_getResponsiveValues(o, all, avl) {
|
4127 |
-
|
4128 |
-
var visb = cf_getItemAdjustMinMax(Math.ceil(o[o.d['width']] / o.items[o.d['width']]), o.items.visibleConf);
|
4129 |
-
if (visb > all.length)
|
4130 |
-
{
|
4131 |
-
visb = all.length;
|
4132 |
-
}
|
4133 |
-
|
4134 |
-
var newS = Math.floor(o[o.d['width']]/visb);
|
4135 |
-
|
4136 |
-
o.items.visible = visb;
|
4137 |
-
o.items[o.d['width']] = newS;
|
4138 |
-
o[o.d['width']] = visb * newS;
|
4139 |
-
return o;
|
4140 |
-
}
|
4141 |
-
|
4142 |
-
|
4143 |
-
// buttons functions
|
4144 |
-
function bt_pauseOnHoverConfig(p) {
|
4145 |
-
if (is_string(p))
|
4146 |
-
{
|
4147 |
-
var i = (p.indexOf('immediate') > -1) ? true : false,
|
4148 |
-
r = (p.indexOf('resume') > -1) ? true : false;
|
4149 |
-
}
|
4150 |
-
else
|
4151 |
-
{
|
4152 |
-
var i = r = false;
|
4153 |
-
}
|
4154 |
-
return [i, r];
|
4155 |
-
}
|
4156 |
-
function bt_mousesheelNumber(mw) {
|
4157 |
-
return (is_number(mw)) ? mw : null
|
4158 |
-
}
|
4159 |
-
|
4160 |
-
// helper functions
|
4161 |
-
function is_null(a) {
|
4162 |
-
return (a === null);
|
4163 |
-
}
|
4164 |
-
function is_undefined(a) {
|
4165 |
-
return (is_null(a) || typeof a == 'undefined' || a === '' || a === 'undefined');
|
4166 |
-
}
|
4167 |
-
function is_array(a) {
|
4168 |
-
return (a instanceof Array);
|
4169 |
-
}
|
4170 |
-
function is_jquery(a) {
|
4171 |
-
return (a instanceof jQuery);
|
4172 |
-
}
|
4173 |
-
function is_object(a) {
|
4174 |
-
return ((a instanceof Object || typeof a == 'object') && !is_null(a) && !is_jquery(a) && !is_array(a) && !is_function(a));
|
4175 |
-
}
|
4176 |
-
function is_number(a) {
|
4177 |
-
return ((a instanceof Number || typeof a == 'number') && !isNaN(a));
|
4178 |
-
}
|
4179 |
-
function is_string(a) {
|
4180 |
-
return ((a instanceof String || typeof a == 'string') && !is_undefined(a) && !is_true(a) && !is_false(a));
|
4181 |
-
}
|
4182 |
-
function is_function(a) {
|
4183 |
-
return (a instanceof Function || typeof a == 'function');
|
4184 |
-
}
|
4185 |
-
function is_boolean(a) {
|
4186 |
-
return (a instanceof Boolean || typeof a == 'boolean' || is_true(a) || is_false(a));
|
4187 |
-
}
|
4188 |
-
function is_true(a) {
|
4189 |
-
return (a === true || a === 'true');
|
4190 |
-
}
|
4191 |
-
function is_false(a) {
|
4192 |
-
return (a === false || a === 'false');
|
4193 |
-
}
|
4194 |
-
function is_percentage(x) {
|
4195 |
-
return (is_string(x) && x.slice(-1) == '%');
|
4196 |
-
}
|
4197 |
-
|
4198 |
-
|
4199 |
-
function getTime() {
|
4200 |
-
return new Date().getTime();
|
4201 |
-
}
|
4202 |
-
|
4203 |
-
function deprecated( o, n ) {
|
4204 |
-
debug(true, o+' is DEPRECATED, support for it will be removed. Use '+n+' instead.');
|
4205 |
-
}
|
4206 |
-
function debug(d, m) {
|
4207 |
-
if (!is_undefined(window.console) && !is_undefined(window.console.log))
|
4208 |
-
{
|
4209 |
-
if (is_object(d))
|
4210 |
-
{
|
4211 |
-
var s = ' ('+d.selector+')';
|
4212 |
-
d = d.debug;
|
4213 |
-
}
|
4214 |
-
else
|
4215 |
-
{
|
4216 |
-
var s = '';
|
4217 |
-
}
|
4218 |
-
if (!d)
|
4219 |
-
{
|
4220 |
-
return false;
|
4221 |
-
}
|
4222 |
-
|
4223 |
-
if (is_string(m))
|
4224 |
-
{
|
4225 |
-
m = 'carouFredSel'+s+': ' + m;
|
4226 |
-
}
|
4227 |
-
else
|
4228 |
-
{
|
4229 |
-
m = ['carouFredSel'+s+':', m];
|
4230 |
-
}
|
4231 |
-
window.console.log(m);
|
4232 |
-
}
|
4233 |
-
return false;
|
4234 |
-
}
|
4235 |
-
|
4236 |
-
|
4237 |
-
|
4238 |
-
// EASING FUNCTIONS
|
4239 |
-
$.extend($.easing, {
|
4240 |
-
'quadratic': function(t) {
|
4241 |
-
var t2 = t * t;
|
4242 |
-
return t * (-t2 * t + 4 * t2 - 6 * t + 4);
|
4243 |
-
},
|
4244 |
-
'cubic': function(t) {
|
4245 |
-
return t * (4 * t * t - 9 * t + 6);
|
4246 |
-
},
|
4247 |
-
'elastic': function(t) {
|
4248 |
-
var t2 = t * t;
|
4249 |
-
return t * (33 * t2 * t2 - 106 * t2 * t + 126 * t2 - 67 * t + 15);
|
4250 |
-
}
|
4251 |
-
});
|
4252 |
-
|
4253 |
-
|
4254 |
})(jQuery);
|
1 |
+
/*
|
2 |
+
* jQuery carouFredSel 6.2.1
|
3 |
+
* Demo's and documentation:
|
4 |
+
* caroufredsel.dev7studios.com
|
5 |
+
*
|
6 |
+
* Copyright (c) 2013 Fred Heusschen
|
7 |
+
* www.frebsite.nl
|
8 |
+
*
|
9 |
+
* Dual licensed under the MIT and GPL licenses.
|
10 |
+
* http://en.wikipedia.org/wiki/MIT_License
|
11 |
+
* http://en.wikipedia.org/wiki/GNU_General_Public_License
|
12 |
+
*/
|
13 |
+
|
14 |
+
|
15 |
+
(function($) {
|
16 |
+
|
17 |
+
|
18 |
+
// LOCAL
|
19 |
+
|
20 |
+
if ( $.fn.carouFredSel )
|
21 |
+
{
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
$.fn.caroufredsel = $.fn.carouFredSel = function(options, configs)
|
26 |
+
{
|
27 |
+
|
28 |
+
// no element
|
29 |
+
if (this.length == 0)
|
30 |
+
{
|
31 |
+
debug( true, 'No element found for "' + this.selector + '".' );
|
32 |
+
return this;
|
33 |
+
}
|
34 |
+
|
35 |
+
// multiple elements
|
36 |
+
if (this.length > 1)
|
37 |
+
{
|
38 |
+
return this.each(function() {
|
39 |
+
$(this).carouFredSel(options, configs);
|
40 |
+
});
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
var $cfs = this,
|
45 |
+
$tt0 = this[0],
|
46 |
+
starting_position = false;
|
47 |
+
|
48 |
+
if ($cfs.data('_cfs_isCarousel'))
|
49 |
+
{
|
50 |
+
starting_position = $cfs.triggerHandler('_cfs_triggerEvent', 'currentPosition');
|
51 |
+
$cfs.trigger('_cfs_triggerEvent', ['destroy', true]);
|
52 |
+
}
|
53 |
+
|
54 |
+
var FN = {};
|
55 |
+
|
56 |
+
FN._init = function(o, setOrig, start)
|
57 |
+
{
|
58 |
+
o = go_getObject($tt0, o);
|
59 |
+
|
60 |
+
o.items = go_getItemsObject($tt0, o.items);
|
61 |
+
o.scroll = go_getScrollObject($tt0, o.scroll);
|
62 |
+
o.auto = go_getAutoObject($tt0, o.auto);
|
63 |
+
o.prev = go_getPrevNextObject($tt0, o.prev);
|
64 |
+
o.next = go_getPrevNextObject($tt0, o.next);
|
65 |
+
o.pagination = go_getPaginationObject($tt0, o.pagination);
|
66 |
+
o.swipe = go_getSwipeObject($tt0, o.swipe);
|
67 |
+
o.mousewheel = go_getMousewheelObject($tt0, o.mousewheel);
|
68 |
+
|
69 |
+
if (setOrig)
|
70 |
+
{
|
71 |
+
opts_orig = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
|
72 |
+
}
|
73 |
+
|
74 |
+
opts = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
|
75 |
+
opts.d = cf_getDimensions(opts);
|
76 |
+
|
77 |
+
crsl.direction = (opts.direction == 'up' || opts.direction == 'left') ? 'next' : 'prev';
|
78 |
+
|
79 |
+
var a_itm = $cfs.children(),
|
80 |
+
avail_primary = ms_getParentSize($wrp, opts, 'width');
|
81 |
+
|
82 |
+
if (is_true(opts.cookie))
|
83 |
+
{
|
84 |
+
opts.cookie = 'caroufredsel_cookie_' + conf.serialNumber;
|
85 |
+
}
|
86 |
+
|
87 |
+
opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
|
88 |
+
|
89 |
+
// complement items and sizes
|
90 |
+
opts.items = in_complementItems(opts.items, opts, a_itm, start);
|
91 |
+
opts[opts.d['width']] = in_complementPrimarySize(opts[opts.d['width']], opts, a_itm);
|
92 |
+
opts[opts.d['height']] = in_complementSecondarySize(opts[opts.d['height']], opts, a_itm);
|
93 |
+
|
94 |
+
// primary size not set for a responsive carousel
|
95 |
+
if (opts.responsive)
|
96 |
+
{
|
97 |
+
if (!is_percentage(opts[opts.d['width']]))
|
98 |
+
{
|
99 |
+
opts[opts.d['width']] = '100%';
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
// primary size is percentage
|
104 |
+
if (is_percentage(opts[opts.d['width']]))
|
105 |
+
{
|
106 |
+
crsl.upDateOnWindowResize = true;
|
107 |
+
crsl.primarySizePercentage = opts[opts.d['width']];
|
108 |
+
opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
|
109 |
+
if (!opts.items.visible)
|
110 |
+
{
|
111 |
+
opts.items.visibleConf.variable = true;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
if (opts.responsive)
|
116 |
+
{
|
117 |
+
opts.usePadding = false;
|
118 |
+
opts.padding = [0, 0, 0, 0];
|
119 |
+
opts.align = false;
|
120 |
+
opts.items.visibleConf.variable = false;
|
121 |
+
}
|
122 |
+
else
|
123 |
+
{
|
124 |
+
// visible-items not set
|
125 |
+
if (!opts.items.visible)
|
126 |
+
{
|
127 |
+
opts = in_complementVisibleItems(opts, avail_primary);
|
128 |
+
}
|
129 |
+
|
130 |
+
// primary size not set -> calculate it or set to "variable"
|
131 |
+
if (!opts[opts.d['width']])
|
132 |
+
{
|
133 |
+
if (!opts.items.visibleConf.variable && is_number(opts.items[opts.d['width']]) && opts.items.filter == '*')
|
134 |
+
{
|
135 |
+
opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']];
|
136 |
+
opts.align = false;
|
137 |
+
}
|
138 |
+
else
|
139 |
+
{
|
140 |
+
opts[opts.d['width']] = 'variable';
|
141 |
+
}
|
142 |
+
}
|
143 |
+
// align not set -> set to center if primary size is number
|
144 |
+
if (is_undefined(opts.align))
|
145 |
+
{
|
146 |
+
opts.align = (is_number(opts[opts.d['width']]))
|
147 |
+
? 'center'
|
148 |
+
: false;
|
149 |
+
}
|
150 |
+
// set variabe visible-items
|
151 |
+
if (opts.items.visibleConf.variable)
|
152 |
+
{
|
153 |
+
opts.items.visible = gn_getVisibleItemsNext(a_itm, opts, 0);
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
// set visible items by filter
|
158 |
+
if (opts.items.filter != '*' && !opts.items.visibleConf.variable)
|
159 |
+
{
|
160 |
+
opts.items.visibleConf.org = opts.items.visible;
|
161 |
+
opts.items.visible = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
|
162 |
+
}
|
163 |
+
|
164 |
+
opts.items.visible = cf_getItemsAdjust(opts.items.visible, opts, opts.items.visibleConf.adjust, $tt0);
|
165 |
+
opts.items.visibleConf.old = opts.items.visible;
|
166 |
+
|
167 |
+
if (opts.responsive)
|
168 |
+
{
|
169 |
+
if (!opts.items.visibleConf.min)
|
170 |
+
{
|
171 |
+
opts.items.visibleConf.min = opts.items.visible;
|
172 |
+
}
|
173 |
+
if (!opts.items.visibleConf.max)
|
174 |
+
{
|
175 |
+
opts.items.visibleConf.max = opts.items.visible;
|
176 |
+
}
|
177 |
+
opts = in_getResponsiveValues(opts, a_itm, avail_primary);
|
178 |
+
}
|
179 |
+
else
|
180 |
+
{
|
181 |
+
opts.padding = cf_getPadding(opts.padding);
|
182 |
+
|
183 |
+
if (opts.align == 'top')
|
184 |
+
{
|
185 |
+
opts.align = 'left';
|
186 |
+
}
|
187 |
+
else if (opts.align == 'bottom')
|
188 |
+
{
|
189 |
+
opts.align = 'right';
|
190 |
+
}
|
191 |
+
|
192 |
+
switch (opts.align)
|
193 |
+
{
|
194 |
+
// align: center, left or right
|
195 |
+
case 'center':
|
196 |
+
case 'left':
|
197 |
+
case 'right':
|
198 |
+
if (opts[opts.d['width']] != 'variable')
|
199 |
+
{
|
200 |
+
opts = in_getAlignPadding(opts, a_itm);
|
201 |
+
opts.usePadding = true;
|
202 |
+
}
|
203 |
+
break;
|
204 |
+
|
205 |
+
// padding
|
206 |
+
default:
|
207 |
+
opts.align = false;
|
208 |
+
opts.usePadding = (
|
209 |
+
opts.padding[0] == 0 &&
|
210 |
+
opts.padding[1] == 0 &&
|
211 |
+
opts.padding[2] == 0 &&
|
212 |
+
opts.padding[3] == 0
|
213 |
+
) ? false : true;
|
214 |
+
break;
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
if (!is_number(opts.scroll.duration))
|
219 |
+
{
|
220 |
+
opts.scroll.duration = 500;
|
221 |
+
}
|
222 |
+
if (is_undefined(opts.scroll.items))
|
223 |
+
{
|
224 |
+
opts.scroll.items = (opts.responsive || opts.items.visibleConf.variable || opts.items.filter != '*')
|
225 |
+
? 'visible'
|
226 |
+
: opts.items.visible;
|
227 |
+
}
|
228 |
+
|
229 |
+
opts.auto = $.extend(true, {}, opts.scroll, opts.auto);
|
230 |
+
opts.prev = $.extend(true, {}, opts.scroll, opts.prev);
|
231 |
+
opts.next = $.extend(true, {}, opts.scroll, opts.next);
|
232 |
+
opts.pagination = $.extend(true, {}, opts.scroll, opts.pagination);
|
233 |
+
// swipe and mousewheel extend later on, per direction
|
234 |
+
|
235 |
+
opts.auto = go_complementAutoObject($tt0, opts.auto);
|
236 |
+
opts.prev = go_complementPrevNextObject($tt0, opts.prev);
|
237 |
+
opts.next = go_complementPrevNextObject($tt0, opts.next);
|
238 |
+
opts.pagination = go_complementPaginationObject($tt0, opts.pagination);
|
239 |
+
opts.swipe = go_complementSwipeObject($tt0, opts.swipe);
|
240 |
+
opts.mousewheel = go_complementMousewheelObject($tt0, opts.mousewheel);
|
241 |
+
|
242 |
+
if (opts.synchronise)
|
243 |
+
{
|
244 |
+
opts.synchronise = cf_getSynchArr(opts.synchronise);
|
245 |
+
}
|
246 |
+
|
247 |
+
|
248 |
+
// DEPRECATED
|
249 |
+
if (opts.auto.onPauseStart)
|
250 |
+
{
|
251 |
+
opts.auto.onTimeoutStart = opts.auto.onPauseStart;
|
252 |
+
deprecated('auto.onPauseStart', 'auto.onTimeoutStart');
|
253 |
+
}
|
254 |
+
if (opts.auto.onPausePause)
|
255 |
+
{
|
256 |
+
opts.auto.onTimeoutPause = opts.auto.onPausePause;
|
257 |
+
deprecated('auto.onPausePause', 'auto.onTimeoutPause');
|
258 |
+
}
|
259 |
+
if (opts.auto.onPauseEnd)
|
260 |
+
{
|
261 |
+
opts.auto.onTimeoutEnd = opts.auto.onPauseEnd;
|
262 |
+
deprecated('auto.onPauseEnd', 'auto.onTimeoutEnd');
|
263 |
+
}
|
264 |
+
if (opts.auto.pauseDuration)
|
265 |
+
{
|
266 |
+
opts.auto.timeoutDuration = opts.auto.pauseDuration;
|
267 |
+
deprecated('auto.pauseDuration', 'auto.timeoutDuration');
|
268 |
+
}
|
269 |
+
// /DEPRECATED
|
270 |
+
|
271 |
+
|
272 |
+
}; // /init
|
273 |
+
|
274 |
+
|
275 |
+
FN._build = function() {
|
276 |
+
$cfs.data('_cfs_isCarousel', true);
|
277 |
+
|
278 |
+
var a_itm = $cfs.children(),
|
279 |
+
orgCSS = in_mapCss($cfs, ['textAlign', 'float', 'position', 'top', 'right', 'bottom', 'left', 'zIndex', 'width', 'height', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft']),
|
280 |
+
newPosition = 'relative';
|
281 |
+
|
282 |
+
switch (orgCSS.position)
|
283 |
+
{
|
284 |
+
case 'absolute':
|
285 |
+
case 'fixed':
|
286 |
+
newPosition = orgCSS.position;
|
287 |
+
break;
|
288 |
+
}
|
289 |
+
|
290 |
+
if (conf.wrapper == 'parent')
|
291 |
+
{
|
292 |
+
sz_storeOrigCss($wrp);
|
293 |
+
}
|
294 |
+
else
|
295 |
+
{
|
296 |
+
$wrp.css(orgCSS);
|
297 |
+
}
|
298 |
+
$wrp.css({
|
299 |
+
'overflow' : 'hidden',
|
300 |
+
'position' : newPosition
|
301 |
+
});
|
302 |
+
|
303 |
+
sz_storeOrigCss($cfs);
|
304 |
+
$cfs.data('_cfs_origCssZindex', orgCSS.zIndex);
|
305 |
+
$cfs.css({
|
306 |
+
'textAlign' : 'left',
|
307 |
+
'float' : 'none',
|
308 |
+
'position' : 'absolute',
|
309 |
+
'top' : 0,
|
310 |
+
'right' : 'auto',
|
311 |
+
'bottom' : 'auto',
|
312 |
+
'left' : 0,
|
313 |
+
'marginTop' : 0,
|
314 |
+
'marginRight' : 0,
|
315 |
+
'marginBottom' : 0,
|
316 |
+
'marginLeft' : 0
|
317 |
+
});
|
318 |
+
|
319 |
+
sz_storeMargin(a_itm, opts);
|
320 |
+
sz_storeOrigCss(a_itm);
|
321 |
+
if (opts.responsive)
|
322 |
+
{
|
323 |
+
sz_setResponsiveSizes(opts, a_itm);
|
324 |
+
}
|
325 |
+
|
326 |
+
}; // /build
|
327 |
+
|
328 |
+
|
329 |
+
FN._bind_events = function() {
|
330 |
+
FN._unbind_events();
|
331 |
+
|
332 |
+
|
333 |
+
// stop event
|
334 |
+
$cfs.bind(cf_e('stop', conf), function(e, imm) {
|
335 |
+
e.stopPropagation();
|
336 |
+
|
337 |
+
// button
|
338 |
+
if (!crsl.isStopped)
|
339 |
+
{
|
340 |
+
if (opts.auto.button)
|
341 |
+
{
|
342 |
+
opts.auto.button.addClass(cf_c('stopped', conf));
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
// set stopped
|
347 |
+
crsl.isStopped = true;
|
348 |
+
|
349 |
+
if (opts.auto.play)
|
350 |
+
{
|
351 |
+
opts.auto.play = false;
|
352 |
+
$cfs.trigger(cf_e('pause', conf), imm);
|
353 |
+
}
|
354 |
+
return true;
|
355 |
+
});
|
356 |
+
|
357 |
+
|
358 |
+
// finish event
|
359 |
+
$cfs.bind(cf_e('finish', conf), function(e) {
|
360 |
+
e.stopPropagation();
|
361 |
+
if (crsl.isScrolling)
|
362 |
+
{
|
363 |
+
sc_stopScroll(scrl);
|
364 |
+
}
|
365 |
+
return true;
|
366 |
+
});
|
367 |
+
|
368 |
+
|
369 |
+
// pause event
|
370 |
+
$cfs.bind(cf_e('pause', conf), function(e, imm, res) {
|
371 |
+
e.stopPropagation();
|
372 |
+
tmrs = sc_clearTimers(tmrs);
|
373 |
+
|
374 |
+
// immediately pause
|
375 |
+
if (imm && crsl.isScrolling)
|
376 |
+
{
|
377 |
+
scrl.isStopped = true;
|
378 |
+
var nst = getTime() - scrl.startTime;
|
379 |
+
scrl.duration -= nst;
|
380 |
+
if (scrl.pre)
|
381 |
+
{
|
382 |
+
scrl.pre.duration -= nst;
|
383 |
+
}
|
384 |
+
if (scrl.post)
|
385 |
+
{
|
386 |
+
scrl.post.duration -= nst;
|
387 |
+
}
|
388 |
+
sc_stopScroll(scrl, false);
|
389 |
+
}
|
390 |
+
|
391 |
+
// update remaining pause-time
|
392 |
+
if (!crsl.isPaused && !crsl.isScrolling)
|
393 |
+
{
|
394 |
+
if (res)
|
395 |
+
{
|
396 |
+
tmrs.timePassed += getTime() - tmrs.startTime;
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
// button
|
401 |
+
if (!crsl.isPaused)
|
402 |
+
{
|
403 |
+
if (opts.auto.button)
|
404 |
+
{
|
405 |
+
opts.auto.button.addClass(cf_c('paused', conf));
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
// set paused
|
410 |
+
crsl.isPaused = true;
|
411 |
+
|
412 |
+
// pause pause callback
|
413 |
+
if (opts.auto.onTimeoutPause)
|
414 |
+
{
|
415 |
+
var dur1 = opts.auto.timeoutDuration - tmrs.timePassed,
|
416 |
+
perc = 100 - Math.ceil( dur1 * 100 / opts.auto.timeoutDuration );
|
417 |
+
|
418 |
+
opts.auto.onTimeoutPause.call($tt0, perc, dur1);
|
419 |
+
}
|
420 |
+
return true;
|
421 |
+
});
|
422 |
+
|
423 |
+
|
424 |
+
// play event
|
425 |
+
$cfs.bind(cf_e('play', conf), function(e, dir, del, res) {
|
426 |
+
e.stopPropagation();
|
427 |
+
tmrs = sc_clearTimers(tmrs);
|
428 |
+
|
429 |
+
// sort params
|
430 |
+
var v = [dir, del, res],
|
431 |
+
t = ['string', 'number', 'boolean'],
|
432 |
+
a = cf_sortParams(v, t);
|
433 |
+
|
434 |
+
dir = a[0];
|
435 |
+
del = a[1];
|
436 |
+
res = a[2];
|
437 |
+
|
438 |
+
if (dir != 'prev' && dir != 'next')
|
439 |
+
{
|
440 |
+
dir = crsl.direction;
|
441 |
+
}
|
442 |
+
if (!is_number(del))
|
443 |
+
{
|
444 |
+
del = 0;
|
445 |
+
}
|
446 |
+
if (!is_boolean(res))
|
447 |
+
{
|
448 |
+
res = false;
|
449 |
+
}
|
450 |
+
|
451 |
+
// stopped?
|
452 |
+
if (res)
|
453 |
+
{
|
454 |
+
crsl.isStopped = false;
|
455 |
+
opts.auto.play = true;
|
456 |
+
}
|
457 |
+
if (!opts.auto.play)
|
458 |
+
{
|
459 |
+
e.stopImmediatePropagation();
|
460 |
+
return debug(conf, 'Carousel stopped: Not scrolling.');
|
461 |
+
}
|
462 |
+
|
463 |
+
// button
|
464 |
+
if (crsl.isPaused)
|
465 |
+
{
|
466 |
+
if (opts.auto.button)
|
467 |
+
{
|
468 |
+
opts.auto.button.removeClass(cf_c('stopped', conf));
|
469 |
+
opts.auto.button.removeClass(cf_c('paused', conf));
|
470 |
+
}
|
471 |
+
}
|
472 |
+
|
473 |
+
// set playing
|
474 |
+
crsl.isPaused = false;
|
475 |
+
tmrs.startTime = getTime();
|
476 |
+
|
477 |
+
// timeout the scrolling
|
478 |
+
var dur1 = opts.auto.timeoutDuration + del;
|
479 |
+
dur2 = dur1 - tmrs.timePassed;
|
480 |
+
perc = 100 - Math.ceil(dur2 * 100 / dur1);
|
481 |
+
|
482 |
+
if (opts.auto.progress)
|
483 |
+
{
|
484 |
+
tmrs.progress = setInterval(function() {
|
485 |
+
var pasd = getTime() - tmrs.startTime + tmrs.timePassed,
|
486 |
+
perc = Math.ceil(pasd * 100 / dur1);
|
487 |
+
opts.auto.progress.updater.call(opts.auto.progress.bar[0], perc);
|
488 |
+
}, opts.auto.progress.interval);
|
489 |
+
}
|
490 |
+
|
491 |
+
tmrs.auto = setTimeout(function() {
|
492 |
+
if (opts.auto.progress)
|
493 |
+
{
|
494 |
+
opts.auto.progress.updater.call(opts.auto.progress.bar[0], 100);
|
495 |
+
}
|
496 |
+
if (opts.auto.onTimeoutEnd)
|
497 |
+
{
|
498 |
+
opts.auto.onTimeoutEnd.call($tt0, perc, dur2);
|
499 |
+
}
|
500 |
+
if (crsl.isScrolling)
|
501 |
+
{
|
502 |
+
$cfs.trigger(cf_e('play', conf), dir);
|
503 |
+
}
|
504 |
+
else
|
505 |
+
{
|
506 |
+
$cfs.trigger(cf_e(dir, conf), opts.auto);
|
507 |
+
}
|
508 |
+
}, dur2);
|
509 |
+
|
510 |
+
// pause start callback
|
511 |
+
if (opts.auto.onTimeoutStart)
|
512 |
+
{
|
513 |
+
opts.auto.onTimeoutStart.call($tt0, perc, dur2);
|
514 |
+
}
|
515 |
+
|
516 |
+
return true;
|
517 |
+
});
|
518 |
+
|
519 |
+
|
520 |
+
// resume event
|
521 |
+
$cfs.bind(cf_e('resume', conf), function(e) {
|
522 |
+
e.stopPropagation();
|
523 |
+
if (scrl.isStopped)
|
524 |
+
{
|
525 |
+
scrl.isStopped = false;
|
526 |
+
crsl.isPaused = false;
|
527 |
+
crsl.isScrolling = true;
|
528 |
+
scrl.startTime = getTime();
|
529 |
+
sc_startScroll(scrl, conf);
|
530 |
+
}
|
531 |
+
else
|
532 |
+
{
|
533 |
+
$cfs.trigger(cf_e('play', conf));
|
534 |
+
}
|
535 |
+
return true;
|
536 |
+
});
|
537 |
+
|
538 |
+
|
539 |
+
// prev + next events
|
540 |
+
$cfs.bind(cf_e('prev', conf)+' '+cf_e('next', conf), function(e, obj, num, clb, que) {
|
541 |
+
e.stopPropagation();
|
542 |
+
|
543 |
+
// stopped or hidden carousel, don't scroll, don't queue
|
544 |
+
if (crsl.isStopped || $cfs.is(':hidden'))
|
545 |
+
{
|
546 |
+
e.stopImmediatePropagation();
|
547 |
+
return debug(conf, 'Carousel stopped or hidden: Not scrolling.');
|
548 |
+
}
|
549 |
+
|
550 |
+
// not enough items
|
551 |
+
var minimum = (is_number(opts.items.minimum)) ? opts.items.minimum : opts.items.visible + 1;
|
552 |
+
if (minimum > itms.total)
|
553 |
+
{
|
554 |
+
e.stopImmediatePropagation();
|
555 |
+
return debug(conf, 'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.');
|
556 |
+
}
|
557 |
+
|
558 |
+
// get config
|
559 |
+
var v = [obj, num, clb, que],
|
560 |
+
t = ['object', 'number/string', 'function', 'boolean'],
|
561 |
+
a = cf_sortParams(v, t);
|
562 |
+
|
563 |
+
obj = a[0];
|
564 |
+
num = a[1];
|
565 |
+
clb = a[2];
|
566 |
+
que = a[3];
|
567 |
+
|
568 |
+
var eType = e.type.slice(conf.events.prefix.length);
|
569 |
+
|
570 |
+
if (!is_object(obj))
|
571 |
+
{
|
572 |
+
obj = {};
|
573 |
+
}
|
574 |
+
if (is_function(clb))
|
575 |
+
{
|
576 |
+
obj.onAfter = clb;
|
577 |
+
}
|
578 |
+
if (is_boolean(que))
|
579 |
+
{
|
580 |
+
obj.queue = que;
|
581 |
+
}
|
582 |
+
obj = $.extend(true, {}, opts[eType], obj);
|
583 |
+
|
584 |
+
// test conditions callback
|
585 |
+
if (obj.conditions && !obj.conditions.call($tt0, eType))
|
586 |
+
{
|
587 |
+
e.stopImmediatePropagation();
|
588 |
+
return debug(conf, 'Callback "conditions" returned false.');
|
589 |
+
}
|
590 |
+
|
591 |
+
if (!is_number(num))
|
592 |
+
{
|
593 |
+
if (opts.items.filter != '*')
|
594 |
+
{
|
595 |
+
num = 'visible';
|
596 |
+
}
|
597 |
+
else
|
598 |
+
{
|
599 |
+
var arr = [num, obj.items, opts[eType].items];
|
600 |
+
for (var a = 0, l = arr.length; a < l; a++)
|
601 |
+
{
|
602 |
+
if (is_number(arr[a]) || arr[a] == 'page' || arr[a] == 'visible') {
|
603 |
+
num = arr[a];
|
604 |
+
break;
|
605 |
+
}
|
606 |
+
}
|
607 |
+
}
|
608 |
+
switch(num) {
|
609 |
+
case 'page':
|
610 |
+
e.stopImmediatePropagation();
|
611 |
+
return $cfs.triggerHandler(cf_e(eType+'Page', conf), [obj, clb]);
|
612 |
+
break;
|
613 |
+
|
614 |
+
case 'visible':
|
615 |
+
if (!opts.items.visibleConf.variable && opts.items.filter == '*')
|
616 |
+
{
|
617 |
+
num = opts.items.visible;
|
618 |
+
}
|
619 |
+
break;
|
620 |
+
}
|
621 |
+
}
|
622 |
+
|
623 |
+
// resume animation, add current to queue
|
624 |
+
if (scrl.isStopped)
|
625 |
+
{
|
626 |
+
$cfs.trigger(cf_e('resume', conf));
|
627 |
+
$cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
|
628 |
+
e.stopImmediatePropagation();
|
629 |
+
return debug(conf, 'Carousel resumed scrolling.');
|
630 |
+
}
|
631 |
+
|
632 |
+
// queue if scrolling
|
633 |
+
if (obj.duration > 0)
|
634 |
+
{
|
635 |
+
if (crsl.isScrolling)
|
636 |
+
{
|
637 |
+
if (obj.queue)
|
638 |
+
{
|
639 |
+
if (obj.queue == 'last')
|
640 |
+
{
|
641 |
+
queu = [];
|
642 |
+
}
|
643 |
+
if (obj.queue != 'first' || queu.length == 0)
|
644 |
+
{
|
645 |
+
$cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
|
646 |
+
}
|
647 |
+
}
|
648 |
+
e.stopImmediatePropagation();
|
649 |
+
return debug(conf, 'Carousel currently scrolling.');
|
650 |
+
}
|
651 |
+
}
|
652 |
+
|
653 |
+
tmrs.timePassed = 0;
|
654 |
+
$cfs.trigger(cf_e('slide_'+eType, conf), [obj, num]);
|
655 |
+
|
656 |
+
// synchronise
|
657 |
+
if (opts.synchronise)
|
658 |
+
{
|
659 |
+
var s = opts.synchronise,
|
660 |
+
c = [obj, num];
|
661 |
+
|
662 |
+
for (var j = 0, l = s.length; j < l; j++) {
|
663 |
+
var d = eType;
|
664 |
+
if (!s[j][2])
|
665 |
+
{
|
666 |
+
d = (d == 'prev') ? 'next' : 'prev';
|
667 |
+
}
|
668 |
+
if (!s[j][1])
|
669 |
+
{
|
670 |
+
c[0] = s[j][0].triggerHandler('_cfs_triggerEvent', ['configuration', d]);
|
671 |
+
}
|
672 |
+
c[1] = num + s[j][3];
|
673 |
+
s[j][0].trigger('_cfs_triggerEvent', ['slide_'+d, c]);
|
674 |
+
}
|
675 |
+
}
|
676 |
+
return true;
|
677 |
+
});
|
678 |
+
|
679 |
+
|
680 |
+
// prev event
|
681 |
+
$cfs.bind(cf_e('slide_prev', conf), function(e, sO, nI) {
|
682 |
+
e.stopPropagation();
|
683 |
+
var a_itm = $cfs.children();
|
684 |
+
|
685 |
+
// non-circular at start, scroll to end
|
686 |
+
if (!opts.circular)
|
687 |
+
{
|
688 |
+
if (itms.first == 0)
|
689 |
+
{
|
690 |
+
if (opts.infinite)
|
691 |
+
{
|
692 |
+
$cfs.trigger(cf_e('next', conf), itms.total-1);
|
693 |
+
}
|
694 |
+
return e.stopImmediatePropagation();
|
695 |
+
}
|
696 |
+
}
|
697 |
+
|
698 |
+
sz_resetMargin(a_itm, opts);
|
699 |
+
|
700 |
+
// find number of items to scroll
|
701 |
+
if (!is_number(nI))
|
702 |
+
{
|
703 |
+
if (opts.items.visibleConf.variable)
|
704 |
+
{
|
705 |
+
nI = gn_getVisibleItemsPrev(a_itm, opts, itms.total-1);
|
706 |
+
}
|
707 |
+
else if (opts.items.filter != '*')
|
708 |
+
{
|
709 |
+
var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
|
710 |
+
nI = gn_getScrollItemsPrevFilter(a_itm, opts, itms.total-1, xI);
|
711 |
+
}
|
712 |
+
else
|
713 |
+
{
|
714 |
+
nI = opts.items.visible;
|
715 |
+
}
|
716 |
+
nI = cf_getAdjust(nI, opts, sO.items, $tt0);
|
717 |
+
}
|
718 |
+
|
719 |
+
// prevent non-circular from scrolling to far
|
720 |
+
if (!opts.circular)
|
721 |
+
{
|
722 |
+
if (itms.total - nI < itms.first)
|
723 |
+
{
|
724 |
+
nI = itms.total - itms.first;
|
725 |
+
}
|
726 |
+
}
|
727 |
+
|
728 |
+
// set new number of visible items
|
729 |
+
opts.items.visibleConf.old = opts.items.visible;
|
730 |
+
if (opts.items.visibleConf.variable)
|
731 |
+
{
|
732 |
+
var vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
|
733 |
+
if (opts.items.visible+nI <= vI && nI < itms.total)
|
734 |
+
{
|
735 |
+
nI++;
|
736 |
+
vI = cf_getItemsAdjust(gn_getVisibleItemsNext(a_itm, opts, itms.total-nI), opts, opts.items.visibleConf.adjust, $tt0);
|
737 |
+
}
|
738 |
+
opts.items.visible = vI;
|
739 |
+
}
|
740 |
+
else if (opts.items.filter != '*')
|
741 |
+
{
|
742 |
+
var vI = gn_getVisibleItemsNextFilter(a_itm, opts, itms.total-nI);
|
743 |
+
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
|
744 |
+
}
|
745 |
+
|
746 |
+
sz_resetMargin(a_itm, opts, true);
|
747 |
+
|
748 |
+
// scroll 0, don't scroll
|
749 |
+
if (nI == 0)
|
750 |
+
{
|
751 |
+
e.stopImmediatePropagation();
|
752 |
+
return debug(conf, '0 items to scroll: Not scrolling.');
|
753 |
+
}
|
754 |
+
debug(conf, 'Scrolling '+nI+' items backward.');
|
755 |
+
|
756 |
+
|
757 |
+
// save new config
|
758 |
+
itms.first += nI;
|
759 |
+
while (itms.first >= itms.total)
|
760 |
+
{
|
761 |
+
itms.first -= itms.total;
|
762 |
+
}
|
763 |
+
|
764 |
+
// non-circular callback
|
765 |
+
if (!opts.circular)
|
766 |
+
{
|
767 |
+
if (itms.first == 0 && sO.onEnd)
|
768 |
+
{
|
769 |
+
sO.onEnd.call($tt0, 'prev');
|
770 |
+
}
|
771 |
+
if (!opts.infinite)
|
772 |
+
{
|
773 |
+
nv_enableNavi(opts, itms.first, conf);
|
774 |
+
}
|
775 |
+
}
|
776 |
+
|
777 |
+
// rearrange items
|
778 |
+
$cfs.children().slice(itms.total-nI, itms.total).prependTo($cfs);
|
779 |
+
if (itms.total < opts.items.visible + nI)
|
780 |
+
{
|
781 |
+
$cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
|
782 |
+
}
|
783 |
+
|
784 |
+
// the needed items
|
785 |
+
var a_itm = $cfs.children(),
|
786 |
+
i_old = gi_getOldItemsPrev(a_itm, opts, nI),
|
787 |
+
i_new = gi_getNewItemsPrev(a_itm, opts),
|
788 |
+
i_cur_l = a_itm.eq(nI-1),
|
789 |
+
i_old_l = i_old.last(),
|
790 |
+
i_new_l = i_new.last();
|
791 |
+
|
792 |
+
sz_resetMargin(a_itm, opts);
|
793 |
+
|
794 |
+
var pL = 0,
|
795 |
+
pR = 0;
|
796 |
+
|
797 |
+
if (opts.align)
|
798 |
+
{
|
799 |
+
var p = cf_getAlignPadding(i_new, opts);
|
800 |
+
pL = p[0];
|
801 |
+
pR = p[1];
|
802 |
+
}
|
803 |
+
var oL = (pL < 0) ? opts.padding[opts.d[3]] : 0;
|
804 |
+
|
805 |
+
// hide items for fx directscroll
|
806 |
+
var hiddenitems = false,
|
807 |
+
i_skp = $();
|
808 |
+
if (opts.items.visible < nI)
|
809 |
+
{
|
810 |
+
i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
|
811 |
+
if (sO.fx == 'directscroll')
|
812 |
+
{
|
813 |
+
var orgW = opts.items[opts.d['width']];
|
814 |
+
hiddenitems = i_skp;
|
815 |
+
i_cur_l = i_new_l;
|
816 |
+
sc_hideHiddenItems(hiddenitems);
|
817 |
+
opts.items[opts.d['width']] = 'variable';
|
818 |
+
}
|
819 |
+
}
|
820 |
+
// save new sizes
|
821 |
+
var $cf2 = false,
|
822 |
+
i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
|
823 |
+
w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
|
824 |
+
i_siz_vis = 0,
|
825 |
+
a_cfs = {},
|
826 |
+
a_wsz = {},
|
827 |
+
a_cur = {},
|
828 |
+
a_old = {},
|
829 |
+
a_new = {},
|
830 |
+
a_lef = {},
|
831 |
+
a_lef_vis = {},
|
832 |
+
a_dur = sc_getDuration(sO, opts, nI, i_siz);
|
833 |
+
|
834 |
+
switch(sO.fx)
|
835 |
+
{
|
836 |
+
case 'cover':
|
837 |
+
case 'cover-fade':
|
838 |
+
i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visible), opts, 'width');
|
839 |
+
break;
|
840 |
+
}
|
841 |
+
|
842 |
+
if (hiddenitems)
|
843 |
+
{
|
844 |
+
opts.items[opts.d['width']] = orgW;
|
845 |
+
}
|
846 |
+
|
847 |
+
sz_resetMargin(a_itm, opts, true);
|
848 |
+
if (pR >= 0)
|
849 |
+
{
|
850 |
+
sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
|
851 |
+
}
|
852 |
+
if (pL >= 0)
|
853 |
+
{
|
854 |
+
sz_resetMargin(i_cur_l, opts, opts.padding[opts.d[3]]);
|
855 |
+
}
|
856 |
+
|
857 |
+
if (opts.align)
|
858 |
+
{
|
859 |
+
opts.padding[opts.d[1]] = pR;
|
860 |
+
opts.padding[opts.d[3]] = pL;
|
861 |
+
}
|
862 |
+
|
863 |
+
a_lef[opts.d['left']] = -(i_siz - oL);
|
864 |
+
a_lef_vis[opts.d['left']] = -(i_siz_vis - oL);
|
865 |
+
a_wsz[opts.d['left']] = w_siz[opts.d['width']];
|
866 |
+
|
867 |
+
// scrolling functions
|
868 |
+
var _s_wrapper = function() {},
|
869 |
+
_a_wrapper = function() {},
|
870 |
+
_s_paddingold = function() {},
|
871 |
+
_a_paddingold = function() {},
|
872 |
+
_s_paddingnew = function() {},
|
873 |
+
_a_paddingnew = function() {},
|
874 |
+
_s_paddingcur = function() {},
|
875 |
+
_a_paddingcur = function() {},
|
876 |
+
_onafter = function() {},
|
877 |
+
_moveitems = function() {},
|
878 |
+
_position = function() {};
|
879 |
+
|
880 |
+
// clone carousel
|
881 |
+
switch(sO.fx)
|
882 |
+
{
|
883 |
+
case 'crossfade':
|
884 |
+
case 'cover':
|
885 |
+
case 'cover-fade':
|
886 |
+
case 'uncover':
|
887 |
+
case 'uncover-fade':
|
888 |
+
$cf2 = $cfs.clone(true).appendTo($wrp);
|
889 |
+
break;
|
890 |
+
}
|
891 |
+
switch(sO.fx)
|
892 |
+
{
|
893 |
+
case 'crossfade':
|
894 |
+
case 'uncover':
|
895 |
+
case 'uncover-fade':
|
896 |
+
$cf2.children().slice(0, nI).remove();
|
897 |
+
$cf2.children().slice(opts.items.visibleConf.old).remove();
|
898 |
+
break;
|
899 |
+
|
900 |
+
case 'cover':
|
901 |
+
case 'cover-fade':
|
902 |
+
$cf2.children().slice(opts.items.visible).remove();
|
903 |
+
$cf2.css(a_lef_vis);
|
904 |
+
break;
|
905 |
+
}
|
906 |
+
|
907 |
+
$cfs.css(a_lef);
|
908 |
+
|
909 |
+
// reset all scrolls
|
910 |
+
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
911 |
+
|
912 |
+
// animate / set carousel
|
913 |
+
a_cfs[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
|
914 |
+
|
915 |
+
// animate / set wrapper
|
916 |
+
if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
|
917 |
+
{
|
918 |
+
_s_wrapper = function() {
|
919 |
+
$wrp.css(w_siz);
|
920 |
+
};
|
921 |
+
_a_wrapper = function() {
|
922 |
+
scrl.anims.push([$wrp, w_siz]);
|
923 |
+
};
|
924 |
+
}
|
925 |
+
|
926 |
+
// animate / set items
|
927 |
+
if (opts.usePadding)
|
928 |
+
{
|
929 |
+
if (i_new_l.not(i_cur_l).length)
|
930 |
+
{
|
931 |
+
a_cur[opts.d['marginRight']] = i_cur_l.data('_cfs_origCssMargin');
|
932 |
+
|
933 |
+
if (pL < 0)
|
934 |
+
{
|
935 |
+
i_cur_l.css(a_cur);
|
936 |
+
}
|
937 |
+
else
|
938 |
+
{
|
939 |
+
_s_paddingcur = function() {
|
940 |
+
i_cur_l.css(a_cur);
|
941 |
+
};
|
942 |
+
_a_paddingcur = function() {
|
943 |
+
scrl.anims.push([i_cur_l, a_cur]);
|
944 |
+
};
|
945 |
+
}
|
946 |
+
}
|
947 |
+
switch(sO.fx)
|
948 |
+
{
|
949 |
+
case 'cover':
|
950 |
+
case 'cover-fade':
|
951 |
+
$cf2.children().eq(nI-1).css(a_cur);
|
952 |
+
break;
|
953 |
+
}
|
954 |
+
|
955 |
+
if (i_new_l.not(i_old_l).length)
|
956 |
+
{
|
957 |
+
a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
|
958 |
+
_s_paddingold = function() {
|
959 |
+
i_old_l.css(a_old);
|
960 |
+
};
|
961 |
+
_a_paddingold = function() {
|
962 |
+
scrl.anims.push([i_old_l, a_old]);
|
963 |
+
};
|
964 |
+
}
|
965 |
+
|
966 |
+
if (pR >= 0)
|
967 |
+
{
|
968 |
+
a_new[opts.d['marginRight']] = i_new_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]];
|
969 |
+
_s_paddingnew = function() {
|
970 |
+
i_new_l.css(a_new);
|
971 |
+
};
|
972 |
+
_a_paddingnew = function() {
|
973 |
+
scrl.anims.push([i_new_l, a_new]);
|
974 |
+
};
|
975 |
+
}
|
976 |
+
}
|
977 |
+
|
978 |
+
// set position
|
979 |
+
_position = function() {
|
980 |
+
$cfs.css(a_cfs);
|
981 |
+
};
|
982 |
+
|
983 |
+
|
984 |
+
var overFill = opts.items.visible+nI-itms.total;
|
985 |
+
|
986 |
+
// rearrange items
|
987 |
+
_moveitems = function() {
|
988 |
+
if (overFill > 0)
|
989 |
+
{
|
990 |
+
$cfs.children().slice(itms.total).remove();
|
991 |
+
i_old = $( $cfs.children().slice(itms.total-(opts.items.visible-overFill)).get().concat( $cfs.children().slice(0, overFill).get() ) );
|
992 |
+
}
|
993 |
+
sc_showHiddenItems(hiddenitems);
|
994 |
+
|
995 |
+
if (opts.usePadding)
|
996 |
+
{
|
997 |
+
var l_itm = $cfs.children().eq(opts.items.visible+nI-1);
|
998 |
+
l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
|
999 |
+
}
|
1000 |
+
};
|
1001 |
+
|
1002 |
+
|
1003 |
+
var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'prev', a_dur, w_siz);
|
1004 |
+
|
1005 |
+
// fire onAfter callbacks
|
1006 |
+
_onafter = function() {
|
1007 |
+
sc_afterScroll($cfs, $cf2, sO);
|
1008 |
+
crsl.isScrolling = false;
|
1009 |
+
clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
|
1010 |
+
queu = sc_fireQueue($cfs, queu, conf);
|
1011 |
+
|
1012 |
+
if (!crsl.isPaused)
|
1013 |
+
{
|
1014 |
+
$cfs.trigger(cf_e('play', conf));
|
1015 |
+
}
|
1016 |
+
};
|
1017 |
+
|
1018 |
+
// fire onBefore callback
|
1019 |
+
crsl.isScrolling = true;
|
1020 |
+
tmrs = sc_clearTimers(tmrs);
|
1021 |
+
clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
|
1022 |
+
|
1023 |
+
switch(sO.fx)
|
1024 |
+
{
|
1025 |
+
case 'none':
|
1026 |
+
$cfs.css(a_cfs);
|
1027 |
+
_s_wrapper();
|
1028 |
+
_s_paddingold();
|
1029 |
+
_s_paddingnew();
|
1030 |
+
_s_paddingcur();
|
1031 |
+
_position();
|
1032 |
+
_moveitems();
|
1033 |
+
_onafter();
|
1034 |
+
break;
|
1035 |
+
|
1036 |
+
case 'fade':
|
1037 |
+
scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
|
1038 |
+
_s_wrapper();
|
1039 |
+
_s_paddingold();
|
1040 |
+
_s_paddingnew();
|
1041 |
+
_s_paddingcur();
|
1042 |
+
_position();
|
1043 |
+
_moveitems();
|
1044 |
+
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
1045 |
+
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1046 |
+
sc_startScroll(scrl, conf);
|
1047 |
+
}]);
|
1048 |
+
break;
|
1049 |
+
|
1050 |
+
case 'crossfade':
|
1051 |
+
$cfs.css({ 'opacity': 0 });
|
1052 |
+
scrl.anims.push([$cf2, { 'opacity': 0 }]);
|
1053 |
+
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1054 |
+
_a_wrapper();
|
1055 |
+
_s_paddingold();
|
1056 |
+
_s_paddingnew();
|
1057 |
+
_s_paddingcur();
|
1058 |
+
_position();
|
1059 |
+
_moveitems();
|
1060 |
+
break;
|
1061 |
+
|
1062 |
+
case 'cover':
|
1063 |
+
scrl.anims.push([$cf2, a_cfs, function() {
|
1064 |
+
_s_paddingold();
|
1065 |
+
_s_paddingnew();
|
1066 |
+
_s_paddingcur();
|
1067 |
+
_position();
|
1068 |
+
_moveitems();
|
1069 |
+
_onafter();
|
1070 |
+
}]);
|
1071 |
+
_a_wrapper();
|
1072 |
+
break;
|
1073 |
+
|
1074 |
+
case 'cover-fade':
|
1075 |
+
scrl.anims.push([$cfs, { 'opacity': 0 }]);
|
1076 |
+
scrl.anims.push([$cf2, a_cfs, function() {
|
1077 |
+
_s_paddingold();
|
1078 |
+
_s_paddingnew();
|
1079 |
+
_s_paddingcur();
|
1080 |
+
_position();
|
1081 |
+
_moveitems();
|
1082 |
+
_onafter();
|
1083 |
+
}]);
|
1084 |
+
_a_wrapper();
|
1085 |
+
break;
|
1086 |
+
|
1087 |
+
case 'uncover':
|
1088 |
+
scrl.anims.push([$cf2, a_wsz, _onafter]);
|
1089 |
+
_a_wrapper();
|
1090 |
+
_s_paddingold();
|
1091 |
+
_s_paddingnew();
|
1092 |
+
_s_paddingcur();
|
1093 |
+
_position();
|
1094 |
+
_moveitems();
|
1095 |
+
break;
|
1096 |
+
|
1097 |
+
case 'uncover-fade':
|
1098 |
+
$cfs.css({ 'opacity': 0 });
|
1099 |
+
scrl.anims.push([$cfs, { 'opacity': 1 }]);
|
1100 |
+
scrl.anims.push([$cf2, a_wsz, _onafter]);
|
1101 |
+
_a_wrapper();
|
1102 |
+
_s_paddingold();
|
1103 |
+
_s_paddingnew();
|
1104 |
+
_s_paddingcur();
|
1105 |
+
_position();
|
1106 |
+
_moveitems();
|
1107 |
+
break;
|
1108 |
+
|
1109 |
+
default:
|
1110 |
+
scrl.anims.push([$cfs, a_cfs, function() {
|
1111 |
+
_moveitems();
|
1112 |
+
_onafter();
|
1113 |
+
}]);
|
1114 |
+
_a_wrapper();
|
1115 |
+
_a_paddingold();
|
1116 |
+
_a_paddingnew();
|
1117 |
+
_a_paddingcur();
|
1118 |
+
break;
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
sc_startScroll(scrl, conf);
|
1122 |
+
cf_setCookie(opts.cookie, $cfs, conf);
|
1123 |
+
|
1124 |
+
$cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
|
1125 |
+
|
1126 |
+
return true;
|
1127 |
+
});
|
1128 |
+
|
1129 |
+
|
1130 |
+
// next event
|
1131 |
+
$cfs.bind(cf_e('slide_next', conf), function(e, sO, nI) {
|
1132 |
+
e.stopPropagation();
|
1133 |
+
var a_itm = $cfs.children();
|
1134 |
+
|
1135 |
+
// non-circular at end, scroll to start
|
1136 |
+
if (!opts.circular)
|
1137 |
+
{
|
1138 |
+
if (itms.first == opts.items.visible)
|
1139 |
+
{
|
1140 |
+
if (opts.infinite)
|
1141 |
+
{
|
1142 |
+
$cfs.trigger(cf_e('prev', conf), itms.total-1);
|
1143 |
+
}
|
1144 |
+
return e.stopImmediatePropagation();
|
1145 |
+
}
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
sz_resetMargin(a_itm, opts);
|
1149 |
+
|
1150 |
+
// find number of items to scroll
|
1151 |
+
if (!is_number(nI))
|
1152 |
+
{
|
1153 |
+
if (opts.items.filter != '*')
|
1154 |
+
{
|
1155 |
+
var xI = (is_number(sO.items)) ? sO.items : gn_getVisibleOrg($cfs, opts);
|
1156 |
+
nI = gn_getScrollItemsNextFilter(a_itm, opts, 0, xI);
|
1157 |
+
}
|
1158 |
+
else
|
1159 |
+
{
|
1160 |
+
nI = opts.items.visible;
|
1161 |
+
}
|
1162 |
+
nI = cf_getAdjust(nI, opts, sO.items, $tt0);
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
var lastItemNr = (itms.first == 0) ? itms.total : itms.first;
|
1166 |
+
|
1167 |
+
// prevent non-circular from scrolling to far
|
1168 |
+
if (!opts.circular)
|
1169 |
+
{
|
1170 |
+
if (opts.items.visibleConf.variable)
|
1171 |
+
{
|
1172 |
+
var vI = gn_getVisibleItemsNext(a_itm, opts, nI),
|
1173 |
+
xI = gn_getVisibleItemsPrev(a_itm, opts, lastItemNr-1);
|
1174 |
+
}
|
1175 |
+
else
|
1176 |
+
{
|
1177 |
+
var vI = opts.items.visible,
|
1178 |
+
xI = opts.items.visible;
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
if (nI + vI > lastItemNr)
|
1182 |
+
{
|
1183 |
+
nI = lastItemNr - xI;
|
1184 |
+
}
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
// set new number of visible items
|
1188 |
+
opts.items.visibleConf.old = opts.items.visible;
|
1189 |
+
if (opts.items.visibleConf.variable)
|
1190 |
+
{
|
1191 |
+
var vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
|
1192 |
+
while (opts.items.visible-nI >= vI && nI < itms.total)
|
1193 |
+
{
|
1194 |
+
nI++;
|
1195 |
+
vI = cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr), opts, opts.items.visibleConf.adjust, $tt0);
|
1196 |
+
}
|
1197 |
+
opts.items.visible = vI;
|
1198 |
+
}
|
1199 |
+
else if (opts.items.filter != '*')
|
1200 |
+
{
|
1201 |
+
var vI = gn_getVisibleItemsNextFilter(a_itm, opts, nI);
|
1202 |
+
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
|
1203 |
+
}
|
1204 |
+
|
1205 |
+
sz_resetMargin(a_itm, opts, true);
|
1206 |
+
|
1207 |
+
// scroll 0, don't scroll
|
1208 |
+
if (nI == 0)
|
1209 |
+
{
|
1210 |
+
e.stopImmediatePropagation();
|
1211 |
+
return debug(conf, '0 items to scroll: Not scrolling.');
|
1212 |
+
}
|
1213 |
+
debug(conf, 'Scrolling '+nI+' items forward.');
|
1214 |
+
|
1215 |
+
|
1216 |
+
// save new config
|
1217 |
+
itms.first -= nI;
|
1218 |
+
while (itms.first < 0)
|
1219 |
+
{
|
1220 |
+
itms.first += itms.total;
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
// non-circular callback
|
1224 |
+
if (!opts.circular)
|
1225 |
+
{
|
1226 |
+
if (itms.first == opts.items.visible && sO.onEnd)
|
1227 |
+
{
|
1228 |
+
sO.onEnd.call($tt0, 'next');
|
1229 |
+
}
|
1230 |
+
if (!opts.infinite)
|
1231 |
+
{
|
1232 |
+
nv_enableNavi(opts, itms.first, conf);
|
1233 |
+
}
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
// rearrange items
|
1237 |
+
if (itms.total < opts.items.visible+nI)
|
1238 |
+
{
|
1239 |
+
$cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
// the needed items
|
1243 |
+
var a_itm = $cfs.children(),
|
1244 |
+
i_old = gi_getOldItemsNext(a_itm, opts),
|
1245 |
+
i_new = gi_getNewItemsNext(a_itm, opts, nI),
|
1246 |
+
i_cur_l = a_itm.eq(nI-1),
|
1247 |
+
i_old_l = i_old.last(),
|
1248 |
+
i_new_l = i_new.last();
|
1249 |
+
|
1250 |
+
sz_resetMargin(a_itm, opts);
|
1251 |
+
|
1252 |
+
var pL = 0,
|
1253 |
+
pR = 0;
|
1254 |
+
|
1255 |
+
if (opts.align)
|
1256 |
+
{
|
1257 |
+
var p = cf_getAlignPadding(i_new, opts);
|
1258 |
+
pL = p[0];
|
1259 |
+
pR = p[1];
|
1260 |
+
}
|
1261 |
+
|
1262 |
+
// hide items for fx directscroll
|
1263 |
+
var hiddenitems = false,
|
1264 |
+
i_skp = $();
|
1265 |
+
if (opts.items.visibleConf.old < nI)
|
1266 |
+
{
|
1267 |
+
i_skp = a_itm.slice(opts.items.visibleConf.old, nI);
|
1268 |
+
if (sO.fx == 'directscroll')
|
1269 |
+
{
|
1270 |
+
var orgW = opts.items[opts.d['width']];
|
1271 |
+
hiddenitems = i_skp;
|
1272 |
+
i_cur_l = i_old_l;
|
1273 |
+
sc_hideHiddenItems(hiddenitems);
|
1274 |
+
opts.items[opts.d['width']] = 'variable';
|
1275 |
+
}
|
1276 |
+
}
|
1277 |
+
// save new sizes
|
1278 |
+
var $cf2 = false,
|
1279 |
+
i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
|
1280 |
+
w_siz = cf_mapWrapperSizes(ms_getSizes(i_new, opts, true), opts, !opts.usePadding),
|
1281 |
+
i_siz_vis = 0,
|
1282 |
+
a_cfs = {},
|
1283 |
+
a_cfs_vis = {},
|
1284 |
+
a_cur = {},
|
1285 |
+
a_old = {},
|
1286 |
+
a_lef = {},
|
1287 |
+
a_dur = sc_getDuration(sO, opts, nI, i_siz);
|
1288 |
+
|
1289 |
+
switch(sO.fx)
|
1290 |
+
{
|
1291 |
+
case 'uncover':
|
1292 |
+
case 'uncover-fade':
|
1293 |
+
i_siz_vis = ms_getTotalSize(a_itm.slice(0, opts.items.visibleConf.old), opts, 'width');
|
1294 |
+
break;
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
if (hiddenitems)
|
1298 |
+
{
|
1299 |
+
opts.items[opts.d['width']] = orgW;
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
if (opts.align)
|
1303 |
+
{
|
1304 |
+
if (opts.padding[opts.d[1]] < 0)
|
1305 |
+
{
|
1306 |
+
opts.padding[opts.d[1]] = 0;
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
+
sz_resetMargin(a_itm, opts, true);
|
1310 |
+
sz_resetMargin(i_old_l, opts, opts.padding[opts.d[1]]);
|
1311 |
+
|
1312 |
+
if (opts.align)
|
1313 |
+
{
|
1314 |
+
opts.padding[opts.d[1]] = pR;
|
1315 |
+
opts.padding[opts.d[3]] = pL;
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
a_lef[opts.d['left']] = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
|
1319 |
+
|
1320 |
+
// scrolling functions
|
1321 |
+
var _s_wrapper = function() {},
|
1322 |
+
_a_wrapper = function() {},
|
1323 |
+
_s_paddingold = function() {},
|
1324 |
+
_a_paddingold = function() {},
|
1325 |
+
_s_paddingcur = function() {},
|
1326 |
+
_a_paddingcur = function() {},
|
1327 |
+
_onafter = function() {},
|
1328 |
+
_moveitems = function() {},
|
1329 |
+
_position = function() {};
|
1330 |
+
|
1331 |
+
// clone carousel
|
1332 |
+
switch(sO.fx)
|
1333 |
+
{
|
1334 |
+
case 'crossfade':
|
1335 |
+
case 'cover':
|
1336 |
+
case 'cover-fade':
|
1337 |
+
case 'uncover':
|
1338 |
+
case 'uncover-fade':
|
1339 |
+
$cf2 = $cfs.clone(true).appendTo($wrp);
|
1340 |
+
$cf2.children().slice(opts.items.visibleConf.old).remove();
|
1341 |
+
break;
|
1342 |
+
}
|
1343 |
+
switch(sO.fx)
|
1344 |
+
{
|
1345 |
+
case 'crossfade':
|
1346 |
+
case 'cover':
|
1347 |
+
case 'cover-fade':
|
1348 |
+
$cfs.css('zIndex', 1);
|
1349 |
+
$cf2.css('zIndex', 0);
|
1350 |
+
break;
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
// reset all scrolls
|
1354 |
+
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
1355 |
+
|
1356 |
+
// animate / set carousel
|
1357 |
+
a_cfs[opts.d['left']] = -i_siz;
|
1358 |
+
a_cfs_vis[opts.d['left']] = -i_siz_vis;
|
1359 |
+
|
1360 |
+
if (pL < 0)
|
1361 |
+
{
|
1362 |
+
a_cfs[opts.d['left']] += pL;
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
// animate / set wrapper
|
1366 |
+
if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable')
|
1367 |
+
{
|
1368 |
+
_s_wrapper = function() {
|
1369 |
+
$wrp.css(w_siz);
|
1370 |
+
};
|
1371 |
+
_a_wrapper = function() {
|
1372 |
+
scrl.anims.push([$wrp, w_siz]);
|
1373 |
+
};
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
// animate / set items
|
1377 |
+
if (opts.usePadding)
|
1378 |
+
{
|
1379 |
+
var i_new_l_m = i_new_l.data('_cfs_origCssMargin');
|
1380 |
+
|
1381 |
+
if (pR >= 0)
|
1382 |
+
{
|
1383 |
+
i_new_l_m += opts.padding[opts.d[1]];
|
1384 |
+
}
|
1385 |
+
i_new_l.css(opts.d['marginRight'], i_new_l_m);
|
1386 |
+
|
1387 |
+
if (i_cur_l.not(i_old_l).length)
|
1388 |
+
{
|
1389 |
+
a_old[opts.d['marginRight']] = i_old_l.data('_cfs_origCssMargin');
|
1390 |
+
}
|
1391 |
+
_s_paddingold = function() {
|
1392 |
+
i_old_l.css(a_old);
|
1393 |
+
};
|
1394 |
+
_a_paddingold = function() {
|
1395 |
+
scrl.anims.push([i_old_l, a_old]);
|
1396 |
+
};
|
1397 |
+
|
1398 |
+
var i_cur_l_m = i_cur_l.data('_cfs_origCssMargin');
|
1399 |
+
if (pL > 0)
|
1400 |
+
{
|
1401 |
+
i_cur_l_m += opts.padding[opts.d[3]];
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
a_cur[opts.d['marginRight']] = i_cur_l_m;
|
1405 |
+
|
1406 |
+
_s_paddingcur = function() {
|
1407 |
+
i_cur_l.css(a_cur);
|
1408 |
+
};
|
1409 |
+
_a_paddingcur = function() {
|
1410 |
+
scrl.anims.push([i_cur_l, a_cur]);
|
1411 |
+
};
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
// set position
|
1415 |
+
_position = function() {
|
1416 |
+
$cfs.css(a_lef);
|
1417 |
+
};
|
1418 |
+
|
1419 |
+
|
1420 |
+
var overFill = opts.items.visible+nI-itms.total;
|
1421 |
+
|
1422 |
+
// rearrange items
|
1423 |
+
_moveitems = function() {
|
1424 |
+
if (overFill > 0)
|
1425 |
+
{
|
1426 |
+
$cfs.children().slice(itms.total).remove();
|
1427 |
+
}
|
1428 |
+
var l_itm = $cfs.children().slice(0, nI).appendTo($cfs).last();
|
1429 |
+
if (overFill > 0)
|
1430 |
+
{
|
1431 |
+
i_new = gi_getCurrentItems(a_itm, opts);
|
1432 |
+
}
|
1433 |
+
sc_showHiddenItems(hiddenitems);
|
1434 |
+
|
1435 |
+
if (opts.usePadding)
|
1436 |
+
{
|
1437 |
+
if (itms.total < opts.items.visible+nI) {
|
1438 |
+
var i_cur_l = $cfs.children().eq(opts.items.visible-1);
|
1439 |
+
i_cur_l.css(opts.d['marginRight'], i_cur_l.data('_cfs_origCssMargin') + opts.padding[opts.d[1]]);
|
1440 |
+
}
|
1441 |
+
l_itm.css(opts.d['marginRight'], l_itm.data('_cfs_origCssMargin'));
|
1442 |
+
}
|
1443 |
+
};
|
1444 |
+
|
1445 |
+
|
1446 |
+
var cb_arguments = sc_mapCallbackArguments(i_old, i_skp, i_new, nI, 'next', a_dur, w_siz);
|
1447 |
+
|
1448 |
+
// fire onAfter callbacks
|
1449 |
+
_onafter = function() {
|
1450 |
+
$cfs.css('zIndex', $cfs.data('_cfs_origCssZindex'));
|
1451 |
+
sc_afterScroll($cfs, $cf2, sO);
|
1452 |
+
crsl.isScrolling = false;
|
1453 |
+
clbk.onAfter = sc_fireCallbacks($tt0, sO, 'onAfter', cb_arguments, clbk);
|
1454 |
+
queu = sc_fireQueue($cfs, queu, conf);
|
1455 |
+
|
1456 |
+
if (!crsl.isPaused)
|
1457 |
+
{
|
1458 |
+
$cfs.trigger(cf_e('play', conf));
|
1459 |
+
}
|
1460 |
+
};
|
1461 |
+
|
1462 |
+
// fire onBefore callbacks
|
1463 |
+
crsl.isScrolling = true;
|
1464 |
+
tmrs = sc_clearTimers(tmrs);
|
1465 |
+
clbk.onBefore = sc_fireCallbacks($tt0, sO, 'onBefore', cb_arguments, clbk);
|
1466 |
+
|
1467 |
+
switch(sO.fx)
|
1468 |
+
{
|
1469 |
+
case 'none':
|
1470 |
+
$cfs.css(a_cfs);
|
1471 |
+
_s_wrapper();
|
1472 |
+
_s_paddingold();
|
1473 |
+
_s_paddingcur();
|
1474 |
+
_position();
|
1475 |
+
_moveitems();
|
1476 |
+
_onafter();
|
1477 |
+
break;
|
1478 |
+
|
1479 |
+
case 'fade':
|
1480 |
+
scrl.anims.push([$cfs, { 'opacity': 0 }, function() {
|
1481 |
+
_s_wrapper();
|
1482 |
+
_s_paddingold();
|
1483 |
+
_s_paddingcur();
|
1484 |
+
_position();
|
1485 |
+
_moveitems();
|
1486 |
+
scrl = sc_setScroll(a_dur, sO.easing, conf);
|
1487 |
+
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1488 |
+
sc_startScroll(scrl, conf);
|
1489 |
+
}]);
|
1490 |
+
break;
|
1491 |
+
|
1492 |
+
case 'crossfade':
|
1493 |
+
$cfs.css({ 'opacity': 0 });
|
1494 |
+
scrl.anims.push([$cf2, { 'opacity': 0 }]);
|
1495 |
+
scrl.anims.push([$cfs, { 'opacity': 1 }, _onafter]);
|
1496 |
+
_a_wrapper();
|
1497 |
+
_s_paddingold();
|
1498 |
+
_s_paddingcur();
|
1499 |
+
_position();
|
1500 |
+
_moveitems();
|
1501 |
+
break;
|
1502 |
+
|
1503 |
+
case 'cover':
|
1504 |
+
$cfs.css(opts.d['left'], $wrp[opts.d['width']]());
|
1505 |
+
scrl.anims.push([$cfs, a_lef, _onafter]);
|
1506 |
+
_a_wrapper();
|
1507 |
+
_s_paddingold();
|
1508 |
+
_s_paddingcur();
|
1509 |
+
_moveitems();
|
1510 |
+
break;
|
1511 |
+
|
1512 |
+
case 'cover-fade':
|
1513 |
+
$cfs.css(opts.d['left'], $wrp[opts.d['width']]());
|
1514 |
+
scrl.anims.push([$cf2, { 'opacity': 0 }]);
|
1515 |
+
scrl.anims.push([$cfs, a_lef, _onafter]);
|
1516 |
+
_a_wrapper();
|
1517 |
+
_s_paddingold();
|
1518 |
+
_s_paddingcur();
|
1519 |
+
_moveitems();
|
1520 |
+
break;
|
1521 |
+
|
1522 |
+
case 'uncover':
|
1523 |
+
scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
|
1524 |
+
_a_wrapper();
|
1525 |
+
_s_paddingold();
|
1526 |
+
_s_paddingcur();
|
1527 |
+
_position();
|
1528 |
+
_moveitems();
|
1529 |
+
break;
|
1530 |
+
|
1531 |
+
case 'uncover-fade':
|
1532 |
+
$cfs.css({ 'opacity': 0 });
|
1533 |
+
scrl.anims.push([$cfs, { 'opacity': 1 }]);
|
1534 |
+
scrl.anims.push([$cf2, a_cfs_vis, _onafter]);
|
1535 |
+
_a_wrapper();
|
1536 |
+
_s_paddingold();
|
1537 |
+
_s_paddingcur();
|
1538 |
+
_position();
|
1539 |
+
_moveitems();
|
1540 |
+
break;
|
1541 |
+
|
1542 |
+
default:
|
1543 |
+
scrl.anims.push([$cfs, a_cfs, function() {
|
1544 |
+
_position();
|
1545 |
+
_moveitems();
|
1546 |
+
_onafter();
|
1547 |
+
}]);
|
1548 |
+
_a_wrapper();
|
1549 |
+
_a_paddingold();
|
1550 |
+
_a_paddingcur();
|
1551 |
+
break;
|
1552 |
+
}
|
1553 |
+
|
1554 |
+
sc_startScroll(scrl, conf);
|
1555 |
+
cf_setCookie(opts.cookie, $cfs, conf);
|
1556 |
+
|
1557 |
+
$cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
|
1558 |
+
|
1559 |
+
return true;
|
1560 |
+
});
|
1561 |
+
|
1562 |
+
|
1563 |
+
// slideTo event
|
1564 |
+
$cfs.bind(cf_e('slideTo', conf), function(e, num, dev, org, obj, dir, clb) {
|
1565 |
+
e.stopPropagation();
|
1566 |
+
|
1567 |
+
var v = [num, dev, org, obj, dir, clb],
|
1568 |
+
t = ['string/number/object', 'number', 'boolean', 'object', 'string', 'function'],
|
1569 |
+
a = cf_sortParams(v, t);
|
1570 |
+
|
1571 |
+
obj = a[3];
|
1572 |
+
dir = a[4];
|
1573 |
+
clb = a[5];
|
1574 |
+
|
1575 |
+
num = gn_getItemIndex(a[0], a[1], a[2], itms, $cfs);
|
1576 |
+
|
1577 |
+
if (num == 0)
|
1578 |
+
{
|
1579 |
+
return false;
|
1580 |
+
}
|
1581 |
+
if (!is_object(obj))
|
1582 |
+
{
|
1583 |
+
obj = false;
|
1584 |
+
}
|
1585 |
+
|
1586 |
+
if (dir != 'prev' && dir != 'next')
|
1587 |
+
{
|
1588 |
+
if (opts.circular)
|
1589 |
+
{
|
1590 |
+
dir = (num <= itms.total / 2) ? 'next' : 'prev';
|
1591 |
+
}
|
1592 |
+
else
|
1593 |
+
{
|
1594 |
+
dir = (itms.first == 0 || itms.first > num) ? 'next' : 'prev';
|
1595 |
+
}
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
if (dir == 'prev')
|
1599 |
+
{
|
1600 |
+
num = itms.total-num;
|
1601 |
+
}
|
1602 |
+
$cfs.trigger(cf_e(dir, conf), [obj, num, clb]);
|
1603 |
+
|
1604 |
+
return true;
|
1605 |
+
});
|
1606 |
+
|
1607 |
+
|
1608 |
+
// prevPage event
|
1609 |
+
$cfs.bind(cf_e('prevPage', conf), function(e, obj, clb) {
|
1610 |
+
e.stopPropagation();
|
1611 |
+
var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
|
1612 |
+
return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur-1, obj, 'prev', clb]);
|
1613 |
+
});
|
1614 |
+
|
1615 |
+
|
1616 |
+
// nextPage event
|
1617 |
+
$cfs.bind(cf_e('nextPage', conf), function(e, obj, clb) {
|
1618 |
+
e.stopPropagation();
|
1619 |
+
var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
|
1620 |
+
return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur+1, obj, 'next', clb]);
|
1621 |
+
});
|
1622 |
+
|
1623 |
+
|
1624 |
+
// slideToPage event
|
1625 |
+
$cfs.bind(cf_e('slideToPage', conf), function(e, pag, obj, dir, clb) {
|
1626 |
+
e.stopPropagation();
|
1627 |
+
if (!is_number(pag))
|
1628 |
+
{
|
1629 |
+
pag = $cfs.triggerHandler(cf_e('currentPage', conf));
|
1630 |
+
}
|
1631 |
+
var ipp = opts.pagination.items || opts.items.visible,
|
1632 |
+
max = Math.ceil(itms.total / ipp)-1;
|
1633 |
+
|
1634 |
+
if (pag < 0)
|
1635 |
+
{
|
1636 |
+
pag = max;
|
1637 |
+
}
|
1638 |
+
if (pag > max)
|
1639 |
+
{
|
1640 |
+
pag = 0;
|
1641 |
+
}
|
1642 |
+
return $cfs.triggerHandler(cf_e('slideTo', conf), [pag*ipp, 0, true, obj, dir, clb]);
|
1643 |
+
});
|
1644 |
+
|
1645 |
+
// jumpToStart event
|
1646 |
+
$cfs.bind(cf_e('jumpToStart', conf), function(e, s) {
|
1647 |
+
e.stopPropagation();
|
1648 |
+
if (s)
|
1649 |
+
{
|
1650 |
+
s = gn_getItemIndex(s, 0, true, itms, $cfs);
|
1651 |
+
}
|
1652 |
+
else
|
1653 |
+
{
|
1654 |
+
s = 0;
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
s += itms.first;
|
1658 |
+
if (s != 0)
|
1659 |
+
{
|
1660 |
+
if (itms.total > 0)
|
1661 |
+
{
|
1662 |
+
while (s > itms.total)
|
1663 |
+
{
|
1664 |
+
s -= itms.total;
|
1665 |
+
}
|
1666 |
+
}
|
1667 |
+
$cfs.prepend($cfs.children().slice(s, itms.total));
|
1668 |
+
}
|
1669 |
+
return true;
|
1670 |
+
});
|
1671 |
+
|
1672 |
+
|
1673 |
+
// synchronise event
|
1674 |
+
$cfs.bind(cf_e('synchronise', conf), function(e, s) {
|
1675 |
+
e.stopPropagation();
|
1676 |
+
if (s)
|
1677 |
+
{
|
1678 |
+
s = cf_getSynchArr(s);
|
1679 |
+
}
|
1680 |
+
else if (opts.synchronise)
|
1681 |
+
{
|
1682 |
+
s = opts.synchronise;
|
1683 |
+
}
|
1684 |
+
else
|
1685 |
+
{
|
1686 |
+
return debug(conf, 'No carousel to synchronise.');
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
var n = $cfs.triggerHandler(cf_e('currentPosition', conf)),
|
1690 |
+
x = true;
|
1691 |
+
|
1692 |
+
for (var j = 0, l = s.length; j < l; j++)
|
1693 |
+
{
|
1694 |
+
if (!s[j][0].triggerHandler(cf_e('slideTo', conf), [n, s[j][3], true]))
|
1695 |
+
{
|
1696 |
+
x = false;
|
1697 |
+
}
|
1698 |
+
}
|
1699 |
+
return x;
|
1700 |
+
});
|
1701 |
+
|
1702 |
+
|
1703 |
+
// queue event
|
1704 |
+
$cfs.bind(cf_e('queue', conf), function(e, dir, opt) {
|
1705 |
+
e.stopPropagation();
|
1706 |
+
if (is_function(dir))
|
1707 |
+
{
|
1708 |
+
dir.call($tt0, queu);
|
1709 |
+
}
|
1710 |
+
else if (is_array(dir))
|
1711 |
+
{
|
1712 |
+
queu = dir;
|
1713 |
+
}
|
1714 |
+
else if (!is_undefined(dir))
|
1715 |
+
{
|
1716 |
+
queu.push([dir, opt]);
|
1717 |
+
}
|
1718 |
+
return queu;
|
1719 |
+
});
|
1720 |
+
|
1721 |
+
|
1722 |
+
// insertItem event
|
1723 |
+
$cfs.bind(cf_e('insertItem', conf), function(e, itm, num, org, dev) {
|
1724 |
+
e.stopPropagation();
|
1725 |
+
|
1726 |
+
var v = [itm, num, org, dev],
|
1727 |
+
t = ['string/object', 'string/number/object', 'boolean', 'number'],
|
1728 |
+
a = cf_sortParams(v, t);
|
1729 |
+
|
1730 |
+
itm = a[0];
|
1731 |
+
num = a[1];
|
1732 |
+
org = a[2];
|
1733 |
+
dev = a[3];
|
1734 |
+
|
1735 |
+
if (is_object(itm) && !is_jquery(itm))
|
1736 |
+
{
|
1737 |
+
itm = $(itm);
|
1738 |
+
}
|
1739 |
+
else if (is_string(itm))
|
1740 |
+
{
|
1741 |
+
itm = $(itm);
|
1742 |
+
}
|
1743 |
+
if (!is_jquery(itm) || itm.length == 0)
|
1744 |
+
{
|
1745 |
+
return debug(conf, 'Not a valid object.');
|
1746 |
+
}
|
1747 |
+
|
1748 |
+
if (is_undefined(num))
|
1749 |
+
{
|
1750 |
+
num = 'end';
|
1751 |
+
}
|
1752 |
+
|
1753 |
+
sz_storeMargin(itm, opts);
|
1754 |
+
sz_storeOrigCss(itm);
|
1755 |
+
|
1756 |
+
var orgNum = num,
|
1757 |
+
before = 'before';
|
1758 |
+
|
1759 |
+
if (num == 'end')
|
1760 |
+
{
|
1761 |
+
if (org)
|
1762 |
+
{
|
1763 |
+
if (itms.first == 0)
|
1764 |
+
{
|
1765 |
+
num = itms.total-1;
|
1766 |
+
before = 'after';
|
1767 |
+
}
|
1768 |
+
else
|
1769 |
+
{
|
1770 |
+
num = itms.first;
|
1771 |
+
itms.first += itm.length;
|
1772 |
+
}
|
1773 |
+
if (num < 0)
|
1774 |
+
{
|
1775 |
+
num = 0;
|
1776 |
+
}
|
1777 |
+
}
|
1778 |
+
else
|
1779 |
+
{
|
1780 |
+
num = itms.total-1;
|
1781 |
+
before = 'after';
|
1782 |
+
}
|
1783 |
+
}
|
1784 |
+
else
|
1785 |
+
{
|
1786 |
+
num = gn_getItemIndex(num, dev, org, itms, $cfs);
|
1787 |
+
}
|
1788 |
+
|
1789 |
+
var $cit = $cfs.children().eq(num);
|
1790 |
+
if ($cit.length)
|
1791 |
+
{
|
1792 |
+
$cit[before](itm);
|
1793 |
+
}
|
1794 |
+
else
|
1795 |
+
{
|
1796 |
+
debug(conf, 'Correct insert-position not found! Appending item to the end.');
|
1797 |
+
$cfs.append(itm);
|
1798 |
+
}
|
1799 |
+
|
1800 |
+
if (orgNum != 'end' && !org)
|
1801 |
+
{
|
1802 |
+
if (num < itms.first)
|
1803 |
+
{
|
1804 |
+
itms.first += itm.length;
|
1805 |
+
}
|
1806 |
+
}
|
1807 |
+
itms.total = $cfs.children().length;
|
1808 |
+
if (itms.first >= itms.total)
|
1809 |
+
{
|
1810 |
+
itms.first -= itms.total;
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
$cfs.trigger(cf_e('updateSizes', conf));
|
1814 |
+
$cfs.trigger(cf_e('linkAnchors', conf));
|
1815 |
+
|
1816 |
+
return true;
|
1817 |
+
});
|
1818 |
+
|
1819 |
+
|
1820 |
+
// removeItem event
|
1821 |
+
$cfs.bind(cf_e('removeItem', conf), function(e, num, org, dev) {
|
1822 |
+
e.stopPropagation();
|
1823 |
+
|
1824 |
+
var v = [num, org, dev],
|
1825 |
+
t = ['string/number/object', 'boolean', 'number'],
|
1826 |
+
a = cf_sortParams(v, t);
|
1827 |
+
|
1828 |
+
num = a[0];
|
1829 |
+
org = a[1];
|
1830 |
+
dev = a[2];
|
1831 |
+
|
1832 |
+
var removed = false;
|
1833 |
+
|
1834 |
+
if (num instanceof $ && num.length > 1)
|
1835 |
+
{
|
1836 |
+
$removed = $();
|
1837 |
+
num.each(function(i, el) {
|
1838 |
+
var $rem = $cfs.trigger(cf_e('removeItem', conf), [$(this), org, dev]);
|
1839 |
+
if ( $rem )
|
1840 |
+
{
|
1841 |
+
$removed = $removed.add($rem);
|
1842 |
+
}
|
1843 |
+
});
|
1844 |
+
return $removed;
|
1845 |
+
}
|
1846 |
+
|
1847 |
+
if (is_undefined(num) || num == 'end')
|
1848 |
+
{
|
1849 |
+
$removed = $cfs.children().last();
|
1850 |
+
}
|
1851 |
+
else
|
1852 |
+
{
|
1853 |
+
num = gn_getItemIndex(num, dev, org, itms, $cfs);
|
1854 |
+
var $removed = $cfs.children().eq(num);
|
1855 |
+
if ( $removed.length )
|
1856 |
+
{
|
1857 |
+
if (num < itms.first)
|
1858 |
+
{
|
1859 |
+
itms.first -= $removed.length;
|
1860 |
+
}
|
1861 |
+
}
|
1862 |
+
}
|
1863 |
+
if ( $removed && $removed.length )
|
1864 |
+
{
|
1865 |
+
$removed.detach();
|
1866 |
+
itms.total = $cfs.children().length;
|
1867 |
+
$cfs.trigger(cf_e('updateSizes', conf));
|
1868 |
+
}
|
1869 |
+
|
1870 |
+
return $removed;
|
1871 |
+
});
|
1872 |
+
|
1873 |
+
|
1874 |
+
// onBefore and onAfter event
|
1875 |
+
$cfs.bind(cf_e('onBefore', conf)+' '+cf_e('onAfter', conf), function(e, fn) {
|
1876 |
+
e.stopPropagation();
|
1877 |
+
var eType = e.type.slice(conf.events.prefix.length);
|
1878 |
+
if (is_array(fn))
|
1879 |
+
{
|
1880 |
+
clbk[eType] = fn;
|
1881 |
+
}
|
1882 |
+
if (is_function(fn))
|
1883 |
+
{
|
1884 |
+
clbk[eType].push(fn);
|
1885 |
+
}
|
1886 |
+
return clbk[eType];
|
1887 |
+
});
|
1888 |
+
|
1889 |
+
|
1890 |
+
// currentPosition event
|
1891 |
+
$cfs.bind(cf_e('currentPosition', conf), function(e, fn) {
|
1892 |
+
e.stopPropagation();
|
1893 |
+
if (itms.first == 0)
|
1894 |
+
{
|
1895 |
+
var val = 0;
|
1896 |
+
}
|
1897 |
+
else
|
1898 |
+
{
|
1899 |
+
var val = itms.total - itms.first;
|
1900 |
+
}
|
1901 |
+
if (is_function(fn))
|
1902 |
+
{
|
1903 |
+
fn.call($tt0, val);
|
1904 |
+
}
|
1905 |
+
return val;
|
1906 |
+
});
|
1907 |
+
|
1908 |
+
|
1909 |
+
// currentPage event
|
1910 |
+
$cfs.bind(cf_e('currentPage', conf), function(e, fn) {
|
1911 |
+
e.stopPropagation();
|
1912 |
+
var ipp = opts.pagination.items || opts.items.visible,
|
1913 |
+
max = Math.ceil(itms.total/ipp-1),
|
1914 |
+
nr;
|
1915 |
+
if (itms.first == 0)
|
1916 |
+
{
|
1917 |
+
nr = 0;
|
1918 |
+
}
|
1919 |
+
else if (itms.first < itms.total % ipp)
|
1920 |
+
{
|
1921 |
+
nr = 0;
|
1922 |
+
}
|
1923 |
+
else if (itms.first == ipp && !opts.circular)
|
1924 |
+
{
|
1925 |
+
nr = max;
|
1926 |
+
}
|
1927 |
+
else
|
1928 |
+
{
|
1929 |
+
nr = Math.round((itms.total-itms.first)/ipp);
|
1930 |
+
}
|
1931 |
+
if (nr < 0)
|
1932 |
+
{
|
1933 |
+
nr = 0;
|
1934 |
+
}
|
1935 |
+
if (nr > max)
|
1936 |
+
{
|
1937 |
+
nr = max;
|
1938 |
+
}
|
1939 |
+
if (is_function(fn))
|
1940 |
+
{
|
1941 |
+
fn.call($tt0, nr);
|
1942 |
+
}
|
1943 |
+
return nr;
|
1944 |
+
});
|
1945 |
+
|
1946 |
+
|
1947 |
+
// currentVisible event
|
1948 |
+
$cfs.bind(cf_e('currentVisible', conf), function(e, fn) {
|
1949 |
+
e.stopPropagation();
|
1950 |
+
var $i = gi_getCurrentItems($cfs.children(), opts);
|
1951 |
+
if (is_function(fn))
|
1952 |
+
{
|
1953 |
+
fn.call($tt0, $i);
|
1954 |
+
}
|
1955 |
+
return $i;
|
1956 |
+
});
|
1957 |
+
|
1958 |
+
|
1959 |
+
// slice event
|
1960 |
+
$cfs.bind(cf_e('slice', conf), function(e, f, l, fn) {
|
1961 |
+
e.stopPropagation();
|
1962 |
+
|
1963 |
+
if (itms.total == 0)
|
1964 |
+
{
|
1965 |
+
return false;
|
1966 |
+
}
|
1967 |
+
|
1968 |
+
var v = [f, l, fn],
|
1969 |
+
t = ['number', 'number', 'function'],
|
1970 |
+
a = cf_sortParams(v, t);
|
1971 |
+
|
1972 |
+
f = (is_number(a[0])) ? a[0] : 0;
|
1973 |
+
l = (is_number(a[1])) ? a[1] : itms.total;
|
1974 |
+
fn = a[2];
|
1975 |
+
|
1976 |
+
f += itms.first;
|
1977 |
+
l += itms.first;
|
1978 |
+
|
1979 |
+
if (items.total > 0)
|
1980 |
+
{
|
1981 |
+
while (f > itms.total)
|
1982 |
+
{
|
1983 |
+
f -= itms.total;
|
1984 |
+
}
|
1985 |
+
while (l > itms.total)
|
1986 |
+
{
|
1987 |
+
l -= itms.total;
|
1988 |
+
}
|
1989 |
+
while (f < 0)
|
1990 |
+
{
|
1991 |
+
f += itms.total;
|
1992 |
+
}
|
1993 |
+
while (l < 0)
|
1994 |
+
{
|
1995 |
+
l += itms.total;
|
1996 |
+
}
|
1997 |
+
}
|
1998 |
+
var $iA = $cfs.children(),
|
1999 |
+
$i;
|
2000 |
+
|
2001 |
+
if (l > f)
|
2002 |
+
{
|
2003 |
+
$i = $iA.slice(f, l);
|
2004 |
+
}
|
2005 |
+
else
|
2006 |
+
{
|
2007 |
+
$i = $( $iA.slice(f, itms.total).get().concat( $iA.slice(0, l).get() ) );
|
2008 |
+
}
|
2009 |
+
|
2010 |
+
if (is_function(fn))
|
2011 |
+
{
|
2012 |
+
fn.call($tt0, $i);
|
2013 |
+
}
|
2014 |
+
return $i;
|
2015 |
+
});
|
2016 |
+
|
2017 |
+
|
2018 |
+
// isPaused, isStopped and isScrolling events
|
2019 |
+
$cfs.bind(cf_e('isPaused', conf)+' '+cf_e('isStopped', conf)+' '+cf_e('isScrolling', conf), function(e, fn) {
|
2020 |
+
e.stopPropagation();
|
2021 |
+
var eType = e.type.slice(conf.events.prefix.length),
|
2022 |
+
value = crsl[eType];
|
2023 |
+
if (is_function(fn))
|
2024 |
+
{
|
2025 |
+
fn.call($tt0, value);
|
2026 |
+
}
|
2027 |
+
return value;
|
2028 |
+
});
|
2029 |
+
|
2030 |
+
|
2031 |
+
// configuration event
|
2032 |
+
$cfs.bind(cf_e('configuration', conf), function(e, a, b, c) {
|
2033 |
+
e.stopPropagation();
|
2034 |
+
var reInit = false;
|
2035 |
+
|
2036 |
+
// return entire configuration-object
|
2037 |
+
if (is_function(a))
|
2038 |
+
{
|
2039 |
+
a.call($tt0, opts);
|
2040 |
+
}
|
2041 |
+
// set multiple options via object
|
2042 |
+
else if (is_object(a))
|
2043 |
+
{
|
2044 |
+
opts_orig = $.extend(true, {}, opts_orig, a);
|
2045 |
+
if (b !== false) reInit = true;
|
2046 |
+
else opts = $.extend(true, {}, opts, a);
|
2047 |
+
|
2048 |
+
}
|
2049 |
+
else if (!is_undefined(a))
|
2050 |
+
{
|
2051 |
+
|
2052 |
+
// callback function for specific option
|
2053 |
+
if (is_function(b))
|
2054 |
+
{
|
2055 |
+
var val = eval('opts.'+a);
|
2056 |
+
if (is_undefined(val))
|
2057 |
+
{
|
2058 |
+
val = '';
|
2059 |
+
}
|
2060 |
+
b.call($tt0, val);
|
2061 |
+
}
|
2062 |
+
// set individual option
|
2063 |
+
else if (!is_undefined(b))
|
2064 |
+
{
|
2065 |
+
if (typeof c !== 'boolean') c = true;
|
2066 |
+
eval('opts_orig.'+a+' = b');
|
2067 |
+
if (c !== false) reInit = true;
|
2068 |
+
else eval('opts.'+a+' = b');
|
2069 |
+
}
|
2070 |
+
// return value for specific option
|
2071 |
+
else
|
2072 |
+
{
|
2073 |
+
return eval('opts.'+a);
|
2074 |
+
}
|
2075 |
+
}
|
2076 |
+
if (reInit)
|
2077 |
+
{
|
2078 |
+
sz_resetMargin($cfs.children(), opts);
|
2079 |
+
FN._init(opts_orig);
|
2080 |
+
FN._bind_buttons();
|
2081 |
+
var sz = sz_setSizes($cfs, opts);
|
2082 |
+
$cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
|
2083 |
+
}
|
2084 |
+
return opts;
|
2085 |
+
});
|
2086 |
+
|
2087 |
+
|
2088 |
+
// linkAnchors event
|
2089 |
+
$cfs.bind(cf_e('linkAnchors', conf), function(e, $con, sel) {
|
2090 |
+
e.stopPropagation();
|
2091 |
+
|
2092 |
+
if (is_undefined($con))
|
2093 |
+
{
|
2094 |
+
$con = $('body');
|
2095 |
+
}
|
2096 |
+
else if (is_string($con))
|
2097 |
+
{
|
2098 |
+
$con = $($con);
|
2099 |
+
}
|
2100 |
+
if (!is_jquery($con) || $con.length == 0)
|
2101 |
+
{
|
2102 |
+
return debug(conf, 'Not a valid object.');
|
2103 |
+
}
|
2104 |
+
if (!is_string(sel))
|
2105 |
+
{
|
2106 |
+
sel = 'a.caroufredsel';
|
2107 |
+
}
|
2108 |
+
|
2109 |
+
$con.find(sel).each(function() {
|
2110 |
+
var h = this.hash || '';
|
2111 |
+
if (h.length > 0 && $cfs.children().index($(h)) != -1)
|
2112 |
+
{
|
2113 |
+
$(this).unbind('click').click(function(e) {
|
2114 |
+
e.preventDefault();
|
2115 |
+
$cfs.trigger(cf_e('slideTo', conf), h);
|
2116 |
+
});
|
2117 |
+
}
|
2118 |
+
});
|
2119 |
+
return true;
|
2120 |
+
});
|
2121 |
+
|
2122 |
+
|
2123 |
+
// updatePageStatus event
|
2124 |
+
$cfs.bind(cf_e('updatePageStatus', conf), function(e, build, sizes) {
|
2125 |
+
e.stopPropagation();
|
2126 |
+
if (!opts.pagination.container)
|
2127 |
+
{
|
2128 |
+
return;
|
2129 |
+
}
|
2130 |
+
|
2131 |
+
var ipp = opts.pagination.items || opts.items.visible,
|
2132 |
+
pgs = Math.ceil(itms.total/ipp);
|
2133 |
+
|
2134 |
+
if (build)
|
2135 |
+
{
|
2136 |
+
if (opts.pagination.anchorBuilder)
|
2137 |
+
{
|
2138 |
+
opts.pagination.container.children().remove();
|
2139 |
+
opts.pagination.container.each(function() {
|
2140 |
+
for (var a = 0; a < pgs; a++)
|
2141 |
+
{
|
2142 |
+
var i = $cfs.children().eq( gn_getItemIndex(a*ipp, 0, true, itms, $cfs) );
|
2143 |
+
$(this).append(opts.pagination.anchorBuilder.call(i[0], a+1));
|
2144 |
+
}
|
2145 |
+
});
|
2146 |
+
}
|
2147 |
+
opts.pagination.container.each(function() {
|
2148 |
+
$(this).children().unbind(opts.pagination.event).each(function(a) {
|
2149 |
+
$(this).bind(opts.pagination.event, function(e) {
|
2150 |
+
e.preventDefault();
|
2151 |
+
$cfs.trigger(cf_e('slideTo', conf), [a*ipp, -opts.pagination.deviation, true, opts.pagination]);
|
2152 |
+
});
|
2153 |
+
});
|
2154 |
+
});
|
2155 |
+
}
|
2156 |
+
|
2157 |
+
var selected = $cfs.triggerHandler(cf_e('currentPage', conf)) + opts.pagination.deviation;
|
2158 |
+
if (selected >= pgs)
|
2159 |
+
{
|
2160 |
+
selected = 0;
|
2161 |
+
}
|
2162 |
+
if (selected < 0)
|
2163 |
+
{
|
2164 |
+
selected = pgs-1;
|
2165 |
+
}
|
2166 |
+
opts.pagination.container.each(function() {
|
2167 |
+
$(this).children().removeClass(cf_c('selected', conf)).eq(selected).addClass(cf_c('selected', conf));
|
2168 |
+
});
|
2169 |
+
return true;
|
2170 |
+
});
|
2171 |
+
|
2172 |
+
|
2173 |
+
// updateSizes event
|
2174 |
+
$cfs.bind(cf_e('updateSizes', conf), function(e) {
|
2175 |
+
var vI = opts.items.visible,
|
2176 |
+
a_itm = $cfs.children(),
|
2177 |
+
avail_primary = ms_getParentSize($wrp, opts, 'width');
|
2178 |
+
|
2179 |
+
itms.total = a_itm.length;
|
2180 |
+
|
2181 |
+
if (crsl.primarySizePercentage)
|
2182 |
+
{
|
2183 |
+
opts.maxDimension = avail_primary;
|
2184 |
+
opts[opts.d['width']] = ms_getPercentage(avail_primary, crsl.primarySizePercentage);
|
2185 |
+
}
|
2186 |
+
else
|
2187 |
+
{
|
2188 |
+
opts.maxDimension = ms_getMaxDimension(opts, avail_primary);
|
2189 |
+
}
|
2190 |
+
|
2191 |
+
if (opts.responsive)
|
2192 |
+
{
|
2193 |
+
opts.items.width = opts.items.sizesConf.width;
|
2194 |
+
opts.items.height = opts.items.sizesConf.height;
|
2195 |
+
opts = in_getResponsiveValues(opts, a_itm, avail_primary);
|
2196 |
+
vI = opts.items.visible;
|
2197 |
+
sz_setResponsiveSizes(opts, a_itm);
|
2198 |
+
}
|
2199 |
+
else if (opts.items.visibleConf.variable)
|
2200 |
+
{
|
2201 |
+
vI = gn_getVisibleItemsNext(a_itm, opts, 0);
|
2202 |
+
}
|
2203 |
+
else if (opts.items.filter != '*')
|
2204 |
+
{
|
2205 |
+
vI = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
|
2206 |
+
}
|
2207 |
+
|
2208 |
+
if (!opts.circular && itms.first != 0 && vI > itms.first) {
|
2209 |
+
if (opts.items.visibleConf.variable)
|
2210 |
+
{
|
2211 |
+
var nI = gn_getVisibleItemsPrev(a_itm, opts, itms.first) - itms.first;
|
2212 |
+
}
|
2213 |
+
else if (opts.items.filter != '*')
|
2214 |
+
{
|
2215 |
+
var nI = gn_getVisibleItemsPrevFilter(a_itm, opts, itms.first) - itms.first;
|
2216 |
+
}
|
2217 |
+
else
|
2218 |
+
{
|
2219 |
+
var nI = opts.items.visible - itms.first;
|
2220 |
+
}
|
2221 |
+
debug(conf, 'Preventing non-circular: sliding '+nI+' items backward.');
|
2222 |
+
$cfs.trigger(cf_e('prev', conf), nI);
|
2223 |
+
}
|
2224 |
+
|
2225 |
+
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
|
2226 |
+
opts.items.visibleConf.old = opts.items.visible;
|
2227 |
+
opts = in_getAlignPadding(opts, a_itm);
|
2228 |
+
|
2229 |
+
var sz = sz_setSizes($cfs, opts);
|
2230 |
+
$cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
|
2231 |
+
nv_showNavi(opts, itms.total, conf);
|
2232 |
+
nv_enableNavi(opts, itms.first, conf);
|
2233 |
+
|
2234 |
+
return sz;
|
2235 |
+
});
|
2236 |
+
|
2237 |
+
|
2238 |
+
// destroy event
|
2239 |
+
$cfs.bind(cf_e('destroy', conf), function(e, orgOrder) {
|
2240 |
+
e.stopPropagation();
|
2241 |
+
tmrs = sc_clearTimers(tmrs);
|
2242 |
+
|
2243 |
+
$cfs.data('_cfs_isCarousel', false);
|
2244 |
+
$cfs.trigger(cf_e('finish', conf));
|
2245 |
+
if (orgOrder)
|
2246 |
+
{
|
2247 |
+
$cfs.trigger(cf_e('jumpToStart', conf));
|
2248 |
+
}
|
2249 |
+
sz_restoreOrigCss($cfs.children());
|
2250 |
+
sz_restoreOrigCss($cfs);
|
2251 |
+
FN._unbind_events();
|
2252 |
+
FN._unbind_buttons();
|
2253 |
+
if (conf.wrapper == 'parent')
|
2254 |
+
{
|
2255 |
+
sz_restoreOrigCss($wrp);
|
2256 |
+
}
|
2257 |
+
else
|
2258 |
+
{
|
2259 |
+
$wrp.replaceWith($cfs);
|
2260 |
+
}
|
2261 |
+
|
2262 |
+
return true;
|
2263 |
+
});
|
2264 |
+
|
2265 |
+
|
2266 |
+
// debug event
|
2267 |
+
$cfs.bind(cf_e('debug', conf), function(e) {
|
2268 |
+
debug(conf, 'Carousel width: ' + opts.width);
|
2269 |
+
debug(conf, 'Carousel height: ' + opts.height);
|
2270 |
+
debug(conf, 'Item widths: ' + opts.items.width);
|
2271 |
+
debug(conf, 'Item heights: ' + opts.items.height);
|
2272 |
+
debug(conf, 'Number of items visible: ' + opts.items.visible);
|
2273 |
+
if (opts.auto.play)
|
2274 |
+
{
|
2275 |
+
debug(conf, 'Number of items scrolled automatically: ' + opts.auto.items);
|
2276 |
+
}
|
2277 |
+
if (opts.prev.button)
|
2278 |
+
{
|
2279 |
+
debug(conf, 'Number of items scrolled backward: ' + opts.prev.items);
|
2280 |
+
}
|
2281 |
+
if (opts.next.button)
|
2282 |
+
{
|
2283 |
+
debug(conf, 'Number of items scrolled forward: ' + opts.next.items);
|
2284 |
+
}
|
2285 |
+
return conf.debug;
|
2286 |
+
});
|
2287 |
+
|
2288 |
+
|
2289 |
+
// triggerEvent, making prefixed and namespaced events accessible from outside
|
2290 |
+
$cfs.bind('_cfs_triggerEvent', function(e, n, o) {
|
2291 |
+
e.stopPropagation();
|
2292 |
+
return $cfs.triggerHandler(cf_e(n, conf), o);
|
2293 |
+
});
|
2294 |
+
}; // /bind_events
|
2295 |
+
|
2296 |
+
|
2297 |
+
FN._unbind_events = function() {
|
2298 |
+
$cfs.unbind(cf_e('', conf));
|
2299 |
+
$cfs.unbind(cf_e('', conf, false));
|
2300 |
+
$cfs.unbind('_cfs_triggerEvent');
|
2301 |
+
}; // /unbind_events
|
2302 |
+
|
2303 |
+
|
2304 |
+
FN._bind_buttons = function() {
|
2305 |
+
FN._unbind_buttons();
|
2306 |
+
nv_showNavi(opts, itms.total, conf);
|
2307 |
+
nv_enableNavi(opts, itms.first, conf);
|
2308 |
+
|
2309 |
+
if (opts.auto.pauseOnHover)
|
2310 |
+
{
|
2311 |
+
var pC = bt_pauseOnHoverConfig(opts.auto.pauseOnHover);
|
2312 |
+
$wrp.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2313 |
+
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2314 |
+
}
|
2315 |
+
|
2316 |
+
// play button
|
2317 |
+
if (opts.auto.button)
|
2318 |
+
{
|
2319 |
+
opts.auto.button.bind(cf_e(opts.auto.event, conf, false), function(e) {
|
2320 |
+
e.preventDefault();
|
2321 |
+
var ev = false,
|
2322 |
+
pC = null;
|
2323 |
+
|
2324 |
+
if (crsl.isPaused)
|
2325 |
+
{
|
2326 |
+
ev = 'play';
|
2327 |
+
}
|
2328 |
+
else if (opts.auto.pauseOnEvent)
|
2329 |
+
{
|
2330 |
+
ev = 'pause';
|
2331 |
+
pC = bt_pauseOnHoverConfig(opts.auto.pauseOnEvent);
|
2332 |
+
}
|
2333 |
+
if (ev)
|
2334 |
+
{
|
2335 |
+
$cfs.trigger(cf_e(ev, conf), pC);
|
2336 |
+
}
|
2337 |
+
});
|
2338 |
+
}
|
2339 |
+
|
2340 |
+
// prev button
|
2341 |
+
if (opts.prev.button)
|
2342 |
+
{
|
2343 |
+
opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) {
|
2344 |
+
e.preventDefault();
|
2345 |
+
$cfs.trigger(cf_e('prev', conf));
|
2346 |
+
});
|
2347 |
+
if (opts.prev.pauseOnHover)
|
2348 |
+
{
|
2349 |
+
var pC = bt_pauseOnHoverConfig(opts.prev.pauseOnHover);
|
2350 |
+
opts.prev.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2351 |
+
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2352 |
+
}
|
2353 |
+
}
|
2354 |
+
|
2355 |
+
// next butotn
|
2356 |
+
if (opts.next.button)
|
2357 |
+
{
|
2358 |
+
opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) {
|
2359 |
+
e.preventDefault();
|
2360 |
+
$cfs.trigger(cf_e('next', conf));
|
2361 |
+
});
|
2362 |
+
if (opts.next.pauseOnHover)
|
2363 |
+
{
|
2364 |
+
var pC = bt_pauseOnHoverConfig(opts.next.pauseOnHover);
|
2365 |
+
opts.next.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2366 |
+
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2367 |
+
}
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
// pagination
|
2371 |
+
if (opts.pagination.container)
|
2372 |
+
{
|
2373 |
+
if (opts.pagination.pauseOnHover)
|
2374 |
+
{
|
2375 |
+
var pC = bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);
|
2376 |
+
opts.pagination.container.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
|
2377 |
+
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
|
2378 |
+
}
|
2379 |
+
}
|
2380 |
+
|
2381 |
+
// prev/next keys
|
2382 |
+
if (opts.prev.key || opts.next.key)
|
2383 |
+
{
|
2384 |
+
$(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
|
2385 |
+
var k = e.keyCode;
|
2386 |
+
if (k == opts.next.key)
|
2387 |
+
{
|
2388 |
+
e.preventDefault();
|
2389 |
+
$cfs.trigger(cf_e('next', conf));
|
2390 |
+
}
|
2391 |
+
if (k == opts.prev.key)
|
2392 |
+
{
|
2393 |
+
e.preventDefault();
|
2394 |
+
$cfs.trigger(cf_e('prev', conf));
|
2395 |
+
}
|
2396 |
+
});
|
2397 |
+
}
|
2398 |
+
|
2399 |
+
// pagination keys
|
2400 |
+
if (opts.pagination.keys)
|
2401 |
+
{
|
2402 |
+
$(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
|
2403 |
+
var k = e.keyCode;
|
2404 |
+
if (k >= 49 && k < 58)
|
2405 |
+
{
|
2406 |
+
k = (k-49) * opts.items.visible;
|
2407 |
+
if (k <= itms.total)
|
2408 |
+
{
|
2409 |
+
e.preventDefault();
|
2410 |
+
$cfs.trigger(cf_e('slideTo', conf), [k, 0, true, opts.pagination]);
|
2411 |
+
}
|
2412 |
+
}
|
2413 |
+
});
|
2414 |
+
}
|
2415 |
+
|
2416 |
+
// swipe
|
2417 |
+
if ($.fn.swipe)
|
2418 |
+
{
|
2419 |
+
var isTouch = 'ontouchstart' in window;
|
2420 |
+
if ((isTouch && opts.swipe.onTouch) || (!isTouch && opts.swipe.onMouse))
|
2421 |
+
{
|
2422 |
+
var scP = $.extend(true, {}, opts.prev, opts.swipe),
|
2423 |
+
scN = $.extend(true, {}, opts.next, opts.swipe),
|
2424 |
+
swP = function() { $cfs.trigger(cf_e('prev', conf), [scP]) },
|
2425 |
+
swN = function() { $cfs.trigger(cf_e('next', conf), [scN]) };
|
2426 |
+
|
2427 |
+
switch (opts.direction)
|
2428 |
+
{
|
2429 |
+
case 'up':
|
2430 |
+
case 'down':
|
2431 |
+
opts.swipe.options.swipeUp = swN;
|
2432 |
+
opts.swipe.options.swipeDown = swP;
|
2433 |
+
break;
|
2434 |
+
default:
|
2435 |
+
opts.swipe.options.swipeLeft = swN;
|
2436 |
+
opts.swipe.options.swipeRight = swP;
|
2437 |
+
}
|
2438 |
+
if (crsl.swipe)
|
2439 |
+
{
|
2440 |
+
$cfs.swipe('destroy');
|
2441 |
+
}
|
2442 |
+
$wrp.swipe(opts.swipe.options);
|
2443 |
+
$wrp.css('cursor', 'move');
|
2444 |
+
crsl.swipe = true;
|
2445 |
+
}
|
2446 |
+
}
|
2447 |
+
|
2448 |
+
// mousewheel
|
2449 |
+
if ($.fn.mousewheel)
|
2450 |
+
{
|
2451 |
+
|
2452 |
+
if (opts.mousewheel)
|
2453 |
+
{
|
2454 |
+
var mcP = $.extend(true, {}, opts.prev, opts.mousewheel),
|
2455 |
+
mcN = $.extend(true, {}, opts.next, opts.mousewheel);
|
2456 |
+
|
2457 |
+
if (crsl.mousewheel)
|
2458 |
+
{
|
2459 |
+
$wrp.unbind(cf_e('mousewheel', conf, false));
|
2460 |
+
}
|
2461 |
+
$wrp.bind(cf_e('mousewheel', conf, false), function(e, delta) {
|
2462 |
+
e.preventDefault();
|
2463 |
+
if (delta > 0)
|
2464 |
+
{
|
2465 |
+
$cfs.trigger(cf_e('prev', conf), [mcP]);
|
2466 |
+
}
|
2467 |
+
else
|
2468 |
+
{
|
2469 |
+
$cfs.trigger(cf_e('next', conf), [mcN]);
|
2470 |
+
}
|
2471 |
+
});
|
2472 |
+
crsl.mousewheel = true;
|
2473 |
+
}
|
2474 |
+
}
|
2475 |
+
|
2476 |
+
if (opts.auto.play)
|
2477 |
+
{
|
2478 |
+
$cfs.trigger(cf_e('play', conf), opts.auto.delay);
|
2479 |
+
}
|
2480 |
+
|
2481 |
+
if (crsl.upDateOnWindowResize)
|
2482 |
+
{
|
2483 |
+
var resizeFn = function(e) {
|
2484 |
+
$cfs.trigger(cf_e('finish', conf));
|
2485 |
+
if (opts.auto.pauseOnResize && !crsl.isPaused)
|
2486 |
+
{
|
2487 |
+
$cfs.trigger(cf_e('play', conf));
|
2488 |
+
}
|
2489 |
+
sz_resetMargin($cfs.children(), opts);
|
2490 |
+
$cfs.trigger(cf_e('updateSizes', conf));
|
2491 |
+
};
|
2492 |
+
|
2493 |
+
var $w = $(window),
|
2494 |
+
onResize = null;
|
2495 |
+
|
2496 |
+
if ($.debounce && conf.onWindowResize == 'debounce')
|
2497 |
+
{
|
2498 |
+
onResize = $.debounce(200, resizeFn);
|
2499 |
+
}
|
2500 |
+
else if ($.throttle && conf.onWindowResize == 'throttle')
|
2501 |
+
{
|
2502 |
+
onResize = $.throttle(300, resizeFn);
|
2503 |
+
}
|
2504 |
+
else
|
2505 |
+
{
|
2506 |
+
var _windowWidth = 0,
|
2507 |
+
_windowHeight = 0;
|
2508 |
+
|
2509 |
+
onResize = function() {
|
2510 |
+
var nw = $w.width(),
|
2511 |
+
nh = $w.height();
|
2512 |
+
|
2513 |
+
if (nw != _windowWidth || nh != _windowHeight)
|
2514 |
+
{
|
2515 |
+
resizeFn();
|
2516 |
+
_windowWidth = nw;
|
2517 |
+
_windowHeight = nh;
|
2518 |
+
}
|
2519 |
+
};
|
2520 |
+
}
|
2521 |
+
$w.bind(cf_e('resize', conf, false, true, true), onResize);
|
2522 |
+
}
|
2523 |
+
}; // /bind_buttons
|
2524 |
+
|
2525 |
+
|
2526 |
+
FN._unbind_buttons = function() {
|
2527 |
+
var ns1 = cf_e('', conf),
|
2528 |
+
ns2 = cf_e('', conf, false);
|
2529 |
+
ns3 = cf_e('', conf, false, true, true);
|
2530 |
+
|
2531 |
+
$(document).unbind(ns3);
|
2532 |
+
$(window).unbind(ns3);
|
2533 |
+
$wrp.unbind(ns2);
|
2534 |
+
|
2535 |
+
if (opts.auto.button)
|
2536 |
+
{
|
2537 |
+
opts.auto.button.unbind(ns2);
|
2538 |
+
}
|
2539 |
+
if (opts.prev.button)
|
2540 |
+
{
|
2541 |
+
opts.prev.button.unbind(ns2);
|
2542 |
+
}
|
2543 |
+
if (opts.next.button)
|
2544 |
+
{
|
2545 |
+
opts.next.button.unbind(ns2);
|
2546 |
+
}
|
2547 |
+
if (opts.pagination.container)
|
2548 |
+
{
|
2549 |
+
opts.pagination.container.unbind(ns2);
|
2550 |
+
if (opts.pagination.anchorBuilder)
|
2551 |
+
{
|
2552 |
+
opts.pagination.container.children().remove();
|
2553 |
+
}
|
2554 |
+
}
|
2555 |
+
if (crsl.swipe)
|
2556 |
+
{
|
2557 |
+
$cfs.swipe('destroy');
|
2558 |
+
$wrp.css('cursor', 'default');
|
2559 |
+
crsl.swipe = false;
|
2560 |
+
}
|
2561 |
+
if (crsl.mousewheel)
|
2562 |
+
{
|
2563 |
+
crsl.mousewheel = false;
|
2564 |
+
}
|
2565 |
+
|
2566 |
+
nv_showNavi(opts, 'hide', conf);
|
2567 |
+
nv_enableNavi(opts, 'removeClass', conf);
|
2568 |
+
|
2569 |
+
}; // /unbind_buttons
|
2570 |
+
|
2571 |
+
|
2572 |
+
|
2573 |
+
// START
|
2574 |
+
|
2575 |
+
if (is_boolean(configs))
|
2576 |
+
{
|
2577 |
+
configs = {
|
2578 |
+
'debug': configs
|
2579 |
+
};
|
2580 |
+
}
|
2581 |
+
|
2582 |
+
// set vars
|
2583 |
+
var crsl = {
|
2584 |
+
'direction' : 'next',
|
2585 |
+
'isPaused' : true,
|
2586 |
+
'isScrolling' : false,
|
2587 |
+
'isStopped' : false,
|
2588 |
+
'mousewheel' : false,
|
2589 |
+
'swipe' : false
|
2590 |
+
},
|
2591 |
+
itms = {
|
2592 |
+
'total' : $cfs.children().length,
|
2593 |
+
'first' : 0
|
2594 |
+
},
|
2595 |
+
tmrs = {
|
2596 |
+
'auto' : null,
|
2597 |
+
'progress' : null,
|
2598 |
+
'startTime' : getTime(),
|
2599 |
+
'timePassed' : 0
|
2600 |
+
},
|
2601 |
+
scrl = {
|
2602 |
+
'isStopped' : false,
|
2603 |
+
'duration' : 0,
|
2604 |
+
'startTime' : 0,
|
2605 |
+
'easing' : '',
|
2606 |
+
'anims' : []
|
2607 |
+
},
|
2608 |
+
clbk = {
|
2609 |
+
'onBefore' : [],
|
2610 |
+
'onAfter' : []
|
2611 |
+
},
|
2612 |
+
queu = [],
|
2613 |
+
conf = $.extend(true, {}, $.fn.carouFredSel.configs, configs),
|
2614 |
+
opts = {},
|
2615 |
+
opts_orig = $.extend(true, {}, options),
|
2616 |
+
$wrp = (conf.wrapper == 'parent')
|
2617 |
+
? $cfs.parent()
|
2618 |
+
: $cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();
|
2619 |
+
|
2620 |
+
|
2621 |
+
conf.selector = $cfs.selector;
|
2622 |
+
conf.serialNumber = $.fn.carouFredSel.serialNumber++;
|
2623 |
+
|
2624 |
+
conf.transition = (conf.transition && $.fn.transition) ? 'transition' : 'animate';
|
2625 |
+
|
2626 |
+
// create carousel
|
2627 |
+
FN._init(opts_orig, true, starting_position);
|
2628 |
+
FN._build();
|
2629 |
+
FN._bind_events();
|
2630 |
+
FN._bind_buttons();
|
2631 |
+
|
2632 |
+
// find item to start
|
2633 |
+
if (is_array(opts.items.start))
|
2634 |
+
{
|
2635 |
+
var start_arr = opts.items.start;
|
2636 |
+
}
|
2637 |
+
else
|
2638 |
+
{
|
2639 |
+
var start_arr = [];
|
2640 |
+
if (opts.items.start != 0)
|
2641 |
+
{
|
2642 |
+
start_arr.push(opts.items.start);
|
2643 |
+
}
|
2644 |
+
}
|
2645 |
+
if (opts.cookie)
|
2646 |
+
{
|
2647 |
+
start_arr.unshift(parseInt(cf_getCookie(opts.cookie), 10));
|
2648 |
+
}
|
2649 |
+
|
2650 |
+
if (start_arr.length > 0)
|
2651 |
+
{
|
2652 |
+
for (var a = 0, l = start_arr.length; a < l; a++)
|
2653 |
+
{
|
2654 |
+
var s = start_arr[a];
|
2655 |
+
if (s == 0)
|
2656 |
+
{
|
2657 |
+
continue;
|
2658 |
+
}
|
2659 |
+
if (s === true)
|
2660 |
+
{
|
2661 |
+
s = window.location.hash;
|
2662 |
+
if (s.length < 1)
|
2663 |
+
{
|
2664 |
+
continue;
|
2665 |
+
}
|
2666 |
+
}
|
2667 |
+
else if (s === 'random')
|
2668 |
+
{
|
2669 |
+
s = Math.floor(Math.random()*itms.total);
|
2670 |
+
}
|
2671 |
+
if ($cfs.triggerHandler(cf_e('slideTo', conf), [s, 0, true, { fx: 'none' }]))
|
2672 |
+
{
|
2673 |
+
break;
|
2674 |
+
}
|
2675 |
+
}
|
2676 |
+
}
|
2677 |
+
var siz = sz_setSizes($cfs, opts),
|
2678 |
+
itm = gi_getCurrentItems($cfs.children(), opts);
|
2679 |
+
|
2680 |
+
if (opts.onCreate)
|
2681 |
+
{
|
2682 |
+
opts.onCreate.call($tt0, {
|
2683 |
+
'width': siz.width,
|
2684 |
+
'height': siz.height,
|
2685 |
+
'items': itm
|
2686 |
+
});
|
2687 |
+
}
|
2688 |
+
|
2689 |
+
$cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
|
2690 |
+
$cfs.trigger(cf_e('linkAnchors', conf));
|
2691 |
+
|
2692 |
+
if (conf.debug)
|
2693 |
+
{
|
2694 |
+
$cfs.trigger(cf_e('debug', conf));
|
2695 |
+
}
|
2696 |
+
|
2697 |
+
return $cfs;
|
2698 |
+
};
|
2699 |
+
|
2700 |
+
|
2701 |
+
|
2702 |
+
// GLOBAL PUBLIC
|
2703 |
+
|
2704 |
+
$.fn.carouFredSel.serialNumber = 1;
|
2705 |
+
$.fn.carouFredSel.defaults = {
|
2706 |
+
'synchronise' : false,
|
2707 |
+
'infinite' : true,
|
2708 |
+
'circular' : true,
|
2709 |
+
'responsive' : false,
|
2710 |
+
'direction' : 'left',
|
2711 |
+
'items' : {
|
2712 |
+
'start' : 0
|
2713 |
+
},
|
2714 |
+
'scroll' : {
|
2715 |
+
'easing' : 'swing',
|
2716 |
+
'duration' : 500,
|
2717 |
+
'pauseOnHover' : false,
|
2718 |
+
'event' : 'click',
|
2719 |
+
'queue' : false
|
2720 |
+
}
|
2721 |
+
};
|
2722 |
+
$.fn.carouFredSel.configs = {
|
2723 |
+
'debug' : false,
|
2724 |
+
'transition' : false,
|
2725 |
+
'onWindowResize': 'throttle',
|
2726 |
+
'events' : {
|
2727 |
+
'prefix' : '',
|
2728 |
+
'namespace' : 'cfs'
|
2729 |
+
},
|
2730 |
+
'wrapper' : {
|
2731 |
+
'element' : 'div',
|
2732 |
+
'classname' : 'caroufredsel_wrapper'
|
2733 |
+
},
|
2734 |
+
'classnames' : {}
|
2735 |
+
};
|
2736 |
+
$.fn.carouFredSel.pageAnchorBuilder = function(nr) {
|
2737 |
+
return '<a href="#"><span>'+nr+'</span></a>';
|
2738 |
+
};
|
2739 |
+
$.fn.carouFredSel.progressbarUpdater = function(perc) {
|
2740 |
+
$(this).css('width', perc+'%');
|
2741 |
+
};
|
2742 |
+
|
2743 |
+
$.fn.carouFredSel.cookie = {
|
2744 |
+
get: function(n) {
|
2745 |
+
n += '=';
|
2746 |
+
var ca = document.cookie.split(';');
|
2747 |
+
for (var a = 0, l = ca.length; a < l; a++)
|
2748 |
+
{
|
2749 |
+
var c = ca[a];
|
2750 |
+
while (c.charAt(0) == ' ')
|
2751 |
+
{
|
2752 |
+
c = c.slice(1);
|
2753 |
+
}
|
2754 |
+
if (c.indexOf(n) == 0)
|
2755 |
+
{
|
2756 |
+
return c.slice(n.length);
|
2757 |
+
}
|
2758 |
+
}
|
2759 |
+
return 0;
|
2760 |
+
},
|
2761 |
+
set: function(n, v, d) {
|
2762 |
+
var e = "";
|
2763 |
+
if (d)
|
2764 |
+
{
|
2765 |
+
var date = new Date();
|
2766 |
+
date.setTime(date.getTime() + (d * 24 * 60 * 60 * 1000));
|
2767 |
+
e = "; expires=" + date.toGMTString();
|
2768 |
+
}
|
2769 |
+
document.cookie = n + '=' + v + e + '; path=/';
|
2770 |
+
},
|
2771 |
+
remove: function(n) {
|
2772 |
+
$.fn.carouFredSel.cookie.set(n, "", -1);
|
2773 |
+
}
|
2774 |
+
};
|
2775 |
+
|
2776 |
+
|
2777 |
+
// GLOBAL PRIVATE
|
2778 |
+
|
2779 |
+
// scrolling functions
|
2780 |
+
function sc_setScroll(d, e, c) {
|
2781 |
+
if (c.transition == 'transition')
|
2782 |
+
{
|
2783 |
+
if (e == 'swing')
|
2784 |
+
{
|
2785 |
+
e = 'ease';
|
2786 |
+
}
|
2787 |
+
}
|
2788 |
+
return {
|
2789 |
+
anims: [],
|
2790 |
+
duration: d,
|
2791 |
+
orgDuration: d,
|
2792 |
+
easing: e,
|
2793 |
+
startTime: getTime()
|
2794 |
+
};
|
2795 |
+
}
|
2796 |
+
function sc_startScroll(s, c) {
|
2797 |
+
for (var a = 0, l = s.anims.length; a < l; a++)
|
2798 |
+
{
|
2799 |
+
var b = s.anims[a];
|
2800 |
+
if (!b)
|
2801 |
+
{
|
2802 |
+
continue;
|
2803 |
+
}
|
2804 |
+
b[0][c.transition](b[1], s.duration, s.easing, b[2]);
|
2805 |
+
}
|
2806 |
+
}
|
2807 |
+
function sc_stopScroll(s, finish) {
|
2808 |
+
if (!is_boolean(finish))
|
2809 |
+
{
|
2810 |
+
finish = true;
|
2811 |
+
}
|
2812 |
+
if (is_object(s.pre))
|
2813 |
+
{
|
2814 |
+
sc_stopScroll(s.pre, finish);
|
2815 |
+
}
|
2816 |
+
for (var a = 0, l = s.anims.length; a < l; a++)
|
2817 |
+
{
|
2818 |
+
var b = s.anims[a];
|
2819 |
+
b[0].stop(true);
|
2820 |
+
if (finish)
|
2821 |
+
{
|
2822 |
+
b[0].css(b[1]);
|
2823 |
+
if (is_function(b[2]))
|
2824 |
+
{
|
2825 |
+
b[2]();
|
2826 |
+
}
|
2827 |
+
}
|
2828 |
+
}
|
2829 |
+
if (is_object(s.post))
|
2830 |
+
{
|
2831 |
+
sc_stopScroll(s.post, finish);
|
2832 |
+
}
|
2833 |
+
}
|
2834 |
+
function sc_afterScroll( $c, $c2, o ) {
|
2835 |
+
if ($c2)
|
2836 |
+
{
|
2837 |
+
$c2.remove();
|
2838 |
+
}
|
2839 |
+
|
2840 |
+
switch(o.fx) {
|
2841 |
+
case 'fade':
|
2842 |
+
case 'crossfade':
|
2843 |
+
case 'cover-fade':
|
2844 |
+
case 'uncover-fade':
|
2845 |
+
$c.css('opacity', 1);
|
2846 |
+
$c.css('filter', '');
|
2847 |
+
break;
|
2848 |
+
}
|
2849 |
+
}
|
2850 |
+
function sc_fireCallbacks($t, o, b, a, c) {
|
2851 |
+
if (o[b])
|
2852 |
+
{
|
2853 |
+
o[b].call($t, a);
|
2854 |
+
}
|
2855 |
+
if (c[b].length)
|
2856 |
+
{
|
2857 |
+
for (var i = 0, l = c[b].length; i < l; i++)
|
2858 |
+
{
|
2859 |
+
c[b][i].call($t, a);
|
2860 |
+
}
|
2861 |
+
}
|
2862 |
+
return [];
|
2863 |
+
}
|
2864 |
+
function sc_fireQueue($c, q, c) {
|
2865 |
+
|
2866 |
+
if (q.length)
|
2867 |
+
{
|
2868 |
+
$c.trigger(cf_e(q[0][0], c), q[0][1]);
|
2869 |
+
q.shift();
|
2870 |
+
}
|
2871 |
+
return q;
|
2872 |
+
}
|
2873 |
+
function sc_hideHiddenItems(hiddenitems) {
|
2874 |
+
hiddenitems.each(function() {
|
2875 |
+
var hi = $(this);
|
2876 |
+
hi.data('_cfs_isHidden', hi.is(':hidden')).hide();
|
2877 |
+
});
|
2878 |
+
}
|
2879 |
+
function sc_showHiddenItems(hiddenitems) {
|
2880 |
+
if (hiddenitems)
|
2881 |
+
{
|
2882 |
+
hiddenitems.each(function() {
|
2883 |
+
var hi = $(this);
|
2884 |
+
if (!hi.data('_cfs_isHidden'))
|
2885 |
+
{
|
2886 |
+
hi.show();
|
2887 |
+
}
|
2888 |
+
});
|
2889 |
+
}
|
2890 |
+
}
|
2891 |
+
function sc_clearTimers(t) {
|
2892 |
+
if (t.auto)
|
2893 |
+
{
|
2894 |
+
clearTimeout(t.auto);
|
2895 |
+
}
|
2896 |
+
if (t.progress)
|
2897 |
+
{
|
2898 |
+
clearInterval(t.progress);
|
2899 |
+
}
|
2900 |
+
return t;
|
2901 |
+
}
|
2902 |
+
function sc_mapCallbackArguments(i_old, i_skp, i_new, s_itm, s_dir, s_dur, w_siz) {
|
2903 |
+
return {
|
2904 |
+
'width': w_siz.width,
|
2905 |
+
'height': w_siz.height,
|
2906 |
+
'items': {
|
2907 |
+
'old': i_old,
|
2908 |
+
'skipped': i_skp,
|
2909 |
+
'visible': i_new
|
2910 |
+
},
|
2911 |
+
'scroll': {
|
2912 |
+
'items': s_itm,
|
2913 |
+
'direction': s_dir,
|
2914 |
+
'duration': s_dur
|
2915 |
+
}
|
2916 |
+
};
|
2917 |
+
}
|
2918 |
+
function sc_getDuration( sO, o, nI, siz ) {
|
2919 |
+
var dur = sO.duration;
|
2920 |
+
if (sO.fx == 'none')
|
2921 |
+
{
|
2922 |
+
return 0;
|
2923 |
+
}
|
2924 |
+
if (dur == 'auto')
|
2925 |
+
{
|
2926 |
+
dur = o.scroll.duration / o.scroll.items * nI;
|
2927 |
+
}
|
2928 |
+
else if (dur < 10)
|
2929 |
+
{
|
2930 |
+
dur = siz / dur;
|
2931 |
+
}
|
2932 |
+
if (dur < 1)
|
2933 |
+
{
|
2934 |
+
return 0;
|
2935 |
+
}
|
2936 |
+
if (sO.fx == 'fade')
|
2937 |
+
{
|
2938 |
+
dur = dur / 2;
|
2939 |
+
}
|
2940 |
+
return Math.round(dur);
|
2941 |
+
}
|
2942 |
+
|
2943 |
+
// navigation functions
|
2944 |
+
function nv_showNavi(o, t, c) {
|
2945 |
+
var minimum = (is_number(o.items.minimum)) ? o.items.minimum : o.items.visible + 1;
|
2946 |
+
if (t == 'show' || t == 'hide')
|
2947 |
+
{
|
2948 |
+
var f = t;
|
2949 |
+
}
|
2950 |
+
else if (minimum > t)
|
2951 |
+
{
|
2952 |
+
debug(c, 'Not enough items ('+t+' total, '+minimum+' needed): Hiding navigation.');
|
2953 |
+
var f = 'hide';
|
2954 |
+
}
|
2955 |
+
else
|
2956 |
+
{
|
2957 |
+
var f = 'show';
|
2958 |
+
}
|
2959 |
+
var s = (f == 'show') ? 'removeClass' : 'addClass',
|
2960 |
+
h = cf_c('hidden', c);
|
2961 |
+
|
2962 |
+
if (o.auto.button)
|
2963 |
+
{
|
2964 |
+
o.auto.button[f]()[s](h);
|
2965 |
+
}
|
2966 |
+
if (o.prev.button)
|
2967 |
+
{
|
2968 |
+
o.prev.button[f]()[s](h);
|
2969 |
+
}
|
2970 |
+
if (o.next.button)
|
2971 |
+
{
|
2972 |
+
o.next.button[f]()[s](h);
|
2973 |
+
}
|
2974 |
+
if (o.pagination.container)
|
2975 |
+
{
|
2976 |
+
o.pagination.container[f]()[s](h);
|
2977 |
+
}
|
2978 |
+
}
|
2979 |
+
function nv_enableNavi(o, f, c) {
|
2980 |
+
if (o.circular || o.infinite) return;
|
2981 |
+
var fx = (f == 'removeClass' || f == 'addClass') ? f : false,
|
2982 |
+
di = cf_c('disabled', c);
|
2983 |
+
|
2984 |
+
if (o.auto.button && fx)
|
2985 |
+
{
|
2986 |
+
o.auto.button[fx](di);
|
2987 |
+
}
|
2988 |
+
if (o.prev.button)
|
2989 |
+
{
|
2990 |
+
var fn = fx || (f == 0) ? 'addClass' : 'removeClass';
|
2991 |
+
o.prev.button[fn](di);
|
2992 |
+
}
|
2993 |
+
if (o.next.button)
|
2994 |
+
{
|
2995 |
+
var fn = fx || (f == o.items.visible) ? 'addClass' : 'removeClass';
|
2996 |
+
o.next.button[fn](di);
|
2997 |
+
}
|
2998 |
+
}
|
2999 |
+
|
3000 |
+
// get object functions
|
3001 |
+
function go_getObject($tt, obj) {
|
3002 |
+
if (is_function(obj))
|
3003 |
+
{
|
3004 |
+
obj = obj.call($tt);
|
3005 |
+
}
|
3006 |
+
else if (is_undefined(obj))
|
3007 |
+
{
|
3008 |
+
obj = {};
|
3009 |
+
}
|
3010 |
+
return obj;
|
3011 |
+
}
|
3012 |
+
function go_getItemsObject($tt, obj) {
|
3013 |
+
obj = go_getObject($tt, obj);
|
3014 |
+
if (is_number(obj))
|
3015 |
+
{
|
3016 |
+
obj = {
|
3017 |
+
'visible': obj
|
3018 |
+
};
|
3019 |
+
}
|
3020 |
+
else if (obj == 'variable')
|
3021 |
+
{
|
3022 |
+
obj = {
|
3023 |
+
'visible': obj,
|
3024 |
+
'width': obj,
|
3025 |
+
'height': obj
|
3026 |
+
};
|
3027 |
+
}
|
3028 |
+
else if (!is_object(obj))
|
3029 |
+
{
|
3030 |
+
obj = {};
|
3031 |
+
}
|
3032 |
+
return obj;
|
3033 |
+
}
|
3034 |
+
function go_getScrollObject($tt, obj) {
|
3035 |
+
obj = go_getObject($tt, obj);
|
3036 |
+
if (is_number(obj))
|
3037 |
+
{
|
3038 |
+
if (obj <= 50)
|
3039 |
+
{
|
3040 |
+
obj = {
|
3041 |
+
'items': obj
|
3042 |
+
};
|
3043 |
+
}
|
3044 |
+
else
|
3045 |
+
{
|
3046 |
+
obj = {
|
3047 |
+
'duration': obj
|
3048 |
+
};
|
3049 |
+
}
|
3050 |
+
}
|
3051 |
+
else if (is_string(obj))
|
3052 |
+
{
|
3053 |
+
obj = {
|
3054 |
+
'easing': obj
|
3055 |
+
};
|
3056 |
+
}
|
3057 |
+
else if (!is_object(obj))
|
3058 |
+
{
|
3059 |
+
obj = {};
|
3060 |
+
}
|
3061 |
+
return obj;
|
3062 |
+
}
|
3063 |
+
function go_getNaviObject($tt, obj) {
|
3064 |
+
obj = go_getObject($tt, obj);
|
3065 |
+
if (is_string(obj))
|
3066 |
+
{
|
3067 |
+
var temp = cf_getKeyCode(obj);
|
3068 |
+
if (temp == -1)
|
3069 |
+
{
|
3070 |
+
obj = $(obj);
|
3071 |
+
}
|
3072 |
+
else
|
3073 |
+
{
|
3074 |
+
obj = temp;
|
3075 |
+
}
|
3076 |
+
}
|
3077 |
+
return obj;
|
3078 |
+
}
|
3079 |
+
|
3080 |
+
function go_getAutoObject($tt, obj) {
|
3081 |
+
obj = go_getNaviObject($tt, obj);
|
3082 |
+
if (is_jquery(obj))
|
3083 |
+
{
|
3084 |
+
obj = {
|
3085 |
+
'button': obj
|
3086 |
+
};
|
3087 |
+
}
|
3088 |
+
else if (is_boolean(obj))
|
3089 |
+
{
|
3090 |
+
obj = {
|
3091 |
+
'play': obj
|
3092 |
+
};
|
3093 |
+
}
|
3094 |
+
else if (is_number(obj))
|
3095 |
+
{
|
3096 |
+
obj = {
|
3097 |
+
'timeoutDuration': obj
|
3098 |
+
};
|
3099 |
+
}
|
3100 |
+
if (obj.progress)
|
3101 |
+
{
|
3102 |
+
if (is_string(obj.progress) || is_jquery(obj.progress))
|
3103 |
+
{
|
3104 |
+
obj.progress = {
|
3105 |
+
'bar': obj.progress
|
3106 |
+
};
|
3107 |
+
}
|
3108 |
+
}
|
3109 |
+
return obj;
|
3110 |
+
}
|
3111 |
+
function go_complementAutoObject($tt, obj) {
|
3112 |
+
if (is_function(obj.button))
|
3113 |
+
{
|
3114 |
+
obj.button = obj.button.call($tt);
|
3115 |
+
}
|
3116 |
+
if (is_string(obj.button))
|
3117 |
+
{
|
3118 |
+
obj.button = $(obj.button);
|
3119 |
+
}
|
3120 |
+
if (!is_boolean(obj.play))
|
3121 |
+
{
|
3122 |
+
obj.play = true;
|
3123 |
+
}
|
3124 |
+
if (!is_number(obj.delay))
|
3125 |
+
{
|
3126 |
+
obj.delay = 0;
|
3127 |
+
}
|
3128 |
+
if (is_undefined(obj.pauseOnEvent))
|
3129 |
+
{
|
3130 |
+
obj.pauseOnEvent = true;
|
3131 |
+
}
|
3132 |
+
if (!is_boolean(obj.pauseOnResize))
|
3133 |
+
{
|
3134 |
+
obj.pauseOnResize = true;
|
3135 |
+
}
|
3136 |
+
if (!is_number(obj.timeoutDuration))
|
3137 |
+
{
|
3138 |
+
obj.timeoutDuration = (obj.duration < 10)
|
3139 |
+
? 2500
|
3140 |
+
: obj.duration * 5;
|
3141 |
+
}
|
3142 |
+
if (obj.progress)
|
3143 |
+
{
|
3144 |
+
if (is_function(obj.progress.bar))
|
3145 |
+
{
|
3146 |
+
obj.progress.bar = obj.progress.bar.call($tt);
|
3147 |
+
}
|
3148 |
+
if (is_string(obj.progress.bar))
|
3149 |
+
{
|
3150 |
+
obj.progress.bar = $(obj.progress.bar);
|
3151 |
+
}
|
3152 |
+
if (obj.progress.bar)
|
3153 |
+
{
|
3154 |
+
if (!is_function(obj.progress.updater))
|
3155 |
+
{
|
3156 |
+
obj.progress.updater = $.fn.carouFredSel.progressbarUpdater;
|
3157 |
+
}
|
3158 |
+
if (!is_number(obj.progress.interval))
|
3159 |
+
{
|
3160 |
+
obj.progress.interval = 50;
|
3161 |
+
}
|
3162 |
+
}
|
3163 |
+
else
|
3164 |
+
{
|
3165 |
+
obj.progress = false;
|
3166 |
+
}
|
3167 |
+
}
|
3168 |
+
return obj;
|
3169 |
+
}
|
3170 |
+
|
3171 |
+
function go_getPrevNextObject($tt, obj) {
|
3172 |
+
obj = go_getNaviObject($tt, obj);
|
3173 |
+
if (is_jquery(obj))
|
3174 |
+
{
|
3175 |
+
obj = {
|
3176 |
+
'button': obj
|
3177 |
+
};
|
3178 |
+
}
|
3179 |
+
else if (is_number(obj))
|
3180 |
+
{
|
3181 |
+
obj = {
|
3182 |
+
'key': obj
|
3183 |
+
};
|
3184 |
+
}
|
3185 |
+
return obj;
|
3186 |
+
}
|
3187 |
+
function go_complementPrevNextObject($tt, obj) {
|
3188 |
+
if (is_function(obj.button))
|
3189 |
+
{
|
3190 |
+
obj.button = obj.button.call($tt);
|
3191 |
+
}
|
3192 |
+
if (is_string(obj.button))
|
3193 |
+
{
|
3194 |
+
obj.button = $(obj.button);
|
3195 |
+
}
|
3196 |
+
if (is_string(obj.key))
|
3197 |
+
{
|
3198 |
+
obj.key = cf_getKeyCode(obj.key);
|
3199 |
+
}
|
3200 |
+
return obj;
|
3201 |
+
}
|
3202 |
+
|
3203 |
+
function go_getPaginationObject($tt, obj) {
|
3204 |
+
obj = go_getNaviObject($tt, obj);
|
3205 |
+
if (is_jquery(obj))
|
3206 |
+
{
|
3207 |
+
obj = {
|
3208 |
+
'container': obj
|
3209 |
+
};
|
3210 |
+
}
|
3211 |
+
else if (is_boolean(obj))
|
3212 |
+
{
|
3213 |
+
obj = {
|
3214 |
+
'keys': obj
|
3215 |
+
};
|
3216 |
+
}
|
3217 |
+
return obj;
|
3218 |
+
}
|
3219 |
+
function go_complementPaginationObject($tt, obj) {
|
3220 |
+
if (is_function(obj.container))
|
3221 |
+
{
|
3222 |
+
obj.container = obj.container.call($tt);
|
3223 |
+
}
|
3224 |
+
if (is_string(obj.container))
|
3225 |
+
{
|
3226 |
+
obj.container = $(obj.container);
|
3227 |
+
}
|
3228 |
+
if (!is_number(obj.items))
|
3229 |
+
{
|
3230 |
+
obj.items = false;
|
3231 |
+
}
|
3232 |
+
if (!is_boolean(obj.keys))
|
3233 |
+
{
|
3234 |
+
obj.keys = false;
|
3235 |
+
}
|
3236 |
+
if (!is_function(obj.anchorBuilder) && !is_false(obj.anchorBuilder))
|
3237 |
+
{
|
3238 |
+
obj.anchorBuilder = $.fn.carouFredSel.pageAnchorBuilder;
|
3239 |
+
}
|
3240 |
+
if (!is_number(obj.deviation))
|
3241 |
+
{
|
3242 |
+
obj.deviation = 0;
|
3243 |
+
}
|
3244 |
+
return obj;
|
3245 |
+
}
|
3246 |
+
|
3247 |
+
function go_getSwipeObject($tt, obj) {
|
3248 |
+
if (is_function(obj))
|
3249 |
+
{
|
3250 |
+
obj = obj.call($tt);
|
3251 |
+
}
|
3252 |
+
if (is_undefined(obj))
|
3253 |
+
{
|
3254 |
+
obj = {
|
3255 |
+
'onTouch': false
|
3256 |
+
};
|
3257 |
+
}
|
3258 |
+
if (is_true(obj))
|
3259 |
+
{
|
3260 |
+
obj = {
|
3261 |
+
'onTouch': obj
|
3262 |
+
};
|
3263 |
+
}
|
3264 |
+
else if (is_number(obj))
|
3265 |
+
{
|
3266 |
+
obj = {
|
3267 |
+
'items': obj
|
3268 |
+
};
|
3269 |
+
}
|
3270 |
+
return obj;
|
3271 |
+
}
|
3272 |
+
function go_complementSwipeObject($tt, obj) {
|
3273 |
+
if (!is_boolean(obj.onTouch))
|
3274 |
+
{
|
3275 |
+
obj.onTouch = true;
|
3276 |
+
}
|
3277 |
+
if (!is_boolean(obj.onMouse))
|
3278 |
+
{
|
3279 |
+
obj.onMouse = false;
|
3280 |
+
}
|
3281 |
+
if (!is_object(obj.options))
|
3282 |
+
{
|
3283 |
+
obj.options = {};
|
3284 |
+
}
|
3285 |
+
if (!is_boolean(obj.options.triggerOnTouchEnd))
|
3286 |
+
{
|
3287 |
+
obj.options.triggerOnTouchEnd = false;
|
3288 |
+
}
|
3289 |
+
return obj;
|
3290 |
+
}
|
3291 |
+
function go_getMousewheelObject($tt, obj) {
|
3292 |
+
if (is_function(obj))
|
3293 |
+
{
|
3294 |
+
obj = obj.call($tt);
|
3295 |
+
}
|
3296 |
+
if (is_true(obj))
|
3297 |
+
{
|
3298 |
+
obj = {};
|
3299 |
+
}
|
3300 |
+
else if (is_number(obj))
|
3301 |
+
{
|
3302 |
+
obj = {
|
3303 |
+
'items': obj
|
3304 |
+
};
|
3305 |
+
}
|
3306 |
+
else if (is_undefined(obj))
|
3307 |
+
{
|
3308 |
+
obj = false;
|
3309 |
+
}
|
3310 |
+
return obj;
|
3311 |
+
}
|
3312 |
+
function go_complementMousewheelObject($tt, obj) {
|
3313 |
+
return obj;
|
3314 |
+
}
|
3315 |
+
|
3316 |
+
// get number functions
|
3317 |
+
function gn_getItemIndex(num, dev, org, items, $cfs) {
|
3318 |
+
if (is_string(num))
|
3319 |
+
{
|
3320 |
+
num = $(num, $cfs);
|
3321 |
+
}
|
3322 |
+
|
3323 |
+
if (is_object(num))
|
3324 |
+
{
|
3325 |
+
num = $(num, $cfs);
|
3326 |
+
}
|
3327 |
+
if (is_jquery(num))
|
3328 |
+
{
|
3329 |
+
num = $cfs.children().index(num);
|
3330 |
+
if (!is_boolean(org))
|
3331 |
+
{
|
3332 |
+
org = false;
|
3333 |
+
}
|
3334 |
+
}
|
3335 |
+
else
|
3336 |
+
{
|
3337 |
+
if (!is_boolean(org))
|
3338 |
+
{
|
3339 |
+
org = true;
|
3340 |
+
}
|
3341 |
+
}
|
3342 |
+
if (!is_number(num))
|
3343 |
+
{
|
3344 |
+
num = 0;
|
3345 |
+
}
|
3346 |
+
if (!is_number(dev))
|
3347 |
+
{
|
3348 |
+
dev = 0;
|
3349 |
+
}
|
3350 |
+
|
3351 |
+
if (org)
|
3352 |
+
{
|
3353 |
+
num += items.first;
|
3354 |
+
}
|
3355 |
+
num += dev;
|
3356 |
+
if (items.total > 0)
|
3357 |
+
{
|
3358 |
+
while (num >= items.total)
|
3359 |
+
{
|
3360 |
+
num -= items.total;
|
3361 |
+
}
|
3362 |
+
while (num < 0)
|
3363 |
+
{
|
3364 |
+
num += items.total;
|
3365 |
+
}
|
3366 |
+
}
|
3367 |
+
return num;
|
3368 |
+
}
|
3369 |
+
|
3370 |
+
// items prev
|
3371 |
+
function gn_getVisibleItemsPrev(i, o, s) {
|
3372 |
+
var t = 0,
|
3373 |
+
x = 0;
|
3374 |
+
|
3375 |
+
for (var a = s; a >= 0; a--)
|
3376 |
+
{
|
3377 |
+
var j = i.eq(a);
|
3378 |
+
t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
|
3379 |
+
if (t > o.maxDimension)
|
3380 |
+
{
|
3381 |
+
return x;
|
3382 |
+
}
|
3383 |
+
if (a == 0)
|
3384 |
+
{
|
3385 |
+
a = i.length;
|
3386 |
+
}
|
3387 |
+
x++;
|
3388 |
+
}
|
3389 |
+
}
|
3390 |
+
function gn_getVisibleItemsPrevFilter(i, o, s) {
|
3391 |
+
return gn_getItemsPrevFilter(i, o.items.filter, o.items.visibleConf.org, s);
|
3392 |
+
}
|
3393 |
+
function gn_getScrollItemsPrevFilter(i, o, s, m) {
|
3394 |
+
return gn_getItemsPrevFilter(i, o.items.filter, m, s);
|
3395 |
+
}
|
3396 |
+
function gn_getItemsPrevFilter(i, f, m, s) {
|
3397 |
+
var t = 0,
|
3398 |
+
x = 0;
|
3399 |
+
|
3400 |
+
for (var a = s, l = i.length; a >= 0; a--)
|
3401 |
+
{
|
3402 |
+
x++;
|
3403 |
+
if (x == l)
|
3404 |
+
{
|
3405 |
+
return x;
|
3406 |
+
}
|
3407 |
+
|
3408 |
+
var j = i.eq(a);
|
3409 |
+
if (j.is(f))
|
3410 |
+
{
|
3411 |
+
t++;
|
3412 |
+
if (t == m)
|
3413 |
+
{
|
3414 |
+
return x;
|
3415 |
+
}
|
3416 |
+
}
|
3417 |
+
if (a == 0)
|
3418 |
+
{
|
3419 |
+
a = l;
|
3420 |
+
}
|
3421 |
+
}
|
3422 |
+
}
|
3423 |
+
|
3424 |
+
function gn_getVisibleOrg($c, o) {
|
3425 |
+
return o.items.visibleConf.org || $c.children().slice(0, o.items.visible).filter(o.items.filter).length;
|
3426 |
+
}
|
3427 |
+
|
3428 |
+
// items next
|
3429 |
+
function gn_getVisibleItemsNext(i, o, s) {
|
3430 |
+
var t = 0,
|
3431 |
+
x = 0;
|
3432 |
+
|
3433 |
+
for (var a = s, l = i.length-1; a <= l; a++)
|
3434 |
+
{
|
3435 |
+
var j = i.eq(a);
|
3436 |
+
|
3437 |
+
t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
|
3438 |
+
if (t > o.maxDimension)
|
3439 |
+
{
|
3440 |
+
return x;
|
3441 |
+
}
|
3442 |
+
|
3443 |
+
x++;
|
3444 |
+
if (x == l+1)
|
3445 |
+
{
|
3446 |
+
return x;
|
3447 |
+
}
|
3448 |
+
if (a == l)
|
3449 |
+
{
|
3450 |
+
a = -1;
|
3451 |
+
}
|
3452 |
+
}
|
3453 |
+
}
|
3454 |
+
function gn_getVisibleItemsNextTestCircular(i, o, s, l) {
|
3455 |
+
var v = gn_getVisibleItemsNext(i, o, s);
|
3456 |
+
if (!o.circular)
|
3457 |
+
{
|
3458 |
+
if (s + v > l)
|
3459 |
+
{
|
3460 |
+
v = l - s;
|
3461 |
+
}
|
3462 |
+
}
|
3463 |
+
return v;
|
3464 |
+
}
|
3465 |
+
function gn_getVisibleItemsNextFilter(i, o, s) {
|
3466 |
+
return gn_getItemsNextFilter(i, o.items.filter, o.items.visibleConf.org, s, o.circular);
|
3467 |
+
}
|
3468 |
+
function gn_getScrollItemsNextFilter(i, o, s, m) {
|
3469 |
+
return gn_getItemsNextFilter(i, o.items.filter, m+1, s, o.circular) - 1;
|
3470 |
+
}
|
3471 |
+
function gn_getItemsNextFilter(i, f, m, s, c) {
|
3472 |
+
var t = 0,
|
3473 |
+
x = 0;
|
3474 |
+
|
3475 |
+
for (var a = s, l = i.length-1; a <= l; a++)
|
3476 |
+
{
|
3477 |
+
x++;
|
3478 |
+
if (x >= l)
|
3479 |
+
{
|
3480 |
+
return x;
|
3481 |
+
}
|
3482 |
+
|
3483 |
+
var j = i.eq(a);
|
3484 |
+
if (j.is(f))
|
3485 |
+
{
|
3486 |
+
t++;
|
3487 |
+
if (t == m)
|
3488 |
+
{
|
3489 |
+
return x;
|
3490 |
+
}
|
3491 |
+
}
|
3492 |
+
if (a == l)
|
3493 |
+
{
|
3494 |
+
a = -1;
|
3495 |
+
}
|
3496 |
+
}
|
3497 |
+
}
|
3498 |
+
|
3499 |
+
// get items functions
|
3500 |
+
function gi_getCurrentItems(i, o) {
|
3501 |
+
return i.slice(0, o.items.visible);
|
3502 |
+
}
|
3503 |
+
function gi_getOldItemsPrev(i, o, n) {
|
3504 |
+
return i.slice(n, o.items.visibleConf.old+n);
|
3505 |
+
}
|
3506 |
+
function gi_getNewItemsPrev(i, o) {
|
3507 |
+
return i.slice(0, o.items.visible);
|
3508 |
+
}
|
3509 |
+
function gi_getOldItemsNext(i, o) {
|
3510 |
+
return i.slice(0, o.items.visibleConf.old);
|
3511 |
+
}
|
3512 |
+
function gi_getNewItemsNext(i, o, n) {
|
3513 |
+
return i.slice(n, o.items.visible+n);
|
3514 |
+
}
|
3515 |
+
|
3516 |
+
// sizes functions
|
3517 |
+
function sz_storeMargin(i, o, d) {
|
3518 |
+
if (o.usePadding)
|
3519 |
+
{
|
3520 |
+
if (!is_string(d))
|
3521 |
+
{
|
3522 |
+
d = '_cfs_origCssMargin';
|
3523 |
+
}
|
3524 |
+
i.each(function() {
|
3525 |
+
var j = $(this),
|
3526 |
+
m = parseInt(j.css(o.d['marginRight']), 10);
|
3527 |
+
if (!is_number(m))
|
3528 |
+
{
|
3529 |
+
m = 0;
|
3530 |
+
}
|
3531 |
+
j.data(d, m);
|
3532 |
+
});
|
3533 |
+
}
|
3534 |
+
}
|
3535 |
+
function sz_resetMargin(i, o, m) {
|
3536 |
+
if (o.usePadding)
|
3537 |
+
{
|
3538 |
+
var x = (is_boolean(m)) ? m : false;
|
3539 |
+
if (!is_number(m))
|
3540 |
+
{
|
3541 |
+
m = 0;
|
3542 |
+
}
|
3543 |
+
sz_storeMargin(i, o, '_cfs_tempCssMargin');
|
3544 |
+
i.each(function() {
|
3545 |
+
var j = $(this);
|
3546 |
+
j.css(o.d['marginRight'], ((x) ? j.data('_cfs_tempCssMargin') : m + j.data('_cfs_origCssMargin')));
|
3547 |
+
});
|
3548 |
+
}
|
3549 |
+
}
|
3550 |
+
function sz_storeOrigCss(i) {
|
3551 |
+
i.each(function() {
|
3552 |
+
var j = $(this);
|
3553 |
+
j.data('_cfs_origCss', j.attr('style') || '');
|
3554 |
+
});
|
3555 |
+
}
|
3556 |
+
function sz_restoreOrigCss(i) {
|
3557 |
+
i.each(function() {
|
3558 |
+
var j = $(this);
|
3559 |
+
j.attr('style', j.data('_cfs_origCss') || '');
|
3560 |
+
});
|
3561 |
+
}
|
3562 |
+
function sz_setResponsiveSizes(o, all) {
|
3563 |
+
var visb = o.items.visible,
|
3564 |
+
newS = o.items[o.d['width']],
|
3565 |
+
seco = o[o.d['height']],
|
3566 |
+
secp = is_percentage(seco);
|
3567 |
+
|
3568 |
+
all.each(function() {
|
3569 |
+
var $t = $(this),
|
3570 |
+
nw = newS - ms_getPaddingBorderMargin($t, o, 'Width');
|
3571 |
+
|
3572 |
+
$t[o.d['width']](nw);
|
3573 |
+
if (secp)
|
3574 |
+
{
|
3575 |
+
$t[o.d['height']](ms_getPercentage(nw, seco));
|
3576 |
+
}
|
3577 |
+
});
|
3578 |
+
}
|
3579 |
+
function sz_setSizes($c, o) {
|
3580 |
+
var $w = $c.parent(),
|
3581 |
+
$i = $c.children(),
|
3582 |
+
$v = gi_getCurrentItems($i, o),
|
3583 |
+
sz = cf_mapWrapperSizes(ms_getSizes($v, o, true), o, false);
|
3584 |
+
|
3585 |
+
$w.css(sz);
|
3586 |
+
|
3587 |
+
if (o.usePadding)
|
3588 |
+
{
|
3589 |
+
var p = o.padding,
|
3590 |
+
r = p[o.d[1]];
|
3591 |
+
|
3592 |
+
if (o.align && r < 0)
|
3593 |
+
{
|
3594 |
+
r = 0;
|
3595 |
+
}
|
3596 |
+
var $l = $v.last();
|
3597 |
+
$l.css(o.d['marginRight'], $l.data('_cfs_origCssMargin') + r);
|
3598 |
+
$c.css(o.d['top'], p[o.d[0]]);
|
3599 |
+
$c.css(o.d['left'], p[o.d[3]]);
|
3600 |
+
}
|
3601 |
+
|
3602 |
+
$c.css(o.d['width'], sz[o.d['width']]+(ms_getTotalSize($i, o, 'width')*2));
|
3603 |
+
$c.css(o.d['height'], ms_getLargestSize($i, o, 'height'));
|
3604 |
+
return sz;
|
3605 |
+
}
|
3606 |
+
|
3607 |
+
// measuring functions
|
3608 |
+
function ms_getSizes(i, o, wrapper) {
|
3609 |
+
return [ms_getTotalSize(i, o, 'width', wrapper), ms_getLargestSize(i, o, 'height', wrapper)];
|
3610 |
+
}
|
3611 |
+
function ms_getLargestSize(i, o, dim, wrapper) {
|
3612 |
+
if (!is_boolean(wrapper))
|
3613 |
+
{
|
3614 |
+
wrapper = false;
|
3615 |
+
}
|
3616 |
+
if (is_number(o[o.d[dim]]) && wrapper)
|
3617 |
+
{
|
3618 |
+
return o[o.d[dim]];
|
3619 |
+
}
|
3620 |
+
if (is_number(o.items[o.d[dim]]))
|
3621 |
+
{
|
3622 |
+
return o.items[o.d[dim]];
|
3623 |
+
}
|
3624 |
+
dim = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight';
|
3625 |
+
return ms_getTrueLargestSize(i, o, dim);
|
3626 |
+
}
|
3627 |
+
function ms_getTrueLargestSize(i, o, dim) {
|
3628 |
+
var s = 0;
|
3629 |
+
|
3630 |
+
for (var a = 0, l = i.length; a < l; a++)
|
3631 |
+
{
|
3632 |
+
var j = i.eq(a);
|
3633 |
+
|
3634 |
+
var m = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
|
3635 |
+
if (s < m)
|
3636 |
+
{
|
3637 |
+
s = m;
|
3638 |
+
}
|
3639 |
+
}
|
3640 |
+
return s;
|
3641 |
+
}
|
3642 |
+
|
3643 |
+
function ms_getTotalSize(i, o, dim, wrapper) {
|
3644 |
+
if (!is_boolean(wrapper))
|
3645 |
+
{
|
3646 |
+
wrapper = false;
|
3647 |
+
}
|
3648 |
+
if (is_number(o[o.d[dim]]) && wrapper)
|
3649 |
+
{
|
3650 |
+
return o[o.d[dim]];
|
3651 |
+
}
|
3652 |
+
if (is_number(o.items[o.d[dim]]))
|
3653 |
+
{
|
3654 |
+
return o.items[o.d[dim]] * i.length;
|
3655 |
+
}
|
3656 |
+
|
3657 |
+
var d = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight',
|
3658 |
+
s = 0;
|
3659 |
+
|
3660 |
+
for (var a = 0, l = i.length; a < l; a++)
|
3661 |
+
{
|
3662 |
+
var j = i.eq(a);
|
3663 |
+
s += (j.is(':visible')) ? j[o.d[d]](true) : 0;
|
3664 |
+
}
|
3665 |
+
return s;
|
3666 |
+
}
|
3667 |
+
function ms_getParentSize($w, o, d) {
|
3668 |
+
var isVisible = $w.is(':visible');
|
3669 |
+
if (isVisible)
|
3670 |
+
{
|
3671 |
+
$w.hide();
|
3672 |
+
}
|
3673 |
+
var s = $w.parent()[o.d[d]]();
|
3674 |
+
if (isVisible)
|
3675 |
+
{
|
3676 |
+
$w.show();
|
3677 |
+
}
|
3678 |
+
return s;
|
3679 |
+
}
|
3680 |
+
function ms_getMaxDimension(o, a) {
|
3681 |
+
return (is_number(o[o.d['width']])) ? o[o.d['width']] : a;
|
3682 |
+
}
|
3683 |
+
function ms_hasVariableSizes(i, o, dim) {
|
3684 |
+
var s = false,
|
3685 |
+
v = false;
|
3686 |
+
|
3687 |
+
for (var a = 0, l = i.length; a < l; a++)
|
3688 |
+
{
|
3689 |
+
var j = i.eq(a);
|
3690 |
+
|
3691 |
+
var c = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
|
3692 |
+
if (s === false)
|
3693 |
+
{
|
3694 |
+
s = c;
|
3695 |
+
}
|
3696 |
+
else if (s != c)
|
3697 |
+
{
|
3698 |
+
v = true;
|
3699 |
+
}
|
3700 |
+
if (s == 0)
|
3701 |
+
{
|
3702 |
+
v = true;
|
3703 |
+
}
|
3704 |
+
}
|
3705 |
+
return v;
|
3706 |
+
}
|
3707 |
+
function ms_getPaddingBorderMargin(i, o, d) {
|
3708 |
+
return i[o.d['outer'+d]](true) - i[o.d[d.toLowerCase()]]();
|
3709 |
+
}
|
3710 |
+
function ms_getPercentage(s, o) {
|
3711 |
+
if (is_percentage(o))
|
3712 |
+
{
|
3713 |
+
o = parseInt( o.slice(0, -1), 10 );
|
3714 |
+
if (!is_number(o))
|
3715 |
+
{
|
3716 |
+
return s;
|
3717 |
+
}
|
3718 |
+
s *= o/100;
|
3719 |
+
}
|
3720 |
+
return s;
|
3721 |
+
}
|
3722 |
+
|
3723 |
+
// config functions
|
3724 |
+
function cf_e(n, c, pf, ns, rd) {
|
3725 |
+
if (!is_boolean(pf))
|
3726 |
+
{
|
3727 |
+
pf = true;
|
3728 |
+
}
|
3729 |
+
if (!is_boolean(ns))
|
3730 |
+
{
|
3731 |
+
ns = true;
|
3732 |
+
}
|
3733 |
+
if (!is_boolean(rd))
|
3734 |
+
{
|
3735 |
+
rd = false;
|
3736 |
+
}
|
3737 |
+
|
3738 |
+
if (pf)
|
3739 |
+
{
|
3740 |
+
n = c.events.prefix + n;
|
3741 |
+
}
|
3742 |
+
if (ns)
|
3743 |
+
{
|
3744 |
+
n = n +'.'+ c.events.namespace;
|
3745 |
+
}
|
3746 |
+
if (ns && rd)
|
3747 |
+
{
|
3748 |
+
n += c.serialNumber;
|
3749 |
+
}
|
3750 |
+
|
3751 |
+
return n;
|
3752 |
+
}
|
3753 |
+
function cf_c(n, c) {
|
3754 |
+
return (is_string(c.classnames[n])) ? c.classnames[n] : n;
|
3755 |
+
}
|
3756 |
+
function cf_mapWrapperSizes(ws, o, p) {
|
3757 |
+
|
3758 |
+
if (!is_boolean(p))
|
3759 |
+
{
|
3760 |
+
p = true;
|
3761 |
+
}
|
3762 |
+
var pad = (o.usePadding && p) ? o.padding : [0, 0, 0, 0];
|
3763 |
+
var wra = {};
|
3764 |
+
|
3765 |
+
wra[o.d['width']] = ws[0] + pad[1] + pad[3];
|
3766 |
+
wra[o.d['height']] = ws[1] + pad[0] + pad[2];
|
3767 |
+
|
3768 |
+
return wra;
|
3769 |
+
}
|
3770 |
+
function cf_sortParams(vals, typs) {
|
3771 |
+
var arr = [];
|
3772 |
+
for (var a = 0, l1 = vals.length; a < l1; a++)
|
3773 |
+
{
|
3774 |
+
for (var b = 0, l2 = typs.length; b < l2; b++)
|
3775 |
+
{
|
3776 |
+
if (typs[b].indexOf(typeof vals[a]) > -1 && is_undefined(arr[b]))
|
3777 |
+
{
|
3778 |
+
arr[b] = vals[a];
|
3779 |
+
break;
|
3780 |
+
}
|
3781 |
+
}
|
3782 |
+
}
|
3783 |
+
return arr;
|
3784 |
+
}
|
3785 |
+
function cf_getPadding(p) {
|
3786 |
+
if (is_undefined(p))
|
3787 |
+
{
|
3788 |
+
return [0, 0, 0, 0];
|
3789 |
+
}
|
3790 |
+
if (is_number(p))
|
3791 |
+
{
|
3792 |
+
return [p, p, p, p];
|
3793 |
+
}
|
3794 |
+
if (is_string(p))
|
3795 |
+
{
|
3796 |
+
p = p.split('px').join('').split('em').join('').split(' ');
|
3797 |
+
}
|
3798 |
+
|
3799 |
+
if (!is_array(p))
|
3800 |
+
{
|
3801 |
+
return [0, 0, 0, 0];
|
3802 |
+
}
|
3803 |
+
for (var i = 0; i < 4; i++)
|
3804 |
+
{
|
3805 |
+
p[i] = parseInt(p[i], 10);
|
3806 |
+
}
|
3807 |
+
switch (p.length)
|
3808 |
+
{
|
3809 |
+
case 0:
|
3810 |
+
return [0, 0, 0, 0];
|
3811 |
+
case 1:
|
3812 |
+
return [p[0], p[0], p[0], p[0]];
|
3813 |
+
case 2:
|
3814 |
+
return [p[0], p[1], p[0], p[1]];
|
3815 |
+
case 3:
|
3816 |
+
return [p[0], p[1], p[2], p[1]];
|
3817 |
+
default:
|
3818 |
+
return [p[0], p[1], p[2], p[3]];
|
3819 |
+
}
|
3820 |
+
}
|
3821 |
+
function cf_getAlignPadding(itm, o) {
|
3822 |
+
var x = (is_number(o[o.d['width']])) ? Math.ceil(o[o.d['width']] - ms_getTotalSize(itm, o, 'width')) : 0;
|
3823 |
+
switch (o.align)
|
3824 |
+
{
|
3825 |
+
case 'left':
|
3826 |
+
return [0, x];
|
3827 |
+
case 'right':
|
3828 |
+
return [x, 0];
|
3829 |
+
case 'center':
|
3830 |
+
default:
|
3831 |
+
return [Math.ceil(x/2), Math.floor(x/2)];
|
3832 |
+
}
|
3833 |
+
}
|
3834 |
+
function cf_getDimensions(o) {
|
3835 |
+
var dm = [
|
3836 |
+
['width' , 'innerWidth' , 'outerWidth' , 'height' , 'innerHeight' , 'outerHeight' , 'left', 'top' , 'marginRight' , 0, 1, 2, 3],
|
3837 |
+
['height' , 'innerHeight' , 'outerHeight' , 'width' , 'innerWidth' , 'outerWidth' , 'top' , 'left', 'marginBottom', 3, 2, 1, 0]
|
3838 |
+
];
|
3839 |
+
|
3840 |
+
var dl = dm[0].length,
|
3841 |
+
dx = (o.direction == 'right' || o.direction == 'left') ? 0 : 1;
|
3842 |
+
|
3843 |
+
var dimensions = {};
|
3844 |
+
for (var d = 0; d < dl; d++)
|
3845 |
+
{
|
3846 |
+
dimensions[dm[0][d]] = dm[dx][d];
|
3847 |
+
}
|
3848 |
+
return dimensions;
|
3849 |
+
}
|
3850 |
+
function cf_getAdjust(x, o, a, $t) {
|
3851 |
+
var v = x;
|
3852 |
+
if (is_function(a))
|
3853 |
+
{
|
3854 |
+
v = a.call($t, v);
|
3855 |
+
|
3856 |
+
}
|
3857 |
+
else if (is_string(a))
|
3858 |
+
{
|
3859 |
+
var p = a.split('+'),
|
3860 |
+
m = a.split('-');
|
3861 |
+
|
3862 |
+
if (m.length > p.length)
|
3863 |
+
{
|
3864 |
+
var neg = true,
|
3865 |
+
sta = m[0],
|
3866 |
+
adj = m[1];
|
3867 |
+
}
|
3868 |
+
else
|
3869 |
+
{
|
3870 |
+
var neg = false,
|
3871 |
+
sta = p[0],
|
3872 |
+
adj = p[1];
|
3873 |
+
}
|
3874 |
+
|
3875 |
+
switch(sta)
|
3876 |
+
{
|
3877 |
+
case 'even':
|
3878 |
+
v = (x % 2 == 1) ? x-1 : x;
|
3879 |
+
break;
|
3880 |
+
case 'odd':
|
3881 |
+
v = (x % 2 == 0) ? x-1 : x;
|
3882 |
+
break;
|
3883 |
+
default:
|
3884 |
+
v = x;
|
3885 |
+
break;
|
3886 |
+
}
|
3887 |
+
adj = parseInt(adj, 10);
|
3888 |
+
if (is_number(adj))
|
3889 |
+
{
|
3890 |
+
if (neg)
|
3891 |
+
{
|
3892 |
+
adj = -adj;
|
3893 |
+
}
|
3894 |
+
v += adj;
|
3895 |
+
}
|
3896 |
+
}
|
3897 |
+
if (!is_number(v) || v < 1)
|
3898 |
+
{
|
3899 |
+
v = 1;
|
3900 |
+
}
|
3901 |
+
return v;
|
3902 |
+
}
|
3903 |
+
function cf_getItemsAdjust(x, o, a, $t) {
|
3904 |
+
return cf_getItemAdjustMinMax(cf_getAdjust(x, o, a, $t), o.items.visibleConf);
|
3905 |
+
}
|
3906 |
+
function cf_getItemAdjustMinMax(v, i) {
|
3907 |
+
if (is_number(i.min) && v < i.min)
|
3908 |
+
{
|
3909 |
+
v = i.min;
|
3910 |
+
}
|
3911 |
+
if (is_number(i.max) && v > i.max)
|
3912 |
+
{
|
3913 |
+
v = i.max;
|
3914 |
+
}
|
3915 |
+
if (v < 1)
|
3916 |
+
{
|
3917 |
+
v = 1;
|
3918 |
+
}
|
3919 |
+
return v;
|
3920 |
+
}
|
3921 |
+
function cf_getSynchArr(s) {
|
3922 |
+
if (!is_array(s))
|
3923 |
+
{
|
3924 |
+
s = [[s]];
|
3925 |
+
}
|
3926 |
+
if (!is_array(s[0]))
|
3927 |
+
{
|
3928 |
+
s = [s];
|
3929 |
+
}
|
3930 |
+
for (var j = 0, l = s.length; j < l; j++)
|
3931 |
+
{
|
3932 |
+
if (is_string(s[j][0]))
|
3933 |
+
{
|
3934 |
+
s[j][0] = $(s[j][0]);
|
3935 |
+
}
|
3936 |
+
if (!is_boolean(s[j][1]))
|
3937 |
+
{
|
3938 |
+
s[j][1] = true;
|
3939 |
+
}
|
3940 |
+
if (!is_boolean(s[j][2]))
|
3941 |
+
{
|
3942 |
+
s[j][2] = true;
|
3943 |
+
}
|
3944 |
+
if (!is_number(s[j][3]))
|
3945 |
+
{
|
3946 |
+
s[j][3] = 0;
|
3947 |
+
}
|
3948 |
+
}
|
3949 |
+
return s;
|
3950 |
+
}
|
3951 |
+
function cf_getKeyCode(k) {
|
3952 |
+
if (k == 'right')
|
3953 |
+
{
|
3954 |
+
return 39;
|
3955 |
+
}
|
3956 |
+
if (k == 'left')
|
3957 |
+
{
|
3958 |
+
return 37;
|
3959 |
+
}
|
3960 |
+
if (k == 'up')
|
3961 |
+
{
|
3962 |
+
return 38;
|
3963 |
+
}
|
3964 |
+
if (k == 'down')
|
3965 |
+
{
|
3966 |
+
return 40;
|
3967 |
+
}
|
3968 |
+
return -1;
|
3969 |
+
}
|
3970 |
+
function cf_setCookie(n, $c, c) {
|
3971 |
+
if (n)
|
3972 |
+
{
|
3973 |
+
var v = $c.triggerHandler(cf_e('currentPosition', c));
|
3974 |
+
$.fn.carouFredSel.cookie.set(n, v);
|
3975 |
+
}
|
3976 |
+
}
|
3977 |
+
function cf_getCookie(n) {
|
3978 |
+
var c = $.fn.carouFredSel.cookie.get(n);
|
3979 |
+
return (c == '') ? 0 : c;
|
3980 |
+
}
|
3981 |
+
|
3982 |
+
// init function
|
3983 |
+
function in_mapCss($elem, props) {
|
3984 |
+
var css = {};
|
3985 |
+
for (var p = 0, l = props.length; p < l; p++)
|
3986 |
+
{
|
3987 |
+
css[props[p]] = $elem.css(props[p]);
|
3988 |
+
}
|
3989 |
+
return css;
|
3990 |
+
}
|
3991 |
+
function in_complementItems(obj, opt, itm, sta) {
|
3992 |
+
if (!is_object(obj.visibleConf))
|
3993 |
+
{
|
3994 |
+
obj.visibleConf = {};
|
3995 |
+
}
|
3996 |
+
if (!is_object(obj.sizesConf))
|
3997 |
+
{
|
3998 |
+
obj.sizesConf = {};
|
3999 |
+
}
|
4000 |
+
|
4001 |
+
if (obj.start == 0 && is_number(sta))
|
4002 |
+
{
|
4003 |
+
obj.start = sta;
|
4004 |
+
}
|
4005 |
+
|
4006 |
+
// visible items
|
4007 |
+
if (is_object(obj.visible))
|
4008 |
+
{
|
4009 |
+
obj.visibleConf.min = obj.visible.min;
|
4010 |
+
obj.visibleConf.max = obj.visible.max;
|
4011 |
+
obj.visible = false;
|
4012 |
+
}
|
4013 |
+
else if (is_string(obj.visible))
|
4014 |
+
{
|
4015 |
+
// variable visible items
|
4016 |
+
if (obj.visible == 'variable')
|
4017 |
+
{
|
4018 |
+
obj.visibleConf.variable = true;
|
4019 |
+
}
|
4020 |
+
// adjust string visible items
|
4021 |
+
else
|
4022 |
+
{
|
4023 |
+
obj.visibleConf.adjust = obj.visible;
|
4024 |
+
}
|
4025 |
+
obj.visible = false;
|
4026 |
+
}
|
4027 |
+
else if (is_function(obj.visible))
|
4028 |
+
{
|
4029 |
+
obj.visibleConf.adjust = obj.visible;
|
4030 |
+
obj.visible = false;
|
4031 |
+
}
|
4032 |
+
|
4033 |
+
// set items filter
|
4034 |
+
if (!is_string(obj.filter))
|
4035 |
+
{
|
4036 |
+
obj.filter = (itm.filter(':hidden').length > 0) ? ':visible' : '*';
|
4037 |
+
}
|
4038 |
+
|
4039 |
+
// primary item-size not set
|
4040 |
+
if (!obj[opt.d['width']])
|
4041 |
+
{
|
4042 |
+
// responsive carousel -> set to largest
|
4043 |
+
if (opt.responsive)
|
4044 |
+
{
|
4045 |
+
debug(true, 'Set a '+opt.d['width']+' for the items!');
|
4046 |
+
obj[opt.d['width']] = ms_getTrueLargestSize(itm, opt, 'outerWidth');
|
4047 |
+
}
|
4048 |
+
// non-responsive -> measure it or set to "variable"
|
4049 |
+
else
|
4050 |
+
{
|
4051 |
+
obj[opt.d['width']] = (ms_hasVariableSizes(itm, opt, 'outerWidth'))
|
4052 |
+
? 'variable'
|
4053 |
+
: itm[opt.d['outerWidth']](true);
|
4054 |
+
}
|
4055 |
+
}
|
4056 |
+
|
4057 |
+
// secondary item-size not set -> measure it or set to "variable"
|
4058 |
+
if (!obj[opt.d['height']])
|
4059 |
+
{
|
4060 |
+
obj[opt.d['height']] = (ms_hasVariableSizes(itm, opt, 'outerHeight'))
|
4061 |
+
? 'variable'
|
4062 |
+
: itm[opt.d['outerHeight']](true);
|
4063 |
+
}
|
4064 |
+
|
4065 |
+
obj.sizesConf.width = obj.width;
|
4066 |
+
obj.sizesConf.height = obj.height;
|
4067 |
+
return obj;
|
4068 |
+
}
|
4069 |
+
function in_complementVisibleItems(opt, avl) {
|
4070 |
+
// primary item-size variable -> set visible items variable
|
4071 |
+
if (opt.items[opt.d['width']] == 'variable')
|
4072 |
+
{
|
4073 |
+
opt.items.visibleConf.variable = true;
|
4074 |
+
}
|
4075 |
+
if (!opt.items.visibleConf.variable) {
|
4076 |
+
// primary size is number -> calculate visible-items
|
4077 |
+
if (is_number(opt[opt.d['width']]))
|
4078 |
+
{
|
4079 |
+
opt.items.visible = Math.floor(opt[opt.d['width']] / opt.items[opt.d['width']]);
|
4080 |
+
}
|
4081 |
+
// measure and calculate primary size and visible-items
|
4082 |
+
else
|
4083 |
+
{
|
4084 |
+
opt.items.visible = Math.floor(avl / opt.items[opt.d['width']]);
|
4085 |
+
opt[opt.d['width']] = opt.items.visible * opt.items[opt.d['width']];
|
4086 |
+
if (!opt.items.visibleConf.adjust)
|
4087 |
+
{
|
4088 |
+
opt.align = false;
|
4089 |
+
}
|
4090 |
+
}
|
4091 |
+
if (opt.items.visible == 'Infinity' || opt.items.visible < 1)
|
4092 |
+
{
|
4093 |
+
debug(true, 'Not a valid number of visible items: Set to "variable".');
|
4094 |
+
opt.items.visibleConf.variable = true;
|
4095 |
+
}
|
4096 |
+
}
|
4097 |
+
return opt;
|
4098 |
+
}
|
4099 |
+
function in_complementPrimarySize(obj, opt, all) {
|
4100 |
+
// primary size set to auto -> measure largest item-size and set it
|
4101 |
+
if (obj == 'auto')
|
4102 |
+
{
|
4103 |
+
obj = ms_getTrueLargestSize(all, opt, 'outerWidth');
|
4104 |
+
}
|
4105 |
+
return obj;
|
4106 |
+
}
|
4107 |
+
function in_complementSecondarySize(obj, opt, all) {
|
4108 |
+
// secondary size set to auto -> measure largest item-size and set it
|
4109 |
+
if (obj == 'auto')
|
4110 |
+
{
|
4111 |
+
obj = ms_getTrueLargestSize(all, opt, 'outerHeight');
|
4112 |
+
}
|
4113 |
+
// secondary size not set -> set to secondary item-size
|
4114 |
+
if (!obj)
|
4115 |
+
{
|
4116 |
+
obj = opt.items[opt.d['height']];
|
4117 |
+
}
|
4118 |
+
return obj;
|
4119 |
+
}
|
4120 |
+
function in_getAlignPadding(o, all) {
|
4121 |
+
var p = cf_getAlignPadding(gi_getCurrentItems(all, o), o);
|
4122 |
+
o.padding[o.d[1]] = p[1];
|
4123 |
+
o.padding[o.d[3]] = p[0];
|
4124 |
+
return o;
|
4125 |
+
}
|
4126 |
+
function in_getResponsiveValues(o, all, avl) {
|
4127 |
+
|
4128 |
+
var visb = cf_getItemAdjustMinMax(Math.ceil(o[o.d['width']] / o.items[o.d['width']]), o.items.visibleConf);
|
4129 |
+
if (visb > all.length)
|
4130 |
+
{
|
4131 |
+
visb = all.length;
|
4132 |
+
}
|
4133 |
+
|
4134 |
+
var newS = Math.floor(o[o.d['width']]/visb);
|
4135 |
+
|
4136 |
+
o.items.visible = visb;
|
4137 |
+
o.items[o.d['width']] = newS;
|
4138 |
+
o[o.d['width']] = visb * newS;
|
4139 |
+
return o;
|
4140 |
+
}
|
4141 |
+
|
4142 |
+
|
4143 |
+
// buttons functions
|
4144 |
+
function bt_pauseOnHoverConfig(p) {
|
4145 |
+
if (is_string(p))
|
4146 |
+
{
|
4147 |
+
var i = (p.indexOf('immediate') > -1) ? true : false,
|
4148 |
+
r = (p.indexOf('resume') > -1) ? true : false;
|
4149 |
+
}
|
4150 |
+
else
|
4151 |
+
{
|
4152 |
+
var i = r = false;
|
4153 |
+
}
|
4154 |
+
return [i, r];
|
4155 |
+
}
|
4156 |
+
function bt_mousesheelNumber(mw) {
|
4157 |
+
return (is_number(mw)) ? mw : null
|
4158 |
+
}
|
4159 |
+
|
4160 |
+
// helper functions
|
4161 |
+
function is_null(a) {
|
4162 |
+
return (a === null);
|
4163 |
+
}
|
4164 |
+
function is_undefined(a) {
|
4165 |
+
return (is_null(a) || typeof a == 'undefined' || a === '' || a === 'undefined');
|
4166 |
+
}
|
4167 |
+
function is_array(a) {
|
4168 |
+
return (a instanceof Array);
|
4169 |
+
}
|
4170 |
+
function is_jquery(a) {
|
4171 |
+
return (a instanceof jQuery);
|
4172 |
+
}
|
4173 |
+
function is_object(a) {
|
4174 |
+
return ((a instanceof Object || typeof a == 'object') && !is_null(a) && !is_jquery(a) && !is_array(a) && !is_function(a));
|
4175 |
+
}
|
4176 |
+
function is_number(a) {
|
4177 |
+
return ((a instanceof Number || typeof a == 'number') && !isNaN(a));
|
4178 |
+
}
|
4179 |
+
function is_string(a) {
|
4180 |
+
return ((a instanceof String || typeof a == 'string') && !is_undefined(a) && !is_true(a) && !is_false(a));
|
4181 |
+
}
|
4182 |
+
function is_function(a) {
|
4183 |
+
return (a instanceof Function || typeof a == 'function');
|
4184 |
+
}
|
4185 |
+
function is_boolean(a) {
|
4186 |
+
return (a instanceof Boolean || typeof a == 'boolean' || is_true(a) || is_false(a));
|
4187 |
+
}
|
4188 |
+
function is_true(a) {
|
4189 |
+
return (a === true || a === 'true');
|
4190 |
+
}
|
4191 |
+
function is_false(a) {
|
4192 |
+
return (a === false || a === 'false');
|
4193 |
+
}
|
4194 |
+
function is_percentage(x) {
|
4195 |
+
return (is_string(x) && x.slice(-1) == '%');
|
4196 |
+
}
|
4197 |
+
|
4198 |
+
|
4199 |
+
function getTime() {
|
4200 |
+
return new Date().getTime();
|
4201 |
+
}
|
4202 |
+
|
4203 |
+
function deprecated( o, n ) {
|
4204 |
+
debug(true, o+' is DEPRECATED, support for it will be removed. Use '+n+' instead.');
|
4205 |
+
}
|
4206 |
+
function debug(d, m) {
|
4207 |
+
if (!is_undefined(window.console) && !is_undefined(window.console.log))
|
4208 |
+
{
|
4209 |
+
if (is_object(d))
|
4210 |
+
{
|
4211 |
+
var s = ' ('+d.selector+')';
|
4212 |
+
d = d.debug;
|
4213 |
+
}
|
4214 |
+
else
|
4215 |
+
{
|
4216 |
+
var s = '';
|
4217 |
+
}
|
4218 |
+
if (!d)
|
4219 |
+
{
|
4220 |
+
return false;
|
4221 |
+
}
|
4222 |
+
|
4223 |
+
if (is_string(m))
|
4224 |
+
{
|
4225 |
+
m = 'carouFredSel'+s+': ' + m;
|
4226 |
+
}
|
4227 |
+
else
|
4228 |
+
{
|
4229 |
+
m = ['carouFredSel'+s+':', m];
|
4230 |
+
}
|
4231 |
+
window.console.log(m);
|
4232 |
+
}
|
4233 |
+
return false;
|
4234 |
+
}
|
4235 |
+
|
4236 |
+
|
4237 |
+
|
4238 |
+
// EASING FUNCTIONS
|
4239 |
+
$.extend($.easing, {
|
4240 |
+
'quadratic': function(t) {
|
4241 |
+
var t2 = t * t;
|
4242 |
+
return t * (-t2 * t + 4 * t2 - 6 * t + 4);
|
4243 |
+
},
|
4244 |
+
'cubic': function(t) {
|
4245 |
+
return t * (4 * t * t - 9 * t + 6);
|
4246 |
+
},
|
4247 |
+
'elastic': function(t) {
|
4248 |
+
var t2 = t * t;
|
4249 |
+
return t * (33 * t2 * t2 - 106 * t2 * t + 126 * t2 - 67 * t + 15);
|
4250 |
+
}
|
4251 |
+
});
|
4252 |
+
|
4253 |
+
|
4254 |
})(jQuery);
|
assets/js/jquery.carouFredSel.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function($){function sc_setScroll(t,e,s){return"transition"==s.transition&&"swing"==e&&(e="ease"),{anims:[],duration:t,orgDuration:t,easing:e,startTime:getTime()}}function sc_startScroll(t,e){for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o&&o[0][e.transition](o[1],t.duration,t.easing,o[2])}}function sc_stopScroll(t,e){is_boolean(e)||(e=!0),is_object(t.pre)&&sc_stopScroll(t.pre,e);for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o[0].stop(!0),e&&(o[0].css(o[1]),is_function(o[2])&&o[2]())}is_object(t.post)&&sc_stopScroll(t.post,e)}function sc_afterScroll(t,e,s){switch(e&&e.remove(),s.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":t.css("opacity",1),t.css("filter","")}}function sc_fireCallbacks(t,e,s,i,o){if(e[s]&&e[s].call(t,i),o[s].length)for(var n=0,r=o[s].length;r>n;n++)o[s][n].call(t,i);return[]}function sc_fireQueue(t,e,s){return e.length&&(t.trigger(cf_e(e[0][0],s),e[0][1]),e.shift()),e}function sc_hideHiddenItems(t){t.each(function(){var t=$(this);t.data("_cfs_isHidden",t.is(":hidden")).hide()})}function sc_showHiddenItems(t){t&&t.each(function(){var t=$(this);t.data("_cfs_isHidden")||t.show()})}function sc_clearTimers(t){return t.auto&&clearTimeout(t.auto),t.progress&&clearInterval(t.progress),t}function sc_mapCallbackArguments(t,e,s,i,o,n,r){return{width:r.width,height:r.height,items:{old:t,skipped:e,visible:s},scroll:{items:i,direction:o,duration:n}}}function sc_getDuration(t,e,s,i){var o=t.duration;return"none"==t.fx?0:("auto"==o?o=e.scroll.duration/e.scroll.items*s:10>o&&(o=i/o),1>o?0:("fade"==t.fx&&(o/=2),Math.round(o)))}function nv_showNavi(t,e,s){var i=is_number(t.items.minimum)?t.items.minimum:t.items.visible+1;if("show"==e||"hide"==e)var o=e;else if(i>e){debug(s,"Not enough items ("+e+" total, "+i+" needed): Hiding navigation.");var o="hide"}else var o="show";var n="show"==o?"removeClass":"addClass",r=cf_c("hidden",s);t.auto.button&&t.auto.button[o]()[n](r),t.prev.button&&t.prev.button[o]()[n](r),t.next.button&&t.next.button[o]()[n](r),t.pagination.container&&t.pagination.container[o]()[n](r)}function nv_enableNavi(t,e,s){if(!t.circular&&!t.infinite){var i="removeClass"==e||"addClass"==e?e:!1,o=cf_c("disabled",s);if(t.auto.button&&i&&t.auto.button[i](o),t.prev.button){var n=i||0==e?"addClass":"removeClass";t.prev.button[n](o)}if(t.next.button){var n=i||e==t.items.visible?"addClass":"removeClass";t.next.button[n](o)}}}function go_getObject(t,e){return is_function(e)?e=e.call(t):is_undefined(e)&&(e={}),e}function go_getItemsObject(t,e){return e=go_getObject(t,e),is_number(e)?e={visible:e}:"variable"==e?e={visible:e,width:e,height:e}:is_object(e)||(e={}),e}function go_getScrollObject(t,e){return e=go_getObject(t,e),is_number(e)?e=50>=e?{items:e}:{duration:e}:is_string(e)?e={easing:e}:is_object(e)||(e={}),e}function go_getNaviObject(t,e){if(e=go_getObject(t,e),is_string(e)){var s=cf_getKeyCode(e);e=-1==s?$(e):s}return e}function go_getAutoObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_boolean(e)?e={play:e}:is_number(e)&&(e={timeoutDuration:e}),e.progress&&(is_string(e.progress)||is_jquery(e.progress))&&(e.progress={bar:e.progress}),e}function go_complementAutoObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_boolean(e.play)||(e.play=!0),is_number(e.delay)||(e.delay=0),is_undefined(e.pauseOnEvent)&&(e.pauseOnEvent=!0),is_boolean(e.pauseOnResize)||(e.pauseOnResize=!0),is_number(e.timeoutDuration)||(e.timeoutDuration=e.duration<10?2500:5*e.duration),e.progress&&(is_function(e.progress.bar)&&(e.progress.bar=e.progress.bar.call(t)),is_string(e.progress.bar)&&(e.progress.bar=$(e.progress.bar)),e.progress.bar?(is_function(e.progress.updater)||(e.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(e.progress.interval)||(e.progress.interval=50)):e.progress=!1),e}function go_getPrevNextObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_number(e)&&(e={key:e}),e}function go_complementPrevNextObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_string(e.key)&&(e.key=cf_getKeyCode(e.key)),e}function go_getPaginationObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={container:e}:is_boolean(e)&&(e={keys:e}),e}function go_complementPaginationObject(t,e){return is_function(e.container)&&(e.container=e.container.call(t)),is_string(e.container)&&(e.container=$(e.container)),is_number(e.items)||(e.items=!1),is_boolean(e.keys)||(e.keys=!1),is_function(e.anchorBuilder)||is_false(e.anchorBuilder)||(e.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(e.deviation)||(e.deviation=0),e}function go_getSwipeObject(t,e){return is_function(e)&&(e=e.call(t)),is_undefined(e)&&(e={onTouch:!1}),is_true(e)?e={onTouch:e}:is_number(e)&&(e={items:e}),e}function go_complementSwipeObject(t,e){return is_boolean(e.onTouch)||(e.onTouch=!0),is_boolean(e.onMouse)||(e.onMouse=!1),is_object(e.options)||(e.options={}),is_boolean(e.options.triggerOnTouchEnd)||(e.options.triggerOnTouchEnd=!1),e}function go_getMousewheelObject(t,e){return is_function(e)&&(e=e.call(t)),is_true(e)?e={}:is_number(e)?e={items:e}:is_undefined(e)&&(e=!1),e}function go_complementMousewheelObject(t,e){return e}function gn_getItemIndex(t,e,s,i,o){if(is_string(t)&&(t=$(t,o)),is_object(t)&&(t=$(t,o)),is_jquery(t)?(t=o.children().index(t),is_boolean(s)||(s=!1)):is_boolean(s)||(s=!0),is_number(t)||(t=0),is_number(e)||(e=0),s&&(t+=i.first),t+=e,i.total>0){for(;t>=i.total;)t-=i.total;for(;0>t;)t+=i.total}return t}function gn_getVisibleItemsPrev(t,e,s){for(var i=0,o=0,n=s;n>=0;n--){var r=t.eq(n);if(i+=r.is(":visible")?r[e.d.outerWidth](!0):0,i>e.maxDimension)return o;0==n&&(n=t.length),o++}}function gn_getVisibleItemsPrevFilter(t,e,s){return gn_getItemsPrevFilter(t,e.items.filter,e.items.visibleConf.org,s)}function gn_getScrollItemsPrevFilter(t,e,s,i){return gn_getItemsPrevFilter(t,e.items.filter,i,s)}function gn_getItemsPrevFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length;r>=0;r--){if(n++,n==c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;0==r&&(r=c)}}function gn_getVisibleOrg(t,e){return e.items.visibleConf.org||t.children().slice(0,e.items.visible).filter(e.items.filter).length}function gn_getVisibleItemsNext(t,e,s){for(var i=0,o=0,n=s,r=t.length-1;r>=n;n++){var c=t.eq(n);if(i+=c.is(":visible")?c[e.d.outerWidth](!0):0,i>e.maxDimension)return o;if(o++,o==r+1)return o;n==r&&(n=-1)}}function gn_getVisibleItemsNextTestCircular(t,e,s,i){var o=gn_getVisibleItemsNext(t,e,s);return e.circular||s+o>i&&(o=i-s),o}function gn_getVisibleItemsNextFilter(t,e,s){return gn_getItemsNextFilter(t,e.items.filter,e.items.visibleConf.org,s,e.circular)}function gn_getScrollItemsNextFilter(t,e,s,i){return gn_getItemsNextFilter(t,e.items.filter,i+1,s,e.circular)-1}function gn_getItemsNextFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length-1;c>=r;r++){if(n++,n>=c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;r==c&&(r=-1)}}function gi_getCurrentItems(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsPrev(t,e,s){return t.slice(s,e.items.visibleConf.old+s)}function gi_getNewItemsPrev(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsNext(t,e){return t.slice(0,e.items.visibleConf.old)}function gi_getNewItemsNext(t,e,s){return t.slice(s,e.items.visible+s)}function sz_storeMargin(t,e,s){e.usePadding&&(is_string(s)||(s="_cfs_origCssMargin"),t.each(function(){var t=$(this),i=parseInt(t.css(e.d.marginRight),10);is_number(i)||(i=0),t.data(s,i)}))}function sz_resetMargin(t,e,s){if(e.usePadding){var i=is_boolean(s)?s:!1;is_number(s)||(s=0),sz_storeMargin(t,e,"_cfs_tempCssMargin"),t.each(function(){var t=$(this);t.css(e.d.marginRight,i?t.data("_cfs_tempCssMargin"):s+t.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(t){t.each(function(){var t=$(this);t.data("_cfs_origCss",t.attr("style")||"")})}function sz_restoreOrigCss(t){t.each(function(){var t=$(this);t.attr("style",t.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(t,e){var s=(t.items.visible,t.items[t.d.width]),i=t[t.d.height],o=is_percentage(i);e.each(function(){var e=$(this),n=s-ms_getPaddingBorderMargin(e,t,"Width");e[t.d.width](n),o&&e[t.d.height](ms_getPercentage(n,i))})}function sz_setSizes(t,e){var s=t.parent(),i=t.children(),o=gi_getCurrentItems(i,e),n=cf_mapWrapperSizes(ms_getSizes(o,e,!0),e,!1);if(s.css(n),e.usePadding){var r=e.padding,c=r[e.d[1]];e.align&&0>c&&(c=0);var a=o.last();a.css(e.d.marginRight,a.data("_cfs_origCssMargin")+c),t.css(e.d.top,r[e.d[0]]),t.css(e.d.left,r[e.d[3]])}return t.css(e.d.width,n[e.d.width]+2*ms_getTotalSize(i,e,"width")),t.css(e.d.height,ms_getLargestSize(i,e,"height")),n}function ms_getSizes(t,e,s){return[ms_getTotalSize(t,e,"width",s),ms_getLargestSize(t,e,"height",s)]}function ms_getLargestSize(t,e,s,i){return is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i?e[e.d[s]]:is_number(e.items[e.d[s]])?e.items[e.d[s]]:(s=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(t,e,s))}function ms_getTrueLargestSize(t,e,s){for(var i=0,o=0,n=t.length;n>o;o++){var r=t.eq(o),c=r.is(":visible")?r[e.d[s]](!0):0;c>i&&(i=c)}return i}function ms_getTotalSize(t,e,s,i){if(is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i)return e[e.d[s]];if(is_number(e.items[e.d[s]]))return e.items[e.d[s]]*t.length;for(var o=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",n=0,r=0,c=t.length;c>r;r++){var a=t.eq(r);n+=a.is(":visible")?a[e.d[o]](!0):0}return n}function ms_getParentSize(t,e,s){var i=t.is(":visible");i&&t.hide();var o=t.parent()[e.d[s]]();return i&&t.show(),o}function ms_getMaxDimension(t,e){return is_number(t[t.d.width])?t[t.d.width]:e}function ms_hasVariableSizes(t,e,s){for(var i=!1,o=!1,n=0,r=t.length;r>n;n++){var c=t.eq(n),a=c.is(":visible")?c[e.d[s]](!0):0;i===!1?i=a:i!=a&&(o=!0),0==i&&(o=!0)}return o}function ms_getPaddingBorderMargin(t,e,s){return t[e.d["outer"+s]](!0)-t[e.d[s.toLowerCase()]]()}function ms_getPercentage(t,e){if(is_percentage(e)){if(e=parseInt(e.slice(0,-1),10),!is_number(e))return t;t*=e/100}return t}function cf_e(t,e,s,i,o){return is_boolean(s)||(s=!0),is_boolean(i)||(i=!0),is_boolean(o)||(o=!1),s&&(t=e.events.prefix+t),i&&(t=t+"."+e.events.namespace),i&&o&&(t+=e.serialNumber),t}function cf_c(t,e){return is_string(e.classnames[t])?e.classnames[t]:t}function cf_mapWrapperSizes(t,e,s){is_boolean(s)||(s=!0);var i=e.usePadding&&s?e.padding:[0,0,0,0],o={};return o[e.d.width]=t[0]+i[1]+i[3],o[e.d.height]=t[1]+i[0]+i[2],o}function cf_sortParams(t,e){for(var s=[],i=0,o=t.length;o>i;i++)for(var n=0,r=e.length;r>n;n++)if(e[n].indexOf(typeof t[i])>-1&&is_undefined(s[n])){s[n]=t[i];break}return s}function cf_getPadding(t){if(is_undefined(t))return[0,0,0,0];if(is_number(t))return[t,t,t,t];if(is_string(t)&&(t=t.split("px").join("").split("em").join("").split(" ")),!is_array(t))return[0,0,0,0];for(var e=0;4>e;e++)t[e]=parseInt(t[e],10);switch(t.length){case 0:return[0,0,0,0];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];default:return[t[0],t[1],t[2],t[3]]}}function cf_getAlignPadding(t,e){var s=is_number(e[e.d.width])?Math.ceil(e[e.d.width]-ms_getTotalSize(t,e,"width")):0;switch(e.align){case"left":return[0,s];case"right":return[s,0];case"center":default:return[Math.ceil(s/2),Math.floor(s/2)]}}function cf_getDimensions(t){for(var e=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],s=e[0].length,i="right"==t.direction||"left"==t.direction?0:1,o={},n=0;s>n;n++)o[e[0][n]]=e[i][n];return o}function cf_getAdjust(t,e,s,i){var o=t;if(is_function(s))o=s.call(i,o);else if(is_string(s)){var n=s.split("+"),r=s.split("-");if(r.length>n.length)var c=!0,a=r[0],f=r[1];else var c=!1,a=n[0],f=n[1];switch(a){case"even":o=t%2==1?t-1:t;break;case"odd":o=t%2==0?t-1:t;break;default:o=t}f=parseInt(f,10),is_number(f)&&(c&&(f=-f),o+=f)}return(!is_number(o)||1>o)&&(o=1),o}function cf_getItemsAdjust(t,e,s,i){return cf_getItemAdjustMinMax(cf_getAdjust(t,e,s,i),e.items.visibleConf)}function cf_getItemAdjustMinMax(t,e){return is_number(e.min)&&t<e.min&&(t=e.min),is_number(e.max)&&t>e.max&&(t=e.max),1>t&&(t=1),t}function cf_getSynchArr(t){is_array(t)||(t=[[t]]),is_array(t[0])||(t=[t]);for(var e=0,s=t.length;s>e;e++)is_string(t[e][0])&&(t[e][0]=$(t[e][0])),is_boolean(t[e][1])||(t[e][1]=!0),is_boolean(t[e][2])||(t[e][2]=!0),is_number(t[e][3])||(t[e][3]=0);return t}function cf_getKeyCode(t){return"right"==t?39:"left"==t?37:"up"==t?38:"down"==t?40:-1}function cf_setCookie(t,e,s){if(t){var i=e.triggerHandler(cf_e("currentPosition",s));$.fn.carouFredSel.cookie.set(t,i)}}function cf_getCookie(t){var e=$.fn.carouFredSel.cookie.get(t);return""==e?0:e}function in_mapCss(t,e){for(var s={},i=0,o=e.length;o>i;i++)s[e[i]]=t.css(e[i]);return s}function in_complementItems(t,e,s,i){return is_object(t.visibleConf)||(t.visibleConf={}),is_object(t.sizesConf)||(t.sizesConf={}),0==t.start&&is_number(i)&&(t.start=i),is_object(t.visible)?(t.visibleConf.min=t.visible.min,t.visibleConf.max=t.visible.max,t.visible=!1):is_string(t.visible)?("variable"==t.visible?t.visibleConf.variable=!0:t.visibleConf.adjust=t.visible,t.visible=!1):is_function(t.visible)&&(t.visibleConf.adjust=t.visible,t.visible=!1),is_string(t.filter)||(t.filter=s.filter(":hidden").length>0?":visible":"*"),t[e.d.width]||(e.responsive?(debug(!0,"Set a "+e.d.width+" for the items!"),t[e.d.width]=ms_getTrueLargestSize(s,e,"outerWidth")):t[e.d.width]=ms_hasVariableSizes(s,e,"outerWidth")?"variable":s[e.d.outerWidth](!0)),t[e.d.height]||(t[e.d.height]=ms_hasVariableSizes(s,e,"outerHeight")?"variable":s[e.d.outerHeight](!0)),t.sizesConf.width=t.width,t.sizesConf.height=t.height,t}function in_complementVisibleItems(t,e){return"variable"==t.items[t.d.width]&&(t.items.visibleConf.variable=!0),t.items.visibleConf.variable||(is_number(t[t.d.width])?t.items.visible=Math.floor(t[t.d.width]/t.items[t.d.width]):(t.items.visible=Math.floor(e/t.items[t.d.width]),t[t.d.width]=t.items.visible*t.items[t.d.width],t.items.visibleConf.adjust||(t.align=!1)),("Infinity"==t.items.visible||t.items.visible<1)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),t.items.visibleConf.variable=!0)),t}function in_complementPrimarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerWidth")),t}function in_complementSecondarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerHeight")),t||(t=e.items[e.d.height]),t}function in_getAlignPadding(t,e){var s=cf_getAlignPadding(gi_getCurrentItems(e,t),t);return t.padding[t.d[1]]=s[1],t.padding[t.d[3]]=s[0],t}function in_getResponsiveValues(t,e){var s=cf_getItemAdjustMinMax(Math.ceil(t[t.d.width]/t.items[t.d.width]),t.items.visibleConf);s>e.length&&(s=e.length);var i=Math.floor(t[t.d.width]/s);return t.items.visible=s,t.items[t.d.width]=i,t[t.d.width]=s*i,t}function bt_pauseOnHoverConfig(t){if(is_string(t))var e=t.indexOf("immediate")>-1?!0:!1,s=t.indexOf("resume")>-1?!0:!1;else var e=s=!1;return[e,s]}function bt_mousesheelNumber(t){return is_number(t)?t:null}function is_null(t){return null===t}function is_undefined(t){return is_null(t)||"undefined"==typeof t||""===t||"undefined"===t}function is_array(t){return t instanceof Array}function is_jquery(t){return t instanceof jQuery}function is_object(t){return(t instanceof Object||"object"==typeof t)&&!is_null(t)&&!is_jquery(t)&&!is_array(t)&&!is_function(t)}function is_number(t){return(t instanceof Number||"number"==typeof t)&&!isNaN(t)}function is_string(t){return(t instanceof String||"string"==typeof t)&&!is_undefined(t)&&!is_true(t)&&!is_false(t)}function is_function(t){return t instanceof Function||"function"==typeof t}function is_boolean(t){return t instanceof Boolean||"boolean"==typeof t||is_true(t)||is_false(t)}function is_true(t){return t===!0||"true"===t}function is_false(t){return t===!1||"false"===t}function is_percentage(t){return is_string(t)&&"%"==t.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(t,e){debug(!0,t+" is DEPRECATED, support for it will be removed. Use "+e+" instead.")}function debug(t,e){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(t)){var s=" ("+t.selector+")";t=t.debug}else var s="";if(!t)return!1;e=is_string(e)?"carouFredSel"+s+": "+e:["carouFredSel"+s+":",e],window.console.log(e)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(t,e,s){t=go_getObject($tt0,t),t.items=go_getItemsObject($tt0,t.items),t.scroll=go_getScrollObject($tt0,t.scroll),t.auto=go_getAutoObject($tt0,t.auto),t.prev=go_getPrevNextObject($tt0,t.prev),t.next=go_getPrevNextObject($tt0,t.next),t.pagination=go_getPaginationObject($tt0,t.pagination),t.swipe=go_getSwipeObject($tt0,t.swipe),t.mousewheel=go_getMousewheelObject($tt0,t.mousewheel),e&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,t)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,t),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var i=$cfs.children(),o=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,o),opts.items=in_complementItems(opts.items,opts,i,s),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,i),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,i),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(o,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,o)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(i,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(i,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,i,o);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,i),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var t=$cfs.children(),e=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),s="relative";switch(e.position){case"absolute":case"fixed":s=e.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(e),$wrp.css({overflow:"hidden",position:s}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",e.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(t,opts),sz_storeOrigCss(t),opts.responsive&&sz_setResponsiveSizes(opts,t)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(t,e){return t.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),e)),!0}),$cfs.bind(cf_e("finish",conf),function(t){return t.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(t,e,s){if(t.stopPropagation(),tmrs=sc_clearTimers(tmrs),e&&crsl.isScrolling){scrl.isStopped=!0;var i=getTime()-scrl.startTime;scrl.duration-=i,scrl.pre&&(scrl.pre.duration-=i),scrl.post&&(scrl.post.duration-=i),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||s&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var o=opts.auto.timeoutDuration-tmrs.timePassed,n=100-Math.ceil(100*o/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,n,o)}return!0}),$cfs.bind(cf_e("play",conf),function(t,e,s,i){t.stopPropagation(),tmrs=sc_clearTimers(tmrs);var o=[e,s,i],n=["string","number","boolean"],r=cf_sortParams(o,n);if(e=r[0],s=r[1],i=r[2],"prev"!=e&&"next"!=e&&(e=crsl.direction),is_number(s)||(s=0),is_boolean(i)||(i=!1),i&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return t.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var c=opts.auto.timeoutDuration+s;return dur2=c-tmrs.timePassed,perc=100-Math.ceil(100*dur2/c),opts.auto.progress&&(tmrs.progress=setInterval(function(){var t=getTime()-tmrs.startTime+tmrs.timePassed,e=Math.ceil(100*t/c);opts.auto.progress.updater.call(opts.auto.progress.bar[0],e)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),e):$cfs.trigger(cf_e(e,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(t){return t.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(t,e,s,i,o){if(t.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return t.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var n=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(n>itms.total)return t.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+n+" needed): Not scrolling.");var r=[e,s,i,o],c=["object","number/string","function","boolean"],a=cf_sortParams(r,c);e=a[0],s=a[1],i=a[2],o=a[3];var f=t.type.slice(conf.events.prefix.length);if(is_object(e)||(e={}),is_function(i)&&(e.onAfter=i),is_boolean(o)&&(e.queue=o),e=$.extend(!0,{},opts[f],e),e.conditions&&!e.conditions.call($tt0,f))return t.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(s)){if("*"!=opts.items.filter)s="visible";else for(var l=[s,e.items,opts[f].items],a=0,u=l.length;u>a;a++)if(is_number(l[a])||"page"==l[a]||"visible"==l[a]){s=l[a];break}switch(s){case"page":return t.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(f+"Page",conf),[e,i]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(s=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]]),t.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(e.duration>0&&crsl.isScrolling)return e.queue&&("last"==e.queue&&(queu=[]),("first"!=e.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]])),t.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+f,conf),[e,s]),opts.synchronise)for(var p=opts.synchronise,d=[e,s],g=0,u=p.length;u>g;g++){var m=f;p[g][2]||(m="prev"==m?"next":"prev"),p[g][1]||(d[0]=p[g][0].triggerHandler("_cfs_triggerEvent",["configuration",m])),d[1]=s+p[g][3],p[g][0].trigger("_cfs_triggerEvent",["slide_"+m,d])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if(opts.items.visibleConf.variable)s=gn_getVisibleItemsPrev(i,opts,itms.total-1);else if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsPrevFilter(i,opts,itms.total-1,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}if(opts.circular||itms.total-s<itms.first&&(s=itms.total-itms.first),opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){var n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible+s<=n&&s<itms.total&&(s++,n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=n}else if("*"!=opts.items.filter){var n=gn_getVisibleItemsNextFilter(i,opts,itms.total-s);opts.items.visible=cf_getItemsAdjust(n,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items backward."),itms.first+=s;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&e.onEnd&&e.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-s,itms.total).prependTo($cfs),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),r=gi_getOldItemsPrev(i,opts,s),c=gi_getNewItemsPrev(i,opts),a=i.eq(s-1),f=r.last(),l=c.last();sz_resetMargin(i,opts);var u=0,p=0;if(opts.align){var d=cf_getAlignPadding(c,opts);u=d[0],p=d[1]}var g=0>u?opts.padding[opts.d[3]]:0,m=!1,_=$();if(opts.items.visible<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,a=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(c,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z={},j={},N=sc_getDuration(e,opts,s,h);switch(e.fx){case"cover":case"cover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visible),opts,"width")}m&&(opts.items[opts.d.width]=b),sz_resetMargin(i,opts,!0),p>=0&&sz_resetMargin(f,opts,opts.padding[opts.d[1]]),u>=0&&sz_resetMargin(a,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=p,opts.padding[opts.d[3]]=u),z[opts.d.left]=-(h-g),j[opts.d.left]=-(P-g),x[opts.d.left]=w[opts.d.width];var k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){},q=function(){},D=function(){},V=function(){},R=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp)}switch(e.fx){case"crossfade":case"uncover":case"uncover-fade":v.children().slice(0,s).remove(),v.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":v.children().slice(opts.items.visible).remove(),v.css(j)}if($cfs.css(z),scrl=sc_setScroll(N,e.easing,conf),C[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(k=function(){$wrp.css(w)},O=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){switch(l.not(a).length&&(S[opts.d.marginRight]=a.data("_cfs_origCssMargin"),0>u?a.css(S):(H=function(){a.css(S)},q=function(){scrl.anims.push([a,S])})),e.fx){case"cover":case"cover-fade":v.children().eq(s-1).css(S)}l.not(f).length&&(y[opts.d.marginRight]=f.data("_cfs_origCssMargin"),T=function(){f.css(y)},M=function(){scrl.anims.push([f,y])}),p>=0&&(I[opts.d.marginRight]=l.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],F=function(){l.css(I)},A=function(){scrl.anims.push([l,I])})}R=function(){$cfs.css(C)};var E=opts.items.visible+s-itms.total;V=function(){if(E>0&&($cfs.children().slice(itms.total).remove(),r=$($cfs.children().slice(itms.total-(opts.items.visible-E)).get().concat($cfs.children().slice(0,E).get()))),sc_showHiddenItems(m),opts.usePadding){var t=$cfs.children().eq(opts.items.visible+s-1);t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var W=sc_mapCallbackArguments(r,_,c,s,"prev",N,w);switch(D=function(){sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",W,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",W,clbk),e.fx){case"none":$cfs.css(C),k(),T(),F(),H(),R(),V(),D();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){k(),T(),F(),H(),R(),V(),scrl=sc_setScroll(N,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},D]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},D]),O(),T(),F(),H(),R(),V();break;case"cover":scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"uncover":scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;default:scrl.anims.push([$cfs,C,function(){V(),D()}]),O(),M(),A(),q()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0
|
2 |
}),$cfs.bind(cf_e("slide_next",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsNextFilter(i,opts,0,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}var n=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var r=gn_getVisibleItemsNext(i,opts,s),o=gn_getVisibleItemsPrev(i,opts,n-1);else var r=opts.items.visible,o=opts.items.visible;s+r>n&&(s=n-o)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-s>=r&&s<itms.total;)s++,r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=r}else if("*"!=opts.items.filter){var r=gn_getVisibleItemsNextFilter(i,opts,s);opts.items.visible=cf_getItemsAdjust(r,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items forward."),itms.first-=s;itms.first<0;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&e.onEnd&&e.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),c=gi_getOldItemsNext(i,opts),a=gi_getNewItemsNext(i,opts,s),f=i.eq(s-1),l=c.last(),u=a.last();sz_resetMargin(i,opts);var p=0,d=0;if(opts.align){var g=cf_getAlignPadding(a,opts);p=g[0],d=g[1]}var m=!1,_=$();if(opts.items.visibleConf.old<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,f=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(a,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z=sc_getDuration(e,opts,s,h);switch(e.fx){case"uncover":case"uncover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visibleConf.old),opts,"width")}m&&(opts.items[opts.d.width]=b),opts.align&&opts.padding[opts.d[1]]<0&&(opts.padding[opts.d[1]]=0),sz_resetMargin(i,opts,!0),sz_resetMargin(l,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=d,opts.padding[opts.d[3]]=p),I[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var j=function(){},N=function(){},k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp),v.children().slice(opts.items.visibleConf.old).remove()}switch(e.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),v.css("zIndex",0)}if(scrl=sc_setScroll(z,e.easing,conf),C[opts.d.left]=-h,x[opts.d.left]=-P,0>p&&(C[opts.d.left]+=p),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(j=function(){$wrp.css(w)},N=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){var q=u.data("_cfs_origCssMargin");d>=0&&(q+=opts.padding[opts.d[1]]),u.css(opts.d.marginRight,q),f.not(l).length&&(y[opts.d.marginRight]=l.data("_cfs_origCssMargin")),k=function(){l.css(y)},O=function(){scrl.anims.push([l,y])};var D=f.data("_cfs_origCssMargin");p>0&&(D+=opts.padding[opts.d[3]]),S[opts.d.marginRight]=D,T=function(){f.css(S)},M=function(){scrl.anims.push([f,S])}}H=function(){$cfs.css(I)};var V=opts.items.visible+s-itms.total;A=function(){V>0&&$cfs.children().slice(itms.total).remove();var t=$cfs.children().slice(0,s).appendTo($cfs).last();if(V>0&&(a=gi_getCurrentItems(i,opts)),sc_showHiddenItems(m),opts.usePadding){if(itms.total<opts.items.visible+s){var e=$cfs.children().eq(opts.items.visible-1);e.css(opts.d.marginRight,e.data("_cfs_origCssMargin")+opts.padding[opts.d[1]])}t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var R=sc_mapCallbackArguments(c,_,a,s,"next",z,w);switch(F=function(){$cfs.css("zIndex",$cfs.data("_cfs_origCssZindex")),sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",R,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",R,clbk),e.fx){case"none":$cfs.css(C),j(),k(),T(),H(),A(),F();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){j(),k(),T(),H(),A(),scrl=sc_setScroll(z,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},F]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},F]),N(),k(),T(),H(),A();break;case"cover":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"cover-fade":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"uncover":scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;default:scrl.anims.push([$cfs,C,function(){H(),A(),F()}]),N(),O(),M()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0}),$cfs.bind(cf_e("slideTo",conf),function(t,e,s,i,o,n,r){t.stopPropagation();var c=[e,s,i,o,n,r],a=["string/number/object","number","boolean","object","string","function"],f=cf_sortParams(c,a);return o=f[3],n=f[4],r=f[5],e=gn_getItemIndex(f[0],f[1],f[2],itms,$cfs),0==e?!1:(is_object(o)||(o=!1),"prev"!=n&&"next"!=n&&(n=opts.circular?e<=itms.total/2?"next":"prev":0==itms.first||itms.first>e?"next":"prev"),"prev"==n&&(e=itms.total-e),$cfs.trigger(cf_e(n,conf),[o,e,r]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i-1,e,"prev",s])}),$cfs.bind(cf_e("nextPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i+1,e,"next",s])}),$cfs.bind(cf_e("slideToPage",conf),function(t,e,s,i,o){t.stopPropagation(),is_number(e)||(e=$cfs.triggerHandler(cf_e("currentPage",conf)));var n=opts.pagination.items||opts.items.visible,r=Math.ceil(itms.total/n)-1;return 0>e&&(e=r),e>r&&(e=0),$cfs.triggerHandler(cf_e("slideTo",conf),[e*n,0,!0,s,i,o])}),$cfs.bind(cf_e("jumpToStart",conf),function(t,e){if(t.stopPropagation(),e=e?gn_getItemIndex(e,0,!0,itms,$cfs):0,e+=itms.first,0!=e){if(itms.total>0)for(;e>itms.total;)e-=itms.total;$cfs.prepend($cfs.children().slice(e,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(t,e){if(t.stopPropagation(),e)e=cf_getSynchArr(e);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");e=opts.synchronise}for(var s=$cfs.triggerHandler(cf_e("currentPosition",conf)),i=!0,o=0,n=e.length;n>o;o++)e[o][0].triggerHandler(cf_e("slideTo",conf),[s,e[o][3],!0])||(i=!1);return i}),$cfs.bind(cf_e("queue",conf),function(t,e,s){return t.stopPropagation(),is_function(e)?e.call($tt0,queu):is_array(e)?queu=e:is_undefined(e)||queu.push([e,s]),queu}),$cfs.bind(cf_e("insertItem",conf),function(t,e,s,i,o){t.stopPropagation();var n=[e,s,i,o],r=["string/object","string/number/object","boolean","number"],c=cf_sortParams(n,r);if(e=c[0],s=c[1],i=c[2],o=c[3],is_object(e)&&!is_jquery(e)?e=$(e):is_string(e)&&(e=$(e)),!is_jquery(e)||0==e.length)return debug(conf,"Not a valid object.");is_undefined(s)&&(s="end"),sz_storeMargin(e,opts),sz_storeOrigCss(e);var a=s,f="before";"end"==s?i?(0==itms.first?(s=itms.total-1,f="after"):(s=itms.first,itms.first+=e.length),0>s&&(s=0)):(s=itms.total-1,f="after"):s=gn_getItemIndex(s,o,i,itms,$cfs);var l=$cfs.children().eq(s);return l.length?l[f](e):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(e)),"end"==a||i||s<itms.first&&(itms.first+=e.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(t,e,s,i){t.stopPropagation();var o=[e,s,i],n=["string/number/object","boolean","number"],r=cf_sortParams(o,n);e=r[0],s=r[1],i=r[2];if(e instanceof $&&e.length>1)return c=$(),e.each(function(){var t=$cfs.trigger(cf_e("removeItem",conf),[$(this),s,i]);t&&(c=c.add(t))}),c;if(is_undefined(e)||"end"==e)c=$cfs.children().last();else{e=gn_getItemIndex(e,i,s,itms,$cfs);var c=$cfs.children().eq(e);c.length&&e<itms.first&&(itms.first-=c.length)}return c&&c.length&&(c.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),c}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length);return is_array(e)&&(clbk[s]=e),is_function(e)&&clbk[s].push(e),clbk[s]}),$cfs.bind(cf_e("currentPosition",conf),function(t,e){if(t.stopPropagation(),0==itms.first)var s=0;else var s=itms.total-itms.first;return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentPage",conf),function(t,e){t.stopPropagation();var s,i=opts.pagination.items||opts.items.visible,o=Math.ceil(itms.total/i-1);return s=0==itms.first?0:itms.first<itms.total%i?0:itms.first!=i||opts.circular?Math.round((itms.total-itms.first)/i):o,0>s&&(s=0),s>o&&(s=o),is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentVisible",conf),function(t,e){t.stopPropagation();var s=gi_getCurrentItems($cfs.children(),opts);return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("slice",conf),function(t,e,s,i){if(t.stopPropagation(),0==itms.total)return!1;var o=[e,s,i],n=["number","number","function"],r=cf_sortParams(o,n);if(e=is_number(r[0])?r[0]:0,s=is_number(r[1])?r[1]:itms.total,i=r[2],e+=itms.first,s+=itms.first,items.total>0){for(;e>itms.total;)e-=itms.total;for(;s>itms.total;)s-=itms.total;for(;0>e;)e+=itms.total;for(;0>s;)s+=itms.total}var c,a=$cfs.children();return c=s>e?a.slice(e,s):$(a.slice(e,itms.total).get().concat(a.slice(0,s).get())),is_function(i)&&i.call($tt0,c),c}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length),i=crsl[s];return is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(t,e,s){return t.stopPropagation(),is_undefined(e)?e=$("body"):is_string(e)&&(e=$(e)),is_jquery(e)&&0!=e.length?(is_string(s)||(s="a.caroufredsel"),e.find(s).each(function(){var t=this.hash||"";t.length>0&&-1!=$cfs.children().index($(t))&&$(this).unbind("click").click(function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),t)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(t,e){if(t.stopPropagation(),opts.pagination.container){var s=opts.pagination.items||opts.items.visible,i=Math.ceil(itms.total/s);e&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var t=0;i>t;t++){var e=$cfs.children().eq(gn_getItemIndex(t*s,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(e[0],t+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(t){$(this).bind(opts.pagination.event,function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[t*s,-opts.pagination.deviation,!0,opts.pagination])})})}));var o=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return o>=i&&(o=0),0>o&&(o=i-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(o).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(){var t=opts.items.visible,e=$cfs.children(),s=ms_getParentSize($wrp,opts,"width");if(itms.total=e.length,crsl.primarySizePercentage?(opts.maxDimension=s,opts[opts.d.width]=ms_getPercentage(s,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,s),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,e,s),t=opts.items.visible,sz_setResponsiveSizes(opts,e)):opts.items.visibleConf.variable?t=gn_getVisibleItemsNext(e,opts,0):"*"!=opts.items.filter&&(t=gn_getVisibleItemsNextFilter(e,opts,0)),!opts.circular&&0!=itms.first&&t>itms.first){if(opts.items.visibleConf.variable)var i=gn_getVisibleItemsPrev(e,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var i=gn_getVisibleItemsPrevFilter(e,opts,itms.first)-itms.first;else var i=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+i+" items backward."),$cfs.trigger(cf_e("prev",conf),i)}opts.items.visible=cf_getItemsAdjust(t,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,e);var o=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,o]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),o}),$cfs.bind(cf_e("destroy",conf),function(t,e){return t.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),e&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(t,e,s){return t.stopPropagation(),$cfs.triggerHandler(cf_e(e,conf),s)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(t){t.preventDefault();var e=!1,s=null;crsl.isPaused?e="play":opts.auto.pauseOnEvent&&(e="pause",s=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),e&&$cfs.trigger(cf_e(e,conf),s)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e==opts.next.key&&(t.preventDefault(),$cfs.trigger(cf_e("next",conf))),e==opts.prev.key&&(t.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e>=49&&58>e&&(e=(e-49)*opts.items.visible,e<=itms.total&&(t.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[e,0,!0,opts.pagination])))}),$.fn.swipe){var e="ontouchstart"in window;if(e&&opts.swipe.onTouch||!e&&opts.swipe.onMouse){var s=$.extend(!0,{},opts.prev,opts.swipe),i=$.extend(!0,{},opts.next,opts.swipe),o=function(){$cfs.trigger(cf_e("prev",conf),[s])},n=function(){$cfs.trigger(cf_e("next",conf),[i])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=n,opts.swipe.options.swipeDown=o;break;default:opts.swipe.options.swipeLeft=n,opts.swipe.options.swipeRight=o}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var r=$.extend(!0,{},opts.prev,opts.mousewheel),c=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(t,e){t.preventDefault(),e>0?$cfs.trigger(cf_e("prev",conf),[r]):$cfs.trigger(cf_e("next",conf),[c])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var a=function(){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},f=$(window),l=null;if($.debounce&&"debounce"==conf.onWindowResize)l=$.debounce(200,a);else if($.throttle&&"throttle"==conf.onWindowResize)l=$.throttle(300,a);else{var u=0,p=0;l=function(){var t=f.width(),e=f.height();(t!=u||e!=p)&&(a(),u=t,p=e)}}f.bind(cf_e("resize",conf,!1,!0,!0),l)}},FN._unbind_buttons=function(){var t=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(t),opts.auto.button&&opts.auto.button.unbind(t),opts.prev.button&&opts.prev.button.unbind(t),opts.next.button&&opts.next.button.unbind(t),opts.pagination.container&&(opts.pagination.container.unbind(t),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,s.length<1)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(t){return'<a href="#"><span>'+t+"</span></a>"},$.fn.carouFredSel.progressbarUpdater=function(t){$(this).css("width",t+"%")},$.fn.carouFredSel.cookie={get:function(t){t+="=";for(var e=document.cookie.split(";"),s=0,i=e.length;i>s;s++){for(var o=e[s];" "==o.charAt(0);)o=o.slice(1);if(0==o.indexOf(t))return o.slice(t.length)}return 0},set:function(t,e,s){var i="";if(s){var o=new Date;o.setTime(o.getTime()+24*s*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=t+"="+e+i+"; path=/"},remove:function(t){$.fn.carouFredSel.cookie.set(t,"",-1)}},$.extend($.easing,{quadratic:function(t){var e=t*t;return t*(-e*t+4*e-6*t+4)},cubic:function(t){return t*(4*t*t-9*t+6)},elastic:function(t){var e=t*t;return t*(33*e*e-106*e*t+126*e-67*t+15)}}))}(jQuery);
|
1 |
+
!function($){function sc_setScroll(t,e,s){return"transition"==s.transition&&"swing"==e&&(e="ease"),{anims:[],duration:t,orgDuration:t,easing:e,startTime:getTime()}}function sc_startScroll(t,e){for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o&&o[0][e.transition](o[1],t.duration,t.easing,o[2])}}function sc_stopScroll(t,e){is_boolean(e)||(e=!0),is_object(t.pre)&&sc_stopScroll(t.pre,e);for(var s=0,i=t.anims.length;i>s;s++){var o=t.anims[s];o[0].stop(!0),e&&(o[0].css(o[1]),is_function(o[2])&&o[2]())}is_object(t.post)&&sc_stopScroll(t.post,e)}function sc_afterScroll(t,e,s){switch(e&&e.remove(),s.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":t.css("opacity",1),t.css("filter","")}}function sc_fireCallbacks(t,e,s,i,o){if(e[s]&&e[s].call(t,i),o[s].length)for(var n=0,r=o[s].length;r>n;n++)o[s][n].call(t,i);return[]}function sc_fireQueue(t,e,s){return e.length&&(t.trigger(cf_e(e[0][0],s),e[0][1]),e.shift()),e}function sc_hideHiddenItems(t){t.each(function(){var t=$(this);t.data("_cfs_isHidden",t.is(":hidden")).hide()})}function sc_showHiddenItems(t){t&&t.each(function(){var t=$(this);t.data("_cfs_isHidden")||t.show()})}function sc_clearTimers(t){return t.auto&&clearTimeout(t.auto),t.progress&&clearInterval(t.progress),t}function sc_mapCallbackArguments(t,e,s,i,o,n,r){return{width:r.width,height:r.height,items:{old:t,skipped:e,visible:s},scroll:{items:i,direction:o,duration:n}}}function sc_getDuration(t,e,s,i){var o=t.duration;return"none"==t.fx?0:("auto"==o?o=e.scroll.duration/e.scroll.items*s:10>o&&(o=i/o),1>o?0:("fade"==t.fx&&(o/=2),Math.round(o)))}function nv_showNavi(t,e,s){var i=is_number(t.items.minimum)?t.items.minimum:t.items.visible+1;if("show"==e||"hide"==e)var o=e;else if(i>e){debug(s,"Not enough items ("+e+" total, "+i+" needed): Hiding navigation.");var o="hide"}else var o="show";var n="show"==o?"removeClass":"addClass",r=cf_c("hidden",s);t.auto.button&&t.auto.button[o]()[n](r),t.prev.button&&t.prev.button[o]()[n](r),t.next.button&&t.next.button[o]()[n](r),t.pagination.container&&t.pagination.container[o]()[n](r)}function nv_enableNavi(t,e,s){if(!t.circular&&!t.infinite){var i="removeClass"==e||"addClass"==e?e:!1,o=cf_c("disabled",s);if(t.auto.button&&i&&t.auto.button[i](o),t.prev.button){var n=i||0==e?"addClass":"removeClass";t.prev.button[n](o)}if(t.next.button){var n=i||e==t.items.visible?"addClass":"removeClass";t.next.button[n](o)}}}function go_getObject(t,e){return is_function(e)?e=e.call(t):is_undefined(e)&&(e={}),e}function go_getItemsObject(t,e){return e=go_getObject(t,e),is_number(e)?e={visible:e}:"variable"==e?e={visible:e,width:e,height:e}:is_object(e)||(e={}),e}function go_getScrollObject(t,e){return e=go_getObject(t,e),is_number(e)?e=50>=e?{items:e}:{duration:e}:is_string(e)?e={easing:e}:is_object(e)||(e={}),e}function go_getNaviObject(t,e){if(e=go_getObject(t,e),is_string(e)){var s=cf_getKeyCode(e);e=-1==s?$(e):s}return e}function go_getAutoObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_boolean(e)?e={play:e}:is_number(e)&&(e={timeoutDuration:e}),e.progress&&(is_string(e.progress)||is_jquery(e.progress))&&(e.progress={bar:e.progress}),e}function go_complementAutoObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_boolean(e.play)||(e.play=!0),is_number(e.delay)||(e.delay=0),is_undefined(e.pauseOnEvent)&&(e.pauseOnEvent=!0),is_boolean(e.pauseOnResize)||(e.pauseOnResize=!0),is_number(e.timeoutDuration)||(e.timeoutDuration=e.duration<10?2500:5*e.duration),e.progress&&(is_function(e.progress.bar)&&(e.progress.bar=e.progress.bar.call(t)),is_string(e.progress.bar)&&(e.progress.bar=$(e.progress.bar)),e.progress.bar?(is_function(e.progress.updater)||(e.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(e.progress.interval)||(e.progress.interval=50)):e.progress=!1),e}function go_getPrevNextObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_number(e)&&(e={key:e}),e}function go_complementPrevNextObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_string(e.key)&&(e.key=cf_getKeyCode(e.key)),e}function go_getPaginationObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={container:e}:is_boolean(e)&&(e={keys:e}),e}function go_complementPaginationObject(t,e){return is_function(e.container)&&(e.container=e.container.call(t)),is_string(e.container)&&(e.container=$(e.container)),is_number(e.items)||(e.items=!1),is_boolean(e.keys)||(e.keys=!1),is_function(e.anchorBuilder)||is_false(e.anchorBuilder)||(e.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(e.deviation)||(e.deviation=0),e}function go_getSwipeObject(t,e){return is_function(e)&&(e=e.call(t)),is_undefined(e)&&(e={onTouch:!1}),is_true(e)?e={onTouch:e}:is_number(e)&&(e={items:e}),e}function go_complementSwipeObject(t,e){return is_boolean(e.onTouch)||(e.onTouch=!0),is_boolean(e.onMouse)||(e.onMouse=!1),is_object(e.options)||(e.options={}),is_boolean(e.options.triggerOnTouchEnd)||(e.options.triggerOnTouchEnd=!1),e}function go_getMousewheelObject(t,e){return is_function(e)&&(e=e.call(t)),is_true(e)?e={}:is_number(e)?e={items:e}:is_undefined(e)&&(e=!1),e}function go_complementMousewheelObject(t,e){return e}function gn_getItemIndex(t,e,s,i,o){if(is_string(t)&&(t=$(t,o)),is_object(t)&&(t=$(t,o)),is_jquery(t)?(t=o.children().index(t),is_boolean(s)||(s=!1)):is_boolean(s)||(s=!0),is_number(t)||(t=0),is_number(e)||(e=0),s&&(t+=i.first),t+=e,i.total>0){for(;t>=i.total;)t-=i.total;for(;0>t;)t+=i.total}return t}function gn_getVisibleItemsPrev(t,e,s){for(var i=0,o=0,n=s;n>=0;n--){var r=t.eq(n);if(i+=r.is(":visible")?r[e.d.outerWidth](!0):0,i>e.maxDimension)return o;0==n&&(n=t.length),o++}}function gn_getVisibleItemsPrevFilter(t,e,s){return gn_getItemsPrevFilter(t,e.items.filter,e.items.visibleConf.org,s)}function gn_getScrollItemsPrevFilter(t,e,s,i){return gn_getItemsPrevFilter(t,e.items.filter,i,s)}function gn_getItemsPrevFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length;r>=0;r--){if(n++,n==c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;0==r&&(r=c)}}function gn_getVisibleOrg(t,e){return e.items.visibleConf.org||t.children().slice(0,e.items.visible).filter(e.items.filter).length}function gn_getVisibleItemsNext(t,e,s){for(var i=0,o=0,n=s,r=t.length-1;r>=n;n++){var c=t.eq(n);if(i+=c.is(":visible")?c[e.d.outerWidth](!0):0,i>e.maxDimension)return o;if(o++,o==r+1)return o;n==r&&(n=-1)}}function gn_getVisibleItemsNextTestCircular(t,e,s,i){var o=gn_getVisibleItemsNext(t,e,s);return e.circular||s+o>i&&(o=i-s),o}function gn_getVisibleItemsNextFilter(t,e,s){return gn_getItemsNextFilter(t,e.items.filter,e.items.visibleConf.org,s,e.circular)}function gn_getScrollItemsNextFilter(t,e,s,i){return gn_getItemsNextFilter(t,e.items.filter,i+1,s,e.circular)-1}function gn_getItemsNextFilter(t,e,s,i){for(var o=0,n=0,r=i,c=t.length-1;c>=r;r++){if(n++,n>=c)return n;var a=t.eq(r);if(a.is(e)&&(o++,o==s))return n;r==c&&(r=-1)}}function gi_getCurrentItems(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsPrev(t,e,s){return t.slice(s,e.items.visibleConf.old+s)}function gi_getNewItemsPrev(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsNext(t,e){return t.slice(0,e.items.visibleConf.old)}function gi_getNewItemsNext(t,e,s){return t.slice(s,e.items.visible+s)}function sz_storeMargin(t,e,s){e.usePadding&&(is_string(s)||(s="_cfs_origCssMargin"),t.each(function(){var t=$(this),i=parseInt(t.css(e.d.marginRight),10);is_number(i)||(i=0),t.data(s,i)}))}function sz_resetMargin(t,e,s){if(e.usePadding){var i=is_boolean(s)?s:!1;is_number(s)||(s=0),sz_storeMargin(t,e,"_cfs_tempCssMargin"),t.each(function(){var t=$(this);t.css(e.d.marginRight,i?t.data("_cfs_tempCssMargin"):s+t.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(t){t.each(function(){var t=$(this);t.data("_cfs_origCss",t.attr("style")||"")})}function sz_restoreOrigCss(t){t.each(function(){var t=$(this);t.attr("style",t.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(t,e){var s=(t.items.visible,t.items[t.d.width]),i=t[t.d.height],o=is_percentage(i);e.each(function(){var e=$(this),n=s-ms_getPaddingBorderMargin(e,t,"Width");e[t.d.width](n),o&&e[t.d.height](ms_getPercentage(n,i))})}function sz_setSizes(t,e){var s=t.parent(),i=t.children(),o=gi_getCurrentItems(i,e),n=cf_mapWrapperSizes(ms_getSizes(o,e,!0),e,!1);if(s.css(n),e.usePadding){var r=e.padding,c=r[e.d[1]];e.align&&0>c&&(c=0);var a=o.last();a.css(e.d.marginRight,a.data("_cfs_origCssMargin")+c),t.css(e.d.top,r[e.d[0]]),t.css(e.d.left,r[e.d[3]])}return t.css(e.d.width,n[e.d.width]+2*ms_getTotalSize(i,e,"width")),t.css(e.d.height,ms_getLargestSize(i,e,"height")),n}function ms_getSizes(t,e,s){return[ms_getTotalSize(t,e,"width",s),ms_getLargestSize(t,e,"height",s)]}function ms_getLargestSize(t,e,s,i){return is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i?e[e.d[s]]:is_number(e.items[e.d[s]])?e.items[e.d[s]]:(s=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(t,e,s))}function ms_getTrueLargestSize(t,e,s){for(var i=0,o=0,n=t.length;n>o;o++){var r=t.eq(o),c=r.is(":visible")?r[e.d[s]](!0):0;c>i&&(i=c)}return i}function ms_getTotalSize(t,e,s,i){if(is_boolean(i)||(i=!1),is_number(e[e.d[s]])&&i)return e[e.d[s]];if(is_number(e.items[e.d[s]]))return e.items[e.d[s]]*t.length;for(var o=s.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",n=0,r=0,c=t.length;c>r;r++){var a=t.eq(r);n+=a.is(":visible")?a[e.d[o]](!0):0}return n}function ms_getParentSize(t,e,s){var i=t.is(":visible");i&&t.hide();var o=t.parent()[e.d[s]]();return i&&t.show(),o}function ms_getMaxDimension(t,e){return is_number(t[t.d.width])?t[t.d.width]:e}function ms_hasVariableSizes(t,e,s){for(var i=!1,o=!1,n=0,r=t.length;r>n;n++){var c=t.eq(n),a=c.is(":visible")?c[e.d[s]](!0):0;i===!1?i=a:i!=a&&(o=!0),0==i&&(o=!0)}return o}function ms_getPaddingBorderMargin(t,e,s){return t[e.d["outer"+s]](!0)-t[e.d[s.toLowerCase()]]()}function ms_getPercentage(t,e){if(is_percentage(e)){if(e=parseInt(e.slice(0,-1),10),!is_number(e))return t;t*=e/100}return t}function cf_e(t,e,s,i,o){return is_boolean(s)||(s=!0),is_boolean(i)||(i=!0),is_boolean(o)||(o=!1),s&&(t=e.events.prefix+t),i&&(t=t+"."+e.events.namespace),i&&o&&(t+=e.serialNumber),t}function cf_c(t,e){return is_string(e.classnames[t])?e.classnames[t]:t}function cf_mapWrapperSizes(t,e,s){is_boolean(s)||(s=!0);var i=e.usePadding&&s?e.padding:[0,0,0,0],o={};return o[e.d.width]=t[0]+i[1]+i[3],o[e.d.height]=t[1]+i[0]+i[2],o}function cf_sortParams(t,e){for(var s=[],i=0,o=t.length;o>i;i++)for(var n=0,r=e.length;r>n;n++)if(e[n].indexOf(typeof t[i])>-1&&is_undefined(s[n])){s[n]=t[i];break}return s}function cf_getPadding(t){if(is_undefined(t))return[0,0,0,0];if(is_number(t))return[t,t,t,t];if(is_string(t)&&(t=t.split("px").join("").split("em").join("").split(" ")),!is_array(t))return[0,0,0,0];for(var e=0;4>e;e++)t[e]=parseInt(t[e],10);switch(t.length){case 0:return[0,0,0,0];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];default:return[t[0],t[1],t[2],t[3]]}}function cf_getAlignPadding(t,e){var s=is_number(e[e.d.width])?Math.ceil(e[e.d.width]-ms_getTotalSize(t,e,"width")):0;switch(e.align){case"left":return[0,s];case"right":return[s,0];case"center":default:return[Math.ceil(s/2),Math.floor(s/2)]}}function cf_getDimensions(t){for(var e=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],s=e[0].length,i="right"==t.direction||"left"==t.direction?0:1,o={},n=0;s>n;n++)o[e[0][n]]=e[i][n];return o}function cf_getAdjust(t,e,s,i){var o=t;if(is_function(s))o=s.call(i,o);else if(is_string(s)){var n=s.split("+"),r=s.split("-");if(r.length>n.length)var c=!0,a=r[0],f=r[1];else var c=!1,a=n[0],f=n[1];switch(a){case"even":o=t%2==1?t-1:t;break;case"odd":o=t%2==0?t-1:t;break;default:o=t}f=parseInt(f,10),is_number(f)&&(c&&(f=-f),o+=f)}return(!is_number(o)||1>o)&&(o=1),o}function cf_getItemsAdjust(t,e,s,i){return cf_getItemAdjustMinMax(cf_getAdjust(t,e,s,i),e.items.visibleConf)}function cf_getItemAdjustMinMax(t,e){return is_number(e.min)&&t<e.min&&(t=e.min),is_number(e.max)&&t>e.max&&(t=e.max),1>t&&(t=1),t}function cf_getSynchArr(t){is_array(t)||(t=[[t]]),is_array(t[0])||(t=[t]);for(var e=0,s=t.length;s>e;e++)is_string(t[e][0])&&(t[e][0]=$(t[e][0])),is_boolean(t[e][1])||(t[e][1]=!0),is_boolean(t[e][2])||(t[e][2]=!0),is_number(t[e][3])||(t[e][3]=0);return t}function cf_getKeyCode(t){return"right"==t?39:"left"==t?37:"up"==t?38:"down"==t?40:-1}function cf_setCookie(t,e,s){if(t){var i=e.triggerHandler(cf_e("currentPosition",s));$.fn.carouFredSel.cookie.set(t,i)}}function cf_getCookie(t){var e=$.fn.carouFredSel.cookie.get(t);return""==e?0:e}function in_mapCss(t,e){for(var s={},i=0,o=e.length;o>i;i++)s[e[i]]=t.css(e[i]);return s}function in_complementItems(t,e,s,i){return is_object(t.visibleConf)||(t.visibleConf={}),is_object(t.sizesConf)||(t.sizesConf={}),0==t.start&&is_number(i)&&(t.start=i),is_object(t.visible)?(t.visibleConf.min=t.visible.min,t.visibleConf.max=t.visible.max,t.visible=!1):is_string(t.visible)?("variable"==t.visible?t.visibleConf.variable=!0:t.visibleConf.adjust=t.visible,t.visible=!1):is_function(t.visible)&&(t.visibleConf.adjust=t.visible,t.visible=!1),is_string(t.filter)||(t.filter=s.filter(":hidden").length>0?":visible":"*"),t[e.d.width]||(e.responsive?(debug(!0,"Set a "+e.d.width+" for the items!"),t[e.d.width]=ms_getTrueLargestSize(s,e,"outerWidth")):t[e.d.width]=ms_hasVariableSizes(s,e,"outerWidth")?"variable":s[e.d.outerWidth](!0)),t[e.d.height]||(t[e.d.height]=ms_hasVariableSizes(s,e,"outerHeight")?"variable":s[e.d.outerHeight](!0)),t.sizesConf.width=t.width,t.sizesConf.height=t.height,t}function in_complementVisibleItems(t,e){return"variable"==t.items[t.d.width]&&(t.items.visibleConf.variable=!0),t.items.visibleConf.variable||(is_number(t[t.d.width])?t.items.visible=Math.floor(t[t.d.width]/t.items[t.d.width]):(t.items.visible=Math.floor(e/t.items[t.d.width]),t[t.d.width]=t.items.visible*t.items[t.d.width],t.items.visibleConf.adjust||(t.align=!1)),("Infinity"==t.items.visible||t.items.visible<1)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),t.items.visibleConf.variable=!0)),t}function in_complementPrimarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerWidth")),t}function in_complementSecondarySize(t,e,s){return"auto"==t&&(t=ms_getTrueLargestSize(s,e,"outerHeight")),t||(t=e.items[e.d.height]),t}function in_getAlignPadding(t,e){var s=cf_getAlignPadding(gi_getCurrentItems(e,t),t);return t.padding[t.d[1]]=s[1],t.padding[t.d[3]]=s[0],t}function in_getResponsiveValues(t,e){var s=cf_getItemAdjustMinMax(Math.ceil(t[t.d.width]/t.items[t.d.width]),t.items.visibleConf);s>e.length&&(s=e.length);var i=Math.floor(t[t.d.width]/s);return t.items.visible=s,t.items[t.d.width]=i,t[t.d.width]=s*i,t}function bt_pauseOnHoverConfig(t){if(is_string(t))var e=t.indexOf("immediate")>-1?!0:!1,s=t.indexOf("resume")>-1?!0:!1;else var e=s=!1;return[e,s]}function bt_mousesheelNumber(t){return is_number(t)?t:null}function is_null(t){return null===t}function is_undefined(t){return is_null(t)||"undefined"==typeof t||""===t||"undefined"===t}function is_array(t){return t instanceof Array}function is_jquery(t){return t instanceof jQuery}function is_object(t){return(t instanceof Object||"object"==typeof t)&&!is_null(t)&&!is_jquery(t)&&!is_array(t)&&!is_function(t)}function is_number(t){return(t instanceof Number||"number"==typeof t)&&!isNaN(t)}function is_string(t){return(t instanceof String||"string"==typeof t)&&!is_undefined(t)&&!is_true(t)&&!is_false(t)}function is_function(t){return t instanceof Function||"function"==typeof t}function is_boolean(t){return t instanceof Boolean||"boolean"==typeof t||is_true(t)||is_false(t)}function is_true(t){return t===!0||"true"===t}function is_false(t){return t===!1||"false"===t}function is_percentage(t){return is_string(t)&&"%"==t.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(t,e){debug(!0,t+" is DEPRECATED, support for it will be removed. Use "+e+" instead.")}function debug(t,e){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(t)){var s=" ("+t.selector+")";t=t.debug}else var s="";if(!t)return!1;e=is_string(e)?"carouFredSel"+s+": "+e:["carouFredSel"+s+":",e],window.console.log(e)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(t,e,s){t=go_getObject($tt0,t),t.items=go_getItemsObject($tt0,t.items),t.scroll=go_getScrollObject($tt0,t.scroll),t.auto=go_getAutoObject($tt0,t.auto),t.prev=go_getPrevNextObject($tt0,t.prev),t.next=go_getPrevNextObject($tt0,t.next),t.pagination=go_getPaginationObject($tt0,t.pagination),t.swipe=go_getSwipeObject($tt0,t.swipe),t.mousewheel=go_getMousewheelObject($tt0,t.mousewheel),e&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,t)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,t),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var i=$cfs.children(),o=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,o),opts.items=in_complementItems(opts.items,opts,i,s),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,i),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,i),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(o,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,o)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(i,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(i,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,i,o);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,i),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var t=$cfs.children(),e=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),s="relative";switch(e.position){case"absolute":case"fixed":s=e.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(e),$wrp.css({overflow:"hidden",position:s}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",e.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(t,opts),sz_storeOrigCss(t),opts.responsive&&sz_setResponsiveSizes(opts,t)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(t,e){return t.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),e)),!0}),$cfs.bind(cf_e("finish",conf),function(t){return t.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(t,e,s){if(t.stopPropagation(),tmrs=sc_clearTimers(tmrs),e&&crsl.isScrolling){scrl.isStopped=!0;var i=getTime()-scrl.startTime;scrl.duration-=i,scrl.pre&&(scrl.pre.duration-=i),scrl.post&&(scrl.post.duration-=i),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||s&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var o=opts.auto.timeoutDuration-tmrs.timePassed,n=100-Math.ceil(100*o/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,n,o)}return!0}),$cfs.bind(cf_e("play",conf),function(t,e,s,i){t.stopPropagation(),tmrs=sc_clearTimers(tmrs);var o=[e,s,i],n=["string","number","boolean"],r=cf_sortParams(o,n);if(e=r[0],s=r[1],i=r[2],"prev"!=e&&"next"!=e&&(e=crsl.direction),is_number(s)||(s=0),is_boolean(i)||(i=!1),i&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return t.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var c=opts.auto.timeoutDuration+s;return dur2=c-tmrs.timePassed,perc=100-Math.ceil(100*dur2/c),opts.auto.progress&&(tmrs.progress=setInterval(function(){var t=getTime()-tmrs.startTime+tmrs.timePassed,e=Math.ceil(100*t/c);opts.auto.progress.updater.call(opts.auto.progress.bar[0],e)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),e):$cfs.trigger(cf_e(e,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(t){return t.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(t,e,s,i,o){if(t.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return t.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var n=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(n>itms.total)return t.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+n+" needed): Not scrolling.");var r=[e,s,i,o],c=["object","number/string","function","boolean"],a=cf_sortParams(r,c);e=a[0],s=a[1],i=a[2],o=a[3];var f=t.type.slice(conf.events.prefix.length);if(is_object(e)||(e={}),is_function(i)&&(e.onAfter=i),is_boolean(o)&&(e.queue=o),e=$.extend(!0,{},opts[f],e),e.conditions&&!e.conditions.call($tt0,f))return t.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(s)){if("*"!=opts.items.filter)s="visible";else for(var l=[s,e.items,opts[f].items],a=0,u=l.length;u>a;a++)if(is_number(l[a])||"page"==l[a]||"visible"==l[a]){s=l[a];break}switch(s){case"page":return t.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(f+"Page",conf),[e,i]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(s=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]]),t.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(e.duration>0&&crsl.isScrolling)return e.queue&&("last"==e.queue&&(queu=[]),("first"!=e.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[f,[e,s,i]])),t.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+f,conf),[e,s]),opts.synchronise)for(var p=opts.synchronise,d=[e,s],g=0,u=p.length;u>g;g++){var m=f;p[g][2]||(m="prev"==m?"next":"prev"),p[g][1]||(d[0]=p[g][0].triggerHandler("_cfs_triggerEvent",["configuration",m])),d[1]=s+p[g][3],p[g][0].trigger("_cfs_triggerEvent",["slide_"+m,d])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if(opts.items.visibleConf.variable)s=gn_getVisibleItemsPrev(i,opts,itms.total-1);else if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsPrevFilter(i,opts,itms.total-1,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}if(opts.circular||itms.total-s<itms.first&&(s=itms.total-itms.first),opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){var n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible+s<=n&&s<itms.total&&(s++,n=cf_getItemsAdjust(gn_getVisibleItemsNext(i,opts,itms.total-s),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=n}else if("*"!=opts.items.filter){var n=gn_getVisibleItemsNextFilter(i,opts,itms.total-s);opts.items.visible=cf_getItemsAdjust(n,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items backward."),itms.first+=s;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&e.onEnd&&e.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-s,itms.total).prependTo($cfs),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),r=gi_getOldItemsPrev(i,opts,s),c=gi_getNewItemsPrev(i,opts),a=i.eq(s-1),f=r.last(),l=c.last();sz_resetMargin(i,opts);var u=0,p=0;if(opts.align){var d=cf_getAlignPadding(c,opts);u=d[0],p=d[1]}var g=0>u?opts.padding[opts.d[3]]:0,m=!1,_=$();if(opts.items.visible<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,a=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(c,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z={},j={},N=sc_getDuration(e,opts,s,h);switch(e.fx){case"cover":case"cover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visible),opts,"width")}m&&(opts.items[opts.d.width]=b),sz_resetMargin(i,opts,!0),p>=0&&sz_resetMargin(f,opts,opts.padding[opts.d[1]]),u>=0&&sz_resetMargin(a,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=p,opts.padding[opts.d[3]]=u),z[opts.d.left]=-(h-g),j[opts.d.left]=-(P-g),x[opts.d.left]=w[opts.d.width];var k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){},q=function(){},D=function(){},V=function(){},R=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp)}switch(e.fx){case"crossfade":case"uncover":case"uncover-fade":v.children().slice(0,s).remove(),v.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":v.children().slice(opts.items.visible).remove(),v.css(j)}if($cfs.css(z),scrl=sc_setScroll(N,e.easing,conf),C[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(k=function(){$wrp.css(w)},O=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){switch(l.not(a).length&&(S[opts.d.marginRight]=a.data("_cfs_origCssMargin"),0>u?a.css(S):(H=function(){a.css(S)},q=function(){scrl.anims.push([a,S])})),e.fx){case"cover":case"cover-fade":v.children().eq(s-1).css(S)}l.not(f).length&&(y[opts.d.marginRight]=f.data("_cfs_origCssMargin"),T=function(){f.css(y)},M=function(){scrl.anims.push([f,y])}),p>=0&&(I[opts.d.marginRight]=l.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],F=function(){l.css(I)},A=function(){scrl.anims.push([l,I])})}R=function(){$cfs.css(C)};var E=opts.items.visible+s-itms.total;V=function(){if(E>0&&($cfs.children().slice(itms.total).remove(),r=$($cfs.children().slice(itms.total-(opts.items.visible-E)).get().concat($cfs.children().slice(0,E).get()))),sc_showHiddenItems(m),opts.usePadding){var t=$cfs.children().eq(opts.items.visible+s-1);t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var W=sc_mapCallbackArguments(r,_,c,s,"prev",N,w);switch(D=function(){sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",W,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",W,clbk),e.fx){case"none":$cfs.css(C),k(),T(),F(),H(),R(),V(),D();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){k(),T(),F(),H(),R(),V(),scrl=sc_setScroll(N,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},D]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},D]),O(),T(),F(),H(),R(),V();break;case"cover":scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([v,C,function(){T(),F(),H(),R(),V(),D()}]),O();break;case"uncover":scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,D]),O(),T(),F(),H(),R(),V();break;default:scrl.anims.push([$cfs,C,function(){V(),D()}]),O(),M(),A(),q()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0
|
2 |
}),$cfs.bind(cf_e("slide_next",conf),function(t,e,s){t.stopPropagation();var i=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(i,opts),!is_number(s)){if("*"!=opts.items.filter){var o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);s=gn_getScrollItemsNextFilter(i,opts,0,o)}else s=opts.items.visible;s=cf_getAdjust(s,opts,e.items,$tt0)}var n=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var r=gn_getVisibleItemsNext(i,opts,s),o=gn_getVisibleItemsPrev(i,opts,n-1);else var r=opts.items.visible,o=opts.items.visible;s+r>n&&(s=n-o)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-s>=r&&s<itms.total;)s++,r=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(i,opts,s,n),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=r}else if("*"!=opts.items.filter){var r=gn_getVisibleItemsNextFilter(i,opts,s);opts.items.visible=cf_getItemsAdjust(r,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(i,opts,!0),0==s)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+s+" items forward."),itms.first-=s;itms.first<0;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&e.onEnd&&e.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.total<opts.items.visible+s&&$cfs.children().slice(0,opts.items.visible+s-itms.total).clone(!0).appendTo($cfs);var i=$cfs.children(),c=gi_getOldItemsNext(i,opts),a=gi_getNewItemsNext(i,opts,s),f=i.eq(s-1),l=c.last(),u=a.last();sz_resetMargin(i,opts);var p=0,d=0;if(opts.align){var g=cf_getAlignPadding(a,opts);p=g[0],d=g[1]}var m=!1,_=$();if(opts.items.visibleConf.old<s&&(_=i.slice(opts.items.visibleConf.old,s),"directscroll"==e.fx)){var b=opts.items[opts.d.width];m=_,f=l,sc_hideHiddenItems(m),opts.items[opts.d.width]="variable"}var v=!1,h=ms_getTotalSize(i.slice(0,s),opts,"width"),w=cf_mapWrapperSizes(ms_getSizes(a,opts,!0),opts,!opts.usePadding),P=0,C={},x={},S={},y={},I={},z=sc_getDuration(e,opts,s,h);switch(e.fx){case"uncover":case"uncover-fade":P=ms_getTotalSize(i.slice(0,opts.items.visibleConf.old),opts,"width")}m&&(opts.items[opts.d.width]=b),opts.align&&opts.padding[opts.d[1]]<0&&(opts.padding[opts.d[1]]=0),sz_resetMargin(i,opts,!0),sz_resetMargin(l,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=d,opts.padding[opts.d[3]]=p),I[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var j=function(){},N=function(){},k=function(){},O=function(){},T=function(){},M=function(){},F=function(){},A=function(){},H=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":v=$cfs.clone(!0).appendTo($wrp),v.children().slice(opts.items.visibleConf.old).remove()}switch(e.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),v.css("zIndex",0)}if(scrl=sc_setScroll(z,e.easing,conf),C[opts.d.left]=-h,x[opts.d.left]=-P,0>p&&(C[opts.d.left]+=p),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(j=function(){$wrp.css(w)},N=function(){scrl.anims.push([$wrp,w])}),opts.usePadding){var q=u.data("_cfs_origCssMargin");d>=0&&(q+=opts.padding[opts.d[1]]),u.css(opts.d.marginRight,q),f.not(l).length&&(y[opts.d.marginRight]=l.data("_cfs_origCssMargin")),k=function(){l.css(y)},O=function(){scrl.anims.push([l,y])};var D=f.data("_cfs_origCssMargin");p>0&&(D+=opts.padding[opts.d[3]]),S[opts.d.marginRight]=D,T=function(){f.css(S)},M=function(){scrl.anims.push([f,S])}}H=function(){$cfs.css(I)};var V=opts.items.visible+s-itms.total;A=function(){V>0&&$cfs.children().slice(itms.total).remove();var t=$cfs.children().slice(0,s).appendTo($cfs).last();if(V>0&&(a=gi_getCurrentItems(i,opts)),sc_showHiddenItems(m),opts.usePadding){if(itms.total<opts.items.visible+s){var e=$cfs.children().eq(opts.items.visible-1);e.css(opts.d.marginRight,e.data("_cfs_origCssMargin")+opts.padding[opts.d[1]])}t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var R=sc_mapCallbackArguments(c,_,a,s,"next",z,w);switch(F=function(){$cfs.css("zIndex",$cfs.data("_cfs_origCssZindex")),sc_afterScroll($cfs,v,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",R,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",R,clbk),e.fx){case"none":$cfs.css(C),j(),k(),T(),H(),A(),F();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){j(),k(),T(),H(),A(),scrl=sc_setScroll(z,e.easing,conf),scrl.anims.push([$cfs,{opacity:1},F]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},F]),N(),k(),T(),H(),A();break;case"cover":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"cover-fade":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([v,{opacity:0}]),scrl.anims.push([$cfs,I,F]),N(),k(),T(),A();break;case"uncover":scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([v,x,F]),N(),k(),T(),H(),A();break;default:scrl.anims.push([$cfs,C,function(){H(),A(),F()}]),N(),O(),M()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]),!0}),$cfs.bind(cf_e("slideTo",conf),function(t,e,s,i,o,n,r){t.stopPropagation();var c=[e,s,i,o,n,r],a=["string/number/object","number","boolean","object","string","function"],f=cf_sortParams(c,a);return o=f[3],n=f[4],r=f[5],e=gn_getItemIndex(f[0],f[1],f[2],itms,$cfs),0==e?!1:(is_object(o)||(o=!1),"prev"!=n&&"next"!=n&&(n=opts.circular?e<=itms.total/2?"next":"prev":0==itms.first||itms.first>e?"next":"prev"),"prev"==n&&(e=itms.total-e),$cfs.trigger(cf_e(n,conf),[o,e,r]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i-1,e,"prev",s])}),$cfs.bind(cf_e("nextPage",conf),function(t,e,s){t.stopPropagation();var i=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[i+1,e,"next",s])}),$cfs.bind(cf_e("slideToPage",conf),function(t,e,s,i,o){t.stopPropagation(),is_number(e)||(e=$cfs.triggerHandler(cf_e("currentPage",conf)));var n=opts.pagination.items||opts.items.visible,r=Math.ceil(itms.total/n)-1;return 0>e&&(e=r),e>r&&(e=0),$cfs.triggerHandler(cf_e("slideTo",conf),[e*n,0,!0,s,i,o])}),$cfs.bind(cf_e("jumpToStart",conf),function(t,e){if(t.stopPropagation(),e=e?gn_getItemIndex(e,0,!0,itms,$cfs):0,e+=itms.first,0!=e){if(itms.total>0)for(;e>itms.total;)e-=itms.total;$cfs.prepend($cfs.children().slice(e,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(t,e){if(t.stopPropagation(),e)e=cf_getSynchArr(e);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");e=opts.synchronise}for(var s=$cfs.triggerHandler(cf_e("currentPosition",conf)),i=!0,o=0,n=e.length;n>o;o++)e[o][0].triggerHandler(cf_e("slideTo",conf),[s,e[o][3],!0])||(i=!1);return i}),$cfs.bind(cf_e("queue",conf),function(t,e,s){return t.stopPropagation(),is_function(e)?e.call($tt0,queu):is_array(e)?queu=e:is_undefined(e)||queu.push([e,s]),queu}),$cfs.bind(cf_e("insertItem",conf),function(t,e,s,i,o){t.stopPropagation();var n=[e,s,i,o],r=["string/object","string/number/object","boolean","number"],c=cf_sortParams(n,r);if(e=c[0],s=c[1],i=c[2],o=c[3],is_object(e)&&!is_jquery(e)?e=$(e):is_string(e)&&(e=$(e)),!is_jquery(e)||0==e.length)return debug(conf,"Not a valid object.");is_undefined(s)&&(s="end"),sz_storeMargin(e,opts),sz_storeOrigCss(e);var a=s,f="before";"end"==s?i?(0==itms.first?(s=itms.total-1,f="after"):(s=itms.first,itms.first+=e.length),0>s&&(s=0)):(s=itms.total-1,f="after"):s=gn_getItemIndex(s,o,i,itms,$cfs);var l=$cfs.children().eq(s);return l.length?l[f](e):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(e)),"end"==a||i||s<itms.first&&(itms.first+=e.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(t,e,s,i){t.stopPropagation();var o=[e,s,i],n=["string/number/object","boolean","number"],r=cf_sortParams(o,n);e=r[0],s=r[1],i=r[2];if(e instanceof $&&e.length>1)return c=$(),e.each(function(){var t=$cfs.trigger(cf_e("removeItem",conf),[$(this),s,i]);t&&(c=c.add(t))}),c;if(is_undefined(e)||"end"==e)c=$cfs.children().last();else{e=gn_getItemIndex(e,i,s,itms,$cfs);var c=$cfs.children().eq(e);c.length&&e<itms.first&&(itms.first-=c.length)}return c&&c.length&&(c.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),c}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length);return is_array(e)&&(clbk[s]=e),is_function(e)&&clbk[s].push(e),clbk[s]}),$cfs.bind(cf_e("currentPosition",conf),function(t,e){if(t.stopPropagation(),0==itms.first)var s=0;else var s=itms.total-itms.first;return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentPage",conf),function(t,e){t.stopPropagation();var s,i=opts.pagination.items||opts.items.visible,o=Math.ceil(itms.total/i-1);return s=0==itms.first?0:itms.first<itms.total%i?0:itms.first!=i||opts.circular?Math.round((itms.total-itms.first)/i):o,0>s&&(s=0),s>o&&(s=o),is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("currentVisible",conf),function(t,e){t.stopPropagation();var s=gi_getCurrentItems($cfs.children(),opts);return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("slice",conf),function(t,e,s,i){if(t.stopPropagation(),0==itms.total)return!1;var o=[e,s,i],n=["number","number","function"],r=cf_sortParams(o,n);if(e=is_number(r[0])?r[0]:0,s=is_number(r[1])?r[1]:itms.total,i=r[2],e+=itms.first,s+=itms.first,items.total>0){for(;e>itms.total;)e-=itms.total;for(;s>itms.total;)s-=itms.total;for(;0>e;)e+=itms.total;for(;0>s;)s+=itms.total}var c,a=$cfs.children();return c=s>e?a.slice(e,s):$(a.slice(e,itms.total).get().concat(a.slice(0,s).get())),is_function(i)&&i.call($tt0,c),c}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(t,e){t.stopPropagation();var s=t.type.slice(conf.events.prefix.length),i=crsl[s];return is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(t,e,s){return t.stopPropagation(),is_undefined(e)?e=$("body"):is_string(e)&&(e=$(e)),is_jquery(e)&&0!=e.length?(is_string(s)||(s="a.caroufredsel"),e.find(s).each(function(){var t=this.hash||"";t.length>0&&-1!=$cfs.children().index($(t))&&$(this).unbind("click").click(function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),t)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(t,e){if(t.stopPropagation(),opts.pagination.container){var s=opts.pagination.items||opts.items.visible,i=Math.ceil(itms.total/s);e&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var t=0;i>t;t++){var e=$cfs.children().eq(gn_getItemIndex(t*s,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(e[0],t+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(t){$(this).bind(opts.pagination.event,function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[t*s,-opts.pagination.deviation,!0,opts.pagination])})})}));var o=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return o>=i&&(o=0),0>o&&(o=i-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(o).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(){var t=opts.items.visible,e=$cfs.children(),s=ms_getParentSize($wrp,opts,"width");if(itms.total=e.length,crsl.primarySizePercentage?(opts.maxDimension=s,opts[opts.d.width]=ms_getPercentage(s,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,s),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,e,s),t=opts.items.visible,sz_setResponsiveSizes(opts,e)):opts.items.visibleConf.variable?t=gn_getVisibleItemsNext(e,opts,0):"*"!=opts.items.filter&&(t=gn_getVisibleItemsNextFilter(e,opts,0)),!opts.circular&&0!=itms.first&&t>itms.first){if(opts.items.visibleConf.variable)var i=gn_getVisibleItemsPrev(e,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var i=gn_getVisibleItemsPrevFilter(e,opts,itms.first)-itms.first;else var i=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+i+" items backward."),$cfs.trigger(cf_e("prev",conf),i)}opts.items.visible=cf_getItemsAdjust(t,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,e);var o=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,o]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),o}),$cfs.bind(cf_e("destroy",conf),function(t,e){return t.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),e&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(t,e,s){return t.stopPropagation(),$cfs.triggerHandler(cf_e(e,conf),s)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(t){t.preventDefault();var e=!1,s=null;crsl.isPaused?e="play":opts.auto.pauseOnEvent&&(e="pause",s=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),e&&$cfs.trigger(cf_e(e,conf),s)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var t=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e==opts.next.key&&(t.preventDefault(),$cfs.trigger(cf_e("next",conf))),e==opts.prev.key&&(t.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e>=49&&58>e&&(e=(e-49)*opts.items.visible,e<=itms.total&&(t.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[e,0,!0,opts.pagination])))}),$.fn.swipe){var e="ontouchstart"in window;if(e&&opts.swipe.onTouch||!e&&opts.swipe.onMouse){var s=$.extend(!0,{},opts.prev,opts.swipe),i=$.extend(!0,{},opts.next,opts.swipe),o=function(){$cfs.trigger(cf_e("prev",conf),[s])},n=function(){$cfs.trigger(cf_e("next",conf),[i])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=n,opts.swipe.options.swipeDown=o;break;default:opts.swipe.options.swipeLeft=n,opts.swipe.options.swipeRight=o}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var r=$.extend(!0,{},opts.prev,opts.mousewheel),c=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(t,e){t.preventDefault(),e>0?$cfs.trigger(cf_e("prev",conf),[r]):$cfs.trigger(cf_e("next",conf),[c])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var a=function(){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},f=$(window),l=null;if($.debounce&&"debounce"==conf.onWindowResize)l=$.debounce(200,a);else if($.throttle&&"throttle"==conf.onWindowResize)l=$.throttle(300,a);else{var u=0,p=0;l=function(){var t=f.width(),e=f.height();(t!=u||e!=p)&&(a(),u=t,p=e)}}f.bind(cf_e("resize",conf,!1,!0,!0),l)}},FN._unbind_buttons=function(){var t=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(t),opts.auto.button&&opts.auto.button.unbind(t),opts.prev.button&&opts.prev.button.unbind(t),opts.next.button&&opts.next.button.unbind(t),opts.pagination.container&&(opts.pagination.container.unbind(t),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,s.length<1)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(t){return'<a href="#"><span>'+t+"</span></a>"},$.fn.carouFredSel.progressbarUpdater=function(t){$(this).css("width",t+"%")},$.fn.carouFredSel.cookie={get:function(t){t+="=";for(var e=document.cookie.split(";"),s=0,i=e.length;i>s;s++){for(var o=e[s];" "==o.charAt(0);)o=o.slice(1);if(0==o.indexOf(t))return o.slice(t.length)}return 0},set:function(t,e,s){var i="";if(s){var o=new Date;o.setTime(o.getTime()+24*s*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=t+"="+e+i+"; path=/"},remove:function(t){$.fn.carouFredSel.cookie.set(t,"",-1)}},$.extend($.easing,{quadratic:function(t){var e=t*t;return t*(-e*t+4*e-6*t+4)},cubic:function(t){return t*(4*t*t-9*t+6)},elastic:function(t){var e=t*t;return t*(33*e*e-106*e*t+126*e-67*t+15)}}))}(jQuery);
|
assets/js/ywzm_frontend.js
CHANGED
@@ -1,62 +1,62 @@
|
|
1 |
-
/**
|
2 |
-
* frontend.js
|
3 |
-
*
|
4 |
-
* @author Your Inspiration Themes
|
5 |
-
* @package YITH WooCommerce Zoom Magnifier
|
6 |
-
*/
|
7 |
-
jQuery(function ($) {
|
8 |
-
|
9 |
-
var yith_wcmg = $('.images'),
|
10 |
-
yith_wcmg_zoom = $('.yith_magnifier_zoom'),
|
11 |
-
yith_wcmg_image = $('.yith_magnifier_zoom img').first(),
|
12 |
-
yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href'),
|
13 |
-
yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
|
14 |
-
yith_wcmg_default_gallery = yith_wcmg.find('.thumbnails');
|
15 |
-
|
16 |
-
if (typeof yith_magnifier_options == 'undefined') {
|
17 |
-
return false;
|
18 |
-
}
|
19 |
-
|
20 |
-
yith_wcmg.yith_magnifier(yith_magnifier_options);
|
21 |
-
|
22 |
-
$(document).on('found_variation', 'form.variations_form', function (event, variation) {
|
23 |
-
|
24 |
-
var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
|
25 |
-
|
26 |
-
var image_src = yith_wcmg_default_image;
|
27 |
-
if (ywzm_data.wc_before_3_0) {
|
28 |
-
if (variation.image_src) {
|
29 |
-
image_src = variation.image_src;
|
30 |
-
}
|
31 |
-
}
|
32 |
-
else if (variation.image.src) {
|
33 |
-
image_src = variation.image.src;
|
34 |
-
}
|
35 |
-
|
36 |
-
yith_wcmg_zoom.attr('href', image_magnifier);
|
37 |
-
yith_wcmg_image.attr('src', image_src);
|
38 |
-
yith_wcmg_image.attr('srcset', image_src);
|
39 |
-
yith_wcmg_image.attr('src-orig', image_src);
|
40 |
-
|
41 |
-
if (yith_wcmg.data('yith_magnifier')) {
|
42 |
-
yith_wcmg.yith_magnifier('destroy');
|
43 |
-
}
|
44 |
-
|
45 |
-
yith_wcmg.yith_magnifier(yith_magnifier_options);
|
46 |
-
}).on('reset_image', function (event) {
|
47 |
-
yith_wcmg_zoom.attr('href', yith_wcmg_default_zoom);
|
48 |
-
yith_wcmg_image.attr('src', yith_wcmg_default_image);
|
49 |
-
yith_wcmg_image.attr('srcset', yith_wcmg_default_image);
|
50 |
-
yith_wcmg_image.attr('src-orig', yith_wcmg_default_image);
|
51 |
-
|
52 |
-
yith_wcmg.find('.thumbnails').replaceWith( yith_wcmg_default_gallery );
|
53 |
-
|
54 |
-
if (yith_wcmg.data('yith_magnifier')) {
|
55 |
-
yith_wcmg.yith_magnifier('destroy');
|
56 |
-
}
|
57 |
-
|
58 |
-
yith_wcmg.yith_magnifier(yith_magnifier_options);
|
59 |
-
});
|
60 |
-
|
61 |
-
$('form.variations_form .variations select').trigger('change');
|
62 |
-
});
|
1 |
+
/**
|
2 |
+
* frontend.js
|
3 |
+
*
|
4 |
+
* @author Your Inspiration Themes
|
5 |
+
* @package YITH WooCommerce Zoom Magnifier
|
6 |
+
*/
|
7 |
+
jQuery(function ($) {
|
8 |
+
|
9 |
+
var yith_wcmg = $('.images'),
|
10 |
+
yith_wcmg_zoom = $('.yith_magnifier_zoom'),
|
11 |
+
yith_wcmg_image = $('.yith_magnifier_zoom img').first(),
|
12 |
+
yith_wcmg_default_zoom = yith_wcmg.find('.yith_magnifier_zoom').attr('href'),
|
13 |
+
yith_wcmg_default_image = yith_wcmg.find('.yith_magnifier_zoom img').attr('src');
|
14 |
+
yith_wcmg_default_gallery = yith_wcmg.find('.thumbnails');
|
15 |
+
|
16 |
+
if (typeof yith_magnifier_options == 'undefined') {
|
17 |
+
return false;
|
18 |
+
}
|
19 |
+
|
20 |
+
yith_wcmg.yith_magnifier(yith_magnifier_options);
|
21 |
+
|
22 |
+
$(document).on('found_variation', 'form.variations_form', function (event, variation) {
|
23 |
+
|
24 |
+
var image_magnifier = variation.image_magnifier ? variation.image_magnifier : yith_wcmg_default_zoom;
|
25 |
+
|
26 |
+
var image_src = yith_wcmg_default_image;
|
27 |
+
if (ywzm_data.wc_before_3_0) {
|
28 |
+
if (variation.image_src) {
|
29 |
+
image_src = variation.image_src;
|
30 |
+
}
|
31 |
+
}
|
32 |
+
else if (variation.image.src) {
|
33 |
+
image_src = variation.image.src;
|
34 |
+
}
|
35 |
+
|
36 |
+
yith_wcmg_zoom.attr('href', image_magnifier);
|
37 |
+
yith_wcmg_image.attr('src', image_src);
|
38 |
+
yith_wcmg_image.attr('srcset', image_src);
|
39 |
+
yith_wcmg_image.attr('src-orig', image_src);
|
40 |
+
|
41 |
+
if (yith_wcmg.data('yith_magnifier')) {
|
42 |
+
yith_wcmg.yith_magnifier('destroy');
|
43 |
+
}
|
44 |
+
|
45 |
+
yith_wcmg.yith_magnifier(yith_magnifier_options);
|
46 |
+
}).on('reset_image', function (event) {
|
47 |
+
yith_wcmg_zoom.attr('href', yith_wcmg_default_zoom);
|
48 |
+
yith_wcmg_image.attr('src', yith_wcmg_default_image);
|
49 |
+
yith_wcmg_image.attr('srcset', yith_wcmg_default_image);
|
50 |
+
yith_wcmg_image.attr('src-orig', yith_wcmg_default_image);
|
51 |
+
|
52 |
+
yith_wcmg.find('.thumbnails').replaceWith( yith_wcmg_default_gallery );
|
53 |
+
|
54 |
+
if (yith_wcmg.data('yith_magnifier')) {
|
55 |
+
yith_wcmg.yith_magnifier('destroy');
|
56 |
+
}
|
57 |
+
|
58 |
+
yith_wcmg.yith_magnifier(yith_magnifier_options);
|
59 |
+
});
|
60 |
+
|
61 |
+
$('form.variations_form .variations select').trigger('change');
|
62 |
+
});
|
changelog.txt
CHANGED
@@ -1,191 +1,191 @@
|
|
1 |
-
=== YITH WooCommerce Zoom Magnifier ===
|
2 |
-
|
3 |
-
== Changelog History ==
|
4 |
-
|
5 |
-
= Version 1.2.18 - Released: May 02, 2016 =
|
6 |
-
|
7 |
-
* Updated: plugin compatible with WordPress 4.5
|
8 |
-
* Updated: plugin author name
|
9 |
-
* Updated: YITH Plugin Framework
|
10 |
-
|
11 |
-
= Version 1.2.17 - Released: Feb 24, 2016 =
|
12 |
-
|
13 |
-
* Updated: YITH Plugin FW
|
14 |
-
* Fixed: removed trailing comma in JS script that break the page rendering on old IE browser
|
15 |
-
|
16 |
-
= Version 1.2.16 - Released: Jan 18, 2016 =
|
17 |
-
|
18 |
-
* Updated: YITH Plugin FW loading remove unused YIT constant
|
19 |
-
* Added: filter yith_ywzm_zoom_wrap_additional_css for customizing CSS class for the wrapping div
|
20 |
-
* Updated: plugin ready for WooCommerce 2.5
|
21 |
-
|
22 |
-
= Version 1.2.15 - Released: Jan 04, 2016 =
|
23 |
-
|
24 |
-
* Fixed: Cannot redeclare yith_ywzm_install_woocommerce_admin_notice() when the plugin is loaded from YITH Essential Kit
|
25 |
-
|
26 |
-
= Version 1.2.14 - Released: Dec 29, 2015 =
|
27 |
-
|
28 |
-
* Added: Compatibility with YIT WooCommerce Featured Audio & Video Content
|
29 |
-
|
30 |
-
= Version 1.2.13 - Released: Dec 21, 2015 =
|
31 |
-
|
32 |
-
* Fixed: multiple wrap of zoom element with the div with class yith_magnifier_zoom_wrap
|
33 |
-
* Updated: jquery-ui.css is no more linked as external resource but shipped within the plugin, as wordpress.org asked
|
34 |
-
|
35 |
-
= Version 1.2.12 - Released: Oct 29, 2015 =
|
36 |
-
|
37 |
-
* Updated: YITH plugin framework
|
38 |
-
|
39 |
-
= Version 1.2.11 - Released: Oct 23, 2015 =
|
40 |
-
|
41 |
-
* Updated: compatibility with YITH WooCommerce Quick View.
|
42 |
-
|
43 |
-
= Version 1.2.10 - Released: Sep 24, 2015 =
|
44 |
-
|
45 |
-
* Updated: changed text domain as translate.wordpress.org requisite.
|
46 |
-
|
47 |
-
= Version 1.2.9 - Released: Sep 04, 2015 =
|
48 |
-
|
49 |
-
* Updated: Languages file
|
50 |
-
* Fixed: Changed plugin text domain from yit to ywmz
|
51 |
-
* Fixed: featured image shown one time on slider.
|
52 |
-
* Fixed: div not shown if loading text is empty.
|
53 |
-
|
54 |
-
= Version 1.2.8 - Released: Sep 01, 2015 =
|
55 |
-
|
56 |
-
* Fixed: removed deprecated woocommerce_update_option_X hook.
|
57 |
-
|
58 |
-
= Version 1.2.7 - Released: Aug 27, 2015 =
|
59 |
-
|
60 |
-
* Fixed: resolved XSS vulnerability.
|
61 |
-
|
62 |
-
= Version 1.2.6 - Released: Aug 12, 2015 =
|
63 |
-
|
64 |
-
* Tweak: update YITH Plugin framework.
|
65 |
-
|
66 |
-
= Version 1.2.5 - Released: Jul 23, 2015 =
|
67 |
-
|
68 |
-
* Added: italian language.
|
69 |
-
|
70 |
-
= Version 1.2.4 - Released: Jun 26, 2015 =
|
71 |
-
|
72 |
-
* Added: support to srcset and src-orig attributes.
|
73 |
-
|
74 |
-
= Version 1.2.3 - Released: May 29, 2015 =
|
75 |
-
|
76 |
-
* Added: included jquery-migrate as prerequisite.
|
77 |
-
|
78 |
-
= Version 1.2.2 - Released: May 22, 2015 =
|
79 |
-
|
80 |
-
* Fixed: CSS fix for EssentialGrid conflicts.
|
81 |
-
|
82 |
-
= Version 1.2.1 - Released: May 04, 2015 =
|
83 |
-
|
84 |
-
* Fixed: removed z-index that made the zoom area hiding other elements in certain themes.
|
85 |
-
|
86 |
-
= Version 1.2.0 - Released: Apr 22, 2015 =
|
87 |
-
|
88 |
-
* Fix : security issue (https://make.wordpress.org/plugins/2015/04/20/fixing-add_query_arg-and-remove_query_arg-usage/)
|
89 |
-
* Tweak : support up to Wordpress 4.2
|
90 |
-
|
91 |
-
= 1.1.8 =
|
92 |
-
|
93 |
-
* Fixed: compatibility with some YITHEMES themes.
|
94 |
-
|
95 |
-
= 1.1.7 =
|
96 |
-
|
97 |
-
* Fixed: Unwanted expand link on product image.
|
98 |
-
|
99 |
-
= 1.1.6 =
|
100 |
-
|
101 |
-
* Added: the plugin can be disabled on mobile devices.
|
102 |
-
|
103 |
-
= 1.1.5 =
|
104 |
-
|
105 |
-
* Fixed: multiple wrap
|
106 |
-
|
107 |
-
= 1.1.4 =
|
108 |
-
|
109 |
-
* Tweak: WooCommerce 2.2. support
|
110 |
-
* Fixed: Placeholder in product without featured image
|
111 |
-
* Fixed: Slider items number options doesn't work
|
112 |
-
|
113 |
-
= 1.1.3 =
|
114 |
-
|
115 |
-
* Added: Support to WC 2.2.2
|
116 |
-
* Updated: Plugin Core Framework
|
117 |
-
|
118 |
-
= 1.1.2 =
|
119 |
-
|
120 |
-
* Restored: Image size options on WC 2.1.x
|
121 |
-
* Fixed: Items number option on thumb slider
|
122 |
-
* Fixed: Hard crop issue on WC 2.1.x
|
123 |
-
|
124 |
-
= 1.1.1 =
|
125 |
-
|
126 |
-
* Fixed: Thumbnails slider direction on single product page
|
127 |
-
|
128 |
-
= 1.1.0 =
|
129 |
-
|
130 |
-
* Added: Support to WooCommerce 2.1.x
|
131 |
-
|
132 |
-
= 1.0.8 =
|
133 |
-
|
134 |
-
* Added: ability to change the slider programmatically
|
135 |
-
|
136 |
-
= 1.0.7 =
|
137 |
-
|
138 |
-
* Fixed: zoomed image did not change when select a variation
|
139 |
-
|
140 |
-
= 1.0.6 =
|
141 |
-
|
142 |
-
* Removed white space from frontend.php
|
143 |
-
|
144 |
-
= 1.0.5 =
|
145 |
-
|
146 |
-
* Fixed: magnifier override the plugin for featured video
|
147 |
-
|
148 |
-
= 1.0.4 =
|
149 |
-
|
150 |
-
* Minor bugs fixes
|
151 |
-
|
152 |
-
= 1.0.3 =
|
153 |
-
|
154 |
-
* Added ability to load the plugin even when WooCommerce is installed in a different folder
|
155 |
-
|
156 |
-
= 1.0.2 =
|
157 |
-
|
158 |
-
* Fixed fatal error to yit_debug with yit themes
|
159 |
-
|
160 |
-
= 1.0.1 =
|
161 |
-
|
162 |
-
* Optimized images
|
163 |
-
* Updated internal framework
|
164 |
-
|
165 |
-
= 1.0.0 =
|
166 |
-
|
167 |
-
* Initial release
|
168 |
-
|
169 |
-
== Suggestions ==
|
170 |
-
|
171 |
-
If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
|
172 |
-
|
173 |
-
== Translators ==
|
174 |
-
|
175 |
-
= Available Languages =
|
176 |
-
* English (Default)
|
177 |
-
* Italian
|
178 |
-
* Spanish
|
179 |
-
|
180 |
-
If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
|
181 |
-
[use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
|
182 |
-
|
183 |
-
== Documentation ==
|
184 |
-
|
185 |
-
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
|
186 |
-
|
187 |
-
== Upgrade notice ==
|
188 |
-
|
189 |
-
= 1.0.0 =
|
190 |
-
|
191 |
Initial release
|
1 |
+
=== YITH WooCommerce Zoom Magnifier ===
|
2 |
+
|
3 |
+
== Changelog History ==
|
4 |
+
|
5 |
+
= Version 1.2.18 - Released: May 02, 2016 =
|
6 |
+
|
7 |
+
* Updated: plugin compatible with WordPress 4.5
|
8 |
+
* Updated: plugin author name
|
9 |
+
* Updated: YITH Plugin Framework
|
10 |
+
|
11 |
+
= Version 1.2.17 - Released: Feb 24, 2016 =
|
12 |
+
|
13 |
+
* Updated: YITH Plugin FW
|
14 |
+
* Fixed: removed trailing comma in JS script that break the page rendering on old IE browser
|
15 |
+
|
16 |
+
= Version 1.2.16 - Released: Jan 18, 2016 =
|
17 |
+
|
18 |
+
* Updated: YITH Plugin FW loading remove unused YIT constant
|
19 |
+
* Added: filter yith_ywzm_zoom_wrap_additional_css for customizing CSS class for the wrapping div
|
20 |
+
* Updated: plugin ready for WooCommerce 2.5
|
21 |
+
|
22 |
+
= Version 1.2.15 - Released: Jan 04, 2016 =
|
23 |
+
|
24 |
+
* Fixed: Cannot redeclare yith_ywzm_install_woocommerce_admin_notice() when the plugin is loaded from YITH Essential Kit
|
25 |
+
|
26 |
+
= Version 1.2.14 - Released: Dec 29, 2015 =
|
27 |
+
|
28 |
+
* Added: Compatibility with YIT WooCommerce Featured Audio & Video Content
|
29 |
+
|
30 |
+
= Version 1.2.13 - Released: Dec 21, 2015 =
|
31 |
+
|
32 |
+
* Fixed: multiple wrap of zoom element with the div with class yith_magnifier_zoom_wrap
|
33 |
+
* Updated: jquery-ui.css is no more linked as external resource but shipped within the plugin, as wordpress.org asked
|
34 |
+
|
35 |
+
= Version 1.2.12 - Released: Oct 29, 2015 =
|
36 |
+
|
37 |
+
* Updated: YITH plugin framework
|
38 |
+
|
39 |
+
= Version 1.2.11 - Released: Oct 23, 2015 =
|
40 |
+
|
41 |
+
* Updated: compatibility with YITH WooCommerce Quick View.
|
42 |
+
|
43 |
+
= Version 1.2.10 - Released: Sep 24, 2015 =
|
44 |
+
|
45 |
+
* Updated: changed text domain as translate.wordpress.org requisite.
|
46 |
+
|
47 |
+
= Version 1.2.9 - Released: Sep 04, 2015 =
|
48 |
+
|
49 |
+
* Updated: Languages file
|
50 |
+
* Fixed: Changed plugin text domain from yit to ywmz
|
51 |
+
* Fixed: featured image shown one time on slider.
|
52 |
+
* Fixed: div not shown if loading text is empty.
|
53 |
+
|
54 |
+
= Version 1.2.8 - Released: Sep 01, 2015 =
|
55 |
+
|
56 |
+
* Fixed: removed deprecated woocommerce_update_option_X hook.
|
57 |
+
|
58 |
+
= Version 1.2.7 - Released: Aug 27, 2015 =
|
59 |
+
|
60 |
+
* Fixed: resolved XSS vulnerability.
|
61 |
+
|
62 |
+
= Version 1.2.6 - Released: Aug 12, 2015 =
|
63 |
+
|
64 |
+
* Tweak: update YITH Plugin framework.
|
65 |
+
|
66 |
+
= Version 1.2.5 - Released: Jul 23, 2015 =
|
67 |
+
|
68 |
+
* Added: italian language.
|
69 |
+
|
70 |
+
= Version 1.2.4 - Released: Jun 26, 2015 =
|
71 |
+
|
72 |
+
* Added: support to srcset and src-orig attributes.
|
73 |
+
|
74 |
+
= Version 1.2.3 - Released: May 29, 2015 =
|
75 |
+
|
76 |
+
* Added: included jquery-migrate as prerequisite.
|
77 |
+
|
78 |
+
= Version 1.2.2 - Released: May 22, 2015 =
|
79 |
+
|
80 |
+
* Fixed: CSS fix for EssentialGrid conflicts.
|
81 |
+
|
82 |
+
= Version 1.2.1 - Released: May 04, 2015 =
|
83 |
+
|
84 |
+
* Fixed: removed z-index that made the zoom area hiding other elements in certain themes.
|
85 |
+
|
86 |
+
= Version 1.2.0 - Released: Apr 22, 2015 =
|
87 |
+
|
88 |
+
* Fix : security issue (https://make.wordpress.org/plugins/2015/04/20/fixing-add_query_arg-and-remove_query_arg-usage/)
|
89 |
+
* Tweak : support up to Wordpress 4.2
|
90 |
+
|
91 |
+
= 1.1.8 =
|
92 |
+
|
93 |
+
* Fixed: compatibility with some YITHEMES themes.
|
94 |
+
|
95 |
+
= 1.1.7 =
|
96 |
+
|
97 |
+
* Fixed: Unwanted expand link on product image.
|
98 |
+
|
99 |
+
= 1.1.6 =
|
100 |
+
|
101 |
+
* Added: the plugin can be disabled on mobile devices.
|
102 |
+
|
103 |
+
= 1.1.5 =
|
104 |
+
|
105 |
+
* Fixed: multiple wrap
|
106 |
+
|
107 |
+
= 1.1.4 =
|
108 |
+
|
109 |
+
* Tweak: WooCommerce 2.2. support
|
110 |
+
* Fixed: Placeholder in product without featured image
|
111 |
+
* Fixed: Slider items number options doesn't work
|
112 |
+
|
113 |
+
= 1.1.3 =
|
114 |
+
|
115 |
+
* Added: Support to WC 2.2.2
|
116 |
+
* Updated: Plugin Core Framework
|
117 |
+
|
118 |
+
= 1.1.2 =
|
119 |
+
|
120 |
+
* Restored: Image size options on WC 2.1.x
|
121 |
+
* Fixed: Items number option on thumb slider
|
122 |
+
* Fixed: Hard crop issue on WC 2.1.x
|
123 |
+
|
124 |
+
= 1.1.1 =
|
125 |
+
|
126 |
+
* Fixed: Thumbnails slider direction on single product page
|
127 |
+
|
128 |
+
= 1.1.0 =
|
129 |
+
|
130 |
+
* Added: Support to WooCommerce 2.1.x
|
131 |
+
|
132 |
+
= 1.0.8 =
|
133 |
+
|
134 |
+
* Added: ability to change the slider programmatically
|
135 |
+
|
136 |
+
= 1.0.7 =
|
137 |
+
|
138 |
+
* Fixed: zoomed image did not change when select a variation
|
139 |
+
|
140 |
+
= 1.0.6 =
|
141 |
+
|
142 |
+
* Removed white space from frontend.php
|
143 |
+
|
144 |
+
= 1.0.5 =
|
145 |
+
|
146 |
+
* Fixed: magnifier override the plugin for featured video
|
147 |
+
|
148 |
+
= 1.0.4 =
|
149 |
+
|
150 |
+
* Minor bugs fixes
|
151 |
+
|
152 |
+
= 1.0.3 =
|
153 |
+
|
154 |
+
* Added ability to load the plugin even when WooCommerce is installed in a different folder
|
155 |
+
|
156 |
+
= 1.0.2 =
|
157 |
+
|
158 |
+
* Fixed fatal error to yit_debug with yit themes
|
159 |
+
|
160 |
+
= 1.0.1 =
|
161 |
+
|
162 |
+
* Optimized images
|
163 |
+
* Updated internal framework
|
164 |
+
|
165 |
+
= 1.0.0 =
|
166 |
+
|
167 |
+
* Initial release
|
168 |
+
|
169 |
+
== Suggestions ==
|
170 |
+
|
171 |
+
If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, you can [write us](mailto:plugins@yithemes.com "Your Inspiration Themes") so we can bundle them into YITH Zoom WooCommerce Magnifier.
|
172 |
+
|
173 |
+
== Translators ==
|
174 |
+
|
175 |
+
= Available Languages =
|
176 |
+
* English (Default)
|
177 |
+
* Italian
|
178 |
+
* Spanish
|
179 |
+
|
180 |
+
If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
|
181 |
+
[use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
|
182 |
+
|
183 |
+
== Documentation ==
|
184 |
+
|
185 |
+
Full documentation is available [here](http://yithemes.com/docs-plugins/yith_woocommerce_magnifier/).
|
186 |
+
|
187 |
+
== Upgrade notice ==
|
188 |
+
|
189 |
+
= 1.0.0 =
|
190 |
+
|
191 |
Initial release
|
class.yith-wcmg-admin.php
CHANGED
@@ -1,112 +1,112 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin class
|
4 |
-
*
|
5 |
-
* @author Your Inspiration Themes
|
6 |
-
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.2
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined( 'YITH_WCMG' ) ) {
|
11 |
-
exit;
|
12 |
-
} // Exit if accessed directly
|
13 |
-
|
14 |
-
if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
15 |
-
/**
|
16 |
-
* Admin class.
|
17 |
-
* The class manage all the admin behaviors.
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
class YITH_WCMG_Admin {
|
22 |
-
/**
|
23 |
-
* Plugin options
|
24 |
-
*
|
25 |
-
* @var array
|
26 |
-
* @access public
|
27 |
-
* @since 1.0.0
|
28 |
-
*/
|
29 |
-
public $options = array();
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Various links
|
33 |
-
*
|
34 |
-
* @var string
|
35 |
-
* @access public
|
36 |
-
* @since 1.0.0
|
37 |
-
*/
|
38 |
-
public $doc_url = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Constructor
|
42 |
-
*
|
43 |
-
* @access public
|
44 |
-
* @since 1.0.0
|
45 |
-
*/
|
46 |
-
public function __construct( ) {
|
47 |
-
|
48 |
-
//Actions
|
49 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
50 |
-
|
51 |
-
add_action( 'woocommerce_update_options_yith_wcmg', array( $this, 'update_options' ) );
|
52 |
-
|
53 |
-
add_action( 'woocommerce_admin_field_banner', array( $this, 'admin_fields_banner' ) );
|
54 |
-
|
55 |
-
add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
|
56 |
-
|
57 |
-
// YITH WCMG Loaded
|
58 |
-
do_action( 'yith_wcmg_loaded' );
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Add Zoom Image size to Woocommerce -> Catalog
|
63 |
-
*
|
64 |
-
* @access public
|
65 |
-
*
|
66 |
-
* @param array $settings
|
67 |
-
*
|
68 |
-
* @return array
|
69 |
-
*/
|
70 |
-
public function add_catalog_image_size( $settings ) {
|
71 |
-
$tmp = $settings[count( $settings ) - 1];
|
72 |
-
unset( $settings[count( $settings ) - 1] );
|
73 |
-
|
74 |
-
$settings[] = array(
|
75 |
-
'name' => esc_html__( 'Image Size', 'yith-woocommerce-zoom-magnifier' ),
|
76 |
-
'desc' => esc_html__( 'The size of the images used within the magnifier box', 'yith-woocommerce-zoom-magnifier' ),
|
77 |
-
'id' => 'woocommerce_magnifier_image',
|
78 |
-
'css' => '',
|
79 |
-
'type' => 'image_width',
|
80 |
-
'default' => array(
|
81 |
-
'width' => 600,
|
82 |
-
'height' => 600,
|
83 |
-
'crop' => true
|
84 |
-
),
|
85 |
-
'std' => array(
|
86 |
-
'width' => 600,
|
87 |
-
'height' => 600,
|
88 |
-
'crop' => true
|
89 |
-
),
|
90 |
-
'desc_tip' => true
|
91 |
-
);
|
92 |
-
$settings[] = $tmp;
|
93 |
-
return $settings;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Enqueue admin styles and scripts
|
98 |
-
*
|
99 |
-
* @access public
|
100 |
-
* @return void
|
101 |
-
* @since 1.0.0
|
102 |
-
*/
|
103 |
-
public function enqueue_styles_scripts() {
|
104 |
-
wp_enqueue_script( 'jquery-ui' );
|
105 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
106 |
-
wp_enqueue_script( 'jquery-ui-mouse' );
|
107 |
-
wp_enqueue_script( 'jquery-ui-slider' );
|
108 |
-
|
109 |
-
wp_enqueue_style( 'yith_wcmg_admin', YITH_WCMG_URL . 'assets/css/admin.css' );
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'YITH_WCMG' ) ) {
|
11 |
+
exit;
|
12 |
+
} // Exit if accessed directly
|
13 |
+
|
14 |
+
if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
15 |
+
/**
|
16 |
+
* Admin class.
|
17 |
+
* The class manage all the admin behaviors.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
class YITH_WCMG_Admin {
|
22 |
+
/**
|
23 |
+
* Plugin options
|
24 |
+
*
|
25 |
+
* @var array
|
26 |
+
* @access public
|
27 |
+
* @since 1.0.0
|
28 |
+
*/
|
29 |
+
public $options = array();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Various links
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
* @access public
|
36 |
+
* @since 1.0.0
|
37 |
+
*/
|
38 |
+
public $doc_url = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Constructor
|
42 |
+
*
|
43 |
+
* @access public
|
44 |
+
* @since 1.0.0
|
45 |
+
*/
|
46 |
+
public function __construct( ) {
|
47 |
+
|
48 |
+
//Actions
|
49 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
50 |
+
|
51 |
+
add_action( 'woocommerce_update_options_yith_wcmg', array( $this, 'update_options' ) );
|
52 |
+
|
53 |
+
add_action( 'woocommerce_admin_field_banner', array( $this, 'admin_fields_banner' ) );
|
54 |
+
|
55 |
+
add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
|
56 |
+
|
57 |
+
// YITH WCMG Loaded
|
58 |
+
do_action( 'yith_wcmg_loaded' );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Add Zoom Image size to Woocommerce -> Catalog
|
63 |
+
*
|
64 |
+
* @access public
|
65 |
+
*
|
66 |
+
* @param array $settings
|
67 |
+
*
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
public function add_catalog_image_size( $settings ) {
|
71 |
+
$tmp = $settings[count( $settings ) - 1];
|
72 |
+
unset( $settings[count( $settings ) - 1] );
|
73 |
+
|
74 |
+
$settings[] = array(
|
75 |
+
'name' => esc_html__( 'Image Size', 'yith-woocommerce-zoom-magnifier' ),
|
76 |
+
'desc' => esc_html__( 'The size of the images used within the magnifier box', 'yith-woocommerce-zoom-magnifier' ),
|
77 |
+
'id' => 'woocommerce_magnifier_image',
|
78 |
+
'css' => '',
|
79 |
+
'type' => 'image_width',
|
80 |
+
'default' => array(
|
81 |
+
'width' => 600,
|
82 |
+
'height' => 600,
|
83 |
+
'crop' => true
|
84 |
+
),
|
85 |
+
'std' => array(
|
86 |
+
'width' => 600,
|
87 |
+
'height' => 600,
|
88 |
+
'crop' => true
|
89 |
+
),
|
90 |
+
'desc_tip' => true
|
91 |
+
);
|
92 |
+
$settings[] = $tmp;
|
93 |
+
return $settings;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Enqueue admin styles and scripts
|
98 |
+
*
|
99 |
+
* @access public
|
100 |
+
* @return void
|
101 |
+
* @since 1.0.0
|
102 |
+
*/
|
103 |
+
public function enqueue_styles_scripts() {
|
104 |
+
wp_enqueue_script( 'jquery-ui' );
|
105 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
106 |
+
wp_enqueue_script( 'jquery-ui-mouse' );
|
107 |
+
wp_enqueue_script( 'jquery-ui-slider' );
|
108 |
+
|
109 |
+
wp_enqueue_style( 'yith_wcmg_admin', YITH_WCMG_URL . 'assets/css/admin.css' );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
class.yith-wcmg-frontend.php
CHANGED
@@ -1,173 +1,173 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Frontend class
|
4 |
-
*
|
5 |
-
* @author Your Inspiration Themes
|
6 |
-
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.2
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined ( 'YITH_WCMG' ) ) {
|
11 |
-
exit;
|
12 |
-
} // Exit if accessed directly
|
13 |
-
|
14 |
-
if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
|
15 |
-
/**
|
16 |
-
* Admin class.
|
17 |
-
* The class manage all the Frontend behaviors.
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
class YITH_WCMG_Frontend {
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Constructor
|
26 |
-
*
|
27 |
-
* @access public
|
28 |
-
* @since 1.0.0
|
29 |
-
*/
|
30 |
-
public function __construct() {
|
31 |
-
|
32 |
-
// add the action only when the loop is initializate
|
33 |
-
add_action ( 'template_redirect', array( $this, 'render' ) );
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
public function render() {
|
38 |
-
if ( yith_wcmg_is_enabled () && ! apply_filters ( 'yith_wczm_featured_video_enabled', false ) ) {
|
39 |
-
//change the templates
|
40 |
-
remove_action ( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
|
41 |
-
remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
|
42 |
-
add_action ( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
|
43 |
-
add_action ( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
|
44 |
-
|
45 |
-
//custom styles and javascripts
|
46 |
-
add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
47 |
-
|
48 |
-
//add attributes to product variations
|
49 |
-
add_filter ( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Change product-single.php template
|
56 |
-
*
|
57 |
-
* @access public
|
58 |
-
* @return void
|
59 |
-
* @since 1.0.0
|
60 |
-
*/
|
61 |
-
public function show_product_images() {
|
62 |
-
|
63 |
-
/** FIX WOO 2.1 */
|
64 |
-
$wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
|
65 |
-
$wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Change product-thumbnails.php template
|
71 |
-
*
|
72 |
-
* @access public
|
73 |
-
* @return void
|
74 |
-
* @since 1.0.0
|
75 |
-
*/
|
76 |
-
public function show_product_thumbnails() {
|
77 |
-
|
78 |
-
/** FIX WOO 2.1 */
|
79 |
-
$wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
|
80 |
-
|
81 |
-
$wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
|
82 |
-
}
|
83 |
-
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Enqueue styles and scripts
|
87 |
-
*
|
88 |
-
* @access public
|
89 |
-
* @return void
|
90 |
-
* @since 1.0.0
|
91 |
-
*/
|
92 |
-
public function enqueue_styles_scripts() {
|
93 |
-
global $post;
|
94 |
-
|
95 |
-
$suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
96 |
-
|
97 |
-
wp_register_script ( 'ywzm-magnifier-slider',
|
98 |
-
YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'jquery.carouFredSel.js' ),
|
99 |
-
array(
|
100 |
-
'jquery',
|
101 |
-
'jquery-migrate',
|
102 |
-
),
|
103 |
-
'6.2.1',
|
104 |
-
true );
|
105 |
-
|
106 |
-
wp_register_script ( 'ywzm-magnifier',
|
107 |
-
YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'yith_magnifier.js' ),
|
108 |
-
array( 'jquery' ),
|
109 |
-
YITH_YWZM_VERSION,
|
110 |
-
true );
|
111 |
-
|
112 |
-
wp_localize_script( 'ywzm-magnifier', 'yith_wc_zoom_magnifier_storage_object', apply_filters( 'yith_wc_zoom_magnifier_front_magnifier_localize', array(
|
113 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
114 |
-
) ) );
|
115 |
-
|
116 |
-
wp_register_script ( 'ywzm_frontend',
|
117 |
-
YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'ywzm_frontend.js' ),
|
118 |
-
array(
|
119 |
-
'jquery',
|
120 |
-
'ywzm-magnifier',
|
121 |
-
),
|
122 |
-
YITH_YWZM_VERSION,
|
123 |
-
true );
|
124 |
-
|
125 |
-
wp_register_style ( 'ywzm-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
|
126 |
-
|
127 |
-
if ( is_product () || ( ! empty( $post->post_content ) && strstr ( $post->post_content, '[product_page' ) ) ) {
|
128 |
-
|
129 |
-
wp_localize_script ( 'ywzm_frontend',
|
130 |
-
'ywzm_data', array(
|
131 |
-
'wc_before_3_0' => version_compare ( WC ()->version, '3.0', '<' ),
|
132 |
-
)
|
133 |
-
);
|
134 |
-
|
135 |
-
// Enqueue PrettyPhoto style and script
|
136 |
-
$wc_assets_path = str_replace ( array( 'http:', 'https:' ), '', WC ()->plugin_url () ) . '/assets/';
|
137 |
-
|
138 |
-
// Enqueue scripts
|
139 |
-
wp_enqueue_script ( 'prettyPhoto', $wc_assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
|
140 |
-
wp_enqueue_script ( 'ywzm-magnifier-slider' );
|
141 |
-
wp_enqueue_script ( 'ywzm-magnifier' );
|
142 |
-
wp_enqueue_script ( 'ywzm_frontend' );
|
143 |
-
|
144 |
-
// Enqueue Style
|
145 |
-
$css = file_exists ( get_stylesheet_directory () . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri () . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
|
146 |
-
wp_enqueue_style ( 'ywzm-prettyPhoto', $wc_assets_path . 'css/prettyPhoto.css' );
|
147 |
-
wp_enqueue_style ( 'ywzm-magnifier' );
|
148 |
-
wp_enqueue_style ( 'ywzm_frontend', $css );
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Add attributes to product variations
|
155 |
-
*
|
156 |
-
* @param array $data
|
157 |
-
* @param WC_Product_Variable $wc_prod
|
158 |
-
* @param WC_Product_Variation $variation
|
159 |
-
*
|
160 |
-
* @return mixed
|
161 |
-
*/
|
162 |
-
public function available_variation( $data, $wc_prod, $variation ) {
|
163 |
-
|
164 |
-
$attachment_id = get_post_thumbnail_id ( version_compare ( WC ()->version, '3.0', '<' ) ? $variation->get_variation_id () : $variation->get_id () );
|
165 |
-
$attachment = wp_get_attachment_image_src ( $attachment_id, 'shop_magnifier' );
|
166 |
-
|
167 |
-
$data['image_magnifier'] = $attachment ? current ( $attachment ) : '';
|
168 |
-
|
169 |
-
return $data;
|
170 |
-
}
|
171 |
-
|
172 |
-
}
|
173 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Frontend class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined ( 'YITH_WCMG' ) ) {
|
11 |
+
exit;
|
12 |
+
} // Exit if accessed directly
|
13 |
+
|
14 |
+
if ( ! class_exists ( 'YITH_WCMG_Frontend' ) ) {
|
15 |
+
/**
|
16 |
+
* Admin class.
|
17 |
+
* The class manage all the Frontend behaviors.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
class YITH_WCMG_Frontend {
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructor
|
26 |
+
*
|
27 |
+
* @access public
|
28 |
+
* @since 1.0.0
|
29 |
+
*/
|
30 |
+
public function __construct() {
|
31 |
+
|
32 |
+
// add the action only when the loop is initializate
|
33 |
+
add_action ( 'template_redirect', array( $this, 'render' ) );
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
public function render() {
|
38 |
+
if ( yith_wcmg_is_enabled () && ! apply_filters ( 'yith_wczm_featured_video_enabled', false ) ) {
|
39 |
+
//change the templates
|
40 |
+
remove_action ( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
|
41 |
+
remove_action ( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
|
42 |
+
add_action ( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20 );
|
43 |
+
add_action ( 'woocommerce_product_thumbnails', array( $this, 'show_product_thumbnails' ), 20 );
|
44 |
+
|
45 |
+
//custom styles and javascripts
|
46 |
+
add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
|
47 |
+
|
48 |
+
//add attributes to product variations
|
49 |
+
add_filter ( 'woocommerce_available_variation', array( $this, 'available_variation' ), 10, 3 );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Change product-single.php template
|
56 |
+
*
|
57 |
+
* @access public
|
58 |
+
* @return void
|
59 |
+
* @since 1.0.0
|
60 |
+
*/
|
61 |
+
public function show_product_images() {
|
62 |
+
|
63 |
+
/** FIX WOO 2.1 */
|
64 |
+
$wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
|
65 |
+
$wc_get_template( 'single-product/product-image-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Change product-thumbnails.php template
|
71 |
+
*
|
72 |
+
* @access public
|
73 |
+
* @return void
|
74 |
+
* @since 1.0.0
|
75 |
+
*/
|
76 |
+
public function show_product_thumbnails() {
|
77 |
+
|
78 |
+
/** FIX WOO 2.1 */
|
79 |
+
$wc_get_template = function_exists ( 'wc_get_template' ) ? 'wc_get_template' : 'woocommerce_get_template';
|
80 |
+
|
81 |
+
$wc_get_template( 'single-product/product-thumbnails-magnifier.php', array(), '', YITH_YWZM_DIR . 'templates/' );
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Enqueue styles and scripts
|
87 |
+
*
|
88 |
+
* @access public
|
89 |
+
* @return void
|
90 |
+
* @since 1.0.0
|
91 |
+
*/
|
92 |
+
public function enqueue_styles_scripts() {
|
93 |
+
global $post;
|
94 |
+
|
95 |
+
$suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
96 |
+
|
97 |
+
wp_register_script ( 'ywzm-magnifier-slider',
|
98 |
+
YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'jquery.carouFredSel.js' ),
|
99 |
+
array(
|
100 |
+
'jquery',
|
101 |
+
'jquery-migrate',
|
102 |
+
),
|
103 |
+
'6.2.1',
|
104 |
+
true );
|
105 |
+
|
106 |
+
wp_register_script ( 'ywzm-magnifier',
|
107 |
+
YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'yith_magnifier.js' ),
|
108 |
+
array( 'jquery' ),
|
109 |
+
YITH_YWZM_VERSION,
|
110 |
+
true );
|
111 |
+
|
112 |
+
wp_localize_script( 'ywzm-magnifier', 'yith_wc_zoom_magnifier_storage_object', apply_filters( 'yith_wc_zoom_magnifier_front_magnifier_localize', array(
|
113 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
114 |
+
) ) );
|
115 |
+
|
116 |
+
wp_register_script ( 'ywzm_frontend',
|
117 |
+
YITH_WCMG_URL . 'assets/js/' . yit_load_js_file ( 'ywzm_frontend.js' ),
|
118 |
+
array(
|
119 |
+
'jquery',
|
120 |
+
'ywzm-magnifier',
|
121 |
+
),
|
122 |
+
YITH_YWZM_VERSION,
|
123 |
+
true );
|
124 |
+
|
125 |
+
wp_register_style ( 'ywzm-magnifier', YITH_WCMG_URL . 'assets/css/yith_magnifier.css' );
|
126 |
+
|
127 |
+
if ( is_product () || ( ! empty( $post->post_content ) && strstr ( $post->post_content, '[product_page' ) ) ) {
|
128 |
+
|
129 |
+
wp_localize_script ( 'ywzm_frontend',
|
130 |
+
'ywzm_data', array(
|
131 |
+
'wc_before_3_0' => version_compare ( WC ()->version, '3.0', '<' ),
|
132 |
+
)
|
133 |
+
);
|
134 |
+
|
135 |
+
// Enqueue PrettyPhoto style and script
|
136 |
+
$wc_assets_path = str_replace ( array( 'http:', 'https:' ), '', WC ()->plugin_url () ) . '/assets/';
|
137 |
+
|
138 |
+
// Enqueue scripts
|
139 |
+
wp_enqueue_script ( 'prettyPhoto', $wc_assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.6', true );
|
140 |
+
wp_enqueue_script ( 'ywzm-magnifier-slider' );
|
141 |
+
wp_enqueue_script ( 'ywzm-magnifier' );
|
142 |
+
wp_enqueue_script ( 'ywzm_frontend' );
|
143 |
+
|
144 |
+
// Enqueue Style
|
145 |
+
$css = file_exists ( get_stylesheet_directory () . '/woocommerce/yith_magnifier.css' ) ? get_stylesheet_directory_uri () . '/woocommerce/yith_magnifier.css' : YITH_WCMG_URL . 'assets/css/frontend.css';
|
146 |
+
wp_enqueue_style ( 'ywzm-prettyPhoto', $wc_assets_path . 'css/prettyPhoto.css' );
|
147 |
+
wp_enqueue_style ( 'ywzm-magnifier' );
|
148 |
+
wp_enqueue_style ( 'ywzm_frontend', $css );
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Add attributes to product variations
|
155 |
+
*
|
156 |
+
* @param array $data
|
157 |
+
* @param WC_Product_Variable $wc_prod
|
158 |
+
* @param WC_Product_Variation $variation
|
159 |
+
*
|
160 |
+
* @return mixed
|
161 |
+
*/
|
162 |
+
public function available_variation( $data, $wc_prod, $variation ) {
|
163 |
+
|
164 |
+
$attachment_id = get_post_thumbnail_id ( version_compare ( WC ()->version, '3.0', '<' ) ? $variation->get_variation_id () : $variation->get_id () );
|
165 |
+
$attachment = wp_get_attachment_image_src ( $attachment_id, 'shop_magnifier' );
|
166 |
+
|
167 |
+
$data['image_magnifier'] = $attachment ? current ( $attachment ) : '';
|
168 |
+
|
169 |
+
return $data;
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
173 |
+
}
|
functions.yith-wcmg.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Functions
|
4 |
-
*
|
5 |
-
* @author Your Inspiration Themes
|
6 |
-
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.2
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined ( 'YITH_WCMG' ) ) {
|
11 |
-
exit;
|
12 |
-
} // Exit if accessed directly
|
13 |
-
|
14 |
-
if ( ! function_exists ( 'yith_wcmg_is_enabled' ) ) {
|
15 |
-
/**
|
16 |
-
* Check if the plugin is enabled for the current context
|
17 |
-
*
|
18 |
-
* @return bool
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
function yith_wcmg_is_enabled () {
|
22 |
-
if ( wp_is_mobile () ) {
|
23 |
-
return ( 'yes' == get_option ( 'yith_wcmg_enable_mobile' ) );
|
24 |
-
}
|
25 |
-
|
26 |
-
return get_option ( 'yith_wcmg_enable_plugin' ) == 'yes';
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
if ( ! function_exists ( 'yit_shop_single_w' ) ) {
|
31 |
-
/**
|
32 |
-
* Return the shop_single image width
|
33 |
-
*
|
34 |
-
* @return integer
|
35 |
-
* @since 1.0.0
|
36 |
-
*/
|
37 |
-
function yit_shop_single_w () {
|
38 |
-
$size = yit_get_image_size ( 'shop_single' );
|
39 |
-
|
40 |
-
return $size[ 'width' ];
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
if ( ! function_exists ( 'yit_shop_thumbnail_w' ) ) {
|
45 |
-
/**
|
46 |
-
* Return the shop_thumbnail image width
|
47 |
-
*
|
48 |
-
* @return integer
|
49 |
-
* @since 1.0.0
|
50 |
-
*/
|
51 |
-
function yit_shop_thumbnail_w () {
|
52 |
-
$size = yit_get_image_size ( 'shop_thumbnail' );
|
53 |
-
|
54 |
-
return $size[ 'width' ];
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
/* FIX TO WOOCOMMERCE 2.1 */
|
59 |
-
if ( ! function_exists ( 'yit_get_image_size' ) ) {
|
60 |
-
/**
|
61 |
-
* Get default image size
|
62 |
-
*
|
63 |
-
* @param array $size current size
|
64 |
-
*
|
65 |
-
* @return array
|
66 |
-
* @author Lorenzo Giuffrida
|
67 |
-
* @since 1.0.0
|
68 |
-
*/
|
69 |
-
function yit_get_image_size ( $size ) {
|
70 |
-
if ( function_exists ( 'wc_get_image_size' ) ) {
|
71 |
-
return wc_get_image_size ( $size );
|
72 |
-
} else {
|
73 |
-
global $woocommerce;
|
74 |
-
|
75 |
-
return $woocommerce->get_image_size ( $size );
|
76 |
-
}
|
77 |
-
}
|
78 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Functions
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined ( 'YITH_WCMG' ) ) {
|
11 |
+
exit;
|
12 |
+
} // Exit if accessed directly
|
13 |
+
|
14 |
+
if ( ! function_exists ( 'yith_wcmg_is_enabled' ) ) {
|
15 |
+
/**
|
16 |
+
* Check if the plugin is enabled for the current context
|
17 |
+
*
|
18 |
+
* @return bool
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
function yith_wcmg_is_enabled () {
|
22 |
+
if ( wp_is_mobile () ) {
|
23 |
+
return ( 'yes' == get_option ( 'yith_wcmg_enable_mobile' ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
return get_option ( 'yith_wcmg_enable_plugin' ) == 'yes';
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( ! function_exists ( 'yit_shop_single_w' ) ) {
|
31 |
+
/**
|
32 |
+
* Return the shop_single image width
|
33 |
+
*
|
34 |
+
* @return integer
|
35 |
+
* @since 1.0.0
|
36 |
+
*/
|
37 |
+
function yit_shop_single_w () {
|
38 |
+
$size = yit_get_image_size ( 'shop_single' );
|
39 |
+
|
40 |
+
return $size[ 'width' ];
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( ! function_exists ( 'yit_shop_thumbnail_w' ) ) {
|
45 |
+
/**
|
46 |
+
* Return the shop_thumbnail image width
|
47 |
+
*
|
48 |
+
* @return integer
|
49 |
+
* @since 1.0.0
|
50 |
+
*/
|
51 |
+
function yit_shop_thumbnail_w () {
|
52 |
+
$size = yit_get_image_size ( 'shop_thumbnail' );
|
53 |
+
|
54 |
+
return $size[ 'width' ];
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/* FIX TO WOOCOMMERCE 2.1 */
|
59 |
+
if ( ! function_exists ( 'yit_get_image_size' ) ) {
|
60 |
+
/**
|
61 |
+
* Get default image size
|
62 |
+
*
|
63 |
+
* @param array $size current size
|
64 |
+
*
|
65 |
+
* @return array
|
66 |
+
* @author Lorenzo Giuffrida
|
67 |
+
* @since 1.0.0
|
68 |
+
*/
|
69 |
+
function yit_get_image_size ( $size ) {
|
70 |
+
if ( function_exists ( 'wc_get_image_size' ) ) {
|
71 |
+
return wc_get_image_size ( $size );
|
72 |
+
} else {
|
73 |
+
global $woocommerce;
|
74 |
+
|
75 |
+
return $woocommerce->get_image_size ( $size );
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
init.php
CHANGED
@@ -1,157 +1,157 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
-
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
|
5 |
-
* Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
|
6 |
-
* Version: 1.3.
|
7 |
-
* Author: YITH
|
8 |
-
* Author URI: https://yithemes.com/
|
9 |
-
* Text Domain: yith-woocommerce-zoom-magnifier
|
10 |
-
* Domain Path: /languages/
|
11 |
-
* WC requires at least: 5.3
|
12 |
-
* WC tested up to: 5.
|
13 |
-
**/
|
14 |
-
|
15 |
-
/* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
|
16 |
-
|
17 |
-
This program is free software; you can redistribute it and/or modify
|
18 |
-
it under the terms of the GNU General Public License, version 2, as
|
19 |
-
published by the Free Software Foundation.
|
20 |
-
|
21 |
-
This program is distributed in the hope that it will be useful,
|
22 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
-
GNU General Public License for more details.
|
25 |
-
|
26 |
-
You should have received a copy of the GNU General Public License
|
27 |
-
along with this program; if not, write to the Free Software
|
28 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
29 |
-
*/
|
30 |
-
|
31 |
-
if ( ! defined ( 'ABSPATH' ) ) {
|
32 |
-
exit;
|
33 |
-
} // Exit if accessed directly
|
34 |
-
|
35 |
-
if ( ! function_exists( 'is_plugin_active' ) ) {
|
36 |
-
if ( ! function_exists( 'get_plugin_data' ) ) {
|
37 |
-
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
if ( ! function_exists ( 'yith_ywzm_install_woocommerce_admin_notice' ) ) {
|
42 |
-
/**
|
43 |
-
* WooCommerce is not enabled, the plugin will not be effective
|
44 |
-
*
|
45 |
-
* @author Lorenzo Giuffrida
|
46 |
-
* @since 1.0.0
|
47 |
-
*/
|
48 |
-
function yith_ywzm_install_woocommerce_admin_notice () {
|
49 |
-
?>
|
50 |
-
<div class="error">
|
51 |
-
<p><?php _e ( 'YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
|
52 |
-
</div>
|
53 |
-
<?php
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
if ( ! function_exists ( 'yith_ywzm_install_free_admin_notice' ) ) {
|
58 |
-
/**
|
59 |
-
* Unable to activate the free version while the premium version is active
|
60 |
-
*
|
61 |
-
* @author Lorenzo Giuffrida
|
62 |
-
* @since 1.0.0
|
63 |
-
*/
|
64 |
-
function yith_ywzm_install_free_admin_notice () {
|
65 |
-
?>
|
66 |
-
<div class="error">
|
67 |
-
<p><?php _e ( 'You can\'t activate the free version of YITH WooCommerce Zoom Magnifier while you are using the premium one.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
|
68 |
-
</div>
|
69 |
-
<?php
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
|
74 |
-
require_once 'plugin-fw/yit-plugin-registration-hook.php';
|
75 |
-
}
|
76 |
-
|
77 |
-
register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
|
78 |
-
|
79 |
-
defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
|
80 |
-
defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
|
81 |
-
defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.
|
82 |
-
defined ( 'YITH_YWZM_JS_VERSION' ) || define ( 'YITH_YWZM_JS_VERSION', '1.3.
|
83 |
-
|
84 |
-
defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
|
85 |
-
defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
|
86 |
-
defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
|
87 |
-
defined ( 'YITH_YWZM_ASSETS_URL' ) || define ( 'YITH_YWZM_ASSETS_URL', YITH_YWZM_URL . 'assets' );
|
88 |
-
defined ( 'YITH_YWZM_TEMPLATE_DIR' ) || define ( 'YITH_YWZM_TEMPLATE_DIR', YITH_YWZM_DIR . 'templates' );
|
89 |
-
defined ( 'YITH_YWZM_ASSETS_IMAGES_URL' ) || define ( 'YITH_YWZM_ASSETS_IMAGES_URL', YITH_YWZM_ASSETS_URL . '/images/' );
|
90 |
-
defined ( 'YITH_YWZM_LIB_DIR' ) || define ( 'YITH_YWZM_LIB_DIR', YITH_YWZM_DIR . 'lib/' );
|
91 |
-
|
92 |
-
/* Plugin Framework Version Check */
|
93 |
-
if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) && file_exists ( YITH_YWZM_DIR . 'plugin-fw/init.php' ) ) {
|
94 |
-
require_once ( YITH_YWZM_DIR . 'plugin-fw/init.php' );
|
95 |
-
}
|
96 |
-
yit_maybe_plugin_fw_loader ( YITH_YWZM_DIR );
|
97 |
-
|
98 |
-
if ( ! function_exists ( 'yith_ywzm_init' ) ) {
|
99 |
-
/**
|
100 |
-
* Init the plugin
|
101 |
-
*
|
102 |
-
* @author Lorenzo Giuffrida
|
103 |
-
* @since 1.0.0
|
104 |
-
*/
|
105 |
-
function yith_ywzm_init () {
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Load text domain and start plugin
|
109 |
-
*/
|
110 |
-
load_plugin_textdomain ( 'yith-woocommerce-zoom-magnifier', false, dirname ( plugin_basename ( __FILE__ ) ) . '/languages/' );
|
111 |
-
|
112 |
-
add_option ( 'yith_wcmg_slider_direction', apply_filters ( 'yith_wcmg_slider_direction', 'left' ) );
|
113 |
-
|
114 |
-
define ( 'YITH_WCMG', true );
|
115 |
-
define ( 'YITH_WCMG_URL', plugin_dir_url ( __FILE__ ) );
|
116 |
-
|
117 |
-
// Load required classes and functions
|
118 |
-
require_once ( 'functions.yith-wcmg.php' );
|
119 |
-
require_once ( 'class.yith-wcmg-admin.php' );
|
120 |
-
require_once ( 'class.yith-wcmg-frontend.php' );
|
121 |
-
|
122 |
-
require_once ( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
|
123 |
-
require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
|
124 |
-
require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );
|
125 |
-
|
126 |
-
YITH_YWZM_Plugin_FW_Loader::get_instance ();
|
127 |
-
|
128 |
-
// Let's start the game!
|
129 |
-
global $yith_wcmg;
|
130 |
-
|
131 |
-
$yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
|
132 |
-
}
|
133 |
-
}
|
134 |
-
add_action ( 'yith_ywzm_init', 'yith_ywzm_init' );
|
135 |
-
|
136 |
-
if ( ! function_exists ( 'yith_ywzm_install' ) ) {
|
137 |
-
/**
|
138 |
-
* install the plugin
|
139 |
-
*
|
140 |
-
* @author Lorenzo Giuffrida
|
141 |
-
* @since 1.0.0
|
142 |
-
*/
|
143 |
-
function yith_ywzm_install () {
|
144 |
-
|
145 |
-
if ( ! function_exists ( 'WC' ) ) {
|
146 |
-
add_action ( 'admin_notices', 'yith_ywzm_install_woocommerce_admin_notice' );
|
147 |
-
} elseif ( defined ( 'YITH_YWZM_PREMIUM' ) ) {
|
148 |
-
add_action ( 'admin_notices', 'yith_ywzm_install_free_admin_notice' );
|
149 |
-
deactivate_plugins ( plugin_basename ( __FILE__ ) );
|
150 |
-
} else {
|
151 |
-
do_action ( 'yith_ywzm_init' );
|
152 |
-
}
|
153 |
-
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
+
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
|
5 |
+
* Description: <code><strong>YITH WooCommerce Zoom Magnifier</strong></code> allows you to add a zoom effect to product images and a thumbnail slider for the product image gallery. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
|
6 |
+
* Version: 1.3.30
|
7 |
+
* Author: YITH
|
8 |
+
* Author URI: https://yithemes.com/
|
9 |
+
* Text Domain: yith-woocommerce-zoom-magnifier
|
10 |
+
* Domain Path: /languages/
|
11 |
+
* WC requires at least: 5.3
|
12 |
+
* WC tested up to: 5.6
|
13 |
+
**/
|
14 |
+
|
15 |
+
/* Copyright 2013-2018 Your Inspiration Themes (email : plugins@yithemes.com)
|
16 |
+
|
17 |
+
This program is free software; you can redistribute it and/or modify
|
18 |
+
it under the terms of the GNU General Public License, version 2, as
|
19 |
+
published by the Free Software Foundation.
|
20 |
+
|
21 |
+
This program is distributed in the hope that it will be useful,
|
22 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
+
GNU General Public License for more details.
|
25 |
+
|
26 |
+
You should have received a copy of the GNU General Public License
|
27 |
+
along with this program; if not, write to the Free Software
|
28 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
29 |
+
*/
|
30 |
+
|
31 |
+
if ( ! defined ( 'ABSPATH' ) ) {
|
32 |
+
exit;
|
33 |
+
} // Exit if accessed directly
|
34 |
+
|
35 |
+
if ( ! function_exists( 'is_plugin_active' ) ) {
|
36 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
37 |
+
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( ! function_exists ( 'yith_ywzm_install_woocommerce_admin_notice' ) ) {
|
42 |
+
/**
|
43 |
+
* WooCommerce is not enabled, the plugin will not be effective
|
44 |
+
*
|
45 |
+
* @author Lorenzo Giuffrida
|
46 |
+
* @since 1.0.0
|
47 |
+
*/
|
48 |
+
function yith_ywzm_install_woocommerce_admin_notice () {
|
49 |
+
?>
|
50 |
+
<div class="error">
|
51 |
+
<p><?php _e ( 'YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
|
52 |
+
</div>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( ! function_exists ( 'yith_ywzm_install_free_admin_notice' ) ) {
|
58 |
+
/**
|
59 |
+
* Unable to activate the free version while the premium version is active
|
60 |
+
*
|
61 |
+
* @author Lorenzo Giuffrida
|
62 |
+
* @since 1.0.0
|
63 |
+
*/
|
64 |
+
function yith_ywzm_install_free_admin_notice () {
|
65 |
+
?>
|
66 |
+
<div class="error">
|
67 |
+
<p><?php _e ( 'You can\'t activate the free version of YITH WooCommerce Zoom Magnifier while you are using the premium one.', 'yith-woocommerce-zoom-magnifier' ); ?></p>
|
68 |
+
</div>
|
69 |
+
<?php
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
|
74 |
+
require_once 'plugin-fw/yit-plugin-registration-hook.php';
|
75 |
+
}
|
76 |
+
|
77 |
+
register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
|
78 |
+
|
79 |
+
defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
|
80 |
+
defined ( 'YITH_YWZM_SLUG' ) || define ( 'YITH_YWZM_SLUG', 'yith-woocommerce-zoom-magnifier' );
|
81 |
+
defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.3.30' );
|
82 |
+
defined ( 'YITH_YWZM_JS_VERSION' ) || define ( 'YITH_YWZM_JS_VERSION', '1.3.30' );
|
83 |
+
|
84 |
+
defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
|
85 |
+
defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
|
86 |
+
defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
|
87 |
+
defined ( 'YITH_YWZM_ASSETS_URL' ) || define ( 'YITH_YWZM_ASSETS_URL', YITH_YWZM_URL . 'assets' );
|
88 |
+
defined ( 'YITH_YWZM_TEMPLATE_DIR' ) || define ( 'YITH_YWZM_TEMPLATE_DIR', YITH_YWZM_DIR . 'templates' );
|
89 |
+
defined ( 'YITH_YWZM_ASSETS_IMAGES_URL' ) || define ( 'YITH_YWZM_ASSETS_IMAGES_URL', YITH_YWZM_ASSETS_URL . '/images/' );
|
90 |
+
defined ( 'YITH_YWZM_LIB_DIR' ) || define ( 'YITH_YWZM_LIB_DIR', YITH_YWZM_DIR . 'lib/' );
|
91 |
+
|
92 |
+
/* Plugin Framework Version Check */
|
93 |
+
if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) && file_exists ( YITH_YWZM_DIR . 'plugin-fw/init.php' ) ) {
|
94 |
+
require_once ( YITH_YWZM_DIR . 'plugin-fw/init.php' );
|
95 |
+
}
|
96 |
+
yit_maybe_plugin_fw_loader ( YITH_YWZM_DIR );
|
97 |
+
|
98 |
+
if ( ! function_exists ( 'yith_ywzm_init' ) ) {
|
99 |
+
/**
|
100 |
+
* Init the plugin
|
101 |
+
*
|
102 |
+
* @author Lorenzo Giuffrida
|
103 |
+
* @since 1.0.0
|
104 |
+
*/
|
105 |
+
function yith_ywzm_init () {
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Load text domain and start plugin
|
109 |
+
*/
|
110 |
+
load_plugin_textdomain ( 'yith-woocommerce-zoom-magnifier', false, dirname ( plugin_basename ( __FILE__ ) ) . '/languages/' );
|
111 |
+
|
112 |
+
add_option ( 'yith_wcmg_slider_direction', apply_filters ( 'yith_wcmg_slider_direction', 'left' ) );
|
113 |
+
|
114 |
+
define ( 'YITH_WCMG', true );
|
115 |
+
define ( 'YITH_WCMG_URL', plugin_dir_url ( __FILE__ ) );
|
116 |
+
|
117 |
+
// Load required classes and functions
|
118 |
+
require_once ( 'functions.yith-wcmg.php' );
|
119 |
+
require_once ( 'class.yith-wcmg-admin.php' );
|
120 |
+
require_once ( 'class.yith-wcmg-frontend.php' );
|
121 |
+
|
122 |
+
require_once ( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
|
123 |
+
require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
|
124 |
+
require_once ( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );
|
125 |
+
|
126 |
+
YITH_YWZM_Plugin_FW_Loader::get_instance ();
|
127 |
+
|
128 |
+
// Let's start the game!
|
129 |
+
global $yith_wcmg;
|
130 |
+
|
131 |
+
$yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
|
132 |
+
}
|
133 |
+
}
|
134 |
+
add_action ( 'yith_ywzm_init', 'yith_ywzm_init' );
|
135 |
+
|
136 |
+
if ( ! function_exists ( 'yith_ywzm_install' ) ) {
|
137 |
+
/**
|
138 |
+
* install the plugin
|
139 |
+
*
|
140 |
+
* @author Lorenzo Giuffrida
|
141 |
+
* @since 1.0.0
|
142 |
+
*/
|
143 |
+
function yith_ywzm_install () {
|
144 |
+
|
145 |
+
if ( ! function_exists ( 'WC' ) ) {
|
146 |
+
add_action ( 'admin_notices', 'yith_ywzm_install_woocommerce_admin_notice' );
|
147 |
+
} elseif ( defined ( 'YITH_YWZM_PREMIUM' ) ) {
|
148 |
+
add_action ( 'admin_notices', 'yith_ywzm_install_free_admin_notice' );
|
149 |
+
deactivate_plugins ( plugin_basename ( __FILE__ ) );
|
150 |
+
} else {
|
151 |
+
do_action ( 'yith_ywzm_init' );
|
152 |
+
}
|
153 |
+
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
add_action ( 'plugins_loaded', 'yith_ywzm_install', 11 );
|
languages/yith-woocommerce-zoom-magnifier.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the YITH WooCommerce Zoom Magnifier package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: YITH WooCommerce Zoom Magnifier 1.3.
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
-
"POT-Creation-Date: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
2 |
# This file is distributed under the same license as the YITH WooCommerce Zoom Magnifier package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: YITH WooCommerce Zoom Magnifier 1.3.30\n"
|
6 |
"Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
|
7 |
+
"POT-Creation-Date: 2021-08-18 14:44:32+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
lib/class.yith-woocommerce-zoom-magnifier.php
CHANGED
@@ -1,188 +1,188 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Main class
|
4 |
-
*
|
5 |
-
* @author Your Inspiration Themes
|
6 |
-
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.2
|
8 |
-
*/
|
9 |
-
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
exit;
|
12 |
-
} // Exit if accessed directly
|
13 |
-
|
14 |
-
|
15 |
-
if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
|
16 |
-
/**
|
17 |
-
* YITH WooCommerce Zoom Magnifier
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
class YITH_WooCommerce_Zoom_Magnifier {
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Plugin object
|
25 |
-
*
|
26 |
-
* @var string
|
27 |
-
* @since 1.0.0
|
28 |
-
*/
|
29 |
-
public $obj = null;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @var string Premium version landing link
|
33 |
-
*/
|
34 |
-
protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @var string Plugin official documentation
|
38 |
-
*/
|
39 |
-
protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @var string Plugin panel page
|
43 |
-
*/
|
44 |
-
protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Constructor
|
48 |
-
*
|
49 |
-
* @return mixed|YITH_WCMG_Admin|YITH_WCMG_Frontend
|
50 |
-
* @since 1.0.0
|
51 |
-
*/
|
52 |
-
public function __construct() {
|
53 |
-
/** Stop the plugin on mobile devices */
|
54 |
-
if ( ( 'yes' != get_option( 'yith_wcmg_enable_mobile' ) ) && wp_is_mobile() ) {
|
55 |
-
return;
|
56 |
-
}
|
57 |
-
|
58 |
-
add_action( 'wp_ajax_nopriv_yith_wc_zoom_magnifier_get_main_image', array(
|
59 |
-
$this,
|
60 |
-
'yith_wc_zoom_magnifier_get_main_image_call_back'
|
61 |
-
), 10 );
|
62 |
-
|
63 |
-
add_action( 'wp_ajax_yith_wc_zoom_magnifier_get_main_image', array(
|
64 |
-
$this,
|
65 |
-
'yith_wc_zoom_magnifier_get_main_image_call_back'
|
66 |
-
), 10 );
|
67 |
-
|
68 |
-
// actions
|
69 |
-
add_action( 'init', array( $this, 'init' ) );
|
70 |
-
|
71 |
-
if ( is_admin() && ( ! isset( $_REQUEST['action'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] != 'yith_load_product_quick_view' ) ) ) {
|
72 |
-
$this->obj = new YITH_WCMG_Admin( );
|
73 |
-
} else {
|
74 |
-
$this->obj = new YITH_WCMG_Frontend( );
|
75 |
-
}
|
76 |
-
|
77 |
-
return $this->obj;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Ajax method to retrieve the product main imavge
|
82 |
-
*
|
83 |
-
* @access public
|
84 |
-
* @author Daniel Sanchez Saez
|
85 |
-
* @since 1.3.3
|
86 |
-
*/
|
87 |
-
public function yith_wc_zoom_magnifier_get_main_image_call_back(){
|
88 |
-
|
89 |
-
// set the main wp query for the product
|
90 |
-
global $post, $product;
|
91 |
-
|
92 |
-
$product_id = isset( $_POST[ 'product_id' ] ) ? $_POST[ 'product_id' ] : 0;
|
93 |
-
$post = get_post( $product_id ); // to fix junk theme compatibility
|
94 |
-
$product = wc_get_product( $product_id );
|
95 |
-
|
96 |
-
if( empty( $product ) ) {
|
97 |
-
wp_send_json_error();
|
98 |
-
}
|
99 |
-
|
100 |
-
$url = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ), "full" );
|
101 |
-
|
102 |
-
if( function_exists( 'YITH_WCCL_Frontend' ) && function_exists( 'yith_wccl_get_variation_gallery' ) ) {
|
103 |
-
$gallery = yith_wccl_get_variation_gallery( $product );
|
104 |
-
// filter gallery based on current variation
|
105 |
-
if( ! empty( $gallery ) ) {
|
106 |
-
add_filter( 'woocommerce_product_variation_get_gallery_image_ids', [ YITH_WCCL_Frontend(), 'filter_gallery_ids' ], 10, 2 );
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
ob_start();
|
111 |
-
wc_get_template( 'single-product/product-thumbnails-magnifier.php', [], '', YITH_YWZM_DIR . 'templates/' );
|
112 |
-
$gallery_html = ob_get_clean();
|
113 |
-
|
114 |
-
wp_send_json( [
|
115 |
-
'url' => isset( $url[ 0 ] ) ? $url[ 0 ] : '',
|
116 |
-
'gallery' => $gallery_html
|
117 |
-
] );
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Init method:
|
123 |
-
* - default options
|
124 |
-
*
|
125 |
-
* @access public
|
126 |
-
* @since 1.0.0
|
127 |
-
*/
|
128 |
-
public function init() {
|
129 |
-
|
130 |
-
$this->_image_sizes();
|
131 |
-
|
132 |
-
/* === Show Plugin Information === */
|
133 |
-
|
134 |
-
add_filter( 'plugin_action_links_' . plugin_basename( YITH_YWZM_DIR . '/' . basename( YITH_YWZM_FILE ) ), array( $this, 'action_links' ) );
|
135 |
-
|
136 |
-
add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Add image sizes
|
143 |
-
*
|
144 |
-
* Init images
|
145 |
-
*
|
146 |
-
* @access protected
|
147 |
-
* @return void
|
148 |
-
* @since 1.0.0
|
149 |
-
*/
|
150 |
-
protected function _image_sizes() {
|
151 |
-
$size = get_option( 'woocommerce_magnifier_image' );
|
152 |
-
$width = isset( $size['width'] ) ? $size['width'] : '';
|
153 |
-
$height = isset( $size['height'] ) ? $size['height'] : '';
|
154 |
-
$crop = isset( $size['crop'] ) ? true : false;
|
155 |
-
|
156 |
-
add_image_size( 'shop_magnifier', $width, $height, $crop );
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Action links
|
161 |
-
*
|
162 |
-
*
|
163 |
-
* @return void
|
164 |
-
* @since 1.3.5
|
165 |
-
* @author Daniel Sanchez <daniel.sanchez@yithemes.com>
|
166 |
-
*/
|
167 |
-
public function action_links( $links ) {
|
168 |
-
$links = yith_add_action_links( $links, $this->_panel_page, false );
|
169 |
-
return $links;
|
170 |
-
}
|
171 |
-
/**
|
172 |
-
* Plugin Row Meta
|
173 |
-
*
|
174 |
-
*
|
175 |
-
* @return void
|
176 |
-
* @since 1.3.5
|
177 |
-
* @author Daniel Sanchez <daniel.sanchez@yithemes.com>
|
178 |
-
*/
|
179 |
-
public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_YWZM_FREE_INIT' ) {
|
180 |
-
if ( defined( $init_file ) && constant( $init_file ) == $plugin_file ) {
|
181 |
-
$new_row_meta_args['slug'] = YITH_YWZM_SLUG;
|
182 |
-
}
|
183 |
-
|
184 |
-
return $new_row_meta_args;
|
185 |
-
}
|
186 |
-
|
187 |
-
}
|
188 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Main class
|
4 |
+
*
|
5 |
+
* @author Your Inspiration Themes
|
6 |
+
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
+
*/
|
9 |
+
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
exit;
|
12 |
+
} // Exit if accessed directly
|
13 |
+
|
14 |
+
|
15 |
+
if ( ! class_exists( 'YITH_WooCommerce_Zoom_Magnifier' ) ) {
|
16 |
+
/**
|
17 |
+
* YITH WooCommerce Zoom Magnifier
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
+
class YITH_WooCommerce_Zoom_Magnifier {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Plugin object
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
* @since 1.0.0
|
28 |
+
*/
|
29 |
+
public $obj = null;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var string Premium version landing link
|
33 |
+
*/
|
34 |
+
protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var string Plugin official documentation
|
38 |
+
*/
|
39 |
+
protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @var string Plugin panel page
|
43 |
+
*/
|
44 |
+
protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Constructor
|
48 |
+
*
|
49 |
+
* @return mixed|YITH_WCMG_Admin|YITH_WCMG_Frontend
|
50 |
+
* @since 1.0.0
|
51 |
+
*/
|
52 |
+
public function __construct() {
|
53 |
+
/** Stop the plugin on mobile devices */
|
54 |
+
if ( ( 'yes' != get_option( 'yith_wcmg_enable_mobile' ) ) && wp_is_mobile() ) {
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
|
58 |
+
add_action( 'wp_ajax_nopriv_yith_wc_zoom_magnifier_get_main_image', array(
|
59 |
+
$this,
|
60 |
+
'yith_wc_zoom_magnifier_get_main_image_call_back'
|
61 |
+
), 10 );
|
62 |
+
|
63 |
+
add_action( 'wp_ajax_yith_wc_zoom_magnifier_get_main_image', array(
|
64 |
+
$this,
|
65 |
+
'yith_wc_zoom_magnifier_get_main_image_call_back'
|
66 |
+
), 10 );
|
67 |
+
|
68 |
+
// actions
|
69 |
+
add_action( 'init', array( $this, 'init' ) );
|
70 |
+
|
71 |
+
if ( is_admin() && ( ! isset( $_REQUEST['action'] ) || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] != 'yith_load_product_quick_view' ) ) ) {
|
72 |
+
$this->obj = new YITH_WCMG_Admin( );
|
73 |
+
} else {
|
74 |
+
$this->obj = new YITH_WCMG_Frontend( );
|
75 |
+
}
|
76 |
+
|
77 |
+
return $this->obj;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Ajax method to retrieve the product main imavge
|
82 |
+
*
|
83 |
+
* @access public
|
84 |
+
* @author Daniel Sanchez Saez
|
85 |
+
* @since 1.3.3
|
86 |
+
*/
|
87 |
+
public function yith_wc_zoom_magnifier_get_main_image_call_back(){
|
88 |
+
|
89 |
+
// set the main wp query for the product
|
90 |
+
global $post, $product;
|
91 |
+
|
92 |
+
$product_id = isset( $_POST[ 'product_id' ] ) ? $_POST[ 'product_id' ] : 0;
|
93 |
+
$post = get_post( $product_id ); // to fix junk theme compatibility
|
94 |
+
$product = wc_get_product( $product_id );
|
95 |
+
|
96 |
+
if( empty( $product ) ) {
|
97 |
+
wp_send_json_error();
|
98 |
+
}
|
99 |
+
|
100 |
+
$url = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ), "full" );
|
101 |
+
|
102 |
+
if( function_exists( 'YITH_WCCL_Frontend' ) && function_exists( 'yith_wccl_get_variation_gallery' ) ) {
|
103 |
+
$gallery = yith_wccl_get_variation_gallery( $product );
|
104 |
+
// filter gallery based on current variation
|
105 |
+
if( ! empty( $gallery ) ) {
|
106 |
+
add_filter( 'woocommerce_product_variation_get_gallery_image_ids', [ YITH_WCCL_Frontend(), 'filter_gallery_ids' ], 10, 2 );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
ob_start();
|
111 |
+
wc_get_template( 'single-product/product-thumbnails-magnifier.php', [], '', YITH_YWZM_DIR . 'templates/' );
|
112 |
+
$gallery_html = ob_get_clean();
|
113 |
+
|
114 |
+
wp_send_json( [
|
115 |
+
'url' => isset( $url[ 0 ] ) ? $url[ 0 ] : '',
|
116 |
+
'gallery' => $gallery_html
|
117 |
+
] );
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Init method:
|
123 |
+
* - default options
|
124 |
+
*
|
125 |
+
* @access public
|
126 |
+
* @since 1.0.0
|
127 |
+
*/
|
128 |
+
public function init() {
|
129 |
+
|
130 |
+
$this->_image_sizes();
|
131 |
+
|
132 |
+
/* === Show Plugin Information === */
|
133 |
+
|
134 |
+
add_filter( 'plugin_action_links_' . plugin_basename( YITH_YWZM_DIR . '/' . basename( YITH_YWZM_FILE ) ), array( $this, 'action_links' ) );
|
135 |
+
|
136 |
+
add_filter( 'yith_show_plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 5 );
|
137 |
+
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Add image sizes
|
143 |
+
*
|
144 |
+
* Init images
|
145 |
+
*
|
146 |
+
* @access protected
|
147 |
+
* @return void
|
148 |
+
* @since 1.0.0
|
149 |
+
*/
|
150 |
+
protected function _image_sizes() {
|
151 |
+
$size = get_option( 'woocommerce_magnifier_image' );
|
152 |
+
$width = isset( $size['width'] ) ? $size['width'] : '';
|
153 |
+
$height = isset( $size['height'] ) ? $size['height'] : '';
|
154 |
+
$crop = isset( $size['crop'] ) ? true : false;
|
155 |
+
|
156 |
+
add_image_size( 'shop_magnifier', $width, $height, $crop );
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Action links
|
161 |
+
*
|
162 |
+
*
|
163 |
+
* @return void
|
164 |
+
* @since 1.3.5
|
165 |
+
* @author Daniel Sanchez <daniel.sanchez@yithemes.com>
|
166 |
+
*/
|
167 |
+
public function action_links( $links ) {
|
168 |
+
$links = yith_add_action_links( $links, $this->_panel_page, false );
|
169 |
+
return $links;
|
170 |
+
}
|
171 |
+
/**
|
172 |
+
* Plugin Row Meta
|
173 |
+
*
|
174 |
+
*
|
175 |
+
* @return void
|
176 |
+
* @since 1.3.5
|
177 |
+
* @author Daniel Sanchez <daniel.sanchez@yithemes.com>
|
178 |
+
*/
|
179 |
+
public function plugin_row_meta( $new_row_meta_args, $plugin_meta, $plugin_file, $plugin_data, $status, $init_file = 'YITH_YWZM_FREE_INIT' ) {
|
180 |
+
if ( defined( $init_file ) && constant( $init_file ) == $plugin_file ) {
|
181 |
+
$new_row_meta_args['slug'] = YITH_YWZM_SLUG;
|
182 |
+
}
|
183 |
+
|
184 |
+
return $new_row_meta_args;
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
188 |
+
}
|
lib/class.yith-ywzm-custom-types.php
CHANGED
@@ -1,181 +1,181 @@
|
|
1 |
-
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
exit; // Exit if accessed directly
|
4 |
-
}
|
5 |
-
|
6 |
-
if (!class_exists('YITH_YWZM_Custom_Types')) {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* custom types fields
|
10 |
-
*
|
11 |
-
* @class YITH_YWZM_Custom_Types
|
12 |
-
* @package Yithemes
|
13 |
-
* @since 1.0.0
|
14 |
-
* @author Your Inspiration Themes
|
15 |
-
*/
|
16 |
-
class YITH_YWZM_Custom_Types
|
17 |
-
{
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Single instance of the class
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
*/
|
24 |
-
protected static $instance;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Returns single instance of the class
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
public static function get_instance()
|
32 |
-
{
|
33 |
-
if (is_null(self::$instance)) {
|
34 |
-
self::$instance = new self();
|
35 |
-
}
|
36 |
-
|
37 |
-
return self::$instance;
|
38 |
-
}
|
39 |
-
|
40 |
-
public function __construct()
|
41 |
-
{
|
42 |
-
/**
|
43 |
-
* Register actions and filters for custom types used on the current plugin
|
44 |
-
*/
|
45 |
-
|
46 |
-
/** Custom types : slider */
|
47 |
-
add_action('woocommerce_admin_field_slider', array($this, 'admin_fields_slider'));
|
48 |
-
|
49 |
-
add_action('woocommerce_admin_field_yith_ywzm_image_width', array(
|
50 |
-
$this,
|
51 |
-
'admin_fields_yith_ywzm_image_width'
|
52 |
-
));
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Create new Woocommerce admin field: slider
|
57 |
-
*
|
58 |
-
* @access public
|
59 |
-
*
|
60 |
-
* @param array $value
|
61 |
-
*
|
62 |
-
* @return void
|
63 |
-
* @since 1.0.0
|
64 |
-
*/
|
65 |
-
public function admin_fields_slider($value)
|
66 |
-
{
|
67 |
-
$slider_value = (get_option($value['id']) !== false && get_option($value['id']) !== null) ?
|
68 |
-
esc_attr(stripslashes(get_option($value['id']))) :
|
69 |
-
esc_attr($value['std']);
|
70 |
-
|
71 |
-
?>
|
72 |
-
<tr valign="top">
|
73 |
-
<th scope="row" class="titledesc">
|
74 |
-
<label for="<?php echo esc_attr($value['id']); ?>"><?php echo $value['name']; ?></label>
|
75 |
-
</th>
|
76 |
-
<td class="forminp">
|
77 |
-
<div id="<?php echo esc_attr($value['id']); ?>_slider" class="yith_woocommerce_slider"
|
78 |
-
style="width: 300px; float: left;"></div>
|
79 |
-
<div id="<?php echo esc_attr($value['id']); ?>_value"
|
80 |
-
class="yith_woocommerce_slider_value ui-state-default ui-corner-all"><?php echo $slider_value ?></div>
|
81 |
-
<input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"
|
82 |
-
type="hidden" value="<?php echo $slider_value ?>"/> <?php echo $value['desc']; ?>
|
83 |
-
</td>
|
84 |
-
</tr>
|
85 |
-
|
86 |
-
|
87 |
-
<script>
|
88 |
-
jQuery(document).ready(function ($) {
|
89 |
-
$('#<?php echo esc_attr( $value['id'] ); ?>_slider').slider({
|
90 |
-
min: <?php echo $value['min'] ?>,
|
91 |
-
max: <?php echo $value['max'] ?>,
|
92 |
-
step: <?php echo $value['step'] ?>,
|
93 |
-
value: <?php echo $slider_value ?>,
|
94 |
-
slide: function (event, ui) {
|
95 |
-
$("#<?php echo esc_attr( $value['id'] ); ?>").val(ui.value);
|
96 |
-
$("#<?php echo esc_attr( $value['id'] ); ?>_value").text(ui.value);
|
97 |
-
}
|
98 |
-
});
|
99 |
-
});
|
100 |
-
</script>
|
101 |
-
|
102 |
-
<?php
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Save the admin field: slider
|
107 |
-
*
|
108 |
-
* @access public
|
109 |
-
*
|
110 |
-
* @param mixed $value
|
111 |
-
*
|
112 |
-
* @return void
|
113 |
-
* @since 1.0.0
|
114 |
-
*/
|
115 |
-
public function admin_update_option($value)
|
116 |
-
{
|
117 |
-
global $woocommerce;
|
118 |
-
|
119 |
-
if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '<')) {
|
120 |
-
$wc_clean = 'woocommerce_clean';
|
121 |
-
} else {
|
122 |
-
$wc_clean = 'wc_clean';
|
123 |
-
}
|
124 |
-
|
125 |
-
update_option($value['id'], $wc_clean($_POST[$value['id']]));
|
126 |
-
}
|
127 |
-
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Create new Woocommerce admin field: yith_ywzm_image_width
|
131 |
-
*
|
132 |
-
* @access public
|
133 |
-
* @param array $value
|
134 |
-
* @return void
|
135 |
-
* @since 1.1.3
|
136 |
-
*/
|
137 |
-
public function admin_fields_yith_ywzm_image_width($value)
|
138 |
-
{
|
139 |
-
|
140 |
-
$width = WC_Admin_Settings::get_option($value['id'] . '[width]', $value['default']['width']);
|
141 |
-
$height = WC_Admin_Settings::get_option($value['id'] . '[height]', $value['default']['height']);
|
142 |
-
$crop = WC_Admin_Settings::get_option($value['id'] . '[crop]');
|
143 |
-
$crop = ($crop == 'on' || $crop == '1') ? 1 : 0;
|
144 |
-
$crop = checked(1, $crop, false);
|
145 |
-
|
146 |
-
?>
|
147 |
-
<tr valign="top">
|
148 |
-
<th scope="row" class="titledesc"><?php echo esc_html($value['title']) ?></th>
|
149 |
-
<td class="forminp image_width_settings">
|
150 |
-
<input name="<?php echo esc_attr($value['id']); ?>[width]"
|
151 |
-
id="<?php echo esc_attr($value['id']); ?>-width" type="text" size="3"
|
152 |
-
value="<?php echo $width; ?>"/> × <input
|
153 |
-
name="<?php echo esc_attr($value['id']); ?>[height]"
|
154 |
-
id="<?php echo esc_attr($value['id']); ?>-height" type="text" size="3"
|
155 |
-
value="<?php echo $height; ?>"/>px <span class="description"><?php echo $value['desc'] ?></span>
|
156 |
-
<br>
|
157 |
-
<label><input name="<?php echo esc_attr($value['id']); ?>[crop]"
|
158 |
-
id="<?php echo esc_attr($value['id']); ?>-crop"
|
159 |
-
type="checkbox" <?php echo $crop; ?> /> <?php _e('Do you want to hard crop the image?', 'woocommerce'); ?>
|
160 |
-
</label>
|
161 |
-
|
162 |
-
</td>
|
163 |
-
</tr><?php
|
164 |
-
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Update plugin options.
|
169 |
-
*
|
170 |
-
* @return void
|
171 |
-
* @since 1.0.0
|
172 |
-
*/
|
173 |
-
public function update_options()
|
174 |
-
{
|
175 |
-
foreach ($this->options as $option) {
|
176 |
-
woocommerce_update_options($option);
|
177 |
-
}
|
178 |
-
}
|
179 |
-
|
180 |
-
}
|
181 |
}
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
if (!class_exists('YITH_YWZM_Custom_Types')) {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* custom types fields
|
10 |
+
*
|
11 |
+
* @class YITH_YWZM_Custom_Types
|
12 |
+
* @package Yithemes
|
13 |
+
* @since 1.0.0
|
14 |
+
* @author Your Inspiration Themes
|
15 |
+
*/
|
16 |
+
class YITH_YWZM_Custom_Types
|
17 |
+
{
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Single instance of the class
|
21 |
+
*
|
22 |
+
* @since 1.0.0
|
23 |
+
*/
|
24 |
+
protected static $instance;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Returns single instance of the class
|
28 |
+
*
|
29 |
+
* @since 1.0.0
|
30 |
+
*/
|
31 |
+
public static function get_instance()
|
32 |
+
{
|
33 |
+
if (is_null(self::$instance)) {
|
34 |
+
self::$instance = new self();
|
35 |
+
}
|
36 |
+
|
37 |
+
return self::$instance;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function __construct()
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Register actions and filters for custom types used on the current plugin
|
44 |
+
*/
|
45 |
+
|
46 |
+
/** Custom types : slider */
|
47 |
+
add_action('woocommerce_admin_field_slider', array($this, 'admin_fields_slider'));
|
48 |
+
|
49 |
+
add_action('woocommerce_admin_field_yith_ywzm_image_width', array(
|
50 |
+
$this,
|
51 |
+
'admin_fields_yith_ywzm_image_width'
|
52 |
+
));
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Create new Woocommerce admin field: slider
|
57 |
+
*
|
58 |
+
* @access public
|
59 |
+
*
|
60 |
+
* @param array $value
|
61 |
+
*
|
62 |
+
* @return void
|
63 |
+
* @since 1.0.0
|
64 |
+
*/
|
65 |
+
public function admin_fields_slider($value)
|
66 |
+
{
|
67 |
+
$slider_value = (get_option($value['id']) !== false && get_option($value['id']) !== null) ?
|
68 |
+
esc_attr(stripslashes(get_option($value['id']))) :
|
69 |
+
esc_attr($value['std']);
|
70 |
+
|
71 |
+
?>
|
72 |
+
<tr valign="top">
|
73 |
+
<th scope="row" class="titledesc">
|
74 |
+
<label for="<?php echo esc_attr($value['id']); ?>"><?php echo $value['name']; ?></label>
|
75 |
+
</th>
|
76 |
+
<td class="forminp">
|
77 |
+
<div id="<?php echo esc_attr($value['id']); ?>_slider" class="yith_woocommerce_slider"
|
78 |
+
style="width: 300px; float: left;"></div>
|
79 |
+
<div id="<?php echo esc_attr($value['id']); ?>_value"
|
80 |
+
class="yith_woocommerce_slider_value ui-state-default ui-corner-all"><?php echo $slider_value ?></div>
|
81 |
+
<input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>"
|
82 |
+
type="hidden" value="<?php echo $slider_value ?>"/> <?php echo $value['desc']; ?>
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
|
86 |
+
|
87 |
+
<script>
|
88 |
+
jQuery(document).ready(function ($) {
|
89 |
+
$('#<?php echo esc_attr( $value['id'] ); ?>_slider').slider({
|
90 |
+
min: <?php echo $value['min'] ?>,
|
91 |
+
max: <?php echo $value['max'] ?>,
|
92 |
+
step: <?php echo $value['step'] ?>,
|
93 |
+
value: <?php echo $slider_value ?>,
|
94 |
+
slide: function (event, ui) {
|
95 |
+
$("#<?php echo esc_attr( $value['id'] ); ?>").val(ui.value);
|
96 |
+
$("#<?php echo esc_attr( $value['id'] ); ?>_value").text(ui.value);
|
97 |
+
}
|
98 |
+
});
|
99 |
+
});
|
100 |
+
</script>
|
101 |
+
|
102 |
+
<?php
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Save the admin field: slider
|
107 |
+
*
|
108 |
+
* @access public
|
109 |
+
*
|
110 |
+
* @param mixed $value
|
111 |
+
*
|
112 |
+
* @return void
|
113 |
+
* @since 1.0.0
|
114 |
+
*/
|
115 |
+
public function admin_update_option($value)
|
116 |
+
{
|
117 |
+
global $woocommerce;
|
118 |
+
|
119 |
+
if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '<')) {
|
120 |
+
$wc_clean = 'woocommerce_clean';
|
121 |
+
} else {
|
122 |
+
$wc_clean = 'wc_clean';
|
123 |
+
}
|
124 |
+
|
125 |
+
update_option($value['id'], $wc_clean($_POST[$value['id']]));
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Create new Woocommerce admin field: yith_ywzm_image_width
|
131 |
+
*
|
132 |
+
* @access public
|
133 |
+
* @param array $value
|
134 |
+
* @return void
|
135 |
+
* @since 1.1.3
|
136 |
+
*/
|
137 |
+
public function admin_fields_yith_ywzm_image_width($value)
|
138 |
+
{
|
139 |
+
|
140 |
+
$width = WC_Admin_Settings::get_option($value['id'] . '[width]', $value['default']['width']);
|
141 |
+
$height = WC_Admin_Settings::get_option($value['id'] . '[height]', $value['default']['height']);
|
142 |
+
$crop = WC_Admin_Settings::get_option($value['id'] . '[crop]');
|
143 |
+
$crop = ($crop == 'on' || $crop == '1') ? 1 : 0;
|
144 |
+
$crop = checked(1, $crop, false);
|
145 |
+
|
146 |
+
?>
|
147 |
+
<tr valign="top">
|
148 |
+
<th scope="row" class="titledesc"><?php echo esc_html($value['title']) ?></th>
|
149 |
+
<td class="forminp image_width_settings">
|
150 |
+
<input name="<?php echo esc_attr($value['id']); ?>[width]"
|
151 |
+
id="<?php echo esc_attr($value['id']); ?>-width" type="text" size="3"
|
152 |
+
value="<?php echo $width; ?>"/> × <input
|
153 |
+
name="<?php echo esc_attr($value['id']); ?>[height]"
|
154 |
+
id="<?php echo esc_attr($value['id']); ?>-height" type="text" size="3"
|
155 |
+
value="<?php echo $height; ?>"/>px <span class="description"><?php echo $value['desc'] ?></span>
|
156 |
+
<br>
|
157 |
+
<label><input name="<?php echo esc_attr($value['id']); ?>[crop]"
|
158 |
+
id="<?php echo esc_attr($value['id']); ?>-crop"
|
159 |
+
type="checkbox" <?php echo $crop; ?> /> <?php _e('Do you want to hard crop the image?', 'woocommerce'); ?>
|
160 |
+
</label>
|
161 |
+
|
162 |
+
</td>
|
163 |
+
</tr><?php
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Update plugin options.
|
169 |
+
*
|
170 |
+
* @return void
|
171 |
+
* @since 1.0.0
|
172 |
+
*/
|
173 |
+
public function update_options()
|
174 |
+
{
|
175 |
+
foreach ($this->options as $option) {
|
176 |
+
woocommerce_update_options($option);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
}
|
lib/class.yith-ywzm-plugin-fw-loader.php
CHANGED
@@ -1,253 +1,253 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit; // Exit if accessed directly
|
4 |
-
}
|
5 |
-
|
6 |
-
if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Implements features related to an invoice document
|
10 |
-
*
|
11 |
-
* @class YITH_YWZM_Plugin_FW_Loader
|
12 |
-
* @package Yithemes
|
13 |
-
* @since 1.0.0
|
14 |
-
* @author Lorenzo Giuffrida
|
15 |
-
*/
|
16 |
-
class YITH_YWZM_Plugin_FW_Loader {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @var $_panel Panel Object
|
20 |
-
*/
|
21 |
-
protected $_panel;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var $_premium string Premium tab template file name
|
25 |
-
*/
|
26 |
-
protected $_premium = 'premium.php';
|
27 |
-
|
28 |
-
/**
|
29 |
-
* @var string Premium version landing link
|
30 |
-
*/
|
31 |
-
protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
|
32 |
-
|
33 |
-
/**
|
34 |
-
* @var string Plugin official documentation
|
35 |
-
*/
|
36 |
-
protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
|
37 |
-
|
38 |
-
/**
|
39 |
-
* @var string Plugin panel page
|
40 |
-
*/
|
41 |
-
protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Single instance of the class
|
45 |
-
*
|
46 |
-
* @since 1.0.0
|
47 |
-
*/
|
48 |
-
protected static $instance;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Returns single instance of the class
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
*/
|
55 |
-
public static function get_instance() {
|
56 |
-
if ( is_null( self::$instance ) ) {
|
57 |
-
self::$instance = new self();
|
58 |
-
}
|
59 |
-
|
60 |
-
return self::$instance;
|
61 |
-
}
|
62 |
-
|
63 |
-
public function __construct() {
|
64 |
-
/**
|
65 |
-
* Register actions and filters to be used for creating an entry on YIT Plugin menu
|
66 |
-
*/
|
67 |
-
add_action( 'admin_init', array( $this, 'register_pointer' ) );
|
68 |
-
|
69 |
-
add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
|
70 |
-
|
71 |
-
// Add stylesheets and scripts files
|
72 |
-
add_action( 'admin_menu', array( $this, 'register_panel' ), 5 );
|
73 |
-
|
74 |
-
if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
|
75 |
-
// Show plugin premium tab
|
76 |
-
add_action( 'yith_zoom_magnifier_premium', array( $this, 'premium_tab' ) );
|
77 |
-
} else {
|
78 |
-
|
79 |
-
/**
|
80 |
-
* register plugin to licence/update system
|
81 |
-
*/
|
82 |
-
$this->licence_activation();
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Load YIT core plugin
|
89 |
-
*
|
90 |
-
* @since 1.0
|
91 |
-
* @access public
|
92 |
-
* @return void
|
93 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
94 |
-
*/
|
95 |
-
public function plugin_fw_loader() {
|
96 |
-
if ( !defined( 'YIT_CORE_PLUGIN' ) ) {
|
97 |
-
global $plugin_fw_data;
|
98 |
-
if ( !empty( $plugin_fw_data ) ) {
|
99 |
-
$plugin_fw_file = array_shift( $plugin_fw_data );
|
100 |
-
require_once( $plugin_fw_file );
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Add a panel under YITH Plugins tab
|
107 |
-
*
|
108 |
-
* @return void
|
109 |
-
* @since 1.0
|
110 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
111 |
-
* @use /Yit_Plugin_Panel class
|
112 |
-
* @see plugin-fw/lib/yit-plugin-panel.php
|
113 |
-
*/
|
114 |
-
public function register_panel() {
|
115 |
-
|
116 |
-
if ( ! empty( $this->_panel ) ) {
|
117 |
-
return;
|
118 |
-
}
|
119 |
-
|
120 |
-
$admin_tabs['general'] = esc_html__( 'General', 'yith-woocommerce-zoom-magnifier' );
|
121 |
-
|
122 |
-
if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
|
123 |
-
$admin_tabs['premium'] = esc_html__( 'Premium Version', 'yith-woocommerce-zoom-magnifier' );
|
124 |
-
} else {
|
125 |
-
$admin_tabs['exclusions'] = esc_html__( 'Product exclusion list', 'yith-woocommerce-zoom-magnifier' );
|
126 |
-
}
|
127 |
-
|
128 |
-
$args = array(
|
129 |
-
'create_menu_page' => true,
|
130 |
-
'parent_slug' => '',
|
131 |
-
'plugin_slug' => YITH_YWZM_SLUG,
|
132 |
-
'page_title' => 'Zoom magnifier',
|
133 |
-
'menu_title' => 'Zoom magnifier',
|
134 |
-
'capability' => 'manage_options',
|
135 |
-
'parent' => '',
|
136 |
-
'parent_page' => 'yit_plugin_panel',
|
137 |
-
'page' => $this->_panel_page,
|
138 |
-
'admin-tabs' => $admin_tabs,
|
139 |
-
'options-path' => YITH_YWZM_DIR . '/plugin-options',
|
140 |
-
'class' => yith_set_wrapper_class(),
|
141 |
-
|
142 |
-
);
|
143 |
-
|
144 |
-
/* === Fixed: not updated theme === */
|
145 |
-
if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
146 |
-
|
147 |
-
require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
|
148 |
-
}
|
149 |
-
|
150 |
-
$this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
|
151 |
-
|
152 |
-
/** Add custom types actions and filters */
|
153 |
-
YITH_YWZM_Custom_Types::get_instance();
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Premium Tab Template
|
158 |
-
*
|
159 |
-
* Load the premium tab template on admin page
|
160 |
-
*
|
161 |
-
* @return void
|
162 |
-
* @since 1.0
|
163 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
164 |
-
* @return void
|
165 |
-
*/
|
166 |
-
public function premium_tab() {
|
167 |
-
$premium_tab_template = YITH_YWZM_TEMPLATE_DIR . '/admin/' . $this->_premium;
|
168 |
-
if ( file_exists( $premium_tab_template ) ) {
|
169 |
-
include_once( $premium_tab_template );
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
public function register_pointer() {
|
174 |
-
if ( ! class_exists( 'YIT_Pointers' ) ) {
|
175 |
-
include_once( 'plugin-fw/lib/yit-pointers.php' );
|
176 |
-
}
|
177 |
-
|
178 |
-
$premium_message = defined( 'YITH_YWZM_PREMIUM' )
|
179 |
-
? ''
|
180 |
-
: esc_html__( 'YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM version with many new options, discover it now.', 'yith-woocommerce-zoom-magnifier' ) .
|
181 |
-
' <a href="' . $this->_premium_landing . '">' . esc_html__( 'Premium version', 'yith-woocommerce-zoom-magnifier' ) . '</a>';
|
182 |
-
|
183 |
-
$args[] = array(
|
184 |
-
'screen_id' => 'plugins',
|
185 |
-
'pointer_id' => 'yith_woocommerce_zoom-magnifier',
|
186 |
-
'target' => '#toplevel_page_yit_plugin_panel',
|
187 |
-
'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
|
188 |
-
esc_html__( 'YITH WooCommerce Zoom Magnifier', 'yith-woocommerce-zoom-magnifier' ),
|
189 |
-
esc_html__( 'In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options.<br> From this menu you can access all settings of the YITH plugins activated.', 'yith-woocommerce-zoom-magnifier' ) . '<br>' . $premium_message
|
190 |
-
),
|
191 |
-
'position' => array( 'edge' => 'left', 'align' => 'center' ),
|
192 |
-
'init' => defined( 'YITH_YWZM_PREMIUM' ) ? YITH_YWZM_INIT : YITH_YWZM_FREE_INIT
|
193 |
-
);
|
194 |
-
|
195 |
-
YIT_Pointers()->register( $args );
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Get the premium landing uri
|
200 |
-
*
|
201 |
-
* @since 1.0.0
|
202 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
203 |
-
* @return string The premium landing link
|
204 |
-
*/
|
205 |
-
public function get_premium_landing_uri() {
|
206 |
-
return $this->_premium_landing ;
|
207 |
-
}
|
208 |
-
|
209 |
-
//region **** licence related methods ****
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Add actions to manage licence activation and updates
|
213 |
-
*/
|
214 |
-
public function licence_activation() {
|
215 |
-
if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
|
216 |
-
return;
|
217 |
-
}
|
218 |
-
|
219 |
-
add_action( 'wp_loaded', array( $this, 'register_plugin_for_activation' ), 99 );
|
220 |
-
add_action( 'admin_init', array( $this, 'register_plugin_for_updates' ) );
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Register plugins for activation tab
|
225 |
-
*
|
226 |
-
* @return void
|
227 |
-
* @since 2.0.0
|
228 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
229 |
-
*/
|
230 |
-
public function register_plugin_for_activation() {
|
231 |
-
if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
|
232 |
-
require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-licence.php';
|
233 |
-
require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-plugin-licence.php';
|
234 |
-
}
|
235 |
-
YIT_Plugin_Licence()->register( YITH_YWZM_INIT, YITH_YWZM_SECRET_KEY, YITH_YWZM_SLUG );
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Register plugins for update tab
|
240 |
-
*
|
241 |
-
* @return void
|
242 |
-
* @since 2.0.0
|
243 |
-
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
244 |
-
*/
|
245 |
-
public function register_plugin_for_updates() {
|
246 |
-
if ( ! class_exists( 'YIT_Upgrade' ) ) {
|
247 |
-
require_once 'plugin-fw/lib/yit-upgrade.php';
|
248 |
-
}
|
249 |
-
YIT_Upgrade()->register( YITH_YWZM_SLUG, YITH_YWZM_INIT );
|
250 |
-
}
|
251 |
-
//endregion
|
252 |
-
}
|
253 |
-
}
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
if ( ! class_exists( 'YITH_YWZM_Plugin_FW_Loader' ) ) {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Implements features related to an invoice document
|
10 |
+
*
|
11 |
+
* @class YITH_YWZM_Plugin_FW_Loader
|
12 |
+
* @package Yithemes
|
13 |
+
* @since 1.0.0
|
14 |
+
* @author Lorenzo Giuffrida
|
15 |
+
*/
|
16 |
+
class YITH_YWZM_Plugin_FW_Loader {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var $_panel Panel Object
|
20 |
+
*/
|
21 |
+
protected $_panel;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @var $_premium string Premium tab template file name
|
25 |
+
*/
|
26 |
+
protected $_premium = 'premium.php';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @var string Premium version landing link
|
30 |
+
*/
|
31 |
+
protected $_premium_landing = 'http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @var string Plugin official documentation
|
35 |
+
*/
|
36 |
+
protected $_official_documentation = 'https://docs.yithemes.com/yith-woocommerce-zoom-magnifier/';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @var string Plugin panel page
|
40 |
+
*/
|
41 |
+
protected $_panel_page = 'yith_woocommerce_zoom-magnifier_panel';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Single instance of the class
|
45 |
+
*
|
46 |
+
* @since 1.0.0
|
47 |
+
*/
|
48 |
+
protected static $instance;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Returns single instance of the class
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*/
|
55 |
+
public static function get_instance() {
|
56 |
+
if ( is_null( self::$instance ) ) {
|
57 |
+
self::$instance = new self();
|
58 |
+
}
|
59 |
+
|
60 |
+
return self::$instance;
|
61 |
+
}
|
62 |
+
|
63 |
+
public function __construct() {
|
64 |
+
/**
|
65 |
+
* Register actions and filters to be used for creating an entry on YIT Plugin menu
|
66 |
+
*/
|
67 |
+
add_action( 'admin_init', array( $this, 'register_pointer' ) );
|
68 |
+
|
69 |
+
add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
|
70 |
+
|
71 |
+
// Add stylesheets and scripts files
|
72 |
+
add_action( 'admin_menu', array( $this, 'register_panel' ), 5 );
|
73 |
+
|
74 |
+
if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
|
75 |
+
// Show plugin premium tab
|
76 |
+
add_action( 'yith_zoom_magnifier_premium', array( $this, 'premium_tab' ) );
|
77 |
+
} else {
|
78 |
+
|
79 |
+
/**
|
80 |
+
* register plugin to licence/update system
|
81 |
+
*/
|
82 |
+
$this->licence_activation();
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Load YIT core plugin
|
89 |
+
*
|
90 |
+
* @since 1.0
|
91 |
+
* @access public
|
92 |
+
* @return void
|
93 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
94 |
+
*/
|
95 |
+
public function plugin_fw_loader() {
|
96 |
+
if ( !defined( 'YIT_CORE_PLUGIN' ) ) {
|
97 |
+
global $plugin_fw_data;
|
98 |
+
if ( !empty( $plugin_fw_data ) ) {
|
99 |
+
$plugin_fw_file = array_shift( $plugin_fw_data );
|
100 |
+
require_once( $plugin_fw_file );
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Add a panel under YITH Plugins tab
|
107 |
+
*
|
108 |
+
* @return void
|
109 |
+
* @since 1.0
|
110 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
111 |
+
* @use /Yit_Plugin_Panel class
|
112 |
+
* @see plugin-fw/lib/yit-plugin-panel.php
|
113 |
+
*/
|
114 |
+
public function register_panel() {
|
115 |
+
|
116 |
+
if ( ! empty( $this->_panel ) ) {
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
|
120 |
+
$admin_tabs['general'] = esc_html__( 'General', 'yith-woocommerce-zoom-magnifier' );
|
121 |
+
|
122 |
+
if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
|
123 |
+
$admin_tabs['premium'] = esc_html__( 'Premium Version', 'yith-woocommerce-zoom-magnifier' );
|
124 |
+
} else {
|
125 |
+
$admin_tabs['exclusions'] = esc_html__( 'Product exclusion list', 'yith-woocommerce-zoom-magnifier' );
|
126 |
+
}
|
127 |
+
|
128 |
+
$args = array(
|
129 |
+
'create_menu_page' => true,
|
130 |
+
'parent_slug' => '',
|
131 |
+
'plugin_slug' => YITH_YWZM_SLUG,
|
132 |
+
'page_title' => 'Zoom magnifier',
|
133 |
+
'menu_title' => 'Zoom magnifier',
|
134 |
+
'capability' => 'manage_options',
|
135 |
+
'parent' => '',
|
136 |
+
'parent_page' => 'yit_plugin_panel',
|
137 |
+
'page' => $this->_panel_page,
|
138 |
+
'admin-tabs' => $admin_tabs,
|
139 |
+
'options-path' => YITH_YWZM_DIR . '/plugin-options',
|
140 |
+
'class' => yith_set_wrapper_class(),
|
141 |
+
|
142 |
+
);
|
143 |
+
|
144 |
+
/* === Fixed: not updated theme === */
|
145 |
+
if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
146 |
+
|
147 |
+
require_once( 'plugin-fw/lib/yit-plugin-panel-wc.php' );
|
148 |
+
}
|
149 |
+
|
150 |
+
$this->_panel = new YIT_Plugin_Panel_WooCommerce( $args );
|
151 |
+
|
152 |
+
/** Add custom types actions and filters */
|
153 |
+
YITH_YWZM_Custom_Types::get_instance();
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Premium Tab Template
|
158 |
+
*
|
159 |
+
* Load the premium tab template on admin page
|
160 |
+
*
|
161 |
+
* @return void
|
162 |
+
* @since 1.0
|
163 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
164 |
+
* @return void
|
165 |
+
*/
|
166 |
+
public function premium_tab() {
|
167 |
+
$premium_tab_template = YITH_YWZM_TEMPLATE_DIR . '/admin/' . $this->_premium;
|
168 |
+
if ( file_exists( $premium_tab_template ) ) {
|
169 |
+
include_once( $premium_tab_template );
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
public function register_pointer() {
|
174 |
+
if ( ! class_exists( 'YIT_Pointers' ) ) {
|
175 |
+
include_once( 'plugin-fw/lib/yit-pointers.php' );
|
176 |
+
}
|
177 |
+
|
178 |
+
$premium_message = defined( 'YITH_YWZM_PREMIUM' )
|
179 |
+
? ''
|
180 |
+
: esc_html__( 'YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM version with many new options, discover it now.', 'yith-woocommerce-zoom-magnifier' ) .
|
181 |
+
' <a href="' . $this->_premium_landing . '">' . esc_html__( 'Premium version', 'yith-woocommerce-zoom-magnifier' ) . '</a>';
|
182 |
+
|
183 |
+
$args[] = array(
|
184 |
+
'screen_id' => 'plugins',
|
185 |
+
'pointer_id' => 'yith_woocommerce_zoom-magnifier',
|
186 |
+
'target' => '#toplevel_page_yit_plugin_panel',
|
187 |
+
'content' => sprintf( '<h3> %s </h3> <p> %s </p>',
|
188 |
+
esc_html__( 'YITH WooCommerce Zoom Magnifier', 'yith-woocommerce-zoom-magnifier' ),
|
189 |
+
esc_html__( 'In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options.<br> From this menu you can access all settings of the YITH plugins activated.', 'yith-woocommerce-zoom-magnifier' ) . '<br>' . $premium_message
|
190 |
+
),
|
191 |
+
'position' => array( 'edge' => 'left', 'align' => 'center' ),
|
192 |
+
'init' => defined( 'YITH_YWZM_PREMIUM' ) ? YITH_YWZM_INIT : YITH_YWZM_FREE_INIT
|
193 |
+
);
|
194 |
+
|
195 |
+
YIT_Pointers()->register( $args );
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Get the premium landing uri
|
200 |
+
*
|
201 |
+
* @since 1.0.0
|
202 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
203 |
+
* @return string The premium landing link
|
204 |
+
*/
|
205 |
+
public function get_premium_landing_uri() {
|
206 |
+
return $this->_premium_landing ;
|
207 |
+
}
|
208 |
+
|
209 |
+
//region **** licence related methods ****
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Add actions to manage licence activation and updates
|
213 |
+
*/
|
214 |
+
public function licence_activation() {
|
215 |
+
if ( ! defined( 'YITH_YWZM_PREMIUM' ) ) {
|
216 |
+
return;
|
217 |
+
}
|
218 |
+
|
219 |
+
add_action( 'wp_loaded', array( $this, 'register_plugin_for_activation' ), 99 );
|
220 |
+
add_action( 'admin_init', array( $this, 'register_plugin_for_updates' ) );
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Register plugins for activation tab
|
225 |
+
*
|
226 |
+
* @return void
|
227 |
+
* @since 2.0.0
|
228 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
229 |
+
*/
|
230 |
+
public function register_plugin_for_activation() {
|
231 |
+
if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
|
232 |
+
require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-licence.php';
|
233 |
+
require_once YITH_YWZM_DIR . '/plugin-fw/licence/lib/yit-plugin-licence.php';
|
234 |
+
}
|
235 |
+
YIT_Plugin_Licence()->register( YITH_YWZM_INIT, YITH_YWZM_SECRET_KEY, YITH_YWZM_SLUG );
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Register plugins for update tab
|
240 |
+
*
|
241 |
+
* @return void
|
242 |
+
* @since 2.0.0
|
243 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
244 |
+
*/
|
245 |
+
public function register_plugin_for_updates() {
|
246 |
+
if ( ! class_exists( 'YIT_Upgrade' ) ) {
|
247 |
+
require_once 'plugin-fw/lib/yit-upgrade.php';
|
248 |
+
}
|
249 |
+
YIT_Upgrade()->register( YITH_YWZM_SLUG, YITH_YWZM_INIT );
|
250 |
+
}
|
251 |
+
//endregion
|
252 |
+
}
|
253 |
+
}
|
plugin-fw/LICENSE.txt
CHANGED
@@ -1,696 +1,696 @@
|
|
1 |
-
YITH Plugin Framework
|
2 |
-
|
3 |
-
Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
4 |
-
|
5 |
-
This program is free software; you can redistribute it and/or modify
|
6 |
-
it under the terms of the GNU General Public License as published by
|
7 |
-
the Free Software Foundation; either version 3 of the License, or
|
8 |
-
(at your option) any later version.
|
9 |
-
|
10 |
-
This program is distributed in the hope that it will be useful,
|
11 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
-
GNU General Public License for more details.
|
14 |
-
|
15 |
-
You should have received a copy of the GNU General Public License
|
16 |
-
along with this program; if not, write to the Free Software
|
17 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
18 |
-
|
19 |
-
YITH Plugin Framework is released under the GPL
|
20 |
-
|
21 |
-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
22 |
-
|
23 |
-
GNU GENERAL PUBLIC LICENSE
|
24 |
-
Version 3, 29 June 2007
|
25 |
-
|
26 |
-
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
27 |
-
Everyone is permitted to copy and distribute verbatim copies
|
28 |
-
of this license document, but changing it is not allowed.
|
29 |
-
|
30 |
-
Preamble
|
31 |
-
|
32 |
-
The GNU General Public License is a free, copyleft license for
|
33 |
-
software and other kinds of works.
|
34 |
-
|
35 |
-
The licenses for most software and other practical works are designed
|
36 |
-
to take away your freedom to share and change the works. By contrast,
|
37 |
-
the GNU General Public License is intended to guarantee your freedom to
|
38 |
-
share and change all versions of a program--to make sure it remains free
|
39 |
-
software for all its users. We, the Free Software Foundation, use the
|
40 |
-
GNU General Public License for most of our software; it applies also to
|
41 |
-
any other work released this way by its authors. You can apply it to
|
42 |
-
your programs, too.
|
43 |
-
|
44 |
-
When we speak of free software, we are referring to freedom, not
|
45 |
-
price. Our General Public Licenses are designed to make sure that you
|
46 |
-
have the freedom to distribute copies of free software (and charge for
|
47 |
-
them if you wish), that you receive source code or can get it if you
|
48 |
-
want it, that you can change the software or use pieces of it in new
|
49 |
-
free programs, and that you know you can do these things.
|
50 |
-
|
51 |
-
To protect your rights, we need to prevent others from denying you
|
52 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
53 |
-
certain responsibilities if you distribute copies of the software, or if
|
54 |
-
you modify it: responsibilities to respect the freedom of others.
|
55 |
-
|
56 |
-
For example, if you distribute copies of such a program, whether
|
57 |
-
gratis or for a fee, you must pass on to the recipients the same
|
58 |
-
freedoms that you received. You must make sure that they, too, receive
|
59 |
-
or can get the source code. And you must show them these terms so they
|
60 |
-
know their rights.
|
61 |
-
|
62 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
63 |
-
(1) assert copyright on the software, and (2) offer you this License
|
64 |
-
giving you legal permission to copy, distribute and/or modify it.
|
65 |
-
|
66 |
-
For the developers' and authors' protection, the GPL clearly explains
|
67 |
-
that there is no warranty for this free software. For both users' and
|
68 |
-
authors' sake, the GPL requires that modified versions be marked as
|
69 |
-
changed, so that their problems will not be attributed erroneously to
|
70 |
-
authors of previous versions.
|
71 |
-
|
72 |
-
Some devices are designed to deny users access to install or run
|
73 |
-
modified versions of the software inside them, although the manufacturer
|
74 |
-
can do so. This is fundamentally incompatible with the aim of
|
75 |
-
protecting users' freedom to change the software. The systematic
|
76 |
-
pattern of such abuse occurs in the area of products for individuals to
|
77 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
78 |
-
have designed this version of the GPL to prohibit the practice for those
|
79 |
-
products. If such problems arise substantially in other domains, we
|
80 |
-
stand ready to extend this provision to those domains in future versions
|
81 |
-
of the GPL, as needed to protect the freedom of users.
|
82 |
-
|
83 |
-
Finally, every program is threatened constantly by software patents.
|
84 |
-
States should not allow patents to restrict development and use of
|
85 |
-
software on general-purpose computers, but in those that do, we wish to
|
86 |
-
avoid the special danger that patents applied to a free program could
|
87 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
88 |
-
patents cannot be used to render the program non-free.
|
89 |
-
|
90 |
-
The precise terms and conditions for copying, distribution and
|
91 |
-
modification follow.
|
92 |
-
|
93 |
-
TERMS AND CONDITIONS
|
94 |
-
|
95 |
-
0. Definitions.
|
96 |
-
|
97 |
-
"This License" refers to version 3 of the GNU General Public License.
|
98 |
-
|
99 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
100 |
-
works, such as semiconductor masks.
|
101 |
-
|
102 |
-
"The Program" refers to any copyrightable work licensed under this
|
103 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
104 |
-
"recipients" may be individuals or organizations.
|
105 |
-
|
106 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
107 |
-
in a fashion requiring copyright permission, other than the making of an
|
108 |
-
exact copy. The resulting work is called a "modified version" of the
|
109 |
-
earlier work or a work "based on" the earlier work.
|
110 |
-
|
111 |
-
A "covered work" means either the unmodified Program or a work based
|
112 |
-
on the Program.
|
113 |
-
|
114 |
-
To "propagate" a work means to do anything with it that, without
|
115 |
-
permission, would make you directly or secondarily liable for
|
116 |
-
infringement under applicable copyright law, except executing it on a
|
117 |
-
computer or modifying a private copy. Propagation includes copying,
|
118 |
-
distribution (with or without modification), making available to the
|
119 |
-
public, and in some countries other activities as well.
|
120 |
-
|
121 |
-
To "convey" a work means any kind of propagation that enables other
|
122 |
-
parties to make or receive copies. Mere interaction with a user through
|
123 |
-
a computer network, with no transfer of a copy, is not conveying.
|
124 |
-
|
125 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
126 |
-
to the extent that it includes a convenient and prominently visible
|
127 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
128 |
-
tells the user that there is no warranty for the work (except to the
|
129 |
-
extent that warranties are provided), that licensees may convey the
|
130 |
-
work under this License, and how to view a copy of this License. If
|
131 |
-
the interface presents a list of user commands or options, such as a
|
132 |
-
menu, a prominent item in the list meets this criterion.
|
133 |
-
|
134 |
-
1. Source Code.
|
135 |
-
|
136 |
-
The "source code" for a work means the preferred form of the work
|
137 |
-
for making modifications to it. "Object code" means any non-source
|
138 |
-
form of a work.
|
139 |
-
|
140 |
-
A "Standard Interface" means an interface that either is an official
|
141 |
-
standard defined by a recognized standards body, or, in the case of
|
142 |
-
interfaces specified for a particular programming language, one that
|
143 |
-
is widely used among developers working in that language.
|
144 |
-
|
145 |
-
The "System Libraries" of an executable work include anything, other
|
146 |
-
than the work as a whole, that (a) is included in the normal form of
|
147 |
-
packaging a Major Component, but which is not part of that Major
|
148 |
-
Component, and (b) serves only to enable use of the work with that
|
149 |
-
Major Component, or to implement a Standard Interface for which an
|
150 |
-
implementation is available to the public in source code form. A
|
151 |
-
"Major Component", in this context, means a major essential component
|
152 |
-
(kernel, window system, and so on) of the specific operating system
|
153 |
-
(if any) on which the executable work runs, or a compiler used to
|
154 |
-
produce the work, or an object code interpreter used to run it.
|
155 |
-
|
156 |
-
The "Corresponding Source" for a work in object code form means all
|
157 |
-
the source code needed to generate, install, and (for an executable
|
158 |
-
work) run the object code and to modify the work, including scripts to
|
159 |
-
control those activities. However, it does not include the work's
|
160 |
-
System Libraries, or general-purpose tools or generally available free
|
161 |
-
programs which are used unmodified in performing those activities but
|
162 |
-
which are not part of the work. For example, Corresponding Source
|
163 |
-
includes interface definition files associated with source files for
|
164 |
-
the work, and the source code for shared libraries and dynamically
|
165 |
-
linked subprograms that the work is specifically designed to require,
|
166 |
-
such as by intimate data communication or control flow between those
|
167 |
-
subprograms and other parts of the work.
|
168 |
-
|
169 |
-
The Corresponding Source need not include anything that users
|
170 |
-
can regenerate automatically from other parts of the Corresponding
|
171 |
-
Source.
|
172 |
-
|
173 |
-
The Corresponding Source for a work in source code form is that
|
174 |
-
same work.
|
175 |
-
|
176 |
-
2. Basic Permissions.
|
177 |
-
|
178 |
-
All rights granted under this License are granted for the term of
|
179 |
-
copyright on the Program, and are irrevocable provided the stated
|
180 |
-
conditions are met. This License explicitly affirms your unlimited
|
181 |
-
permission to run the unmodified Program. The output from running a
|
182 |
-
covered work is covered by this License only if the output, given its
|
183 |
-
content, constitutes a covered work. This License acknowledges your
|
184 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
185 |
-
|
186 |
-
You may make, run and propagate covered works that you do not
|
187 |
-
convey, without conditions so long as your license otherwise remains
|
188 |
-
in force. You may convey covered works to others for the sole purpose
|
189 |
-
of having them make modifications exclusively for you, or provide you
|
190 |
-
with facilities for running those works, provided that you comply with
|
191 |
-
the terms of this License in conveying all material for which you do
|
192 |
-
not control copyright. Those thus making or running the covered works
|
193 |
-
for you must do so exclusively on your behalf, under your direction
|
194 |
-
and control, on terms that prohibit them from making any copies of
|
195 |
-
your copyrighted material outside their relationship with you.
|
196 |
-
|
197 |
-
Conveying under any other circumstances is permitted solely under
|
198 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
199 |
-
makes it unnecessary.
|
200 |
-
|
201 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
202 |
-
|
203 |
-
No covered work shall be deemed part of an effective technological
|
204 |
-
measure under any applicable law fulfilling obligations under article
|
205 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
206 |
-
similar laws prohibiting or restricting circumvention of such
|
207 |
-
measures.
|
208 |
-
|
209 |
-
When you convey a covered work, you waive any legal power to forbid
|
210 |
-
circumvention of technological measures to the extent such circumvention
|
211 |
-
is effected by exercising rights under this License with respect to
|
212 |
-
the covered work, and you disclaim any intention to limit operation or
|
213 |
-
modification of the work as a means of enforcing, against the work's
|
214 |
-
users, your or third parties' legal rights to forbid circumvention of
|
215 |
-
technological measures.
|
216 |
-
|
217 |
-
4. Conveying Verbatim Copies.
|
218 |
-
|
219 |
-
You may convey verbatim copies of the Program's source code as you
|
220 |
-
receive it, in any medium, provided that you conspicuously and
|
221 |
-
appropriately publish on each copy an appropriate copyright notice;
|
222 |
-
keep intact all notices stating that this License and any
|
223 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
224 |
-
keep intact all notices of the absence of any warranty; and give all
|
225 |
-
recipients a copy of this License along with the Program.
|
226 |
-
|
227 |
-
You may charge any price or no price for each copy that you convey,
|
228 |
-
and you may offer support or warranty protection for a fee.
|
229 |
-
|
230 |
-
5. Conveying Modified Source Versions.
|
231 |
-
|
232 |
-
You may convey a work based on the Program, or the modifications to
|
233 |
-
produce it from the Program, in the form of source code under the
|
234 |
-
terms of section 4, provided that you also meet all of these conditions:
|
235 |
-
|
236 |
-
a) The work must carry prominent notices stating that you modified
|
237 |
-
it, and giving a relevant date.
|
238 |
-
|
239 |
-
b) The work must carry prominent notices stating that it is
|
240 |
-
released under this License and any conditions added under section
|
241 |
-
7. This requirement modifies the requirement in section 4 to
|
242 |
-
"keep intact all notices".
|
243 |
-
|
244 |
-
c) You must license the entire work, as a whole, under this
|
245 |
-
License to anyone who comes into possession of a copy. This
|
246 |
-
License will therefore apply, along with any applicable section 7
|
247 |
-
additional terms, to the whole of the work, and all its parts,
|
248 |
-
regardless of how they are packaged. This License gives no
|
249 |
-
permission to license the work in any other way, but it does not
|
250 |
-
invalidate such permission if you have separately received it.
|
251 |
-
|
252 |
-
d) If the work has interactive user interfaces, each must display
|
253 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
254 |
-
interfaces that do not display Appropriate Legal Notices, your
|
255 |
-
work need not make them do so.
|
256 |
-
|
257 |
-
A compilation of a covered work with other separate and independent
|
258 |
-
works, which are not by their nature extensions of the covered work,
|
259 |
-
and which are not combined with it such as to form a larger program,
|
260 |
-
in or on a volume of a storage or distribution medium, is called an
|
261 |
-
"aggregate" if the compilation and its resulting copyright are not
|
262 |
-
used to limit the access or legal rights of the compilation's users
|
263 |
-
beyond what the individual works permit. Inclusion of a covered work
|
264 |
-
in an aggregate does not cause this License to apply to the other
|
265 |
-
parts of the aggregate.
|
266 |
-
|
267 |
-
6. Conveying Non-Source Forms.
|
268 |
-
|
269 |
-
You may convey a covered work in object code form under the terms
|
270 |
-
of sections 4 and 5, provided that you also convey the
|
271 |
-
machine-readable Corresponding Source under the terms of this License,
|
272 |
-
in one of these ways:
|
273 |
-
|
274 |
-
a) Convey the object code in, or embodied in, a physical product
|
275 |
-
(including a physical distribution medium), accompanied by the
|
276 |
-
Corresponding Source fixed on a durable physical medium
|
277 |
-
customarily used for software interchange.
|
278 |
-
|
279 |
-
b) Convey the object code in, or embodied in, a physical product
|
280 |
-
(including a physical distribution medium), accompanied by a
|
281 |
-
written offer, valid for at least three years and valid for as
|
282 |
-
long as you offer spare parts or customer support for that product
|
283 |
-
model, to give anyone who possesses the object code either (1) a
|
284 |
-
copy of the Corresponding Source for all the software in the
|
285 |
-
product that is covered by this License, on a durable physical
|
286 |
-
medium customarily used for software interchange, for a price no
|
287 |
-
more than your reasonable cost of physically performing this
|
288 |
-
conveying of source, or (2) access to copy the
|
289 |
-
Corresponding Source from a network server at no charge.
|
290 |
-
|
291 |
-
c) Convey individual copies of the object code with a copy of the
|
292 |
-
written offer to provide the Corresponding Source. This
|
293 |
-
alternative is allowed only occasionally and noncommercially, and
|
294 |
-
only if you received the object code with such an offer, in accord
|
295 |
-
with subsection 6b.
|
296 |
-
|
297 |
-
d) Convey the object code by offering access from a designated
|
298 |
-
place (gratis or for a charge), and offer equivalent access to the
|
299 |
-
Corresponding Source in the same way through the same place at no
|
300 |
-
further charge. You need not require recipients to copy the
|
301 |
-
Corresponding Source along with the object code. If the place to
|
302 |
-
copy the object code is a network server, the Corresponding Source
|
303 |
-
may be on a different server (operated by you or a third party)
|
304 |
-
that supports equivalent copying facilities, provided you maintain
|
305 |
-
clear directions next to the object code saying where to find the
|
306 |
-
Corresponding Source. Regardless of what server hosts the
|
307 |
-
Corresponding Source, you remain obligated to ensure that it is
|
308 |
-
available for as long as needed to satisfy these requirements.
|
309 |
-
|
310 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
311 |
-
you inform other peers where the object code and Corresponding
|
312 |
-
Source of the work are being offered to the general public at no
|
313 |
-
charge under subsection 6d.
|
314 |
-
|
315 |
-
A separable portion of the object code, whose source code is excluded
|
316 |
-
from the Corresponding Source as a System Library, need not be
|
317 |
-
included in conveying the object code work.
|
318 |
-
|
319 |
-
A "User Product" is either (1) a "consumer product", which means any
|
320 |
-
tangible personal property which is normally used for personal, family,
|
321 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
322 |
-
into a dwelling. In determining whether a product is a consumer product,
|
323 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
324 |
-
product received by a particular user, "normally used" refers to a
|
325 |
-
typical or common use of that class of product, regardless of the status
|
326 |
-
of the particular user or of the way in which the particular user
|
327 |
-
actually uses, or expects or is expected to use, the product. A product
|
328 |
-
is a consumer product regardless of whether the product has substantial
|
329 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
330 |
-
the only significant mode of use of the product.
|
331 |
-
|
332 |
-
"Installation Information" for a User Product means any methods,
|
333 |
-
procedures, authorization keys, or other information required to install
|
334 |
-
and execute modified versions of a covered work in that User Product from
|
335 |
-
a modified version of its Corresponding Source. The information must
|
336 |
-
suffice to ensure that the continued functioning of the modified object
|
337 |
-
code is in no case prevented or interfered with solely because
|
338 |
-
modification has been made.
|
339 |
-
|
340 |
-
If you convey an object code work under this section in, or with, or
|
341 |
-
specifically for use in, a User Product, and the conveying occurs as
|
342 |
-
part of a transaction in which the right of possession and use of the
|
343 |
-
User Product is transferred to the recipient in perpetuity or for a
|
344 |
-
fixed term (regardless of how the transaction is characterized), the
|
345 |
-
Corresponding Source conveyed under this section must be accompanied
|
346 |
-
by the Installation Information. But this requirement does not apply
|
347 |
-
if neither you nor any third party retains the ability to install
|
348 |
-
modified object code on the User Product (for example, the work has
|
349 |
-
been installed in ROM).
|
350 |
-
|
351 |
-
The requirement to provide Installation Information does not include a
|
352 |
-
requirement to continue to provide support service, warranty, or updates
|
353 |
-
for a work that has been modified or installed by the recipient, or for
|
354 |
-
the User Product in which it has been modified or installed. Access to a
|
355 |
-
network may be denied when the modification itself materially and
|
356 |
-
adversely affects the operation of the network or violates the rules and
|
357 |
-
protocols for communication across the network.
|
358 |
-
|
359 |
-
Corresponding Source conveyed, and Installation Information provided,
|
360 |
-
in accord with this section must be in a format that is publicly
|
361 |
-
documented (and with an implementation available to the public in
|
362 |
-
source code form), and must require no special password or key for
|
363 |
-
unpacking, reading or copying.
|
364 |
-
|
365 |
-
7. Additional Terms.
|
366 |
-
|
367 |
-
"Additional permissions" are terms that supplement the terms of this
|
368 |
-
License by making exceptions from one or more of its conditions.
|
369 |
-
Additional permissions that are applicable to the entire Program shall
|
370 |
-
be treated as though they were included in this License, to the extent
|
371 |
-
that they are valid under applicable law. If additional permissions
|
372 |
-
apply only to part of the Program, that part may be used separately
|
373 |
-
under those permissions, but the entire Program remains governed by
|
374 |
-
this License without regard to the additional permissions.
|
375 |
-
|
376 |
-
When you convey a copy of a covered work, you may at your option
|
377 |
-
remove any additional permissions from that copy, or from any part of
|
378 |
-
it. (Additional permissions may be written to require their own
|
379 |
-
removal in certain cases when you modify the work.) You may place
|
380 |
-
additional permissions on material, added by you to a covered work,
|
381 |
-
for which you have or can give appropriate copyright permission.
|
382 |
-
|
383 |
-
Notwithstanding any other provision of this License, for material you
|
384 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
385 |
-
that material) supplement the terms of this License with terms:
|
386 |
-
|
387 |
-
a) Disclaiming warranty or limiting liability differently from the
|
388 |
-
terms of sections 15 and 16 of this License; or
|
389 |
-
|
390 |
-
b) Requiring preservation of specified reasonable legal notices or
|
391 |
-
author attributions in that material or in the Appropriate Legal
|
392 |
-
Notices displayed by works containing it; or
|
393 |
-
|
394 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
395 |
-
requiring that modified versions of such material be marked in
|
396 |
-
reasonable ways as different from the original version; or
|
397 |
-
|
398 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
399 |
-
authors of the material; or
|
400 |
-
|
401 |
-
e) Declining to grant rights under trademark law for use of some
|
402 |
-
trade names, trademarks, or service marks; or
|
403 |
-
|
404 |
-
f) Requiring indemnification of licensors and authors of that
|
405 |
-
material by anyone who conveys the material (or modified versions of
|
406 |
-
it) with contractual assumptions of liability to the recipient, for
|
407 |
-
any liability that these contractual assumptions directly impose on
|
408 |
-
those licensors and authors.
|
409 |
-
|
410 |
-
All other non-permissive additional terms are considered "further
|
411 |
-
restrictions" within the meaning of section 10. If the Program as you
|
412 |
-
received it, or any part of it, contains a notice stating that it is
|
413 |
-
governed by this License along with a term that is a further
|
414 |
-
restriction, you may remove that term. If a license document contains
|
415 |
-
a further restriction but permits relicensing or conveying under this
|
416 |
-
License, you may add to a covered work material governed by the terms
|
417 |
-
of that license document, provided that the further restriction does
|
418 |
-
not survive such relicensing or conveying.
|
419 |
-
|
420 |
-
If you add terms to a covered work in accord with this section, you
|
421 |
-
must place, in the relevant source files, a statement of the
|
422 |
-
additional terms that apply to those files, or a notice indicating
|
423 |
-
where to find the applicable terms.
|
424 |
-
|
425 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
426 |
-
form of a separately written license, or stated as exceptions;
|
427 |
-
the above requirements apply either way.
|
428 |
-
|
429 |
-
8. Termination.
|
430 |
-
|
431 |
-
You may not propagate or modify a covered work except as expressly
|
432 |
-
provided under this License. Any attempt otherwise to propagate or
|
433 |
-
modify it is void, and will automatically terminate your rights under
|
434 |
-
this License (including any patent licenses granted under the third
|
435 |
-
paragraph of section 11).
|
436 |
-
|
437 |
-
However, if you cease all violation of this License, then your
|
438 |
-
license from a particular copyright holder is reinstated (a)
|
439 |
-
provisionally, unless and until the copyright holder explicitly and
|
440 |
-
finally terminates your license, and (b) permanently, if the copyright
|
441 |
-
holder fails to notify you of the violation by some reasonable means
|
442 |
-
prior to 60 days after the cessation.
|
443 |
-
|
444 |
-
Moreover, your license from a particular copyright holder is
|
445 |
-
reinstated permanently if the copyright holder notifies you of the
|
446 |
-
violation by some reasonable means, this is the first time you have
|
447 |
-
received notice of violation of this License (for any work) from that
|
448 |
-
copyright holder, and you cure the violation prior to 30 days after
|
449 |
-
your receipt of the notice.
|
450 |
-
|
451 |
-
Termination of your rights under this section does not terminate the
|
452 |
-
licenses of parties who have received copies or rights from you under
|
453 |
-
this License. If your rights have been terminated and not permanently
|
454 |
-
reinstated, you do not qualify to receive new licenses for the same
|
455 |
-
material under section 10.
|
456 |
-
|
457 |
-
9. Acceptance Not Required for Having Copies.
|
458 |
-
|
459 |
-
You are not required to accept this License in order to receive or
|
460 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
461 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
462 |
-
to receive a copy likewise does not require acceptance. However,
|
463 |
-
nothing other than this License grants you permission to propagate or
|
464 |
-
modify any covered work. These actions infringe copyright if you do
|
465 |
-
not accept this License. Therefore, by modifying or propagating a
|
466 |
-
covered work, you indicate your acceptance of this License to do so.
|
467 |
-
|
468 |
-
10. Automatic Licensing of Downstream Recipients.
|
469 |
-
|
470 |
-
Each time you convey a covered work, the recipient automatically
|
471 |
-
receives a license from the original licensors, to run, modify and
|
472 |
-
propagate that work, subject to this License. You are not responsible
|
473 |
-
for enforcing compliance by third parties with this License.
|
474 |
-
|
475 |
-
An "entity transaction" is a transaction transferring control of an
|
476 |
-
organization, or substantially all assets of one, or subdividing an
|
477 |
-
organization, or merging organizations. If propagation of a covered
|
478 |
-
work results from an entity transaction, each party to that
|
479 |
-
transaction who receives a copy of the work also receives whatever
|
480 |
-
licenses to the work the party's predecessor in interest had or could
|
481 |
-
give under the previous paragraph, plus a right to possession of the
|
482 |
-
Corresponding Source of the work from the predecessor in interest, if
|
483 |
-
the predecessor has it or can get it with reasonable efforts.
|
484 |
-
|
485 |
-
You may not impose any further restrictions on the exercise of the
|
486 |
-
rights granted or affirmed under this License. For example, you may
|
487 |
-
not impose a license fee, royalty, or other charge for exercise of
|
488 |
-
rights granted under this License, and you may not initiate litigation
|
489 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
490 |
-
any patent claim is infringed by making, using, selling, offering for
|
491 |
-
sale, or importing the Program or any portion of it.
|
492 |
-
|
493 |
-
11. Patents.
|
494 |
-
|
495 |
-
A "contributor" is a copyright holder who authorizes use under this
|
496 |
-
License of the Program or a work on which the Program is based. The
|
497 |
-
work thus licensed is called the contributor's "contributor version".
|
498 |
-
|
499 |
-
A contributor's "essential patent claims" are all patent claims
|
500 |
-
owned or controlled by the contributor, whether already acquired or
|
501 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
502 |
-
by this License, of making, using, or selling its contributor version,
|
503 |
-
but do not include claims that would be infringed only as a
|
504 |
-
consequence of further modification of the contributor version. For
|
505 |
-
purposes of this definition, "control" includes the right to grant
|
506 |
-
patent sublicenses in a manner consistent with the requirements of
|
507 |
-
this License.
|
508 |
-
|
509 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
510 |
-
patent license under the contributor's essential patent claims, to
|
511 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
512 |
-
propagate the contents of its contributor version.
|
513 |
-
|
514 |
-
In the following three paragraphs, a "patent license" is any express
|
515 |
-
agreement or commitment, however denominated, not to enforce a patent
|
516 |
-
(such as an express permission to practice a patent or covenant not to
|
517 |
-
sue for patent infringement). To "grant" such a patent license to a
|
518 |
-
party means to make such an agreement or commitment not to enforce a
|
519 |
-
patent against the party.
|
520 |
-
|
521 |
-
If you convey a covered work, knowingly relying on a patent license,
|
522 |
-
and the Corresponding Source of the work is not available for anyone
|
523 |
-
to copy, free of charge and under the terms of this License, through a
|
524 |
-
publicly available network server or other readily accessible means,
|
525 |
-
then you must either (1) cause the Corresponding Source to be so
|
526 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
527 |
-
patent license for this particular work, or (3) arrange, in a manner
|
528 |
-
consistent with the requirements of this License, to extend the patent
|
529 |
-
license to downstream recipients. "Knowingly relying" means you have
|
530 |
-
actual knowledge that, but for the patent license, your conveying the
|
531 |
-
covered work in a country, or your recipient's use of the covered work
|
532 |
-
in a country, would infringe one or more identifiable patents in that
|
533 |
-
country that you have reason to believe are valid.
|
534 |
-
|
535 |
-
If, pursuant to or in connection with a single transaction or
|
536 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
537 |
-
covered work, and grant a patent license to some of the parties
|
538 |
-
receiving the covered work authorizing them to use, propagate, modify
|
539 |
-
or convey a specific copy of the covered work, then the patent license
|
540 |
-
you grant is automatically extended to all recipients of the covered
|
541 |
-
work and works based on it.
|
542 |
-
|
543 |
-
A patent license is "discriminatory" if it does not include within
|
544 |
-
the scope of its coverage, prohibits the exercise of, or is
|
545 |
-
conditioned on the non-exercise of one or more of the rights that are
|
546 |
-
specifically granted under this License. You may not convey a covered
|
547 |
-
work if you are a party to an arrangement with a third party that is
|
548 |
-
in the business of distributing software, under which you make payment
|
549 |
-
to the third party based on the extent of your activity of conveying
|
550 |
-
the work, and under which the third party grants, to any of the
|
551 |
-
parties who would receive the covered work from you, a discriminatory
|
552 |
-
patent license (a) in connection with copies of the covered work
|
553 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
554 |
-
for and in connection with specific products or compilations that
|
555 |
-
contain the covered work, unless you entered into that arrangement,
|
556 |
-
or that patent license was granted, prior to 28 March 2007.
|
557 |
-
|
558 |
-
Nothing in this License shall be construed as excluding or limiting
|
559 |
-
any implied license or other defenses to infringement that may
|
560 |
-
otherwise be available to you under applicable patent law.
|
561 |
-
|
562 |
-
12. No Surrender of Others' Freedom.
|
563 |
-
|
564 |
-
If conditions are imposed on you (whether by court order, agreement or
|
565 |
-
otherwise) that contradict the conditions of this License, they do not
|
566 |
-
excuse you from the conditions of this License. If you cannot convey a
|
567 |
-
covered work so as to satisfy simultaneously your obligations under this
|
568 |
-
License and any other pertinent obligations, then as a consequence you may
|
569 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
570 |
-
to collect a royalty for further conveying from those to whom you convey
|
571 |
-
the Program, the only way you could satisfy both those terms and this
|
572 |
-
License would be to refrain entirely from conveying the Program.
|
573 |
-
|
574 |
-
13. Use with the GNU Affero General Public License.
|
575 |
-
|
576 |
-
Notwithstanding any other provision of this License, you have
|
577 |
-
permission to link or combine any covered work with a work licensed
|
578 |
-
under version 3 of the GNU Affero General Public License into a single
|
579 |
-
combined work, and to convey the resulting work. The terms of this
|
580 |
-
License will continue to apply to the part which is the covered work,
|
581 |
-
but the special requirements of the GNU Affero General Public License,
|
582 |
-
section 13, concerning interaction through a network will apply to the
|
583 |
-
combination as such.
|
584 |
-
|
585 |
-
14. Revised Versions of this License.
|
586 |
-
|
587 |
-
The Free Software Foundation may publish revised and/or new versions of
|
588 |
-
the GNU General Public License from time to time. Such new versions will
|
589 |
-
be similar in spirit to the present version, but may differ in detail to
|
590 |
-
address new problems or concerns.
|
591 |
-
|
592 |
-
Each version is given a distinguishing version number. If the
|
593 |
-
Program specifies that a certain numbered version of the GNU General
|
594 |
-
Public License "or any later version" applies to it, you have the
|
595 |
-
option of following the terms and conditions either of that numbered
|
596 |
-
version or of any later version published by the Free Software
|
597 |
-
Foundation. If the Program does not specify a version number of the
|
598 |
-
GNU General Public License, you may choose any version ever published
|
599 |
-
by the Free Software Foundation.
|
600 |
-
|
601 |
-
If the Program specifies that a proxy can decide which future
|
602 |
-
versions of the GNU General Public License can be used, that proxy's
|
603 |
-
public statement of acceptance of a version permanently authorizes you
|
604 |
-
to choose that version for the Program.
|
605 |
-
|
606 |
-
Later license versions may give you additional or different
|
607 |
-
permissions. However, no additional obligations are imposed on any
|
608 |
-
author or copyright holder as a result of your choosing to follow a
|
609 |
-
later version.
|
610 |
-
|
611 |
-
15. Disclaimer of Warranty.
|
612 |
-
|
613 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
614 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
615 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
616 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
617 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
618 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
619 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
620 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
621 |
-
|
622 |
-
16. Limitation of Liability.
|
623 |
-
|
624 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
625 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
626 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
627 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
628 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
629 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
630 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
631 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
632 |
-
SUCH DAMAGES.
|
633 |
-
|
634 |
-
17. Interpretation of Sections 15 and 16.
|
635 |
-
|
636 |
-
If the disclaimer of warranty and limitation of liability provided
|
637 |
-
above cannot be given local legal effect according to their terms,
|
638 |
-
reviewing courts shall apply local law that most closely approximates
|
639 |
-
an absolute waiver of all civil liability in connection with the
|
640 |
-
Program, unless a warranty or assumption of liability accompanies a
|
641 |
-
copy of the Program in return for a fee.
|
642 |
-
|
643 |
-
END OF TERMS AND CONDITIONS
|
644 |
-
|
645 |
-
How to Apply These Terms to Your New Programs
|
646 |
-
|
647 |
-
If you develop a new program, and you want it to be of the greatest
|
648 |
-
possible use to the public, the best way to achieve this is to make it
|
649 |
-
free software which everyone can redistribute and change under these terms.
|
650 |
-
|
651 |
-
To do so, attach the following notices to the program. It is safest
|
652 |
-
to attach them to the start of each source file to most effectively
|
653 |
-
state the exclusion of warranty; and each file should have at least
|
654 |
-
the "copyright" line and a pointer to where the full notice is found.
|
655 |
-
|
656 |
-
<one line to give the program's name and a brief idea of what it does.>
|
657 |
-
Copyright © <year> <name of author>
|
658 |
-
|
659 |
-
This program is free software: you can redistribute it and/or modify
|
660 |
-
it under the terms of the GNU General Public License as published by
|
661 |
-
the Free Software Foundation, either version 3 of the License, or
|
662 |
-
(at your option) any later version.
|
663 |
-
|
664 |
-
This program is distributed in the hope that it will be useful,
|
665 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
666 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
667 |
-
GNU General Public License for more details.
|
668 |
-
|
669 |
-
You should have received a copy of the GNU General Public License
|
670 |
-
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
671 |
-
|
672 |
-
Also add information on how to contact you by electronic and paper mail.
|
673 |
-
|
674 |
-
If the program does terminal interaction, make it output a short
|
675 |
-
notice like this when it starts in an interactive mode:
|
676 |
-
|
677 |
-
<program> Copyright © <year> <name of author>
|
678 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
679 |
-
This is free software, and you are welcome to redistribute it
|
680 |
-
under certain conditions; type `show c' for details.
|
681 |
-
|
682 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
683 |
-
parts of the General Public License. Of course, your program's commands
|
684 |
-
might be different; for a GUI interface, you would use an "about box".
|
685 |
-
|
686 |
-
You should also get your employer (if you work as a programmer) or school,
|
687 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
688 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
689 |
-
<https://www.gnu.org/licenses/>.
|
690 |
-
|
691 |
-
The GNU General Public License does not permit incorporating your program
|
692 |
-
into proprietary programs. If your program is a subroutine library, you
|
693 |
-
may consider it more useful to permit linking proprietary applications with
|
694 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
695 |
-
Public License instead of this License. But first, please read
|
696 |
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
1 |
+
YITH Plugin Framework
|
2 |
+
|
3 |
+
Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
4 |
+
|
5 |
+
This program is free software; you can redistribute it and/or modify
|
6 |
+
it under the terms of the GNU General Public License as published by
|
7 |
+
the Free Software Foundation; either version 3 of the License, or
|
8 |
+
(at your option) any later version.
|
9 |
+
|
10 |
+
This program is distributed in the hope that it will be useful,
|
11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
+
GNU General Public License for more details.
|
14 |
+
|
15 |
+
You should have received a copy of the GNU General Public License
|
16 |
+
along with this program; if not, write to the Free Software
|
17 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
18 |
+
|
19 |
+
YITH Plugin Framework is released under the GPL
|
20 |
+
|
21 |
+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
22 |
+
|
23 |
+
GNU GENERAL PUBLIC LICENSE
|
24 |
+
Version 3, 29 June 2007
|
25 |
+
|
26 |
+
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
27 |
+
Everyone is permitted to copy and distribute verbatim copies
|
28 |
+
of this license document, but changing it is not allowed.
|
29 |
+
|
30 |
+
Preamble
|
31 |
+
|
32 |
+
The GNU General Public License is a free, copyleft license for
|
33 |
+
software and other kinds of works.
|
34 |
+
|
35 |
+
The licenses for most software and other practical works are designed
|
36 |
+
to take away your freedom to share and change the works. By contrast,
|
37 |
+
the GNU General Public License is intended to guarantee your freedom to
|
38 |
+
share and change all versions of a program--to make sure it remains free
|
39 |
+
software for all its users. We, the Free Software Foundation, use the
|
40 |
+
GNU General Public License for most of our software; it applies also to
|
41 |
+
any other work released this way by its authors. You can apply it to
|
42 |
+
your programs, too.
|
43 |
+
|
44 |
+
When we speak of free software, we are referring to freedom, not
|
45 |
+
price. Our General Public Licenses are designed to make sure that you
|
46 |
+
have the freedom to distribute copies of free software (and charge for
|
47 |
+
them if you wish), that you receive source code or can get it if you
|
48 |
+
want it, that you can change the software or use pieces of it in new
|
49 |
+
free programs, and that you know you can do these things.
|
50 |
+
|
51 |
+
To protect your rights, we need to prevent others from denying you
|
52 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
53 |
+
certain responsibilities if you distribute copies of the software, or if
|
54 |
+
you modify it: responsibilities to respect the freedom of others.
|
55 |
+
|
56 |
+
For example, if you distribute copies of such a program, whether
|
57 |
+
gratis or for a fee, you must pass on to the recipients the same
|
58 |
+
freedoms that you received. You must make sure that they, too, receive
|
59 |
+
or can get the source code. And you must show them these terms so they
|
60 |
+
know their rights.
|
61 |
+
|
62 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
63 |
+
(1) assert copyright on the software, and (2) offer you this License
|
64 |
+
giving you legal permission to copy, distribute and/or modify it.
|
65 |
+
|
66 |
+
For the developers' and authors' protection, the GPL clearly explains
|
67 |
+
that there is no warranty for this free software. For both users' and
|
68 |
+
authors' sake, the GPL requires that modified versions be marked as
|
69 |
+
changed, so that their problems will not be attributed erroneously to
|
70 |
+
authors of previous versions.
|
71 |
+
|
72 |
+
Some devices are designed to deny users access to install or run
|
73 |
+
modified versions of the software inside them, although the manufacturer
|
74 |
+
can do so. This is fundamentally incompatible with the aim of
|
75 |
+
protecting users' freedom to change the software. The systematic
|
76 |
+
pattern of such abuse occurs in the area of products for individuals to
|
77 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
78 |
+
have designed this version of the GPL to prohibit the practice for those
|
79 |
+
products. If such problems arise substantially in other domains, we
|
80 |
+
stand ready to extend this provision to those domains in future versions
|
81 |
+
of the GPL, as needed to protect the freedom of users.
|
82 |
+
|
83 |
+
Finally, every program is threatened constantly by software patents.
|
84 |
+
States should not allow patents to restrict development and use of
|
85 |
+
software on general-purpose computers, but in those that do, we wish to
|
86 |
+
avoid the special danger that patents applied to a free program could
|
87 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
88 |
+
patents cannot be used to render the program non-free.
|
89 |
+
|
90 |
+
The precise terms and conditions for copying, distribution and
|
91 |
+
modification follow.
|
92 |
+
|
93 |
+
TERMS AND CONDITIONS
|
94 |
+
|
95 |
+
0. Definitions.
|
96 |
+
|
97 |
+
"This License" refers to version 3 of the GNU General Public License.
|
98 |
+
|
99 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
100 |
+
works, such as semiconductor masks.
|
101 |
+
|
102 |
+
"The Program" refers to any copyrightable work licensed under this
|
103 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
104 |
+
"recipients" may be individuals or organizations.
|
105 |
+
|
106 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
107 |
+
in a fashion requiring copyright permission, other than the making of an
|
108 |
+
exact copy. The resulting work is called a "modified version" of the
|
109 |
+
earlier work or a work "based on" the earlier work.
|
110 |
+
|
111 |
+
A "covered work" means either the unmodified Program or a work based
|
112 |
+
on the Program.
|
113 |
+
|
114 |
+
To "propagate" a work means to do anything with it that, without
|
115 |
+
permission, would make you directly or secondarily liable for
|
116 |
+
infringement under applicable copyright law, except executing it on a
|
117 |
+
computer or modifying a private copy. Propagation includes copying,
|
118 |
+
distribution (with or without modification), making available to the
|
119 |
+
public, and in some countries other activities as well.
|
120 |
+
|
121 |
+
To "convey" a work means any kind of propagation that enables other
|
122 |
+
parties to make or receive copies. Mere interaction with a user through
|
123 |
+
a computer network, with no transfer of a copy, is not conveying.
|
124 |
+
|
125 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
126 |
+
to the extent that it includes a convenient and prominently visible
|
127 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
128 |
+
tells the user that there is no warranty for the work (except to the
|
129 |
+
extent that warranties are provided), that licensees may convey the
|
130 |
+
work under this License, and how to view a copy of this License. If
|
131 |
+
the interface presents a list of user commands or options, such as a
|
132 |
+
menu, a prominent item in the list meets this criterion.
|
133 |
+
|
134 |
+
1. Source Code.
|
135 |
+
|
136 |
+
The "source code" for a work means the preferred form of the work
|
137 |
+
for making modifications to it. "Object code" means any non-source
|
138 |
+
form of a work.
|
139 |
+
|
140 |
+
A "Standard Interface" means an interface that either is an official
|
141 |
+
standard defined by a recognized standards body, or, in the case of
|
142 |
+
interfaces specified for a particular programming language, one that
|
143 |
+
is widely used among developers working in that language.
|
144 |
+
|
145 |
+
The "System Libraries" of an executable work include anything, other
|
146 |
+
than the work as a whole, that (a) is included in the normal form of
|
147 |
+
packaging a Major Component, but which is not part of that Major
|
148 |
+
Component, and (b) serves only to enable use of the work with that
|
149 |
+
Major Component, or to implement a Standard Interface for which an
|
150 |
+
implementation is available to the public in source code form. A
|
151 |
+
"Major Component", in this context, means a major essential component
|
152 |
+
(kernel, window system, and so on) of the specific operating system
|
153 |
+
(if any) on which the executable work runs, or a compiler used to
|
154 |
+
produce the work, or an object code interpreter used to run it.
|
155 |
+
|
156 |
+
The "Corresponding Source" for a work in object code form means all
|
157 |
+
the source code needed to generate, install, and (for an executable
|
158 |
+
work) run the object code and to modify the work, including scripts to
|
159 |
+
control those activities. However, it does not include the work's
|
160 |
+
System Libraries, or general-purpose tools or generally available free
|
161 |
+
programs which are used unmodified in performing those activities but
|
162 |
+
which are not part of the work. For example, Corresponding Source
|
163 |
+
includes interface definition files associated with source files for
|
164 |
+
the work, and the source code for shared libraries and dynamically
|
165 |
+
linked subprograms that the work is specifically designed to require,
|
166 |
+
such as by intimate data communication or control flow between those
|
167 |
+
subprograms and other parts of the work.
|
168 |
+
|
169 |
+
The Corresponding Source need not include anything that users
|
170 |
+
can regenerate automatically from other parts of the Corresponding
|
171 |
+
Source.
|
172 |
+
|
173 |
+
The Corresponding Source for a work in source code form is that
|
174 |
+
same work.
|
175 |
+
|
176 |
+
2. Basic Permissions.
|
177 |
+
|
178 |
+
All rights granted under this License are granted for the term of
|
179 |
+
copyright on the Program, and are irrevocable provided the stated
|
180 |
+
conditions are met. This License explicitly affirms your unlimited
|
181 |
+
permission to run the unmodified Program. The output from running a
|
182 |
+
covered work is covered by this License only if the output, given its
|
183 |
+
content, constitutes a covered work. This License acknowledges your
|
184 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
185 |
+
|
186 |
+
You may make, run and propagate covered works that you do not
|
187 |
+
convey, without conditions so long as your license otherwise remains
|
188 |
+
in force. You may convey covered works to others for the sole purpose
|
189 |
+
of having them make modifications exclusively for you, or provide you
|
190 |
+
with facilities for running those works, provided that you comply with
|
191 |
+
the terms of this License in conveying all material for which you do
|
192 |
+
not control copyright. Those thus making or running the covered works
|
193 |
+
for you must do so exclusively on your behalf, under your direction
|
194 |
+
and control, on terms that prohibit them from making any copies of
|
195 |
+
your copyrighted material outside their relationship with you.
|
196 |
+
|
197 |
+
Conveying under any other circumstances is permitted solely under
|
198 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
199 |
+
makes it unnecessary.
|
200 |
+
|
201 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
202 |
+
|
203 |
+
No covered work shall be deemed part of an effective technological
|
204 |
+
measure under any applicable law fulfilling obligations under article
|
205 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
206 |
+
similar laws prohibiting or restricting circumvention of such
|
207 |
+
measures.
|
208 |
+
|
209 |
+
When you convey a covered work, you waive any legal power to forbid
|
210 |
+
circumvention of technological measures to the extent such circumvention
|
211 |
+
is effected by exercising rights under this License with respect to
|
212 |
+
the covered work, and you disclaim any intention to limit operation or
|
213 |
+
modification of the work as a means of enforcing, against the work's
|
214 |
+
users, your or third parties' legal rights to forbid circumvention of
|
215 |
+
technological measures.
|
216 |
+
|
217 |
+
4. Conveying Verbatim Copies.
|
218 |
+
|
219 |
+
You may convey verbatim copies of the Program's source code as you
|
220 |
+
receive it, in any medium, provided that you conspicuously and
|
221 |
+
appropriately publish on each copy an appropriate copyright notice;
|
222 |
+
keep intact all notices stating that this License and any
|
223 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
224 |
+
keep intact all notices of the absence of any warranty; and give all
|
225 |
+
recipients a copy of this License along with the Program.
|
226 |
+
|
227 |
+
You may charge any price or no price for each copy that you convey,
|
228 |
+
and you may offer support or warranty protection for a fee.
|
229 |
+
|
230 |
+
5. Conveying Modified Source Versions.
|
231 |
+
|
232 |
+
You may convey a work based on the Program, or the modifications to
|
233 |
+
produce it from the Program, in the form of source code under the
|
234 |
+
terms of section 4, provided that you also meet all of these conditions:
|
235 |
+
|
236 |
+
a) The work must carry prominent notices stating that you modified
|
237 |
+
it, and giving a relevant date.
|
238 |
+
|
239 |
+
b) The work must carry prominent notices stating that it is
|
240 |
+
released under this License and any conditions added under section
|
241 |
+
7. This requirement modifies the requirement in section 4 to
|
242 |
+
"keep intact all notices".
|
243 |
+
|
244 |
+
c) You must license the entire work, as a whole, under this
|
245 |
+
License to anyone who comes into possession of a copy. This
|
246 |
+
License will therefore apply, along with any applicable section 7
|
247 |
+
additional terms, to the whole of the work, and all its parts,
|
248 |
+
regardless of how they are packaged. This License gives no
|
249 |
+
permission to license the work in any other way, but it does not
|
250 |
+
invalidate such permission if you have separately received it.
|
251 |
+
|
252 |
+
d) If the work has interactive user interfaces, each must display
|
253 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
254 |
+
interfaces that do not display Appropriate Legal Notices, your
|
255 |
+
work need not make them do so.
|
256 |
+
|
257 |
+
A compilation of a covered work with other separate and independent
|
258 |
+
works, which are not by their nature extensions of the covered work,
|
259 |
+
and which are not combined with it such as to form a larger program,
|
260 |
+
in or on a volume of a storage or distribution medium, is called an
|
261 |
+
"aggregate" if the compilation and its resulting copyright are not
|
262 |
+
used to limit the access or legal rights of the compilation's users
|
263 |
+
beyond what the individual works permit. Inclusion of a covered work
|
264 |
+
in an aggregate does not cause this License to apply to the other
|
265 |
+
parts of the aggregate.
|
266 |
+
|
267 |
+
6. Conveying Non-Source Forms.
|
268 |
+
|
269 |
+
You may convey a covered work in object code form under the terms
|
270 |
+
of sections 4 and 5, provided that you also convey the
|
271 |
+
machine-readable Corresponding Source under the terms of this License,
|
272 |
+
in one of these ways:
|
273 |
+
|
274 |
+
a) Convey the object code in, or embodied in, a physical product
|
275 |
+
(including a physical distribution medium), accompanied by the
|
276 |
+
Corresponding Source fixed on a durable physical medium
|
277 |
+
customarily used for software interchange.
|
278 |
+
|
279 |
+
b) Convey the object code in, or embodied in, a physical product
|
280 |
+
(including a physical distribution medium), accompanied by a
|
281 |
+
written offer, valid for at least three years and valid for as
|
282 |
+
long as you offer spare parts or customer support for that product
|
283 |
+
model, to give anyone who possesses the object code either (1) a
|
284 |
+
copy of the Corresponding Source for all the software in the
|
285 |
+
product that is covered by this License, on a durable physical
|
286 |
+
medium customarily used for software interchange, for a price no
|
287 |
+
more than your reasonable cost of physically performing this
|
288 |
+
conveying of source, or (2) access to copy the
|
289 |
+
Corresponding Source from a network server at no charge.
|
290 |
+
|
291 |
+
c) Convey individual copies of the object code with a copy of the
|
292 |
+
written offer to provide the Corresponding Source. This
|
293 |
+
alternative is allowed only occasionally and noncommercially, and
|
294 |
+
only if you received the object code with such an offer, in accord
|
295 |
+
with subsection 6b.
|
296 |
+
|
297 |
+
d) Convey the object code by offering access from a designated
|
298 |
+
place (gratis or for a charge), and offer equivalent access to the
|
299 |
+
Corresponding Source in the same way through the same place at no
|
300 |
+
further charge. You need not require recipients to copy the
|
301 |
+
Corresponding Source along with the object code. If the place to
|
302 |
+
copy the object code is a network server, the Corresponding Source
|
303 |
+
may be on a different server (operated by you or a third party)
|
304 |
+
that supports equivalent copying facilities, provided you maintain
|
305 |
+
clear directions next to the object code saying where to find the
|
306 |
+
Corresponding Source. Regardless of what server hosts the
|
307 |
+
Corresponding Source, you remain obligated to ensure that it is
|
308 |
+
available for as long as needed to satisfy these requirements.
|
309 |
+
|
310 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
311 |
+
you inform other peers where the object code and Corresponding
|
312 |
+
Source of the work are being offered to the general public at no
|
313 |
+
charge under subsection 6d.
|
314 |
+
|
315 |
+
A separable portion of the object code, whose source code is excluded
|
316 |
+
from the Corresponding Source as a System Library, need not be
|
317 |
+
included in conveying the object code work.
|
318 |
+
|
319 |
+
A "User Product" is either (1) a "consumer product", which means any
|
320 |
+
tangible personal property which is normally used for personal, family,
|
321 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
322 |
+
into a dwelling. In determining whether a product is a consumer product,
|
323 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
324 |
+
product received by a particular user, "normally used" refers to a
|
325 |
+
typical or common use of that class of product, regardless of the status
|
326 |
+
of the particular user or of the way in which the particular user
|
327 |
+
actually uses, or expects or is expected to use, the product. A product
|
328 |
+
is a consumer product regardless of whether the product has substantial
|
329 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
330 |
+
the only significant mode of use of the product.
|
331 |
+
|
332 |
+
"Installation Information" for a User Product means any methods,
|
333 |
+
procedures, authorization keys, or other information required to install
|
334 |
+
and execute modified versions of a covered work in that User Product from
|
335 |
+
a modified version of its Corresponding Source. The information must
|
336 |
+
suffice to ensure that the continued functioning of the modified object
|
337 |
+
code is in no case prevented or interfered with solely because
|
338 |
+
modification has been made.
|
339 |
+
|
340 |
+
If you convey an object code work under this section in, or with, or
|
341 |
+
specifically for use in, a User Product, and the conveying occurs as
|
342 |
+
part of a transaction in which the right of possession and use of the
|
343 |
+
User Product is transferred to the recipient in perpetuity or for a
|
344 |
+
fixed term (regardless of how the transaction is characterized), the
|
345 |
+
Corresponding Source conveyed under this section must be accompanied
|
346 |
+
by the Installation Information. But this requirement does not apply
|
347 |
+
if neither you nor any third party retains the ability to install
|
348 |
+
modified object code on the User Product (for example, the work has
|
349 |
+
been installed in ROM).
|
350 |
+
|
351 |
+
The requirement to provide Installation Information does not include a
|
352 |
+
requirement to continue to provide support service, warranty, or updates
|
353 |
+
for a work that has been modified or installed by the recipient, or for
|
354 |
+
the User Product in which it has been modified or installed. Access to a
|
355 |
+
network may be denied when the modification itself materially and
|
356 |
+
adversely affects the operation of the network or violates the rules and
|
357 |
+
protocols for communication across the network.
|
358 |
+
|
359 |
+
Corresponding Source conveyed, and Installation Information provided,
|
360 |
+
in accord with this section must be in a format that is publicly
|
361 |
+
documented (and with an implementation available to the public in
|
362 |
+
source code form), and must require no special password or key for
|
363 |
+
unpacking, reading or copying.
|
364 |
+
|
365 |
+
7. Additional Terms.
|
366 |
+
|
367 |
+
"Additional permissions" are terms that supplement the terms of this
|
368 |
+
License by making exceptions from one or more of its conditions.
|
369 |
+
Additional permissions that are applicable to the entire Program shall
|
370 |
+
be treated as though they were included in this License, to the extent
|
371 |
+
that they are valid under applicable law. If additional permissions
|
372 |
+
apply only to part of the Program, that part may be used separately
|
373 |
+
under those permissions, but the entire Program remains governed by
|
374 |
+
this License without regard to the additional permissions.
|
375 |
+
|
376 |
+
When you convey a copy of a covered work, you may at your option
|
377 |
+
remove any additional permissions from that copy, or from any part of
|
378 |
+
it. (Additional permissions may be written to require their own
|
379 |
+
removal in certain cases when you modify the work.) You may place
|
380 |
+
additional permissions on material, added by you to a covered work,
|
381 |
+
for which you have or can give appropriate copyright permission.
|
382 |
+
|
383 |
+
Notwithstanding any other provision of this License, for material you
|
384 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
385 |
+
that material) supplement the terms of this License with terms:
|
386 |
+
|
387 |
+
a) Disclaiming warranty or limiting liability differently from the
|
388 |
+
terms of sections 15 and 16 of this License; or
|
389 |
+
|
390 |
+
b) Requiring preservation of specified reasonable legal notices or
|
391 |
+
author attributions in that material or in the Appropriate Legal
|
392 |
+
Notices displayed by works containing it; or
|
393 |
+
|
394 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
395 |
+
requiring that modified versions of such material be marked in
|
396 |
+
reasonable ways as different from the original version; or
|
397 |
+
|
398 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
399 |
+
authors of the material; or
|
400 |
+
|
401 |
+
e) Declining to grant rights under trademark law for use of some
|
402 |
+
trade names, trademarks, or service marks; or
|
403 |
+
|
404 |
+
f) Requiring indemnification of licensors and authors of that
|
405 |
+
material by anyone who conveys the material (or modified versions of
|
406 |
+
it) with contractual assumptions of liability to the recipient, for
|
407 |
+
any liability that these contractual assumptions directly impose on
|
408 |
+
those licensors and authors.
|
409 |
+
|
410 |
+
All other non-permissive additional terms are considered "further
|
411 |
+
restrictions" within the meaning of section 10. If the Program as you
|
412 |
+
received it, or any part of it, contains a notice stating that it is
|
413 |
+
governed by this License along with a term that is a further
|
414 |
+
restriction, you may remove that term. If a license document contains
|
415 |
+
a further restriction but permits relicensing or conveying under this
|
416 |
+
License, you may add to a covered work material governed by the terms
|
417 |
+
of that license document, provided that the further restriction does
|
418 |
+
not survive such relicensing or conveying.
|
419 |
+
|
420 |
+
If you add terms to a covered work in accord with this section, you
|
421 |
+
must place, in the relevant source files, a statement of the
|
422 |
+
additional terms that apply to those files, or a notice indicating
|
423 |
+
where to find the applicable terms.
|
424 |
+
|
425 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
426 |
+
form of a separately written license, or stated as exceptions;
|
427 |
+
the above requirements apply either way.
|
428 |
+
|
429 |
+
8. Termination.
|
430 |
+
|
431 |
+
You may not propagate or modify a covered work except as expressly
|
432 |
+
provided under this License. Any attempt otherwise to propagate or
|
433 |
+
modify it is void, and will automatically terminate your rights under
|
434 |
+
this License (including any patent licenses granted under the third
|
435 |
+
paragraph of section 11).
|
436 |
+
|
437 |
+
However, if you cease all violation of this License, then your
|
438 |
+
license from a particular copyright holder is reinstated (a)
|
439 |
+
provisionally, unless and until the copyright holder explicitly and
|
440 |
+
finally terminates your license, and (b) permanently, if the copyright
|
441 |
+
holder fails to notify you of the violation by some reasonable means
|
442 |
+
prior to 60 days after the cessation.
|
443 |
+
|
444 |
+
Moreover, your license from a particular copyright holder is
|
445 |
+
reinstated permanently if the copyright holder notifies you of the
|
446 |
+
violation by some reasonable means, this is the first time you have
|
447 |
+
received notice of violation of this License (for any work) from that
|
448 |
+
copyright holder, and you cure the violation prior to 30 days after
|
449 |
+
your receipt of the notice.
|
450 |
+
|
451 |
+
Termination of your rights under this section does not terminate the
|
452 |
+
licenses of parties who have received copies or rights from you under
|
453 |
+
this License. If your rights have been terminated and not permanently
|
454 |
+
reinstated, you do not qualify to receive new licenses for the same
|
455 |
+
material under section 10.
|
456 |
+
|
457 |
+
9. Acceptance Not Required for Having Copies.
|
458 |
+
|
459 |
+
You are not required to accept this License in order to receive or
|
460 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
461 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
462 |
+
to receive a copy likewise does not require acceptance. However,
|
463 |
+
nothing other than this License grants you permission to propagate or
|
464 |
+
modify any covered work. These actions infringe copyright if you do
|
465 |
+
not accept this License. Therefore, by modifying or propagating a
|
466 |
+
covered work, you indicate your acceptance of this License to do so.
|
467 |
+
|
468 |
+
10. Automatic Licensing of Downstream Recipients.
|
469 |
+
|
470 |
+
Each time you convey a covered work, the recipient automatically
|
471 |
+
receives a license from the original licensors, to run, modify and
|
472 |
+
propagate that work, subject to this License. You are not responsible
|
473 |
+
for enforcing compliance by third parties with this License.
|
474 |
+
|
475 |
+
An "entity transaction" is a transaction transferring control of an
|
476 |
+
organization, or substantially all assets of one, or subdividing an
|
477 |
+
organization, or merging organizations. If propagation of a covered
|
478 |
+
work results from an entity transaction, each party to that
|
479 |
+
transaction who receives a copy of the work also receives whatever
|
480 |
+
licenses to the work the party's predecessor in interest had or could
|
481 |
+
give under the previous paragraph, plus a right to possession of the
|
482 |
+
Corresponding Source of the work from the predecessor in interest, if
|
483 |
+
the predecessor has it or can get it with reasonable efforts.
|
484 |
+
|
485 |
+
You may not impose any further restrictions on the exercise of the
|
486 |
+
rights granted or affirmed under this License. For example, you may
|
487 |
+
not impose a license fee, royalty, or other charge for exercise of
|
488 |
+
rights granted under this License, and you may not initiate litigation
|
489 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
490 |
+
any patent claim is infringed by making, using, selling, offering for
|
491 |
+
sale, or importing the Program or any portion of it.
|
492 |
+
|
493 |
+
11. Patents.
|
494 |
+
|
495 |
+
A "contributor" is a copyright holder who authorizes use under this
|
496 |
+
License of the Program or a work on which the Program is based. The
|
497 |
+
work thus licensed is called the contributor's "contributor version".
|
498 |
+
|
499 |
+
A contributor's "essential patent claims" are all patent claims
|
500 |
+
owned or controlled by the contributor, whether already acquired or
|
501 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
502 |
+
by this License, of making, using, or selling its contributor version,
|
503 |
+
but do not include claims that would be infringed only as a
|
504 |
+
consequence of further modification of the contributor version. For
|
505 |
+
purposes of this definition, "control" includes the right to grant
|
506 |
+
patent sublicenses in a manner consistent with the requirements of
|
507 |
+
this License.
|
508 |
+
|
509 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
510 |
+
patent license under the contributor's essential patent claims, to
|
511 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
512 |
+
propagate the contents of its contributor version.
|
513 |
+
|
514 |
+
In the following three paragraphs, a "patent license" is any express
|
515 |
+
agreement or commitment, however denominated, not to enforce a patent
|
516 |
+
(such as an express permission to practice a patent or covenant not to
|
517 |
+
sue for patent infringement). To "grant" such a patent license to a
|
518 |
+
party means to make such an agreement or commitment not to enforce a
|
519 |
+
patent against the party.
|
520 |
+
|
521 |
+
If you convey a covered work, knowingly relying on a patent license,
|
522 |
+
and the Corresponding Source of the work is not available for anyone
|
523 |
+
to copy, free of charge and under the terms of this License, through a
|
524 |
+
publicly available network server or other readily accessible means,
|
525 |
+
then you must either (1) cause the Corresponding Source to be so
|
526 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
527 |
+
patent license for this particular work, or (3) arrange, in a manner
|
528 |
+
consistent with the requirements of this License, to extend the patent
|
529 |
+
license to downstream recipients. "Knowingly relying" means you have
|
530 |
+
actual knowledge that, but for the patent license, your conveying the
|
531 |
+
covered work in a country, or your recipient's use of the covered work
|
532 |
+
in a country, would infringe one or more identifiable patents in that
|
533 |
+
country that you have reason to believe are valid.
|
534 |
+
|
535 |
+
If, pursuant to or in connection with a single transaction or
|
536 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
537 |
+
covered work, and grant a patent license to some of the parties
|
538 |
+
receiving the covered work authorizing them to use, propagate, modify
|
539 |
+
or convey a specific copy of the covered work, then the patent license
|
540 |
+
you grant is automatically extended to all recipients of the covered
|
541 |
+
work and works based on it.
|
542 |
+
|
543 |
+
A patent license is "discriminatory" if it does not include within
|
544 |
+
the scope of its coverage, prohibits the exercise of, or is
|
545 |
+
conditioned on the non-exercise of one or more of the rights that are
|
546 |
+
specifically granted under this License. You may not convey a covered
|
547 |
+
work if you are a party to an arrangement with a third party that is
|
548 |
+
in the business of distributing software, under which you make payment
|
549 |
+
to the third party based on the extent of your activity of conveying
|
550 |
+
the work, and under which the third party grants, to any of the
|
551 |
+
parties who would receive the covered work from you, a discriminatory
|
552 |
+
patent license (a) in connection with copies of the covered work
|
553 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
554 |
+
for and in connection with specific products or compilations that
|
555 |
+
contain the covered work, unless you entered into that arrangement,
|
556 |
+
or that patent license was granted, prior to 28 March 2007.
|
557 |
+
|
558 |
+
Nothing in this License shall be construed as excluding or limiting
|
559 |
+
any implied license or other defenses to infringement that may
|
560 |
+
otherwise be available to you under applicable patent law.
|
561 |
+
|
562 |
+
12. No Surrender of Others' Freedom.
|
563 |
+
|
564 |
+
If conditions are imposed on you (whether by court order, agreement or
|
565 |
+
otherwise) that contradict the conditions of this License, they do not
|
566 |
+
excuse you from the conditions of this License. If you cannot convey a
|
567 |
+
covered work so as to satisfy simultaneously your obligations under this
|
568 |
+
License and any other pertinent obligations, then as a consequence you may
|
569 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
570 |
+
to collect a royalty for further conveying from those to whom you convey
|
571 |
+
the Program, the only way you could satisfy both those terms and this
|
572 |
+
License would be to refrain entirely from conveying the Program.
|
573 |
+
|
574 |
+
13. Use with the GNU Affero General Public License.
|
575 |
+
|
576 |
+
Notwithstanding any other provision of this License, you have
|
577 |
+
permission to link or combine any covered work with a work licensed
|
578 |
+
under version 3 of the GNU Affero General Public License into a single
|
579 |
+
combined work, and to convey the resulting work. The terms of this
|
580 |
+
License will continue to apply to the part which is the covered work,
|
581 |
+
but the special requirements of the GNU Affero General Public License,
|
582 |
+
section 13, concerning interaction through a network will apply to the
|
583 |
+
combination as such.
|
584 |
+
|
585 |
+
14. Revised Versions of this License.
|
586 |
+
|
587 |
+
The Free Software Foundation may publish revised and/or new versions of
|
588 |
+
the GNU General Public License from time to time. Such new versions will
|
589 |
+
be similar in spirit to the present version, but may differ in detail to
|
590 |
+
address new problems or concerns.
|
591 |
+
|
592 |
+
Each version is given a distinguishing version number. If the
|
593 |
+
Program specifies that a certain numbered version of the GNU General
|
594 |
+
Public License "or any later version" applies to it, you have the
|
595 |
+
option of following the terms and conditions either of that numbered
|
596 |
+
version or of any later version published by the Free Software
|
597 |
+
Foundation. If the Program does not specify a version number of the
|
598 |
+
GNU General Public License, you may choose any version ever published
|
599 |
+
by the Free Software Foundation.
|
600 |
+
|
601 |
+
If the Program specifies that a proxy can decide which future
|
602 |
+
versions of the GNU General Public License can be used, that proxy's
|
603 |
+
public statement of acceptance of a version permanently authorizes you
|
604 |
+
to choose that version for the Program.
|
605 |
+
|
606 |
+
Later license versions may give you additional or different
|
607 |
+
permissions. However, no additional obligations are imposed on any
|
608 |
+
author or copyright holder as a result of your choosing to follow a
|
609 |
+
later version.
|
610 |
+
|
611 |
+
15. Disclaimer of Warranty.
|
612 |
+
|
613 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
614 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
615 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
616 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
617 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
618 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
619 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
620 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
621 |
+
|
622 |
+
16. Limitation of Liability.
|
623 |
+
|
624 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
625 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
626 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
627 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
628 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
629 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
630 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
631 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
632 |
+
SUCH DAMAGES.
|
633 |
+
|
634 |
+
17. Interpretation of Sections 15 and 16.
|
635 |
+
|
636 |
+
If the disclaimer of warranty and limitation of liability provided
|
637 |
+
above cannot be given local legal effect according to their terms,
|
638 |
+
reviewing courts shall apply local law that most closely approximates
|
639 |
+
an absolute waiver of all civil liability in connection with the
|
640 |
+
Program, unless a warranty or assumption of liability accompanies a
|
641 |
+
copy of the Program in return for a fee.
|
642 |
+
|
643 |
+
END OF TERMS AND CONDITIONS
|
644 |
+
|
645 |
+
How to Apply These Terms to Your New Programs
|
646 |
+
|
647 |
+
If you develop a new program, and you want it to be of the greatest
|
648 |
+
possible use to the public, the best way to achieve this is to make it
|
649 |
+
free software which everyone can redistribute and change under these terms.
|
650 |
+
|
651 |
+
To do so, attach the following notices to the program. It is safest
|
652 |
+
to attach them to the start of each source file to most effectively
|
653 |
+
state the exclusion of warranty; and each file should have at least
|
654 |
+
the "copyright" line and a pointer to where the full notice is found.
|
655 |
+
|
656 |
+
<one line to give the program's name and a brief idea of what it does.>
|
657 |
+
Copyright © <year> <name of author>
|
658 |
+
|
659 |
+
This program is free software: you can redistribute it and/or modify
|
660 |
+
it under the terms of the GNU General Public License as published by
|
661 |
+
the Free Software Foundation, either version 3 of the License, or
|
662 |
+
(at your option) any later version.
|
663 |
+
|
664 |
+
This program is distributed in the hope that it will be useful,
|
665 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
666 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
667 |
+
GNU General Public License for more details.
|
668 |
+
|
669 |
+
You should have received a copy of the GNU General Public License
|
670 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
671 |
+
|
672 |
+
Also add information on how to contact you by electronic and paper mail.
|
673 |
+
|
674 |
+
If the program does terminal interaction, make it output a short
|
675 |
+
notice like this when it starts in an interactive mode:
|
676 |
+
|
677 |
+
<program> Copyright © <year> <name of author>
|
678 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
679 |
+
This is free software, and you are welcome to redistribute it
|
680 |
+
under certain conditions; type `show c' for details.
|
681 |
+
|
682 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
683 |
+
parts of the General Public License. Of course, your program's commands
|
684 |
+
might be different; for a GUI interface, you would use an "about box".
|
685 |
+
|
686 |
+
You should also get your employer (if you work as a programmer) or school,
|
687 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
688 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
689 |
+
<https://www.gnu.org/licenses/>.
|
690 |
+
|
691 |
+
The GNU General Public License does not permit incorporating your program
|
692 |
+
into proprietary programs. If your program is a subroutine library, you
|
693 |
+
may consider it more useful to permit linking proprietary applications with
|
694 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
695 |
+
Public License instead of this License. But first, please read
|
696 |
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
|
plugin-fw/assets/css/admin.css
CHANGED
@@ -1,333 +1,333 @@
|
|
1 |
-
/*-----------------------
|
2 |
-
YITH Debug
|
3 |
-
------------------------*/
|
4 |
-
#wpadminbar .yith-debug-admin-bar div,
|
5 |
-
#wpadminbar .yith-debug-admin-bar:hover div {
|
6 |
-
background: #05789c !important;
|
7 |
-
color: #fff !important;
|
8 |
-
}
|
9 |
-
|
10 |
-
#wpadminbar .yith-debug-admin-bar a,
|
11 |
-
#wpadminbar .yith-debug-admin-bar strong {
|
12 |
-
color: #fff !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
#wpadminbar .yith-debug-admin-bar strong {
|
16 |
-
font-weight: 600;
|
17 |
-
}
|
18 |
-
|
19 |
-
#wpadminbar .yith-debug-admin-bar-post-meta .ab-empty-item,
|
20 |
-
#wpadminbar .yith-debug-admin-bar-option .ab-empty-item {
|
21 |
-
display: none;
|
22 |
-
}
|
23 |
-
|
24 |
-
#wpadminbar #wp-admin-bar-yith-debug-admin-bar-post-meta-default,
|
25 |
-
#wpadminbar #wp-admin-bar-yith-debug-admin-bar-option-default {
|
26 |
-
padding: 0;
|
27 |
-
max-height: 500px;
|
28 |
-
overflow-y: auto;
|
29 |
-
}
|
30 |
-
|
31 |
-
#wpadminbar .yith-debug-admin-bar pre {
|
32 |
-
padding: 10px;
|
33 |
-
line-height: 1.5em;
|
34 |
-
}
|
35 |
-
|
36 |
-
.notice-yith {
|
37 |
-
margin-left: 0;
|
38 |
-
border-left-color: #acc327;
|
39 |
-
}
|
40 |
-
|
41 |
-
.notice-yith.notice-alt {
|
42 |
-
background-color: #ecf7ed;
|
43 |
-
}
|
44 |
-
|
45 |
-
.yith-promo-banner-image-link {
|
46 |
-
display: block;
|
47 |
-
margin-bottom: 15px;
|
48 |
-
}
|
49 |
-
|
50 |
-
.yith-promo-banner-image {
|
51 |
-
max-width: 100%;
|
52 |
-
margin: 0 auto;
|
53 |
-
display: block;
|
54 |
-
}
|
55 |
-
|
56 |
-
/*-----------------------
|
57 |
-
YITH FEEDS
|
58 |
-
------------------------*/
|
59 |
-
|
60 |
-
.yith-feeds-logo {
|
61 |
-
display: table-cell;
|
62 |
-
background: #005b7c;
|
63 |
-
padding: 5px;
|
64 |
-
border-radius: 50%;
|
65 |
-
margin-right: 10px;
|
66 |
-
vertical-align: text-bottom;
|
67 |
-
width: 18px;
|
68 |
-
height: auto;
|
69 |
-
vertical-align: middle;
|
70 |
-
}
|
71 |
-
|
72 |
-
.yith-feeds-plugin-name {
|
73 |
-
display: table-cell;
|
74 |
-
vertical-align: middle;
|
75 |
-
}
|
76 |
-
|
77 |
-
/*-----------------------
|
78 |
-
YITH Plugins Columns
|
79 |
-
------------------------*/
|
80 |
-
@media screen and (min-width: 783px) {
|
81 |
-
|
82 |
-
.auto-fold #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu-head {
|
83 |
-
width: 100%;
|
84 |
-
}
|
85 |
-
|
86 |
-
#adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu {
|
87 |
-
min-width: 320px;
|
88 |
-
display: flex;
|
89 |
-
flex-flow: row wrap;
|
90 |
-
}
|
91 |
-
|
92 |
-
#adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
|
93 |
-
width: 50%;
|
94 |
-
border-left: 1px solid #555;
|
95 |
-
box-sizing: border-box;
|
96 |
-
}
|
97 |
-
|
98 |
-
#adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(2n) {
|
99 |
-
border-left: none;
|
100 |
-
}
|
101 |
-
|
102 |
-
#adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu {
|
103 |
-
min-width: 480px;
|
104 |
-
display: flex;
|
105 |
-
flex-flow: row wrap;
|
106 |
-
}
|
107 |
-
|
108 |
-
#adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
|
109 |
-
width: calc(100% / 3);
|
110 |
-
border-left: 1px solid #555;
|
111 |
-
box-sizing: border-box;
|
112 |
-
}
|
113 |
-
|
114 |
-
#adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(3n + 2) {
|
115 |
-
border-left: none;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
/*---------------------------
|
120 |
-
YITH System Information
|
121 |
-
----------------------------*/
|
122 |
-
|
123 |
-
.yith-system-info-wrap table.form-table {
|
124 |
-
margin: 0;
|
125 |
-
background: #fff;
|
126 |
-
}
|
127 |
-
|
128 |
-
.yith-system-info-wrap table.form-table th, .yith-system-info-wrap table.form-table td {
|
129 |
-
padding: 30px 20px !important;
|
130 |
-
}
|
131 |
-
|
132 |
-
.yith-system-info-wrap table.form-table textarea.yith-system-info-debug {
|
133 |
-
width: 100%;
|
134 |
-
height: 400px !important;
|
135 |
-
}
|
136 |
-
|
137 |
-
.yith-phpinfo-wrap div table.form-table {
|
138 |
-
border-bottom: none;
|
139 |
-
margin-bottom: 0;
|
140 |
-
}
|
141 |
-
|
142 |
-
.yith-phpinfo-wrap div h2 {
|
143 |
-
border-top: 1px solid #d8d8d8 !important;
|
144 |
-
}
|
145 |
-
|
146 |
-
.yith-phpinfo-wrap div {
|
147 |
-
margin-bottom: 40px;
|
148 |
-
border-bottom: 1px solid #d8d8d8;
|
149 |
-
}
|
150 |
-
|
151 |
-
.yith-phpinfo-wrap div:last-child {
|
152 |
-
margin-bottom: 0;
|
153 |
-
}
|
154 |
-
|
155 |
-
.yith-phpinfo-wrap table.form-table h1.p {
|
156 |
-
color: #2a8db0;
|
157 |
-
text-transform: uppercase;
|
158 |
-
padding: 0;
|
159 |
-
line-height: 64px;
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
.yith-phpinfo-wrap table.form-table img {
|
164 |
-
float: right;
|
165 |
-
border: 0;
|
166 |
-
}
|
167 |
-
|
168 |
-
.yith-system-info-wrap .yith-plugin-fw-field-wrapper.progress:after {
|
169 |
-
color: #336374;
|
170 |
-
display: inline-block;
|
171 |
-
font: 400 20px/1 dashicons;
|
172 |
-
speak: none;
|
173 |
-
-webkit-font-smoothing: antialiased;
|
174 |
-
-moz-osx-font-smoothing: grayscale;
|
175 |
-
vertical-align: top;
|
176 |
-
line-height: 28px;
|
177 |
-
content: '\f463';
|
178 |
-
-webkit-animation: rotation 2s infinite linear;
|
179 |
-
animation: rotation 2s infinite linear
|
180 |
-
}
|
181 |
-
|
182 |
-
.yith-system-info h2.yith-sysinfo-title {
|
183 |
-
color: #00729f;
|
184 |
-
font-size: 25px;
|
185 |
-
text-transform: uppercase;
|
186 |
-
font-weight: 800;
|
187 |
-
line-height: 25px;
|
188 |
-
padding: 20px 0;
|
189 |
-
background: none;
|
190 |
-
border: none;
|
191 |
-
}
|
192 |
-
|
193 |
-
#yith-system-alert span.yith-logo,
|
194 |
-
.yith-system-info h2 span.yith-logo {
|
195 |
-
border-radius: 50%;
|
196 |
-
background: #265b7a;
|
197 |
-
height: 30px;
|
198 |
-
width: 30px;
|
199 |
-
display: flex;
|
200 |
-
text-align: center;
|
201 |
-
margin: 0 10px 0 0;
|
202 |
-
float: left;
|
203 |
-
align-items: center;
|
204 |
-
justify-content: center;
|
205 |
-
}
|
206 |
-
|
207 |
-
|
208 |
-
.yith-system-info table td {
|
209 |
-
word-break: break-all;
|
210 |
-
padding: 20px 12px;
|
211 |
-
}
|
212 |
-
|
213 |
-
.yith-system-info table td.requirement-value,
|
214 |
-
.yith-system-info table td.info-value {
|
215 |
-
font-size: 14px;
|
216 |
-
vertical-align: middle;
|
217 |
-
text-align: left;
|
218 |
-
color: #5da726;
|
219 |
-
line-height: 19px;
|
220 |
-
}
|
221 |
-
|
222 |
-
.yith-system-info table td.requirement-value {
|
223 |
-
width: 120px;
|
224 |
-
}
|
225 |
-
|
226 |
-
.yith-system-info table td.requirement-value.has-errors {
|
227 |
-
color: #a00;
|
228 |
-
}
|
229 |
-
|
230 |
-
.yith-system-info table td.requirement-value.has-warnings {
|
231 |
-
color: #ffa200;
|
232 |
-
}
|
233 |
-
|
234 |
-
.yith-system-info table td.requirement-messages ul {
|
235 |
-
margin: 0;
|
236 |
-
padding: 0 0 10px 0;
|
237 |
-
list-style: none !important;
|
238 |
-
}
|
239 |
-
|
240 |
-
.yith-system-info table td.requirement-messages ul li {
|
241 |
-
margin-bottom: 3px;
|
242 |
-
}
|
243 |
-
|
244 |
-
.yith-system-info table td.requirement-messages span.error {
|
245 |
-
color: #a00;
|
246 |
-
font-weight: bold;
|
247 |
-
}
|
248 |
-
|
249 |
-
.yith-system-info table td.requirement-messages span.warning {
|
250 |
-
color: #a00;
|
251 |
-
font-weight: bold;
|
252 |
-
}
|
253 |
-
|
254 |
-
.yith-system-info .debug-code {
|
255 |
-
font-family: monospace;
|
256 |
-
padding: 15px;
|
257 |
-
display: inline-block;
|
258 |
-
background: #f2f3f4;
|
259 |
-
line-height: 22px;
|
260 |
-
border: 2px solid #dfe3e6;
|
261 |
-
border-radius: 5px;
|
262 |
-
margin-right: 20px;
|
263 |
-
}
|
264 |
-
|
265 |
-
.yith-system-info .copy-link {
|
266 |
-
font-size: 11px;
|
267 |
-
font-weight: 600;
|
268 |
-
padding-left: 1.7em;
|
269 |
-
position: relative;
|
270 |
-
text-decoration: none;
|
271 |
-
color: #3889d3;
|
272 |
-
}
|
273 |
-
|
274 |
-
.yith-system-info .copy-link:hover {
|
275 |
-
color: #004b91;
|
276 |
-
}
|
277 |
-
|
278 |
-
.yith-system-info .copy-link:before {
|
279 |
-
background-color: #ffffff;
|
280 |
-
border: 1px solid;
|
281 |
-
bottom: 2px;
|
282 |
-
content: '';
|
283 |
-
display: inline-block;
|
284 |
-
height: 0.9em;
|
285 |
-
left: 0;
|
286 |
-
position: absolute;
|
287 |
-
width: 0.9em;
|
288 |
-
z-index: 2;
|
289 |
-
}
|
290 |
-
|
291 |
-
.yith-system-info .copy-link:after {
|
292 |
-
background-color: #ffffff;
|
293 |
-
border: 1px solid;
|
294 |
-
bottom: 5px;
|
295 |
-
content: '';
|
296 |
-
display: inline-block;
|
297 |
-
height: 0.9em;
|
298 |
-
left: 3px;
|
299 |
-
position: absolute;
|
300 |
-
width: 0.9em;
|
301 |
-
z-index: 1;
|
302 |
-
}
|
303 |
-
|
304 |
-
.yith-system-info .copy-link .copied-tooltip {
|
305 |
-
width: 140px;
|
306 |
-
background-color: #555;
|
307 |
-
color: #fff;
|
308 |
-
text-align: center;
|
309 |
-
border-radius: 6px;
|
310 |
-
padding: 5px;
|
311 |
-
position: absolute;
|
312 |
-
z-index: 1;
|
313 |
-
bottom: 150%;
|
314 |
-
left: 50%;
|
315 |
-
margin-left: -75px;
|
316 |
-
transition: all ease .3s;
|
317 |
-
}
|
318 |
-
|
319 |
-
.yith-system-info .copy-link .copied-tooltip:after {
|
320 |
-
content: "";
|
321 |
-
position: absolute;
|
322 |
-
top: 100%;
|
323 |
-
left: 50%;
|
324 |
-
margin-left: -5px;
|
325 |
-
border-width: 5px;
|
326 |
-
border-style: solid;
|
327 |
-
border-color: #555 transparent transparent transparent;
|
328 |
-
}
|
329 |
-
|
330 |
-
.yith-system-info-menu {
|
331 |
-
font-weight: bold;
|
332 |
-
font-size: 11px !important;
|
333 |
-
}
|
1 |
+
/*-----------------------
|
2 |
+
YITH Debug
|
3 |
+
------------------------*/
|
4 |
+
#wpadminbar .yith-debug-admin-bar div,
|
5 |
+
#wpadminbar .yith-debug-admin-bar:hover div {
|
6 |
+
background: #05789c !important;
|
7 |
+
color: #fff !important;
|
8 |
+
}
|
9 |
+
|
10 |
+
#wpadminbar .yith-debug-admin-bar a,
|
11 |
+
#wpadminbar .yith-debug-admin-bar strong {
|
12 |
+
color: #fff !important;
|
13 |
+
}
|
14 |
+
|
15 |
+
#wpadminbar .yith-debug-admin-bar strong {
|
16 |
+
font-weight: 600;
|
17 |
+
}
|
18 |
+
|
19 |
+
#wpadminbar .yith-debug-admin-bar-post-meta .ab-empty-item,
|
20 |
+
#wpadminbar .yith-debug-admin-bar-option .ab-empty-item {
|
21 |
+
display: none;
|
22 |
+
}
|
23 |
+
|
24 |
+
#wpadminbar #wp-admin-bar-yith-debug-admin-bar-post-meta-default,
|
25 |
+
#wpadminbar #wp-admin-bar-yith-debug-admin-bar-option-default {
|
26 |
+
padding: 0;
|
27 |
+
max-height: 500px;
|
28 |
+
overflow-y: auto;
|
29 |
+
}
|
30 |
+
|
31 |
+
#wpadminbar .yith-debug-admin-bar pre {
|
32 |
+
padding: 10px;
|
33 |
+
line-height: 1.5em;
|
34 |
+
}
|
35 |
+
|
36 |
+
.notice-yith {
|
37 |
+
margin-left: 0;
|
38 |
+
border-left-color: #acc327;
|
39 |
+
}
|
40 |
+
|
41 |
+
.notice-yith.notice-alt {
|
42 |
+
background-color: #ecf7ed;
|
43 |
+
}
|
44 |
+
|
45 |
+
.yith-promo-banner-image-link {
|
46 |
+
display: block;
|
47 |
+
margin-bottom: 15px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.yith-promo-banner-image {
|
51 |
+
max-width: 100%;
|
52 |
+
margin: 0 auto;
|
53 |
+
display: block;
|
54 |
+
}
|
55 |
+
|
56 |
+
/*-----------------------
|
57 |
+
YITH FEEDS
|
58 |
+
------------------------*/
|
59 |
+
|
60 |
+
.yith-feeds-logo {
|
61 |
+
display: table-cell;
|
62 |
+
background: #005b7c;
|
63 |
+
padding: 5px;
|
64 |
+
border-radius: 50%;
|
65 |
+
margin-right: 10px;
|
66 |
+
vertical-align: text-bottom;
|
67 |
+
width: 18px;
|
68 |
+
height: auto;
|
69 |
+
vertical-align: middle;
|
70 |
+
}
|
71 |
+
|
72 |
+
.yith-feeds-plugin-name {
|
73 |
+
display: table-cell;
|
74 |
+
vertical-align: middle;
|
75 |
+
}
|
76 |
+
|
77 |
+
/*-----------------------
|
78 |
+
YITH Plugins Columns
|
79 |
+
------------------------*/
|
80 |
+
@media screen and (min-width: 783px) {
|
81 |
+
|
82 |
+
.auto-fold #adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu-head {
|
83 |
+
width: 100%;
|
84 |
+
}
|
85 |
+
|
86 |
+
#adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu {
|
87 |
+
min-width: 320px;
|
88 |
+
display: flex;
|
89 |
+
flex-flow: row wrap;
|
90 |
+
}
|
91 |
+
|
92 |
+
#adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
|
93 |
+
width: 50%;
|
94 |
+
border-left: 1px solid #555;
|
95 |
+
box-sizing: border-box;
|
96 |
+
}
|
97 |
+
|
98 |
+
#adminmenu .yith-plugin-fw-menu-2-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(2n) {
|
99 |
+
border-left: none;
|
100 |
+
}
|
101 |
+
|
102 |
+
#adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu {
|
103 |
+
min-width: 480px;
|
104 |
+
display: flex;
|
105 |
+
flex-flow: row wrap;
|
106 |
+
}
|
107 |
+
|
108 |
+
#adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head) {
|
109 |
+
width: calc(100% / 3);
|
110 |
+
border-left: 1px solid #555;
|
111 |
+
box-sizing: border-box;
|
112 |
+
}
|
113 |
+
|
114 |
+
#adminmenu .yith-plugin-fw-menu-3-columns.wp-not-current-submenu .wp-submenu li:not(.wp-submenu-head):nth-child(3n + 2) {
|
115 |
+
border-left: none;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
/*---------------------------
|
120 |
+
YITH System Information
|
121 |
+
----------------------------*/
|
122 |
+
|
123 |
+
.yith-system-info-wrap table.form-table {
|
124 |
+
margin: 0;
|
125 |
+
background: #fff;
|
126 |
+
}
|
127 |
+
|
128 |
+
.yith-system-info-wrap table.form-table th, .yith-system-info-wrap table.form-table td {
|
129 |
+
padding: 30px 20px !important;
|
130 |
+
}
|
131 |
+
|
132 |
+
.yith-system-info-wrap table.form-table textarea.yith-system-info-debug {
|
133 |
+
width: 100%;
|
134 |
+
height: 400px !important;
|
135 |
+
}
|
136 |
+
|
137 |
+
.yith-phpinfo-wrap div table.form-table {
|
138 |
+
border-bottom: none;
|
139 |
+
margin-bottom: 0;
|
140 |
+
}
|
141 |
+
|
142 |
+
.yith-phpinfo-wrap div h2 {
|
143 |
+
border-top: 1px solid #d8d8d8 !important;
|
144 |
+
}
|
145 |
+
|
146 |
+
.yith-phpinfo-wrap div {
|
147 |
+
margin-bottom: 40px;
|
148 |
+
border-bottom: 1px solid #d8d8d8;
|
149 |
+
}
|
150 |
+
|
151 |
+
.yith-phpinfo-wrap div:last-child {
|
152 |
+
margin-bottom: 0;
|
153 |
+
}
|
154 |
+
|
155 |
+
.yith-phpinfo-wrap table.form-table h1.p {
|
156 |
+
color: #2a8db0;
|
157 |
+
text-transform: uppercase;
|
158 |
+
padding: 0;
|
159 |
+
line-height: 64px;
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
.yith-phpinfo-wrap table.form-table img {
|
164 |
+
float: right;
|
165 |
+
border: 0;
|
166 |
+
}
|
167 |
+
|
168 |
+
.yith-system-info-wrap .yith-plugin-fw-field-wrapper.progress:after {
|
169 |
+
color: #336374;
|
170 |
+
display: inline-block;
|
171 |
+
font: 400 20px/1 dashicons;
|
172 |
+
speak: none;
|
173 |
+
-webkit-font-smoothing: antialiased;
|
174 |
+
-moz-osx-font-smoothing: grayscale;
|
175 |
+
vertical-align: top;
|
176 |
+
line-height: 28px;
|
177 |
+
content: '\f463';
|
178 |
+
-webkit-animation: rotation 2s infinite linear;
|
179 |
+
animation: rotation 2s infinite linear
|
180 |
+
}
|
181 |
+
|
182 |
+
.yith-system-info h2.yith-sysinfo-title {
|
183 |
+
color: #00729f;
|
184 |
+
font-size: 25px;
|
185 |
+
text-transform: uppercase;
|
186 |
+
font-weight: 800;
|
187 |
+
line-height: 25px;
|
188 |
+
padding: 20px 0;
|
189 |
+
background: none;
|
190 |
+
border: none;
|
191 |
+
}
|
192 |
+
|
193 |
+
#yith-system-alert span.yith-logo,
|
194 |
+
.yith-system-info h2 span.yith-logo {
|
195 |
+
border-radius: 50%;
|
196 |
+
background: #265b7a;
|
197 |
+
height: 30px;
|
198 |
+
width: 30px;
|
199 |
+
display: flex;
|
200 |
+
text-align: center;
|
201 |
+
margin: 0 10px 0 0;
|
202 |
+
float: left;
|
203 |
+
align-items: center;
|
204 |
+
justify-content: center;
|
205 |
+
}
|
206 |
+
|
207 |
+
|
208 |
+
.yith-system-info table td {
|
209 |
+
word-break: break-all;
|
210 |
+
padding: 20px 12px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.yith-system-info table td.requirement-value,
|
214 |
+
.yith-system-info table td.info-value {
|
215 |
+
font-size: 14px;
|
216 |
+
vertical-align: middle;
|
217 |
+
text-align: left;
|
218 |
+
color: #5da726;
|
219 |
+
line-height: 19px;
|
220 |
+
}
|
221 |
+
|
222 |
+
.yith-system-info table td.requirement-value {
|
223 |
+
width: 120px;
|
224 |
+
}
|
225 |
+
|
226 |
+
.yith-system-info table td.requirement-value.has-errors {
|
227 |
+
color: #a00;
|
228 |
+
}
|
229 |
+
|
230 |
+
.yith-system-info table td.requirement-value.has-warnings {
|
231 |
+
color: #ffa200;
|
232 |
+
}
|
233 |
+
|
234 |
+
.yith-system-info table td.requirement-messages ul {
|
235 |
+
margin: 0;
|
236 |
+
padding: 0 0 10px 0;
|
237 |
+
list-style: none !important;
|
238 |
+
}
|
239 |
+
|
240 |
+
.yith-system-info table td.requirement-messages ul li {
|
241 |
+
margin-bottom: 3px;
|
242 |
+
}
|
243 |
+
|
244 |
+
.yith-system-info table td.requirement-messages span.error {
|
245 |
+
color: #a00;
|
246 |
+
font-weight: bold;
|
247 |
+
}
|
248 |
+
|
249 |
+
.yith-system-info table td.requirement-messages span.warning {
|
250 |
+
color: #a00;
|
251 |
+
font-weight: bold;
|
252 |
+
}
|
253 |
+
|
254 |
+
.yith-system-info .debug-code {
|
255 |
+
font-family: monospace;
|
256 |
+
padding: 15px;
|
257 |
+
display: inline-block;
|
258 |
+
background: #f2f3f4;
|
259 |
+
line-height: 22px;
|
260 |
+
border: 2px solid #dfe3e6;
|
261 |
+
border-radius: 5px;
|
262 |
+
margin-right: 20px;
|
263 |
+
}
|
264 |
+
|
265 |
+
.yith-system-info .copy-link {
|
266 |
+
font-size: 11px;
|
267 |
+
font-weight: 600;
|
268 |
+
padding-left: 1.7em;
|
269 |
+
position: relative;
|
270 |
+
text-decoration: none;
|
271 |
+
color: #3889d3;
|
272 |
+
}
|
273 |
+
|
274 |
+
.yith-system-info .copy-link:hover {
|
275 |
+
color: #004b91;
|
276 |
+
}
|
277 |
+
|
278 |
+
.yith-system-info .copy-link:before {
|
279 |
+
background-color: #ffffff;
|
280 |
+
border: 1px solid;
|
281 |
+
bottom: 2px;
|
282 |
+
content: '';
|
283 |
+
display: inline-block;
|
284 |
+
height: 0.9em;
|
285 |
+
left: 0;
|
286 |
+
position: absolute;
|
287 |
+
width: 0.9em;
|
288 |
+
z-index: 2;
|
289 |
+
}
|
290 |
+
|
291 |
+
.yith-system-info .copy-link:after {
|
292 |
+
background-color: #ffffff;
|
293 |
+
border: 1px solid;
|
294 |
+
bottom: 5px;
|
295 |
+
content: '';
|
296 |
+
display: inline-block;
|
297 |
+
height: 0.9em;
|
298 |
+
left: 3px;
|
299 |
+
position: absolute;
|
300 |
+
width: 0.9em;
|
301 |
+
z-index: 1;
|
302 |
+
}
|
303 |
+
|
304 |
+
.yith-system-info .copy-link .copied-tooltip {
|
305 |
+
width: 140px;
|
306 |
+
background-color: #555;
|
307 |
+
color: #fff;
|
308 |
+
text-align: center;
|
309 |
+
border-radius: 6px;
|
310 |
+
padding: 5px;
|
311 |
+
position: absolute;
|
312 |
+
z-index: 1;
|
313 |
+
bottom: 150%;
|
314 |
+
left: 50%;
|
315 |
+
margin-left: -75px;
|
316 |
+
transition: all ease .3s;
|
317 |
+
}
|
318 |
+
|
319 |
+
.yith-system-info .copy-link .copied-tooltip:after {
|
320 |
+
content: "";
|
321 |
+
position: absolute;
|
322 |
+
top: 100%;
|
323 |
+
left: 50%;
|
324 |
+
margin-left: -5px;
|
325 |
+
border-width: 5px;
|
326 |
+
border-style: solid;
|
327 |
+
border-color: #555 transparent transparent transparent;
|
328 |
+
}
|
329 |
+
|
330 |
+
.yith-system-info-menu {
|
331 |
+
font-weight: bold;
|
332 |
+
font-size: 11px !important;
|
333 |
+
}
|
plugin-fw/assets/css/codemirror/codemirror.css
CHANGED
@@ -1,260 +1,260 @@
|
|
1 |
-
/* BASICS */
|
2 |
-
|
3 |
-
.CodeMirror {
|
4 |
-
/* Set height, width, borders, and global font properties here */
|
5 |
-
font-family: monospace;
|
6 |
-
height: 400px;
|
7 |
-
clear: both;
|
8 |
-
padding: 0;
|
9 |
-
}
|
10 |
-
.CodeMirror-scroll {
|
11 |
-
/* Set scrolling behaviour here */
|
12 |
-
overflow: auto;
|
13 |
-
}
|
14 |
-
|
15 |
-
/* PADDING */
|
16 |
-
|
17 |
-
.CodeMirror-lines {
|
18 |
-
padding: 4px 0; /* Vertical padding around content */
|
19 |
-
}
|
20 |
-
.CodeMirror pre {
|
21 |
-
padding: 0 4px; /* Horizontal padding of content */
|
22 |
-
}
|
23 |
-
|
24 |
-
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
25 |
-
background-color: white; /* The little square between H and V scrollbars */
|
26 |
-
}
|
27 |
-
|
28 |
-
/* GUTTER */
|
29 |
-
|
30 |
-
.CodeMirror-gutters {
|
31 |
-
border-right: 1px solid #ddd;
|
32 |
-
background-color: #f7f7f7;
|
33 |
-
white-space: nowrap;
|
34 |
-
}
|
35 |
-
.CodeMirror-linenumbers {}
|
36 |
-
.CodeMirror-linenumber {
|
37 |
-
padding: 0 3px 0 5px;
|
38 |
-
min-width: 20px;
|
39 |
-
text-align: right;
|
40 |
-
color: #999;
|
41 |
-
}
|
42 |
-
|
43 |
-
/* CURSOR */
|
44 |
-
|
45 |
-
.CodeMirror div.CodeMirror-cursor {
|
46 |
-
border-left: 1px solid black;
|
47 |
-
z-index: 3;
|
48 |
-
}
|
49 |
-
/* Shown when moving in bi-directional text */
|
50 |
-
.CodeMirror div.CodeMirror-secondarycursor {
|
51 |
-
border-left: 1px solid silver;
|
52 |
-
}
|
53 |
-
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
54 |
-
width: auto;
|
55 |
-
border: 0;
|
56 |
-
background: #7e7;
|
57 |
-
z-index: 1;
|
58 |
-
}
|
59 |
-
/* Can style cursor different in overwrite (non-insert) mode */
|
60 |
-
.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
|
61 |
-
|
62 |
-
.cm-tab { display: inline-block; }
|
63 |
-
|
64 |
-
/* DEFAULT THEME */
|
65 |
-
|
66 |
-
.cm-s-default .cm-keyword {color: #708;}
|
67 |
-
.cm-s-default .cm-atom {color: #219;}
|
68 |
-
.cm-s-default .cm-number {color: #164;}
|
69 |
-
.cm-s-default .cm-def {color: #00f;}
|
70 |
-
.cm-s-default .cm-variable {color: black;}
|
71 |
-
.cm-s-default .cm-variable-2 {color: #05a;}
|
72 |
-
.cm-s-default .cm-variable-3 {color: #085;}
|
73 |
-
.cm-s-default .cm-property {color: black;}
|
74 |
-
.cm-s-default .cm-operator {color: black;}
|
75 |
-
.cm-s-default .cm-comment {color: #a50;}
|
76 |
-
.cm-s-default .cm-string {color: #a11;}
|
77 |
-
.cm-s-default .cm-string-2 {color: #f50;}
|
78 |
-
.cm-s-default .cm-meta {color: #555;}
|
79 |
-
.cm-s-default .cm-error {color: #f00;}
|
80 |
-
.cm-s-default .cm-qualifier {color: #555;}
|
81 |
-
.cm-s-default .cm-builtin {color: #30a;}
|
82 |
-
.cm-s-default .cm-bracket {color: #997;}
|
83 |
-
.cm-s-default .cm-tag {color: #170;}
|
84 |
-
.cm-s-default .cm-attribute {color: #00c;}
|
85 |
-
.cm-s-default .cm-header {color: blue;}
|
86 |
-
.cm-s-default .cm-quote {color: #090;}
|
87 |
-
.cm-s-default .cm-hr {color: #999;}
|
88 |
-
.cm-s-default .cm-link {color: #00c;}
|
89 |
-
|
90 |
-
.cm-negative {color: #d44;}
|
91 |
-
.cm-positive {color: #292;}
|
92 |
-
.cm-header, .cm-strong {font-weight: bold;}
|
93 |
-
.cm-em {font-style: italic;}
|
94 |
-
.cm-link {text-decoration: underline;}
|
95 |
-
|
96 |
-
.cm-invalidchar {color: #f00;}
|
97 |
-
|
98 |
-
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
99 |
-
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
100 |
-
|
101 |
-
/* STOP */
|
102 |
-
|
103 |
-
/* The rest of this file contains styles related to the mechanics of
|
104 |
-
the editor. You probably shouldn't touch them. */
|
105 |
-
|
106 |
-
.CodeMirror {
|
107 |
-
line-height: 1;
|
108 |
-
position: relative;
|
109 |
-
overflow: hidden;
|
110 |
-
background: #fafafa;
|
111 |
-
color: black;
|
112 |
-
}
|
113 |
-
|
114 |
-
.CodeMirror-scroll {
|
115 |
-
/* 30px is the magic margin used to hide the element's real scrollbars */
|
116 |
-
/* See overflow: hidden in .CodeMirror */
|
117 |
-
margin-bottom: -30px; margin-right: -30px;
|
118 |
-
padding-bottom: 30px; padding-right: 30px;
|
119 |
-
height: 100%;
|
120 |
-
outline: none; /* Prevent dragging from highlighting the element */
|
121 |
-
position: relative;
|
122 |
-
}
|
123 |
-
.CodeMirror-sizer {
|
124 |
-
position: relative;
|
125 |
-
}
|
126 |
-
|
127 |
-
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
128 |
-
before actuall scrolling happens, thus preventing shaking and
|
129 |
-
flickering artifacts. */
|
130 |
-
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
131 |
-
position: absolute;
|
132 |
-
z-index: 6;
|
133 |
-
display: none;
|
134 |
-
}
|
135 |
-
.CodeMirror-vscrollbar {
|
136 |
-
right: 0; top: 0;
|
137 |
-
overflow-x: hidden;
|
138 |
-
overflow-y: scroll;
|
139 |
-
}
|
140 |
-
.CodeMirror-hscrollbar {
|
141 |
-
bottom: 0; left: 0;
|
142 |
-
overflow-y: hidden;
|
143 |
-
overflow-x: scroll;
|
144 |
-
}
|
145 |
-
.CodeMirror-scrollbar-filler {
|
146 |
-
right: 0; bottom: 0;
|
147 |
-
}
|
148 |
-
.CodeMirror-gutter-filler {
|
149 |
-
left: 0; bottom: 0;
|
150 |
-
}
|
151 |
-
|
152 |
-
.CodeMirror-gutters {
|
153 |
-
position: absolute; left: 0; top: 0;
|
154 |
-
padding-bottom: 30px;
|
155 |
-
z-index: 3;
|
156 |
-
}
|
157 |
-
.CodeMirror-gutter {
|
158 |
-
white-space: normal;
|
159 |
-
height: 100%;
|
160 |
-
padding-bottom: 30px;
|
161 |
-
margin-bottom: -32px;
|
162 |
-
display: inline-block;
|
163 |
-
/* Hack to make IE7 behave */
|
164 |
-
*zoom:1;
|
165 |
-
*display:inline;
|
166 |
-
}
|
167 |
-
.CodeMirror-gutter-elt {
|
168 |
-
position: absolute;
|
169 |
-
cursor: default;
|
170 |
-
z-index: 4;
|
171 |
-
}
|
172 |
-
|
173 |
-
.CodeMirror-lines {
|
174 |
-
cursor: text;
|
175 |
-
}
|
176 |
-
.CodeMirror pre {
|
177 |
-
/* Reset some styles that the rest of the page might have set */
|
178 |
-
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
179 |
-
border-width: 0;
|
180 |
-
background: transparent;
|
181 |
-
font-family: inherit;
|
182 |
-
font-size: inherit;
|
183 |
-
margin: 0;
|
184 |
-
white-space: pre;
|
185 |
-
word-wrap: normal;
|
186 |
-
line-height: inherit;
|
187 |
-
color: inherit;
|
188 |
-
z-index: 2;
|
189 |
-
position: relative;
|
190 |
-
overflow: visible;
|
191 |
-
}
|
192 |
-
.CodeMirror-wrap pre {
|
193 |
-
word-wrap: break-word;
|
194 |
-
white-space: pre-wrap;
|
195 |
-
word-break: normal;
|
196 |
-
}
|
197 |
-
.CodeMirror-code pre {
|
198 |
-
border-right: 30px solid transparent;
|
199 |
-
width: -webkit-fit-content;
|
200 |
-
width: -moz-fit-content;
|
201 |
-
width: fit-content;
|
202 |
-
}
|
203 |
-
.CodeMirror-wrap .CodeMirror-code pre {
|
204 |
-
border-right: none;
|
205 |
-
width: auto;
|
206 |
-
}
|
207 |
-
.CodeMirror-linebackground {
|
208 |
-
position: absolute;
|
209 |
-
left: 0; right: 0; top: 0; bottom: 0;
|
210 |
-
z-index: 0;
|
211 |
-
}
|
212 |
-
|
213 |
-
.CodeMirror-linewidget {
|
214 |
-
position: relative;
|
215 |
-
z-index: 2;
|
216 |
-
overflow: auto;
|
217 |
-
}
|
218 |
-
|
219 |
-
.CodeMirror-widget {
|
220 |
-
}
|
221 |
-
|
222 |
-
.CodeMirror-wrap .CodeMirror-scroll {
|
223 |
-
overflow-x: hidden;
|
224 |
-
}
|
225 |
-
|
226 |
-
.CodeMirror-measure {
|
227 |
-
position: absolute;
|
228 |
-
width: 100%; height: 0px;
|
229 |
-
overflow: hidden;
|
230 |
-
visibility: hidden;
|
231 |
-
}
|
232 |
-
.CodeMirror-measure pre { position: static; }
|
233 |
-
|
234 |
-
.CodeMirror div.CodeMirror-cursor {
|
235 |
-
position: absolute;
|
236 |
-
visibility: hidden;
|
237 |
-
border-right: none;
|
238 |
-
width: 0;
|
239 |
-
}
|
240 |
-
.CodeMirror-focused div.CodeMirror-cursor {
|
241 |
-
visibility: visible;
|
242 |
-
}
|
243 |
-
|
244 |
-
.CodeMirror-selected { background: #d9d9d9; }
|
245 |
-
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
246 |
-
|
247 |
-
.cm-searching {
|
248 |
-
background: #ffa;
|
249 |
-
background: rgba(255, 255, 0, .4);
|
250 |
-
}
|
251 |
-
|
252 |
-
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
253 |
-
.CodeMirror span { *vertical-align: text-bottom; }
|
254 |
-
|
255 |
-
@media print {
|
256 |
-
/* Hide the cursor when printing */
|
257 |
-
.CodeMirror div.CodeMirror-cursor {
|
258 |
-
visibility: hidden;
|
259 |
-
}
|
260 |
-
}
|
1 |
+
/* BASICS */
|
2 |
+
|
3 |
+
.CodeMirror {
|
4 |
+
/* Set height, width, borders, and global font properties here */
|
5 |
+
font-family: monospace;
|
6 |
+
height: 400px;
|
7 |
+
clear: both;
|
8 |
+
padding: 0;
|
9 |
+
}
|
10 |
+
.CodeMirror-scroll {
|
11 |
+
/* Set scrolling behaviour here */
|
12 |
+
overflow: auto;
|
13 |
+
}
|
14 |
+
|
15 |
+
/* PADDING */
|
16 |
+
|
17 |
+
.CodeMirror-lines {
|
18 |
+
padding: 4px 0; /* Vertical padding around content */
|
19 |
+
}
|
20 |
+
.CodeMirror pre {
|
21 |
+
padding: 0 4px; /* Horizontal padding of content */
|
22 |
+
}
|
23 |
+
|
24 |
+
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
25 |
+
background-color: white; /* The little square between H and V scrollbars */
|
26 |
+
}
|
27 |
+
|
28 |
+
/* GUTTER */
|
29 |
+
|
30 |
+
.CodeMirror-gutters {
|
31 |
+
border-right: 1px solid #ddd;
|
32 |
+
background-color: #f7f7f7;
|
33 |
+
white-space: nowrap;
|
34 |
+
}
|
35 |
+
.CodeMirror-linenumbers {}
|
36 |
+
.CodeMirror-linenumber {
|
37 |
+
padding: 0 3px 0 5px;
|
38 |
+
min-width: 20px;
|
39 |
+
text-align: right;
|
40 |
+
color: #999;
|
41 |
+
}
|
42 |
+
|
43 |
+
/* CURSOR */
|
44 |
+
|
45 |
+
.CodeMirror div.CodeMirror-cursor {
|
46 |
+
border-left: 1px solid black;
|
47 |
+
z-index: 3;
|
48 |
+
}
|
49 |
+
/* Shown when moving in bi-directional text */
|
50 |
+
.CodeMirror div.CodeMirror-secondarycursor {
|
51 |
+
border-left: 1px solid silver;
|
52 |
+
}
|
53 |
+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
54 |
+
width: auto;
|
55 |
+
border: 0;
|
56 |
+
background: #7e7;
|
57 |
+
z-index: 1;
|
58 |
+
}
|
59 |
+
/* Can style cursor different in overwrite (non-insert) mode */
|
60 |
+
.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
|
61 |
+
|
62 |
+
.cm-tab { display: inline-block; }
|
63 |
+
|
64 |
+
/* DEFAULT THEME */
|
65 |
+
|
66 |
+
.cm-s-default .cm-keyword {color: #708;}
|
67 |
+
.cm-s-default .cm-atom {color: #219;}
|
68 |
+
.cm-s-default .cm-number {color: #164;}
|
69 |
+
.cm-s-default .cm-def {color: #00f;}
|
70 |
+
.cm-s-default .cm-variable {color: black;}
|
71 |
+
.cm-s-default .cm-variable-2 {color: #05a;}
|
72 |
+
.cm-s-default .cm-variable-3 {color: #085;}
|
73 |
+
.cm-s-default .cm-property {color: black;}
|
74 |
+
.cm-s-default .cm-operator {color: black;}
|
75 |
+
.cm-s-default .cm-comment {color: #a50;}
|
76 |
+
.cm-s-default .cm-string {color: #a11;}
|
77 |
+
.cm-s-default .cm-string-2 {color: #f50;}
|
78 |
+
.cm-s-default .cm-meta {color: #555;}
|
79 |
+
.cm-s-default .cm-error {color: #f00;}
|
80 |
+
.cm-s-default .cm-qualifier {color: #555;}
|
81 |
+
.cm-s-default .cm-builtin {color: #30a;}
|
82 |
+
.cm-s-default .cm-bracket {color: #997;}
|
83 |
+
.cm-s-default .cm-tag {color: #170;}
|
84 |
+
.cm-s-default .cm-attribute {color: #00c;}
|
85 |
+
.cm-s-default .cm-header {color: blue;}
|
86 |
+
.cm-s-default .cm-quote {color: #090;}
|
87 |
+
.cm-s-default .cm-hr {color: #999;}
|
88 |
+
.cm-s-default .cm-link {color: #00c;}
|
89 |
+
|
90 |
+
.cm-negative {color: #d44;}
|
91 |
+
.cm-positive {color: #292;}
|
92 |
+
.cm-header, .cm-strong {font-weight: bold;}
|
93 |
+
.cm-em {font-style: italic;}
|
94 |
+
.cm-link {text-decoration: underline;}
|
95 |
+
|
96 |
+
.cm-invalidchar {color: #f00;}
|
97 |
+
|
98 |
+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
99 |
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
100 |
+
|
101 |
+
/* STOP */
|
102 |
+
|
103 |
+
/* The rest of this file contains styles related to the mechanics of
|
104 |
+
the editor. You probably shouldn't touch them. */
|
105 |
+
|
106 |
+
.CodeMirror {
|
107 |
+
line-height: 1;
|
108 |
+
position: relative;
|
109 |
+
overflow: hidden;
|
110 |
+
background: #fafafa;
|
111 |
+
color: black;
|
112 |
+
}
|
113 |
+
|
114 |
+
.CodeMirror-scroll {
|
115 |
+
/* 30px is the magic margin used to hide the element's real scrollbars */
|
116 |
+
/* See overflow: hidden in .CodeMirror */
|
117 |
+
margin-bottom: -30px; margin-right: -30px;
|
118 |
+
padding-bottom: 30px; padding-right: 30px;
|
119 |
+
height: 100%;
|
120 |
+
outline: none; /* Prevent dragging from highlighting the element */
|
121 |
+
position: relative;
|
122 |
+
}
|
123 |
+
.CodeMirror-sizer {
|
124 |
+
position: relative;
|
125 |
+
}
|
126 |
+
|
127 |
+
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
128 |
+
before actuall scrolling happens, thus preventing shaking and
|
129 |
+
flickering artifacts. */
|
130 |
+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
131 |
+
position: absolute;
|
132 |
+
z-index: 6;
|
133 |
+
display: none;
|
134 |
+
}
|
135 |
+
.CodeMirror-vscrollbar {
|
136 |
+
right: 0; top: 0;
|
137 |
+
overflow-x: hidden;
|
138 |
+
overflow-y: scroll;
|
139 |
+
}
|
140 |
+
.CodeMirror-hscrollbar {
|
141 |
+
bottom: 0; left: 0;
|
142 |
+
overflow-y: hidden;
|
143 |
+
overflow-x: scroll;
|
144 |
+
}
|
145 |
+
.CodeMirror-scrollbar-filler {
|
146 |
+
right: 0; bottom: 0;
|
147 |
+
}
|
148 |
+
.CodeMirror-gutter-filler {
|
149 |
+
left: 0; bottom: 0;
|
150 |
+
}
|
151 |
+
|
152 |
+
.CodeMirror-gutters {
|
153 |
+
position: absolute; left: 0; top: 0;
|
154 |
+
padding-bottom: 30px;
|
155 |
+
z-index: 3;
|
156 |
+
}
|
157 |
+
.CodeMirror-gutter {
|
158 |
+
white-space: normal;
|
159 |
+
height: 100%;
|
160 |
+
padding-bottom: 30px;
|
161 |
+
margin-bottom: -32px;
|
162 |
+
display: inline-block;
|
163 |
+
/* Hack to make IE7 behave */
|
164 |
+
*zoom:1;
|
165 |
+
*display:inline;
|
166 |
+
}
|
167 |
+
.CodeMirror-gutter-elt {
|
168 |
+
position: absolute;
|
169 |
+
cursor: default;
|
170 |
+
z-index: 4;
|
171 |
+
}
|
172 |
+
|
173 |
+
.CodeMirror-lines {
|
174 |
+
cursor: text;
|
175 |
+
}
|
176 |
+
.CodeMirror pre {
|
177 |
+
/* Reset some styles that the rest of the page might have set */
|
178 |
+
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
179 |
+
border-width: 0;
|
180 |
+
background: transparent;
|
181 |
+
font-family: inherit;
|
182 |
+
font-size: inherit;
|
183 |
+
margin: 0;
|
184 |
+
white-space: pre;
|
185 |
+
word-wrap: normal;
|
186 |
+
line-height: inherit;
|
187 |
+
color: inherit;
|
188 |
+
z-index: 2;
|
189 |
+
position: relative;
|
190 |
+
overflow: visible;
|
191 |
+
}
|
192 |
+
.CodeMirror-wrap pre {
|
193 |
+
word-wrap: break-word;
|
194 |
+
white-space: pre-wrap;
|
195 |
+
word-break: normal;
|
196 |
+
}
|
197 |
+
.CodeMirror-code pre {
|
198 |
+
border-right: 30px solid transparent;
|
199 |
+
width: -webkit-fit-content;
|
200 |
+
width: -moz-fit-content;
|
201 |
+
width: fit-content;
|
202 |
+
}
|
203 |
+
.CodeMirror-wrap .CodeMirror-code pre {
|
204 |
+
border-right: none;
|
205 |
+
width: auto;
|
206 |
+
}
|
207 |
+
.CodeMirror-linebackground {
|
208 |
+
position: absolute;
|
209 |
+
left: 0; right: 0; top: 0; bottom: 0;
|
210 |
+
z-index: 0;
|
211 |
+
}
|
212 |
+
|
213 |
+
.CodeMirror-linewidget {
|
214 |
+
position: relative;
|
215 |
+
z-index: 2;
|
216 |
+
overflow: auto;
|
217 |
+
}
|
218 |
+
|
219 |
+
.CodeMirror-widget {
|
220 |
+
}
|
221 |
+
|
222 |
+
.CodeMirror-wrap .CodeMirror-scroll {
|
223 |
+
overflow-x: hidden;
|
224 |
+
}
|
225 |
+
|
226 |
+
.CodeMirror-measure {
|
227 |
+
position: absolute;
|
228 |
+
width: 100%; height: 0px;
|
229 |
+
overflow: hidden;
|
230 |
+
visibility: hidden;
|
231 |
+
}
|
232 |
+
.CodeMirror-measure pre { position: static; }
|
233 |
+
|
234 |
+
.CodeMirror div.CodeMirror-cursor {
|
235 |
+
position: absolute;
|
236 |
+
visibility: hidden;
|
237 |
+
border-right: none;
|
238 |
+
width: 0;
|
239 |
+
}
|
240 |
+
.CodeMirror-focused div.CodeMirror-cursor {
|
241 |
+
visibility: visible;
|
242 |
+
}
|
243 |
+
|
244 |
+
.CodeMirror-selected { background: #d9d9d9; }
|
245 |
+
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
246 |
+
|
247 |
+
.cm-searching {
|
248 |
+
background: #ffa;
|
249 |
+
background: rgba(255, 255, 0, .4);
|
250 |
+
}
|
251 |
+
|
252 |
+
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
253 |
+
.CodeMirror span { *vertical-align: text-bottom; }
|
254 |
+
|
255 |
+
@media print {
|
256 |
+
/* Hide the cursor when printing */
|
257 |
+
.CodeMirror div.CodeMirror-cursor {
|
258 |
+
visibility: hidden;
|
259 |
+
}
|
260 |
+
}
|
plugin-fw/assets/css/colorbox.css
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
/*
|
2 |
-
Colorbox Core Style:
|
3 |
-
The following CSS is consistent between example themes and should not be altered.
|
4 |
-
*/
|
5 |
-
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden; -webkit-transform: translate3d(0,0,0);}
|
6 |
-
#cboxWrapper {max-width:none;}
|
7 |
-
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
8 |
-
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
9 |
-
#cboxContent{position:relative;}
|
10 |
-
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
11 |
-
#cboxTitle{margin:0;}
|
12 |
-
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
13 |
-
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
14 |
-
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
|
15 |
-
.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
|
16 |
-
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
|
17 |
-
|
18 |
-
/*
|
19 |
-
User Style:
|
20 |
-
Change the following styles to modify the appearance of Colorbox. They are
|
21 |
-
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
22 |
-
*/
|
23 |
-
#cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);}
|
24 |
-
#colorbox{outline:0;}
|
25 |
-
#cboxTopLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat 0 0;}
|
26 |
-
#cboxTopCenter{height:25px; background:url(../images/colorbox/border1.png) repeat-x 0 -50px;}
|
27 |
-
#cboxTopRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat -25px 0;}
|
28 |
-
#cboxBottomLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat 0 -25px;}
|
29 |
-
#cboxBottomCenter{height:25px; background:url(../images/colorbox/border1.png) repeat-x 0 -75px;}
|
30 |
-
#cboxBottomRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat -25px -25px;}
|
31 |
-
#cboxMiddleLeft{width:25px; background:url(../images/colorbox/border2.png) repeat-y 0 0;}
|
32 |
-
#cboxMiddleRight{width:25px; background:url(../images/colorbox/border2.png) repeat-y -25px 0;}
|
33 |
-
#cboxContent{background:#fff; overflow:hidden;}
|
34 |
-
.cboxIframe{background:#fff;}
|
35 |
-
#cboxError{padding:50px; border:1px solid #ccc;}
|
36 |
-
#cboxLoadedContent{margin-bottom:20px;}
|
37 |
-
#cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
|
38 |
-
#cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
|
39 |
-
#cboxLoadingOverlay{background:#fff url(../images/colorbox/loading.gif) no-repeat 5px 5px;}
|
40 |
-
|
41 |
-
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
42 |
-
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
43 |
-
|
44 |
-
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
|
45 |
-
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
46 |
-
|
47 |
-
#cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
|
48 |
-
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
|
49 |
-
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
|
50 |
-
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
|
51 |
-
|
52 |
-
/*
|
53 |
-
The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
|
54 |
-
when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
|
55 |
-
See: http://jacklmoore.com/notes/ie-transparency-problems/
|
56 |
-
*/
|
57 |
-
.cboxIE #cboxTopLeft,
|
58 |
-
.cboxIE #cboxTopCenter,
|
59 |
-
.cboxIE #cboxTopRight,
|
60 |
-
.cboxIE #cboxBottomLeft,
|
61 |
-
.cboxIE #cboxBottomCenter,
|
62 |
-
.cboxIE #cboxBottomRight,
|
63 |
-
.cboxIE #cboxMiddleLeft,
|
64 |
-
.cboxIE #cboxMiddleRight {
|
65 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
66 |
}
|
1 |
+
/*
|
2 |
+
Colorbox Core Style:
|
3 |
+
The following CSS is consistent between example themes and should not be altered.
|
4 |
+
*/
|
5 |
+
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden; -webkit-transform: translate3d(0,0,0);}
|
6 |
+
#cboxWrapper {max-width:none;}
|
7 |
+
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
8 |
+
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
9 |
+
#cboxContent{position:relative;}
|
10 |
+
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
11 |
+
#cboxTitle{margin:0;}
|
12 |
+
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
13 |
+
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
|
14 |
+
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
|
15 |
+
.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
|
16 |
+
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
|
17 |
+
|
18 |
+
/*
|
19 |
+
User Style:
|
20 |
+
Change the following styles to modify the appearance of Colorbox. They are
|
21 |
+
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
22 |
+
*/
|
23 |
+
#cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);}
|
24 |
+
#colorbox{outline:0;}
|
25 |
+
#cboxTopLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat 0 0;}
|
26 |
+
#cboxTopCenter{height:25px; background:url(../images/colorbox/border1.png) repeat-x 0 -50px;}
|
27 |
+
#cboxTopRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat -25px 0;}
|
28 |
+
#cboxBottomLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat 0 -25px;}
|
29 |
+
#cboxBottomCenter{height:25px; background:url(../images/colorbox/border1.png) repeat-x 0 -75px;}
|
30 |
+
#cboxBottomRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat -25px -25px;}
|
31 |
+
#cboxMiddleLeft{width:25px; background:url(../images/colorbox/border2.png) repeat-y 0 0;}
|
32 |
+
#cboxMiddleRight{width:25px; background:url(../images/colorbox/border2.png) repeat-y -25px 0;}
|
33 |
+
#cboxContent{background:#fff; overflow:hidden;}
|
34 |
+
.cboxIframe{background:#fff;}
|
35 |
+
#cboxError{padding:50px; border:1px solid #ccc;}
|
36 |
+
#cboxLoadedContent{margin-bottom:20px;}
|
37 |
+
#cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
|
38 |
+
#cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
|
39 |
+
#cboxLoadingOverlay{background:#fff url(../images/colorbox/loading.gif) no-repeat 5px 5px;}
|
40 |
+
|
41 |
+
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
42 |
+
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
43 |
+
|
44 |
+
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
|
45 |
+
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
|
46 |
+
|
47 |
+
#cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
|
48 |
+
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
|
49 |
+
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
|
50 |
+
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
|
51 |
+
|
52 |
+
/*
|
53 |
+
The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
|
54 |
+
when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
|
55 |
+
See: http://jacklmoore.com/notes/ie-transparency-problems/
|
56 |
+
*/
|
57 |
+
.cboxIE #cboxTopLeft,
|
58 |
+
.cboxIE #cboxTopCenter,
|
59 |
+
.cboxIE #cboxTopRight,
|
60 |
+
.cboxIE #cboxBottomLeft,
|
61 |
+
.cboxIE #cboxBottomCenter,
|
62 |
+
.cboxIE #cboxBottomRight,
|
63 |
+
.cboxIE #cboxMiddleLeft,
|
64 |
+
.cboxIE #cboxMiddleRight {
|
65 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
66 |
}
|
plugin-fw/assets/css/elementor.css
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
/**
|
2 |
-
* Style for Elementor Editor customization
|
3 |
-
*/
|
4 |
-
|
5 |
-
.yith-plugin-fw-elementor-widget-description {
|
6 |
-
margin-bottom : 10px;
|
7 |
-
font-style : italic;
|
8 |
-
}
|
9 |
-
|
10 |
-
.yith-plugin-fw-elementor-shortcode-widget--shortcode,
|
11 |
-
.yith-plugin-fw-elementor-shortcode-widget--empty-html {
|
12 |
-
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
13 |
-
padding : 1em 1em 1.2em;
|
14 |
-
border : 1px solid #1e1e1e;
|
15 |
-
border-radius : 4px;
|
16 |
-
}
|
17 |
-
|
18 |
-
.yith-plugin-fw-elementor-shortcode-widget__title {
|
19 |
-
font-size : 15px;
|
20 |
-
font-weight : 700;
|
21 |
-
margin-bottom : 10px;
|
22 |
-
}
|
23 |
-
|
24 |
-
.yith-plugin-fw-elementor-shortcode-widget__message {
|
25 |
-
font-style : italic;
|
26 |
-
font-size : 13px;
|
27 |
-
}
|
28 |
-
|
29 |
-
.yith-plugin-fw-elementor-shortcode-widget--shortcode .yith-plugin-fw-elementor-shortcode-widget__content {
|
30 |
-
font-family : Menlo, Consolas, monaco, monospace;
|
31 |
-
color : #1e1e1e;
|
32 |
-
font-size : 13px;
|
33 |
-
padding : 0.8em 1em;
|
34 |
-
border : 1px solid #ddd;
|
35 |
-
border-radius : 4px;
|
36 |
}
|
1 |
+
/**
|
2 |
+
* Style for Elementor Editor customization
|
3 |
+
*/
|
4 |
+
|
5 |
+
.yith-plugin-fw-elementor-widget-description {
|
6 |
+
margin-bottom : 10px;
|
7 |
+
font-style : italic;
|
8 |
+
}
|
9 |
+
|
10 |
+
.yith-plugin-fw-elementor-shortcode-widget--shortcode,
|
11 |
+
.yith-plugin-fw-elementor-shortcode-widget--empty-html {
|
12 |
+
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
13 |
+
padding : 1em 1em 1.2em;
|
14 |
+
border : 1px solid #1e1e1e;
|
15 |
+
border-radius : 4px;
|
16 |
+
}
|
17 |
+
|
18 |
+
.yith-plugin-fw-elementor-shortcode-widget__title {
|
19 |
+
font-size : 15px;
|
20 |
+
font-weight : 700;
|
21 |
+
margin-bottom : 10px;
|
22 |
+
}
|
23 |
+
|
24 |
+
.yith-plugin-fw-elementor-shortcode-widget__message {
|
25 |
+
font-style : italic;
|
26 |
+
font-size : 13px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.yith-plugin-fw-elementor-shortcode-widget--shortcode .yith-plugin-fw-elementor-shortcode-widget__content {
|
30 |
+
font-family : Menlo, Consolas, monaco, monospace;
|
31 |
+
color : #1e1e1e;
|
32 |
+
font-size : 13px;
|
33 |
+
padding : 0.8em 1em;
|
34 |
+
border : 1px solid #ddd;
|
35 |
+
border-radius : 4px;
|
36 |
}
|
plugin-fw/assets/css/metaboxes.css
CHANGED
@@ -1,752 +1,752 @@
|
|
1 |
-
/* self-clear floats */
|
2 |
-
.clearfix:after {
|
3 |
-
content : ".";
|
4 |
-
display : block;
|
5 |
-
height : 0;
|
6 |
-
clear : both;
|
7 |
-
visibility : hidden;
|
8 |
-
overflow : hidden;
|
9 |
-
}
|
10 |
-
|
11 |
-
/* ie.css */
|
12 |
-
* html .clearfix { /* IE6 */
|
13 |
-
height : 1%;
|
14 |
-
}
|
15 |
-
|
16 |
-
*:first-child + html .clearfix { /* IE7 */
|
17 |
-
min-height : 1%;
|
18 |
-
}
|
19 |
-
|
20 |
-
.clearboth {
|
21 |
-
clear : both
|
22 |
-
}
|
23 |
-
|
24 |
-
/* === TAB STYLE */
|
25 |
-
.metaboxes-tab {
|
26 |
-
margin : -6px -12px -8px;
|
27 |
-
}
|
28 |
-
|
29 |
-
.metaboxes-tab div.tabs-panel {
|
30 |
-
height : auto;
|
31 |
-
overflow : visible;
|
32 |
-
margin-top : 0px;
|
33 |
-
padding : 0 10px;
|
34 |
-
background : none;
|
35 |
-
border : 0;
|
36 |
-
}
|
37 |
-
|
38 |
-
.metaboxes-tab ul.metaboxes-tabs {
|
39 |
-
background : #f1f1f1;
|
40 |
-
margin : 0;
|
41 |
-
padding : 10px 0 0 5px;
|
42 |
-
}
|
43 |
-
|
44 |
-
.metaboxes-tab ul.metaboxes-tabs li {
|
45 |
-
float : left;
|
46 |
-
background : #dedede;
|
47 |
-
margin : 0 0 0 5px;
|
48 |
-
}
|
49 |
-
|
50 |
-
.metaboxes-tab ul.metaboxes-tabs li a {
|
51 |
-
color : #555;
|
52 |
-
text-decoration : none;
|
53 |
-
padding : 8px 15px;
|
54 |
-
display : block;
|
55 |
-
box-shadow : none !important;
|
56 |
-
}
|
57 |
-
|
58 |
-
.metaboxes-tab ul.metaboxes-tabs li.tabs {
|
59 |
-
background : #fff;
|
60 |
-
}
|
61 |
-
|
62 |
-
.metaboxes-tab p.field-row {
|
63 |
-
margin : 20px 0;
|
64 |
-
}
|
65 |
-
|
66 |
-
.metaboxes-tab div.sep {
|
67 |
-
height : 1px;
|
68 |
-
background : #dfdfdf;
|
69 |
-
clear : both;
|
70 |
-
margin-left : -10px;
|
71 |
-
margin-right : -10px;
|
72 |
-
}
|
73 |
-
|
74 |
-
.metaboxes-tab label {
|
75 |
-
font-weight : bold;
|
76 |
-
width : 160px;
|
77 |
-
float : left;
|
78 |
-
line-height : 23px;
|
79 |
-
margin-left : -184px;
|
80 |
-
}
|
81 |
-
|
82 |
-
.metaboxes-tab label small {
|
83 |
-
font-weight : normal;
|
84 |
-
line-height : 15px;
|
85 |
-
font-style : italic;
|
86 |
-
color : #999;
|
87 |
-
display : block;
|
88 |
-
}
|
89 |
-
|
90 |
-
.metaboxes-tab .yith-plugin-fw-radio__row {
|
91 |
-
width : 100%;
|
92 |
-
min-height : 20px;
|
93 |
-
}
|
94 |
-
|
95 |
-
.metaboxes-tab .yith-plugin-fw-radio__row label,
|
96 |
-
.metaboxes-tab .yith-toggle-elements label,
|
97 |
-
.metaboxes-tab .yith-add-box label {
|
98 |
-
margin-left : 0;
|
99 |
-
font-weight : normal;
|
100 |
-
}
|
101 |
-
|
102 |
-
.metaboxes-tab.yith-plugin-ui h3 {
|
103 |
-
color : #2a8db0;
|
104 |
-
font-size : 15px;
|
105 |
-
text-transform : uppercase;
|
106 |
-
padding : 5px 20px;
|
107 |
-
margin : 0 0 0 -4px;
|
108 |
-
width : auto;
|
109 |
-
background : transparent;
|
110 |
-
}
|
111 |
-
|
112 |
-
.metaboxes-tab.yith-plugin-ui .yith-add-box,
|
113 |
-
.metaboxes-tab.yith-plugin-ui .yith-toggle-row {
|
114 |
-
width : auto;
|
115 |
-
}
|
116 |
-
|
117 |
-
.metaboxes-tab .wp-picker-container label {
|
118 |
-
font-weight : inherit;
|
119 |
-
width : auto;
|
120 |
-
float : none;
|
121 |
-
line-height : inherit;
|
122 |
-
margin-left : 0;
|
123 |
-
}
|
124 |
-
|
125 |
-
.metaboxes-tab.yith-plugin-ui .yith-plugin-fw-radio__row label {
|
126 |
-
width : auto !important;
|
127 |
-
display : inline-block;
|
128 |
-
font-weight : normal;
|
129 |
-
float : none;
|
130 |
-
}
|
131 |
-
|
132 |
-
.metaboxes-tab input[type="checkbox"] {
|
133 |
-
vertical-align : middle
|
134 |
-
}
|
135 |
-
|
136 |
-
.metaboxes-tab input.button-secondary, .metaboxes-tab input.checkbox {
|
137 |
-
width : auto;
|
138 |
-
}
|
139 |
-
|
140 |
-
.metaboxes-tab p.field-row.textarea .description {
|
141 |
-
vertical-align : top;
|
142 |
-
}
|
143 |
-
|
144 |
-
.metaboxes-tab p.field-row.checkbox {
|
145 |
-
background : none;
|
146 |
-
}
|
147 |
-
|
148 |
-
.metaboxes-tab .the-metabox {
|
149 |
-
margin : 20px 0;
|
150 |
-
margin-left : 184px;
|
151 |
-
}
|
152 |
-
|
153 |
-
.metaboxes-tab .the-metabox.no-label {
|
154 |
-
margin : 20px 0;
|
155 |
-
margin-left : 0;
|
156 |
-
}
|
157 |
-
|
158 |
-
.metaboxes-tab hr {
|
159 |
-
height : 0px;
|
160 |
-
border-top : 1px solid #dadada;
|
161 |
-
width : auto;
|
162 |
-
margin-left : -10px;
|
163 |
-
margin-right : -10px;
|
164 |
-
}
|
165 |
-
|
166 |
-
.metaboxes-tab .the-metabox p {
|
167 |
-
margin : 0;
|
168 |
-
}
|
169 |
-
|
170 |
-
.metaboxes-tab .the-metabox:last-child {
|
171 |
-
border-bottom : 0px;
|
172 |
-
}
|
173 |
-
|
174 |
-
.metaboxes-tab .the-metabox.checkbox {
|
175 |
-
background : none;
|
176 |
-
}
|
177 |
-
|
178 |
-
.metaboxes-tab span.description.inline {
|
179 |
-
display : inline-block;
|
180 |
-
line-height : 23px;
|
181 |
-
width : auto;
|
182 |
-
margin : 0;
|
183 |
-
}
|
184 |
-
|
185 |
-
.metaboxes-tab .slider label {
|
186 |
-
padding : 15px 0;
|
187 |
-
}
|
188 |
-
|
189 |
-
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs {
|
190 |
-
background : transparent;
|
191 |
-
border-bottom : 1px solid #d8d8d8;
|
192 |
-
padding : 10px 0 0 0;
|
193 |
-
margin : 0 10px
|
194 |
-
}
|
195 |
-
|
196 |
-
|
197 |
-
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li {
|
198 |
-
background : #fff;
|
199 |
-
border-top : 1px solid #d8d8d8;
|
200 |
-
border-left : 1px solid #d8d8d8;
|
201 |
-
border-right : 1px solid #d8d8d8;
|
202 |
-
margin : 0 0 -1px -1px;
|
203 |
-
}
|
204 |
-
|
205 |
-
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs {
|
206 |
-
border-bottom : 1px solid #fff;
|
207 |
-
}
|
208 |
-
|
209 |
-
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li a {
|
210 |
-
color : #336374;
|
211 |
-
padding : 10px 18px;
|
212 |
-
text-transform : uppercase;
|
213 |
-
font-weight : 600;
|
214 |
-
display : inline-block;
|
215 |
-
}
|
216 |
-
|
217 |
-
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs a {
|
218 |
-
color : #2a8db0;
|
219 |
-
}
|
220 |
-
|
221 |
-
/* sortable table posts */
|
222 |
-
|
223 |
-
#the-list.ui-sortable tr:hover {
|
224 |
-
cursor : move;
|
225 |
-
}
|
226 |
-
|
227 |
-
.the-metabox.preview {
|
228 |
-
float : none;
|
229 |
-
}
|
230 |
-
|
231 |
-
.metaboxes-tab .the-metabox.no-label.preview {
|
232 |
-
margin-left : 184px;
|
233 |
-
}
|
234 |
-
|
235 |
-
.metaboxes-tab .the-metabox.no-label.preview img {
|
236 |
-
box-shadow : 0 1px 8px rgba(0, 0, 0, 0.2);
|
237 |
-
}
|
238 |
-
|
239 |
-
/**************************************
|
240 |
-
FIELDS
|
241 |
-
***************************************/
|
242 |
-
|
243 |
-
.metaboxes-tab select,
|
244 |
-
.metaboxes-tab input[type=text],
|
245 |
-
.metaboxes-tab input[type=number],
|
246 |
-
.metaboxes-tab textarea,
|
247 |
-
.metaboxes-tab .yith-plugin-fw-select,
|
248 |
-
.metaboxes-tab .yith-plugin-fw-slider-container,
|
249 |
-
.metaboxes-tab .yith-plugin-fw-text-input,
|
250 |
-
.metaboxes-tab .yith-plugin-fw-text-array-table,
|
251 |
-
.metaboxes-tab .yith-plugin-fw-textarea {
|
252 |
-
width : 400px;
|
253 |
-
max-width : 100%;
|
254 |
-
}
|
255 |
-
|
256 |
-
.metaboxes-tab.yith-plugin-ui input[type=number] {
|
257 |
-
width : auto;
|
258 |
-
min-width : 90px;
|
259 |
-
}
|
260 |
-
|
261 |
-
.metaboxes-tab.yith-plugin-ui p {
|
262 |
-
font-size : 14px;
|
263 |
-
}
|
264 |
-
|
265 |
-
.metaboxes-tab.yith-plugin-ui p.section-description {
|
266 |
-
|
267 |
-
margin : 0 20px 40px 18px;
|
268 |
-
}
|
269 |
-
|
270 |
-
.metaboxes-tab .yith-plugin-fw-text-array-table input[type=text] {
|
271 |
-
width : 100%;
|
272 |
-
}
|
273 |
-
|
274 |
-
.metaboxes-tab.yith-plugin-ui .yith-add-box h3 {
|
275 |
-
padding : 0 0 30px 0;
|
276 |
-
font-weight : 600;
|
277 |
-
margin : 0;
|
278 |
-
}
|
279 |
-
|
280 |
-
.metaboxes-tab.yith-plugin-ui .select2-container--default .select2-selection--single {
|
281 |
-
border : 0;
|
282 |
-
margin : 0;
|
283 |
-
}
|
284 |
-
|
285 |
-
/* wp editor */
|
286 |
-
.the-metabox.textarea-editor .mceIframeContainer {
|
287 |
-
background : #fff;
|
288 |
-
}
|
289 |
-
|
290 |
-
|
291 |
-
.the-metabox.textarea-editor label {
|
292 |
-
margin-top : 24px;
|
293 |
-
}
|
294 |
-
|
295 |
-
/* categories */
|
296 |
-
.categories-panel {
|
297 |
-
width : 30%;
|
298 |
-
float : left;
|
299 |
-
margin-right : 4px;
|
300 |
-
}
|
301 |
-
|
302 |
-
.categories-panel .box {
|
303 |
-
height : 200px;
|
304 |
-
border : 1px solid #dfdfdf;
|
305 |
-
background : #fff;
|
306 |
-
padding : 6px 10px;
|
307 |
-
overflow : auto;
|
308 |
-
}
|
309 |
-
|
310 |
-
.categories-panel ul {
|
311 |
-
list-style : none;
|
312 |
-
margin : 0;
|
313 |
-
}
|
314 |
-
|
315 |
-
.categories-panel ul li {
|
316 |
-
line-height : 19px;
|
317 |
-
margin : 0;
|
318 |
-
padding : 0;
|
319 |
-
word-wrap : break-word;
|
320 |
-
}
|
321 |
-
|
322 |
-
.categories-panel ul li label {
|
323 |
-
font-weight : normal !important;
|
324 |
-
margin-left : 0 !important;
|
325 |
-
}
|
326 |
-
|
327 |
-
.categories-panel input.newcategory {
|
328 |
-
width : 100%;
|
329 |
-
margin-bottom : 3px;
|
330 |
-
}
|
331 |
-
|
332 |
-
/* contact form */
|
333 |
-
.contactform_item {
|
334 |
-
border-style : solid;
|
335 |
-
border-width : 1px;
|
336 |
-
line-height : 1;
|
337 |
-
margin-bottom : 20px;
|
338 |
-
padding : 0;
|
339 |
-
background-color : #f5f5f5;
|
340 |
-
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
341 |
-
border-color : #dfdfdf;
|
342 |
-
border-radius : 3px 3px 3px 3px;
|
343 |
-
box-shadow : 0 1px 0 #fff inset;
|
344 |
-
min-width : 255px;
|
345 |
-
position : relative;
|
346 |
-
}
|
347 |
-
|
348 |
-
.contactform_item .handlediv {
|
349 |
-
position : relative;
|
350 |
-
top : -4px;
|
351 |
-
}
|
352 |
-
|
353 |
-
.contactform_item h3 {
|
354 |
-
min-height : 21px;
|
355 |
-
margin : 13px;
|
356 |
-
}
|
357 |
-
|
358 |
-
.contactform_item .inside {
|
359 |
-
padding : 10px !important;
|
360 |
-
}
|
361 |
-
|
362 |
-
.contactform_item .deps {
|
363 |
-
display : none;
|
364 |
-
}
|
365 |
-
|
366 |
-
.contactform_item .addoptions p.option {
|
367 |
-
margin : 5px 0 5px 200px
|
368 |
-
}
|
369 |
-
|
370 |
-
.contactform_item .addoptions p label {
|
371 |
-
width : 80px !important;
|
372 |
-
}
|
373 |
-
|
374 |
-
.contactform_item .add-field-option {
|
375 |
-
margin-bottom : 10px !important;
|
376 |
-
}
|
377 |
-
|
378 |
-
.remove_item {
|
379 |
-
float : right;
|
380 |
-
}
|
381 |
-
|
382 |
-
.metabox-sortable-placeholder {
|
383 |
-
border : 1px dotted #dedede;
|
384 |
-
margin : 10px 0
|
385 |
-
}
|
386 |
-
|
387 |
-
/* features tab */
|
388 |
-
.featurestab_item {
|
389 |
-
border-style : solid;
|
390 |
-
border-width : 1px;
|
391 |
-
line-height : 1;
|
392 |
-
margin-bottom : 20px;
|
393 |
-
padding : 0;
|
394 |
-
background-color : #f5f5f5;
|
395 |
-
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
396 |
-
border-color : #dfdfdf;
|
397 |
-
border-radius : 3px 3px 3px 3px;
|
398 |
-
box-shadow : 0 1px 0 #fff inset;
|
399 |
-
min-width : 255px;
|
400 |
-
position : relative;
|
401 |
-
}
|
402 |
-
|
403 |
-
.featurestab_item .handlediv {
|
404 |
-
position : relative;
|
405 |
-
top : -4px;
|
406 |
-
}
|
407 |
-
|
408 |
-
.featurestab_item h3 {
|
409 |
-
min-height : 21px
|
410 |
-
}
|
411 |
-
|
412 |
-
.featurestab_item .inside {
|
413 |
-
padding : 10px !important;
|
414 |
-
}
|
415 |
-
|
416 |
-
.featurestab_item .deps {
|
417 |
-
display : none;
|
418 |
-
}
|
419 |
-
|
420 |
-
.featurestab_item .addoptions p.option {
|
421 |
-
margin : 5px 0 5px 200px
|
422 |
-
}
|
423 |
-
|
424 |
-
.featurestab_item .addoptions p label {
|
425 |
-
width : 80px !important;
|
426 |
-
}
|
427 |
-
|
428 |
-
.featurestab_item .add-field-option {
|
429 |
-
margin-bottom : 10px !important;
|
430 |
-
}
|
431 |
-
|
432 |
-
.messages-panel.updated {
|
433 |
-
margin : 10px 0px 10px !important;
|
434 |
-
max-width : 1200px;
|
435 |
-
border-radius : 5px;
|
436 |
-
-webkit-box-sizing : border-box;
|
437 |
-
box-sizing : border-box;
|
438 |
-
}
|
439 |
-
|
440 |
-
.ui-widget-overlay {
|
441 |
-
background-image : none !important;
|
442 |
-
}
|
443 |
-
|
444 |
-
.the-metabox .icon_type {
|
445 |
-
width : 30%;
|
446 |
-
float : left;
|
447 |
-
margin-right : 40px
|
448 |
-
}
|
449 |
-
|
450 |
-
#post-type-settings .category-list label {
|
451 |
-
width : 187px;
|
452 |
-
}
|
453 |
-
|
454 |
-
.remove_cat {
|
455 |
-
float : right;
|
456 |
-
text-align : center;
|
457 |
-
display : block;
|
458 |
-
width : 20px;
|
459 |
-
height : 20px;
|
460 |
-
border-radius : 20px;
|
461 |
-
font-weight : bold;
|
462 |
-
font-size : 10px;
|
463 |
-
background : #efefef;
|
464 |
-
text-decoration : none;
|
465 |
-
}
|
466 |
-
|
467 |
-
/* typography */
|
468 |
-
.the-metabox.typography .select_wrapper.font-family {
|
469 |
-
width : 200px;
|
470 |
-
}
|
471 |
-
|
472 |
-
.the-metabox.typography .spinner_container {
|
473 |
-
float : left;
|
474 |
-
margin-right : 10px;
|
475 |
-
}
|
476 |
-
|
477 |
-
.the-metabox.typography .spinner_container input.number {
|
478 |
-
width : 50px !important;
|
479 |
-
-webkit-border-top-right-radius : 0px;
|
480 |
-
-webkit-border-bottom-right-radius : 0px;
|
481 |
-
-moz-border-radius-topright : 0px;
|
482 |
-
-moz-border-radius-bottomright : 0px;
|
483 |
-
border-top-right-radius : 0px;
|
484 |
-
border-bottom-right-radius : 0px;
|
485 |
-
}
|
486 |
-
|
487 |
-
/* number */
|
488 |
-
.the-metabox.number input.number {
|
489 |
-
width : 50px !important;
|
490 |
-
}
|
491 |
-
|
492 |
-
/* number */
|
493 |
-
.rm_number .number {
|
494 |
-
width : 70px;
|
495 |
-
text-align : right;
|
496 |
-
-webkit-border-top-right-radius : 0px;
|
497 |
-
-webkit-border-bottom-right-radius : 0px;
|
498 |
-
-moz-border-radius-topright : 0px;
|
499 |
-
-moz-border-radius-bottomright : 0px;
|
500 |
-
border-top-right-radius : 0px;
|
501 |
-
border-bottom-right-radius : 0px;
|
502 |
-
}
|
503 |
-
|
504 |
-
.spinner-wrapper {
|
505 |
-
position : relative;
|
506 |
-
height : 23px;
|
507 |
-
overflow : hidden;
|
508 |
-
}
|
509 |
-
|
510 |
-
.spinner-wrapper input.number {
|
511 |
-
float : left;
|
512 |
-
}
|
513 |
-
|
514 |
-
.spinner-wrapper .spinner-button {
|
515 |
-
cursor : pointer;
|
516 |
-
float : left;
|
517 |
-
position : absolute;
|
518 |
-
left : 69px;
|
519 |
-
width : 15px;
|
520 |
-
height : 12px;
|
521 |
-
border : 1px solid #dfdfdf;
|
522 |
-
background : #fff;
|
523 |
-
margin : 0;
|
524 |
-
padding : 0;
|
525 |
-
line-height : 9999px;
|
526 |
-
overflow : hidden;
|
527 |
-
background : url('../images/spinner.png') no-repeat center -11px
|
528 |
-
}
|
529 |
-
|
530 |
-
.spinner-wrapper .spinner-button.button-plus {
|
531 |
-
top : 0;
|
532 |
-
-webkit-border-top-right-radius : 3px !important;
|
533 |
-
-moz-border-radius-topright : 3px !important;
|
534 |
-
border-top-right-radius : 3px !important;
|
535 |
-
}
|
536 |
-
|
537 |
-
.spinner-wrapper .spinner-button.button-minus {
|
538 |
-
bottom : 0;
|
539 |
-
background-position : center -30px;
|
540 |
-
-webkit-border-bottom-right-radius : 3px !important;
|
541 |
-
-moz-border-radius-bottomright : 3px !important;
|
542 |
-
border-bottom-right-radius : 3px !important;
|
543 |
-
}
|
544 |
-
|
545 |
-
.spinner-wrapper .spinner-button.button-plus:active {
|
546 |
-
background-position : center 0px;
|
547 |
-
}
|
548 |
-
|
549 |
-
.spinner-wrapper .spinner-button.button-minus:active {
|
550 |
-
background-position : center -20px;
|
551 |
-
}
|
552 |
-
|
553 |
-
.rm_typography .spinner_container {
|
554 |
-
float : left;
|
555 |
-
margin-right : 10px;
|
556 |
-
}
|
557 |
-
|
558 |
-
.rm_typography .spinner-wrapper {
|
559 |
-
height : 28px;
|
560 |
-
}
|
561 |
-
|
562 |
-
.rm_typography .spinner-wrapper input.number {
|
563 |
-
height : 28px;
|
564 |
-
}
|
565 |
-
|
566 |
-
.rm_typography .spinner-wrapper .spinner-button.button-plus {
|
567 |
-
height : 15px;
|
568 |
-
background-position : center -10px;
|
569 |
-
}
|
570 |
-
|
571 |
-
.rm_typography .spinner-wrapper .spinner-button.button-minus {
|
572 |
-
height : 14px;
|
573 |
-
}
|
574 |
-
|
575 |
-
.the-metabox .spinner-wrapper .spinner-button {
|
576 |
-
left : 49px;
|
577 |
-
}
|
578 |
-
|
579 |
-
.the-metabox.typography .spinner-wrapper .spinner-button {
|
580 |
-
left : 35px;
|
581 |
-
}
|
582 |
-
|
583 |
-
/* images */
|
584 |
-
.the-metabox.images, .the-metabox.images label {
|
585 |
-
margin-left : 0;
|
586 |
-
display : block;
|
587 |
-
}
|
588 |
-
|
589 |
-
.the-metabox.images .slides-wrapper {
|
590 |
-
clear : both;
|
591 |
-
}
|
592 |
-
|
593 |
-
.the-metabox.images .slides-wrapper li {
|
594 |
-
position : relative;
|
595 |
-
}
|
596 |
-
|
597 |
-
.the-metabox.images a.delete {
|
598 |
-
display : block;
|
599 |
-
margin-left : 4px;
|
600 |
-
text-decoration : none;
|
601 |
-
font-weight : bold;
|
602 |
-
color : red;
|
603 |
-
position : absolute;
|
604 |
-
top : 0;
|
605 |
-
right : 0;
|
606 |
-
width : 10px;
|
607 |
-
height : 18px;
|
608 |
-
z-index : 10;
|
609 |
-
cursor : pointer !important;
|
610 |
-
}
|
611 |
-
|
612 |
-
/* wp editor */
|
613 |
-
.wp_themeSkin iframe {
|
614 |
-
background : #fff !important;
|
615 |
-
}
|
616 |
-
|
617 |
-
/* custom tabs */
|
618 |
-
.customtab_item {
|
619 |
-
border-style : solid;
|
620 |
-
border-width : 1px;
|
621 |
-
line-height : 1;
|
622 |
-
margin-bottom : 20px;
|
623 |
-
padding : 0;
|
624 |
-
background-color : #f5f5f5;
|
625 |
-
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
626 |
-
border-color : #dfdfdf;
|
627 |
-
border-radius : 3px 3px 3px 3px;
|
628 |
-
box-shadow : 0 1px 0 #fff inset;
|
629 |
-
min-width : 255px;
|
630 |
-
position : relative;
|
631 |
-
}
|
632 |
-
|
633 |
-
.customtab_item .handlediv {
|
634 |
-
position : relative;
|
635 |
-
top : -4px;
|
636 |
-
}
|
637 |
-
|
638 |
-
.customtab_item h3 {
|
639 |
-
min-height : 21px
|
640 |
-
}
|
641 |
-
|
642 |
-
.customtab_item .inside {
|
643 |
-
padding : 10px !important;
|
644 |
-
}
|
645 |
-
|
646 |
-
.customtab_item .deps {
|
647 |
-
display : none;
|
648 |
-
}
|
649 |
-
|
650 |
-
.customtab_item .addoptions p.option {
|
651 |
-
margin : 5px 0 5px 200px
|
652 |
-
}
|
653 |
-
|
654 |
-
.customtab_item .addoptions p label {
|
655 |
-
width : 80px !important;
|
656 |
-
}
|
657 |
-
|
658 |
-
.customtab_item .add-field-option {
|
659 |
-
margin-bottom : 10px !important;
|
660 |
-
}
|
661 |
-
|
662 |
-
.customtab_item .remove_item {
|
663 |
-
float : right;
|
664 |
-
}
|
665 |
-
|
666 |
-
.metabox-sortable-placeholder {
|
667 |
-
border : 1px dotted #dedede;
|
668 |
-
margin : 10px 0
|
669 |
-
}
|
670 |
-
|
671 |
-
.the-metabox.customtabs {
|
672 |
-
margin-left : 0;
|
673 |
-
}
|
674 |
-
|
675 |
-
#customtab_item_sample {
|
676 |
-
display : none;
|
677 |
-
}
|
678 |
-
|
679 |
-
.the-metabox.customtabs .field-row {
|
680 |
-
margin-bottom : 10px;
|
681 |
-
}
|
682 |
-
|
683 |
-
#yit_custom_tabs label {
|
684 |
-
font-weight : normal;
|
685 |
-
width : auto;
|
686 |
-
float : none;
|
687 |
-
line-height : auto;
|
688 |
-
margin-left : 0;
|
689 |
-
}
|
690 |
-
|
691 |
-
.wp-admin p label input[type=radio] {
|
692 |
-
width : 16px;
|
693 |
-
margin-right : 10px;
|
694 |
-
margin-top : 3px;
|
695 |
-
}
|
696 |
-
|
697 |
-
.wp-admin .form-field._preset_onsale_icon_field label input[type=radio] {
|
698 |
-
margin-top : 0;
|
699 |
-
}
|
700 |
-
|
701 |
-
.the-metabox .spinner {
|
702 |
-
margin-top : 5px;
|
703 |
-
float : none;
|
704 |
-
}
|
705 |
-
|
706 |
-
/*sidebars*/
|
707 |
-
#choose-sidebars.choose {
|
708 |
-
margin-left : 0px;
|
709 |
-
}
|
710 |
-
|
711 |
-
#_active_page_options-container label, #_active_page_options-container p {
|
712 |
-
display : inline-block;
|
713 |
-
margin : 0px;
|
714 |
-
}
|
715 |
-
|
716 |
-
#_active_page_options-container label {
|
717 |
-
margin-right : 10px;
|
718 |
-
margin-top : 3px;
|
719 |
-
}
|
720 |
-
|
721 |
-
#_active_page_options-container {
|
722 |
-
float : right;
|
723 |
-
margin-right : 20px;
|
724 |
-
margin-top : 5px;
|
725 |
-
z-index : 9999 !important;
|
726 |
-
position : absolute;
|
727 |
-
right : 0;
|
728 |
-
}
|
729 |
-
|
730 |
-
/*-----------------------
|
731 |
-
* Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
|
732 |
-
*/
|
733 |
-
.metaboxes-tab .the-metabox.colorpicker {
|
734 |
-
display : block;
|
735 |
-
width : auto;
|
736 |
-
height : auto;
|
737 |
-
overflow : visible;
|
738 |
-
top : auto;
|
739 |
-
left : auto;
|
740 |
-
background : transparent;
|
741 |
-
position : static;
|
742 |
-
z-index : 1;
|
743 |
-
font-family : inherit;
|
744 |
-
}
|
745 |
-
|
746 |
-
.the-metabox.checkbox.checkboxgroup-start.clearfix {
|
747 |
-
margin : 40px 0 0 264px;
|
748 |
-
}
|
749 |
-
|
750 |
-
.the-metabox.checkbox.checkboxgroup.clearfix {
|
751 |
-
margin : 0 0 0 264px;
|
752 |
}
|
1 |
+
/* self-clear floats */
|
2 |
+
.clearfix:after {
|
3 |
+
content : ".";
|
4 |
+
display : block;
|
5 |
+
height : 0;
|
6 |
+
clear : both;
|
7 |
+
visibility : hidden;
|
8 |
+
overflow : hidden;
|
9 |
+
}
|
10 |
+
|
11 |
+
/* ie.css */
|
12 |
+
* html .clearfix { /* IE6 */
|
13 |
+
height : 1%;
|
14 |
+
}
|
15 |
+
|
16 |
+
*:first-child + html .clearfix { /* IE7 */
|
17 |
+
min-height : 1%;
|
18 |
+
}
|
19 |
+
|
20 |
+
.clearboth {
|
21 |
+
clear : both
|
22 |
+
}
|
23 |
+
|
24 |
+
/* === TAB STYLE */
|
25 |
+
.metaboxes-tab {
|
26 |
+
margin : -6px -12px -8px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.metaboxes-tab div.tabs-panel {
|
30 |
+
height : auto;
|
31 |
+
overflow : visible;
|
32 |
+
margin-top : 0px;
|
33 |
+
padding : 0 10px;
|
34 |
+
background : none;
|
35 |
+
border : 0;
|
36 |
+
}
|
37 |
+
|
38 |
+
.metaboxes-tab ul.metaboxes-tabs {
|
39 |
+
background : #f1f1f1;
|
40 |
+
margin : 0;
|
41 |
+
padding : 10px 0 0 5px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.metaboxes-tab ul.metaboxes-tabs li {
|
45 |
+
float : left;
|
46 |
+
background : #dedede;
|
47 |
+
margin : 0 0 0 5px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.metaboxes-tab ul.metaboxes-tabs li a {
|
51 |
+
color : #555;
|
52 |
+
text-decoration : none;
|
53 |
+
padding : 8px 15px;
|
54 |
+
display : block;
|
55 |
+
box-shadow : none !important;
|
56 |
+
}
|
57 |
+
|
58 |
+
.metaboxes-tab ul.metaboxes-tabs li.tabs {
|
59 |
+
background : #fff;
|
60 |
+
}
|
61 |
+
|
62 |
+
.metaboxes-tab p.field-row {
|
63 |
+
margin : 20px 0;
|
64 |
+
}
|
65 |
+
|
66 |
+
.metaboxes-tab div.sep {
|
67 |
+
height : 1px;
|
68 |
+
background : #dfdfdf;
|
69 |
+
clear : both;
|
70 |
+
margin-left : -10px;
|
71 |
+
margin-right : -10px;
|
72 |
+
}
|
73 |
+
|
74 |
+
.metaboxes-tab label {
|
75 |
+
font-weight : bold;
|
76 |
+
width : 160px;
|
77 |
+
float : left;
|
78 |
+
line-height : 23px;
|
79 |
+
margin-left : -184px;
|
80 |
+
}
|
81 |
+
|
82 |
+
.metaboxes-tab label small {
|
83 |
+
font-weight : normal;
|
84 |
+
line-height : 15px;
|
85 |
+
font-style : italic;
|
86 |
+
color : #999;
|
87 |
+
display : block;
|
88 |
+
}
|
89 |
+
|
90 |
+
.metaboxes-tab .yith-plugin-fw-radio__row {
|
91 |
+
width : 100%;
|
92 |
+
min-height : 20px;
|
93 |
+
}
|
94 |
+
|
95 |
+
.metaboxes-tab .yith-plugin-fw-radio__row label,
|
96 |
+
.metaboxes-tab .yith-toggle-elements label,
|
97 |
+
.metaboxes-tab .yith-add-box label {
|
98 |
+
margin-left : 0;
|
99 |
+
font-weight : normal;
|
100 |
+
}
|
101 |
+
|
102 |
+
.metaboxes-tab.yith-plugin-ui h3 {
|
103 |
+
color : #2a8db0;
|
104 |
+
font-size : 15px;
|
105 |
+
text-transform : uppercase;
|
106 |
+
padding : 5px 20px;
|
107 |
+
margin : 0 0 0 -4px;
|
108 |
+
width : auto;
|
109 |
+
background : transparent;
|
110 |
+
}
|
111 |
+
|
112 |
+
.metaboxes-tab.yith-plugin-ui .yith-add-box,
|
113 |
+
.metaboxes-tab.yith-plugin-ui .yith-toggle-row {
|
114 |
+
width : auto;
|
115 |
+
}
|
116 |
+
|
117 |
+
.metaboxes-tab .wp-picker-container label {
|
118 |
+
font-weight : inherit;
|
119 |
+
width : auto;
|
120 |
+
float : none;
|
121 |
+
line-height : inherit;
|
122 |
+
margin-left : 0;
|
123 |
+
}
|
124 |
+
|
125 |
+
.metaboxes-tab.yith-plugin-ui .yith-plugin-fw-radio__row label {
|
126 |
+
width : auto !important;
|
127 |
+
display : inline-block;
|
128 |
+
font-weight : normal;
|
129 |
+
float : none;
|
130 |
+
}
|
131 |
+
|
132 |
+
.metaboxes-tab input[type="checkbox"] {
|
133 |
+
vertical-align : middle
|
134 |
+
}
|
135 |
+
|
136 |
+
.metaboxes-tab input.button-secondary, .metaboxes-tab input.checkbox {
|
137 |
+
width : auto;
|
138 |
+
}
|
139 |
+
|
140 |
+
.metaboxes-tab p.field-row.textarea .description {
|
141 |
+
vertical-align : top;
|
142 |
+
}
|
143 |
+
|
144 |
+
.metaboxes-tab p.field-row.checkbox {
|
145 |
+
background : none;
|
146 |
+
}
|
147 |
+
|
148 |
+
.metaboxes-tab .the-metabox {
|
149 |
+
margin : 20px 0;
|
150 |
+
margin-left : 184px;
|
151 |
+
}
|
152 |
+
|
153 |
+
.metaboxes-tab .the-metabox.no-label {
|
154 |
+
margin : 20px 0;
|
155 |
+
margin-left : 0;
|
156 |
+
}
|
157 |
+
|
158 |
+
.metaboxes-tab hr {
|
159 |
+
height : 0px;
|
160 |
+
border-top : 1px solid #dadada;
|
161 |
+
width : auto;
|
162 |
+
margin-left : -10px;
|
163 |
+
margin-right : -10px;
|
164 |
+
}
|
165 |
+
|
166 |
+
.metaboxes-tab .the-metabox p {
|
167 |
+
margin : 0;
|
168 |
+
}
|
169 |
+
|
170 |
+
.metaboxes-tab .the-metabox:last-child {
|
171 |
+
border-bottom : 0px;
|
172 |
+
}
|
173 |
+
|
174 |
+
.metaboxes-tab .the-metabox.checkbox {
|
175 |
+
background : none;
|
176 |
+
}
|
177 |
+
|
178 |
+
.metaboxes-tab span.description.inline {
|
179 |
+
display : inline-block;
|
180 |
+
line-height : 23px;
|
181 |
+
width : auto;
|
182 |
+
margin : 0;
|
183 |
+
}
|
184 |
+
|
185 |
+
.metaboxes-tab .slider label {
|
186 |
+
padding : 15px 0;
|
187 |
+
}
|
188 |
+
|
189 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs {
|
190 |
+
background : transparent;
|
191 |
+
border-bottom : 1px solid #d8d8d8;
|
192 |
+
padding : 10px 0 0 0;
|
193 |
+
margin : 0 10px
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li {
|
198 |
+
background : #fff;
|
199 |
+
border-top : 1px solid #d8d8d8;
|
200 |
+
border-left : 1px solid #d8d8d8;
|
201 |
+
border-right : 1px solid #d8d8d8;
|
202 |
+
margin : 0 0 -1px -1px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs {
|
206 |
+
border-bottom : 1px solid #fff;
|
207 |
+
}
|
208 |
+
|
209 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li a {
|
210 |
+
color : #336374;
|
211 |
+
padding : 10px 18px;
|
212 |
+
text-transform : uppercase;
|
213 |
+
font-weight : 600;
|
214 |
+
display : inline-block;
|
215 |
+
}
|
216 |
+
|
217 |
+
.metaboxes-tab.yith-plugin-ui ul.metaboxes-tabs li.tabs a {
|
218 |
+
color : #2a8db0;
|
219 |
+
}
|
220 |
+
|
221 |
+
/* sortable table posts */
|
222 |
+
|
223 |
+
#the-list.ui-sortable tr:hover {
|
224 |
+
cursor : move;
|
225 |
+
}
|
226 |
+
|
227 |
+
.the-metabox.preview {
|
228 |
+
float : none;
|
229 |
+
}
|
230 |
+
|
231 |
+
.metaboxes-tab .the-metabox.no-label.preview {
|
232 |
+
margin-left : 184px;
|
233 |
+
}
|
234 |
+
|
235 |
+
.metaboxes-tab .the-metabox.no-label.preview img {
|
236 |
+
box-shadow : 0 1px 8px rgba(0, 0, 0, 0.2);
|
237 |
+
}
|
238 |
+
|
239 |
+
/**************************************
|
240 |
+
FIELDS
|
241 |
+
***************************************/
|
242 |
+
|
243 |
+
.metaboxes-tab select,
|
244 |
+
.metaboxes-tab input[type=text],
|
245 |
+
.metaboxes-tab input[type=number],
|
246 |
+
.metaboxes-tab textarea,
|
247 |
+
.metaboxes-tab .yith-plugin-fw-select,
|
248 |
+
.metaboxes-tab .yith-plugin-fw-slider-container,
|
249 |
+
.metaboxes-tab .yith-plugin-fw-text-input,
|
250 |
+
.metaboxes-tab .yith-plugin-fw-text-array-table,
|
251 |
+
.metaboxes-tab .yith-plugin-fw-textarea {
|
252 |
+
width : 400px;
|
253 |
+
max-width : 100%;
|
254 |
+
}
|
255 |
+
|
256 |
+
.metaboxes-tab.yith-plugin-ui input[type=number] {
|
257 |
+
width : auto;
|
258 |
+
min-width : 90px;
|
259 |
+
}
|
260 |
+
|
261 |
+
.metaboxes-tab.yith-plugin-ui p {
|
262 |
+
font-size : 14px;
|
263 |
+
}
|
264 |
+
|
265 |
+
.metaboxes-tab.yith-plugin-ui p.section-description {
|
266 |
+
|
267 |
+
margin : 0 20px 40px 18px;
|
268 |
+
}
|
269 |
+
|
270 |
+
.metaboxes-tab .yith-plugin-fw-text-array-table input[type=text] {
|
271 |
+
width : 100%;
|
272 |
+
}
|
273 |
+
|
274 |
+
.metaboxes-tab.yith-plugin-ui .yith-add-box h3 {
|
275 |
+
padding : 0 0 30px 0;
|
276 |
+
font-weight : 600;
|
277 |
+
margin : 0;
|
278 |
+
}
|
279 |
+
|
280 |
+
.metaboxes-tab.yith-plugin-ui .select2-container--default .select2-selection--single {
|
281 |
+
border : 0;
|
282 |
+
margin : 0;
|
283 |
+
}
|
284 |
+
|
285 |
+
/* wp editor */
|
286 |
+
.the-metabox.textarea-editor .mceIframeContainer {
|
287 |
+
background : #fff;
|
288 |
+
}
|
289 |
+
|
290 |
+
|
291 |
+
.the-metabox.textarea-editor label {
|
292 |
+
margin-top : 24px;
|
293 |
+
}
|
294 |
+
|
295 |
+
/* categories */
|
296 |
+
.categories-panel {
|
297 |
+
width : 30%;
|
298 |
+
float : left;
|
299 |
+
margin-right : 4px;
|
300 |
+
}
|
301 |
+
|
302 |
+
.categories-panel .box {
|
303 |
+
height : 200px;
|
304 |
+
border : 1px solid #dfdfdf;
|
305 |
+
background : #fff;
|
306 |
+
padding : 6px 10px;
|
307 |
+
overflow : auto;
|
308 |
+
}
|
309 |
+
|
310 |
+
.categories-panel ul {
|
311 |
+
list-style : none;
|
312 |
+
margin : 0;
|
313 |
+
}
|
314 |
+
|
315 |
+
.categories-panel ul li {
|
316 |
+
line-height : 19px;
|
317 |
+
margin : 0;
|
318 |
+
padding : 0;
|
319 |
+
word-wrap : break-word;
|
320 |
+
}
|
321 |
+
|
322 |
+
.categories-panel ul li label {
|
323 |
+
font-weight : normal !important;
|
324 |
+
margin-left : 0 !important;
|
325 |
+
}
|
326 |
+
|
327 |
+
.categories-panel input.newcategory {
|
328 |
+
width : 100%;
|
329 |
+
margin-bottom : 3px;
|
330 |
+
}
|
331 |
+
|
332 |
+
/* contact form */
|
333 |
+
.contactform_item {
|
334 |
+
border-style : solid;
|
335 |
+
border-width : 1px;
|
336 |
+
line-height : 1;
|
337 |
+
margin-bottom : 20px;
|
338 |
+
padding : 0;
|
339 |
+
background-color : #f5f5f5;
|
340 |
+
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
341 |
+
border-color : #dfdfdf;
|
342 |
+
border-radius : 3px 3px 3px 3px;
|
343 |
+
box-shadow : 0 1px 0 #fff inset;
|
344 |
+
min-width : 255px;
|
345 |
+
position : relative;
|
346 |
+
}
|
347 |
+
|
348 |
+
.contactform_item .handlediv {
|
349 |
+
position : relative;
|
350 |
+
top : -4px;
|
351 |
+
}
|
352 |
+
|
353 |
+
.contactform_item h3 {
|
354 |
+
min-height : 21px;
|
355 |
+
margin : 13px;
|
356 |
+
}
|
357 |
+
|
358 |
+
.contactform_item .inside {
|
359 |
+
padding : 10px !important;
|
360 |
+
}
|
361 |
+
|
362 |
+
.contactform_item .deps {
|
363 |
+
display : none;
|
364 |
+
}
|
365 |
+
|
366 |
+
.contactform_item .addoptions p.option {
|
367 |
+
margin : 5px 0 5px 200px
|
368 |
+
}
|
369 |
+
|
370 |
+
.contactform_item .addoptions p label {
|
371 |
+
width : 80px !important;
|
372 |
+
}
|
373 |
+
|
374 |
+
.contactform_item .add-field-option {
|
375 |
+
margin-bottom : 10px !important;
|
376 |
+
}
|
377 |
+
|
378 |
+
.remove_item {
|
379 |
+
float : right;
|
380 |
+
}
|
381 |
+
|
382 |
+
.metabox-sortable-placeholder {
|
383 |
+
border : 1px dotted #dedede;
|
384 |
+
margin : 10px 0
|
385 |
+
}
|
386 |
+
|
387 |
+
/* features tab */
|
388 |
+
.featurestab_item {
|
389 |
+
border-style : solid;
|
390 |
+
border-width : 1px;
|
391 |
+
line-height : 1;
|
392 |
+
margin-bottom : 20px;
|
393 |
+
padding : 0;
|
394 |
+
background-color : #f5f5f5;
|
395 |
+
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
396 |
+
border-color : #dfdfdf;
|
397 |
+
border-radius : 3px 3px 3px 3px;
|
398 |
+
box-shadow : 0 1px 0 #fff inset;
|
399 |
+
min-width : 255px;
|
400 |
+
position : relative;
|
401 |
+
}
|
402 |
+
|
403 |
+
.featurestab_item .handlediv {
|
404 |
+
position : relative;
|
405 |
+
top : -4px;
|
406 |
+
}
|
407 |
+
|
408 |
+
.featurestab_item h3 {
|
409 |
+
min-height : 21px
|
410 |
+
}
|
411 |
+
|
412 |
+
.featurestab_item .inside {
|
413 |
+
padding : 10px !important;
|
414 |
+
}
|
415 |
+
|
416 |
+
.featurestab_item .deps {
|
417 |
+
display : none;
|
418 |
+
}
|
419 |
+
|
420 |
+
.featurestab_item .addoptions p.option {
|
421 |
+
margin : 5px 0 5px 200px
|
422 |
+
}
|
423 |
+
|
424 |
+
.featurestab_item .addoptions p label {
|
425 |
+
width : 80px !important;
|
426 |
+
}
|
427 |
+
|
428 |
+
.featurestab_item .add-field-option {
|
429 |
+
margin-bottom : 10px !important;
|
430 |
+
}
|
431 |
+
|
432 |
+
.messages-panel.updated {
|
433 |
+
margin : 10px 0px 10px !important;
|
434 |
+
max-width : 1200px;
|
435 |
+
border-radius : 5px;
|
436 |
+
-webkit-box-sizing : border-box;
|
437 |
+
box-sizing : border-box;
|
438 |
+
}
|
439 |
+
|
440 |
+
.ui-widget-overlay {
|
441 |
+
background-image : none !important;
|
442 |
+
}
|
443 |
+
|
444 |
+
.the-metabox .icon_type {
|
445 |
+
width : 30%;
|
446 |
+
float : left;
|
447 |
+
margin-right : 40px
|
448 |
+
}
|
449 |
+
|
450 |
+
#post-type-settings .category-list label {
|
451 |
+
width : 187px;
|
452 |
+
}
|
453 |
+
|
454 |
+
.remove_cat {
|
455 |
+
float : right;
|
456 |
+
text-align : center;
|
457 |
+
display : block;
|
458 |
+
width : 20px;
|
459 |
+
height : 20px;
|
460 |
+
border-radius : 20px;
|
461 |
+
font-weight : bold;
|
462 |
+
font-size : 10px;
|
463 |
+
background : #efefef;
|
464 |
+
text-decoration : none;
|
465 |
+
}
|
466 |
+
|
467 |
+
/* typography */
|
468 |
+
.the-metabox.typography .select_wrapper.font-family {
|
469 |
+
width : 200px;
|
470 |
+
}
|
471 |
+
|
472 |
+
.the-metabox.typography .spinner_container {
|
473 |
+
float : left;
|
474 |
+
margin-right : 10px;
|
475 |
+
}
|
476 |
+
|
477 |
+
.the-metabox.typography .spinner_container input.number {
|
478 |
+
width : 50px !important;
|
479 |
+
-webkit-border-top-right-radius : 0px;
|
480 |
+
-webkit-border-bottom-right-radius : 0px;
|
481 |
+
-moz-border-radius-topright : 0px;
|
482 |
+
-moz-border-radius-bottomright : 0px;
|
483 |
+
border-top-right-radius : 0px;
|
484 |
+
border-bottom-right-radius : 0px;
|
485 |
+
}
|
486 |
+
|
487 |
+
/* number */
|
488 |
+
.the-metabox.number input.number {
|
489 |
+
width : 50px !important;
|
490 |
+
}
|
491 |
+
|
492 |
+
/* number */
|
493 |
+
.rm_number .number {
|
494 |
+
width : 70px;
|
495 |
+
text-align : right;
|
496 |
+
-webkit-border-top-right-radius : 0px;
|
497 |
+
-webkit-border-bottom-right-radius : 0px;
|
498 |
+
-moz-border-radius-topright : 0px;
|
499 |
+
-moz-border-radius-bottomright : 0px;
|
500 |
+
border-top-right-radius : 0px;
|
501 |
+
border-bottom-right-radius : 0px;
|
502 |
+
}
|
503 |
+
|
504 |
+
.spinner-wrapper {
|
505 |
+
position : relative;
|
506 |
+
height : 23px;
|
507 |
+
overflow : hidden;
|
508 |
+
}
|
509 |
+
|
510 |
+
.spinner-wrapper input.number {
|
511 |
+
float : left;
|
512 |
+
}
|
513 |
+
|
514 |
+
.spinner-wrapper .spinner-button {
|
515 |
+
cursor : pointer;
|
516 |
+
float : left;
|
517 |
+
position : absolute;
|
518 |
+
left : 69px;
|
519 |
+
width : 15px;
|
520 |
+
height : 12px;
|
521 |
+
border : 1px solid #dfdfdf;
|
522 |
+
background : #fff;
|
523 |
+
margin : 0;
|
524 |
+
padding : 0;
|
525 |
+
line-height : 9999px;
|
526 |
+
overflow : hidden;
|
527 |
+
background : url('../images/spinner.png') no-repeat center -11px
|
528 |
+
}
|
529 |
+
|
530 |
+
.spinner-wrapper .spinner-button.button-plus {
|
531 |
+
top : 0;
|
532 |
+
-webkit-border-top-right-radius : 3px !important;
|
533 |
+
-moz-border-radius-topright : 3px !important;
|
534 |
+
border-top-right-radius : 3px !important;
|
535 |
+
}
|
536 |
+
|
537 |
+
.spinner-wrapper .spinner-button.button-minus {
|
538 |
+
bottom : 0;
|
539 |
+
background-position : center -30px;
|
540 |
+
-webkit-border-bottom-right-radius : 3px !important;
|
541 |
+
-moz-border-radius-bottomright : 3px !important;
|
542 |
+
border-bottom-right-radius : 3px !important;
|
543 |
+
}
|
544 |
+
|
545 |
+
.spinner-wrapper .spinner-button.button-plus:active {
|
546 |
+
background-position : center 0px;
|
547 |
+
}
|
548 |
+
|
549 |
+
.spinner-wrapper .spinner-button.button-minus:active {
|
550 |
+
background-position : center -20px;
|
551 |
+
}
|
552 |
+
|
553 |
+
.rm_typography .spinner_container {
|
554 |
+
float : left;
|
555 |
+
margin-right : 10px;
|
556 |
+
}
|
557 |
+
|
558 |
+
.rm_typography .spinner-wrapper {
|
559 |
+
height : 28px;
|
560 |
+
}
|
561 |
+
|
562 |
+
.rm_typography .spinner-wrapper input.number {
|
563 |
+
height : 28px;
|
564 |
+
}
|
565 |
+
|
566 |
+
.rm_typography .spinner-wrapper .spinner-button.button-plus {
|
567 |
+
height : 15px;
|
568 |
+
background-position : center -10px;
|
569 |
+
}
|
570 |
+
|
571 |
+
.rm_typography .spinner-wrapper .spinner-button.button-minus {
|
572 |
+
height : 14px;
|
573 |
+
}
|
574 |
+
|
575 |
+
.the-metabox .spinner-wrapper .spinner-button {
|
576 |
+
left : 49px;
|
577 |
+
}
|
578 |
+
|
579 |
+
.the-metabox.typography .spinner-wrapper .spinner-button {
|
580 |
+
left : 35px;
|
581 |
+
}
|
582 |
+
|
583 |
+
/* images */
|
584 |
+
.the-metabox.images, .the-metabox.images label {
|
585 |
+
margin-left : 0;
|
586 |
+
display : block;
|
587 |
+
}
|
588 |
+
|
589 |
+
.the-metabox.images .slides-wrapper {
|
590 |
+
clear : both;
|
591 |
+
}
|
592 |
+
|
593 |
+
.the-metabox.images .slides-wrapper li {
|
594 |
+
position : relative;
|
595 |
+
}
|
596 |
+
|
597 |
+
.the-metabox.images a.delete {
|
598 |
+
display : block;
|
599 |
+
margin-left : 4px;
|
600 |
+
text-decoration : none;
|
601 |
+
font-weight : bold;
|
602 |
+
color : red;
|
603 |
+
position : absolute;
|
604 |
+
top : 0;
|
605 |
+
right : 0;
|
606 |
+
width : 10px;
|
607 |
+
height : 18px;
|
608 |
+
z-index : 10;
|
609 |
+
cursor : pointer !important;
|
610 |
+
}
|
611 |
+
|
612 |
+
/* wp editor */
|
613 |
+
.wp_themeSkin iframe {
|
614 |
+
background : #fff !important;
|
615 |
+
}
|
616 |
+
|
617 |
+
/* custom tabs */
|
618 |
+
.customtab_item {
|
619 |
+
border-style : solid;
|
620 |
+
border-width : 1px;
|
621 |
+
line-height : 1;
|
622 |
+
margin-bottom : 20px;
|
623 |
+
padding : 0;
|
624 |
+
background-color : #f5f5f5;
|
625 |
+
background-image : -moz-linear-gradient(center top, #f9f9f9, #f5f5f5);
|
626 |
+
border-color : #dfdfdf;
|
627 |
+
border-radius : 3px 3px 3px 3px;
|
628 |
+
box-shadow : 0 1px 0 #fff inset;
|
629 |
+
min-width : 255px;
|
630 |
+
position : relative;
|
631 |
+
}
|
632 |
+
|
633 |
+
.customtab_item .handlediv {
|
634 |
+
position : relative;
|
635 |
+
top : -4px;
|
636 |
+
}
|
637 |
+
|
638 |
+
.customtab_item h3 {
|
639 |
+
min-height : 21px
|
640 |
+
}
|
641 |
+
|
642 |
+
.customtab_item .inside {
|
643 |
+
padding : 10px !important;
|
644 |
+
}
|
645 |
+
|
646 |
+
.customtab_item .deps {
|
647 |
+
display : none;
|
648 |
+
}
|
649 |
+
|
650 |
+
.customtab_item .addoptions p.option {
|
651 |
+
margin : 5px 0 5px 200px
|
652 |
+
}
|
653 |
+
|
654 |
+
.customtab_item .addoptions p label {
|
655 |
+
width : 80px !important;
|
656 |
+
}
|
657 |
+
|
658 |
+
.customtab_item .add-field-option {
|
659 |
+
margin-bottom : 10px !important;
|
660 |
+
}
|
661 |
+
|
662 |
+
.customtab_item .remove_item {
|
663 |
+
float : right;
|
664 |
+
}
|
665 |
+
|
666 |
+
.metabox-sortable-placeholder {
|
667 |
+
border : 1px dotted #dedede;
|
668 |
+
margin : 10px 0
|
669 |
+
}
|
670 |
+
|
671 |
+
.the-metabox.customtabs {
|
672 |
+
margin-left : 0;
|
673 |
+
}
|
674 |
+
|
675 |
+
#customtab_item_sample {
|
676 |
+
display : none;
|
677 |
+
}
|
678 |
+
|
679 |
+
.the-metabox.customtabs .field-row {
|
680 |
+
margin-bottom : 10px;
|
681 |
+
}
|
682 |
+
|
683 |
+
#yit_custom_tabs label {
|
684 |
+
font-weight : normal;
|
685 |
+
width : auto;
|
686 |
+
float : none;
|
687 |
+
line-height : auto;
|
688 |
+
margin-left : 0;
|
689 |
+
}
|
690 |
+
|
691 |
+
.wp-admin p label input[type=radio] {
|
692 |
+
width : 16px;
|
693 |
+
margin-right : 10px;
|
694 |
+
margin-top : 3px;
|
695 |
+
}
|
696 |
+
|
697 |
+
.wp-admin .form-field._preset_onsale_icon_field label input[type=radio] {
|
698 |
+
margin-top : 0;
|
699 |
+
}
|
700 |
+
|
701 |
+
.the-metabox .spinner {
|
702 |
+
margin-top : 5px;
|
703 |
+
float : none;
|
704 |
+
}
|
705 |
+
|
706 |
+
/*sidebars*/
|
707 |
+
#choose-sidebars.choose {
|
708 |
+
margin-left : 0px;
|
709 |
+
}
|
710 |
+
|
711 |
+
#_active_page_options-container label, #_active_page_options-container p {
|
712 |
+
display : inline-block;
|
713 |
+
margin : 0px;
|
714 |
+
}
|
715 |
+
|
716 |
+
#_active_page_options-container label {
|
717 |
+
margin-right : 10px;
|
718 |
+
margin-top : 3px;
|
719 |
+
}
|
720 |
+
|
721 |
+
#_active_page_options-container {
|
722 |
+
float : right;
|
723 |
+
margin-right : 20px;
|
724 |
+
margin-top : 5px;
|
725 |
+
z-index : 9999 !important;
|
726 |
+
position : absolute;
|
727 |
+
right : 0;
|
728 |
+
}
|
729 |
+
|
730 |
+
/*-----------------------
|
731 |
+
* Colorpicker - fix issues in combination with third-party themes or plugin (Basel, VC Addons, ...)
|
732 |
+
*/
|
733 |
+
.metaboxes-tab .the-metabox.colorpicker {
|
734 |
+
display : block;
|
735 |
+
width : auto;
|
736 |
+
height : auto;
|
737 |
+
overflow : visible;
|
738 |
+
top : auto;
|
739 |
+
left : auto;
|
740 |
+
background : transparent;
|
741 |
+
position : static;
|
742 |
+
z-index : 1;
|
743 |
+
font-family : inherit;
|
744 |
+
}
|
745 |
+
|
746 |
+
.the-metabox.checkbox.checkboxgroup-start.clearfix {
|
747 |
+
margin : 40px 0 0 264px;
|
748 |
+
}
|
749 |
+
|
750 |
+
.the-metabox.checkbox.checkboxgroup.clearfix {
|
751 |
+
margin : 0 0 0 264px;
|
752 |
}
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -1,1087 +1,1087 @@
|
|
1 |
-
/*
|
2 |
-
* This file belongs to the YIT Plugin Framework.
|
3 |
-
*
|
4 |
-
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
-
* that is bundled with this package in the file LICENSE.txt.
|
6 |
-
* It is also available through the world-wide-web at this URL:
|
7 |
-
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
-
*/
|
9 |
-
.plugin-option tr {
|
10 |
-
border-bottom : 1px solid #ebebeb;
|
11 |
-
}
|
12 |
-
|
13 |
-
.plugin-option .yit_options,
|
14 |
-
.plugin-option .yit-options {
|
15 |
-
border-bottom : 0px;
|
16 |
-
}
|
17 |
-
|
18 |
-
.plugin-option .yit-options .option,
|
19 |
-
.plugin-option .yit_options .option {
|
20 |
-
width : 600px;
|
21 |
-
}
|
22 |
-
|
23 |
-
.plugin-option .form-table > tbody > tr > td {
|
24 |
-
padding : 25px 15px;
|
25 |
-
}
|
26 |
-
|
27 |
-
.ie8 .yit_options select,
|
28 |
-
.ie8 .yit-options select {
|
29 |
-
height : 26px;
|
30 |
-
}
|
31 |
-
|
32 |
-
/* Style to woocommerce panel*/
|
33 |
-
|
34 |
-
#plugin-fw-wc, #yith-plugin-fw-panel {
|
35 |
-
padding-top : 20px;
|
36 |
-
}
|
37 |
-
|
38 |
-
#plugin-fw-wc table.form-table, #yith-plugin-fw-panel table.form-table, .yith-plugin-fw-panel-custom-tab-container {
|
39 |
-
background-color : #fff;
|
40 |
-
margin-bottom : 20px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.yith-plugin-fw-panel-custom-tab-container {
|
44 |
-
padding : 20px;
|
45 |
-
box-sizing : border-box;
|
46 |
-
margin-right : 15px;
|
47 |
-
}
|
48 |
-
|
49 |
-
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container {
|
50 |
-
border : 1px solid #ddd;
|
51 |
-
border-top : 0;
|
52 |
-
}
|
53 |
-
|
54 |
-
.yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container {
|
55 |
-
padding : 20px;
|
56 |
-
box-sizing : border-box;
|
57 |
-
border : 1px solid #ccc;
|
58 |
-
border-top : 0;
|
59 |
-
margin : -20px 0 0 0;
|
60 |
-
}
|
61 |
-
|
62 |
-
.yith-plugin-fw-panel-custom-tab-container > h2,
|
63 |
-
.yith-plugin-fw-panel-custom-tab-container h2,
|
64 |
-
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container > h2,
|
65 |
-
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container h2,
|
66 |
-
.yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container > h2,
|
67 |
-
.yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container h2 {
|
68 |
-
border : none;
|
69 |
-
padding : 15px 0;
|
70 |
-
}
|
71 |
-
|
72 |
-
#plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
|
73 |
-
padding : 20px;
|
74 |
-
}
|
75 |
-
|
76 |
-
#plugin-fw-wc h3, #yith-plugin-fw-panel h3 {
|
77 |
-
padding : 0 0 0 10px;
|
78 |
-
margin : 0;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
Help tab
|
83 |
-
*/
|
84 |
-
|
85 |
-
.yith-plugin-fw-panel-help-tab-container {
|
86 |
-
background-color : #fff;
|
87 |
-
padding : 60px 25px;
|
88 |
-
}
|
89 |
-
|
90 |
-
.yith-plugin-fw-panel-help-tab-content {
|
91 |
-
background-color : #f4f4f4;
|
92 |
-
border-radius : 15px;
|
93 |
-
max-width : 1100px;
|
94 |
-
margin : 0 auto;
|
95 |
-
padding : 40px 40px 60px;
|
96 |
-
}
|
97 |
-
|
98 |
-
.yith-plugin-fw-panel-help-tab-content p,
|
99 |
-
.yith-plugin-fw-panel-help-tab-content a {
|
100 |
-
font-size : 16px;
|
101 |
-
}
|
102 |
-
|
103 |
-
.yith-plugin-fw-panel-help-tab-content .row {
|
104 |
-
margin : 0 -15px 50px;
|
105 |
-
white-space : nowrap;
|
106 |
-
}
|
107 |
-
|
108 |
-
.yith-plugin-fw-panel-help-tab-content .row:last-child {
|
109 |
-
margin-bottom : 0;
|
110 |
-
}
|
111 |
-
|
112 |
-
.yith-plugin-fw-panel-help-tab-content .row .column-left,
|
113 |
-
.yith-plugin-fw-panel-help-tab-content .row .column-right {
|
114 |
-
display : inline-block;
|
115 |
-
padding : 0 15px;
|
116 |
-
vertical-align : top;
|
117 |
-
width : 66%;
|
118 |
-
}
|
119 |
-
|
120 |
-
.yith-plugin-fw-panel-help-tab-content .row .column-right {
|
121 |
-
width : 33%;
|
122 |
-
}
|
123 |
-
|
124 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video,
|
125 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-actions,
|
126 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles,
|
127 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket {
|
128 |
-
box-sizing : border-box;
|
129 |
-
white-space : normal;
|
130 |
-
}
|
131 |
-
|
132 |
-
.yith-plugin-fw-panel-help-tab-content h2.yith-plugin-fw-panel-help-tab-title {
|
133 |
-
background : none;
|
134 |
-
border : none;
|
135 |
-
font-size : 22px;
|
136 |
-
line-height : 1.5em;
|
137 |
-
padding : 0;
|
138 |
-
text-align : center;
|
139 |
-
}
|
140 |
-
|
141 |
-
.yith-plugin-fw-panel-help-tab-content h3 {
|
142 |
-
color : #03689f;
|
143 |
-
font-size : 15px;
|
144 |
-
}
|
145 |
-
|
146 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-panel-tab-description {
|
147 |
-
font-size : 18px;
|
148 |
-
text-align : center;
|
149 |
-
margin-bottom : 40px;
|
150 |
-
}
|
151 |
-
|
152 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video {
|
153 |
-
text-align : center;
|
154 |
-
}
|
155 |
-
|
156 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video p.video-description {
|
157 |
-
margin-bottom : 25px;
|
158 |
-
}
|
159 |
-
|
160 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video .video-caption p {
|
161 |
-
margin : 5px 0;
|
162 |
-
}
|
163 |
-
|
164 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video .video-container {
|
165 |
-
margin : 0 auto 50px;
|
166 |
-
overflow : hidden;
|
167 |
-
padding-top : 56.25%;
|
168 |
-
position : relative;
|
169 |
-
}
|
170 |
-
|
171 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video .video-container iframe {
|
172 |
-
border : 0;
|
173 |
-
height : 100%;
|
174 |
-
left : 0;
|
175 |
-
position : absolute;
|
176 |
-
top : 0;
|
177 |
-
width : 100%;
|
178 |
-
}
|
179 |
-
|
180 |
-
.yith-plugin-fw-panel-help-tab-content .box-with-shadow {
|
181 |
-
display : block;
|
182 |
-
background-color : #fff;
|
183 |
-
border-radius : 5px;
|
184 |
-
box-shadow : 0 0 15px 5px rgba(174, 201, 207, 0.3);
|
185 |
-
transition : all .2s ease;
|
186 |
-
}
|
187 |
-
|
188 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions,
|
189 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket {
|
190 |
-
margin : 0 auto;
|
191 |
-
max-width : 640px;
|
192 |
-
}
|
193 |
-
|
194 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions:not( .full-width ) {
|
195 |
-
padding-top : 65px !important;
|
196 |
-
}
|
197 |
-
|
198 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li {
|
199 |
-
margin-bottom : 20px;
|
200 |
-
}
|
201 |
-
|
202 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li > a {
|
203 |
-
display : block;
|
204 |
-
padding : 15px 20px 15px 75px !important;
|
205 |
-
text-decoration : none;
|
206 |
-
}
|
207 |
-
|
208 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li:hover {
|
209 |
-
box-shadow : 0 0 15px 5px rgba(177, 220, 228, 0.6);
|
210 |
-
transform : scale(1.04);
|
211 |
-
}
|
212 |
-
|
213 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li a:before {
|
214 |
-
color : #03689f;
|
215 |
-
float : left;
|
216 |
-
font-family : 'yith-icon';
|
217 |
-
font-size : 36px;
|
218 |
-
line-height : 1;
|
219 |
-
margin-left : -50px;
|
220 |
-
-webkit-font-smoothing : antialiased;
|
221 |
-
-moz-osx-font-smoothing : grayscale;
|
222 |
-
}
|
223 |
-
|
224 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li.read-documentation a:before {
|
225 |
-
content : '\f10d';
|
226 |
-
}
|
227 |
-
|
228 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li.watch-videotutorials a:before {
|
229 |
-
content : '\f10e';
|
230 |
-
}
|
231 |
-
|
232 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li.check-faqs a:before {
|
233 |
-
content : '\f10c';
|
234 |
-
}
|
235 |
-
|
236 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li h4 {
|
237 |
-
margin : 0 0 5px;
|
238 |
-
}
|
239 |
-
|
240 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li h4 a {
|
241 |
-
color : #03689f;
|
242 |
-
text-decoration : none;
|
243 |
-
}
|
244 |
-
|
245 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li .description {
|
246 |
-
margin : 0;
|
247 |
-
font-size : 14px;
|
248 |
-
}
|
249 |
-
|
250 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li .separator {
|
251 |
-
display : inline-block;
|
252 |
-
margin : 0 5px;
|
253 |
-
}
|
254 |
-
|
255 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles h3 {
|
256 |
-
font-size : 18px;
|
257 |
-
margin : 0;
|
258 |
-
padding : 10px 0;
|
259 |
-
position : relative;
|
260 |
-
|
261 |
-
}
|
262 |
-
|
263 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles h3:before {
|
264 |
-
content : '';
|
265 |
-
background : #03689f;
|
266 |
-
display : block;
|
267 |
-
height : 100%;
|
268 |
-
left : -40px;
|
269 |
-
position : absolute;
|
270 |
-
top : 0;
|
271 |
-
width : 15px;
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles a.button {
|
276 |
-
font-size : 16px;
|
277 |
-
}
|
278 |
-
|
279 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list {
|
280 |
-
margin : 15px 0 30px;
|
281 |
-
}
|
282 |
-
|
283 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list li {
|
284 |
-
display : block;
|
285 |
-
margin-bottom : 10px;
|
286 |
-
}
|
287 |
-
|
288 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list li:before {
|
289 |
-
content : '-';
|
290 |
-
}
|
291 |
-
|
292 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list a {
|
293 |
-
text-decoration : none;
|
294 |
-
}
|
295 |
-
|
296 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket > .box-with-shadow {
|
297 |
-
padding : 30px !important;
|
298 |
-
}
|
299 |
-
|
300 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket h3 {
|
301 |
-
color : #b90a0a;
|
302 |
-
font-size : 18px;
|
303 |
-
margin : 0 0 15px;
|
304 |
-
}
|
305 |
-
|
306 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket p {
|
307 |
-
margin-bottom : 35px;
|
308 |
-
}
|
309 |
-
|
310 |
-
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket .button {
|
311 |
-
border-radius : 7px;
|
312 |
-
display : block;
|
313 |
-
font-size : 15px;
|
314 |
-
padding : 7px 15px;
|
315 |
-
text-align : center;
|
316 |
-
}
|
317 |
-
|
318 |
-
/**
|
319 |
-
Post type Edit
|
320 |
-
*/
|
321 |
-
|
322 |
-
.yith-plugin-fw-wp-page-wrapper {
|
323 |
-
margin : 23px 20px 0 2px;
|
324 |
-
}
|
325 |
-
|
326 |
-
.yith-plugin-fw-wp-page-wrapper .notice,
|
327 |
-
.yith-plugin-fw-wp-page-wrapper div.updated,
|
328 |
-
.yith-plugin-fw-wp-page-wrapper div.error {
|
329 |
-
margin : 5px 15px 15px 0;
|
330 |
-
}
|
331 |
-
|
332 |
-
.yith-plugin-fw-wp-page-wrapper .wrap, .yith-plugin-fw-wp-page__sub-tab-wrap {
|
333 |
-
border : 1px solid #d8d8d8;
|
334 |
-
border-top : 0;
|
335 |
-
margin : 0 15px 0 0;
|
336 |
-
background : #fff;
|
337 |
-
padding : 20px;
|
338 |
-
box-sizing : border-box;
|
339 |
-
}
|
340 |
-
|
341 |
-
.yith-plugin-fw-wp-page-wrapper .yith-plugin-fw-wp-page__sub-tab-wrap .wrap {
|
342 |
-
margin : -20px 0 0 0;
|
343 |
-
}
|
344 |
-
|
345 |
-
#wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
|
346 |
-
padding-bottom : 0;
|
347 |
-
}
|
348 |
-
|
349 |
-
.yith-plugin-fw-wp-page-wrapper .postbox {
|
350 |
-
box-shadow : none;
|
351 |
-
}
|
352 |
-
|
353 |
-
.yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
354 |
-
padding-top : 9px;
|
355 |
-
padding-bottom : 0;
|
356 |
-
}
|
357 |
-
|
358 |
-
.yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
|
359 |
-
color : #2a8db0;
|
360 |
-
font-size : 16px;
|
361 |
-
font-weight : 600;
|
362 |
-
}
|
363 |
-
|
364 |
-
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action,
|
365 |
-
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:active {
|
366 |
-
border-radius : 3px;
|
367 |
-
text-transform : uppercase;
|
368 |
-
box-shadow : none;
|
369 |
-
border : 0;
|
370 |
-
font-weight : 700;
|
371 |
-
font-size : 11px;
|
372 |
-
padding : 0 14px;
|
373 |
-
outline : none;
|
374 |
-
height : auto;
|
375 |
-
transition : all ease 0.3s;
|
376 |
-
text-shadow : none;
|
377 |
-
vertical-align : middle;
|
378 |
-
line-height : 26px;
|
379 |
-
display : inline-block;
|
380 |
-
text-decoration : none;
|
381 |
-
cursor : pointer;
|
382 |
-
background-color : #375f6b;
|
383 |
-
color : #fff;
|
384 |
-
margin-left : 10px !important;
|
385 |
-
}
|
386 |
-
|
387 |
-
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
|
388 |
-
border-color : #007694;
|
389 |
-
background : #007694;
|
390 |
-
color : #fff;
|
391 |
-
}
|
392 |
-
|
393 |
-
.yith-plugin-fw-wp-page-wrapper #wp-content-editor-tools {
|
394 |
-
background : transparent;
|
395 |
-
}
|
396 |
-
|
397 |
-
/* === Plugins Upgrader === */
|
398 |
-
|
399 |
-
.yit-plugin-changelog-wrapper {
|
400 |
-
display : none;
|
401 |
-
}
|
402 |
-
|
403 |
-
.yit-plugin-changelog-title {
|
404 |
-
text-transform : uppercase;
|
405 |
-
}
|
406 |
-
|
407 |
-
.yit-plugin-changelog {
|
408 |
-
height : calc(100% - 15px);
|
409 |
-
width : calc(100% - 15px);
|
410 |
-
overflow-x : hidden;
|
411 |
-
overflow-y : auto;
|
412 |
-
z-index : 999;
|
413 |
-
background : #fcfcfc;
|
414 |
-
}
|
415 |
-
|
416 |
-
/* === Plugins Licence Activation === */
|
417 |
-
|
418 |
-
.yit-container.plugin-licence-activation {
|
419 |
-
font-family : 'Raleway', sans-serif;
|
420 |
-
}
|
421 |
-
|
422 |
-
.yit-container.plugin-licence-activation .to-active-wrapper {
|
423 |
-
margin-bottom : 60px;
|
424 |
-
}
|
425 |
-
|
426 |
-
.yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form {
|
427 |
-
position : relative;
|
428 |
-
border-color : #e1e1e1;
|
429 |
-
border-style : solid;
|
430 |
-
border-width : 0;
|
431 |
-
}
|
432 |
-
|
433 |
-
.yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:first-child {
|
434 |
-
border-top-width : 1px;
|
435 |
-
}
|
436 |
-
|
437 |
-
.yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:last-child {
|
438 |
-
border-bottom-width : 1px;
|
439 |
-
}
|
440 |
-
|
441 |
-
.yit-container.plugin-licence-activation .to-active-wrapper table.to-active-table {
|
442 |
-
border-width : 0;
|
443 |
-
border-spacing : 0;
|
444 |
-
width : 100%;
|
445 |
-
}
|
446 |
-
|
447 |
-
.yit-container.plugin-licence-activation .message {
|
448 |
-
display : none;
|
449 |
-
line-height : normal;
|
450 |
-
background : #fff url(../images/licence-error.png) 15px center no-repeat;
|
451 |
-
padding-left : 65px;
|
452 |
-
padding-right : 15px;
|
453 |
-
width : 150px;
|
454 |
-
}
|
455 |
-
|
456 |
-
.yit-container.plugin-licence-activation .message-wrapper {
|
457 |
-
height : 75px;
|
458 |
-
display : none;
|
459 |
-
position : absolute;
|
460 |
-
top : 0;
|
461 |
-
right : -250px;
|
462 |
-
border : 1px solid #ff3838;
|
463 |
-
}
|
464 |
-
|
465 |
-
.yit-container.plugin-licence-activation .message-wrapper.visible {
|
466 |
-
display : table;
|
467 |
-
}
|
468 |
-
|
469 |
-
.yit-container.plugin-licence-activation .message {
|
470 |
-
display : table-cell;
|
471 |
-
vertical-align : middle;
|
472 |
-
}
|
473 |
-
|
474 |
-
.yit-container.plugin-licence-activation .arrow-left:after,
|
475 |
-
.yit-container.plugin-licence-activation .arrow-left:before {
|
476 |
-
content : "";
|
477 |
-
display : block;
|
478 |
-
width : 0;
|
479 |
-
height : 0;
|
480 |
-
position : absolute;
|
481 |
-
}
|
482 |
-
|
483 |
-
.yit-container.plugin-licence-activation .arrow-left:before {
|
484 |
-
border-top : 9px solid transparent;
|
485 |
-
border-bottom : 9px solid transparent;
|
486 |
-
border-right : 9px solid #ff3838;
|
487 |
-
top : 26px;
|
488 |
-
left : -9px;
|
489 |
-
}
|
490 |
-
|
491 |
-
.yit-container.plugin-licence-activation .arrow-left:after {
|
492 |
-
border-top : 8px solid transparent;
|
493 |
-
border-bottom : 8px solid transparent;
|
494 |
-
border-right : 8px solid #fff;
|
495 |
-
left : -8px;
|
496 |
-
top : 27px;
|
497 |
-
}
|
498 |
-
|
499 |
-
.yit-container.plugin-licence-activation h2,
|
500 |
-
.yit-container.plugin-licence-activation h3 {
|
501 |
-
text-transform : uppercase;
|
502 |
-
font-weight : 800;
|
503 |
-
margin-bottom : 30px;
|
504 |
-
}
|
505 |
-
|
506 |
-
.yit-container.plugin-licence-activation h2 {
|
507 |
-
color : #808a97;
|
508 |
-
font-size : 25px;
|
509 |
-
}
|
510 |
-
|
511 |
-
.yit-container.plugin-licence-activation h3 {
|
512 |
-
color : #313131;
|
513 |
-
font-size : 15px;
|
514 |
-
height : 20px;
|
515 |
-
}
|
516 |
-
|
517 |
-
.yit-container.plugin-licence-activation h3.to-active {
|
518 |
-
height : 20px;
|
519 |
-
position : relative;
|
520 |
-
vertical-align : top;
|
521 |
-
}
|
522 |
-
|
523 |
-
.yit-container.plugin-licence-activation .spinner.show {
|
524 |
-
display : inline-block;
|
525 |
-
vertical-align : middle;
|
526 |
-
float : none;
|
527 |
-
}
|
528 |
-
|
529 |
-
.yit-container.plugin-licence-activation h3.to-active > .spinner.show {
|
530 |
-
display : inline-block;
|
531 |
-
float : none;
|
532 |
-
top : -3px;
|
533 |
-
position : relative;
|
534 |
-
}
|
535 |
-
|
536 |
-
.yit-container.plugin-licence-activation .licence-check-section {
|
537 |
-
margin-bottom : 60px;
|
538 |
-
}
|
539 |
-
|
540 |
-
.yit-container.plugin-licence-activation span.licence-label {
|
541 |
-
font-weight : 500;
|
542 |
-
color : #606060;
|
543 |
-
margin-bottom : 30px;
|
544 |
-
}
|
545 |
-
|
546 |
-
.yit-container.plugin-licence-activation .button-licence {
|
547 |
-
border : 0;
|
548 |
-
font-size : 13px;
|
549 |
-
text-transform : uppercase;
|
550 |
-
background-color : #808a97;
|
551 |
-
color : #fff;
|
552 |
-
font-weight : 700;
|
553 |
-
border-radius : 3px;
|
554 |
-
cursor : pointer;
|
555 |
-
text-decoration : none;
|
556 |
-
padding : 5px 7px;
|
557 |
-
-webkit-transition : background-color 0.3s ease;
|
558 |
-
-moz-transition : background-color 0.3s ease;
|
559 |
-
-ms-transition : background-color 0.3s ease;
|
560 |
-
-o-transition : background-color 0.3s ease;
|
561 |
-
transition : background-color 0.3s ease;
|
562 |
-
}
|
563 |
-
|
564 |
-
.yit-container.plugin-licence-activation .button-licence:hover {
|
565 |
-
background-color : #4d5c6f;
|
566 |
-
}
|
567 |
-
|
568 |
-
.yit-container.plugin-licence-activation .button-licence.clicked {
|
569 |
-
cursor : not-allowed;
|
570 |
-
background-color : #e2e2e2 !important;
|
571 |
-
}
|
572 |
-
|
573 |
-
.yit-container.plugin-licence-activation .button-licence.licence-check {
|
574 |
-
font-weight : 400;
|
575 |
-
padding : 12px 19px;
|
576 |
-
}
|
577 |
-
|
578 |
-
.yit-container.plugin-licence-activation .button-licence.licence-renew {
|
579 |
-
text-decoration : none;
|
580 |
-
padding : 7px 12px;
|
581 |
-
font-size : 9px;
|
582 |
-
}
|
583 |
-
|
584 |
-
.yit-container.plugin-licence-activation .button-licence.licence-renew:focus {
|
585 |
-
box-shadow : none;
|
586 |
-
}
|
587 |
-
|
588 |
-
.yit-container.plugin-licence-activation table:not(.to-active-table) {
|
589 |
-
width : 100%;
|
590 |
-
border : 1px solid #dcdcdc;
|
591 |
-
border-spacing : 0;
|
592 |
-
border-radius : 5px;
|
593 |
-
border-collapse : separate;
|
594 |
-
overflow : hidden;
|
595 |
-
}
|
596 |
-
|
597 |
-
.yit-container.plugin-licence-activation table:not(.to-active-table) th {
|
598 |
-
border-bottom : 1px solid #dcdcdc;
|
599 |
-
}
|
600 |
-
|
601 |
-
.yit-container.plugin-licence-activation table:not(.to-active-table) td,
|
602 |
-
.yit-container.plugin-licence-activation table:not(.to-active-table) th {
|
603 |
-
border-right : 1px solid #dcdcdc;
|
604 |
-
}
|
605 |
-
|
606 |
-
.yit-container.plugin-licence-activation table td:last-child,
|
607 |
-
.yit-container.plugin-licence-activation table th:last-child {
|
608 |
-
border-right : 0;
|
609 |
-
}
|
610 |
-
|
611 |
-
.yit-container.plugin-licence-activation table thead tr {
|
612 |
-
background-color : #f6f4f4;
|
613 |
-
}
|
614 |
-
|
615 |
-
.yit-container.plugin-licence-activation table tbody tr {
|
616 |
-
background-color : #fff;
|
617 |
-
}
|
618 |
-
|
619 |
-
.yit-container.plugin-licence-activation table thead tr th {
|
620 |
-
font-size : 13px;
|
621 |
-
color : #313131;
|
622 |
-
text-transform : uppercase;
|
623 |
-
font-weight : bold;
|
624 |
-
}
|
625 |
-
|
626 |
-
.yit-container.plugin-licence-activation table thead tr,
|
627 |
-
.yit-container.plugin-licence-activation table tbody tr {
|
628 |
-
line-height : 60px;
|
629 |
-
}
|
630 |
-
|
631 |
-
.yit-container.plugin-licence-activation table tbody tr td {
|
632 |
-
text-align : center;
|
633 |
-
line-height : 20px;
|
634 |
-
padding : 10px 5px;
|
635 |
-
}
|
636 |
-
|
637 |
-
.yit-container.plugin-licence-activation .button-licence.licence-activation {
|
638 |
-
padding : 12px 18px;
|
639 |
-
}
|
640 |
-
|
641 |
-
.yit-container.plugin-licence-activation .to-active-table tr {
|
642 |
-
line-height : 75px;
|
643 |
-
}
|
644 |
-
|
645 |
-
.yit-container.plugin-licence-activation .to-active-table tr.plugin-row {
|
646 |
-
background-color : transparent;
|
647 |
-
-webkit-transition : all 0.3s ease;
|
648 |
-
-moz-transition : all 0.3s ease;
|
649 |
-
-ms-transition : all 0.3s ease;
|
650 |
-
-o-transition : all 0.3s ease;
|
651 |
-
transition : all 0.3s ease;
|
652 |
-
}
|
653 |
-
|
654 |
-
.yit-container.plugin-licence-activation .to-active-table tr.plugin-row.error {
|
655 |
-
background-color : #ffdcdc;
|
656 |
-
}
|
657 |
-
|
658 |
-
.yit-container.plugin-licence-activation .to-active-table td {
|
659 |
-
padding-right : 12px;
|
660 |
-
width : 33%;
|
661 |
-
}
|
662 |
-
|
663 |
-
.yit-container.plugin-licence-activation .to-active-table td.plugin-name {
|
664 |
-
color : #808a97;
|
665 |
-
font-size : 12px;
|
666 |
-
text-transform : uppercase;
|
667 |
-
font-weight : bold;
|
668 |
-
line-height : 20px;
|
669 |
-
width : 20%;
|
670 |
-
padding-left : 20px;
|
671 |
-
}
|
672 |
-
|
673 |
-
.yit-container.plugin-licence-activation .to-active-table td.activate-button {
|
674 |
-
width : 15%;
|
675 |
-
position : relative;
|
676 |
-
}
|
677 |
-
|
678 |
-
.yit-container.plugin-licence-activation input[type=text],
|
679 |
-
.yit-container.plugin-licence-activation input[type=email] {
|
680 |
-
-webkit-transition : all 0.3s ease;
|
681 |
-
-moz-transition : all 0.3s ease;
|
682 |
-
-ms-transition : all 0.3s ease;
|
683 |
-
-o-transition : all 0.3s ease;
|
684 |
-
transition : all 0.3s ease;
|
685 |
-
|
686 |
-
border : 1px solid #dcdcdc;
|
687 |
-
padding : 0 15px;
|
688 |
-
border-radius : 3px;
|
689 |
-
height : 41px;
|
690 |
-
width : 100%;
|
691 |
-
}
|
692 |
-
|
693 |
-
.yit-container.plugin-licence-activation input[type=text].require,
|
694 |
-
.yit-container.plugin-licence-activation input[type=email].require {
|
695 |
-
border : 1px solid #ff3838;
|
696 |
-
}
|
697 |
-
|
698 |
-
.yit-container.plugin-licence-activation input[type=text]:focus,
|
699 |
-
.yit-container.plugin-licence-activation input[type=email]:focus {
|
700 |
-
webkit-box-shadow : 0 0 1px rgba(30, 140, 190, .8);
|
701 |
-
box-shadow : 0 0 1px rgba(30, 140, 190, .8);
|
702 |
-
}
|
703 |
-
|
704 |
-
.yit-container.plugin-licence-activation input[type=text] {
|
705 |
-
text-transform : uppercase;
|
706 |
-
text-align : center;
|
707 |
-
}
|
708 |
-
|
709 |
-
.yit-container.plugin-licence-activation input[type=email] {
|
710 |
-
text-align : left;
|
711 |
-
}
|
712 |
-
|
713 |
-
.yit-container.plugin-licence-activation input[type=submit]:focus {
|
714 |
-
outline : 0;
|
715 |
-
}
|
716 |
-
|
717 |
-
/* === Woocommerce panel === */
|
718 |
-
#plugin-fw-wc .yit_options {
|
719 |
-
padding : 0;
|
720 |
-
border : 0;
|
721 |
-
}
|
722 |
-
|
723 |
-
#plugin-fw-wc .yit_options input.upload_button, .yit_options input.button {
|
724 |
-
background : none;
|
725 |
-
border : 1px solid #ccc;
|
726 |
-
}
|
727 |
-
|
728 |
-
/* === WP Pointers === */
|
729 |
-
|
730 |
-
#adminmenu li.menu-top.yit-pointer-selected-row,
|
731 |
-
#adminmenu li.menu-top.yit-pointer-selected-row:hover,
|
732 |
-
#adminmenu li.yit-pointer-selected-row a.menu-top {
|
733 |
-
background-color : #acc327;
|
734 |
-
color : #000;
|
735 |
-
}
|
736 |
-
|
737 |
-
#adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer {
|
738 |
-
color : #000;
|
739 |
-
}
|
740 |
-
|
741 |
-
#adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer:hover,
|
742 |
-
#adminmenu .wp-submenu a.yit-pointer-selected-row {
|
743 |
-
color : #fff;
|
744 |
-
}
|
745 |
-
|
746 |
-
#adminmenu .wp-submenu a.yit-pointer-selected-row:hover {
|
747 |
-
color : #45bbe6;
|
748 |
-
}
|
749 |
-
|
750 |
-
/* WooCommerce 2.4 Support */
|
751 |
-
.woocommerce table.form-table .colorpick {
|
752 |
-
width : 6em;
|
753 |
-
}
|
754 |
-
|
755 |
-
#wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
|
756 |
-
border-bottom : 1px solid #ccc;
|
757 |
-
margin-right : 15px;
|
758 |
-
text-transform : uppercase;
|
759 |
-
}
|
760 |
-
|
761 |
-
/* === YIT FRAMEWORK === */
|
762 |
-
.plugin-card .plugin-icon img {
|
763 |
-
max-width : 100%;
|
764 |
-
width : auto;
|
765 |
-
height : auto;
|
766 |
-
}
|
767 |
-
|
768 |
-
/* === Panel Content and Container === */
|
769 |
-
.yit-admin-panel-container {
|
770 |
-
position : relative;
|
771 |
-
margin-right : 15px;
|
772 |
-
}
|
773 |
-
|
774 |
-
.yith-plugin-ui .yit-admin-panel-container {
|
775 |
-
position : relative;
|
776 |
-
margin-right : 15px;
|
777 |
-
z-index : 0;
|
778 |
-
}
|
779 |
-
|
780 |
-
.yit-admin-panel-content-wrap {
|
781 |
-
width : auto;
|
782 |
-
display : block;
|
783 |
-
}
|
784 |
-
|
785 |
-
.yith-disabled {
|
786 |
-
opacity : 0.3;
|
787 |
-
pointer-events : none;
|
788 |
-
}
|
789 |
-
|
790 |
-
.yith-plugin-fw-select,
|
791 |
-
.yith-plugin-fw-slider-container,
|
792 |
-
.yith-plugin-fw-text-input,
|
793 |
-
.yith-plugin-fw-text-array-table,
|
794 |
-
.yith-plugin-fw-textarea {
|
795 |
-
width : 400px;
|
796 |
-
max-width : 100%;
|
797 |
-
}
|
798 |
-
|
799 |
-
.yith-plugin-fw-text-array-table input {
|
800 |
-
width : 100%;
|
801 |
-
}
|
802 |
-
|
803 |
-
.yith-plugin-fw-panel-wc-row.preview {
|
804 |
-
float : none;
|
805 |
-
}
|
806 |
-
|
807 |
-
.yith-plugin-fw-panel .subsubsub {
|
808 |
-
margin : 0;
|
809 |
-
}
|
810 |
-
|
811 |
-
/**
|
812 |
-
* Sub Tabs
|
813 |
-
*/
|
814 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
|
815 |
-
background : #fff;
|
816 |
-
padding : 10px 20px 0;
|
817 |
-
box-sizing : border-box;
|
818 |
-
margin-right : 15px;
|
819 |
-
border-left : 1px solid #d8d8d8;
|
820 |
-
border-right : 1px solid #d8d8d8;
|
821 |
-
}
|
822 |
-
|
823 |
-
.yith-plugin-ui .yith-plugin-fw-wp-page-wrapper .wrap {
|
824 |
-
margin-top : -29px;
|
825 |
-
}
|
826 |
-
|
827 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
|
828 |
-
text-transform : uppercase;
|
829 |
-
line-height : inherit;
|
830 |
-
font-weight : 600;
|
831 |
-
margin : 20px 0 0 0;
|
832 |
-
box-sizing : border-box;
|
833 |
-
background-color : #f1f1f1;
|
834 |
-
padding-top : 0;
|
835 |
-
border : 1px solid #ccc;
|
836 |
-
border-bottom : 0;
|
837 |
-
}
|
838 |
-
|
839 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
|
840 |
-
line-height : 1.71428571;
|
841 |
-
margin-left : 0;
|
842 |
-
margin-right : 0;
|
843 |
-
background-color : #f1f1f1;
|
844 |
-
color : #336374;
|
845 |
-
font-size : 13px;
|
846 |
-
padding : 8px 20px 9px;
|
847 |
-
border : 0;
|
848 |
-
}
|
849 |
-
|
850 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
|
851 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
|
852 |
-
vertical-align : middle;
|
853 |
-
}
|
854 |
-
|
855 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
|
856 |
-
margin-left : 8px;
|
857 |
-
font-size : 22px;
|
858 |
-
margin-right : -3px;
|
859 |
-
}
|
860 |
-
|
861 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon:before {
|
862 |
-
color : inherit;
|
863 |
-
}
|
864 |
-
|
865 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
|
866 |
-
color : #fff;
|
867 |
-
background : #2a8db0;
|
868 |
-
}
|
869 |
-
|
870 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
|
871 |
-
color : #2a8db0;
|
872 |
-
background : #fff;
|
873 |
-
border-bottom : 0;
|
874 |
-
}
|
875 |
-
|
876 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:first-child {
|
877 |
-
border : 0;
|
878 |
-
}
|
879 |
-
|
880 |
-
.yith-plugin-fw-wp-page-wrapper.yith-current-subtab-opened > .wrap {
|
881 |
-
/* padding-top: 0; */
|
882 |
-
}
|
883 |
-
|
884 |
-
.yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
885 |
-
border-bottom : 2px solid #e9e9e9;
|
886 |
-
margin : 0;
|
887 |
-
padding-top : 9px;
|
888 |
-
padding-bottom : 0;
|
889 |
-
line-height : inherit;
|
890 |
-
}
|
891 |
-
|
892 |
-
div.nav-subtab-wrap {
|
893 |
-
position : absolute;
|
894 |
-
top : 100%;
|
895 |
-
left : 1px;
|
896 |
-
padding-top : 10px;
|
897 |
-
visibility : hidden; /* hides sub-menu */
|
898 |
-
}
|
899 |
-
|
900 |
-
ul.nav-subtab {
|
901 |
-
opacity : 0;
|
902 |
-
background-color : #fff;
|
903 |
-
transition : max-height 0.5s ease-in;
|
904 |
-
max-height : 0;
|
905 |
-
z-index : 100;
|
906 |
-
overflow : hidden;
|
907 |
-
border : 1px solid #f2f2f2;
|
908 |
-
padding : 14px 15px;
|
909 |
-
}
|
910 |
-
|
911 |
-
ul.yith-plugin-fw-tabs {
|
912 |
-
display : block;
|
913 |
-
margin : 0;
|
914 |
-
}
|
915 |
-
|
916 |
-
li.yith-plugin-fw-tab-element {
|
917 |
-
position : relative;
|
918 |
-
margin : 0;
|
919 |
-
padding : 0;
|
920 |
-
display : inline-block;
|
921 |
-
overflow : visible;
|
922 |
-
z-index : 10;
|
923 |
-
}
|
924 |
-
|
925 |
-
.yith-plugin-ui li.yith-plugin-fw-tab-element {
|
926 |
-
margin-bottom : -1px;
|
927 |
-
}
|
928 |
-
|
929 |
-
li.yith-plugin-fw-tab-element:hover {
|
930 |
-
cursor : pointer;
|
931 |
-
}
|
932 |
-
|
933 |
-
li.nav-subtab-item {
|
934 |
-
padding : 3px 0 0;
|
935 |
-
}
|
936 |
-
|
937 |
-
li.nav-subtab-item a {
|
938 |
-
font-size : 12px;
|
939 |
-
text-decoration : none;
|
940 |
-
letter-spacing : 0.05em;
|
941 |
-
color : #336374;
|
942 |
-
}
|
943 |
-
|
944 |
-
li.nav-subtab-item a:hover {
|
945 |
-
color : #228fb6;
|
946 |
-
}
|
947 |
-
|
948 |
-
li.yith-plugin-fw-tab-element a:hover .nav-subtab-wrap,
|
949 |
-
li.yith-plugin-fw-tab-element:hover .nav-subtab-wrap {
|
950 |
-
visibility : visible; /* shows sub-menu */
|
951 |
-
}
|
952 |
-
|
953 |
-
li.yith-plugin-fw-tab-element a:hover ul.nav-subtab,
|
954 |
-
li.yith-plugin-fw-tab-element:hover ul.nav-subtab {
|
955 |
-
max-height : 200px;
|
956 |
-
-webkit-box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
|
957 |
-
-moz-box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
|
958 |
-
box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
|
959 |
-
opacity : 1;
|
960 |
-
transition-delay : 0s, 0s, 0.3s;
|
961 |
-
min-width : 180px;
|
962 |
-
}
|
963 |
-
|
964 |
-
li.yith-plugin-fw-tab-element a.nav-tab i {
|
965 |
-
margin-left : 10px;
|
966 |
-
font-size : 12px;
|
967 |
-
font-weight : 600;
|
968 |
-
}
|
969 |
-
|
970 |
-
li.yith-plugin-fw-tab-element a.nav-tab i:before {
|
971 |
-
color : #fff;
|
972 |
-
}
|
973 |
-
|
974 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container {
|
975 |
-
margin-top : 0;
|
976 |
-
padding-top : 0;
|
977 |
-
}
|
978 |
-
|
979 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container,
|
980 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yith-plugin-fw-wp-page__sub-tab-wrap {
|
981 |
-
border : 1px solid #d8d8d8;
|
982 |
-
border-top : 0;
|
983 |
-
margin : 0 15px 0 0;
|
984 |
-
background : #fff;
|
985 |
-
padding : 0 20px 20px 20px;
|
986 |
-
box-sizing : border-box;
|
987 |
-
}
|
988 |
-
|
989 |
-
|
990 |
-
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yith-plugin-fw-wp-page__sub-tab-wrap .wrap {
|
991 |
-
margin : 0;
|
992 |
-
}
|
993 |
-
|
994 |
-
/**
|
995 |
-
* Float Save Button
|
996 |
-
*/
|
997 |
-
|
998 |
-
button#yith-plugin-fw-float-save-button {
|
999 |
-
display : none;
|
1000 |
-
align-items : center;
|
1001 |
-
border-radius : 60px;
|
1002 |
-
bottom : 50px;
|
1003 |
-
box-shadow : 0 0 6px 3px rgba(0, 121, 159, .2);
|
1004 |
-
padding : 6px 20px;
|
1005 |
-
position : fixed;
|
1006 |
-
right : 70px;
|
1007 |
-
text-transform : uppercase;
|
1008 |
-
z-index : 2;
|
1009 |
-
transition : 0.3s ease-in-out;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
.ywtenv-is-sandbox button#yith-plugin-fw-float-save-button {
|
1013 |
-
bottom : 100px;
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
button#yith-plugin-fw-float-save-button.visible {
|
1017 |
-
display : flex;
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
button#yith-plugin-fw-float-save-button i {
|
1021 |
-
font-size : 15px;
|
1022 |
-
margin-right : 8px;
|
1023 |
-
}
|
1024 |
-
|
1025 |
-
button#yith-plugin-fw-float-save-button:hover {
|
1026 |
-
box-shadow : 0px 1px 6px 3px rgba(0, 121, 159, .3);
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
button#yith-plugin-fw-float-save-button.green {
|
1030 |
-
background-color : #98aa36;
|
1031 |
-
border-color : #98aa36;
|
1032 |
-
box-shadow : 0 0 6px 3px rgba(152, 170, 54, .2);
|
1033 |
-
transition : all 0.8s linear;
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
.rtl button#yith-plugin-fw-float-save-button {
|
1037 |
-
right : auto;
|
1038 |
-
left : 70px;
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
.rtl button#yith-plugin-fw-float-save-button i {
|
1042 |
-
margin-left : 8px;
|
1043 |
-
margin-right : 0;
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
|
1047 |
-
/* === Responsive === */
|
1048 |
-
|
1049 |
-
@media (max-width : 767px) {
|
1050 |
-
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
@media (max-width : 480px) {
|
1054 |
-
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
@media (max-width : 992px) {
|
1058 |
-
.yith-plugin-fw-panel-help-tab-content .row {
|
1059 |
-
white-space : normal;
|
1060 |
-
margin-bottom : 0;
|
1061 |
-
}
|
1062 |
-
|
1063 |
-
.yith-plugin-fw-panel-help-tab-content .row .column-left,
|
1064 |
-
.yith-plugin-fw-panel-help-tab-content .row .column-right {
|
1065 |
-
width : 100%;
|
1066 |
-
margin-bottom : 50px;
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions {
|
1070 |
-
padding-top : 0 !important;
|
1071 |
-
}
|
1072 |
-
}
|
1073 |
-
|
1074 |
-
@media (min-width : 768px) and (max-width : 992px) {
|
1075 |
-
}
|
1076 |
-
|
1077 |
-
@media (min-width : 980px) and (max-width : 1199px) {
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
@media (min-width : 1200px) {
|
1081 |
-
.yit-container.plugin-licence-activation {
|
1082 |
-
width : 900px;
|
1083 |
-
}
|
1084 |
-
}
|
1085 |
-
|
1086 |
-
@media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (-o-min-device-pixel-ratio : 3/2), only screen and (min--moz-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) {
|
1087 |
-
}
|
1 |
+
/*
|
2 |
+
* This file belongs to the YIT Plugin Framework.
|
3 |
+
*
|
4 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
5 |
+
* that is bundled with this package in the file LICENSE.txt.
|
6 |
+
* It is also available through the world-wide-web at this URL:
|
7 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
8 |
+
*/
|
9 |
+
.plugin-option tr {
|
10 |
+
border-bottom : 1px solid #ebebeb;
|
11 |
+
}
|
12 |
+
|
13 |
+
.plugin-option .yit_options,
|
14 |
+
.plugin-option .yit-options {
|
15 |
+
border-bottom : 0px;
|
16 |
+
}
|
17 |
+
|
18 |
+
.plugin-option .yit-options .option,
|
19 |
+
.plugin-option .yit_options .option {
|
20 |
+
width : 600px;
|
21 |
+
}
|
22 |
+
|
23 |
+
.plugin-option .form-table > tbody > tr > td {
|
24 |
+
padding : 25px 15px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.ie8 .yit_options select,
|
28 |
+
.ie8 .yit-options select {
|
29 |
+
height : 26px;
|
30 |
+
}
|
31 |
+
|
32 |
+
/* Style to woocommerce panel*/
|
33 |
+
|
34 |
+
#plugin-fw-wc, #yith-plugin-fw-panel {
|
35 |
+
padding-top : 20px;
|
36 |
+
}
|
37 |
+
|
38 |
+
#plugin-fw-wc table.form-table, #yith-plugin-fw-panel table.form-table, .yith-plugin-fw-panel-custom-tab-container {
|
39 |
+
background-color : #fff;
|
40 |
+
margin-bottom : 20px;
|
41 |
+
}
|
42 |
+
|
43 |
+
.yith-plugin-fw-panel-custom-tab-container {
|
44 |
+
padding : 20px;
|
45 |
+
box-sizing : border-box;
|
46 |
+
margin-right : 15px;
|
47 |
+
}
|
48 |
+
|
49 |
+
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container {
|
50 |
+
border : 1px solid #ddd;
|
51 |
+
border-top : 0;
|
52 |
+
}
|
53 |
+
|
54 |
+
.yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container {
|
55 |
+
padding : 20px;
|
56 |
+
box-sizing : border-box;
|
57 |
+
border : 1px solid #ccc;
|
58 |
+
border-top : 0;
|
59 |
+
margin : -20px 0 0 0;
|
60 |
+
}
|
61 |
+
|
62 |
+
.yith-plugin-fw-panel-custom-tab-container > h2,
|
63 |
+
.yith-plugin-fw-panel-custom-tab-container h2,
|
64 |
+
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container > h2,
|
65 |
+
.yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container h2,
|
66 |
+
.yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container > h2,
|
67 |
+
.yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container h2 {
|
68 |
+
border : none;
|
69 |
+
padding : 15px 0;
|
70 |
+
}
|
71 |
+
|
72 |
+
#plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th {
|
73 |
+
padding : 20px;
|
74 |
+
}
|
75 |
+
|
76 |
+
#plugin-fw-wc h3, #yith-plugin-fw-panel h3 {
|
77 |
+
padding : 0 0 0 10px;
|
78 |
+
margin : 0;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
Help tab
|
83 |
+
*/
|
84 |
+
|
85 |
+
.yith-plugin-fw-panel-help-tab-container {
|
86 |
+
background-color : #fff;
|
87 |
+
padding : 60px 25px;
|
88 |
+
}
|
89 |
+
|
90 |
+
.yith-plugin-fw-panel-help-tab-content {
|
91 |
+
background-color : #f4f4f4;
|
92 |
+
border-radius : 15px;
|
93 |
+
max-width : 1100px;
|
94 |
+
margin : 0 auto;
|
95 |
+
padding : 40px 40px 60px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.yith-plugin-fw-panel-help-tab-content p,
|
99 |
+
.yith-plugin-fw-panel-help-tab-content a {
|
100 |
+
font-size : 16px;
|
101 |
+
}
|
102 |
+
|
103 |
+
.yith-plugin-fw-panel-help-tab-content .row {
|
104 |
+
margin : 0 -15px 50px;
|
105 |
+
white-space : nowrap;
|
106 |
+
}
|
107 |
+
|
108 |
+
.yith-plugin-fw-panel-help-tab-content .row:last-child {
|
109 |
+
margin-bottom : 0;
|
110 |
+
}
|
111 |
+
|
112 |
+
.yith-plugin-fw-panel-help-tab-content .row .column-left,
|
113 |
+
.yith-plugin-fw-panel-help-tab-content .row .column-right {
|
114 |
+
display : inline-block;
|
115 |
+
padding : 0 15px;
|
116 |
+
vertical-align : top;
|
117 |
+
width : 66%;
|
118 |
+
}
|
119 |
+
|
120 |
+
.yith-plugin-fw-panel-help-tab-content .row .column-right {
|
121 |
+
width : 33%;
|
122 |
+
}
|
123 |
+
|
124 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video,
|
125 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-actions,
|
126 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles,
|
127 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket {
|
128 |
+
box-sizing : border-box;
|
129 |
+
white-space : normal;
|
130 |
+
}
|
131 |
+
|
132 |
+
.yith-plugin-fw-panel-help-tab-content h2.yith-plugin-fw-panel-help-tab-title {
|
133 |
+
background : none;
|
134 |
+
border : none;
|
135 |
+
font-size : 22px;
|
136 |
+
line-height : 1.5em;
|
137 |
+
padding : 0;
|
138 |
+
text-align : center;
|
139 |
+
}
|
140 |
+
|
141 |
+
.yith-plugin-fw-panel-help-tab-content h3 {
|
142 |
+
color : #03689f;
|
143 |
+
font-size : 15px;
|
144 |
+
}
|
145 |
+
|
146 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-panel-tab-description {
|
147 |
+
font-size : 18px;
|
148 |
+
text-align : center;
|
149 |
+
margin-bottom : 40px;
|
150 |
+
}
|
151 |
+
|
152 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video {
|
153 |
+
text-align : center;
|
154 |
+
}
|
155 |
+
|
156 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video p.video-description {
|
157 |
+
margin-bottom : 25px;
|
158 |
+
}
|
159 |
+
|
160 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video .video-caption p {
|
161 |
+
margin : 5px 0;
|
162 |
+
}
|
163 |
+
|
164 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video .video-container {
|
165 |
+
margin : 0 auto 50px;
|
166 |
+
overflow : hidden;
|
167 |
+
padding-top : 56.25%;
|
168 |
+
position : relative;
|
169 |
+
}
|
170 |
+
|
171 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-help-tab-video .video-container iframe {
|
172 |
+
border : 0;
|
173 |
+
height : 100%;
|
174 |
+
left : 0;
|
175 |
+
position : absolute;
|
176 |
+
top : 0;
|
177 |
+
width : 100%;
|
178 |
+
}
|
179 |
+
|
180 |
+
.yith-plugin-fw-panel-help-tab-content .box-with-shadow {
|
181 |
+
display : block;
|
182 |
+
background-color : #fff;
|
183 |
+
border-radius : 5px;
|
184 |
+
box-shadow : 0 0 15px 5px rgba(174, 201, 207, 0.3);
|
185 |
+
transition : all .2s ease;
|
186 |
+
}
|
187 |
+
|
188 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions,
|
189 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket {
|
190 |
+
margin : 0 auto;
|
191 |
+
max-width : 640px;
|
192 |
+
}
|
193 |
+
|
194 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions:not( .full-width ) {
|
195 |
+
padding-top : 65px !important;
|
196 |
+
}
|
197 |
+
|
198 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li {
|
199 |
+
margin-bottom : 20px;
|
200 |
+
}
|
201 |
+
|
202 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li > a {
|
203 |
+
display : block;
|
204 |
+
padding : 15px 20px 15px 75px !important;
|
205 |
+
text-decoration : none;
|
206 |
+
}
|
207 |
+
|
208 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li:hover {
|
209 |
+
box-shadow : 0 0 15px 5px rgba(177, 220, 228, 0.6);
|
210 |
+
transform : scale(1.04);
|
211 |
+
}
|
212 |
+
|
213 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li a:before {
|
214 |
+
color : #03689f;
|
215 |
+
float : left;
|
216 |
+
font-family : 'yith-icon';
|
217 |
+
font-size : 36px;
|
218 |
+
line-height : 1;
|
219 |
+
margin-left : -50px;
|
220 |
+
-webkit-font-smoothing : antialiased;
|
221 |
+
-moz-osx-font-smoothing : grayscale;
|
222 |
+
}
|
223 |
+
|
224 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li.read-documentation a:before {
|
225 |
+
content : '\f10d';
|
226 |
+
}
|
227 |
+
|
228 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li.watch-videotutorials a:before {
|
229 |
+
content : '\f10e';
|
230 |
+
}
|
231 |
+
|
232 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li.check-faqs a:before {
|
233 |
+
content : '\f10c';
|
234 |
+
}
|
235 |
+
|
236 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li h4 {
|
237 |
+
margin : 0 0 5px;
|
238 |
+
}
|
239 |
+
|
240 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li h4 a {
|
241 |
+
color : #03689f;
|
242 |
+
text-decoration : none;
|
243 |
+
}
|
244 |
+
|
245 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li .description {
|
246 |
+
margin : 0;
|
247 |
+
font-size : 14px;
|
248 |
+
}
|
249 |
+
|
250 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions li .separator {
|
251 |
+
display : inline-block;
|
252 |
+
margin : 0 5px;
|
253 |
+
}
|
254 |
+
|
255 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles h3 {
|
256 |
+
font-size : 18px;
|
257 |
+
margin : 0;
|
258 |
+
padding : 10px 0;
|
259 |
+
position : relative;
|
260 |
+
|
261 |
+
}
|
262 |
+
|
263 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles h3:before {
|
264 |
+
content : '';
|
265 |
+
background : #03689f;
|
266 |
+
display : block;
|
267 |
+
height : 100%;
|
268 |
+
left : -40px;
|
269 |
+
position : absolute;
|
270 |
+
top : 0;
|
271 |
+
width : 15px;
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles a.button {
|
276 |
+
font-size : 16px;
|
277 |
+
}
|
278 |
+
|
279 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list {
|
280 |
+
margin : 15px 0 30px;
|
281 |
+
}
|
282 |
+
|
283 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list li {
|
284 |
+
display : block;
|
285 |
+
margin-bottom : 10px;
|
286 |
+
}
|
287 |
+
|
288 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list li:before {
|
289 |
+
content : '-';
|
290 |
+
}
|
291 |
+
|
292 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-hc-articles-list a {
|
293 |
+
text-decoration : none;
|
294 |
+
}
|
295 |
+
|
296 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket > .box-with-shadow {
|
297 |
+
padding : 30px !important;
|
298 |
+
}
|
299 |
+
|
300 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket h3 {
|
301 |
+
color : #b90a0a;
|
302 |
+
font-size : 18px;
|
303 |
+
margin : 0 0 15px;
|
304 |
+
}
|
305 |
+
|
306 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket p {
|
307 |
+
margin-bottom : 35px;
|
308 |
+
}
|
309 |
+
|
310 |
+
.yith-plugin-fw-panel-help-tab-content .yith-plugin-fw-submit-ticket .button {
|
311 |
+
border-radius : 7px;
|
312 |
+
display : block;
|
313 |
+
font-size : 15px;
|
314 |
+
padding : 7px 15px;
|
315 |
+
text-align : center;
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
Post type Edit
|
320 |
+
*/
|
321 |
+
|
322 |
+
.yith-plugin-fw-wp-page-wrapper {
|
323 |
+
margin : 23px 20px 0 2px;
|
324 |
+
}
|
325 |
+
|
326 |
+
.yith-plugin-fw-wp-page-wrapper .notice,
|
327 |
+
.yith-plugin-fw-wp-page-wrapper div.updated,
|
328 |
+
.yith-plugin-fw-wp-page-wrapper div.error {
|
329 |
+
margin : 5px 15px 15px 0;
|
330 |
+
}
|
331 |
+
|
332 |
+
.yith-plugin-fw-wp-page-wrapper .wrap, .yith-plugin-fw-wp-page__sub-tab-wrap {
|
333 |
+
border : 1px solid #d8d8d8;
|
334 |
+
border-top : 0;
|
335 |
+
margin : 0 15px 0 0;
|
336 |
+
background : #fff;
|
337 |
+
padding : 20px;
|
338 |
+
box-sizing : border-box;
|
339 |
+
}
|
340 |
+
|
341 |
+
.yith-plugin-fw-wp-page-wrapper .yith-plugin-fw-wp-page__sub-tab-wrap .wrap {
|
342 |
+
margin : -20px 0 0 0;
|
343 |
+
}
|
344 |
+
|
345 |
+
#wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
|
346 |
+
padding-bottom : 0;
|
347 |
+
}
|
348 |
+
|
349 |
+
.yith-plugin-fw-wp-page-wrapper .postbox {
|
350 |
+
box-shadow : none;
|
351 |
+
}
|
352 |
+
|
353 |
+
.yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
354 |
+
padding-top : 9px;
|
355 |
+
padding-bottom : 0;
|
356 |
+
}
|
357 |
+
|
358 |
+
.yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
|
359 |
+
color : #2a8db0;
|
360 |
+
font-size : 16px;
|
361 |
+
font-weight : 600;
|
362 |
+
}
|
363 |
+
|
364 |
+
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action,
|
365 |
+
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:active {
|
366 |
+
border-radius : 3px;
|
367 |
+
text-transform : uppercase;
|
368 |
+
box-shadow : none;
|
369 |
+
border : 0;
|
370 |
+
font-weight : 700;
|
371 |
+
font-size : 11px;
|
372 |
+
padding : 0 14px;
|
373 |
+
outline : none;
|
374 |
+
height : auto;
|
375 |
+
transition : all ease 0.3s;
|
376 |
+
text-shadow : none;
|
377 |
+
vertical-align : middle;
|
378 |
+
line-height : 26px;
|
379 |
+
display : inline-block;
|
380 |
+
text-decoration : none;
|
381 |
+
cursor : pointer;
|
382 |
+
background-color : #375f6b;
|
383 |
+
color : #fff;
|
384 |
+
margin-left : 10px !important;
|
385 |
+
}
|
386 |
+
|
387 |
+
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
|
388 |
+
border-color : #007694;
|
389 |
+
background : #007694;
|
390 |
+
color : #fff;
|
391 |
+
}
|
392 |
+
|
393 |
+
.yith-plugin-fw-wp-page-wrapper #wp-content-editor-tools {
|
394 |
+
background : transparent;
|
395 |
+
}
|
396 |
+
|
397 |
+
/* === Plugins Upgrader === */
|
398 |
+
|
399 |
+
.yit-plugin-changelog-wrapper {
|
400 |
+
display : none;
|
401 |
+
}
|
402 |
+
|
403 |
+
.yit-plugin-changelog-title {
|
404 |
+
text-transform : uppercase;
|
405 |
+
}
|
406 |
+
|
407 |
+
.yit-plugin-changelog {
|
408 |
+
height : calc(100% - 15px);
|
409 |
+
width : calc(100% - 15px);
|
410 |
+
overflow-x : hidden;
|
411 |
+
overflow-y : auto;
|
412 |
+
z-index : 999;
|
413 |
+
background : #fcfcfc;
|
414 |
+
}
|
415 |
+
|
416 |
+
/* === Plugins Licence Activation === */
|
417 |
+
|
418 |
+
.yit-container.plugin-licence-activation {
|
419 |
+
font-family : 'Raleway', sans-serif;
|
420 |
+
}
|
421 |
+
|
422 |
+
.yit-container.plugin-licence-activation .to-active-wrapper {
|
423 |
+
margin-bottom : 60px;
|
424 |
+
}
|
425 |
+
|
426 |
+
.yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form {
|
427 |
+
position : relative;
|
428 |
+
border-color : #e1e1e1;
|
429 |
+
border-style : solid;
|
430 |
+
border-width : 0;
|
431 |
+
}
|
432 |
+
|
433 |
+
.yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:first-child {
|
434 |
+
border-top-width : 1px;
|
435 |
+
}
|
436 |
+
|
437 |
+
.yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:last-child {
|
438 |
+
border-bottom-width : 1px;
|
439 |
+
}
|
440 |
+
|
441 |
+
.yit-container.plugin-licence-activation .to-active-wrapper table.to-active-table {
|
442 |
+
border-width : 0;
|
443 |
+
border-spacing : 0;
|
444 |
+
width : 100%;
|
445 |
+
}
|
446 |
+
|
447 |
+
.yit-container.plugin-licence-activation .message {
|
448 |
+
display : none;
|
449 |
+
line-height : normal;
|
450 |
+
background : #fff url(../images/licence-error.png) 15px center no-repeat;
|
451 |
+
padding-left : 65px;
|
452 |
+
padding-right : 15px;
|
453 |
+
width : 150px;
|
454 |
+
}
|
455 |
+
|
456 |
+
.yit-container.plugin-licence-activation .message-wrapper {
|
457 |
+
height : 75px;
|
458 |
+
display : none;
|
459 |
+
position : absolute;
|
460 |
+
top : 0;
|
461 |
+
right : -250px;
|
462 |
+
border : 1px solid #ff3838;
|
463 |
+
}
|
464 |
+
|
465 |
+
.yit-container.plugin-licence-activation .message-wrapper.visible {
|
466 |
+
display : table;
|
467 |
+
}
|
468 |
+
|
469 |
+
.yit-container.plugin-licence-activation .message {
|
470 |
+
display : table-cell;
|
471 |
+
vertical-align : middle;
|
472 |
+
}
|
473 |
+
|
474 |
+
.yit-container.plugin-licence-activation .arrow-left:after,
|
475 |
+
.yit-container.plugin-licence-activation .arrow-left:before {
|
476 |
+
content : "";
|
477 |
+
display : block;
|
478 |
+
width : 0;
|
479 |
+
height : 0;
|
480 |
+
position : absolute;
|
481 |
+
}
|
482 |
+
|
483 |
+
.yit-container.plugin-licence-activation .arrow-left:before {
|
484 |
+
border-top : 9px solid transparent;
|
485 |
+
border-bottom : 9px solid transparent;
|
486 |
+
border-right : 9px solid #ff3838;
|
487 |
+
top : 26px;
|
488 |
+
left : -9px;
|
489 |
+
}
|
490 |
+
|
491 |
+
.yit-container.plugin-licence-activation .arrow-left:after {
|
492 |
+
border-top : 8px solid transparent;
|
493 |
+
border-bottom : 8px solid transparent;
|
494 |
+
border-right : 8px solid #fff;
|
495 |
+
left : -8px;
|
496 |
+
top : 27px;
|
497 |
+
}
|
498 |
+
|
499 |
+
.yit-container.plugin-licence-activation h2,
|
500 |
+
.yit-container.plugin-licence-activation h3 {
|
501 |
+
text-transform : uppercase;
|
502 |
+
font-weight : 800;
|
503 |
+
margin-bottom : 30px;
|
504 |
+
}
|
505 |
+
|
506 |
+
.yit-container.plugin-licence-activation h2 {
|
507 |
+
color : #808a97;
|
508 |
+
font-size : 25px;
|
509 |
+
}
|
510 |
+
|
511 |
+
.yit-container.plugin-licence-activation h3 {
|
512 |
+
color : #313131;
|
513 |
+
font-size : 15px;
|
514 |
+
height : 20px;
|
515 |
+
}
|
516 |
+
|
517 |
+
.yit-container.plugin-licence-activation h3.to-active {
|
518 |
+
height : 20px;
|
519 |
+
position : relative;
|
520 |
+
vertical-align : top;
|
521 |
+
}
|
522 |
+
|
523 |
+
.yit-container.plugin-licence-activation .spinner.show {
|
524 |
+
display : inline-block;
|
525 |
+
vertical-align : middle;
|
526 |
+
float : none;
|
527 |
+
}
|
528 |
+
|
529 |
+
.yit-container.plugin-licence-activation h3.to-active > .spinner.show {
|
530 |
+
display : inline-block;
|
531 |
+
float : none;
|
532 |
+
top : -3px;
|
533 |
+
position : relative;
|
534 |
+
}
|
535 |
+
|
536 |
+
.yit-container.plugin-licence-activation .licence-check-section {
|
537 |
+
margin-bottom : 60px;
|
538 |
+
}
|
539 |
+
|
540 |
+
.yit-container.plugin-licence-activation span.licence-label {
|
541 |
+
font-weight : 500;
|
542 |
+
color : #606060;
|
543 |
+
margin-bottom : 30px;
|
544 |
+
}
|
545 |
+
|
546 |
+
.yit-container.plugin-licence-activation .button-licence {
|
547 |
+
border : 0;
|
548 |
+
font-size : 13px;
|
549 |
+
text-transform : uppercase;
|
550 |
+
background-color : #808a97;
|
551 |
+
color : #fff;
|
552 |
+
font-weight : 700;
|
553 |
+
border-radius : 3px;
|
554 |
+
cursor : pointer;
|
555 |
+
text-decoration : none;
|
556 |
+
padding : 5px 7px;
|
557 |
+
-webkit-transition : background-color 0.3s ease;
|
558 |
+
-moz-transition : background-color 0.3s ease;
|
559 |
+
-ms-transition : background-color 0.3s ease;
|
560 |
+
-o-transition : background-color 0.3s ease;
|
561 |
+
transition : background-color 0.3s ease;
|
562 |
+
}
|
563 |
+
|
564 |
+
.yit-container.plugin-licence-activation .button-licence:hover {
|
565 |
+
background-color : #4d5c6f;
|
566 |
+
}
|
567 |
+
|
568 |
+
.yit-container.plugin-licence-activation .button-licence.clicked {
|
569 |
+
cursor : not-allowed;
|
570 |
+
background-color : #e2e2e2 !important;
|
571 |
+
}
|
572 |
+
|
573 |
+
.yit-container.plugin-licence-activation .button-licence.licence-check {
|
574 |
+
font-weight : 400;
|
575 |
+
padding : 12px 19px;
|
576 |
+
}
|
577 |
+
|
578 |
+
.yit-container.plugin-licence-activation .button-licence.licence-renew {
|
579 |
+
text-decoration : none;
|
580 |
+
padding : 7px 12px;
|
581 |
+
font-size : 9px;
|
582 |
+
}
|
583 |
+
|
584 |
+
.yit-container.plugin-licence-activation .button-licence.licence-renew:focus {
|
585 |
+
box-shadow : none;
|
586 |
+
}
|
587 |
+
|
588 |
+
.yit-container.plugin-licence-activation table:not(.to-active-table) {
|
589 |
+
width : 100%;
|
590 |
+
border : 1px solid #dcdcdc;
|
591 |
+
border-spacing : 0;
|
592 |
+
border-radius : 5px;
|
593 |
+
border-collapse : separate;
|
594 |
+
overflow : hidden;
|
595 |
+
}
|
596 |
+
|
597 |
+
.yit-container.plugin-licence-activation table:not(.to-active-table) th {
|
598 |
+
border-bottom : 1px solid #dcdcdc;
|
599 |
+
}
|
600 |
+
|
601 |
+
.yit-container.plugin-licence-activation table:not(.to-active-table) td,
|
602 |
+
.yit-container.plugin-licence-activation table:not(.to-active-table) th {
|
603 |
+
border-right : 1px solid #dcdcdc;
|
604 |
+
}
|
605 |
+
|
606 |
+
.yit-container.plugin-licence-activation table td:last-child,
|
607 |
+
.yit-container.plugin-licence-activation table th:last-child {
|
608 |
+
border-right : 0;
|
609 |
+
}
|
610 |
+
|
611 |
+
.yit-container.plugin-licence-activation table thead tr {
|
612 |
+
background-color : #f6f4f4;
|
613 |
+
}
|
614 |
+
|
615 |
+
.yit-container.plugin-licence-activation table tbody tr {
|
616 |
+
background-color : #fff;
|
617 |
+
}
|
618 |
+
|
619 |
+
.yit-container.plugin-licence-activation table thead tr th {
|
620 |
+
font-size : 13px;
|
621 |
+
color : #313131;
|
622 |
+
text-transform : uppercase;
|
623 |
+
font-weight : bold;
|
624 |
+
}
|
625 |
+
|
626 |
+
.yit-container.plugin-licence-activation table thead tr,
|
627 |
+
.yit-container.plugin-licence-activation table tbody tr {
|
628 |
+
line-height : 60px;
|
629 |
+
}
|
630 |
+
|
631 |
+
.yit-container.plugin-licence-activation table tbody tr td {
|
632 |
+
text-align : center;
|
633 |
+
line-height : 20px;
|
634 |
+
padding : 10px 5px;
|
635 |
+
}
|
636 |
+
|
637 |
+
.yit-container.plugin-licence-activation .button-licence.licence-activation {
|
638 |
+
padding : 12px 18px;
|
639 |
+
}
|
640 |
+
|
641 |
+
.yit-container.plugin-licence-activation .to-active-table tr {
|
642 |
+
line-height : 75px;
|
643 |
+
}
|
644 |
+
|
645 |
+
.yit-container.plugin-licence-activation .to-active-table tr.plugin-row {
|
646 |
+
background-color : transparent;
|
647 |
+
-webkit-transition : all 0.3s ease;
|
648 |
+
-moz-transition : all 0.3s ease;
|
649 |
+
-ms-transition : all 0.3s ease;
|
650 |
+
-o-transition : all 0.3s ease;
|
651 |
+
transition : all 0.3s ease;
|
652 |
+
}
|
653 |
+
|
654 |
+
.yit-container.plugin-licence-activation .to-active-table tr.plugin-row.error {
|
655 |
+
background-color : #ffdcdc;
|
656 |
+
}
|
657 |
+
|
658 |
+
.yit-container.plugin-licence-activation .to-active-table td {
|
659 |
+
padding-right : 12px;
|
660 |
+
width : 33%;
|
661 |
+
}
|
662 |
+
|
663 |
+
.yit-container.plugin-licence-activation .to-active-table td.plugin-name {
|
664 |
+
color : #808a97;
|
665 |
+
font-size : 12px;
|
666 |
+
text-transform : uppercase;
|
667 |
+
font-weight : bold;
|
668 |
+
line-height : 20px;
|
669 |
+
width : 20%;
|
670 |
+
padding-left : 20px;
|
671 |
+
}
|
672 |
+
|
673 |
+
.yit-container.plugin-licence-activation .to-active-table td.activate-button {
|
674 |
+
width : 15%;
|
675 |
+
position : relative;
|
676 |
+
}
|
677 |
+
|
678 |
+
.yit-container.plugin-licence-activation input[type=text],
|
679 |
+
.yit-container.plugin-licence-activation input[type=email] {
|
680 |
+
-webkit-transition : all 0.3s ease;
|
681 |
+
-moz-transition : all 0.3s ease;
|
682 |
+
-ms-transition : all 0.3s ease;
|
683 |
+
-o-transition : all 0.3s ease;
|
684 |
+
transition : all 0.3s ease;
|
685 |
+
|
686 |
+
border : 1px solid #dcdcdc;
|
687 |
+
padding : 0 15px;
|
688 |
+
border-radius : 3px;
|
689 |
+
height : 41px;
|
690 |
+
width : 100%;
|
691 |
+
}
|
692 |
+
|
693 |
+
.yit-container.plugin-licence-activation input[type=text].require,
|
694 |
+
.yit-container.plugin-licence-activation input[type=email].require {
|
695 |
+
border : 1px solid #ff3838;
|
696 |
+
}
|
697 |
+
|
698 |
+
.yit-container.plugin-licence-activation input[type=text]:focus,
|
699 |
+
.yit-container.plugin-licence-activation input[type=email]:focus {
|
700 |
+
webkit-box-shadow : 0 0 1px rgba(30, 140, 190, .8);
|
701 |
+
box-shadow : 0 0 1px rgba(30, 140, 190, .8);
|
702 |
+
}
|
703 |
+
|
704 |
+
.yit-container.plugin-licence-activation input[type=text] {
|
705 |
+
text-transform : uppercase;
|
706 |
+
text-align : center;
|
707 |
+
}
|
708 |
+
|
709 |
+
.yit-container.plugin-licence-activation input[type=email] {
|
710 |
+
text-align : left;
|
711 |
+
}
|
712 |
+
|
713 |
+
.yit-container.plugin-licence-activation input[type=submit]:focus {
|
714 |
+
outline : 0;
|
715 |
+
}
|
716 |
+
|
717 |
+
/* === Woocommerce panel === */
|
718 |
+
#plugin-fw-wc .yit_options {
|
719 |
+
padding : 0;
|
720 |
+
border : 0;
|
721 |
+
}
|
722 |
+
|
723 |
+
#plugin-fw-wc .yit_options input.upload_button, .yit_options input.button {
|
724 |
+
background : none;
|
725 |
+
border : 1px solid #ccc;
|
726 |
+
}
|
727 |
+
|
728 |
+
/* === WP Pointers === */
|
729 |
+
|
730 |
+
#adminmenu li.menu-top.yit-pointer-selected-row,
|
731 |
+
#adminmenu li.menu-top.yit-pointer-selected-row:hover,
|
732 |
+
#adminmenu li.yit-pointer-selected-row a.menu-top {
|
733 |
+
background-color : #acc327;
|
734 |
+
color : #000;
|
735 |
+
}
|
736 |
+
|
737 |
+
#adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer {
|
738 |
+
color : #000;
|
739 |
+
}
|
740 |
+
|
741 |
+
#adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer:hover,
|
742 |
+
#adminmenu .wp-submenu a.yit-pointer-selected-row {
|
743 |
+
color : #fff;
|
744 |
+
}
|
745 |
+
|
746 |
+
#adminmenu .wp-submenu a.yit-pointer-selected-row:hover {
|
747 |
+
color : #45bbe6;
|
748 |
+
}
|
749 |
+
|
750 |
+
/* WooCommerce 2.4 Support */
|
751 |
+
.woocommerce table.form-table .colorpick {
|
752 |
+
width : 6em;
|
753 |
+
}
|
754 |
+
|
755 |
+
#wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
|
756 |
+
border-bottom : 1px solid #ccc;
|
757 |
+
margin-right : 15px;
|
758 |
+
text-transform : uppercase;
|
759 |
+
}
|
760 |
+
|
761 |
+
/* === YIT FRAMEWORK === */
|
762 |
+
.plugin-card .plugin-icon img {
|
763 |
+
max-width : 100%;
|
764 |
+
width : auto;
|
765 |
+
height : auto;
|
766 |
+
}
|
767 |
+
|
768 |
+
/* === Panel Content and Container === */
|
769 |
+
.yit-admin-panel-container {
|
770 |
+
position : relative;
|
771 |
+
margin-right : 15px;
|
772 |
+
}
|
773 |
+
|
774 |
+
.yith-plugin-ui .yit-admin-panel-container {
|
775 |
+
position : relative;
|
776 |
+
margin-right : 15px;
|
777 |
+
z-index : 0;
|
778 |
+
}
|
779 |
+
|
780 |
+
.yit-admin-panel-content-wrap {
|
781 |
+
width : auto;
|
782 |
+
display : block;
|
783 |
+
}
|
784 |
+
|
785 |
+
.yith-disabled {
|
786 |
+
opacity : 0.3;
|
787 |
+
pointer-events : none;
|
788 |
+
}
|
789 |
+
|
790 |
+
.yith-plugin-fw-select,
|
791 |
+
.yith-plugin-fw-slider-container,
|
792 |
+
.yith-plugin-fw-text-input,
|
793 |
+
.yith-plugin-fw-text-array-table,
|
794 |
+
.yith-plugin-fw-textarea {
|
795 |
+
width : 400px;
|
796 |
+
max-width : 100%;
|
797 |
+
}
|
798 |
+
|
799 |
+
.yith-plugin-fw-text-array-table input {
|
800 |
+
width : 100%;
|
801 |
+
}
|
802 |
+
|
803 |
+
.yith-plugin-fw-panel-wc-row.preview {
|
804 |
+
float : none;
|
805 |
+
}
|
806 |
+
|
807 |
+
.yith-plugin-fw-panel .subsubsub {
|
808 |
+
margin : 0;
|
809 |
+
}
|
810 |
+
|
811 |
+
/**
|
812 |
+
* Sub Tabs
|
813 |
+
*/
|
814 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
|
815 |
+
background : #fff;
|
816 |
+
padding : 10px 20px 0;
|
817 |
+
box-sizing : border-box;
|
818 |
+
margin-right : 15px;
|
819 |
+
border-left : 1px solid #d8d8d8;
|
820 |
+
border-right : 1px solid #d8d8d8;
|
821 |
+
}
|
822 |
+
|
823 |
+
.yith-plugin-ui .yith-plugin-fw-wp-page-wrapper .wrap {
|
824 |
+
margin-top : -29px;
|
825 |
+
}
|
826 |
+
|
827 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
|
828 |
+
text-transform : uppercase;
|
829 |
+
line-height : inherit;
|
830 |
+
font-weight : 600;
|
831 |
+
margin : 20px 0 0 0;
|
832 |
+
box-sizing : border-box;
|
833 |
+
background-color : #f1f1f1;
|
834 |
+
padding-top : 0;
|
835 |
+
border : 1px solid #ccc;
|
836 |
+
border-bottom : 0;
|
837 |
+
}
|
838 |
+
|
839 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
|
840 |
+
line-height : 1.71428571;
|
841 |
+
margin-left : 0;
|
842 |
+
margin-right : 0;
|
843 |
+
background-color : #f1f1f1;
|
844 |
+
color : #336374;
|
845 |
+
font-size : 13px;
|
846 |
+
padding : 8px 20px 9px;
|
847 |
+
border : 0;
|
848 |
+
}
|
849 |
+
|
850 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__title,
|
851 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
|
852 |
+
vertical-align : middle;
|
853 |
+
}
|
854 |
+
|
855 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon {
|
856 |
+
margin-left : 8px;
|
857 |
+
font-size : 22px;
|
858 |
+
margin-right : -3px;
|
859 |
+
}
|
860 |
+
|
861 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab .yith-nav-sub-tab__icon:before {
|
862 |
+
color : inherit;
|
863 |
+
}
|
864 |
+
|
865 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .yith-nav-sub-tab--highlight {
|
866 |
+
color : #fff;
|
867 |
+
background : #2a8db0;
|
868 |
+
}
|
869 |
+
|
870 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
|
871 |
+
color : #2a8db0;
|
872 |
+
background : #fff;
|
873 |
+
border-bottom : 0;
|
874 |
+
}
|
875 |
+
|
876 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:first-child {
|
877 |
+
border : 0;
|
878 |
+
}
|
879 |
+
|
880 |
+
.yith-plugin-fw-wp-page-wrapper.yith-current-subtab-opened > .wrap {
|
881 |
+
/* padding-top: 0; */
|
882 |
+
}
|
883 |
+
|
884 |
+
.yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
|
885 |
+
border-bottom : 2px solid #e9e9e9;
|
886 |
+
margin : 0;
|
887 |
+
padding-top : 9px;
|
888 |
+
padding-bottom : 0;
|
889 |
+
line-height : inherit;
|
890 |
+
}
|
891 |
+
|
892 |
+
div.nav-subtab-wrap {
|
893 |
+
position : absolute;
|
894 |
+
top : 100%;
|
895 |
+
left : 1px;
|
896 |
+
padding-top : 10px;
|
897 |
+
visibility : hidden; /* hides sub-menu */
|
898 |
+
}
|
899 |
+
|
900 |
+
ul.nav-subtab {
|
901 |
+
opacity : 0;
|
902 |
+
background-color : #fff;
|
903 |
+
transition : max-height 0.5s ease-in;
|
904 |
+
max-height : 0;
|
905 |
+
z-index : 100;
|
906 |
+
overflow : hidden;
|
907 |
+
border : 1px solid #f2f2f2;
|
908 |
+
padding : 14px 15px;
|
909 |
+
}
|
910 |
+
|
911 |
+
ul.yith-plugin-fw-tabs {
|
912 |
+
display : block;
|
913 |
+
margin : 0;
|
914 |
+
}
|
915 |
+
|
916 |
+
li.yith-plugin-fw-tab-element {
|
917 |
+
position : relative;
|
918 |
+
margin : 0;
|
919 |
+
padding : 0;
|
920 |
+
display : inline-block;
|
921 |
+
overflow : visible;
|
922 |
+
z-index : 10;
|
923 |
+
}
|
924 |
+
|
925 |
+
.yith-plugin-ui li.yith-plugin-fw-tab-element {
|
926 |
+
margin-bottom : -1px;
|
927 |
+
}
|
928 |
+
|
929 |
+
li.yith-plugin-fw-tab-element:hover {
|
930 |
+
cursor : pointer;
|
931 |
+
}
|
932 |
+
|
933 |
+
li.nav-subtab-item {
|
934 |
+
padding : 3px 0 0;
|
935 |
+
}
|
936 |
+
|
937 |
+
li.nav-subtab-item a {
|
938 |
+
font-size : 12px;
|
939 |
+
text-decoration : none;
|
940 |
+
letter-spacing : 0.05em;
|
941 |
+
color : #336374;
|
942 |
+
}
|
943 |
+
|
944 |
+
li.nav-subtab-item a:hover {
|
945 |
+
color : #228fb6;
|
946 |
+
}
|
947 |
+
|
948 |
+
li.yith-plugin-fw-tab-element a:hover .nav-subtab-wrap,
|
949 |
+
li.yith-plugin-fw-tab-element:hover .nav-subtab-wrap {
|
950 |
+
visibility : visible; /* shows sub-menu */
|
951 |
+
}
|
952 |
+
|
953 |
+
li.yith-plugin-fw-tab-element a:hover ul.nav-subtab,
|
954 |
+
li.yith-plugin-fw-tab-element:hover ul.nav-subtab {
|
955 |
+
max-height : 200px;
|
956 |
+
-webkit-box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
|
957 |
+
-moz-box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
|
958 |
+
box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
|
959 |
+
opacity : 1;
|
960 |
+
transition-delay : 0s, 0s, 0.3s;
|
961 |
+
min-width : 180px;
|
962 |
+
}
|
963 |
+
|
964 |
+
li.yith-plugin-fw-tab-element a.nav-tab i {
|
965 |
+
margin-left : 10px;
|
966 |
+
font-size : 12px;
|
967 |
+
font-weight : 600;
|
968 |
+
}
|
969 |
+
|
970 |
+
li.yith-plugin-fw-tab-element a.nav-tab i:before {
|
971 |
+
color : #fff;
|
972 |
+
}
|
973 |
+
|
974 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container {
|
975 |
+
margin-top : 0;
|
976 |
+
padding-top : 0;
|
977 |
+
}
|
978 |
+
|
979 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container,
|
980 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yith-plugin-fw-wp-page__sub-tab-wrap {
|
981 |
+
border : 1px solid #d8d8d8;
|
982 |
+
border-top : 0;
|
983 |
+
margin : 0 15px 0 0;
|
984 |
+
background : #fff;
|
985 |
+
padding : 0 20px 20px 20px;
|
986 |
+
box-sizing : border-box;
|
987 |
+
}
|
988 |
+
|
989 |
+
|
990 |
+
.yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yith-plugin-fw-wp-page__sub-tab-wrap .wrap {
|
991 |
+
margin : 0;
|
992 |
+
}
|
993 |
+
|
994 |
+
/**
|
995 |
+
* Float Save Button
|
996 |
+
*/
|
997 |
+
|
998 |
+
button#yith-plugin-fw-float-save-button {
|
999 |
+
display : none;
|
1000 |
+
align-items : center;
|
1001 |
+
border-radius : 60px;
|
1002 |
+
bottom : 50px;
|
1003 |
+
box-shadow : 0 0 6px 3px rgba(0, 121, 159, .2);
|
1004 |
+
padding : 6px 20px;
|
1005 |
+
position : fixed;
|
1006 |
+
right : 70px;
|
1007 |
+
text-transform : uppercase;
|
1008 |
+
z-index : 2;
|
1009 |
+
transition : 0.3s ease-in-out;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
.ywtenv-is-sandbox button#yith-plugin-fw-float-save-button {
|
1013 |
+
bottom : 100px;
|
1014 |
+
}
|
1015 |
+
|
1016 |
+
button#yith-plugin-fw-float-save-button.visible {
|
1017 |
+
display : flex;
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
button#yith-plugin-fw-float-save-button i {
|
1021 |
+
font-size : 15px;
|
1022 |
+
margin-right : 8px;
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
button#yith-plugin-fw-float-save-button:hover {
|
1026 |
+
box-shadow : 0px 1px 6px 3px rgba(0, 121, 159, .3);
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
button#yith-plugin-fw-float-save-button.green {
|
1030 |
+
background-color : #98aa36;
|
1031 |
+
border-color : #98aa36;
|
1032 |
+
box-shadow : 0 0 6px 3px rgba(152, 170, 54, .2);
|
1033 |
+
transition : all 0.8s linear;
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
.rtl button#yith-plugin-fw-float-save-button {
|
1037 |
+
right : auto;
|
1038 |
+
left : 70px;
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
.rtl button#yith-plugin-fw-float-save-button i {
|
1042 |
+
margin-left : 8px;
|
1043 |
+
margin-right : 0;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
|
1047 |
+
/* === Responsive === */
|
1048 |
+
|
1049 |
+
@media (max-width : 767px) {
|
1050 |
+
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
@media (max-width : 480px) {
|
1054 |
+
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
@media (max-width : 992px) {
|
1058 |
+
.yith-plugin-fw-panel-help-tab-content .row {
|
1059 |
+
white-space : normal;
|
1060 |
+
margin-bottom : 0;
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
.yith-plugin-fw-panel-help-tab-content .row .column-left,
|
1064 |
+
.yith-plugin-fw-panel-help-tab-content .row .column-right {
|
1065 |
+
width : 100%;
|
1066 |
+
margin-bottom : 50px;
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
.yith-plugin-fw-panel-help-tab-content ul.yith-plugin-fw-help-tab-actions {
|
1070 |
+
padding-top : 0 !important;
|
1071 |
+
}
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
@media (min-width : 768px) and (max-width : 992px) {
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
@media (min-width : 980px) and (max-width : 1199px) {
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
@media (min-width : 1200px) {
|
1081 |
+
.yit-container.plugin-licence-activation {
|
1082 |
+
width : 900px;
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
@media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (-o-min-device-pixel-ratio : 3/2), only screen and (min--moz-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) {
|
1087 |
+
}
|
plugin-fw/assets/css/yit-upgrade-to-pro.css
CHANGED
@@ -1,83 +1,83 @@
|
|
1 |
-
/* === Upgrade to Premium Landing page === */
|
2 |
-
|
3 |
-
#upgrade-to-premium {
|
4 |
-
width : 900px;
|
5 |
-
}
|
6 |
-
|
7 |
-
#upgrade-to-premium h1 {
|
8 |
-
font-family : 'Raleway', sans-serif;
|
9 |
-
text-transform : uppercase;
|
10 |
-
font-size : 30px;
|
11 |
-
font-weight : 700;
|
12 |
-
color : #808a97;
|
13 |
-
}
|
14 |
-
|
15 |
-
#upgrade-to-premium h3 {
|
16 |
-
font-family : 'Raleway', sans-serif;
|
17 |
-
font-size : 20px;
|
18 |
-
line-height : 29px;
|
19 |
-
font-weight : 700;
|
20 |
-
color : #808a97;
|
21 |
-
}
|
22 |
-
|
23 |
-
#upgrade-to-premium p {
|
24 |
-
font-family : 'Open Sans', sans-serif;
|
25 |
-
font-size : 15px;
|
26 |
-
line-height : 29px;
|
27 |
-
font-weight : 400;
|
28 |
-
color : #6a6a6b;
|
29 |
-
}
|
30 |
-
|
31 |
-
#upgrade-to-premium p.highlighted {
|
32 |
-
font-family : 'Raleway', sans-serif;
|
33 |
-
font-size : 20px;
|
34 |
-
line-height : 27px;
|
35 |
-
color : #808a97;
|
36 |
-
font-weight : 400;
|
37 |
-
}
|
38 |
-
|
39 |
-
#upgrade-to-premium ol {
|
40 |
-
counter-reset : item;
|
41 |
-
list-style-type : none;
|
42 |
-
margin-left : 0;
|
43 |
-
}
|
44 |
-
|
45 |
-
#upgrade-to-premium li.step {
|
46 |
-
font-family : 'open sans', sans-serif;
|
47 |
-
font-size : 15px;
|
48 |
-
color : #6a6a6b;
|
49 |
-
font-weight : 400;
|
50 |
-
position : relative;
|
51 |
-
padding-left : 50px;
|
52 |
-
line-height : 25px;
|
53 |
-
margin-bottom : 25px;
|
54 |
-
}
|
55 |
-
|
56 |
-
#upgrade-to-premium li.step:before {
|
57 |
-
content : counters(item, ".") " ";
|
58 |
-
counter-increment : item;
|
59 |
-
position : absolute;
|
60 |
-
left : 0;
|
61 |
-
top : 0;
|
62 |
-
border : 1px solid #808a97;
|
63 |
-
width : 30px;
|
64 |
-
height : 30px;
|
65 |
-
border-radius : 16px;
|
66 |
-
background-color : #808a97;
|
67 |
-
color : #ffffff;
|
68 |
-
font-weight : 700;
|
69 |
-
font-size : 18px;
|
70 |
-
text-align : center;
|
71 |
-
line-height : 27px;
|
72 |
-
}
|
73 |
-
|
74 |
-
#upgrade-to-premium li.step img {
|
75 |
-
border : 1px solid #b8b8b8;
|
76 |
-
width : 600px;
|
77 |
-
display : block;
|
78 |
-
margin : 15px 0 25px 0;
|
79 |
-
}
|
80 |
-
|
81 |
-
#cboxLoadedContent {
|
82 |
-
margin-bottom : 60px !important;
|
83 |
}
|
1 |
+
/* === Upgrade to Premium Landing page === */
|
2 |
+
|
3 |
+
#upgrade-to-premium {
|
4 |
+
width : 900px;
|
5 |
+
}
|
6 |
+
|
7 |
+
#upgrade-to-premium h1 {
|
8 |
+
font-family : 'Raleway', sans-serif;
|
9 |
+
text-transform : uppercase;
|
10 |
+
font-size : 30px;
|
11 |
+
font-weight : 700;
|
12 |
+
color : #808a97;
|
13 |
+
}
|
14 |
+
|
15 |
+
#upgrade-to-premium h3 {
|
16 |
+
font-family : 'Raleway', sans-serif;
|
17 |
+
font-size : 20px;
|
18 |
+
line-height : 29px;
|
19 |
+
font-weight : 700;
|
20 |
+
color : #808a97;
|
21 |
+
}
|
22 |
+
|
23 |
+
#upgrade-to-premium p {
|
24 |
+
font-family : 'Open Sans', sans-serif;
|
25 |
+
font-size : 15px;
|
26 |
+
line-height : 29px;
|
27 |
+
font-weight : 400;
|
28 |
+
color : #6a6a6b;
|
29 |
+
}
|
30 |
+
|
31 |
+
#upgrade-to-premium p.highlighted {
|
32 |
+
font-family : 'Raleway', sans-serif;
|
33 |
+
font-size : 20px;
|
34 |
+
line-height : 27px;
|
35 |
+
color : #808a97;
|
36 |
+
font-weight : 400;
|
37 |
+
}
|
38 |
+
|
39 |
+
#upgrade-to-premium ol {
|
40 |
+
counter-reset : item;
|
41 |
+
list-style-type : none;
|
42 |
+
margin-left : 0;
|
43 |
+
}
|
44 |
+
|
45 |
+
#upgrade-to-premium li.step {
|
46 |
+
font-family : 'open sans', sans-serif;
|
47 |
+
font-size : 15px;
|
48 |
+
color : #6a6a6b;
|
49 |
+
font-weight : 400;
|
50 |
+
position : relative;
|
51 |
+
padding-left : 50px;
|
52 |
+
line-height : 25px;
|
53 |
+
margin-bottom : 25px;
|
54 |
+
}
|
55 |
+
|
56 |
+
#upgrade-to-premium li.step:before {
|
57 |
+
content : counters(item, ".") " ";
|
58 |
+
counter-increment : item;
|
59 |
+
position : absolute;
|
60 |
+
left : 0;
|
61 |
+
top : 0;
|
62 |
+
border : 1px solid #808a97;
|
63 |
+
width : 30px;
|
64 |
+
height : 30px;
|
65 |
+
border-radius : 16px;
|
66 |
+
background-color : #808a97;
|
67 |
+
color : #ffffff;
|
68 |
+
font-weight : 700;
|
69 |
+
font-size : 18px;
|
70 |
+
text-align : center;
|
71 |
+
line-height : 27px;
|
72 |
+
}
|
73 |
+
|
74 |
+
#upgrade-to-premium li.step img {
|
75 |
+
border : 1px solid #b8b8b8;
|
76 |
+
width : 600px;
|
77 |
+
display : block;
|
78 |
+
margin : 15px 0 25px 0;
|
79 |
+
}
|
80 |
+
|
81 |
+
#cboxLoadedContent {
|
82 |
+
margin-bottom : 60px !important;
|
83 |
}
|
plugin-fw/assets/css/yit-upgrader.css
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
/* === Plugins Upgrader === */
|
2 |
-
|
3 |
-
.yit-plugin-changelog-wrapper {
|
4 |
-
display: none;
|
5 |
-
}
|
6 |
-
|
7 |
-
.yit-plugin-changelog-title {
|
8 |
-
text-transform: uppercase;
|
9 |
-
}
|
10 |
-
|
11 |
-
.yit-plugin-changelog {
|
12 |
-
height : calc(100% - 15px);
|
13 |
-
width : calc(100% - 15px);
|
14 |
-
overflow-x : hidden;
|
15 |
-
overflow-y : auto;
|
16 |
-
z-index : 999;
|
17 |
-
background: #fcfcfc;
|
18 |
-
}
|
19 |
-
|
20 |
-
.yith-updating:before{
|
21 |
-
animation: rotation 2s infinite linear;
|
22 |
}
|
1 |
+
/* === Plugins Upgrader === */
|
2 |
+
|
3 |
+
.yit-plugin-changelog-wrapper {
|
4 |
+
display: none;
|
5 |
+
}
|
6 |
+
|
7 |
+
.yit-plugin-changelog-title {
|
8 |
+
text-transform: uppercase;
|
9 |
+
}
|
10 |
+
|
11 |
+
.yit-plugin-changelog {
|
12 |
+
height : calc(100% - 15px);
|
13 |
+
width : calc(100% - 15px);
|
14 |
+
overflow-x : hidden;
|
15 |
+
overflow-y : auto;
|
16 |
+
z-index : 999;
|
17 |
+
background: #fcfcfc;
|
18 |
+
}
|
19 |
+
|
20 |
+
.yith-updating:before{
|
21 |
+
animation: rotation 2s infinite linear;
|
22 |
}
|
plugin-fw/assets/css/yith-fields.css
CHANGED
@@ -1,2248 +1,2248 @@
|
|
1 |
-
.yith-plugin-fw span.description {
|
2 |
-
display : block;
|
3 |
-
margin-top : 5px;
|
4 |
-
font-size : 12px;
|
5 |
-
color : #777;
|
6 |
-
font-style : italic;
|
7 |
-
clear : both;
|
8 |
-
}
|
9 |
-
|
10 |
-
.yith-plugin-fw span.description.inline {
|
11 |
-
display : inline-block;
|
12 |
-
margin : 0 0 0 5px;
|
13 |
-
min-width : 0;
|
14 |
-
max-width : 100%;
|
15 |
-
}
|
16 |
-
|
17 |
-
.yith-disabled {
|
18 |
-
opacity : 0.3;
|
19 |
-
pointer-events : none;
|
20 |
-
}
|
21 |
-
|
22 |
-
.yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
23 |
-
display : block;
|
24 |
-
width : 100%;
|
25 |
-
}
|
26 |
-
|
27 |
-
.yith-plugin-fw-field-wrapper .yith-inline-fields > div {
|
28 |
-
display : inline-block;
|
29 |
-
vertical-align : middle;
|
30 |
-
margin-right : 5px;
|
31 |
-
}
|
32 |
-
|
33 |
-
.yith-plugin-fw-field-wrapper span.desc {
|
34 |
-
display : block;
|
35 |
-
width : 100%;
|
36 |
-
}
|
37 |
-
|
38 |
-
.yith-plugin-fw-title-field-wrapper h3.title {
|
39 |
-
width : 100%;
|
40 |
-
padding : 0 !important;
|
41 |
-
}
|
42 |
-
|
43 |
-
.the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
|
44 |
-
float : left;
|
45 |
-
}
|
46 |
-
|
47 |
-
.yith-plugin-fw span.color-alpha {
|
48 |
-
height : 100% !important;
|
49 |
-
width : 100% !important;
|
50 |
-
border : 1px solid #d9d9d9;
|
51 |
-
margin : -1px;
|
52 |
-
}
|
53 |
-
|
54 |
-
.yith-plugin-fw .wp-color-result-text {
|
55 |
-
height : 100%;
|
56 |
-
}
|
57 |
-
|
58 |
-
.yith-plugin-fw input[type=email],
|
59 |
-
.yith-plugin-fw input[type=number],
|
60 |
-
.yith-plugin-fw input[type=text]:not(.select2-search__field),
|
61 |
-
.yith-plugin-fw select,
|
62 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=email],
|
63 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=number],
|
64 |
-
.yith-plugin-ui input[type=password],
|
65 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
|
66 |
-
.woocommerce .yith-plugin-fw table.form-table select {
|
67 |
-
width : 400px;
|
68 |
-
max-width : 100%;
|
69 |
-
height : 30px;
|
70 |
-
padding : 5px;
|
71 |
-
line-height : 1;
|
72 |
-
}
|
73 |
-
|
74 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
|
75 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
|
76 |
-
.yith-plugin-fw input[type=text].wp-color-picker,
|
77 |
-
.yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
|
78 |
-
width : 6em;
|
79 |
-
max-width : none;
|
80 |
-
height : auto;
|
81 |
-
padding : 3px 5px;
|
82 |
-
}
|
83 |
-
|
84 |
-
.wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button {
|
85 |
-
border-color : #7e8993;
|
86 |
-
}
|
87 |
-
|
88 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
|
89 |
-
.yith-plugin-fw input[type=text].colorpick {
|
90 |
-
width : 6em;
|
91 |
-
max-width : none;
|
92 |
-
height : auto;
|
93 |
-
padding : 6px;
|
94 |
-
}
|
95 |
-
|
96 |
-
.yith-plugin-fw input.select2-search__field,
|
97 |
-
.yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
|
98 |
-
.woocommerce .yith-plugin-fw input.select2-search__field,
|
99 |
-
.woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
|
100 |
-
padding : 3px;
|
101 |
-
min-width : 380px;
|
102 |
-
}
|
103 |
-
|
104 |
-
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
105 |
-
line-height : 27px;
|
106 |
-
}
|
107 |
-
|
108 |
-
.yith-plugin-fw textarea:not(.wp-editor-area) {
|
109 |
-
width : 400px;
|
110 |
-
max-width : 100%;
|
111 |
-
padding : 5px;
|
112 |
-
}
|
113 |
-
|
114 |
-
/* ------------- ICONS ------------- */
|
115 |
-
.yit-icons-manager-wrapper {
|
116 |
-
width : 100%;
|
117 |
-
max-width : 400px;
|
118 |
-
}
|
119 |
-
|
120 |
-
.yit-icons-manager-text {
|
121 |
-
width : 100%;
|
122 |
-
}
|
123 |
-
|
124 |
-
.yit-icons-manager-icon-text {
|
125 |
-
width : calc(100% - 35px) !important;
|
126 |
-
height : 30px;
|
127 |
-
float : left;
|
128 |
-
margin : 0;
|
129 |
-
}
|
130 |
-
|
131 |
-
.yit-icons-manager-icon-preview {
|
132 |
-
width : 30px;
|
133 |
-
height : 30px;
|
134 |
-
margin-right : 5px;
|
135 |
-
float : left;
|
136 |
-
padding-top : 6px;
|
137 |
-
box-sizing : border-box;
|
138 |
-
text-align : center;
|
139 |
-
background : #f1f1f1;
|
140 |
-
}
|
141 |
-
|
142 |
-
.yit-icons-manager-list-wrapper {
|
143 |
-
margin : 10px 0;
|
144 |
-
box-shadow : 0 0 0 1px #ddd;
|
145 |
-
}
|
146 |
-
|
147 |
-
ul.yit-icons-manager-list {
|
148 |
-
width : 100%;
|
149 |
-
height : 300px;
|
150 |
-
overflow-y : scroll;
|
151 |
-
margin : 0;
|
152 |
-
}
|
153 |
-
|
154 |
-
ul.yit-icons-manager-list li {
|
155 |
-
float : left;
|
156 |
-
width : 30px;
|
157 |
-
height : 30px;
|
158 |
-
padding-top : 6px;
|
159 |
-
box-sizing : border-box;
|
160 |
-
text-align : center;
|
161 |
-
background : #f1f1f1;
|
162 |
-
margin : 1px;
|
163 |
-
cursor : pointer;
|
164 |
-
}
|
165 |
-
|
166 |
-
ul.yit-icons-manager-list li:hover {
|
167 |
-
background : #c5dcf6;
|
168 |
-
}
|
169 |
-
|
170 |
-
ul.yit-icons-manager-list li.active {
|
171 |
-
background : #d4f0ff;
|
172 |
-
}
|
173 |
-
|
174 |
-
.yit-icons-manager-action-set-default {
|
175 |
-
margin-bottom : 0;
|
176 |
-
}
|
177 |
-
|
178 |
-
.yit-icons-manager-default-icon-preview {
|
179 |
-
height : 100%;
|
180 |
-
display : inline-block;
|
181 |
-
padding-left : 10px;
|
182 |
-
border-left : 1px solid #ccc;
|
183 |
-
margin-left : 10px;
|
184 |
-
}
|
185 |
-
|
186 |
-
/* ------- Text Array ------- */
|
187 |
-
.yith-plugin-fw-text-array-table td {
|
188 |
-
padding : 1px;
|
189 |
-
}
|
190 |
-
|
191 |
-
.yith-plugin-fw-text-array-table input[type=text],
|
192 |
-
.woocommerce table.form-table table.yith-plugin-fw-text-array-table input[type=text] {
|
193 |
-
width : 100%;
|
194 |
-
}
|
195 |
-
|
196 |
-
/* ------- Image Gallery ------- */
|
197 |
-
.yith-plugin-fw .yith-plugin-fw-image-gallery ul li {
|
198 |
-
display : inline-block;
|
199 |
-
width : 80px;
|
200 |
-
margin-left : 10px;
|
201 |
-
position : relative;
|
202 |
-
}
|
203 |
-
|
204 |
-
.yith-plugin-fw .yith-plugin-fw-image-gallery ul li img {
|
205 |
-
width : 80px;
|
206 |
-
border : 1px solid #ccc;
|
207 |
-
}
|
208 |
-
|
209 |
-
.yith-plugin-fw .yith-plugin-fw-image-gallery ul li ul {
|
210 |
-
position : absolute;
|
211 |
-
top : -6px;
|
212 |
-
right : -1px;
|
213 |
-
width : 20px;
|
214 |
-
height : 20px;
|
215 |
-
}
|
216 |
-
|
217 |
-
.yith-plugin-fw .yith-plugin-fw-image-gallery ul a.delete {
|
218 |
-
background : url(../images/x.png) no-repeat;
|
219 |
-
width : 20px;
|
220 |
-
height : 20px;
|
221 |
-
display : block;
|
222 |
-
text-indent : -99999px;
|
223 |
-
}
|
224 |
-
|
225 |
-
/* ------- OnOff ------- */
|
226 |
-
.yith-plugin-fw-onoff-container {
|
227 |
-
display : inline-block;
|
228 |
-
text-align : left;
|
229 |
-
}
|
230 |
-
|
231 |
-
.yith-plugin-fw-onoff-container input {
|
232 |
-
display : none;
|
233 |
-
}
|
234 |
-
|
235 |
-
.yith-plugin-fw-onoff-container input + span {
|
236 |
-
cursor : pointer;
|
237 |
-
text-indent : -9999px;
|
238 |
-
display : block;
|
239 |
-
width : 36px;
|
240 |
-
line-height : 1;
|
241 |
-
height : 20px;
|
242 |
-
background : #a4a4a4;
|
243 |
-
border-radius : 24px;
|
244 |
-
position : relative;
|
245 |
-
transition : all 0.3s;
|
246 |
-
}
|
247 |
-
|
248 |
-
|
249 |
-
.yith-plugin-fw-onoff-container input + span:before {
|
250 |
-
content : '';
|
251 |
-
background : #fff;
|
252 |
-
width : 16px;
|
253 |
-
height : 16px;
|
254 |
-
border-radius : 50%;
|
255 |
-
position : absolute;
|
256 |
-
top : 2px;
|
257 |
-
left : 2px;
|
258 |
-
transition : all 0.3s;
|
259 |
-
}
|
260 |
-
|
261 |
-
.yith-plugin-fw-onoff-container input:checked + span,
|
262 |
-
.yith-plugin-fw-onoff-container input.onoffchecked + span {
|
263 |
-
background : #0073aa;
|
264 |
-
}
|
265 |
-
|
266 |
-
.yith-plugin-fw-onoff-container input:checked + span:before,
|
267 |
-
.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
268 |
-
left : 18px;
|
269 |
-
}
|
270 |
-
|
271 |
-
/* ------- Preview ------- */
|
272 |
-
.yith-plugin-fw-preview-field {
|
273 |
-
max-height : 200px;
|
274 |
-
}
|
275 |
-
|
276 |
-
/* ------- Radio ------- */
|
277 |
-
.yith-plugin-fw-radio input[type=radio] {
|
278 |
-
margin : 0 3px 0 0;
|
279 |
-
}
|
280 |
-
|
281 |
-
.yith-plugin-fw-radio__row {
|
282 |
-
margin-bottom : 8px;
|
283 |
-
}
|
284 |
-
|
285 |
-
/* ------- Checkbox Array ------- */
|
286 |
-
.yith-plugin-fw-checkbox-array input[type=checkbox] {
|
287 |
-
margin : 2px 3px 0 0;
|
288 |
-
}
|
289 |
-
|
290 |
-
.yith-plugin-fw-checkbox-array__row {
|
291 |
-
margin-bottom : 10px;
|
292 |
-
display : flex;
|
293 |
-
}
|
294 |
-
|
295 |
-
.yith-plugin-fw-checkbox-array__row label {
|
296 |
-
display : inline-block !important;
|
297 |
-
width : auto !important;
|
298 |
-
float : none !important;
|
299 |
-
margin : 0 0 0 10px !important;
|
300 |
-
padding : 0 !important;
|
301 |
-
font-weight : 400 !important;
|
302 |
-
}
|
303 |
-
|
304 |
-
.yith-plugin-fw-checkbox-array__row label small {
|
305 |
-
display : block;
|
306 |
-
line-height : 2em;
|
307 |
-
}
|
308 |
-
|
309 |
-
/* ------- Sidebar Layout ------- */
|
310 |
-
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
311 |
-
display : none;
|
312 |
-
width : 0px;
|
313 |
-
}
|
314 |
-
|
315 |
-
.yith-plugin-fw-sidebar-layout input[type="radio"]:first-child {
|
316 |
-
margin-right : -2px;
|
317 |
-
}
|
318 |
-
|
319 |
-
.yith-plugin-fw-sidebar-layout input[type="radio"] + img {
|
320 |
-
border : 2px solid #fff;
|
321 |
-
padding : 1px;
|
322 |
-
}
|
323 |
-
|
324 |
-
.yith-plugin-fw-sidebar-layout input[type="radio"] + img:hover {
|
325 |
-
cursor : pointer;
|
326 |
-
}
|
327 |
-
|
328 |
-
.yith-plugin-fw-sidebar-layout input[checked] + img {
|
329 |
-
border : 2px solid #f2ad35;
|
330 |
-
padding : 1px;
|
331 |
-
}
|
332 |
-
|
333 |
-
.yith-plugin-fw-sidebar-layout select {
|
334 |
-
vertical-align : 12px;
|
335 |
-
}
|
336 |
-
|
337 |
-
.yit-admin-panel-content-wrap .yith-plugin-fw-sidebar-layout label {
|
338 |
-
font-weight : bold;
|
339 |
-
width : 200px;
|
340 |
-
float : left;
|
341 |
-
line-height : 23px;
|
342 |
-
margin-left : -230px;
|
343 |
-
}
|
344 |
-
|
345 |
-
/* ------- Slider ------- */
|
346 |
-
.yith-plugin-fw .slider {
|
347 |
-
padding-top : 20px;
|
348 |
-
}
|
349 |
-
|
350 |
-
.yith-plugin-fw-slider-container .ui-slider .minCaption {
|
351 |
-
position : absolute;
|
352 |
-
right : 95%;
|
353 |
-
top : -6px;
|
354 |
-
margin-right : 11px;
|
355 |
-
}
|
356 |
-
|
357 |
-
.yith-plugin-fw-slider-container .ui-slider .maxCaption {
|
358 |
-
position : absolute;
|
359 |
-
left : 95%;
|
360 |
-
top : -6px;
|
361 |
-
margin-left : 20px;
|
362 |
-
}
|
363 |
-
|
364 |
-
.yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
365 |
-
background : #fff;
|
366 |
-
border : 0px !important;
|
367 |
-
top : -12px !important;
|
368 |
-
border-radius : 50%;
|
369 |
-
width : 27px !important;
|
370 |
-
height : 27px !important;
|
371 |
-
box-sizing : border-box;
|
372 |
-
box-shadow : 0 1px 7px -1px rgba(0, 0, 0, 0.5);
|
373 |
-
font-size : 13px;
|
374 |
-
padding : 6px 0;
|
375 |
-
font-weight : 600;
|
376 |
-
color : #555;
|
377 |
-
text-align : center;
|
378 |
-
}
|
379 |
-
|
380 |
-
.yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
|
381 |
-
background : #ccc;
|
382 |
-
border : none !important;
|
383 |
-
height : 3px !important;
|
384 |
-
border-radius : 3px !important;
|
385 |
-
width : 90%;
|
386 |
-
margin : 15px 5% 20px 5%;
|
387 |
-
}
|
388 |
-
|
389 |
-
.yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
|
390 |
-
background : #4b93ff;
|
391 |
-
left : 0px !important;
|
392 |
-
-webkit-border-radius : 3px;
|
393 |
-
-moz-border-radius : 3px;
|
394 |
-
-khtml-border-radius : 3px;
|
395 |
-
border-radius : 3px;
|
396 |
-
}
|
397 |
-
|
398 |
-
/* ------- Select2 ------- */
|
399 |
-
.yith-plugin-fw-select2-wrapper {
|
400 |
-
width : 400px;
|
401 |
-
}
|
402 |
-
|
403 |
-
/* ------- Textarea ------- */
|
404 |
-
.yith-plugin-fw-textarea-editor-field-wrapper {
|
405 |
-
max-width : 1000px;
|
406 |
-
clear : both;
|
407 |
-
}
|
408 |
-
|
409 |
-
.yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
|
410 |
-
.woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
|
411 |
-
width : 100%;
|
412 |
-
}
|
413 |
-
|
414 |
-
/* ------- Buttons ------- */
|
415 |
-
.yith-plugin-fw-buttons-field-wrapper {
|
416 |
-
margin-top : 7px;
|
417 |
-
}
|
418 |
-
|
419 |
-
/* ------- Select Images ------- */
|
420 |
-
.yith-plugin-fw-select-images__list {
|
421 |
-
margin : 0;
|
422 |
-
display : flex;
|
423 |
-
flex-wrap : wrap;
|
424 |
-
}
|
425 |
-
|
426 |
-
.yith-plugin-fw-select-images__item {
|
427 |
-
width : calc(20% - 10px);
|
428 |
-
min-width : 150px;
|
429 |
-
margin : 0 10px 10px 0;
|
430 |
-
padding : 10px;
|
431 |
-
box-sizing : border-box;
|
432 |
-
cursor : pointer;
|
433 |
-
transition : all .3s;
|
434 |
-
border : 2px solid #eee;
|
435 |
-
display : flex;
|
436 |
-
flex-direction : column;
|
437 |
-
justify-content : space-between;
|
438 |
-
}
|
439 |
-
|
440 |
-
.yith-plugin-fw-select-images__item:hover,
|
441 |
-
.yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
|
442 |
-
border-color : #07bcce;
|
443 |
-
}
|
444 |
-
|
445 |
-
.yith-plugin-fw-select-images__item__label {
|
446 |
-
text-align : center;
|
447 |
-
font-weight : 600;
|
448 |
-
margin-bottom : 10px;
|
449 |
-
}
|
450 |
-
|
451 |
-
.yith-plugin-fw-select-images__item img {
|
452 |
-
display : block;
|
453 |
-
max-width : 100%;
|
454 |
-
margin : 0 auto;
|
455 |
-
}
|
456 |
-
|
457 |
-
/****************
|
458 |
-
WordPress 5.3 with old panel fixes
|
459 |
-
****************/
|
460 |
-
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
|
461 |
-
height : auto;
|
462 |
-
line-height : 1;
|
463 |
-
}
|
464 |
-
|
465 |
-
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow {
|
466 |
-
height : 100%;
|
467 |
-
}
|
468 |
-
|
469 |
-
/****************
|
470 |
-
YITH UI
|
471 |
-
****************/
|
472 |
-
.yith-plugin-fw-banner {
|
473 |
-
width : 100%;
|
474 |
-
height : 45px;
|
475 |
-
background : #cfd9dd url(../images/banner-premium.png) no-repeat;
|
476 |
-
display : flex;
|
477 |
-
align-items : center;
|
478 |
-
padding-right : -23px;
|
479 |
-
}
|
480 |
-
|
481 |
-
.yith-plugin-fw-banner h1 {
|
482 |
-
text-transform : uppercase;
|
483 |
-
color : #0c5777;
|
484 |
-
font-size : 15px;
|
485 |
-
padding : 0 0 0 110px;
|
486 |
-
font-weight : 700;
|
487 |
-
text-align : left;
|
488 |
-
display : inline-block;
|
489 |
-
box-sizing : border-box;
|
490 |
-
}
|
491 |
-
|
492 |
-
.yith-plugin-fw-banner span {
|
493 |
-
font-style : italic;
|
494 |
-
display : block;
|
495 |
-
font-size : 15px;
|
496 |
-
color : #214249;
|
497 |
-
text-transform : none;
|
498 |
-
text-align : right;
|
499 |
-
}
|
500 |
-
|
501 |
-
.yith-plugin-fw-banner a,
|
502 |
-
.yith-plugin-fw-banner a:focus {
|
503 |
-
text-decoration : none;
|
504 |
-
outline : none;
|
505 |
-
box-shadow : none;
|
506 |
-
}
|
507 |
-
|
508 |
-
.yith-plugin-fw-rate {
|
509 |
-
margin : 20px 0;
|
510 |
-
}
|
511 |
-
|
512 |
-
.yith-plugin-fw-rate .dashicons-star-filled {
|
513 |
-
font-size : 12px;
|
514 |
-
margin : 4px -4px;
|
515 |
-
color : #0c5777;
|
516 |
-
}
|
517 |
-
|
518 |
-
.yith-plugin-fw-rate a {
|
519 |
-
text-decoration : none;
|
520 |
-
}
|
521 |
-
|
522 |
-
.yith-plugin-ui a {
|
523 |
-
outline : none;
|
524 |
-
box-shadow : none;
|
525 |
-
}
|
526 |
-
|
527 |
-
.yith-plugin-ui {
|
528 |
-
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
529 |
-
}
|
530 |
-
|
531 |
-
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
532 |
-
margin-top : 10px;
|
533 |
-
}
|
534 |
-
|
535 |
-
.yith-plugin-ui .nav-tab {
|
536 |
-
background-color : #336374;
|
537 |
-
color : #fff;
|
538 |
-
font-size : 15px;
|
539 |
-
padding : 7px 20px;
|
540 |
-
border : 0;
|
541 |
-
margin : 0 4px 0 0;
|
542 |
-
transition : background-color 0.3s linear;
|
543 |
-
float : none;
|
544 |
-
display : inline-block;
|
545 |
-
}
|
546 |
-
|
547 |
-
.yith-plugin-ui .nav-tab.yith-premium {
|
548 |
-
background-color : #be421c;
|
549 |
-
}
|
550 |
-
|
551 |
-
.yith-plugin-ui .yith-nav-tab-wrapper .yith-plugin-fw-tab-element:hover > a.nav-tab:not(.nav-tab-active),
|
552 |
-
.yith-plugin-ui .yith-nav-tab-wrapper .nav-tab:not(.nav-tab-active):hover {
|
553 |
-
background-color : #207a92;
|
554 |
-
}
|
555 |
-
|
556 |
-
.yith-plugin-ui .yith-nav-tab-wrapper .yith-plugin-fw-tab-element:hover > a.nav-tab.yith-premium:not(.nav-tab-active),
|
557 |
-
.yith-plugin-ui .yith-nav-tab-wrapper .nav-tab.yith-premium:not(.nav-tab-active):hover {
|
558 |
-
background-color : #d24318;
|
559 |
-
}
|
560 |
-
|
561 |
-
.yith-plugin-ui .nav-tab-active,
|
562 |
-
.yith-plugin-ui .nav-tab-active:hover,
|
563 |
-
.yith-plugin-ui .nav-tab-active:focus,
|
564 |
-
.yith-plugin-ui .nav-tab-active:focus:active {
|
565 |
-
background-color : #fff;
|
566 |
-
color : #336374;
|
567 |
-
box-shadow : 0 3px 0 -1px #fff;
|
568 |
-
border-bottom : 0;
|
569 |
-
}
|
570 |
-
|
571 |
-
.yith-plugin-ui .nav-tab-active.yith-premium,
|
572 |
-
.yith-plugin-ui .nav-tab-active.yith-premium:hover,
|
573 |
-
.yith-plugin-ui .nav-tab-active.yith-premium:focus,
|
574 |
-
.yith-plugin-ui .nav-tab-active.yith-premium:focus:active {
|
575 |
-
background-color : #fff;
|
576 |
-
color : #be421c;
|
577 |
-
box-shadow : none;
|
578 |
-
}
|
579 |
-
|
580 |
-
.yith-plugin-ui .yith-plugin-fw-tab-element:first-child .nav-tab-active {
|
581 |
-
border-left : 1px solid #ddd;
|
582 |
-
}
|
583 |
-
|
584 |
-
.yith-plugin-ui #plugin-fw-wc {
|
585 |
-
padding-top : 0px;
|
586 |
-
}
|
587 |
-
|
588 |
-
.yith-plugin-ui .form-table td {
|
589 |
-
padding : 15px 20px;
|
590 |
-
}
|
591 |
-
|
592 |
-
.yith-plugin-ui.metaboxes-tab label {
|
593 |
-
color : #33373b;
|
594 |
-
font-size : 14px;
|
595 |
-
margin-left : -248px;
|
596 |
-
}
|
597 |
-
|
598 |
-
.yith-plugin-ui.metaboxes-tab .the-metabox {
|
599 |
-
margin : 40px 0 40px 290px;
|
600 |
-
margin-left : 264px;
|
601 |
-
}
|
602 |
-
|
603 |
-
.yith-plugin-ui.metaboxes-tab label {
|
604 |
-
width : 200px;
|
605 |
-
font-weight : 600;
|
606 |
-
}
|
607 |
-
|
608 |
-
.yith-plugin-ui span.description {
|
609 |
-
color : #716269;
|
610 |
-
font-size : 13px;
|
611 |
-
font-style : normal;
|
612 |
-
font-weight : 400;
|
613 |
-
margin-top : 15px;
|
614 |
-
margin-left : 0;
|
615 |
-
}
|
616 |
-
|
617 |
-
#wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
|
618 |
-
border : 0;
|
619 |
-
border-bottom : 1px solid #ddd;
|
620 |
-
margin-right : 15px;
|
621 |
-
margin-bottom : 0;
|
622 |
-
background-color : transparent;
|
623 |
-
padding-left : 0;
|
624 |
-
}
|
625 |
-
|
626 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table,
|
627 |
-
.yith-plugin-ui #yith-plugin-fw-panel table.form-table,
|
628 |
-
.yith-plugin-ui table.form-table {
|
629 |
-
border : 1px solid #d8d8d8;
|
630 |
-
border-top : 0;
|
631 |
-
margin-bottom : 40px;
|
632 |
-
}
|
633 |
-
|
634 |
-
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
635 |
-
background-color : transparent;
|
636 |
-
border : 0;
|
637 |
-
text-transform : none;
|
638 |
-
border-bottom : 1px solid #ddd;
|
639 |
-
}
|
640 |
-
|
641 |
-
.yith-plugin-ui h2 {
|
642 |
-
color : #2a8db0;
|
643 |
-
font-size : 16px;
|
644 |
-
border : 1px solid #d8d8d8;
|
645 |
-
border-bottom : 0;
|
646 |
-
background-color : #fff;
|
647 |
-
padding : 35px 20px;
|
648 |
-
margin : 0px;
|
649 |
-
}
|
650 |
-
|
651 |
-
.yith-plugin-ui .yith-plugin-fw-custom-tab h2 {
|
652 |
-
border : 0px solid #d8d8d8;
|
653 |
-
padding-left : 0;
|
654 |
-
}
|
655 |
-
|
656 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
|
657 |
-
padding : 30px 20px;
|
658 |
-
}
|
659 |
-
|
660 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
|
661 |
-
padding : 0 20px 30px;
|
662 |
-
}
|
663 |
-
|
664 |
-
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
665 |
-
background : #fff;
|
666 |
-
border-left : 1px solid #d9d9d9;
|
667 |
-
border-right : 1px solid #d9d9d9;
|
668 |
-
margin : -20px 0 0 0;
|
669 |
-
padding-left : 20px;
|
670 |
-
padding-bottom : 5px;
|
671 |
-
}
|
672 |
-
|
673 |
-
.yith-plugin-ui #plugin-fw-wc h2 + div p, .yith-plugin-ui p.info-box {
|
674 |
-
background : #f1f1f1;
|
675 |
-
font-size : 14px;
|
676 |
-
font-weight : 700;
|
677 |
-
width : 50%;
|
678 |
-
display : block;
|
679 |
-
padding : 15px;
|
680 |
-
margin-bottom : 0;
|
681 |
-
}
|
682 |
-
|
683 |
-
.yith-plugin-ui #plugin-fw-wc h2 + div p:before, .yith-plugin-ui p.info-box:before {
|
684 |
-
content : "\e90e";
|
685 |
-
font-family : yith-icon;
|
686 |
-
font-size : 30px;
|
687 |
-
font-weight : normal;
|
688 |
-
display : block;
|
689 |
-
margin-top : -12px;
|
690 |
-
float : left;
|
691 |
-
margin-right : 15px;
|
692 |
-
}
|
693 |
-
|
694 |
-
.yith-plugin-ui h2:first-child {
|
695 |
-
border-top : 0;
|
696 |
-
}
|
697 |
-
|
698 |
-
/*** Icon ***/
|
699 |
-
.yith-plugin-ui .yith-icon--right-overlay {
|
700 |
-
position : relative;
|
701 |
-
left : -33px;
|
702 |
-
line-height : 36px;
|
703 |
-
width : 0;
|
704 |
-
}
|
705 |
-
|
706 |
-
/*** General Input Style ***/
|
707 |
-
|
708 |
-
.yith-plugin-ui .yith-plugin-fw select,
|
709 |
-
.yith-plugin-ui textarea:not(.wp-editor-area),
|
710 |
-
.yith-plugin-ui input[type=number],
|
711 |
-
.yith-plugin-ui.metaboxes-tab input[type=number],
|
712 |
-
.yith-plugin-ui input[type=text],
|
713 |
-
.yith-plugin-ui input[type=email],
|
714 |
-
.yith-plugin-ui input[type=password],
|
715 |
-
.yith-plugin-ui .search-box input[name="s"],
|
716 |
-
.yith-plugin-fw.yith-plugin-ui input[type=text]:not(.select2-search__field),
|
717 |
-
.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text],
|
718 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text]:not(.select2-search__field),
|
719 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
|
720 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area),
|
721 |
-
.woocommerce .yith-plugin-fw table.form-table input[type=password],
|
722 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
|
723 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
|
724 |
-
border : 1px solid #d8d8d8;
|
725 |
-
border-radius : 8px;
|
726 |
-
padding : 8px 10px;
|
727 |
-
height : 38px;
|
728 |
-
min-width : 90px;
|
729 |
-
box-shadow : none;
|
730 |
-
color : #716269;
|
731 |
-
}
|
732 |
-
|
733 |
-
.yith-plugin-ui textarea:not(.wp-editor-area),
|
734 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area) {
|
735 |
-
height : auto;
|
736 |
-
padding : 8px;
|
737 |
-
}
|
738 |
-
|
739 |
-
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
|
740 |
-
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
|
741 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
|
742 |
-
border : 0;
|
743 |
-
height : 30px;
|
744 |
-
max-width : 121px;
|
745 |
-
font-size : 11px;
|
746 |
-
padding : 0;
|
747 |
-
}
|
748 |
-
|
749 |
-
.yith-plugin-ui .search-box input[name="s"] {
|
750 |
-
height : 35px;
|
751 |
-
}
|
752 |
-
|
753 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
|
754 |
-
.yith-plugin-ui input[type=text].small-text {
|
755 |
-
width : 100px;
|
756 |
-
height : 25px;
|
757 |
-
border : 1px solid #d9d9d9;
|
758 |
-
}
|
759 |
-
|
760 |
-
|
761 |
-
.yith-plugin-ui select:focus,
|
762 |
-
.yith-plugin-ui .yith-plugin-fw select:focus,
|
763 |
-
.woocommerce .yith-plugin-ui table.form-table select:focus,
|
764 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select:focus,
|
765 |
-
.yith-plugin-ui input[type=text]:not(.select2-search__field):focus,
|
766 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text]:not(.select2-search__field):focus,
|
767 |
-
.yith-plugin-ui input[type=number]:focus,
|
768 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number]:focus,
|
769 |
-
.yith-plugin-ui textarea:not(.wp-editor-area):focus,
|
770 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area):focus {
|
771 |
-
border-color : #a7d9ec;
|
772 |
-
}
|
773 |
-
|
774 |
-
.woocommerce .yith-plugin-ui table.form-table select,
|
775 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
|
776 |
-
.yith-plugin-ui select {
|
777 |
-
-webkit-appearance : none;
|
778 |
-
line-height : 1.2em;
|
779 |
-
min-height : 35px;
|
780 |
-
background : #fff url("../images/arrow_down.svg") no-repeat right center;
|
781 |
-
background-size : 35px 13px;
|
782 |
-
border-radius : 8px;
|
783 |
-
padding-right : 30px;
|
784 |
-
}
|
785 |
-
|
786 |
-
.yith-plugin-ui .form-table th {
|
787 |
-
width : 200px;
|
788 |
-
padding-right : 50px;
|
789 |
-
}
|
790 |
-
|
791 |
-
/** SELECT 2 **/
|
792 |
-
.yith-plugin-ui .select2-container,
|
793 |
-
.yith-plugin-ui .select2-selection--single {
|
794 |
-
height : auto;
|
795 |
-
padding : 2px;
|
796 |
-
outline : none;
|
797 |
-
}
|
798 |
-
|
799 |
-
.yith-plugin-ui .select2-container .select2-selection--single,
|
800 |
-
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
801 |
-
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
|
802 |
-
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
|
803 |
-
.yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
|
804 |
-
.yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple {
|
805 |
-
margin : 0;
|
806 |
-
border : 0;
|
807 |
-
box-shadow : none;
|
808 |
-
}
|
809 |
-
|
810 |
-
.yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow {
|
811 |
-
background : none;
|
812 |
-
}
|
813 |
-
|
814 |
-
/* old panel*/
|
815 |
-
|
816 |
-
.yith-plugin-ui span.select2.select2-container.select2-container--default,
|
817 |
-
span.select2.select2-container.select2-container--default.yith-plugin-fw-select2-container {
|
818 |
-
border : 1px solid #d8d8d8;
|
819 |
-
border-radius : 8px;
|
820 |
-
}
|
821 |
-
|
822 |
-
.yith-plugin-ui span.select2.select2-container.select2-container--default:hover,
|
823 |
-
.yith-plugin-ui span.select2.select2-container.select2-container--default:active,
|
824 |
-
.yith-plugin-ui span.select2.select2-container.select2-container--default:focus {
|
825 |
-
border-color : #a7d9ec;
|
826 |
-
}
|
827 |
-
|
828 |
-
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
829 |
-
color : #fff;
|
830 |
-
}
|
831 |
-
|
832 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].select2-search__field,
|
833 |
-
.yith-plugin-ui .yith-plugin-fw table.form-table input.select2-search__field {
|
834 |
-
border : 0;
|
835 |
-
padding : 0;
|
836 |
-
height : initial;
|
837 |
-
min-width : 380px;
|
838 |
-
}
|
839 |
-
|
840 |
-
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice,
|
841 |
-
.yith-plugin-ui .select2-selection__choice {
|
842 |
-
color : #fff;
|
843 |
-
background-color : #4e8ba2;
|
844 |
-
border-radius : 12px;
|
845 |
-
padding : 3px 11px;
|
846 |
-
border-color : #4e8ba2;
|
847 |
-
font-size : 13px;
|
848 |
-
}
|
849 |
-
|
850 |
-
.wc-wp-version-gte-53 .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow {
|
851 |
-
background-image : none;
|
852 |
-
}
|
853 |
-
|
854 |
-
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
|
855 |
-
content : "\e900";
|
856 |
-
font-family : 'yith-icon' !important;
|
857 |
-
line-height : 36px;
|
858 |
-
color : #d9d9d9;
|
859 |
-
}
|
860 |
-
|
861 |
-
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
862 |
-
display : none;
|
863 |
-
}
|
864 |
-
|
865 |
-
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown:after {
|
866 |
-
display : none;
|
867 |
-
}
|
868 |
-
|
869 |
-
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--below,
|
870 |
-
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
|
871 |
-
margin-top : 10px;
|
872 |
-
border-radius : 8px;
|
873 |
-
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
874 |
-
}
|
875 |
-
|
876 |
-
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
|
877 |
-
margin-top : -10px;
|
878 |
-
}
|
879 |
-
|
880 |
-
.yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
|
881 |
-
.yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
|
882 |
-
border-radius : 8px;
|
883 |
-
}
|
884 |
-
|
885 |
-
.yith-plugin-fw-select2-container .select2-results .select2-results__group, .select2-results .select2-results__option:first-child {
|
886 |
-
border-top-left-radius : 8px;
|
887 |
-
border-top-right-radius : 8px;
|
888 |
-
}
|
889 |
-
|
890 |
-
.yith-plugin-fw-select2-container .select2-results .select2-results__group,
|
891 |
-
.yith-plugin-fw-select2-container .select2-results .select2-results__option:last-child {
|
892 |
-
border-bottom-left-radius : 8px;
|
893 |
-
border-bottom-right-radius : 8px;
|
894 |
-
}
|
895 |
-
|
896 |
-
.yith-plugin-fw-select2-container .select2-dropdown {
|
897 |
-
border : 0;
|
898 |
-
}
|
899 |
-
|
900 |
-
.yith-plugin-fw-select2-container.select2-container--default .select2-results__option[data-selected=true] {
|
901 |
-
background-color : #fff;
|
902 |
-
outline : none;
|
903 |
-
}
|
904 |
-
|
905 |
-
.yith-plugin-fw-select2-container.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
906 |
-
background-color : #e8eff1;
|
907 |
-
color : #4e8ba2;
|
908 |
-
outline : none;
|
909 |
-
}
|
910 |
-
|
911 |
-
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
|
912 |
-
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
913 |
-
float : right;
|
914 |
-
padding-left : 15px;
|
915 |
-
text-indent : -9999px;
|
916 |
-
}
|
917 |
-
|
918 |
-
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
919 |
-
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
920 |
-
float : right;
|
921 |
-
color : #fff;
|
922 |
-
content : "\e906";
|
923 |
-
font-family : 'yith-icon' !important;
|
924 |
-
font-size : 9px;
|
925 |
-
line-height : 21px;
|
926 |
-
text-indent : 0;
|
927 |
-
}
|
928 |
-
|
929 |
-
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
930 |
-
.yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple,
|
931 |
-
.wc-wp-version-gte-53 .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple {
|
932 |
-
border : 0;
|
933 |
-
box-shadow : none;
|
934 |
-
}
|
935 |
-
|
936 |
-
.yith-plugin-fw .select2-search input[type=text] {
|
937 |
-
border : 0;
|
938 |
-
padding : 0;
|
939 |
-
height : auto;
|
940 |
-
}
|
941 |
-
|
942 |
-
.yith-plugin-ui .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier,
|
943 |
-
.yith-plugin-fw-panel .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier {
|
944 |
-
position : absolute;
|
945 |
-
padding-top : 5px;
|
946 |
-
}
|
947 |
-
|
948 |
-
.yith-plugin-ui input[type=text].select2-search__field {
|
949 |
-
border : 0;
|
950 |
-
padding : 0;
|
951 |
-
height : 30px;
|
952 |
-
}
|
953 |
-
|
954 |
-
.yith-plugin-ui .select2-container--default .select2-search--dropdown .select2-search__field,
|
955 |
-
.yith-plugin-fw-panel .select2-container--default .select2-search--dropdown .select2-search__field {
|
956 |
-
border : 1px solid #d9d9d9;
|
957 |
-
border-radius : 8px;
|
958 |
-
box-shadow : none;
|
959 |
-
}
|
960 |
-
|
961 |
-
.yith-plugin-ui .select2-dropdown,
|
962 |
-
.yith-plugin-fw-panel .select2-dropdown {
|
963 |
-
border : 1px solid #d9d9d9;
|
964 |
-
}
|
965 |
-
|
966 |
-
/** RADIO BUTTON **/
|
967 |
-
.yith-plugin-ui [type="radio"]:checked,
|
968 |
-
.yith-plugin-ui [type="radio"]:not(:checked) {
|
969 |
-
position : absolute;
|
970 |
-
left : -9999px;
|
971 |
-
}
|
972 |
-
|
973 |
-
.yith-plugin-ui [type="radio"]:checked + label,
|
974 |
-
.yith-plugin-ui [type="radio"]:not(:checked) + label {
|
975 |
-
position : relative;
|
976 |
-
padding-left : 35px;
|
977 |
-
cursor : pointer;
|
978 |
-
line-height : 20px;
|
979 |
-
display : inline-block;
|
980 |
-
color : #716269;
|
981 |
-
font-size : 14px;
|
982 |
-
}
|
983 |
-
|
984 |
-
.yith-plugin-ui [type="radio"]:checked + label:before,
|
985 |
-
.yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
986 |
-
content : '';
|
987 |
-
position : absolute;
|
988 |
-
left : 0;
|
989 |
-
top : 0;
|
990 |
-
width : 19px;
|
991 |
-
height : 19px;
|
992 |
-
border : 1px solid #d8d8d8;
|
993 |
-
border-radius : 100%;
|
994 |
-
background : #fff;
|
995 |
-
}
|
996 |
-
|
997 |
-
.yith-plugin-ui [type="radio"]:checked + label:after,
|
998 |
-
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
999 |
-
content : '';
|
1000 |
-
width : 13px;
|
1001 |
-
height : 13px;
|
1002 |
-
background : #4e8ba2;
|
1003 |
-
position : absolute;
|
1004 |
-
top : 4px;
|
1005 |
-
left : 4px;
|
1006 |
-
border-radius : 100%;
|
1007 |
-
-webkit-transition : all 0.2s ease;
|
1008 |
-
transition : all 0.2s ease;
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
1012 |
-
opacity : 0;
|
1013 |
-
-webkit-transform : scale(0);
|
1014 |
-
transform : scale(0);
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
.yith-plugin-ui [type="radio"]:checked + label:after {
|
1018 |
-
opacity : 1;
|
1019 |
-
-webkit-transform : scale(1);
|
1020 |
-
transform : scale(1);
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
/** CHECKBOX **/
|
1024 |
-
.yith-plugin-ui input[type="checkbox"] {
|
1025 |
-
-webkit-appearance : none;
|
1026 |
-
background-color : #fff;
|
1027 |
-
border : 1px solid #d8d8d8;
|
1028 |
-
box-shadow : none;
|
1029 |
-
width : 18px;
|
1030 |
-
height : 18px;
|
1031 |
-
border-radius : 3px;
|
1032 |
-
display : inline-block;
|
1033 |
-
position : relative;
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
.yith-plugin-ui input[type="checkbox"]:checked {
|
1037 |
-
background-color : #4e8ba2;
|
1038 |
-
border-color : #488197;
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
.yith-plugin-ui .forminp-checkbox span.description.inline {
|
1042 |
-
margin-left : 10px;
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
.yith-plugin-ui input[type="checkbox"]:checked:before {
|
1046 |
-
display : none;
|
1047 |
-
}
|
1048 |
-
|
1049 |
-
.yith-plugin-ui input[type="checkbox"]:checked:after {
|
1050 |
-
content : "\e905";
|
1051 |
-
font-family : 'yith-icon';
|
1052 |
-
font-size : 10px;
|
1053 |
-
position : absolute;
|
1054 |
-
font-weight : 600;
|
1055 |
-
top : 8px;
|
1056 |
-
left : 3px;
|
1057 |
-
color : #fff;
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
/** ONOFF **/
|
1061 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input[type="checkbox"] {
|
1062 |
-
display : none;
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1066 |
-
border : 1px solid #d8d8d8;
|
1067 |
-
background-color : #fff;
|
1068 |
-
width : 60px;
|
1069 |
-
height : 24px;
|
1070 |
-
line-height : 14px;
|
1071 |
-
padding : 4px;
|
1072 |
-
box-sizing : border-box;
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1076 |
-
background-color : #d8d8d8;
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1080 |
-
width : 13px;
|
1081 |
-
height : 13px;
|
1082 |
-
top : 5px;
|
1083 |
-
left : 6px;
|
1084 |
-
background-color : #d8d8d8;
|
1085 |
-
}
|
1086 |
-
|
1087 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
1088 |
-
content : attr(data-text-off);
|
1089 |
-
height : 14px;
|
1090 |
-
font-size : 12px;
|
1091 |
-
font-weight : 600;
|
1092 |
-
padding-left : 18px;
|
1093 |
-
color : #979797;
|
1094 |
-
display : block;
|
1095 |
-
white-space : nowrap;
|
1096 |
-
text-align : center;
|
1097 |
-
}
|
1098 |
-
|
1099 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span,
|
1100 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input.onoffchecked + span {
|
1101 |
-
background-color : #fff;
|
1102 |
-
border-color : #98aa36;
|
1103 |
-
}
|
1104 |
-
|
1105 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
|
1106 |
-
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
1107 |
-
background-color : #98aa36;
|
1108 |
-
left : 38px;
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
|
1112 |
-
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
1113 |
-
content : attr(data-text-on);
|
1114 |
-
color : #98aa36;
|
1115 |
-
height : 14px;
|
1116 |
-
font-size : 12px;
|
1117 |
-
font-weight : 600;
|
1118 |
-
padding-left : 0;
|
1119 |
-
padding-right : 18px;
|
1120 |
-
display : block;
|
1121 |
-
white-space : nowrap;
|
1122 |
-
text-align : center;
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1126 |
-
text-indent : 0;
|
1127 |
-
}
|
1128 |
-
|
1129 |
-
|
1130 |
-
/**
|
1131 |
-
DATEPICKER
|
1132 |
-
*/
|
1133 |
-
.yith-plugin-ui .yith-plugin-fw-datepicker + .yith-icon-calendar,
|
1134 |
-
.yith-plugin-fw-datepicker + .yith-icon-calendar {
|
1135 |
-
color : #ccc;
|
1136 |
-
font-size : 18px;
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
|
1140 |
-
border : 0;
|
1141 |
-
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
1142 |
-
}
|
1143 |
-
|
1144 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-header.ui-widget-header {
|
1145 |
-
background : #4e8ba2;
|
1146 |
-
color : #fff;
|
1147 |
-
font-size : 11px;
|
1148 |
-
line-height : 25px;
|
1149 |
-
border : 0;
|
1150 |
-
min-height : 25px;
|
1151 |
-
}
|
1152 |
-
|
1153 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-title {
|
1154 |
-
line-height : 25px;
|
1155 |
-
}
|
1156 |
-
|
1157 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker th {
|
1158 |
-
color : #716269;
|
1159 |
-
}
|
1160 |
-
|
1161 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-icon,
|
1162 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
|
1163 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
|
1164 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1165 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w,
|
1166 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e {
|
1167 |
-
background : none;
|
1168 |
-
content : "";
|
1169 |
-
border : 0;
|
1170 |
-
text-indent : 0;
|
1171 |
-
width : 15px;
|
1172 |
-
height : 20px;
|
1173 |
-
display : block;
|
1174 |
-
overflow : hidden;
|
1175 |
-
}
|
1176 |
-
|
1177 |
-
.yith-plugin-ui .yith-password-wrapper {
|
1178 |
-
display : inline-block;
|
1179 |
-
width : auto;
|
1180 |
-
position : relative;
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before,
|
1184 |
-
.yith-plugin-ui .yith-password-wrapper .yith-password-eye:before {
|
1185 |
-
content : '\e911';
|
1186 |
-
color : #999;
|
1187 |
-
font-family : 'yith-icon';
|
1188 |
-
font-size : 20px;
|
1189 |
-
font-weight : normal;
|
1190 |
-
width : 15px;
|
1191 |
-
display : block;
|
1192 |
-
position : absolute;
|
1193 |
-
right : 13px;
|
1194 |
-
top : 0;
|
1195 |
-
line-height : 38px;
|
1196 |
-
bottom : 0;
|
1197 |
-
cursor : pointer;
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before {
|
1201 |
-
content : '\e912';
|
1202 |
-
}
|
1203 |
-
|
1204 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w:before {
|
1205 |
-
content : "\e901";
|
1206 |
-
color : #fff;
|
1207 |
-
font-family : 'yith-icon';
|
1208 |
-
font-size : 12px;
|
1209 |
-
font-weight : normal;
|
1210 |
-
width : 15px;
|
1211 |
-
display : block;
|
1212 |
-
}
|
1213 |
-
|
1214 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e:before {
|
1215 |
-
content : "\e902";
|
1216 |
-
color : #fff;
|
1217 |
-
text-indent : 0;
|
1218 |
-
font-family : 'yith-icon';
|
1219 |
-
font-size : 12px;
|
1220 |
-
font-weight : normal;
|
1221 |
-
width : 15px;
|
1222 |
-
display : block;
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
/* arrow */
|
1226 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
|
1227 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1228 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover,
|
1229 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-next-hover {
|
1230 |
-
top : 1px;
|
1231 |
-
cursor : pointer;
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev,
|
1235 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover {
|
1236 |
-
left : 5px;
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1240 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-next.ui-datepicker-next-hover {
|
1241 |
-
right : 1px;
|
1242 |
-
}
|
1243 |
-
|
1244 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker table {
|
1245 |
-
font-size : 10px;
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-default,
|
1249 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-default,
|
1250 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-default {
|
1251 |
-
background : #fff;
|
1252 |
-
border : 1px solid #d9d9d9;
|
1253 |
-
|
1254 |
-
}
|
1255 |
-
|
1256 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-hover,
|
1257 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-hover,
|
1258 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div a.ui-state-default:focus,
|
1259 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-focus,
|
1260 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-focus {
|
1261 |
-
background : #ebf1f3;
|
1262 |
-
border : 1px solid #bfd5dd;
|
1263 |
-
outline : none;
|
1264 |
-
box-shadow : none;
|
1265 |
-
}
|
1266 |
-
|
1267 |
-
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
|
1268 |
-
.woocommerce #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-focus {
|
1269 |
-
background : none;
|
1270 |
-
border : 0;
|
1271 |
-
}
|
1272 |
-
|
1273 |
-
/** colorpicker **/
|
1274 |
-
.yith-plugin-ui .iris-slider-offset.ui-slider.ui-widget-content {
|
1275 |
-
background : transparent !important;
|
1276 |
-
height : auto !important;
|
1277 |
-
}
|
1278 |
-
|
1279 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .yith-colorpicker-group:not(:first-child) {
|
1280 |
-
margin-top : 20px;
|
1281 |
-
}
|
1282 |
-
|
1283 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .iris-picker,
|
1284 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-holder {
|
1285 |
-
display : none !important;
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
|
1289 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap > * {
|
1290 |
-
display : inline-block !important;
|
1291 |
-
vertical-align : middle;
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
|
1295 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .wp-picker-holder {
|
1296 |
-
display : block !important;
|
1297 |
-
}
|
1298 |
-
|
1299 |
-
.woocommerce .yith-plugin-ui .wp-picker-container .iris-picker, .yith-plugin-ui .wp-picker-container .iris-picker {
|
1300 |
-
z-index : 100;
|
1301 |
-
position : absolute;
|
1302 |
-
margin-top : 20px;
|
1303 |
-
border : 1px solid #d8d8d8;
|
1304 |
-
border-radius : 4px;
|
1305 |
-
box-shadow : 0 1px 3px rgba(0, 0, 0, .2);
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
.yith-plugin-ui .yith-plugin-fw input[type=text].wp-color-picker {
|
1309 |
-
border : 0;
|
1310 |
-
padding : 2px 5px;
|
1311 |
-
height : 30px;
|
1312 |
-
}
|
1313 |
-
|
1314 |
-
.yith-plugin-ui .wp-color-result-text {
|
1315 |
-
display : none;
|
1316 |
-
}
|
1317 |
-
|
1318 |
-
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
1319 |
-
width : 30px;
|
1320 |
-
height : 30px;
|
1321 |
-
box-shadow : none;
|
1322 |
-
border : 1px solid #d9d9d9;
|
1323 |
-
margin-bottom : 0;
|
1324 |
-
padding : 0;
|
1325 |
-
display : inline-block;
|
1326 |
-
vertical-align : middle;
|
1327 |
-
box-sizing : content-box;
|
1328 |
-
}
|
1329 |
-
|
1330 |
-
.yith-plugin-ui .wp-picker-default-custom {
|
1331 |
-
cursor : pointer;
|
1332 |
-
width : 25px;
|
1333 |
-
padding : 0 5px;
|
1334 |
-
display : inline-block;
|
1335 |
-
vertical-align : middle;
|
1336 |
-
position : relative;
|
1337 |
-
}
|
1338 |
-
|
1339 |
-
.yith-plugin-ui .wp-picker-default-custom input.button {
|
1340 |
-
opacity : 0;
|
1341 |
-
margin : 0;
|
1342 |
-
padding : 0;
|
1343 |
-
position : absolute;
|
1344 |
-
top : 0;
|
1345 |
-
right : 0;
|
1346 |
-
left : 0;
|
1347 |
-
bottom : 0;
|
1348 |
-
z-index : 2;
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
.yith-plugin-ui .wp-picker-default-custom:before {
|
1352 |
-
content : "\e91a";
|
1353 |
-
text-indent : 0;
|
1354 |
-
font-family : 'yith-icon';
|
1355 |
-
font-size : 16px;
|
1356 |
-
color : #d8d8d8;
|
1357 |
-
font-weight : normal;
|
1358 |
-
width : 15px;
|
1359 |
-
display : block;
|
1360 |
-
background : none;
|
1361 |
-
line-height : 20px;
|
1362 |
-
margin-left : 8px;
|
1363 |
-
}
|
1364 |
-
|
1365 |
-
.yith-plugin-ui .wp-picker-container {
|
1366 |
-
width : auto;
|
1367 |
-
display : inline-block;
|
1368 |
-
border : 1px solid #d9d9d9;
|
1369 |
-
border-radius : 8px;
|
1370 |
-
padding : 5px;
|
1371 |
-
}
|
1372 |
-
|
1373 |
-
.yith-plugin-ui .iris-picker .iris-square-inner {
|
1374 |
-
box-shadow : 0 0 0 1px #d9d9d9 inset;
|
1375 |
-
}
|
1376 |
-
|
1377 |
-
.yith-plugin-ui .iris-picker .iris-square-value {
|
1378 |
-
width : 0;
|
1379 |
-
height : 0;
|
1380 |
-
background : transparent;
|
1381 |
-
border : 0;
|
1382 |
-
}
|
1383 |
-
|
1384 |
-
.yith-plugin-ui .yith-single-colorpicker {
|
1385 |
-
display : inline-block;
|
1386 |
-
width : 220px;
|
1387 |
-
margin-bottom : 10px;
|
1388 |
-
}
|
1389 |
-
|
1390 |
-
.yith-plugin-ui .yith-single-colorpicker > label {
|
1391 |
-
display : block;
|
1392 |
-
font-size : 11px;
|
1393 |
-
font-weight : 600;
|
1394 |
-
margin : 0 0 10px 0;
|
1395 |
-
text-transform : uppercase;
|
1396 |
-
}
|
1397 |
-
|
1398 |
-
.yith-plugin-ui .the-metabox.multi-colorpicker span.description,
|
1399 |
-
.yith-plugin-ui .yith-plugin-fw-panel-wc-row.multi-colorpicker span.description,
|
1400 |
-
.yith-plugin-ui .yith-plugin-fw-multi-colorpicker-field-wrapper span.description {
|
1401 |
-
margin-top : 0;
|
1402 |
-
}
|
1403 |
-
|
1404 |
-
/* RANGE SLIDER */
|
1405 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
1406 |
-
top : -45px !important;
|
1407 |
-
}
|
1408 |
-
|
1409 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
1410 |
-
position : absolute;
|
1411 |
-
top : -33px;
|
1412 |
-
left : 0;
|
1413 |
-
width : auto !important;
|
1414 |
-
height : auto !important;
|
1415 |
-
padding : 2px 8px;
|
1416 |
-
margin-left : -15px;
|
1417 |
-
font-size : 12px;
|
1418 |
-
line-height : 20px;
|
1419 |
-
color : #4e8ba2;
|
1420 |
-
text-align : center;
|
1421 |
-
background-color : #fff;
|
1422 |
-
border : 1px solid #fff;
|
1423 |
-
border-radius : 3px;
|
1424 |
-
-webkit-transition : opacity .3s ease-in-out 0s;
|
1425 |
-
transition : opacity .3s ease-in-out 0s;
|
1426 |
-
box-shadow : 0px 1px 7px 0px rgba(1, 1, 1, 0.13);
|
1427 |
-
}
|
1428 |
-
|
1429 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:before {
|
1430 |
-
position : absolute;
|
1431 |
-
bottom : -3px;
|
1432 |
-
left : 50%;
|
1433 |
-
display : inline-block;
|
1434 |
-
width : 6px;
|
1435 |
-
height : 6px;
|
1436 |
-
margin-left : -3px;
|
1437 |
-
content : "";
|
1438 |
-
background-color : #fff;
|
1439 |
-
-webkit-transform : rotate(-45deg);
|
1440 |
-
-ms-transform : rotate(-45deg);
|
1441 |
-
transform : rotate(-45deg);
|
1442 |
-
}
|
1443 |
-
|
1444 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
|
1445 |
-
background : #4e8ba2;
|
1446 |
-
}
|
1447 |
-
|
1448 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:after {
|
1449 |
-
content : '';
|
1450 |
-
width : 17px;
|
1451 |
-
height : 17px;
|
1452 |
-
display : block;
|
1453 |
-
position : absolute;
|
1454 |
-
background : #fff;
|
1455 |
-
top : 37px;
|
1456 |
-
border-radius : 50%;
|
1457 |
-
box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
|
1458 |
-
cursor : grab;
|
1459 |
-
}
|
1460 |
-
|
1461 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after {
|
1462 |
-
cursor : grabbing;
|
1463 |
-
}
|
1464 |
-
|
1465 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
|
1466 |
-
height : 5px !important;
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .minCaption,
|
1470 |
-
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .maxCaption {
|
1471 |
-
font-weight : 700;
|
1472 |
-
font-size : 12px;
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
|
1476 |
-
/* ADD_BOX AND TOGGLE */
|
1477 |
-
.yith-plugin-ui .yith-add-box,
|
1478 |
-
.yith-plugin-ui .yith-toggle-row {
|
1479 |
-
width : 70%;
|
1480 |
-
border : 1px solid #d9d9d9;
|
1481 |
-
box-shadow : none;
|
1482 |
-
border-radius : 4px;
|
1483 |
-
margin : 20px 0;
|
1484 |
-
padding : 10px;
|
1485 |
-
box-sizing : border-box;
|
1486 |
-
background : white;
|
1487 |
-
}
|
1488 |
-
|
1489 |
-
.yith-plugin-ui .yith-toggle-row {
|
1490 |
-
cursor : pointer;
|
1491 |
-
transition : all ease 0.5s;
|
1492 |
-
}
|
1493 |
-
|
1494 |
-
.yith-plugin-ui .yith-toggle-row.fixed {
|
1495 |
-
margin : 0;
|
1496 |
-
}
|
1497 |
-
|
1498 |
-
.yith-plugin-ui .yith-toggle-row.highlight {
|
1499 |
-
transition : all ease 0.5s;
|
1500 |
-
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
|
1501 |
-
box-shadow : 0 0 7px rgb(30, 140, 190);
|
1502 |
-
|
1503 |
-
display : block;
|
1504 |
-
}
|
1505 |
-
|
1506 |
-
.yith-plugin-ui .yith-add-box {
|
1507 |
-
padding : 25px;
|
1508 |
-
display : none;
|
1509 |
-
}
|
1510 |
-
|
1511 |
-
.yith-plugin-ui .yith-toggle-title {
|
1512 |
-
position : relative;
|
1513 |
-
}
|
1514 |
-
|
1515 |
-
.yith-plugin-ui #plugin-fw-wc .yith-toggle-title h3,
|
1516 |
-
.yith-plugin-ui.metaboxes-tab h3,
|
1517 |
-
.yith-plugin-ui .yith-toggle-title h3,
|
1518 |
-
.metaboxes-tab.yith-plugin-ui .yith-toggle-title h3 {
|
1519 |
-
padding : 0px 20px 0px 30px;
|
1520 |
-
margin : 3px 0;
|
1521 |
-
display : inline-block;
|
1522 |
-
position : relative;
|
1523 |
-
min-width : 173px;
|
1524 |
-
box-sizing : border-box;
|
1525 |
-
font-weight : 600;
|
1526 |
-
font-size : 15px;
|
1527 |
-
color : #23282d;
|
1528 |
-
text-transform : inherit;
|
1529 |
-
}
|
1530 |
-
|
1531 |
-
.yith-plugin-ui .yith-toggle-title .subtitle {
|
1532 |
-
padding-left : 0;
|
1533 |
-
padding-top : 8px;
|
1534 |
-
font-size : 12px;
|
1535 |
-
}
|
1536 |
-
|
1537 |
-
.yith-plugin-ui .yith-toggle {
|
1538 |
-
position : absolute;
|
1539 |
-
width : 25px;
|
1540 |
-
cursor : pointer;
|
1541 |
-
left : 0;
|
1542 |
-
top : 0;
|
1543 |
-
bottom : 0;
|
1544 |
-
margin : auto;
|
1545 |
-
display : flex;
|
1546 |
-
align-items : center;
|
1547 |
-
box-sizing : border-box;
|
1548 |
-
align-items : center;
|
1549 |
-
justify-content : center;
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
.yith-plugin-ui .yith-toggle > span:before {
|
1553 |
-
color : #405e69;
|
1554 |
-
}
|
1555 |
-
|
1556 |
-
.yith-plugin-ui .yith-toggle > span {
|
1557 |
-
position : absolute;
|
1558 |
-
/* right : 50%; */
|
1559 |
-
transition : transform .3s;
|
1560 |
-
line-height : 1;
|
1561 |
-
font-size : 13px;
|
1562 |
-
font-weight : 600;
|
1563 |
-
}
|
1564 |
-
|
1565 |
-
|
1566 |
-
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle span {
|
1567 |
-
transform : rotateZ(90deg);
|
1568 |
-
}
|
1569 |
-
|
1570 |
-
.yith-plugin-ui .yith-toggle-content {
|
1571 |
-
display : none;
|
1572 |
-
position : relative;
|
1573 |
-
padding : 30px 25px;
|
1574 |
-
}
|
1575 |
-
|
1576 |
-
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content {
|
1577 |
-
/* display: block;*/
|
1578 |
-
}
|
1579 |
-
|
1580 |
-
.yith-plugin-ui .yith-add-box-row,
|
1581 |
-
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row {
|
1582 |
-
display : table;
|
1583 |
-
margin-bottom : 40px;
|
1584 |
-
}
|
1585 |
-
|
1586 |
-
.yith-plugin-ui .yith-add-box-row > label,
|
1587 |
-
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row > label {
|
1588 |
-
display : table-cell;
|
1589 |
-
min-width : 180px;
|
1590 |
-
padding-right : 20px;
|
1591 |
-
color : #33373b;
|
1592 |
-
font-size : 14px;
|
1593 |
-
vertical-align : top;
|
1594 |
-
font-weight : 600;
|
1595 |
-
}
|
1596 |
-
|
1597 |
-
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
|
1598 |
-
.yith-plugin-ui .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
1599 |
-
/* display: table-cell;*/
|
1600 |
-
width : auto;
|
1601 |
-
float : none;
|
1602 |
-
vertical-align : middle;
|
1603 |
-
position : relative;
|
1604 |
-
}
|
1605 |
-
|
1606 |
-
.yith-plugin-ui .yith-add-box-row span.yith-icon,
|
1607 |
-
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row span.yith-icon {
|
1608 |
-
position : absolute;
|
1609 |
-
right : 15px;
|
1610 |
-
top : 0;
|
1611 |
-
bottom : 0;
|
1612 |
-
}
|
1613 |
-
|
1614 |
-
.yith-plugin-ui .yith-add-box-buttons,
|
1615 |
-
.yith-plugin-ui .yith-toggle-content-buttons {
|
1616 |
-
text-align : right;
|
1617 |
-
}
|
1618 |
-
|
1619 |
-
.yith-plugin-ui .yith-toggle-onoff {
|
1620 |
-
position : absolute;
|
1621 |
-
cursor : pointer;
|
1622 |
-
right : 0;
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
.yith-plugin-ui .yith-toggle_wrapper.ui-sortable .yith-toggle-onoff {
|
1626 |
-
right : 30px;
|
1627 |
-
}
|
1628 |
-
|
1629 |
-
.yith-plugin-ui .yith-toggle-row .yith-icon-drag {
|
1630 |
-
position : absolute;
|
1631 |
-
right : 2px;
|
1632 |
-
top : 50%;
|
1633 |
-
transform : translateY(-50%);
|
1634 |
-
font-size : 18px;
|
1635 |
-
}
|
1636 |
-
|
1637 |
-
.yith-plugin-ui .yith-toggle-row.with-subtitle .yith-toggle-onoff {
|
1638 |
-
top : 25%;
|
1639 |
-
}
|
1640 |
-
|
1641 |
-
/** SPINNER **/
|
1642 |
-
.yith-plugin-ui .spinner {
|
1643 |
-
vertical-align : -5px;
|
1644 |
-
float : none;
|
1645 |
-
}
|
1646 |
-
|
1647 |
-
.yith-plugin-ui .spinner.show {
|
1648 |
-
visibility : visible;
|
1649 |
-
}
|
1650 |
-
|
1651 |
-
/* LIST TABLE */
|
1652 |
-
.yith-plugin-ui .form-table .list-table td {
|
1653 |
-
padding : 15px 0px;
|
1654 |
-
}
|
1655 |
-
|
1656 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .bulkactions select {
|
1657 |
-
border : 1px solid #d8d8d8;
|
1658 |
-
max-width : 200px;
|
1659 |
-
max-height : 30px;
|
1660 |
-
padding : 0 10px;
|
1661 |
-
}
|
1662 |
-
|
1663 |
-
.yith-plugin-ui .form-table .list-table th {
|
1664 |
-
width : initial;
|
1665 |
-
}
|
1666 |
-
|
1667 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table th.check-column {
|
1668 |
-
padding-left : 3px;
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tbody td {
|
1672 |
-
padding-left : 20px;
|
1673 |
-
}
|
1674 |
-
|
1675 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table th,
|
1676 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table td {
|
1677 |
-
padding : 15px 20px 15px 20px;
|
1678 |
-
}
|
1679 |
-
|
1680 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead td,
|
1681 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead th,
|
1682 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot td,
|
1683 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot th {
|
1684 |
-
padding : 3px 20px;
|
1685 |
-
}
|
1686 |
-
|
1687 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead a,
|
1688 |
-
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot a {
|
1689 |
-
padding-left : 0;
|
1690 |
-
}
|
1691 |
-
|
1692 |
-
.yith-plugin-ui .yith-plugin-fw-list-table .list-table-title {
|
1693 |
-
margin-bottom : 20px;
|
1694 |
-
line-height : 1.2;
|
1695 |
-
}
|
1696 |
-
|
1697 |
-
.yith-plugin-ui .yith-plugin-fw-list-table .list-table-title > * {
|
1698 |
-
vertical-align : middle;
|
1699 |
-
}
|
1700 |
-
|
1701 |
-
.yith-plugin-ui .yith-plugin-fw-list-table h2 {
|
1702 |
-
border : 0;
|
1703 |
-
padding : 0;
|
1704 |
-
display : inline-block;
|
1705 |
-
margin-right : 10px;
|
1706 |
-
line-height : inherit;
|
1707 |
-
}
|
1708 |
-
|
1709 |
-
.yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
|
1710 |
-
vertical-align : middle;
|
1711 |
-
}
|
1712 |
-
|
1713 |
-
.yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
|
1714 |
-
.yith-plugin-ui #post-query-submit,
|
1715 |
-
.yith-plugin-ui #search-submit,
|
1716 |
-
.yith-plugin-ui .button.filter-button {
|
1717 |
-
line-height : 33px;
|
1718 |
-
}
|
1719 |
-
|
1720 |
-
.yith-plugin-ui .tablenav {
|
1721 |
-
margin : 20px 0;
|
1722 |
-
}
|
1723 |
-
|
1724 |
-
.yith-plugin-ui .form-table td p.yith-section-description {
|
1725 |
-
color : #716269;
|
1726 |
-
margin-bottom : 20px;
|
1727 |
-
}
|
1728 |
-
|
1729 |
-
/** Time picker width*/
|
1730 |
-
.yith-plugin-ui input.ui-timepicker-input {
|
1731 |
-
width : 100px !important;
|
1732 |
-
}
|
1733 |
-
|
1734 |
-
/** date format **/
|
1735 |
-
.yith-plugin-ui .yith-plugin-fw-date-format code {
|
1736 |
-
margin-left : 30px;
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
.yith-plugin-ui .yith-plugin-fw-date-format input[type=text].small-text {
|
1740 |
-
margin-left : 45px;
|
1741 |
-
}
|
1742 |
-
|
1743 |
-
/** checkbox columns **/
|
1744 |
-
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
1745 |
-
width : calc(50% - 20px);
|
1746 |
-
padding-right : 20px;
|
1747 |
-
float : left;
|
1748 |
-
}
|
1749 |
-
|
1750 |
-
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
1751 |
-
clear : both;
|
1752 |
-
}
|
1753 |
-
|
1754 |
-
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
1755 |
-
width : calc(33% - 10px);
|
1756 |
-
padding-right : 10px;
|
1757 |
-
float : left;
|
1758 |
-
}
|
1759 |
-
|
1760 |
-
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
1761 |
-
clear : both;
|
1762 |
-
}
|
1763 |
-
|
1764 |
-
.yith-plugin-fw-checkbox-field-wrapper {
|
1765 |
-
display : inline-block !important;
|
1766 |
-
margin-right : 10px;
|
1767 |
-
}
|
1768 |
-
|
1769 |
-
.yith-plugin-fw-checkbox-field-wrapper + span.description {
|
1770 |
-
display : inline-block;
|
1771 |
-
vertical-align : middle;
|
1772 |
-
margin : 0;
|
1773 |
-
}
|
1774 |
-
|
1775 |
-
.yith-plugin-ui span.description {
|
1776 |
-
margin-top : 10px;
|
1777 |
-
line-height : 20px;
|
1778 |
-
max-width : 40%;
|
1779 |
-
min-width : min(100%, 360px);
|
1780 |
-
}
|
1781 |
-
|
1782 |
-
.yith-plugin-fw-option-with-description {
|
1783 |
-
display : table-cell;
|
1784 |
-
width : 90%;
|
1785 |
-
vertical-align : top;
|
1786 |
-
}
|
1787 |
-
|
1788 |
-
|
1789 |
-
/**
|
1790 |
-
* Required
|
1791 |
-
*/
|
1792 |
-
.yith-plugin-fw-panel-wc-row.yith-plugin-fw--required th.titledesc > label:after,
|
1793 |
-
.yith-plugin-fw-metabox-field-row.yith-plugin-fw--required label:first-child:after,
|
1794 |
-
.yith-plugin-fw-toggle-element-field-wrapper .yith-plugin-fw--required > label:first-child:after {
|
1795 |
-
content : '*';
|
1796 |
-
color : #ea0034;
|
1797 |
-
font-weight : 800;
|
1798 |
-
margin-left : 4px;
|
1799 |
-
}
|
1800 |
-
|
1801 |
-
/** YITH PANEL **/
|
1802 |
-
.yith-plugin-ui #yith-plugin-fw-panel {
|
1803 |
-
margin-top : -10px;
|
1804 |
-
}
|
1805 |
-
|
1806 |
-
.yith-plugin-ui #plugin-fw-wc, .yith-plugin-ui #yith-plugin-fw-panel {
|
1807 |
-
padding-top : 0;
|
1808 |
-
}
|
1809 |
-
|
1810 |
-
.yith-plugin-ui .plugin-option tr {
|
1811 |
-
border : 0;
|
1812 |
-
}
|
1813 |
-
|
1814 |
-
/** MULTI SELECT AND TEXT ARRAY INLINE STYLE **/
|
1815 |
-
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select,
|
1816 |
-
.yith-plugin-ui .yith-plugin-fw-text-array-inline .yith-single-text {
|
1817 |
-
display : inline-block;
|
1818 |
-
width : 30%;
|
1819 |
-
margin-right : 3%;
|
1820 |
-
max-width : 400px;
|
1821 |
-
}
|
1822 |
-
|
1823 |
-
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label,
|
1824 |
-
.yith-plugin-ui .yith-plugin-fw-text-array-inline .yith-single-text label {
|
1825 |
-
display : block;
|
1826 |
-
font-size : 11px;
|
1827 |
-
font-weight : 600;
|
1828 |
-
margin : 0 0 10px 0;
|
1829 |
-
}
|
1830 |
-
|
1831 |
-
.yith-plugin-ui .yith-plugin-fw-text-array-inline .yith-single-text input,
|
1832 |
-
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
|
1833 |
-
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
|
1834 |
-
width : 100% !important;
|
1835 |
-
min-width : auto !important;
|
1836 |
-
}
|
1837 |
-
|
1838 |
-
/**
|
1839 |
-
* Dimensions
|
1840 |
-
*/
|
1841 |
-
|
1842 |
-
.yith-plugin-fw-dimensions {
|
1843 |
-
display : flex;
|
1844 |
-
align-items : flex-end;
|
1845 |
-
}
|
1846 |
-
|
1847 |
-
.yith-plugin-fw-dimensions__units {
|
1848 |
-
flex : 1;
|
1849 |
-
display : flex;
|
1850 |
-
margin-left : 5px;
|
1851 |
-
width : calc(100% - 105px);
|
1852 |
-
flex-wrap : wrap;
|
1853 |
-
min-height : 38px;
|
1854 |
-
margin-bottom : -8px;
|
1855 |
-
}
|
1856 |
-
|
1857 |
-
.yith-plugin-fw-dimensions__unit {
|
1858 |
-
display : inline-block;
|
1859 |
-
padding : 0 3px;
|
1860 |
-
cursor : pointer;
|
1861 |
-
font-weight : 700;
|
1862 |
-
}
|
1863 |
-
|
1864 |
-
.yith-plugin-fw-dimensions__unit--selected {
|
1865 |
-
text-decoration : underline;
|
1866 |
-
color : #007694;
|
1867 |
-
}
|
1868 |
-
|
1869 |
-
.yith-plugin-fw-dimensions__unit--unique {
|
1870 |
-
text-decoration : none;
|
1871 |
-
cursor : default;
|
1872 |
-
}
|
1873 |
-
|
1874 |
-
.yith-plugin-fw-dimensions__dimensions {
|
1875 |
-
display : flex;
|
1876 |
-
margin : 0;
|
1877 |
-
align-items : flex-end;
|
1878 |
-
max-width : 400px;
|
1879 |
-
width : 400px;
|
1880 |
-
}
|
1881 |
-
|
1882 |
-
.yith-plugin-fw-dimensions__dimension {
|
1883 |
-
text-align : center;
|
1884 |
-
flex : 1;
|
1885 |
-
}
|
1886 |
-
|
1887 |
-
.yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1888 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1889 |
-
.yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1890 |
-
.woocommerce .yith-plugin-fw table.form-table .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number {
|
1891 |
-
width : 100%;
|
1892 |
-
min-width : 0;
|
1893 |
-
border-radius : 0;
|
1894 |
-
border : 1px solid #d8d8d8;
|
1895 |
-
border-left : none;
|
1896 |
-
height : 38px;
|
1897 |
-
text-align : center;
|
1898 |
-
padding-right : 0;
|
1899 |
-
}
|
1900 |
-
|
1901 |
-
.yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1902 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1903 |
-
.yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1904 |
-
.woocommerce .yith-plugin-fw table.form-table .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
|
1905 |
-
border-left : 1px solid #d8d8d8;
|
1906 |
-
border-radius : 6px 0 0 6px;
|
1907 |
-
}
|
1908 |
-
|
1909 |
-
.yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1910 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1911 |
-
.yith-plugin-ui .yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
|
1912 |
-
border-radius : 0 6px 6px 0;
|
1913 |
-
}
|
1914 |
-
|
1915 |
-
.metaboxes-tab .yith-plugin-fw-dimensions__dimension__label,
|
1916 |
-
.yith-plugin-ui.metaboxes-tab label.yith-plugin-fw-dimensions__dimension__label {
|
1917 |
-
float : none;
|
1918 |
-
margin : 0;
|
1919 |
-
width : auto;
|
1920 |
-
font-weight : inherit;
|
1921 |
-
line-height : inherit;
|
1922 |
-
}
|
1923 |
-
|
1924 |
-
.yith-plugin-fw-dimensions__dimension__label,
|
1925 |
-
.metaboxes-tab .yith-plugin-fw-dimensions__dimension__label,
|
1926 |
-
.yith-plugin-ui.metaboxes-tab label.yith-plugin-fw-dimensions__dimension__label {
|
1927 |
-
text-transform : uppercase;
|
1928 |
-
letter-spacing : 1px;
|
1929 |
-
font-size : 9px;
|
1930 |
-
margin-bottom : 5px;
|
1931 |
-
display : inline-block;
|
1932 |
-
}
|
1933 |
-
|
1934 |
-
.yith-plugin-fw-dimensions__linked {
|
1935 |
-
cursor : pointer;
|
1936 |
-
}
|
1937 |
-
|
1938 |
-
.yith-plugin-fw-dimensions__linked span {
|
1939 |
-
border : 1px solid #d8d8d8;
|
1940 |
-
border-left : none;
|
1941 |
-
height : 38px;
|
1942 |
-
border-radius : 0 6px 6px 0;
|
1943 |
-
box-sizing : border-box;
|
1944 |
-
padding : 8px 10px;
|
1945 |
-
width : 100%;
|
1946 |
-
}
|
1947 |
-
|
1948 |
-
.yith-plugin-fw-dimensions--linked-active .yith-plugin-fw-dimensions__linked span {
|
1949 |
-
color : #fff;
|
1950 |
-
background : #007694;
|
1951 |
-
border-color : #007694;
|
1952 |
-
}
|
1953 |
-
|
1954 |
-
/**
|
1955 |
-
* Image dimensions
|
1956 |
-
*/
|
1957 |
-
.yith-plugin-ui .yith-plugin-fw-image-dimensions > div {
|
1958 |
-
display : inline-block;
|
1959 |
-
width : 30%;
|
1960 |
-
margin-right : 3%;
|
1961 |
-
max-width : 100px;
|
1962 |
-
}
|
1963 |
-
|
1964 |
-
.yith-plugin-ui .yith-plugin-fw-image-dimensions label {
|
1965 |
-
display : block;
|
1966 |
-
font-size : 11px;
|
1967 |
-
font-weight : 600;
|
1968 |
-
text-transform : uppercase;
|
1969 |
-
margin : 0 0 10px 0;
|
1970 |
-
}
|
1971 |
-
|
1972 |
-
/**
|
1973 |
-
* Copy to clipboard
|
1974 |
-
*/
|
1975 |
-
.yith-plugin-fw-copy-to-clipboard {
|
1976 |
-
background : #ffffff;
|
1977 |
-
border-radius : 8px;
|
1978 |
-
border : 1px solid #d8d8d8;
|
1979 |
-
display : flex;
|
1980 |
-
align-items : center;
|
1981 |
-
padding : 0 12px;
|
1982 |
-
max-width : 400px;
|
1983 |
-
box-sizing : border-box;
|
1984 |
-
}
|
1985 |
-
|
1986 |
-
.yith-plugin-fw-copy-to-clipboard.yith-plugin-fw-copy-to-clipboard--readonly {
|
1987 |
-
background : #f1f1f1;
|
1988 |
-
border : 1px dashed #cccccc;
|
1989 |
-
}
|
1990 |
-
|
1991 |
-
.yith-plugin-fw-copy-to-clipboard__field-wrap {
|
1992 |
-
position : relative;
|
1993 |
-
flex : 1;
|
1994 |
-
}
|
1995 |
-
|
1996 |
-
.yith-plugin-fw-copy-to-clipboard__tip {
|
1997 |
-
display : none;
|
1998 |
-
position : absolute;
|
1999 |
-
background : rgba(30, 30, 30, 0.9);
|
2000 |
-
color : #ffffff;
|
2001 |
-
padding : 7px 10px;
|
2002 |
-
border-radius : 3px;
|
2003 |
-
right : 8px;
|
2004 |
-
top : 50%;
|
2005 |
-
transform : translateY(-50%);
|
2006 |
-
pointer-events : none;
|
2007 |
-
font-size : 12px;
|
2008 |
-
line-height : 1;
|
2009 |
-
}
|
2010 |
-
|
2011 |
-
|
2012 |
-
.yith-plugin-fw-copy-to-clipboard input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2013 |
-
.yith-plugin-fw.yith-plugin-ui .yith-plugin-fw-copy-to-clipboard input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2014 |
-
.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2015 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].yith-plugin-fw-copy-to-clipboard__field {
|
2016 |
-
height : 38px;
|
2017 |
-
width : 100%;
|
2018 |
-
background : transparent;
|
2019 |
-
padding : 0 10px 0 0;
|
2020 |
-
border : 0;
|
2021 |
-
border-radius : 0;
|
2022 |
-
box-shadow : none;
|
2023 |
-
outline : none;
|
2024 |
-
}
|
2025 |
-
|
2026 |
-
.yith-plugin-fw-copy-to-clipboard.yith-plugin-fw-copy-to-clipboard--readonly input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2027 |
-
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .yith-plugin-fw-copy-to-clipboard--readonly input[type=text].yith-plugin-fw-copy-to-clipboard__field {
|
2028 |
-
color : #999;
|
2029 |
-
cursor : default;
|
2030 |
-
}
|
2031 |
-
|
2032 |
-
.yith-plugin-fw-copy-to-clipboard__copy {
|
2033 |
-
display : flex;
|
2034 |
-
align-items : center;
|
2035 |
-
cursor : pointer;
|
2036 |
-
border-radius : 2px;
|
2037 |
-
padding : 1px;
|
2038 |
-
user-select : none;
|
2039 |
-
line-height : 1;
|
2040 |
-
transition : all .2s ease-in-out;
|
2041 |
-
}
|
2042 |
-
|
2043 |
-
.yith-plugin-fw-copy-to-clipboard__copy:hover {
|
2044 |
-
box-shadow : 0 0 0 4px rgba(15, 67, 60, .12);
|
2045 |
-
background-color : rgba(15, 67, 60, .12);
|
2046 |
-
}
|
2047 |
-
|
2048 |
-
.yith-plugin-fw-copy-to-clipboard__copy__text {
|
2049 |
-
font-size : 12px;
|
2050 |
-
font-weight : 600;
|
2051 |
-
}
|
2052 |
-
|
2053 |
-
.yith-plugin-fw-copy-to-clipboard__copy__icon {
|
2054 |
-
margin-right : 4px;
|
2055 |
-
font-size : 14px;
|
2056 |
-
}
|
2057 |
-
|
2058 |
-
/** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
|
2059 |
-
.branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow {
|
2060 |
-
background : none;
|
2061 |
-
}
|
2062 |
-
|
2063 |
-
.branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single {
|
2064 |
-
box-shadow : none;
|
2065 |
-
}
|
2066 |
-
|
2067 |
-
@media screen and (max-width : 1440px) {
|
2068 |
-
.yith-plugin-ui .yith-add-box,
|
2069 |
-
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2070 |
-
width : 80%;
|
2071 |
-
}
|
2072 |
-
|
2073 |
-
|
2074 |
-
.yith-plugin-ui .yith-add-box-row,
|
2075 |
-
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row,
|
2076 |
-
.yith-plugin-ui .yith-add-box-row label {
|
2077 |
-
display : block;
|
2078 |
-
}
|
2079 |
-
|
2080 |
-
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row > label {
|
2081 |
-
display : block;
|
2082 |
-
}
|
2083 |
-
|
2084 |
-
.yith-plugin-ui .yith-plugin-fw-option-with-description {
|
2085 |
-
width : 100%;
|
2086 |
-
}
|
2087 |
-
|
2088 |
-
.yith-plugin-ui .yith-add-box-row,
|
2089 |
-
.yith-plugin-ui .yith-add-box-row label {
|
2090 |
-
display : block;
|
2091 |
-
}
|
2092 |
-
|
2093 |
-
.yith-plugin-ui .yith-toggle-content .yith-plugin-fw-option-with-description,
|
2094 |
-
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-option-with-description {
|
2095 |
-
display : block;
|
2096 |
-
padding-top : 20px;
|
2097 |
-
}
|
2098 |
-
|
2099 |
-
|
2100 |
-
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-option-with-description span.description {
|
2101 |
-
max-width : 100%;
|
2102 |
-
}
|
2103 |
-
}
|
2104 |
-
|
2105 |
-
@media screen and (max-width : 1024px) {
|
2106 |
-
|
2107 |
-
.yith-plugin-ui .yith-add-box,
|
2108 |
-
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2109 |
-
width : 90%;
|
2110 |
-
}
|
2111 |
-
|
2112 |
-
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
2113 |
-
width : 100%;
|
2114 |
-
padding-right : 20px;
|
2115 |
-
float : left;
|
2116 |
-
}
|
2117 |
-
|
2118 |
-
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2119 |
-
width : calc(50% - 10px);
|
2120 |
-
padding-right : 10px;
|
2121 |
-
float : left;
|
2122 |
-
}
|
2123 |
-
|
2124 |
-
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
2125 |
-
clear : both;
|
2126 |
-
}
|
2127 |
-
|
2128 |
-
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
2129 |
-
clear : initial;
|
2130 |
-
}
|
2131 |
-
|
2132 |
-
}
|
2133 |
-
|
2134 |
-
@media screen and (max-width : 782px) {
|
2135 |
-
.yith-plugin-fw-banner h1 {
|
2136 |
-
line-height : 1.2em;
|
2137 |
-
}
|
2138 |
-
|
2139 |
-
.yith-plugin-fw-banner h1 {
|
2140 |
-
font-size : 12px;
|
2141 |
-
padding-right : 10px;
|
2142 |
-
}
|
2143 |
-
|
2144 |
-
.yith-plugin-ui .yith-add-box,
|
2145 |
-
.yith-plugin-ui .yith-toggle-row {
|
2146 |
-
width : 100%;
|
2147 |
-
}
|
2148 |
-
|
2149 |
-
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset,
|
2150 |
-
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2151 |
-
width : 100%;
|
2152 |
-
clear : initial;
|
2153 |
-
}
|
2154 |
-
|
2155 |
-
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
2156 |
-
padding : 0;
|
2157 |
-
}
|
2158 |
-
|
2159 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table th,
|
2160 |
-
#yith-plugin-fw-panel table.form-table th.titledesc,
|
2161 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table td,
|
2162 |
-
#yith-plugin-fw-panel table.form-table td.forminp {
|
2163 |
-
padding : 20px 20px;
|
2164 |
-
}
|
2165 |
-
|
2166 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table th.titledesc,
|
2167 |
-
#yith-plugin-fw-panel table.form-table th.titledesc {
|
2168 |
-
padding-bottom : 0;
|
2169 |
-
}
|
2170 |
-
}
|
2171 |
-
|
2172 |
-
@media (max-width : 480px) {
|
2173 |
-
.yith-plugin-ui .nav-tab {
|
2174 |
-
font-size : 12px;
|
2175 |
-
}
|
2176 |
-
|
2177 |
-
.yith-plugin-ui h2 {
|
2178 |
-
padding : 20px 20px;
|
2179 |
-
}
|
2180 |
-
|
2181 |
-
.yith-plugin-ui [type="radio"]:checked + label:before, .yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
2182 |
-
width : 14px;
|
2183 |
-
height : 14px;
|
2184 |
-
}
|
2185 |
-
|
2186 |
-
.yith-plugin-ui [type="radio"]:checked + label:after, .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
2187 |
-
width : 10px;
|
2188 |
-
height : 10px;
|
2189 |
-
top : 3px;
|
2190 |
-
left : 3px;
|
2191 |
-
}
|
2192 |
-
|
2193 |
-
.yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
|
2194 |
-
padding-left : 25px;
|
2195 |
-
}
|
2196 |
-
|
2197 |
-
.yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
|
2198 |
-
font-size : 13px;
|
2199 |
-
}
|
2200 |
-
|
2201 |
-
.yith-plugin-ui span.description {
|
2202 |
-
font-size : 12px;
|
2203 |
-
}
|
2204 |
-
|
2205 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table th,
|
2206 |
-
#yith-plugin-fw-panel table.form-table th.titledesc,
|
2207 |
-
.yith-plugin-ui #plugin-fw-wc table.form-table td,
|
2208 |
-
#yith-plugin-fw-panel table.form-table td.forminp {
|
2209 |
-
padding : 15px 20px;
|
2210 |
-
}
|
2211 |
-
|
2212 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
2213 |
-
width : 48px;
|
2214 |
-
height : 20px;
|
2215 |
-
padding : 2px;
|
2216 |
-
}
|
2217 |
-
|
2218 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
2219 |
-
top : 4px;
|
2220 |
-
left : 3px;
|
2221 |
-
width : 10px;
|
2222 |
-
height : 10px;
|
2223 |
-
}
|
2224 |
-
|
2225 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
2226 |
-
left : 30px;
|
2227 |
-
}
|
2228 |
-
|
2229 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
2230 |
-
font-size : 11px;
|
2231 |
-
padding-right : 12px;
|
2232 |
-
margin-top : 0;
|
2233 |
-
}
|
2234 |
-
|
2235 |
-
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
2236 |
-
font-size : 11px;
|
2237 |
-
padding-left : 12px;
|
2238 |
-
margin-top : 0;
|
2239 |
-
}
|
2240 |
-
|
2241 |
-
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
2242 |
-
font-size : 14px;
|
2243 |
-
}
|
2244 |
-
|
2245 |
-
.yith-plugin-ui input {
|
2246 |
-
font-size : 14px;
|
2247 |
-
}
|
2248 |
-
}
|
1 |
+
.yith-plugin-fw span.description {
|
2 |
+
display : block;
|
3 |
+
margin-top : 5px;
|
4 |
+
font-size : 12px;
|
5 |
+
color : #777;
|
6 |
+
font-style : italic;
|
7 |
+
clear : both;
|
8 |
+
}
|
9 |
+
|
10 |
+
.yith-plugin-fw span.description.inline {
|
11 |
+
display : inline-block;
|
12 |
+
margin : 0 0 0 5px;
|
13 |
+
min-width : 0;
|
14 |
+
max-width : 100%;
|
15 |
+
}
|
16 |
+
|
17 |
+
.yith-disabled {
|
18 |
+
opacity : 0.3;
|
19 |
+
pointer-events : none;
|
20 |
+
}
|
21 |
+
|
22 |
+
.yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
23 |
+
display : block;
|
24 |
+
width : 100%;
|
25 |
+
}
|
26 |
+
|
27 |
+
.yith-plugin-fw-field-wrapper .yith-inline-fields > div {
|
28 |
+
display : inline-block;
|
29 |
+
vertical-align : middle;
|
30 |
+
margin-right : 5px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.yith-plugin-fw-field-wrapper span.desc {
|
34 |
+
display : block;
|
35 |
+
width : 100%;
|
36 |
+
}
|
37 |
+
|
38 |
+
.yith-plugin-fw-title-field-wrapper h3.title {
|
39 |
+
width : 100%;
|
40 |
+
padding : 0 !important;
|
41 |
+
}
|
42 |
+
|
43 |
+
.the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
|
44 |
+
float : left;
|
45 |
+
}
|
46 |
+
|
47 |
+
.yith-plugin-fw span.color-alpha {
|
48 |
+
height : 100% !important;
|
49 |
+
width : 100% !important;
|
50 |
+
border : 1px solid #d9d9d9;
|
51 |
+
margin : -1px;
|
52 |
+
}
|
53 |
+
|
54 |
+
.yith-plugin-fw .wp-color-result-text {
|
55 |
+
height : 100%;
|
56 |
+
}
|
57 |
+
|
58 |
+
.yith-plugin-fw input[type=email],
|
59 |
+
.yith-plugin-fw input[type=number],
|
60 |
+
.yith-plugin-fw input[type=text]:not(.select2-search__field),
|
61 |
+
.yith-plugin-fw select,
|
62 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=email],
|
63 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=number],
|
64 |
+
.yith-plugin-ui input[type=password],
|
65 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
|
66 |
+
.woocommerce .yith-plugin-fw table.form-table select {
|
67 |
+
width : 400px;
|
68 |
+
max-width : 100%;
|
69 |
+
height : 30px;
|
70 |
+
padding : 5px;
|
71 |
+
line-height : 1;
|
72 |
+
}
|
73 |
+
|
74 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
|
75 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text].yith-plugin-fw-colorpicker,
|
76 |
+
.yith-plugin-fw input[type=text].wp-color-picker,
|
77 |
+
.yith-plugin-fw input[type=text].yith-plugin-fw-colorpicker {
|
78 |
+
width : 6em;
|
79 |
+
max-width : none;
|
80 |
+
height : auto;
|
81 |
+
padding : 3px 5px;
|
82 |
+
}
|
83 |
+
|
84 |
+
.wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button {
|
85 |
+
border-color : #7e8993;
|
86 |
+
}
|
87 |
+
|
88 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
|
89 |
+
.yith-plugin-fw input[type=text].colorpick {
|
90 |
+
width : 6em;
|
91 |
+
max-width : none;
|
92 |
+
height : auto;
|
93 |
+
padding : 6px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.yith-plugin-fw input.select2-search__field,
|
97 |
+
.yith-plugin-fw .select2-container .select2-search--inline .select2-search__field,
|
98 |
+
.woocommerce .yith-plugin-fw input.select2-search__field,
|
99 |
+
.woocommerce .yith-plugin-fw table.form-table input.select2-search__field {
|
100 |
+
padding : 3px;
|
101 |
+
min-width : 380px;
|
102 |
+
}
|
103 |
+
|
104 |
+
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
105 |
+
line-height : 27px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.yith-plugin-fw textarea:not(.wp-editor-area) {
|
109 |
+
width : 400px;
|
110 |
+
max-width : 100%;
|
111 |
+
padding : 5px;
|
112 |
+
}
|
113 |
+
|
114 |
+
/* ------------- ICONS ------------- */
|
115 |
+
.yit-icons-manager-wrapper {
|
116 |
+
width : 100%;
|
117 |
+
max-width : 400px;
|
118 |
+
}
|
119 |
+
|
120 |
+
.yit-icons-manager-text {
|
121 |
+
width : 100%;
|
122 |
+
}
|
123 |
+
|
124 |
+
.yit-icons-manager-icon-text {
|
125 |
+
width : calc(100% - 35px) !important;
|
126 |
+
height : 30px;
|
127 |
+
float : left;
|
128 |
+
margin : 0;
|
129 |
+
}
|
130 |
+
|
131 |
+
.yit-icons-manager-icon-preview {
|
132 |
+
width : 30px;
|
133 |
+
height : 30px;
|
134 |
+
margin-right : 5px;
|
135 |
+
float : left;
|
136 |
+
padding-top : 6px;
|
137 |
+
box-sizing : border-box;
|
138 |
+
text-align : center;
|
139 |
+
background : #f1f1f1;
|
140 |
+
}
|
141 |
+
|
142 |
+
.yit-icons-manager-list-wrapper {
|
143 |
+
margin : 10px 0;
|
144 |
+
box-shadow : 0 0 0 1px #ddd;
|
145 |
+
}
|
146 |
+
|
147 |
+
ul.yit-icons-manager-list {
|
148 |
+
width : 100%;
|
149 |
+
height : 300px;
|
150 |
+
overflow-y : scroll;
|
151 |
+
margin : 0;
|
152 |
+
}
|
153 |
+
|
154 |
+
ul.yit-icons-manager-list li {
|
155 |
+
float : left;
|
156 |
+
width : 30px;
|
157 |
+
height : 30px;
|
158 |
+
padding-top : 6px;
|
159 |
+
box-sizing : border-box;
|
160 |
+
text-align : center;
|
161 |
+
background : #f1f1f1;
|
162 |
+
margin : 1px;
|
163 |
+
cursor : pointer;
|
164 |
+
}
|
165 |
+
|
166 |
+
ul.yit-icons-manager-list li:hover {
|
167 |
+
background : #c5dcf6;
|
168 |
+
}
|
169 |
+
|
170 |
+
ul.yit-icons-manager-list li.active {
|
171 |
+
background : #d4f0ff;
|
172 |
+
}
|
173 |
+
|
174 |
+
.yit-icons-manager-action-set-default {
|
175 |
+
margin-bottom : 0;
|
176 |
+
}
|
177 |
+
|
178 |
+
.yit-icons-manager-default-icon-preview {
|
179 |
+
height : 100%;
|
180 |
+
display : inline-block;
|
181 |
+
padding-left : 10px;
|
182 |
+
border-left : 1px solid #ccc;
|
183 |
+
margin-left : 10px;
|
184 |
+
}
|
185 |
+
|
186 |
+
/* ------- Text Array ------- */
|
187 |
+
.yith-plugin-fw-text-array-table td {
|
188 |
+
padding : 1px;
|
189 |
+
}
|
190 |
+
|
191 |
+
.yith-plugin-fw-text-array-table input[type=text],
|
192 |
+
.woocommerce table.form-table table.yith-plugin-fw-text-array-table input[type=text] {
|
193 |
+
width : 100%;
|
194 |
+
}
|
195 |
+
|
196 |
+
/* ------- Image Gallery ------- */
|
197 |
+
.yith-plugin-fw .yith-plugin-fw-image-gallery ul li {
|
198 |
+
display : inline-block;
|
199 |
+
width : 80px;
|
200 |
+
margin-left : 10px;
|
201 |
+
position : relative;
|
202 |
+
}
|
203 |
+
|
204 |
+
.yith-plugin-fw .yith-plugin-fw-image-gallery ul li img {
|
205 |
+
width : 80px;
|
206 |
+
border : 1px solid #ccc;
|
207 |
+
}
|
208 |
+
|
209 |
+
.yith-plugin-fw .yith-plugin-fw-image-gallery ul li ul {
|
210 |
+
position : absolute;
|
211 |
+
top : -6px;
|
212 |
+
right : -1px;
|
213 |
+
width : 20px;
|
214 |
+
height : 20px;
|
215 |
+
}
|
216 |
+
|
217 |
+
.yith-plugin-fw .yith-plugin-fw-image-gallery ul a.delete {
|
218 |
+
background : url(../images/x.png) no-repeat;
|
219 |
+
width : 20px;
|
220 |
+
height : 20px;
|
221 |
+
display : block;
|
222 |
+
text-indent : -99999px;
|
223 |
+
}
|
224 |
+
|
225 |
+
/* ------- OnOff ------- */
|
226 |
+
.yith-plugin-fw-onoff-container {
|
227 |
+
display : inline-block;
|
228 |
+
text-align : left;
|
229 |
+
}
|
230 |
+
|
231 |
+
.yith-plugin-fw-onoff-container input {
|
232 |
+
display : none;
|
233 |
+
}
|
234 |
+
|
235 |
+
.yith-plugin-fw-onoff-container input + span {
|
236 |
+
cursor : pointer;
|
237 |
+
text-indent : -9999px;
|
238 |
+
display : block;
|
239 |
+
width : 36px;
|
240 |
+
line-height : 1;
|
241 |
+
height : 20px;
|
242 |
+
background : #a4a4a4;
|
243 |
+
border-radius : 24px;
|
244 |
+
position : relative;
|
245 |
+
transition : all 0.3s;
|
246 |
+
}
|
247 |
+
|
248 |
+
|
249 |
+
.yith-plugin-fw-onoff-container input + span:before {
|
250 |
+
content : '';
|
251 |
+
background : #fff;
|
252 |
+
width : 16px;
|
253 |
+
height : 16px;
|
254 |
+
border-radius : 50%;
|
255 |
+
position : absolute;
|
256 |
+
top : 2px;
|
257 |
+
left : 2px;
|
258 |
+
transition : all 0.3s;
|
259 |
+
}
|
260 |
+
|
261 |
+
.yith-plugin-fw-onoff-container input:checked + span,
|
262 |
+
.yith-plugin-fw-onoff-container input.onoffchecked + span {
|
263 |
+
background : #0073aa;
|
264 |
+
}
|
265 |
+
|
266 |
+
.yith-plugin-fw-onoff-container input:checked + span:before,
|
267 |
+
.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
268 |
+
left : 18px;
|
269 |
+
}
|
270 |
+
|
271 |
+
/* ------- Preview ------- */
|
272 |
+
.yith-plugin-fw-preview-field {
|
273 |
+
max-height : 200px;
|
274 |
+
}
|
275 |
+
|
276 |
+
/* ------- Radio ------- */
|
277 |
+
.yith-plugin-fw-radio input[type=radio] {
|
278 |
+
margin : 0 3px 0 0;
|
279 |
+
}
|
280 |
+
|
281 |
+
.yith-plugin-fw-radio__row {
|
282 |
+
margin-bottom : 8px;
|
283 |
+
}
|
284 |
+
|
285 |
+
/* ------- Checkbox Array ------- */
|
286 |
+
.yith-plugin-fw-checkbox-array input[type=checkbox] {
|
287 |
+
margin : 2px 3px 0 0;
|
288 |
+
}
|
289 |
+
|
290 |
+
.yith-plugin-fw-checkbox-array__row {
|
291 |
+
margin-bottom : 10px;
|
292 |
+
display : flex;
|
293 |
+
}
|
294 |
+
|
295 |
+
.yith-plugin-fw-checkbox-array__row label {
|
296 |
+
display : inline-block !important;
|
297 |
+
width : auto !important;
|
298 |
+
float : none !important;
|
299 |
+
margin : 0 0 0 10px !important;
|
300 |
+
padding : 0 !important;
|
301 |
+
font-weight : 400 !important;
|
302 |
+
}
|
303 |
+
|
304 |
+
.yith-plugin-fw-checkbox-array__row label small {
|
305 |
+
display : block;
|
306 |
+
line-height : 2em;
|
307 |
+
}
|
308 |
+
|
309 |
+
/* ------- Sidebar Layout ------- */
|
310 |
+
.yith-plugin-fw-sidebar-layout input[type="radio"] {
|
311 |
+
display : none;
|
312 |
+
width : 0px;
|
313 |
+
}
|
314 |
+
|
315 |
+
.yith-plugin-fw-sidebar-layout input[type="radio"]:first-child {
|
316 |
+
margin-right : -2px;
|
317 |
+
}
|
318 |
+
|
319 |
+
.yith-plugin-fw-sidebar-layout input[type="radio"] + img {
|
320 |
+
border : 2px solid #fff;
|
321 |
+
padding : 1px;
|
322 |
+
}
|
323 |
+
|
324 |
+
.yith-plugin-fw-sidebar-layout input[type="radio"] + img:hover {
|
325 |
+
cursor : pointer;
|
326 |
+
}
|
327 |
+
|
328 |
+
.yith-plugin-fw-sidebar-layout input[checked] + img {
|
329 |
+
border : 2px solid #f2ad35;
|
330 |
+
padding : 1px;
|
331 |
+
}
|
332 |
+
|
333 |
+
.yith-plugin-fw-sidebar-layout select {
|
334 |
+
vertical-align : 12px;
|
335 |
+
}
|
336 |
+
|
337 |
+
.yit-admin-panel-content-wrap .yith-plugin-fw-sidebar-layout label {
|
338 |
+
font-weight : bold;
|
339 |
+
width : 200px;
|
340 |
+
float : left;
|
341 |
+
line-height : 23px;
|
342 |
+
margin-left : -230px;
|
343 |
+
}
|
344 |
+
|
345 |
+
/* ------- Slider ------- */
|
346 |
+
.yith-plugin-fw .slider {
|
347 |
+
padding-top : 20px;
|
348 |
+
}
|
349 |
+
|
350 |
+
.yith-plugin-fw-slider-container .ui-slider .minCaption {
|
351 |
+
position : absolute;
|
352 |
+
right : 95%;
|
353 |
+
top : -6px;
|
354 |
+
margin-right : 11px;
|
355 |
+
}
|
356 |
+
|
357 |
+
.yith-plugin-fw-slider-container .ui-slider .maxCaption {
|
358 |
+
position : absolute;
|
359 |
+
left : 95%;
|
360 |
+
top : -6px;
|
361 |
+
margin-left : 20px;
|
362 |
+
}
|
363 |
+
|
364 |
+
.yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
365 |
+
background : #fff;
|
366 |
+
border : 0px !important;
|
367 |
+
top : -12px !important;
|
368 |
+
border-radius : 50%;
|
369 |
+
width : 27px !important;
|
370 |
+
height : 27px !important;
|
371 |
+
box-sizing : border-box;
|
372 |
+
box-shadow : 0 1px 7px -1px rgba(0, 0, 0, 0.5);
|
373 |
+
font-size : 13px;
|
374 |
+
padding : 6px 0;
|
375 |
+
font-weight : 600;
|
376 |
+
color : #555;
|
377 |
+
text-align : center;
|
378 |
+
}
|
379 |
+
|
380 |
+
.yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
|
381 |
+
background : #ccc;
|
382 |
+
border : none !important;
|
383 |
+
height : 3px !important;
|
384 |
+
border-radius : 3px !important;
|
385 |
+
width : 90%;
|
386 |
+
margin : 15px 5% 20px 5%;
|
387 |
+
}
|
388 |
+
|
389 |
+
.yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
|
390 |
+
background : #4b93ff;
|
391 |
+
left : 0px !important;
|
392 |
+
-webkit-border-radius : 3px;
|
393 |
+
-moz-border-radius : 3px;
|
394 |
+
-khtml-border-radius : 3px;
|
395 |
+
border-radius : 3px;
|
396 |
+
}
|
397 |
+
|
398 |
+
/* ------- Select2 ------- */
|
399 |
+
.yith-plugin-fw-select2-wrapper {
|
400 |
+
width : 400px;
|
401 |
+
}
|
402 |
+
|
403 |
+
/* ------- Textarea ------- */
|
404 |
+
.yith-plugin-fw-textarea-editor-field-wrapper {
|
405 |
+
max-width : 1000px;
|
406 |
+
clear : both;
|
407 |
+
}
|
408 |
+
|
409 |
+
.yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area,
|
410 |
+
.woocommerce table.form-table .yith-plugin-fw-textarea-editor-field-wrapper textarea.wp-editor-area {
|
411 |
+
width : 100%;
|
412 |
+
}
|
413 |
+
|
414 |
+
/* ------- Buttons ------- */
|
415 |
+
.yith-plugin-fw-buttons-field-wrapper {
|
416 |
+
margin-top : 7px;
|
417 |
+
}
|
418 |
+
|
419 |
+
/* ------- Select Images ------- */
|
420 |
+
.yith-plugin-fw-select-images__list {
|
421 |
+
margin : 0;
|
422 |
+
display : flex;
|
423 |
+
flex-wrap : wrap;
|
424 |
+
}
|
425 |
+
|
426 |
+
.yith-plugin-fw-select-images__item {
|
427 |
+
width : calc(20% - 10px);
|
428 |
+
min-width : 150px;
|
429 |
+
margin : 0 10px 10px 0;
|
430 |
+
padding : 10px;
|
431 |
+
box-sizing : border-box;
|
432 |
+
cursor : pointer;
|
433 |
+
transition : all .3s;
|
434 |
+
border : 2px solid #eee;
|
435 |
+
display : flex;
|
436 |
+
flex-direction : column;
|
437 |
+
justify-content : space-between;
|
438 |
+
}
|
439 |
+
|
440 |
+
.yith-plugin-fw-select-images__item:hover,
|
441 |
+
.yith-plugin-fw-select-images__item.yith-plugin-fw-select-images__item--selected {
|
442 |
+
border-color : #07bcce;
|
443 |
+
}
|
444 |
+
|
445 |
+
.yith-plugin-fw-select-images__item__label {
|
446 |
+
text-align : center;
|
447 |
+
font-weight : 600;
|
448 |
+
margin-bottom : 10px;
|
449 |
+
}
|
450 |
+
|
451 |
+
.yith-plugin-fw-select-images__item img {
|
452 |
+
display : block;
|
453 |
+
max-width : 100%;
|
454 |
+
margin : 0 auto;
|
455 |
+
}
|
456 |
+
|
457 |
+
/****************
|
458 |
+
WordPress 5.3 with old panel fixes
|
459 |
+
****************/
|
460 |
+
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
|
461 |
+
height : auto;
|
462 |
+
line-height : 1;
|
463 |
+
}
|
464 |
+
|
465 |
+
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow {
|
466 |
+
height : 100%;
|
467 |
+
}
|
468 |
+
|
469 |
+
/****************
|
470 |
+
YITH UI
|
471 |
+
****************/
|
472 |
+
.yith-plugin-fw-banner {
|
473 |
+
width : 100%;
|
474 |
+
height : 45px;
|
475 |
+
background : #cfd9dd url(../images/banner-premium.png) no-repeat;
|
476 |
+
display : flex;
|
477 |
+
align-items : center;
|
478 |
+
padding-right : -23px;
|
479 |
+
}
|
480 |
+
|
481 |
+
.yith-plugin-fw-banner h1 {
|
482 |
+
text-transform : uppercase;
|
483 |
+
color : #0c5777;
|
484 |
+
font-size : 15px;
|
485 |
+
padding : 0 0 0 110px;
|
486 |
+
font-weight : 700;
|
487 |
+
text-align : left;
|
488 |
+
display : inline-block;
|
489 |
+
box-sizing : border-box;
|
490 |
+
}
|
491 |
+
|
492 |
+
.yith-plugin-fw-banner span {
|
493 |
+
font-style : italic;
|
494 |
+
display : block;
|
495 |
+
font-size : 15px;
|
496 |
+
color : #214249;
|
497 |
+
text-transform : none;
|
498 |
+
text-align : right;
|
499 |
+
}
|
500 |
+
|
501 |
+
.yith-plugin-fw-banner a,
|
502 |
+
.yith-plugin-fw-banner a:focus {
|
503 |
+
text-decoration : none;
|
504 |
+
outline : none;
|
505 |
+
box-shadow : none;
|
506 |
+
}
|
507 |
+
|
508 |
+
.yith-plugin-fw-rate {
|
509 |
+
margin : 20px 0;
|
510 |
+
}
|
511 |
+
|
512 |
+
.yith-plugin-fw-rate .dashicons-star-filled {
|
513 |
+
font-size : 12px;
|
514 |
+
margin : 4px -4px;
|
515 |
+
color : #0c5777;
|
516 |
+
}
|
517 |
+
|
518 |
+
.yith-plugin-fw-rate a {
|
519 |
+
text-decoration : none;
|
520 |
+
}
|
521 |
+
|
522 |
+
.yith-plugin-ui a {
|
523 |
+
outline : none;
|
524 |
+
box-shadow : none;
|
525 |
+
}
|
526 |
+
|
527 |
+
.yith-plugin-ui {
|
528 |
+
font-family : -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
529 |
+
}
|
530 |
+
|
531 |
+
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
532 |
+
margin-top : 10px;
|
533 |
+
}
|
534 |
+
|
535 |
+
.yith-plugin-ui .nav-tab {
|
536 |
+
background-color : #336374;
|
537 |
+
color : #fff;
|
538 |
+
font-size : 15px;
|
539 |
+
padding : 7px 20px;
|
540 |
+
border : 0;
|
541 |
+
margin : 0 4px 0 0;
|
542 |
+
transition : background-color 0.3s linear;
|
543 |
+
float : none;
|
544 |
+
display : inline-block;
|
545 |
+
}
|
546 |
+
|
547 |
+
.yith-plugin-ui .nav-tab.yith-premium {
|
548 |
+
background-color : #be421c;
|
549 |
+
}
|
550 |
+
|
551 |
+
.yith-plugin-ui .yith-nav-tab-wrapper .yith-plugin-fw-tab-element:hover > a.nav-tab:not(.nav-tab-active),
|
552 |
+
.yith-plugin-ui .yith-nav-tab-wrapper .nav-tab:not(.nav-tab-active):hover {
|
553 |
+
background-color : #207a92;
|
554 |
+
}
|
555 |
+
|
556 |
+
.yith-plugin-ui .yith-nav-tab-wrapper .yith-plugin-fw-tab-element:hover > a.nav-tab.yith-premium:not(.nav-tab-active),
|
557 |
+
.yith-plugin-ui .yith-nav-tab-wrapper .nav-tab.yith-premium:not(.nav-tab-active):hover {
|
558 |
+
background-color : #d24318;
|
559 |
+
}
|
560 |
+
|
561 |
+
.yith-plugin-ui .nav-tab-active,
|
562 |
+
.yith-plugin-ui .nav-tab-active:hover,
|
563 |
+
.yith-plugin-ui .nav-tab-active:focus,
|
564 |
+
.yith-plugin-ui .nav-tab-active:focus:active {
|
565 |
+
background-color : #fff;
|
566 |
+
color : #336374;
|
567 |
+
box-shadow : 0 3px 0 -1px #fff;
|
568 |
+
border-bottom : 0;
|
569 |
+
}
|
570 |
+
|
571 |
+
.yith-plugin-ui .nav-tab-active.yith-premium,
|
572 |
+
.yith-plugin-ui .nav-tab-active.yith-premium:hover,
|
573 |
+
.yith-plugin-ui .nav-tab-active.yith-premium:focus,
|
574 |
+
.yith-plugin-ui .nav-tab-active.yith-premium:focus:active {
|
575 |
+
background-color : #fff;
|
576 |
+
color : #be421c;
|
577 |
+
box-shadow : none;
|
578 |
+
}
|
579 |
+
|
580 |
+
.yith-plugin-ui .yith-plugin-fw-tab-element:first-child .nav-tab-active {
|
581 |
+
border-left : 1px solid #ddd;
|
582 |
+
}
|
583 |
+
|
584 |
+
.yith-plugin-ui #plugin-fw-wc {
|
585 |
+
padding-top : 0px;
|
586 |
+
}
|
587 |
+
|
588 |
+
.yith-plugin-ui .form-table td {
|
589 |
+
padding : 15px 20px;
|
590 |
+
}
|
591 |
+
|
592 |
+
.yith-plugin-ui.metaboxes-tab label {
|
593 |
+
color : #33373b;
|
594 |
+
font-size : 14px;
|
595 |
+
margin-left : -248px;
|
596 |
+
}
|
597 |
+
|
598 |
+
.yith-plugin-ui.metaboxes-tab .the-metabox {
|
599 |
+
margin : 40px 0 40px 290px;
|
600 |
+
margin-left : 264px;
|
601 |
+
}
|
602 |
+
|
603 |
+
.yith-plugin-ui.metaboxes-tab label {
|
604 |
+
width : 200px;
|
605 |
+
font-weight : 600;
|
606 |
+
}
|
607 |
+
|
608 |
+
.yith-plugin-ui span.description {
|
609 |
+
color : #716269;
|
610 |
+
font-size : 13px;
|
611 |
+
font-style : normal;
|
612 |
+
font-weight : 400;
|
613 |
+
margin-top : 15px;
|
614 |
+
margin-left : 0;
|
615 |
+
}
|
616 |
+
|
617 |
+
#wpwrap .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-ui h2.nav-tab-wrapper {
|
618 |
+
border : 0;
|
619 |
+
border-bottom : 1px solid #ddd;
|
620 |
+
margin-right : 15px;
|
621 |
+
margin-bottom : 0;
|
622 |
+
background-color : transparent;
|
623 |
+
padding-left : 0;
|
624 |
+
}
|
625 |
+
|
626 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table,
|
627 |
+
.yith-plugin-ui #yith-plugin-fw-panel table.form-table,
|
628 |
+
.yith-plugin-ui table.form-table {
|
629 |
+
border : 1px solid #d8d8d8;
|
630 |
+
border-top : 0;
|
631 |
+
margin-bottom : 40px;
|
632 |
+
}
|
633 |
+
|
634 |
+
.yith-plugin-ui #wpwrap h2.nav-tab-wrapper, .yith-plugin-ui #wpbody-content h2.nav-tab-wrapper {
|
635 |
+
background-color : transparent;
|
636 |
+
border : 0;
|
637 |
+
text-transform : none;
|
638 |
+
border-bottom : 1px solid #ddd;
|
639 |
+
}
|
640 |
+
|
641 |
+
.yith-plugin-ui h2 {
|
642 |
+
color : #2a8db0;
|
643 |
+
font-size : 16px;
|
644 |
+
border : 1px solid #d8d8d8;
|
645 |
+
border-bottom : 0;
|
646 |
+
background-color : #fff;
|
647 |
+
padding : 35px 20px;
|
648 |
+
margin : 0px;
|
649 |
+
}
|
650 |
+
|
651 |
+
.yith-plugin-ui .yith-plugin-fw-custom-tab h2 {
|
652 |
+
border : 0px solid #d8d8d8;
|
653 |
+
padding-left : 0;
|
654 |
+
}
|
655 |
+
|
656 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
|
657 |
+
padding : 30px 20px;
|
658 |
+
}
|
659 |
+
|
660 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
|
661 |
+
padding : 0 20px 30px;
|
662 |
+
}
|
663 |
+
|
664 |
+
.yith-plugin-ui #plugin-fw-wc h2 + div {
|
665 |
+
background : #fff;
|
666 |
+
border-left : 1px solid #d9d9d9;
|
667 |
+
border-right : 1px solid #d9d9d9;
|
668 |
+
margin : -20px 0 0 0;
|
669 |
+
padding-left : 20px;
|
670 |
+
padding-bottom : 5px;
|
671 |
+
}
|
672 |
+
|
673 |
+
.yith-plugin-ui #plugin-fw-wc h2 + div p, .yith-plugin-ui p.info-box {
|
674 |
+
background : #f1f1f1;
|
675 |
+
font-size : 14px;
|
676 |
+
font-weight : 700;
|
677 |
+
width : 50%;
|
678 |
+
display : block;
|
679 |
+
padding : 15px;
|
680 |
+
margin-bottom : 0;
|
681 |
+
}
|
682 |
+
|
683 |
+
.yith-plugin-ui #plugin-fw-wc h2 + div p:before, .yith-plugin-ui p.info-box:before {
|
684 |
+
content : "\e90e";
|
685 |
+
font-family : yith-icon;
|
686 |
+
font-size : 30px;
|
687 |
+
font-weight : normal;
|
688 |
+
display : block;
|
689 |
+
margin-top : -12px;
|
690 |
+
float : left;
|
691 |
+
margin-right : 15px;
|
692 |
+
}
|
693 |
+
|
694 |
+
.yith-plugin-ui h2:first-child {
|
695 |
+
border-top : 0;
|
696 |
+
}
|
697 |
+
|
698 |
+
/*** Icon ***/
|
699 |
+
.yith-plugin-ui .yith-icon--right-overlay {
|
700 |
+
position : relative;
|
701 |
+
left : -33px;
|
702 |
+
line-height : 36px;
|
703 |
+
width : 0;
|
704 |
+
}
|
705 |
+
|
706 |
+
/*** General Input Style ***/
|
707 |
+
|
708 |
+
.yith-plugin-ui .yith-plugin-fw select,
|
709 |
+
.yith-plugin-ui textarea:not(.wp-editor-area),
|
710 |
+
.yith-plugin-ui input[type=number],
|
711 |
+
.yith-plugin-ui.metaboxes-tab input[type=number],
|
712 |
+
.yith-plugin-ui input[type=text],
|
713 |
+
.yith-plugin-ui input[type=email],
|
714 |
+
.yith-plugin-ui input[type=password],
|
715 |
+
.yith-plugin-ui .search-box input[name="s"],
|
716 |
+
.yith-plugin-fw.yith-plugin-ui input[type=text]:not(.select2-search__field),
|
717 |
+
.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text],
|
718 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text]:not(.select2-search__field),
|
719 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
|
720 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area),
|
721 |
+
.woocommerce .yith-plugin-fw table.form-table input[type=password],
|
722 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
|
723 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
|
724 |
+
border : 1px solid #d8d8d8;
|
725 |
+
border-radius : 8px;
|
726 |
+
padding : 8px 10px;
|
727 |
+
height : 38px;
|
728 |
+
min-width : 90px;
|
729 |
+
box-shadow : none;
|
730 |
+
color : #716269;
|
731 |
+
}
|
732 |
+
|
733 |
+
.yith-plugin-ui textarea:not(.wp-editor-area),
|
734 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area) {
|
735 |
+
height : auto;
|
736 |
+
padding : 8px;
|
737 |
+
}
|
738 |
+
|
739 |
+
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
|
740 |
+
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
|
741 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
|
742 |
+
border : 0;
|
743 |
+
height : 30px;
|
744 |
+
max-width : 121px;
|
745 |
+
font-size : 11px;
|
746 |
+
padding : 0;
|
747 |
+
}
|
748 |
+
|
749 |
+
.yith-plugin-ui .search-box input[name="s"] {
|
750 |
+
height : 35px;
|
751 |
+
}
|
752 |
+
|
753 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].small-text,
|
754 |
+
.yith-plugin-ui input[type=text].small-text {
|
755 |
+
width : 100px;
|
756 |
+
height : 25px;
|
757 |
+
border : 1px solid #d9d9d9;
|
758 |
+
}
|
759 |
+
|
760 |
+
|
761 |
+
.yith-plugin-ui select:focus,
|
762 |
+
.yith-plugin-ui .yith-plugin-fw select:focus,
|
763 |
+
.woocommerce .yith-plugin-ui table.form-table select:focus,
|
764 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select:focus,
|
765 |
+
.yith-plugin-ui input[type=text]:not(.select2-search__field):focus,
|
766 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text]:not(.select2-search__field):focus,
|
767 |
+
.yith-plugin-ui input[type=number]:focus,
|
768 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number]:focus,
|
769 |
+
.yith-plugin-ui textarea:not(.wp-editor-area):focus,
|
770 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area):focus {
|
771 |
+
border-color : #a7d9ec;
|
772 |
+
}
|
773 |
+
|
774 |
+
.woocommerce .yith-plugin-ui table.form-table select,
|
775 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
|
776 |
+
.yith-plugin-ui select {
|
777 |
+
-webkit-appearance : none;
|
778 |
+
line-height : 1.2em;
|
779 |
+
min-height : 35px;
|
780 |
+
background : #fff url("../images/arrow_down.svg") no-repeat right center;
|
781 |
+
background-size : 35px 13px;
|
782 |
+
border-radius : 8px;
|
783 |
+
padding-right : 30px;
|
784 |
+
}
|
785 |
+
|
786 |
+
.yith-plugin-ui .form-table th {
|
787 |
+
width : 200px;
|
788 |
+
padding-right : 50px;
|
789 |
+
}
|
790 |
+
|
791 |
+
/** SELECT 2 **/
|
792 |
+
.yith-plugin-ui .select2-container,
|
793 |
+
.yith-plugin-ui .select2-selection--single {
|
794 |
+
height : auto;
|
795 |
+
padding : 2px;
|
796 |
+
outline : none;
|
797 |
+
}
|
798 |
+
|
799 |
+
.yith-plugin-ui .select2-container .select2-selection--single,
|
800 |
+
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
801 |
+
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
|
802 |
+
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
|
803 |
+
.yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
|
804 |
+
.yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple {
|
805 |
+
margin : 0;
|
806 |
+
border : 0;
|
807 |
+
box-shadow : none;
|
808 |
+
}
|
809 |
+
|
810 |
+
.yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow {
|
811 |
+
background : none;
|
812 |
+
}
|
813 |
+
|
814 |
+
/* old panel*/
|
815 |
+
|
816 |
+
.yith-plugin-ui span.select2.select2-container.select2-container--default,
|
817 |
+
span.select2.select2-container.select2-container--default.yith-plugin-fw-select2-container {
|
818 |
+
border : 1px solid #d8d8d8;
|
819 |
+
border-radius : 8px;
|
820 |
+
}
|
821 |
+
|
822 |
+
.yith-plugin-ui span.select2.select2-container.select2-container--default:hover,
|
823 |
+
.yith-plugin-ui span.select2.select2-container.select2-container--default:active,
|
824 |
+
.yith-plugin-ui span.select2.select2-container.select2-container--default:focus {
|
825 |
+
border-color : #a7d9ec;
|
826 |
+
}
|
827 |
+
|
828 |
+
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
829 |
+
color : #fff;
|
830 |
+
}
|
831 |
+
|
832 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].select2-search__field,
|
833 |
+
.yith-plugin-ui .yith-plugin-fw table.form-table input.select2-search__field {
|
834 |
+
border : 0;
|
835 |
+
padding : 0;
|
836 |
+
height : initial;
|
837 |
+
min-width : 380px;
|
838 |
+
}
|
839 |
+
|
840 |
+
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice,
|
841 |
+
.yith-plugin-ui .select2-selection__choice {
|
842 |
+
color : #fff;
|
843 |
+
background-color : #4e8ba2;
|
844 |
+
border-radius : 12px;
|
845 |
+
padding : 3px 11px;
|
846 |
+
border-color : #4e8ba2;
|
847 |
+
font-size : 13px;
|
848 |
+
}
|
849 |
+
|
850 |
+
.wc-wp-version-gte-53 .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow {
|
851 |
+
background-image : none;
|
852 |
+
}
|
853 |
+
|
854 |
+
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow:before {
|
855 |
+
content : "\e900";
|
856 |
+
font-family : 'yith-icon' !important;
|
857 |
+
line-height : 36px;
|
858 |
+
color : #d9d9d9;
|
859 |
+
}
|
860 |
+
|
861 |
+
.yith-plugin-ui .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
862 |
+
display : none;
|
863 |
+
}
|
864 |
+
|
865 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown:after {
|
866 |
+
display : none;
|
867 |
+
}
|
868 |
+
|
869 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--below,
|
870 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
|
871 |
+
margin-top : 10px;
|
872 |
+
border-radius : 8px;
|
873 |
+
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
874 |
+
}
|
875 |
+
|
876 |
+
.yith-plugin-fw-select2-container.select2-container--open .select2-dropdown--above {
|
877 |
+
margin-top : -10px;
|
878 |
+
}
|
879 |
+
|
880 |
+
.yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
|
881 |
+
.yith-plugin-fw-select2-container.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
|
882 |
+
border-radius : 8px;
|
883 |
+
}
|
884 |
+
|
885 |
+
.yith-plugin-fw-select2-container .select2-results .select2-results__group, .select2-results .select2-results__option:first-child {
|
886 |
+
border-top-left-radius : 8px;
|
887 |
+
border-top-right-radius : 8px;
|
888 |
+
}
|
889 |
+
|
890 |
+
.yith-plugin-fw-select2-container .select2-results .select2-results__group,
|
891 |
+
.yith-plugin-fw-select2-container .select2-results .select2-results__option:last-child {
|
892 |
+
border-bottom-left-radius : 8px;
|
893 |
+
border-bottom-right-radius : 8px;
|
894 |
+
}
|
895 |
+
|
896 |
+
.yith-plugin-fw-select2-container .select2-dropdown {
|
897 |
+
border : 0;
|
898 |
+
}
|
899 |
+
|
900 |
+
.yith-plugin-fw-select2-container.select2-container--default .select2-results__option[data-selected=true] {
|
901 |
+
background-color : #fff;
|
902 |
+
outline : none;
|
903 |
+
}
|
904 |
+
|
905 |
+
.yith-plugin-fw-select2-container.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
906 |
+
background-color : #e8eff1;
|
907 |
+
color : #4e8ba2;
|
908 |
+
outline : none;
|
909 |
+
}
|
910 |
+
|
911 |
+
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
|
912 |
+
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
913 |
+
float : right;
|
914 |
+
padding-left : 15px;
|
915 |
+
text-indent : -9999px;
|
916 |
+
}
|
917 |
+
|
918 |
+
.yith-plugin-fw-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after,
|
919 |
+
.yith-plugin-ui .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:after {
|
920 |
+
float : right;
|
921 |
+
color : #fff;
|
922 |
+
content : "\e906";
|
923 |
+
font-family : 'yith-icon' !important;
|
924 |
+
font-size : 9px;
|
925 |
+
line-height : 21px;
|
926 |
+
text-indent : 0;
|
927 |
+
}
|
928 |
+
|
929 |
+
.yith-plugin-ui .select2-container .select2-selection--multiple,
|
930 |
+
.yith-plugin-ui .select2-container--default.select2-container--focus .select2-selection--multiple,
|
931 |
+
.wc-wp-version-gte-53 .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple {
|
932 |
+
border : 0;
|
933 |
+
box-shadow : none;
|
934 |
+
}
|
935 |
+
|
936 |
+
.yith-plugin-fw .select2-search input[type=text] {
|
937 |
+
border : 0;
|
938 |
+
padding : 0;
|
939 |
+
height : auto;
|
940 |
+
}
|
941 |
+
|
942 |
+
.yith-plugin-ui .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier,
|
943 |
+
.yith-plugin-fw-panel .yith-plugin-fw-select-field-wrapper span.yith-icon.yith-icon-magnifier {
|
944 |
+
position : absolute;
|
945 |
+
padding-top : 5px;
|
946 |
+
}
|
947 |
+
|
948 |
+
.yith-plugin-ui input[type=text].select2-search__field {
|
949 |
+
border : 0;
|
950 |
+
padding : 0;
|
951 |
+
height : 30px;
|
952 |
+
}
|
953 |
+
|
954 |
+
.yith-plugin-ui .select2-container--default .select2-search--dropdown .select2-search__field,
|
955 |
+
.yith-plugin-fw-panel .select2-container--default .select2-search--dropdown .select2-search__field {
|
956 |
+
border : 1px solid #d9d9d9;
|
957 |
+
border-radius : 8px;
|
958 |
+
box-shadow : none;
|
959 |
+
}
|
960 |
+
|
961 |
+
.yith-plugin-ui .select2-dropdown,
|
962 |
+
.yith-plugin-fw-panel .select2-dropdown {
|
963 |
+
border : 1px solid #d9d9d9;
|
964 |
+
}
|
965 |
+
|
966 |
+
/** RADIO BUTTON **/
|
967 |
+
.yith-plugin-ui [type="radio"]:checked,
|
968 |
+
.yith-plugin-ui [type="radio"]:not(:checked) {
|
969 |
+
position : absolute;
|
970 |
+
left : -9999px;
|
971 |
+
}
|
972 |
+
|
973 |
+
.yith-plugin-ui [type="radio"]:checked + label,
|
974 |
+
.yith-plugin-ui [type="radio"]:not(:checked) + label {
|
975 |
+
position : relative;
|
976 |
+
padding-left : 35px;
|
977 |
+
cursor : pointer;
|
978 |
+
line-height : 20px;
|
979 |
+
display : inline-block;
|
980 |
+
color : #716269;
|
981 |
+
font-size : 14px;
|
982 |
+
}
|
983 |
+
|
984 |
+
.yith-plugin-ui [type="radio"]:checked + label:before,
|
985 |
+
.yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
986 |
+
content : '';
|
987 |
+
position : absolute;
|
988 |
+
left : 0;
|
989 |
+
top : 0;
|
990 |
+
width : 19px;
|
991 |
+
height : 19px;
|
992 |
+
border : 1px solid #d8d8d8;
|
993 |
+
border-radius : 100%;
|
994 |
+
background : #fff;
|
995 |
+
}
|
996 |
+
|
997 |
+
.yith-plugin-ui [type="radio"]:checked + label:after,
|
998 |
+
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
999 |
+
content : '';
|
1000 |
+
width : 13px;
|
1001 |
+
height : 13px;
|
1002 |
+
background : #4e8ba2;
|
1003 |
+
position : absolute;
|
1004 |
+
top : 4px;
|
1005 |
+
left : 4px;
|
1006 |
+
border-radius : 100%;
|
1007 |
+
-webkit-transition : all 0.2s ease;
|
1008 |
+
transition : all 0.2s ease;
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
.yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
1012 |
+
opacity : 0;
|
1013 |
+
-webkit-transform : scale(0);
|
1014 |
+
transform : scale(0);
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
.yith-plugin-ui [type="radio"]:checked + label:after {
|
1018 |
+
opacity : 1;
|
1019 |
+
-webkit-transform : scale(1);
|
1020 |
+
transform : scale(1);
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
/** CHECKBOX **/
|
1024 |
+
.yith-plugin-ui input[type="checkbox"] {
|
1025 |
+
-webkit-appearance : none;
|
1026 |
+
background-color : #fff;
|
1027 |
+
border : 1px solid #d8d8d8;
|
1028 |
+
box-shadow : none;
|
1029 |
+
width : 18px;
|
1030 |
+
height : 18px;
|
1031 |
+
border-radius : 3px;
|
1032 |
+
display : inline-block;
|
1033 |
+
position : relative;
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
.yith-plugin-ui input[type="checkbox"]:checked {
|
1037 |
+
background-color : #4e8ba2;
|
1038 |
+
border-color : #488197;
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
.yith-plugin-ui .forminp-checkbox span.description.inline {
|
1042 |
+
margin-left : 10px;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
.yith-plugin-ui input[type="checkbox"]:checked:before {
|
1046 |
+
display : none;
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
.yith-plugin-ui input[type="checkbox"]:checked:after {
|
1050 |
+
content : "\e905";
|
1051 |
+
font-family : 'yith-icon';
|
1052 |
+
font-size : 10px;
|
1053 |
+
position : absolute;
|
1054 |
+
font-weight : 600;
|
1055 |
+
top : 8px;
|
1056 |
+
left : 3px;
|
1057 |
+
color : #fff;
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
/** ONOFF **/
|
1061 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input[type="checkbox"] {
|
1062 |
+
display : none;
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1066 |
+
border : 1px solid #d8d8d8;
|
1067 |
+
background-color : #fff;
|
1068 |
+
width : 60px;
|
1069 |
+
height : 24px;
|
1070 |
+
line-height : 14px;
|
1071 |
+
padding : 4px;
|
1072 |
+
box-sizing : border-box;
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1076 |
+
background-color : #d8d8d8;
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
1080 |
+
width : 13px;
|
1081 |
+
height : 13px;
|
1082 |
+
top : 5px;
|
1083 |
+
left : 6px;
|
1084 |
+
background-color : #d8d8d8;
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
1088 |
+
content : attr(data-text-off);
|
1089 |
+
height : 14px;
|
1090 |
+
font-size : 12px;
|
1091 |
+
font-weight : 600;
|
1092 |
+
padding-left : 18px;
|
1093 |
+
color : #979797;
|
1094 |
+
display : block;
|
1095 |
+
white-space : nowrap;
|
1096 |
+
text-align : center;
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span,
|
1100 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input.onoffchecked + span {
|
1101 |
+
background-color : #fff;
|
1102 |
+
border-color : #98aa36;
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before,
|
1106 |
+
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
1107 |
+
background-color : #98aa36;
|
1108 |
+
left : 38px;
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after,
|
1112 |
+
.yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
1113 |
+
content : attr(data-text-on);
|
1114 |
+
color : #98aa36;
|
1115 |
+
height : 14px;
|
1116 |
+
font-size : 12px;
|
1117 |
+
font-weight : 600;
|
1118 |
+
padding-left : 0;
|
1119 |
+
padding-right : 18px;
|
1120 |
+
display : block;
|
1121 |
+
white-space : nowrap;
|
1122 |
+
text-align : center;
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
1126 |
+
text-indent : 0;
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
|
1130 |
+
/**
|
1131 |
+
DATEPICKER
|
1132 |
+
*/
|
1133 |
+
.yith-plugin-ui .yith-plugin-fw-datepicker + .yith-icon-calendar,
|
1134 |
+
.yith-plugin-fw-datepicker + .yith-icon-calendar {
|
1135 |
+
color : #ccc;
|
1136 |
+
font-size : 18px;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
|
1140 |
+
border : 0;
|
1141 |
+
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-header.ui-widget-header {
|
1145 |
+
background : #4e8ba2;
|
1146 |
+
color : #fff;
|
1147 |
+
font-size : 11px;
|
1148 |
+
line-height : 25px;
|
1149 |
+
border : 0;
|
1150 |
+
min-height : 25px;
|
1151 |
+
}
|
1152 |
+
|
1153 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-title {
|
1154 |
+
line-height : 25px;
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker th {
|
1158 |
+
color : #716269;
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-icon,
|
1162 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
|
1163 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
|
1164 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1165 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w,
|
1166 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e {
|
1167 |
+
background : none;
|
1168 |
+
content : "";
|
1169 |
+
border : 0;
|
1170 |
+
text-indent : 0;
|
1171 |
+
width : 15px;
|
1172 |
+
height : 20px;
|
1173 |
+
display : block;
|
1174 |
+
overflow : hidden;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
.yith-plugin-ui .yith-password-wrapper {
|
1178 |
+
display : inline-block;
|
1179 |
+
width : auto;
|
1180 |
+
position : relative;
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before,
|
1184 |
+
.yith-plugin-ui .yith-password-wrapper .yith-password-eye:before {
|
1185 |
+
content : '\e911';
|
1186 |
+
color : #999;
|
1187 |
+
font-family : 'yith-icon';
|
1188 |
+
font-size : 20px;
|
1189 |
+
font-weight : normal;
|
1190 |
+
width : 15px;
|
1191 |
+
display : block;
|
1192 |
+
position : absolute;
|
1193 |
+
right : 13px;
|
1194 |
+
top : 0;
|
1195 |
+
line-height : 38px;
|
1196 |
+
bottom : 0;
|
1197 |
+
cursor : pointer;
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
.yith-plugin-ui .yith-password-wrapper .yith-password-eye-closed:before {
|
1201 |
+
content : '\e912';
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-w:before {
|
1205 |
+
content : "\e901";
|
1206 |
+
color : #fff;
|
1207 |
+
font-family : 'yith-icon';
|
1208 |
+
font-size : 12px;
|
1209 |
+
font-weight : normal;
|
1210 |
+
width : 15px;
|
1211 |
+
display : block;
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-icon.ui-icon-circle-triangle-e:before {
|
1215 |
+
content : "\e902";
|
1216 |
+
color : #fff;
|
1217 |
+
text-indent : 0;
|
1218 |
+
font-family : 'yith-icon';
|
1219 |
+
font-size : 12px;
|
1220 |
+
font-weight : normal;
|
1221 |
+
width : 15px;
|
1222 |
+
display : block;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
/* arrow */
|
1226 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-prev,
|
1227 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1228 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover,
|
1229 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-next-hover {
|
1230 |
+
top : 1px;
|
1231 |
+
cursor : pointer;
|
1232 |
+
}
|
1233 |
+
|
1234 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev,
|
1235 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-prev.ui-datepicker-prev-hover {
|
1236 |
+
left : 5px;
|
1237 |
+
}
|
1238 |
+
|
1239 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker .ui-datepicker-next,
|
1240 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-datepicker-next.ui-datepicker-next-hover {
|
1241 |
+
right : 1px;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-datepicker table {
|
1245 |
+
font-size : 10px;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-default,
|
1249 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-default,
|
1250 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-default {
|
1251 |
+
background : #fff;
|
1252 |
+
border : 1px solid #d9d9d9;
|
1253 |
+
|
1254 |
+
}
|
1255 |
+
|
1256 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-hover,
|
1257 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-hover,
|
1258 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div a.ui-state-default:focus,
|
1259 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div.ui-widget-content .ui-state-focus,
|
1260 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-focus {
|
1261 |
+
background : #ebf1f3;
|
1262 |
+
border : 1px solid #bfd5dd;
|
1263 |
+
outline : none;
|
1264 |
+
box-shadow : none;
|
1265 |
+
}
|
1266 |
+
|
1267 |
+
#ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-widget-header .ui-state-hover,
|
1268 |
+
.woocommerce #ui-datepicker-div.yith-plugin-fw-datepicker-div .ui-state-focus {
|
1269 |
+
background : none;
|
1270 |
+
border : 0;
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
/** colorpicker **/
|
1274 |
+
.yith-plugin-ui .iris-slider-offset.ui-slider.ui-widget-content {
|
1275 |
+
background : transparent !important;
|
1276 |
+
height : auto !important;
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .yith-colorpicker-group:not(:first-child) {
|
1280 |
+
margin-top : 20px;
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .iris-picker,
|
1284 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-holder {
|
1285 |
+
display : none !important;
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
|
1289 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap > * {
|
1290 |
+
display : inline-block !important;
|
1291 |
+
vertical-align : middle;
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
|
1295 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .wp-picker-holder {
|
1296 |
+
display : block !important;
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
.woocommerce .yith-plugin-ui .wp-picker-container .iris-picker, .yith-plugin-ui .wp-picker-container .iris-picker {
|
1300 |
+
z-index : 100;
|
1301 |
+
position : absolute;
|
1302 |
+
margin-top : 20px;
|
1303 |
+
border : 1px solid #d8d8d8;
|
1304 |
+
border-radius : 4px;
|
1305 |
+
box-shadow : 0 1px 3px rgba(0, 0, 0, .2);
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
.yith-plugin-ui .yith-plugin-fw input[type=text].wp-color-picker {
|
1309 |
+
border : 0;
|
1310 |
+
padding : 2px 5px;
|
1311 |
+
height : 30px;
|
1312 |
+
}
|
1313 |
+
|
1314 |
+
.yith-plugin-ui .wp-color-result-text {
|
1315 |
+
display : none;
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
1319 |
+
width : 30px;
|
1320 |
+
height : 30px;
|
1321 |
+
box-shadow : none;
|
1322 |
+
border : 1px solid #d9d9d9;
|
1323 |
+
margin-bottom : 0;
|
1324 |
+
padding : 0;
|
1325 |
+
display : inline-block;
|
1326 |
+
vertical-align : middle;
|
1327 |
+
box-sizing : content-box;
|
1328 |
+
}
|
1329 |
+
|
1330 |
+
.yith-plugin-ui .wp-picker-default-custom {
|
1331 |
+
cursor : pointer;
|
1332 |
+
width : 25px;
|
1333 |
+
padding : 0 5px;
|
1334 |
+
display : inline-block;
|
1335 |
+
vertical-align : middle;
|
1336 |
+
position : relative;
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
.yith-plugin-ui .wp-picker-default-custom input.button {
|
1340 |
+
opacity : 0;
|
1341 |
+
margin : 0;
|
1342 |
+
padding : 0;
|
1343 |
+
position : absolute;
|
1344 |
+
top : 0;
|
1345 |
+
right : 0;
|
1346 |
+
left : 0;
|
1347 |
+
bottom : 0;
|
1348 |
+
z-index : 2;
|
1349 |
+
}
|
1350 |
+
|
1351 |
+
.yith-plugin-ui .wp-picker-default-custom:before {
|
1352 |
+
content : "\e91a";
|
1353 |
+
text-indent : 0;
|
1354 |
+
font-family : 'yith-icon';
|
1355 |
+
font-size : 16px;
|
1356 |
+
color : #d8d8d8;
|
1357 |
+
font-weight : normal;
|
1358 |
+
width : 15px;
|
1359 |
+
display : block;
|
1360 |
+
background : none;
|
1361 |
+
line-height : 20px;
|
1362 |
+
margin-left : 8px;
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
.yith-plugin-ui .wp-picker-container {
|
1366 |
+
width : auto;
|
1367 |
+
display : inline-block;
|
1368 |
+
border : 1px solid #d9d9d9;
|
1369 |
+
border-radius : 8px;
|
1370 |
+
padding : 5px;
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
.yith-plugin-ui .iris-picker .iris-square-inner {
|
1374 |
+
box-shadow : 0 0 0 1px #d9d9d9 inset;
|
1375 |
+
}
|
1376 |
+
|
1377 |
+
.yith-plugin-ui .iris-picker .iris-square-value {
|
1378 |
+
width : 0;
|
1379 |
+
height : 0;
|
1380 |
+
background : transparent;
|
1381 |
+
border : 0;
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
.yith-plugin-ui .yith-single-colorpicker {
|
1385 |
+
display : inline-block;
|
1386 |
+
width : 220px;
|
1387 |
+
margin-bottom : 10px;
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
.yith-plugin-ui .yith-single-colorpicker > label {
|
1391 |
+
display : block;
|
1392 |
+
font-size : 11px;
|
1393 |
+
font-weight : 600;
|
1394 |
+
margin : 0 0 10px 0;
|
1395 |
+
text-transform : uppercase;
|
1396 |
+
}
|
1397 |
+
|
1398 |
+
.yith-plugin-ui .the-metabox.multi-colorpicker span.description,
|
1399 |
+
.yith-plugin-ui .yith-plugin-fw-panel-wc-row.multi-colorpicker span.description,
|
1400 |
+
.yith-plugin-ui .yith-plugin-fw-multi-colorpicker-field-wrapper span.description {
|
1401 |
+
margin-top : 0;
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
/* RANGE SLIDER */
|
1405 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
1406 |
+
top : -45px !important;
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle {
|
1410 |
+
position : absolute;
|
1411 |
+
top : -33px;
|
1412 |
+
left : 0;
|
1413 |
+
width : auto !important;
|
1414 |
+
height : auto !important;
|
1415 |
+
padding : 2px 8px;
|
1416 |
+
margin-left : -15px;
|
1417 |
+
font-size : 12px;
|
1418 |
+
line-height : 20px;
|
1419 |
+
color : #4e8ba2;
|
1420 |
+
text-align : center;
|
1421 |
+
background-color : #fff;
|
1422 |
+
border : 1px solid #fff;
|
1423 |
+
border-radius : 3px;
|
1424 |
+
-webkit-transition : opacity .3s ease-in-out 0s;
|
1425 |
+
transition : opacity .3s ease-in-out 0s;
|
1426 |
+
box-shadow : 0px 1px 7px 0px rgba(1, 1, 1, 0.13);
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:before {
|
1430 |
+
position : absolute;
|
1431 |
+
bottom : -3px;
|
1432 |
+
left : 50%;
|
1433 |
+
display : inline-block;
|
1434 |
+
width : 6px;
|
1435 |
+
height : 6px;
|
1436 |
+
margin-left : -3px;
|
1437 |
+
content : "";
|
1438 |
+
background-color : #fff;
|
1439 |
+
-webkit-transform : rotate(-45deg);
|
1440 |
+
-ms-transform : rotate(-45deg);
|
1441 |
+
transform : rotate(-45deg);
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content .ui-widget-header {
|
1445 |
+
background : #4e8ba2;
|
1446 |
+
}
|
1447 |
+
|
1448 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:after {
|
1449 |
+
content : '';
|
1450 |
+
width : 17px;
|
1451 |
+
height : 17px;
|
1452 |
+
display : block;
|
1453 |
+
position : absolute;
|
1454 |
+
background : #fff;
|
1455 |
+
top : 37px;
|
1456 |
+
border-radius : 50%;
|
1457 |
+
box-shadow : 0px 1px 6px 0px rgba(1, 1, 1, 0.25);
|
1458 |
+
cursor : grab;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after {
|
1462 |
+
cursor : grabbing;
|
1463 |
+
}
|
1464 |
+
|
1465 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider.ui-widget-content {
|
1466 |
+
height : 5px !important;
|
1467 |
+
}
|
1468 |
+
|
1469 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .minCaption,
|
1470 |
+
.yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider .maxCaption {
|
1471 |
+
font-weight : 700;
|
1472 |
+
font-size : 12px;
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
|
1476 |
+
/* ADD_BOX AND TOGGLE */
|
1477 |
+
.yith-plugin-ui .yith-add-box,
|
1478 |
+
.yith-plugin-ui .yith-toggle-row {
|
1479 |
+
width : 70%;
|
1480 |
+
border : 1px solid #d9d9d9;
|
1481 |
+
box-shadow : none;
|
1482 |
+
border-radius : 4px;
|
1483 |
+
margin : 20px 0;
|
1484 |
+
padding : 10px;
|
1485 |
+
box-sizing : border-box;
|
1486 |
+
background : white;
|
1487 |
+
}
|
1488 |
+
|
1489 |
+
.yith-plugin-ui .yith-toggle-row {
|
1490 |
+
cursor : pointer;
|
1491 |
+
transition : all ease 0.5s;
|
1492 |
+
}
|
1493 |
+
|
1494 |
+
.yith-plugin-ui .yith-toggle-row.fixed {
|
1495 |
+
margin : 0;
|
1496 |
+
}
|
1497 |
+
|
1498 |
+
.yith-plugin-ui .yith-toggle-row.highlight {
|
1499 |
+
transition : all ease 0.5s;
|
1500 |
+
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
|
1501 |
+
box-shadow : 0 0 7px rgb(30, 140, 190);
|
1502 |
+
|
1503 |
+
display : block;
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
.yith-plugin-ui .yith-add-box {
|
1507 |
+
padding : 25px;
|
1508 |
+
display : none;
|
1509 |
+
}
|
1510 |
+
|
1511 |
+
.yith-plugin-ui .yith-toggle-title {
|
1512 |
+
position : relative;
|
1513 |
+
}
|
1514 |
+
|
1515 |
+
.yith-plugin-ui #plugin-fw-wc .yith-toggle-title h3,
|
1516 |
+
.yith-plugin-ui.metaboxes-tab h3,
|
1517 |
+
.yith-plugin-ui .yith-toggle-title h3,
|
1518 |
+
.metaboxes-tab.yith-plugin-ui .yith-toggle-title h3 {
|
1519 |
+
padding : 0px 20px 0px 30px;
|
1520 |
+
margin : 3px 0;
|
1521 |
+
display : inline-block;
|
1522 |
+
position : relative;
|
1523 |
+
min-width : 173px;
|
1524 |
+
box-sizing : border-box;
|
1525 |
+
font-weight : 600;
|
1526 |
+
font-size : 15px;
|
1527 |
+
color : #23282d;
|
1528 |
+
text-transform : inherit;
|
1529 |
+
}
|
1530 |
+
|
1531 |
+
.yith-plugin-ui .yith-toggle-title .subtitle {
|
1532 |
+
padding-left : 0;
|
1533 |
+
padding-top : 8px;
|
1534 |
+
font-size : 12px;
|
1535 |
+
}
|
1536 |
+
|
1537 |
+
.yith-plugin-ui .yith-toggle {
|
1538 |
+
position : absolute;
|
1539 |
+
width : 25px;
|
1540 |
+
cursor : pointer;
|
1541 |
+
left : 0;
|
1542 |
+
top : 0;
|
1543 |
+
bottom : 0;
|
1544 |
+
margin : auto;
|
1545 |
+
display : flex;
|
1546 |
+
align-items : center;
|
1547 |
+
box-sizing : border-box;
|
1548 |
+
align-items : center;
|
1549 |
+
justify-content : center;
|
1550 |
+
}
|
1551 |
+
|
1552 |
+
.yith-plugin-ui .yith-toggle > span:before {
|
1553 |
+
color : #405e69;
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
.yith-plugin-ui .yith-toggle > span {
|
1557 |
+
position : absolute;
|
1558 |
+
/* right : 50%; */
|
1559 |
+
transition : transform .3s;
|
1560 |
+
line-height : 1;
|
1561 |
+
font-size : 13px;
|
1562 |
+
font-weight : 600;
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
|
1566 |
+
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle span {
|
1567 |
+
transform : rotateZ(90deg);
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
.yith-plugin-ui .yith-toggle-content {
|
1571 |
+
display : none;
|
1572 |
+
position : relative;
|
1573 |
+
padding : 30px 25px;
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
.yith-plugin-ui .yith-toggle-row-opened .yith-toggle-content {
|
1577 |
+
/* display: block;*/
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
.yith-plugin-ui .yith-add-box-row,
|
1581 |
+
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row {
|
1582 |
+
display : table;
|
1583 |
+
margin-bottom : 40px;
|
1584 |
+
}
|
1585 |
+
|
1586 |
+
.yith-plugin-ui .yith-add-box-row > label,
|
1587 |
+
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row > label {
|
1588 |
+
display : table-cell;
|
1589 |
+
min-width : 180px;
|
1590 |
+
padding-right : 20px;
|
1591 |
+
color : #33373b;
|
1592 |
+
font-size : 14px;
|
1593 |
+
vertical-align : top;
|
1594 |
+
font-weight : 600;
|
1595 |
+
}
|
1596 |
+
|
1597 |
+
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper),
|
1598 |
+
.yith-plugin-ui .yith-plugin-fw-field-wrapper:not(.yith-plugin-fw-title-field-wrapper) {
|
1599 |
+
/* display: table-cell;*/
|
1600 |
+
width : auto;
|
1601 |
+
float : none;
|
1602 |
+
vertical-align : middle;
|
1603 |
+
position : relative;
|
1604 |
+
}
|
1605 |
+
|
1606 |
+
.yith-plugin-ui .yith-add-box-row span.yith-icon,
|
1607 |
+
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row span.yith-icon {
|
1608 |
+
position : absolute;
|
1609 |
+
right : 15px;
|
1610 |
+
top : 0;
|
1611 |
+
bottom : 0;
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
.yith-plugin-ui .yith-add-box-buttons,
|
1615 |
+
.yith-plugin-ui .yith-toggle-content-buttons {
|
1616 |
+
text-align : right;
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
.yith-plugin-ui .yith-toggle-onoff {
|
1620 |
+
position : absolute;
|
1621 |
+
cursor : pointer;
|
1622 |
+
right : 0;
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
.yith-plugin-ui .yith-toggle_wrapper.ui-sortable .yith-toggle-onoff {
|
1626 |
+
right : 30px;
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
.yith-plugin-ui .yith-toggle-row .yith-icon-drag {
|
1630 |
+
position : absolute;
|
1631 |
+
right : 2px;
|
1632 |
+
top : 50%;
|
1633 |
+
transform : translateY(-50%);
|
1634 |
+
font-size : 18px;
|
1635 |
+
}
|
1636 |
+
|
1637 |
+
.yith-plugin-ui .yith-toggle-row.with-subtitle .yith-toggle-onoff {
|
1638 |
+
top : 25%;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
/** SPINNER **/
|
1642 |
+
.yith-plugin-ui .spinner {
|
1643 |
+
vertical-align : -5px;
|
1644 |
+
float : none;
|
1645 |
+
}
|
1646 |
+
|
1647 |
+
.yith-plugin-ui .spinner.show {
|
1648 |
+
visibility : visible;
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
/* LIST TABLE */
|
1652 |
+
.yith-plugin-ui .form-table .list-table td {
|
1653 |
+
padding : 15px 0px;
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .bulkactions select {
|
1657 |
+
border : 1px solid #d8d8d8;
|
1658 |
+
max-width : 200px;
|
1659 |
+
max-height : 30px;
|
1660 |
+
padding : 0 10px;
|
1661 |
+
}
|
1662 |
+
|
1663 |
+
.yith-plugin-ui .form-table .list-table th {
|
1664 |
+
width : initial;
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th.check-column {
|
1668 |
+
padding-left : 3px;
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tbody td {
|
1672 |
+
padding-left : 20px;
|
1673 |
+
}
|
1674 |
+
|
1675 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table th,
|
1676 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table td {
|
1677 |
+
padding : 15px 20px 15px 20px;
|
1678 |
+
}
|
1679 |
+
|
1680 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead td,
|
1681 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead th,
|
1682 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot td,
|
1683 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot th {
|
1684 |
+
padding : 3px 20px;
|
1685 |
+
}
|
1686 |
+
|
1687 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table thead a,
|
1688 |
+
.yith-plugin-ui #plugin-fw-wc table.wp-list-table tfoot a {
|
1689 |
+
padding-left : 0;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
.yith-plugin-ui .yith-plugin-fw-list-table .list-table-title {
|
1693 |
+
margin-bottom : 20px;
|
1694 |
+
line-height : 1.2;
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
.yith-plugin-ui .yith-plugin-fw-list-table .list-table-title > * {
|
1698 |
+
vertical-align : middle;
|
1699 |
+
}
|
1700 |
+
|
1701 |
+
.yith-plugin-ui .yith-plugin-fw-list-table h2 {
|
1702 |
+
border : 0;
|
1703 |
+
padding : 0;
|
1704 |
+
display : inline-block;
|
1705 |
+
margin-right : 10px;
|
1706 |
+
line-height : inherit;
|
1707 |
+
}
|
1708 |
+
|
1709 |
+
.yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
|
1710 |
+
vertical-align : middle;
|
1711 |
+
}
|
1712 |
+
|
1713 |
+
.yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
|
1714 |
+
.yith-plugin-ui #post-query-submit,
|
1715 |
+
.yith-plugin-ui #search-submit,
|
1716 |
+
.yith-plugin-ui .button.filter-button {
|
1717 |
+
line-height : 33px;
|
1718 |
+
}
|
1719 |
+
|
1720 |
+
.yith-plugin-ui .tablenav {
|
1721 |
+
margin : 20px 0;
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
.yith-plugin-ui .form-table td p.yith-section-description {
|
1725 |
+
color : #716269;
|
1726 |
+
margin-bottom : 20px;
|
1727 |
+
}
|
1728 |
+
|
1729 |
+
/** Time picker width*/
|
1730 |
+
.yith-plugin-ui input.ui-timepicker-input {
|
1731 |
+
width : 100px !important;
|
1732 |
+
}
|
1733 |
+
|
1734 |
+
/** date format **/
|
1735 |
+
.yith-plugin-ui .yith-plugin-fw-date-format code {
|
1736 |
+
margin-left : 30px;
|
1737 |
+
}
|
1738 |
+
|
1739 |
+
.yith-plugin-ui .yith-plugin-fw-date-format input[type=text].small-text {
|
1740 |
+
margin-left : 45px;
|
1741 |
+
}
|
1742 |
+
|
1743 |
+
/** checkbox columns **/
|
1744 |
+
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
1745 |
+
width : calc(50% - 20px);
|
1746 |
+
padding-right : 20px;
|
1747 |
+
float : left;
|
1748 |
+
}
|
1749 |
+
|
1750 |
+
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
1751 |
+
clear : both;
|
1752 |
+
}
|
1753 |
+
|
1754 |
+
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
1755 |
+
width : calc(33% - 10px);
|
1756 |
+
padding-right : 10px;
|
1757 |
+
float : left;
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
1761 |
+
clear : both;
|
1762 |
+
}
|
1763 |
+
|
1764 |
+
.yith-plugin-fw-checkbox-field-wrapper {
|
1765 |
+
display : inline-block !important;
|
1766 |
+
margin-right : 10px;
|
1767 |
+
}
|
1768 |
+
|
1769 |
+
.yith-plugin-fw-checkbox-field-wrapper + span.description {
|
1770 |
+
display : inline-block;
|
1771 |
+
vertical-align : middle;
|
1772 |
+
margin : 0;
|
1773 |
+
}
|
1774 |
+
|
1775 |
+
.yith-plugin-ui span.description {
|
1776 |
+
margin-top : 10px;
|
1777 |
+
line-height : 20px;
|
1778 |
+
max-width : 40%;
|
1779 |
+
min-width : min(100%, 360px);
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
.yith-plugin-fw-option-with-description {
|
1783 |
+
display : table-cell;
|
1784 |
+
width : 90%;
|
1785 |
+
vertical-align : top;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
|
1789 |
+
/**
|
1790 |
+
* Required
|
1791 |
+
*/
|
1792 |
+
.yith-plugin-fw-panel-wc-row.yith-plugin-fw--required th.titledesc > label:after,
|
1793 |
+
.yith-plugin-fw-metabox-field-row.yith-plugin-fw--required label:first-child:after,
|
1794 |
+
.yith-plugin-fw-toggle-element-field-wrapper .yith-plugin-fw--required > label:first-child:after {
|
1795 |
+
content : '*';
|
1796 |
+
color : #ea0034;
|
1797 |
+
font-weight : 800;
|
1798 |
+
margin-left : 4px;
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
/** YITH PANEL **/
|
1802 |
+
.yith-plugin-ui #yith-plugin-fw-panel {
|
1803 |
+
margin-top : -10px;
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
.yith-plugin-ui #plugin-fw-wc, .yith-plugin-ui #yith-plugin-fw-panel {
|
1807 |
+
padding-top : 0;
|
1808 |
+
}
|
1809 |
+
|
1810 |
+
.yith-plugin-ui .plugin-option tr {
|
1811 |
+
border : 0;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
/** MULTI SELECT AND TEXT ARRAY INLINE STYLE **/
|
1815 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select,
|
1816 |
+
.yith-plugin-ui .yith-plugin-fw-text-array-inline .yith-single-text {
|
1817 |
+
display : inline-block;
|
1818 |
+
width : 30%;
|
1819 |
+
margin-right : 3%;
|
1820 |
+
max-width : 400px;
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label,
|
1824 |
+
.yith-plugin-ui .yith-plugin-fw-text-array-inline .yith-single-text label {
|
1825 |
+
display : block;
|
1826 |
+
font-size : 11px;
|
1827 |
+
font-weight : 600;
|
1828 |
+
margin : 0 0 10px 0;
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
.yith-plugin-ui .yith-plugin-fw-text-array-inline .yith-single-text input,
|
1832 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
|
1833 |
+
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
|
1834 |
+
width : 100% !important;
|
1835 |
+
min-width : auto !important;
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
/**
|
1839 |
+
* Dimensions
|
1840 |
+
*/
|
1841 |
+
|
1842 |
+
.yith-plugin-fw-dimensions {
|
1843 |
+
display : flex;
|
1844 |
+
align-items : flex-end;
|
1845 |
+
}
|
1846 |
+
|
1847 |
+
.yith-plugin-fw-dimensions__units {
|
1848 |
+
flex : 1;
|
1849 |
+
display : flex;
|
1850 |
+
margin-left : 5px;
|
1851 |
+
width : calc(100% - 105px);
|
1852 |
+
flex-wrap : wrap;
|
1853 |
+
min-height : 38px;
|
1854 |
+
margin-bottom : -8px;
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
.yith-plugin-fw-dimensions__unit {
|
1858 |
+
display : inline-block;
|
1859 |
+
padding : 0 3px;
|
1860 |
+
cursor : pointer;
|
1861 |
+
font-weight : 700;
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
.yith-plugin-fw-dimensions__unit--selected {
|
1865 |
+
text-decoration : underline;
|
1866 |
+
color : #007694;
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
.yith-plugin-fw-dimensions__unit--unique {
|
1870 |
+
text-decoration : none;
|
1871 |
+
cursor : default;
|
1872 |
+
}
|
1873 |
+
|
1874 |
+
.yith-plugin-fw-dimensions__dimensions {
|
1875 |
+
display : flex;
|
1876 |
+
margin : 0;
|
1877 |
+
align-items : flex-end;
|
1878 |
+
max-width : 400px;
|
1879 |
+
width : 400px;
|
1880 |
+
}
|
1881 |
+
|
1882 |
+
.yith-plugin-fw-dimensions__dimension {
|
1883 |
+
text-align : center;
|
1884 |
+
flex : 1;
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
.yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1888 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1889 |
+
.yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1890 |
+
.woocommerce .yith-plugin-fw table.form-table .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number {
|
1891 |
+
width : 100%;
|
1892 |
+
min-width : 0;
|
1893 |
+
border-radius : 0;
|
1894 |
+
border : 1px solid #d8d8d8;
|
1895 |
+
border-left : none;
|
1896 |
+
height : 38px;
|
1897 |
+
text-align : center;
|
1898 |
+
padding-right : 0;
|
1899 |
+
}
|
1900 |
+
|
1901 |
+
.yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1902 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1903 |
+
.yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1904 |
+
.woocommerce .yith-plugin-fw table.form-table .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
|
1905 |
+
border-left : 1px solid #d8d8d8;
|
1906 |
+
border-radius : 6px 0 0 6px;
|
1907 |
+
}
|
1908 |
+
|
1909 |
+
.yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1910 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
|
1911 |
+
.yith-plugin-ui .yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
|
1912 |
+
border-radius : 0 6px 6px 0;
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
.metaboxes-tab .yith-plugin-fw-dimensions__dimension__label,
|
1916 |
+
.yith-plugin-ui.metaboxes-tab label.yith-plugin-fw-dimensions__dimension__label {
|
1917 |
+
float : none;
|
1918 |
+
margin : 0;
|
1919 |
+
width : auto;
|
1920 |
+
font-weight : inherit;
|
1921 |
+
line-height : inherit;
|
1922 |
+
}
|
1923 |
+
|
1924 |
+
.yith-plugin-fw-dimensions__dimension__label,
|
1925 |
+
.metaboxes-tab .yith-plugin-fw-dimensions__dimension__label,
|
1926 |
+
.yith-plugin-ui.metaboxes-tab label.yith-plugin-fw-dimensions__dimension__label {
|
1927 |
+
text-transform : uppercase;
|
1928 |
+
letter-spacing : 1px;
|
1929 |
+
font-size : 9px;
|
1930 |
+
margin-bottom : 5px;
|
1931 |
+
display : inline-block;
|
1932 |
+
}
|
1933 |
+
|
1934 |
+
.yith-plugin-fw-dimensions__linked {
|
1935 |
+
cursor : pointer;
|
1936 |
+
}
|
1937 |
+
|
1938 |
+
.yith-plugin-fw-dimensions__linked span {
|
1939 |
+
border : 1px solid #d8d8d8;
|
1940 |
+
border-left : none;
|
1941 |
+
height : 38px;
|
1942 |
+
border-radius : 0 6px 6px 0;
|
1943 |
+
box-sizing : border-box;
|
1944 |
+
padding : 8px 10px;
|
1945 |
+
width : 100%;
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
.yith-plugin-fw-dimensions--linked-active .yith-plugin-fw-dimensions__linked span {
|
1949 |
+
color : #fff;
|
1950 |
+
background : #007694;
|
1951 |
+
border-color : #007694;
|
1952 |
+
}
|
1953 |
+
|
1954 |
+
/**
|
1955 |
+
* Image dimensions
|
1956 |
+
*/
|
1957 |
+
.yith-plugin-ui .yith-plugin-fw-image-dimensions > div {
|
1958 |
+
display : inline-block;
|
1959 |
+
width : 30%;
|
1960 |
+
margin-right : 3%;
|
1961 |
+
max-width : 100px;
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
.yith-plugin-ui .yith-plugin-fw-image-dimensions label {
|
1965 |
+
display : block;
|
1966 |
+
font-size : 11px;
|
1967 |
+
font-weight : 600;
|
1968 |
+
text-transform : uppercase;
|
1969 |
+
margin : 0 0 10px 0;
|
1970 |
+
}
|
1971 |
+
|
1972 |
+
/**
|
1973 |
+
* Copy to clipboard
|
1974 |
+
*/
|
1975 |
+
.yith-plugin-fw-copy-to-clipboard {
|
1976 |
+
background : #ffffff;
|
1977 |
+
border-radius : 8px;
|
1978 |
+
border : 1px solid #d8d8d8;
|
1979 |
+
display : flex;
|
1980 |
+
align-items : center;
|
1981 |
+
padding : 0 12px;
|
1982 |
+
max-width : 400px;
|
1983 |
+
box-sizing : border-box;
|
1984 |
+
}
|
1985 |
+
|
1986 |
+
.yith-plugin-fw-copy-to-clipboard.yith-plugin-fw-copy-to-clipboard--readonly {
|
1987 |
+
background : #f1f1f1;
|
1988 |
+
border : 1px dashed #cccccc;
|
1989 |
+
}
|
1990 |
+
|
1991 |
+
.yith-plugin-fw-copy-to-clipboard__field-wrap {
|
1992 |
+
position : relative;
|
1993 |
+
flex : 1;
|
1994 |
+
}
|
1995 |
+
|
1996 |
+
.yith-plugin-fw-copy-to-clipboard__tip {
|
1997 |
+
display : none;
|
1998 |
+
position : absolute;
|
1999 |
+
background : rgba(30, 30, 30, 0.9);
|
2000 |
+
color : #ffffff;
|
2001 |
+
padding : 7px 10px;
|
2002 |
+
border-radius : 3px;
|
2003 |
+
right : 8px;
|
2004 |
+
top : 50%;
|
2005 |
+
transform : translateY(-50%);
|
2006 |
+
pointer-events : none;
|
2007 |
+
font-size : 12px;
|
2008 |
+
line-height : 1;
|
2009 |
+
}
|
2010 |
+
|
2011 |
+
|
2012 |
+
.yith-plugin-fw-copy-to-clipboard input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2013 |
+
.yith-plugin-fw.yith-plugin-ui .yith-plugin-fw-copy-to-clipboard input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2014 |
+
.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2015 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].yith-plugin-fw-copy-to-clipboard__field {
|
2016 |
+
height : 38px;
|
2017 |
+
width : 100%;
|
2018 |
+
background : transparent;
|
2019 |
+
padding : 0 10px 0 0;
|
2020 |
+
border : 0;
|
2021 |
+
border-radius : 0;
|
2022 |
+
box-shadow : none;
|
2023 |
+
outline : none;
|
2024 |
+
}
|
2025 |
+
|
2026 |
+
.yith-plugin-fw-copy-to-clipboard.yith-plugin-fw-copy-to-clipboard--readonly input[type=text].yith-plugin-fw-copy-to-clipboard__field,
|
2027 |
+
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table .yith-plugin-fw-copy-to-clipboard--readonly input[type=text].yith-plugin-fw-copy-to-clipboard__field {
|
2028 |
+
color : #999;
|
2029 |
+
cursor : default;
|
2030 |
+
}
|
2031 |
+
|
2032 |
+
.yith-plugin-fw-copy-to-clipboard__copy {
|
2033 |
+
display : flex;
|
2034 |
+
align-items : center;
|
2035 |
+
cursor : pointer;
|
2036 |
+
border-radius : 2px;
|
2037 |
+
padding : 1px;
|
2038 |
+
user-select : none;
|
2039 |
+
line-height : 1;
|
2040 |
+
transition : all .2s ease-in-out;
|
2041 |
+
}
|
2042 |
+
|
2043 |
+
.yith-plugin-fw-copy-to-clipboard__copy:hover {
|
2044 |
+
box-shadow : 0 0 0 4px rgba(15, 67, 60, .12);
|
2045 |
+
background-color : rgba(15, 67, 60, .12);
|
2046 |
+
}
|
2047 |
+
|
2048 |
+
.yith-plugin-fw-copy-to-clipboard__copy__text {
|
2049 |
+
font-size : 12px;
|
2050 |
+
font-weight : 600;
|
2051 |
+
}
|
2052 |
+
|
2053 |
+
.yith-plugin-fw-copy-to-clipboard__copy__icon {
|
2054 |
+
margin-right : 4px;
|
2055 |
+
font-size : 14px;
|
2056 |
+
}
|
2057 |
+
|
2058 |
+
/** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
|
2059 |
+
.branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow {
|
2060 |
+
background : none;
|
2061 |
+
}
|
2062 |
+
|
2063 |
+
.branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single {
|
2064 |
+
box-shadow : none;
|
2065 |
+
}
|
2066 |
+
|
2067 |
+
@media screen and (max-width : 1440px) {
|
2068 |
+
.yith-plugin-ui .yith-add-box,
|
2069 |
+
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2070 |
+
width : 80%;
|
2071 |
+
}
|
2072 |
+
|
2073 |
+
|
2074 |
+
.yith-plugin-ui .yith-add-box-row,
|
2075 |
+
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row,
|
2076 |
+
.yith-plugin-ui .yith-add-box-row label {
|
2077 |
+
display : block;
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
.yith-plugin-ui .yith-toggle-content .yith-toggle-content-row > label {
|
2081 |
+
display : block;
|
2082 |
+
}
|
2083 |
+
|
2084 |
+
.yith-plugin-ui .yith-plugin-fw-option-with-description {
|
2085 |
+
width : 100%;
|
2086 |
+
}
|
2087 |
+
|
2088 |
+
.yith-plugin-ui .yith-add-box-row,
|
2089 |
+
.yith-plugin-ui .yith-add-box-row label {
|
2090 |
+
display : block;
|
2091 |
+
}
|
2092 |
+
|
2093 |
+
.yith-plugin-ui .yith-toggle-content .yith-plugin-fw-option-with-description,
|
2094 |
+
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-option-with-description {
|
2095 |
+
display : block;
|
2096 |
+
padding-top : 20px;
|
2097 |
+
}
|
2098 |
+
|
2099 |
+
|
2100 |
+
.yith-plugin-ui .yith-add-box-row .yith-plugin-fw-option-with-description span.description {
|
2101 |
+
max-width : 100%;
|
2102 |
+
}
|
2103 |
+
}
|
2104 |
+
|
2105 |
+
@media screen and (max-width : 1024px) {
|
2106 |
+
|
2107 |
+
.yith-plugin-ui .yith-add-box,
|
2108 |
+
.yith-plugin-ui .yith-toggle-row:not(.fixed) {
|
2109 |
+
width : 90%;
|
2110 |
+
}
|
2111 |
+
|
2112 |
+
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset {
|
2113 |
+
width : 100%;
|
2114 |
+
padding-right : 20px;
|
2115 |
+
float : left;
|
2116 |
+
}
|
2117 |
+
|
2118 |
+
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2119 |
+
width : calc(50% - 10px);
|
2120 |
+
padding-right : 10px;
|
2121 |
+
float : left;
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset:nth-child(2n+1) {
|
2125 |
+
clear : both;
|
2126 |
+
}
|
2127 |
+
|
2128 |
+
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset:nth-child(3n+1) {
|
2129 |
+
clear : initial;
|
2130 |
+
}
|
2131 |
+
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
@media screen and (max-width : 782px) {
|
2135 |
+
.yith-plugin-fw-banner h1 {
|
2136 |
+
line-height : 1.2em;
|
2137 |
+
}
|
2138 |
+
|
2139 |
+
.yith-plugin-fw-banner h1 {
|
2140 |
+
font-size : 12px;
|
2141 |
+
padding-right : 10px;
|
2142 |
+
}
|
2143 |
+
|
2144 |
+
.yith-plugin-ui .yith-add-box,
|
2145 |
+
.yith-plugin-ui .yith-toggle-row {
|
2146 |
+
width : 100%;
|
2147 |
+
}
|
2148 |
+
|
2149 |
+
.yith-plugin-ui td.forminp-checkbox.two-cols fieldset,
|
2150 |
+
.yith-plugin-ui td.forminp-checkbox.three-cols fieldset {
|
2151 |
+
width : 100%;
|
2152 |
+
clear : initial;
|
2153 |
+
}
|
2154 |
+
|
2155 |
+
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
|
2156 |
+
padding : 0;
|
2157 |
+
}
|
2158 |
+
|
2159 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th,
|
2160 |
+
#yith-plugin-fw-panel table.form-table th.titledesc,
|
2161 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table td,
|
2162 |
+
#yith-plugin-fw-panel table.form-table td.forminp {
|
2163 |
+
padding : 20px 20px;
|
2164 |
+
}
|
2165 |
+
|
2166 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th.titledesc,
|
2167 |
+
#yith-plugin-fw-panel table.form-table th.titledesc {
|
2168 |
+
padding-bottom : 0;
|
2169 |
+
}
|
2170 |
+
}
|
2171 |
+
|
2172 |
+
@media (max-width : 480px) {
|
2173 |
+
.yith-plugin-ui .nav-tab {
|
2174 |
+
font-size : 12px;
|
2175 |
+
}
|
2176 |
+
|
2177 |
+
.yith-plugin-ui h2 {
|
2178 |
+
padding : 20px 20px;
|
2179 |
+
}
|
2180 |
+
|
2181 |
+
.yith-plugin-ui [type="radio"]:checked + label:before, .yith-plugin-ui [type="radio"]:not(:checked) + label:before {
|
2182 |
+
width : 14px;
|
2183 |
+
height : 14px;
|
2184 |
+
}
|
2185 |
+
|
2186 |
+
.yith-plugin-ui [type="radio"]:checked + label:after, .yith-plugin-ui [type="radio"]:not(:checked) + label:after {
|
2187 |
+
width : 10px;
|
2188 |
+
height : 10px;
|
2189 |
+
top : 3px;
|
2190 |
+
left : 3px;
|
2191 |
+
}
|
2192 |
+
|
2193 |
+
.yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
|
2194 |
+
padding-left : 25px;
|
2195 |
+
}
|
2196 |
+
|
2197 |
+
.yith-plugin-ui [type="radio"]:checked + label, .yith-plugin-ui [type="radio"]:not(:checked) + label {
|
2198 |
+
font-size : 13px;
|
2199 |
+
}
|
2200 |
+
|
2201 |
+
.yith-plugin-ui span.description {
|
2202 |
+
font-size : 12px;
|
2203 |
+
}
|
2204 |
+
|
2205 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table th,
|
2206 |
+
#yith-plugin-fw-panel table.form-table th.titledesc,
|
2207 |
+
.yith-plugin-ui #plugin-fw-wc table.form-table td,
|
2208 |
+
#yith-plugin-fw-panel table.form-table td.forminp {
|
2209 |
+
padding : 15px 20px;
|
2210 |
+
}
|
2211 |
+
|
2212 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span {
|
2213 |
+
width : 48px;
|
2214 |
+
height : 20px;
|
2215 |
+
padding : 2px;
|
2216 |
+
}
|
2217 |
+
|
2218 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:before {
|
2219 |
+
top : 4px;
|
2220 |
+
left : 3px;
|
2221 |
+
width : 10px;
|
2222 |
+
height : 10px;
|
2223 |
+
}
|
2224 |
+
|
2225 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:before, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:before {
|
2226 |
+
left : 30px;
|
2227 |
+
}
|
2228 |
+
|
2229 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input:checked + span:after, .yith-plugin-ui.yith-plugin-fw-onoff-container input.onoffchecked + span:after {
|
2230 |
+
font-size : 11px;
|
2231 |
+
padding-right : 12px;
|
2232 |
+
margin-top : 0;
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
.yith-plugin-ui .yith-plugin-fw-onoff-container input + span:after {
|
2236 |
+
font-size : 11px;
|
2237 |
+
padding-left : 12px;
|
2238 |
+
margin-top : 0;
|
2239 |
+
}
|
2240 |
+
|
2241 |
+
.yith-plugin-fw .select2-container .select2-selection--single .select2-selection__rendered {
|
2242 |
+
font-size : 14px;
|
2243 |
+
}
|
2244 |
+
|
2245 |
+
.yith-plugin-ui input {
|
2246 |
+
font-size : 14px;
|
2247 |
+
}
|
2248 |
+
}
|
plugin-fw/assets/css/yith-icon.css
CHANGED
@@ -1,311 +1,311 @@
|
|
1 |
-
/**
|
2 |
-
* DO NOT EDIT THIS FILE DIRECTLY
|
3 |
-
* This file is automatically built using a build process
|
4 |
-
*/
|
5 |
-
|
6 |
-
/* stylelint-disable function-url-quotes, declaration-colon-newline-after */
|
7 |
-
@font-face {
|
8 |
-
font-family: yith-icon;
|
9 |
-
src: url("../fonts/yith-icon.eot?91e38b491fff50f72e9b5b51960fdee6");
|
10 |
-
src: url("../fonts/yith-icon.eot?91e38b491fff50f72e9b5b51960fdee6#iefix") format("embedded-opentype"),
|
11 |
-
url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAB0wAAsAAAAAMKQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAAQAAAAFY4xkr7Y21hcAAAAXwAAAFkAAAEIM9R0dxnbHlmAAAC4AAAFsQAACVk9j8/KmhlYWQAABmkAAAAMAAAADYa4UjYaGhlYQAAGdQAAAAeAAAAJAQ1AiVobXR4AAAZ9AAAACUAAAC8W+L/7GxvY2EAABocAAAAYAAAAGDQJtkSbWF4cAAAGnwAAAAfAAAAIAFNAVZuYW1lAAAanAAAATAAAAIiyMcJZnBvc3QAABvMAAABYQAAAgtRORYTeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/MI4gYGVgYNBjDGNgYHBHUp/ZZBkaGFgYGJgZWbACgLSXFMYHF4yfORjAnH1mNgYeIE0I4gDAI2pCD94nO3TV1LDQBCE4V9ylgO2yRkHcqjiJhTPnIoD8cRl5nFPAD1qjsG6PtdqlTU9QA/oyJN0ofqmIseXVqt2vUPTrnf51PZQvxpiW+oy+/nRjFKVXs7aUWn/G++a1Tqzq+s3TNlhl1NZseGeO45ZarbPno4e6YgrrrnlmTUXDHSNPmMWTDjS/V+Yc86MGy554IxDthxwwqNu1ud/TPKv/vjbes2KWFunyrLGUVvWOTqW9Y+uZZ2jZ6oZ0TdVjxiYakgMTRUlRtauN6YqE2NTlYmJqfLE1JQBYmZKA7FjygUxt/bchSkrxNKUGmLXyGfZM/JZ9q19lwNTuohDU86II1PiiGNT9ogTUwqJU1MeiTMjv8G5ZW/EhZHf6dLI974y8tlXllWKtZH331j2XWxNSVcvmTJPqU3pp/RMfUDpmzqCMjD1BmVo6hLKyNQvlMbUOZSxqYcoE1M3UaamvqLMjMdfRR93XHicrVkJkBxXee6/r9c9fcz0TB9zdM893dr7mKO13l2ttGa1tizLkq1dyfjC1koYYhdYxBgJAwIqpowxDhUSBdkYEk47pioUl00oUFK2kSEVII6JsQtC8EKAuCgjkkBAbuV/PbOXZAxUZTV6/d7/jn7///7j+18zJoN/8G2WYTKMwxSYAWaEmWEuZK5g9jGvZv6IeTPzNuYe5s+YDzEPMQ8zjzLfxNG1dsWqVUXLMO1mZbzTNlp+o2nVOKNicEj3wLQnYbwzDS2ftJsWeQla+yVo4e9JC16CRt/bpbT85rp6bX1jAF56EDwyEC0PqKmUCoexjJ5YXp6Hw/PLlEKLF5a/6tG6pxjGJm9d9YCrGoZKi03uEiUptLPPW1pHv5pwPM/RIlBoLcEJArc3LhPYHkp0iTx/6epAuG9pKaVG99EFYUlNXXRRdAyWovtgovti+pYJz7vPUJK0hcVAMnksper0rbqa6tf1/nNbS3QkrnVsaWlgwzw4wov8y/yoesQ6cgbeyQgM0whCJ3SAOWP++MfmG+KSWR3zTjizMoY48LoztJuPy7Uxd3fHhAH+c95H55/h43L1PXd31yDYDz+mPWfeEpe0W6UFy8AvGQX1tYbaOsnMo7ZexywxNzI3M3fjyr9FF9bXnfUqsk5D2N89FQJizYBDAtJGLsMaaY6jJdQqVbSDSQjPMYw/1ulJ63iqnSQrCGwyrtGTpkVAK/GIgW4Ni+dedgaoO9+/c4+bcm+5wb3+/b7eYtloimV/qv6Pmk6r8CiWj55/iJe+/BnD7pGf7a3/0iik/6X0wfR9ezw2ilgWWNZLa1EUL8xqaUY7exZlD+grakzADDJjTJuZYrYy23uyfyP6CgaasVWOgJ+EnplaPYOlMqEGOwDUA9CygSK0iFVpk+oENj221hZGa5VQaBDbsZrtLdAK/KBtOyGWNUsH00G6H9omCVohVuix0EMhVb/VGbdNEZZ1UZJ+TsjPJUlMAbUBeBxLZbpcgnK0sLx8ZfT8JJTL8ABEEwBfjX6RSLmGaWlyRtdk3aZVyTQbmlbUNDOdz9fz+TSRZV2WYVASOxJ/jOPezsstUXrSUEv0BViUy1PH3eKRN5XcJ588fvy4Wy5fXYaDlspmTNYsySJfZIkls5kMa2FL8FhHMNjZBJfjf1jAF9QL0/QFukw1f52MB5g5Zk/scbvey1tf26hoAXpg+h/MWiPTtFbco7Naa5KaVbOaKNVmuwbPLcS+5HDsTBZWxXTC877qebBIZbN+xOKz7sQE/uCxEnUdpW5pqNFt8dQ7VaO0tLQUfQgA3t1HHWQfbKKPTSfoLJdhtFW+OMZgSjF3bYwz88wlzEHmDuYu5k+RTzxjEusPbhXrph3S/a5wPMl2WdxAbDrdkV0mV/prIbJqxKJonyMoDpcehiC0nbYf+O1WJ0RttB3iB1jalikGbdEynVZgdWDi8ASKwPVcFIUbCwLr7oTrPheTaNcKfSKm37LQFd2aRP/VTrmyamQdJZXP2nlDSaWcRCo3nGqj7/2k586hrPAPPXNPqK7rTvaqc5u6QvTiv+g2Kl13vdCjB7JZkEleY2siUcx0jss6rFKQ2boQN68u8qo8IYtF6saZ1LozIOg/k72YX+rp2kgc9a9ibkUwsCLG3n/hd7Qz/y8aeth1FzwPf4uue5b5bY1b/kDVBbf3N3DOE674A5UZxUd68ecplF6BqTNDqMNXMjeg7lbOUbNeSMC2Rc5zUysxyloNLDGSqbWbK0BlBeFgwHGawTAQoQk/iKZWvXwi9vvwKLucrVZHq9Us7j1nGEdKoiyLholOUKxi9QXToNWYWsUa8Pmix9lK9DfXwI60GkVaOq0Bq6aj78cen91BFxut7k9n0/hbklXpIvwviQdF+eBFkorLHMRlVBmGLn+lonA3M1SbYpmwNDrnUJuYSnUYWltgvAimDlwV3XYRxtGXDwPXQw9zb5ybe+O7aTG35cYtW268nRZ7Fs2Z19o9Ohaw3OvAIjq5y5p4R7qHESJ4uochHHC+9Y+Zz0HOGf076+PwVmN1P1TPKZ6dxHFVH8XbQXHa6DDa6wXcFmrrO02R2wgua9uStp38etJ2/cLXC75fWIC++EmLH/X67OQ3es+FhV6f+43eeCxgrNeLRVdUlIfPw+djO2TAgSADBOCvzOhB04RFfMDnaB0W44JZ1TvKE7XbXGyxM8xlaKl061043SRoXY3YNwakCAL+j7t8as0CdZPxMBoE1hjMmCJKY1UElmsnJQn3T+1jzC1mBS0dPe/y9Ww2q5uvuu462HrYnS749XqXv8Qaa/CVWEokvO6DOLjOu6z1PcEpuWkoucfp+Gn3cE8i0X+tSg7Zkno29WHkzIm90QqqO8+qhMq4B5V2C+nTULHM2Kf8HhB/A4Bbb0bRKJpQtBkeR2uCU4fK5VP6ChKbWq29brXWWQVn8CFqPV1spKZdNgzZ6NfsiRPsgbLzclj67K/P/oIV8RzRToBg8HLCgDghulH6QH7iB+Y0+IAvmn1/P2Becpk58A9D5mU7N7QAn490qQ/3Wzux9bVu6wls9WyAsCLDo3wx+spAQqghpqZPB+6N3qYfhbf3bZ2dib63U4LMLCtGbzuiw7Gtr9ga7ZMugfQr6BLC2d/gOgL8EE8mYC7AaL0L942BM0CEJhKxVsVKczzshJ0ZEKoDQFuddgtBsilmiF+rEhyVBMRtNs0JBBzYHHdoB42yxA9JB85oVt+gNdkqD2zfVSk7A0Pz24YDSyHRGXTBjqblG6JjPvCaTf701uFBR5dIwqwP3mzCZ6JFf+jiC/NegDGwwW2Z/GRGBEVP1xzbG68X+qWsVnYamZRcc4R6XtMcTjdBfI1ashuZpCwn03XnJlzlm43CgBRwjTyRp73dmRiq8D2+72Ts2Mt3MCOpItf+CFBexx27BJQzIjaQM8o/9iGvzoqHD1Z8PjA9bqTS0CsfeuVwUSKKFQxvi54pD87dt32gjCzccfHQI/lGo9Vo5HXTdE3zKO7bTMlypTQ1XarIcirTcMrvauQH+gv1RmFwoHCgjoNb9VfRwa7Zw1fwKfhVjMr3MQeY1zG3M3cyx5mPMp9mHse8/YfIgR9veUyHGvJA4Q9BtLMx3kxD7zjDLdD20Ws0HTHG4GHH0YHo4IyJdhNb4Rgd1LRwRY7yXAJbh2qAD1OsIvxHErHx5EWUyAx0xsPuo0sKwlanOYbuhpi1sSrBRjiO02tB1W80V2pIJZaIetPdUNBGvfJRrA71WAGiNjPAFUzKUww7gi6eg48lMnoqkTYTqkl4SGSvLkzqSkrR42JhqmI2+uwkx0L0gK4/7V44OjJTnLPlfkdAH0yEWTeRTUq6TNJW5VleUvhNPBCFfyigdVrczQPSFInv45WjPC2lmHA5SIJIQNNOSMKEKAEtCZibsUrECUGShHsgodhsRhE5gKzf8XdxEqSglEw5kiBxJU4UJecelWUlXlVBSghEldIO4YSEridup0XSEFU3qXGSqNzwpqtlwifGWWKIgsrTd8sJnk3KPHKR1C24nlcI3Rzhb+tbqap8lwUs3rlWHdgsElnsKDcKIiupEkeKkiKxRCGzNS2hgYqdnO9m0Xe357kEy/F/YqckLSFxYiEr8CSRTKTiuCau4oAk4zJlZhPq4gXn+3BioKUkIS5yEEIftMbQqhyLo+ZCzSakBkTPH5ajzfEtyClazvMqv/9eXhEO3QJidCfcz75h154vZev1sVothzgmj+kVYyhrU9zon7cLwv7jPH8IktETr4/OAnvLrt2HIUOnjNWvzuTprNjeV/dOYzJFxTEGtii2PWf/YFSM0zQ+nl63uWgITsGxgf5PwO3rdxC5cCravGF9ipE8pvJyKIn03vxbcNJO+vKXhklLuAMaT8+ewXj6ImIkBbOtBp7ELLOIyJ4JHXqr0qYxZoSlgQZVE42VVIyKg3ABjcmxTa4ZZMQALd+nBSZIWFodp40IwqjMsNR14CapA3eK6Ng7TiAS5y5zpJZJJjO1EdONS7g5ITnSRRC9A+rXQLYg75KeGh4Og+CqYUdKqpYxvlSvLZyGOYmIuiQ7/Tm/DVwpm+m7a57j5/7WHC7a2rWaVRoxZ3W7OGxG35Il6aK3s8zB/UbTs61dkgNXjEUf1XUvW3FzgykPZHV4KZq4TRDUVMbK9uXaDSUXyBLfmheE7fQMzp6Nz8BGjLGZ2UFvmdDLITNd6WPkCh3qtNfOBc+oQXlFx1cEGrrQ2zfxlJwYPFERoP+hHgqj2NG8N3XwtkOTk4cm+y4pHuVVKXJb+1+zv9nEogVT1jZ/2BfQsIRSo9ROCUSQWJNFdA0sHgMrStmjxUv6JukCtx2c8vJHeUmFVGt/q7fIu0q1PK+gAdpuXhSVJVWRqeESxOQJIKs4HE6jBgRMEzWY3sMFmO8KmBBgOuKj+nbipMMDB11qu0UvYcZtrh1rgWWiip80Fy+3RlxQEd7EMOnjH2f/89scz37kIwhznuJl7jmadcBd1uWLmdHHnnjfWgrhsoX7T7Dgsm46Ov3YBzj2xGMx1I33BY/AAO7LYPK4r25krGJUP7cyn6vl8PfeXD2Hv3u6LWDStJVLb3j01kVNx/i8m7kJ671oEFDUkWRj4BGYDsa1GJ9QzZ0EO44lPmAwWtcMMAjGwZFDXLN+AoY9Cl1sMhZH+2DMD1rhGDyjS4WbJi7lNXTCnMXJRJa2c4K+TUqICdbmeDGh8ZdO3FRIcFz0HovjidxtK7zYGL7mfbJMEtx1ALyozEo4ecJkeTrGNpSaxHOIVgJTx0gAn8hX8rkrywYGJolcm5REFkDC40Zt0a8jEoYso3xludQfnVxt1SsjhVo8IDpIJAwHWI2uEAn2YtBjxWJSa6Q1jmV5lcTXTVL3GwB8l8mgZZSYftSdKWaOZheAun+O+wswS0UXGKcQRmDT9MGieSuJ4beFsTqmbaB03RkOg/tGJBL9ZOWuXVDrg9GTkJLEvS8mLFuza7bAK4qaVN6sF7xKtcBKKUPVk28ZHhy04WMjUkqNjsWTfR6D2WB0LxxbEOVo+RmpYbgHRgWDVAJtuHDgIslLTV2WsTPBAYZJxHYPsNzTvxoziBjpMswv9jPXojaeF3bC8yjO+ZQN9xzrrzeFWthEjjNOZpSKYTHjeYHnmZKiGIryGTcINgeBm3KcsuN80fS8Ta5rynHftiOG+gHVOBLfQjxGk5NPHoUjX7gXTvwFHDkKMh26yZtTUyr+knSZzcFr6TJl58sb+q6Z1gxDmza0L9ClHlaNpx72noIMRD97eC3/PI1+Is4/MxWrkmkaNR2jrbuMaZ/uAhO5vft6VoFvMbRR6SYoFfSLHvWMNZyGjnCaBiy4PXp8OIOOowXbyq1SqVWO7ocD/mwQzMI9Q+gpzE6pXdqKXV4wG2wNZv3VmAsvwj9hnLLiXD3O6NFn1dD/UldLqOvVQYi/BZCqH4TUSaPLbuIGLpnHVNecdTvXhFNLuby1rzmyewT+vNU2d8y/GFMWW0jB/p9ebGIEGwqvCbeFyvDmkd1vxgXmd5zY1lFHNo/sGcGO3n7O/iqOD3xsBzWam2Owb6xZAI0AlhGsXuiEKAR47yImkG+N3tEN+gLaKHn1ByojI7MjIzPRDzBuLC9G74VTbhcYsCjRD7/6P2jv7MhfX0FzrFgO34X/jWWwk9mDsRojk7+WbszE+dNKxkE46pE63ZwDY6/o/AFXmoxouW2/k2bVYGg/5lbmxc2myqY7ftu1TjoX94+O9l/sjPRfWCxe2P+XtlFMaOl8Tkm7edtNK0Y6pxiFUSNMpUROdgZmrrxV4zGb6XOcej2X5LVbr5wZsBOw+46r2oVC+6o7kla5Xi+bj+eykCCuzvoiUa1MgcvlWMVNsIEgKXa6cH2Z1xKTsljie7r5FZaJsUsvghmx5u0zv/xl88EHaQkD5smT5kPRnk9ZJ09aqzodn53CLKD0atRG6YUGMk9QBJi69CI2Kq8zzAZrFwYkQG0LYxOODTgoxl93nEzQU78uLmu34HueIMuCR++/rMoFS1MYnyV+83VTAs9TougJPFxwwyQgGYLt7vE+a8tvzKnavtEVGPcj7MHfR8zOzNShLRwvrEzjwqtCjq7GTh7awnNs90UsxxZz9w5lXgGcuaVcXUGCO1Z15pkYa3fxZB+1UXrpTcMXKmrbaHLdu522USG9u1eOXp2jM4Znop0108idzhlmbcbUT2Ni3Dniedd7HnmP97gH73Kj5/uzlpXtBzN6vlAuF8Cc/M53vgN3T+7bt/ItL5Z3cQ3hY0BYuc1As8HX9ABzD8X/9zD1BK2n4dS992J7BauDNWYuXG6Nn6FQ2e3i5pV71hgv1zEijTItZobaBawHyhD7CeomkIoRCTNUi7YaJkb+kFB4WkOENwPBMJ5fjN446kUqM6gKMfSjHoVqBzDbb52bu/U9tIi+jVj7kun+5Phkq2imG0OgemUIc5a7Y1fFH+X+zRMHypZu5caq2U2JHX07i3kQdRj006bQrDS23MgyvZWwOMvgYsPDdt4ddZ2+ZHpuk66XLrvdbiTUyxcTSlhPlEYVR5QbdmnIyUQPenkX0pvm0sk+R9fD0sIITl/NrRLwdBzBxpnp7k1MWIlPuuX3orRjZ1rtCubiVkWooFRE0rv4Qol1cDBqvEDDV3yDYYb2+AxsAUzWqfajpfnwWVMSTC3aqRqClILPAgfRPDwVPSq4dY/fRm+RZ4VCzRVgGjU3+iCxNZ7kCd/iJO5SAuIuknQbjfsTogwcxh4telHGagHwL1oyHMdAHTdMkz5cOZUUFUVMfollh7gUv1mQ5APynoLF8GdfpPE6PvvuNwqmwflVwolxjG01CkB1uU0zpBdf4NP8aU6SYBlRTuPZZ39CkyMH/p2QyJM0SZHh89GOfQPffze1lBgHsIDrpnHVHOpunfHjL5lNzAe2MFuZT8PF6HU2JGMd9Ku1abAdxJXoUjsh/TZZ6xDLoZcfvmMhzWmG9DqMfqZsimE7rNZ8OhQxJv0SiomuSJtrdy0iDvZ7PWYJUFtXbmDQbVMKPRn6YnHt80gHX233euiqtBk2e18OqKXT/cVXbfQOht6y4CDM7ZBkxVfb3XteP2wHPXL3ngaXQwOJSetugpGjHrl7b4NrloCS2uuuy20UQo8cj6Bv7W6g2b1NjmqTtdrkHC3MSsEUFkzDqLC6aaQzU255Ly/A3rJr7s6kjSog1TCnCpW9vPh6ltclDKQyr+u6FmiCLKTSAIWMmUFdyqR4WUAq9qVk0ckUChk0oFRvqCSkMqtD0ylhZSgvi7ikRnA4KERKSWnE64KK2ZiAz6QgKoKasHMKdppEAVYp2IosqAJ26ThEIQkxKXIakVNEiedrHBISa/NVPpGwC2vzc3ZCXT9fxSeXFhM4H45VJ7dPVuNiL2c6xQsKXELJuZyS4MomVywOsFoR6e555BDASAkJQfORWw15wvxPpTxlRJUgg0TQkFkf8V+6K4MMWmF3LBWo2B2LU3CizHfH4nIpoyey2d7WZW3D1kVd5FKSQXqsJzlRO5d1J6+xPd5RdInERtFpIpdcm5/icMF1okc5yV3Rr+HTr7EcZiGzWBNJnKIR6r8xD69Vw/gKwo+VHYmo/IiB4kQu7AIksXeFaXYEOliEU/XQ5bjpHbaqK0mA6SzyK8uFnFFtpm0hCS6AZgRDw5m0KC/4HZ4sbG4PVS4I5OgFTG3n6rAtl792zzaW3Suk1eK8lxweSObLLFscsg0LXpUtpy2OK2mpkh24/uClc5MHvIIw/oxiVrcx/weR6nK6eJxjYGRgYABioz2OTfH8Nl8ZuJkYQODOveaPMPr/r/+fmbiZ2IBcDgawNABsKg3GeJxjYGRgYGIAAj0mhv+//n9l4mZgZEAF+gBfLwReAAB4nGNgYGBgwon//8cth6H2F5T+DcKM94jVRyr+/xfGBgA96AshAAAAAAAAAAESASQBNgFGAVgCFgLIAzQD9gSYBSIFWAVqBboF1AZCBrgG7AcQB4wH5AkmCYQJtAnqCnYK5gsyC14MAgxyDPoNDg0+DYYNwg5IDmQO3A8cD0wP1BBKEHYSShKyeJxjYGRgYNBn9GIQYQABJiDmAkIGhv9gPgMAFl8BpQB4nG2PPW7CQBCFn/mLAlKEEilSulWKNBHmp6DgANBT0Buz/kG211oWJC6QE+QMOUNOkDJnyFHybEYuEnal1ffevNnRABjiCx6q4+G2fqvTwg3VhdukoXCH/CTcxQDPwj36I+E+XjEXHuABAX/wOtVv93DCLdzhTbhN/124Q/4Q7uIRn8I9+t/CfWzwIzzAizc/py4ZpaEp1jo+ZoFtdAMbbQ+pKdTUnzTeShfaBk7v1PasDqd45lykImtytTSF01lmVGnNXofOT5wrF+NxJL4fmhxnpNwm4dYpQhgUWEMjxhEZN7ZX6v+dDTssDtSVUpjCx+RKbsVcUWcDVjR2zG6ZU+w9ceaMrkNEHTFjkJOWdWeVzngNnbKu7emE9H1OqLpKLDDmjf7k/Xp2/gurBGCqeJxtkFlv3DAMhD1Zeet43W16n0nvu2r6l1iJtoXIkirJWfjf1163eQofiPmAITFkcVKsVRa31yVOsIFAiS3uoMIpauzQ4C72uIcz3McDPMQjPMYTPMUzPMcLvMQrnOMCr/EGb/EO7/EBH/EJn/EFX/EN3/EDEj9xiV9FTUr50WXjuppi9Aep/cH9k5bbvFtlNF2fq1WPof5N7kqqntWVWGSjyLLTFCVpvb+BwTueqv8oFKW+OQ5JZaKyXB6hVHb2LT2xUD5MOxVZmywVRS10pE4sWPPE8mjSm1k2Pdswp5Y9OV2agTpujGu9TH9GmufFAjtrUpaJKar+dLY40xqO1UDGSj9mMfjI20BTILsJut0G9sGyCHZMZeRgp7knziLRNTepN2z1epRIPuY6m4HXL5Q5zsdtx2A96WpMHKVv2/LaaPZnB4puSZqjIddZ3h98nBfNi5e3JzGZ3BfFX3LHkkUAAAA=") format("woff"),
|
12 |
-
url("../fonts/yith-icon.ttf?91e38b491fff50f72e9b5b51960fdee6") format("truetype");
|
13 |
-
font-weight: 400;
|
14 |
-
font-style: normal;
|
15 |
-
}
|
16 |
-
/* stylelint-enable */
|
17 |
-
|
18 |
-
|
19 |
-
[class^="yith-icon-"], [class*=" yith-icon-"] {
|
20 |
-
font-family: yith-icon !important;
|
21 |
-
speak: never;
|
22 |
-
font-style: normal;
|
23 |
-
font-weight: normal;
|
24 |
-
font-variant: normal;
|
25 |
-
text-transform: none;
|
26 |
-
line-height: 1;
|
27 |
-
|
28 |
-
-webkit-font-smoothing: antialiased;
|
29 |
-
-moz-osx-font-smoothing: grayscale;
|
30 |
-
|
31 |
-
width: 1em;
|
32 |
-
height: 1em;
|
33 |
-
font-size: 20px;
|
34 |
-
}
|
35 |
-
|
36 |
-
/* Icons */
|
37 |
-
|
38 |
-
.yith-icon-accounting:before {
|
39 |
-
content: "\e91d";
|
40 |
-
}
|
41 |
-
|
42 |
-
.yith-icon-arrow-down:before {
|
43 |
-
content: "\e900";
|
44 |
-
}
|
45 |
-
|
46 |
-
.yith-icon-arrow-left:before {
|
47 |
-
content: "\e901";
|
48 |
-
}
|
49 |
-
|
50 |
-
.yith-icon-arrow-right:before {
|
51 |
-
content: "\e902";
|
52 |
-
}
|
53 |
-
|
54 |
-
.yith-icon-arrow-up:before {
|
55 |
-
content: "\e903";
|
56 |
-
}
|
57 |
-
|
58 |
-
.yith-icon-bank-check:before {
|
59 |
-
content: "\e91e";
|
60 |
-
}
|
61 |
-
|
62 |
-
.yith-icon-bank:before {
|
63 |
-
content: "\e91c";
|
64 |
-
}
|
65 |
-
|
66 |
-
.yith-icon-calendar-add:before {
|
67 |
-
content: "\e913";
|
68 |
-
}
|
69 |
-
|
70 |
-
.yith-icon-calendar-money:before {
|
71 |
-
content: "\e914";
|
72 |
-
}
|
73 |
-
|
74 |
-
.yith-icon-calendar:before {
|
75 |
-
content: "\e904";
|
76 |
-
}
|
77 |
-
|
78 |
-
.yith-icon-calendar2:before {
|
79 |
-
content: "\e915";
|
80 |
-
}
|
81 |
-
|
82 |
-
.yith-icon-cash:before {
|
83 |
-
content: "\e91f";
|
84 |
-
}
|
85 |
-
|
86 |
-
.yith-icon-check-circle:before {
|
87 |
-
content: "\e921";
|
88 |
-
}
|
89 |
-
|
90 |
-
.yith-icon-check:before {
|
91 |
-
content: "\e905";
|
92 |
-
}
|
93 |
-
|
94 |
-
.yith-icon-clone:before {
|
95 |
-
content: "\f105";
|
96 |
-
}
|
97 |
-
|
98 |
-
.yith-icon-close:before {
|
99 |
-
content: "\e906";
|
100 |
-
}
|
101 |
-
|
102 |
-
.yith-icon-copy:before {
|
103 |
-
content: "\f101";
|
104 |
-
}
|
105 |
-
|
106 |
-
.yith-icon-credit-card:before {
|
107 |
-
content: "\e920";
|
108 |
-
}
|
109 |
-
|
110 |
-
.yith-icon-drag:before {
|
111 |
-
content: "\e90f";
|
112 |
-
}
|
113 |
-
|
114 |
-
.yith-icon-edit:before {
|
115 |
-
content: "\e907";
|
116 |
-
}
|
117 |
-
|
118 |
-
.yith-icon-eye-closed:before {
|
119 |
-
content: "\e912";
|
120 |
-
}
|
121 |
-
|
122 |
-
.yith-icon-eye:before {
|
123 |
-
content: "\e911";
|
124 |
-
}
|
125 |
-
|
126 |
-
.yith-icon-helping-hand:before {
|
127 |
-
content: "\f10c";
|
128 |
-
}
|
129 |
-
|
130 |
-
.yith-icon-image:before {
|
131 |
-
content: "\f10a";
|
132 |
-
}
|
133 |
-
|
134 |
-
.yith-icon-info-squared:before {
|
135 |
-
content: "\e922";
|
136 |
-
}
|
137 |
-
|
138 |
-
.yith-icon-info:before {
|
139 |
-
content: "\e90e";
|
140 |
-
}
|
141 |
-
|
142 |
-
.yith-icon-list-search:before {
|
143 |
-
content: "\f10d";
|
144 |
-
}
|
145 |
-
|
146 |
-
.yith-icon-magnifier:before {
|
147 |
-
content: "\e908";
|
148 |
-
}
|
149 |
-
|
150 |
-
.yith-icon-mail-out:before {
|
151 |
-
content: "\f109";
|
152 |
-
}
|
153 |
-
|
154 |
-
.yith-icon-more:before {
|
155 |
-
content: "\f102";
|
156 |
-
}
|
157 |
-
|
158 |
-
.yith-icon-paypal:before {
|
159 |
-
content: "\e91b";
|
160 |
-
}
|
161 |
-
|
162 |
-
.yith-icon-pdf:before {
|
163 |
-
content: "\f107";
|
164 |
-
}
|
165 |
-
|
166 |
-
.yith-icon-pencil:before {
|
167 |
-
content: "\e909";
|
168 |
-
}
|
169 |
-
|
170 |
-
.yith-icon-people:before {
|
171 |
-
content: "\e916";
|
172 |
-
}
|
173 |
-
|
174 |
-
.yith-icon-plus:before {
|
175 |
-
content: "\e90a";
|
176 |
-
}
|
177 |
-
|
178 |
-
.yith-icon-reply:before {
|
179 |
-
content: "\e91a";
|
180 |
-
}
|
181 |
-
|
182 |
-
.yith-icon-reset:before {
|
183 |
-
content: "\e910";
|
184 |
-
}
|
185 |
-
|
186 |
-
.yith-icon-save:before {
|
187 |
-
content: "\f10b";
|
188 |
-
}
|
189 |
-
|
190 |
-
.yith-icon-shield-money:before {
|
191 |
-
content: "\e917";
|
192 |
-
}
|
193 |
-
|
194 |
-
.yith-icon-sort:before {
|
195 |
-
content: "\f106";
|
196 |
-
}
|
197 |
-
|
198 |
-
.yith-icon-time-check:before {
|
199 |
-
content: "\e918";
|
200 |
-
}
|
201 |
-
|
202 |
-
.yith-icon-trash:before {
|
203 |
-
content: "\e90d";
|
204 |
-
}
|
205 |
-
|
206 |
-
.yith-icon-update:before {
|
207 |
-
content: "\e90b";
|
208 |
-
}
|
209 |
-
|
210 |
-
.yith-icon-upload:before {
|
211 |
-
content: "\e90c";
|
212 |
-
}
|
213 |
-
|
214 |
-
.yith-icon-user-off:before {
|
215 |
-
content: "\f108";
|
216 |
-
}
|
217 |
-
|
218 |
-
.yith-icon-video:before {
|
219 |
-
content: "\f10e";
|
220 |
-
}
|
221 |
-
|
222 |
-
.yith-icon-warning-triangle:before {
|
223 |
-
content: "\e923";
|
224 |
-
}
|
225 |
-
|
226 |
-
.yith-icon-world-settings:before {
|
227 |
-
content: "\e919";
|
228 |
-
}
|
229 |
-
|
230 |
-
.yith-icon-yith:before {
|
231 |
-
content: "\e924";
|
232 |
-
}
|
233 |
-
|
234 |
-
/** -------------------------------------------
|
235 |
-
* Deprecated icons
|
236 |
-
*/
|
237 |
-
|
238 |
-
/** Deprecated: use yith-icon-paypal instead */
|
239 |
-
.yith-icon-paypal-svgrepo-com:before {
|
240 |
-
content: "\e91b";
|
241 |
-
}
|
242 |
-
|
243 |
-
/** Deprecated: use yith-icon-arrow-down instead */
|
244 |
-
.yith-icon-arrow_down:before {
|
245 |
-
content: "\e900";
|
246 |
-
}
|
247 |
-
|
248 |
-
/** Deprecated: use yith-icon-eye instead */
|
249 |
-
.yith-icon-arrow_eye:before {
|
250 |
-
content: "\e911";
|
251 |
-
}
|
252 |
-
|
253 |
-
/** Deprecated: use yith-icon-eye-closed instead */
|
254 |
-
.yith-icon-arrow_eye_closed:before {
|
255 |
-
content: "\e912";
|
256 |
-
}
|
257 |
-
|
258 |
-
/** Deprecated: use yith-icon-arrow-left instead */
|
259 |
-
.yith-icon-arrow_left:before {
|
260 |
-
content: "\e901";
|
261 |
-
}
|
262 |
-
|
263 |
-
/** Deprecated: use yith-icon-arrow-right instead */
|
264 |
-
.yith-icon-arrow_right:before {
|
265 |
-
content: "\e902";
|
266 |
-
}
|
267 |
-
|
268 |
-
/** Deprecated: use yith-icon-arrow-up instead */
|
269 |
-
.yith-icon-arrow_up:before {
|
270 |
-
content: "\e903";
|
271 |
-
}
|
272 |
-
|
273 |
-
/** Deprecated: use yith-icon-calendar instead */
|
274 |
-
.yith-icon-calendar2:before {
|
275 |
-
content: "\e904";
|
276 |
-
}
|
277 |
-
|
278 |
-
/** Deprecated: use yith-icon-calendar-add instead */
|
279 |
-
.yith-icon-calendar_add:before {
|
280 |
-
content: "\e913";
|
281 |
-
}
|
282 |
-
|
283 |
-
/** Deprecated: use yith-icon-calendar-money instead */
|
284 |
-
.yith-icon-calendar_money:before {
|
285 |
-
content: "\e914";
|
286 |
-
}
|
287 |
-
|
288 |
-
/** Deprecated: use yith-icon-shield-money instead */
|
289 |
-
.yith-icon-shield_money:before {
|
290 |
-
content: "\e917";
|
291 |
-
}
|
292 |
-
|
293 |
-
/** Deprecated: use yith-icon-time-check instead */
|
294 |
-
.yith-icon-time_check:before {
|
295 |
-
content: "\e918";
|
296 |
-
}
|
297 |
-
|
298 |
-
/** Deprecated: use yith-icon-world-settings instead */
|
299 |
-
.yith-icon-world_settings:before {
|
300 |
-
content: "\e919";
|
301 |
-
}
|
302 |
-
|
303 |
-
/** Deprecated: use yith-icon-edit instead */
|
304 |
-
.yith-icon-pencil:before {
|
305 |
-
content: "\e907";
|
306 |
-
}
|
307 |
-
|
308 |
-
/** Deprecated: use yith-icon-reset instead */
|
309 |
-
.yith-icon-update:before {
|
310 |
-
content: "\e910";
|
311 |
}
|
1 |
+
/**
|
2 |
+
* DO NOT EDIT THIS FILE DIRECTLY
|
3 |
+
* This file is automatically built using a build process
|
4 |
+
*/
|
5 |
+
|
6 |
+
/* stylelint-disable function-url-quotes, declaration-colon-newline-after */
|
7 |
+
@font-face {
|
8 |
+
font-family: yith-icon;
|
9 |
+
src: url("../fonts/yith-icon.eot?91e38b491fff50f72e9b5b51960fdee6");
|
10 |
+
src: url("../fonts/yith-icon.eot?91e38b491fff50f72e9b5b51960fdee6#iefix") format("embedded-opentype"),
|
11 |
+
url("data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAB0wAAsAAAAAMKQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAAQAAAAFY4xkr7Y21hcAAAAXwAAAFkAAAEIM9R0dxnbHlmAAAC4AAAFsQAACVk9j8/KmhlYWQAABmkAAAAMAAAADYa4UjYaGhlYQAAGdQAAAAeAAAAJAQ1AiVobXR4AAAZ9AAAACUAAAC8W+L/7GxvY2EAABocAAAAYAAAAGDQJtkSbWF4cAAAGnwAAAAfAAAAIAFNAVZuYW1lAAAanAAAATAAAAIiyMcJZnBvc3QAABvMAAABYQAAAgtRORYTeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/MI4gYGVgYNBjDGNgYHBHUp/ZZBkaGFgYGJgZWbACgLSXFMYHF4yfORjAnH1mNgYeIE0I4gDAI2pCD94nO3TV1LDQBCE4V9ylgO2yRkHcqjiJhTPnIoD8cRl5nFPAD1qjsG6PtdqlTU9QA/oyJN0ofqmIseXVqt2vUPTrnf51PZQvxpiW+oy+/nRjFKVXs7aUWn/G++a1Tqzq+s3TNlhl1NZseGeO45ZarbPno4e6YgrrrnlmTUXDHSNPmMWTDjS/V+Yc86MGy554IxDthxwwqNu1ud/TPKv/vjbes2KWFunyrLGUVvWOTqW9Y+uZZ2jZ6oZ0TdVjxiYakgMTRUlRtauN6YqE2NTlYmJqfLE1JQBYmZKA7FjygUxt/bchSkrxNKUGmLXyGfZM/JZ9q19lwNTuohDU86II1PiiGNT9ogTUwqJU1MeiTMjv8G5ZW/EhZHf6dLI974y8tlXllWKtZH331j2XWxNSVcvmTJPqU3pp/RMfUDpmzqCMjD1BmVo6hLKyNQvlMbUOZSxqYcoE1M3UaamvqLMjMdfRR93XHicrVkJkBxXee6/r9c9fcz0TB9zdM893dr7mKO13l2ttGa1tizLkq1dyfjC1koYYhdYxBgJAwIqpowxDhUSBdkYEk47pioUl00oUFK2kSEVII6JsQtC8EKAuCgjkkBAbuV/PbOXZAxUZTV6/d7/jn7///7j+18zJoN/8G2WYTKMwxSYAWaEmWEuZK5g9jGvZv6IeTPzNuYe5s+YDzEPMQ8zjzLfxNG1dsWqVUXLMO1mZbzTNlp+o2nVOKNicEj3wLQnYbwzDS2ftJsWeQla+yVo4e9JC16CRt/bpbT85rp6bX1jAF56EDwyEC0PqKmUCoexjJ5YXp6Hw/PLlEKLF5a/6tG6pxjGJm9d9YCrGoZKi03uEiUptLPPW1pHv5pwPM/RIlBoLcEJArc3LhPYHkp0iTx/6epAuG9pKaVG99EFYUlNXXRRdAyWovtgovti+pYJz7vPUJK0hcVAMnksper0rbqa6tf1/nNbS3QkrnVsaWlgwzw4wov8y/yoesQ6cgbeyQgM0whCJ3SAOWP++MfmG+KSWR3zTjizMoY48LoztJuPy7Uxd3fHhAH+c95H55/h43L1PXd31yDYDz+mPWfeEpe0W6UFy8AvGQX1tYbaOsnMo7ZexywxNzI3M3fjyr9FF9bXnfUqsk5D2N89FQJizYBDAtJGLsMaaY6jJdQqVbSDSQjPMYw/1ulJ63iqnSQrCGwyrtGTpkVAK/GIgW4Ni+dedgaoO9+/c4+bcm+5wb3+/b7eYtloimV/qv6Pmk6r8CiWj55/iJe+/BnD7pGf7a3/0iik/6X0wfR9ezw2ilgWWNZLa1EUL8xqaUY7exZlD+grakzADDJjTJuZYrYy23uyfyP6CgaasVWOgJ+EnplaPYOlMqEGOwDUA9CygSK0iFVpk+oENj221hZGa5VQaBDbsZrtLdAK/KBtOyGWNUsH00G6H9omCVohVuix0EMhVb/VGbdNEZZ1UZJ+TsjPJUlMAbUBeBxLZbpcgnK0sLx8ZfT8JJTL8ABEEwBfjX6RSLmGaWlyRtdk3aZVyTQbmlbUNDOdz9fz+TSRZV2WYVASOxJ/jOPezsstUXrSUEv0BViUy1PH3eKRN5XcJ588fvy4Wy5fXYaDlspmTNYsySJfZIkls5kMa2FL8FhHMNjZBJfjf1jAF9QL0/QFukw1f52MB5g5Zk/scbvey1tf26hoAXpg+h/MWiPTtFbco7Naa5KaVbOaKNVmuwbPLcS+5HDsTBZWxXTC877qebBIZbN+xOKz7sQE/uCxEnUdpW5pqNFt8dQ7VaO0tLQUfQgA3t1HHWQfbKKPTSfoLJdhtFW+OMZgSjF3bYwz88wlzEHmDuYu5k+RTzxjEusPbhXrph3S/a5wPMl2WdxAbDrdkV0mV/prIbJqxKJonyMoDpcehiC0nbYf+O1WJ0RttB3iB1jalikGbdEynVZgdWDi8ASKwPVcFIUbCwLr7oTrPheTaNcKfSKm37LQFd2aRP/VTrmyamQdJZXP2nlDSaWcRCo3nGqj7/2k586hrPAPPXNPqK7rTvaqc5u6QvTiv+g2Kl13vdCjB7JZkEleY2siUcx0jss6rFKQ2boQN68u8qo8IYtF6saZ1LozIOg/k72YX+rp2kgc9a9ibkUwsCLG3n/hd7Qz/y8aeth1FzwPf4uue5b5bY1b/kDVBbf3N3DOE674A5UZxUd68ecplF6BqTNDqMNXMjeg7lbOUbNeSMC2Rc5zUysxyloNLDGSqbWbK0BlBeFgwHGawTAQoQk/iKZWvXwi9vvwKLucrVZHq9Us7j1nGEdKoiyLholOUKxi9QXToNWYWsUa8Pmix9lK9DfXwI60GkVaOq0Bq6aj78cen91BFxut7k9n0/hbklXpIvwviQdF+eBFkorLHMRlVBmGLn+lonA3M1SbYpmwNDrnUJuYSnUYWltgvAimDlwV3XYRxtGXDwPXQw9zb5ybe+O7aTG35cYtW268nRZ7Fs2Z19o9Ohaw3OvAIjq5y5p4R7qHESJ4uochHHC+9Y+Zz0HOGf076+PwVmN1P1TPKZ6dxHFVH8XbQXHa6DDa6wXcFmrrO02R2wgua9uStp38etJ2/cLXC75fWIC++EmLH/X67OQ3es+FhV6f+43eeCxgrNeLRVdUlIfPw+djO2TAgSADBOCvzOhB04RFfMDnaB0W44JZ1TvKE7XbXGyxM8xlaKl061043SRoXY3YNwakCAL+j7t8as0CdZPxMBoE1hjMmCJKY1UElmsnJQn3T+1jzC1mBS0dPe/y9Ww2q5uvuu462HrYnS749XqXv8Qaa/CVWEokvO6DOLjOu6z1PcEpuWkoucfp+Gn3cE8i0X+tSg7Zkno29WHkzIm90QqqO8+qhMq4B5V2C+nTULHM2Kf8HhB/A4Bbb0bRKJpQtBkeR2uCU4fK5VP6ChKbWq29brXWWQVn8CFqPV1spKZdNgzZ6NfsiRPsgbLzclj67K/P/oIV8RzRToBg8HLCgDghulH6QH7iB+Y0+IAvmn1/P2Becpk58A9D5mU7N7QAn490qQ/3Wzux9bVu6wls9WyAsCLDo3wx+spAQqghpqZPB+6N3qYfhbf3bZ2dib63U4LMLCtGbzuiw7Gtr9ga7ZMugfQr6BLC2d/gOgL8EE8mYC7AaL0L942BM0CEJhKxVsVKczzshJ0ZEKoDQFuddgtBsilmiF+rEhyVBMRtNs0JBBzYHHdoB42yxA9JB85oVt+gNdkqD2zfVSk7A0Pz24YDSyHRGXTBjqblG6JjPvCaTf701uFBR5dIwqwP3mzCZ6JFf+jiC/NegDGwwW2Z/GRGBEVP1xzbG68X+qWsVnYamZRcc4R6XtMcTjdBfI1ashuZpCwn03XnJlzlm43CgBRwjTyRp73dmRiq8D2+72Ts2Mt3MCOpItf+CFBexx27BJQzIjaQM8o/9iGvzoqHD1Z8PjA9bqTS0CsfeuVwUSKKFQxvi54pD87dt32gjCzccfHQI/lGo9Vo5HXTdE3zKO7bTMlypTQ1XarIcirTcMrvauQH+gv1RmFwoHCgjoNb9VfRwa7Zw1fwKfhVjMr3MQeY1zG3M3cyx5mPMp9mHse8/YfIgR9veUyHGvJA4Q9BtLMx3kxD7zjDLdD20Ws0HTHG4GHH0YHo4IyJdhNb4Rgd1LRwRY7yXAJbh2qAD1OsIvxHErHx5EWUyAx0xsPuo0sKwlanOYbuhpi1sSrBRjiO02tB1W80V2pIJZaIetPdUNBGvfJRrA71WAGiNjPAFUzKUww7gi6eg48lMnoqkTYTqkl4SGSvLkzqSkrR42JhqmI2+uwkx0L0gK4/7V44OjJTnLPlfkdAH0yEWTeRTUq6TNJW5VleUvhNPBCFfyigdVrczQPSFInv45WjPC2lmHA5SIJIQNNOSMKEKAEtCZibsUrECUGShHsgodhsRhE5gKzf8XdxEqSglEw5kiBxJU4UJecelWUlXlVBSghEldIO4YSEridup0XSEFU3qXGSqNzwpqtlwifGWWKIgsrTd8sJnk3KPHKR1C24nlcI3Rzhb+tbqap8lwUs3rlWHdgsElnsKDcKIiupEkeKkiKxRCGzNS2hgYqdnO9m0Xe357kEy/F/YqckLSFxYiEr8CSRTKTiuCau4oAk4zJlZhPq4gXn+3BioKUkIS5yEEIftMbQqhyLo+ZCzSakBkTPH5ajzfEtyClazvMqv/9eXhEO3QJidCfcz75h154vZev1sVothzgmj+kVYyhrU9zon7cLwv7jPH8IktETr4/OAnvLrt2HIUOnjNWvzuTprNjeV/dOYzJFxTEGtii2PWf/YFSM0zQ+nl63uWgITsGxgf5PwO3rdxC5cCravGF9ipE8pvJyKIn03vxbcNJO+vKXhklLuAMaT8+ewXj6ImIkBbOtBp7ELLOIyJ4JHXqr0qYxZoSlgQZVE42VVIyKg3ABjcmxTa4ZZMQALd+nBSZIWFodp40IwqjMsNR14CapA3eK6Ng7TiAS5y5zpJZJJjO1EdONS7g5ITnSRRC9A+rXQLYg75KeGh4Og+CqYUdKqpYxvlSvLZyGOYmIuiQ7/Tm/DVwpm+m7a57j5/7WHC7a2rWaVRoxZ3W7OGxG35Il6aK3s8zB/UbTs61dkgNXjEUf1XUvW3FzgykPZHV4KZq4TRDUVMbK9uXaDSUXyBLfmheE7fQMzp6Nz8BGjLGZ2UFvmdDLITNd6WPkCh3qtNfOBc+oQXlFx1cEGrrQ2zfxlJwYPFERoP+hHgqj2NG8N3XwtkOTk4cm+y4pHuVVKXJb+1+zv9nEogVT1jZ/2BfQsIRSo9ROCUSQWJNFdA0sHgMrStmjxUv6JukCtx2c8vJHeUmFVGt/q7fIu0q1PK+gAdpuXhSVJVWRqeESxOQJIKs4HE6jBgRMEzWY3sMFmO8KmBBgOuKj+nbipMMDB11qu0UvYcZtrh1rgWWiip80Fy+3RlxQEd7EMOnjH2f/89scz37kIwhznuJl7jmadcBd1uWLmdHHnnjfWgrhsoX7T7Dgsm46Ov3YBzj2xGMx1I33BY/AAO7LYPK4r25krGJUP7cyn6vl8PfeXD2Hv3u6LWDStJVLb3j01kVNx/i8m7kJ671oEFDUkWRj4BGYDsa1GJ9QzZ0EO44lPmAwWtcMMAjGwZFDXLN+AoY9Cl1sMhZH+2DMD1rhGDyjS4WbJi7lNXTCnMXJRJa2c4K+TUqICdbmeDGh8ZdO3FRIcFz0HovjidxtK7zYGL7mfbJMEtx1ALyozEo4ecJkeTrGNpSaxHOIVgJTx0gAn8hX8rkrywYGJolcm5REFkDC40Zt0a8jEoYso3xludQfnVxt1SsjhVo8IDpIJAwHWI2uEAn2YtBjxWJSa6Q1jmV5lcTXTVL3GwB8l8mgZZSYftSdKWaOZheAun+O+wswS0UXGKcQRmDT9MGieSuJ4beFsTqmbaB03RkOg/tGJBL9ZOWuXVDrg9GTkJLEvS8mLFuza7bAK4qaVN6sF7xKtcBKKUPVk28ZHhy04WMjUkqNjsWTfR6D2WB0LxxbEOVo+RmpYbgHRgWDVAJtuHDgIslLTV2WsTPBAYZJxHYPsNzTvxoziBjpMswv9jPXojaeF3bC8yjO+ZQN9xzrrzeFWthEjjNOZpSKYTHjeYHnmZKiGIryGTcINgeBm3KcsuN80fS8Ta5rynHftiOG+gHVOBLfQjxGk5NPHoUjX7gXTvwFHDkKMh26yZtTUyr+knSZzcFr6TJl58sb+q6Z1gxDmza0L9ClHlaNpx72noIMRD97eC3/PI1+Is4/MxWrkmkaNR2jrbuMaZ/uAhO5vft6VoFvMbRR6SYoFfSLHvWMNZyGjnCaBiy4PXp8OIOOowXbyq1SqVWO7ocD/mwQzMI9Q+gpzE6pXdqKXV4wG2wNZv3VmAsvwj9hnLLiXD3O6NFn1dD/UldLqOvVQYi/BZCqH4TUSaPLbuIGLpnHVNecdTvXhFNLuby1rzmyewT+vNU2d8y/GFMWW0jB/p9ebGIEGwqvCbeFyvDmkd1vxgXmd5zY1lFHNo/sGcGO3n7O/iqOD3xsBzWam2Owb6xZAI0AlhGsXuiEKAR47yImkG+N3tEN+gLaKHn1ByojI7MjIzPRDzBuLC9G74VTbhcYsCjRD7/6P2jv7MhfX0FzrFgO34X/jWWwk9mDsRojk7+WbszE+dNKxkE46pE63ZwDY6/o/AFXmoxouW2/k2bVYGg/5lbmxc2myqY7ftu1TjoX94+O9l/sjPRfWCxe2P+XtlFMaOl8Tkm7edtNK0Y6pxiFUSNMpUROdgZmrrxV4zGb6XOcej2X5LVbr5wZsBOw+46r2oVC+6o7kla5Xi+bj+eykCCuzvoiUa1MgcvlWMVNsIEgKXa6cH2Z1xKTsljie7r5FZaJsUsvghmx5u0zv/xl88EHaQkD5smT5kPRnk9ZJ09aqzodn53CLKD0atRG6YUGMk9QBJi69CI2Kq8zzAZrFwYkQG0LYxOODTgoxl93nEzQU78uLmu34HueIMuCR++/rMoFS1MYnyV+83VTAs9TougJPFxwwyQgGYLt7vE+a8tvzKnavtEVGPcj7MHfR8zOzNShLRwvrEzjwqtCjq7GTh7awnNs90UsxxZz9w5lXgGcuaVcXUGCO1Z15pkYa3fxZB+1UXrpTcMXKmrbaHLdu522USG9u1eOXp2jM4Znop0108idzhlmbcbUT2Ni3Dniedd7HnmP97gH73Kj5/uzlpXtBzN6vlAuF8Cc/M53vgN3T+7bt/ItL5Z3cQ3hY0BYuc1As8HX9ABzD8X/9zD1BK2n4dS992J7BauDNWYuXG6Nn6FQ2e3i5pV71hgv1zEijTItZobaBawHyhD7CeomkIoRCTNUi7YaJkb+kFB4WkOENwPBMJ5fjN446kUqM6gKMfSjHoVqBzDbb52bu/U9tIi+jVj7kun+5Phkq2imG0OgemUIc5a7Y1fFH+X+zRMHypZu5caq2U2JHX07i3kQdRj006bQrDS23MgyvZWwOMvgYsPDdt4ddZ2+ZHpuk66XLrvdbiTUyxcTSlhPlEYVR5QbdmnIyUQPenkX0pvm0sk+R9fD0sIITl/NrRLwdBzBxpnp7k1MWIlPuuX3orRjZ1rtCubiVkWooFRE0rv4Qol1cDBqvEDDV3yDYYb2+AxsAUzWqfajpfnwWVMSTC3aqRqClILPAgfRPDwVPSq4dY/fRm+RZ4VCzRVgGjU3+iCxNZ7kCd/iJO5SAuIuknQbjfsTogwcxh4telHGagHwL1oyHMdAHTdMkz5cOZUUFUVMfollh7gUv1mQ5APynoLF8GdfpPE6PvvuNwqmwflVwolxjG01CkB1uU0zpBdf4NP8aU6SYBlRTuPZZ39CkyMH/p2QyJM0SZHh89GOfQPffze1lBgHsIDrpnHVHOpunfHjL5lNzAe2MFuZT8PF6HU2JGMd9Ku1abAdxJXoUjsh/TZZ6xDLoZcfvmMhzWmG9DqMfqZsimE7rNZ8OhQxJv0SiomuSJtrdy0iDvZ7PWYJUFtXbmDQbVMKPRn6YnHt80gHX233euiqtBk2e18OqKXT/cVXbfQOht6y4CDM7ZBkxVfb3XteP2wHPXL3ngaXQwOJSetugpGjHrl7b4NrloCS2uuuy20UQo8cj6Bv7W6g2b1NjmqTtdrkHC3MSsEUFkzDqLC6aaQzU255Ly/A3rJr7s6kjSog1TCnCpW9vPh6ltclDKQyr+u6FmiCLKTSAIWMmUFdyqR4WUAq9qVk0ckUChk0oFRvqCSkMqtD0ylhZSgvi7ikRnA4KERKSWnE64KK2ZiAz6QgKoKasHMKdppEAVYp2IosqAJ26ThEIQkxKXIakVNEiedrHBISa/NVPpGwC2vzc3ZCXT9fxSeXFhM4H45VJ7dPVuNiL2c6xQsKXELJuZyS4MomVywOsFoR6e555BDASAkJQfORWw15wvxPpTxlRJUgg0TQkFkf8V+6K4MMWmF3LBWo2B2LU3CizHfH4nIpoyey2d7WZW3D1kVd5FKSQXqsJzlRO5d1J6+xPd5RdInERtFpIpdcm5/icMF1okc5yV3Rr+HTr7EcZiGzWBNJnKIR6r8xD69Vw/gKwo+VHYmo/IiB4kQu7AIksXeFaXYEOliEU/XQ5bjpHbaqK0mA6SzyK8uFnFFtpm0hCS6AZgRDw5m0KC/4HZ4sbG4PVS4I5OgFTG3n6rAtl792zzaW3Suk1eK8lxweSObLLFscsg0LXpUtpy2OK2mpkh24/uClc5MHvIIw/oxiVrcx/weR6nK6eJxjYGRgYABioz2OTfH8Nl8ZuJkYQODOveaPMPr/r/+fmbiZ2IBcDgawNABsKg3GeJxjYGRgYGIAAj0mhv+//n9l4mZgZEAF+gBfLwReAAB4nGNgYGBgwon//8cth6H2F5T+DcKM94jVRyr+/xfGBgA96AshAAAAAAAAAAESASQBNgFGAVgCFgLIAzQD9gSYBSIFWAVqBboF1AZCBrgG7AcQB4wH5AkmCYQJtAnqCnYK5gsyC14MAgxyDPoNDg0+DYYNwg5IDmQO3A8cD0wP1BBKEHYSShKyeJxjYGRgYNBn9GIQYQABJiDmAkIGhv9gPgMAFl8BpQB4nG2PPW7CQBCFn/mLAlKEEilSulWKNBHmp6DgANBT0Buz/kG211oWJC6QE+QMOUNOkDJnyFHybEYuEnal1ffevNnRABjiCx6q4+G2fqvTwg3VhdukoXCH/CTcxQDPwj36I+E+XjEXHuABAX/wOtVv93DCLdzhTbhN/124Q/4Q7uIRn8I9+t/CfWzwIzzAizc/py4ZpaEp1jo+ZoFtdAMbbQ+pKdTUnzTeShfaBk7v1PasDqd45lykImtytTSF01lmVGnNXofOT5wrF+NxJL4fmhxnpNwm4dYpQhgUWEMjxhEZN7ZX6v+dDTssDtSVUpjCx+RKbsVcUWcDVjR2zG6ZU+w9ceaMrkNEHTFjkJOWdWeVzngNnbKu7emE9H1OqLpKLDDmjf7k/Xp2/gurBGCqeJxtkFlv3DAMhD1Zeet43W16n0nvu2r6l1iJtoXIkirJWfjf1163eQofiPmAITFkcVKsVRa31yVOsIFAiS3uoMIpauzQ4C72uIcz3McDPMQjPMYTPMUzPMcLvMQrnOMCr/EGb/EO7/EBH/EJn/EFX/EN3/EDEj9xiV9FTUr50WXjuppi9Aep/cH9k5bbvFtlNF2fq1WPof5N7kqqntWVWGSjyLLTFCVpvb+BwTueqv8oFKW+OQ5JZaKyXB6hVHb2LT2xUD5MOxVZmywVRS10pE4sWPPE8mjSm1k2Pdswp5Y9OV2agTpujGu9TH9GmufFAjtrUpaJKar+dLY40xqO1UDGSj9mMfjI20BTILsJut0G9sGyCHZMZeRgp7knziLRNTepN2z1epRIPuY6m4HXL5Q5zsdtx2A96WpMHKVv2/LaaPZnB4puSZqjIddZ3h98nBfNi5e3JzGZ3BfFX3LHkkUAAAA=") format("woff"),
|
12 |
+
url("../fonts/yith-icon.ttf?91e38b491fff50f72e9b5b51960fdee6") format("truetype");
|
13 |
+
font-weight: 400;
|
14 |
+
font-style: normal;
|
15 |
+
}
|
16 |
+
/* stylelint-enable */
|
17 |
+
|
18 |
+
|
19 |
+
[class^="yith-icon-"], [class*=" yith-icon-"] {
|
20 |
+
font-family: yith-icon !important;
|
21 |
+
speak: never;
|
22 |
+
font-style: normal;
|
23 |
+
font-weight: normal;
|
24 |
+
font-variant: normal;
|
25 |
+
text-transform: none;
|
26 |
+
line-height: 1;
|
27 |
+
|
28 |
+
-webkit-font-smoothing: antialiased;
|
29 |
+
-moz-osx-font-smoothing: grayscale;
|
30 |
+
|
31 |
+
width: 1em;
|
32 |
+
height: 1em;
|
33 |
+
font-size: 20px;
|
34 |
+
}
|
35 |
+
|
36 |
+
/* Icons */
|
37 |
+
|
38 |
+
.yith-icon-accounting:before {
|
39 |
+
content: "\e91d";
|
40 |
+
}
|
41 |
+
|
42 |
+
.yith-icon-arrow-down:before {
|
43 |
+
content: "\e900";
|
44 |
+
}
|
45 |
+
|
46 |
+
.yith-icon-arrow-left:before {
|
47 |
+
content: "\e901";
|
48 |
+
}
|
49 |
+
|
50 |
+
.yith-icon-arrow-right:before {
|
51 |
+
content: "\e902";
|
52 |
+
}
|
53 |
+
|
54 |
+
.yith-icon-arrow-up:before {
|
55 |
+
content: "\e903";
|
56 |
+
}
|
57 |
+
|
58 |
+
.yith-icon-bank-check:before {
|
59 |
+
content: "\e91e";
|
60 |
+
}
|
61 |
+
|
62 |
+
.yith-icon-bank:before {
|
63 |
+
content: "\e91c";
|
64 |
+
}
|
65 |
+
|
66 |
+
.yith-icon-calendar-add:before {
|
67 |
+
content: "\e913";
|
68 |
+
}
|
69 |
+
|
70 |
+
.yith-icon-calendar-money:before {
|
71 |
+
content: "\e914";
|
72 |
+
}
|
73 |
+
|
74 |
+
.yith-icon-calendar:before {
|
75 |
+
content: "\e904";
|
76 |
+
}
|
77 |
+
|
78 |
+
.yith-icon-calendar2:before {
|
79 |
+
content: "\e915";
|
80 |
+
}
|
81 |
+
|
82 |
+
.yith-icon-cash:before {
|
83 |
+
content: "\e91f";
|
84 |
+
}
|
85 |
+
|
86 |
+
.yith-icon-check-circle:before {
|
87 |
+
content: "\e921";
|
88 |
+
}
|
89 |
+
|
90 |
+
.yith-icon-check:before {
|
91 |
+
content: "\e905";
|
92 |
+
}
|
93 |
+
|
94 |
+
.yith-icon-clone:before {
|
95 |
+
content: "\f105";
|
96 |
+
}
|
97 |
+
|
98 |
+
.yith-icon-close:before {
|
99 |
+
content: "\e906";
|
100 |
+
}
|
101 |
+
|
102 |
+
.yith-icon-copy:before {
|
103 |
+
content: "\f101";
|
104 |
+
}
|
105 |
+
|
106 |
+
.yith-icon-credit-card:before {
|
107 |
+
content: "\e920";
|
108 |
+
}
|
109 |
+
|
110 |
+
.yith-icon-drag:before {
|
111 |
+
content: "\e90f";
|
112 |
+
}
|
113 |
+
|
114 |
+
.yith-icon-edit:before {
|
115 |
+
content: "\e907";
|
116 |
+
}
|
117 |
+
|
118 |
+
.yith-icon-eye-closed:before {
|
119 |
+
content: "\e912";
|
120 |
+
}
|
121 |
+
|
122 |
+
.yith-icon-eye:before {
|
123 |
+
content: "\e911";
|
124 |
+
}
|
125 |
+
|
126 |
+
.yith-icon-helping-hand:before {
|
127 |
+
content: "\f10c";
|
128 |
+
}
|
129 |
+
|
130 |
+
.yith-icon-image:before {
|
131 |
+
content: "\f10a";
|
132 |
+
}
|
133 |
+
|
134 |
+
.yith-icon-info-squared:before {
|
135 |
+
content: "\e922";
|
136 |
+
}
|
137 |
+
|
138 |
+
.yith-icon-info:before {
|
139 |
+
content: "\e90e";
|
140 |
+
}
|
141 |
+
|
142 |
+
.yith-icon-list-search:before {
|
143 |
+
content: "\f10d";
|
144 |
+
}
|
145 |
+
|
146 |
+
.yith-icon-magnifier:before {
|
147 |
+
content: "\e908";
|
148 |
+
}
|
149 |
+
|
150 |
+
.yith-icon-mail-out:before {
|
151 |
+
content: "\f109";
|
152 |
+
}
|
153 |
+
|
154 |
+
.yith-icon-more:before {
|
155 |
+
content: "\f102";
|
156 |
+
}
|
157 |
+
|
158 |
+
.yith-icon-paypal:before {
|
159 |
+
content: "\e91b";
|
160 |
+
}
|
161 |
+
|
162 |
+
.yith-icon-pdf:before {
|
163 |
+
content: "\f107";
|
164 |
+
}
|
165 |
+
|
166 |
+
.yith-icon-pencil:before {
|
167 |
+
content: "\e909";
|
168 |
+
}
|
169 |
+
|
170 |
+
.yith-icon-people:before {
|
171 |
+
content: "\e916";
|
172 |
+
}
|
173 |
+
|
174 |
+
.yith-icon-plus:before {
|
175 |
+
content: "\e90a";
|
176 |
+
}
|
177 |
+
|
178 |
+
.yith-icon-reply:before {
|
179 |
+
content: "\e91a";
|
180 |
+
}
|
181 |
+
|
182 |
+
.yith-icon-reset:before {
|
183 |
+
content: "\e910";
|
184 |
+
}
|
185 |
+
|
186 |
+
.yith-icon-save:before {
|
187 |
+
content: "\f10b";
|
188 |
+
}
|
189 |
+
|
190 |
+
.yith-icon-shield-money:before {
|
191 |
+
content: "\e917";
|
192 |
+
}
|
193 |
+
|
194 |
+
.yith-icon-sort:before {
|
195 |
+
content: "\f106";
|
196 |
+
}
|
197 |
+
|
198 |
+
.yith-icon-time-check:before {
|
199 |
+
content: "\e918";
|
200 |
+
}
|
201 |
+
|
202 |
+
.yith-icon-trash:before {
|
203 |
+
content: "\e90d";
|
204 |
+
}
|
205 |
+
|
206 |
+
.yith-icon-update:before {
|
207 |
+
content: "\e90b";
|
208 |
+
}
|
209 |
+
|
210 |
+
.yith-icon-upload:before {
|
211 |
+
content: "\e90c";
|
212 |
+
}
|
213 |
+
|
214 |
+
.yith-icon-user-off:before {
|
215 |
+
content: "\f108";
|
216 |
+
}
|
217 |
+
|
218 |
+
.yith-icon-video:before {
|
219 |
+
content: "\f10e";
|
220 |
+
}
|
221 |
+
|
222 |
+
.yith-icon-warning-triangle:before {
|
223 |
+
content: "\e923";
|
224 |
+
}
|
225 |
+
|
226 |
+
.yith-icon-world-settings:before {
|
227 |
+
content: "\e919";
|
228 |
+
}
|
229 |
+
|
230 |
+
.yith-icon-yith:before {
|
231 |
+
content: "\e924";
|
232 |
+
}
|
233 |
+
|
234 |
+
/** -------------------------------------------
|
235 |
+
* Deprecated icons
|
236 |
+
*/
|
237 |
+
|
238 |
+
/** Deprecated: use yith-icon-paypal instead */
|
239 |
+
.yith-icon-paypal-svgrepo-com:before {
|
240 |
+
content: "\e91b";
|
241 |
+
}
|
242 |
+
|
243 |
+
/** Deprecated: use yith-icon-arrow-down instead */
|
244 |
+
.yith-icon-arrow_down:before {
|
245 |
+
content: "\e900";
|
246 |
+
}
|
247 |
+
|
248 |
+
/** Deprecated: use yith-icon-eye instead */
|
249 |
+
.yith-icon-arrow_eye:before {
|
250 |
+
content: "\e911";
|
251 |
+
}
|
252 |
+
|
253 |
+
/** Deprecated: use yith-icon-eye-closed instead */
|
254 |
+
.yith-icon-arrow_eye_closed:before {
|
255 |
+
content: "\e912";
|
256 |
+
}
|
257 |
+
|
258 |
+
/** Deprecated: use yith-icon-arrow-left instead */
|
259 |
+
.yith-icon-arrow_left:before {
|
260 |
+
content: "\e901";
|
261 |
+
}
|
262 |
+
|
263 |
+
/** Deprecated: use yith-icon-arrow-right instead */
|
264 |
+
.yith-icon-arrow_right:before {
|
265 |
+
content: "\e902";
|
266 |
+
}
|
267 |
+
|
268 |
+
/** Deprecated: use yith-icon-arrow-up instead */
|
269 |
+
.yith-icon-arrow_up:before {
|
270 |
+
content: "\e903";
|
271 |
+
}
|
272 |
+
|
273 |
+
/** Deprecated: use yith-icon-calendar instead */
|
274 |
+
.yith-icon-calendar2:before {
|
275 |
+
content: "\e904";
|
276 |
+
}
|
277 |
+
|
278 |
+
/** Deprecated: use yith-icon-calendar-add instead */
|
279 |
+
.yith-icon-calendar_add:before {
|
280 |
+
content: "\e913";
|
281 |
+
}
|
282 |
+
|
283 |
+
/** Deprecated: use yith-icon-calendar-money instead */
|
284 |
+
.yith-icon-calendar_money:before {
|
285 |
+
content: "\e914";
|
286 |
+
}
|
287 |
+
|
288 |
+
/** Deprecated: use yith-icon-shield-money instead */
|
289 |
+
.yith-icon-shield_money:before {
|
290 |
+
content: "\e917";
|
291 |
+
}
|
292 |
+
|
293 |
+
/** Deprecated: use yith-icon-time-check instead */
|
294 |
+
.yith-icon-time_check:before {
|
295 |
+
content: "\e918";
|
296 |
+
}
|
297 |
+
|
298 |
+
/** Deprecated: use yith-icon-world-settings instead */
|
299 |
+
.yith-icon-world_settings:before {
|
300 |
+
content: "\e919";
|
301 |
+
}
|
302 |
+
|
303 |
+
/** Deprecated: use yith-icon-edit instead */
|
304 |
+
.yith-icon-pencil:before {
|
305 |
+
content: "\e907";
|
306 |
+
}
|
307 |
+
|
308 |
+
/** Deprecated: use yith-icon-reset instead */
|
309 |
+
.yith-icon-update:before {
|
310 |
+
content: "\e910";
|
311 |
}
|
plugin-fw/assets/css/yith-select2-no-wc.css
CHANGED
@@ -1,741 +1,741 @@
|
|
1 |
-
.select2-container {
|
2 |
-
-webkit-box-sizing : border-box;
|
3 |
-
box-sizing : border-box;
|
4 |
-
display : inline-block;
|
5 |
-
margin : 0;
|
6 |
-
position : relative;
|
7 |
-
vertical-align : middle
|
8 |
-
}
|
9 |
-
|
10 |
-
.select2-container .select2-selection--single {
|
11 |
-
-webkit-box-sizing : border-box;
|
12 |
-
box-sizing : border-box;
|
13 |
-
cursor : pointer;
|
14 |
-
display : block;
|
15 |
-
height : 28px;
|
16 |
-
margin : 0 0 -4px;
|
17 |
-
-moz-user-select : none;
|
18 |
-
-ms-user-select : none;
|
19 |
-
user-select : none;
|
20 |
-
-webkit-user-select : none
|
21 |
-
}
|
22 |
-
|
23 |
-
.select2-container .select2-selection--single .select2-selection__rendered {
|
24 |
-
display : block;
|
25 |
-
padding-left : 8px;
|
26 |
-
padding-right : 20px;
|
27 |
-
overflow : hidden;
|
28 |
-
text-overflow : ellipsis;
|
29 |
-
white-space : nowrap
|
30 |
-
}
|
31 |
-
|
32 |
-
.select2-container .select2-selection--single .select2-selection__clear {
|
33 |
-
position : relative
|
34 |
-
}
|
35 |
-
|
36 |
-
.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered {
|
37 |
-
padding-right : 8px;
|
38 |
-
padding-left : 20px
|
39 |
-
}
|
40 |
-
|
41 |
-
.select2-container .select2-selection--multiple {
|
42 |
-
-webkit-box-sizing : border-box;
|
43 |
-
box-sizing : border-box;
|
44 |
-
cursor : pointer;
|
45 |
-
display : block;
|
46 |
-
min-height : 32px;
|
47 |
-
-moz-user-select : none;
|
48 |
-
-ms-user-select : none;
|
49 |
-
user-select : none;
|
50 |
-
-webkit-user-select : none
|
51 |
-
}
|
52 |
-
|
53 |
-
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
54 |
-
display : inline-block;
|
55 |
-
overflow : hidden;
|
56 |
-
padding-left : 8px;
|
57 |
-
text-overflow : ellipsis;
|
58 |
-
white-space : nowrap
|
59 |
-
}
|
60 |
-
|
61 |
-
.select2-container .select2-search--inline {
|
62 |
-
float : left;
|
63 |
-
padding : 0
|
64 |
-
}
|
65 |
-
|
66 |
-
.select2-container .select2-search--inline .select2-search__field {
|
67 |
-
-webkit-box-sizing : border-box;
|
68 |
-
box-sizing : border-box;
|
69 |
-
border : none;
|
70 |
-
font-size : 100%;
|
71 |
-
margin : 0;
|
72 |
-
padding : 0
|
73 |
-
}
|
74 |
-
|
75 |
-
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
76 |
-
-webkit-appearance : none
|
77 |
-
}
|
78 |
-
|
79 |
-
.select2-dropdown {
|
80 |
-
background-color : #fff;
|
81 |
-
border : 1px solid #aaa;
|
82 |
-
border-radius : 4px;
|
83 |
-
-webkit-box-sizing : border-box;
|
84 |
-
box-sizing : border-box;
|
85 |
-
display : block;
|
86 |
-
position : absolute;
|
87 |
-
left : -100000px;
|
88 |
-
width : 100%;
|
89 |
-
z-index : 1051
|
90 |
-
}
|
91 |
-
|
92 |
-
.select2-results {
|
93 |
-
display : block
|
94 |
-
}
|
95 |
-
|
96 |
-
.select2-results__options {
|
97 |
-
list-style : none;
|
98 |
-
margin : 0;
|
99 |
-
padding : 0
|
100 |
-
}
|
101 |
-
|
102 |
-
.select2-results__option {
|
103 |
-
padding : 6px;
|
104 |
-
-moz-user-select : none;
|
105 |
-
-ms-user-select : none;
|
106 |
-
user-select : none;
|
107 |
-
-webkit-user-select : none
|
108 |
-
}
|
109 |
-
|
110 |
-
.select2-results__option[aria-selected], .select2-results__option[data-selected] {
|
111 |
-
cursor : pointer
|
112 |
-
}
|
113 |
-
|
114 |
-
.select2-container--open .select2-dropdown {
|
115 |
-
left : 0
|
116 |
-
}
|
117 |
-
|
118 |
-
.select2-container--open .select2-dropdown--above {
|
119 |
-
border-bottom : none;
|
120 |
-
border-bottom-left-radius : 0;
|
121 |
-
border-bottom-right-radius : 0
|
122 |
-
}
|
123 |
-
|
124 |
-
.select2-container--open .select2-dropdown--below {
|
125 |
-
border-top : none;
|
126 |
-
border-top-left-radius : 0;
|
127 |
-
border-top-right-radius : 0
|
128 |
-
}
|
129 |
-
|
130 |
-
.select2-search--dropdown {
|
131 |
-
display : block;
|
132 |
-
padding : 4px
|
133 |
-
}
|
134 |
-
|
135 |
-
.select2-search--dropdown .select2-search__field {
|
136 |
-
padding : 4px;
|
137 |
-
width : 100%;
|
138 |
-
-webkit-box-sizing : border-box;
|
139 |
-
box-sizing : border-box
|
140 |
-
}
|
141 |
-
|
142 |
-
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
143 |
-
-webkit-appearance : none
|
144 |
-
}
|
145 |
-
|
146 |
-
.select2-search--dropdown.select2-search--hide {
|
147 |
-
display : none
|
148 |
-
}
|
149 |
-
|
150 |
-
.select2-close-mask {
|
151 |
-
border : 0;
|
152 |
-
margin : 0;
|
153 |
-
padding : 0;
|
154 |
-
display : block;
|
155 |
-
position : fixed;
|
156 |
-
left : 0;
|
157 |
-
top : 0;
|
158 |
-
min-height : 100%;
|
159 |
-
min-width : 100%;
|
160 |
-
height : auto;
|
161 |
-
width : auto;
|
162 |
-
opacity : 0;
|
163 |
-
z-index : 99;
|
164 |
-
background-color : #fff
|
165 |
-
}
|
166 |
-
|
167 |
-
.select2-hidden-accessible {
|
168 |
-
border : 0 !important;
|
169 |
-
clip : rect(0 0 0 0) !important;
|
170 |
-
height : 1px !important;
|
171 |
-
margin : -1px !important;
|
172 |
-
overflow : hidden !important;
|
173 |
-
padding : 0 !important;
|
174 |
-
position : absolute !important;
|
175 |
-
width : 1px !important
|
176 |
-
}
|
177 |
-
|
178 |
-
.select2-container--default .select2-selection--single {
|
179 |
-
background-color : #fff;
|
180 |
-
border : 1px solid #aaa;
|
181 |
-
border-radius : 4px
|
182 |
-
}
|
183 |
-
|
184 |
-
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
185 |
-
color : #444;
|
186 |
-
line-height : 28px
|
187 |
-
}
|
188 |
-
|
189 |
-
.select2-container--default .select2-selection--single .select2-selection__clear {
|
190 |
-
cursor : pointer;
|
191 |
-
float : right;
|
192 |
-
font-weight : 700
|
193 |
-
}
|
194 |
-
|
195 |
-
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
196 |
-
color : #999
|
197 |
-
}
|
198 |
-
|
199 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
200 |
-
height : 26px;
|
201 |
-
position : absolute;
|
202 |
-
top : 1px;
|
203 |
-
right : 1px;
|
204 |
-
width : 20px
|
205 |
-
}
|
206 |
-
|
207 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
208 |
-
border-color : #888 transparent transparent transparent;
|
209 |
-
border-style : solid;
|
210 |
-
border-width : 5px 4px 0 4px;
|
211 |
-
height : 0;
|
212 |
-
left : 50%;
|
213 |
-
margin-left : -4px;
|
214 |
-
margin-top : -2px;
|
215 |
-
position : absolute;
|
216 |
-
top : 50%;
|
217 |
-
width : 0
|
218 |
-
}
|
219 |
-
|
220 |
-
.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear {
|
221 |
-
float : left
|
222 |
-
}
|
223 |
-
|
224 |
-
.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow {
|
225 |
-
left : 1px;
|
226 |
-
right : auto
|
227 |
-
}
|
228 |
-
|
229 |
-
.select2-container--default.select2-container--disabled .select2-selection--single {
|
230 |
-
background-color : #eee;
|
231 |
-
cursor : default
|
232 |
-
}
|
233 |
-
|
234 |
-
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
235 |
-
display : none
|
236 |
-
}
|
237 |
-
|
238 |
-
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
239 |
-
border-color : transparent transparent #888 transparent;
|
240 |
-
border-width : 0 4px 5px 4px
|
241 |
-
}
|
242 |
-
|
243 |
-
.select2-container--default .select2-selection--multiple {
|
244 |
-
background-color : #fff;
|
245 |
-
border : 1px solid #aaa;
|
246 |
-
cursor : text;
|
247 |
-
}
|
248 |
-
|
249 |
-
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
250 |
-
-webkit-box-sizing : border-box;
|
251 |
-
box-sizing : border-box;
|
252 |
-
list-style : none;
|
253 |
-
margin : 0;
|
254 |
-
padding : 0 5px;
|
255 |
-
width : 100%
|
256 |
-
}
|
257 |
-
|
258 |
-
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
259 |
-
list-style : none;
|
260 |
-
margin : 5px 5px 0 0
|
261 |
-
}
|
262 |
-
|
263 |
-
.select2-container--default .select2-selection--multiple .select2-selection__rendered li:before {
|
264 |
-
content : '';
|
265 |
-
display : none
|
266 |
-
}
|
267 |
-
|
268 |
-
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
269 |
-
color : #999;
|
270 |
-
margin-top : 5px;
|
271 |
-
float : left
|
272 |
-
}
|
273 |
-
|
274 |
-
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
275 |
-
cursor : pointer;
|
276 |
-
float : right;
|
277 |
-
font-weight : 700;
|
278 |
-
margin-top : 5px;
|
279 |
-
margin-right : 10px
|
280 |
-
}
|
281 |
-
|
282 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
283 |
-
background-color : #e4e4e4;
|
284 |
-
border : 1px solid #aaa;
|
285 |
-
border-radius : 4px;
|
286 |
-
cursor : default;
|
287 |
-
float : left;
|
288 |
-
margin-right : 5px;
|
289 |
-
margin-top : 5px;
|
290 |
-
padding : 0 5px
|
291 |
-
}
|
292 |
-
|
293 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
294 |
-
color : #999;
|
295 |
-
cursor : pointer;
|
296 |
-
display : inline-block;
|
297 |
-
font-weight : 700;
|
298 |
-
margin-right : 2px
|
299 |
-
}
|
300 |
-
|
301 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
302 |
-
color : #333
|
303 |
-
}
|
304 |
-
|
305 |
-
.select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline, .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__placeholder {
|
306 |
-
float : right
|
307 |
-
}
|
308 |
-
|
309 |
-
.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
310 |
-
margin-left : 5px;
|
311 |
-
margin-right : auto
|
312 |
-
}
|
313 |
-
|
314 |
-
.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove {
|
315 |
-
margin-left : 2px;
|
316 |
-
margin-right : auto
|
317 |
-
}
|
318 |
-
|
319 |
-
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
320 |
-
border : solid #000 1px;
|
321 |
-
outline : 0
|
322 |
-
}
|
323 |
-
|
324 |
-
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
325 |
-
background-color : #eee;
|
326 |
-
cursor : default
|
327 |
-
}
|
328 |
-
|
329 |
-
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
330 |
-
display : none
|
331 |
-
}
|
332 |
-
|
333 |
-
.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple, .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
|
334 |
-
border-top-left-radius : 0;
|
335 |
-
border-top-right-radius : 0
|
336 |
-
}
|
337 |
-
|
338 |
-
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple, .select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
|
339 |
-
border-bottom-left-radius : 0;
|
340 |
-
border-bottom-right-radius : 0
|
341 |
-
}
|
342 |
-
|
343 |
-
.select2-container--default .select2-search--dropdown .select2-search__field {
|
344 |
-
border : 1px solid #aaa
|
345 |
-
}
|
346 |
-
|
347 |
-
.select2-container--default .select2-search--inline .select2-search__field {
|
348 |
-
background : 0 0;
|
349 |
-
border : none;
|
350 |
-
outline : 0;
|
351 |
-
-webkit-box-shadow : none;
|
352 |
-
box-shadow : none;
|
353 |
-
-webkit-appearance : textfield
|
354 |
-
}
|
355 |
-
|
356 |
-
.select2-container--default .select2-results > .select2-results__options {
|
357 |
-
max-height : 200px;
|
358 |
-
overflow-y : auto
|
359 |
-
}
|
360 |
-
|
361 |
-
.select2-container--default .select2-results__option[role=group] {
|
362 |
-
padding : 0
|
363 |
-
}
|
364 |
-
|
365 |
-
.select2-container--default .select2-results__option[aria-disabled=true] {
|
366 |
-
color : #999
|
367 |
-
}
|
368 |
-
|
369 |
-
.select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option[data-selected=true] {
|
370 |
-
background-color : #ddd
|
371 |
-
}
|
372 |
-
|
373 |
-
.select2-container--default .select2-results__option .select2-results__option {
|
374 |
-
padding-left : 1em
|
375 |
-
}
|
376 |
-
|
377 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
378 |
-
padding-left : 0
|
379 |
-
}
|
380 |
-
|
381 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
382 |
-
margin-left : -1em;
|
383 |
-
padding-left : 2em
|
384 |
-
}
|
385 |
-
|
386 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
387 |
-
margin-left : -2em;
|
388 |
-
padding-left : 3em
|
389 |
-
}
|
390 |
-
|
391 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
392 |
-
margin-left : -3em;
|
393 |
-
padding-left : 4em
|
394 |
-
}
|
395 |
-
|
396 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
397 |
-
margin-left : -4em;
|
398 |
-
padding-left : 5em
|
399 |
-
}
|
400 |
-
|
401 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
402 |
-
margin-left : -5em;
|
403 |
-
padding-left : 6em
|
404 |
-
}
|
405 |
-
|
406 |
-
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] {
|
407 |
-
background-color : #0073aa;
|
408 |
-
color : #fff
|
409 |
-
}
|
410 |
-
|
411 |
-
.select2-container--default .select2-results__group {
|
412 |
-
cursor : default;
|
413 |
-
display : block;
|
414 |
-
padding : 6px
|
415 |
-
}
|
416 |
-
|
417 |
-
.select2-container--classic .select2-selection--single {
|
418 |
-
background-color : #f7f7f7;
|
419 |
-
border : 1px solid #aaa;
|
420 |
-
border-radius : 4px;
|
421 |
-
outline : 0;
|
422 |
-
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #fff), to(#eee));
|
423 |
-
background-image : -webkit-linear-gradient(top, #fff 50%, #eee 100%);
|
424 |
-
background-image : linear-gradient(to bottom, #fff 50%, #eee 100%);
|
425 |
-
background-repeat : repeat-x
|
426 |
-
}
|
427 |
-
|
428 |
-
.select2-container--classic .select2-selection--single:focus {
|
429 |
-
border : 1px solid #0073aa
|
430 |
-
}
|
431 |
-
|
432 |
-
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
433 |
-
color : #444;
|
434 |
-
line-height : 28px
|
435 |
-
}
|
436 |
-
|
437 |
-
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
438 |
-
cursor : pointer;
|
439 |
-
float : right;
|
440 |
-
font-weight : 700;
|
441 |
-
margin-right : 10px
|
442 |
-
}
|
443 |
-
|
444 |
-
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
445 |
-
color : #999
|
446 |
-
}
|
447 |
-
|
448 |
-
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
449 |
-
background-color : #ddd;
|
450 |
-
border : none;
|
451 |
-
border-left : 1px solid #aaa;
|
452 |
-
border-top-right-radius : 4px;
|
453 |
-
border-bottom-right-radius : 4px;
|
454 |
-
height : 26px;
|
455 |
-
position : absolute;
|
456 |
-
top : 1px;
|
457 |
-
right : 1px;
|
458 |
-
width : 20px;
|
459 |
-
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#ccc));
|
460 |
-
background-image : -webkit-linear-gradient(top, #eee 50%, #ccc 100%);
|
461 |
-
background-image : linear-gradient(to bottom, #eee 50%, #ccc 100%);
|
462 |
-
background-repeat : repeat-x
|
463 |
-
}
|
464 |
-
|
465 |
-
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
466 |
-
border-color : #888 transparent transparent transparent;
|
467 |
-
border-style : solid;
|
468 |
-
border-width : 5px 4px 0 4px;
|
469 |
-
height : 0;
|
470 |
-
left : 50%;
|
471 |
-
margin-left : -4px;
|
472 |
-
margin-top : -2px;
|
473 |
-
position : absolute;
|
474 |
-
top : 50%;
|
475 |
-
width : 0
|
476 |
-
}
|
477 |
-
|
478 |
-
.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear {
|
479 |
-
float : left
|
480 |
-
}
|
481 |
-
|
482 |
-
.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow {
|
483 |
-
border : none;
|
484 |
-
border-right : 1px solid #aaa;
|
485 |
-
border-radius : 0;
|
486 |
-
border-top-left-radius : 4px;
|
487 |
-
border-bottom-left-radius : 4px;
|
488 |
-
left : 1px;
|
489 |
-
right : auto
|
490 |
-
}
|
491 |
-
|
492 |
-
.select2-container--classic.select2-container--open .select2-selection--single {
|
493 |
-
border : 1px solid #0073aa
|
494 |
-
}
|
495 |
-
|
496 |
-
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
497 |
-
background : 0 0;
|
498 |
-
border : none
|
499 |
-
}
|
500 |
-
|
501 |
-
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
502 |
-
border-color : transparent transparent #888 transparent;
|
503 |
-
border-width : 0 4px 5px 4px
|
504 |
-
}
|
505 |
-
|
506 |
-
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
507 |
-
border-top : none;
|
508 |
-
border-top-left-radius : 0;
|
509 |
-
border-top-right-radius : 0;
|
510 |
-
background-image : -webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, #eee));
|
511 |
-
background-image : -webkit-linear-gradient(top, #fff 0, #eee 50%);
|
512 |
-
background-image : linear-gradient(to bottom, #fff 0, #eee 50%);
|
513 |
-
background-repeat : repeat-x
|
514 |
-
}
|
515 |
-
|
516 |
-
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
517 |
-
border-bottom : none;
|
518 |
-
border-bottom-left-radius : 0;
|
519 |
-
border-bottom-right-radius : 0;
|
520 |
-
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(white));
|
521 |
-
background-image : -webkit-linear-gradient(top, #eee 50%, #fff 100%);
|
522 |
-
background-image : linear-gradient(to bottom, #eee 50%, #fff 100%);
|
523 |
-
background-repeat : repeat-x
|
524 |
-
}
|
525 |
-
|
526 |
-
.select2-container--classic .select2-selection--multiple {
|
527 |
-
background-color : #fff;
|
528 |
-
border : 1px solid #aaa;
|
529 |
-
border-radius : 4px;
|
530 |
-
cursor : text;
|
531 |
-
outline : 0
|
532 |
-
}
|
533 |
-
|
534 |
-
.select2-container--classic .select2-selection--multiple:focus {
|
535 |
-
border : 1px solid #0073aa
|
536 |
-
}
|
537 |
-
|
538 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
539 |
-
list-style : none;
|
540 |
-
margin : 0;
|
541 |
-
padding : 0 5px
|
542 |
-
}
|
543 |
-
|
544 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
545 |
-
display : none
|
546 |
-
}
|
547 |
-
|
548 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
549 |
-
background-color : #e4e4e4;
|
550 |
-
border : 1px solid #aaa;
|
551 |
-
border-radius : 4px;
|
552 |
-
cursor : default;
|
553 |
-
float : left;
|
554 |
-
margin-right : 5px;
|
555 |
-
margin-top : 5px;
|
556 |
-
padding : 0 5px
|
557 |
-
}
|
558 |
-
|
559 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
560 |
-
color : #888;
|
561 |
-
cursor : pointer;
|
562 |
-
display : inline-block;
|
563 |
-
font-weight : 700;
|
564 |
-
margin-right : 2px
|
565 |
-
}
|
566 |
-
|
567 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
568 |
-
color : #555
|
569 |
-
}
|
570 |
-
|
571 |
-
.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
572 |
-
float : right
|
573 |
-
}
|
574 |
-
|
575 |
-
.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
576 |
-
margin-left : 5px;
|
577 |
-
margin-right : auto
|
578 |
-
}
|
579 |
-
|
580 |
-
.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove {
|
581 |
-
margin-left : 2px;
|
582 |
-
margin-right : auto
|
583 |
-
}
|
584 |
-
|
585 |
-
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
586 |
-
border : 1px solid #0073aa
|
587 |
-
}
|
588 |
-
|
589 |
-
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
590 |
-
border-top : none;
|
591 |
-
border-top-left-radius : 0;
|
592 |
-
border-top-right-radius : 0
|
593 |
-
}
|
594 |
-
|
595 |
-
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
596 |
-
border-bottom : none;
|
597 |
-
border-bottom-left-radius : 0;
|
598 |
-
border-bottom-right-radius : 0
|
599 |
-
}
|
600 |
-
|
601 |
-
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
602 |
-
border : 1px solid #aaa;
|
603 |
-
outline : 0
|
604 |
-
}
|
605 |
-
|
606 |
-
.select2-container--classic .select2-search--inline .select2-search__field {
|
607 |
-
outline : 0;
|
608 |
-
-webkit-box-shadow : none;
|
609 |
-
box-shadow : none
|
610 |
-
}
|
611 |
-
|
612 |
-
.select2-container--classic .select2-dropdown {
|
613 |
-
background-color : #fff;
|
614 |
-
border : 1px solid transparent
|
615 |
-
}
|
616 |
-
|
617 |
-
.select2-container--classic .select2-dropdown--above {
|
618 |
-
border-bottom : none
|
619 |
-
}
|
620 |
-
|
621 |
-
.select2-container--classic .select2-dropdown--below {
|
622 |
-
border-top : none
|
623 |
-
}
|
624 |
-
|
625 |
-
.select2-container--classic .select2-results > .select2-results__options {
|
626 |
-
max-height : 200px;
|
627 |
-
overflow-y : auto
|
628 |
-
}
|
629 |
-
|
630 |
-
.select2-container--classic .select2-results__option[role=group] {
|
631 |
-
padding : 0
|
632 |
-
}
|
633 |
-
|
634 |
-
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
635 |
-
color : grey
|
636 |
-
}
|
637 |
-
|
638 |
-
.select2-container--classic .select2-results__option--highlighted[aria-selected], .select2-container--classic .select2-results__option--highlighted[data-selected] {
|
639 |
-
background-color : #3875d7;
|
640 |
-
color : #fff
|
641 |
-
}
|
642 |
-
|
643 |
-
.select2-container--classic .select2-results__group {
|
644 |
-
cursor : default;
|
645 |
-
display : block;
|
646 |
-
padding : 6px
|
647 |
-
}
|
648 |
-
|
649 |
-
.select2-container--classic.select2-container--open .select2-dropdown {
|
650 |
-
border-color : #0073aa
|
651 |
-
}
|
652 |
-
|
653 |
-
|
654 |
-
.select2-drop, .select2-dropdown {
|
655 |
-
z-index : 999999 !important
|
656 |
-
}
|
657 |
-
|
658 |
-
.select2-results {
|
659 |
-
line-height : 1.5em
|
660 |
-
}
|
661 |
-
|
662 |
-
.select2-results .select2-results__group, .select2-results .select2-results__option {
|
663 |
-
margin : 0;
|
664 |
-
padding : 8px
|
665 |
-
}
|
666 |
-
|
667 |
-
.select2-results .description {
|
668 |
-
display : block;
|
669 |
-
color : #999;
|
670 |
-
padding-top : 4px
|
671 |
-
}
|
672 |
-
|
673 |
-
.select2-dropdown {
|
674 |
-
border-color : #ddd
|
675 |
-
}
|
676 |
-
|
677 |
-
.select2-dropdown--below {
|
678 |
-
-webkit-box-shadow : 0 1px 1px rgba(0, 0, 0, .1);
|
679 |
-
box-shadow : 0 1px 1px rgba(0, 0, 0, .1)
|
680 |
-
}
|
681 |
-
|
682 |
-
.select2-dropdown--above {
|
683 |
-
-webkit-box-shadow : 0 -1px 1px rgba(0, 0, 0, .1);
|
684 |
-
box-shadow : 0 -1px 1px rgba(0, 0, 0, .1)
|
685 |
-
}
|
686 |
-
|
687 |
-
.select2-container .select2-selection__rendered.ui-sortable li {
|
688 |
-
cursor : move
|
689 |
-
}
|
690 |
-
|
691 |
-
.select2-container .select2-selection {
|
692 |
-
border-color : #ddd
|
693 |
-
}
|
694 |
-
|
695 |
-
.select2-container .select2-search__field {
|
696 |
-
min-width : 150px
|
697 |
-
}
|
698 |
-
|
699 |
-
.select2-container .select2-selection--single {
|
700 |
-
height : 32px
|
701 |
-
}
|
702 |
-
|
703 |
-
.select2-container .select2-selection--single .select2-selection__rendered {
|
704 |
-
line-height : 32px;
|
705 |
-
padding-right : 24px
|
706 |
-
}
|
707 |
-
|
708 |
-
.select2-container .select2-selection--single .select2-selection__arrow {
|
709 |
-
right : 3px;
|
710 |
-
height : 30px
|
711 |
-
}
|
712 |
-
|
713 |
-
.select2-container .select2-selection--multiple {
|
714 |
-
min-height : 28px;
|
715 |
-
border-radius : 0;
|
716 |
-
line-height : 1.5
|
717 |
-
}
|
718 |
-
|
719 |
-
.select2-container .select2-selection--multiple li {
|
720 |
-
margin : 0
|
721 |
-
}
|
722 |
-
|
723 |
-
.select2-container .select2-selection--multiple .select2-selection__choice {
|
724 |
-
padding : 2px 6px
|
725 |
-
}
|
726 |
-
|
727 |
-
.select2-container .select2-selection--multiple .select2-selection__choice .description {
|
728 |
-
display : none
|
729 |
-
}
|
730 |
-
|
731 |
-
.select2-container .select2-selection__clear {
|
732 |
-
color : #999;
|
733 |
-
margin-top : -1px
|
734 |
-
}
|
735 |
-
|
736 |
-
.select2-container .select2-search--inline .select2-search__field {
|
737 |
-
font-family : inherit;
|
738 |
-
font-size : inherit;
|
739 |
-
font-weight : inherit;
|
740 |
-
padding : 3px 0
|
741 |
}
|
1 |
+
.select2-container {
|
2 |
+
-webkit-box-sizing : border-box;
|
3 |
+
box-sizing : border-box;
|
4 |
+
display : inline-block;
|
5 |
+
margin : 0;
|
6 |
+
position : relative;
|
7 |
+
vertical-align : middle
|
8 |
+
}
|
9 |
+
|
10 |
+
.select2-container .select2-selection--single {
|
11 |
+
-webkit-box-sizing : border-box;
|
12 |
+
box-sizing : border-box;
|
13 |
+
cursor : pointer;
|
14 |
+
display : block;
|
15 |
+
height : 28px;
|
16 |
+
margin : 0 0 -4px;
|
17 |
+
-moz-user-select : none;
|
18 |
+
-ms-user-select : none;
|
19 |
+
user-select : none;
|
20 |
+
-webkit-user-select : none
|
21 |
+
}
|
22 |
+
|
23 |
+
.select2-container .select2-selection--single .select2-selection__rendered {
|
24 |
+
display : block;
|
25 |
+
padding-left : 8px;
|
26 |
+
padding-right : 20px;
|
27 |
+
overflow : hidden;
|
28 |
+
text-overflow : ellipsis;
|
29 |
+
white-space : nowrap
|
30 |
+
}
|
31 |
+
|
32 |
+
.select2-container .select2-selection--single .select2-selection__clear {
|
33 |
+
position : relative
|
34 |
+
}
|
35 |
+
|
36 |
+
.select2-container[dir=rtl] .select2-selection--single .select2-selection__rendered {
|
37 |
+
padding-right : 8px;
|
38 |
+
padding-left : 20px
|
39 |
+
}
|
40 |
+
|
41 |
+
.select2-container .select2-selection--multiple {
|
42 |
+
-webkit-box-sizing : border-box;
|
43 |
+
box-sizing : border-box;
|
44 |
+
cursor : pointer;
|
45 |
+
display : block;
|
46 |
+
min-height : 32px;
|
47 |
+
-moz-user-select : none;
|
48 |
+
-ms-user-select : none;
|
49 |
+
user-select : none;
|
50 |
+
-webkit-user-select : none
|
51 |
+
}
|
52 |
+
|
53 |
+
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
54 |
+
display : inline-block;
|
55 |
+
overflow : hidden;
|
56 |
+
padding-left : 8px;
|
57 |
+
text-overflow : ellipsis;
|
58 |
+
white-space : nowrap
|
59 |
+
}
|
60 |
+
|
61 |
+
.select2-container .select2-search--inline {
|
62 |
+
float : left;
|
63 |
+
padding : 0
|
64 |
+
}
|
65 |
+
|
66 |
+
.select2-container .select2-search--inline .select2-search__field {
|
67 |
+
-webkit-box-sizing : border-box;
|
68 |
+
box-sizing : border-box;
|
69 |
+
border : none;
|
70 |
+
font-size : 100%;
|
71 |
+
margin : 0;
|
72 |
+
padding : 0
|
73 |
+
}
|
74 |
+
|
75 |
+
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
76 |
+
-webkit-appearance : none
|
77 |
+
}
|
78 |
+
|
79 |
+
.select2-dropdown {
|
80 |
+
background-color : #fff;
|
81 |
+
border : 1px solid #aaa;
|
82 |
+
border-radius : 4px;
|
83 |
+
-webkit-box-sizing : border-box;
|
84 |
+
box-sizing : border-box;
|
85 |
+
display : block;
|
86 |
+
position : absolute;
|
87 |
+
left : -100000px;
|
88 |
+
width : 100%;
|
89 |
+
z-index : 1051
|
90 |
+
}
|
91 |
+
|
92 |
+
.select2-results {
|
93 |
+
display : block
|
94 |
+
}
|
95 |
+
|
96 |
+
.select2-results__options {
|
97 |
+
list-style : none;
|
98 |
+
margin : 0;
|
99 |
+
padding : 0
|
100 |
+
}
|
101 |
+
|
102 |
+
.select2-results__option {
|
103 |
+
padding : 6px;
|
104 |
+
-moz-user-select : none;
|
105 |
+
-ms-user-select : none;
|
106 |
+
user-select : none;
|
107 |
+
-webkit-user-select : none
|
108 |
+
}
|
109 |
+
|
110 |
+
.select2-results__option[aria-selected], .select2-results__option[data-selected] {
|
111 |
+
cursor : pointer
|
112 |
+
}
|
113 |
+
|
114 |
+
.select2-container--open .select2-dropdown {
|
115 |
+
left : 0
|
116 |
+
}
|
117 |
+
|
118 |
+
.select2-container--open .select2-dropdown--above {
|
119 |
+
border-bottom : none;
|
120 |
+
border-bottom-left-radius : 0;
|
121 |
+
border-bottom-right-radius : 0
|
122 |
+
}
|
123 |
+
|
124 |
+
.select2-container--open .select2-dropdown--below {
|
125 |
+
border-top : none;
|
126 |
+
border-top-left-radius : 0;
|
127 |
+
border-top-right-radius : 0
|
128 |
+
}
|
129 |
+
|
130 |
+
.select2-search--dropdown {
|
131 |
+
display : block;
|
132 |
+
padding : 4px
|
133 |
+
}
|
134 |
+
|
135 |
+
.select2-search--dropdown .select2-search__field {
|
136 |
+
padding : 4px;
|
137 |
+
width : 100%;
|
138 |
+
-webkit-box-sizing : border-box;
|
139 |
+
box-sizing : border-box
|
140 |
+
}
|
141 |
+
|
142 |
+
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
143 |
+
-webkit-appearance : none
|
144 |
+
}
|
145 |
+
|
146 |
+
.select2-search--dropdown.select2-search--hide {
|
147 |
+
display : none
|
148 |
+
}
|
149 |
+
|
150 |
+
.select2-close-mask {
|
151 |
+
border : 0;
|
152 |
+
margin : 0;
|
153 |
+
padding : 0;
|
154 |
+
display : block;
|
155 |
+
position : fixed;
|
156 |
+
left : 0;
|
157 |
+
top : 0;
|
158 |
+
min-height : 100%;
|
159 |
+
min-width : 100%;
|
160 |
+
height : auto;
|
161 |
+
width : auto;
|
162 |
+
opacity : 0;
|
163 |
+
z-index : 99;
|
164 |
+
background-color : #fff
|
165 |
+
}
|
166 |
+
|
167 |
+
.select2-hidden-accessible {
|
168 |
+
border : 0 !important;
|
169 |
+
clip : rect(0 0 0 0) !important;
|
170 |
+
height : 1px !important;
|
171 |
+
margin : -1px !important;
|
172 |
+
overflow : hidden !important;
|
173 |
+
padding : 0 !important;
|
174 |
+
position : absolute !important;
|
175 |
+
width : 1px !important
|
176 |
+
}
|
177 |
+
|
178 |
+
.select2-container--default .select2-selection--single {
|
179 |
+
background-color : #fff;
|
180 |
+
border : 1px solid #aaa;
|
181 |
+
border-radius : 4px
|
182 |
+
}
|
183 |
+
|
184 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
185 |
+
color : #444;
|
186 |
+
line-height : 28px
|
187 |
+
}
|
188 |
+
|
189 |
+
.select2-container--default .select2-selection--single .select2-selection__clear {
|
190 |
+
cursor : pointer;
|
191 |
+
float : right;
|
192 |
+
font-weight : 700
|
193 |
+
}
|
194 |
+
|
195 |
+
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
196 |
+
color : #999
|
197 |
+
}
|
198 |
+
|
199 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
200 |
+
height : 26px;
|
201 |
+
position : absolute;
|
202 |
+
top : 1px;
|
203 |
+
right : 1px;
|
204 |
+
width : 20px
|
205 |
+
}
|
206 |
+
|
207 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
208 |
+
border-color : #888 transparent transparent transparent;
|
209 |
+
border-style : solid;
|
210 |
+
border-width : 5px 4px 0 4px;
|
211 |
+
height : 0;
|
212 |
+
left : 50%;
|
213 |
+
margin-left : -4px;
|
214 |
+
margin-top : -2px;
|
215 |
+
position : absolute;
|
216 |
+
top : 50%;
|
217 |
+
width : 0
|
218 |
+
}
|
219 |
+
|
220 |
+
.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__clear {
|
221 |
+
float : left
|
222 |
+
}
|
223 |
+
|
224 |
+
.select2-container--default[dir=rtl] .select2-selection--single .select2-selection__arrow {
|
225 |
+
left : 1px;
|
226 |
+
right : auto
|
227 |
+
}
|
228 |
+
|
229 |
+
.select2-container--default.select2-container--disabled .select2-selection--single {
|
230 |
+
background-color : #eee;
|
231 |
+
cursor : default
|
232 |
+
}
|
233 |
+
|
234 |
+
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
235 |
+
display : none
|
236 |
+
}
|
237 |
+
|
238 |
+
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
239 |
+
border-color : transparent transparent #888 transparent;
|
240 |
+
border-width : 0 4px 5px 4px
|
241 |
+
}
|
242 |
+
|
243 |
+
.select2-container--default .select2-selection--multiple {
|
244 |
+
background-color : #fff;
|
245 |
+
border : 1px solid #aaa;
|
246 |
+
cursor : text;
|
247 |
+
}
|
248 |
+
|
249 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
250 |
+
-webkit-box-sizing : border-box;
|
251 |
+
box-sizing : border-box;
|
252 |
+
list-style : none;
|
253 |
+
margin : 0;
|
254 |
+
padding : 0 5px;
|
255 |
+
width : 100%
|
256 |
+
}
|
257 |
+
|
258 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
259 |
+
list-style : none;
|
260 |
+
margin : 5px 5px 0 0
|
261 |
+
}
|
262 |
+
|
263 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li:before {
|
264 |
+
content : '';
|
265 |
+
display : none
|
266 |
+
}
|
267 |
+
|
268 |
+
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
269 |
+
color : #999;
|
270 |
+
margin-top : 5px;
|
271 |
+
float : left
|
272 |
+
}
|
273 |
+
|
274 |
+
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
275 |
+
cursor : pointer;
|
276 |
+
float : right;
|
277 |
+
font-weight : 700;
|
278 |
+
margin-top : 5px;
|
279 |
+
margin-right : 10px
|
280 |
+
}
|
281 |
+
|
282 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
283 |
+
background-color : #e4e4e4;
|
284 |
+
border : 1px solid #aaa;
|
285 |
+
border-radius : 4px;
|
286 |
+
cursor : default;
|
287 |
+
float : left;
|
288 |
+
margin-right : 5px;
|
289 |
+
margin-top : 5px;
|
290 |
+
padding : 0 5px
|
291 |
+
}
|
292 |
+
|
293 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
294 |
+
color : #999;
|
295 |
+
cursor : pointer;
|
296 |
+
display : inline-block;
|
297 |
+
font-weight : 700;
|
298 |
+
margin-right : 2px
|
299 |
+
}
|
300 |
+
|
301 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
302 |
+
color : #333
|
303 |
+
}
|
304 |
+
|
305 |
+
.select2-container--default[dir=rtl] .select2-selection--multiple .select2-search--inline, .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__placeholder {
|
306 |
+
float : right
|
307 |
+
}
|
308 |
+
|
309 |
+
.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
310 |
+
margin-left : 5px;
|
311 |
+
margin-right : auto
|
312 |
+
}
|
313 |
+
|
314 |
+
.select2-container--default[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove {
|
315 |
+
margin-left : 2px;
|
316 |
+
margin-right : auto
|
317 |
+
}
|
318 |
+
|
319 |
+
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
320 |
+
border : solid #000 1px;
|
321 |
+
outline : 0
|
322 |
+
}
|
323 |
+
|
324 |
+
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
325 |
+
background-color : #eee;
|
326 |
+
cursor : default
|
327 |
+
}
|
328 |
+
|
329 |
+
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
330 |
+
display : none
|
331 |
+
}
|
332 |
+
|
333 |
+
.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple, .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
|
334 |
+
border-top-left-radius : 0;
|
335 |
+
border-top-right-radius : 0
|
336 |
+
}
|
337 |
+
|
338 |
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple, .select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
|
339 |
+
border-bottom-left-radius : 0;
|
340 |
+
border-bottom-right-radius : 0
|
341 |
+
}
|
342 |
+
|
343 |
+
.select2-container--default .select2-search--dropdown .select2-search__field {
|
344 |
+
border : 1px solid #aaa
|
345 |
+
}
|
346 |
+
|
347 |
+
.select2-container--default .select2-search--inline .select2-search__field {
|
348 |
+
background : 0 0;
|
349 |
+
border : none;
|
350 |
+
outline : 0;
|
351 |
+
-webkit-box-shadow : none;
|
352 |
+
box-shadow : none;
|
353 |
+
-webkit-appearance : textfield
|
354 |
+
}
|
355 |
+
|
356 |
+
.select2-container--default .select2-results > .select2-results__options {
|
357 |
+
max-height : 200px;
|
358 |
+
overflow-y : auto
|
359 |
+
}
|
360 |
+
|
361 |
+
.select2-container--default .select2-results__option[role=group] {
|
362 |
+
padding : 0
|
363 |
+
}
|
364 |
+
|
365 |
+
.select2-container--default .select2-results__option[aria-disabled=true] {
|
366 |
+
color : #999
|
367 |
+
}
|
368 |
+
|
369 |
+
.select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option[data-selected=true] {
|
370 |
+
background-color : #ddd
|
371 |
+
}
|
372 |
+
|
373 |
+
.select2-container--default .select2-results__option .select2-results__option {
|
374 |
+
padding-left : 1em
|
375 |
+
}
|
376 |
+
|
377 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
378 |
+
padding-left : 0
|
379 |
+
}
|
380 |
+
|
381 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
382 |
+
margin-left : -1em;
|
383 |
+
padding-left : 2em
|
384 |
+
}
|
385 |
+
|
386 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
387 |
+
margin-left : -2em;
|
388 |
+
padding-left : 3em
|
389 |
+
}
|
390 |
+
|
391 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
392 |
+
margin-left : -3em;
|
393 |
+
padding-left : 4em
|
394 |
+
}
|
395 |
+
|
396 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
397 |
+
margin-left : -4em;
|
398 |
+
padding-left : 5em
|
399 |
+
}
|
400 |
+
|
401 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
402 |
+
margin-left : -5em;
|
403 |
+
padding-left : 6em
|
404 |
+
}
|
405 |
+
|
406 |
+
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] {
|
407 |
+
background-color : #0073aa;
|
408 |
+
color : #fff
|
409 |
+
}
|
410 |
+
|
411 |
+
.select2-container--default .select2-results__group {
|
412 |
+
cursor : default;
|
413 |
+
display : block;
|
414 |
+
padding : 6px
|
415 |
+
}
|
416 |
+
|
417 |
+
.select2-container--classic .select2-selection--single {
|
418 |
+
background-color : #f7f7f7;
|
419 |
+
border : 1px solid #aaa;
|
420 |
+
border-radius : 4px;
|
421 |
+
outline : 0;
|
422 |
+
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #fff), to(#eee));
|
423 |
+
background-image : -webkit-linear-gradient(top, #fff 50%, #eee 100%);
|
424 |
+
background-image : linear-gradient(to bottom, #fff 50%, #eee 100%);
|
425 |
+
background-repeat : repeat-x
|
426 |
+
}
|
427 |
+
|
428 |
+
.select2-container--classic .select2-selection--single:focus {
|
429 |
+
border : 1px solid #0073aa
|
430 |
+
}
|
431 |
+
|
432 |
+
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
433 |
+
color : #444;
|
434 |
+
line-height : 28px
|
435 |
+
}
|
436 |
+
|
437 |
+
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
438 |
+
cursor : pointer;
|
439 |
+
float : right;
|
440 |
+
font-weight : 700;
|
441 |
+
margin-right : 10px
|
442 |
+
}
|
443 |
+
|
444 |
+
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
445 |
+
color : #999
|
446 |
+
}
|
447 |
+
|
448 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
449 |
+
background-color : #ddd;
|
450 |
+
border : none;
|
451 |
+
border-left : 1px solid #aaa;
|
452 |
+
border-top-right-radius : 4px;
|
453 |
+
border-bottom-right-radius : 4px;
|
454 |
+
height : 26px;
|
455 |
+
position : absolute;
|
456 |
+
top : 1px;
|
457 |
+
right : 1px;
|
458 |
+
width : 20px;
|
459 |
+
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(#ccc));
|
460 |
+
background-image : -webkit-linear-gradient(top, #eee 50%, #ccc 100%);
|
461 |
+
background-image : linear-gradient(to bottom, #eee 50%, #ccc 100%);
|
462 |
+
background-repeat : repeat-x
|
463 |
+
}
|
464 |
+
|
465 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
466 |
+
border-color : #888 transparent transparent transparent;
|
467 |
+
border-style : solid;
|
468 |
+
border-width : 5px 4px 0 4px;
|
469 |
+
height : 0;
|
470 |
+
left : 50%;
|
471 |
+
margin-left : -4px;
|
472 |
+
margin-top : -2px;
|
473 |
+
position : absolute;
|
474 |
+
top : 50%;
|
475 |
+
width : 0
|
476 |
+
}
|
477 |
+
|
478 |
+
.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__clear {
|
479 |
+
float : left
|
480 |
+
}
|
481 |
+
|
482 |
+
.select2-container--classic[dir=rtl] .select2-selection--single .select2-selection__arrow {
|
483 |
+
border : none;
|
484 |
+
border-right : 1px solid #aaa;
|
485 |
+
border-radius : 0;
|
486 |
+
border-top-left-radius : 4px;
|
487 |
+
border-bottom-left-radius : 4px;
|
488 |
+
left : 1px;
|
489 |
+
right : auto
|
490 |
+
}
|
491 |
+
|
492 |
+
.select2-container--classic.select2-container--open .select2-selection--single {
|
493 |
+
border : 1px solid #0073aa
|
494 |
+
}
|
495 |
+
|
496 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
497 |
+
background : 0 0;
|
498 |
+
border : none
|
499 |
+
}
|
500 |
+
|
501 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
502 |
+
border-color : transparent transparent #888 transparent;
|
503 |
+
border-width : 0 4px 5px 4px
|
504 |
+
}
|
505 |
+
|
506 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
507 |
+
border-top : none;
|
508 |
+
border-top-left-radius : 0;
|
509 |
+
border-top-right-radius : 0;
|
510 |
+
background-image : -webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, #eee));
|
511 |
+
background-image : -webkit-linear-gradient(top, #fff 0, #eee 50%);
|
512 |
+
background-image : linear-gradient(to bottom, #fff 0, #eee 50%);
|
513 |
+
background-repeat : repeat-x
|
514 |
+
}
|
515 |
+
|
516 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
517 |
+
border-bottom : none;
|
518 |
+
border-bottom-left-radius : 0;
|
519 |
+
border-bottom-right-radius : 0;
|
520 |
+
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eee), to(white));
|
521 |
+
background-image : -webkit-linear-gradient(top, #eee 50%, #fff 100%);
|
522 |
+
background-image : linear-gradient(to bottom, #eee 50%, #fff 100%);
|
523 |
+
background-repeat : repeat-x
|
524 |
+
}
|
525 |
+
|
526 |
+
.select2-container--classic .select2-selection--multiple {
|
527 |
+
background-color : #fff;
|
528 |
+
border : 1px solid #aaa;
|
529 |
+
border-radius : 4px;
|
530 |
+
cursor : text;
|
531 |
+
outline : 0
|
532 |
+
}
|
533 |
+
|
534 |
+
.select2-container--classic .select2-selection--multiple:focus {
|
535 |
+
border : 1px solid #0073aa
|
536 |
+
}
|
537 |
+
|
538 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
539 |
+
list-style : none;
|
540 |
+
margin : 0;
|
541 |
+
padding : 0 5px
|
542 |
+
}
|
543 |
+
|
544 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
545 |
+
display : none
|
546 |
+
}
|
547 |
+
|
548 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
549 |
+
background-color : #e4e4e4;
|
550 |
+
border : 1px solid #aaa;
|
551 |
+
border-radius : 4px;
|
552 |
+
cursor : default;
|
553 |
+
float : left;
|
554 |
+
margin-right : 5px;
|
555 |
+
margin-top : 5px;
|
556 |
+
padding : 0 5px
|
557 |
+
}
|
558 |
+
|
559 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
560 |
+
color : #888;
|
561 |
+
cursor : pointer;
|
562 |
+
display : inline-block;
|
563 |
+
font-weight : 700;
|
564 |
+
margin-right : 2px
|
565 |
+
}
|
566 |
+
|
567 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
568 |
+
color : #555
|
569 |
+
}
|
570 |
+
|
571 |
+
.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
572 |
+
float : right
|
573 |
+
}
|
574 |
+
|
575 |
+
.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice {
|
576 |
+
margin-left : 5px;
|
577 |
+
margin-right : auto
|
578 |
+
}
|
579 |
+
|
580 |
+
.select2-container--classic[dir=rtl] .select2-selection--multiple .select2-selection__choice__remove {
|
581 |
+
margin-left : 2px;
|
582 |
+
margin-right : auto
|
583 |
+
}
|
584 |
+
|
585 |
+
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
586 |
+
border : 1px solid #0073aa
|
587 |
+
}
|
588 |
+
|
589 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
590 |
+
border-top : none;
|
591 |
+
border-top-left-radius : 0;
|
592 |
+
border-top-right-radius : 0
|
593 |
+
}
|
594 |
+
|
595 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
596 |
+
border-bottom : none;
|
597 |
+
border-bottom-left-radius : 0;
|
598 |
+
border-bottom-right-radius : 0
|
599 |
+
}
|
600 |
+
|
601 |
+
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
602 |
+
border : 1px solid #aaa;
|
603 |
+
outline : 0
|
604 |
+
}
|
605 |
+
|
606 |
+
.select2-container--classic .select2-search--inline .select2-search__field {
|
607 |
+
outline : 0;
|
608 |
+
-webkit-box-shadow : none;
|
609 |
+
box-shadow : none
|
610 |
+
}
|
611 |
+
|
612 |
+
.select2-container--classic .select2-dropdown {
|
613 |
+
background-color : #fff;
|
614 |
+
border : 1px solid transparent
|
615 |
+
}
|
616 |
+
|
617 |
+
.select2-container--classic .select2-dropdown--above {
|
618 |
+
border-bottom : none
|
619 |
+
}
|
620 |
+
|
621 |
+
.select2-container--classic .select2-dropdown--below {
|
622 |
+
border-top : none
|
623 |
+
}
|
624 |
+
|
625 |
+
.select2-container--classic .select2-results > .select2-results__options {
|
626 |
+
max-height : 200px;
|
627 |
+
overflow-y : auto
|
628 |
+
}
|
629 |
+
|
630 |
+
.select2-container--classic .select2-results__option[role=group] {
|
631 |
+
padding : 0
|
632 |
+
}
|
633 |
+
|
634 |
+
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
635 |
+
color : grey
|
636 |
+
}
|
637 |
+
|
638 |
+
.select2-container--classic .select2-results__option--highlighted[aria-selected], .select2-container--classic .select2-results__option--highlighted[data-selected] {
|
639 |
+
background-color : #3875d7;
|
640 |
+
color : #fff
|
641 |
+
}
|
642 |
+
|
643 |
+
.select2-container--classic .select2-results__group {
|
644 |
+
cursor : default;
|
645 |
+
display : block;
|
646 |
+
padding : 6px
|
647 |
+
}
|
648 |
+
|
649 |
+
.select2-container--classic.select2-container--open .select2-dropdown {
|
650 |
+
border-color : #0073aa
|
651 |
+
}
|
652 |
+
|
653 |
+
|
654 |
+
.select2-drop, .select2-dropdown {
|
655 |
+
z-index : 999999 !important
|
656 |
+
}
|
657 |
+
|
658 |
+
.select2-results {
|
659 |
+
line-height : 1.5em
|
660 |
+
}
|
661 |
+
|
662 |
+
.select2-results .select2-results__group, .select2-results .select2-results__option {
|
663 |
+
margin : 0;
|
664 |
+
padding : 8px
|
665 |
+
}
|
666 |
+
|
667 |
+
.select2-results .description {
|
668 |
+
display : block;
|
669 |
+
color : #999;
|
670 |
+
padding-top : 4px
|
671 |
+
}
|
672 |
+
|
673 |
+
.select2-dropdown {
|
674 |
+
border-color : #ddd
|
675 |
+
}
|
676 |
+
|
677 |
+
.select2-dropdown--below {
|
678 |
+
-webkit-box-shadow : 0 1px 1px rgba(0, 0, 0, .1);
|
679 |
+
box-shadow : 0 1px 1px rgba(0, 0, 0, .1)
|
680 |
+
}
|
681 |
+
|
682 |
+
.select2-dropdown--above {
|
683 |
+
-webkit-box-shadow : 0 -1px 1px rgba(0, 0, 0, .1);
|
684 |
+
box-shadow : 0 -1px 1px rgba(0, 0, 0, .1)
|
685 |
+
}
|
686 |
+
|
687 |
+
.select2-container .select2-selection__rendered.ui-sortable li {
|
688 |
+
cursor : move
|
689 |
+
}
|
690 |
+
|
691 |
+
.select2-container .select2-selection {
|
692 |
+
border-color : #ddd
|
693 |
+
}
|
694 |
+
|
695 |
+
.select2-container .select2-search__field {
|
696 |
+
min-width : 150px
|
697 |
+
}
|
698 |
+
|
699 |
+
.select2-container .select2-selection--single {
|
700 |
+
height : 32px
|
701 |
+
}
|
702 |
+
|
703 |
+
.select2-container .select2-selection--single .select2-selection__rendered {
|
704 |
+
line-height : 32px;
|
705 |
+
padding-right : 24px
|
706 |
+
}
|
707 |
+
|
708 |
+
.select2-container .select2-selection--single .select2-selection__arrow {
|
709 |
+
right : 3px;
|
710 |
+
height : 30px
|
711 |
+
}
|
712 |
+
|
713 |
+
.select2-container .select2-selection--multiple {
|
714 |
+
min-height : 28px;
|
715 |
+
border-radius : 0;
|
716 |
+
line-height : 1.5
|
717 |
+
}
|
718 |
+
|
719 |
+
.select2-container .select2-selection--multiple li {
|
720 |
+
margin : 0
|
721 |
+
}
|
722 |
+
|
723 |
+
.select2-container .select2-selection--multiple .select2-selection__choice {
|
724 |
+
padding : 2px 6px
|
725 |
+
}
|
726 |
+
|
727 |
+
.select2-container .select2-selection--multiple .select2-selection__choice .description {
|
728 |
+
display : none
|
729 |
+
}
|
730 |
+
|
731 |
+
.select2-container .select2-selection__clear {
|
732 |
+
color : #999;
|
733 |
+
margin-top : -1px
|
734 |
+
}
|
735 |
+
|
736 |
+
.select2-container .select2-search--inline .select2-search__field {
|
737 |
+
font-family : inherit;
|
738 |
+
font-size : inherit;
|
739 |
+
font-weight : inherit;
|
740 |
+
padding : 3px 0
|
741 |
}
|
plugin-fw/assets/images/arrow_down.svg
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
-
viewBox="0 0 600 600" style="enable-background:new 0 0 600 600;" xml:space="preserve">
|
5 |
-
<style type="text/css">
|
6 |
-
.st0{fill:#d9d9d9;}
|
7 |
-
</style>
|
8 |
-
<polygon class="st0" points="50,200 300.01,449.99 550,200 499.99,150.01 300.01,349.99 99.99,150.01 "/>
|
9 |
-
</svg>
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 600 600" style="enable-background:new 0 0 600 600;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#d9d9d9;}
|
7 |
+
</style>
|
8 |
+
<polygon class="st0" points="50,200 300.01,449.99 550,200 499.99,150.01 300.01,349.99 99.99,150.01 "/>
|
9 |
+
</svg>
|
plugin-fw/assets/js/codemirror/codemirror.js
CHANGED
@@ -1,5799 +1,5799 @@
|
|
1 |
-
// CodeMirror version 3.15
|
2 |
-
//
|
3 |
-
// CodeMirror is the only global var we claim
|
4 |
-
window.CodeMirror = (function() {
|
5 |
-
"use strict";
|
6 |
-
|
7 |
-
// BROWSER SNIFFING
|
8 |
-
|
9 |
-
// Crude, but necessary to handle a number of hard-to-feature-detect
|
10 |
-
// bugs and behavior differences.
|
11 |
-
var gecko = /gecko\/\d/i.test(navigator.userAgent);
|
12 |
-
var ie = /MSIE \d/.test(navigator.userAgent);
|
13 |
-
var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8);
|
14 |
-
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
|
15 |
-
var webkit = /WebKit\//.test(navigator.userAgent);
|
16 |
-
var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
|
17 |
-
var chrome = /Chrome\//.test(navigator.userAgent);
|
18 |
-
var opera = /Opera\//.test(navigator.userAgent);
|
19 |
-
var safari = /Apple Computer/.test(navigator.vendor);
|
20 |
-
var khtml = /KHTML\//.test(navigator.userAgent);
|
21 |
-
var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);
|
22 |
-
var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
|
23 |
-
var phantom = /PhantomJS/.test(navigator.userAgent);
|
24 |
-
|
25 |
-
var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
|
26 |
-
// This is woefully incomplete. Suggestions for alternative methods welcome.
|
27 |
-
var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
|
28 |
-
var mac = ios || /Mac/.test(navigator.platform);
|
29 |
-
var windows = /windows/i.test(navigator.platform);
|
30 |
-
|
31 |
-
var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
|
32 |
-
if (opera_version) opera_version = Number(opera_version[1]);
|
33 |
-
if (opera_version && opera_version >= 15) { opera = false; webkit = true; }
|
34 |
-
// Some browsers use the wrong event properties to signal cmd/ctrl on OS X
|
35 |
-
var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
|
36 |
-
var captureMiddleClick = gecko || (ie && !ie_lt9);
|
37 |
-
|
38 |
-
// Optimize some code when these features are not used
|
39 |
-
var sawReadOnlySpans = false, sawCollapsedSpans = false;
|
40 |
-
|
41 |
-
// CONSTRUCTOR
|
42 |
-
|
43 |
-
function CodeMirror(place, options) {
|
44 |
-
if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
|
45 |
-
|
46 |
-
this.options = options = options || {};
|
47 |
-
// Determine effective options based on given values and defaults.
|
48 |
-
for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt))
|
49 |
-
options[opt] = defaults[opt];
|
50 |
-
setGuttersForLineNumbers(options);
|
51 |
-
|
52 |
-
var docStart = typeof options.value == "string" ? 0 : options.value.first;
|
53 |
-
var display = this.display = makeDisplay(place, docStart);
|
54 |
-
display.wrapper.CodeMirror = this;
|
55 |
-
updateGutters(this);
|
56 |
-
if (options.autofocus && !mobile) focusInput(this);
|
57 |
-
|
58 |
-
this.state = {keyMaps: [],
|
59 |
-
overlays: [],
|
60 |
-
modeGen: 0,
|
61 |
-
overwrite: false, focused: false,
|
62 |
-
suppressEdits: false, pasteIncoming: false,
|
63 |
-
draggingText: false,
|
64 |
-
highlight: new Delayed()};
|
65 |
-
|
66 |
-
themeChanged(this);
|
67 |
-
if (options.lineWrapping)
|
68 |
-
this.display.wrapper.className += " CodeMirror-wrap";
|
69 |
-
|
70 |
-
var doc = options.value;
|
71 |
-
if (typeof doc == "string") doc = new Doc(options.value, options.mode);
|
72 |
-
operation(this, attachDoc)(this, doc);
|
73 |
-
|
74 |
-
// Override magic textarea content restore that IE sometimes does
|
75 |
-
// on our hidden textarea on reload
|
76 |
-
if (ie) setTimeout(bind(resetInput, this, true), 20);
|
77 |
-
|
78 |
-
registerEventHandlers(this);
|
79 |
-
// IE throws unspecified error in certain cases, when
|
80 |
-
// trying to access activeElement before onload
|
81 |
-
var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { }
|
82 |
-
if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20);
|
83 |
-
else onBlur(this);
|
84 |
-
|
85 |
-
operation(this, function() {
|
86 |
-
for (var opt in optionHandlers)
|
87 |
-
if (optionHandlers.propertyIsEnumerable(opt))
|
88 |
-
optionHandlers[opt](this, options[opt], Init);
|
89 |
-
for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
|
90 |
-
})();
|
91 |
-
}
|
92 |
-
|
93 |
-
// DISPLAY CONSTRUCTOR
|
94 |
-
|
95 |
-
function makeDisplay(place, docStart) {
|
96 |
-
var d = {};
|
97 |
-
|
98 |
-
var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");
|
99 |
-
if (webkit) input.style.width = "1000px";
|
100 |
-
else input.setAttribute("wrap", "off");
|
101 |
-
// if border: 0; -- iOS fails to open keyboard (issue #1287)
|
102 |
-
if (ios) input.style.border = "1px solid black";
|
103 |
-
input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
|
104 |
-
|
105 |
-
// Wraps and hides input textarea
|
106 |
-
d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
107 |
-
// The actual fake scrollbars.
|
108 |
-
d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar");
|
109 |
-
d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar");
|
110 |
-
d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
|
111 |
-
d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
|
112 |
-
// DIVs containing the selection and the actual code
|
113 |
-
d.lineDiv = elt("div", null, "CodeMirror-code");
|
114 |
-
d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
|
115 |
-
// Blinky cursor, and element used to ensure cursor fits at the end of a line
|
116 |
-
d.cursor = elt("div", "\u00a0", "CodeMirror-cursor");
|
117 |
-
// Secondary cursor, shown when on a 'jump' in bi-directional text
|
118 |
-
d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor");
|
119 |
-
// Used to measure text size
|
120 |
-
d.measure = elt("div", null, "CodeMirror-measure");
|
121 |
-
// Wraps everything that needs to exist inside the vertically-padded coordinate system
|
122 |
-
d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor],
|
123 |
-
null, "position: relative; outline: none");
|
124 |
-
// Moved around its parent to cover visible view
|
125 |
-
d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
|
126 |
-
// Set to the height of the text, causes scrolling
|
127 |
-
d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
|
128 |
-
// D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers
|
129 |
-
d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;");
|
130 |
-
// Will contain the gutters, if any
|
131 |
-
d.gutters = elt("div", null, "CodeMirror-gutters");
|
132 |
-
d.lineGutter = null;
|
133 |
-
// Provides scrolling
|
134 |
-
d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
|
135 |
-
d.scroller.setAttribute("tabIndex", "-1");
|
136 |
-
// The element in which the editor lives.
|
137 |
-
d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV,
|
138 |
-
d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
|
139 |
-
// Work around IE7 z-index bug
|
140 |
-
if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
|
141 |
-
if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper);
|
142 |
-
|
143 |
-
// Needed to hide big blue blinking cursor on Mobile Safari
|
144 |
-
if (ios) input.style.width = "0px";
|
145 |
-
if (!webkit) d.scroller.draggable = true;
|
146 |
-
// Needed to handle Tab key in KHTML
|
147 |
-
if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
|
148 |
-
// Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
|
149 |
-
else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px";
|
150 |
-
|
151 |
-
// Current visible range (may be bigger than the view window).
|
152 |
-
d.viewOffset = d.lastSizeC = 0;
|
153 |
-
d.showingFrom = d.showingTo = docStart;
|
154 |
-
|
155 |
-
// Used to only resize the line number gutter when necessary (when
|
156 |
-
// the amount of lines crosses a boundary that makes its width change)
|
157 |
-
d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
|
158 |
-
// See readInput and resetInput
|
159 |
-
d.prevInput = "";
|
160 |
-
// Set to true when a non-horizontal-scrolling widget is added. As
|
161 |
-
// an optimization, widget aligning is skipped when d is false.
|
162 |
-
d.alignWidgets = false;
|
163 |
-
// Flag that indicates whether we currently expect input to appear
|
164 |
-
// (after some event like 'keypress' or 'input') and are polling
|
165 |
-
// intensively.
|
166 |
-
d.pollingFast = false;
|
167 |
-
// Self-resetting timeout for the poller
|
168 |
-
d.poll = new Delayed();
|
169 |
-
|
170 |
-
d.cachedCharWidth = d.cachedTextHeight = null;
|
171 |
-
d.measureLineCache = [];
|
172 |
-
d.measureLineCachePos = 0;
|
173 |
-
|
174 |
-
// Tracks when resetInput has punted to just putting a short
|
175 |
-
// string instead of the (large) selection.
|
176 |
-
d.inaccurateSelection = false;
|
177 |
-
|
178 |
-
// Tracks the maximum line length so that the horizontal scrollbar
|
179 |
-
// can be kept static when scrolling.
|
180 |
-
d.maxLine = null;
|
181 |
-
d.maxLineLength = 0;
|
182 |
-
d.maxLineChanged = false;
|
183 |
-
|
184 |
-
// Used for measuring wheel scrolling granularity
|
185 |
-
d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
|
186 |
-
|
187 |
-
return d;
|
188 |
-
}
|
189 |
-
|
190 |
-
// STATE UPDATES
|
191 |
-
|
192 |
-
// Used to get the editor into a consistent state again when options change.
|
193 |
-
|
194 |
-
function loadMode(cm) {
|
195 |
-
cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
|
196 |
-
cm.doc.iter(function(line) {
|
197 |
-
if (line.stateAfter) line.stateAfter = null;
|
198 |
-
if (line.styles) line.styles = null;
|
199 |
-
});
|
200 |
-
cm.doc.frontier = cm.doc.first;
|
201 |
-
startWorker(cm, 100);
|
202 |
-
cm.state.modeGen++;
|
203 |
-
if (cm.curOp) regChange(cm);
|
204 |
-
}
|
205 |
-
|
206 |
-
function wrappingChanged(cm) {
|
207 |
-
if (cm.options.lineWrapping) {
|
208 |
-
cm.display.wrapper.className += " CodeMirror-wrap";
|
209 |
-
cm.display.sizer.style.minWidth = "";
|
210 |
-
} else {
|
211 |
-
cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", "");
|
212 |
-
computeMaxLength(cm);
|
213 |
-
}
|
214 |
-
estimateLineHeights(cm);
|
215 |
-
regChange(cm);
|
216 |
-
clearCaches(cm);
|
217 |
-
setTimeout(function(){updateScrollbars(cm);}, 100);
|
218 |
-
}
|
219 |
-
|
220 |
-
function estimateHeight(cm) {
|
221 |
-
var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
|
222 |
-
var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
|
223 |
-
return function(line) {
|
224 |
-
if (lineIsHidden(cm.doc, line))
|
225 |
-
return 0;
|
226 |
-
else if (wrapping)
|
227 |
-
return (Math.ceil(line.text.length / perLine) || 1) * th;
|
228 |
-
else
|
229 |
-
return th;
|
230 |
-
};
|
231 |
-
}
|
232 |
-
|
233 |
-
function estimateLineHeights(cm) {
|
234 |
-
var doc = cm.doc, est = estimateHeight(cm);
|
235 |
-
doc.iter(function(line) {
|
236 |
-
var estHeight = est(line);
|
237 |
-
if (estHeight != line.height) updateLineHeight(line, estHeight);
|
238 |
-
});
|
239 |
-
}
|
240 |
-
|
241 |
-
function keyMapChanged(cm) {
|
242 |
-
var map = keyMap[cm.options.keyMap], style = map.style;
|
243 |
-
cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
|
244 |
-
(style ? " cm-keymap-" + style : "");
|
245 |
-
cm.state.disableInput = map.disableInput;
|
246 |
-
}
|
247 |
-
|
248 |
-
function themeChanged(cm) {
|
249 |
-
cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
|
250 |
-
cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
|
251 |
-
clearCaches(cm);
|
252 |
-
}
|
253 |
-
|
254 |
-
function guttersChanged(cm) {
|
255 |
-
updateGutters(cm);
|
256 |
-
regChange(cm);
|
257 |
-
setTimeout(function(){alignHorizontally(cm);}, 20);
|
258 |
-
}
|
259 |
-
|
260 |
-
function updateGutters(cm) {
|
261 |
-
var gutters = cm.display.gutters, specs = cm.options.gutters;
|
262 |
-
removeChildren(gutters);
|
263 |
-
for (var i = 0; i < specs.length; ++i) {
|
264 |
-
var gutterClass = specs[i];
|
265 |
-
var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
|
266 |
-
if (gutterClass == "CodeMirror-linenumbers") {
|
267 |
-
cm.display.lineGutter = gElt;
|
268 |
-
gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
|
269 |
-
}
|
270 |
-
}
|
271 |
-
gutters.style.display = i ? "" : "none";
|
272 |
-
}
|
273 |
-
|
274 |
-
function lineLength(doc, line) {
|
275 |
-
if (line.height == 0) return 0;
|
276 |
-
var len = line.text.length, merged, cur = line;
|
277 |
-
while (merged = collapsedSpanAtStart(cur)) {
|
278 |
-
var found = merged.find();
|
279 |
-
cur = getLine(doc, found.from.line);
|
280 |
-
len += found.from.ch - found.to.ch;
|
281 |
-
}
|
282 |
-
cur = line;
|
283 |
-
while (merged = collapsedSpanAtEnd(cur)) {
|
284 |
-
var found = merged.find();
|
285 |
-
len -= cur.text.length - found.from.ch;
|
286 |
-
cur = getLine(doc, found.to.line);
|
287 |
-
len += cur.text.length - found.to.ch;
|
288 |
-
}
|
289 |
-
return len;
|
290 |
-
}
|
291 |
-
|
292 |
-
function computeMaxLength(cm) {
|
293 |
-
var d = cm.display, doc = cm.doc;
|
294 |
-
d.maxLine = getLine(doc, doc.first);
|
295 |
-
d.maxLineLength = lineLength(doc, d.maxLine);
|
296 |
-
d.maxLineChanged = true;
|
297 |
-
doc.iter(function(line) {
|
298 |
-
var len = lineLength(doc, line);
|
299 |
-
if (len > d.maxLineLength) {
|
300 |
-
d.maxLineLength = len;
|
301 |
-
d.maxLine = line;
|
302 |
-
}
|
303 |
-
});
|
304 |
-
}
|
305 |
-
|
306 |
-
// Make sure the gutters options contains the element
|
307 |
-
// "CodeMirror-linenumbers" when the lineNumbers option is true.
|
308 |
-
function setGuttersForLineNumbers(options) {
|
309 |
-
var found = false;
|
310 |
-
for (var i = 0; i < options.gutters.length; ++i) {
|
311 |
-
if (options.gutters[i] == "CodeMirror-linenumbers") {
|
312 |
-
if (options.lineNumbers) found = true;
|
313 |
-
else options.gutters.splice(i--, 1);
|
314 |
-
}
|
315 |
-
}
|
316 |
-
if (!found && options.lineNumbers)
|
317 |
-
options.gutters.push("CodeMirror-linenumbers");
|
318 |
-
}
|
319 |
-
|
320 |
-
// SCROLLBARS
|
321 |
-
|
322 |
-
// Re-synchronize the fake scrollbars with the actual size of the
|
323 |
-
// content. Optionally force a scrollTop.
|
324 |
-
function updateScrollbars(cm) {
|
325 |
-
var d = cm.display, docHeight = cm.doc.height;
|
326 |
-
var totalHeight = docHeight + paddingVert(d);
|
327 |
-
d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
|
328 |
-
d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
|
329 |
-
var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight);
|
330 |
-
var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1);
|
331 |
-
var needsV = scrollHeight > (d.scroller.clientHeight + 1);
|
332 |
-
if (needsV) {
|
333 |
-
d.scrollbarV.style.display = "block";
|
334 |
-
d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
|
335 |
-
d.scrollbarV.firstChild.style.height =
|
336 |
-
(scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
|
337 |
-
} else d.scrollbarV.style.display = "";
|
338 |
-
if (needsH) {
|
339 |
-
d.scrollbarH.style.display = "block";
|
340 |
-
d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0";
|
341 |
-
d.scrollbarH.firstChild.style.width =
|
342 |
-
(d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px";
|
343 |
-
} else d.scrollbarH.style.display = "";
|
344 |
-
if (needsH && needsV) {
|
345 |
-
d.scrollbarFiller.style.display = "block";
|
346 |
-
d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px";
|
347 |
-
} else d.scrollbarFiller.style.display = "";
|
348 |
-
if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
|
349 |
-
d.gutterFiller.style.display = "block";
|
350 |
-
d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px";
|
351 |
-
d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
|
352 |
-
} else d.gutterFiller.style.display = "";
|
353 |
-
|
354 |
-
if (mac_geLion && scrollbarWidth(d.measure) === 0)
|
355 |
-
d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
|
356 |
-
}
|
357 |
-
|
358 |
-
function visibleLines(display, doc, viewPort) {
|
359 |
-
var top = display.scroller.scrollTop, height = display.wrapper.clientHeight;
|
360 |
-
if (typeof viewPort == "number") top =
|
361 |
-
else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;}
|
362 |
-
top = Math.floor(top - paddingTop(display));
|
363 |
-
var bottom = Math.ceil(top + height);
|
364 |
-
return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)};
|
365 |
-
}
|
366 |
-
|
367 |
-
// LINE NUMBERS
|
368 |
-
|
369 |
-
function alignHorizontally(cm) {
|
370 |
-
var display = cm.display;
|
371 |
-
if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;
|
372 |
-
var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
|
373 |
-
var gutterW = display.gutters.offsetWidth, l = comp + "px";
|
374 |
-
for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) {
|
375 |
-
for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l;
|
376 |
-
}
|
377 |
-
if (cm.options.fixedGutter)
|
378 |
-
display.gutters.style.left = (comp + gutterW) + "px";
|
379 |
-
}
|
380 |
-
|
381 |
-
function maybeUpdateLineNumberWidth(cm) {
|
382 |
-
if (!cm.options.lineNumbers) return false;
|
383 |
-
var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
|
384 |
-
if (last.length != display.lineNumChars) {
|
385 |
-
var test = display.measure.appendChild(elt("div", [elt("div", last)],
|
386 |
-
"CodeMirror-linenumber CodeMirror-gutter-elt"));
|
387 |
-
var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
|
388 |
-
display.lineGutter.style.width = "";
|
389 |
-
display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
|
390 |
-
display.lineNumWidth = display.lineNumInnerWidth + padding;
|
391 |
-
display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
|
392 |
-
display.lineGutter.style.width = display.lineNumWidth + "px";
|
393 |
-
return true;
|
394 |
-
}
|
395 |
-
return false;
|
396 |
-
}
|
397 |
-
|
398 |
-
function lineNumberFor(options, i) {
|
399 |
-
return String(options.lineNumberFormatter(i + options.firstLineNumber));
|
400 |
-
}
|
401 |
-
function compensateForHScroll(display) {
|
402 |
-
return getRect(display.scroller).left - getRect(display.sizer).left;
|
403 |
-
}
|
404 |
-
|
405 |
-
// DISPLAY DRAWING
|
406 |
-
|
407 |
-
function updateDisplay(cm, changes, viewPort, forced) {
|
408 |
-
var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated;
|
409 |
-
var visible = visibleLines(cm.display, cm.doc, viewPort);
|
410 |
-
for (;;) {
|
411 |
-
if (!updateDisplayInner(cm, changes, visible, forced)) break;
|
412 |
-
forced = false;
|
413 |
-
updated = true;
|
414 |
-
updateSelection(cm);
|
415 |
-
updateScrollbars(cm);
|
416 |
-
|
417 |
-
// Clip forced viewport to actual scrollable area
|
418 |
-
if (viewPort)
|
419 |
-
viewPort = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight,
|
420 |
-
typeof viewPort == "number" ? viewPort : viewPort.top);
|
421 |
-
visible = visibleLines(cm.display, cm.doc, viewPort);
|
422 |
-
if (visible.from >= cm.display.showingFrom && visible.to <= cm.display.showingTo)
|
423 |
-
break;
|
424 |
-
changes = [];
|
425 |
-
}
|
426 |
-
|
427 |
-
if (updated) {
|
428 |
-
signalLater(cm, "update", cm);
|
429 |
-
if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo)
|
430 |
-
signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo);
|
431 |
-
}
|
432 |
-
return updated;
|
433 |
-
}
|
434 |
-
|
435 |
-
// Uses a set of changes plus the current scroll position to
|
436 |
-
// determine which DOM updates have to be made, and makes the
|
437 |
-
// updates.
|
438 |
-
function updateDisplayInner(cm, changes, visible, forced) {
|
439 |
-
var display = cm.display, doc = cm.doc;
|
440 |
-
if (!display.wrapper.clientWidth) {
|
441 |
-
display.showingFrom = display.showingTo = doc.first;
|
442 |
-
display.viewOffset = 0;
|
443 |
-
return;
|
444 |
-
}
|
445 |
-
|
446 |
-
// Bail out if the visible area is already rendered and nothing changed.
|
447 |
-
if (!forced && changes.length == 0 &&
|
448 |
-
visible.from > display.showingFrom && visible.to < display.showingTo)
|
449 |
-
return;
|
450 |
-
|
451 |
-
if (maybeUpdateLineNumberWidth(cm))
|
452 |
-
changes = [{from: doc.first, to: doc.first + doc.size}];
|
453 |
-
var gutterW = display.sizer.style.marginLeft = display.gutters.offsetWidth + "px";
|
454 |
-
display.scrollbarH.style.left = cm.options.fixedGutter ? gutterW : "0";
|
455 |
-
|
456 |
-
// Used to determine which lines need their line numbers updated
|
457 |
-
var positionsChangedFrom = Infinity;
|
458 |
-
if (cm.options.lineNumbers)
|
459 |
-
for (var i = 0; i < changes.length; ++i)
|
460 |
-
if (changes[i].diff) { positionsChangedFrom = changes[i].from; break; }
|
461 |
-
|
462 |
-
var end = doc.first + doc.size;
|
463 |
-
var from = Math.max(visible.from - cm.options.viewportMargin, doc.first);
|
464 |
-
var to = Math.min(end, visible.to + cm.options.viewportMargin);
|
465 |
-
if (display.showingFrom < from && from - display.showingFrom < 20) from = Math.max(doc.first, display.showingFrom);
|
466 |
-
if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(end, display.showingTo);
|
467 |
-
if (sawCollapsedSpans) {
|
468 |
-
from = lineNo(visualLine(doc, getLine(doc, from)));
|
469 |
-
while (to < end && lineIsHidden(doc, getLine(doc, to))) ++to;
|
470 |
-
}
|
471 |
-
|
472 |
-
// Create a range of theoretically intact lines, and punch holes
|
473 |
-
// in that using the change info.
|
474 |
-
var intact = [{from: Math.max(display.showingFrom, doc.first),
|
475 |
-
to: Math.min(display.showingTo, end)}];
|
476 |
-
if (intact[0].from >= intact[0].to) intact = [];
|
477 |
-
else intact = computeIntact(intact, changes);
|
478 |
-
// When merged lines are present, we might have to reduce the
|
479 |
-
// intact ranges because changes in continued fragments of the
|
480 |
-
// intact lines do require the lines to be redrawn.
|
481 |
-
if (sawCollapsedSpans)
|
482 |
-
for (var i = 0; i < intact.length; ++i) {
|
483 |
-
var range = intact[i], merged;
|
484 |
-
while (merged = collapsedSpanAtEnd(getLine(doc, range.to - 1))) {
|
485 |
-
var newTo = merged.find().from.line;
|
486 |
-
if (newTo > range.from) range.to = newTo;
|
487 |
-
else { intact.splice(i--, 1); break; }
|
488 |
-
}
|
489 |
-
}
|
490 |
-
|
491 |
-
// Clip off the parts that won't be visible
|
492 |
-
var intactLines = 0;
|
493 |
-
for (var i = 0; i < intact.length; ++i) {
|
494 |
-
var range = intact[i];
|
495 |
-
if (range.from < from) range.from = from;
|
496 |
-
if (range.to > to) range.to = to;
|
497 |
-
if (range.from >= range.to) intact.splice(i--, 1);
|
498 |
-
else intactLines += range.to - range.from;
|
499 |
-
}
|
500 |
-
if (!forced && intactLines == to - from && from == display.showingFrom && to == display.showingTo) {
|
501 |
-
updateViewOffset(cm);
|
502 |
-
return;
|
503 |
-
}
|
504 |
-
intact.sort(function(a, b) {return a.from - b.from;});
|
505 |
-
|
506 |
-
// Avoid crashing on IE's "unspecified error" when in iframes
|
507 |
-
try {
|
508 |
-
var focused = document.activeElement;
|
509 |
-
} catch(e) {}
|
510 |
-
if (intactLines < (to - from) * .7) display.lineDiv.style.display = "none";
|
511 |
-
patchDisplay(cm, from, to, intact, positionsChangedFrom);
|
512 |
-
display.lineDiv.style.display = "";
|
513 |
-
if (focused && document.activeElement != focused && focused.offsetHeight) focused.focus();
|
514 |
-
|
515 |
-
var different = from != display.showingFrom || to != display.showingTo ||
|
516 |
-
display.lastSizeC != display.wrapper.clientHeight;
|
517 |
-
// This is just a bogus formula that detects when the editor is
|
518 |
-
// resized or the font size changes.
|
519 |
-
if (different) {
|
520 |
-
display.lastSizeC = display.wrapper.clientHeight;
|
521 |
-
startWorker(cm, 400);
|
522 |
-
}
|
523 |
-
display.showingFrom = from; display.showingTo = to;
|
524 |
-
|
525 |
-
updateHeightsInViewport(cm);
|
526 |
-
updateViewOffset(cm);
|
527 |
-
|
528 |
-
return true;
|
529 |
-
}
|
530 |
-
|
531 |
-
function updateHeightsInViewport(cm) {
|
532 |
-
var display = cm.display;
|
533 |
-
var prevBottom = display.lineDiv.offsetTop;
|
534 |
-
for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) {
|
535 |
-
if (ie_lt8) {
|
536 |
-
var bot = node.offsetTop + node.offsetHeight;
|
537 |
-
height = bot - prevBottom;
|
538 |
-
prevBottom = bot;
|
539 |
-
} else {
|
540 |
-
var box = getRect(node);
|
541 |
-
height = box.bottom - box.top;
|
542 |
-
}
|
543 |
-
var diff = node.lineObj.height - height;
|
544 |
-
if (height < 2) height = textHeight(display);
|
545 |
-
if (diff > .001 || diff < -.001) {
|
546 |
-
updateLineHeight(node.lineObj, height);
|
547 |
-
var widgets = node.lineObj.widgets;
|
548 |
-
if (widgets) for (var i = 0; i < widgets.length; ++i)
|
549 |
-
widgets[i].height = widgets[i].node.offsetHeight;
|
550 |
-
}
|
551 |
-
}
|
552 |
-
}
|
553 |
-
|
554 |
-
function updateViewOffset(cm) {
|
555 |
-
var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom));
|
556 |
-
// Position the mover div to align with the current virtual scroll position
|
557 |
-
cm.display.mover.style.top = off + "px";
|
558 |
-
}
|
559 |
-
|
560 |
-
function computeIntact(intact, changes) {
|
561 |
-
for (var i = 0, l = changes.length || 0; i < l; ++i) {
|
562 |
-
var change = changes[i], intact2 = [], diff = change.diff || 0;
|
563 |
-
for (var j = 0, l2 = intact.length; j < l2; ++j) {
|
564 |
-
var range = intact[j];
|
565 |
-
if (change.to <= range.from && change.diff) {
|
566 |
-
intact2.push({from: range.from + diff, to: range.to + diff});
|
567 |
-
} else if (change.to <= range.from || change.from >= range.to) {
|
568 |
-
intact2.push(range);
|
569 |
-
} else {
|
570 |
-
if (change.from > range.from)
|
571 |
-
intact2.push({from: range.from, to: change.from});
|
572 |
-
if (change.to < range.to)
|
573 |
-
intact2.push({from: change.to + diff, to: range.to + diff});
|
574 |
-
}
|
575 |
-
}
|
576 |
-
intact = intact2;
|
577 |
-
}
|
578 |
-
return intact;
|
579 |
-
}
|
580 |
-
|
581 |
-
function getDimensions(cm) {
|
582 |
-
var d = cm.display, left = {}, width = {};
|
583 |
-
for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
|
584 |
-
left[cm.options.gutters[i]] = n.offsetLeft;
|
585 |
-
width[cm.options.gutters[i]] = n.offsetWidth;
|
586 |
-
}
|
587 |
-
return {fixedPos: compensateForHScroll(d),
|
588 |
-
gutterTotalWidth: d.gutters.offsetWidth,
|
589 |
-
gutterLeft: left,
|
590 |
-
gutterWidth: width,
|
591 |
-
wrapperWidth: d.wrapper.clientWidth};
|
592 |
-
}
|
593 |
-
|
594 |
-
function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
|
595 |
-
var dims = getDimensions(cm);
|
596 |
-
var display = cm.display, lineNumbers = cm.options.lineNumbers;
|
597 |
-
if (!intact.length && (!webkit || !cm.display.currentWheelTarget))
|
598 |
-
removeChildren(display.lineDiv);
|
599 |
-
var container = display.lineDiv, cur = container.firstChild;
|
600 |
-
|
601 |
-
function rm(node) {
|
602 |
-
var next = node.nextSibling;
|
603 |
-
if (webkit && mac && cm.display.currentWheelTarget == node) {
|
604 |
-
node.style.display = "none";
|
605 |
-
node.lineObj = null;
|
606 |
-
} else {
|
607 |
-
node.parentNode.removeChild(node);
|
608 |
-
}
|
609 |
-
return next;
|
610 |
-
}
|
611 |
-
|
612 |
-
var nextIntact = intact.shift(), lineN = from;
|
613 |
-
cm.doc.iter(from, to, function(line) {
|
614 |
-
if (nextIntact && nextIntact.to == lineN) nextIntact = intact.shift();
|
615 |
-
if (lineIsHidden(cm.doc, line)) {
|
616 |
-
if (line.height != 0) updateLineHeight(line, 0);
|
617 |
-
if (line.widgets && cur.previousSibling) for (var i = 0; i < line.widgets.length; ++i) {
|
618 |
-
var w = line.widgets[i];
|
619 |
-
if (w.showIfHidden) {
|
620 |
-
var prev = cur.previousSibling;
|
621 |
-
if (/pre/i.test(prev.nodeName)) {
|
622 |
-
var wrap = elt("div", null, null, "position: relative");
|
623 |
-
prev.parentNode.replaceChild(wrap, prev);
|
624 |
-
wrap.appendChild(prev);
|
625 |
-
prev = wrap;
|
626 |
-
}
|
627 |
-
var wnode = prev.appendChild(elt("div", [w.node], "CodeMirror-linewidget"));
|
628 |
-
if (!w.handleMouseEvents) wnode.ignoreEvents = true;
|
629 |
-
positionLineWidget(w, wnode, prev, dims);
|
630 |
-
}
|
631 |
-
}
|
632 |
-
} else if (nextIntact && nextIntact.from <= lineN && nextIntact.to > lineN) {
|
633 |
-
// This line is intact. Skip to the actual node. Update its
|
634 |
-
// line number if needed.
|
635 |
-
while (cur.lineObj != line) cur = rm(cur);
|
636 |
-
if (lineNumbers && updateNumbersFrom <= lineN && cur.lineNumber)
|
637 |
-
setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineN));
|
638 |
-
cur = cur.nextSibling;
|
639 |
-
} else {
|
640 |
-
// For lines with widgets, make an attempt to find and reuse
|
641 |
-
// the existing element, so that widgets aren't needlessly
|
642 |
-
// removed and re-inserted into the dom
|
643 |
-
if (line.widgets) for (var j = 0, search = cur, reuse; search && j < 20; ++j, search = search.nextSibling)
|
644 |
-
if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; }
|
645 |
-
// This line needs to be generated.
|
646 |
-
var lineNode = buildLineElement(cm, line, lineN, dims, reuse);
|
647 |
-
if (lineNode != reuse) {
|
648 |
-
container.insertBefore(lineNode, cur);
|
649 |
-
} else {
|
650 |
-
while (cur != reuse) cur = rm(cur);
|
651 |
-
cur = cur.nextSibling;
|
652 |
-
}
|
653 |
-
|
654 |
-
lineNode.lineObj = line;
|
655 |
-
}
|
656 |
-
++lineN;
|
657 |
-
});
|
658 |
-
while (cur) cur = rm(cur);
|
659 |
-
}
|
660 |
-
|
661 |
-
function buildLineElement(cm, line, lineNo, dims, reuse) {
|
662 |
-
var lineElement = lineContent(cm, line);
|
663 |
-
var markers = line.gutterMarkers, display = cm.display, wrap;
|
664 |
-
|
665 |
-
if (!cm.options.lineNumbers && !markers && !line.bgClass && !line.wrapClass && !line.widgets)
|
666 |
-
return lineElement;
|
667 |
-
|
668 |
-
// Lines with gutter elements, widgets or a background class need
|
669 |
-
// to be wrapped again, and have the extra elements added to the
|
670 |
-
// wrapper div
|
671 |
-
|
672 |
-
if (reuse) {
|
673 |
-
reuse.alignable = null;
|
674 |
-
var isOk = true, widgetsSeen = 0, insertBefore = null;
|
675 |
-
for (var n = reuse.firstChild, next; n; n = next) {
|
676 |
-
next = n.nextSibling;
|
677 |
-
if (!/\bCodeMirror-linewidget\b/.test(n.className)) {
|
678 |
-
reuse.removeChild(n);
|
679 |
-
} else {
|
680 |
-
for (var i = 0; i < line.widgets.length; ++i) {
|
681 |
-
var widget = line.widgets[i];
|
682 |
-
if (widget.node == n.firstChild) {
|
683 |
-
if (!widget.above && !insertBefore) insertBefore = n;
|
684 |
-
positionLineWidget(widget, n, reuse, dims);
|
685 |
-
++widgetsSeen;
|
686 |
-
break;
|
687 |
-
}
|
688 |
-
}
|
689 |
-
if (i == line.widgets.length) { isOk = false; break; }
|
690 |
-
}
|
691 |
-
}
|
692 |
-
reuse.insertBefore(lineElement, insertBefore);
|
693 |
-
if (isOk && widgetsSeen == line.widgets.length) {
|
694 |
-
wrap = reuse;
|
695 |
-
reuse.className = line.wrapClass || "";
|
696 |
-
}
|
697 |
-
}
|
698 |
-
if (!wrap) {
|
699 |
-
wrap = elt("div", null, line.wrapClass, "position: relative");
|
700 |
-
wrap.appendChild(lineElement);
|
701 |
-
}
|
702 |
-
// Kludge to make sure the styled element lies behind the selection (by z-index)
|
703 |
-
if (line.bgClass)
|
704 |
-
wrap.insertBefore(elt("div", null, line.bgClass + " CodeMirror-linebackground"), wrap.firstChild);
|
705 |
-
if (cm.options.lineNumbers || markers) {
|
706 |
-
var gutterWrap = wrap.insertBefore(elt("div", null, null, "position: absolute; left: " +
|
707 |
-
(cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"),
|
708 |
-
wrap.firstChild);
|
709 |
-
if (cm.options.fixedGutter) (wrap.alignable || (wrap.alignable = [])).push(gutterWrap);
|
710 |
-
if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
|
711 |
-
wrap.lineNumber = gutterWrap.appendChild(
|
712 |
-
elt("div", lineNumberFor(cm.options, lineNo),
|
713 |
-
"CodeMirror-linenumber CodeMirror-gutter-elt",
|
714 |
-
"left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: "
|
715 |
-
+ display.lineNumInnerWidth + "px"));
|
716 |
-
if (markers)
|
717 |
-
for (var k = 0; k < cm.options.gutters.length; ++k) {
|
718 |
-
var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
|
719 |
-
if (found)
|
720 |
-
gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " +
|
721 |
-
dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
|
722 |
-
}
|
723 |
-
}
|
724 |
-
if (ie_lt8) wrap.style.zIndex = 2;
|
725 |
-
if (line.widgets && wrap != reuse) for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
|
726 |
-
var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
|
727 |
-
if (!widget.handleMouseEvents) node.ignoreEvents = true;
|
728 |
-
positionLineWidget(widget, node, wrap, dims);
|
729 |
-
if (widget.above)
|
730 |
-
wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement);
|
731 |
-
else
|
732 |
-
wrap.appendChild(node);
|
733 |
-
signalLater(widget, "redraw");
|
734 |
-
}
|
735 |
-
return wrap;
|
736 |
-
}
|
737 |
-
|
738 |
-
function positionLineWidget(widget, node, wrap, dims) {
|
739 |
-
if (widget.noHScroll) {
|
740 |
-
(wrap.alignable || (wrap.alignable = [])).push(node);
|
741 |
-
var width = dims.wrapperWidth;
|
742 |
-
node.style.left = dims.fixedPos + "px";
|
743 |
-
if (!widget.coverGutter) {
|
744 |
-
width -= dims.gutterTotalWidth;
|
745 |
-
node.style.paddingLeft = dims.gutterTotalWidth + "px";
|
746 |
-
}
|
747 |
-
node.style.width = width + "px";
|
748 |
-
}
|
749 |
-
if (widget.coverGutter) {
|
750 |
-
node.style.zIndex = 5;
|
751 |
-
node.style.position = "relative";
|
752 |
-
if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
|
753 |
-
}
|
754 |
-
}
|
755 |
-
|
756 |
-
// SELECTION / CURSOR
|
757 |
-
|
758 |
-
function updateSelection(cm) {
|
759 |
-
var display = cm.display;
|
760 |
-
var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to);
|
761 |
-
if (collapsed || cm.options.showCursorWhenSelecting)
|
762 |
-
updateSelectionCursor(cm);
|
763 |
-
else
|
764 |
-
display.cursor.style.display = display.otherCursor.style.display = "none";
|
765 |
-
if (!collapsed)
|
766 |
-
updateSelectionRange(cm);
|
767 |
-
else
|
768 |
-
display.selectionDiv.style.display = "none";
|
769 |
-
|
770 |
-
// Move the hidden textarea near the cursor to prevent scrolling artifacts
|
771 |
-
if (cm.options.moveInputWithCursor) {
|
772 |
-
var headPos = cursorCoords(cm, cm.doc.sel.head, "div");
|
773 |
-
var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv);
|
774 |
-
display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
|
775 |
-
headPos.top + lineOff.top - wrapOff.top)) + "px";
|
776 |
-
display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
|
777 |
-
headPos.left + lineOff.left - wrapOff.left)) + "px";
|
778 |
-
}
|
779 |
-
}
|
780 |
-
|
781 |
-
// No selection, plain cursor
|
782 |
-
function updateSelectionCursor(cm) {
|
783 |
-
var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div");
|
784 |
-
display.cursor.style.left = pos.left + "px";
|
785 |
-
display.cursor.style.top = pos.top + "px";
|
786 |
-
display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
|
787 |
-
display.cursor.style.display = "";
|
788 |
-
|
789 |
-
if (pos.other) {
|
790 |
-
display.otherCursor.style.display = "";
|
791 |
-
display.otherCursor.style.left = pos.other.left + "px";
|
792 |
-
display.otherCursor.style.top = pos.other.top + "px";
|
793 |
-
display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
|
794 |
-
} else { display.otherCursor.style.display = "none"; }
|
795 |
-
}
|
796 |
-
|
797 |
-
// Highlight selection
|
798 |
-
function updateSelectionRange(cm) {
|
799 |
-
var display = cm.display, doc = cm.doc, sel = cm.doc.sel;
|
800 |
-
var fragment = document.createDocumentFragment();
|
801 |
-
var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display);
|
802 |
-
|
803 |
-
function add(left, top, width, bottom) {
|
804 |
-
if (top < 0) top = 0;
|
805 |
-
fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
|
806 |
-
"px; top: " + top + "px; width: " + (width == null ? clientWidth - left : width) +
|
807 |
-
"px; height: " + (bottom - top) + "px"));
|
808 |
-
}
|
809 |
-
|
810 |
-
function drawForLine(line, fromArg, toArg) {
|
811 |
-
var lineObj = getLine(doc, line);
|
812 |
-
var lineLen = lineObj.text.length;
|
813 |
-
var start, end;
|
814 |
-
function coords(ch, bias) {
|
815 |
-
return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
|
816 |
-
}
|
817 |
-
|
818 |
-
iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {
|
819 |
-
var leftPos = coords(from, "left"), rightPos, left, right;
|
820 |
-
if (from == to) {
|
821 |
-
rightPos = leftPos;
|
822 |
-
left = right = leftPos.left;
|
823 |
-
} else {
|
824 |
-
rightPos = coords(to - 1, "right");
|
825 |
-
if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
|
826 |
-
left = leftPos.left;
|
827 |
-
right = rightPos.right;
|
828 |
-
}
|
829 |
-
if (fromArg == null && from == 0) left = pl;
|
830 |
-
if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
|
831 |
-
add(left, leftPos.top, null, leftPos.bottom);
|
832 |
-
left = pl;
|
833 |
-
if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);
|
834 |
-
}
|
835 |
-
if (toArg == null && to == lineLen) right = clientWidth;
|
836 |
-
if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
|
837 |
-
start = leftPos;
|
838 |
-
if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
|
839 |
-
end = rightPos;
|
840 |
-
if (left < pl + 1) left = pl;
|
841 |
-
add(left, rightPos.top, right - left, rightPos.bottom);
|
842 |
-
});
|
843 |
-
return {start: start, end: end};
|
844 |
-
}
|
845 |
-
|
846 |
-
if (sel.from.line == sel.to.line) {
|
847 |
-
drawForLine(sel.from.line, sel.from.ch, sel.to.ch);
|
848 |
-
} else {
|
849 |
-
var fromLine = getLine(doc, sel.from.line), toLine = getLine(doc, sel.to.line);
|
850 |
-
var singleVLine = visualLine(doc, fromLine) == visualLine(doc, toLine);
|
851 |
-
var leftEnd = drawForLine(sel.from.line, sel.from.ch, singleVLine ? fromLine.text.length : null).end;
|
852 |
-
var rightStart = drawForLine(sel.to.line, singleVLine ? 0 : null, sel.to.ch).start;
|
853 |
-
if (singleVLine) {
|
854 |
-
if (leftEnd.top < rightStart.top - 2) {
|
855 |
-
add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
|
856 |
-
add(pl, rightStart.top, rightStart.left, rightStart.bottom);
|
857 |
-
} else {
|
858 |
-
add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
|
859 |
-
}
|
860 |
-
}
|
861 |
-
if (leftEnd.bottom < rightStart.top)
|
862 |
-
add(pl, leftEnd.bottom, null, rightStart.top);
|
863 |
-
}
|
864 |
-
|
865 |
-
removeChildrenAndAdd(display.selectionDiv, fragment);
|
866 |
-
display.selectionDiv.style.display = "";
|
867 |
-
}
|
868 |
-
|
869 |
-
// Cursor-blinking
|
870 |
-
function restartBlink(cm) {
|
871 |
-
if (!cm.state.focused) return;
|
872 |
-
var display = cm.display;
|
873 |
-
clearInterval(display.blinker);
|
874 |
-
var on = true;
|
875 |
-
display.cursor.style.visibility = display.otherCursor.style.visibility = "";
|
876 |
-
display.blinker = setInterval(function() {
|
877 |
-
display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? "" : "hidden";
|
878 |
-
}, cm.options.cursorBlinkRate);
|
879 |
-
}
|
880 |
-
|
881 |
-
// HIGHLIGHT WORKER
|
882 |
-
|
883 |
-
function startWorker(cm, time) {
|
884 |
-
if (cm.doc.mode.startState && cm.doc.frontier < cm.display.showingTo)
|
885 |
-
cm.state.highlight.set(time, bind(highlightWorker, cm));
|
886 |
-
}
|
887 |
-
|
888 |
-
function highlightWorker(cm) {
|
889 |
-
var doc = cm.doc;
|
890 |
-
if (doc.frontier < doc.first) doc.frontier = doc.first;
|
891 |
-
if (doc.frontier >= cm.display.showingTo) return;
|
892 |
-
var end = +new Date + cm.options.workTime;
|
893 |
-
var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
|
894 |
-
var changed = [], prevChange;
|
895 |
-
doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.showingTo + 500), function(line) {
|
896 |
-
if (doc.frontier >= cm.display.showingFrom) { // Visible
|
897 |
-
var oldStyles = line.styles;
|
898 |
-
line.styles = highlightLine(cm, line, state);
|
899 |
-
var ischange = !oldStyles || oldStyles.length != line.styles.length;
|
900 |
-
for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];
|
901 |
-
if (ischange) {
|
902 |
-
if (prevChange && prevChange.end == doc.frontier) prevChange.end++;
|
903 |
-
else changed.push(prevChange = {start: doc.frontier, end: doc.frontier + 1});
|
904 |
-
}
|
905 |
-
line.stateAfter = copyState(doc.mode, state);
|
906 |
-
} else {
|
907 |
-
processLine(cm, line, state);
|
908 |
-
line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
|
909 |
-
}
|
910 |
-
++doc.frontier;
|
911 |
-
if (+new Date > end) {
|
912 |
-
startWorker(cm, cm.options.workDelay);
|
913 |
-
return true;
|
914 |
-
}
|
915 |
-
});
|
916 |
-
if (changed.length)
|
917 |
-
operation(cm, function() {
|
918 |
-
for (var i = 0; i < changed.length; ++i)
|
919 |
-
regChange(this, changed[i].start, changed[i].end);
|
920 |
-
})();
|
921 |
-
}
|
922 |
-
|
923 |
-
// Finds the line to start with when starting a parse. Tries to
|
924 |
-
// find a line with a stateAfter, so that it can start with a
|
925 |
-
// valid state. If that fails, it returns the line with the
|
926 |
-
// smallest indentation, which tends to need the least context to
|
927 |
-
// parse correctly.
|
928 |
-
function findStartLine(cm, n, precise) {
|
929 |
-
var minindent, minline, doc = cm.doc;
|
930 |
-
for (var search = n, lim = n - 100; search > lim; --search) {
|
931 |
-
if (search <= doc.first) return doc.first;
|
932 |
-
var line = getLine(doc, search - 1);
|
933 |
-
if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
|
934 |
-
var indented = countColumn(line.text, null, cm.options.tabSize);
|
935 |
-
if (minline == null || minindent > indented) {
|
936 |
-
minline = search - 1;
|
937 |
-
minindent = indented;
|
938 |
-
}
|
939 |
-
}
|
940 |
-
return minline;
|
941 |
-
}
|
942 |
-
|
943 |
-
function getStateBefore(cm, n, precise) {
|
944 |
-
var doc = cm.doc, display = cm.display;
|
945 |
-
if (!doc.mode.startState) return true;
|
946 |
-
var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
|
947 |
-
if (!state) state = startState(doc.mode);
|
948 |
-
else state = copyState(doc.mode, state);
|
949 |
-
doc.iter(pos, n, function(line) {
|
950 |
-
processLine(cm, line, state);
|
951 |
-
var save = pos == n - 1 || pos % 5 == 0 || pos >= display.showingFrom && pos < display.showingTo;
|
952 |
-
line.stateAfter = save ? copyState(doc.mode, state) : null;
|
953 |
-
++pos;
|
954 |
-
});
|
955 |
-
return state;
|
956 |
-
}
|
957 |
-
|
958 |
-
// POSITION MEASUREMENT
|
959 |
-
|
960 |
-
function paddingTop(display) {return display.lineSpace.offsetTop;}
|
961 |
-
function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
|
962 |
-
function paddingLeft(display) {
|
963 |
-
var e = removeChildrenAndAdd(display.measure, elt("pre", null, null, "text-align: left")).appendChild(elt("span", "x"));
|
964 |
-
return e.offsetLeft;
|
965 |
-
}
|
966 |
-
|
967 |
-
function measureChar(cm, line, ch, data, bias) {
|
968 |
-
var dir = -1;
|
969 |
-
data = data || measureLine(cm, line);
|
970 |
-
|
971 |
-
for (var pos = ch;; pos += dir) {
|
972 |
-
var r = data[pos];
|
973 |
-
if (r) break;
|
974 |
-
if (dir < 0 && pos == 0) dir = 1;
|
975 |
-
}
|
976 |
-
bias = pos > ch ? "left" : pos < ch ? "right" : bias;
|
977 |
-
if (bias == "left" && r.leftSide) r = r.leftSide;
|
978 |
-
else if (bias == "right" && r.rightSide) r = r.rightSide;
|
979 |
-
return {left: pos < ch ? r.right : r.left,
|
980 |
-
right: pos > ch ? r.left : r.right,
|
981 |
-
top: r.top,
|
982 |
-
bottom: r.bottom};
|
983 |
-
}
|
984 |
-
|
985 |
-
function findCachedMeasurement(cm, line) {
|
986 |
-
var cache = cm.display.measureLineCache;
|
987 |
-
for (var i = 0; i < cache.length; ++i) {
|
988 |
-
var memo = cache[i];
|
989 |
-
if (memo.text == line.text && memo.markedSpans == line.markedSpans &&
|
990 |
-
cm.display.scroller.clientWidth == memo.width &&
|
991 |
-
memo.classes == line.textClass + "|" + line.bgClass + "|" + line.wrapClass)
|
992 |
-
return memo;
|
993 |
-
}
|
994 |
-
}
|
995 |
-
|
996 |
-
function clearCachedMeasurement(cm, line) {
|
997 |
-
var exists = findCachedMeasurement(cm, line);
|
998 |
-
if (exists) exists.text = exists.measure = exists.markedSpans = null;
|
999 |
-
}
|
1000 |
-
|
1001 |
-
function measureLine(cm, line) {
|
1002 |
-
// First look in the cache
|
1003 |
-
var cached = findCachedMeasurement(cm, line);
|
1004 |
-
if (cached) return cached.measure;
|
1005 |
-
|
1006 |
-
// Failing that, recompute and store result in cache
|
1007 |
-
var measure = measureLineInner(cm, line);
|
1008 |
-
var cache = cm.display.measureLineCache;
|
1009 |
-
var memo = {text: line.text, width: cm.display.scroller.clientWidth,
|
1010 |
-
markedSpans: line.markedSpans, measure: measure,
|
1011 |
-
classes: line.textClass + "|" + line.bgClass + "|" + line.wrapClass};
|
1012 |
-
if (cache.length == 16) cache[++cm.display.measureLineCachePos % 16] = memo;
|
1013 |
-
else cache.push(memo);
|
1014 |
-
return measure;
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
function measureLineInner(cm, line) {
|
1018 |
-
var display = cm.display, measure = emptyArray(line.text.length);
|
1019 |
-
var pre = lineContent(cm, line, measure, true);
|
1020 |
-
|
1021 |
-
// IE does not cache element positions of inline elements between
|
1022 |
-
// calls to getBoundingClientRect. This makes the loop below,
|
1023 |
-
// which gathers the positions of all the characters on the line,
|
1024 |
-
// do an amount of layout work quadratic to the number of
|
1025 |
-
// characters. When line wrapping is off, we try to improve things
|
1026 |
-
// by first subdividing the line into a bunch of inline blocks, so
|
1027 |
-
// that IE can reuse most of the layout information from caches
|
1028 |
-
// for those blocks. This does interfere with line wrapping, so it
|
1029 |
-
// doesn't work when wrapping is on, but in that case the
|
1030 |
-
// situation is slightly better, since IE does cache line-wrapping
|
1031 |
-
// information and only recomputes per-line.
|
1032 |
-
if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) {
|
1033 |
-
var fragment = document.createDocumentFragment();
|
1034 |
-
var chunk = 10, n = pre.childNodes.length;
|
1035 |
-
for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) {
|
1036 |
-
var wrap = elt("div", null, null, "display: inline-block");
|
1037 |
-
for (var j = 0; j < chunk && n; ++j) {
|
1038 |
-
wrap.appendChild(pre.firstChild);
|
1039 |
-
--n;
|
1040 |
-
}
|
1041 |
-
fragment.appendChild(wrap);
|
1042 |
-
}
|
1043 |
-
pre.appendChild(fragment);
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
removeChildrenAndAdd(display.measure, pre);
|
1047 |
-
|
1048 |
-
var outer = getRect(display.lineDiv);
|
1049 |
-
var vranges = [], data = emptyArray(line.text.length), maxBot = pre.offsetHeight;
|
1050 |
-
// Work around an IE7/8 bug where it will sometimes have randomly
|
1051 |
-
// replaced our pre with a clone at this point.
|
1052 |
-
if (ie_lt9 && display.measure.first != pre)
|
1053 |
-
removeChildrenAndAdd(display.measure, pre);
|
1054 |
-
|
1055 |
-
function measureRect(rect) {
|
1056 |
-
var top = rect.top - outer.top, bot = rect.bottom - outer.top;
|
1057 |
-
if (bot > maxBot) bot = maxBot;
|
1058 |
-
if (top < 0) top = 0;
|
1059 |
-
for (var i = vranges.length - 2; i >= 0; i -= 2) {
|
1060 |
-
var rtop = vranges[i], rbot = vranges[i+1];
|
1061 |
-
if (rtop > bot || rbot < top) continue;
|
1062 |
-
if (rtop <= top && rbot >= bot ||
|
1063 |
-
top <= rtop && bot >= rbot ||
|
1064 |
-
Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) {
|
1065 |
-
vranges[i] = Math.min(top, rtop);
|
1066 |
-
vranges[i+1] = Math.max(bot, rbot);
|
1067 |
-
break;
|
1068 |
-
}
|
1069 |
-
}
|
1070 |
-
if (i < 0) { i = vranges.length; vranges.push(top, bot); }
|
1071 |
-
return {left: rect.left - outer.left,
|
1072 |
-
right: rect.right - outer.left,
|
1073 |
-
top: i, bottom: null};
|
1074 |
-
}
|
1075 |
-
function finishRect(rect) {
|
1076 |
-
rect.bottom = vranges[rect.top+1];
|
1077 |
-
rect.top = vranges[rect.top];
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
for (var i = 0, cur; i < measure.length; ++i) if (cur = measure[i]) {
|
1081 |
-
var node = cur, rect = null;
|
1082 |
-
// A widget might wrap, needs special care
|
1083 |
-
if (/\bCodeMirror-widget\b/.test(cur.className) && cur.getClientRects) {
|
1084 |
-
if (cur.firstChild.nodeType == 1) node = cur.firstChild;
|
1085 |
-
var rects = node.getClientRects();
|
1086 |
-
if (rects.length > 1) {
|
1087 |
-
rect = data[i] = measureRect(rects[0]);
|
1088 |
-
rect.rightSide = measureRect(rects[rects.length - 1]);
|
1089 |
-
}
|
1090 |
-
}
|
1091 |
-
if (!rect) rect = data[i] = measureRect(getRect(node));
|
1092 |
-
if (cur.measureRight) rect.right = getRect(cur.measureRight).left;
|
1093 |
-
if (cur.leftSide) rect.leftSide = measureRect(getRect(cur.leftSide));
|
1094 |
-
}
|
1095 |
-
for (var i = 0, cur; i < data.length; ++i) if (cur = data[i]) {
|
1096 |
-
finishRect(cur);
|
1097 |
-
if (cur.leftSide) finishRect(cur.leftSide);
|
1098 |
-
if (cur.rightSide) finishRect(cur.rightSide);
|
1099 |
-
}
|
1100 |
-
return data;
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
function measureLineWidth(cm, line) {
|
1104 |
-
var hasBadSpan = false;
|
1105 |
-
if (line.markedSpans) for (var i = 0; i < line.markedSpans; ++i) {
|
1106 |
-
var sp = line.markedSpans[i];
|
1107 |
-
if (sp.collapsed && (sp.to == null || sp.to == line.text.length)) hasBadSpan = true;
|
1108 |
-
}
|
1109 |
-
var cached = !hasBadSpan && findCachedMeasurement(cm, line);
|
1110 |
-
if (cached) return measureChar(cm, line, line.text.length, cached.measure, "right").right;
|
1111 |
-
|
1112 |
-
var pre = lineContent(cm, line, null, true);
|
1113 |
-
var end = pre.appendChild(zeroWidthElement(cm.display.measure));
|
1114 |
-
removeChildrenAndAdd(cm.display.measure, pre);
|
1115 |
-
return getRect(end).right - getRect(cm.display.lineDiv).left;
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
function clearCaches(cm) {
|
1119 |
-
cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0;
|
1120 |
-
cm.display.cachedCharWidth = cm.display.cachedTextHeight = null;
|
1121 |
-
if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
|
1122 |
-
cm.display.lineNumChars = null;
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }
|
1126 |
-
function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }
|
1127 |
-
|
1128 |
-
// Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page"
|
1129 |
-
function intoCoordSystem(cm, lineObj, rect, context) {
|
1130 |
-
if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {
|
1131 |
-
var size = widgetHeight(lineObj.widgets[i]);
|
1132 |
-
rect.top += size; rect.bottom += size;
|
1133 |
-
}
|
1134 |
-
if (context == "line") return rect;
|
1135 |
-
if (!context) context = "local";
|
1136 |
-
var yOff = heightAtLine(cm, lineObj);
|
1137 |
-
if (context == "local") yOff += paddingTop(cm.display);
|
1138 |
-
else yOff -= cm.display.viewOffset;
|
1139 |
-
if (context == "page" || context == "window") {
|
1140 |
-
var lOff = getRect(cm.display.lineSpace);
|
1141 |
-
yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
|
1142 |
-
var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
|
1143 |
-
rect.left += xOff; rect.right += xOff;
|
1144 |
-
}
|
1145 |
-
rect.top += yOff; rect.bottom += yOff;
|
1146 |
-
return rect;
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
// Context may be "window", "page", "div", or "local"/null
|
1150 |
-
// Result is in "div" coords
|
1151 |
-
function fromCoordSystem(cm, coords, context) {
|
1152 |
-
if (context == "div") return coords;
|
1153 |
-
var left = coords.left, top = coords.top;
|
1154 |
-
// First move into "page" coordinate system
|
1155 |
-
if (context == "page") {
|
1156 |
-
left -= pageScrollX();
|
1157 |
-
top -= pageScrollY();
|
1158 |
-
} else if (context == "local" || !context) {
|
1159 |
-
var localBox = getRect(cm.display.sizer);
|
1160 |
-
left += localBox.left;
|
1161 |
-
top += localBox.top;
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
var lineSpaceBox = getRect(cm.display.lineSpace);
|
1165 |
-
return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};
|
1166 |
-
}
|
1167 |
-
|
1168 |
-
function charCoords(cm, pos, context, lineObj, bias) {
|
1169 |
-
if (!lineObj) lineObj = getLine(cm.doc, pos.line);
|
1170 |
-
return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, null, bias), context);
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
function cursorCoords(cm, pos, context, lineObj, measurement) {
|
1174 |
-
lineObj = lineObj || getLine(cm.doc, pos.line);
|
1175 |
-
if (!measurement) measurement = measureLine(cm, lineObj);
|
1176 |
-
function get(ch, right) {
|
1177 |
-
var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left");
|
1178 |
-
if (right) m.left = m.right; else m.right = m.left;
|
1179 |
-
return intoCoordSystem(cm, lineObj, m, context);
|
1180 |
-
}
|
1181 |
-
function getBidi(ch, partPos) {
|
1182 |
-
var part = order[partPos], right = part.level % 2;
|
1183 |
-
if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {
|
1184 |
-
part = order[--partPos];
|
1185 |
-
ch = bidiRight(part) - (part.level % 2 ? 0 : 1);
|
1186 |
-
right = true;
|
1187 |
-
} else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {
|
1188 |
-
part = order[++partPos];
|
1189 |
-
ch = bidiLeft(part) - part.level % 2;
|
1190 |
-
right = false;
|
1191 |
-
}
|
1192 |
-
if (right && ch == part.to && ch > part.from) return get(ch - 1);
|
1193 |
-
return get(ch, right);
|
1194 |
-
}
|
1195 |
-
var order = getOrder(lineObj), ch = pos.ch;
|
1196 |
-
if (!order) return get(ch);
|
1197 |
-
var partPos = getBidiPartAt(order, ch);
|
1198 |
-
var val = getBidi(ch, partPos);
|
1199 |
-
if (bidiOther != null) val.other = getBidi(ch, bidiOther);
|
1200 |
-
return val;
|
1201 |
-
}
|
1202 |
-
|
1203 |
-
function PosWithInfo(line, ch, outside, xRel) {
|
1204 |
-
var pos = new Pos(line, ch);
|
1205 |
-
pos.xRel = xRel;
|
1206 |
-
if (outside) pos.outside = true;
|
1207 |
-
return pos;
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
// Coords must be lineSpace-local
|
1211 |
-
function coordsChar(cm, x, y) {
|
1212 |
-
var doc = cm.doc;
|
1213 |
-
y += cm.display.viewOffset;
|
1214 |
-
if (y < 0) return PosWithInfo(doc.first, 0, true, -1);
|
1215 |
-
var lineNo = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
|
1216 |
-
if (lineNo > last)
|
1217 |
-
return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);
|
1218 |
-
if (x < 0) x = 0;
|
1219 |
-
|
1220 |
-
for (;;) {
|
1221 |
-
var lineObj = getLine(doc, lineNo);
|
1222 |
-
var found = coordsCharInner(cm, lineObj, lineNo, x, y);
|
1223 |
-
var merged = collapsedSpanAtEnd(lineObj);
|
1224 |
-
var mergedPos = merged && merged.find();
|
1225 |
-
if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
|
1226 |
-
lineNo = mergedPos.to.line;
|
1227 |
-
else
|
1228 |
-
return found;
|
1229 |
-
}
|
1230 |
-
}
|
1231 |
-
|
1232 |
-
function coordsCharInner(cm, lineObj, lineNo, x, y) {
|
1233 |
-
var innerOff = y - heightAtLine(cm, lineObj);
|
1234 |
-
var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
|
1235 |
-
var measurement = measureLine(cm, lineObj);
|
1236 |
-
|
1237 |
-
function getX(ch) {
|
1238 |
-
var sp = cursorCoords(cm, Pos(lineNo, ch), "line",
|
1239 |
-
lineObj, measurement);
|
1240 |
-
wrongLine = true;
|
1241 |
-
if (innerOff > sp.bottom) return sp.left - adjust;
|
1242 |
-
else if (innerOff < sp.top) return sp.left + adjust;
|
1243 |
-
else wrongLine = false;
|
1244 |
-
return sp.left;
|
1245 |
-
}
|
1246 |
-
|
1247 |
-
var bidi = getOrder(lineObj), dist = lineObj.text.length;
|
1248 |
-
var from = lineLeft(lineObj), to = lineRight(lineObj);
|
1249 |
-
var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;
|
1250 |
-
|
1251 |
-
if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);
|
1252 |
-
// Do a binary search between these bounds.
|
1253 |
-
for (;;) {
|
1254 |
-
if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
|
1255 |
-
var ch = x < fromX || x - fromX <= toX - x ? from : to;
|
1256 |
-
var xDiff = x - (ch == from ? fromX : toX);
|
1257 |
-
while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch;
|
1258 |
-
var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
|
1259 |
-
xDiff < 0 ? -1 : xDiff ? 1 : 0);
|
1260 |
-
return pos;
|
1261 |
-
}
|
1262 |
-
var step = Math.ceil(dist / 2), middle = from + step;
|
1263 |
-
if (bidi) {
|
1264 |
-
middle = from;
|
1265 |
-
for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);
|
1266 |
-
}
|
1267 |
-
var middleX = getX(middle);
|
1268 |
-
if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}
|
1269 |
-
else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}
|
1270 |
-
}
|
1271 |
-
}
|
1272 |
-
|
1273 |
-
var measureText;
|
1274 |
-
function textHeight(display) {
|
1275 |
-
if (display.cachedTextHeight != null) return display.cachedTextHeight;
|
1276 |
-
if (measureText == null) {
|
1277 |
-
measureText = elt("pre");
|
1278 |
-
// Measure a bunch of lines, for browsers that compute
|
1279 |
-
// fractional heights.
|
1280 |
-
for (var i = 0; i < 49; ++i) {
|
1281 |
-
measureText.appendChild(document.createTextNode("x"));
|
1282 |
-
measureText.appendChild(elt("br"));
|
1283 |
-
}
|
1284 |
-
measureText.appendChild(document.createTextNode("x"));
|
1285 |
-
}
|
1286 |
-
removeChildrenAndAdd(display.measure, measureText);
|
1287 |
-
var height = measureText.offsetHeight / 50;
|
1288 |
-
if (height > 3) display.cachedTextHeight = height;
|
1289 |
-
removeChildren(display.measure);
|
1290 |
-
return height || 1;
|
1291 |
-
}
|
1292 |
-
|
1293 |
-
function charWidth(display) {
|
1294 |
-
if (display.cachedCharWidth != null) return display.cachedCharWidth;
|
1295 |
-
var anchor = elt("span", "x");
|
1296 |
-
var pre = elt("pre", [anchor]);
|
1297 |
-
removeChildrenAndAdd(display.measure, pre);
|
1298 |
-
var width = anchor.offsetWidth;
|
1299 |
-
if (width > 2) display.cachedCharWidth = width;
|
1300 |
-
return width || 10;
|
1301 |
-
}
|
1302 |
-
|
1303 |
-
// OPERATIONS
|
1304 |
-
|
1305 |
-
// Operations are used to wrap changes in such a way that each
|
1306 |
-
// change won't have to update the cursor and display (which would
|
1307 |
-
// be awkward, slow, and error-prone), but instead updates are
|
1308 |
-
// batched and then all combined and executed at once.
|
1309 |
-
|
1310 |
-
var nextOpId = 0;
|
1311 |
-
function startOperation(cm) {
|
1312 |
-
cm.curOp = {
|
1313 |
-
// An array of ranges of lines that have to be updated. See
|
1314 |
-
// updateDisplay.
|
1315 |
-
changes: [],
|
1316 |
-
forceUpdate: false,
|
1317 |
-
updateInput: null,
|
1318 |
-
userSelChange: null,
|
1319 |
-
textChanged: null,
|
1320 |
-
selectionChanged: false,
|
1321 |
-
cursorActivity: false,
|
1322 |
-
updateMaxLine: false,
|
1323 |
-
updateScrollPos: false,
|
1324 |
-
id: ++nextOpId
|
1325 |
-
};
|
1326 |
-
if (!delayedCallbackDepth++) delayedCallbacks = [];
|
1327 |
-
}
|
1328 |
-
|
1329 |
-
function endOperation(cm) {
|
1330 |
-
var op = cm.curOp, doc = cm.doc, display = cm.display;
|
1331 |
-
cm.curOp = null;
|
1332 |
-
|
1333 |
-
if (op.updateMaxLine) computeMaxLength(cm);
|
1334 |
-
if (display.maxLineChanged && !cm.options.lineWrapping && display.maxLine) {
|
1335 |
-
var width = measureLineWidth(cm, display.maxLine);
|
1336 |
-
display.sizer.style.minWidth = Math.max(0, width + 3 + scrollerCutOff) + "px";
|
1337 |
-
display.maxLineChanged = false;
|
1338 |
-
var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + display.sizer.offsetWidth - display.scroller.clientWidth);
|
1339 |
-
if (maxScrollLeft < doc.scrollLeft && !op.updateScrollPos)
|
1340 |
-
setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true);
|
1341 |
-
}
|
1342 |
-
var newScrollPos, updated;
|
1343 |
-
if (op.updateScrollPos) {
|
1344 |
-
newScrollPos = op.updateScrollPos;
|
1345 |
-
} else if (op.selectionChanged && display.scroller.clientHeight) { // don't rescroll if not visible
|
1346 |
-
var coords = cursorCoords(cm, doc.sel.head);
|
1347 |
-
newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom);
|
1348 |
-
}
|
1349 |
-
if (op.changes.length || op.forceUpdate || newScrollPos && newScrollPos.scrollTop != null) {
|
1350 |
-
updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop, op.forceUpdate);
|
1351 |
-
if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop;
|
1352 |
-
}
|
1353 |
-
if (!updated && op.selectionChanged) updateSelection(cm);
|
1354 |
-
if (op.updateScrollPos) {
|
1355 |
-
display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = newScrollPos.scrollTop;
|
1356 |
-
display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = newScrollPos.scrollLeft;
|
1357 |
-
alignHorizontally(cm);
|
1358 |
-
if (op.scrollToPos)
|
1359 |
-
scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos), op.scrollToPosMargin);
|
1360 |
-
} else if (newScrollPos) {
|
1361 |
-
scrollCursorIntoView(cm);
|
1362 |
-
}
|
1363 |
-
if (op.selectionChanged) restartBlink(cm);
|
1364 |
-
|
1365 |
-
if (cm.state.focused && op.updateInput)
|
1366 |
-
resetInput(cm, op.userSelChange);
|
1367 |
-
|
1368 |
-
var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
|
1369 |
-
if (hidden) for (var i = 0; i < hidden.length; ++i)
|
1370 |
-
if (!hidden[i].lines.length) signal(hidden[i], "hide");
|
1371 |
-
if (unhidden) for (var i = 0; i < unhidden.length; ++i)
|
1372 |
-
if (unhidden[i].lines.length) signal(unhidden[i], "unhide");
|
1373 |
-
|
1374 |
-
var delayed;
|
1375 |
-
if (!--delayedCallbackDepth) {
|
1376 |
-
delayed = delayedCallbacks;
|
1377 |
-
delayedCallbacks = null;
|
1378 |
-
}
|
1379 |
-
if (op.textChanged)
|
1380 |
-
signal(cm, "change", cm, op.textChanged);
|
1381 |
-
if (op.cursorActivity) signal(cm, "cursorActivity", cm);
|
1382 |
-
if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i]();
|
1383 |
-
}
|
1384 |
-
|
1385 |
-
// Wraps a function in an operation. Returns the wrapped function.
|
1386 |
-
function operation(cm1, f) {
|
1387 |
-
return function() {
|
1388 |
-
var cm = cm1 || this, withOp = !cm.curOp;
|
1389 |
-
if (withOp) startOperation(cm);
|
1390 |
-
try { var result = f.apply(cm, arguments); }
|
1391 |
-
finally { if (withOp) endOperation(cm); }
|
1392 |
-
return result;
|
1393 |
-
};
|
1394 |
-
}
|
1395 |
-
function docOperation(f) {
|
1396 |
-
return function() {
|
1397 |
-
var withOp = this.cm && !this.cm.curOp, result;
|
1398 |
-
if (withOp) startOperation(this.cm);
|
1399 |
-
try { result = f.apply(this, arguments); }
|
1400 |
-
finally { if (withOp) endOperation(this.cm); }
|
1401 |
-
return result;
|
1402 |
-
};
|
1403 |
-
}
|
1404 |
-
function runInOp(cm, f) {
|
1405 |
-
var withOp = !cm.curOp, result;
|
1406 |
-
if (withOp) startOperation(cm);
|
1407 |
-
try { result = f(); }
|
1408 |
-
finally { if (withOp) endOperation(cm); }
|
1409 |
-
return result;
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
function regChange(cm, from, to, lendiff) {
|
1413 |
-
if (from == null) from = cm.doc.first;
|
1414 |
-
if (to == null) to = cm.doc.first + cm.doc.size;
|
1415 |
-
cm.curOp.changes.push({from: from, to: to, diff: lendiff});
|
1416 |
-
}
|
1417 |
-
|
1418 |
-
// INPUT HANDLING
|
1419 |
-
|
1420 |
-
function slowPoll(cm) {
|
1421 |
-
if (cm.display.pollingFast) return;
|
1422 |
-
cm.display.poll.set(cm.options.pollInterval, function() {
|
1423 |
-
readInput(cm);
|
1424 |
-
if (cm.state.focused) slowPoll(cm);
|
1425 |
-
});
|
1426 |
-
}
|
1427 |
-
|
1428 |
-
function fastPoll(cm) {
|
1429 |
-
var missed = false;
|
1430 |
-
cm.display.pollingFast = true;
|
1431 |
-
function p() {
|
1432 |
-
var changed = readInput(cm);
|
1433 |
-
if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
|
1434 |
-
else {cm.display.pollingFast = false; slowPoll(cm);}
|
1435 |
-
}
|
1436 |
-
cm.display.poll.set(20, p);
|
1437 |
-
}
|
1438 |
-
|
1439 |
-
// prevInput is a hack to work with IME. If we reset the textarea
|
1440 |
-
// on every change, that breaks IME. So we look for changes
|
1441 |
-
// compared to the previous content instead. (Modern browsers have
|
1442 |
-
// events that indicate IME taking place, but these are not widely
|
1443 |
-
// supported or compatible enough yet to rely on.)
|
1444 |
-
function readInput(cm) {
|
1445 |
-
var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;
|
1446 |
-
if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;
|
1447 |
-
var text = input.value;
|
1448 |
-
if (text == prevInput && posEq(sel.from, sel.to)) return false;
|
1449 |
-
if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {
|
1450 |
-
resetInput(cm, true);
|
1451 |
-
return false;
|
1452 |
-
}
|
1453 |
-
|
1454 |
-
var withOp = !cm.curOp;
|
1455 |
-
if (withOp) startOperation(cm);
|
1456 |
-
sel.shift = false;
|
1457 |
-
var same = 0, l = Math.min(prevInput.length, text.length);
|
1458 |
-
while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
|
1459 |
-
var from = sel.from, to = sel.to;
|
1460 |
-
if (same < prevInput.length)
|
1461 |
-
from = Pos(from.line, from.ch - (prevInput.length - same));
|
1462 |
-
else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)
|
1463 |
-
to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));
|
1464 |
-
|
1465 |
-
var updateInput = cm.curOp.updateInput;
|
1466 |
-
var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),
|
1467 |
-
origin: cm.state.pasteIncoming ? "paste" : "+input"};
|
1468 |
-
makeChange(cm.doc, changeEvent, "end");
|
1469 |
-
cm.curOp.updateInput = updateInput;
|
1470 |
-
signalLater(cm, "inputRead", cm, changeEvent);
|
1471 |
-
|
1472 |
-
if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = "";
|
1473 |
-
else cm.display.prevInput = text;
|
1474 |
-
if (withOp) endOperation(cm);
|
1475 |
-
cm.state.pasteIncoming = false;
|
1476 |
-
return true;
|
1477 |
-
}
|
1478 |
-
|
1479 |
-
function resetInput(cm, user) {
|
1480 |
-
var minimal, selected, doc = cm.doc;
|
1481 |
-
if (!posEq(doc.sel.from, doc.sel.to)) {
|
1482 |
-
cm.display.prevInput = "";
|
1483 |
-
minimal = hasCopyEvent &&
|
1484 |
-
(doc.sel.to.line - doc.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000);
|
1485 |
-
var content = minimal ? "-" : selected || cm.getSelection();
|
1486 |
-
cm.display.input.value = content;
|
1487 |
-
if (cm.state.focused) selectInput(cm.display.input);
|
1488 |
-
if (ie && !ie_lt9) cm.display.inputHasSelection = content;
|
1489 |
-
} else if (user) {
|
1490 |
-
cm.display.prevInput = cm.display.input.value = "";
|
1491 |
-
if (ie && !ie_lt9) cm.display.inputHasSelection = null;
|
1492 |
-
}
|
1493 |
-
cm.display.inaccurateSelection = minimal;
|
1494 |
-
}
|
1495 |
-
|
1496 |
-
function focusInput(cm) {
|
1497 |
-
if (cm.options.readOnly != "nocursor" && (!mobile || document.activeElement != cm.display.input))
|
1498 |
-
cm.display.input.focus();
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
function isReadOnly(cm) {
|
1502 |
-
return cm.options.readOnly || cm.doc.cantEdit;
|
1503 |
-
}
|
1504 |
-
|
1505 |
-
// EVENT HANDLERS
|
1506 |
-
|
1507 |
-
function registerEventHandlers(cm) {
|
1508 |
-
var d = cm.display;
|
1509 |
-
on(d.scroller, "mousedown", operation(cm, onMouseDown));
|
1510 |
-
if (ie)
|
1511 |
-
on(d.scroller, "dblclick", operation(cm, function(e) {
|
1512 |
-
if (signalDOMEvent(cm, e)) return;
|
1513 |
-
var pos = posFromMouse(cm, e);
|
1514 |
-
if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
|
1515 |
-
e_preventDefault(e);
|
1516 |
-
var word = findWordAt(getLine(cm.doc, pos.line).text, pos);
|
1517 |
-
extendSelection(cm.doc, word.from, word.to);
|
1518 |
-
}));
|
1519 |
-
else
|
1520 |
-
on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
|
1521 |
-
on(d.lineSpace, "selectstart", function(e) {
|
1522 |
-
if (!eventInWidget(d, e)) e_preventDefault(e);
|
1523 |
-
});
|
1524 |
-
// Gecko browsers fire contextmenu *after* opening the menu, at
|
1525 |
-
// which point we can't mess with it anymore. Context menu is
|
1526 |
-
// handled in onMouseDown for Gecko.
|
1527 |
-
if (!captureMiddleClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
|
1528 |
-
|
1529 |
-
on(d.scroller, "scroll", function() {
|
1530 |
-
if (d.scroller.clientHeight) {
|
1531 |
-
setScrollTop(cm, d.scroller.scrollTop);
|
1532 |
-
setScrollLeft(cm, d.scroller.scrollLeft, true);
|
1533 |
-
signal(cm, "scroll", cm);
|
1534 |
-
}
|
1535 |
-
});
|
1536 |
-
on(d.scrollbarV, "scroll", function() {
|
1537 |
-
if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop);
|
1538 |
-
});
|
1539 |
-
on(d.scrollbarH, "scroll", function() {
|
1540 |
-
if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft);
|
1541 |
-
});
|
1542 |
-
|
1543 |
-
on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);});
|
1544 |
-
on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);});
|
1545 |
-
|
1546 |
-
function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }
|
1547 |
-
on(d.scrollbarH, "mousedown", reFocus);
|
1548 |
-
on(d.scrollbarV, "mousedown", reFocus);
|
1549 |
-
// Prevent wrapper from ever scrolling
|
1550 |
-
on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
|
1551 |
-
|
1552 |
-
var resizeTimer;
|
1553 |
-
function onResize() {
|
1554 |
-
if (resizeTimer == null) resizeTimer = setTimeout(function() {
|
1555 |
-
resizeTimer = null;
|
1556 |
-
// Might be a text scaling operation, clear size caches.
|
1557 |
-
d.cachedCharWidth = d.cachedTextHeight = knownScrollbarWidth = null;
|
1558 |
-
clearCaches(cm);
|
1559 |
-
runInOp(cm, bind(regChange, cm));
|
1560 |
-
}, 100);
|
1561 |
-
}
|
1562 |
-
on(window, "resize", onResize);
|
1563 |
-
// Above handler holds on to the editor and its data structures.
|
1564 |
-
// Here we poll to unregister it when the editor is no longer in
|
1565 |
-
// the document, so that it can be garbage-collected.
|
1566 |
-
function unregister() {
|
1567 |
-
for (var p = d.wrapper.parentNode; p && p != document.body; p = p.parentNode) {}
|
1568 |
-
if (p) setTimeout(unregister, 5000);
|
1569 |
-
else off(window, "resize", onResize);
|
1570 |
-
}
|
1571 |
-
setTimeout(unregister, 5000);
|
1572 |
-
|
1573 |
-
on(d.input, "keyup", operation(cm, function(e) {
|
1574 |
-
if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
|
1575 |
-
if (e.keyCode == 16) cm.doc.sel.shift = false;
|
1576 |
-
}));
|
1577 |
-
on(d.input, "input", bind(fastPoll, cm));
|
1578 |
-
on(d.input, "keydown", operation(cm, onKeyDown));
|
1579 |
-
on(d.input, "keypress", operation(cm, onKeyPress));
|
1580 |
-
on(d.input, "focus", bind(onFocus, cm));
|
1581 |
-
on(d.input, "blur", bind(onBlur, cm));
|
1582 |
-
|
1583 |
-
function drag_(e) {
|
1584 |
-
if (signalDOMEvent(cm, e) || cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return;
|
1585 |
-
e_stop(e);
|
1586 |
-
}
|
1587 |
-
if (cm.options.dragDrop) {
|
1588 |
-
on(d.scroller, "dragstart", function(e){onDragStart(cm, e);});
|
1589 |
-
on(d.scroller, "dragenter", drag_);
|
1590 |
-
on(d.scroller, "dragover", drag_);
|
1591 |
-
on(d.scroller, "drop", operation(cm, onDrop));
|
1592 |
-
}
|
1593 |
-
on(d.scroller, "paste", function(e){
|
1594 |
-
if (eventInWidget(d, e)) return;
|
1595 |
-
focusInput(cm);
|
1596 |
-
fastPoll(cm);
|
1597 |
-
});
|
1598 |
-
on(d.input, "paste", function() {
|
1599 |
-
cm.state.pasteIncoming = true;
|
1600 |
-
fastPoll(cm);
|
1601 |
-
});
|
1602 |
-
|
1603 |
-
function prepareCopy() {
|
1604 |
-
if (d.inaccurateSelection) {
|
1605 |
-
d.prevInput = "";
|
1606 |
-
d.inaccurateSelection = false;
|
1607 |
-
d.input.value = cm.getSelection();
|
1608 |
-
selectInput(d.input);
|
1609 |
-
}
|
1610 |
-
}
|
1611 |
-
on(d.input, "cut", prepareCopy);
|
1612 |
-
on(d.input, "copy", prepareCopy);
|
1613 |
-
|
1614 |
-
// Needed to handle Tab key in KHTML
|
1615 |
-
if (khtml) on(d.sizer, "mouseup", function() {
|
1616 |
-
if (document.activeElement == d.input) d.input.blur();
|
1617 |
-
focusInput(cm);
|
1618 |
-
});
|
1619 |
-
}
|
1620 |
-
|
1621 |
-
function eventInWidget(display, e) {
|
1622 |
-
for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
|
1623 |
-
if (!n || n.ignoreEvents || n.parentNode == display.sizer && n != display.mover) return true;
|
1624 |
-
}
|
1625 |
-
}
|
1626 |
-
|
1627 |
-
function posFromMouse(cm, e, liberal) {
|
1628 |
-
var display = cm.display;
|
1629 |
-
if (!liberal) {
|
1630 |
-
var target = e_target(e);
|
1631 |
-
if (target == display.scrollbarH || target == display.scrollbarH.firstChild ||
|
1632 |
-
target == display.scrollbarV || target == display.scrollbarV.firstChild ||
|
1633 |
-
target == display.scrollbarFiller || target == display.gutterFiller) return null;
|
1634 |
-
}
|
1635 |
-
var x, y, space = getRect(display.lineSpace);
|
1636 |
-
// Fails unpredictably on IE[67] when mouse is dragged around quickly.
|
1637 |
-
try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
|
1638 |
-
return coordsChar(cm, x - space.left, y - space.top);
|
1639 |
-
}
|
1640 |
-
|
1641 |
-
var lastClick, lastDoubleClick;
|
1642 |
-
function onMouseDown(e) {
|
1643 |
-
if (signalDOMEvent(this, e)) return;
|
1644 |
-
var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel;
|
1645 |
-
sel.shift = e.shiftKey;
|
1646 |
-
|
1647 |
-
if (eventInWidget(display, e)) {
|
1648 |
-
if (!webkit) {
|
1649 |
-
display.scroller.draggable = false;
|
1650 |
-
setTimeout(function(){display.scroller.draggable = true;}, 100);
|
1651 |
-
}
|
1652 |
-
return;
|
1653 |
-
}
|
1654 |
-
if (clickInGutter(cm, e)) return;
|
1655 |
-
var start = posFromMouse(cm, e);
|
1656 |
-
|
1657 |
-
switch (e_button(e)) {
|
1658 |
-
case 3:
|
1659 |
-
if (captureMiddleClick) onContextMenu.call(cm, cm, e);
|
1660 |
-
return;
|
1661 |
-
case 2:
|
1662 |
-
if (start) extendSelection(cm.doc, start);
|
1663 |
-
setTimeout(bind(focusInput, cm), 20);
|
1664 |
-
e_preventDefault(e);
|
1665 |
-
return;
|
1666 |
-
}
|
1667 |
-
// For button 1, if it was clicked inside the editor
|
1668 |
-
// (posFromMouse returning non-null), we have to adjust the
|
1669 |
-
// selection.
|
1670 |
-
if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;}
|
1671 |
-
|
1672 |
-
if (!cm.state.focused) onFocus(cm);
|
1673 |
-
|
1674 |
-
var now = +new Date, type = "single";
|
1675 |
-
if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {
|
1676 |
-
type = "triple";
|
1677 |
-
e_preventDefault(e);
|
1678 |
-
setTimeout(bind(focusInput, cm), 20);
|
1679 |
-
selectLine(cm, start.line);
|
1680 |
-
} else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {
|
1681 |
-
type = "double";
|
1682 |
-
lastDoubleClick = {time: now, pos: start};
|
1683 |
-
e_preventDefault(e);
|
1684 |
-
var word = findWordAt(getLine(doc, start.line).text, start);
|
1685 |
-
extendSelection(cm.doc, word.from, word.to);
|
1686 |
-
} else { lastClick = {time: now, pos: start}; }
|
1687 |
-
|
1688 |
-
var last = start;
|
1689 |
-
if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) &&
|
1690 |
-
!posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") {
|
1691 |
-
var dragEnd = operation(cm, function(e2) {
|
1692 |
-
if (webkit) display.scroller.draggable = false;
|
1693 |
-
cm.state.draggingText = false;
|
1694 |
-
off(document, "mouseup", dragEnd);
|
1695 |
-
off(display.scroller, "drop", dragEnd);
|
1696 |
-
if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
|
1697 |
-
e_preventDefault(e2);
|
1698 |
-
extendSelection(cm.doc, start);
|
1699 |
-
focusInput(cm);
|
1700 |
-
}
|
1701 |
-
});
|
1702 |
-
// Let the drag handler handle this.
|
1703 |
-
if (webkit) display.scroller.draggable = true;
|
1704 |
-
cm.state.draggingText = dragEnd;
|
1705 |
-
// IE's approach to draggable
|
1706 |
-
if (display.scroller.dragDrop) display.scroller.dragDrop();
|
1707 |
-
on(document, "mouseup", dragEnd);
|
1708 |
-
on(display.scroller, "drop", dragEnd);
|
1709 |
-
return;
|
1710 |
-
}
|
1711 |
-
e_preventDefault(e);
|
1712 |
-
if (type == "single") extendSelection(cm.doc, clipPos(doc, start));
|
1713 |
-
|
1714 |
-
var startstart = sel.from, startend = sel.to, lastPos = start;
|
1715 |
-
|
1716 |
-
function doSelect(cur) {
|
1717 |
-
if (posEq(lastPos, cur)) return;
|
1718 |
-
lastPos = cur;
|
1719 |
-
|
1720 |
-
if (type == "single") {
|
1721 |
-
extendSelection(cm.doc, clipPos(doc, start), cur);
|
1722 |
-
return;
|
1723 |
-
}
|
1724 |
-
|
1725 |
-
startstart = clipPos(doc, startstart);
|
1726 |
-
startend = clipPos(doc, startend);
|
1727 |
-
if (type == "double") {
|
1728 |
-
var word = findWordAt(getLine(doc, cur.line).text, cur);
|
1729 |
-
if (posLess(cur, startstart)) extendSelection(cm.doc, word.from, startend);
|
1730 |
-
else extendSelection(cm.doc, startstart, word.to);
|
1731 |
-
} else if (type == "triple") {
|
1732 |
-
if (posLess(cur, startstart)) extendSelection(cm.doc, startend, clipPos(doc, Pos(cur.line, 0)));
|
1733 |
-
else extendSelection(cm.doc, startstart, clipPos(doc, Pos(cur.line + 1, 0)));
|
1734 |
-
}
|
1735 |
-
}
|
1736 |
-
|
1737 |
-
var editorSize = getRect(display.wrapper);
|
1738 |
-
// Used to ensure timeout re-tries don't fire when another extend
|
1739 |
-
// happened in the meantime (clearTimeout isn't reliable -- at
|
1740 |
-
// least on Chrome, the timeouts still happen even when cleared,
|
1741 |
-
// if the clear happens after their scheduled firing time).
|
1742 |
-
var counter = 0;
|
1743 |
-
|
1744 |
-
function extend(e) {
|
1745 |
-
var curCount = ++counter;
|
1746 |
-
var cur = posFromMouse(cm, e, true);
|
1747 |
-
if (!cur) return;
|
1748 |
-
if (!posEq(cur, last)) {
|
1749 |
-
if (!cm.state.focused) onFocus(cm);
|
1750 |
-
last = cur;
|
1751 |
-
doSelect(cur);
|
1752 |
-
var visible = visibleLines(display, doc);
|
1753 |
-
if (cur.line >= visible.to || cur.line < visible.from)
|
1754 |
-
setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);
|
1755 |
-
} else {
|
1756 |
-
var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
|
1757 |
-
if (outside) setTimeout(operation(cm, function() {
|
1758 |
-
if (counter != curCount) return;
|
1759 |
-
display.scroller.scrollTop += outside;
|
1760 |
-
extend(e);
|
1761 |
-
}), 50);
|
1762 |
-
}
|
1763 |
-
}
|
1764 |
-
|
1765 |
-
function done(e) {
|
1766 |
-
counter = Infinity;
|
1767 |
-
e_preventDefault(e);
|
1768 |
-
focusInput(cm);
|
1769 |
-
off(document, "mousemove", move);
|
1770 |
-
off(document, "mouseup", up);
|
1771 |
-
}
|
1772 |
-
|
1773 |
-
var move = operation(cm, function(e) {
|
1774 |
-
if (!ie && !e_button(e)) done(e);
|
1775 |
-
else extend(e);
|
1776 |
-
});
|
1777 |
-
var up = operation(cm, done);
|
1778 |
-
on(document, "mousemove", move);
|
1779 |
-
on(document, "mouseup", up);
|
1780 |
-
}
|
1781 |
-
|
1782 |
-
function clickInGutter(cm, e) {
|
1783 |
-
var display = cm.display;
|
1784 |
-
try { var mX = e.clientX, mY = e.clientY; }
|
1785 |
-
catch(e) { return false; }
|
1786 |
-
|
1787 |
-
if (mX >= Math.floor(getRect(display.gutters).right)) return false;
|
1788 |
-
e_preventDefault(e);
|
1789 |
-
if (!hasHandler(cm, "gutterClick")) return true;
|
1790 |
-
|
1791 |
-
var lineBox = getRect(display.lineDiv);
|
1792 |
-
if (mY > lineBox.bottom) return true;
|
1793 |
-
mY -= lineBox.top - display.viewOffset;
|
1794 |
-
|
1795 |
-
for (var i = 0; i < cm.options.gutters.length; ++i) {
|
1796 |
-
var g = display.gutters.childNodes[i];
|
1797 |
-
if (g && getRect(g).right >= mX) {
|
1798 |
-
var line = lineAtHeight(cm.doc, mY);
|
1799 |
-
var gutter = cm.options.gutters[i];
|
1800 |
-
signalLater(cm, "gutterClick", cm, line, gutter, e);
|
1801 |
-
break;
|
1802 |
-
}
|
1803 |
-
}
|
1804 |
-
return true;
|
1805 |
-
}
|
1806 |
-
|
1807 |
-
// Kludge to work around strange IE behavior where it'll sometimes
|
1808 |
-
// re-fire a series of drag-related events right after the drop (#1551)
|
1809 |
-
var lastDrop = 0;
|
1810 |
-
|
1811 |
-
function onDrop(e) {
|
1812 |
-
var cm = this;
|
1813 |
-
if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))))
|
1814 |
-
return;
|
1815 |
-
e_preventDefault(e);
|
1816 |
-
if (ie) lastDrop = +new Date;
|
1817 |
-
var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
|
1818 |
-
if (!pos || isReadOnly(cm)) return;
|
1819 |
-
if (files && files.length && window.FileReader && window.File) {
|
1820 |
-
var n = files.length, text = Array(n), read = 0;
|
1821 |
-
var loadFile = function(file, i) {
|
1822 |
-
var reader = new FileReader;
|
1823 |
-
reader.onload = function() {
|
1824 |
-
text[i] = reader.result;
|
1825 |
-
if (++read == n) {
|
1826 |
-
pos = clipPos(cm.doc, pos);
|
1827 |
-
makeChange(cm.doc, {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}, "around");
|
1828 |
-
}
|
1829 |
-
};
|
1830 |
-
reader.readAsText(file);
|
1831 |
-
};
|
1832 |
-
for (var i = 0; i < n; ++i) loadFile(files[i], i);
|
1833 |
-
} else {
|
1834 |
-
// Don't do a replace if the drop happened inside of the selected text.
|
1835 |
-
if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) {
|
1836 |
-
cm.state.draggingText(e);
|
1837 |
-
// Ensure the editor is re-focused
|
1838 |
-
setTimeout(bind(focusInput, cm), 20);
|
1839 |
-
return;
|
1840 |
-
}
|
1841 |
-
try {
|
1842 |
-
var text = e.dataTransfer.getData("Text");
|
1843 |
-
if (text) {
|
1844 |
-
var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to;
|
1845 |
-
setSelection(cm.doc, pos, pos);
|
1846 |
-
if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste");
|
1847 |
-
cm.replaceSelection(text, null, "paste");
|
1848 |
-
focusInput(cm);
|
1849 |
-
onFocus(cm);
|
1850 |
-
}
|
1851 |
-
}
|
1852 |
-
catch(e){}
|
1853 |
-
}
|
1854 |
-
}
|
1855 |
-
|
1856 |
-
function onDragStart(cm, e) {
|
1857 |
-
if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }
|
1858 |
-
if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
|
1859 |
-
|
1860 |
-
var txt = cm.getSelection();
|
1861 |
-
e.dataTransfer.setData("Text", txt);
|
1862 |
-
|
1863 |
-
// Use dummy image instead of default browsers image.
|
1864 |
-
// Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
|
1865 |
-
if (e.dataTransfer.setDragImage && !safari) {
|
1866 |
-
var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
|
1867 |
-
if (opera) {
|
1868 |
-
img.width = img.height = 1;
|
1869 |
-
cm.display.wrapper.appendChild(img);
|
1870 |
-
// Force a relayout, or Opera won't use our image for some obscure reason
|
1871 |
-
img._top = img.offsetTop;
|
1872 |
-
}
|
1873 |
-
e.dataTransfer.setDragImage(img, 0, 0);
|
1874 |
-
if (opera) img.parentNode.removeChild(img);
|
1875 |
-
}
|
1876 |
-
}
|
1877 |
-
|
1878 |
-
function setScrollTop(cm, val) {
|
1879 |
-
if (Math.abs(cm.doc.scrollTop - val) < 2) return;
|
1880 |
-
cm.doc.scrollTop = val;
|
1881 |
-
if (!gecko) updateDisplay(cm, [], val);
|
1882 |
-
if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;
|
1883 |
-
if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val;
|
1884 |
-
if (gecko) updateDisplay(cm, []);
|
1885 |
-
startWorker(cm, 100);
|
1886 |
-
}
|
1887 |
-
function setScrollLeft(cm, val, isScroller) {
|
1888 |
-
if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;
|
1889 |
-
val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
|
1890 |
-
cm.doc.scrollLeft = val;
|
1891 |
-
alignHorizontally(cm);
|
1892 |
-
if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;
|
1893 |
-
if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val;
|
1894 |
-
}
|
1895 |
-
|
1896 |
-
// Since the delta values reported on mouse wheel events are
|
1897 |
-
// unstandardized between browsers and even browser versions, and
|
1898 |
-
// generally horribly unpredictable, this code starts by measuring
|
1899 |
-
// the scroll effect that the first few mouse wheel events have,
|
1900 |
-
// and, from that, detects the way it can convert deltas to pixel
|
1901 |
-
// offsets afterwards.
|
1902 |
-
//
|
1903 |
-
// The reason we want to know the amount a wheel event will scroll
|
1904 |
-
// is that it gives us a chance to update the display before the
|
1905 |
-
// actual scrolling happens, reducing flickering.
|
1906 |
-
|
1907 |
-
var wheelSamples = 0, wheelPixelsPerUnit = null;
|
1908 |
-
// Fill in a browser-detected starting value on browsers where we
|
1909 |
-
// know one. These don't have to be accurate -- the result of them
|
1910 |
-
// being wrong would just be a slight flicker on the first wheel
|
1911 |
-
// scroll (if it is large enough).
|
1912 |
-
if (ie) wheelPixelsPerUnit = -.53;
|
1913 |
-
else if (gecko) wheelPixelsPerUnit = 15;
|
1914 |
-
else if (chrome) wheelPixelsPerUnit = -.7;
|
1915 |
-
else if (safari) wheelPixelsPerUnit = -1/3;
|
1916 |
-
|
1917 |
-
function onScrollWheel(cm, e) {
|
1918 |
-
var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
|
1919 |
-
if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
|
1920 |
-
if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
|
1921 |
-
else if (dy == null) dy = e.wheelDelta;
|
1922 |
-
|
1923 |
-
var display = cm.display, scroll = display.scroller;
|
1924 |
-
// Quit if there's nothing to scroll here
|
1925 |
-
if (!(dx && scroll.scrollWidth > scroll.clientWidth ||
|
1926 |
-
dy && scroll.scrollHeight > scroll.clientHeight)) return;
|
1927 |
-
|
1928 |
-
// Webkit browsers on OS X abort momentum scrolls when the target
|
1929 |
-
// of the scroll event is removed from the scrollable element.
|
1930 |
-
// This hack (see related code in patchDisplay) makes sure the
|
1931 |
-
// element is kept around.
|
1932 |
-
if (dy && mac && webkit) {
|
1933 |
-
for (var cur = e.target; cur != scroll; cur = cur.parentNode) {
|
1934 |
-
if (cur.lineObj) {
|
1935 |
-
cm.display.currentWheelTarget = cur;
|
1936 |
-
break;
|
1937 |
-
}
|
1938 |
-
}
|
1939 |
-
}
|
1940 |
-
|
1941 |
-
// On some browsers, horizontal scrolling will cause redraws to
|
1942 |
-
// happen before the gutter has been realigned, causing it to
|
1943 |
-
// wriggle around in a most unseemly way. When we have an
|
1944 |
-
// estimated pixels/delta value, we just handle horizontal
|
1945 |
-
// scrolling entirely here. It'll be slightly off from native, but
|
1946 |
-
// better than glitching out.
|
1947 |
-
if (dx && !gecko && !opera && wheelPixelsPerUnit != null) {
|
1948 |
-
if (dy)
|
1949 |
-
setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));
|
1950 |
-
setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
|
1951 |
-
e_preventDefault(e);
|
1952 |
-
display.wheelStartX = null; // Abort measurement, if in progress
|
1953 |
-
return;
|
1954 |
-
}
|
1955 |
-
|
1956 |
-
if (dy && wheelPixelsPerUnit != null) {
|
1957 |
-
var pixels = dy * wheelPixelsPerUnit;
|
1958 |
-
var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
|
1959 |
-
if (pixels < 0) top = Math.max(0, top + pixels - 50);
|
1960 |
-
else bot = Math.min(cm.doc.height, bot + pixels + 50);
|
1961 |
-
updateDisplay(cm, [], {top: top, bottom: bot});
|
1962 |
-
}
|
1963 |
-
|
1964 |
-
if (wheelSamples < 20) {
|
1965 |
-
if (display.wheelStartX == null) {
|
1966 |
-
display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
|
1967 |
-
display.wheelDX = dx; display.wheelDY = dy;
|
1968 |
-
setTimeout(function() {
|
1969 |
-
if (display.wheelStartX == null) return;
|
1970 |
-
var movedX = scroll.scrollLeft - display.wheelStartX;
|
1971 |
-
var movedY = scroll.scrollTop - display.wheelStartY;
|
1972 |
-
var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
|
1973 |
-
(movedX && display.wheelDX && movedX / display.wheelDX);
|
1974 |
-
display.wheelStartX = display.wheelStartY = null;
|
1975 |
-
if (!sample) return;
|
1976 |
-
wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
|
1977 |
-
++wheelSamples;
|
1978 |
-
}, 200);
|
1979 |
-
} else {
|
1980 |
-
display.wheelDX += dx; display.wheelDY += dy;
|
1981 |
-
}
|
1982 |
-
}
|
1983 |
-
}
|
1984 |
-
|
1985 |
-
function doHandleBinding(cm, bound, dropShift) {
|
1986 |
-
if (typeof bound == "string") {
|
1987 |
-
bound = commands[bound];
|
1988 |
-
if (!bound) return false;
|
1989 |
-
}
|
1990 |
-
// Ensure previous input has been read, so that the handler sees a
|
1991 |
-
// consistent view of the document
|
1992 |
-
if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
|
1993 |
-
var doc = cm.doc, prevShift = doc.sel.shift, done = false;
|
1994 |
-
try {
|
1995 |
-
if (isReadOnly(cm)) cm.state.suppressEdits = true;
|
1996 |
-
if (dropShift) doc.sel.shift = false;
|
1997 |
-
done = bound(cm) != Pass;
|
1998 |
-
} finally {
|
1999 |
-
doc.sel.shift = prevShift;
|
2000 |
-
cm.state.suppressEdits = false;
|
2001 |
-
}
|
2002 |
-
return done;
|
2003 |
-
}
|
2004 |
-
|
2005 |
-
function allKeyMaps(cm) {
|
2006 |
-
var maps = cm.state.keyMaps.slice(0);
|
2007 |
-
if (cm.options.extraKeys) maps.push(cm.options.extraKeys);
|
2008 |
-
maps.push(cm.options.keyMap);
|
2009 |
-
return maps;
|
2010 |
-
}
|
2011 |
-
|
2012 |
-
var maybeTransition;
|
2013 |
-
function handleKeyBinding(cm, e) {
|
2014 |
-
// Handle auto keymap transitions
|
2015 |
-
var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto;
|
2016 |
-
clearTimeout(maybeTransition);
|
2017 |
-
if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
|
2018 |
-
if (getKeyMap(cm.options.keyMap) == startMap) {
|
2019 |
-
cm.options.keyMap = (next.call ? next.call(null, cm) : next);
|
2020 |
-
keyMapChanged(cm);
|
2021 |
-
}
|
2022 |
-
}, 50);
|
2023 |
-
|
2024 |
-
var name = keyName(e, true), handled = false;
|
2025 |
-
if (!name) return false;
|
2026 |
-
var keymaps = allKeyMaps(cm);
|
2027 |
-
|
2028 |
-
if (e.shiftKey) {
|
2029 |
-
// First try to resolve full name (including 'Shift-'). Failing
|
2030 |
-
// that, see if there is a cursor-motion command (starting with
|
2031 |
-
// 'go') bound to the keyname without 'Shift-'.
|
2032 |
-
handled = lookupKey("Shift-" + name, keymaps, function(b) {return doHandleBinding(cm, b, true);})
|
2033 |
-
|| lookupKey(name, keymaps, function(b) {
|
2034 |
-
if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
|
2035 |
-
return doHandleBinding(cm, b);
|
2036 |
-
});
|
2037 |
-
} else {
|
2038 |
-
handled = lookupKey(name, keymaps, function(b) { return doHandleBinding(cm, b); });
|
2039 |
-
}
|
2040 |
-
|
2041 |
-
if (handled) {
|
2042 |
-
e_preventDefault(e);
|
2043 |
-
restartBlink(cm);
|
2044 |
-
if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
|
2045 |
-
signalLater(cm, "keyHandled", cm, name, e);
|
2046 |
-
}
|
2047 |
-
return handled;
|
2048 |
-
}
|
2049 |
-
|
2050 |
-
function handleCharBinding(cm, e, ch) {
|
2051 |
-
var handled = lookupKey("'" + ch + "'", allKeyMaps(cm),
|
2052 |
-
function(b) { return doHandleBinding(cm, b, true); });
|
2053 |
-
if (handled) {
|
2054 |
-
e_preventDefault(e);
|
2055 |
-
restartBlink(cm);
|
2056 |
-
signalLater(cm, "keyHandled", cm, "'" + ch + "'", e);
|
2057 |
-
}
|
2058 |
-
return handled;
|
2059 |
-
}
|
2060 |
-
|
2061 |
-
var lastStoppedKey = null;
|
2062 |
-
function onKeyDown(e) {
|
2063 |
-
var cm = this;
|
2064 |
-
if (!cm.state.focused) onFocus(cm);
|
2065 |
-
if (ie && e.keyCode == 27) { e.returnValue = false; }
|
2066 |
-
if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
|
2067 |
-
var code = e.keyCode;
|
2068 |
-
// IE does strange things with escape.
|
2069 |
-
cm.doc.sel.shift = code == 16 || e.shiftKey;
|
2070 |
-
// First give onKeyEvent option a chance to handle this.
|
2071 |
-
var handled = handleKeyBinding(cm, e);
|
2072 |
-
if (opera) {
|
2073 |
-
lastStoppedKey = handled ? code : null;
|
2074 |
-
// Opera has no cut event... we try to at least catch the key combo
|
2075 |
-
if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
|
2076 |
-
cm.replaceSelection("");
|
2077 |
-
}
|
2078 |
-
}
|
2079 |
-
|
2080 |
-
function onKeyPress(e) {
|
2081 |
-
var cm = this;
|
2082 |
-
if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
|
2083 |
-
var keyCode = e.keyCode, charCode = e.charCode;
|
2084 |
-
if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
|
2085 |
-
if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return;
|
2086 |
-
var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
|
2087 |
-
if (this.options.electricChars && this.doc.mode.electricChars &&
|
2088 |
-
this.options.smartIndent && !isReadOnly(this) &&
|
2089 |
-
this.doc.mode.electricChars.indexOf(ch) > -1)
|
2090 |
-
setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75);
|
2091 |
-
if (handleCharBinding(cm, e, ch)) return;
|
2092 |
-
if (ie && !ie_lt9) cm.display.inputHasSelection = null;
|
2093 |
-
fastPoll(cm);
|
2094 |
-
}
|
2095 |
-
|
2096 |
-
function onFocus(cm) {
|
2097 |
-
if (cm.options.readOnly == "nocursor") return;
|
2098 |
-
if (!cm.state.focused) {
|
2099 |
-
signal(cm, "focus", cm);
|
2100 |
-
cm.state.focused = true;
|
2101 |
-
if (cm.display.wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
|
2102 |
-
cm.display.wrapper.className += " CodeMirror-focused";
|
2103 |
-
resetInput(cm, true);
|
2104 |
-
}
|
2105 |
-
slowPoll(cm);
|
2106 |
-
restartBlink(cm);
|
2107 |
-
}
|
2108 |
-
function onBlur(cm) {
|
2109 |
-
if (cm.state.focused) {
|
2110 |
-
signal(cm, "blur", cm);
|
2111 |
-
cm.state.focused = false;
|
2112 |
-
cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-focused", "");
|
2113 |
-
}
|
2114 |
-
clearInterval(cm.display.blinker);
|
2115 |
-
setTimeout(function() {if (!cm.state.focused) cm.doc.sel.shift = false;}, 150);
|
2116 |
-
}
|
2117 |
-
|
2118 |
-
var detectingSelectAll;
|
2119 |
-
function onContextMenu(cm, e) {
|
2120 |
-
if (signalDOMEvent(cm, e, "contextmenu")) return;
|
2121 |
-
var display = cm.display, sel = cm.doc.sel;
|
2122 |
-
if (eventInWidget(display, e)) return;
|
2123 |
-
|
2124 |
-
var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
|
2125 |
-
if (!pos || opera) return; // Opera is difficult.
|
2126 |
-
if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
|
2127 |
-
operation(cm, setSelection)(cm.doc, pos, pos);
|
2128 |
-
|
2129 |
-
var oldCSS = display.input.style.cssText;
|
2130 |
-
display.inputDiv.style.position = "absolute";
|
2131 |
-
display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
|
2132 |
-
"px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" +
|
2133 |
-
"border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";
|
2134 |
-
focusInput(cm);
|
2135 |
-
resetInput(cm, true);
|
2136 |
-
// Adds "Select all" to context menu in FF
|
2137 |
-
if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = " ";
|
2138 |
-
|
2139 |
-
function prepareSelectAllHack() {
|
2140 |
-
if (display.input.selectionStart != null) {
|
2141 |
-
var extval = display.input.value = " " + (posEq(sel.from, sel.to) ? "" : display.input.value);
|
2142 |
-
display.prevInput = " ";
|
2143 |
-
display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
|
2144 |
-
}
|
2145 |
-
}
|
2146 |
-
function rehide() {
|
2147 |
-
display.inputDiv.style.position = "relative";
|
2148 |
-
display.input.style.cssText = oldCSS;
|
2149 |
-
if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos;
|
2150 |
-
slowPoll(cm);
|
2151 |
-
|
2152 |
-
// Try to detect the user choosing select-all
|
2153 |
-
if (display.input.selectionStart != null) {
|
2154 |
-
if (!ie || ie_lt9) prepareSelectAllHack();
|
2155 |
-
clearTimeout(detectingSelectAll);
|
2156 |
-
var i = 0, poll = function(){
|
2157 |
-
if (display.prevInput == " " && display.input.selectionStart == 0)
|
2158 |
-
operation(cm, commands.selectAll)(cm);
|
2159 |
-
else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500);
|
2160 |
-
else resetInput(cm);
|
2161 |
-
};
|
2162 |
-
detectingSelectAll = setTimeout(poll, 200);
|
2163 |
-
}
|
2164 |
-
}
|
2165 |
-
|
2166 |
-
if (ie && !ie_lt9) prepareSelectAllHack();
|
2167 |
-
if (captureMiddleClick) {
|
2168 |
-
e_stop(e);
|
2169 |
-
var mouseup = function() {
|
2170 |
-
off(window, "mouseup", mouseup);
|
2171 |
-
setTimeout(rehide, 20);
|
2172 |
-
};
|
2173 |
-
on(window, "mouseup", mouseup);
|
2174 |
-
} else {
|
2175 |
-
setTimeout(rehide, 50);
|
2176 |
-
}
|
2177 |
-
}
|
2178 |
-
|
2179 |
-
// UPDATING
|
2180 |
-
|
2181 |
-
var changeEnd = CodeMirror.changeEnd = function(change) {
|
2182 |
-
if (!change.text) return change.to;
|
2183 |
-
return Pos(change.from.line + change.text.length - 1,
|
2184 |
-
lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
|
2185 |
-
};
|
2186 |
-
|
2187 |
-
// Make sure a position will be valid after the given change.
|
2188 |
-
function clipPostChange(doc, change, pos) {
|
2189 |
-
if (!posLess(change.from, pos)) return clipPos(doc, pos);
|
2190 |
-
var diff = (change.text.length - 1) - (change.to.line - change.from.line);
|
2191 |
-
if (pos.line > change.to.line + diff) {
|
2192 |
-
var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1;
|
2193 |
-
if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length);
|
2194 |
-
return clipToLen(pos, getLine(doc, preLine).text.length);
|
2195 |
-
}
|
2196 |
-
if (pos.line == change.to.line + diff)
|
2197 |
-
return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) +
|
2198 |
-
getLine(doc, change.to.line).text.length - change.to.ch);
|
2199 |
-
var inside = pos.line - change.from.line;
|
2200 |
-
return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch));
|
2201 |
-
}
|
2202 |
-
|
2203 |
-
// Hint can be null|"end"|"start"|"around"|{anchor,head}
|
2204 |
-
function computeSelAfterChange(doc, change, hint) {
|
2205 |
-
if (hint && typeof hint == "object") // Assumed to be {anchor, head} object
|
2206 |
-
return {anchor: clipPostChange(doc, change, hint.anchor),
|
2207 |
-
head: clipPostChange(doc, change, hint.head)};
|
2208 |
-
|
2209 |
-
if (hint == "start") return {anchor: change.from, head: change.from};
|
2210 |
-
|
2211 |
-
var end = changeEnd(change);
|
2212 |
-
if (hint == "around") return {anchor: change.from, head: end};
|
2213 |
-
if (hint == "end") return {anchor: end, head: end};
|
2214 |
-
|
2215 |
-
// hint is null, leave the selection alone as much as possible
|
2216 |
-
var adjustPos = function(pos) {
|
2217 |
-
if (posLess(pos, change.from)) return pos;
|
2218 |
-
if (!posLess(change.to, pos)) return end;
|
2219 |
-
|
2220 |
-
var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
|
2221 |
-
if (pos.line == change.to.line) ch += end.ch - change.to.ch;
|
2222 |
-
return Pos(line, ch);
|
2223 |
-
};
|
2224 |
-
return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)};
|
2225 |
-
}
|
2226 |
-
|
2227 |
-
function filterChange(doc, change, update) {
|
2228 |
-
var obj = {
|
2229 |
-
canceled: false,
|
2230 |
-
from: change.from,
|
2231 |
-
to: change.to,
|
2232 |
-
text: change.text,
|
2233 |
-
origin: change.origin,
|
2234 |
-
cancel: function() { this.canceled = true; }
|
2235 |
-
};
|
2236 |
-
if (update) obj.update = function(from, to, text, origin) {
|
2237 |
-
if (from) this.from = clipPos(doc, from);
|
2238 |
-
if (to) this.to = clipPos(doc, to);
|
2239 |
-
if (text) this.text = text;
|
2240 |
-
if (origin !== undefined) this.origin = origin;
|
2241 |
-
};
|
2242 |
-
signal(doc, "beforeChange", doc, obj);
|
2243 |
-
if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj);
|
2244 |
-
|
2245 |
-
if (obj.canceled) return null;
|
2246 |
-
return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};
|
2247 |
-
}
|
2248 |
-
|
2249 |
-
// Replace the range from from to to by the strings in replacement.
|
2250 |
-
// change is a {from, to, text [, origin]} object
|
2251 |
-
function makeChange(doc, change, selUpdate, ignoreReadOnly) {
|
2252 |
-
if (doc.cm) {
|
2253 |
-
if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly);
|
2254 |
-
if (doc.cm.state.suppressEdits) return;
|
2255 |
-
}
|
2256 |
-
|
2257 |
-
if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
|
2258 |
-
change = filterChange(doc, change, true);
|
2259 |
-
if (!change) return;
|
2260 |
-
}
|
2261 |
-
|
2262 |
-
// Possibly split or suppress the update based on the presence
|
2263 |
-
// of read-only spans in its range.
|
2264 |
-
var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
|
2265 |
-
if (split) {
|
2266 |
-
for (var i = split.length - 1; i >= 1; --i)
|
2267 |
-
makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]});
|
2268 |
-
if (split.length)
|
2269 |
-
makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate);
|
2270 |
-
} else {
|
2271 |
-
makeChangeNoReadonly(doc, change, selUpdate);
|
2272 |
-
}
|
2273 |
-
}
|
2274 |
-
|
2275 |
-
function makeChangeNoReadonly(doc, change, selUpdate) {
|
2276 |
-
var selAfter = computeSelAfterChange(doc, change, selUpdate);
|
2277 |
-
addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
|
2278 |
-
|
2279 |
-
makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
|
2280 |
-
var rebased = [];
|
2281 |
-
|
2282 |
-
linkedDocs(doc, function(doc, sharedHist) {
|
2283 |
-
if (!sharedHist && indexOf(rebased, doc.history) == -1) {
|
2284 |
-
rebaseHist(doc.history, change);
|
2285 |
-
rebased.push(doc.history);
|
2286 |
-
}
|
2287 |
-
makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
|
2288 |
-
});
|
2289 |
-
}
|
2290 |
-
|
2291 |
-
function makeChangeFromHistory(doc, type) {
|
2292 |
-
if (doc.cm && doc.cm.state.suppressEdits) return;
|
2293 |
-
|
2294 |
-
var hist = doc.history;
|
2295 |
-
var event = (type == "undo" ? hist.done : hist.undone).pop();
|
2296 |
-
if (!event) return;
|
2297 |
-
|
2298 |
-
var anti = {changes: [], anchorBefore: event.anchorAfter, headBefore: event.headAfter,
|
2299 |
-
anchorAfter: event.anchorBefore, headAfter: event.headBefore,
|
2300 |
-
generation: hist.generation};
|
2301 |
-
(type == "undo" ? hist.undone : hist.done).push(anti);
|
2302 |
-
hist.generation = event.generation || ++hist.maxGeneration;
|
2303 |
-
|
2304 |
-
var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
|
2305 |
-
|
2306 |
-
for (var i = event.changes.length - 1; i >= 0; --i) {
|
2307 |
-
var change = event.changes[i];
|
2308 |
-
change.origin = type;
|
2309 |
-
if (filter && !filterChange(doc, change, false)) {
|
2310 |
-
(type == "undo" ? hist.done : hist.undone).length = 0;
|
2311 |
-
return;
|
2312 |
-
}
|
2313 |
-
|
2314 |
-
anti.changes.push(historyChangeFromChange(doc, change));
|
2315 |
-
|
2316 |
-
var after = i ? computeSelAfterChange(doc, change, null)
|
2317 |
-
: {anchor: event.anchorBefore, head: event.headBefore};
|
2318 |
-
makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
|
2319 |
-
var rebased = [];
|
2320 |
-
|
2321 |
-
linkedDocs(doc, function(doc, sharedHist) {
|
2322 |
-
if (!sharedHist && indexOf(rebased, doc.history) == -1) {
|
2323 |
-
rebaseHist(doc.history, change);
|
2324 |
-
rebased.push(doc.history);
|
2325 |
-
}
|
2326 |
-
makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
|
2327 |
-
});
|
2328 |
-
}
|
2329 |
-
}
|
2330 |
-
|
2331 |
-
function shiftDoc(doc, distance) {
|
2332 |
-
function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);}
|
2333 |
-
doc.first += distance;
|
2334 |
-
if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance);
|
2335 |
-
doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor);
|
2336 |
-
doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to);
|
2337 |
-
}
|
2338 |
-
|
2339 |
-
function makeChangeSingleDoc(doc, change, selAfter, spans) {
|
2340 |
-
if (doc.cm && !doc.cm.curOp)
|
2341 |
-
return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
|
2342 |
-
|
2343 |
-
if (change.to.line < doc.first) {
|
2344 |
-
shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
|
2345 |
-
return;
|
2346 |
-
}
|
2347 |
-
if (change.from.line > doc.lastLine()) return;
|
2348 |
-
|
2349 |
-
// Clip the change to the size of this doc
|
2350 |
-
if (change.from.line < doc.first) {
|
2351 |
-
var shift = change.text.length - 1 - (doc.first - change.from.line);
|
2352 |
-
shiftDoc(doc, shift);
|
2353 |
-
change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
|
2354 |
-
text: [lst(change.text)], origin: change.origin};
|
2355 |
-
}
|
2356 |
-
var last = doc.lastLine();
|
2357 |
-
if (change.to.line > last) {
|
2358 |
-
change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
|
2359 |
-
text: [change.text[0]], origin: change.origin};
|
2360 |
-
}
|
2361 |
-
|
2362 |
-
change.removed = getBetween(doc, change.from, change.to);
|
2363 |
-
|
2364 |
-
if (!selAfter) selAfter = computeSelAfterChange(doc, change, null);
|
2365 |
-
if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans, selAfter);
|
2366 |
-
else updateDoc(doc, change, spans, selAfter);
|
2367 |
-
}
|
2368 |
-
|
2369 |
-
function makeChangeSingleDocInEditor(cm, change, spans, selAfter) {
|
2370 |
-
var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
|
2371 |
-
|
2372 |
-
var recomputeMaxLength = false, checkWidthStart = from.line;
|
2373 |
-
if (!cm.options.lineWrapping) {
|
2374 |
-
checkWidthStart = lineNo(visualLine(doc, getLine(doc, from.line)));
|
2375 |
-
doc.iter(checkWidthStart, to.line + 1, function(line) {
|
2376 |
-
if (line == display.maxLine) {
|
2377 |
-
recomputeMaxLength = true;
|
2378 |
-
return true;
|
2379 |
-
}
|
2380 |
-
});
|
2381 |
-
}
|
2382 |
-
|
2383 |
-
if (!posLess(doc.sel.head, change.from) && !posLess(change.to, doc.sel.head))
|
2384 |
-
cm.curOp.cursorActivity = true;
|
2385 |
-
|
2386 |
-
updateDoc(doc, change, spans, selAfter, estimateHeight(cm));
|
2387 |
-
|
2388 |
-
if (!cm.options.lineWrapping) {
|
2389 |
-
doc.iter(checkWidthStart, from.line + change.text.length, function(line) {
|
2390 |
-
var len = lineLength(doc, line);
|
2391 |
-
if (len > display.maxLineLength) {
|
2392 |
-
display.maxLine = line;
|
2393 |
-
display.maxLineLength = len;
|
2394 |
-
display.maxLineChanged = true;
|
2395 |
-
recomputeMaxLength = false;
|
2396 |
-
}
|
2397 |
-
});
|
2398 |
-
if (recomputeMaxLength) cm.curOp.updateMaxLine = true;
|
2399 |
-
}
|
2400 |
-
|
2401 |
-
// Adjust frontier, schedule worker
|
2402 |
-
doc.frontier = Math.min(doc.frontier, from.line);
|
2403 |
-
startWorker(cm, 400);
|
2404 |
-
|
2405 |
-
var lendiff = change.text.length - (to.line - from.line) - 1;
|
2406 |
-
// Remember that these lines changed, for updating the display
|
2407 |
-
regChange(cm, from.line, to.line + 1, lendiff);
|
2408 |
-
|
2409 |
-
if (hasHandler(cm, "change")) {
|
2410 |
-
var changeObj = {from: from, to: to,
|
2411 |
-
text: change.text,
|
2412 |
-
removed: change.removed,
|
2413 |
-
origin: change.origin};
|
2414 |
-
if (cm.curOp.textChanged) {
|
2415 |
-
for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {}
|
2416 |
-
cur.next = changeObj;
|
2417 |
-
} else cm.curOp.textChanged = changeObj;
|
2418 |
-
}
|
2419 |
-
}
|
2420 |
-
|
2421 |
-
function replaceRange(doc, code, from, to, origin) {
|
2422 |
-
if (!to) to = from;
|
2423 |
-
if (posLess(to, from)) { var tmp = to; to = from; from = tmp; }
|
2424 |
-
if (typeof code == "string") code = splitLines(code);
|
2425 |
-
makeChange(doc, {from: from, to: to, text: code, origin: origin}, null);
|
2426 |
-
}
|
2427 |
-
|
2428 |
-
// POSITION OBJECT
|
2429 |
-
|
2430 |
-
function Pos(line, ch) {
|
2431 |
-
if (!(this instanceof Pos)) return new Pos(line, ch);
|
2432 |
-
this.line = line; this.ch = ch;
|
2433 |
-
}
|
2434 |
-
CodeMirror.Pos = Pos;
|
2435 |
-
|
2436 |
-
function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
|
2437 |
-
function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
|
2438 |
-
function copyPos(x) {return Pos(x.line, x.ch);}
|
2439 |
-
|
2440 |
-
// SELECTION
|
2441 |
-
|
2442 |
-
function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
|
2443 |
-
function clipPos(doc, pos) {
|
2444 |
-
if (pos.line < doc.first) return Pos(doc.first, 0);
|
2445 |
-
var last = doc.first + doc.size - 1;
|
2446 |
-
if (pos.line > last) return Pos(last, getLine(doc, last).text.length);
|
2447 |
-
return clipToLen(pos, getLine(doc, pos.line).text.length);
|
2448 |
-
}
|
2449 |
-
function clipToLen(pos, linelen) {
|
2450 |
-
var ch = pos.ch;
|
2451 |
-
if (ch == null || ch > linelen) return Pos(pos.line, linelen);
|
2452 |
-
else if (ch < 0) return Pos(pos.line, 0);
|
2453 |
-
else return pos;
|
2454 |
-
}
|
2455 |
-
function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}
|
2456 |
-
|
2457 |
-
// If shift is held, this will move the selection anchor. Otherwise,
|
2458 |
-
// it'll set the whole selection.
|
2459 |
-
function extendSelection(doc, pos, other, bias) {
|
2460 |
-
if (doc.sel.shift || doc.sel.extend) {
|
2461 |
-
var anchor = doc.sel.anchor;
|
2462 |
-
if (other) {
|
2463 |
-
var posBefore = posLess(pos, anchor);
|
2464 |
-
if (posBefore != posLess(other, anchor)) {
|
2465 |
-
anchor = pos;
|
2466 |
-
pos = other;
|
2467 |
-
} else if (posBefore != posLess(pos, other)) {
|
2468 |
-
pos = other;
|
2469 |
-
}
|
2470 |
-
}
|
2471 |
-
setSelection(doc, anchor, pos, bias);
|
2472 |
-
} else {
|
2473 |
-
setSelection(doc, pos, other || pos, bias);
|
2474 |
-
}
|
2475 |
-
if (doc.cm) doc.cm.curOp.userSelChange = true;
|
2476 |
-
}
|
2477 |
-
|
2478 |
-
function filterSelectionChange(doc, anchor, head) {
|
2479 |
-
var obj = {anchor: anchor, head: head};
|
2480 |
-
signal(doc, "beforeSelectionChange", doc, obj);
|
2481 |
-
if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
|
2482 |
-
obj.anchor = clipPos(doc, obj.anchor); obj.head = clipPos(doc, obj.head);
|
2483 |
-
return obj;
|
2484 |
-
}
|
2485 |
-
|
2486 |
-
// Update the selection. Last two args are only used by
|
2487 |
-
// updateDoc, since they have to be expressed in the line
|
2488 |
-
// numbers before the update.
|
2489 |
-
function setSelection(doc, anchor, head, bias, checkAtomic) {
|
2490 |
-
if (!checkAtomic && hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) {
|
2491 |
-
var filtered = filterSelectionChange(doc, anchor, head);
|
2492 |
-
head = filtered.head;
|
2493 |
-
anchor = filtered.anchor;
|
2494 |
-
}
|
2495 |
-
|
2496 |
-
var sel = doc.sel;
|
2497 |
-
sel.goalColumn = null;
|
2498 |
-
// Skip over atomic spans.
|
2499 |
-
if (checkAtomic || !posEq(anchor, sel.anchor))
|
2500 |
-
anchor = skipAtomic(doc, anchor, bias, checkAtomic != "push");
|
2501 |
-
if (checkAtomic || !posEq(head, sel.head))
|
2502 |
-
head = skipAtomic(doc, head, bias, checkAtomic != "push");
|
2503 |
-
|
2504 |
-
if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return;
|
2505 |
-
|
2506 |
-
sel.anchor = anchor; sel.head = head;
|
2507 |
-
var inv = posLess(head, anchor);
|
2508 |
-
sel.from = inv ? head : anchor;
|
2509 |
-
sel.to = inv ? anchor : head;
|
2510 |
-
|
2511 |
-
if (doc.cm)
|
2512 |
-
doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged =
|
2513 |
-
doc.cm.curOp.cursorActivity = true;
|
2514 |
-
|
2515 |
-
signalLater(doc, "cursorActivity", doc);
|
2516 |
-
}
|
2517 |
-
|
2518 |
-
function reCheckSelection(cm) {
|
2519 |
-
setSelection(cm.doc, cm.doc.sel.from, cm.doc.sel.to, null, "push");
|
2520 |
-
}
|
2521 |
-
|
2522 |
-
function skipAtomic(doc, pos, bias, mayClear) {
|
2523 |
-
var flipped = false, curPos = pos;
|
2524 |
-
var dir = bias || 1;
|
2525 |
-
doc.cantEdit = false;
|
2526 |
-
search: for (;;) {
|
2527 |
-
var line = getLine(doc, curPos.line);
|
2528 |
-
if (line.markedSpans) {
|
2529 |
-
for (var i = 0; i < line.markedSpans.length; ++i) {
|
2530 |
-
var sp = line.markedSpans[i], m = sp.marker;
|
2531 |
-
if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
|
2532 |
-
(sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
|
2533 |
-
if (mayClear) {
|
2534 |
-
signal(m, "beforeCursorEnter");
|
2535 |
-
if (m.explicitlyCleared) {
|
2536 |
-
if (!line.markedSpans) break;
|
2537 |
-
else {--i; continue;}
|
2538 |
-
}
|
2539 |
-
}
|
2540 |
-
if (!m.atomic) continue;
|
2541 |
-
var newPos = m.find()[dir < 0 ? "from" : "to"];
|
2542 |
-
if (posEq(newPos, curPos)) {
|
2543 |
-
newPos.ch += dir;
|
2544 |
-
if (newPos.ch < 0) {
|
2545 |
-
if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
|
2546 |
-
else newPos = null;
|
2547 |
-
} else if (newPos.ch > line.text.length) {
|
2548 |
-
if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
|
2549 |
-
else newPos = null;
|
2550 |
-
}
|
2551 |
-
if (!newPos) {
|
2552 |
-
if (flipped) {
|
2553 |
-
// Driven in a corner -- no valid cursor position found at all
|
2554 |
-
// -- try again *with* clearing, if we didn't already
|
2555 |
-
if (!mayClear) return skipAtomic(doc, pos, bias, true);
|
2556 |
-
// Otherwise, turn off editing until further notice, and return the start of the doc
|
2557 |
-
doc.cantEdit = true;
|
2558 |
-
return Pos(doc.first, 0);
|
2559 |
-
}
|
2560 |
-
flipped = true; newPos = pos; dir = -dir;
|
2561 |
-
}
|
2562 |
-
}
|
2563 |
-
curPos = newPos;
|
2564 |
-
continue search;
|
2565 |
-
}
|
2566 |
-
}
|
2567 |
-
}
|
2568 |
-
return curPos;
|
2569 |
-
}
|
2570 |
-
}
|
2571 |
-
|
2572 |
-
// SCROLLING
|
2573 |
-
|
2574 |
-
function scrollCursorIntoView(cm) {
|
2575 |
-
var coords = scrollPosIntoView(cm, cm.doc.sel.head, cm.options.cursorScrollMargin);
|
2576 |
-
if (!cm.state.focused) return;
|
2577 |
-
var display = cm.display, box = getRect(display.sizer), doScroll = null;
|
2578 |
-
if (coords.top + box.top < 0) doScroll = true;
|
2579 |
-
else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;
|
2580 |
-
if (doScroll != null && !phantom) {
|
2581 |
-
var hidden = display.cursor.style.display == "none";
|
2582 |
-
if (hidden) {
|
2583 |
-
display.cursor.style.display = "";
|
2584 |
-
display.cursor.style.left = coords.left + "px";
|
2585 |
-
display.cursor.style.top = (coords.top - display.viewOffset) + "px";
|
2586 |
-
}
|
2587 |
-
display.cursor.scrollIntoView(doScroll);
|
2588 |
-
if (hidden) display.cursor.style.display = "none";
|
2589 |
-
}
|
2590 |
-
}
|
2591 |
-
|
2592 |
-
function scrollPosIntoView(cm, pos, margin) {
|
2593 |
-
if (margin == null) margin = 0;
|
2594 |
-
for (;;) {
|
2595 |
-
var changed = false, coords = cursorCoords(cm, pos);
|
2596 |
-
var scrollPos = calculateScrollPos(cm, coords.left, coords.top - margin, coords.left, coords.bottom + margin);
|
2597 |
-
var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
|
2598 |
-
if (scrollPos.scrollTop != null) {
|
2599 |
-
setScrollTop(cm, scrollPos.scrollTop);
|
2600 |
-
if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;
|
2601 |
-
}
|
2602 |
-
if (scrollPos.scrollLeft != null) {
|
2603 |
-
setScrollLeft(cm, scrollPos.scrollLeft);
|
2604 |
-
if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;
|
2605 |
-
}
|
2606 |
-
if (!changed) return coords;
|
2607 |
-
}
|
2608 |
-
}
|
2609 |
-
|
2610 |
-
function scrollIntoView(cm, x1, y1, x2, y2) {
|
2611 |
-
var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
|
2612 |
-
if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
|
2613 |
-
if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
|
2614 |
-
}
|
2615 |
-
|
2616 |
-
function calculateScrollPos(cm, x1, y1, x2, y2) {
|
2617 |
-
var display = cm.display, snapMargin = textHeight(cm.display);
|
2618 |
-
if (y1 < 0) y1 = 0;
|
2619 |
-
var screen = display.scroller.clientHeight - scrollerCutOff, screentop = display.scroller.scrollTop, result = {};
|
2620 |
-
var docBottom = cm.doc.height + paddingVert(display);
|
2621 |
-
var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;
|
2622 |
-
if (y1 < screentop) {
|
2623 |
-
result.scrollTop = atTop ? 0 : y1;
|
2624 |
-
} else if (y2 > screentop + screen) {
|
2625 |
-
var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);
|
2626 |
-
if (newTop != screentop) result.scrollTop = newTop;
|
2627 |
-
}
|
2628 |
-
|
2629 |
-
var screenw = display.scroller.clientWidth - scrollerCutOff, screenleft = display.scroller.scrollLeft;
|
2630 |
-
x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth;
|
2631 |
-
var gutterw = display.gutters.offsetWidth;
|
2632 |
-
var atLeft = x1 < gutterw + 10;
|
2633 |
-
if (x1 < screenleft + gutterw || atLeft) {
|
2634 |
-
if (atLeft) x1 = 0;
|
2635 |
-
result.scrollLeft = Math.max(0, x1 - 10 - gutterw);
|
2636 |
-
} else if (x2 > screenw + screenleft - 3) {
|
2637 |
-
result.scrollLeft = x2 + 10 - screenw;
|
2638 |
-
}
|
2639 |
-
return result;
|
2640 |
-
}
|
2641 |
-
|
2642 |
-
function updateScrollPos(cm, left, top) {
|
2643 |
-
cm.curOp.updateScrollPos = {scrollLeft: left == null ? cm.doc.scrollLeft : left,
|
2644 |
-
scrollTop: top == null ? cm.doc.scrollTop : top};
|
2645 |
-
}
|
2646 |
-
|
2647 |
-
function addToScrollPos(cm, left, top) {
|
2648 |
-
var pos = cm.curOp.updateScrollPos || (cm.curOp.updateScrollPos = {scrollLeft: cm.doc.scrollLeft, scrollTop: cm.doc.scrollTop});
|
2649 |
-
var scroll = cm.display.scroller;
|
2650 |
-
pos.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, pos.scrollTop + top));
|
2651 |
-
pos.scrollLeft = Math.max(0, Math.min(scroll.scrollWidth - scroll.clientWidth, pos.scrollLeft + left));
|
2652 |
-
}
|
2653 |
-
|
2654 |
-
// API UTILITIES
|
2655 |
-
|
2656 |
-
function indentLine(cm, n, how, aggressive) {
|
2657 |
-
var doc = cm.doc;
|
2658 |
-
if (how == null) how = "add";
|
2659 |
-
if (how == "smart") {
|
2660 |
-
if (!cm.doc.mode.indent) how = "prev";
|
2661 |
-
else var state = getStateBefore(cm, n);
|
2662 |
-
}
|
2663 |
-
|
2664 |
-
var tabSize = cm.options.tabSize;
|
2665 |
-
var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
|
2666 |
-
var curSpaceString = line.text.match(/^\s*/)[0], indentation;
|
2667 |
-
if (how == "smart") {
|
2668 |
-
indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
|
2669 |
-
if (indentation == Pass) {
|
2670 |
-
if (!aggressive) return;
|
2671 |
-
how = "prev";
|
2672 |
-
}
|
2673 |
-
}
|
2674 |
-
if (how == "prev") {
|
2675 |
-
if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);
|
2676 |
-
else indentation = 0;
|
2677 |
-
} else if (how == "add") {
|
2678 |
-
indentation = curSpace + cm.options.indentUnit;
|
2679 |
-
} else if (how == "subtract") {
|
2680 |
-
indentation = curSpace - cm.options.indentUnit;
|
2681 |
-
} else if (typeof how == "number") {
|
2682 |
-
indentation = curSpace + how;
|
2683 |
-
}
|
2684 |
-
indentation = Math.max(0, indentation);
|
2685 |
-
|
2686 |
-
var indentString = "", pos = 0;
|
2687 |
-
if (cm.options.indentWithTabs)
|
2688 |
-
for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";}
|
2689 |
-
if (pos < indentation) indentString += spaceStr(indentation - pos);
|
2690 |
-
|
2691 |
-
if (indentString != curSpaceString)
|
2692 |
-
replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
|
2693 |
-
line.stateAfter = null;
|
2694 |
-
}
|
2695 |
-
|
2696 |
-
function changeLine(cm, handle, op) {
|
2697 |
-
var no = handle, line = handle, doc = cm.doc;
|
2698 |
-
if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
|
2699 |
-
else no = lineNo(handle);
|
2700 |
-
if (no == null) return null;
|
2701 |
-
if (op(line, no)) regChange(cm, no, no + 1);
|
2702 |
-
else return null;
|
2703 |
-
return line;
|
2704 |
-
}
|
2705 |
-
|
2706 |
-
function findPosH(doc, pos, dir, unit, visually) {
|
2707 |
-
var line = pos.line, ch = pos.ch, origDir = dir;
|
2708 |
-
var lineObj = getLine(doc, line);
|
2709 |
-
var possible = true;
|
2710 |
-
function findNextLine() {
|
2711 |
-
var l = line + dir;
|
2712 |
-
if (l < doc.first || l >= doc.first + doc.size) return (possible = false);
|
2713 |
-
line = l;
|
2714 |
-
return lineObj = getLine(doc, l);
|
2715 |
-
}
|
2716 |
-
function moveOnce(boundToLine) {
|
2717 |
-
var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
|
2718 |
-
if (next == null) {
|
2719 |
-
if (!boundToLine && findNextLine()) {
|
2720 |
-
if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
|
2721 |
-
else ch = dir < 0 ? lineObj.text.length : 0;
|
2722 |
-
} else return (possible = false);
|
2723 |
-
} else ch = next;
|
2724 |
-
return true;
|
2725 |
-
}
|
2726 |
-
|
2727 |
-
if (unit == "char") moveOnce();
|
2728 |
-
else if (unit == "column") moveOnce(true);
|
2729 |
-
else if (unit == "word" || unit == "group") {
|
2730 |
-
var sawType = null, group = unit == "group";
|
2731 |
-
for (var first = true;; first = false) {
|
2732 |
-
if (dir < 0 && !moveOnce(!first)) break;
|
2733 |
-
var cur = lineObj.text.charAt(ch) || "\n";
|
2734 |
-
var type = isWordChar(cur) ? "w"
|
2735 |
-
: !group ? null
|
2736 |
-
: /\s/.test(cur) ? null
|
2737 |
-
: "p";
|
2738 |
-
if (sawType && sawType != type) {
|
2739 |
-
if (dir < 0) {dir = 1; moveOnce();}
|
2740 |
-
break;
|
2741 |
-
}
|
2742 |
-
if (type) sawType = type;
|
2743 |
-
if (dir > 0 && !moveOnce(!first)) break;
|
2744 |
-
}
|
2745 |
-
}
|
2746 |
-
var result = skipAtomic(doc, Pos(line, ch), origDir, true);
|
2747 |
-
if (!possible) result.hitSide = true;
|
2748 |
-
return result;
|
2749 |
-
}
|
2750 |
-
|
2751 |
-
function findPosV(cm, pos, dir, unit) {
|
2752 |
-
var doc = cm.doc, x = pos.left, y;
|
2753 |
-
if (unit == "page") {
|
2754 |
-
var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
|
2755 |
-
y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));
|
2756 |
-
} else if (unit == "line") {
|
2757 |
-
y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
|
2758 |
-
}
|
2759 |
-
for (;;) {
|
2760 |
-
var target = coordsChar(cm, x, y);
|
2761 |
-
if (!target.outside) break;
|
2762 |
-
if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }
|
2763 |
-
y += dir * 5;
|
2764 |
-
}
|
2765 |
-
return target;
|
2766 |
-
}
|
2767 |
-
|
2768 |
-
function findWordAt(line, pos) {
|
2769 |
-
var start = pos.ch, end = pos.ch;
|
2770 |
-
if (line) {
|
2771 |
-
if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;
|
2772 |
-
var startChar = line.charAt(start);
|
2773 |
-
var check = isWordChar(startChar) ? isWordChar
|
2774 |
-
: /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
|
2775 |
-
: function(ch) {return !/\s/.test(ch) && !isWordChar(ch);};
|
2776 |
-
while (start > 0 && check(line.charAt(start - 1))) --start;
|
2777 |
-
while (end < line.length && check(line.charAt(end))) ++end;
|
2778 |
-
}
|
2779 |
-
return {from: Pos(pos.line, start), to: Pos(pos.line, end)};
|
2780 |
-
}
|
2781 |
-
|
2782 |
-
function selectLine(cm, line) {
|
2783 |
-
extendSelection(cm.doc, Pos(line, 0), clipPos(cm.doc, Pos(line + 1, 0)));
|
2784 |
-
}
|
2785 |
-
|
2786 |
-
// PROTOTYPE
|
2787 |
-
|
2788 |
-
// The publicly visible API. Note that operation(null, f) means
|
2789 |
-
// 'wrap f in an operation, performed on its `this` parameter'
|
2790 |
-
|
2791 |
-
CodeMirror.prototype = {
|
2792 |
-
constructor: CodeMirror,
|
2793 |
-
focus: function(){window.focus(); focusInput(this); onFocus(this); fastPoll(this);},
|
2794 |
-
|
2795 |
-
setOption: function(option, value) {
|
2796 |
-
var options = this.options, old = options[option];
|
2797 |
-
if (options[option] == value && option != "mode") return;
|
2798 |
-
options[option] = value;
|
2799 |
-
if (optionHandlers.hasOwnProperty(option))
|
2800 |
-
operation(this, optionHandlers[option])(this, value, old);
|
2801 |
-
},
|
2802 |
-
|
2803 |
-
getOption: function(option) {return this.options[option];},
|
2804 |
-
getDoc: function() {return this.doc;},
|
2805 |
-
|
2806 |
-
addKeyMap: function(map, bottom) {
|
2807 |
-
this.state.keyMaps[bottom ? "push" : "unshift"](map);
|
2808 |
-
},
|
2809 |
-
removeKeyMap: function(map) {
|
2810 |
-
var maps = this.state.keyMaps;
|
2811 |
-
for (var i = 0; i < maps.length; ++i)
|
2812 |
-
if (maps[i] == map || (typeof maps[i] != "string" && maps[i].name == map)) {
|
2813 |
-
maps.splice(i, 1);
|
2814 |
-
return true;
|
2815 |
-
}
|
2816 |
-
},
|
2817 |
-
|
2818 |
-
addOverlay: operation(null, function(spec, options) {
|
2819 |
-
var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
|
2820 |
-
if (mode.startState) throw new Error("Overlays may not be stateful.");
|
2821 |
-
this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});
|
2822 |
-
this.state.modeGen++;
|
2823 |
-
regChange(this);
|
2824 |
-
}),
|
2825 |
-
removeOverlay: operation(null, function(spec) {
|
2826 |
-
var overlays = this.state.overlays;
|
2827 |
-
for (var i = 0; i < overlays.length; ++i) {
|
2828 |
-
var cur = overlays[i].modeSpec;
|
2829 |
-
if (cur == spec || typeof spec == "string" && cur.name == spec) {
|
2830 |
-
overlays.splice(i, 1);
|
2831 |
-
this.state.modeGen++;
|
2832 |
-
regChange(this);
|
2833 |
-
return;
|
2834 |
-
}
|
2835 |
-
}
|
2836 |
-
}),
|
2837 |
-
|
2838 |
-
indentLine: operation(null, function(n, dir, aggressive) {
|
2839 |
-
if (typeof dir != "string" && typeof dir != "number") {
|
2840 |
-
if (dir == null) dir = this.options.smartIndent ? "smart" : "prev";
|
2841 |
-
else dir = dir ? "add" : "subtract";
|
2842 |
-
}
|
2843 |
-
if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);
|
2844 |
-
}),
|
2845 |
-
indentSelection: operation(null, function(how) {
|
2846 |
-
var sel = this.doc.sel;
|
2847 |
-
if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how);
|
2848 |
-
var e = sel.to.line - (sel.to.ch ? 0 : 1);
|
2849 |
-
for (var i = sel.from.line; i <= e; ++i) indentLine(this, i, how);
|
2850 |
-
}),
|
2851 |
-
|
2852 |
-
// Fetch the parser token for a given character. Useful for hacks
|
2853 |
-
// that want to inspect the mode state (say, for completion).
|
2854 |
-
getTokenAt: function(pos, precise) {
|
2855 |
-
var doc = this.doc;
|
2856 |
-
pos = clipPos(doc, pos);
|
2857 |
-
var state = getStateBefore(this, pos.line, precise), mode = this.doc.mode;
|
2858 |
-
var line = getLine(doc, pos.line);
|
2859 |
-
var stream = new StringStream(line.text, this.options.tabSize);
|
2860 |
-
while (stream.pos < pos.ch && !stream.eol()) {
|
2861 |
-
stream.start = stream.pos;
|
2862 |
-
var style = mode.token(stream, state);
|
2863 |
-
}
|
2864 |
-
return {start: stream.start,
|
2865 |
-
end: stream.pos,
|
2866 |
-
string: stream.current(),
|
2867 |
-
className: style || null, // Deprecated, use 'type' instead
|
2868 |
-
type: style || null,
|
2869 |
-
state: state};
|
2870 |
-
},
|
2871 |
-
|
2872 |
-
getTokenTypeAt: function(pos) {
|
2873 |
-
pos = clipPos(this.doc, pos);
|
2874 |
-
var styles = getLineStyles(this, getLine(this.doc, pos.line));
|
2875 |
-
var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
|
2876 |
-
if (ch == 0) return styles[2];
|
2877 |
-
for (;;) {
|
2878 |
-
var mid = (before + after) >> 1;
|
2879 |
-
if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;
|
2880 |
-
else if (styles[mid * 2 + 1] < ch) before = mid + 1;
|
2881 |
-
else return styles[mid * 2 + 2];
|
2882 |
-
}
|
2883 |
-
},
|
2884 |
-
|
2885 |
-
getModeAt: function(pos) {
|
2886 |
-
var mode = this.doc.mode;
|
2887 |
-
if (!mode.innerMode) return mode;
|
2888 |
-
return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
|
2889 |
-
},
|
2890 |
-
|
2891 |
-
getHelper: function(pos, type) {
|
2892 |
-
if (!helpers.hasOwnProperty(type)) return;
|
2893 |
-
var help = helpers[type], mode = this.getModeAt(pos);
|
2894 |
-
return mode[type] && help[mode[type]] ||
|
2895 |
-
mode.helperType && help[mode.helperType] ||
|
2896 |
-
help[mode.name];
|
2897 |
-
},
|
2898 |
-
|
2899 |
-
getStateAfter: function(line, precise) {
|
2900 |
-
var doc = this.doc;
|
2901 |
-
line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
|
2902 |
-
return getStateBefore(this, line + 1, precise);
|
2903 |
-
},
|
2904 |
-
|
2905 |
-
cursorCoords: function(start, mode) {
|
2906 |
-
var pos, sel = this.doc.sel;
|
2907 |
-
if (start == null) pos = sel.head;
|
2908 |
-
else if (typeof start == "object") pos = clipPos(this.doc, start);
|
2909 |
-
else pos = start ? sel.from : sel.to;
|
2910 |
-
return cursorCoords(this, pos, mode || "page");
|
2911 |
-
},
|
2912 |
-
|
2913 |
-
charCoords: function(pos, mode) {
|
2914 |
-
return charCoords(this, clipPos(this.doc, pos), mode || "page");
|
2915 |
-
},
|
2916 |
-
|
2917 |
-
coordsChar: function(coords, mode) {
|
2918 |
-
coords = fromCoordSystem(this, coords, mode || "page");
|
2919 |
-
return coordsChar(this, coords.left, coords.top);
|
2920 |
-
},
|
2921 |
-
|
2922 |
-
lineAtHeight: function(height, mode) {
|
2923 |
-
height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
|
2924 |
-
return lineAtHeight(this.doc, height + this.display.viewOffset);
|
2925 |
-
},
|
2926 |
-
heightAtLine: function(line, mode) {
|
2927 |
-
var end = false, last = this.doc.first + this.doc.size - 1;
|
2928 |
-
if (line < this.doc.first) line = this.doc.first;
|
2929 |
-
else if (line > last) { line = last; end = true; }
|
2930 |
-
var lineObj = getLine(this.doc, line);
|
2931 |
-
return intoCoordSystem(this, getLine(this.doc, line), {top: 0, left: 0}, mode || "page").top +
|
2932 |
-
(end ? lineObj.height : 0);
|
2933 |
-
},
|
2934 |
-
|
2935 |
-
defaultTextHeight: function() { return textHeight(this.display); },
|
2936 |
-
defaultCharWidth: function() { return charWidth(this.display); },
|
2937 |
-
|
2938 |
-
setGutterMarker: operation(null, function(line, gutterID, value) {
|
2939 |
-
return changeLine(this, line, function(line) {
|
2940 |
-
var markers = line.gutterMarkers || (line.gutterMarkers = {});
|
2941 |
-
markers[gutterID] = value;
|
2942 |
-
if (!value && isEmpty(markers)) line.gutterMarkers = null;
|
2943 |
-
return true;
|
2944 |
-
});
|
2945 |
-
}),
|
2946 |
-
|
2947 |
-
clearGutter: operation(null, function(gutterID) {
|
2948 |
-
var cm = this, doc = cm.doc, i = doc.first;
|
2949 |
-
doc.iter(function(line) {
|
2950 |
-
if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
|
2951 |
-
line.gutterMarkers[gutterID] = null;
|
2952 |
-
regChange(cm, i, i + 1);
|
2953 |
-
if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;
|
2954 |
-
}
|
2955 |
-
++i;
|
2956 |
-
});
|
2957 |
-
}),
|
2958 |
-
|
2959 |
-
addLineClass: operation(null, function(handle, where, cls) {
|
2960 |
-
return changeLine(this, handle, function(line) {
|
2961 |
-
var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
|
2962 |
-
if (!line[prop]) line[prop] = cls;
|
2963 |
-
else if (new RegExp("(?:^|\\s)" + cls + "(?:$|\\s)").test(line[prop])) return false;
|
2964 |
-
else line[prop] += " " + cls;
|
2965 |
-
return true;
|
2966 |
-
});
|
2967 |
-
}),
|
2968 |
-
|
2969 |
-
removeLineClass: operation(null, function(handle, where, cls) {
|
2970 |
-
return changeLine(this, handle, function(line) {
|
2971 |
-
var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
|
2972 |
-
var cur = line[prop];
|
2973 |
-
if (!cur) return false;
|
2974 |
-
else if (cls == null) line[prop] = null;
|
2975 |
-
else {
|
2976 |
-
var found = cur.match(new RegExp("(?:^|\\s+)" + cls + "(?:$|\\s+)"));
|
2977 |
-
if (!found) return false;
|
2978 |
-
var end = found.index + found[0].length;
|
2979 |
-
line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
|
2980 |
-
}
|
2981 |
-
return true;
|
2982 |
-
});
|
2983 |
-
}),
|
2984 |
-
|
2985 |
-
addLineWidget: operation(null, function(handle, node, options) {
|
2986 |
-
return addLineWidget(this, handle, node, options);
|
2987 |
-
}),
|
2988 |
-
|
2989 |
-
removeLineWidget: function(widget) { widget.clear(); },
|
2990 |
-
|
2991 |
-
lineInfo: function(line) {
|
2992 |
-
if (typeof line == "number") {
|
2993 |
-
if (!isLine(this.doc, line)) return null;
|
2994 |
-
var n = line;
|
2995 |
-
line = getLine(this.doc, line);
|
2996 |
-
if (!line) return null;
|
2997 |
-
} else {
|
2998 |
-
var n = lineNo(line);
|
2999 |
-
if (n == null) return null;
|
3000 |
-
}
|
3001 |
-
return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
|
3002 |
-
textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
|
3003 |
-
widgets: line.widgets};
|
3004 |
-
},
|
3005 |
-
|
3006 |
-
getViewport: function() { return {from: this.display.showingFrom, to: this.display.showingTo};},
|
3007 |
-
|
3008 |
-
addWidget: function(pos, node, scroll, vert, horiz) {
|
3009 |
-
var display = this.display;
|
3010 |
-
pos = cursorCoords(this, clipPos(this.doc, pos));
|
3011 |
-
var top = pos.bottom, left = pos.left;
|
3012 |
-
node.style.position = "absolute";
|
3013 |
-
display.sizer.appendChild(node);
|
3014 |
-
if (vert == "over") {
|
3015 |
-
top = pos.top;
|
3016 |
-
} else if (vert == "above" || vert == "near") {
|
3017 |
-
var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
|
3018 |
-
hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
|
3019 |
-
// Default to positioning above (if specified and possible); otherwise default to positioning below
|
3020 |
-
if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
|
3021 |
-
top = pos.top - node.offsetHeight;
|
3022 |
-
else if (pos.bottom + node.offsetHeight <= vspace)
|
3023 |
-
top = pos.bottom;
|
3024 |
-
if (left + node.offsetWidth > hspace)
|
3025 |
-
left = hspace - node.offsetWidth;
|
3026 |
-
}
|
3027 |
-
node.style.top = top + "px";
|
3028 |
-
node.style.left = node.style.right = "";
|
3029 |
-
if (horiz == "right") {
|
3030 |
-
left = display.sizer.clientWidth - node.offsetWidth;
|
3031 |
-
node.style.right = "0px";
|
3032 |
-
} else {
|
3033 |
-
if (horiz == "left") left = 0;
|
3034 |
-
else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2;
|
3035 |
-
node.style.left = left + "px";
|
3036 |
-
}
|
3037 |
-
if (scroll)
|
3038 |
-
scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);
|
3039 |
-
},
|
3040 |
-
|
3041 |
-
triggerOnKeyDown: operation(null, onKeyDown),
|
3042 |
-
|
3043 |
-
execCommand: function(cmd) {return commands[cmd](this);},
|
3044 |
-
|
3045 |
-
findPosH: function(from, amount, unit, visually) {
|
3046 |
-
var dir = 1;
|
3047 |
-
if (amount < 0) { dir = -1; amount = -amount; }
|
3048 |
-
for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
|
3049 |
-
cur = findPosH(this.doc, cur, dir, unit, visually);
|
3050 |
-
if (cur.hitSide) break;
|
3051 |
-
}
|
3052 |
-
return cur;
|
3053 |
-
},
|
3054 |
-
|
3055 |
-
moveH: operation(null, function(dir, unit) {
|
3056 |
-
var sel = this.doc.sel, pos;
|
3057 |
-
if (sel.shift || sel.extend || posEq(sel.from, sel.to))
|
3058 |
-
pos = findPosH(this.doc, sel.head, dir, unit, this.options.rtlMoveVisually);
|
3059 |
-
else
|
3060 |
-
pos = dir < 0 ? sel.from : sel.to;
|
3061 |
-
extendSelection(this.doc, pos, pos, dir);
|
3062 |
-
}),
|
3063 |
-
|
3064 |
-
deleteH: operation(null, function(dir, unit) {
|
3065 |
-
var sel = this.doc.sel;
|
3066 |
-
if (!posEq(sel.from, sel.to)) replaceRange(this.doc, "", sel.from, sel.to, "+delete");
|
3067 |
-
else replaceRange(this.doc, "", sel.from, findPosH(this.doc, sel.head, dir, unit, false), "+delete");
|
3068 |
-
this.curOp.userSelChange = true;
|
3069 |
-
}),
|
3070 |
-
|
3071 |
-
findPosV: function(from, amount, unit, goalColumn) {
|
3072 |
-
var dir = 1, x = goalColumn;
|
3073 |
-
if (amount < 0) { dir = -1; amount = -amount; }
|
3074 |
-
for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
|
3075 |
-
var coords = cursorCoords(this, cur, "div");
|
3076 |
-
if (x == null) x = coords.left;
|
3077 |
-
else coords.left = x;
|
3078 |
-
cur = findPosV(this, coords, dir, unit);
|
3079 |
-
if (cur.hitSide) break;
|
3080 |
-
}
|
3081 |
-
return cur;
|
3082 |
-
},
|
3083 |
-
|
3084 |
-
moveV: operation(null, function(dir, unit) {
|
3085 |
-
var sel = this.doc.sel;
|
3086 |
-
var pos = cursorCoords(this, sel.head, "div");
|
3087 |
-
if (sel.goalColumn != null) pos.left = sel.goalColumn;
|
3088 |
-
var target = findPosV(this, pos, dir, unit);
|
3089 |
-
|
3090 |
-
if (unit == "page") addToScrollPos(this, 0, charCoords(this, target, "div").top - pos.top);
|
3091 |
-
extendSelection(this.doc, target, target, dir);
|
3092 |
-
sel.goalColumn = pos.left;
|
3093 |
-
}),
|
3094 |
-
|
3095 |
-
toggleOverwrite: function(value) {
|
3096 |
-
if (value != null && value == this.state.overwrite) return;
|
3097 |
-
if (this.state.overwrite = !this.state.overwrite)
|
3098 |
-
this.display.cursor.className += " CodeMirror-overwrite";
|
3099 |
-
else
|
3100 |
-
this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", "");
|
3101 |
-
},
|
3102 |
-
hasFocus: function() { return this.state.focused; },
|
3103 |
-
|
3104 |
-
scrollTo: operation(null, function(x, y) {
|
3105 |
-
updateScrollPos(this, x, y);
|
3106 |
-
}),
|
3107 |
-
getScrollInfo: function() {
|
3108 |
-
var scroller = this.display.scroller, co = scrollerCutOff;
|
3109 |
-
return {left: scroller.scrollLeft, top: scroller.scrollTop,
|
3110 |
-
height: scroller.scrollHeight - co, width: scroller.scrollWidth - co,
|
3111 |
-
clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co};
|
3112 |
-
},
|
3113 |
-
|
3114 |
-
scrollIntoView: operation(null, function(pos, margin) {
|
3115 |
-
if (typeof pos == "number") pos = Pos(pos, 0);
|
3116 |
-
if (!margin) margin = 0;
|
3117 |
-
var coords = pos;
|
3118 |
-
|
3119 |
-
if (!pos || pos.line != null) {
|
3120 |
-
this.curOp.scrollToPos = pos ? clipPos(this.doc, pos) : this.doc.sel.head;
|
3121 |
-
this.curOp.scrollToPosMargin = margin;
|
3122 |
-
coords = cursorCoords(this, this.curOp.scrollToPos);
|
3123 |
-
}
|
3124 |
-
var sPos = calculateScrollPos(this, coords.left, coords.top - margin, coords.right, coords.bottom + margin);
|
3125 |
-
updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop);
|
3126 |
-
}),
|
3127 |
-
|
3128 |
-
setSize: operation(null, function(width, height) {
|
3129 |
-
function interpret(val) {
|
3130 |
-
return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
|
3131 |
-
}
|
3132 |
-
if (width != null) this.display.wrapper.style.width = interpret(width);
|
3133 |
-
if (height != null) this.display.wrapper.style.height = interpret(height);
|
3134 |
-
if (this.options.lineWrapping)
|
3135 |
-
this.display.measureLineCache.length = this.display.measureLineCachePos = 0;
|
3136 |
-
this.curOp.forceUpdate = true;
|
3137 |
-
}),
|
3138 |
-
|
3139 |
-
operation: function(f){return runInOp(this, f);},
|
3140 |
-
|
3141 |
-
refresh: operation(null, function() {
|
3142 |
-
clearCaches(this);
|
3143 |
-
updateScrollPos(this, this.doc.scrollLeft, this.doc.scrollTop);
|
3144 |
-
regChange(this);
|
3145 |
-
}),
|
3146 |
-
|
3147 |
-
swapDoc: operation(null, function(doc) {
|
3148 |
-
var old = this.doc;
|
3149 |
-
old.cm = null;
|
3150 |
-
attachDoc(this, doc);
|
3151 |
-
clearCaches(this);
|
3152 |
-
resetInput(this, true);
|
3153 |
-
updateScrollPos(this, doc.scrollLeft, doc.scrollTop);
|
3154 |
-
return old;
|
3155 |
-
}),
|
3156 |
-
|
3157 |
-
getInputField: function(){return this.display.input;},
|
3158 |
-
getWrapperElement: function(){return this.display.wrapper;},
|
3159 |
-
getScrollerElement: function(){return this.display.scroller;},
|
3160 |
-
getGutterElement: function(){return this.display.gutters;}
|
3161 |
-
};
|
3162 |
-
eventMixin(CodeMirror);
|
3163 |
-
|
3164 |
-
// OPTION DEFAULTS
|
3165 |
-
|
3166 |
-
var optionHandlers = CodeMirror.optionHandlers = {};
|
3167 |
-
|
3168 |
-
// The default configuration options.
|
3169 |
-
var defaults = CodeMirror.defaults = {};
|
3170 |
-
|
3171 |
-
function option(name, deflt, handle, notOnInit) {
|
3172 |
-
CodeMirror.defaults[name] = deflt;
|
3173 |
-
if (handle) optionHandlers[name] =
|
3174 |
-
notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;
|
3175 |
-
}
|
3176 |
-
|
3177 |
-
var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}};
|
3178 |
-
|
3179 |
-
// These two are, on init, called from the constructor because they
|
3180 |
-
// have to be initialized before the editor can start at all.
|
3181 |
-
option("value", "", function(cm, val) {
|
3182 |
-
cm.setValue(val);
|
3183 |
-
}, true);
|
3184 |
-
option("mode", null, function(cm, val) {
|
3185 |
-
cm.doc.modeOption = val;
|
3186 |
-
loadMode(cm);
|
3187 |
-
}, true);
|
3188 |
-
|
3189 |
-
option("indentUnit", 2, loadMode, true);
|
3190 |
-
option("indentWithTabs", false);
|
3191 |
-
option("smartIndent", true);
|
3192 |
-
option("tabSize", 4, function(cm) {
|
3193 |
-
loadMode(cm);
|
3194 |
-
clearCaches(cm);
|
3195 |
-
regChange(cm);
|
3196 |
-
}, true);
|
3197 |
-
option("electricChars", true);
|
3198 |
-
option("rtlMoveVisually", !windows);
|
3199 |
-
|
3200 |
-
option("theme", "default", function(cm) {
|
3201 |
-
themeChanged(cm);
|
3202 |
-
guttersChanged(cm);
|
3203 |
-
}, true);
|
3204 |
-
option("keyMap", "default", keyMapChanged);
|
3205 |
-
option("extraKeys", null);
|
3206 |
-
|
3207 |
-
option("onKeyEvent", null);
|
3208 |
-
option("onDragEvent", null);
|
3209 |
-
|
3210 |
-
option("lineWrapping", false, wrappingChanged, true);
|
3211 |
-
option("gutters", [], function(cm) {
|
3212 |
-
setGuttersForLineNumbers(cm.options);
|
3213 |
-
guttersChanged(cm);
|
3214 |
-
}, true);
|
3215 |
-
option("fixedGutter", true, function(cm, val) {
|
3216 |
-
cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
|
3217 |
-
cm.refresh();
|
3218 |
-
}, true);
|
3219 |
-
option("coverGutterNextToScrollbar", false, updateScrollbars, true);
|
3220 |
-
option("lineNumbers", false, function(cm) {
|
3221 |
-
setGuttersForLineNumbers(cm.options);
|
3222 |
-
guttersChanged(cm);
|
3223 |
-
}, true);
|
3224 |
-
option("firstLineNumber", 1, guttersChanged, true);
|
3225 |
-
option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true);
|
3226 |
-
option("showCursorWhenSelecting", false, updateSelection, true);
|
3227 |
-
|
3228 |
-
option("readOnly", false, function(cm, val) {
|
3229 |
-
if (val == "nocursor") {onBlur(cm); cm.display.input.blur();}
|
3230 |
-
else if (!val) resetInput(cm, true);
|
3231 |
-
});
|
3232 |
-
option("dragDrop", true);
|
3233 |
-
|
3234 |
-
option("cursorBlinkRate", 530);
|
3235 |
-
option("cursorScrollMargin", 0);
|
3236 |
-
option("cursorHeight", 1);
|
3237 |
-
option("workTime", 100);
|
3238 |
-
option("workDelay", 100);
|
3239 |
-
option("flattenSpans", true);
|
3240 |
-
option("pollInterval", 100);
|
3241 |
-
option("undoDepth", 40, function(cm, val){cm.doc.history.undoDepth = val;});
|
3242 |
-
option("historyEventDelay", 500);
|
3243 |
-
option("viewportMargin", 10, function(cm){cm.refresh();}, true);
|
3244 |
-
option("maxHighlightLength", 10000, function(cm){loadMode(cm); cm.refresh();}, true);
|
3245 |
-
option("moveInputWithCursor", true, function(cm, val) {
|
3246 |
-
if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0;
|
3247 |
-
});
|
3248 |
-
|
3249 |
-
option("tabindex", null, function(cm, val) {
|
3250 |
-
cm.display.input.tabIndex = val || "";
|
3251 |
-
});
|
3252 |
-
option("autofocus", null);
|
3253 |
-
|
3254 |
-
// MODE DEFINITION AND QUERYING
|
3255 |
-
|
3256 |
-
// Known modes, by name and by MIME
|
3257 |
-
var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
|
3258 |
-
|
3259 |
-
CodeMirror.defineMode = function(name, mode) {
|
3260 |
-
if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
|
3261 |
-
if (arguments.length > 2) {
|
3262 |
-
mode.dependencies = [];
|
3263 |
-
for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);
|
3264 |
-
}
|
3265 |
-
modes[name] = mode;
|
3266 |
-
};
|
3267 |
-
|
3268 |
-
CodeMirror.defineMIME = function(mime, spec) {
|
3269 |
-
mimeModes[mime] = spec;
|
3270 |
-
};
|
3271 |
-
|
3272 |
-
CodeMirror.resolveMode = function(spec) {
|
3273 |
-
if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
|
3274 |
-
spec = mimeModes[spec];
|
3275 |
-
} else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
|
3276 |
-
var found = mimeModes[spec.name];
|
3277 |
-
spec = createObj(found, spec);
|
3278 |
-
spec.name = found.name;
|
3279 |
-
} else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
|
3280 |
-
return CodeMirror.resolveMode("application/xml");
|
3281 |
-
}
|
3282 |
-
if (typeof spec == "string") return {name: spec};
|
3283 |
-
else return spec || {name: "null"};
|
3284 |
-
};
|
3285 |
-
|
3286 |
-
CodeMirror.getMode = function(options, spec) {
|
3287 |
-
var spec = CodeMirror.resolveMode(spec);
|
3288 |
-
var mfactory = modes[spec.name];
|
3289 |
-
if (!mfactory) return CodeMirror.getMode(options, "text/plain");
|
3290 |
-
var modeObj = mfactory(options, spec);
|
3291 |
-
if (modeExtensions.hasOwnProperty(spec.name)) {
|
3292 |
-
var exts = modeExtensions[spec.name];
|
3293 |
-
for (var prop in exts) {
|
3294 |
-
if (!exts.hasOwnProperty(prop)) continue;
|
3295 |
-
if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop];
|
3296 |
-
modeObj[prop] = exts[prop];
|
3297 |
-
}
|
3298 |
-
}
|
3299 |
-
modeObj.name = spec.name;
|
3300 |
-
|
3301 |
-
return modeObj;
|
3302 |
-
};
|
3303 |
-
|
3304 |
-
CodeMirror.defineMode("null", function() {
|
3305 |
-
return {token: function(stream) {stream.skipToEnd();}};
|
3306 |
-
});
|
3307 |
-
CodeMirror.defineMIME("text/plain", "null");
|
3308 |
-
|
3309 |
-
var modeExtensions = CodeMirror.modeExtensions = {};
|
3310 |
-
CodeMirror.extendMode = function(mode, properties) {
|
3311 |
-
var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
|
3312 |
-
copyObj(properties, exts);
|
3313 |
-
};
|
3314 |
-
|
3315 |
-
// EXTENSIONS
|
3316 |
-
|
3317 |
-
CodeMirror.defineExtension = function(name, func) {
|
3318 |
-
CodeMirror.prototype[name] = func;
|
3319 |
-
};
|
3320 |
-
CodeMirror.defineDocExtension = function(name, func) {
|
3321 |
-
Doc.prototype[name] = func;
|
3322 |
-
};
|
3323 |
-
CodeMirror.defineOption = option;
|
3324 |
-
|
3325 |
-
var initHooks = [];
|
3326 |
-
CodeMirror.defineInitHook = function(f) {initHooks.push(f);};
|
3327 |
-
|
3328 |
-
var helpers = CodeMirror.helpers = {};
|
3329 |
-
CodeMirror.registerHelper = function(type, name, value) {
|
3330 |
-
if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {};
|
3331 |
-
helpers[type][name] = value;
|
3332 |
-
};
|
3333 |
-
|
3334 |
-
// UTILITIES
|
3335 |
-
|
3336 |
-
CodeMirror.isWordChar = isWordChar;
|
3337 |
-
|
3338 |
-
// MODE STATE HANDLING
|
3339 |
-
|
3340 |
-
// Utility functions for working with state. Exported because modes
|
3341 |
-
// sometimes need to do this.
|
3342 |
-
function copyState(mode, state) {
|
3343 |
-
if (state === true) return state;
|
3344 |
-
if (mode.copyState) return mode.copyState(state);
|
3345 |
-
var nstate = {};
|
3346 |
-
for (var n in state) {
|
3347 |
-
var val = state[n];
|
3348 |
-
if (val instanceof Array) val = val.concat([]);
|
3349 |
-
nstate[n] = val;
|
3350 |
-
}
|
3351 |
-
return nstate;
|
3352 |
-
}
|
3353 |
-
CodeMirror.copyState = copyState;
|
3354 |
-
|
3355 |
-
function startState(mode, a1, a2) {
|
3356 |
-
return mode.startState ? mode.startState(a1, a2) : true;
|
3357 |
-
}
|
3358 |
-
CodeMirror.startState = startState;
|
3359 |
-
|
3360 |
-
CodeMirror.innerMode = function(mode, state) {
|
3361 |
-
while (mode.innerMode) {
|
3362 |
-
var info = mode.innerMode(state);
|
3363 |
-
if (!info || info.mode == mode) break;
|
3364 |
-
state = info.state;
|
3365 |
-
mode = info.mode;
|
3366 |
-
}
|
3367 |
-
return info || {mode: mode, state: state};
|
3368 |
-
};
|
3369 |
-
|
3370 |
-
// STANDARD COMMANDS
|
3371 |
-
|
3372 |
-
var commands = CodeMirror.commands = {
|
3373 |
-
selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()));},
|
3374 |
-
killLine: function(cm) {
|
3375 |
-
var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
|
3376 |
-
if (!sel && cm.getLine(from.line).length == from.ch)
|
3377 |
-
cm.replaceRange("", from, Pos(from.line + 1, 0), "+delete");
|
3378 |
-
else cm.replaceRange("", from, sel ? to : Pos(from.line), "+delete");
|
3379 |
-
},
|
3380 |
-
deleteLine: function(cm) {
|
3381 |
-
var l = cm.getCursor().line;
|
3382 |
-
cm.replaceRange("", Pos(l, 0), Pos(l), "+delete");
|
3383 |
-
},
|
3384 |
-
delLineLeft: function(cm) {
|
3385 |
-
var cur = cm.getCursor();
|
3386 |
-
cm.replaceRange("", Pos(cur.line, 0), cur, "+delete");
|
3387 |
-
},
|
3388 |
-
undo: function(cm) {cm.undo();},
|
3389 |
-
redo: function(cm) {cm.redo();},
|
3390 |
-
goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},
|
3391 |
-
goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},
|
3392 |
-
goLineStart: function(cm) {
|
3393 |
-
cm.extendSelection(lineStart(cm, cm.getCursor().line));
|
3394 |
-
},
|
3395 |
-
goLineStartSmart: function(cm) {
|
3396 |
-
var cur = cm.getCursor(), start = lineStart(cm, cur.line);
|
3397 |
-
var line = cm.getLineHandle(start.line);
|
3398 |
-
var order = getOrder(line);
|
3399 |
-
if (!order || order[0].level == 0) {
|
3400 |
-
var firstNonWS = Math.max(0, line.text.search(/\S/));
|
3401 |
-
var inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch;
|
3402 |
-
cm.extendSelection(Pos(start.line, inWS ? 0 : firstNonWS));
|
3403 |
-
} else cm.extendSelection(start);
|
3404 |
-
},
|
3405 |
-
goLineEnd: function(cm) {
|
3406 |
-
cm.extendSelection(lineEnd(cm, cm.getCursor().line));
|
3407 |
-
},
|
3408 |
-
goLineRight: function(cm) {
|
3409 |
-
var top = cm.charCoords(cm.getCursor(), "div").top + 5;
|
3410 |
-
cm.extendSelection(cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"));
|
3411 |
-
},
|
3412 |
-
goLineLeft: function(cm) {
|
3413 |
-
var top = cm.charCoords(cm.getCursor(), "div").top + 5;
|
3414 |
-
cm.extendSelection(cm.coordsChar({left: 0, top: top}, "div"));
|
3415 |
-
},
|
3416 |
-
goLineUp: function(cm) {cm.moveV(-1, "line");},
|
3417 |
-
goLineDown: function(cm) {cm.moveV(1, "line");},
|
3418 |
-
goPageUp: function(cm) {cm.moveV(-1, "page");},
|
3419 |
-
goPageDown: function(cm) {cm.moveV(1, "page");},
|
3420 |
-
goCharLeft: function(cm) {cm.moveH(-1, "char");},
|
3421 |
-
goCharRight: function(cm) {cm.moveH(1, "char");},
|
3422 |
-
goColumnLeft: function(cm) {cm.moveH(-1, "column");},
|
3423 |
-
goColumnRight: function(cm) {cm.moveH(1, "column");},
|
3424 |
-
goWordLeft: function(cm) {cm.moveH(-1, "word");},
|
3425 |
-
goGroupRight: function(cm) {cm.moveH(1, "group");},
|
3426 |
-
goGroupLeft: function(cm) {cm.moveH(-1, "group");},
|
3427 |
-
goWordRight: function(cm) {cm.moveH(1, "word");},
|
3428 |
-
delCharBefore: function(cm) {cm.deleteH(-1, "char");},
|
3429 |
-
delCharAfter: function(cm) {cm.deleteH(1, "char");},
|
3430 |
-
delWordBefore: function(cm) {cm.deleteH(-1, "word");},
|
3431 |
-
delWordAfter: function(cm) {cm.deleteH(1, "word");},
|
3432 |
-
delGroupBefore: function(cm) {cm.deleteH(-1, "group");},
|
3433 |
-
delGroupAfter: function(cm) {cm.deleteH(1, "group");},
|
3434 |
-
indentAuto: function(cm) {cm.indentSelection("smart");},
|
3435 |
-
indentMore: function(cm) {cm.indentSelection("add");},
|
3436 |
-
indentLess: function(cm) {cm.indentSelection("subtract");},
|
3437 |
-
insertTab: function(cm) {cm.replaceSelection("\t", "end", "+input");},
|
3438 |
-
defaultTab: function(cm) {
|
3439 |
-
if (cm.somethingSelected()) cm.indentSelection("add");
|
3440 |
-
else cm.replaceSelection("\t", "end", "+input");
|
3441 |
-
},
|
3442 |
-
transposeChars: function(cm) {
|
3443 |
-
var cur = cm.getCursor(), line = cm.getLine(cur.line);
|
3444 |
-
if (cur.ch > 0 && cur.ch < line.length - 1)
|
3445 |
-
cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
|
3446 |
-
Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
|
3447 |
-
},
|
3448 |
-
newlineAndIndent: function(cm) {
|
3449 |
-
operation(cm, function() {
|
3450 |
-
cm.replaceSelection("\n", "end", "+input");
|
3451 |
-
cm.indentLine(cm.getCursor().line, null, true);
|
3452 |
-
})();
|
3453 |
-
},
|
3454 |
-
toggleOverwrite: function(cm) {cm.toggleOverwrite();}
|
3455 |
-
};
|
3456 |
-
|
3457 |
-
// STANDARD KEYMAPS
|
3458 |
-
|
3459 |
-
var keyMap = CodeMirror.keyMap = {};
|
3460 |
-
keyMap.basic = {
|
3461 |
-
"Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
|
3462 |
-
"End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
|
3463 |
-
"Delete": "delCharAfter", "Backspace": "delCharBefore", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
|
3464 |
-
"Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
|
3465 |
-
};
|
3466 |
-
// Note that the save and find-related commands aren't defined by
|
3467 |
-
// default. Unknown commands are simply ignored.
|
3468 |
-
keyMap.pcDefault = {
|
3469 |
-
"Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
|
3470 |
-
"Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
|
3471 |
-
"Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
|
3472 |
-
"Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
|
3473 |
-
"Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
|
3474 |
-
"Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
|
3475 |
-
fallthrough: "basic"
|
3476 |
-
};
|
3477 |
-
keyMap.macDefault = {
|
3478 |
-
"Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
|
3479 |
-
"Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
|
3480 |
-
"Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore",
|
3481 |
-
"Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
|
3482 |
-
"Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
|
3483 |
-
"Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delLineLeft",
|
3484 |
-
fallthrough: ["basic", "emacsy"]
|
3485 |
-
};
|
3486 |
-
keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
|
3487 |
-
keyMap.emacsy = {
|
3488 |
-
"Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
|
3489 |
-
"Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
|
3490 |
-
"Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
|
3491 |
-
"Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
|
3492 |
-
};
|
3493 |
-
|
3494 |
-
// KEYMAP DISPATCH
|
3495 |
-
|
3496 |
-
function getKeyMap(val) {
|
3497 |
-
if (typeof val == "string") return keyMap[val];
|
3498 |
-
else return val;
|
3499 |
-
}
|
3500 |
-
|
3501 |
-
function lookupKey(name, maps, handle) {
|
3502 |
-
function lookup(map) {
|
3503 |
-
map = getKeyMap(map);
|
3504 |
-
var found = map[name];
|
3505 |
-
if (found === false) return "stop";
|
3506 |
-
if (found != null && handle(found)) return true;
|
3507 |
-
if (map.nofallthrough) return "stop";
|
3508 |
-
|
3509 |
-
var fallthrough = map.fallthrough;
|
3510 |
-
if (fallthrough == null) return false;
|
3511 |
-
if (Object.prototype.toString.call(fallthrough) != "[object Array]")
|
3512 |
-
return lookup(fallthrough);
|
3513 |
-
for (var i = 0, e = fallthrough.length; i < e; ++i) {
|
3514 |
-
var done = lookup(fallthrough[i]);
|
3515 |
-
if (done) return done;
|
3516 |
-
}
|
3517 |
-
return false;
|
3518 |
-
}
|
3519 |
-
|
3520 |
-
for (var i = 0; i < maps.length; ++i) {
|
3521 |
-
var done = lookup(maps[i]);
|
3522 |
-
if (done) return done != "stop";
|
3523 |
-
}
|
3524 |
-
}
|
3525 |
-
function isModifierKey(event) {
|
3526 |
-
var name = keyNames[event.keyCode];
|
3527 |
-
return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
|
3528 |
-
}
|
3529 |
-
function keyName(event, noShift) {
|
3530 |
-
if (opera && event.keyCode == 34 && event["char"]) return false;
|
3531 |
-
var name = keyNames[event.keyCode];
|
3532 |
-
if (name == null || event.altGraphKey) return false;
|
3533 |
-
if (event.altKey) name = "Alt-" + name;
|
3534 |
-
if (flipCtrlCmd ? event.metaKey : event.ctrlKey) name = "Ctrl-" + name;
|
3535 |
-
if (flipCtrlCmd ? event.ctrlKey : event.metaKey) name = "Cmd-" + name;
|
3536 |
-
if (!noShift && event.shiftKey) name = "Shift-" + name;
|
3537 |
-
return name;
|
3538 |
-
}
|
3539 |
-
CodeMirror.lookupKey = lookupKey;
|
3540 |
-
CodeMirror.isModifierKey = isModifierKey;
|
3541 |
-
CodeMirror.keyName = keyName;
|
3542 |
-
|
3543 |
-
// FROMTEXTAREA
|
3544 |
-
|
3545 |
-
CodeMirror.fromTextArea = function(textarea, options) {
|
3546 |
-
if (!options) options = {};
|
3547 |
-
options.value = textarea.value;
|
3548 |
-
if (!options.tabindex && textarea.tabindex)
|
3549 |
-
options.tabindex = textarea.tabindex;
|
3550 |
-
if (!options.placeholder && textarea.placeholder)
|
3551 |
-
options.placeholder = textarea.placeholder;
|
3552 |
-
// Set autofocus to true if this textarea is focused, or if it has
|
3553 |
-
// autofocus and no other element is focused.
|
3554 |
-
if (options.autofocus == null) {
|
3555 |
-
var hasFocus = document.body;
|
3556 |
-
// doc.activeElement occasionally throws on IE
|
3557 |
-
try { hasFocus = document.activeElement; } catch(e) {}
|
3558 |
-
options.autofocus = hasFocus == textarea ||
|
3559 |
-
textarea.getAttribute("autofocus") != null && hasFocus == document.body;
|
3560 |
-
}
|
3561 |
-
|
3562 |
-
function save() {textarea.value = cm.getValue();}
|
3563 |
-
if (textarea.form) {
|
3564 |
-
on(textarea.form, "submit", save);
|
3565 |
-
// Deplorable hack to make the submit method do the right thing.
|
3566 |
-
if (!options.leaveSubmitMethodAlone) {
|
3567 |
-
var form = textarea.form, realSubmit = form.submit;
|
3568 |
-
try {
|
3569 |
-
var wrappedSubmit = form.submit = function() {
|
3570 |
-
save();
|
3571 |
-
form.submit = realSubmit;
|
3572 |
-
form.submit();
|
3573 |
-
form.submit = wrappedSubmit;
|
3574 |
-
};
|
3575 |
-
} catch(e) {}
|
3576 |
-
}
|
3577 |
-
}
|
3578 |
-
|
3579 |
-
textarea.style.display = "none";
|
3580 |
-
var cm = CodeMirror(function(node) {
|
3581 |
-
textarea.parentNode.insertBefore(node, textarea.nextSibling);
|
3582 |
-
}, options);
|
3583 |
-
cm.save = save;
|
3584 |
-
cm.getTextArea = function() { return textarea; };
|
3585 |
-
cm.toTextArea = function() {
|
3586 |
-
save();
|
3587 |
-
textarea.parentNode.removeChild(cm.getWrapperElement());
|
3588 |
-
textarea.style.display = "";
|
3589 |
-
if (textarea.form) {
|
3590 |
-
off(textarea.form, "submit", save);
|
3591 |
-
if (typeof textarea.form.submit == "function")
|
3592 |
-
textarea.form.submit = realSubmit;
|
3593 |
-
}
|
3594 |
-
};
|
3595 |
-
return cm;
|
3596 |
-
};
|
3597 |
-
|
3598 |
-
// STRING STREAM
|
3599 |
-
|
3600 |
-
// Fed to the mode parsers, provides helper functions to make
|
3601 |
-
// parsers more succinct.
|
3602 |
-
|
3603 |
-
// The character stream used by a mode's parser.
|
3604 |
-
function StringStream(string, tabSize) {
|
3605 |
-
this.pos = this.start = 0;
|
3606 |
-
this.string = string;
|
3607 |
-
this.tabSize = tabSize || 8;
|
3608 |
-
this.lastColumnPos = this.lastColumnValue = 0;
|
3609 |
-
}
|
3610 |
-
|
3611 |
-
StringStream.prototype = {
|
3612 |
-
eol: function() {return this.pos >= this.string.length;},
|
3613 |
-
sol: function() {return this.pos == 0;},
|
3614 |
-
peek: function() {return this.string.charAt(this.pos) || undefined;},
|
3615 |
-
next: function() {
|
3616 |
-
if (this.pos < this.string.length)
|
3617 |
-
return this.string.charAt(this.pos++);
|
3618 |
-
},
|
3619 |
-
eat: function(match) {
|
3620 |
-
var ch = this.string.charAt(this.pos);
|
3621 |
-
if (typeof match == "string") var ok = ch == match;
|
3622 |
-
else var ok = ch && (match.test ? match.test(ch) : match(ch));
|
3623 |
-
if (ok) {++this.pos; return ch;}
|
3624 |
-
},
|
3625 |
-
eatWhile: function(match) {
|
3626 |
-
var start = this.pos;
|
3627 |
-
while (this.eat(match)){}
|
3628 |
-
return this.pos > start;
|
3629 |
-
},
|
3630 |
-
eatSpace: function() {
|
3631 |
-
var start = this.pos;
|
3632 |
-
while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
|
3633 |
-
return this.pos > start;
|
3634 |
-
},
|
3635 |
-
skipToEnd: function() {this.pos = this.string.length;},
|
3636 |
-
skipTo: function(ch) {
|
3637 |
-
var found = this.string.indexOf(ch, this.pos);
|
3638 |
-
if (found > -1) {this.pos = found; return true;}
|
3639 |
-
},
|
3640 |
-
backUp: function(n) {this.pos -= n;},
|
3641 |
-
column: function() {
|
3642 |
-
if (this.lastColumnPos < this.start) {
|
3643 |
-
this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
|
3644 |
-
this.lastColumnPos = this.start;
|
3645 |
-
}
|
3646 |
-
return this.lastColumnValue;
|
3647 |
-
},
|
3648 |
-
indentation: function() {return countColumn(this.string, null, this.tabSize);},
|
3649 |
-
match: function(pattern, consume, caseInsensitive) {
|
3650 |
-
if (typeof pattern == "string") {
|
3651 |
-
var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
|
3652 |
-
var substr = this.string.substr(this.pos, pattern.length);
|
3653 |
-
if (cased(substr) == cased(pattern)) {
|
3654 |
-
if (consume !== false) this.pos += pattern.length;
|
3655 |
-
return true;
|
3656 |
-
}
|
3657 |
-
} else {
|
3658 |
-
var match = this.string.slice(this.pos).match(pattern);
|
3659 |
-
if (match && match.index > 0) return null;
|
3660 |
-
if (match && consume !== false) this.pos += match[0].length;
|
3661 |
-
return match;
|
3662 |
-
}
|
3663 |
-
},
|
3664 |
-
current: function(){return this.string.slice(this.start, this.pos);}
|
3665 |
-
};
|
3666 |
-
CodeMirror.StringStream = StringStream;
|
3667 |
-
|
3668 |
-
// TEXTMARKERS
|
3669 |
-
|
3670 |
-
function TextMarker(doc, type) {
|
3671 |
-
this.lines = [];
|
3672 |
-
this.type = type;
|
3673 |
-
this.doc = doc;
|
3674 |
-
}
|
3675 |
-
CodeMirror.TextMarker = TextMarker;
|
3676 |
-
eventMixin(TextMarker);
|
3677 |
-
|
3678 |
-
TextMarker.prototype.clear = function() {
|
3679 |
-
if (this.explicitlyCleared) return;
|
3680 |
-
var cm = this.doc.cm, withOp = cm && !cm.curOp;
|
3681 |
-
if (withOp) startOperation(cm);
|
3682 |
-
if (hasHandler(this, "clear")) {
|
3683 |
-
var found = this.find();
|
3684 |
-
if (found) signalLater(this, "clear", found.from, found.to);
|
3685 |
-
}
|
3686 |
-
var min = null, max = null;
|
3687 |
-
for (var i = 0; i < this.lines.length; ++i) {
|
3688 |
-
var line = this.lines[i];
|
3689 |
-
var span = getMarkedSpanFor(line.markedSpans, this);
|
3690 |
-
if (span.to != null) max = lineNo(line);
|
3691 |
-
line.markedSpans = removeMarkedSpan(line.markedSpans, span);
|
3692 |
-
if (span.from != null)
|
3693 |
-
min = lineNo(line);
|
3694 |
-
else if (this.collapsed && !lineIsHidden(this.doc, line) && cm)
|
3695 |
-
updateLineHeight(line, textHeight(cm.display));
|
3696 |
-
}
|
3697 |
-
if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {
|
3698 |
-
var visual = visualLine(cm.doc, this.lines[i]), len = lineLength(cm.doc, visual);
|
3699 |
-
if (len > cm.display.maxLineLength) {
|
3700 |
-
cm.display.maxLine = visual;
|
3701 |
-
cm.display.maxLineLength = len;
|
3702 |
-
cm.display.maxLineChanged = true;
|
3703 |
-
}
|
3704 |
-
}
|
3705 |
-
|
3706 |
-
if (min != null && cm) regChange(cm, min, max + 1);
|
3707 |
-
this.lines.length = 0;
|
3708 |
-
this.explicitlyCleared = true;
|
3709 |
-
if (this.atomic && this.doc.cantEdit) {
|
3710 |
-
this.doc.cantEdit = false;
|
3711 |
-
if (cm) reCheckSelection(cm);
|
3712 |
-
}
|
3713 |
-
if (withOp) endOperation(cm);
|
3714 |
-
};
|
3715 |
-
|
3716 |
-
TextMarker.prototype.find = function() {
|
3717 |
-
var from, to;
|
3718 |
-
for (var i = 0; i < this.lines.length; ++i) {
|
3719 |
-
var line = this.lines[i];
|
3720 |
-
var span = getMarkedSpanFor(line.markedSpans, this);
|
3721 |
-
if (span.from != null || span.to != null) {
|
3722 |
-
var found = lineNo(line);
|
3723 |
-
if (span.from != null) from = Pos(found, span.from);
|
3724 |
-
if (span.to != null) to = Pos(found, span.to);
|
3725 |
-
}
|
3726 |
-
}
|
3727 |
-
if (this.type == "bookmark") return from;
|
3728 |
-
return from && {from: from, to: to};
|
3729 |
-
};
|
3730 |
-
|
3731 |
-
TextMarker.prototype.changed = function() {
|
3732 |
-
var pos = this.find(), cm = this.doc.cm;
|
3733 |
-
if (!pos || !cm) return;
|
3734 |
-
var line = getLine(this.doc, pos.from.line);
|
3735 |
-
clearCachedMeasurement(cm, line);
|
3736 |
-
if (pos.from.line >= cm.display.showingFrom && pos.from.line < cm.display.showingTo) {
|
3737 |
-
for (var node = cm.display.lineDiv.firstChild; node; node = node.nextSibling) if (node.lineObj == line) {
|
3738 |
-
if (node.offsetHeight != line.height) updateLineHeight(line, node.offsetHeight);
|
3739 |
-
break;
|
3740 |
-
}
|
3741 |
-
runInOp(cm, function() {
|
3742 |
-
cm.curOp.selectionChanged = cm.curOp.forceUpdate = cm.curOp.updateMaxLine = true;
|
3743 |
-
});
|
3744 |
-
}
|
3745 |
-
};
|
3746 |
-
|
3747 |
-
TextMarker.prototype.attachLine = function(line) {
|
3748 |
-
if (!this.lines.length && this.doc.cm) {
|
3749 |
-
var op = this.doc.cm.curOp;
|
3750 |
-
if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
|
3751 |
-
(op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
|
3752 |
-
}
|
3753 |
-
this.lines.push(line);
|
3754 |
-
};
|
3755 |
-
TextMarker.prototype.detachLine = function(line) {
|
3756 |
-
this.lines.splice(indexOf(this.lines, line), 1);
|
3757 |
-
if (!this.lines.length && this.doc.cm) {
|
3758 |
-
var op = this.doc.cm.curOp;
|
3759 |
-
(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
|
3760 |
-
}
|
3761 |
-
};
|
3762 |
-
|
3763 |
-
function markText(doc, from, to, options, type) {
|
3764 |
-
if (options && options.shared) return markTextShared(doc, from, to, options, type);
|
3765 |
-
if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);
|
3766 |
-
|
3767 |
-
var marker = new TextMarker(doc, type);
|
3768 |
-
if (type == "range" && !posLess(from, to)) return marker;
|
3769 |
-
if (options) copyObj(options, marker);
|
3770 |
-
if (marker.replacedWith) {
|
3771 |
-
marker.collapsed = true;
|
3772 |
-
marker.replacedWith = elt("span", [marker.replacedWith], "CodeMirror-widget");
|
3773 |
-
if (!options.handleMouseEvents) marker.replacedWith.ignoreEvents = true;
|
3774 |
-
}
|
3775 |
-
if (marker.collapsed) sawCollapsedSpans = true;
|
3776 |
-
|
3777 |
-
if (marker.addToHistory)
|
3778 |
-
addToHistory(doc, {from: from, to: to, origin: "markText"},
|
3779 |
-
{head: doc.sel.head, anchor: doc.sel.anchor}, NaN);
|
3780 |
-
|
3781 |
-
var curLine = from.line, size = 0, collapsedAtStart, collapsedAtEnd, cm = doc.cm, updateMaxLine;
|
3782 |
-
doc.iter(curLine, to.line + 1, function(line) {
|
3783 |
-
if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(doc, line) == cm.display.maxLine)
|
3784 |
-
updateMaxLine = true;
|
3785 |
-
var span = {from: null, to: null, marker: marker};
|
3786 |
-
size += line.text.length;
|
3787 |
-
if (curLine == from.line) {span.from = from.ch; size -= from.ch;}
|
3788 |
-
if (curLine == to.line) {span.to = to.ch; size -= line.text.length - to.ch;}
|
3789 |
-
if (marker.collapsed) {
|
3790 |
-
if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch);
|
3791 |
-
if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch);
|
3792 |
-
else updateLineHeight(line, 0);
|
3793 |
-
}
|
3794 |
-
addMarkedSpan(line, span);
|
3795 |
-
++curLine;
|
3796 |
-
});
|
3797 |
-
if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {
|
3798 |
-
if (lineIsHidden(doc, line)) updateLineHeight(line, 0);
|
3799 |
-
});
|
3800 |
-
|
3801 |
-
if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); });
|
3802 |
-
|
3803 |
-
if (marker.readOnly) {
|
3804 |
-
sawReadOnlySpans = true;
|
3805 |
-
if (doc.history.done.length || doc.history.undone.length)
|
3806 |
-
doc.clearHistory();
|
3807 |
-
}
|
3808 |
-
if (marker.collapsed) {
|
3809 |
-
if (collapsedAtStart != collapsedAtEnd)
|
3810 |
-
throw new Error("Inserting collapsed marker overlapping an existing one");
|
3811 |
-
marker.size = size;
|
3812 |
-
marker.atomic = true;
|
3813 |
-
}
|
3814 |
-
if (cm) {
|
3815 |
-
if (updateMaxLine) cm.curOp.updateMaxLine = true;
|
3816 |
-
if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.collapsed)
|
3817 |
-
regChange(cm, from.line, to.line + 1);
|
3818 |
-
if (marker.atomic) reCheckSelection(cm);
|
3819 |
-
}
|
3820 |
-
return marker;
|
3821 |
-
}
|
3822 |
-
|
3823 |
-
// SHARED TEXTMARKERS
|
3824 |
-
|
3825 |
-
function SharedTextMarker(markers, primary) {
|
3826 |
-
this.markers = markers;
|
3827 |
-
this.primary = primary;
|
3828 |
-
for (var i = 0, me = this; i < markers.length; ++i) {
|
3829 |
-
markers[i].parent = this;
|
3830 |
-
on(markers[i], "clear", function(){me.clear();});
|
3831 |
-
}
|
3832 |
-
}
|
3833 |
-
CodeMirror.SharedTextMarker = SharedTextMarker;
|
3834 |
-
eventMixin(SharedTextMarker);
|
3835 |
-
|
3836 |
-
SharedTextMarker.prototype.clear = function() {
|
3837 |
-
if (this.explicitlyCleared) return;
|
3838 |
-
this.explicitlyCleared = true;
|
3839 |
-
for (var i = 0; i < this.markers.length; ++i)
|
3840 |
-
this.markers[i].clear();
|
3841 |
-
signalLater(this, "clear");
|
3842 |
-
};
|
3843 |
-
SharedTextMarker.prototype.find = function() {
|
3844 |
-
return this.primary.find();
|
3845 |
-
};
|
3846 |
-
|
3847 |
-
function markTextShared(doc, from, to, options, type) {
|
3848 |
-
options = copyObj(options);
|
3849 |
-
options.shared = false;
|
3850 |
-
var markers = [markText(doc, from, to, options, type)], primary = markers[0];
|
3851 |
-
var widget = options.replacedWith;
|
3852 |
-
linkedDocs(doc, function(doc) {
|
3853 |
-
if (widget) options.replacedWith = widget.cloneNode(true);
|
3854 |
-
markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
|
3855 |
-
for (var i = 0; i < doc.linked.length; ++i)
|
3856 |
-
if (doc.linked[i].isParent) return;
|
3857 |
-
primary = lst(markers);
|
3858 |
-
});
|
3859 |
-
return new SharedTextMarker(markers, primary);
|
3860 |
-
}
|
3861 |
-
|
3862 |
-
// TEXTMARKER SPANS
|
3863 |
-
|
3864 |
-
function getMarkedSpanFor(spans, marker) {
|
3865 |
-
if (spans) for (var i = 0; i < spans.length; ++i) {
|
3866 |
-
var span = spans[i];
|
3867 |
-
if (span.marker == marker) return span;
|
3868 |
-
}
|
3869 |
-
}
|
3870 |
-
function removeMarkedSpan(spans, span) {
|
3871 |
-
for (var r, i = 0; i < spans.length; ++i)
|
3872 |
-
if (spans[i] != span) (r || (r = [])).push(spans[i]);
|
3873 |
-
return r;
|
3874 |
-
}
|
3875 |
-
function addMarkedSpan(line, span) {
|
3876 |
-
line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
|
3877 |
-
span.marker.attachLine(line);
|
3878 |
-
}
|
3879 |
-
|
3880 |
-
function markedSpansBefore(old, startCh, isInsert) {
|
3881 |
-
if (old) for (var i = 0, nw; i < old.length; ++i) {
|
3882 |
-
var span = old[i], marker = span.marker;
|
3883 |
-
var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
|
3884 |
-
if (startsBefore || marker.type == "bookmark" && span.from == startCh && (!isInsert || !span.marker.insertLeft)) {
|
3885 |
-
var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
|
3886 |
-
(nw || (nw = [])).push({from: span.from,
|
3887 |
-
to: endsAfter ? null : span.to,
|
3888 |
-
marker: marker});
|
3889 |
-
}
|
3890 |
-
}
|
3891 |
-
return nw;
|
3892 |
-
}
|
3893 |
-
|
3894 |
-
function markedSpansAfter(old, endCh, isInsert) {
|
3895 |
-
if (old) for (var i = 0, nw; i < old.length; ++i) {
|
3896 |
-
var span = old[i], marker = span.marker;
|
3897 |
-
var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
|
3898 |
-
if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) {
|
3899 |
-
var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
|
3900 |
-
(nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
|
3901 |
-
to: span.to == null ? null : span.to - endCh,
|
3902 |
-
marker: marker});
|
3903 |
-
}
|
3904 |
-
}
|
3905 |
-
return nw;
|
3906 |
-
}
|
3907 |
-
|
3908 |
-
function stretchSpansOverChange(doc, change) {
|
3909 |
-
var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
|
3910 |
-
var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
|
3911 |
-
if (!oldFirst && !oldLast) return null;
|
3912 |
-
|
3913 |
-
var startCh = change.from.ch, endCh = change.to.ch, isInsert = posEq(change.from, change.to);
|
3914 |
-
// Get the spans that 'stick out' on both sides
|
3915 |
-
var first = markedSpansBefore(oldFirst, startCh, isInsert);
|
3916 |
-
var last = markedSpansAfter(oldLast, endCh, isInsert);
|
3917 |
-
|
3918 |
-
// Next, merge those two ends
|
3919 |
-
var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
|
3920 |
-
if (first) {
|
3921 |
-
// Fix up .to properties of first
|
3922 |
-
for (var i = 0; i < first.length; ++i) {
|
3923 |
-
var span = first[i];
|
3924 |
-
if (span.to == null) {
|
3925 |
-
var found = getMarkedSpanFor(last, span.marker);
|
3926 |
-
if (!found) span.to = startCh;
|
3927 |
-
else if (sameLine) span.to = found.to == null ? null : found.to + offset;
|
3928 |
-
}
|
3929 |
-
}
|
3930 |
-
}
|
3931 |
-
if (last) {
|
3932 |
-
// Fix up .from in last (or move them into first in case of sameLine)
|
3933 |
-
for (var i = 0; i < last.length; ++i) {
|
3934 |
-
var span = last[i];
|
3935 |
-
if (span.to != null) span.to += offset;
|
3936 |
-
if (span.from == null) {
|
3937 |
-
var found = getMarkedSpanFor(first, span.marker);
|
3938 |
-
if (!found) {
|
3939 |
-
span.from = offset;
|
3940 |
-
if (sameLine) (first || (first = [])).push(span);
|
3941 |
-
}
|
3942 |
-
} else {
|
3943 |
-
span.from += offset;
|
3944 |
-
if (sameLine) (first || (first = [])).push(span);
|
3945 |
-
}
|
3946 |
-
}
|
3947 |
-
}
|
3948 |
-
if (sameLine && first) {
|
3949 |
-
// Make sure we didn't create any zero-length spans
|
3950 |
-
for (var i = 0; i < first.length; ++i)
|
3951 |
-
if (first[i].from != null && first[i].from == first[i].to && first[i].marker.type != "bookmark")
|
3952 |
-
first.splice(i--, 1);
|
3953 |
-
if (!first.length) first = null;
|
3954 |
-
}
|
3955 |
-
|
3956 |
-
var newMarkers = [first];
|
3957 |
-
if (!sameLine) {
|
3958 |
-
// Fill gap with whole-line-spans
|
3959 |
-
var gap = change.text.length - 2, gapMarkers;
|
3960 |
-
if (gap > 0 && first)
|
3961 |
-
for (var i = 0; i < first.length; ++i)
|
3962 |
-
if (first[i].to == null)
|
3963 |
-
(gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker});
|
3964 |
-
for (var i = 0; i < gap; ++i)
|
3965 |
-
newMarkers.push(gapMarkers);
|
3966 |
-
newMarkers.push(last);
|
3967 |
-
}
|
3968 |
-
return newMarkers;
|
3969 |
-
}
|
3970 |
-
|
3971 |
-
function mergeOldSpans(doc, change) {
|
3972 |
-
var old = getOldSpans(doc, change);
|
3973 |
-
var stretched = stretchSpansOverChange(doc, change);
|
3974 |
-
if (!old) return stretched;
|
3975 |
-
if (!stretched) return old;
|
3976 |
-
|
3977 |
-
for (var i = 0; i < old.length; ++i) {
|
3978 |
-
var oldCur = old[i], stretchCur = stretched[i];
|
3979 |
-
if (oldCur && stretchCur) {
|
3980 |
-
spans: for (var j = 0; j < stretchCur.length; ++j) {
|
3981 |
-
var span = stretchCur[j];
|
3982 |
-
for (var k = 0; k < oldCur.length; ++k)
|
3983 |
-
if (oldCur[k].marker == span.marker) continue spans;
|
3984 |
-
oldCur.push(span);
|
3985 |
-
}
|
3986 |
-
} else if (stretchCur) {
|
3987 |
-
old[i] = stretchCur;
|
3988 |
-
}
|
3989 |
-
}
|
3990 |
-
return old;
|
3991 |
-
}
|
3992 |
-
|
3993 |
-
function removeReadOnlyRanges(doc, from, to) {
|
3994 |
-
var markers = null;
|
3995 |
-
doc.iter(from.line, to.line + 1, function(line) {
|
3996 |
-
if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {
|
3997 |
-
var mark = line.markedSpans[i].marker;
|
3998 |
-
if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
|
3999 |
-
(markers || (markers = [])).push(mark);
|
4000 |
-
}
|
4001 |
-
});
|
4002 |
-
if (!markers) return null;
|
4003 |
-
var parts = [{from: from, to: to}];
|
4004 |
-
for (var i = 0; i < markers.length; ++i) {
|
4005 |
-
var mk = markers[i], m = mk.find();
|
4006 |
-
for (var j = 0; j < parts.length; ++j) {
|
4007 |
-
var p = parts[j];
|
4008 |
-
if (posLess(p.to, m.from) || posLess(m.to, p.from)) continue;
|
4009 |
-
var newParts = [j, 1];
|
4010 |
-
if (posLess(p.from, m.from) || !mk.inclusiveLeft && posEq(p.from, m.from))
|
4011 |
-
newParts.push({from: p.from, to: m.from});
|
4012 |
-
if (posLess(m.to, p.to) || !mk.inclusiveRight && posEq(p.to, m.to))
|
4013 |
-
newParts.push({from: m.to, to: p.to});
|
4014 |
-
parts.splice.apply(parts, newParts);
|
4015 |
-
j += newParts.length - 1;
|
4016 |
-
}
|
4017 |
-
}
|
4018 |
-
return parts;
|
4019 |
-
}
|
4020 |
-
|
4021 |
-
function collapsedSpanAt(line, ch) {
|
4022 |
-
var sps = sawCollapsedSpans && line.markedSpans, found;
|
4023 |
-
if (sps) for (var sp, i = 0; i < sps.length; ++i) {
|
4024 |
-
sp = sps[i];
|
4025 |
-
if (!sp.marker.collapsed) continue;
|
4026 |
-
if ((sp.from == null || sp.from < ch) &&
|
4027 |
-
(sp.to == null || sp.to > ch) &&
|
4028 |
-
(!found || found.width < sp.marker.width))
|
4029 |
-
found = sp.marker;
|
4030 |
-
}
|
4031 |
-
return found;
|
4032 |
-
}
|
4033 |
-
function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); }
|
4034 |
-
function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); }
|
4035 |
-
|
4036 |
-
function visualLine(doc, line) {
|
4037 |
-
var merged;
|
4038 |
-
while (merged = collapsedSpanAtStart(line))
|
4039 |
-
line = getLine(doc, merged.find().from.line);
|
4040 |
-
return line;
|
4041 |
-
}
|
4042 |
-
|
4043 |
-
function lineIsHidden(doc, line) {
|
4044 |
-
var sps = sawCollapsedSpans && line.markedSpans;
|
4045 |
-
if (sps) for (var sp, i = 0; i < sps.length; ++i) {
|
4046 |
-
sp = sps[i];
|
4047 |
-
if (!sp.marker.collapsed) continue;
|
4048 |
-
if (sp.from == null) return true;
|
4049 |
-
if (sp.marker.replacedWith) continue;
|
4050 |
-
if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
|
4051 |
-
return true;
|
4052 |
-
}
|
4053 |
-
}
|
4054 |
-
function lineIsHiddenInner(doc, line, span) {
|
4055 |
-
if (span.to == null) {
|
4056 |
-
var end = span.marker.find().to, endLine = getLine(doc, end.line);
|
4057 |
-
return lineIsHiddenInner(doc, endLine, getMarkedSpanFor(endLine.markedSpans, span.marker));
|
4058 |
-
}
|
4059 |
-
if (span.marker.inclusiveRight && span.to == line.text.length)
|
4060 |
-
return true;
|
4061 |
-
for (var sp, i = 0; i < line.markedSpans.length; ++i) {
|
4062 |
-
sp = line.markedSpans[i];
|
4063 |
-
if (sp.marker.collapsed && !sp.marker.replacedWith && sp.from == span.to &&
|
4064 |
-
(sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
|
4065 |
-
lineIsHiddenInner(doc, line, sp)) return true;
|
4066 |
-
}
|
4067 |
-
}
|
4068 |
-
|
4069 |
-
function detachMarkedSpans(line) {
|
4070 |
-
var spans = line.markedSpans;
|
4071 |
-
if (!spans) return;
|
4072 |
-
for (var i = 0; i < spans.length; ++i)
|
4073 |
-
spans[i].marker.detachLine(line);
|
4074 |
-
line.markedSpans = null;
|
4075 |
-
}
|
4076 |
-
|
4077 |
-
function attachMarkedSpans(line, spans) {
|
4078 |
-
if (!spans) return;
|
4079 |
-
for (var i = 0; i < spans.length; ++i)
|
4080 |
-
spans[i].marker.attachLine(line);
|
4081 |
-
line.markedSpans = spans;
|
4082 |
-
}
|
4083 |
-
|
4084 |
-
// LINE WIDGETS
|
4085 |
-
|
4086 |
-
var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {
|
4087 |
-
if (options) for (var opt in options) if (options.hasOwnProperty(opt))
|
4088 |
-
this[opt] = options[opt];
|
4089 |
-
this.cm = cm;
|
4090 |
-
this.node = node;
|
4091 |
-
};
|
4092 |
-
eventMixin(LineWidget);
|
4093 |
-
function widgetOperation(f) {
|
4094 |
-
return function() {
|
4095 |
-
var withOp = !this.cm.curOp;
|
4096 |
-
if (withOp) startOperation(this.cm);
|
4097 |
-
try {var result = f.apply(this, arguments);}
|
4098 |
-
finally {if (withOp) endOperation(this.cm);}
|
4099 |
-
return result;
|
4100 |
-
};
|
4101 |
-
}
|
4102 |
-
LineWidget.prototype.clear = widgetOperation(function() {
|
4103 |
-
var ws = this.line.widgets, no = lineNo(this.line);
|
4104 |
-
if (no == null || !ws) return;
|
4105 |
-
for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
|
4106 |
-
if (!ws.length) this.line.widgets = null;
|
4107 |
-
var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop;
|
4108 |
-
updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this)));
|
4109 |
-
if (aboveVisible) addToScrollPos(this.cm, 0, -this.height);
|
4110 |
-
regChange(this.cm, no, no + 1);
|
4111 |
-
});
|
4112 |
-
LineWidget.prototype.changed = widgetOperation(function() {
|
4113 |
-
var oldH = this.height;
|
4114 |
-
this.height = null;
|
4115 |
-
var diff = widgetHeight(this) - oldH;
|
4116 |
-
if (!diff) return;
|
4117 |
-
updateLineHeight(this.line, this.line.height + diff);
|
4118 |
-
var no = lineNo(this.line);
|
4119 |
-
regChange(this.cm, no, no + 1);
|
4120 |
-
});
|
4121 |
-
|
4122 |
-
function widgetHeight(widget) {
|
4123 |
-
if (widget.height != null) return widget.height;
|
4124 |
-
if (!widget.node.parentNode || widget.node.parentNode.nodeType != 1)
|
4125 |
-
removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, "position: relative"));
|
4126 |
-
return widget.height = widget.node.offsetHeight;
|
4127 |
-
}
|
4128 |
-
|
4129 |
-
function addLineWidget(cm, handle, node, options) {
|
4130 |
-
var widget = new LineWidget(cm, node, options);
|
4131 |
-
if (widget.noHScroll) cm.display.alignWidgets = true;
|
4132 |
-
changeLine(cm, handle, function(line) {
|
4133 |
-
var widgets = line.widgets || (line.widgets = []);
|
4134 |
-
if (widget.insertAt == null) widgets.push(widget);
|
4135 |
-
else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
|
4136 |
-
widget.line = line;
|
4137 |
-
if (!lineIsHidden(cm.doc, line) || widget.showIfHidden) {
|
4138 |
-
var aboveVisible = heightAtLine(cm, line) < cm.doc.scrollTop;
|
4139 |
-
updateLineHeight(line, line.height + widgetHeight(widget));
|
4140 |
-
if (aboveVisible) addToScrollPos(cm, 0, widget.height);
|
4141 |
-
}
|
4142 |
-
return true;
|
4143 |
-
});
|
4144 |
-
return widget;
|
4145 |
-
}
|
4146 |
-
|
4147 |
-
// LINE DATA STRUCTURE
|
4148 |
-
|
4149 |
-
// Line objects. These hold state related to a line, including
|
4150 |
-
// highlighting info (the styles array).
|
4151 |
-
var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {
|
4152 |
-
this.text = text;
|
4153 |
-
attachMarkedSpans(this, markedSpans);
|
4154 |
-
this.height = estimateHeight ? estimateHeight(this) : 1;
|
4155 |
-
};
|
4156 |
-
eventMixin(Line);
|
4157 |
-
|
4158 |
-
function updateLine(line, text, markedSpans, estimateHeight) {
|
4159 |
-
line.text = text;
|
4160 |
-
if (line.stateAfter) line.stateAfter = null;
|
4161 |
-
if (line.styles) line.styles = null;
|
4162 |
-
if (line.order != null) line.order = null;
|
4163 |
-
detachMarkedSpans(line);
|
4164 |
-
attachMarkedSpans(line, markedSpans);
|
4165 |
-
var estHeight = estimateHeight ? estimateHeight(line) : 1;
|
4166 |
-
if (estHeight != line.height) updateLineHeight(line, estHeight);
|
4167 |
-
}
|
4168 |
-
|
4169 |
-
function cleanUpLine(line) {
|
4170 |
-
line.parent = null;
|
4171 |
-
detachMarkedSpans(line);
|
4172 |
-
}
|
4173 |
-
|
4174 |
-
// Run the given mode's parser over a line, update the styles
|
4175 |
-
// array, which contains alternating fragments of text and CSS
|
4176 |
-
// classes.
|
4177 |
-
function runMode(cm, text, mode, state, f) {
|
4178 |
-
var flattenSpans = mode.flattenSpans;
|
4179 |
-
if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;
|
4180 |
-
var curStart = 0, curStyle = null;
|
4181 |
-
var stream = new StringStream(text, cm.options.tabSize), style;
|
4182 |
-
if (text == "" && mode.blankLine) mode.blankLine(state);
|
4183 |
-
while (!stream.eol()) {
|
4184 |
-
if (stream.pos > cm.options.maxHighlightLength) {
|
4185 |
-
flattenSpans = false;
|
4186 |
-
// Webkit seems to refuse to render text nodes longer than 57444 characters
|
4187 |
-
stream.pos = Math.min(text.length, stream.start + 50000);
|
4188 |
-
style = null;
|
4189 |
-
} else {
|
4190 |
-
style = mode.token(stream, state);
|
4191 |
-
}
|
4192 |
-
if (!flattenSpans || curStyle != style) {
|
4193 |
-
if (curStart < stream.start) f(stream.start, curStyle);
|
4194 |
-
curStart = stream.start; curStyle = style;
|
4195 |
-
}
|
4196 |
-
stream.start = stream.pos;
|
4197 |
-
}
|
4198 |
-
if (curStart < stream.pos) f(stream.pos, curStyle);
|
4199 |
-
}
|
4200 |
-
|
4201 |
-
function highlightLine(cm, line, state) {
|
4202 |
-
// A styles array always starts with a number identifying the
|
4203 |
-
// mode/overlays that it is based on (for easy invalidation).
|
4204 |
-
var st = [cm.state.modeGen];
|
4205 |
-
// Compute the base array of styles
|
4206 |
-
runMode(cm, line.text, cm.doc.mode, state, function(end, style) {st.push(end, style);});
|
4207 |
-
|
4208 |
-
// Run overlays, adjust style array.
|
4209 |
-
for (var o = 0; o < cm.state.overlays.length; ++o) {
|
4210 |
-
var overlay = cm.state.overlays[o], i = 1, at = 0;
|
4211 |
-
runMode(cm, line.text, overlay.mode, true, function(end, style) {
|
4212 |
-
var start = i;
|
4213 |
-
// Ensure there's a token end at the current position, and that i points at it
|
4214 |
-
while (at < end) {
|
4215 |
-
var i_end = st[i];
|
4216 |
-
if (i_end > end)
|
4217 |
-
st.splice(i, 1, end, st[i+1], i_end);
|
4218 |
-
i += 2;
|
4219 |
-
at = Math.min(end, i_end);
|
4220 |
-
}
|
4221 |
-
if (!style) return;
|
4222 |
-
if (overlay.opaque) {
|
4223 |
-
st.splice(start, i - start, end, style);
|
4224 |
-
i = start + 2;
|
4225 |
-
} else {
|
4226 |
-
for (; start < i; start += 2) {
|
4227 |
-
var cur = st[start+1];
|
4228 |
-
st[start+1] = cur ? cur + " " + style : style;
|
4229 |
-
}
|
4230 |
-
}
|
4231 |
-
});
|
4232 |
-
}
|
4233 |
-
|
4234 |
-
return st;
|
4235 |
-
}
|
4236 |
-
|
4237 |
-
function getLineStyles(cm, line) {
|
4238 |
-
if (!line.styles || line.styles[0] != cm.state.modeGen)
|
4239 |
-
line.styles = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));
|
4240 |
-
return line.styles;
|
4241 |
-
}
|
4242 |
-
|
4243 |
-
// Lightweight form of highlight -- proceed over this line and
|
4244 |
-
// update state, but don't save a style array.
|
4245 |
-
function processLine(cm, line, state) {
|
4246 |
-
var mode = cm.doc.mode;
|
4247 |
-
var stream = new StringStream(line.text, cm.options.tabSize);
|
4248 |
-
if (line.text == "" && mode.blankLine) mode.blankLine(state);
|
4249 |
-
while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {
|
4250 |
-
mode.token(stream, state);
|
4251 |
-
stream.start = stream.pos;
|
4252 |
-
}
|
4253 |
-
}
|
4254 |
-
|
4255 |
-
var styleToClassCache = {};
|
4256 |
-
function styleToClass(style) {
|
4257 |
-
if (!style) return null;
|
4258 |
-
return styleToClassCache[style] ||
|
4259 |
-
(styleToClassCache[style] = "cm-" + style.replace(/ +/g, " cm-"));
|
4260 |
-
}
|
4261 |
-
|
4262 |
-
function lineContent(cm, realLine, measure, copyWidgets) {
|
4263 |
-
var merged, line = realLine, empty = true;
|
4264 |
-
while (merged = collapsedSpanAtStart(line))
|
4265 |
-
line = getLine(cm.doc, merged.find().from.line);
|
4266 |
-
|
4267 |
-
var builder = {pre: elt("pre"), col: 0, pos: 0,
|
4268 |
-
measure: null, measuredSomething: false, cm: cm,
|
4269 |
-
copyWidgets: copyWidgets};
|
4270 |
-
if (line.textClass) builder.pre.className = line.textClass;
|
4271 |
-
|
4272 |
-
do {
|
4273 |
-
if (line.text) empty = false;
|
4274 |
-
builder.measure = line == realLine && measure;
|
4275 |
-
builder.pos = 0;
|
4276 |
-
builder.addToken = builder.measure ? buildTokenMeasure : buildToken;
|
4277 |
-
if ((ie || webkit) && cm.getOption("lineWrapping"))
|
4278 |
-
builder.addToken = buildTokenSplitSpaces(builder.addToken);
|
4279 |
-
var next = insertLineContent(line, builder, getLineStyles(cm, line));
|
4280 |
-
if (measure && line == realLine && !builder.measuredSomething) {
|
4281 |
-
measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure));
|
4282 |
-
builder.measuredSomething = true;
|
4283 |
-
}
|
4284 |
-
if (next) line = getLine(cm.doc, next.to.line);
|
4285 |
-
} while (next);
|
4286 |
-
|
4287 |
-
if (measure && !builder.measuredSomething && !measure[0])
|
4288 |
-
measure[0] = builder.pre.appendChild(empty ? elt("span", "\u00a0") : zeroWidthElement(cm.display.measure));
|
4289 |
-
if (!builder.pre.firstChild && !lineIsHidden(cm.doc, realLine))
|
4290 |
-
builder.pre.appendChild(document.createTextNode("\u00a0"));
|
4291 |
-
|
4292 |
-
var order;
|
4293 |
-
// Work around problem with the reported dimensions of single-char
|
4294 |
-
// direction spans on IE (issue #1129). See also the comment in
|
4295 |
-
// cursorCoords.
|
4296 |
-
if (measure && ie && (order = getOrder(line))) {
|
4297 |
-
var l = order.length - 1;
|
4298 |
-
if (order[l].from == order[l].to) --l;
|
4299 |
-
var last = order[l], prev = order[l - 1];
|
4300 |
-
if (last.from + 1 == last.to && prev && last.level < prev.level) {
|
4301 |
-
var span = measure[builder.pos - 1];
|
4302 |
-
if (span) span.parentNode.insertBefore(span.measureRight = zeroWidthElement(cm.display.measure),
|
4303 |
-
span.nextSibling);
|
4304 |
-
}
|
4305 |
-
}
|
4306 |
-
|
4307 |
-
signal(cm, "renderLine", cm, realLine, builder.pre);
|
4308 |
-
return builder.pre;
|
4309 |
-
}
|
4310 |
-
|
4311 |
-
var tokenSpecialChars = /[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\uFEFF]/g;
|
4312 |
-
function buildToken(builder, text, style, startStyle, endStyle, title) {
|
4313 |
-
if (!text) return;
|
4314 |
-
if (!tokenSpecialChars.test(text)) {
|
4315 |
-
builder.col += text.length;
|
4316 |
-
var content = document.createTextNode(text);
|
4317 |
-
} else {
|
4318 |
-
var content = document.createDocumentFragment(), pos = 0;
|
4319 |
-
while (true) {
|
4320 |
-
tokenSpecialChars.lastIndex = pos;
|
4321 |
-
var m = tokenSpecialChars.exec(text);
|
4322 |
-
var skipped = m ? m.index - pos : text.length - pos;
|
4323 |
-
if (skipped) {
|
4324 |
-
content.appendChild(document.createTextNode(text.slice(pos, pos + skipped)));
|
4325 |
-
builder.col += skipped;
|
4326 |
-
}
|
4327 |
-
if (!m) break;
|
4328 |
-
pos += skipped + 1;
|
4329 |
-
if (m[0] == "\t") {
|
4330 |
-
var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
|
4331 |
-
content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
|
4332 |
-
builder.col += tabWidth;
|
4333 |
-
} else {
|
4334 |
-
var token = elt("span", "\u2022", "cm-invalidchar");
|
4335 |
-
token.title = "\\u" + m[0].charCodeAt(0).toString(16);
|
4336 |
-
content.appendChild(token);
|
4337 |
-
builder.col += 1;
|
4338 |
-
}
|
4339 |
-
}
|
4340 |
-
}
|
4341 |
-
if (style || startStyle || endStyle || builder.measure) {
|
4342 |
-
var fullStyle = style || "";
|
4343 |
-
if (startStyle) fullStyle += startStyle;
|
4344 |
-
if (endStyle) fullStyle += endStyle;
|
4345 |
-
var token = elt("span", [content], fullStyle);
|
4346 |
-
if (title) token.title = title;
|
4347 |
-
return builder.pre.appendChild(token);
|
4348 |
-
}
|
4349 |
-
builder.pre.appendChild(content);
|
4350 |
-
}
|
4351 |
-
|
4352 |
-
function buildTokenMeasure(builder, text, style, startStyle, endStyle) {
|
4353 |
-
var wrapping = builder.cm.options.lineWrapping;
|
4354 |
-
for (var i = 0; i < text.length; ++i) {
|
4355 |
-
var ch = text.charAt(i), start = i == 0;
|
4356 |
-
if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) {
|
4357 |
-
ch = text.slice(i, i + 2);
|
4358 |
-
++i;
|
4359 |
-
} else if (i && wrapping && spanAffectsWrapping(text, i)) {
|
4360 |
-
builder.pre.appendChild(elt("wbr"));
|
4361 |
-
}
|
4362 |
-
var old = builder.measure[builder.pos];
|
4363 |
-
var span = builder.measure[builder.pos] =
|
4364 |
-
buildToken(builder, ch, style,
|
4365 |
-
start && startStyle, i == text.length - 1 && endStyle);
|
4366 |
-
if (old) span.leftSide = old.leftSide || old;
|
4367 |
-
// In IE single-space nodes wrap differently than spaces
|
4368 |
-
// embedded in larger text nodes, except when set to
|
4369 |
-
// white-space: normal (issue #1268).
|
4370 |
-
if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) &&
|
4371 |
-
i < text.length - 1 && !/\s/.test(text.charAt(i + 1)))
|
4372 |
-
span.style.whiteSpace = "normal";
|
4373 |
-
builder.pos += ch.length;
|
4374 |
-
}
|
4375 |
-
if (text.length) builder.measuredSomething = true;
|
4376 |
-
}
|
4377 |
-
|
4378 |
-
function buildTokenSplitSpaces(inner) {
|
4379 |
-
function split(old) {
|
4380 |
-
var out = " ";
|
4381 |
-
for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
|
4382 |
-
out += " ";
|
4383 |
-
return out;
|
4384 |
-
}
|
4385 |
-
return function(builder, text, style, startStyle, endStyle, title) {
|
4386 |
-
return inner(builder, text.replace(/ {3,}/, split), style, startStyle, endStyle, title);
|
4387 |
-
};
|
4388 |
-
}
|
4389 |
-
|
4390 |
-
function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
|
4391 |
-
var widget = !ignoreWidget && marker.replacedWith;
|
4392 |
-
if (widget) {
|
4393 |
-
if (builder.copyWidgets) widget = widget.cloneNode(true);
|
4394 |
-
builder.pre.appendChild(widget);
|
4395 |
-
if (builder.measure) {
|
4396 |
-
if (size) {
|
4397 |
-
builder.measure[builder.pos] = widget;
|
4398 |
-
} else {
|
4399 |
-
var elt = builder.measure[builder.pos] = zeroWidthElement(builder.cm.display.measure);
|
4400 |
-
if (marker.type != "bookmark" || marker.insertLeft)
|
4401 |
-
builder.pre.insertBefore(elt, widget);
|
4402 |
-
else
|
4403 |
-
builder.pre.appendChild(elt);
|
4404 |
-
}
|
4405 |
-
builder.measuredSomething = true;
|
4406 |
-
}
|
4407 |
-
}
|
4408 |
-
builder.pos += size;
|
4409 |
-
}
|
4410 |
-
|
4411 |
-
// Outputs a number of spans to make up a line, taking highlighting
|
4412 |
-
// and marked text into account.
|
4413 |
-
function insertLineContent(line, builder, styles) {
|
4414 |
-
var spans = line.markedSpans, allText = line.text, at = 0;
|
4415 |
-
if (!spans) {
|
4416 |
-
for (var i = 1; i < styles.length; i+=2)
|
4417 |
-
builder.addToken(builder, allText.slice(at, at = styles[i]), styleToClass(styles[i+1]));
|
4418 |
-
return;
|
4419 |
-
}
|
4420 |
-
|
4421 |
-
var len = allText.length, pos = 0, i = 1, text = "", style;
|
4422 |
-
var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
|
4423 |
-
for (;;) {
|
4424 |
-
if (nextChange == pos) { // Update current marker set
|
4425 |
-
spanStyle = spanEndStyle = spanStartStyle = title = "";
|
4426 |
-
collapsed = null; nextChange = Infinity;
|
4427 |
-
var foundBookmark = null;
|
4428 |
-
for (var j = 0; j < spans.length; ++j) {
|
4429 |
-
var sp = spans[j], m = sp.marker;
|
4430 |
-
if (sp.from <= pos && (sp.to == null || sp.to > pos)) {
|
4431 |
-
if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
|
4432 |
-
if (m.className) spanStyle += " " + m.className;
|
4433 |
-
if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
|
4434 |
-
if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
|
4435 |
-
if (m.title && !title) title = m.title;
|
4436 |
-
if (m.collapsed && (!collapsed || collapsed.marker.size < m.size))
|
4437 |
-
collapsed = sp;
|
4438 |
-
} else if (sp.from > pos && nextChange > sp.from) {
|
4439 |
-
nextChange = sp.from;
|
4440 |
-
}
|
4441 |
-
if (m.type == "bookmark" && sp.from == pos && m.replacedWith) foundBookmark = m;
|
4442 |
-
}
|
4443 |
-
if (collapsed && (collapsed.from || 0) == pos) {
|
4444 |
-
buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,
|
4445 |
-
collapsed.marker, collapsed.from == null);
|
4446 |
-
if (collapsed.to == null) return collapsed.marker.find();
|
4447 |
-
}
|
4448 |
-
if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);
|
4449 |
-
}
|
4450 |
-
if (pos >= len) break;
|
4451 |
-
|
4452 |
-
var upto = Math.min(len, nextChange);
|
4453 |
-
while (true) {
|
4454 |
-
if (text) {
|
4455 |
-
var end = pos + text.length;
|
4456 |
-
if (!collapsed) {
|
4457 |
-
var tokenText = end > upto ? text.slice(0, upto - pos) : text;
|
4458 |
-
builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
|
4459 |
-
spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title);
|
4460 |
-
}
|
4461 |
-
if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
|
4462 |
-
pos = end;
|
4463 |
-
spanStartStyle = "";
|
4464 |
-
}
|
4465 |
-
text = allText.slice(at, at = styles[i++]);
|
4466 |
-
style = styleToClass(styles[i++]);
|
4467 |
-
}
|
4468 |
-
}
|
4469 |
-
}
|
4470 |
-
|
4471 |
-
// DOCUMENT DATA STRUCTURE
|
4472 |
-
|
4473 |
-
function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) {
|
4474 |
-
function spansFor(n) {return markedSpans ? markedSpans[n] : null;}
|
4475 |
-
function update(line, text, spans) {
|
4476 |
-
updateLine(line, text, spans, estimateHeight);
|
4477 |
-
signalLater(line, "change", line, change);
|
4478 |
-
}
|
4479 |
-
|
4480 |
-
var from = change.from, to = change.to, text = change.text;
|
4481 |
-
var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
|
4482 |
-
var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
|
4483 |
-
|
4484 |
-
// First adjust the line structure
|
4485 |
-
if (from.ch == 0 && to.ch == 0 && lastText == "") {
|
4486 |
-
// This is a whole-line replace. Treated specially to make
|
4487 |
-
// sure line objects move the way they are supposed to.
|
4488 |
-
for (var i = 0, e = text.length - 1, added = []; i < e; ++i)
|
4489 |
-
added.push(new Line(text[i], spansFor(i), estimateHeight));
|
4490 |
-
update(lastLine, lastLine.text, lastSpans);
|
4491 |
-
if (nlines) doc.remove(from.line, nlines);
|
4492 |
-
if (added.length) doc.insert(from.line, added);
|
4493 |
-
} else if (firstLine == lastLine) {
|
4494 |
-
if (text.length == 1) {
|
4495 |
-
update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
|
4496 |
-
} else {
|
4497 |
-
for (var added = [], i = 1, e = text.length - 1; i < e; ++i)
|
4498 |
-
added.push(new Line(text[i], spansFor(i), estimateHeight));
|
4499 |
-
added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
|
4500 |
-
update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
|
4501 |
-
doc.insert(from.line + 1, added);
|
4502 |
-
}
|
4503 |
-
} else if (text.length == 1) {
|
4504 |
-
update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
|
4505 |
-
doc.remove(from.line + 1, nlines);
|
4506 |
-
} else {
|
4507 |
-
update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
|
4508 |
-
update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
|
4509 |
-
for (var i = 1, e = text.length - 1, added = []; i < e; ++i)
|
4510 |
-
added.push(new Line(text[i], spansFor(i), estimateHeight));
|
4511 |
-
if (nlines > 1) doc.remove(from.line + 1, nlines - 1);
|
4512 |
-
doc.insert(from.line + 1, added);
|
4513 |
-
}
|
4514 |
-
|
4515 |
-
signalLater(doc, "change", doc, change);
|
4516 |
-
setSelection(doc, selAfter.anchor, selAfter.head, null, true);
|
4517 |
-
}
|
4518 |
-
|
4519 |
-
function LeafChunk(lines) {
|
4520 |
-
this.lines = lines;
|
4521 |
-
this.parent = null;
|
4522 |
-
for (var i = 0, e = lines.length, height = 0; i < e; ++i) {
|
4523 |
-
lines[i].parent = this;
|
4524 |
-
height += lines[i].height;
|
4525 |
-
}
|
4526 |
-
this.height = height;
|
4527 |
-
}
|
4528 |
-
|
4529 |
-
LeafChunk.prototype = {
|
4530 |
-
chunkSize: function() { return this.lines.length; },
|
4531 |
-
removeInner: function(at, n) {
|
4532 |
-
for (var i = at, e = at + n; i < e; ++i) {
|
4533 |
-
var line = this.lines[i];
|
4534 |
-
this.height -= line.height;
|
4535 |
-
cleanUpLine(line);
|
4536 |
-
signalLater(line, "delete");
|
4537 |
-
}
|
4538 |
-
this.lines.splice(at, n);
|
4539 |
-
},
|
4540 |
-
collapse: function(lines) {
|
4541 |
-
lines.splice.apply(lines, [lines.length, 0].concat(this.lines));
|
4542 |
-
},
|
4543 |
-
insertInner: function(at, lines, height) {
|
4544 |
-
this.height += height;
|
4545 |
-
this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
|
4546 |
-
for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this;
|
4547 |
-
},
|
4548 |
-
iterN: function(at, n, op) {
|
4549 |
-
for (var e = at + n; at < e; ++at)
|
4550 |
-
if (op(this.lines[at])) return true;
|
4551 |
-
}
|
4552 |
-
};
|
4553 |
-
|
4554 |
-
function BranchChunk(children) {
|
4555 |
-
this.children = children;
|
4556 |
-
var size = 0, height = 0;
|
4557 |
-
for (var i = 0, e = children.length; i < e; ++i) {
|
4558 |
-
var ch = children[i];
|
4559 |
-
size += ch.chunkSize(); height += ch.height;
|
4560 |
-
ch.parent = this;
|
4561 |
-
}
|
4562 |
-
this.size = size;
|
4563 |
-
this.height = height;
|
4564 |
-
this.parent = null;
|
4565 |
-
}
|
4566 |
-
|
4567 |
-
BranchChunk.prototype = {
|
4568 |
-
chunkSize: function() { return this.size; },
|
4569 |
-
removeInner: function(at, n) {
|
4570 |
-
this.size -= n;
|
4571 |
-
for (var i = 0; i < this.children.length; ++i) {
|
4572 |
-
var child = this.children[i], sz = child.chunkSize();
|
4573 |
-
if (at < sz) {
|
4574 |
-
var rm = Math.min(n, sz - at), oldHeight = child.height;
|
4575 |
-
child.removeInner(at, rm);
|
4576 |
-
this.height -= oldHeight - child.height;
|
4577 |
-
if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
|
4578 |
-
if ((n -= rm) == 0) break;
|
4579 |
-
at = 0;
|
4580 |
-
} else at -= sz;
|
4581 |
-
}
|
4582 |
-
if (this.size - n < 25) {
|
4583 |
-
var lines = [];
|
4584 |
-
this.collapse(lines);
|
4585 |
-
this.children = [new LeafChunk(lines)];
|
4586 |
-
this.children[0].parent = this;
|
4587 |
-
}
|
4588 |
-
},
|
4589 |
-
collapse: function(lines) {
|
4590 |
-
for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines);
|
4591 |
-
},
|
4592 |
-
insertInner: function(at, lines, height) {
|
4593 |
-
this.size += lines.length;
|
4594 |
-
this.height += height;
|
4595 |
-
for (var i = 0, e = this.children.length; i < e; ++i) {
|
4596 |
-
var child = this.children[i], sz = child.chunkSize();
|
4597 |
-
if (at <= sz) {
|
4598 |
-
child.insertInner(at, lines, height);
|
4599 |
-
if (child.lines && child.lines.length > 50) {
|
4600 |
-
while (child.lines.length > 50) {
|
4601 |
-
var spilled = child.lines.splice(child.lines.length - 25, 25);
|
4602 |
-
var newleaf = new LeafChunk(spilled);
|
4603 |
-
child.height -= newleaf.height;
|
4604 |
-
this.children.splice(i + 1, 0, newleaf);
|
4605 |
-
newleaf.parent = this;
|
4606 |
-
}
|
4607 |
-
this.maybeSpill();
|
4608 |
-
}
|
4609 |
-
break;
|
4610 |
-
}
|
4611 |
-
at -= sz;
|
4612 |
-
}
|
4613 |
-
},
|
4614 |
-
maybeSpill: function() {
|
4615 |
-
if (this.children.length <= 10) return;
|
4616 |
-
var me = this;
|
4617 |
-
do {
|
4618 |
-
var spilled = me.children.splice(me.children.length - 5, 5);
|
4619 |
-
var sibling = new BranchChunk(spilled);
|
4620 |
-
if (!me.parent) { // Become the parent node
|
4621 |
-
var copy = new BranchChunk(me.children);
|
4622 |
-
copy.parent = me;
|
4623 |
-
me.children = [copy, sibling];
|
4624 |
-
me = copy;
|
4625 |
-
} else {
|
4626 |
-
me.size -= sibling.size;
|
4627 |
-
me.height -= sibling.height;
|
4628 |
-
var myIndex = indexOf(me.parent.children, me);
|
4629 |
-
me.parent.children.splice(myIndex + 1, 0, sibling);
|
4630 |
-
}
|
4631 |
-
sibling.parent = me.parent;
|
4632 |
-
} while (me.children.length > 10);
|
4633 |
-
me.parent.maybeSpill();
|
4634 |
-
},
|
4635 |
-
iterN: function(at, n, op) {
|
4636 |
-
for (var i = 0, e = this.children.length; i < e; ++i) {
|
4637 |
-
var child = this.children[i], sz = child.chunkSize();
|
4638 |
-
if (at < sz) {
|
4639 |
-
var used = Math.min(n, sz - at);
|
4640 |
-
if (child.iterN(at, used, op)) return true;
|
4641 |
-
if ((n -= used) == 0) break;
|
4642 |
-
at = 0;
|
4643 |
-
} else at -= sz;
|
4644 |
-
}
|
4645 |
-
}
|
4646 |
-
};
|
4647 |
-
|
4648 |
-
var nextDocId = 0;
|
4649 |
-
var Doc = CodeMirror.Doc = function(text, mode, firstLine) {
|
4650 |
-
if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);
|
4651 |
-
if (firstLine == null) firstLine = 0;
|
4652 |
-
|
4653 |
-
BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
|
4654 |
-
this.first = firstLine;
|
4655 |
-
this.scrollTop = this.scrollLeft = 0;
|
4656 |
-
this.cantEdit = false;
|
4657 |
-
this.history = makeHistory();
|
4658 |
-
this.cleanGeneration = 1;
|
4659 |
-
this.frontier = firstLine;
|
4660 |
-
var start = Pos(firstLine, 0);
|
4661 |
-
this.sel = {from: start, to: start, head: start, anchor: start, shift: false, extend: false, goalColumn: null};
|
4662 |
-
this.id = ++nextDocId;
|
4663 |
-
this.modeOption = mode;
|
4664 |
-
|
4665 |
-
if (typeof text == "string") text = splitLines(text);
|
4666 |
-
updateDoc(this, {from: start, to: start, text: text}, null, {head: start, anchor: start});
|
4667 |
-
};
|
4668 |
-
|
4669 |
-
Doc.prototype = createObj(BranchChunk.prototype, {
|
4670 |
-
constructor: Doc,
|
4671 |
-
iter: function(from, to, op) {
|
4672 |
-
if (op) this.iterN(from - this.first, to - from, op);
|
4673 |
-
else this.iterN(this.first, this.first + this.size, from);
|
4674 |
-
},
|
4675 |
-
|
4676 |
-
insert: function(at, lines) {
|
4677 |
-
var height = 0;
|
4678 |
-
for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height;
|
4679 |
-
this.insertInner(at - this.first, lines, height);
|
4680 |
-
},
|
4681 |
-
remove: function(at, n) { this.removeInner(at - this.first, n); },
|
4682 |
-
|
4683 |
-
getValue: function(lineSep) {
|
4684 |
-
var lines = getLines(this, this.first, this.first + this.size);
|
4685 |
-
if (lineSep === false) return lines;
|
4686 |
-
return lines.join(lineSep || "\n");
|
4687 |
-
},
|
4688 |
-
setValue: function(code) {
|
4689 |
-
var top = Pos(this.first, 0), last = this.first + this.size - 1;
|
4690 |
-
makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
|
4691 |
-
text: splitLines(code), origin: "setValue"},
|
4692 |
-
{head: top, anchor: top}, true);
|
4693 |
-
},
|
4694 |
-
replaceRange: function(code, from, to, origin) {
|
4695 |
-
from = clipPos(this, from);
|
4696 |
-
to = to ? clipPos(this, to) : from;
|
4697 |
-
replaceRange(this, code, from, to, origin);
|
4698 |
-
},
|
4699 |
-
getRange: function(from, to, lineSep) {
|
4700 |
-
var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
|
4701 |
-
if (lineSep === false) return lines;
|
4702 |
-
return lines.join(lineSep || "\n");
|
4703 |
-
},
|
4704 |
-
|
4705 |
-
getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},
|
4706 |
-
setLine: function(line, text) {
|
4707 |
-
if (isLine(this, line))
|
4708 |
-
replaceRange(this, text, Pos(line, 0), clipPos(this, Pos(line)));
|
4709 |
-
},
|
4710 |
-
removeLine: function(line) {
|
4711 |
-
if (line) replaceRange(this, "", clipPos(this, Pos(line - 1)), clipPos(this, Pos(line)));
|
4712 |
-
else replaceRange(this, "", Pos(0, 0), clipPos(this, Pos(1, 0)));
|
4713 |
-
},
|
4714 |
-
|
4715 |
-
getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},
|
4716 |
-
getLineNumber: function(line) {return lineNo(line);},
|
4717 |
-
|
4718 |
-
getLineHandleVisualStart: function(line) {
|
4719 |
-
if (typeof line == "number") line = getLine(this, line);
|
4720 |
-
return visualLine(this, line);
|
4721 |
-
},
|
4722 |
-
|
4723 |
-
lineCount: function() {return this.size;},
|
4724 |
-
firstLine: function() {return this.first;},
|
4725 |
-
lastLine: function() {return this.first + this.size - 1;},
|
4726 |
-
|
4727 |
-
clipPos: function(pos) {return clipPos(this, pos);},
|
4728 |
-
|
4729 |
-
getCursor: function(start) {
|
4730 |
-
var sel = this.sel, pos;
|
4731 |
-
if (start == null || start == "head") pos = sel.head;
|
4732 |
-
else if (start == "anchor") pos = sel.anchor;
|
4733 |
-
else if (start == "end" || start === false) pos = sel.to;
|
4734 |
-
else pos = sel.from;
|
4735 |
-
return copyPos(pos);
|
4736 |
-
},
|
4737 |
-
somethingSelected: function() {return !posEq(this.sel.head, this.sel.anchor);},
|
4738 |
-
|
4739 |
-
setCursor: docOperation(function(line, ch, extend) {
|
4740 |
-
var pos = clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line);
|
4741 |
-
if (extend) extendSelection(this, pos);
|
4742 |
-
else setSelection(this, pos, pos);
|
4743 |
-
}),
|
4744 |
-
setSelection: docOperation(function(anchor, head) {
|
4745 |
-
setSelection(this, clipPos(this, anchor), clipPos(this, head || anchor));
|
4746 |
-
}),
|
4747 |
-
extendSelection: docOperation(function(from, to) {
|
4748 |
-
extendSelection(this, clipPos(this, from), to && clipPos(this, to));
|
4749 |
-
}),
|
4750 |
-
|
4751 |
-
getSelection: function(lineSep) {return this.getRange(this.sel.from, this.sel.to, lineSep);},
|
4752 |
-
replaceSelection: function(code, collapse, origin) {
|
4753 |
-
makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around");
|
4754 |
-
},
|
4755 |
-
undo: docOperation(function() {makeChangeFromHistory(this, "undo");}),
|
4756 |
-
redo: docOperation(function() {makeChangeFromHistory(this, "redo");}),
|
4757 |
-
|
4758 |
-
setExtending: function(val) {this.sel.extend = val;},
|
4759 |
-
|
4760 |
-
historySize: function() {
|
4761 |
-
var hist = this.history;
|
4762 |
-
return {undo: hist.done.length, redo: hist.undone.length};
|
4763 |
-
},
|
4764 |
-
clearHistory: function() {this.history = makeHistory(this.history.maxGeneration);},
|
4765 |
-
|
4766 |
-
markClean: function() {
|
4767 |
-
this.cleanGeneration = this.changeGeneration();
|
4768 |
-
},
|
4769 |
-
changeGeneration: function() {
|
4770 |
-
this.history.lastOp = this.history.lastOrigin = null;
|
4771 |
-
return this.history.generation;
|
4772 |
-
},
|
4773 |
-
isClean: function (gen) {
|
4774 |
-
return this.history.generation == (gen || this.cleanGeneration);
|
4775 |
-
},
|
4776 |
-
|
4777 |
-
getHistory: function() {
|
4778 |
-
return {done: copyHistoryArray(this.history.done),
|
4779 |
-
undone: copyHistoryArray(this.history.undone)};
|
4780 |
-
},
|
4781 |
-
setHistory: function(histData) {
|
4782 |
-
var hist = this.history = makeHistory(this.history.maxGeneration);
|
4783 |
-
hist.done = histData.done.slice(0);
|
4784 |
-
hist.undone = histData.undone.slice(0);
|
4785 |
-
},
|
4786 |
-
|
4787 |
-
markText: function(from, to, options) {
|
4788 |
-
return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
|
4789 |
-
},
|
4790 |
-
setBookmark: function(pos, options) {
|
4791 |
-
var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
|
4792 |
-
insertLeft: options && options.insertLeft};
|
4793 |
-
pos = clipPos(this, pos);
|
4794 |
-
return markText(this, pos, pos, realOpts, "bookmark");
|
4795 |
-
},
|
4796 |
-
findMarksAt: function(pos) {
|
4797 |
-
pos = clipPos(this, pos);
|
4798 |
-
var markers = [], spans = getLine(this, pos.line).markedSpans;
|
4799 |
-
if (spans) for (var i = 0; i < spans.length; ++i) {
|
4800 |
-
var span = spans[i];
|
4801 |
-
if ((span.from == null || span.from <= pos.ch) &&
|
4802 |
-
(span.to == null || span.to >= pos.ch))
|
4803 |
-
markers.push(span.marker.parent || span.marker);
|
4804 |
-
}
|
4805 |
-
return markers;
|
4806 |
-
},
|
4807 |
-
getAllMarks: function() {
|
4808 |
-
var markers = [];
|
4809 |
-
this.iter(function(line) {
|
4810 |
-
var sps = line.markedSpans;
|
4811 |
-
if (sps) for (var i = 0; i < sps.length; ++i)
|
4812 |
-
if (sps[i].from != null) markers.push(sps[i].marker);
|
4813 |
-
});
|
4814 |
-
return markers;
|
4815 |
-
},
|
4816 |
-
|
4817 |
-
posFromIndex: function(off) {
|
4818 |
-
var ch, lineNo = this.first;
|
4819 |
-
this.iter(function(line) {
|
4820 |
-
var sz = line.text.length + 1;
|
4821 |
-
if (sz > off) { ch = off; return true; }
|
4822 |
-
off -= sz;
|
4823 |
-
++lineNo;
|
4824 |
-
});
|
4825 |
-
return clipPos(this, Pos(lineNo, ch));
|
4826 |
-
},
|
4827 |
-
indexFromPos: function (coords) {
|
4828 |
-
coords = clipPos(this, coords);
|
4829 |
-
var index = coords.ch;
|
4830 |
-
if (coords.line < this.first || coords.ch < 0) return 0;
|
4831 |
-
this.iter(this.first, coords.line, function (line) {
|
4832 |
-
index += line.text.length + 1;
|
4833 |
-
});
|
4834 |
-
return index;
|
4835 |
-
},
|
4836 |
-
|
4837 |
-
copy: function(copyHistory) {
|
4838 |
-
var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);
|
4839 |
-
doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
|
4840 |
-
doc.sel = {from: this.sel.from, to: this.sel.to, head: this.sel.head, anchor: this.sel.anchor,
|
4841 |
-
shift: this.sel.shift, extend: false, goalColumn: this.sel.goalColumn};
|
4842 |
-
if (copyHistory) {
|
4843 |
-
doc.history.undoDepth = this.history.undoDepth;
|
4844 |
-
doc.setHistory(this.getHistory());
|
4845 |
-
}
|
4846 |
-
return doc;
|
4847 |
-
},
|
4848 |
-
|
4849 |
-
linkedDoc: function(options) {
|
4850 |
-
if (!options) options = {};
|
4851 |
-
var from = this.first, to = this.first + this.size;
|
4852 |
-
if (options.from != null && options.from > from) from = options.from;
|
4853 |
-
if (options.to != null && options.to < to) to = options.to;
|
4854 |
-
var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);
|
4855 |
-
if (options.sharedHist) copy.history = this.history;
|
4856 |
-
(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
|
4857 |
-
copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
|
4858 |
-
return copy;
|
4859 |
-
},
|
4860 |
-
unlinkDoc: function(other) {
|
4861 |
-
if (other instanceof CodeMirror) other = other.doc;
|
4862 |
-
if (this.linked) for (var i = 0; i < this.linked.length; ++i) {
|
4863 |
-
var link = this.linked[i];
|
4864 |
-
if (link.doc != other) continue;
|
4865 |
-
this.linked.splice(i, 1);
|
4866 |
-
other.unlinkDoc(this);
|
4867 |
-
break;
|
4868 |
-
}
|
4869 |
-
// If the histories were shared, split them again
|
4870 |
-
if (other.history == this.history) {
|
4871 |
-
var splitIds = [other.id];
|
4872 |
-
linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);
|
4873 |
-
other.history = makeHistory();
|
4874 |
-
other.history.done = copyHistoryArray(this.history.done, splitIds);
|
4875 |
-
other.history.undone = copyHistoryArray(this.history.undone, splitIds);
|
4876 |
-
}
|
4877 |
-
},
|
4878 |
-
iterLinkedDocs: function(f) {linkedDocs(this, f);},
|
4879 |
-
|
4880 |
-
getMode: function() {return this.mode;},
|
4881 |
-
getEditor: function() {return this.cm;}
|
4882 |
-
});
|
4883 |
-
|
4884 |
-
Doc.prototype.eachLine = Doc.prototype.iter;
|
4885 |
-
|
4886 |
-
// The Doc methods that should be available on CodeMirror instances
|
4887 |
-
var dontDelegate = "iter insert remove copy getEditor".split(" ");
|
4888 |
-
for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
|
4889 |
-
CodeMirror.prototype[prop] = (function(method) {
|
4890 |
-
return function() {return method.apply(this.doc, arguments);};
|
4891 |
-
})(Doc.prototype[prop]);
|
4892 |
-
|
4893 |
-
eventMixin(Doc);
|
4894 |
-
|
4895 |
-
function linkedDocs(doc, f, sharedHistOnly) {
|
4896 |
-
function propagate(doc, skip, sharedHist) {
|
4897 |
-
if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
|
4898 |
-
var rel = doc.linked[i];
|
4899 |
-
if (rel.doc == skip) continue;
|
4900 |
-
var shared = sharedHist && rel.sharedHist;
|
4901 |
-
if (sharedHistOnly && !shared) continue;
|
4902 |
-
f(rel.doc, shared);
|
4903 |
-
propagate(rel.doc, doc, shared);
|
4904 |
-
}
|
4905 |
-
}
|
4906 |
-
propagate(doc, null, true);
|
4907 |
-
}
|
4908 |
-
|
4909 |
-
function attachDoc(cm, doc) {
|
4910 |
-
if (doc.cm) throw new Error("This document is already in use.");
|
4911 |
-
cm.doc = doc;
|
4912 |
-
doc.cm = cm;
|
4913 |
-
estimateLineHeights(cm);
|
4914 |
-
loadMode(cm);
|
4915 |
-
if (!cm.options.lineWrapping) computeMaxLength(cm);
|
4916 |
-
cm.options.mode = doc.modeOption;
|
4917 |
-
regChange(cm);
|
4918 |
-
}
|
4919 |
-
|
4920 |
-
// LINE UTILITIES
|
4921 |
-
|
4922 |
-
function getLine(chunk, n) {
|
4923 |
-
n -= chunk.first;
|
4924 |
-
while (!chunk.lines) {
|
4925 |
-
for (var i = 0;; ++i) {
|
4926 |
-
var child = chunk.children[i], sz = child.chunkSize();
|
4927 |
-
if (n < sz) { chunk = child; break; }
|
4928 |
-
n -= sz;
|
4929 |
-
}
|
4930 |
-
}
|
4931 |
-
return chunk.lines[n];
|
4932 |
-
}
|
4933 |
-
|
4934 |
-
function getBetween(doc, start, end) {
|
4935 |
-
var out = [], n = start.line;
|
4936 |
-
doc.iter(start.line, end.line + 1, function(line) {
|
4937 |
-
var text = line.text;
|
4938 |
-
if (n == end.line) text = text.slice(0, end.ch);
|
4939 |
-
if (n == start.line) text = text.slice(start.ch);
|
4940 |
-
out.push(text);
|
4941 |
-
++n;
|
4942 |
-
});
|
4943 |
-
return out;
|
4944 |
-
}
|
4945 |
-
function getLines(doc, from, to) {
|
4946 |
-
var out = [];
|
4947 |
-
doc.iter(from, to, function(line) { out.push(line.text); });
|
4948 |
-
return out;
|
4949 |
-
}
|
4950 |
-
|
4951 |
-
function updateLineHeight(line, height) {
|
4952 |
-
var diff = height - line.height;
|
4953 |
-
for (var n = line; n; n = n.parent) n.height += diff;
|
4954 |
-
}
|
4955 |
-
|
4956 |
-
function lineNo(line) {
|
4957 |
-
if (line.parent == null) return null;
|
4958 |
-
var cur = line.parent, no = indexOf(cur.lines, line);
|
4959 |
-
for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
|
4960 |
-
for (var i = 0;; ++i) {
|
4961 |
-
if (chunk.children[i] == cur) break;
|
4962 |
-
no += chunk.children[i].chunkSize();
|
4963 |
-
}
|
4964 |
-
}
|
4965 |
-
return no + cur.first;
|
4966 |
-
}
|
4967 |
-
|
4968 |
-
function lineAtHeight(chunk, h) {
|
4969 |
-
var n = chunk.first;
|
4970 |
-
outer: do {
|
4971 |
-
for (var i = 0, e = chunk.children.length; i < e; ++i) {
|
4972 |
-
var child = chunk.children[i], ch = child.height;
|
4973 |
-
if (h < ch) { chunk = child; continue outer; }
|
4974 |
-
h -= ch;
|
4975 |
-
n += child.chunkSize();
|
4976 |
-
}
|
4977 |
-
return n;
|
4978 |
-
} while (!chunk.lines);
|
4979 |
-
for (var i = 0, e = chunk.lines.length; i < e; ++i) {
|
4980 |
-
var line = chunk.lines[i], lh = line.height;
|
4981 |
-
if (h < lh) break;
|
4982 |
-
h -= lh;
|
4983 |
-
}
|
4984 |
-
return n + i;
|
4985 |
-
}
|
4986 |
-
|
4987 |
-
function heightAtLine(cm, lineObj) {
|
4988 |
-
lineObj = visualLine(cm.doc, lineObj);
|
4989 |
-
|
4990 |
-
var h = 0, chunk = lineObj.parent;
|
4991 |
-
for (var i = 0; i < chunk.lines.length; ++i) {
|
4992 |
-
var line = chunk.lines[i];
|
4993 |
-
if (line == lineObj) break;
|
4994 |
-
else h += line.height;
|
4995 |
-
}
|
4996 |
-
for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
|
4997 |
-
for (var i = 0; i < p.children.length; ++i) {
|
4998 |
-
var cur = p.children[i];
|
4999 |
-
if (cur == chunk) break;
|
5000 |
-
else h += cur.height;
|
5001 |
-
}
|
5002 |
-
}
|
5003 |
-
return h;
|
5004 |
-
}
|
5005 |
-
|
5006 |
-
function getOrder(line) {
|
5007 |
-
var order = line.order;
|
5008 |
-
if (order == null) order = line.order = bidiOrdering(line.text);
|
5009 |
-
return order;
|
5010 |
-
}
|
5011 |
-
|
5012 |
-
// HISTORY
|
5013 |
-
|
5014 |
-
function makeHistory(startGen) {
|
5015 |
-
return {
|
5016 |
-
// Arrays of history events. Doing something adds an event to
|
5017 |
-
// done and clears undo. Undoing moves events from done to
|
5018 |
-
// undone, redoing moves them in the other direction.
|
5019 |
-
done: [], undone: [], undoDepth: Infinity,
|
5020 |
-
// Used to track when changes can be merged into a single undo
|
5021 |
-
// event
|
5022 |
-
lastTime: 0, lastOp: null, lastOrigin: null,
|
5023 |
-
// Used by the isClean() method
|
5024 |
-
generation: startGen || 1, maxGeneration: startGen || 1
|
5025 |
-
};
|
5026 |
-
}
|
5027 |
-
|
5028 |
-
function attachLocalSpans(doc, change, from, to) {
|
5029 |
-
var existing = change["spans_" + doc.id], n = 0;
|
5030 |
-
doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
|
5031 |
-
if (line.markedSpans)
|
5032 |
-
(existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
|
5033 |
-
++n;
|
5034 |
-
});
|
5035 |
-
}
|
5036 |
-
|
5037 |
-
function historyChangeFromChange(doc, change) {
|
5038 |
-
var from = { line: change.from.line, ch: change.from.ch };
|
5039 |
-
var histChange = {from: from, to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
|
5040 |
-
attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
|
5041 |
-
linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
|
5042 |
-
return histChange;
|
5043 |
-
}
|
5044 |
-
|
5045 |
-
function addToHistory(doc, change, selAfter, opId) {
|
5046 |
-
var hist = doc.history;
|
5047 |
-
hist.undone.length = 0;
|
5048 |
-
var time = +new Date, cur = lst(hist.done);
|
5049 |
-
|
5050 |
-
if (cur &&
|
5051 |
-
(hist.lastOp == opId ||
|
5052 |
-
hist.lastOrigin == change.origin && change.origin &&
|
5053 |
-
((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) ||
|
5054 |
-
change.origin.charAt(0) == "*"))) {
|
5055 |
-
// Merge this change into the last event
|
5056 |
-
var last = lst(cur.changes);
|
5057 |
-
if (posEq(change.from, change.to) && posEq(change.from, last.to)) {
|
5058 |
-
// Optimized case for simple insertion -- don't want to add
|
5059 |
-
// new changesets for every character typed
|
5060 |
-
last.to = changeEnd(change);
|
5061 |
-
} else {
|
5062 |
-
// Add new sub-event
|
5063 |
-
cur.changes.push(historyChangeFromChange(doc, change));
|
5064 |
-
}
|
5065 |
-
cur.anchorAfter = selAfter.anchor; cur.headAfter = selAfter.head;
|
5066 |
-
} else {
|
5067 |
-
// Can not be merged, start a new event.
|
5068 |
-
cur = {changes: [historyChangeFromChange(doc, change)],
|
5069 |
-
generation: hist.generation,
|
5070 |
-
anchorBefore: doc.sel.anchor, headBefore: doc.sel.head,
|
5071 |
-
anchorAfter: selAfter.anchor, headAfter: selAfter.head};
|
5072 |
-
hist.done.push(cur);
|
5073 |
-
hist.generation = ++hist.maxGeneration;
|
5074 |
-
while (hist.done.length > hist.undoDepth)
|
5075 |
-
hist.done.shift();
|
5076 |
-
}
|
5077 |
-
hist.lastTime = time;
|
5078 |
-
hist.lastOp = opId;
|
5079 |
-
hist.lastOrigin = change.origin;
|
5080 |
-
}
|
5081 |
-
|
5082 |
-
function removeClearedSpans(spans) {
|
5083 |
-
if (!spans) return null;
|
5084 |
-
for (var i = 0, out; i < spans.length; ++i) {
|
5085 |
-
if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
|
5086 |
-
else if (out) out.push(spans[i]);
|
5087 |
-
}
|
5088 |
-
return !out ? spans : out.length ? out : null;
|
5089 |
-
}
|
5090 |
-
|
5091 |
-
function getOldSpans(doc, change) {
|
5092 |
-
var found = change["spans_" + doc.id];
|
5093 |
-
if (!found) return null;
|
5094 |
-
for (var i = 0, nw = []; i < change.text.length; ++i)
|
5095 |
-
nw.push(removeClearedSpans(found[i]));
|
5096 |
-
return nw;
|
5097 |
-
}
|
5098 |
-
|
5099 |
-
// Used both to provide a JSON-safe object in .getHistory, and, when
|
5100 |
-
// detaching a document, to split the history in two
|
5101 |
-
function copyHistoryArray(events, newGroup) {
|
5102 |
-
for (var i = 0, copy = []; i < events.length; ++i) {
|
5103 |
-
var event = events[i], changes = event.changes, newChanges = [];
|
5104 |
-
copy.push({changes: newChanges, anchorBefore: event.anchorBefore, headBefore: event.headBefore,
|
5105 |
-
anchorAfter: event.anchorAfter, headAfter: event.headAfter});
|
5106 |
-
for (var j = 0; j < changes.length; ++j) {
|
5107 |
-
var change = changes[j], m;
|
5108 |
-
newChanges.push({from: change.from, to: change.to, text: change.text});
|
5109 |
-
if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
|
5110 |
-
if (indexOf(newGroup, Number(m[1])) > -1) {
|
5111 |
-
lst(newChanges)[prop] = change[prop];
|
5112 |
-
delete change[prop];
|
5113 |
-
}
|
5114 |
-
}
|
5115 |
-
}
|
5116 |
-
}
|
5117 |
-
return copy;
|
5118 |
-
}
|
5119 |
-
|
5120 |
-
// Rebasing/resetting history to deal with externally-sourced changes
|
5121 |
-
|
5122 |
-
function rebaseHistSel(pos, from, to, diff) {
|
5123 |
-
if (to < pos.line) {
|
5124 |
-
pos.line += diff;
|
5125 |
-
} else if (from < pos.line) {
|
5126 |
-
pos.line = from;
|
5127 |
-
pos.ch = 0;
|
5128 |
-
}
|
5129 |
-
}
|
5130 |
-
|
5131 |
-
// Tries to rebase an array of history events given a change in the
|
5132 |
-
// document. If the change touches the same lines as the event, the
|
5133 |
-
// event, and everything 'behind' it, is discarded. If the change is
|
5134 |
-
// before the event, the event's positions are updated. Uses a
|
5135 |
-
// copy-on-write scheme for the positions, to avoid having to
|
5136 |
-
// reallocate them all on every rebase, but also avoid problems with
|
5137 |
-
// shared position objects being unsafely updated.
|
5138 |
-
function rebaseHistArray(array, from, to, diff) {
|
5139 |
-
for (var i = 0; i < array.length; ++i) {
|
5140 |
-
var sub = array[i], ok = true;
|
5141 |
-
for (var j = 0; j < sub.changes.length; ++j) {
|
5142 |
-
var cur = sub.changes[j];
|
5143 |
-
if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); }
|
5144 |
-
if (to < cur.from.line) {
|
5145 |
-
cur.from.line += diff;
|
5146 |
-
cur.to.line += diff;
|
5147 |
-
} else if (from <= cur.to.line) {
|
5148 |
-
ok = false;
|
5149 |
-
break;
|
5150 |
-
}
|
5151 |
-
}
|
5152 |
-
if (!sub.copied) {
|
5153 |
-
sub.anchorBefore = copyPos(sub.anchorBefore); sub.headBefore = copyPos(sub.headBefore);
|
5154 |
-
sub.anchorAfter = copyPos(sub.anchorAfter); sub.readAfter = copyPos(sub.headAfter);
|
5155 |
-
sub.copied = true;
|
5156 |
-
}
|
5157 |
-
if (!ok) {
|
5158 |
-
array.splice(0, i + 1);
|
5159 |
-
i = 0;
|
5160 |
-
} else {
|
5161 |
-
rebaseHistSel(sub.anchorBefore); rebaseHistSel(sub.headBefore);
|
5162 |
-
rebaseHistSel(sub.anchorAfter); rebaseHistSel(sub.headAfter);
|
5163 |
-
}
|
5164 |
-
}
|
5165 |
-
}
|
5166 |
-
|
5167 |
-
function rebaseHist(hist, change) {
|
5168 |
-
var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
|
5169 |
-
rebaseHistArray(hist.done, from, to, diff);
|
5170 |
-
rebaseHistArray(hist.undone, from, to, diff);
|
5171 |
-
}
|
5172 |
-
|
5173 |
-
// EVENT OPERATORS
|
5174 |
-
|
5175 |
-
function stopMethod() {e_stop(this);}
|
5176 |
-
// Ensure an event has a stop method.
|
5177 |
-
function addStop(event) {
|
5178 |
-
if (!event.stop) event.stop = stopMethod;
|
5179 |
-
return event;
|
5180 |
-
}
|
5181 |
-
|
5182 |
-
function e_preventDefault(e) {
|
5183 |
-
if (e.preventDefault) e.preventDefault();
|
5184 |
-
else e.returnValue = false;
|
5185 |
-
}
|
5186 |
-
function e_stopPropagation(e) {
|
5187 |
-
if (e.stopPropagation) e.stopPropagation();
|
5188 |
-
else e.cancelBubble = true;
|
5189 |
-
}
|
5190 |
-
function e_defaultPrevented(e) {
|
5191 |
-
return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
|
5192 |
-
}
|
5193 |
-
function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
|
5194 |
-
CodeMirror.e_stop = e_stop;
|
5195 |
-
CodeMirror.e_preventDefault = e_preventDefault;
|
5196 |
-
CodeMirror.e_stopPropagation = e_stopPropagation;
|
5197 |
-
|
5198 |
-
function e_target(e) {return e.target || e.srcElement;}
|
5199 |
-
function e_button(e) {
|
5200 |
-
var b = e.which;
|
5201 |
-
if (b == null) {
|
5202 |
-
if (e.button & 1) b = 1;
|
5203 |
-
else if (e.button & 2) b = 3;
|
5204 |
-
else if (e.button & 4) b = 2;
|
5205 |
-
}
|
5206 |
-
if (mac && e.ctrlKey && b == 1) b = 3;
|
5207 |
-
return b;
|
5208 |
-
}
|
5209 |
-
|
5210 |
-
// EVENT HANDLING
|
5211 |
-
|
5212 |
-
function on(emitter, type, f) {
|
5213 |
-
if (emitter.addEventListener)
|
5214 |
-
emitter.addEventListener(type, f, false);
|
5215 |
-
else if (emitter.attachEvent)
|
5216 |
-
emitter.attachEvent("on" + type, f);
|
5217 |
-
else {
|
5218 |
-
var map = emitter._handlers || (emitter._handlers = {});
|
5219 |
-
var arr = map[type] || (map[type] = []);
|
5220 |
-
arr.push(f);
|
5221 |
-
}
|
5222 |
-
}
|
5223 |
-
|
5224 |
-
function off(emitter, type, f) {
|
5225 |
-
if (emitter.removeEventListener)
|
5226 |
-
emitter.removeEventListener(type, f, false);
|
5227 |
-
else if (emitter.detachEvent)
|
5228 |
-
emitter.detachEvent("on" + type, f);
|
5229 |
-
else {
|
5230 |
-
var arr = emitter._handlers && emitter._handlers[type];
|
5231 |
-
if (!arr) return;
|
5232 |
-
for (var i = 0; i < arr.length; ++i)
|
5233 |
-
if (arr[i] == f) { arr.splice(i, 1); break; }
|
5234 |
-
}
|
5235 |
-
}
|
5236 |
-
|
5237 |
-
function signal(emitter, type /*, values...*/) {
|
5238 |
-
var arr = emitter._handlers && emitter._handlers[type];
|
5239 |
-
if (!arr) return;
|
5240 |
-
var args = Array.prototype.slice.call(arguments, 2);
|
5241 |
-
for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);
|
5242 |
-
}
|
5243 |
-
|
5244 |
-
var delayedCallbacks, delayedCallbackDepth = 0;
|
5245 |
-
function signalLater(emitter, type /*, values...*/) {
|
5246 |
-
var arr = emitter._handlers && emitter._handlers[type];
|
5247 |
-
if (!arr) return;
|
5248 |
-
var args = Array.prototype.slice.call(arguments, 2);
|
5249 |
-
if (!delayedCallbacks) {
|
5250 |
-
++delayedCallbackDepth;
|
5251 |
-
delayedCallbacks = [];
|
5252 |
-
setTimeout(fireDelayed, 0);
|
5253 |
-
}
|
5254 |
-
function bnd(f) {return function(){f.apply(null, args);};};
|
5255 |
-
for (var i = 0; i < arr.length; ++i)
|
5256 |
-
delayedCallbacks.push(bnd(arr[i]));
|
5257 |
-
}
|
5258 |
-
|
5259 |
-
function signalDOMEvent(cm, e, override) {
|
5260 |
-
signal(cm, override || e.type, cm, e);
|
5261 |
-
return e_defaultPrevented(e) || e.codemirrorIgnore;
|
5262 |
-
}
|
5263 |
-
|
5264 |
-
function fireDelayed() {
|
5265 |
-
--delayedCallbackDepth;
|
5266 |
-
var delayed = delayedCallbacks;
|
5267 |
-
delayedCallbacks = null;
|
5268 |
-
for (var i = 0; i < delayed.length; ++i) delayed[i]();
|
5269 |
-
}
|
5270 |
-
|
5271 |
-
function hasHandler(emitter, type) {
|
5272 |
-
var arr = emitter._handlers && emitter._handlers[type];
|
5273 |
-
return arr && arr.length > 0;
|
5274 |
-
}
|
5275 |
-
|
5276 |
-
CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal;
|
5277 |
-
|
5278 |
-
function eventMixin(ctor) {
|
5279 |
-
ctor.prototype.on = function(type, f) {on(this, type, f);};
|
5280 |
-
ctor.prototype.off = function(type, f) {off(this, type, f);};
|
5281 |
-
}
|
5282 |
-
|
5283 |
-
// MISC UTILITIES
|
5284 |
-
|
5285 |
-
// Number of pixels added to scroller and sizer to hide scrollbar
|
5286 |
-
var scrollerCutOff = 30;
|
5287 |
-
|
5288 |
-
// Returned or thrown by various protocols to signal 'I'm not
|
5289 |
-
// handling this'.
|
5290 |
-
var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
|
5291 |
-
|
5292 |
-
function Delayed() {this.id = null;}
|
5293 |
-
Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};
|
5294 |
-
|
5295 |
-
// Counts the column offset in a string, taking tabs into account.
|
5296 |
-
// Used mostly to find indentation.
|
5297 |
-
function countColumn(string, end, tabSize, startIndex, startValue) {
|
5298 |
-
if (end == null) {
|
5299 |
-
end = string.search(/[^\s\u00a0]/);
|
5300 |
-
if (end == -1) end = string.length;
|
5301 |
-
}
|
5302 |
-
for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {
|
5303 |
-
if (string.charAt(i) == "\t") n += tabSize - (n % tabSize);
|
5304 |
-
else ++n;
|
5305 |
-
}
|
5306 |
-
return n;
|
5307 |
-
}
|
5308 |
-
CodeMirror.countColumn = countColumn;
|
5309 |
-
|
5310 |
-
var spaceStrs = [""];
|
5311 |
-
function spaceStr(n) {
|
5312 |
-
while (spaceStrs.length <= n)
|
5313 |
-
spaceStrs.push(lst(spaceStrs) + " ");
|
5314 |
-
return spaceStrs[n];
|
5315 |
-
}
|
5316 |
-
|
5317 |
-
function lst(arr) { return arr[arr.length-1]; }
|
5318 |
-
|
5319 |
-
function selectInput(node) {
|
5320 |
-
if (ios) { // Mobile Safari apparently has a bug where select() is broken.
|
5321 |
-
node.selectionStart = 0;
|
5322 |
-
node.selectionEnd = node.value.length;
|
5323 |
-
} else {
|
5324 |
-
// Suppress mysterious IE10 errors
|
5325 |
-
try { node.select(); }
|
5326 |
-
catch(_e) {}
|
5327 |
-
}
|
5328 |
-
}
|
5329 |
-
|
5330 |
-
function indexOf(collection, elt) {
|
5331 |
-
if (collection.indexOf) return collection.indexOf(elt);
|
5332 |
-
for (var i = 0, e = collection.length; i < e; ++i)
|
5333 |
-
if (collection[i] == elt) return i;
|
5334 |
-
return -1;
|
5335 |
-
}
|
5336 |
-
|
5337 |
-
function createObj(base, props) {
|
5338 |
-
function Obj() {}
|
5339 |
-
Obj.prototype = base;
|
5340 |
-
var inst = new Obj();
|
5341 |
-
if (props) copyObj(props, inst);
|
5342 |
-
return inst;
|
5343 |
-
}
|
5344 |
-
|
5345 |
-
function copyObj(obj, target) {
|
5346 |
-
if (!target) target = {};
|
5347 |
-
for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop];
|
5348 |
-
return target;
|
5349 |
-
}
|
5350 |
-
|
5351 |
-
function emptyArray(size) {
|
5352 |
-
for (var a = [], i = 0; i < size; ++i) a.push(undefined);
|
5353 |
-
return a;
|
5354 |
-
}
|
5355 |
-
|
5356 |
-
function bind(f) {
|
5357 |
-
var args = Array.prototype.slice.call(arguments, 1);
|
5358 |
-
return function(){return f.apply(null, args);};
|
5359 |
-
}
|
5360 |
-
|
5361 |
-
var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
|
5362 |
-
function isWordChar(ch) {
|
5363 |
-
return /\w/.test(ch) || ch > "\x80" &&
|
5364 |
-
(ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
|
5365 |
-
}
|
5366 |
-
|
5367 |
-
function isEmpty(obj) {
|
5368 |
-
for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;
|
5369 |
-
return true;
|
5370 |
-
}
|
5371 |
-
|
5372 |
-
var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;
|
5373 |
-
|
5374 |
-
// DOM UTILITIES
|
5375 |
-
|
5376 |
-
function elt(tag, content, className, style) {
|
5377 |
-
var e = document.createElement(tag);
|
5378 |
-
if (className) e.className = className;
|
5379 |
-
if (style) e.style.cssText = style;
|
5380 |
-
if (typeof content == "string") setTextContent(e, content);
|
5381 |
-
else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
|
5382 |
-
return e;
|
5383 |
-
}
|
5384 |
-
|
5385 |
-
function removeChildren(e) {
|
5386 |
-
for (var count = e.childNodes.length; count > 0; --count)
|
5387 |
-
e.removeChild(e.firstChild);
|
5388 |
-
return e;
|
5389 |
-
}
|
5390 |
-
|
5391 |
-
function removeChildrenAndAdd(parent, e) {
|
5392 |
-
return removeChildren(parent).appendChild(e);
|
5393 |
-
}
|
5394 |
-
|
5395 |
-
function setTextContent(e, str) {
|
5396 |
-
if (ie_lt9) {
|
5397 |
-
e.innerHTML = "";
|
5398 |
-
e.appendChild(document.createTextNode(str));
|
5399 |
-
} else e.textContent = str;
|
5400 |
-
}
|
5401 |
-
|
5402 |
-
function getRect(node) {
|
5403 |
-
return node.getBoundingClientRect();
|
5404 |
-
}
|
5405 |
-
CodeMirror.replaceGetRect = function(f) { getRect = f; };
|
5406 |
-
|
5407 |
-
// FEATURE DETECTION
|
5408 |
-
|
5409 |
-
// Detect drag-and-drop
|
5410 |
-
var dragAndDrop = function() {
|
5411 |
-
// There is *some* kind of drag-and-drop support in IE6-8, but I
|
5412 |
-
// couldn't get it to work yet.
|
5413 |
-
if (ie_lt9) return false;
|
5414 |
-
var div = elt('div');
|
5415 |
-
return "draggable" in div || "dragDrop" in div;
|
5416 |
-
}();
|
5417 |
-
|
5418 |
-
// For a reason I have yet to figure out, some browsers disallow
|
5419 |
-
// word wrapping between certain characters *only* if a new inline
|
5420 |
-
// element is started between them. This makes it hard to reliably
|
5421 |
-
// measure the position of things, since that requires inserting an
|
5422 |
-
// extra span. This terribly fragile set of tests matches the
|
5423 |
-
// character combinations that suffer from this phenomenon on the
|
5424 |
-
// various browsers.
|
5425 |
-
function spanAffectsWrapping() { return false; }
|
5426 |
-
if (gecko) // Only for "$'"
|
5427 |
-
spanAffectsWrapping = function(str, i) {
|
5428 |
-
return str.charCodeAt(i - 1) == 36 && str.charCodeAt(i) == 39;
|
5429 |
-
};
|
5430 |
-
else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent))
|
5431 |
-
spanAffectsWrapping = function(str, i) {
|
5432 |
-
return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1));
|
5433 |
-
};
|
5434 |
-
else if (webkit && !/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent))
|
5435 |
-
spanAffectsWrapping = function(str, i) {
|
5436 |
-
if (i > 1 && str.charCodeAt(i - 1) == 45) {
|
5437 |
-
if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true;
|
5438 |
-
if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false;
|
5439 |
-
}
|
5440 |
-
return /[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1));
|
5441 |
-
};
|
5442 |
-
|
5443 |
-
var knownScrollbarWidth;
|
5444 |
-
function scrollbarWidth(measure) {
|
5445 |
-
if (knownScrollbarWidth != null) return knownScrollbarWidth;
|
5446 |
-
var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
|
5447 |
-
removeChildrenAndAdd(measure, test);
|
5448 |
-
if (test.offsetWidth)
|
5449 |
-
knownScrollbarWidth = test.offsetHeight - test.clientHeight;
|
5450 |
-
return knownScrollbarWidth || 0;
|
5451 |
-
}
|
5452 |
-
|
5453 |
-
var zwspSupported;
|
5454 |
-
function zeroWidthElement(measure) {
|
5455 |
-
if (zwspSupported == null) {
|
5456 |
-
var test = elt("span", "\u200b");
|
5457 |
-
removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
|
5458 |
-
if (measure.firstChild.offsetHeight != 0)
|
5459 |
-
zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8;
|
5460 |
-
}
|
5461 |
-
if (zwspSupported) return elt("span", "\u200b");
|
5462 |
-
else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
|
5463 |
-
}
|
5464 |
-
|
5465 |
-
// See if "".split is the broken IE version, if so, provide an
|
5466 |
-
// alternative way to split lines.
|
5467 |
-
var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
|
5468 |
-
var pos = 0, result = [], l = string.length;
|
5469 |
-
while (pos <= l) {
|
5470 |
-
var nl = string.indexOf("\n", pos);
|
5471 |
-
if (nl == -1) nl = string.length;
|
5472 |
-
var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
|
5473 |
-
var rt = line.indexOf("\r");
|
5474 |
-
if (rt != -1) {
|
5475 |
-
result.push(line.slice(0, rt));
|
5476 |
-
pos += rt + 1;
|
5477 |
-
} else {
|
5478 |
-
result.push(line);
|
5479 |
-
pos = nl + 1;
|
5480 |
-
}
|
5481 |
-
}
|
5482 |
-
return result;
|
5483 |
-
} : function(string){return string.split(/\r\n?|\n/);};
|
5484 |
-
CodeMirror.splitLines = splitLines;
|
5485 |
-
|
5486 |
-
var hasSelection = window.getSelection ? function(te) {
|
5487 |
-
try { return te.selectionStart != te.selectionEnd; }
|
5488 |
-
catch(e) { return false; }
|
5489 |
-
} : function(te) {
|
5490 |
-
try {var range = te.ownerDocument.selection.createRange();}
|
5491 |
-
catch(e) {}
|
5492 |
-
if (!range || range.parentElement() != te) return false;
|
5493 |
-
return range.compareEndPoints("StartToEnd", range) != 0;
|
5494 |
-
};
|
5495 |
-
|
5496 |
-
var hasCopyEvent = (function() {
|
5497 |
-
var e = elt("div");
|
5498 |
-
if ("oncopy" in e) return true;
|
5499 |
-
e.setAttribute("oncopy", "return;");
|
5500 |
-
return typeof e.oncopy == 'function';
|
5501 |
-
})();
|
5502 |
-
|
5503 |
-
// KEY NAMING
|
5504 |
-
|
5505 |
-
var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
|
5506 |
-
19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
|
5507 |
-
36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
|
5508 |
-
46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete",
|
5509 |
-
186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
|
5510 |
-
221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home",
|
5511 |
-
63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"};
|
5512 |
-
CodeMirror.keyNames = keyNames;
|
5513 |
-
(function() {
|
5514 |
-
// Number keys
|
5515 |
-
for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i);
|
5516 |
-
// Alphabetic keys
|
5517 |
-
for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);
|
5518 |
-
// Function keys
|
5519 |
-
for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i;
|
5520 |
-
})();
|
5521 |
-
|
5522 |
-
// BIDI HELPERS
|
5523 |
-
|
5524 |
-
function iterateBidiSections(order, from, to, f) {
|
5525 |
-
if (!order) return f(from, to, "ltr");
|
5526 |
-
var found = false;
|
5527 |
-
for (var i = 0; i < order.length; ++i) {
|
5528 |
-
var part = order[i];
|
5529 |
-
if (part.from < to && part.to > from || from == to && part.to == from) {
|
5530 |
-
f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
|
5531 |
-
found = true;
|
5532 |
-
}
|
5533 |
-
}
|
5534 |
-
if (!found) f(from, to, "ltr");
|
5535 |
-
}
|
5536 |
-
|
5537 |
-
function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }
|
5538 |
-
function bidiRight(part) { return part.level % 2 ? part.from : part.to; }
|
5539 |
-
|
5540 |
-
function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }
|
5541 |
-
function lineRight(line) {
|
5542 |
-
var order = getOrder(line);
|
5543 |
-
if (!order) return line.text.length;
|
5544 |
-
return bidiRight(lst(order));
|
5545 |
-
}
|
5546 |
-
|
5547 |
-
function lineStart(cm, lineN) {
|
5548 |
-
var line = getLine(cm.doc, lineN);
|
5549 |
-
var visual = visualLine(cm.doc, line);
|
5550 |
-
if (visual != line) lineN = lineNo(visual);
|
5551 |
-
var order = getOrder(visual);
|
5552 |
-
var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
|
5553 |
-
return Pos(lineN, ch);
|
5554 |
-
}
|
5555 |
-
function lineEnd(cm, lineN) {
|
5556 |
-
var merged, line;
|
5557 |
-
while (merged = collapsedSpanAtEnd(line = getLine(cm.doc, lineN)))
|
5558 |
-
lineN = merged.find().to.line;
|
5559 |
-
var order = getOrder(line);
|
5560 |
-
var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
|
5561 |
-
return Pos(lineN, ch);
|
5562 |
-
}
|
5563 |
-
|
5564 |
-
function compareBidiLevel(order, a, b) {
|
5565 |
-
var linedir = order[0].level;
|
5566 |
-
if (a == linedir) return true;
|
5567 |
-
if (b == linedir) return false;
|
5568 |
-
return a < b;
|
5569 |
-
}
|
5570 |
-
var bidiOther;
|
5571 |
-
function getBidiPartAt(order, pos) {
|
5572 |
-
for (var i = 0, found; i < order.length; ++i) {
|
5573 |
-
var cur = order[i];
|
5574 |
-
if (cur.from < pos && cur.to > pos) { bidiOther = null; return i; }
|
5575 |
-
if (cur.from == pos || cur.to == pos) {
|
5576 |
-
if (found == null) {
|
5577 |
-
found = i;
|
5578 |
-
} else if (compareBidiLevel(order, cur.level, order[found].level)) {
|
5579 |
-
bidiOther = found;
|
5580 |
-
return i;
|
5581 |
-
} else {
|
5582 |
-
bidiOther = i;
|
5583 |
-
return found;
|
5584 |
-
}
|
5585 |
-
}
|
5586 |
-
}
|
5587 |
-
bidiOther = null;
|
5588 |
-
return found;
|
5589 |
-
}
|
5590 |
-
|
5591 |
-
function moveInLine(line, pos, dir, byUnit) {
|
5592 |
-
if (!byUnit) return pos + dir;
|
5593 |
-
do pos += dir;
|
5594 |
-
while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));
|
5595 |
-
return pos;
|
5596 |
-
}
|
5597 |
-
|
5598 |
-
// This is somewhat involved. It is needed in order to move
|
5599 |
-
// 'visually' through bi-directional text -- i.e., pressing left
|
5600 |
-
// should make the cursor go left, even when in RTL text. The
|
5601 |
-
// tricky part is the 'jumps', where RTL and LTR text touch each
|
5602 |
-
// other. This often requires the cursor offset to move more than
|
5603 |
-
// one unit, in order to visually move one unit.
|
5604 |
-
function moveVisually(line, start, dir, byUnit) {
|
5605 |
-
var bidi = getOrder(line);
|
5606 |
-
if (!bidi) return moveLogically(line, start, dir, byUnit);
|
5607 |
-
var pos = getBidiPartAt(bidi, start), part = bidi[pos];
|
5608 |
-
var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);
|
5609 |
-
|
5610 |
-
for (;;) {
|
5611 |
-
if (target > part.from && target < part.to) return target;
|
5612 |
-
if (target == part.from || target == part.to) {
|
5613 |
-
if (getBidiPartAt(bidi, target) == pos) return target;
|
5614 |
-
part = bidi[pos += dir];
|
5615 |
-
return (dir > 0) == part.level % 2 ? part.to : part.from;
|
5616 |
-
} else {
|
5617 |
-
part = bidi[pos += dir];
|
5618 |
-
if (!part) return null;
|
5619 |
-
if ((dir > 0) == part.level % 2)
|
5620 |
-
target = moveInLine(line, part.to, -1, byUnit);
|
5621 |
-
else
|
5622 |
-
target = moveInLine(line, part.from, 1, byUnit);
|
5623 |
-
}
|
5624 |
-
}
|
5625 |
-
}
|
5626 |
-
|
5627 |
-
function moveLogically(line, start, dir, byUnit) {
|
5628 |
-
var target = start + dir;
|
5629 |
-
if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir;
|
5630 |
-
return target < 0 || target > line.text.length ? null : target;
|
5631 |
-
}
|
5632 |
-
|
5633 |
-
// Bidirectional ordering algorithm
|
5634 |
-
// See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
|
5635 |
-
// that this (partially) implements.
|
5636 |
-
|
5637 |
-
// One-char codes used for character types:
|
5638 |
-
// L (L): Left-to-Right
|
5639 |
-
// R (R): Right-to-Left
|
5640 |
-
// r (AL): Right-to-Left Arabic
|
5641 |
-
// 1 (EN): European Number
|
5642 |
-
// + (ES): European Number Separator
|
5643 |
-
// % (ET): European Number Terminator
|
5644 |
-
// n (AN): Arabic Number
|
5645 |
-
// , (CS): Common Number Separator
|
5646 |
-
// m (NSM): Non-Spacing Mark
|
5647 |
-
// b (BN): Boundary Neutral
|
5648 |
-
// s (B): Paragraph Separator
|
5649 |
-
// t (S): Segment Separator
|
5650 |
-
// w (WS): Whitespace
|
5651 |
-
// N (ON): Other Neutrals
|
5652 |
-
|
5653 |
-
// Returns null if characters are ordered as they appear
|
5654 |
-
// (left-to-right), or an array of sections ({from, to, level}
|
5655 |
-
// objects) in the order in which they occur visually.
|
5656 |
-
var bidiOrdering = (function() {
|
5657 |
-
// Character types for codepoints 0 to 0xff
|
5658 |
-
var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";
|
5659 |
-
// Character types for codepoints 0x600 to 0x6ff
|
5660 |
-
var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";
|
5661 |
-
function charType(code) {
|
5662 |
-
if (code <= 0xff) return lowTypes.charAt(code);
|
5663 |
-
else if (0x590 <= code && code <= 0x5f4) return "R";
|
5664 |
-
else if (0x600 <= code && code <= 0x6ff) return arabicTypes.charAt(code - 0x600);
|
5665 |
-
else if (0x700 <= code && code <= 0x8ac) return "r";
|
5666 |
-
else return "L";
|
5667 |
-
}
|
5668 |
-
|
5669 |
-
var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
5670 |
-
var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
|
5671 |
-
// Browsers seem to always treat the boundaries of block elements as being L.
|
5672 |
-
var outerType = "L";
|
5673 |
-
|
5674 |
-
return function(str) {
|
5675 |
-
if (!bidiRE.test(str)) return false;
|
5676 |
-
var len = str.length, types = [];
|
5677 |
-
for (var i = 0, type; i < len; ++i)
|
5678 |
-
types.push(type = charType(str.charCodeAt(i)));
|
5679 |
-
|
5680 |
-
// W1. Examine each non-spacing mark (NSM) in the level run, and
|
5681 |
-
// change the type of the NSM to the type of the previous
|
5682 |
-
// character. If the NSM is at the start of the level run, it will
|
5683 |
-
// get the type of sor.
|
5684 |
-
for (var i = 0, prev = outerType; i < len; ++i) {
|
5685 |
-
var type = types[i];
|
5686 |
-
if (type == "m") types[i] = prev;
|
5687 |
-
else prev = type;
|
5688 |
-
}
|
5689 |
-
|
5690 |
-
// W2. Search backwards from each instance of a European number
|
5691 |
-
// until the first strong type (R, L, AL, or sor) is found. If an
|
5692 |
-
// AL is found, change the type of the European number to Arabic
|
5693 |
-
// number.
|
5694 |
-
// W3. Change all ALs to R.
|
5695 |
-
for (var i = 0, cur = outerType; i < len; ++i) {
|
5696 |
-
var type = types[i];
|
5697 |
-
if (type == "1" && cur == "r") types[i] = "n";
|
5698 |
-
else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; }
|
5699 |
-
}
|
5700 |
-
|
5701 |
-
// W4. A single European separator between two European numbers
|
5702 |
-
// changes to a European number. A single common separator between
|
5703 |
-
// two numbers of the same type changes to that type.
|
5704 |
-
for (var i = 1, prev = types[0]; i < len - 1; ++i) {
|
5705 |
-
var type = types[i];
|
5706 |
-
if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1";
|
5707 |
-
else if (type == "," && prev == types[i+1] &&
|
5708 |
-
(prev == "1" || prev == "n")) types[i] = prev;
|
5709 |
-
prev = type;
|
5710 |
-
}
|
5711 |
-
|
5712 |
-
// W5. A sequence of European terminators adjacent to European
|
5713 |
-
// numbers changes to all European numbers.
|
5714 |
-
// W6. Otherwise, separators and terminators change to Other
|
5715 |
-
// Neutral.
|
5716 |
-
for (var i = 0; i < len; ++i) {
|
5717 |
-
var type = types[i];
|
5718 |
-
if (type == ",") types[i] = "N";
|
5719 |
-
else if (type == "%") {
|
5720 |
-
for (var end = i + 1; end < len && types[end] == "%"; ++end) {}
|
5721 |
-
var replace = (i && types[i-1] == "!") || (end < len - 1 && types[end] == "1") ? "1" : "N";
|
5722 |
-
for (var j = i; j < end; ++j) types[j] = replace;
|
5723 |
-
i = end - 1;
|
5724 |
-
}
|
5725 |
-
}
|
5726 |
-
|
5727 |
-
// W7. Search backwards from each instance of a European number
|
5728 |
-
// until the first strong type (R, L, or sor) is found. If an L is
|
5729 |
-
// found, then change the type of the European number to L.
|
5730 |
-
for (var i = 0, cur = outerType; i < len; ++i) {
|
5731 |
-
var type = types[i];
|
5732 |
-
if (cur == "L" && type == "1") types[i] = "L";
|
5733 |
-
else if (isStrong.test(type)) cur = type;
|
5734 |
-
}
|
5735 |
-
|
5736 |
-
// N1. A sequence of neutrals takes the direction of the
|
5737 |
-
// surrounding strong text if the text on both sides has the same
|
5738 |
-
// direction. European and Arabic numbers act as if they were R in
|
5739 |
-
// terms of their influence on neutrals. Start-of-level-run (sor)
|
5740 |
-
// and end-of-level-run (eor) are used at level run boundaries.
|
5741 |
-
// N2. Any remaining neutrals take the embedding direction.
|
5742 |
-
for (var i = 0; i < len; ++i) {
|
5743 |
-
if (isNeutral.test(types[i])) {
|
5744 |
-
for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}
|
5745 |
-
var before = (i ? types[i-1] : outerType) == "L";
|
5746 |
-
var after = (end < len - 1 ? types[end] : outerType) == "L";
|
5747 |
-
var replace = before || after ? "L" : "R";
|
5748 |
-
for (var j = i; j < end; ++j) types[j] = replace;
|
5749 |
-
i = end - 1;
|
5750 |
-
}
|
5751 |
-
}
|
5752 |
-
|
5753 |
-
// Here we depart from the documented algorithm, in order to avoid
|
5754 |
-
// building up an actual levels array. Since there are only three
|
5755 |
-
// levels (0, 1, 2) in an implementation that doesn't take
|
5756 |
-
// explicit embedding into account, we can build up the order on
|
5757 |
-
// the fly, without following the level-based algorithm.
|
5758 |
-
var order = [], m;
|
5759 |
-
for (var i = 0; i < len;) {
|
5760 |
-
if (countsAsLeft.test(types[i])) {
|
5761 |
-
var start = i;
|
5762 |
-
for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}
|
5763 |
-
order.push({from: start, to: i, level: 0});
|
5764 |
-
} else {
|
5765 |
-
var pos = i, at = order.length;
|
5766 |
-
for (++i; i < len && types[i] != "L"; ++i) {}
|
5767 |
-
for (var j = pos; j < i;) {
|
5768 |
-
if (countsAsNum.test(types[j])) {
|
5769 |
-
if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1});
|
5770 |
-
var nstart = j;
|
5771 |
-
for (++j; j < i && countsAsNum.test(types[j]); ++j) {}
|
5772 |
-
order.splice(at, 0, {from: nstart, to: j, level: 2});
|
5773 |
-
pos = j;
|
5774 |
-
} else ++j;
|
5775 |
-
}
|
5776 |
-
if (pos < i) order.splice(at, 0, {from: pos, to: i, level: 1});
|
5777 |
-
}
|
5778 |
-
}
|
5779 |
-
if (order[0].level == 1 && (m = str.match(/^\s+/))) {
|
5780 |
-
order[0].from = m[0].length;
|
5781 |
-
order.unshift({from: 0, to: m[0].length, level: 0});
|
5782 |
-
}
|
5783 |
-
if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
|
5784 |
-
lst(order).to -= m[0].length;
|
5785 |
-
order.push({from: len - m[0].length, to: len, level: 0});
|
5786 |
-
}
|
5787 |
-
if (order[0].level != lst(order).level)
|
5788 |
-
order.push({from: len, to: len, level: order[0].level});
|
5789 |
-
|
5790 |
-
return order;
|
5791 |
-
};
|
5792 |
-
})();
|
5793 |
-
|
5794 |
-
// THE END
|
5795 |
-
|
5796 |
-
CodeMirror.version = "3.15.0";
|
5797 |
-
|
5798 |
-
return CodeMirror;
|
5799 |
-
})();
|
1 |
+
// CodeMirror version 3.15
|
2 |
+
//
|
3 |
+
// CodeMirror is the only global var we claim
|
4 |
+
window.CodeMirror = (function() {
|
5 |
+
"use strict";
|
6 |
+
|
7 |
+
// BROWSER SNIFFING
|
8 |
+
|
9 |
+
// Crude, but necessary to handle a number of hard-to-feature-detect
|
10 |
+
// bugs and behavior differences.
|
11 |
+
var gecko = /gecko\/\d/i.test(navigator.userAgent);
|
12 |
+
var ie = /MSIE \d/.test(navigator.userAgent);
|
13 |
+
var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8);
|
14 |
+
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
|
15 |
+
var webkit = /WebKit\//.test(navigator.userAgent);
|
16 |
+
var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
|
17 |
+
var chrome = /Chrome\//.test(navigator.userAgent);
|
18 |
+
var opera = /Opera\//.test(navigator.userAgent);
|
19 |
+
var safari = /Apple Computer/.test(navigator.vendor);
|
20 |
+
var khtml = /KHTML\//.test(navigator.userAgent);
|
21 |
+
var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);
|
22 |
+
var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
|
23 |
+
var phantom = /PhantomJS/.test(navigator.userAgent);
|
24 |
+
|
25 |
+
var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
|
26 |
+
// This is woefully incomplete. Suggestions for alternative methods welcome.
|
27 |
+
var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
|
28 |
+
var mac = ios || /Mac/.test(navigator.platform);
|
29 |
+
var windows = /windows/i.test(navigator.platform);
|
30 |
+
|
31 |
+
var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
|
32 |
+
if (opera_version) opera_version = Number(opera_version[1]);
|
33 |
+
if (opera_version && opera_version >= 15) { opera = false; webkit = true; }
|
34 |
+
// Some browsers use the wrong event properties to signal cmd/ctrl on OS X
|
35 |
+
var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
|
36 |
+
var captureMiddleClick = gecko || (ie && !ie_lt9);
|
37 |
+
|
38 |
+
// Optimize some code when these features are not used
|
39 |
+
var sawReadOnlySpans = false, sawCollapsedSpans = false;
|
40 |
+
|
41 |
+
// CONSTRUCTOR
|
42 |
+
|
43 |
+
function CodeMirror(place, options) {
|
44 |
+
if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
|
45 |
+
|
46 |
+
this.options = options = options || {};
|
47 |
+
// Determine effective options based on given values and defaults.
|
48 |
+
for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt))
|
49 |
+
options[opt] = defaults[opt];
|
50 |
+
setGuttersForLineNumbers(options);
|
51 |
+
|
52 |
+
var docStart = typeof options.value == "string" ? 0 : options.value.first;
|
53 |
+
var display = this.display = makeDisplay(place, docStart);
|
54 |
+
display.wrapper.CodeMirror = this;
|
55 |
+
updateGutters(this);
|
56 |
+
if (options.autofocus && !mobile) focusInput(this);
|
57 |
+
|
58 |
+
this.state = {keyMaps: [],
|
59 |
+
overlays: [],
|
60 |
+
modeGen: 0,
|
61 |
+
overwrite: false, focused: false,
|
62 |
+
suppressEdits: false, pasteIncoming: false,
|
63 |
+
draggingText: false,
|
64 |
+
highlight: new Delayed()};
|
65 |
+
|
66 |
+
themeChanged(this);
|
67 |
+
if (options.lineWrapping)
|
68 |
+
this.display.wrapper.className += " CodeMirror-wrap";
|
69 |
+
|
70 |
+
var doc = options.value;
|
71 |
+
if (typeof doc == "string") doc = new Doc(options.value, options.mode);
|
72 |
+
operation(this, attachDoc)(this, doc);
|
73 |
+
|
74 |
+
// Override magic textarea content restore that IE sometimes does
|
75 |
+
// on our hidden textarea on reload
|
76 |
+
if (ie) setTimeout(bind(resetInput, this, true), 20);
|
77 |
+
|
78 |
+
registerEventHandlers(this);
|
79 |
+
// IE throws unspecified error in certain cases, when
|
80 |
+
// trying to access activeElement before onload
|
81 |
+
var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { }
|
82 |
+
if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20);
|
83 |
+
else onBlur(this);
|
84 |
+
|
85 |
+
operation(this, function() {
|
86 |
+
for (var opt in optionHandlers)
|
87 |
+
if (optionHandlers.propertyIsEnumerable(opt))
|
88 |
+
optionHandlers[opt](this, options[opt], Init);
|
89 |
+
for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
|
90 |
+
})();
|
91 |
+
}
|
92 |
+
|
93 |
+
// DISPLAY CONSTRUCTOR
|
94 |
+
|
95 |
+
function makeDisplay(place, docStart) {
|
96 |
+
var d = {};
|
97 |
+
|
98 |
+
var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");
|
99 |
+
if (webkit) input.style.width = "1000px";
|
100 |
+
else input.setAttribute("wrap", "off");
|
101 |
+
// if border: 0; -- iOS fails to open keyboard (issue #1287)
|
102 |
+
if (ios) input.style.border = "1px solid black";
|
103 |
+
input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
|
104 |
+
|
105 |
+
// Wraps and hides input textarea
|
106 |
+
d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
|
107 |
+
// The actual fake scrollbars.
|
108 |
+
d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar");
|
109 |
+
d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar");
|
110 |
+
d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
|
111 |
+
d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
|
112 |
+
// DIVs containing the selection and the actual code
|
113 |
+
d.lineDiv = elt("div", null, "CodeMirror-code");
|
114 |
+
d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
|
115 |
+
// Blinky cursor, and element used to ensure cursor fits at the end of a line
|
116 |
+
d.cursor = elt("div", "\u00a0", "CodeMirror-cursor");
|
117 |
+
// Secondary cursor, shown when on a 'jump' in bi-directional text
|
118 |
+
d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor");
|
119 |
+
// Used to measure text size
|
120 |
+
d.measure = elt("div", null, "CodeMirror-measure");
|
121 |
+
// Wraps everything that needs to exist inside the vertically-padded coordinate system
|
122 |
+
d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor],
|
123 |
+
null, "position: relative; outline: none");
|
124 |
+
// Moved around its parent to cover visible view
|
125 |
+
d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
|
126 |
+
// Set to the height of the text, causes scrolling
|
127 |
+
d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
|
128 |
+
// D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers
|
129 |
+
d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;");
|
130 |
+
// Will contain the gutters, if any
|
131 |
+
d.gutters = elt("div", null, "CodeMirror-gutters");
|
132 |
+
d.lineGutter = null;
|
133 |
+
// Provides scrolling
|
134 |
+
d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
|
135 |
+
d.scroller.setAttribute("tabIndex", "-1");
|
136 |
+
// The element in which the editor lives.
|
137 |
+
d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV,
|
138 |
+
d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
|
139 |
+
// Work around IE7 z-index bug
|
140 |
+
if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
|
141 |
+
if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper);
|
142 |
+
|
143 |
+
// Needed to hide big blue blinking cursor on Mobile Safari
|
144 |
+
if (ios) input.style.width = "0px";
|
145 |
+
if (!webkit) d.scroller.draggable = true;
|
146 |
+
// Needed to handle Tab key in KHTML
|
147 |
+
if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
|
148 |
+
// Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
|
149 |
+
else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px";
|
150 |
+
|
151 |
+
// Current visible range (may be bigger than the view window).
|
152 |
+
d.viewOffset = d.lastSizeC = 0;
|
153 |
+
d.showingFrom = d.showingTo = docStart;
|
154 |
+
|
155 |
+
// Used to only resize the line number gutter when necessary (when
|
156 |
+
// the amount of lines crosses a boundary that makes its width change)
|
157 |
+
d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
|
158 |
+
// See readInput and resetInput
|
159 |
+
d.prevInput = "";
|
160 |
+
// Set to true when a non-horizontal-scrolling widget is added. As
|
161 |
+
// an optimization, widget aligning is skipped when d is false.
|
162 |
+
d.alignWidgets = false;
|
163 |
+
// Flag that indicates whether we currently expect input to appear
|
164 |
+
// (after some event like 'keypress' or 'input') and are polling
|
165 |
+
// intensively.
|
166 |
+
d.pollingFast = false;
|
167 |
+
// Self-resetting timeout for the poller
|
168 |
+
d.poll = new Delayed();
|
169 |
+
|
170 |
+
d.cachedCharWidth = d.cachedTextHeight = null;
|
171 |
+
d.measureLineCache = [];
|
172 |
+
d.measureLineCachePos = 0;
|
173 |
+
|
174 |
+
// Tracks when resetInput has punted to just putting a short
|
175 |
+
// string instead of the (large) selection.
|
176 |
+
d.inaccurateSelection = false;
|
177 |
+
|
178 |
+
// Tracks the maximum line length so that the horizontal scrollbar
|
179 |
+
// can be kept static when scrolling.
|
180 |
+
d.maxLine = null;
|
181 |
+
d.maxLineLength = 0;
|
182 |
+
d.maxLineChanged = false;
|
183 |
+
|
184 |
+
// Used for measuring wheel scrolling granularity
|
185 |
+
d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
|
186 |
+
|
187 |
+
return d;
|
188 |
+
}
|
189 |
+
|
190 |
+
// STATE UPDATES
|
191 |
+
|
192 |
+
// Used to get the editor into a consistent state again when options change.
|
193 |
+
|
194 |
+
function loadMode(cm) {
|
195 |
+
cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
|
196 |
+
cm.doc.iter(function(line) {
|
197 |
+
if (line.stateAfter) line.stateAfter = null;
|
198 |
+
if (line.styles) line.styles = null;
|
199 |
+
});
|
200 |
+
cm.doc.frontier = cm.doc.first;
|
201 |
+
startWorker(cm, 100);
|
202 |
+
cm.state.modeGen++;
|
203 |
+
if (cm.curOp) regChange(cm);
|
204 |
+
}
|
205 |
+
|
206 |
+
function wrappingChanged(cm) {
|
207 |
+
if (cm.options.lineWrapping) {
|
208 |
+
cm.display.wrapper.className += " CodeMirror-wrap";
|
209 |
+
cm.display.sizer.style.minWidth = "";
|
210 |
+
} else {
|
211 |
+
cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", "");
|
212 |
+
computeMaxLength(cm);
|
213 |
+
}
|
214 |
+
estimateLineHeights(cm);
|
215 |
+
regChange(cm);
|
216 |
+
clearCaches(cm);
|
217 |
+
setTimeout(function(){updateScrollbars(cm);}, 100);
|
218 |
+
}
|
219 |
+
|
220 |
+
function estimateHeight(cm) {
|
221 |
+
var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
|
222 |
+
var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
|
223 |
+
return function(line) {
|
224 |
+
if (lineIsHidden(cm.doc, line))
|
225 |
+
return 0;
|
226 |
+
else if (wrapping)
|
227 |
+
return (Math.ceil(line.text.length / perLine) || 1) * th;
|
228 |
+
else
|
229 |
+
return th;
|
230 |
+
};
|
231 |
+
}
|
232 |
+
|
233 |
+
function estimateLineHeights(cm) {
|
234 |
+
var doc = cm.doc, est = estimateHeight(cm);
|
235 |
+
doc.iter(function(line) {
|
236 |
+
var estHeight = est(line);
|
237 |
+
if (estHeight != line.height) updateLineHeight(line, estHeight);
|
238 |
+
});
|
239 |
+
}
|
240 |
+
|
241 |
+
function keyMapChanged(cm) {
|
242 |
+
var map = keyMap[cm.options.keyMap], style = map.style;
|
243 |
+
cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
|
244 |
+
(style ? " cm-keymap-" + style : "");
|
245 |
+
cm.state.disableInput = map.disableInput;
|
246 |
+
}
|
247 |
+
|
248 |
+
function themeChanged(cm) {
|
249 |
+
cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
|
250 |
+
cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
|
251 |
+
clearCaches(cm);
|
252 |
+
}
|
253 |
+
|
254 |
+
function guttersChanged(cm) {
|
255 |
+
updateGutters(cm);
|
256 |
+
regChange(cm);
|
257 |
+
setTimeout(function(){alignHorizontally(cm);}, 20);
|
258 |
+
}
|
259 |
+
|
260 |
+
function updateGutters(cm) {
|
261 |
+
var gutters = cm.display.gutters, specs = cm.options.gutters;
|
262 |
+
removeChildren(gutters);
|
263 |
+
for (var i = 0; i < specs.length; ++i) {
|
264 |
+
var gutterClass = specs[i];
|
265 |
+
var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
|
266 |
+
if (gutterClass == "CodeMirror-linenumbers") {
|
267 |
+
cm.display.lineGutter = gElt;
|
268 |
+
gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
|
269 |
+
}
|
270 |
+
}
|
271 |
+
gutters.style.display = i ? "" : "none";
|
272 |
+
}
|
273 |
+
|
274 |
+
function lineLength(doc, line) {
|
275 |
+
if (line.height == 0) return 0;
|
276 |
+
var len = line.text.length, merged, cur = line;
|
277 |
+
while (merged = collapsedSpanAtStart(cur)) {
|
278 |
+
var found = merged.find();
|
279 |
+
cur = getLine(doc, found.from.line);
|
280 |
+
len += found.from.ch - found.to.ch;
|
281 |
+
}
|
282 |
+
cur = line;
|
283 |
+
while (merged = collapsedSpanAtEnd(cur)) {
|
284 |
+
var found = merged.find();
|
285 |
+
len -= cur.text.length - found.from.ch;
|
286 |
+
cur = getLine(doc, found.to.line);
|
287 |
+
len += cur.text.length - found.to.ch;
|
288 |
+
}
|
289 |
+
return len;
|
290 |
+
}
|
291 |
+
|
292 |
+
function computeMaxLength(cm) {
|
293 |
+
var d = cm.display, doc = cm.doc;
|
294 |
+
d.maxLine = getLine(doc, doc.first);
|
295 |
+
d.maxLineLength = lineLength(doc, d.maxLine);
|
296 |
+
d.maxLineChanged = true;
|
297 |
+
doc.iter(function(line) {
|
298 |
+
var len = lineLength(doc, line);
|
299 |
+
if (len > d.maxLineLength) {
|
300 |
+
d.maxLineLength = len;
|
301 |
+
d.maxLine = line;
|
302 |
+
}
|
303 |
+
});
|
304 |
+
}
|
305 |
+
|
306 |
+
// Make sure the gutters options contains the element
|
307 |
+
// "CodeMirror-linenumbers" when the lineNumbers option is true.
|
308 |
+
function setGuttersForLineNumbers(options) {
|
309 |
+
var found = false;
|
310 |
+
for (var i = 0; i < options.gutters.length; ++i) {
|
311 |
+
if (options.gutters[i] == "CodeMirror-linenumbers") {
|
312 |
+
if (options.lineNumbers) found = true;
|
313 |
+
else options.gutters.splice(i--, 1);
|
314 |
+
}
|
315 |
+
}
|
316 |
+
if (!found && options.lineNumbers)
|
317 |
+
options.gutters.push("CodeMirror-linenumbers");
|
318 |
+
}
|
319 |
+
|
320 |
+
// SCROLLBARS
|
321 |
+
|
322 |
+
// Re-synchronize the fake scrollbars with the actual size of the
|
323 |
+
// content. Optionally force a scrollTop.
|
324 |
+
function updateScrollbars(cm) {
|
325 |
+
var d = cm.display, docHeight = cm.doc.height;
|
326 |
+
var totalHeight = docHeight + paddingVert(d);
|
327 |
+
d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
|
328 |
+
d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
|
329 |
+
var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight);
|
330 |
+
var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1);
|
331 |
+
var needsV = scrollHeight > (d.scroller.clientHeight + 1);
|
332 |
+
if (needsV) {
|
333 |
+
d.scrollbarV.style.display = "block";
|
334 |
+
d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
|
335 |
+
d.scrollbarV.firstChild.style.height =
|
336 |
+
(scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
|
337 |
+
} else d.scrollbarV.style.display = "";
|
338 |
+
if (needsH) {
|
339 |
+
d.scrollbarH.style.display = "block";
|
340 |
+
d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0";
|
341 |
+
d.scrollbarH.firstChild.style.width =
|
342 |
+
(d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px";
|
343 |
+
} else d.scrollbarH.style.display = "";
|
344 |
+
if (needsH && needsV) {
|
345 |
+
d.scrollbarFiller.style.display = "block";
|
346 |
+
d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px";
|
347 |
+
} else d.scrollbarFiller.style.display = "";
|
348 |
+
if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
|
349 |
+
d.gutterFiller.style.display = "block";
|
350 |
+
d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px";
|
351 |
+
d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
|
352 |
+
} else d.gutterFiller.style.display = "";
|
353 |
+
|
354 |
+
if (mac_geLion && scrollbarWidth(d.measure) === 0)
|
355 |
+
d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
|
356 |
+
}
|
357 |
+
|
358 |
+
function visibleLines(display, doc, viewPort) {
|
359 |
+
var top = display.scroller.scrollTop, height = display.wrapper.clientHeight;
|
360 |
+
if (typeof viewPort == "number") top = viewPo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|