Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty - Version 2.0.2

Version Description

  • Fixed overlapping preview window and page targeting bug
Download this release

Release Info

Developer galdub
Plugin Icon wp plugin Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

admin/class-admin-base.php CHANGED
@@ -262,18 +262,18 @@ class CHT_Admin_Base
262
  'subset' => 'latin,latin-ext'
263
  );
264
  wp_enqueue_style( 'google_fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null );
265
- wp_enqueue_style( $this->plugin_slug, plugins_url('../assets/css/cht-style.css', __FILE__));
266
  }
267
 
268
  public function enqueue_scripts()
269
  {
270
 
271
  wp_enqueue_script( $this->plugin_slug . '-jq-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js');
272
- wp_enqueue_script( $this->plugin_slug .'fileinput', plugins_url('../assets/js/fileinput.min.js', __FILE__), array( 'jquery' ));
273
- wp_enqueue_script( $this->plugin_slug .'pop', plugins_url('../assets/js/popper.min.js', __FILE__), array( 'jquery' ));
274
- 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'));
275
- // wp_enqueue_script( $this->plugin_slug, plugins_url('../assets/js/cht-scripts.js', __FILE__), array( 'jquery' ));
276
- wp_enqueue_script( $this->plugin_slug.'stick', plugins_url('../assets/js/jquery.sticky.js', __FILE__), array( 'jquery' ));
277
  wp_localize_script($this->plugin_slug.'stick', 'cht_nonce_ajax',
278
  array(
279
  'cht_nonce' => wp_create_nonce('cht_nonce_ajax')
262
  'subset' => 'latin,latin-ext'
263
  );
264
  wp_enqueue_style( 'google_fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null );
265
+ wp_enqueue_style( $this->plugin_slug, plugins_url('../assets/css/cht-style.css', __FILE__), array(), CHT_VERSION);
266
  }
267
 
268
  public function enqueue_scripts()
269
  {
270
 
271
  wp_enqueue_script( $this->plugin_slug . '-jq-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js');
272
+ wp_enqueue_script( $this->plugin_slug .'fileinput', plugins_url('../assets/js/fileinput.min.js', __FILE__), array( 'jquery' ), CHT_VERSION);
273
+ wp_enqueue_script( $this->plugin_slug .'pop', plugins_url('../assets/js/popper.min.js', __FILE__), array( 'jquery' ), CHT_VERSION);
274
+ 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);
275
+ // wp_enqueue_script( $this->plugin_slug, plugins_url('../assets/js/cht-scripts.js', __FILE__), array( 'jquery' ), CHT_VERSION);
276
+ wp_enqueue_script( $this->plugin_slug.'stick', plugins_url('../assets/js/jquery.sticky.js', __FILE__), array( 'jquery' ), CHT_VERSION);
277
  wp_localize_script($this->plugin_slug.'stick', 'cht_nonce_ajax',
278
  array(
279
  'cht_nonce' => wp_create_nonce('cht_nonce_ajax')
assets/css/cht-style.css CHANGED
@@ -3406,4 +3406,19 @@ span.chaty-url {
3406
  }
3407
  .chaty-option-box .page-options:hover .chaty-pro-feature {
3408
  display: block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3409
  }
3406
  }
3407
  .chaty-option-box .page-options:hover .chaty-pro-feature {
3408
  display: block;
3409
+ }
3410
+ .preview {
3411
+ position: fixed;
3412
+ top: 190px;
3413
+ width: 337px;
3414
+ height: 290px;
3415
+ bottom: auto;
3416
+ }
3417
+ .preview-section-chaty {
3418
+ position: static;
3419
+ width: 352px;
3420
+ height: 320px;
3421
+ display: block;
3422
+ vertical-align: baseline;
3423
+ float: right;
3424
  }
assets/js/cht-scripts.min.js CHANGED
@@ -99,7 +99,7 @@
99
  }
100
  }), e(document).on("submit", "form", function (e) {
101
  window.onbeforeunload = null
102
- }), e(".preview").stick_in_parent({offset_top: 200}), e(".upg").click(function (t) {
103
  e(".valid_domain_input").val(e(".valid_domain_input").val().replace(" ", "")), /^(http(s)?:\/\/)?(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(e(".valid_domain_input").val()) || (t.preventDefault(), e(".valid_domain").fadeIn().css({display: "block"}))
104
  }), e(".del_token").click(function (t) {
105
  e.ajax({
@@ -368,4 +368,21 @@ function set_social_channel_order() {
368
  socialString = socialString.join(",");
369
  jQuery("#cht_numb_slug").val(socialString);
370
  //check_for_chaty_close_button();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  }
99
  }
100
  }), e(document).on("submit", "form", function (e) {
101
  window.onbeforeunload = null
102
+ }), /*e(".preview").stick_in_parent({offset_top: 200}),*/ e(".upg").click(function (t) {
103
  e(".valid_domain_input").val(e(".valid_domain_input").val().replace(" ", "")), /^(http(s)?:\/\/)?(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(e(".valid_domain_input").val()) || (t.preventDefault(), e(".valid_domain").fadeIn().css({display: "block"}))
104
  }), e(".del_token").click(function (t) {
105
  e.ajax({
368
  socialString = socialString.join(",");
369
  jQuery("#cht_numb_slug").val(socialString);
370
  //check_for_chaty_close_button();
371
+ }
372
+ jQuery(window).scroll(function(){
373
+ check_for_preview_pos();
374
+ });
375
+ jQuery(document).ready(function(){
376
+ check_for_preview_pos();
377
+ });
378
+ function check_for_preview_pos() {
379
+ if(jQuery("#custom-rules").length && jQuery("#admin-preview").length) {
380
+ topPos = jQuery("#custom-rules").offset().top - jQuery(window).scrollTop() - 485;
381
+ if (topPos < 0) {
382
+ topPos = Math.abs(topPos);
383
+ jQuery("#admin-preview").css("margin-top", ((-1)*topPos)+"px");
384
+ } else {
385
+ jQuery("#admin-preview").css("margin-top", "0");
386
+ }
387
+ }
388
  }
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.0.1
9
  License: GPL2
10
  */
11
 
@@ -22,6 +22,7 @@ define('CHT_INC', CHT_DIR . '/includes');
22
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
23
  define('CHT_PLUGIN_URL', plugins_url() . "/chaty/");
24
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
 
25
 
26
  if (!function_exists('wp_doing_ajax')) {
27
  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.0.2
9
  License: GPL2
10
  */
11
 
22
  define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
23
  define('CHT_PLUGIN_URL', plugins_url() . "/chaty/");
24
  define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
25
+ define('CHT_VERSION', "2.0.2");
26
 
27
  if (!function_exists('wp_doing_ajax')) {
28
  function wp_doing_ajax()
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
4
  Requires at least: 3.1
5
  Tested up to: 5.1
6
- Stable tag: 2.0.1
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  FREE customizable live chat and call buttons. Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, SMS and more.
@@ -132,6 +132,9 @@ Just follow our <a href="https://premio.io/wordpress-premio-pro-version-installa
132
 
133
  == Changelog ==
134
 
 
 
 
135
  = 2.0.1 =
136
  * Change channels order using drag and drop interface
137
 
3
  Tags: whatsapp, facebook messenger, click to chat, chat, chat button, call now button
4
  Requires at least: 3.1
5
  Tested up to: 5.1
6
+ Stable tag: 2.0.2
7
  Plugin URI: https://premio.io/downloads/chaty/
8
 
9
  FREE customizable live chat and call buttons. Let your visitors contact you via Facebook Messenger, Whatsapp, Telegram, Viber, Email, SMS and more.
132
 
133
  == Changelog ==
134
 
135
+ = 2.0.2 =
136
+ * Fixed overlapping preview window and page targeting bug
137
+
138
  = 2.0.1 =
139
  * Change channels order using drag and drop interface
140
 
views/parts/section1.php CHANGED
@@ -1,4 +1,5 @@
1
- <div class="preview">
 
2
  <h2><?php _e('Preview', CHT_OPT); ?>:</h2>
3
 
4
  <div class="page">
@@ -190,6 +191,7 @@
190
  </label>
191
  </div>
192
  </div>
 
193
  <section class="section one" <?php echo ($this->is_pro()) ? 'id="pro"' : ''; ?> xmlns="http://www.w3.org/1999/html">
194
 
195
  <h1 class="section-title">
1
+ <div class="preview-section-chaty">
2
+ <div class="preview" id="admin-preview">
3
  <h2><?php _e('Preview', CHT_OPT); ?>:</h2>
4
 
5
  <div class="page">
191
  </label>
192
  </div>
193
  </div>
194
+ </div>
195
  <section class="section one" <?php echo ($this->is_pro()) ? 'id="pro"' : ''; ?> xmlns="http://www.w3.org/1999/html">
196
 
197
  <h1 class="section-title">