Version Description
Viber mobile Android/iOS bug fixed
Download this release
Release Info
Developer | galdub |
Plugin | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty |
Version | 2.4.4 |
Comparing to | |
See all releases |
Code changes from version 2.4.3 to 2.4.4
- admin/class-admin-base.php +3 -0
- assets/css/animation.css +14 -5
- assets/css/cht-style.css +142 -7
- assets/css/spectrum.min.css +1 -0
- assets/js/cht-front-script.js +47 -32
- assets/js/cht-scripts.min.js +93 -36
- assets/js/spectrum.min.js +2 -0
- cht-icons.php +2 -2
- frontend/class-frontend.php +99 -30
- readme.txt +18 -15
- views/admin.php +30 -7
- views/parts/section1.php +50 -15
- views/parts/section2.php +1 -1
- views/widget.php +14 -13
admin/class-admin-base.php
CHANGED
@@ -15,6 +15,7 @@ class CHT_Admin_Base
|
|
15 |
{
|
16 |
public $page;
|
17 |
public $socials;
|
|
|
18 |
public $colors;
|
19 |
protected $token;
|
20 |
protected static $response = null;
|
@@ -313,6 +314,7 @@ class CHT_Admin_Base
|
|
313 |
'subset' => 'latin,latin-ext'
|
314 |
);
|
315 |
wp_enqueue_style('google_fonts', add_query_arg($query_args, "//fonts.googleapis.com/css"), array(), null);
|
|
|
316 |
wp_enqueue_style($this->plugin_slug, plugins_url('../assets/css/cht-style.css', __FILE__), array(), CHT_VERSION);
|
317 |
}
|
318 |
|
@@ -322,6 +324,7 @@ class CHT_Admin_Base
|
|
322 |
if($is_shown !== false) {
|
323 |
wp_enqueue_script($this->plugin_slug . '-jq-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js');
|
324 |
wp_enqueue_script($this->plugin_slug . 'fileinput', plugins_url('../assets/js/fileinput.min.js', __FILE__), array('jquery'), CHT_VERSION);
|
|
|
325 |
wp_enqueue_script($this->plugin_slug . 'pop', plugins_url('../assets/js/popper.min.js', __FILE__), array('jquery'), CHT_VERSION);
|
326 |
wp_enqueue_script($this->plugin_slug, plugins_url('../assets/js/cht-scripts.min.js', __FILE__), array('jquery', 'wp-color-picker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable'), CHT_VERSION);
|
327 |
wp_enqueue_script($this->plugin_slug . 'stick', plugins_url('../assets/js/jquery.sticky.js', __FILE__), array('jquery'), CHT_VERSION);
|
15 |
{
|
16 |
public $page;
|
17 |
public $socials;
|
18 |
+
public $fa_icons;
|
19 |
public $colors;
|
20 |
protected $token;
|
21 |
protected static $response = null;
|
314 |
'subset' => 'latin,latin-ext'
|
315 |
);
|
316 |
wp_enqueue_style('google_fonts', add_query_arg($query_args, "//fonts.googleapis.com/css"), array(), null);
|
317 |
+
wp_enqueue_style($this->plugin_slug . 'spectrum', plugins_url('../assets/css/spectrum.min.css', __FILE__), array(), CHT_VERSION);
|
318 |
wp_enqueue_style($this->plugin_slug, plugins_url('../assets/css/cht-style.css', __FILE__), array(), CHT_VERSION);
|
319 |
}
|
320 |
|
324 |
if($is_shown !== false) {
|
325 |
wp_enqueue_script($this->plugin_slug . '-jq-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js');
|
326 |
wp_enqueue_script($this->plugin_slug . 'fileinput', plugins_url('../assets/js/fileinput.min.js', __FILE__), array('jquery'), CHT_VERSION);
|
327 |
+
wp_enqueue_script($this->plugin_slug . 'spectrum', plugins_url('../assets/js/spectrum.min.js', __FILE__), array('jquery'), CHT_VERSION);
|
328 |
wp_enqueue_script($this->plugin_slug . 'pop', plugins_url('../assets/js/popper.min.js', __FILE__), array('jquery'), CHT_VERSION);
|
329 |
wp_enqueue_script($this->plugin_slug, plugins_url('../assets/js/cht-scripts.min.js', __FILE__), array('jquery', 'wp-color-picker', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable'), CHT_VERSION);
|
330 |
wp_enqueue_script($this->plugin_slug . 'stick', plugins_url('../assets/js/jquery.sticky.js', __FILE__), array('jquery'), CHT_VERSION);
|
assets/css/animation.css
CHANGED
@@ -27,11 +27,11 @@ body .one_widget .bofore_del:before {
|
|
27 |
)
|
28 |
}
|
29 |
|
30 |
-
|
31 |
display: none;
|
32 |
-
}
|
33 |
-
|
34 |
-
}
|
35 |
.one_widget.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title {
|
36 |
font-size: 17px;
|
37 |
left: -3px;
|
@@ -384,7 +384,7 @@ body .i-trigger-open .chaty-widget-i-title {
|
|
384 |
padding: 5px 16px 5px 17px !important;
|
385 |
}
|
386 |
.chaty-widget:not(.chaty-widget-is-right) .i-trigger-open:before {
|
387 |
-
left: -
|
388 |
}
|
389 |
.chaty-widget:not(.chaty-widget-is-right) .i-trigger-open:before {
|
390 |
}
|
@@ -643,4 +643,13 @@ body .no-tooltip .chaty-widget-i-title.true {
|
|
643 |
.chaty-widget-show .i-trigger-open.single-button svg {
|
644 |
transform: rotate(0deg) !important;
|
645 |
-webkit-transform: rotate(0deg) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
646 |
}
|
27 |
)
|
28 |
}
|
29 |
|
30 |
+
/*.one_widget .chaty-widget-i.i-trigger-open:before {
|
31 |
display: none;
|
32 |
+
}*/
|
33 |
+
/*.one_widget.chaty-widget .chaty-widget-i {
|
34 |
+
}*/
|
35 |
.one_widget.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title {
|
36 |
font-size: 17px;
|
37 |
left: -3px;
|
384 |
padding: 5px 16px 5px 17px !important;
|
385 |
}
|
386 |
.chaty-widget:not(.chaty-widget-is-right) .i-trigger-open:before {
|
387 |
+
left: -17px !important
|
388 |
}
|
389 |
.chaty-widget:not(.chaty-widget-is-right) .i-trigger-open:before {
|
390 |
}
|
643 |
.chaty-widget-show .i-trigger-open.single-button svg {
|
644 |
transform: rotate(0deg) !important;
|
645 |
-webkit-transform: rotate(0deg) !important;
|
646 |
+
}
|
647 |
+
.facustom-icon {
|
648 |
+
display: block;
|
649 |
+
border-radius: 50%;
|
650 |
+
-moz-border-radius: 50%;
|
651 |
+
-webkit-border-radius: 50%;
|
652 |
+
text-align: center;
|
653 |
+
color: #ffffff;
|
654 |
+
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.25);
|
655 |
}
|
assets/css/cht-style.css
CHANGED
@@ -35,7 +35,7 @@ body, i {
|
|
35 |
}
|
36 |
|
37 |
i {
|
38 |
-
font-family: icomoon
|
39 |
speak: none;
|
40 |
font-style: normal;
|
41 |
font-weight: 400;
|
@@ -929,6 +929,9 @@ a:focus {
|
|
929 |
line-height: 13px
|
930 |
}
|
931 |
|
|
|
|
|
|
|
932 |
@media (min-width: 1280px) {
|
933 |
.btn-save-sticky {
|
934 |
left: calc(50vw - 480px + 1050px / 12 * 7 + 475px);
|
@@ -2313,7 +2316,8 @@ span.header-tooltip:hover span.header-tooltip-text {
|
|
2313 |
padding: 22px 8px 42px;
|
2314 |
text-decoration: none;
|
2315 |
vertical-align: top;
|
2316 |
-
display: inline-block
|
|
|
2317 |
}
|
2318 |
|
2319 |
.widget-icon__block .custom-control.custom-radio .custom-control-label:before {
|
@@ -2344,7 +2348,8 @@ span.header-tooltip:hover span.header-tooltip-text {
|
|
2344 |
}
|
2345 |
|
2346 |
.widget-icon__block .custom-control.custom-radio:first-child {
|
2347 |
-
padding-left: 20px
|
|
|
2348 |
}
|
2349 |
|
2350 |
.widget-icon__block .custom-control.custom-radio:last-child {
|
@@ -3670,7 +3675,7 @@ select.form-fonts, select.chaty-select {
|
|
3670 |
outline: 0;
|
3671 |
padding: 5px 7px;
|
3672 |
line-height: 26px;
|
3673 |
-
background: #ffffff;
|
3674 |
border-radius: 5px;
|
3675 |
height: 36px;
|
3676 |
-webkit-box-shadow: 0px 0px 15px 0px rgba(234, 234, 234, 1);
|
@@ -3837,7 +3842,7 @@ p.udner-title strong {
|
|
3837 |
padding: 0;
|
3838 |
}
|
3839 |
.chaty-setting-col input[type='text'] {
|
3840 |
-
width:
|
3841 |
height: 36px;
|
3842 |
line-height: 36px;
|
3843 |
padding: 0 10px;
|
@@ -3889,13 +3894,13 @@ p.udner-title strong {
|
|
3889 |
.chaty-advance-settings:hover .chaty-pro-feature, .chaty-date-time-option:hover .chaty-pro-feature {
|
3890 |
display: inline-block;
|
3891 |
}
|
3892 |
-
|
3893 |
filter: blur(2px);
|
3894 |
-o-filter: blur(2px);
|
3895 |
-ms-filter: blur(2px);
|
3896 |
-moz-filter: blur(2px);
|
3897 |
-webkit-filter: blur(2px);
|
3898 |
-
}
|
3899 |
.chaty-pro-feature a {
|
3900 |
text-decoration: none;
|
3901 |
background: #ff6624;
|
@@ -4172,4 +4177,134 @@ select.multiple-options {
|
|
4172 |
padding: 40px 0 10px 0;
|
4173 |
text-align: center;
|
4174 |
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4175 |
}
|
35 |
}
|
36 |
|
37 |
i {
|
38 |
+
font-family: icomoon;
|
39 |
speak: none;
|
40 |
font-style: normal;
|
41 |
font-weight: 400;
|
929 |
line-height: 13px
|
930 |
}
|
931 |
|
932 |
+
input.channels__input.border-red {
|
933 |
+
border-color: #dd0000;
|
934 |
+
}
|
935 |
@media (min-width: 1280px) {
|
936 |
.btn-save-sticky {
|
937 |
left: calc(50vw - 480px + 1050px / 12 * 7 + 475px);
|
2316 |
padding: 22px 8px 42px;
|
2317 |
text-decoration: none;
|
2318 |
vertical-align: top;
|
2319 |
+
display: inline-block;
|
2320 |
+
max-width: 70px;
|
2321 |
}
|
2322 |
|
2323 |
.widget-icon__block .custom-control.custom-radio .custom-control-label:before {
|
2348 |
}
|
2349 |
|
2350 |
.widget-icon__block .custom-control.custom-radio:first-child {
|
2351 |
+
padding-left: 20px;
|
2352 |
+
max-width: 90px;
|
2353 |
}
|
2354 |
|
2355 |
.widget-icon__block .custom-control.custom-radio:last-child {
|
3675 |
outline: 0;
|
3676 |
padding: 5px 7px;
|
3677 |
line-height: 26px;
|
3678 |
+
background-color: #ffffff;
|
3679 |
border-radius: 5px;
|
3680 |
height: 36px;
|
3681 |
-webkit-box-shadow: 0px 0px 15px 0px rgba(234, 234, 234, 1);
|
3842 |
padding: 0;
|
3843 |
}
|
3844 |
.chaty-setting-col input[type='text'] {
|
3845 |
+
width: 300px;
|
3846 |
height: 36px;
|
3847 |
line-height: 36px;
|
3848 |
padding: 0 10px;
|
3894 |
.chaty-advance-settings:hover .chaty-pro-feature, .chaty-date-time-option:hover .chaty-pro-feature {
|
3895 |
display: inline-block;
|
3896 |
}
|
3897 |
+
/*.chaty-advance-settings:hover .chaty-setting-col {
|
3898 |
filter: blur(2px);
|
3899 |
-o-filter: blur(2px);
|
3900 |
-ms-filter: blur(2px);
|
3901 |
-moz-filter: blur(2px);
|
3902 |
-webkit-filter: blur(2px);
|
3903 |
+
}*/
|
3904 |
.chaty-pro-feature a {
|
3905 |
text-decoration: none;
|
3906 |
background: #ff6624;
|
4177 |
padding: 40px 0 10px 0;
|
4178 |
text-align: center;
|
4179 |
font-weight: bold;
|
4180 |
+
}
|
4181 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
4182 |
+
line-height: 36px !important;
|
4183 |
+
}
|
4184 |
+
.select2-container {
|
4185 |
+
width: 300px !important;
|
4186 |
+
}
|
4187 |
+
.select2-container--default .select2-selection--single {
|
4188 |
+
border: 1px solid #ddd;
|
4189 |
+
height: 38px;
|
4190 |
+
line-height: 38px;
|
4191 |
+
}
|
4192 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
4193 |
+
height: 36px;
|
4194 |
+
}
|
4195 |
+
.select2-results i, .selection i {
|
4196 |
+
color: #333333;
|
4197 |
+
}
|
4198 |
+
.pro-features {
|
4199 |
+
position: relative;
|
4200 |
+
display: inline-flex;
|
4201 |
+
}
|
4202 |
+
.pro-item {
|
4203 |
+
position: relative;
|
4204 |
+
}
|
4205 |
+
.pro-button {
|
4206 |
+
display: none;
|
4207 |
+
position: absolute;
|
4208 |
+
width: 100%;
|
4209 |
+
top: 0;
|
4210 |
+
left: 0;
|
4211 |
+
height: 100%;
|
4212 |
+
line-height: 36px;
|
4213 |
+
text-align: center;
|
4214 |
+
}
|
4215 |
+
.pro-button a {
|
4216 |
+
/*display: inline-block;
|
4217 |
+
background: #fb8a58;
|
4218 |
+
color: #fff;
|
4219 |
+
text-decoration: none;
|
4220 |
+
padding: 0 6px;
|
4221 |
+
border-radius: 4px;
|
4222 |
+
font-size: 12px;
|
4223 |
+
height: 26px;
|
4224 |
+
line-height: 26px;*/
|
4225 |
+
display: block;
|
4226 |
+
line-height: 36px;
|
4227 |
+
}
|
4228 |
+
.pro-features:hover .pro-item {
|
4229 |
+
opacity:0.25;
|
4230 |
+
filter: blur(2px);
|
4231 |
+
-o-filter: blur(2px);
|
4232 |
+
-ms-filter: blur(2px);
|
4233 |
+
-moz-filter: blur(2px);
|
4234 |
+
-webkit-filter: blur(2px);
|
4235 |
+
}
|
4236 |
+
.pro-features:hover .pro-button {
|
4237 |
+
display: block;
|
4238 |
+
}
|
4239 |
+
.sp-replacer.sp-light {
|
4240 |
+
padding: 0;
|
4241 |
+
-webkit-border-radius: 4px;
|
4242 |
+
-moz-border-radius: 4px;
|
4243 |
+
border-radius: 4px;
|
4244 |
+
border: none;
|
4245 |
+
}
|
4246 |
+
.sp-preview {
|
4247 |
+
padding: 0;
|
4248 |
+
margin: 0 5px 0 0;
|
4249 |
+
height: 40px;
|
4250 |
+
width: 40px;
|
4251 |
+
border: none;
|
4252 |
+
-webkit-border-radius: 4px;
|
4253 |
+
-moz-border-radius: 4px;
|
4254 |
+
border-radius: 4px;
|
4255 |
+
}
|
4256 |
+
.sp-preview-inner {
|
4257 |
+
-webkit-border-radius: 4px;
|
4258 |
+
-moz-border-radius: 4px;
|
4259 |
+
border-radius: 4px;
|
4260 |
+
}
|
4261 |
+
.sp-dd {
|
4262 |
+
display: none;
|
4263 |
+
}
|
4264 |
+
span.facustom-icon {
|
4265 |
+
display: block;
|
4266 |
+
width: 50px;
|
4267 |
+
height: 50px;
|
4268 |
+
font-size: 30px;
|
4269 |
+
line-height: 50px;
|
4270 |
+
-webkit-border-radius: 50%;
|
4271 |
+
-moz-border-radius: 50%;
|
4272 |
+
border-radius: 50%;
|
4273 |
+
}
|
4274 |
+
span.default-chaty-icon .facustom-icon {
|
4275 |
+
display: none;
|
4276 |
+
}
|
4277 |
+
span.default-chaty-icon.has-fa-icon .facustom-icon {
|
4278 |
+
display: block;
|
4279 |
+
}
|
4280 |
+
span.default-chaty-icon.has-fa-icon svg {
|
4281 |
+
display: none;
|
4282 |
+
}
|
4283 |
+
.preview .page .chaty-widget span.facustom-icon {
|
4284 |
+
width: 30px;
|
4285 |
+
height: 30px;
|
4286 |
+
line-height: 30px;
|
4287 |
+
font-size: 20px;
|
4288 |
+
}
|
4289 |
+
.preview .page .chaty-widget span.facustom-icon i {
|
4290 |
+
line-height: 30px;
|
4291 |
+
font-size: 18px;
|
4292 |
+
}
|
4293 |
+
.preview.mobiel-view .page .chaty-widget span.facustom-icon {
|
4294 |
+
width: 24px;
|
4295 |
+
height: 24px;
|
4296 |
+
line-height: 24px;
|
4297 |
+
font-size: 12px;
|
4298 |
+
}
|
4299 |
+
.preview.mobiel-view .page .chaty-widget svg {
|
4300 |
+
width: 24px;
|
4301 |
+
height: 24px;
|
4302 |
+
}
|
4303 |
+
.preview.mobiel-view .page .chaty-widget span.facustom-icon i {
|
4304 |
+
line-height: 24px;
|
4305 |
+
font-size: 14px;
|
4306 |
+
}
|
4307 |
+
.preview.mobiel-view .page .chaty-widget .social-item-box {
|
4308 |
+
height: 24px;
|
4309 |
+
margin: 0 0 4px 0;
|
4310 |
}
|
assets/css/spectrum.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#FFF),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#FFF,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF',endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81',endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);background:-ms-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);background:-o-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);background:-webkit-gradient(linear,left top,left bottom,from(#f00),color-stop(0.17,#ff0),color-stop(0.33,#0f0),color-stop(0.5,#0ff),color-stop(0.67,#00f),color-stop(0.83,#f0f),to(#f00));background:-webkit-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);background:linear-gradient(to bottom,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000',endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00',endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00',endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff',endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff',endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff',endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media(max-device-width:480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ececec;border:solid 1px #f0c49b;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:0;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#f0c49b;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top,#eee,#ccc);background-image:-moz-linear-gradient(top,#eee,#ccc);background-image:-ms-linear-gradient(top,#eee,#ccc);background-image:-o-linear-gradient(top,#eee,#ccc);background-image:linear-gradient(to bottom,#eee,#ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(to bottom,#ddd,#bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}
|
assets/js/cht-front-script.js
CHANGED
@@ -54,6 +54,7 @@
|
|
54 |
var animationTimer;
|
55 |
var isWidgetEnabled = 0;
|
56 |
var e = chaty_settings;
|
|
|
57 |
|
58 |
function o(e) {
|
59 |
var i = "", n = 0;
|
@@ -82,26 +83,36 @@
|
|
82 |
if(t == "whatsapp" && jQuery("body").hasClass("chaty-in-mobile")) {
|
83 |
a.value = a.mobile_url;
|
84 |
}
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
"custom_link" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += '<svg class="ico_d" width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">', i += '<circle class="color-element" cx="19.4395" cy="19.4395" r="19.4395" fill="#1E88E5"/>', i += '<mask id="path-2-outside-1" maskUnits="userSpaceOnUse" x="-1" y="-1" width="13" height="14" fill="black"><rect fill="white" x="-1" y="-1" width="13" height="14"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z"/></mask><path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z" transform="translate(9.95154 16.0478)" fill="white"/><path d="M5.44484 1.73538L5.23053 1.52545L5.44484 1.73538ZM5.44484 1.73537L5.23053 1.52544L5.44484 1.73537ZM1.6999 5.55844L1.48559 5.3485L1.6999 5.55844ZM1.69991 5.55843L1.91422 5.76836L1.69991 5.55843ZM1.69991 9.29657L1.91422 9.08664L1.69991 9.29657ZM1.6999 9.29655L1.91421 9.08662L1.6999 9.29655ZM2.53215 10.1461L2.31784 10.3561L2.53215 10.1461ZM2.53209 10.1461L2.31778 10.356L2.53209 10.1461ZM6.19386 10.1461L5.97955 9.93618L6.19386 10.1461ZM6.19386 10.1461L6.40817 10.356L6.19386 10.1461ZM8.60942 7.68018L8.82373 7.89011L8.60942 7.68018ZM9.28893 8.34581L9.07462 8.13588L9.28893 8.34581ZM6.85962 10.8258L6.64532 10.6158L6.85962 10.8258ZM6.85964 10.8258L7.07395 11.0357L6.85964 10.8258ZM1.86633 10.8258L2.08064 10.6158L1.86633 10.8258ZM1.86636 10.8258L2.08067 10.6159L1.86636 10.8258ZM1.03412 9.9762L1.24843 9.76628L1.03412 9.9762ZM1.03415 9.97623L0.819841 10.1862L1.03415 9.97623ZM1.03414 4.87877L0.819827 4.66884L1.03414 4.87877ZM1.03413 4.87878L1.24844 5.08871L1.03413 4.87878ZM4.77907 1.05571L4.99338 1.26564L4.77907 1.05571ZM4.77906 1.05572L4.99338 1.26565L4.77906 1.05572ZM9.77236 1.05572L9.55805 1.26565L9.77236 1.05572ZM9.77235 1.05572L9.98666 0.845785L9.77235 1.05572ZM10.6046 1.90532L10.8189 1.6954L10.6046 1.90532ZM10.6045 1.90528L10.8189 1.69535L10.6045 1.90528ZM10.9533 2.31904L10.7101 2.49464L10.9533 2.31904ZM10.1019 2.76754L9.86916 2.95685L10.1019 2.76754ZM9.10659 1.73538L9.3209 1.52545L9.10659 1.73538ZM9.10658 1.73537L8.89227 1.9453L9.10658 1.73537ZM9.93879 2.58495L10.1531 2.37502L9.93879 2.58495ZM9.9388 2.58496L10.1531 2.37503L9.9388 2.58496ZM10.1531 2.37502L9.3209 1.52545L8.89228 1.94531L9.72448 2.79488L10.1531 2.37502ZM10.3346 2.57823C10.2777 2.50832 10.2172 2.4405 10.1531 2.37503L9.72449 2.79488C9.77566 2.84713 9.82388 2.90119 9.86916 2.95685L10.3346 2.57823ZM11.1966 2.14344C11.0835 1.98684 10.9576 1.83698 10.8189 1.6954L10.3903 2.11524C10.5079 2.2353 10.6145 2.3622 10.7101 2.49464L11.1966 2.14344ZM10.8189 1.69535L9.98667 0.845789L9.55805 1.26565L10.3902 2.11521L10.8189 1.69535ZM9.98666 0.845785C8.49018 -0.681928 6.06124 -0.681928 4.56476 0.845784L4.99338 1.26564C6.25459 -0.0218819 8.29683 -0.0218814 9.55804 1.26565L9.98666 0.845785ZM4.56475 0.84579L0.819827 4.66884L1.24845 5.0887L4.99338 1.26565L4.56475 0.84579ZM0.819819 4.66885C-0.673269 6.1931 -0.673273 8.66187 0.819807 10.1861L1.24843 9.76628C-0.0161474 8.47529 -0.016144 6.37969 1.24844 5.08871L0.819819 4.66885ZM0.819841 10.1862L1.65203 11.0357L2.08064 10.6158L1.24846 9.7663L0.819841 10.1862ZM1.65205 11.0357C3.14854 12.5634 5.57739 12.5634 7.07393 11.0357L6.64532 10.6158C5.38405 11.9034 3.34188 11.9034 2.08067 10.6159L1.65205 11.0357ZM7.07395 11.0357L9.50324 8.55574L9.07462 8.13588L6.64533 10.6158L7.07395 11.0357ZM6.40817 10.356L8.82373 7.89011L8.39511 7.47025L5.97955 9.93618L6.40817 10.356ZM2.31784 10.3561C3.44659 11.5084 5.27938 11.5084 6.40817 10.356L5.97955 9.93618C5.08603 10.8483 3.63993 10.8483 2.74646 9.93621L2.31784 10.3561ZM1.48561 9.50651L2.31778 10.356L2.7464 9.93615L1.91422 9.08664L1.48561 9.50651ZM1.48559 5.3485C0.360176 6.49739 0.360173 8.35759 1.48559 9.50648L1.91421 9.08662C1.0173 8.171 1.0173 6.68399 1.91421 5.76837L1.48559 5.3485ZM5.23053 1.52545L1.4856 5.3485L1.91422 5.76836L5.65915 1.94531L5.23053 1.52545ZM9.32089 1.52544C8.19208 0.373095 6.35934 0.373096 5.23053 1.52544L5.65915 1.9453C6.55268 1.03314 7.99874 1.03314 8.89227 1.9453L9.32089 1.52544ZM5.65915 1.94531C5.65915 1.94531 5.65915 1.94531 5.65915 1.9453L5.23053 1.52544C5.23053 1.52544 5.23053 1.52544 5.23053 1.52545L5.65915 1.94531ZM1.91421 5.76837C1.91421 5.76837 1.91422 5.76836 1.91422 5.76836L1.4856 5.3485C1.4856 5.3485 1.48559 5.3485 1.48559 5.3485L1.91421 5.76837ZM1.91422 9.08664C1.91422 9.08663 1.91421 9.08663 1.91421 9.08662L1.48559 9.50648C1.48559 9.50649 1.4856 9.5065 1.48561 9.50651L1.91422 9.08664ZM2.74646 9.93621C2.74644 9.93619 2.74642 9.93617 2.7464 9.93615L2.31778 10.356C2.3178 10.356 2.31782 10.356 2.31784 10.3561L2.74646 9.93621ZM5.97955 9.93618C5.97955 9.93618 5.97955 9.93618 5.97955 9.93618L6.40817 10.356C6.40817 10.356 6.40817 10.356 6.40817 10.356L5.97955 9.93618ZM9.50324 7.47025C9.1991 7.15977 8.69924 7.15977 8.39511 7.47025L8.82373 7.89011C8.89259 7.81981 9.00576 7.81981 9.07462 7.89011L9.50324 7.47025ZM9.50324 8.55574C9.79862 8.25419 9.79862 7.77179 9.50324 7.47025L9.07462 7.89011C9.1415 7.95838 9.1415 8.0676 9.07462 8.13588L9.50324 8.55574ZM7.07393 11.0357C7.07394 11.0357 7.07395 11.0357 7.07395 11.0357L6.64533 10.6158C6.64533 10.6158 6.64532 10.6158 6.64532 10.6158L7.07393 11.0357ZM1.65203 11.0357C1.65203 11.0357 1.65204 11.0357 1.65205 11.0357L2.08067 10.6159C2.08066 10.6158 2.08065 10.6158 2.08064 10.6158L1.65203 11.0357ZM0.819807 10.1861C0.819819 10.1861 0.81983 10.1862 0.819841 10.1862L1.24846 9.7663C1.24845 9.76629 1.24844 9.76628 1.24843 9.76628L0.819807 10.1861ZM0.819827 4.66884C0.819824 4.66884 0.819822 4.66885 0.819819 4.66885L1.24844 5.08871C1.24844 5.08871 1.24845 5.08871 1.24845 5.0887L0.819827 4.66884ZM4.56476 0.845784C4.56476 0.845786 4.56476 0.845788 4.56475 0.84579L4.99338 1.26565C4.99338 1.26565 4.99338 1.26565 4.99338 1.26564L4.56476 0.845784ZM9.98667 0.845789C9.98667 0.845788 9.98666 0.845787 9.98666 0.845785L9.55804 1.26565C9.55804 1.26565 9.55804 1.26565 9.55805 1.26565L9.98667 0.845789ZM10.8189 1.6954C10.8189 1.69538 10.8189 1.69536 10.8189 1.69535L10.3902 2.11521C10.3902 2.11522 10.3903 2.11523 10.3903 2.11524L10.8189 1.6954ZM11.1146 3.06246C11.3462 2.82606 11.411 2.44051 11.1966 2.14344L10.7101 2.49464C10.7332 2.52669 10.7385 2.58902 10.686 2.64258L11.1146 3.06246ZM9.86916 2.95685C10.1487 3.30046 10.7367 3.44829 11.1146 3.06246L10.686 2.64258C10.652 2.67732 10.6006 2.69693 10.531 2.68804C10.4586 2.67877 10.3842 2.63918 10.3346 2.57823L9.86916 2.95685ZM9.3209 1.52545C9.32089 1.52544 9.32089 1.52544 9.32089 1.52544L8.89227 1.9453C8.89227 1.9453 8.89227 1.94531 8.89228 1.94531L9.3209 1.52545ZM9.72448 2.79488C9.72448 2.79488 9.72448 2.79488 9.72449 2.79488L10.1531 2.37503C10.1531 2.37503 10.1531 2.37502 10.1531 2.37502L9.72448 2.79488Z" transform="translate(9.95154 16.0478)" fill="white" mask="url(#path-2-outside-1)"/><mask id="path-4-outside-2" maskUnits="userSpaceOnUse" x="-1" y="-1" width="13" height="14" fill="black"><rect fill="white" x="-1" y="-1" width="13" height="14"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z"/></mask><path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z" transform="translate(28.9286 22.8312) rotate(-180)" fill="white"/><path d="M5.44484 1.73538L5.23053 1.52545L5.44484 1.73538ZM5.44484 1.73537L5.23053 1.52544L5.44484 1.73537ZM1.6999 5.55844L1.48559 5.3485L1.6999 5.55844ZM1.69991 5.55843L1.91422 5.76836L1.69991 5.55843ZM1.69991 9.29657L1.91422 9.08664L1.69991 9.29657ZM1.6999 9.29655L1.91421 9.08662L1.6999 9.29655ZM2.53215 10.1461L2.31784 10.3561L2.53215 10.1461ZM2.53209 10.1461L2.31778 10.356L2.53209 10.1461ZM6.19386 10.1461L5.97955 9.93618L6.19386 10.1461ZM6.19386 10.1461L6.40817 10.356L6.19386 10.1461ZM8.60942 7.68018L8.82373 7.89011L8.60942 7.68018ZM9.28893 8.34581L9.07462 8.13588L9.28893 8.34581ZM6.85962 10.8258L6.64532 10.6158L6.85962 10.8258ZM6.85964 10.8258L7.07395 11.0357L6.85964 10.8258ZM1.86633 10.8258L2.08064 10.6158L1.86633 10.8258ZM1.86636 10.8258L2.08067 10.6159L1.86636 10.8258ZM1.03412 9.9762L1.24843 9.76628L1.03412 9.9762ZM1.03415 9.97623L0.819841 10.1862L1.03415 9.97623ZM1.03414 4.87877L0.819827 4.66884L1.03414 4.87877ZM1.03413 4.87878L1.24844 5.08871L1.03413 4.87878ZM4.77907 1.05571L4.99338 1.26564L4.77907 1.05571ZM4.77906 1.05572L4.99338 1.26565L4.77906 1.05572ZM9.77236 1.05572L9.55805 1.26565L9.77236 1.05572ZM9.77235 1.05572L9.98666 0.845785L9.77235 1.05572ZM10.6046 1.90532L10.8189 1.6954L10.6046 1.90532ZM10.6045 1.90528L10.8189 1.69535L10.6045 1.90528ZM10.9533 2.31904L10.7101 2.49464L10.9533 2.31904ZM10.1019 2.76754L9.86916 2.95685L10.1019 2.76754ZM9.10659 1.73538L9.3209 1.52545L9.10659 1.73538ZM9.10658 1.73537L8.89227 1.9453L9.10658 1.73537ZM9.93879 2.58495L10.1531 2.37502L9.93879 2.58495ZM9.9388 2.58496L10.1531 2.37503L9.9388 2.58496ZM10.1531 2.37502L9.3209 1.52545L8.89228 1.94531L9.72448 2.79488L10.1531 2.37502ZM10.3346 2.57823C10.2777 2.50832 10.2172 2.4405 10.1531 2.37503L9.72449 2.79488C9.77566 2.84713 9.82388 2.90119 9.86916 2.95685L10.3346 2.57823ZM11.1966 2.14344C11.0835 1.98684 10.9576 1.83698 10.8189 1.6954L10.3903 2.11524C10.5079 2.2353 10.6145 2.3622 10.7101 2.49464L11.1966 2.14344ZM10.8189 1.69535L9.98667 0.845789L9.55805 1.26565L10.3902 2.11521L10.8189 1.69535ZM9.98666 0.845785C8.49018 -0.681928 6.06124 -0.681928 4.56476 0.845784L4.99338 1.26564C6.25459 -0.0218819 8.29683 -0.0218814 9.55804 1.26565L9.98666 0.845785ZM4.56475 0.84579L0.819827 4.66884L1.24845 5.0887L4.99338 1.26565L4.56475 0.84579ZM0.819819 4.66885C-0.673269 6.1931 -0.673273 8.66187 0.819807 10.1861L1.24843 9.76628C-0.0161474 8.47529 -0.016144 6.37969 1.24844 5.08871L0.819819 4.66885ZM0.819841 10.1862L1.65203 11.0357L2.08064 10.6158L1.24846 9.7663L0.819841 10.1862ZM1.65205 11.0357C3.14854 12.5634 5.57739 12.5634 7.07393 11.0357L6.64532 10.6158C5.38405 11.9034 3.34188 11.9034 2.08067 10.6159L1.65205 11.0357ZM7.07395 11.0357L9.50324 8.55574L9.07462 8.13588L6.64533 10.6158L7.07395 11.0357ZM6.40817 10.356L8.82373 7.89011L8.39511 7.47025L5.97955 9.93618L6.40817 10.356ZM2.31784 10.3561C3.44659 11.5084 5.27938 11.5084 6.40817 10.356L5.97955 9.93618C5.08603 10.8483 3.63993 10.8483 2.74646 9.93621L2.31784 10.3561ZM1.48561 9.50651L2.31778 10.356L2.7464 9.93615L1.91422 9.08664L1.48561 9.50651ZM1.48559 5.3485C0.360176 6.49739 0.360173 8.35759 1.48559 9.50648L1.91421 9.08662C1.0173 8.171 1.0173 6.68399 1.91421 5.76837L1.48559 5.3485ZM5.23053 1.52545L1.4856 5.3485L1.91422 5.76836L5.65915 1.94531L5.23053 1.52545ZM9.32089 1.52544C8.19208 0.373095 6.35934 0.373096 5.23053 1.52544L5.65915 1.9453C6.55268 1.03314 7.99874 1.03314 8.89227 1.9453L9.32089 1.52544ZM5.65915 1.94531C5.65915 1.94531 5.65915 1.94531 5.65915 1.9453L5.23053 1.52544C5.23053 1.52544 5.23053 1.52544 5.23053 1.52545L5.65915 1.94531ZM1.91421 5.76837C1.91421 5.76837 1.91422 5.76836 1.91422 5.76836L1.4856 5.3485C1.4856 5.3485 1.48559 5.3485 1.48559 5.3485L1.91421 5.76837ZM1.91422 9.08664C1.91422 9.08663 1.91421 9.08663 1.91421 9.08662L1.48559 9.50648C1.48559 9.50649 1.4856 9.5065 1.48561 9.50651L1.91422 9.08664ZM2.74646 9.93621C2.74644 9.93619 2.74642 9.93617 2.7464 9.93615L2.31778 10.356C2.3178 10.356 2.31782 10.356 2.31784 10.3561L2.74646 9.93621ZM5.97955 9.93618C5.97955 9.93618 5.97955 9.93618 5.97955 9.93618L6.40817 10.356C6.40817 10.356 6.40817 10.356 6.40817 10.356L5.97955 9.93618ZM9.50324 7.47025C9.1991 7.15977 8.69924 7.15977 8.39511 7.47025L8.82373 7.89011C8.89259 7.81981 9.00576 7.81981 9.07462 7.89011L9.50324 7.47025ZM9.50324 8.55574C9.79862 8.25419 9.79862 7.77179 9.50324 7.47025L9.07462 7.89011C9.1415 7.95838 9.1415 8.0676 9.07462 8.13588L9.50324 8.55574ZM7.07393 11.0357C7.07394 11.0357 7.07395 11.0357 7.07395 11.0357L6.64533 10.6158C6.64533 10.6158 6.64532 10.6158 6.64532 10.6158L7.07393 11.0357ZM1.65203 11.0357C1.65203 11.0357 1.65204 11.0357 1.65205 11.0357L2.08067 10.6159C2.08066 10.6158 2.08065 10.6158 2.08064 10.6158L1.65203 11.0357ZM0.819807 10.1861C0.819819 10.1861 0.81983 10.1862 0.819841 10.1862L1.24846 9.7663C1.24845 9.76629 1.24844 9.76628 1.24843 9.76628L0.819807 10.1861ZM0.819827 4.66884C0.819824 4.66884 0.819822 4.66885 0.819819 4.66885L1.24844 5.08871C1.24844 5.08871 1.24845 5.08871 1.24845 5.0887L0.819827 4.66884ZM4.56476 0.845784C4.56476 0.845786 4.56476 0.845788 4.56475 0.84579L4.99338 1.26565C4.99338 1.26565 4.99338 1.26565 4.99338 1.26564L4.56476 0.845784ZM9.98667 0.845789C9.98667 0.845788 9.98666 0.845787 9.98666 0.845785L9.55804 1.26565C9.55804 1.26565 9.55804 1.26565 9.55805 1.26565L9.98667 0.845789ZM10.8189 1.6954C10.8189 1.69538 10.8189 1.69536 10.8189 1.69535L10.3902 2.11521C10.3902 2.11522 10.3903 2.11523 10.3903 2.11524L10.8189 1.6954ZM11.1146 3.06246C11.3462 2.82606 11.411 2.44051 11.1966 2.14344L10.7101 2.49464C10.7332 2.52669 10.7385 2.58902 10.686 2.64258L11.1146 3.06246ZM9.86916 2.95685C10.1487 3.30046 10.7367 3.44829 11.1146 3.06246L10.686 2.64258C10.652 2.67732 10.6006 2.69693 10.531 2.68804C10.4586 2.67877 10.3842 2.63918 10.3346 2.57823L9.86916 2.95685ZM9.3209 1.52545C9.32089 1.52544 9.32089 1.52544 9.32089 1.52544L8.89227 1.9453C8.89227 1.9453 8.89227 1.94531 8.89228 1.94531L9.3209 1.52545ZM9.72448 2.79488C9.72448 2.79488 9.72448 2.79488 9.72449 2.79488L10.1531 2.37503C10.1531 2.37503 10.1531 2.37502 10.1531 2.37502L9.72448 2.79488Z" transform="translate(28.9286 22.8312) rotate(-180)" fill="white" mask="url(#path-4-outside-2)"/>', i += "</svg>", i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>Link</p>", i += "</div>", i += "</div>"),
|
89 |
-
|
90 |
-
|
91 |
-
"link" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += '<svg class="ico_d" width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">', i += '<circle class="color-element" cx="19.5" cy="19.5" r="19.5" fill="#FF7539"/>', i += '<mask id="path-2-outside-1" maskUnits="userSpaceOnUse" x="-1" y="-1" width="13" height="14" fill="black"> <rect fill="white" x="-1" y="-1" width="13" height="14"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z"/> </mask><path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z" transform="translate(9.95154 16.0478)" fill="white"/><path d="M5.44484 1.73538L5.23053 1.52545L5.44484 1.73538ZM5.44484 1.73537L5.23053 1.52544L5.44484 1.73537ZM1.6999 5.55844L1.48559 5.3485L1.6999 5.55844ZM1.69991 5.55843L1.91422 5.76836L1.69991 5.55843ZM1.69991 9.29657L1.91422 9.08664L1.69991 9.29657ZM1.6999 9.29655L1.91421 9.08662L1.6999 9.29655ZM2.53215 10.1461L2.31784 10.3561L2.53215 10.1461ZM2.53209 10.1461L2.31778 10.356L2.53209 10.1461ZM6.19386 10.1461L5.97955 9.93618L6.19386 10.1461ZM6.19386 10.1461L6.40817 10.356L6.19386 10.1461ZM8.60942 7.68018L8.82373 7.89011L8.60942 7.68018ZM9.28893 8.34581L9.07462 8.13588L9.28893 8.34581ZM6.85962 10.8258L6.64532 10.6158L6.85962 10.8258ZM6.85964 10.8258L7.07395 11.0357L6.85964 10.8258ZM1.86633 10.8258L2.08064 10.6158L1.86633 10.8258ZM1.86636 10.8258L2.08067 10.6159L1.86636 10.8258ZM1.03412 9.9762L1.24843 9.76628L1.03412 9.9762ZM1.03415 9.97623L0.819841 10.1862L1.03415 9.97623ZM1.03414 4.87877L0.819827 4.66884L1.03414 4.87877ZM1.03413 4.87878L1.24844 5.08871L1.03413 4.87878ZM4.77907 1.05571L4.99338 1.26564L4.77907 1.05571ZM4.77906 1.05572L4.99338 1.26565L4.77906 1.05572ZM9.77236 1.05572L9.55805 1.26565L9.77236 1.05572ZM9.77235 1.05572L9.98666 0.845785L9.77235 1.05572ZM10.6046 1.90532L10.8189 1.6954L10.6046 1.90532ZM10.6045 1.90528L10.8189 1.69535L10.6045 1.90528ZM10.9533 2.31904L10.7101 2.49464L10.9533 2.31904ZM10.1019 2.76754L9.86916 2.95685L10.1019 2.76754ZM9.10659 1.73538L9.3209 1.52545L9.10659 1.73538ZM9.10658 1.73537L8.89227 1.9453L9.10658 1.73537ZM9.93879 2.58495L10.1531 2.37502L9.93879 2.58495ZM9.9388 2.58496L10.1531 2.37503L9.9388 2.58496ZM10.1531 2.37502L9.3209 1.52545L8.89228 1.94531L9.72448 2.79488L10.1531 2.37502ZM10.3346 2.57823C10.2777 2.50832 10.2172 2.4405 10.1531 2.37503L9.72449 2.79488C9.77566 2.84713 9.82388 2.90119 9.86916 2.95685L10.3346 2.57823ZM11.1966 2.14344C11.0835 1.98684 10.9576 1.83698 10.8189 1.6954L10.3903 2.11524C10.5079 2.2353 10.6145 2.3622 10.7101 2.49464L11.1966 2.14344ZM10.8189 1.69535L9.98667 0.845789L9.55805 1.26565L10.3902 2.11521L10.8189 1.69535ZM9.98666 0.845785C8.49018 -0.681928 6.06124 -0.681928 4.56476 0.845784L4.99338 1.26564C6.25459 -0.0218819 8.29683 -0.0218814 9.55804 1.26565L9.98666 0.845785ZM4.56475 0.84579L0.819827 4.66884L1.24845 5.0887L4.99338 1.26565L4.56475 0.84579ZM0.819819 4.66885C-0.673269 6.1931 -0.673273 8.66187 0.819807 10.1861L1.24843 9.76628C-0.0161474 8.47529 -0.016144 6.37969 1.24844 5.08871L0.819819 4.66885ZM0.819841 10.1862L1.65203 11.0357L2.08064 10.6158L1.24846 9.7663L0.819841 10.1862ZM1.65205 11.0357C3.14854 12.5634 5.57739 12.5634 7.07393 11.0357L6.64532 10.6158C5.38405 11.9034 3.34188 11.9034 2.08067 10.6159L1.65205 11.0357ZM7.07395 11.0357L9.50324 8.55574L9.07462 8.13588L6.64533 10.6158L7.07395 11.0357ZM6.40817 10.356L8.82373 7.89011L8.39511 7.47025L5.97955 9.93618L6.40817 10.356ZM2.31784 10.3561C3.44659 11.5084 5.27938 11.5084 6.40817 10.356L5.97955 9.93618C5.08603 10.8483 3.63993 10.8483 2.74646 9.93621L2.31784 10.3561ZM1.48561 9.50651L2.31778 10.356L2.7464 9.93615L1.91422 9.08664L1.48561 9.50651ZM1.48559 5.3485C0.360176 6.49739 0.360173 8.35759 1.48559 9.50648L1.91421 9.08662C1.0173 8.171 1.0173 6.68399 1.91421 5.76837L1.48559 5.3485ZM5.23053 1.52545L1.4856 5.3485L1.91422 5.76836L5.65915 1.94531L5.23053 1.52545ZM9.32089 1.52544C8.19208 0.373095 6.35934 0.373096 5.23053 1.52544L5.65915 1.9453C6.55268 1.03314 7.99874 1.03314 8.89227 1.9453L9.32089 1.52544ZM5.65915 1.94531C5.65915 1.94531 5.65915 1.94531 5.65915 1.9453L5.23053 1.52544C5.23053 1.52544 5.23053 1.52544 5.23053 1.52545L5.65915 1.94531ZM1.91421 5.76837C1.91421 5.76837 1.91422 5.76836 1.91422 5.76836L1.4856 5.3485C1.4856 5.3485 1.48559 5.3485 1.48559 5.3485L1.91421 5.76837ZM1.91422 9.08664C1.91422 9.08663 1.91421 9.08663 1.91421 9.08662L1.48559 9.50648C1.48559 9.50649 1.4856 9.5065 1.48561 9.50651L1.91422 9.08664ZM2.74646 9.93621C2.74644 9.93619 2.74642 9.93617 2.7464 9.93615L2.31778 10.356C2.3178 10.356 2.31782 10.356 2.31784 10.3561L2.74646 9.93621ZM5.97955 9.93618C5.97955 9.93618 5.97955 9.93618 5.97955 9.93618L6.40817 10.356C6.40817 10.356 6.40817 10.356 6.40817 10.356L5.97955 9.93618ZM9.50324 7.47025C9.1991 7.15977 8.69924 7.15977 8.39511 7.47025L8.82373 7.89011C8.89259 7.81981 9.00576 7.81981 9.07462 7.89011L9.50324 7.47025ZM9.50324 8.55574C9.79862 8.25419 9.79862 7.77179 9.50324 7.47025L9.07462 7.89011C9.1415 7.95838 9.1415 8.0676 9.07462 8.13588L9.50324 8.55574ZM7.07393 11.0357C7.07394 11.0357 7.07395 11.0357 7.07395 11.0357L6.64533 10.6158C6.64533 10.6158 6.64532 10.6158 6.64532 10.6158L7.07393 11.0357ZM1.65203 11.0357C1.65203 11.0357 1.65204 11.0357 1.65205 11.0357L2.08067 10.6159C2.08066 10.6158 2.08065 10.6158 2.08064 10.6158L1.65203 11.0357ZM0.819807 10.1861C0.819819 10.1861 0.81983 10.1862 0.819841 10.1862L1.24846 9.7663C1.24845 9.76629 1.24844 9.76628 1.24843 9.76628L0.819807 10.1861ZM0.819827 4.66884C0.819824 4.66884 0.819822 4.66885 0.819819 4.66885L1.24844 5.08871C1.24844 5.08871 1.24845 5.08871 1.24845 5.0887L0.819827 4.66884ZM4.56476 0.845784C4.56476 0.845786 4.56476 0.845788 4.56475 0.84579L4.99338 1.26565C4.99338 1.26565 4.99338 1.26565 4.99338 1.26564L4.56476 0.845784ZM9.98667 0.845789C9.98667 0.845788 9.98666 0.845787 9.98666 0.845785L9.55804 1.26565C9.55804 1.26565 9.55804 1.26565 9.55805 1.26565L9.98667 0.845789ZM10.8189 1.6954C10.8189 1.69538 10.8189 1.69536 10.8189 1.69535L10.3902 2.11521C10.3902 2.11522 10.3903 2.11523 10.3903 2.11524L10.8189 1.6954ZM11.1146 3.06246C11.3462 2.82606 11.411 2.44051 11.1966 2.14344L10.7101 2.49464C10.7332 2.52669 10.7385 2.58902 10.686 2.64258L11.1146 3.06246ZM9.86916 2.95685C10.1487 3.30046 10.7367 3.44829 11.1146 3.06246L10.686 2.64258C10.652 2.67732 10.6006 2.69693 10.531 2.68804C10.4586 2.67877 10.3842 2.63918 10.3346 2.57823L9.86916 2.95685ZM9.3209 1.52545C9.32089 1.52544 9.32089 1.52544 9.32089 1.52544L8.89227 1.9453C8.89227 1.9453 8.89227 1.94531 8.89228 1.94531L9.3209 1.52545ZM9.72448 2.79488C9.72448 2.79488 9.72448 2.79488 9.72449 2.79488L10.1531 2.37503C10.1531 2.37503 10.1531 2.37502 10.1531 2.37502L9.72448 2.79488Z" transform="translate(9.95154 16.0478)" fill="white" mask="url(#path-2-outside-1)"/><mask id="path-4-outside-2" maskUnits="userSpaceOnUse" x="-1" y="-1" width="13" height="14" fill="black"><rect fill="white" x="-1" y="-1" width="13" height="14"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z"/></mask> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.10658 1.73537C9.10658 1.73537 9.10658 1.73538 9.10659 1.73538L9.93879 2.58495C9.9388 2.58495 9.9388 2.58495 9.9388 2.58496C9.99645 2.64381 10.0508 2.70475 10.1019 2.76754C10.3002 3.0113 10.6804 3.07698 10.9003 2.85252C11.0424 2.70754 11.0721 2.4836 10.9533 2.31904C10.849 2.17452 10.7327 2.03614 10.6046 1.90532C10.6046 1.9053 10.6046 1.90529 10.6045 1.90528L9.77236 1.05572C9.77236 1.05572 9.77235 1.05572 9.77235 1.05572C8.39351 -0.351905 6.15792 -0.351905 4.77907 1.05571C4.77907 1.05572 4.77907 1.05572 4.77906 1.05572L1.03414 4.87877C1.03413 4.87878 1.03413 4.87878 1.03413 4.87878C-0.344706 6.2864 -0.34471 8.56858 1.03412 9.9762C1.03413 9.97621 1.03414 9.97622 1.03415 9.97623L1.86633 10.8258C1.86634 10.8258 1.86635 10.8258 1.86636 10.8258C3.24521 12.2334 5.48072 12.2334 6.85962 10.8258C6.85963 10.8258 6.85964 10.8258 6.85964 10.8258L9.28893 8.34581C9.47006 8.1609 9.47006 7.86509 9.28893 7.68018C9.10243 7.48979 8.79591 7.48979 8.60942 7.68018L6.19386 10.1461C6.19386 10.1461 6.19386 10.1461 6.19386 10.1461C5.1827 11.1784 3.54326 11.1784 2.53215 10.1461C2.53213 10.1461 2.53211 10.1461 2.53209 10.1461L1.69991 9.29657C1.69991 9.29657 1.6999 9.29656 1.6999 9.29655C0.688737 8.2643 0.688739 6.59069 1.6999 5.55844C1.6999 5.55843 1.69991 5.55843 1.69991 5.55843L5.44484 1.73538C5.44484 1.73538 5.44484 1.73537 5.44484 1.73537C6.45601 0.703119 8.09541 0.703118 9.10658 1.73537Z" transform="translate(28.9286 22.8312) rotate(-180)" fill="white"/><path d="M5.44484 1.73538L5.23053 1.52545L5.44484 1.73538ZM5.44484 1.73537L5.23053 1.52544L5.44484 1.73537ZM1.6999 5.55844L1.48559 5.3485L1.6999 5.55844ZM1.69991 5.55843L1.91422 5.76836L1.69991 5.55843ZM1.69991 9.29657L1.91422 9.08664L1.69991 9.29657ZM1.6999 9.29655L1.91421 9.08662L1.6999 9.29655ZM2.53215 10.1461L2.31784 10.3561L2.53215 10.1461ZM2.53209 10.1461L2.31778 10.356L2.53209 10.1461ZM6.19386 10.1461L5.97955 9.93618L6.19386 10.1461ZM6.19386 10.1461L6.40817 10.356L6.19386 10.1461ZM8.60942 7.68018L8.82373 7.89011L8.60942 7.68018ZM9.28893 8.34581L9.07462 8.13588L9.28893 8.34581ZM6.85962 10.8258L6.64532 10.6158L6.85962 10.8258ZM6.85964 10.8258L7.07395 11.0357L6.85964 10.8258ZM1.86633 10.8258L2.08064 10.6158L1.86633 10.8258ZM1.86636 10.8258L2.08067 10.6159L1.86636 10.8258ZM1.03412 9.9762L1.24843 9.76628L1.03412 9.9762ZM1.03415 9.97623L0.819841 10.1862L1.03415 9.97623ZM1.03414 4.87877L0.819827 4.66884L1.03414 4.87877ZM1.03413 4.87878L1.24844 5.08871L1.03413 4.87878ZM4.77907 1.05571L4.99338 1.26564L4.77907 1.05571ZM4.77906 1.05572L4.99338 1.26565L4.77906 1.05572ZM9.77236 1.05572L9.55805 1.26565L9.77236 1.05572ZM9.77235 1.05572L9.98666 0.845785L9.77235 1.05572ZM10.6046 1.90532L10.8189 1.6954L10.6046 1.90532ZM10.6045 1.90528L10.8189 1.69535L10.6045 1.90528ZM10.9533 2.31904L10.7101 2.49464L10.9533 2.31904ZM10.1019 2.76754L9.86916 2.95685L10.1019 2.76754ZM9.10659 1.73538L9.3209 1.52545L9.10659 1.73538ZM9.10658 1.73537L8.89227 1.9453L9.10658 1.73537ZM9.93879 2.58495L10.1531 2.37502L9.93879 2.58495ZM9.9388 2.58496L10.1531 2.37503L9.9388 2.58496ZM10.1531 2.37502L9.3209 1.52545L8.89228 1.94531L9.72448 2.79488L10.1531 2.37502ZM10.3346 2.57823C10.2777 2.50832 10.2172 2.4405 10.1531 2.37503L9.72449 2.79488C9.77566 2.84713 9.82388 2.90119 9.86916 2.95685L10.3346 2.57823ZM11.1966 2.14344C11.0835 1.98684 10.9576 1.83698 10.8189 1.6954L10.3903 2.11524C10.5079 2.2353 10.6145 2.3622 10.7101 2.49464L11.1966 2.14344ZM10.8189 1.69535L9.98667 0.845789L9.55805 1.26565L10.3902 2.11521L10.8189 1.69535ZM9.98666 0.845785C8.49018 -0.681928 6.06124 -0.681928 4.56476 0.845784L4.99338 1.26564C6.25459 -0.0218819 8.29683 -0.0218814 9.55804 1.26565L9.98666 0.845785ZM4.56475 0.84579L0.819827 4.66884L1.24845 5.0887L4.99338 1.26565L4.56475 0.84579ZM0.819819 4.66885C-0.673269 6.1931 -0.673273 8.66187 0.819807 10.1861L1.24843 9.76628C-0.0161474 8.47529 -0.016144 6.37969 1.24844 5.08871L0.819819 4.66885ZM0.819841 10.1862L1.65203 11.0357L2.08064 10.6158L1.24846 9.7663L0.819841 10.1862ZM1.65205 11.0357C3.14854 12.5634 5.57739 12.5634 7.07393 11.0357L6.64532 10.6158C5.38405 11.9034 3.34188 11.9034 2.08067 10.6159L1.65205 11.0357ZM7.07395 11.0357L9.50324 8.55574L9.07462 8.13588L6.64533 10.6158L7.07395 11.0357ZM6.40817 10.356L8.82373 7.89011L8.39511 7.47025L5.97955 9.93618L6.40817 10.356ZM2.31784 10.3561C3.44659 11.5084 5.27938 11.5084 6.40817 10.356L5.97955 9.93618C5.08603 10.8483 3.63993 10.8483 2.74646 9.93621L2.31784 10.3561ZM1.48561 9.50651L2.31778 10.356L2.7464 9.93615L1.91422 9.08664L1.48561 9.50651ZM1.48559 5.3485C0.360176 6.49739 0.360173 8.35759 1.48559 9.50648L1.91421 9.08662C1.0173 8.171 1.0173 6.68399 1.91421 5.76837L1.48559 5.3485ZM5.23053 1.52545L1.4856 5.3485L1.91422 5.76836L5.65915 1.94531L5.23053 1.52545ZM9.32089 1.52544C8.19208 0.373095 6.35934 0.373096 5.23053 1.52544L5.65915 1.9453C6.55268 1.03314 7.99874 1.03314 8.89227 1.9453L9.32089 1.52544ZM5.65915 1.94531C5.65915 1.94531 5.65915 1.94531 5.65915 1.9453L5.23053 1.52544C5.23053 1.52544 5.23053 1.52544 5.23053 1.52545L5.65915 1.94531ZM1.91421 5.76837C1.91421 5.76837 1.91422 5.76836 1.91422 5.76836L1.4856 5.3485C1.4856 5.3485 1.48559 5.3485 1.48559 5.3485L1.91421 5.76837ZM1.91422 9.08664C1.91422 9.08663 1.91421 9.08663 1.91421 9.08662L1.48559 9.50648C1.48559 9.50649 1.4856 9.5065 1.48561 9.50651L1.91422 9.08664ZM2.74646 9.93621C2.74644 9.93619 2.74642 9.93617 2.7464 9.93615L2.31778 10.356C2.3178 10.356 2.31782 10.356 2.31784 10.3561L2.74646 9.93621ZM5.97955 9.93618C5.97955 9.93618 5.97955 9.93618 5.97955 9.93618L6.40817 10.356C6.40817 10.356 6.40817 10.356 6.40817 10.356L5.97955 9.93618ZM9.50324 7.47025C9.1991 7.15977 8.69924 7.15977 8.39511 7.47025L8.82373 7.89011C8.89259 7.81981 9.00576 7.81981 9.07462 7.89011L9.50324 7.47025ZM9.50324 8.55574C9.79862 8.25419 9.79862 7.77179 9.50324 7.47025L9.07462 7.89011C9.1415 7.95838 9.1415 8.0676 9.07462 8.13588L9.50324 8.55574ZM7.07393 11.0357C7.07394 11.0357 7.07395 11.0357 7.07395 11.0357L6.64533 10.6158C6.64533 10.6158 6.64532 10.6158 6.64532 10.6158L7.07393 11.0357ZM1.65203 11.0357C1.65203 11.0357 1.65204 11.0357 1.65205 11.0357L2.08067 10.6159C2.08066 10.6158 2.08065 10.6158 2.08064 10.6158L1.65203 11.0357ZM0.819807 10.1861C0.819819 10.1861 0.81983 10.1862 0.819841 10.1862L1.24846 9.7663C1.24845 9.76629 1.24844 9.76628 1.24843 9.76628L0.819807 10.1861ZM0.819827 4.66884C0.819824 4.66884 0.819822 4.66885 0.819819 4.66885L1.24844 5.08871C1.24844 5.08871 1.24845 5.08871 1.24845 5.0887L0.819827 4.66884ZM4.56476 0.845784C4.56476 0.845786 4.56476 0.845788 4.56475 0.84579L4.99338 1.26565C4.99338 1.26565 4.99338 1.26565 4.99338 1.26564L4.56476 0.845784ZM9.98667 0.845789C9.98667 0.845788 9.98666 0.845787 9.98666 0.845785L9.55804 1.26565C9.55804 1.26565 9.55804 1.26565 9.55805 1.26565L9.98667 0.845789ZM10.8189 1.6954C10.8189 1.69538 10.8189 1.69536 10.8189 1.69535L10.3902 2.11521C10.3902 2.11522 10.3903 2.11523 10.3903 2.11524L10.8189 1.6954ZM11.1146 3.06246C11.3462 2.82606 11.411 2.44051 11.1966 2.14344L10.7101 2.49464C10.7332 2.52669 10.7385 2.58902 10.686 2.64258L11.1146 3.06246ZM9.86916 2.95685C10.1487 3.30046 10.7367 3.44829 11.1146 3.06246L10.686 2.64258C10.652 2.67732 10.6006 2.69693 10.531 2.68804C10.4586 2.67877 10.3842 2.63918 10.3346 2.57823L9.86916 2.95685ZM9.3209 1.52545C9.32089 1.52544 9.32089 1.52544 9.32089 1.52544L8.89227 1.9453C8.89227 1.9453 8.89227 1.94531 8.89228 1.94531L9.3209 1.52545ZM9.72448 2.79488C9.72448 2.79488 9.72448 2.79488 9.72449 2.79488L10.1531 2.37503C10.1531 2.37503 10.1531 2.37502 10.1531 2.37502L9.72448 2.79488Z" transform="translate(28.9286 22.8312) rotate(-180)" fill="white" mask="url(#path-4-outside-2)"/>', i += "</svg>", i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>Link<p>", i += "</div>", i += "</div>"),
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
"
|
96 |
-
"
|
97 |
-
"
|
98 |
-
"
|
99 |
-
"
|
100 |
-
"
|
101 |
-
"
|
102 |
-
"
|
103 |
-
"
|
104 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}), i
|
106 |
}
|
107 |
|
@@ -423,6 +434,7 @@
|
|
423 |
}
|
424 |
return null;
|
425 |
}
|
|
|
426 |
function show_chaty_widget() {
|
427 |
set_chaty_cookie("cta_widget_status", "yes", 1);
|
428 |
isWidgetEnabled = 1;
|
@@ -436,45 +448,48 @@
|
|
436 |
if(chatyAnimation != null) {
|
437 |
chaty_settings.object_settings.animation_class = "";
|
438 |
}
|
|
|
439 |
if(chaty_settings.object_settings.animation_class != "") {
|
440 |
if(chaty_settings.object_settings.animation_class != "sheen") {
|
441 |
if (activeWidget > 1) {
|
442 |
-
jQuery(
|
443 |
setTimeout(function () {
|
444 |
-
jQuery(
|
445 |
}, 1000);
|
446 |
animationTimer = setInterval(function () {
|
447 |
-
jQuery(
|
448 |
setTimeout(function () {
|
449 |
-
jQuery(
|
450 |
}, 1000);
|
451 |
}, 5000);
|
452 |
} else if (activeWidget == 1) {
|
453 |
-
|
|
|
454 |
setTimeout(function () {
|
455 |
-
jQuery(
|
456 |
}, 1000);
|
457 |
animationTimer = setInterval(function () {
|
458 |
-
jQuery(
|
459 |
setTimeout(function () {
|
460 |
-
jQuery(
|
461 |
}, 1000);
|
462 |
}, 5000);
|
463 |
}
|
464 |
} else {
|
|
|
465 |
if(!jQuery(".i-trigger .chaty-widget-i .wrap-svg").length) {
|
466 |
jQuery(".i-trigger .chaty-widget-i svg").wrap(function() {
|
467 |
return "<div class='wrap-svg'></div>";
|
468 |
});
|
469 |
}
|
470 |
-
jQuery(
|
471 |
setTimeout(function () {
|
472 |
-
jQuery(
|
473 |
}, 10);
|
474 |
animationTimer = setInterval(function () {
|
475 |
-
jQuery(
|
476 |
setTimeout(function () {
|
477 |
-
jQuery(
|
478 |
}, 10);
|
479 |
}, 5000);
|
480 |
}
|
54 |
var animationTimer;
|
55 |
var isWidgetEnabled = 0;
|
56 |
var e = chaty_settings;
|
57 |
+
var animationClass = ".i-trigger .chaty-widget-i svg, .i-trigger .chaty-widget-i .widget-img, .i-trigger .chaty-widget-i .facustom-icon";
|
58 |
|
59 |
function o(e) {
|
60 |
var i = "", n = 0;
|
83 |
if(t == "whatsapp" && jQuery("body").hasClass("chaty-in-mobile")) {
|
84 |
a.value = a.mobile_url;
|
85 |
}
|
86 |
+
if(t == "viber") {
|
87 |
+
if(jQuery("body").hasClass("chaty-in-mobile")) {
|
88 |
+
var viberVal = a.value;
|
89 |
+
viberVal = viberVal.replace("+","");
|
90 |
+
if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
|
91 |
+
viberVal = "+"+viberVal;
|
92 |
+
}
|
93 |
+
a.value = viberVal;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
"linkedin" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
97 |
+
"twitter" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="https://twitter.com/' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
98 |
+
"instagram" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="https://www.instagram.com/' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
99 |
+
"custom_link" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
100 |
+
"facebook_messenger" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
101 |
+
"google_maps" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
102 |
+
"link" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"<p>", i += "</div>", i += "</div>"),
|
103 |
+
"email" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="mailto:' + a.value + '">', i += a.icon, i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
104 |
+
"poptin" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '">', i += a.icon, i += '<p><span class="mobile_none">"+a.title+"</p>', i += "</div>", i += "</div>"),
|
105 |
+
"skype" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="skype:' + a.value + '?chat">', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
106 |
+
"sms" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="sms:' + a.value + '">', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
107 |
+
"snapchat" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="https://www.snapchat.com/add/' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", 1 === Object.keys(e.object_settings.social).length && (i += '<div class="snap-wee-title">', i += "<p>Snapchat</p>", i += "</div>"), i += "</div>"),
|
108 |
+
"telegram" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="https://telegram.me/' + a.value + ' " target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
109 |
+
"phone" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="tel:' + a.value + '">', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
110 |
+
"viber" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="viber://chat?number=' + a.value+ '">', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
111 |
+
"vkontakte" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="https://vk.me/' + a.value + ' "target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
112 |
+
"waze" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
113 |
+
"whatsapp" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
114 |
+
"line" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += '<a class="chaty-'+a.slug+'" rel="noopener" href="' + a.value + '" target="'+currentTarget+ '" data-mobile-target="'+mobileTarget+'" data-desktop-target="'+desktopTarget+'" >', i += a.icon, i += "</a>", i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+"</p>", i += "</div>", i += "</div>"),
|
115 |
+
"wechat" == t && (i += '<div class="chaty-widget-i chaty-main-widget '+a.is_mobile+' '+a.is_desktop+' " data-title="' + a.value + '">', i += a.icon, i += '<div class="chaty-widget-i-title">', i += "<p>"+a.title+": " + a.value + "</p>", i += "</div>", 1 === Object.keys(e.object_settings.social).length && (i += '<div class="snap-wee-title">', i += "<p>"+a.title+": " + a.value + "</p>", i += "</div>"), i += "</div>")
|
116 |
}), i
|
117 |
}
|
118 |
|
434 |
}
|
435 |
return null;
|
436 |
}
|
437 |
+
|
438 |
function show_chaty_widget() {
|
439 |
set_chaty_cookie("cta_widget_status", "yes", 1);
|
440 |
isWidgetEnabled = 1;
|
448 |
if(chatyAnimation != null) {
|
449 |
chaty_settings.object_settings.animation_class = "";
|
450 |
}
|
451 |
+
|
452 |
if(chaty_settings.object_settings.animation_class != "") {
|
453 |
if(chaty_settings.object_settings.animation_class != "sheen") {
|
454 |
if (activeWidget > 1) {
|
455 |
+
jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now");
|
456 |
setTimeout(function () {
|
457 |
+
jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now");
|
458 |
}, 1000);
|
459 |
animationTimer = setInterval(function () {
|
460 |
+
jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now");
|
461 |
setTimeout(function () {
|
462 |
+
jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now");
|
463 |
}, 1000);
|
464 |
}, 5000);
|
465 |
} else if (activeWidget == 1) {
|
466 |
+
animationClass = ".chaty-main-widget svg, .chaty-main-widget img, .chaty-main-widget .facustom-icon";
|
467 |
+
jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now");
|
468 |
setTimeout(function () {
|
469 |
+
jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now");
|
470 |
}, 1000);
|
471 |
animationTimer = setInterval(function () {
|
472 |
+
jQuery(animationClass).removeClass("chaty-animation-" + chaty_settings.object_settings.animation_class).removeClass("start-now");
|
473 |
setTimeout(function () {
|
474 |
+
jQuery(animationClass).addClass("chaty-animation-" + chaty_settings.object_settings.animation_class).addClass("start-now");
|
475 |
}, 1000);
|
476 |
}, 5000);
|
477 |
}
|
478 |
} else {
|
479 |
+
animationClass = ".i-trigger .chaty-widget-i .wrap-svg";
|
480 |
if(!jQuery(".i-trigger .chaty-widget-i .wrap-svg").length) {
|
481 |
jQuery(".i-trigger .chaty-widget-i svg").wrap(function() {
|
482 |
return "<div class='wrap-svg'></div>";
|
483 |
});
|
484 |
}
|
485 |
+
jQuery(animationClass).removeClass("chaty-animation-sheen").removeClass("start-now");
|
486 |
setTimeout(function () {
|
487 |
+
jQuery(animationClass).addClass("chaty-animation-sheen").addClass("start-now");
|
488 |
}, 10);
|
489 |
animationTimer = setInterval(function () {
|
490 |
+
jQuery(animationClass).removeClass("chaty-animation-sheen").removeClass("start-now");
|
491 |
setTimeout(function () {
|
492 |
+
jQuery(animationClass).addClass("chaty-animation-sheen").addClass("start-now");
|
493 |
}, 10);
|
494 |
}, 5000);
|
495 |
}
|
assets/js/cht-scripts.min.js
CHANGED
@@ -240,6 +240,19 @@
|
|
240 |
|
241 |
});
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
e(".color-picker-radio input").change(function () {
|
244 |
var t = e(this);
|
245 |
t.prop("checked") ? t.val() : e(".color-picker-custom input").val(), d()
|
@@ -288,8 +301,18 @@
|
|
288 |
},
|
289 |
success: function (o) {
|
290 |
var n = e(o), i = n.find(".icon").data("title");
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
},
|
294 |
error: function (e, t, o) {
|
295 |
}
|
@@ -311,8 +334,8 @@
|
|
311 |
} else {
|
312 |
check_for_close_btn();
|
313 |
}
|
|
|
314 |
}
|
315 |
-
d();
|
316 |
}), e(".btn-help").click(function (e) {
|
317 |
window.open("https://premio.io/help/chaty/", "_blank")
|
318 |
}), e(".free-custom-radio, .free-custom-checkbox").on("click", function (e) {
|
@@ -335,7 +358,6 @@
|
|
335 |
}
|
336 |
|
337 |
function p(t, o) {
|
338 |
-
console.log("@13123");
|
339 |
if(t == undefined || t == "undefined") {
|
340 |
t = jQuery(".icon.icon-sm.active").html();
|
341 |
}
|
@@ -346,20 +368,25 @@
|
|
346 |
thisVal = jQuery("#chaty_default_state").val();
|
347 |
if(thisVal == "open") {
|
348 |
jQuery(".hide-show-button").addClass("active");
|
349 |
-
// if(!jQuery("#cht_close_button").is(":checked")) {
|
350 |
-
// jQuery("#iconWidget").hide();
|
351 |
-
// jQuery(".chaty-widget .tooltiptext").hide();
|
352 |
-
// jQuery(".preview .page .chaty-widget").addClass("hide-arrow");
|
353 |
-
// }
|
354 |
} else {
|
355 |
-
// jQuery("#iconWidget").show();
|
356 |
-
// jQuery(".chaty-widget .tooltiptext").show();
|
357 |
-
// jQuery(".preview .page .chaty-widget").removeClass("hide-arrow");
|
358 |
jQuery(".hide-show-button").removeClass("active");
|
359 |
}
|
360 |
jQuery(".chaty-widget").removeClass("active").removeClass("hover").removeClass("click");
|
361 |
if(thisVal == "open") {
|
362 |
jQuery(".chaty-widget").addClass("active");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
jQuery("#chaty_attention_effect").val("");
|
364 |
jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", true);
|
365 |
jQuery("#chaty_attention_effect option:first-child").text("Doesn't apply for the open state");
|
@@ -367,16 +394,7 @@
|
|
367 |
jQuery(".test_textarea").attr("data-value", jQuery(".test_textarea").val());
|
368 |
}
|
369 |
jQuery(".test_textarea").val("Doesn't apply for the open state");
|
370 |
-
} else if(thisVal == "hover") {
|
371 |
-
jQuery(".chaty-widget").addClass("hover");
|
372 |
-
jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
|
373 |
-
jQuery("#chaty_attention_effect option:first-child").text("None");
|
374 |
-
jQuery(".test_textarea").attr("placeholder","");
|
375 |
-
if(jQuery(".test_textarea").val() == "Doesn't apply for the open state") {
|
376 |
-
jQuery(".test_textarea").val(jQuery(".test_textarea").attr("data-value"));
|
377 |
-
}
|
378 |
} else {
|
379 |
-
jQuery(".chaty-widget").addClass("click");
|
380 |
jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
|
381 |
jQuery("#chaty_attention_effect option:first-child").text("None");
|
382 |
jQuery(".test_textarea").attr("placeholder","");
|
@@ -385,12 +403,6 @@
|
|
385 |
}
|
386 |
}
|
387 |
|
388 |
-
|
389 |
-
jQuery(".chaty-channels").html("");
|
390 |
-
var eClass = ".js-chanel-mobile";
|
391 |
-
if (h()) {
|
392 |
-
var eClass = ".js-chanel-desktop";
|
393 |
-
}
|
394 |
if (jQuery(eClass+':checked').length > 1) {
|
395 |
jQuery(eClass+':checked').each(function(){
|
396 |
var socialIcon = jQuery(this).closest("li").find(".icon").html();
|
@@ -452,7 +464,7 @@
|
|
452 |
if(jQuery(".chaty-widget .tooltiptext").text() == "") {
|
453 |
jQuery(".chaty-widget .tooltiptext").hide();
|
454 |
} else {
|
455 |
-
if(jQuery("#chaty_default_state").val() == "open") {
|
456 |
jQuery(".chaty-widget .tooltiptext").hide();
|
457 |
} else {
|
458 |
jQuery(".chaty-widget .tooltiptext").css("display", "block");
|
@@ -464,6 +476,20 @@
|
|
464 |
return "checked" === e("#previewDesktop").attr("checked")
|
465 |
}
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
jQuery(".color-picker-radio input:checked").val(), e("#testUpload").on("change", function () {
|
468 |
this.value.length > 0 ? document.querySelector(".js-upload").disabled = !1 : (document.querySelector(".js-upload").disabled = !0, document.getElementById("uploadInput").checked = !1)
|
469 |
}), e(".js-switch-preview").on("change", function () {
|
@@ -489,14 +515,45 @@
|
|
489 |
jQuery('.preview-section-chaty #admin-preview .page-body').attr("style","");
|
490 |
}
|
491 |
});
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
if (font_val != "") {
|
497 |
-
jQuery('head').append('<link href="https://fonts.googleapis.com/css?family=' + font_val + ':400,600,700" rel="stylesheet" type="text/css" class="chaty-google-font">');
|
498 |
-
jQuery('.preview-section-chaty #admin-preview .page-body').css('font-family', font_val);
|
499 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
});
|
501 |
}(jQuery);
|
502 |
function toggle_chaty_setting(socId) {
|
@@ -521,7 +578,7 @@ jQuery(document).ready(function(){
|
|
521 |
// jQuery(this).text("Add Rule");
|
522 |
// }
|
523 |
});
|
524 |
-
})
|
525 |
|
526 |
function check_for_close_btn() {
|
527 |
if(jQuery("#channels-selected-list > li:not(.chaty-cls-setting)").length >= 2) {
|
240 |
|
241 |
});
|
242 |
|
243 |
+
setInterval(function(){
|
244 |
+
var currentClass = jQuery("#chaty_attention_effect").attr("data-effect");
|
245 |
+
if(currentClass != "") {
|
246 |
+
jQuery("#iconWidget").removeClass("chaty-animation-"+currentClass);
|
247 |
+
jQuery("#iconWidget").removeClass("start-now");
|
248 |
+
setTimeout(function(){
|
249 |
+
jQuery("#iconWidget").addClass("chaty-animation-"+jQuery("#chaty_attention_effect").val()).addClass("start-now");
|
250 |
+
}, 1000);
|
251 |
+
} else {
|
252 |
+
jQuery("#chaty_attention_effect").attr("data-effect", jQuery("#chaty_attention_effect").val());
|
253 |
+
}
|
254 |
+
}, 5000);
|
255 |
+
|
256 |
e(".color-picker-radio input").change(function () {
|
257 |
var t = e(this);
|
258 |
t.prop("checked") ? t.val() : e(".color-picker-custom input").val(), d()
|
301 |
},
|
302 |
success: function (o) {
|
303 |
var n = e(o), i = n.find(".icon").data("title");
|
304 |
+
e('.channels-selected div[data-title="' + i + '"]').length || e("#chaty-social-close").before(n), t.removeClass("disabled"), d(), a(), check_for_close_btn();
|
305 |
+
|
306 |
+
jQuery('.chaty-color-field').spectrum({
|
307 |
+
chooseText: "Submit",
|
308 |
+
preferredFormat: "hex",
|
309 |
+
showInput: true,
|
310 |
+
cancelText: "Cancel",
|
311 |
+
move: function (color) {
|
312 |
+
jQuery(this).val(color.toHexString());
|
313 |
+
chaty_set_bg_color();
|
314 |
+
}
|
315 |
+
});
|
316 |
},
|
317 |
error: function (e, t, o) {
|
318 |
}
|
334 |
} else {
|
335 |
check_for_close_btn();
|
336 |
}
|
337 |
+
d();
|
338 |
}
|
|
|
339 |
}), e(".btn-help").click(function (e) {
|
340 |
window.open("https://premio.io/help/chaty/", "_blank")
|
341 |
}), e(".free-custom-radio, .free-custom-checkbox").on("click", function (e) {
|
358 |
}
|
359 |
|
360 |
function p(t, o) {
|
|
|
361 |
if(t == undefined || t == "undefined") {
|
362 |
t = jQuery(".icon.icon-sm.active").html();
|
363 |
}
|
368 |
thisVal = jQuery("#chaty_default_state").val();
|
369 |
if(thisVal == "open") {
|
370 |
jQuery(".hide-show-button").addClass("active");
|
|
|
|
|
|
|
|
|
|
|
371 |
} else {
|
|
|
|
|
|
|
372 |
jQuery(".hide-show-button").removeClass("active");
|
373 |
}
|
374 |
jQuery(".chaty-widget").removeClass("active").removeClass("hover").removeClass("click");
|
375 |
if(thisVal == "open") {
|
376 |
jQuery(".chaty-widget").addClass("active");
|
377 |
+
} else if(thisVal == "hover") {
|
378 |
+
jQuery(".chaty-widget").addClass("hover");
|
379 |
+
} else {
|
380 |
+
jQuery(".chaty-widget").addClass("click");
|
381 |
+
}
|
382 |
+
|
383 |
+
jQuery(".chaty-channels").html("");
|
384 |
+
var eClass = ".js-chanel-mobile";
|
385 |
+
if (h()) {
|
386 |
+
var eClass = ".js-chanel-desktop";
|
387 |
+
}
|
388 |
+
|
389 |
+
if(thisVal == "open" && jQuery(eClass+':checked').length > 1) {
|
390 |
jQuery("#chaty_attention_effect").val("");
|
391 |
jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", true);
|
392 |
jQuery("#chaty_attention_effect option:first-child").text("Doesn't apply for the open state");
|
394 |
jQuery(".test_textarea").attr("data-value", jQuery(".test_textarea").val());
|
395 |
}
|
396 |
jQuery(".test_textarea").val("Doesn't apply for the open state");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
} else {
|
|
|
398 |
jQuery("#chaty_attention_effect, .test_textarea").attr("disabled", false);
|
399 |
jQuery("#chaty_attention_effect option:first-child").text("None");
|
400 |
jQuery(".test_textarea").attr("placeholder","");
|
403 |
}
|
404 |
}
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
if (jQuery(eClass+':checked').length > 1) {
|
407 |
jQuery(eClass+':checked').each(function(){
|
408 |
var socialIcon = jQuery(this).closest("li").find(".icon").html();
|
464 |
if(jQuery(".chaty-widget .tooltiptext").text() == "") {
|
465 |
jQuery(".chaty-widget .tooltiptext").hide();
|
466 |
} else {
|
467 |
+
if(jQuery("#chaty_default_state").val() == "open" && jQuery(eClass+':checked').length > 1) {
|
468 |
jQuery(".chaty-widget .tooltiptext").hide();
|
469 |
} else {
|
470 |
jQuery(".chaty-widget .tooltiptext").css("display", "block");
|
476 |
return "checked" === e("#previewDesktop").attr("checked")
|
477 |
}
|
478 |
|
479 |
+
function chaty_set_bg_color() {
|
480 |
+
jQuery(".chaty-color-field").each(function () {
|
481 |
+
if (jQuery(this).val() != "" && jQuery(this).val() != "#ffffff") {
|
482 |
+
if (jQuery(this).closest("li").data("id") != "Linkedin" || (jQuery(this).closest("li").data("id") == "Linkedin" && jQuery(this).val() != "#ffffff")) {
|
483 |
+
defaultColor = jQuery(this).val();
|
484 |
+
jQuery(this).closest(".channels-selected__item").find(".color-element").css("fill", defaultColor);
|
485 |
+
jQuery(this).closest(".channels-selected__item").find(".custom-chaty-image").css("background", defaultColor);
|
486 |
+
jQuery(this).closest(".channels-selected__item").find("span.facustom-icon").css("background", defaultColor);
|
487 |
+
}
|
488 |
+
}
|
489 |
+
});
|
490 |
+
d();
|
491 |
+
}
|
492 |
+
|
493 |
jQuery(".color-picker-radio input:checked").val(), e("#testUpload").on("change", function () {
|
494 |
this.value.length > 0 ? document.querySelector(".js-upload").disabled = !1 : (document.querySelector(".js-upload").disabled = !0, document.getElementById("uploadInput").checked = !1)
|
495 |
}), e(".js-switch-preview").on("change", function () {
|
515 |
jQuery('.preview-section-chaty #admin-preview .page-body').attr("style","");
|
516 |
}
|
517 |
});
|
518 |
+
|
519 |
+
function stickyelement_iconformat(icon) {
|
520 |
+
var originalOption = icon.element;
|
521 |
+
return jQuery('<span><i class="' + icon.text + '"></i> ' + icon.text + '</span>');
|
|
|
|
|
|
|
522 |
}
|
523 |
+
|
524 |
+
jQuery(document).on("blur", "#channels-selected-list > li:not(#chaty-social-close) .channels__input", function(){
|
525 |
+
if(jQuery(this).hasClass("border-red") && jQuery(this).val() != "") {
|
526 |
+
jQuery(this).removeClass("border-red");
|
527 |
+
}
|
528 |
+
});
|
529 |
+
|
530 |
+
jQuery(window).load(function(){
|
531 |
+
var font_val = jQuery('.form-fonts').val();
|
532 |
+
jQuery('.chaty-google-font').remove();
|
533 |
+
if (font_val != "") {
|
534 |
+
jQuery('head').append('<link href="https://fonts.googleapis.com/css?family=' + font_val + ':400,600,700" rel="stylesheet" type="text/css" class="chaty-google-font">');
|
535 |
+
jQuery('.preview-section-chaty #admin-preview .page-body').css('font-family', font_val);
|
536 |
+
}
|
537 |
+
});
|
538 |
+
|
539 |
+
jQuery('.chaty-color-field').spectrum({
|
540 |
+
chooseText: "Submit",
|
541 |
+
preferredFormat: "hex",
|
542 |
+
cancelText: "Cancel",
|
543 |
+
showInput: true,
|
544 |
+
move: function (color) {
|
545 |
+
jQuery(this).val(color.toHexString());
|
546 |
+
chaty_set_bg_color();
|
547 |
+
}
|
548 |
+
});
|
549 |
+
|
550 |
+
jQuery(".chaty-color-field").change(function () {
|
551 |
+
chaty_set_bg_color();
|
552 |
+
});
|
553 |
+
|
554 |
+
chaty_set_bg_color();
|
555 |
+
|
556 |
+
//d();
|
557 |
});
|
558 |
}(jQuery);
|
559 |
function toggle_chaty_setting(socId) {
|
578 |
// jQuery(this).text("Add Rule");
|
579 |
// }
|
580 |
});
|
581 |
+
});
|
582 |
|
583 |
function check_for_close_btn() {
|
584 |
if(jQuery("#channels-selected-list > li:not(.chaty-cls-setting)").length >= 2) {
|
assets/js/spectrum.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports=="object"&&typeof module=="object"){module.exports=factory(require("jquery"))}else{factory(jQuery)}})(function($,undefined){"use strict";var defaultOpts={beforeShow:noop,move:noop,change:noop,show:noop,hide:noop,color:false,flat:false,showInput:false,allowEmpty:false,showButtons:true,clickoutFiresChange:true,showInitial:false,showPalette:false,showPaletteOnly:false,hideAfterPaletteSelect:false,togglePaletteOnly:false,showSelectionPalette:true,localStorageKey:false,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:false,className:"",containerClassName:"",replacerClassName:"",showAlpha:false,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:false,offset:null},spectrums=[],IE=!!/msie/i.exec(window.navigator.userAgent),rgbaSupport=function(){function contains(str,substr){return!!~(""+str).indexOf(substr)}var elem=document.createElement("div");var style=elem.style;style.cssText="background-color:rgba(0,0,0,.5)";return contains(style.backgroundColor,"rgba")||contains(style.backgroundColor,"hsla")}(),replaceInput=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>","</div>"].join(""),markup=function(){var gradientFix="";if(IE){for(var i=1;i<=6;i++){gradientFix+="<div class='sp-"+i+"'></div>"}}return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",gradientFix,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}();function paletteTemplate(p,color,className,opts){var html=[];for(var i=0;i<p.length;i++){var current=p[i];if(current){var tiny=tinycolor(current);var c=tiny.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";c+=tinycolor.equals(color,current)?" sp-thumb-active":"";var formattedString=tiny.toString(opts.preferredFormat||"rgb");var swatchStyle=rgbaSupport?"background-color:"+tiny.toRgbString():"filter:"+tiny.toFilter();html.push('<span title="'+formattedString+'" data-color="'+tiny.toRgbString()+'" class="'+c+'"><span class="sp-thumb-inner" style="'+swatchStyle+';" /></span>')}else{var cls="sp-clear-display";html.push($("<div />").append($('<span data-color="" style="background-color:transparent;" class="'+cls+'"></span>').attr("title",opts.noColorSelectedText)).html())}}return"<div class='sp-cf "+className+"'>"+html.join("")+"</div>"}function hideAll(){for(var i=0;i<spectrums.length;i++){if(spectrums[i]){spectrums[i].hide()}}}function instanceOptions(o,callbackContext){var opts=$.extend({},defaultOpts,o);opts.callbacks={move:bind(opts.move,callbackContext),change:bind(opts.change,callbackContext),show:bind(opts.show,callbackContext),hide:bind(opts.hide,callbackContext),beforeShow:bind(opts.beforeShow,callbackContext)};return opts}function spectrum(element,o){var opts=instanceOptions(o,element),flat=opts.flat,showSelectionPalette=opts.showSelectionPalette,localStorageKey=opts.localStorageKey,theme=opts.theme,callbacks=opts.callbacks,resize=throttle(reflow,10),visible=false,isDragging=false,dragWidth=0,dragHeight=0,dragHelperHeight=0,slideHeight=0,slideWidth=0,alphaWidth=0,alphaSlideHelperWidth=0,slideHelperHeight=0,currentHue=0,currentSaturation=0,currentValue=0,currentAlpha=1,palette=[],paletteArray=[],paletteLookup={},selectionPalette=opts.selectionPalette.slice(0),maxSelectionSize=opts.maxSelectionSize,draggingClass="sp-dragging",shiftMovementDirection=null;var doc=element.ownerDocument,body=doc.body,boundElement=$(element),disabled=false,container=$(markup,doc).addClass(theme),pickerContainer=container.find(".sp-picker-container"),dragger=container.find(".sp-color"),dragHelper=container.find(".sp-dragger"),slider=container.find(".sp-hue"),slideHelper=container.find(".sp-slider"),alphaSliderInner=container.find(".sp-alpha-inner"),alphaSlider=container.find(".sp-alpha"),alphaSlideHelper=container.find(".sp-alpha-handle"),textInput=container.find(".sp-input"),paletteContainer=container.find(".sp-palette"),initialColorContainer=container.find(".sp-initial"),cancelButton=container.find(".sp-cancel"),clearButton=container.find(".sp-clear"),chooseButton=container.find(".sp-choose"),toggleButton=container.find(".sp-palette-toggle"),isInput=boundElement.is("input"),isInputTypeColor=isInput&&boundElement.attr("type")==="color"&&inputTypeColorSupport(),shouldReplace=isInput&&!flat,replacer=shouldReplace?$(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName):$([]),offsetElement=shouldReplace?replacer:boundElement,previewElement=replacer.find(".sp-preview-inner"),initialColor=opts.color||isInput&&boundElement.val(),colorOnShow=false,currentPreferredFormat=opts.preferredFormat,clickoutFiresChange=!opts.showButtons||opts.clickoutFiresChange,isEmpty=!initialColor,allowEmpty=opts.allowEmpty&&!isInputTypeColor;function applyOptions(){if(opts.showPaletteOnly){opts.showPalette=true}toggleButton.text(opts.showPaletteOnly?opts.togglePaletteMoreText:opts.togglePaletteLessText);if(opts.palette){palette=opts.palette.slice(0);paletteArray=$.isArray(palette[0])?palette:[palette];paletteLookup={};for(var i=0;i<paletteArray.length;i++){for(var j=0;j<paletteArray[i].length;j++){var rgb=tinycolor(paletteArray[i][j]).toRgbString();paletteLookup[rgb]=true}}}container.toggleClass("sp-flat",flat);container.toggleClass("sp-input-disabled",!opts.showInput);container.toggleClass("sp-alpha-enabled",opts.showAlpha);container.toggleClass("sp-clear-enabled",allowEmpty);container.toggleClass("sp-buttons-disabled",!opts.showButtons);container.toggleClass("sp-palette-buttons-disabled",!opts.togglePaletteOnly);container.toggleClass("sp-palette-disabled",!opts.showPalette);container.toggleClass("sp-palette-only",opts.showPaletteOnly);container.toggleClass("sp-initial-disabled",!opts.showInitial);container.addClass(opts.className).addClass(opts.containerClassName);reflow()}function initialize(){if(IE){container.find("*:not(input)").attr("unselectable","on")}applyOptions();if(shouldReplace){boundElement.after(replacer).hide()}if(!allowEmpty){clearButton.hide()}if(flat){boundElement.after(container).hide()}else{var appendTo=opts.appendTo==="parent"?boundElement.parent():$(opts.appendTo);if(appendTo.length!==1){appendTo=$("body")}appendTo.append(container)}updateSelectionPaletteFromStorage();offsetElement.bind("click.spectrum touchstart.spectrum",function(e){if(!disabled){toggle()}e.stopPropagation();if(!$(e.target).is("input")){e.preventDefault()}});if(boundElement.is(":disabled")||opts.disabled===true){disable()}container.click(stopPropagation);textInput.change(setFromTextInput);textInput.bind("paste",function(){setTimeout(setFromTextInput,1)});textInput.keydown(function(e){if(e.keyCode==13){setFromTextInput()}});cancelButton.text(opts.cancelText);cancelButton.bind("click.spectrum",function(e){e.stopPropagation();e.preventDefault();revert();hide()});clearButton.attr("title",opts.clearText);clearButton.bind("click.spectrum",function(e){e.stopPropagation();e.preventDefault();isEmpty=true;move();if(flat){updateOriginalInput(true)}});chooseButton.text(opts.chooseText);chooseButton.bind("click.spectrum",function(e){e.stopPropagation();e.preventDefault();if(IE&&textInput.is(":focus")){textInput.trigger("change")}if(isValid()){updateOriginalInput(true);hide()}});toggleButton.text(opts.showPaletteOnly?opts.togglePaletteMoreText:opts.togglePaletteLessText);toggleButton.bind("click.spectrum",function(e){e.stopPropagation();e.preventDefault();opts.showPaletteOnly=!opts.showPaletteOnly;if(!opts.showPaletteOnly&&!flat){container.css("left","-="+(pickerContainer.outerWidth(true)+5))}applyOptions()});draggable(alphaSlider,function(dragX,dragY,e){currentAlpha=dragX/alphaWidth;isEmpty=false;if(e.shiftKey){currentAlpha=Math.round(currentAlpha*10)/10}move()},dragStart,dragStop);draggable(slider,function(dragX,dragY){currentHue=parseFloat(dragY/slideHeight);isEmpty=false;if(!opts.showAlpha){currentAlpha=1}move()},dragStart,dragStop);draggable(dragger,function(dragX,dragY,e){if(!e.shiftKey){shiftMovementDirection=null}else if(!shiftMovementDirection){var oldDragX=currentSaturation*dragWidth;var oldDragY=dragHeight-currentValue*dragHeight;var furtherFromX=Math.abs(dragX-oldDragX)>Math.abs(dragY-oldDragY);shiftMovementDirection=furtherFromX?"x":"y"}var setSaturation=!shiftMovementDirection||shiftMovementDirection==="x";var setValue=!shiftMovementDirection||shiftMovementDirection==="y";if(setSaturation){currentSaturation=parseFloat(dragX/dragWidth)}if(setValue){currentValue=parseFloat((dragHeight-dragY)/dragHeight)}isEmpty=false;if(!opts.showAlpha){currentAlpha=1}move()},dragStart,dragStop);if(!!initialColor){set(initialColor);updateUI();currentPreferredFormat=opts.preferredFormat||tinycolor(initialColor).format;addColorToSelectionPalette(initialColor)}else{updateUI()}if(flat){show()}function paletteElementClick(e){if(e.data&&e.data.ignore){set($(e.target).closest(".sp-thumb-el").data("color"));move()}else{set($(e.target).closest(".sp-thumb-el").data("color"));move();updateOriginalInput(true);if(opts.hideAfterPaletteSelect){hide()}}return false}var paletteEvent=IE?"mousedown.spectrum":"click.spectrum touchstart.spectrum";paletteContainer.delegate(".sp-thumb-el",paletteEvent,paletteElementClick);initialColorContainer.delegate(".sp-thumb-el:nth-child(1)",paletteEvent,{ignore:true},paletteElementClick)}function updateSelectionPaletteFromStorage(){if(localStorageKey&&window.localStorage){try{var oldPalette=window.localStorage[localStorageKey].split(",#");if(oldPalette.length>1){delete window.localStorage[localStorageKey];$.each(oldPalette,function(i,c){addColorToSelectionPalette(c)})}}catch(e){}try{selectionPalette=window.localStorage[localStorageKey].split(";")}catch(e){}}}function addColorToSelectionPalette(color){if(showSelectionPalette){var rgb=tinycolor(color).toRgbString();if(!paletteLookup[rgb]&&$.inArray(rgb,selectionPalette)===-1){selectionPalette.push(rgb);while(selectionPalette.length>maxSelectionSize){selectionPalette.shift()}}if(localStorageKey&&window.localStorage){try{window.localStorage[localStorageKey]=selectionPalette.join(";")}catch(e){}}}}function getUniqueSelectionPalette(){var unique=[];if(opts.showPalette){for(var i=0;i<selectionPalette.length;i++){var rgb=tinycolor(selectionPalette[i]).toRgbString();if(!paletteLookup[rgb]){unique.push(selectionPalette[i])}}}return unique.reverse().slice(0,opts.maxSelectionSize)}function drawPalette(){var currentColor=get();var html=$.map(paletteArray,function(palette,i){return paletteTemplate(palette,currentColor,"sp-palette-row sp-palette-row-"+i,opts)});updateSelectionPaletteFromStorage();if(selectionPalette){html.push(paletteTemplate(getUniqueSelectionPalette(),currentColor,"sp-palette-row sp-palette-row-selection",opts))}paletteContainer.html(html.join(""))}function drawInitial(){if(opts.showInitial){var initial=colorOnShow;var current=get();initialColorContainer.html(paletteTemplate([initial,current],current,"sp-palette-row-initial",opts))}}function dragStart(){if(dragHeight<=0||dragWidth<=0||slideHeight<=0){reflow()}isDragging=true;container.addClass(draggingClass);shiftMovementDirection=null;boundElement.trigger("dragstart.spectrum",[get()])}function dragStop(){isDragging=false;container.removeClass(draggingClass);boundElement.trigger("dragstop.spectrum",[get()])}function setFromTextInput(){var value=textInput.val();if((value===null||value==="")&&allowEmpty){set(null);updateOriginalInput(true)}else{var tiny=tinycolor(value);if(tiny.isValid()){set(tiny);updateOriginalInput(true)}else{textInput.addClass("sp-validation-error")}}}function toggle(){if(visible){hide()}else{show()}}function show(){var event=$.Event("beforeShow.spectrum");if(visible){reflow();return}boundElement.trigger(event,[get()]);if(callbacks.beforeShow(get())===false||event.isDefaultPrevented()){return}hideAll();visible=true;$(doc).bind("keydown.spectrum",onkeydown);$(doc).bind("click.spectrum",clickout);$(window).bind("resize.spectrum",resize);replacer.addClass("sp-active");container.removeClass("sp-hidden");reflow();updateUI();colorOnShow=get();drawInitial();callbacks.show(colorOnShow);boundElement.trigger("show.spectrum",[colorOnShow])}function onkeydown(e){if(e.keyCode===27){hide()}}function clickout(e){if(e.button==2){return}if(isDragging){return}if(clickoutFiresChange){updateOriginalInput(true)}else{revert()}hide()}function hide(){if(!visible||flat){return}visible=false;$(doc).unbind("keydown.spectrum",onkeydown);$(doc).unbind("click.spectrum",clickout);$(window).unbind("resize.spectrum",resize);replacer.removeClass("sp-active");container.addClass("sp-hidden");callbacks.hide(get());boundElement.trigger("hide.spectrum",[get()])}function revert(){set(colorOnShow,true)}function set(color,ignoreFormatChange){if(tinycolor.equals(color,get())){updateUI();return}var newColor,newHsv;if(!color&&allowEmpty){isEmpty=true}else{isEmpty=false;newColor=tinycolor(color);newHsv=newColor.toHsv();currentHue=newHsv.h%360/360;currentSaturation=newHsv.s;currentValue=newHsv.v;currentAlpha=newHsv.a}updateUI();if(newColor&&newColor.isValid()&&!ignoreFormatChange){currentPreferredFormat=opts.preferredFormat||newColor.getFormat()}}function get(opts){opts=opts||{};if(allowEmpty&&isEmpty){return null}return tinycolor.fromRatio({h:currentHue,s:currentSaturation,v:currentValue,a:Math.round(currentAlpha*100)/100},{format:opts.format||currentPreferredFormat})}function isValid(){return!textInput.hasClass("sp-validation-error")}function move(){updateUI();callbacks.move(get());boundElement.trigger("move.spectrum",[get()])}function updateUI(){textInput.removeClass("sp-validation-error");updateHelperLocations();var flatColor=tinycolor.fromRatio({h:currentHue,s:1,v:1});dragger.css("background-color",flatColor.toHexString());var format=currentPreferredFormat;if(currentAlpha<1&&!(currentAlpha===0&&format==="name")){if(format==="hex"||format==="hex3"||format==="hex6"||format==="name"){format="rgb"}}var realColor=get({format:format}),displayColor="";previewElement.removeClass("sp-clear-display");previewElement.css("background-color","transparent");if(!realColor&&allowEmpty){previewElement.addClass("sp-clear-display")}else{var realHex=realColor.toHexString(),realRgb=realColor.toRgbString();if(rgbaSupport||realColor.alpha===1){previewElement.css("background-color",realRgb)}else{previewElement.css("background-color","transparent");previewElement.css("filter",realColor.toFilter())}if(opts.showAlpha){var rgb=realColor.toRgb();rgb.a=0;var realAlpha=tinycolor(rgb).toRgbString();var gradient="linear-gradient(left, "+realAlpha+", "+realHex+")";if(IE){alphaSliderInner.css("filter",tinycolor(realAlpha).toFilter({gradientType:1},realHex))}else{alphaSliderInner.css("background","-webkit-"+gradient);alphaSliderInner.css("background","-moz-"+gradient);alphaSliderInner.css("background","-ms-"+gradient);alphaSliderInner.css("background","linear-gradient(to right, "+realAlpha+", "+realHex+")")}}displayColor=realColor.toString(format)}if(opts.showInput){textInput.val(displayColor)}if(opts.showPalette){drawPalette()}drawInitial()}function updateHelperLocations(){var s=currentSaturation;var v=currentValue;if(allowEmpty&&isEmpty){alphaSlideHelper.hide();slideHelper.hide();dragHelper.hide()}else{alphaSlideHelper.show();slideHelper.show();dragHelper.show();var dragX=s*dragWidth;var dragY=dragHeight-v*dragHeight;dragX=Math.max(-dragHelperHeight,Math.min(dragWidth-dragHelperHeight,dragX-dragHelperHeight));dragY=Math.max(-dragHelperHeight,Math.min(dragHeight-dragHelperHeight,dragY-dragHelperHeight));dragHelper.css({top:dragY+"px",left:dragX+"px"});var alphaX=currentAlpha*alphaWidth;alphaSlideHelper.css({left:alphaX-alphaSlideHelperWidth/2+"px"});var slideY=currentHue*slideHeight;slideHelper.css({top:slideY-slideHelperHeight+"px"})}}function updateOriginalInput(fireCallback){var color=get(),displayColor="",hasChanged=!tinycolor.equals(color,colorOnShow);if(color){displayColor=color.toString(currentPreferredFormat);addColorToSelectionPalette(color)}if(isInput){boundElement.val(displayColor)}if(fireCallback&&hasChanged){callbacks.change(color);boundElement.trigger("change",[color])}}function reflow(){if(!visible){return}dragWidth=dragger.width();dragHeight=dragger.height();dragHelperHeight=dragHelper.height();slideWidth=slider.width();slideHeight=slider.height();slideHelperHeight=slideHelper.height();alphaWidth=alphaSlider.width();alphaSlideHelperWidth=alphaSlideHelper.width();if(!flat){container.css("position","absolute");if(opts.offset){container.offset(opts.offset)}else{container.offset(getOffset(container,offsetElement))}}updateHelperLocations();if(opts.showPalette){drawPalette()}boundElement.trigger("reflow.spectrum")}function destroy(){boundElement.show();offsetElement.unbind("click.spectrum touchstart.spectrum");container.remove();replacer.remove();spectrums[spect.id]=null}function option(optionName,optionValue){if(optionName===undefined){return $.extend({},opts)}if(optionValue===undefined){return opts[optionName]}opts[optionName]=optionValue;if(optionName==="preferredFormat"){currentPreferredFormat=opts.preferredFormat}applyOptions()}function enable(){disabled=false;boundElement.attr("disabled",false);offsetElement.removeClass("sp-disabled")}function disable(){hide();disabled=true;boundElement.attr("disabled",true);offsetElement.addClass("sp-disabled")}function setOffset(coord){opts.offset=coord;reflow()}initialize();var spect={show:show,hide:hide,toggle:toggle,reflow:reflow,option:option,enable:enable,disable:disable,offset:setOffset,set:function(c){set(c);updateOriginalInput()},get:get,destroy:destroy,container:container};spect.id=spectrums.push(spect)-1;return spect}function getOffset(picker,input){var extraY=0;var dpWidth=picker.outerWidth();var dpHeight=picker.outerHeight();var inputHeight=input.outerHeight();var doc=picker[0].ownerDocument;var docElem=doc.documentElement;var viewWidth=docElem.clientWidth+$(doc).scrollLeft();var viewHeight=docElem.clientHeight+$(doc).scrollTop();var offset=input.offset();offset.top+=inputHeight;offset.left-=Math.min(offset.left,offset.left+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,offset.top+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight-extraY):extraY);return offset}function noop(){}function stopPropagation(e){e.stopPropagation()}function bind(func,obj){var slice=Array.prototype.slice;var args=slice.call(arguments,2);return function(){return func.apply(obj,args.concat(slice.call(arguments)))}}function draggable(element,onmove,onstart,onstop){onmove=onmove||function(){};onstart=onstart||function(){};onstop=onstop||function(){};var doc=document;var dragging=false;var offset={};var maxHeight=0;var maxWidth=0;var hasTouch="ontouchstart"in window;var duringDragEvents={};duringDragEvents["selectstart"]=prevent;duringDragEvents["dragstart"]=prevent;duringDragEvents["touchmove mousemove"]=move;duringDragEvents["touchend mouseup"]=stop;function prevent(e){if(e.stopPropagation){e.stopPropagation()}if(e.preventDefault){e.preventDefault()}e.returnValue=false}function move(e){if(dragging){if(IE&&doc.documentMode<9&&!e.button){return stop()}var t0=e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0];var pageX=t0&&t0.pageX||e.pageX;var pageY=t0&&t0.pageY||e.pageY;var dragX=Math.max(0,Math.min(pageX-offset.left,maxWidth));var dragY=Math.max(0,Math.min(pageY-offset.top,maxHeight));if(hasTouch){prevent(e)}onmove.apply(element,[dragX,dragY,e])}}function start(e){var rightclick=e.which?e.which==3:e.button==2;if(!rightclick&&!dragging){if(onstart.apply(element,arguments)!==false){dragging=true;maxHeight=$(element).height();maxWidth=$(element).width();offset=$(element).offset();$(doc).bind(duringDragEvents);$(doc.body).addClass("sp-dragging");move(e);prevent(e)}}}function stop(){if(dragging){$(doc).unbind(duringDragEvents);$(doc.body).removeClass("sp-dragging");setTimeout(function(){onstop.apply(element,arguments)},0)}dragging=false}$(element).bind("touchstart mousedown",start)}function throttle(func,wait,debounce){var timeout;return function(){var context=this,args=arguments;var throttler=function(){timeout=null;func.apply(context,args)};if(debounce)clearTimeout(timeout);if(debounce||!timeout)timeout=setTimeout(throttler,wait)}}function inputTypeColorSupport(){return $.fn.spectrum.inputTypeColorSupport()}var dataID="spectrum.id";$.fn.spectrum=function(opts,extra){if(typeof opts=="string"){var returnValue=this;var args=Array.prototype.slice.call(arguments,1);this.each(function(){var spect=spectrums[$(this).data(dataID)];if(spect){var method=spect[opts];if(!method){throw new Error("Spectrum: no such method: '"+opts+"'")}if(opts=="get"){returnValue=spect.get()}else if(opts=="container"){returnValue=spect.container}else if(opts=="option"){returnValue=spect.option.apply(spect,args)}else if(opts=="destroy"){spect.destroy();$(this).removeData(dataID)}else{method.apply(spect,args)}}});return returnValue}return this.spectrum("destroy").each(function(){var options=$.extend({},opts,$(this).data());var spect=spectrum(this,options);$(this).data(dataID,spect.id)})};$.fn.spectrum.load=true;$.fn.spectrum.loadOpts={};$.fn.spectrum.draggable=draggable;$.fn.spectrum.defaults=defaultOpts;$.fn.spectrum.inputTypeColorSupport=function inputTypeColorSupport(){if(typeof inputTypeColorSupport._cachedResult==="undefined"){var colorInput=$("<input type='color'/>")[0];inputTypeColorSupport._cachedResult=colorInput.type==="color"&&colorInput.value!==""}return inputTypeColorSupport._cachedResult};$.spectrum={};$.spectrum.localization={};$.spectrum.palettes={};$.fn.spectrum.processNativeColorInputs=function(){var colorInputs=$("input[type=color]");if(colorInputs.length&&!inputTypeColorSupport()){colorInputs.spectrum({preferredFormat:"hex6"})}};(function(){var trimLeft=/^[\s,#]+/,trimRight=/\s+$/,tinyCounter=0,math=Math,mathRound=math.round,mathMin=math.min,mathMax=math.max,mathRandom=math.random;var tinycolor=function(color,opts){color=color?color:"";opts=opts||{};if(color instanceof tinycolor){return color}if(!(this instanceof tinycolor)){return new tinycolor(color,opts)}var rgb=inputToRGB(color);this._originalInput=color,this._r=rgb.r,this._g=rgb.g,this._b=rgb.b,this._a=rgb.a,this._roundA=mathRound(100*this._a)/100,this._format=opts.format||rgb.format;this._gradientType=opts.gradientType;if(this._r<1){this._r=mathRound(this._r)}if(this._g<1){this._g=mathRound(this._g)}if(this._b<1){this._b=mathRound(this._b)}this._ok=rgb.ok;this._tc_id=tinyCounter++};tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var rgb=this.toRgb();return(rgb.r*299+rgb.g*587+rgb.b*114)/1e3},setAlpha:function(value){this._a=boundAlpha(value);this._roundA=mathRound(100*this._a)/100;return this},toHsv:function(){var hsv=rgbToHsv(this._r,this._g,this._b);return{h:hsv.h*360,s:hsv.s,v:hsv.v,a:this._a}},toHsvString:function(){var hsv=rgbToHsv(this._r,this._g,this._b);var h=mathRound(hsv.h*360),s=mathRound(hsv.s*100),v=mathRound(hsv.v*100);return this._a==1?"hsv("+h+", "+s+"%, "+v+"%)":"hsva("+h+", "+s+"%, "+v+"%, "+this._roundA+")"},toHsl:function(){var hsl=rgbToHsl(this._r,this._g,this._b);return{h:hsl.h*360,s:hsl.s,l:hsl.l,a:this._a}},toHslString:function(){var hsl=rgbToHsl(this._r,this._g,this._b);var h=mathRound(hsl.h*360),s=mathRound(hsl.s*100),l=mathRound(hsl.l*100);return this._a==1?"hsl("+h+", "+s+"%, "+l+"%)":"hsla("+h+", "+s+"%, "+l+"%, "+this._roundA+")"},toHex:function(allow3Char){return rgbToHex(this._r,this._g,this._b,allow3Char)},toHexString:function(allow3Char){return"#"+this.toHex(allow3Char)},toHex8:function(){return rgbaToHex(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:mathRound(this._r),g:mathRound(this._g),b:mathRound(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+mathRound(this._r)+", "+mathRound(this._g)+", "+mathRound(this._b)+")":"rgba("+mathRound(this._r)+", "+mathRound(this._g)+", "+mathRound(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:mathRound(bound01(this._r,255)*100)+"%",g:mathRound(bound01(this._g,255)*100)+"%",b:mathRound(bound01(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+mathRound(bound01(this._r,255)*100)+"%, "+mathRound(bound01(this._g,255)*100)+"%, "+mathRound(bound01(this._b,255)*100)+"%)":"rgba("+mathRound(bound01(this._r,255)*100)+"%, "+mathRound(bound01(this._g,255)*100)+"%, "+mathRound(bound01(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){if(this._a===0){return"transparent"}if(this._a<1){return false}return hexNames[rgbToHex(this._r,this._g,this._b,true)]||false},toFilter:function(secondColor){var hex8String="#"+rgbaToHex(this._r,this._g,this._b,this._a);var secondHex8String=hex8String;var gradientType=this._gradientType?"GradientType = 1, ":"";if(secondColor){var s=tinycolor(secondColor);secondHex8String=s.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"},toString:function(format){var formatSet=!!format;format=format||this._format;var formattedString=false;var hasAlpha=this._a<1&&this._a>=0;var needsAlphaFormat=!formatSet&&hasAlpha&&(format==="hex"||format==="hex6"||format==="hex3"||format==="name");if(needsAlphaFormat){if(format==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(format==="rgb"){formattedString=this.toRgbString()}if(format==="prgb"){formattedString=this.toPercentageRgbString()}if(format==="hex"||format==="hex6"){formattedString=this.toHexString()}if(format==="hex3"){formattedString=this.toHexString(true)}if(format==="hex8"){formattedString=this.toHex8String()}if(format==="name"){formattedString=this.toName()}if(format==="hsl"){formattedString=this.toHslString()}if(format==="hsv"){formattedString=this.toHsvString()}return formattedString||this.toHexString()},_applyModification:function(fn,args){var color=fn.apply(null,[this].concat([].slice.call(args)));this._r=color._r;this._g=color._g;this._b=color._b;this.setAlpha(color._a);return this},lighten:function(){return this._applyModification(lighten,arguments)},brighten:function(){return this._applyModification(brighten,arguments)},darken:function(){return this._applyModification(darken,arguments)},desaturate:function(){return this._applyModification(desaturate,arguments)},saturate:function(){return this._applyModification(saturate,arguments)},greyscale:function(){return this._applyModification(greyscale,arguments)},spin:function(){return this._applyModification(spin,arguments)},_applyCombination:function(fn,args){return fn.apply(null,[this].concat([].slice.call(args)))},analogous:function(){return this._applyCombination(analogous,arguments)},complement:function(){return this._applyCombination(complement,arguments)},monochromatic:function(){return this._applyCombination(monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(splitcomplement,arguments)},triad:function(){return this._applyCombination(triad,arguments)},tetrad:function(){return this._applyCombination(tetrad,arguments)}};tinycolor.fromRatio=function(color,opts){if(typeof color=="object"){var newColor={};for(var i in color){if(color.hasOwnProperty(i)){if(i==="a"){newColor[i]=color[i]}else{newColor[i]=convertToPercentage(color[i])}}}color=newColor}return tinycolor(color,opts)};function inputToRGB(color){var rgb={r:0,g:0,b:0};var a=1;var ok=false;var format=false;if(typeof color=="string"){color=stringInputToObject(color)}if(typeof color=="object"){if(color.hasOwnProperty("r")&&color.hasOwnProperty("g")&&color.hasOwnProperty("b")){rgb=rgbToRgb(color.r,color.g,color.b);ok=true;format=String(color.r).substr(-1)==="%"?"prgb":"rgb"}else if(color.hasOwnProperty("h")&&color.hasOwnProperty("s")&&color.hasOwnProperty("v")){color.s=convertToPercentage(color.s);color.v=convertToPercentage(color.v);rgb=hsvToRgb(color.h,color.s,color.v);ok=true;format="hsv"}else if(color.hasOwnProperty("h")&&color.hasOwnProperty("s")&&color.hasOwnProperty("l")){color.s=convertToPercentage(color.s);color.l=convertToPercentage(color.l);rgb=hslToRgb(color.h,color.s,color.l);ok=true;format="hsl"}if(color.hasOwnProperty("a")){a=color.a}}a=boundAlpha(a);return{ok:ok,format:color.format||format,r:mathMin(255,mathMax(rgb.r,0)),g:mathMin(255,mathMax(rgb.g,0)),b:mathMin(255,mathMax(rgb.b,0)),a:a}}function rgbToRgb(r,g,b){return{r:bound01(r,255)*255,g:bound01(g,255)*255,b:bound01(b,255)*255}}function rgbToHsl(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=mathMax(r,g,b),min=mathMin(r,g,b);var h,s,l=(max+min)/2;if(max==min){h=s=0}else{var d=max-min;s=l>.5?d/(2-max-min):d/(max+min);switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return{h:h,s:s,l:l}}function hslToRgb(h,s,l){var r,g,b;h=bound01(h,360);s=bound01(s,100);l=bound01(l,100);function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p}if(s===0){r=g=b=l}else{var q=l<.5?l*(1+s):l+s-l*s;var p=2*l-q;r=hue2rgb(p,q,h+1/3);g=hue2rgb(p,q,h);b=hue2rgb(p,q,h-1/3)}return{r:r*255,g:g*255,b:b*255}}function rgbToHsv(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var max=mathMax(r,g,b),min=mathMin(r,g,b);var h,s,v=max;var d=max-min;s=max===0?0:d/max;if(max==min){h=0}else{switch(max){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return{h:h,s:s,v:v}}function hsvToRgb(h,s,v){h=bound01(h,360)*6;s=bound01(s,100);v=bound01(v,100);var i=math.floor(h),f=h-i,p=v*(1-s),q=v*(1-f*s),t=v*(1-(1-f)*s),mod=i%6,r=[v,q,p,p,t,v][mod],g=[t,v,v,q,p,p][mod],b=[p,p,t,v,v,q][mod];return{r:r*255,g:g*255,b:b*255}}function rgbToHex(r,g,b,allow3Char){var hex=[pad2(mathRound(r).toString(16)),pad2(mathRound(g).toString(16)),pad2(mathRound(b).toString(16))];if(allow3Char&&hex[0].charAt(0)==hex[0].charAt(1)&&hex[1].charAt(0)==hex[1].charAt(1)&&hex[2].charAt(0)==hex[2].charAt(1)){return hex[0].charAt(0)+hex[1].charAt(0)+hex[2].charAt(0)}return hex.join("")}function rgbaToHex(r,g,b,a){var hex=[pad2(convertDecimalToHex(a)),pad2(mathRound(r).toString(16)),pad2(mathRound(g).toString(16)),pad2(mathRound(b).toString(16))];return hex.join("")}tinycolor.equals=function(color1,color2){if(!color1||!color2){return false}return tinycolor(color1).toRgbString()==tinycolor(color2).toRgbString()};tinycolor.random=function(){return tinycolor.fromRatio({r:mathRandom(),g:mathRandom(),
|
2 |
+
b:mathRandom()})};function desaturate(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.s-=amount/100;hsl.s=clamp01(hsl.s);return tinycolor(hsl)}function saturate(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.s+=amount/100;hsl.s=clamp01(hsl.s);return tinycolor(hsl)}function greyscale(color){return tinycolor(color).desaturate(100)}function lighten(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.l+=amount/100;hsl.l=clamp01(hsl.l);return tinycolor(hsl)}function brighten(color,amount){amount=amount===0?0:amount||10;var rgb=tinycolor(color).toRgb();rgb.r=mathMax(0,mathMin(255,rgb.r-mathRound(255*-(amount/100))));rgb.g=mathMax(0,mathMin(255,rgb.g-mathRound(255*-(amount/100))));rgb.b=mathMax(0,mathMin(255,rgb.b-mathRound(255*-(amount/100))));return tinycolor(rgb)}function darken(color,amount){amount=amount===0?0:amount||10;var hsl=tinycolor(color).toHsl();hsl.l-=amount/100;hsl.l=clamp01(hsl.l);return tinycolor(hsl)}function spin(color,amount){var hsl=tinycolor(color).toHsl();var hue=(mathRound(hsl.h)+amount)%360;hsl.h=hue<0?360+hue:hue;return tinycolor(hsl)}function complement(color){var hsl=tinycolor(color).toHsl();hsl.h=(hsl.h+180)%360;return tinycolor(hsl)}function triad(color){var hsl=tinycolor(color).toHsl();var h=hsl.h;return[tinycolor(color),tinycolor({h:(h+120)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+240)%360,s:hsl.s,l:hsl.l})]}function tetrad(color){var hsl=tinycolor(color).toHsl();var h=hsl.h;return[tinycolor(color),tinycolor({h:(h+90)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+180)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+270)%360,s:hsl.s,l:hsl.l})]}function splitcomplement(color){var hsl=tinycolor(color).toHsl();var h=hsl.h;return[tinycolor(color),tinycolor({h:(h+72)%360,s:hsl.s,l:hsl.l}),tinycolor({h:(h+216)%360,s:hsl.s,l:hsl.l})]}function analogous(color,results,slices){results=results||6;slices=slices||30;var hsl=tinycolor(color).toHsl();var part=360/slices;var ret=[tinycolor(color)];for(hsl.h=(hsl.h-(part*results>>1)+720)%360;--results;){hsl.h=(hsl.h+part)%360;ret.push(tinycolor(hsl))}return ret}function monochromatic(color,results){results=results||6;var hsv=tinycolor(color).toHsv();var h=hsv.h,s=hsv.s,v=hsv.v;var ret=[];var modification=1/results;while(results--){ret.push(tinycolor({h:h,s:s,v:v}));v=(v+modification)%1}return ret}tinycolor.mix=function(color1,color2,amount){amount=amount===0?0:amount||50;var rgb1=tinycolor(color1).toRgb();var rgb2=tinycolor(color2).toRgb();var p=amount/100;var w=p*2-1;var a=rgb2.a-rgb1.a;var w1;if(w*a==-1){w1=w}else{w1=(w+a)/(1+w*a)}w1=(w1+1)/2;var w2=1-w1;var rgba={r:rgb2.r*w1+rgb1.r*w2,g:rgb2.g*w1+rgb1.g*w2,b:rgb2.b*w1+rgb1.b*w2,a:rgb2.a*p+rgb1.a*(1-p)};return tinycolor(rgba)};tinycolor.readability=function(color1,color2){var c1=tinycolor(color1);var c2=tinycolor(color2);var rgb1=c1.toRgb();var rgb2=c2.toRgb();var brightnessA=c1.getBrightness();var brightnessB=c2.getBrightness();var colorDiff=Math.max(rgb1.r,rgb2.r)-Math.min(rgb1.r,rgb2.r)+Math.max(rgb1.g,rgb2.g)-Math.min(rgb1.g,rgb2.g)+Math.max(rgb1.b,rgb2.b)-Math.min(rgb1.b,rgb2.b);return{brightness:Math.abs(brightnessA-brightnessB),color:colorDiff}};tinycolor.isReadable=function(color1,color2){var readability=tinycolor.readability(color1,color2);return readability.brightness>125&&readability.color>500};tinycolor.mostReadable=function(baseColor,colorList){var bestColor=null;var bestScore=0;var bestIsReadable=false;for(var i=0;i<colorList.length;i++){var readability=tinycolor.readability(baseColor,colorList[i]);var readable=readability.brightness>125&&readability.color>500;var score=3*(readability.brightness/125)+readability.color/500;if(readable&&!bestIsReadable||readable&&bestIsReadable&&score>bestScore||!readable&&!bestIsReadable&&score>bestScore){bestIsReadable=readable;bestScore=score;bestColor=tinycolor(colorList[i])}}return bestColor};var names=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var hexNames=tinycolor.hexNames=flip(names);function flip(o){var flipped={};for(var i in o){if(o.hasOwnProperty(i)){flipped[o[i]]=i}}return flipped}function boundAlpha(a){a=parseFloat(a);if(isNaN(a)||a<0||a>1){a=1}return a}function bound01(n,max){if(isOnePointZero(n)){n="100%"}var processPercent=isPercentage(n);n=mathMin(max,mathMax(0,parseFloat(n)));if(processPercent){n=parseInt(n*max,10)/100}if(math.abs(n-max)<1e-6){return 1}return n%max/parseFloat(max)}function clamp01(val){return mathMin(1,mathMax(0,val))}function parseIntFromHex(val){return parseInt(val,16)}function isOnePointZero(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function isPercentage(n){return typeof n==="string"&&n.indexOf("%")!=-1}function pad2(c){return c.length==1?"0"+c:""+c}function convertToPercentage(n){if(n<=1){n=n*100+"%"}return n}function convertDecimalToHex(d){return Math.round(parseFloat(d)*255).toString(16)}function convertHexToDecimal(h){return parseIntFromHex(h)/255}var matchers=function(){var CSS_INTEGER="[-\\+]?\\d+%?";var CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?";var CSS_UNIT="(?:"+CSS_NUMBER+")|(?:"+CSS_INTEGER+")";var PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?";var PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?";return{rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function stringInputToObject(color){color=color.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var named=false;if(names[color]){color=names[color];named=true}else if(color=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var match;if(match=matchers.rgb.exec(color)){return{r:match[1],g:match[2],b:match[3]}}if(match=matchers.rgba.exec(color)){return{r:match[1],g:match[2],b:match[3],a:match[4]}}if(match=matchers.hsl.exec(color)){return{h:match[1],s:match[2],l:match[3]}}if(match=matchers.hsla.exec(color)){return{h:match[1],s:match[2],l:match[3],a:match[4]}}if(match=matchers.hsv.exec(color)){return{h:match[1],s:match[2],v:match[3]}}if(match=matchers.hsva.exec(color)){return{h:match[1],s:match[2],v:match[3],a:match[4]}}if(match=matchers.hex8.exec(color)){return{a:convertHexToDecimal(match[1]),r:parseIntFromHex(match[2]),g:parseIntFromHex(match[3]),b:parseIntFromHex(match[4]),format:named?"name":"hex8"}}if(match=matchers.hex6.exec(color)){return{r:parseIntFromHex(match[1]),g:parseIntFromHex(match[2]),b:parseIntFromHex(match[3]),format:named?"name":"hex"}}if(match=matchers.hex3.exec(color)){return{r:parseIntFromHex(match[1]+""+match[1]),g:parseIntFromHex(match[2]+""+match[2]),b:parseIntFromHex(match[3]+""+match[3]),format:named?"name":"hex"}}return false}window.tinycolor=tinycolor})();$(function(){if($.fn.spectrum.load){$.fn.spectrum.processNativeColorInputs()}})});
|
cht-icons.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Description: Chat with your website visitors via their favorite channels. Show a chat icon on the bottom of your site and communicate with your customers.
|
6 |
Author: Premio
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
-
Version: 2.4.
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
@@ -23,7 +23,7 @@ define('CHT_INC', CHT_DIR . '/includes');
|
|
23 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
24 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
25 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
26 |
-
define('CHT_VERSION', "2.4.
|
27 |
|
28 |
if (!function_exists('wp_doing_ajax')) {
|
29 |
function wp_doing_ajax()
|
5 |
Description: Chat with your website visitors via their favorite channels. Show a chat icon on the bottom of your site and communicate with your customers.
|
6 |
Author: Premio
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
+
Version: 2.4.4
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
23 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
24 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
25 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
26 |
+
define('CHT_VERSION', "2.4.4");
|
27 |
|
28 |
if (!function_exists('wp_doing_ajax')) {
|
29 |
function wp_doing_ajax()
|
frontend/class-frontend.php
CHANGED
@@ -96,6 +96,15 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
96 |
'is_desktop' => 'checked'
|
97 |
];
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
$social_opt['is_desktop'] = isset($social_opt['is_desktop']) ? $social_opt['is_desktop'] : '';
|
101 |
$social_opt['is_mobile'] = isset($social_opt['is_mobile']) ? $social_opt['is_mobile'] : '';
|
@@ -114,26 +123,19 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
114 |
<img src="<?php echo esc_url($image_url) ?>" />
|
115 |
</div>
|
116 |
<div class="icon icon-md active" data-label="<?php esc_attr_e($item['title']); ?>" data-title="<?php esc_attr_e($item['slug']); ?>">
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
</div>
|
123 |
<div class="channels__input-box">
|
124 |
-
<input type="text"
|
125 |
-
class="channels__input"
|
126 |
-
name="cht_social_<?php echo esc_attr($item['slug']); ?>[value]"
|
127 |
-
value="<?php esc_attr_e($social_opt['value']); ?>"
|
128 |
-
data-gramm_editor="false"
|
129 |
-
id="<?php echo esc_attr($item['slug']); ?>"
|
130 |
-
>
|
131 |
</div>
|
132 |
<div>
|
133 |
<?php
|
134 |
$channel_id = $this->del_space($item['slug']);
|
135 |
$channel_id = str_replace(' ', '_', $channel_id);
|
136 |
-
$channel_slug = strtolower($channel_id);
|
137 |
?>
|
138 |
<label class="channels__view" for="<?php echo esc_attr($channel_id); ?>Desktop">
|
139 |
<input type="checkbox" id="<?php echo esc_attr($channel_id); ?>Desktop" class="channels__view-check js-chanel-icon js-chanel-desktop" data-type="<?php echo esc_attr($item['title']); ?>"
|
@@ -171,15 +173,22 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
171 |
<div class="chaty-setting-col">
|
172 |
<label>Icon Appearance</label>
|
173 |
<div>
|
174 |
-
<input
|
175 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
</div>
|
177 |
</div>
|
178 |
<div class="clear clearfix"></div>
|
179 |
<div class="chaty-setting-col">
|
180 |
<label>On Hover Text</label>
|
181 |
<div>
|
182 |
-
<input
|
183 |
</div>
|
184 |
</div>
|
185 |
<div class="clear clearfix"></div>
|
@@ -188,7 +197,14 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
188 |
<div class="chaty-setting-col">
|
189 |
<label>Pre Set Message</label>
|
190 |
<div>
|
191 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
</div>
|
193 |
</div>
|
194 |
<?php } else if($item['slug'] == "Email") { ?>
|
@@ -196,7 +212,14 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
196 |
<div class="chaty-setting-col">
|
197 |
<label>Mail Subject</label>
|
198 |
<div>
|
199 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
</div>
|
201 |
</div>
|
202 |
<?php } else if($item['slug'] == "WeChat") { ?>
|
@@ -204,19 +227,22 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
204 |
<div class="chaty-setting-col">
|
205 |
<label>Upload QR Code</label>
|
206 |
<div>
|
207 |
-
<a class="cht-upload-image
|
208 |
<span class="dashicons dashicons-upload"></span>
|
209 |
</a>
|
|
|
210 |
</div>
|
211 |
</div>
|
212 |
-
<?php } else if($item['slug'] == "Link" || $item['slug'] == "Custom_Link") {
|
|
|
|
|
213 |
<div class="clear clearfix"></div>
|
214 |
<div class="chaty-setting-col">
|
215 |
<label >Open In a New Tab</label>
|
216 |
<div>
|
217 |
-
<input type="hidden" name="cht_social_<?php echo esc_attr($
|
218 |
-
<label class="channels__view" for="cht_social_window_<?php echo esc_attr($
|
219 |
-
<input id="cht_social_window_<?php echo esc_attr($
|
220 |
<span class="channels__view-txt"> </span>
|
221 |
</label>
|
222 |
</div>
|
@@ -230,21 +256,21 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
230 |
<label >LinkedIn</label>
|
231 |
<div>
|
232 |
<label>
|
233 |
-
<input type="radio" <?php checked($is_checked, "personal") ?> name="cht_social_<?php echo esc_attr($
|
234 |
Personal
|
235 |
</label>
|
236 |
<label>
|
237 |
-
<input type="radio" <?php checked($is_checked, "company") ?> name="cht_social_<?php echo esc_attr($
|
238 |
Company
|
239 |
</label>
|
240 |
</div>
|
241 |
</div>
|
242 |
<?php } ?>
|
243 |
-
|
244 |
-
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl())
|
245 |
-
<?php esc_attr_e('Upgrade to Pro', CHT_OPT)
|
246 |
</a>
|
247 |
-
</div
|
248 |
</div>
|
249 |
<button class="btn-cancel" data-social="<?php echo esc_attr($item['slug']); ?>">
|
250 |
<svg width="14" height="13" viewBox="0 0 14 13" fill="none"
|
@@ -281,6 +307,16 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
281 |
$desktop_target = "";
|
282 |
$mobile_target = "";
|
283 |
$mobile_url = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
$arr[strtolower($social['slug'])] = $value['value'];
|
285 |
if($social['slug'] == "Viber") {
|
286 |
$val = $value['value'];
|
@@ -341,6 +377,18 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
341 |
$mobile_target = "_blank";
|
342 |
}
|
343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
if(in_array(strtolower($social['slug']), array("facebook_messenger", "whatsapp"))) {
|
345 |
$mobile_target = "";
|
346 |
}
|
@@ -348,9 +396,25 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
348 |
$is_mobile = isset($value['is_mobile']) ? "is-in-mobile" : 0;
|
349 |
$is_desktop = isset($value['is_desktop']) ? "is-in-desktop" : 0;
|
350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
if(empty($mobile_url)) {
|
352 |
$mobile_url = $value['value'];
|
353 |
}
|
|
|
|
|
|
|
|
|
354 |
if(!empty($value['value'])) {
|
355 |
$data = array(
|
356 |
"value" => $value['value'],
|
@@ -358,7 +422,12 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
358 |
"is_desktop" => $is_desktop,
|
359 |
"desktop_target" => $desktop_target,
|
360 |
"mobile_target" => $mobile_target,
|
361 |
-
"mobile_url" => $mobile_url
|
|
|
|
|
|
|
|
|
|
|
362 |
);
|
363 |
$output[strtolower($social['slug'])] = $data;
|
364 |
}
|
96 |
'is_desktop' => 'checked'
|
97 |
];
|
98 |
}
|
99 |
+
if(!isset($social_opt['bg_color']) || empty($social_opt['bg_color'])) {
|
100 |
+
$social_opt['bg_color'] = $item['color']; // Initialize background color value if not exists. 2.1.0 change
|
101 |
+
}
|
102 |
+
if(!isset($social_opt['image_id'])) {
|
103 |
+
$social_opt['image_id'] = ''; // Initialize custom image id if not exists. 2.1.0 change
|
104 |
+
}
|
105 |
+
if(!isset($social_opt['title']) || $social_opt['title'] == "") {
|
106 |
+
$social_opt['title'] = $item['title']; // Initialize title if not exists. 2.1.0 change
|
107 |
+
}
|
108 |
|
109 |
$social_opt['is_desktop'] = isset($social_opt['is_desktop']) ? $social_opt['is_desktop'] : '';
|
110 |
$social_opt['is_mobile'] = isset($social_opt['is_mobile']) ? $social_opt['is_mobile'] : '';
|
123 |
<img src="<?php echo esc_url($image_url) ?>" />
|
124 |
</div>
|
125 |
<div class="icon icon-md active" data-label="<?php esc_attr_e($item['title']); ?>" data-title="<?php esc_attr_e($item['slug']); ?>">
|
126 |
+
<span class="default-chaty-icon custom-icon-<?php echo esc_attr($item['slug']) ?> default_image_<?php echo esc_attr($item['slug']) ?>" >
|
127 |
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
128 |
+
<?php echo $item['svg']; ?>
|
129 |
+
</svg>
|
130 |
+
</span>
|
131 |
</div>
|
132 |
<div class="channels__input-box">
|
133 |
+
<input type="text" class="channels__input" name="cht_social_<?php echo esc_attr($item['slug']); ?>[value]" value="<?php esc_attr_e($social_opt['value']); ?>" data-gramm_editor="false" id="<?php echo esc_attr($item['slug']); ?>" />
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
</div>
|
135 |
<div>
|
136 |
<?php
|
137 |
$channel_id = $this->del_space($item['slug']);
|
138 |
$channel_id = str_replace(' ', '_', $channel_id);
|
|
|
139 |
?>
|
140 |
<label class="channels__view" for="<?php echo esc_attr($channel_id); ?>Desktop">
|
141 |
<input type="checkbox" id="<?php echo esc_attr($channel_id); ?>Desktop" class="channels__view-check js-chanel-icon js-chanel-desktop" data-type="<?php echo esc_attr($item['title']); ?>"
|
173 |
<div class="chaty-setting-col">
|
174 |
<label>Icon Appearance</label>
|
175 |
<div>
|
176 |
+
<input type="text" name="cht_social_<?php echo esc_attr($item['slug']); ?>[bg_color]" class="chaty-color-field" value="<?php esc_attr_e($social_opt['bg_color']) ?>" />
|
177 |
+
<div class="pro-features">
|
178 |
+
<div class="pro-item">
|
179 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>" class="upload-chaty-icon"><span class="dashicons dashicons-upload"></span> Custom Image</a>
|
180 |
+
</div>
|
181 |
+
<div class="pro-button">
|
182 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
</div>
|
186 |
</div>
|
187 |
<div class="clear clearfix"></div>
|
188 |
<div class="chaty-setting-col">
|
189 |
<label>On Hover Text</label>
|
190 |
<div>
|
191 |
+
<input type="text" class="chaty-title" name="cht_social_<?php echo esc_attr($item['slug']); ?>[title]" value="<?php esc_attr_e($social_opt['title']) ?>">
|
192 |
</div>
|
193 |
</div>
|
194 |
<div class="clear clearfix"></div>
|
197 |
<div class="chaty-setting-col">
|
198 |
<label>Pre Set Message</label>
|
199 |
<div>
|
200 |
+
<div class="pro-features">
|
201 |
+
<div class="pro-item">
|
202 |
+
<input disabled id="cht_social_message_<?php echo esc_attr($item['slug']); ?>" type="text" name="" value="" >
|
203 |
+
</div>
|
204 |
+
<div class="pro-button">
|
205 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
</div>
|
209 |
</div>
|
210 |
<?php } else if($item['slug'] == "Email") { ?>
|
212 |
<div class="chaty-setting-col">
|
213 |
<label>Mail Subject</label>
|
214 |
<div>
|
215 |
+
<div class="pro-features">
|
216 |
+
<div class="pro-item">
|
217 |
+
<input disabled id="cht_social_message_<?php echo esc_attr($item['slug']); ?>" type="text" name="" value="" >
|
218 |
+
</div>
|
219 |
+
<div class="pro-button">
|
220 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
</div>
|
224 |
</div>
|
225 |
<?php } else if($item['slug'] == "WeChat") { ?>
|
227 |
<div class="chaty-setting-col">
|
228 |
<label>Upload QR Code</label>
|
229 |
<div>
|
230 |
+
<a class="cht-upload-image" id="upload_qr_code" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>" >
|
231 |
<span class="dashicons dashicons-upload"></span>
|
232 |
</a>
|
233 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
234 |
</div>
|
235 |
</div>
|
236 |
+
<?php } else if($item['slug'] == "Link" || $item['slug'] == "Custom_Link") {
|
237 |
+
$is_checked = (!isset($social_opt['new_window']) || $social_opt['new_window'] == 1)?1:0;
|
238 |
+
?>
|
239 |
<div class="clear clearfix"></div>
|
240 |
<div class="chaty-setting-col">
|
241 |
<label >Open In a New Tab</label>
|
242 |
<div>
|
243 |
+
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="0" >
|
244 |
+
<label class="channels__view" for="cht_social_window_<?php echo esc_attr($social['slug']); ?>">
|
245 |
+
<input id="cht_social_window_<?php echo esc_attr($social['slug']); ?>" type="checkbox" class="channels__view-check" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="1" <?php checked($is_checked, 1) ?> >
|
246 |
<span class="channels__view-txt"> </span>
|
247 |
</label>
|
248 |
</div>
|
256 |
<label >LinkedIn</label>
|
257 |
<div>
|
258 |
<label>
|
259 |
+
<input type="radio" <?php checked($is_checked, "personal") ?> name="cht_social_<?php echo esc_attr($social['slug']); ?>[link_type]" value="personal">
|
260 |
Personal
|
261 |
</label>
|
262 |
<label>
|
263 |
+
<input type="radio" <?php checked($is_checked, "company") ?> name="cht_social_<?php echo esc_attr($social['slug']); ?>[link_type]" value="company">
|
264 |
Company
|
265 |
</label>
|
266 |
</div>
|
267 |
</div>
|
268 |
<?php } ?>
|
269 |
+
<!--<div class="chaty-pro-feature">
|
270 |
+
<a target="_blank" href="<?php /*echo esc_url($this->getUpgradeMenuItemUrl());*/?>">
|
271 |
+
<?php /*esc_attr_e('Upgrade to Pro', CHT_OPT);*/?>
|
272 |
</a>
|
273 |
+
</div>-->
|
274 |
</div>
|
275 |
<button class="btn-cancel" data-social="<?php echo esc_attr($item['slug']); ?>">
|
276 |
<svg width="14" height="13" viewBox="0 0 14 13" fill="none"
|
307 |
$desktop_target = "";
|
308 |
$mobile_target = "";
|
309 |
$mobile_url = "";
|
310 |
+
$title = isset($value['title'])?$value['title']:$social['title'];
|
311 |
+
if(!isset($value['bg_color']) || empty($value['bg_color'])) {
|
312 |
+
$value['bg_color'] = $social['color']; // Initialize background color value if not exists. 2.1.0 change
|
313 |
+
}
|
314 |
+
if(!isset($value['image_id'])) {
|
315 |
+
$value['image_id'] = ''; // Initialize custom image id if not exists. 2.1.0 change
|
316 |
+
}
|
317 |
+
if(!isset($value['fa_icon'])) {
|
318 |
+
$value['fa_icon'] = ""; // Initialize title if not exists. 2.1.0 change
|
319 |
+
}
|
320 |
$arr[strtolower($social['slug'])] = $value['value'];
|
321 |
if($social['slug'] == "Viber") {
|
322 |
$val = $value['value'];
|
377 |
$mobile_target = "_blank";
|
378 |
}
|
379 |
|
380 |
+
if($slug == "link" || $slug == "custom_link") {
|
381 |
+
$is_exist = strpos($value['value'], "javascript");
|
382 |
+
if ($is_exist != "") {
|
383 |
+
$value['value'] = esc_url($value['value']);
|
384 |
+
} else {
|
385 |
+
if ($slug == "custom_link" || $slug == "link") {
|
386 |
+
$desktop_target = (isset($value['new_window']) && $value['new_window'] == 0) ? "" : "_blank";
|
387 |
+
$mobile_target = (isset($value['new_window']) && $value['new_window'] == 0) ? "" : "_blank";
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
if(in_array(strtolower($social['slug']), array("facebook_messenger", "whatsapp"))) {
|
393 |
$mobile_target = "";
|
394 |
}
|
396 |
$is_mobile = isset($value['is_mobile']) ? "is-in-mobile" : 0;
|
397 |
$is_desktop = isset($value['is_desktop']) ? "is-in-desktop" : 0;
|
398 |
|
399 |
+
if($slug == "linkedin") {
|
400 |
+
/* setting for Linkedin */
|
401 |
+
$link_type = !isset($value['link_type']) || $value['link_type'] == "company"?"company":"personal";
|
402 |
+
if($link_type == "personal") {
|
403 |
+
$value['value'] = "https://www.linkedin.com/in/".$value['value'];
|
404 |
+
} else {
|
405 |
+
$value['value'] = "https://www.linkedin.com/company/".$value['value'];
|
406 |
+
}
|
407 |
+
$desktop_target = "_blank";
|
408 |
+
$mobile_target = "_blank";
|
409 |
+
}
|
410 |
+
|
411 |
if(empty($mobile_url)) {
|
412 |
$mobile_url = $value['value'];
|
413 |
}
|
414 |
+
|
415 |
+
$icon = $social['svg'];
|
416 |
+
$icon = '<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">'.$icon.'</svg>';
|
417 |
+
|
418 |
if(!empty($value['value'])) {
|
419 |
$data = array(
|
420 |
"value" => $value['value'],
|
422 |
"is_desktop" => $is_desktop,
|
423 |
"desktop_target" => $desktop_target,
|
424 |
"mobile_target" => $mobile_target,
|
425 |
+
"mobile_url" => $mobile_url,
|
426 |
+
"title" => $title,
|
427 |
+
"icon" => $icon,
|
428 |
+
"color" => $value['bg_color'],
|
429 |
+
"slug" => strtolower($social['slug']),
|
430 |
+
"has_font" => 0
|
431 |
);
|
432 |
$output[strtolower($social['slug'])] = $data;
|
433 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
|
|
3 |
Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, messenger chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 2.4.
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons
|
@@ -65,15 +65,17 @@ Launch a Poptin popup
|
|
65 |
3. Add a custom Call-To-Action beside your widget.
|
66 |
4. Set a display trigger - decide when the widget will appear for the first time. You can show it after a few seconds, on page scroll, or use our powerful exit intent trigger. When you choose more than one trigger, the widget will appear when the first trigger takes place. The exit intent trigger will help you get your website's visitors' attention when they plan to leave your website.
|
67 |
5. Attention effect - choose from 5 stunning attention effects including bounce, waggle, sheen, spin, and fade. Your attention effect will help you capture the attention of your website visitors. Once the see your chat widget, your conversation rate will increase significantly.
|
68 |
-
6.
|
69 |
-
7.
|
70 |
-
8.
|
71 |
-
9.
|
72 |
-
10.
|
73 |
-
11.
|
74 |
-
12.
|
75 |
-
13.
|
76 |
-
14.
|
|
|
|
|
77 |
|
78 |
= What do you get in the Pro plan? =
|
79 |
Unlock the Pro features for only $25/year
|
@@ -86,11 +88,9 @@ You will get all the features of the free plan, plus:
|
|
86 |
6. Remove the "Get Chaty" link on the chat button
|
87 |
7. Show (or don't show) the chat widget using targeting rules such as specific pages, pages that contain a string, and pages that start or end with a string
|
88 |
Available days and hours - display the widget on specific days and hours based on your opening days and hours. E.g. You can show live chat channels like Facebook Messenger and WhatsApp on certain days & hours, and when you're not available for live chat you can display email and Instagram.
|
89 |
-
8.
|
90 |
-
9.
|
91 |
-
10.
|
92 |
-
11. Decide if you want the custom chat button open in a new tab or in the current tab.
|
93 |
-
12. Create more than one chat widget and show it on specific pages and categories of your website based on page targeting rules. Works great for multi-language websites and WPML plugin, for different products, landing pages, and any other URL targeting rule.
|
94 |
<br><a href="https://premio.io/downloads/chaty/?utm_source=wordpressorg" target="_blank" title="Chaty pro plans"><strong>Upgrade to pro</strong></a> to get all pro features :)
|
95 |
|
96 |
= How does each channel work? =
|
@@ -194,6 +194,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
197 |
= 2.4.3 =
|
198 |
Preview call-to-action bug and Instagram button bug
|
199 |
|
3 |
Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, messenger chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 2.4.4
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, Phone call, SMS and more with customizable chat & call buttons
|
65 |
3. Add a custom Call-To-Action beside your widget.
|
66 |
4. Set a display trigger - decide when the widget will appear for the first time. You can show it after a few seconds, on page scroll, or use our powerful exit intent trigger. When you choose more than one trigger, the widget will appear when the first trigger takes place. The exit intent trigger will help you get your website's visitors' attention when they plan to leave your website.
|
67 |
5. Attention effect - choose from 5 stunning attention effects including bounce, waggle, sheen, spin, and fade. Your attention effect will help you capture the attention of your website visitors. Once the see your chat widget, your conversation rate will increase significantly.
|
68 |
+
6. Fully customize all chat icons including colors, text on hover, and even upload your own custom image per channel button. You can also translate the "Hide" text to your language now :)
|
69 |
+
7. Choose between 7 different colors.
|
70 |
+
8. Change the size of the widget.
|
71 |
+
9. Choose between 4 beautiful chat button designs.
|
72 |
+
10. You decide if you want to show the widget on mobile & desktop or both!
|
73 |
+
11. Select your default state - you can show all your chat channels in an "open-state", or show the widget and let the visitors click on it or hover over it (you decide) to open the chat widget up and see all your chat icons.
|
74 |
+
12. Show different channels for mobile and desktop. E.g. On mobile you can display a call now button, Viber button, and a Telegram button, and on desktop, you can display a WhatsApp button and a Facebook Messenger chat button.
|
75 |
+
13. Change the channel icons order using drag and drop interface.
|
76 |
+
14. New feature: we've added 3 brand new buttons - Instagram, Twitter, LinkedIn, and an option to add 2 custom buttons.
|
77 |
+
15. Change the font of your chat widget's call-to-action message and the chat channels tooltips.
|
78 |
+
16. Decide if you want the custom chat button open in a new tab or in the current tab.
|
79 |
|
80 |
= What do you get in the Pro plan? =
|
81 |
Unlock the Pro features for only $25/year
|
88 |
6. Remove the "Get Chaty" link on the chat button
|
89 |
7. Show (or don't show) the chat widget using targeting rules such as specific pages, pages that contain a string, and pages that start or end with a string
|
90 |
Available days and hours - display the widget on specific days and hours based on your opening days and hours. E.g. You can show live chat channels like Facebook Messenger and WhatsApp on certain days & hours, and when you're not available for live chat you can display email and Instagram.
|
91 |
+
8. Create a pre-set WhatsApp chat message and pre-set email subject line. When people click on your WhatsApp button or email icon, you pre-set message will be automatically loaded
|
92 |
+
9. Fire a Google Analytics event every time one of your channels buttons is clicked. That's great news for you, because now you can fully track any click to call, chat, navigate, and more
|
93 |
+
10. Create more than one chat widget and show it on specific pages and categories of your website based on page targeting rules. Works great for multi-language websites and WPML plugin, for different products, landing pages, and any other URL targeting rule.
|
|
|
|
|
94 |
<br><a href="https://premio.io/downloads/chaty/?utm_source=wordpressorg" target="_blank" title="Chaty pro plans"><strong>Upgrade to pro</strong></a> to get all pro features :)
|
95 |
|
96 |
= How does each channel work? =
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
+
= 2.4.4 =
|
198 |
+
Viber mobile Android/iOS bug fixed
|
199 |
+
|
200 |
= 2.4.3 =
|
201 |
Preview call-to-action bug and Instagram button bug
|
202 |
|
views/admin.php
CHANGED
@@ -73,8 +73,9 @@ $pro_class = (!$is_pro && $cht_license_key !== "")?"none_pro":"";
|
|
73 |
|
74 |
<script>
|
75 |
jQuery(document).ready(function(){
|
|
|
76 |
jQuery("#cht-form").submit(function () {
|
77 |
-
|
78 |
phoneNumberReg = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/;
|
79 |
if (jQuery("#cht-form #Whatsapp").length && jQuery("#cht-form #Whatsapp").val() != "") {
|
80 |
InputVal = jQuery.trim(jQuery("#cht-form #Whatsapp").val());
|
@@ -127,21 +128,43 @@ $pro_class = (!$is_pro && $cht_license_key !== "")?"none_pro":"";
|
|
127 |
}
|
128 |
}
|
129 |
}
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
});
|
132 |
});
|
133 |
|
134 |
function check_for_number_chaty(phoneNumber, validationFor) {
|
135 |
-
if(phoneNumber != "") {
|
136 |
-
if(phoneNumber[0] == "+") {
|
137 |
-
phoneNumber = phoneNumber.substr(1,phoneNumber.length)
|
138 |
}
|
139 |
-
if(validationFor == "Phone") {
|
140 |
if (phoneNumber[0] == "*") {
|
141 |
phoneNumber = phoneNumber.substr(1, phoneNumber.length)
|
142 |
}
|
143 |
}
|
144 |
-
if(isNaN(phoneNumber)) {
|
145 |
return true;
|
146 |
}
|
147 |
}
|
73 |
|
74 |
<script>
|
75 |
jQuery(document).ready(function(){
|
76 |
+
var inputError = 0;
|
77 |
jQuery("#cht-form").submit(function () {
|
78 |
+
errorCount = 0;
|
79 |
phoneNumberReg = /^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/;
|
80 |
if (jQuery("#cht-form #Whatsapp").length && jQuery("#cht-form #Whatsapp").val() != "") {
|
81 |
InputVal = jQuery.trim(jQuery("#cht-form #Whatsapp").val());
|
128 |
}
|
129 |
}
|
130 |
}
|
131 |
+
|
132 |
+
inputError = 0;
|
133 |
+
if(jQuery("#channels-selected-list > li:not(#chaty-social-close").find(".channels__input").length) {
|
134 |
+
jQuery("#channels-selected-list > li:not(#chaty-social-close").find(".channels__input").each(function(){
|
135 |
+
if(jQuery.trim(jQuery(this).val()) == "") {
|
136 |
+
inputError++;
|
137 |
+
}
|
138 |
+
});
|
139 |
+
if(inputError == jQuery("#channels-selected-list > li:not(#chaty-social-close").find(".channels__input").length) {
|
140 |
+
if(confirm("You need to fill out at least one channel details for Chaty to show up on your website. Click cancel to keep editing.")) {
|
141 |
+
return true;
|
142 |
+
} else {
|
143 |
+
jQuery("#channels-selected-list > li:not(#chaty-social-close").find(".channels__input").each(function(){
|
144 |
+
if(jQuery.trim(jQuery(this).val()) == "") {
|
145 |
+
inputError = 1;
|
146 |
+
}
|
147 |
+
});
|
148 |
+
jQuery("#channels-selected-list > li:not(#chaty-social-close").find(".channels__input").addClass("border-red");
|
149 |
+
jQuery("#channels-selected-list > li:not(#chaty-social-close) .channels__input:first").focus();
|
150 |
+
return false;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
});
|
155 |
});
|
156 |
|
157 |
function check_for_number_chaty(phoneNumber, validationFor) {
|
158 |
+
if (phoneNumber != "") {
|
159 |
+
if (phoneNumber[0] == "+") {
|
160 |
+
phoneNumber = phoneNumber.substr(1, phoneNumber.length)
|
161 |
}
|
162 |
+
if (validationFor == "Phone") {
|
163 |
if (phoneNumber[0] == "*") {
|
164 |
phoneNumber = phoneNumber.substr(1, phoneNumber.length)
|
165 |
}
|
166 |
}
|
167 |
+
if (isNaN(phoneNumber)) {
|
168 |
return true;
|
169 |
}
|
170 |
}
|
views/parts/section1.php
CHANGED
@@ -232,6 +232,18 @@
|
|
232 |
}
|
233 |
$value['title'] = $social['title'];
|
234 |
$status = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
if($social['slug'] == "Whatsapp"){
|
236 |
$val = $value['value'];
|
237 |
$val = str_replace("+","", $val);
|
@@ -265,7 +277,7 @@
|
|
265 |
<div class="move-icon">
|
266 |
<img src="<?php echo esc_url($image_url) ?>" >
|
267 |
</div>
|
268 |
-
<div class="icon icon-md active" data-title="<?php echo esc_attr($social['title']); ?>">
|
269 |
<span class="default-chaty-icon custom-icon-<?php echo esc_attr($social['slug']) ?> default_image_<?php echo esc_attr($social['slug']) ?>" >
|
270 |
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
271 |
<?php echo $social['svg']; ?>
|
@@ -332,15 +344,22 @@
|
|
332 |
<div class="chaty-setting-col">
|
333 |
<label>Icon Appearance</label>
|
334 |
<div>
|
335 |
-
<input
|
336 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
</div>
|
338 |
</div>
|
339 |
<div class="clear clearfix"></div>
|
340 |
-
|
341 |
<label>On Hover Text</label>
|
342 |
<div>
|
343 |
-
<input
|
344 |
</div>
|
345 |
</div>
|
346 |
<div class="clear clearfix"></div>
|
@@ -351,7 +370,14 @@
|
|
351 |
<div class="chaty-setting-col">
|
352 |
<label>Pre Set Message</label>
|
353 |
<div>
|
354 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
</div>
|
356 |
</div>
|
357 |
<?php } else if($social['slug'] == "Email") { ?>
|
@@ -359,7 +385,14 @@
|
|
359 |
<div class="chaty-setting-col">
|
360 |
<label>Mail Subject</label>
|
361 |
<div>
|
362 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
</div>
|
364 |
</div>
|
365 |
<?php } else if($social['slug'] == "WeChat") { ?>
|
@@ -367,27 +400,29 @@
|
|
367 |
<div class="chaty-setting-col">
|
368 |
<label>Upload QR Code</label>
|
369 |
<div>
|
370 |
-
<a class="cht-upload-image
|
371 |
<span class="dashicons dashicons-upload"></span>
|
372 |
</a>
|
|
|
373 |
</div>
|
374 |
</div>
|
375 |
<?php } else if($social['slug'] == "Link" || $social['slug'] == "Custom_Link") {
|
376 |
-
$is_checked = 1;
|
377 |
?>
|
|
|
378 |
<div class="clear clearfix"></div>
|
379 |
<div class="chaty-setting-col">
|
380 |
<label >Open In a New Tab</label>
|
381 |
<div>
|
382 |
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="0" >
|
383 |
<label class="channels__view" for="cht_social_window_<?php echo esc_attr($social['slug']); ?>">
|
384 |
-
<input id="cht_social_window_<?php echo esc_attr($social['slug']); ?>" type="checkbox" class="channels__view-check" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="1" checked >
|
385 |
<span class="channels__view-txt"> </span>
|
386 |
</label>
|
387 |
</div>
|
388 |
</div>
|
389 |
<?php } else if($social['slug'] == "Linkedin") {
|
390 |
-
$is_checked = "personal";
|
391 |
?>
|
392 |
<!-- Advance setting for Custom Link -->
|
393 |
<div class="clear clearfix"></div>
|
@@ -405,11 +440,11 @@
|
|
405 |
</div>
|
406 |
</div>
|
407 |
<?php } ?>
|
408 |
-
|
409 |
-
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());
|
410 |
-
<?php esc_attr_e('Upgrade to Pro', CHT_OPT)
|
411 |
</a>
|
412 |
-
</div
|
413 |
</div>
|
414 |
<button class="btn-cancel" data-social="<?php echo esc_attr($social['slug']); ?>">
|
415 |
<svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
232 |
}
|
233 |
$value['title'] = $social['title'];
|
234 |
$status = 0;
|
235 |
+
if(!isset($value['bg_color']) || empty($value['bg_color'])) {
|
236 |
+
$value['bg_color'] = $social['color']; // Initialize background color value if not exists. 2.1.0 change
|
237 |
+
}
|
238 |
+
if(!isset($value['image_id'])) {
|
239 |
+
$value['image_id'] = ''; // Initialize custom image id if not exists. 2.1.0 change
|
240 |
+
}
|
241 |
+
if(!isset($value['title']) || $value['title'] == "") {
|
242 |
+
$value['title'] = $social['title']; // Initialize title if not exists. 2.1.0 change
|
243 |
+
}
|
244 |
+
if(!isset($value['fa_icon'])) {
|
245 |
+
$value['fa_icon'] = ""; // Initialize title if not exists. 2.1.0 change
|
246 |
+
}
|
247 |
if($social['slug'] == "Whatsapp"){
|
248 |
$val = $value['value'];
|
249 |
$val = str_replace("+","", $val);
|
277 |
<div class="move-icon">
|
278 |
<img src="<?php echo esc_url($image_url) ?>" >
|
279 |
</div>
|
280 |
+
<div class="icon icon-md active" data-label="<?php echo esc_attr($social['title']); ?>" data-title="<?php echo esc_attr($social['title']); ?>">
|
281 |
<span class="default-chaty-icon custom-icon-<?php echo esc_attr($social['slug']) ?> default_image_<?php echo esc_attr($social['slug']) ?>" >
|
282 |
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
283 |
<?php echo $social['svg']; ?>
|
344 |
<div class="chaty-setting-col">
|
345 |
<label>Icon Appearance</label>
|
346 |
<div>
|
347 |
+
<input type="text" name="cht_social_<?php echo esc_attr($social['slug']); ?>[bg_color]" class="chaty-color-field" value="<?php esc_attr_e($value['bg_color']) ?>" />
|
348 |
+
<div class="pro-features">
|
349 |
+
<div class="pro-item">
|
350 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>" class="upload-chaty-icon"><span class="dashicons dashicons-upload"></span> Custom Image</a>
|
351 |
+
</div>
|
352 |
+
<div class="pro-button">
|
353 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
354 |
+
</div>
|
355 |
+
</div>
|
356 |
</div>
|
357 |
</div>
|
358 |
<div class="clear clearfix"></div>
|
359 |
+
<div class="chaty-setting-col">
|
360 |
<label>On Hover Text</label>
|
361 |
<div>
|
362 |
+
<input type="text" class="chaty-title" name="cht_social_<?php echo esc_attr($social['slug']); ?>[title]" value="<?php esc_attr_e($value['title']) ?>">
|
363 |
</div>
|
364 |
</div>
|
365 |
<div class="clear clearfix"></div>
|
370 |
<div class="chaty-setting-col">
|
371 |
<label>Pre Set Message</label>
|
372 |
<div>
|
373 |
+
<div class="pro-features">
|
374 |
+
<div class="pro-item">
|
375 |
+
<input disabled id="cht_social_message_<?php echo esc_attr($social['slug']); ?>" type="text" name="" value="<?php esc_attr_e($pre_set_message) ?>" >
|
376 |
+
</div>
|
377 |
+
<div class="pro-button">
|
378 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
379 |
+
</div>
|
380 |
+
</div>
|
381 |
</div>
|
382 |
</div>
|
383 |
<?php } else if($social['slug'] == "Email") { ?>
|
385 |
<div class="chaty-setting-col">
|
386 |
<label>Mail Subject</label>
|
387 |
<div>
|
388 |
+
<div class="pro-features">
|
389 |
+
<div class="pro-item">
|
390 |
+
<input disabled id="cht_social_message_<?php echo esc_attr($social['slug']); ?>" type="text" name="" value="" >
|
391 |
+
</div>
|
392 |
+
<div class="pro-button">
|
393 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
394 |
+
</div>
|
395 |
+
</div>
|
396 |
</div>
|
397 |
</div>
|
398 |
<?php } else if($social['slug'] == "WeChat") { ?>
|
400 |
<div class="chaty-setting-col">
|
401 |
<label>Upload QR Code</label>
|
402 |
<div>
|
403 |
+
<a class="cht-upload-image" id="upload_qr_code" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>" >
|
404 |
<span class="dashicons dashicons-upload"></span>
|
405 |
</a>
|
406 |
+
<a target="_blank" href="<?php echo esc_url($this->getUpgradeMenuItemUrl());?>"><?php esc_attr_e('Upgrade to Pro', CHT_OPT);?></a>
|
407 |
</div>
|
408 |
</div>
|
409 |
<?php } else if($social['slug'] == "Link" || $social['slug'] == "Custom_Link") {
|
410 |
+
$is_checked = (!isset($value['new_window']) || $value['new_window'] == 1)?1:0;
|
411 |
?>
|
412 |
+
<!-- Advance setting for Custom Link -->
|
413 |
<div class="clear clearfix"></div>
|
414 |
<div class="chaty-setting-col">
|
415 |
<label >Open In a New Tab</label>
|
416 |
<div>
|
417 |
<input type="hidden" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="0" >
|
418 |
<label class="channels__view" for="cht_social_window_<?php echo esc_attr($social['slug']); ?>">
|
419 |
+
<input id="cht_social_window_<?php echo esc_attr($social['slug']); ?>" type="checkbox" class="channels__view-check" name="cht_social_<?php echo esc_attr($social['slug']); ?>[new_window]" value="1" <?php checked($is_checked, 1) ?> >
|
420 |
<span class="channels__view-txt"> </span>
|
421 |
</label>
|
422 |
</div>
|
423 |
</div>
|
424 |
<?php } else if($social['slug'] == "Linkedin") {
|
425 |
+
$is_checked = isset($value['link_type'])?$value['link_type']:"personal";
|
426 |
?>
|
427 |
<!-- Advance setting for Custom Link -->
|
428 |
<div class="clear clearfix"></div>
|
440 |
</div>
|
441 |
</div>
|
442 |
<?php } ?>
|
443 |
+
<!--<div class="chaty-pro-feature">
|
444 |
+
<a target="_blank" href="<?php /*echo esc_url($this->getUpgradeMenuItemUrl()); */?>">
|
445 |
+
<?php /*esc_attr_e('Upgrade to Pro', CHT_OPT);*/?>
|
446 |
</a>
|
447 |
+
</div>-->
|
448 |
</div>
|
449 |
<button class="btn-cancel" data-social="<?php echo esc_attr($social['slug']); ?>">
|
450 |
<svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
views/parts/section2.php
CHANGED
@@ -295,7 +295,7 @@
|
|
295 |
</i>
|
296 |
<span class="custom-control-label"></span>
|
297 |
</label>
|
298 |
-
<?php $widget_icon = get_option('widget_icon'
|
299 |
<?php $disabled = (!$this->is_pro())?"disabled":""; ?>
|
300 |
|
301 |
<label class="custom-control custom-radio">
|
295 |
</i>
|
296 |
<span class="custom-control-label"></span>
|
297 |
</label>
|
298 |
+
<?php $widget_icon = get_option('widget_icon'); ?>
|
299 |
<?php $disabled = (!$this->is_pro())?"disabled":""; ?>
|
300 |
|
301 |
<label class="custom-control custom-radio">
|
views/widget.php
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
<?php
|
2 |
-
$
|
3 |
$cht_active = get_option("cht_active");
|
4 |
-
$bg_color = $this->get_current_color()
|
5 |
-
|
6 |
-
|
7 |
-
?>
|
8 |
|
9 |
-
<?php
|
10 |
|
11 |
$current_count = get_option("chaty_total_channel_click");
|
12 |
if($current_count === false || empty($current_count)) {
|
@@ -48,14 +46,10 @@ $state = empty($state)?"click":$state;
|
|
48 |
$has_close_button = get_option("cht_close_button");
|
49 |
$has_close_button = empty($has_close_button)?"yes":$has_close_button;
|
50 |
|
51 |
-
if($state == "open") {
|
52 |
-
$cta = "";
|
53 |
-
}
|
54 |
-
|
55 |
$settings = array();
|
56 |
$settings['isPRO'] = 0;
|
57 |
$settings['position'] = get_option('cht_position');
|
58 |
-
$settings['social'] = $
|
59 |
$settings['pos_side'] = empty($positionSide) ? 'right' : $positionSide;
|
60 |
$settings['bot'] = ($cht_bottom_spacing) ? $cht_bottom_spacing : '25';
|
61 |
$settings['side'] = ($cht_side_spacing) ? $cht_side_spacing : '25';
|
@@ -81,7 +75,7 @@ $settings['display_state'] = $state;
|
|
81 |
$settings['has_close_button'] = $has_close_button;
|
82 |
$data = array();
|
83 |
$data['object_settings'] = $settings;
|
84 |
-
|
85 |
if($len > 0 && $len < 3) {
|
86 |
ob_start()
|
87 |
?>
|
@@ -94,9 +88,16 @@ if($len > 0 && $len < 3) {
|
|
94 |
.chaty-in-mobile .chaty-main-widget.is-in-mobile { display: block; }
|
95 |
.chaty-widget.hide-widget { display: none !important; }
|
96 |
.chaty-widget, .chaty-widget .get, .chaty-widget .get a { width: <?php echo esc_attr($cht_widget_size+8); ?>px }
|
|
|
97 |
<?php if(!empty($font_family)) { ?>
|
98 |
.chaty-widget { font-family: <?php echo esc_attr($font_family) ?>; }
|
99 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
body div.chaty-widget.hide-widget { display: none !important; }
|
101 |
</style>
|
102 |
<?php
|
@@ -105,7 +106,7 @@ if($len > 0 && $len < 3) {
|
|
105 |
wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family='.urlencode($font_family), false );
|
106 |
}
|
107 |
wp_enqueue_style( 'chaty-front-css', CHT_PLUGIN_URL."assets/css/animation.css", array(), CHT_VERSION);
|
108 |
-
wp_enqueue_script("chaty-front-end", CHT_PLUGIN_URL."assets/js/cht-front-script.js", array('jquery'), CHT_VERSION);
|
109 |
wp_localize_script('chaty-front-end', 'chaty_settings', $data);
|
110 |
?>
|
111 |
<?php
|
1 |
<?php
|
2 |
+
$social_channels = $this->int_arr();
|
3 |
$cht_active = get_option("cht_active");
|
4 |
+
$bg_color = $this->get_current_color();
|
5 |
+
$len = count($social_channels);
|
6 |
+
$cta = $this->getCallToAction();
|
|
|
7 |
|
|
|
8 |
|
9 |
$current_count = get_option("chaty_total_channel_click");
|
10 |
if($current_count === false || empty($current_count)) {
|
46 |
$has_close_button = get_option("cht_close_button");
|
47 |
$has_close_button = empty($has_close_button)?"yes":$has_close_button;
|
48 |
|
|
|
|
|
|
|
|
|
49 |
$settings = array();
|
50 |
$settings['isPRO'] = 0;
|
51 |
$settings['position'] = get_option('cht_position');
|
52 |
+
$settings['social'] = $social_channels;
|
53 |
$settings['pos_side'] = empty($positionSide) ? 'right' : $positionSide;
|
54 |
$settings['bot'] = ($cht_bottom_spacing) ? $cht_bottom_spacing : '25';
|
55 |
$settings['side'] = ($cht_side_spacing) ? $cht_side_spacing : '25';
|
75 |
$settings['has_close_button'] = $has_close_button;
|
76 |
$data = array();
|
77 |
$data['object_settings'] = $settings;
|
78 |
+
//echo "<pre>"; print_r($settings['social']); die;
|
79 |
if($len > 0 && $len < 3) {
|
80 |
ob_start()
|
81 |
?>
|
88 |
.chaty-in-mobile .chaty-main-widget.is-in-mobile { display: block; }
|
89 |
.chaty-widget.hide-widget { display: none !important; }
|
90 |
.chaty-widget, .chaty-widget .get, .chaty-widget .get a { width: <?php echo esc_attr($cht_widget_size+8); ?>px }
|
91 |
+
.facustom-icon { width: <?php echo esc_attr($cht_widget_size); ?>px; line-height: <?php echo esc_attr($cht_widget_size); ?>px; height: <?php echo esc_attr($cht_widget_size); ?>px; font-size: <?php echo esc_attr(intval($cht_widget_size/2)); ?>px; }
|
92 |
<?php if(!empty($font_family)) { ?>
|
93 |
.chaty-widget { font-family: <?php echo esc_attr($font_family) ?>; }
|
94 |
<?php } ?>
|
95 |
+
<?php foreach($settings['social'] as $social) {
|
96 |
+
if(!empty($social['color']) && $social['color'] != "#ffffff") {?>
|
97 |
+
.facustom-icon.chaty-btn-<?php echo esc_attr($social['slug']) ?> {background-color: <?php echo esc_attr($social['color']) ?>}
|
98 |
+
.chaty-<?php echo esc_attr($social['slug']) ?> .color-element {fill: <?php echo esc_attr($social['color']) ?>}
|
99 |
+
<?php }
|
100 |
+
} ?>
|
101 |
body div.chaty-widget.hide-widget { display: none !important; }
|
102 |
</style>
|
103 |
<?php
|
106 |
wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family='.urlencode($font_family), false );
|
107 |
}
|
108 |
wp_enqueue_style( 'chaty-front-css', CHT_PLUGIN_URL."assets/css/animation.css", array(), CHT_VERSION);
|
109 |
+
wp_enqueue_script("chaty-front-end", CHT_PLUGIN_URL."assets/js/cht-front-script.js", array('jquery'), CHT_VERSION, '1.0', true);
|
110 |
wp_localize_script('chaty-front-end', 'chaty_settings', $data);
|
111 |
?>
|
112 |
<?php
|