diff --git a/smartsupp/classes/index.php b/smartsupp/classes/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/classes/index.php +++ b/smartsupp/classes/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/controllers/admin/AdminSmartsuppAjax.php b/smartsupp/controllers/admin/AdminSmartsuppAjax.php index ca5444c..91f5973 100644 --- a/smartsupp/controllers/admin/AdminSmartsuppAjax.php +++ b/smartsupp/controllers/admin/AdminSmartsuppAjax.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Text Domain: smartsupp * Author: Smartsupp * Author URI: http://www.smartsupp.com diff --git a/smartsupp/controllers/admin/index.php b/smartsupp/controllers/admin/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/controllers/admin/index.php +++ b/smartsupp/controllers/admin/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/controllers/index.php b/smartsupp/controllers/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/controllers/index.php +++ b/smartsupp/controllers/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/index.php b/smartsupp/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/index.php +++ b/smartsupp/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/smartsupp.php b/smartsupp/smartsupp.php index 9dffd83..21daed3 100644 --- a/smartsupp/smartsupp.php +++ b/smartsupp/smartsupp.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp @@ -34,7 +34,7 @@ public function __construct() { $this->name = 'smartsupp'; $this->tab = 'advertising_marketing'; - $this->version = '2.1.6'; + $this->version = '2.1.7'; $this->author = 'Smartsupp'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); diff --git a/smartsupp/translations/index.php b/smartsupp/translations/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/translations/index.php +++ b/smartsupp/translations/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/css/index.php b/smartsupp/views/css/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/views/css/index.php +++ b/smartsupp/views/css/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/css/smartsupp.css b/smartsupp/views/css/smartsupp.css index e9a7051..ad2eea1 100644 --- a/smartsupp/views/css/smartsupp.css +++ b/smartsupp/views/css/smartsupp.css @@ -10,7 +10,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/img/index.php b/smartsupp/views/img/index.php index 4f012c8..9b4a452 100644 --- a/smartsupp/views/img/index.php +++ b/smartsupp/views/img/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/index.php b/smartsupp/views/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/views/index.php +++ b/smartsupp/views/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/js/index.php b/smartsupp/views/js/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/views/js/index.php +++ b/smartsupp/views/js/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/js/smartsupp.js b/smartsupp/views/js/smartsupp.js index 15697ac..4f62bb2 100644 --- a/smartsupp/views/js/smartsupp.js +++ b/smartsupp/views/js/smartsupp.js @@ -1,143 +1,143 @@ -/* - * Smartsupp Live Chat integration module. - * - * @package Smartsupp - * @author Smartsupp - * @link http://www.smartsupp.com - * @copyright 2016 Smartsupp.com - * @license GPL-2.0+ - * - * Plugin Name: Smartsupp Live Chat - * Plugin URI: http://www.smartsupp.com - * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 - * Author: Smartsupp - * Author URI: http://www.smartsupp.com - * Text Domain: smartsupp - * License: GPL-2.0+ - * License URI: http://www.gnu.org/licenses/gpl-2.0.txt -*/ - -jQuery(document).ready( function($) { - - function page_refresh() { - var control = $( "#SMARTSUPP_OPTIONAL_API" ).next(); - var text = control.html(); - control.css('font-style', 'normal'); - control.html(text.replace('#', 'Smartsupp API')); - - if ($( "#smartsupp_key" ).val() === "") { - $( "#smartsupp_create_account" ).hide(); - $( "#smartsupp_connect_account" ).hide(); - $( "#smartsupp_configuration" ).hide(); - $( "#configuration_form.smartsupp" ).hide(); - $( "#smartsupp_landing_page" ).show(); - } - else { - $( "#smartsupp_landing_page" ).hide(); - $( "#smartsupp_create_account" ).hide(); - $( "#smartsupp_connect_account" ).hide(); - $( "#smartsupp_configuration" ).show(); - $( "#configuration_form.smartsupp" ).show(); - } - } - page_refresh(); - $( "#configuration_form.smartsupp #SMARTSUPP_OPTIONAL_API" ).height("117px"); - - $( "#connect_existing_account_btn1, #connect_existing_account_btn2" ).click(function() { - $("#smartsupp_configuration").next('.bootstrap').hide(); - $("div.smartsupp_landing_page").hide(); - $( "#smartsupp_landing_page" ).hide(); - $( "#smartsupp_create_account" ).hide(); - $( "#smartsupp_connect_account" ).show(); - }); - - $( "#create_account_btn1, #create_account_btn2" ).click(function() { - $("#smartsupp_configuration").next('.bootstrap').hide(); - $("div.smartsupp_landing_page").hide(); - $( "#smartsupp_landing_page" ).hide(); - $( "#smartsupp_connect_account" ).hide(); - $( "#smartsupp_create_account" ).show(); - }); - - $( "#connect_existing_account_do" ).click(function() { - $.ajax({ - url: ajax_controller_url, - async: false, - type: 'POST', - data: { - action: 'login', - email: $( "#smartsupp_connect_account #SMARTSUPP_EMAIL" ).val(), - password: $( "#smartsupp_connect_account #SMARTSUPP_PASSWORD" ).val() - }, - dataType: 'json', - headers: { "cache-control": "no-cache" }, - success: function(data) { - $("input#smartsupp_key").val(data.key); - $("#smartsupp_configuration p.email").html(data.email); - if (data.error === null) { - $("div.smartsupp_landing_page").hide(); - } - else { - $("div.smartsupp_landing_page").show(); - $("div.smartsupp_landing_page span").html(data.message); - } - } - }); - page_refresh(); - }); - - $( "#create_account_do" ).click(function() { - $( "#smartsupp_create_account #SMARTSUPP_DPA_LABEL" ).removeClass("invalid"); - if ($( "#smartsupp_create_account #SMARTSUPP_DPA" ).is(':checked')) { - $.ajax({ - url: ajax_controller_url, - async: false, - type: 'POST', - data: { - action: 'create', - email: $( "#smartsupp_create_account #SMARTSUPP_EMAIL" ).val(), - password: $( "#smartsupp_create_account #SMARTSUPP_PASSWORD" ).val(), - }, - dataType: 'json', - headers: { "cache-control": "no-cache" }, - success: function(data) { - $("input#smartsupp_key").val(data.key); - $("#smartsupp_configuration p.email").html(data.email); - if (data.error === null) { - $("div.smartsupp_landing_page").hide(); - } - else { - $("div.smartsupp_landing_page").show(); - $("div.smartsupp_landing_page span").html(data.message); - } - } - }); - page_refresh(); - } - else { - $( "#smartsupp_create_account #SMARTSUPP_DPA" ).focus(); - $( "#smartsupp_create_account #SMARTSUPP_DPA_LABEL" ).addClass("invalid"); - } - }); - - $( "#deactivate_chat_do" ).click(function() { - $("#smartsupp_configuration").next('.bootstrap').hide(); - $.ajax({ - url: ajax_controller_url, - async: false, - type: 'POST', - data: { - action: 'deactivate' - }, - dataType: 'json', - headers: { "cache-control": "no-cache" }, - success: function(data) { - $("input#smartsupp_key").val(data.key); - $("#smartsupp_configuration p.email").html(data.email); - } - }); - page_refresh(); - }); - +/* + * Smartsupp Live Chat integration module. + * + * @package Smartsupp + * @author Smartsupp + * @link http://www.smartsupp.com + * @copyright 2016 Smartsupp.com + * @license GPL-2.0+ + * + * Plugin Name: Smartsupp Live Chat + * Plugin URI: http://www.smartsupp.com + * Description: Adds Smartsupp Live Chat code to PrestaShop. + * Version: 2.1.7 + * Author: Smartsupp + * Author URI: http://www.smartsupp.com + * Text Domain: smartsupp + * License: GPL-2.0+ + * License URI: http://www.gnu.org/licenses/gpl-2.0.txt +*/ + +jQuery(document).ready( function($) { + + function page_refresh() { + var control = $( "#SMARTSUPP_OPTIONAL_API" ).next(); + var text = control.html(); + control.css('font-style', 'normal'); + control.html(text.replace('#', 'Smartsupp API')); + + if ($( "#smartsupp_key" ).val() === "") { + $( "#smartsupp_create_account" ).hide(); + $( "#smartsupp_connect_account" ).hide(); + $( "#smartsupp_configuration" ).hide(); + $( "#configuration_form.smartsupp" ).hide(); + $( "#smartsupp_landing_page" ).show(); + } + else { + $( "#smartsupp_landing_page" ).hide(); + $( "#smartsupp_create_account" ).hide(); + $( "#smartsupp_connect_account" ).hide(); + $( "#smartsupp_configuration" ).show(); + $( "#configuration_form.smartsupp" ).show(); + } + } + page_refresh(); + $( "#configuration_form.smartsupp #SMARTSUPP_OPTIONAL_API" ).height("117px"); + + $( "#connect_existing_account_btn1, #connect_existing_account_btn2" ).click(function() { + $("#smartsupp_configuration").next('.bootstrap').hide(); + $("div.smartsupp_landing_page").hide(); + $( "#smartsupp_landing_page" ).hide(); + $( "#smartsupp_create_account" ).hide(); + $( "#smartsupp_connect_account" ).show(); + }); + + $( "#create_account_btn1, #create_account_btn2" ).click(function() { + $("#smartsupp_configuration").next('.bootstrap').hide(); + $("div.smartsupp_landing_page").hide(); + $( "#smartsupp_landing_page" ).hide(); + $( "#smartsupp_connect_account" ).hide(); + $( "#smartsupp_create_account" ).show(); + }); + + $( "#connect_existing_account_do" ).click(function() { + $.ajax({ + url: ajax_controller_url, + async: false, + type: 'POST', + data: { + action: 'login', + email: $( "#smartsupp_connect_account #SMARTSUPP_EMAIL" ).val(), + password: $( "#smartsupp_connect_account #SMARTSUPP_PASSWORD" ).val() + }, + dataType: 'json', + headers: { "cache-control": "no-cache" }, + success: function(data) { + $("input#smartsupp_key").val(data.key); + $("#smartsupp_configuration p.email").html(data.email); + if (data.error === null) { + $("div.smartsupp_landing_page").hide(); + } + else { + $("div.smartsupp_landing_page").show(); + $("div.smartsupp_landing_page span").html(data.message); + } + } + }); + page_refresh(); + }); + + $( "#create_account_do" ).click(function() { + $( "#smartsupp_create_account #SMARTSUPP_DPA_LABEL" ).removeClass("invalid"); + if ($( "#smartsupp_create_account #SMARTSUPP_DPA" ).is(':checked')) { + $.ajax({ + url: ajax_controller_url, + async: false, + type: 'POST', + data: { + action: 'create', + email: $( "#smartsupp_create_account #SMARTSUPP_EMAIL" ).val(), + password: $( "#smartsupp_create_account #SMARTSUPP_PASSWORD" ).val(), + }, + dataType: 'json', + headers: { "cache-control": "no-cache" }, + success: function(data) { + $("input#smartsupp_key").val(data.key); + $("#smartsupp_configuration p.email").html(data.email); + if (data.error === null) { + $("div.smartsupp_landing_page").hide(); + } + else { + $("div.smartsupp_landing_page").show(); + $("div.smartsupp_landing_page span").html(data.message); + } + } + }); + page_refresh(); + } + else { + $( "#smartsupp_create_account #SMARTSUPP_DPA" ).focus(); + $( "#smartsupp_create_account #SMARTSUPP_DPA_LABEL" ).addClass("invalid"); + } + }); + + $( "#deactivate_chat_do" ).click(function() { + $("#smartsupp_configuration").next('.bootstrap').hide(); + $.ajax({ + url: ajax_controller_url, + async: false, + type: 'POST', + data: { + action: 'deactivate' + }, + dataType: 'json', + headers: { "cache-control": "no-cache" }, + success: function(data) { + $("input#smartsupp_key").val(data.key); + $("#smartsupp_configuration p.email").html(data.email); + } + }); + page_refresh(); + }); + }); \ No newline at end of file diff --git a/smartsupp/views/templates/admin/configuration.tpl b/smartsupp/views/templates/admin/configuration.tpl index 19c21eb..c484652 100644 --- a/smartsupp/views/templates/admin/configuration.tpl +++ b/smartsupp/views/templates/admin/configuration.tpl @@ -10,7 +10,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/templates/admin/connect_account.tpl b/smartsupp/views/templates/admin/connect_account.tpl index 66b75fa..70c8925 100644 --- a/smartsupp/views/templates/admin/connect_account.tpl +++ b/smartsupp/views/templates/admin/connect_account.tpl @@ -10,7 +10,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/templates/admin/create_account.tpl b/smartsupp/views/templates/admin/create_account.tpl index 2a2a436..fc05d05 100644 --- a/smartsupp/views/templates/admin/create_account.tpl +++ b/smartsupp/views/templates/admin/create_account.tpl @@ -10,7 +10,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/templates/admin/index.php b/smartsupp/views/templates/admin/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/views/templates/admin/index.php +++ b/smartsupp/views/templates/admin/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/templates/admin/landing_page.tpl b/smartsupp/views/templates/admin/landing_page.tpl index 8821f3a..d987d69 100644 --- a/smartsupp/views/templates/admin/landing_page.tpl +++ b/smartsupp/views/templates/admin/landing_page.tpl @@ -10,7 +10,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp diff --git a/smartsupp/views/templates/index.php b/smartsupp/views/templates/index.php index f76e69f..c48cd40 100644 --- a/smartsupp/views/templates/index.php +++ b/smartsupp/views/templates/index.php @@ -11,7 +11,7 @@ * Plugin Name: Smartsupp Live Chat * Plugin URI: http://www.smartsupp.com * Description: Adds Smartsupp Live Chat code to PrestaShop. - * Version: 2.1.6 + * Version: 2.1.7 * Author: Smartsupp * Author URI: http://www.smartsupp.com * Text Domain: smartsupp