Version Description
It is highly recommended that you upgrade to WP Live Chat Support version 8.0.06 for security reasons.
Download this release
Release Info
Developer | WP-LiveChat |
Plugin | WP Live Chat Support |
Version | 8.0.06 |
Comparing to | |
See all releases |
Code changes from version 8.0.20 to 8.0.06
- ajax_new.php +458 -458
- beep-2.mp3 +0 -0
- css/ace.css +445 -445
- css/admin-chat-box-style.css +0 -0
- css/admin-chat-style.css +443 -444
- css/admin_styles.css +314 -314
- css/chat-style.css +923 -923
- css/font-awesome.min.css +0 -0
- css/fontawesome-iconpicker.css +334 -334
- css/images/ui-bg_flat_10_000000_40x100.png +0 -0
- css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- css/images/ui-icons_ffffff_256x240.png +0 -0
- css/jquery-ui.css +0 -0
- css/node_history_styles.css +0 -1
- css/remote_dash_styles.css +0 -10
- css/support-css.css +0 -0
- css/themes/classic.css +3 -91
- css/themes/modern.css +2 -95
- css/themes/position-bottom-left.css +0 -0
- css/themes/position-bottom-right.css +0 -0
- css/themes/position-left.css +0 -0
- css/themes/position-right.css +0 -0
- css/themes/theme-1.css +0 -0
- css/themes/theme-2.css +0 -0
- css/themes/theme-3.css +0 -0
- css/themes/theme-4.css +0 -0
- css/themes/theme-5.css +0 -0
- css/themes/theme-default.css +0 -0
- css/toastr.css +0 -0
- css/wplc-survey-style-before.css +0 -0
- css/wplc_gif_integration.css +363 -363
- css/wplc_gutenberg_template_styles.css +216 -216
- css/wplcstyle.css +230 -250
- css/wplcstyle_old.css +0 -0
- ding.mp3 +0 -0
- fonts/FontAwesome.otf +0 -0
- fonts/fontawesome-webfont.eot +0 -0
- fonts/fontawesome-webfont.svg +0 -0
- fonts/fontawesome-webfont.ttf +0 -0
- fonts/fontawesome-webfont.woff +0 -0
- fonts/fontawesome-webfont.woff2 +0 -0
- functions.php +2369 -2442
- images/48px.png +0 -0
- images/48px_n.png +0 -0
- images/add-on0.jpg +0 -0
- images/add-on1.jpg +0 -0
- images/add-on2.jpg +0 -0
- images/add-on3.jpg +0 -0
- images/add-on4.jpg +0 -0
- images/ajax-loader.gif +0 -0
- images/bg/cloudy.jpg +0 -0
- images/bg/geometry.jpg +0 -0
- images/bg/social.jpg +0 -0
- images/bg/tech.jpg +0 -0
- images/chaticon.png +0 -0
- images/chrome_16x16.png +0 -0
- images/chrome_32x32.png +0 -0
- images/codecabin.png +0 -0
- images/firefox_16x16.png +0 -0
- images/firefox_32x32.png +0 -0
- images/flash.ico +0 -0
- images/gif_f.png +0 -0
- images/iconCloseRetina.png +0 -0
- images/iconRetina.png +0 -0
- images/iconmicro.png +0 -0
- images/internet-explorer_16x16.png +0 -0
- images/internet-explorer_32x32.png +0 -0
- images/loader2.gif +0 -0
- images/opera_16x16.png +0 -0
- images/opera_32x32.png +0 -0
- images/performance.png +0 -0
- images/plugin1.jpg +0 -0
- images/plugin2.jpg +0 -0
- images/reporting_sample.jpg +0 -0
- images/safari_16x16.png +0 -0
- images/safari_32x32.png +0 -0
- images/support.png +0 -0
- images/themes/newtheme-1.jpg +0 -0
- images/themes/newtheme-2.jpg +0 -0
- images/themes/theme-1.png +0 -0
- images/themes/theme-2.png +0 -0
- images/themes/theme-3.png +0 -0
- images/themes/theme-4.png +0 -0
- images/themes/theme-5.png +0 -0
- images/themes/theme-6.png +0 -0
- images/trigger_sample.jpg +0 -0
- images/trigger_sample_front.jpg +0 -0
- images/ui-bg_flat_10_000000_40x100.png +0 -0
- images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- images/ui-icons_ffffff_256x240.png +0 -0
- images/web_16x16.png +0 -0
- images/web_32x32.png +0 -0
- images/wplc-logo.png +0 -0
- images/wplc_notification_icon.png +0 -0
- includes/Mobile_Detect.php +0 -0
- includes/blocks/wplc-chat-box/block.js +130 -131
- includes/blocks/wplc-chat-box/editor.css +89 -89
- includes/blocks/wplc-chat-box/index.php +241 -242
- includes/blocks/wplc-chat-box/style.css +148 -148
- includes/blocks/wplc-chat-box/wplc_gutenberg_template_styles.css +365 -365
- includes/blocks/wplc-inline-chat-box/block.js +127 -121
- includes/blocks/wplc-inline-chat-box/editor.css +177 -177
- includes/blocks/wplc-inline-chat-box/index.php +60 -60
- includes/blocks/wplc-inline-chat-box/wplc_functions.js +38 -38
- includes/credits.php +0 -0
- includes/deprecated.php +0 -0
- includes/feedback-page.php +52 -0
- includes/modal_control.php +0 -0
- includes/notification_control.php +1 -1
- includes/settings_page.php +1078 -1090
- includes/shortcodes.php +28 -28
- includes/surveys.php +6 -6
- includes/update_control.class.php +1 -12
- includes/welcome_page.php +159 -159
- js/ace.js +134 -134
- js/arrow.gif +0 -0
- js/cross.gif +0 -0
- js/fontawesome-iconpicker.js +1024 -1024
- js/hs.png +0 -0
- js/hv.png +0 -0
- js/jquery-cookie.js +0 -0
- js/jscolor.js +0 -0
- js/md5.js +0 -0
- js/themes/classic.js +167 -168
- js/themes/modern.js +473 -475
- js/toastr.js +0 -0
- js/wplc-admin-modal.js +2 -2
- js/wplc-admin-pointers.js +1 -1
- js/wplc_admin_dynamic_translations.js +8 -8
- js/wplc_admin_popup.js +14 -14
- js/wplc_error_handling.js +5 -5
- js/wplc_gutenberg.js +200 -200
- js/wplc_heartbeat.js +24 -24
- js/wplc_lead_forms.js +6 -6
- js/wplc_node_offline_mode_controller.js +15 -15
- js/wplc_plugin_row.js +51 -0
- js/wplc_server.js +1055 -1104
- js/wplc_surveys.js +24 -24
- js/wplc_tabs.js +267 -267
- js/wplc_transcript.js +59 -59
- js/wplc_u.js +915 -976
- js/wplc_u.min.js +1 -1
ajax_new.php
CHANGED
@@ -1,459 +1,459 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
add_action('wp_ajax_wplc_admin_long_poll', 'wplc_init_ajax_callback');
|
4 |
-
add_action('wp_ajax_wplc_admin_long_poll_chat', 'wplc_init_ajax_callback');
|
5 |
-
add_action('wp_ajax_wplc_admin_accept_chat', 'wplc_init_ajax_callback');
|
6 |
-
add_action('wp_ajax_wplc_admin_close_chat', 'wplc_init_ajax_callback');
|
7 |
-
add_action('wp_ajax_wplc_admin_send_msg', 'wplc_init_ajax_callback');
|
8 |
-
add_action('wp_ajax_wplc_call_to_server_visitor', 'wplc_init_ajax_callback');
|
9 |
-
add_action('wp_ajax_wplc_user_close_chat', 'wplc_init_ajax_callback');
|
10 |
-
add_action('wp_ajax_wplc_user_minimize_chat', 'wplc_init_ajax_callback');
|
11 |
-
add_action('wp_ajax_wplc_user_maximize_chat', 'wplc_init_ajax_callback');
|
12 |
-
add_action('wp_ajax_wplc_user_send_msg', 'wplc_init_ajax_callback');
|
13 |
-
add_action('wp_ajax_wplc_start_chat', 'wplc_init_ajax_callback');
|
14 |
-
add_action('wp_ajax_nopriv_wplc_start_chat', 'wplc_init_ajax_callback');
|
15 |
-
add_action('wp_ajax_nopriv_wplc_call_to_server_visitor', 'wplc_init_ajax_callback');
|
16 |
-
add_action('wp_ajax_nopriv_wplc_user_close_chat', 'wplc_init_ajax_callback');
|
17 |
-
add_action('wp_ajax_nopriv_wplc_user_minimize_chat', 'wplc_init_ajax_callback');
|
18 |
-
add_action('wp_ajax_nopriv_wplc_user_maximize_chat', 'wplc_init_ajax_callback');
|
19 |
-
add_action('wp_ajax_nopriv_wplc_user_send_msg', 'wplc_init_ajax_callback');
|
20 |
-
|
21 |
-
add_action('wp_ajax_wplc_get_chat_box', 'wplc_init_ajax_callback');
|
22 |
-
add_action('wp_ajax_nopriv_wplc_get_chat_box', 'wplc_init_ajax_callback');
|
23 |
-
|
24 |
-
function wplc_init_ajax_callback() {
|
25 |
-
@ob_start();
|
26 |
-
|
27 |
-
$wplc_session_id = rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9);
|
28 |
-
$check =
|
29 |
-
|
30 |
-
if ($check == 1) {
|
31 |
-
|
32 |
-
$wplc_advanced_settings = get_option("wplc_advanced_settings");
|
33 |
-
if (!$wplc_advanced_settings) {
|
34 |
-
$wplc_delay_between_updates = 500000;
|
35 |
-
$wplc_delay_between_loops = 500000;
|
36 |
-
$wplc_iterations = 55;
|
37 |
-
} else {
|
38 |
-
if (isset($wplc_advanced_settings['wplc_delay_between_updates'])) { $wplc_delay_between_updates = intval($wplc_advanced_settings['wplc_delay_between_updates']); } else { $wplc_delay_between_updates = 500000; }
|
39 |
-
if (isset($wplc_advanced_settings['wplc_delay_between_loops'])) { $wplc_delay_between_loops = intval($wplc_advanced_settings['wplc_delay_between_loops']); } else { $wplc_delay_between_loops = 500000; }
|
40 |
-
if (isset($wplc_advanced_settings['wplc_iterations'])) { $wplc_iterations = intval($wplc_advanced_settings['wplc_iterations']); } else { $wplc_iterations = 55; }
|
41 |
-
|
42 |
-
if ($wplc_iterations < 10) { $wplc_iterations = 10; }
|
43 |
-
if ($wplc_iterations > 200) { $wplc_iterations = 200; }
|
44 |
-
|
45 |
-
if ($wplc_delay_between_updates < 250000) { $wplc_delay_between_updates = 250000; }
|
46 |
-
if ($wplc_delay_between_updates > 1000000) { $wplc_delay_between_updates = 1000000; }
|
47 |
-
|
48 |
-
if ($wplc_delay_between_loops < 250000) { $wplc_delay_between_loops = 250000; }
|
49 |
-
if ($wplc_delay_between_loops > 1000000) { $wplc_delay_between_loops = 1000000; }
|
50 |
-
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
$iterations = $wplc_iterations;
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
/* time in microseconds between updating the user on the page within the DB (lower number = higher resource usage) */
|
59 |
-
define('WPLC_DELAY_BETWEEN_UPDATES', $wplc_delay_between_updates);
|
60 |
-
/* time in microseconds between long poll loop (lower number = higher resource usage) */
|
61 |
-
define('WPLC_DELAY_BETWEEN_LOOPS', $wplc_delay_between_loops);
|
62 |
-
/* this needs to take into account the previous constants so that we dont run out of time, which in turn returns a 503 error */
|
63 |
-
define('WPLC_TIMEOUT', (((WPLC_DELAY_BETWEEN_UPDATES + WPLC_DELAY_BETWEEN_LOOPS)) * $iterations) / 1000000);
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
global $wpdb;
|
68 |
-
global $wplc_tblname_chats;
|
69 |
-
global $wplc_tblname_msgs;
|
70 |
-
/* we're using PHP 'sleep' which may lock other requests until our script wakes up. Call this function to ensure that other requests can run without waiting for us to finish */
|
71 |
-
session_write_close();
|
72 |
-
|
73 |
-
if ($_POST['action'] == "wplc_get_chat_box") {
|
74 |
-
$continue = apply_filters( "wplc_version_check_continue", true );
|
75 |
-
if ($continue === true) {
|
76 |
-
echo wplc_output_box_5100(sanitize_text_field($_POST['cid']));
|
77 |
-
} else {
|
78 |
-
echo $continue;
|
79 |
-
}
|
80 |
-
die();
|
81 |
-
}
|
82 |
-
|
83 |
-
if($_POST['action'] == 'wplc_admin_long_poll'){
|
84 |
-
// header("HTTP/1.0 500"); //Simulate 500 error
|
85 |
-
// header("HTTP/1.0 404"); //Simulate 404 error
|
86 |
-
// die();
|
87 |
-
|
88 |
-
if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
|
89 |
-
//sleep(6);
|
90 |
-
$i = 1;
|
91 |
-
$wplc_current_user = get_current_user_id();
|
92 |
-
|
93 |
-
/* If user is either an agent or an admin, access the page. */
|
94 |
-
if( !get_user_meta( $wplc_current_user, 'wplc_ma_agent', true )) {
|
95 |
-
$array['error'] = 1;
|
96 |
-
echo json_encode($array);
|
97 |
-
exit();
|
98 |
-
}
|
99 |
-
|
100 |
-
while($i <= $iterations){
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
if($i %round($iterations/2) == 0) {
|
105 |
-
wplc_update_chat_statuses();
|
106 |
-
}
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
if($_POST['wplc_update_admin_chat_table'] == 'false'){
|
111 |
-
/* this is a new load of the page, return false so we can force a send of the new visitor data */
|
112 |
-
$old_chat_data = false;
|
113 |
-
} else {
|
114 |
-
$old_chat_data = stripslashes($_POST['wplc_update_admin_chat_table']);
|
115 |
-
}
|
116 |
-
|
117 |
-
$pending = wplc_check_pending_chats();
|
118 |
-
$new_chat_data = wplc_list_chats_new($_POST);
|
119 |
-
|
120 |
-
|
121 |
-
if ($new_chat_data == "false") { $new_chat_data = false; }
|
122 |
-
|
123 |
-
|
124 |
-
if($new_chat_data !== $old_chat_data){
|
125 |
-
$array['old_chat_data'] = $old_chat_data;
|
126 |
-
$array['wplc_update_admin_chat_table'] = $new_chat_data;
|
127 |
-
$array['pending'] = $pending;
|
128 |
-
$array['action'] = "wplc_update_chat_list";
|
129 |
-
|
130 |
-
}
|
131 |
-
|
132 |
-
if(isset($array)){
|
133 |
-
echo json_encode($array);
|
134 |
-
break;
|
135 |
-
}
|
136 |
-
@ob_end_flush();
|
137 |
-
if (defined('WPLC_DELAY_BETWEEN_LOOPS')) { usleep(WPLC_DELAY_BETWEEN_LOOPS); } else { usleep(500000); }
|
138 |
-
$i++;
|
139 |
-
}
|
140 |
-
}
|
141 |
-
if($_POST['action'] == "wplc_admin_long_poll_chat"){
|
142 |
-
if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
|
143 |
-
$i = 1;
|
144 |
-
$cdata = wplc_get_chat_data($_POST['cid']);
|
145 |
-
$array = array();
|
146 |
-
while($i <= $iterations){
|
147 |
-
$array = apply_filters("wplc_filter_admin_long_poll_chat_loop_iteration",$array,$_POST,$i,$cdata);
|
148 |
-
if($array){
|
149 |
-
echo json_encode($array);
|
150 |
-
break;
|
151 |
-
}
|
152 |
-
@ob_end_flush();
|
153 |
-
if (defined('WPLC_DELAY_BETWEEN_LOOPS')) { usleep(WPLC_DELAY_BETWEEN_LOOPS); } else { usleep(500000); }
|
154 |
-
$i++;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
if ($_POST['action'] == "wplc_admin_accept_chat") {
|
158 |
-
wplc_admin_accept_chat(sanitize_text_field($_POST['cid']));
|
159 |
-
}
|
160 |
-
if ($_POST['action'] == "wplc_admin_close_chat") {
|
161 |
-
$chat_id = sanitize_text_field($_POST['cid']);
|
162 |
-
wplc_change_chat_status($chat_id,1);
|
163 |
-
echo 'done';
|
164 |
-
}
|
165 |
-
if ($_POST['action'] == "wplc_admin_send_msg") {
|
166 |
-
$chat_id = sanitize_text_field($_POST['cid']);
|
167 |
-
$chat_msg = strip_tags($_POST['msg'], '<a><p><img><hr>');
|
168 |
-
$wplc_rec_msg = wplc_record_chat_msg("2",$chat_id,$chat_msg);
|
169 |
-
if ($wplc_rec_msg) {
|
170 |
-
echo 'sent';
|
171 |
-
} else {
|
172 |
-
echo "There was an error sending your chat message. Please contact support";
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
//User Ajax
|
177 |
-
|
178 |
-
if($_POST['action'] == 'wplc_call_to_server_visitor'){
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
$wplc_settings = get_option("WPLC_SETTINGS");
|
183 |
-
|
184 |
-
|
185 |
-
if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
|
186 |
-
$i = 1;
|
187 |
-
$array = array("check" => false);
|
188 |
-
$array['debug'] = "";
|
189 |
-
|
190 |
-
$cdata = false;
|
191 |
-
if($_POST['cid'] == null || $_POST['cid'] == "" || $_POST['cid'] == "null" || $_POST['cid'] == 0){ } else {
|
192 |
-
/* get agent ID */
|
193 |
-
|
194 |
-
|
195 |
-
$cdata = wplc_get_chat_data(sanitize_text_field(intval($_POST['cid'])),__LINE__);
|
196 |
-
$from = __("Admin","wplivechat"); /* set default */
|
197 |
-
|
198 |
-
$array['aname'] = apply_filters("wplc_filter_admin_from", $from, $_POST['cid'],$cdata);
|
199 |
-
|
200 |
-
}
|
201 |
-
|
202 |
-
while($i <= $iterations) {
|
203 |
-
|
204 |
-
if($i %round($iterations/2) == 0) {
|
205 |
-
wplc_update_chat_statuses();
|
206 |
-
}
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
if($_POST['cid'] == null || $_POST['cid'] == "" || $_POST['cid'] == "null" || $_POST['cid'] == 0){
|
211 |
-
// echo 1;
|
212 |
-
|
213 |
-
if( isset( $_POST['wplc_name'] ) && $_POST['wplc_name'] !== '' ){
|
214 |
-
$user = sanitize_text_field($_POST['wplc_name']);
|
215 |
-
} else {
|
216 |
-
$user = "Guest";
|
217 |
-
}
|
218 |
-
|
219 |
-
if( isset( $_POST['wplc_email'] ) && $_POST['wplc_email'] !== '' ){
|
220 |
-
$email = sanitize_text_field($_POST['wplc_email']);
|
221 |
-
} else {
|
222 |
-
$email = "no email set";
|
223 |
-
}
|
224 |
-
|
225 |
-
if(isset($_POST['wplc_is_mobile']) && ($_POST['wplc_is_mobile'] === 'true' || $_POST['wplc_is_mobile'] === true)){
|
226 |
-
$is_mobile = true;
|
227 |
-
} else {
|
228 |
-
$is_mobile = false;
|
229 |
-
}
|
230 |
-
|
231 |
-
$cid = wplc_log_user_on_page($user,$email,sanitize_text_field($_POST['wplcsession']), $is_mobile);
|
232 |
-
$array['cid'] = $cid;
|
233 |
-
$array['status'] = wplc_return_chat_status($cid);
|
234 |
-
$array['wplc_name'] = $user;
|
235 |
-
$array['wplc_email'] = $email;
|
236 |
-
$array['check'] = true;
|
237 |
-
|
238 |
-
} else {
|
239 |
-
// echo 2;
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
$new_status = wplc_return_chat_status(sanitize_text_field($_POST['cid']));
|
245 |
-
$array['wplc_name'] = sanitize_text_field($_POST['wplc_name']);
|
246 |
-
$array['wplc_email'] = sanitize_text_field($_POST['wplc_email']);
|
247 |
-
$array['cid'] = sanitize_text_field($_POST['cid']);
|
248 |
-
$array['aid'] = sanitize_text_field($_POST['cid']);
|
249 |
-
|
250 |
-
$array = apply_filters("wplc_filter_user_long_poll_chat_loop_iteration",$array,$_POST,$i,$cdata);
|
251 |
-
|
252 |
-
|
253 |
-
if($new_status == $_POST['status']){ // if status matches do the following
|
254 |
-
if( intval( $_POST['status'] ) != 2){
|
255 |
-
/* check if session_variable is different? if yes then stop this script completely. */
|
256 |
-
if (isset($_POST['wplcsession']) && $_POST['wplcsession'] != '' && $i > 1) {
|
257 |
-
$wplc_session_variable = sanitize_text_field($_POST['wplcsession']);
|
258 |
-
$current_session_variable = wplc_return_chat_session_variable(sanitize_text_field($_POST['cid']));
|
259 |
-
if ($current_session_variable != "" && $current_session_variable != $wplc_session_variable) {
|
260 |
-
/* stop this script */
|
261 |
-
$array['status'] = 11;
|
262 |
-
echo json_encode($array);
|
263 |
-
die();
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
|
268 |
-
if ($i == 1) {
|
269 |
-
if (intval( $_POST['status'] ) != 12) {
|
270 |
-
/* we dont want to update the time if the user was not answered by the agent as this needs to eventually time out and become a "missed chat" - status: 0 */
|
271 |
-
wplc_update_user_on_page(sanitize_text_field($_POST['cid']), sanitize_text_field($_POST['status']), sanitize_text_field($_POST['wplcsession']));
|
272 |
-
}
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
if ( intval( $_POST['status'] ) == 0 || intval($_POST['status'] ) == 12 ){ // browsing - user tried to chat but admin didn't answer so turn back to browsing
|
277 |
-
//wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 0, sanitize_text_field($_POST['wplcsession']));
|
278 |
-
//$array['status'] = 5;
|
279 |
-
$array['status'] = 12;
|
280 |
-
//$array['check'] = true;
|
281 |
-
|
282 |
-
}
|
283 |
-
else if( intval($_POST['status'] ) == 3 || intval($_POST['status'] ) == 10){
|
284 |
-
//wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 3);
|
285 |
-
$messages = wplc_return_user_chat_messages(sanitize_text_field($_POST['cid']),$wplc_settings,$cdata);
|
286 |
-
if ( intval( $_POST['status'] ) == 10 ) {
|
287 |
-
$array['alert'] = true;
|
288 |
-
}
|
289 |
-
if ($messages){
|
290 |
-
wplc_mark_as_read_user_chat_messages( sanitize_text_field($_POST['cid']) );
|
291 |
-
$array['status'] = 3;
|
292 |
-
$array['data'] = $messages;
|
293 |
-
$array['check'] = true;
|
294 |
-
}
|
295 |
-
}
|
296 |
-
else if(intval($_POST['status']) == 2){
|
297 |
-
//wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 3);
|
298 |
-
$messages = wplc_return_user_chat_messages(sanitize_text_field($_POST['cid']),$wplc_settings,$cdata);
|
299 |
-
$array['debug'] = "we are here ".__LINE__;
|
300 |
-
if ($messages){
|
301 |
-
wplc_mark_as_read_user_chat_messages(sanitize_text_field($_POST['cid']));
|
302 |
-
$array['status'] = 2;
|
303 |
-
$array['data'] = $messages;
|
304 |
-
$array['check'] = true;
|
305 |
-
}
|
306 |
-
}
|
307 |
-
else if( intval( $new_status ) == 12){ // no answer from admin, for the second+ time.
|
308 |
-
$array['data'] = wplc_return_no_answer_string(sanitize_text_field($_POST['cid']));
|
309 |
-
$array['check'] = true;
|
310 |
-
@do_action("wplc_hook_missed_chat",array("cid" => $_POST['cid'],"name" => $_POST['wplc_name'],"email" => $_POST['wplc_email']));
|
311 |
-
|
312 |
-
}
|
313 |
-
|
314 |
-
|
315 |
-
/* check if this is part of the first run */
|
316 |
-
if (isset($_POST['first_run']) && sanitize_text_field($_POST['first_run']) == 1) {
|
317 |
-
/* if yes, then send data now and dont wait for all iterations to complete */
|
318 |
-
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
319 |
-
$array['check'] = true;
|
320 |
-
}
|
321 |
-
else if (isset($_POST['short_poll']) && sanitize_text_field($_POST['short_poll']) == "true") {
|
322 |
-
/* if yes, then send data now and dont wait for all iterations to complete */
|
323 |
-
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
324 |
-
$array['check'] = true;
|
325 |
-
}
|
326 |
-
} else { // statuses do not match
|
327 |
-
|
328 |
-
$array['debug'] = $array['debug']. " ". "Doesnt match $new_status ".$_POST['status'];
|
329 |
-
$array['status'] = $new_status;
|
330 |
-
if( intval( $new_status ) == 1 ){ // completed
|
331 |
-
wplc_update_user_on_page( sanitize_text_field( $_POST['cid'] ), 8, sanitize_text_field( $_POST['wplcsession'] ) );
|
332 |
-
$array['check'] = true;
|
333 |
-
$array['status'] = 8;
|
334 |
-
$array['data'] = array();
|
335 |
-
$array['data'][9999] = array();
|
336 |
-
$array['data'][9999]['msg'] = __("Admin has closed and ended the chat","wplivechat");
|
337 |
-
|
338 |
-
}
|
339 |
-
else if( intval( $new_status ) == 2 ) { // pending
|
340 |
-
$array['debug'] = "we are here ".__LINE__;
|
341 |
-
$array['check'] = true;
|
342 |
-
$array['wplc_name'] = wplc_return_chat_name( sanitize_text_field($_POST['cid'] ) );
|
343 |
-
$array['wplc_email'] = wplc_return_chat_email( sanitize_text_field($_POST['cid'] ) );
|
344 |
-
$messages = wplc_return_chat_messages( sanitize_text_field($_POST['cid']), false, true, $wplc_settings, $cdata, 'array', false );
|
345 |
-
if ($messages){
|
346 |
-
$array['data'] = $messages;
|
347 |
-
}
|
348 |
-
}
|
349 |
-
else if( intval( $new_status ) == 3 ){ // active
|
350 |
-
$array['data'] = null;
|
351 |
-
$array['check'] = true;
|
352 |
-
|
353 |
-
if($_POST['status'] == 5 || $_POST['status'] == 3){
|
354 |
-
$array['sound'] = false;
|
355 |
-
$messages = wplc_return_chat_messages(sanitize_text_field($_POST['cid']),false,true,$wplc_settings,$cdata,'array',false);
|
356 |
-
if ($messages){
|
357 |
-
$array['data'] = $messages;
|
358 |
-
}
|
359 |
-
}
|
360 |
-
}
|
361 |
-
else if( intval( $new_status ) == 7){ // timed out
|
362 |
-
wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 5, sanitize_text_field($_POST['wplcsession']));
|
363 |
-
}
|
364 |
-
else if( intval( $new_status ) == 9){ // user closed chat without inputting or starting a chat
|
365 |
-
$array['check'] = true;
|
366 |
-
}
|
367 |
-
else if( intval( $new_status ) == 12){ // no answer from admin
|
368 |
-
|
369 |
-
$array['data'] = wplc_return_no_answer_string(sanitize_text_field($_POST['cid']));
|
370 |
-
$array['check'] = true;
|
371 |
-
wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 12, sanitize_text_field($_POST['wplcsession']));
|
372 |
-
@do_action("wplc_hook_missed_chat",array("cid" => $_POST['cid'],"name" => $_POST['wplc_name'],"email" => $_POST['wplc_email']));
|
373 |
-
|
374 |
-
}
|
375 |
-
else if( intval( $new_status ) == 10 ) { // minimized active chat
|
376 |
-
$array['check'] = true;
|
377 |
-
if($_POST['status'] == 5){
|
378 |
-
$messages = wplc_return_chat_messages(sanitize_text_field($_POST['cid']),false,true,$wplc_settings,$cdata,'array',false);
|
379 |
-
if ($messages){
|
380 |
-
$array['data'] = $messages;
|
381 |
-
}
|
382 |
-
}
|
383 |
-
}
|
384 |
-
/* check if this is part of the first run */
|
385 |
-
if (isset($_POST['first_run']) && sanitize_text_field($_POST['first_run']) == "1") {
|
386 |
-
/* if yes, then send data now and dont wait for all iterations to complete */
|
387 |
-
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
388 |
-
$array['check'] = true;
|
389 |
-
}
|
390 |
-
else if (isset($_POST['short_poll']) && sanitize_text_field($_POST['short_poll']) == "true") {
|
391 |
-
/* if yes, then send data now and dont wait for all iterations to complete */
|
392 |
-
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
393 |
-
$array['check'] = true;
|
394 |
-
}
|
395 |
-
$array = apply_filters("wplc_filter_wplc_call_to_server_visitor_new_status_check",$array);
|
396 |
-
|
397 |
-
}
|
398 |
-
}
|
399 |
-
if($array['check'] == true){
|
400 |
-
echo json_encode($array);
|
401 |
-
break;
|
402 |
-
}
|
403 |
-
$i++;
|
404 |
-
|
405 |
-
if (defined('WPLC_DELAY_BETWEEN_LOOPS')) { usleep(WPLC_DELAY_BETWEEN_LOOPS); } else { usleep(500000); }
|
406 |
-
|
407 |
-
@ob_end_flush();
|
408 |
-
}
|
409 |
-
}
|
410 |
-
|
411 |
-
/* */
|
412 |
-
if ($_POST['action'] == "wplc_user_close_chat") {
|
413 |
-
if($_POST['status'] == 5){
|
414 |
-
wplc_change_chat_status(sanitize_text_field($_POST['cid']),9);
|
415 |
-
} else if($_POST['status'] == 3){
|
416 |
-
wplc_change_chat_status(sanitize_text_field($_POST['cid']),8);
|
417 |
-
}
|
418 |
-
}
|
419 |
-
|
420 |
-
if ($_POST['action'] == "wplc_user_minimize_chat") {
|
421 |
-
$chat_id = sanitize_text_field($_POST['cid']);
|
422 |
-
wplc_change_chat_status(sanitize_text_field($_POST['cid']),10);
|
423 |
-
}
|
424 |
-
if ($_POST['action'] == "wplc_user_maximize_chat") {
|
425 |
-
$chat_id = sanitize_text_field($_POST['cid']);
|
426 |
-
$chat_status = intval(sanitize_text_field($_POST['chat_status']));
|
427 |
-
wplc_change_chat_status(sanitize_text_field($_POST['cid']),$chat_status);
|
428 |
-
}
|
429 |
-
|
430 |
-
if ($_POST['action'] == "wplc_user_send_msg") {
|
431 |
-
$chat_id = sanitize_text_field($_POST['cid']);
|
432 |
-
$chat_msg = strip_tags($_POST['msg'], '<p><a><img><hr>');
|
433 |
-
$wplc_rec_msg = wplc_record_chat_msg("1",$chat_id,$chat_msg);
|
434 |
-
if ($wplc_rec_msg) {
|
435 |
-
echo 'sent';
|
436 |
-
} else {
|
437 |
-
echo "There was an error sending your chat message. Please contact support";
|
438 |
-
}
|
439 |
-
}
|
440 |
-
if ($_POST['action'] == "wplc_start_chat") {
|
441 |
-
if (isset($_POST['cid'])) {
|
442 |
-
if ($_POST['name'] && $_POST['email']) {
|
443 |
-
echo wplc_user_initiate_chat(sanitize_text_field($_POST['name']),sanitize_email($_POST['email']),sanitize_text_field($_POST['cid']), sanitize_text_field($_POST['wplcsession'])); // echo the chat session id
|
444 |
-
} else {
|
445 |
-
echo "error2";
|
446 |
-
}
|
447 |
-
} else {
|
448 |
-
if ($_POST['name'] && $_POST['email']) {
|
449 |
-
echo wplc_user_initiate_chat(sanitize_text_field($_POST['name']), sanitize_email($_POST['email']), null, sanitize_text_field($_POST['wplcsession'])); // echo the chat session id
|
450 |
-
} else {
|
451 |
-
echo "error2";
|
452 |
-
}
|
453 |
-
}
|
454 |
-
}
|
455 |
-
|
456 |
-
}
|
457 |
-
|
458 |
-
die();
|
459 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
add_action('wp_ajax_wplc_admin_long_poll', 'wplc_init_ajax_callback');
|
4 |
+
add_action('wp_ajax_wplc_admin_long_poll_chat', 'wplc_init_ajax_callback');
|
5 |
+
add_action('wp_ajax_wplc_admin_accept_chat', 'wplc_init_ajax_callback');
|
6 |
+
add_action('wp_ajax_wplc_admin_close_chat', 'wplc_init_ajax_callback');
|
7 |
+
add_action('wp_ajax_wplc_admin_send_msg', 'wplc_init_ajax_callback');
|
8 |
+
add_action('wp_ajax_wplc_call_to_server_visitor', 'wplc_init_ajax_callback');
|
9 |
+
add_action('wp_ajax_wplc_user_close_chat', 'wplc_init_ajax_callback');
|
10 |
+
add_action('wp_ajax_wplc_user_minimize_chat', 'wplc_init_ajax_callback');
|
11 |
+
add_action('wp_ajax_wplc_user_maximize_chat', 'wplc_init_ajax_callback');
|
12 |
+
add_action('wp_ajax_wplc_user_send_msg', 'wplc_init_ajax_callback');
|
13 |
+
add_action('wp_ajax_wplc_start_chat', 'wplc_init_ajax_callback');
|
14 |
+
add_action('wp_ajax_nopriv_wplc_start_chat', 'wplc_init_ajax_callback');
|
15 |
+
add_action('wp_ajax_nopriv_wplc_call_to_server_visitor', 'wplc_init_ajax_callback');
|
16 |
+
add_action('wp_ajax_nopriv_wplc_user_close_chat', 'wplc_init_ajax_callback');
|
17 |
+
add_action('wp_ajax_nopriv_wplc_user_minimize_chat', 'wplc_init_ajax_callback');
|
18 |
+
add_action('wp_ajax_nopriv_wplc_user_maximize_chat', 'wplc_init_ajax_callback');
|
19 |
+
add_action('wp_ajax_nopriv_wplc_user_send_msg', 'wplc_init_ajax_callback');
|
20 |
+
|
21 |
+
add_action('wp_ajax_wplc_get_chat_box', 'wplc_init_ajax_callback');
|
22 |
+
add_action('wp_ajax_nopriv_wplc_get_chat_box', 'wplc_init_ajax_callback');
|
23 |
+
|
24 |
+
function wplc_init_ajax_callback() {
|
25 |
+
@ob_start();
|
26 |
+
|
27 |
+
$wplc_session_id = rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9).rand(0,9);
|
28 |
+
$check = check_ajax_referer( 'wplc', 'security' );
|
29 |
+
|
30 |
+
if ($check == 1) {
|
31 |
+
|
32 |
+
$wplc_advanced_settings = get_option("wplc_advanced_settings");
|
33 |
+
if (!$wplc_advanced_settings) {
|
34 |
+
$wplc_delay_between_updates = 500000;
|
35 |
+
$wplc_delay_between_loops = 500000;
|
36 |
+
$wplc_iterations = 55;
|
37 |
+
} else {
|
38 |
+
if (isset($wplc_advanced_settings['wplc_delay_between_updates'])) { $wplc_delay_between_updates = intval($wplc_advanced_settings['wplc_delay_between_updates']); } else { $wplc_delay_between_updates = 500000; }
|
39 |
+
if (isset($wplc_advanced_settings['wplc_delay_between_loops'])) { $wplc_delay_between_loops = intval($wplc_advanced_settings['wplc_delay_between_loops']); } else { $wplc_delay_between_loops = 500000; }
|
40 |
+
if (isset($wplc_advanced_settings['wplc_iterations'])) { $wplc_iterations = intval($wplc_advanced_settings['wplc_iterations']); } else { $wplc_iterations = 55; }
|
41 |
+
|
42 |
+
if ($wplc_iterations < 10) { $wplc_iterations = 10; }
|
43 |
+
if ($wplc_iterations > 200) { $wplc_iterations = 200; }
|
44 |
+
|
45 |
+
if ($wplc_delay_between_updates < 250000) { $wplc_delay_between_updates = 250000; }
|
46 |
+
if ($wplc_delay_between_updates > 1000000) { $wplc_delay_between_updates = 1000000; }
|
47 |
+
|
48 |
+
if ($wplc_delay_between_loops < 250000) { $wplc_delay_between_loops = 250000; }
|
49 |
+
if ($wplc_delay_between_loops > 1000000) { $wplc_delay_between_loops = 1000000; }
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
$iterations = $wplc_iterations;
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
/* time in microseconds between updating the user on the page within the DB (lower number = higher resource usage) */
|
59 |
+
define('WPLC_DELAY_BETWEEN_UPDATES', $wplc_delay_between_updates);
|
60 |
+
/* time in microseconds between long poll loop (lower number = higher resource usage) */
|
61 |
+
define('WPLC_DELAY_BETWEEN_LOOPS', $wplc_delay_between_loops);
|
62 |
+
/* this needs to take into account the previous constants so that we dont run out of time, which in turn returns a 503 error */
|
63 |
+
define('WPLC_TIMEOUT', (((WPLC_DELAY_BETWEEN_UPDATES + WPLC_DELAY_BETWEEN_LOOPS)) * $iterations) / 1000000);
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
global $wpdb;
|
68 |
+
global $wplc_tblname_chats;
|
69 |
+
global $wplc_tblname_msgs;
|
70 |
+
/* we're using PHP 'sleep' which may lock other requests until our script wakes up. Call this function to ensure that other requests can run without waiting for us to finish */
|
71 |
+
session_write_close();
|
72 |
+
|
73 |
+
if ($_POST['action'] == "wplc_get_chat_box") {
|
74 |
+
$continue = apply_filters( "wplc_version_check_continue", true );
|
75 |
+
if ($continue === true) {
|
76 |
+
echo wplc_output_box_5100(sanitize_text_field($_POST['cid']));
|
77 |
+
} else {
|
78 |
+
echo $continue;
|
79 |
+
}
|
80 |
+
die();
|
81 |
+
}
|
82 |
+
|
83 |
+
if($_POST['action'] == 'wplc_admin_long_poll'){
|
84 |
+
// header("HTTP/1.0 500"); //Simulate 500 error
|
85 |
+
// header("HTTP/1.0 404"); //Simulate 404 error
|
86 |
+
// die();
|
87 |
+
|
88 |
+
if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
|
89 |
+
//sleep(6);
|
90 |
+
$i = 1;
|
91 |
+
$wplc_current_user = get_current_user_id();
|
92 |
+
|
93 |
+
/* If user is either an agent or an admin, access the page. */
|
94 |
+
if( !get_user_meta( $wplc_current_user, 'wplc_ma_agent', true )) {
|
95 |
+
$array['error'] = 1;
|
96 |
+
echo json_encode($array);
|
97 |
+
exit();
|
98 |
+
}
|
99 |
+
|
100 |
+
while($i <= $iterations){
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
if($i %round($iterations/2) == 0) {
|
105 |
+
wplc_update_chat_statuses();
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
if($_POST['wplc_update_admin_chat_table'] == 'false'){
|
111 |
+
/* this is a new load of the page, return false so we can force a send of the new visitor data */
|
112 |
+
$old_chat_data = false;
|
113 |
+
} else {
|
114 |
+
$old_chat_data = stripslashes($_POST['wplc_update_admin_chat_table']);
|
115 |
+
}
|
116 |
+
|
117 |
+
$pending = wplc_check_pending_chats();
|
118 |
+
$new_chat_data = wplc_list_chats_new($_POST);
|
119 |
+
|
120 |
+
|
121 |
+
if ($new_chat_data == "false") { $new_chat_data = false; }
|
122 |
+
|
123 |
+
|
124 |
+
if($new_chat_data !== $old_chat_data){
|
125 |
+
$array['old_chat_data'] = $old_chat_data;
|
126 |
+
$array['wplc_update_admin_chat_table'] = $new_chat_data;
|
127 |
+
$array['pending'] = $pending;
|
128 |
+
$array['action'] = "wplc_update_chat_list";
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
if(isset($array)){
|
133 |
+
echo json_encode($array);
|
134 |
+
break;
|
135 |
+
}
|
136 |
+
@ob_end_flush();
|
137 |
+
if (defined('WPLC_DELAY_BETWEEN_LOOPS')) { usleep(WPLC_DELAY_BETWEEN_LOOPS); } else { usleep(500000); }
|
138 |
+
$i++;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
if($_POST['action'] == "wplc_admin_long_poll_chat"){
|
142 |
+
if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
|
143 |
+
$i = 1;
|
144 |
+
$cdata = wplc_get_chat_data($_POST['cid']);
|
145 |
+
$array = array();
|
146 |
+
while($i <= $iterations){
|
147 |
+
$array = apply_filters("wplc_filter_admin_long_poll_chat_loop_iteration",$array,$_POST,$i,$cdata);
|
148 |
+
if($array){
|
149 |
+
echo json_encode($array);
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
@ob_end_flush();
|
153 |
+
if (defined('WPLC_DELAY_BETWEEN_LOOPS')) { usleep(WPLC_DELAY_BETWEEN_LOOPS); } else { usleep(500000); }
|
154 |
+
$i++;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
if ($_POST['action'] == "wplc_admin_accept_chat") {
|
158 |
+
wplc_admin_accept_chat(sanitize_text_field($_POST['cid']));
|
159 |
+
}
|
160 |
+
if ($_POST['action'] == "wplc_admin_close_chat") {
|
161 |
+
$chat_id = sanitize_text_field($_POST['cid']);
|
162 |
+
wplc_change_chat_status($chat_id,1);
|
163 |
+
echo 'done';
|
164 |
+
}
|
165 |
+
if ($_POST['action'] == "wplc_admin_send_msg") {
|
166 |
+
$chat_id = sanitize_text_field($_POST['cid']);
|
167 |
+
$chat_msg = strip_tags($_POST['msg'], '<a><p><img><hr>');
|
168 |
+
$wplc_rec_msg = wplc_record_chat_msg("2",$chat_id,$chat_msg);
|
169 |
+
if ($wplc_rec_msg) {
|
170 |
+
echo 'sent';
|
171 |
+
} else {
|
172 |
+
echo "There was an error sending your chat message. Please contact support";
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
//User Ajax
|
177 |
+
|
178 |
+
if($_POST['action'] == 'wplc_call_to_server_visitor'){
|
179 |
+
|
180 |
+
|
181 |
+
|
182 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
183 |
+
|
184 |
+
|
185 |
+
if (defined('WPLC_TIMEOUT')) { @set_time_limit(WPLC_TIMEOUT); } else { @set_time_limit(120); }
|
186 |
+
$i = 1;
|
187 |
+
$array = array("check" => false);
|
188 |
+
$array['debug'] = "";
|
189 |
+
|
190 |
+
$cdata = false;
|
191 |
+
if($_POST['cid'] == null || $_POST['cid'] == "" || $_POST['cid'] == "null" || $_POST['cid'] == 0){ } else {
|
192 |
+
/* get agent ID */
|
193 |
+
|
194 |
+
|
195 |
+
$cdata = wplc_get_chat_data(sanitize_text_field(intval($_POST['cid'])),__LINE__);
|
196 |
+
$from = __("Admin","wplivechat"); /* set default */
|
197 |
+
|
198 |
+
$array['aname'] = apply_filters("wplc_filter_admin_from", $from, $_POST['cid'],$cdata);
|
199 |
+
|
200 |
+
}
|
201 |
+
|
202 |
+
while($i <= $iterations) {
|
203 |
+
|
204 |
+
if($i %round($iterations/2) == 0) {
|
205 |
+
wplc_update_chat_statuses();
|
206 |
+
}
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
if($_POST['cid'] == null || $_POST['cid'] == "" || $_POST['cid'] == "null" || $_POST['cid'] == 0){
|
211 |
+
// echo 1;
|
212 |
+
|
213 |
+
if( isset( $_POST['wplc_name'] ) && $_POST['wplc_name'] !== '' ){
|
214 |
+
$user = sanitize_text_field($_POST['wplc_name']);
|
215 |
+
} else {
|
216 |
+
$user = "Guest";
|
217 |
+
}
|
218 |
+
|
219 |
+
if( isset( $_POST['wplc_email'] ) && $_POST['wplc_email'] !== '' ){
|
220 |
+
$email = sanitize_text_field($_POST['wplc_email']);
|
221 |
+
} else {
|
222 |
+
$email = "no email set";
|
223 |
+
}
|
224 |
+
|
225 |
+
if(isset($_POST['wplc_is_mobile']) && ($_POST['wplc_is_mobile'] === 'true' || $_POST['wplc_is_mobile'] === true)){
|
226 |
+
$is_mobile = true;
|
227 |
+
} else {
|
228 |
+
$is_mobile = false;
|
229 |
+
}
|
230 |
+
|
231 |
+
$cid = wplc_log_user_on_page($user,$email,sanitize_text_field($_POST['wplcsession']), $is_mobile);
|
232 |
+
$array['cid'] = $cid;
|
233 |
+
$array['status'] = wplc_return_chat_status($cid);
|
234 |
+
$array['wplc_name'] = $user;
|
235 |
+
$array['wplc_email'] = $email;
|
236 |
+
$array['check'] = true;
|
237 |
+
|
238 |
+
} else {
|
239 |
+
// echo 2;
|
240 |
+
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
$new_status = wplc_return_chat_status(sanitize_text_field($_POST['cid']));
|
245 |
+
$array['wplc_name'] = sanitize_text_field($_POST['wplc_name']);
|
246 |
+
$array['wplc_email'] = sanitize_text_field($_POST['wplc_email']);
|
247 |
+
$array['cid'] = sanitize_text_field($_POST['cid']);
|
248 |
+
$array['aid'] = sanitize_text_field($_POST['cid']);
|
249 |
+
|
250 |
+
$array = apply_filters("wplc_filter_user_long_poll_chat_loop_iteration",$array,$_POST,$i,$cdata);
|
251 |
+
|
252 |
+
|
253 |
+
if($new_status == $_POST['status']){ // if status matches do the following
|
254 |
+
if( intval( $_POST['status'] ) != 2){
|
255 |
+
/* check if session_variable is different? if yes then stop this script completely. */
|
256 |
+
if (isset($_POST['wplcsession']) && $_POST['wplcsession'] != '' && $i > 1) {
|
257 |
+
$wplc_session_variable = sanitize_text_field($_POST['wplcsession']);
|
258 |
+
$current_session_variable = wplc_return_chat_session_variable(sanitize_text_field($_POST['cid']));
|
259 |
+
if ($current_session_variable != "" && $current_session_variable != $wplc_session_variable) {
|
260 |
+
/* stop this script */
|
261 |
+
$array['status'] = 11;
|
262 |
+
echo json_encode($array);
|
263 |
+
die();
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
|
268 |
+
if ($i == 1) {
|
269 |
+
if (intval( $_POST['status'] ) != 12) {
|
270 |
+
/* we dont want to update the time if the user was not answered by the agent as this needs to eventually time out and become a "missed chat" - status: 0 */
|
271 |
+
wplc_update_user_on_page(sanitize_text_field($_POST['cid']), sanitize_text_field($_POST['status']), sanitize_text_field($_POST['wplcsession']));
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
if ( intval( $_POST['status'] ) == 0 || intval($_POST['status'] ) == 12 ){ // browsing - user tried to chat but admin didn't answer so turn back to browsing
|
277 |
+
//wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 0, sanitize_text_field($_POST['wplcsession']));
|
278 |
+
//$array['status'] = 5;
|
279 |
+
$array['status'] = 12;
|
280 |
+
//$array['check'] = true;
|
281 |
+
|
282 |
+
}
|
283 |
+
else if( intval($_POST['status'] ) == 3 || intval($_POST['status'] ) == 10){
|
284 |
+
//wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 3);
|
285 |
+
$messages = wplc_return_user_chat_messages(sanitize_text_field($_POST['cid']),$wplc_settings,$cdata);
|
286 |
+
if ( intval( $_POST['status'] ) == 10 ) {
|
287 |
+
$array['alert'] = true;
|
288 |
+
}
|
289 |
+
if ($messages){
|
290 |
+
wplc_mark_as_read_user_chat_messages( sanitize_text_field($_POST['cid']) );
|
291 |
+
$array['status'] = 3;
|
292 |
+
$array['data'] = $messages;
|
293 |
+
$array['check'] = true;
|
294 |
+
}
|
295 |
+
}
|
296 |
+
else if(intval($_POST['status']) == 2){
|
297 |
+
//wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 3);
|
298 |
+
$messages = wplc_return_user_chat_messages(sanitize_text_field($_POST['cid']),$wplc_settings,$cdata);
|
299 |
+
$array['debug'] = "we are here ".__LINE__;
|
300 |
+
if ($messages){
|
301 |
+
wplc_mark_as_read_user_chat_messages(sanitize_text_field($_POST['cid']));
|
302 |
+
$array['status'] = 2;
|
303 |
+
$array['data'] = $messages;
|
304 |
+
$array['check'] = true;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
else if( intval( $new_status ) == 12){ // no answer from admin, for the second+ time.
|
308 |
+
$array['data'] = wplc_return_no_answer_string(sanitize_text_field($_POST['cid']));
|
309 |
+
$array['check'] = true;
|
310 |
+
@do_action("wplc_hook_missed_chat",array("cid" => $_POST['cid'],"name" => $_POST['wplc_name'],"email" => $_POST['wplc_email']));
|
311 |
+
|
312 |
+
}
|
313 |
+
|
314 |
+
|
315 |
+
/* check if this is part of the first run */
|
316 |
+
if (isset($_POST['first_run']) && sanitize_text_field($_POST['first_run']) == 1) {
|
317 |
+
/* if yes, then send data now and dont wait for all iterations to complete */
|
318 |
+
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
319 |
+
$array['check'] = true;
|
320 |
+
}
|
321 |
+
else if (isset($_POST['short_poll']) && sanitize_text_field($_POST['short_poll']) == "true") {
|
322 |
+
/* if yes, then send data now and dont wait for all iterations to complete */
|
323 |
+
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
324 |
+
$array['check'] = true;
|
325 |
+
}
|
326 |
+
} else { // statuses do not match
|
327 |
+
|
328 |
+
$array['debug'] = $array['debug']. " ". "Doesnt match $new_status ".$_POST['status'];
|
329 |
+
$array['status'] = $new_status;
|
330 |
+
if( intval( $new_status ) == 1 ){ // completed
|
331 |
+
wplc_update_user_on_page( sanitize_text_field( $_POST['cid'] ), 8, sanitize_text_field( $_POST['wplcsession'] ) );
|
332 |
+
$array['check'] = true;
|
333 |
+
$array['status'] = 8;
|
334 |
+
$array['data'] = array();
|
335 |
+
$array['data'][9999] = array();
|
336 |
+
$array['data'][9999]['msg'] = __("Admin has closed and ended the chat","wplivechat");
|
337 |
+
|
338 |
+
}
|
339 |
+
else if( intval( $new_status ) == 2 ) { // pending
|
340 |
+
$array['debug'] = "we are here ".__LINE__;
|
341 |
+
$array['check'] = true;
|
342 |
+
$array['wplc_name'] = wplc_return_chat_name( sanitize_text_field($_POST['cid'] ) );
|
343 |
+
$array['wplc_email'] = wplc_return_chat_email( sanitize_text_field($_POST['cid'] ) );
|
344 |
+
$messages = wplc_return_chat_messages( sanitize_text_field($_POST['cid']), false, true, $wplc_settings, $cdata, 'array', false );
|
345 |
+
if ($messages){
|
346 |
+
$array['data'] = $messages;
|
347 |
+
}
|
348 |
+
}
|
349 |
+
else if( intval( $new_status ) == 3 ){ // active
|
350 |
+
$array['data'] = null;
|
351 |
+
$array['check'] = true;
|
352 |
+
|
353 |
+
if($_POST['status'] == 5 || $_POST['status'] == 3){
|
354 |
+
$array['sound'] = false;
|
355 |
+
$messages = wplc_return_chat_messages(sanitize_text_field($_POST['cid']),false,true,$wplc_settings,$cdata,'array',false);
|
356 |
+
if ($messages){
|
357 |
+
$array['data'] = $messages;
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
+
else if( intval( $new_status ) == 7){ // timed out
|
362 |
+
wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 5, sanitize_text_field($_POST['wplcsession']));
|
363 |
+
}
|
364 |
+
else if( intval( $new_status ) == 9){ // user closed chat without inputting or starting a chat
|
365 |
+
$array['check'] = true;
|
366 |
+
}
|
367 |
+
else if( intval( $new_status ) == 12){ // no answer from admin
|
368 |
+
|
369 |
+
$array['data'] = wplc_return_no_answer_string(sanitize_text_field($_POST['cid']));
|
370 |
+
$array['check'] = true;
|
371 |
+
wplc_update_user_on_page(sanitize_text_field($_POST['cid']), 12, sanitize_text_field($_POST['wplcsession']));
|
372 |
+
@do_action("wplc_hook_missed_chat",array("cid" => $_POST['cid'],"name" => $_POST['wplc_name'],"email" => $_POST['wplc_email']));
|
373 |
+
|
374 |
+
}
|
375 |
+
else if( intval( $new_status ) == 10 ) { // minimized active chat
|
376 |
+
$array['check'] = true;
|
377 |
+
if($_POST['status'] == 5){
|
378 |
+
$messages = wplc_return_chat_messages(sanitize_text_field($_POST['cid']),false,true,$wplc_settings,$cdata,'array',false);
|
379 |
+
if ($messages){
|
380 |
+
$array['data'] = $messages;
|
381 |
+
}
|
382 |
+
}
|
383 |
+
}
|
384 |
+
/* check if this is part of the first run */
|
385 |
+
if (isset($_POST['first_run']) && sanitize_text_field($_POST['first_run']) == "1") {
|
386 |
+
/* if yes, then send data now and dont wait for all iterations to complete */
|
387 |
+
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
388 |
+
$array['check'] = true;
|
389 |
+
}
|
390 |
+
else if (isset($_POST['short_poll']) && sanitize_text_field($_POST['short_poll']) == "true") {
|
391 |
+
/* if yes, then send data now and dont wait for all iterations to complete */
|
392 |
+
if (!isset($array['status'])) { $array['status'] = $new_status; }
|
393 |
+
$array['check'] = true;
|
394 |
+
}
|
395 |
+
$array = apply_filters("wplc_filter_wplc_call_to_server_visitor_new_status_check",$array);
|
396 |
+
|
397 |
+
}
|
398 |
+
}
|
399 |
+
if($array['check'] == true){
|
400 |
+
echo json_encode($array);
|
401 |
+
break;
|
402 |
+
}
|
403 |
+
$i++;
|
404 |
+
|
405 |
+
if (defined('WPLC_DELAY_BETWEEN_LOOPS')) { usleep(WPLC_DELAY_BETWEEN_LOOPS); } else { usleep(500000); }
|
406 |
+
|
407 |
+
@ob_end_flush();
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
/* */
|
412 |
+
if ($_POST['action'] == "wplc_user_close_chat") {
|
413 |
+
if($_POST['status'] == 5){
|
414 |
+
wplc_change_chat_status(sanitize_text_field($_POST['cid']),9);
|
415 |
+
} else if($_POST['status'] == 3){
|
416 |
+
wplc_change_chat_status(sanitize_text_field($_POST['cid']),8);
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
if ($_POST['action'] == "wplc_user_minimize_chat") {
|
421 |
+
$chat_id = sanitize_text_field($_POST['cid']);
|
422 |
+
wplc_change_chat_status(sanitize_text_field($_POST['cid']),10);
|
423 |
+
}
|
424 |
+
if ($_POST['action'] == "wplc_user_maximize_chat") {
|
425 |
+
$chat_id = sanitize_text_field($_POST['cid']);
|
426 |
+
$chat_status = intval(sanitize_text_field($_POST['chat_status']));
|
427 |
+
wplc_change_chat_status(sanitize_text_field($_POST['cid']),$chat_status);
|
428 |
+
}
|
429 |
+
|
430 |
+
if ($_POST['action'] == "wplc_user_send_msg") {
|
431 |
+
$chat_id = sanitize_text_field($_POST['cid']);
|
432 |
+
$chat_msg = strip_tags($_POST['msg'], '<p><a><img><hr>');
|
433 |
+
$wplc_rec_msg = wplc_record_chat_msg("1",$chat_id,$chat_msg);
|
434 |
+
if ($wplc_rec_msg) {
|
435 |
+
echo 'sent';
|
436 |
+
} else {
|
437 |
+
echo "There was an error sending your chat message. Please contact support";
|
438 |
+
}
|
439 |
+
}
|
440 |
+
if ($_POST['action'] == "wplc_start_chat") {
|
441 |
+
if (isset($_POST['cid'])) {
|
442 |
+
if ($_POST['name'] && $_POST['email']) {
|
443 |
+
echo wplc_user_initiate_chat(sanitize_text_field($_POST['name']),sanitize_email($_POST['email']),sanitize_text_field($_POST['cid']), sanitize_text_field($_POST['wplcsession'])); // echo the chat session id
|
444 |
+
} else {
|
445 |
+
echo "error2";
|
446 |
+
}
|
447 |
+
} else {
|
448 |
+
if ($_POST['name'] && $_POST['email']) {
|
449 |
+
echo wplc_user_initiate_chat(sanitize_text_field($_POST['name']), sanitize_email($_POST['email']), null, sanitize_text_field($_POST['wplcsession'])); // echo the chat session id
|
450 |
+
} else {
|
451 |
+
echo "error2";
|
452 |
+
}
|
453 |
+
}
|
454 |
+
}
|
455 |
+
|
456 |
+
}
|
457 |
+
|
458 |
+
die();
|
459 |
}
|
beep-2.mp3
CHANGED
File without changes
|
css/ace.css
CHANGED
@@ -1,445 +1,445 @@
|
|
1 |
-
.ace_editor {
|
2 |
-
position: relative;
|
3 |
-
overflow: hidden;
|
4 |
-
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
|
5 |
-
direction: ltr;
|
6 |
-
text-align: left;
|
7 |
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
8 |
-
}
|
9 |
-
|
10 |
-
.ace_scroller {
|
11 |
-
position: absolute;
|
12 |
-
overflow: hidden;
|
13 |
-
top: 0;
|
14 |
-
bottom: 0;
|
15 |
-
background-color: inherit;
|
16 |
-
-ms-user-select: none;
|
17 |
-
-moz-user-select: none;
|
18 |
-
-webkit-user-select: none;
|
19 |
-
user-select: none;
|
20 |
-
cursor: text;
|
21 |
-
}
|
22 |
-
|
23 |
-
.ace_content {
|
24 |
-
position: absolute;
|
25 |
-
box-sizing: border-box;
|
26 |
-
min-width: 100%;
|
27 |
-
}
|
28 |
-
|
29 |
-
.ace_dragging .ace_scroller:before{
|
30 |
-
position: absolute;
|
31 |
-
top: 0;
|
32 |
-
left: 0;
|
33 |
-
right: 0;
|
34 |
-
bottom: 0;
|
35 |
-
content: '';
|
36 |
-
background: rgba(250, 250, 250, 0.01);
|
37 |
-
z-index: 1000;
|
38 |
-
}
|
39 |
-
.ace_dragging.ace_dark .ace_scroller:before{
|
40 |
-
background: rgba(0, 0, 0, 0.01);
|
41 |
-
}
|
42 |
-
|
43 |
-
.ace_selecting, .ace_selecting * {
|
44 |
-
cursor: text !important;
|
45 |
-
}
|
46 |
-
|
47 |
-
.ace_gutter {
|
48 |
-
position: absolute;
|
49 |
-
overflow : hidden;
|
50 |
-
width: auto;
|
51 |
-
top: 0;
|
52 |
-
bottom: 0;
|
53 |
-
left: 0;
|
54 |
-
cursor: default;
|
55 |
-
z-index: 4;
|
56 |
-
-ms-user-select: none;
|
57 |
-
-moz-user-select: none;
|
58 |
-
-webkit-user-select: none;
|
59 |
-
user-select: none;
|
60 |
-
}
|
61 |
-
|
62 |
-
.ace_gutter-active-line {
|
63 |
-
position: absolute;
|
64 |
-
left: 0;
|
65 |
-
right: 0;
|
66 |
-
}
|
67 |
-
|
68 |
-
.ace_scroller.ace_scroll-left {
|
69 |
-
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
70 |
-
}
|
71 |
-
|
72 |
-
.ace_gutter-cell {
|
73 |
-
padding-left: 19px;
|
74 |
-
padding-right: 6px;
|
75 |
-
background-repeat: no-repeat;
|
76 |
-
}
|
77 |
-
|
78 |
-
.ace_gutter-cell.ace_error {
|
79 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
80 |
-
background-repeat: no-repeat;
|
81 |
-
background-position: 2px center;
|
82 |
-
}
|
83 |
-
|
84 |
-
.ace_gutter-cell.ace_warning {
|
85 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
86 |
-
background-position: 2px center;
|
87 |
-
}
|
88 |
-
|
89 |
-
.ace_gutter-cell.ace_info {
|
90 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
91 |
-
background-position: 2px center;
|
92 |
-
}
|
93 |
-
.ace_dark .ace_gutter-cell.ace_info {
|
94 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
95 |
-
}
|
96 |
-
|
97 |
-
.ace_scrollbar {
|
98 |
-
position: absolute;
|
99 |
-
right: 0;
|
100 |
-
bottom: 0;
|
101 |
-
z-index: 6;
|
102 |
-
}
|
103 |
-
|
104 |
-
.ace_scrollbar-inner {
|
105 |
-
position: absolute;
|
106 |
-
cursor: text;
|
107 |
-
left: 0;
|
108 |
-
top: 0;
|
109 |
-
}
|
110 |
-
|
111 |
-
.ace_scrollbar-v{
|
112 |
-
overflow-x: hidden;
|
113 |
-
overflow-y: scroll;
|
114 |
-
top: 0;
|
115 |
-
}
|
116 |
-
|
117 |
-
.ace_scrollbar-h {
|
118 |
-
overflow-x: scroll;
|
119 |
-
overflow-y: hidden;
|
120 |
-
left: 0;
|
121 |
-
}
|
122 |
-
|
123 |
-
.ace_print-margin {
|
124 |
-
position: absolute;
|
125 |
-
height: 100%;
|
126 |
-
}
|
127 |
-
|
128 |
-
.ace_text-input {
|
129 |
-
position: absolute;
|
130 |
-
z-index: 0;
|
131 |
-
width: 0.5em;
|
132 |
-
height: 1em;
|
133 |
-
opacity: 0;
|
134 |
-
background: transparent;
|
135 |
-
-moz-appearance: none;
|
136 |
-
appearance: none;
|
137 |
-
border: none;
|
138 |
-
resize: none;
|
139 |
-
outline: none;
|
140 |
-
overflow: hidden;
|
141 |
-
font: inherit;
|
142 |
-
padding: 0 1px;
|
143 |
-
margin: 0 -1px;
|
144 |
-
text-indent: -1em;
|
145 |
-
-ms-user-select: text;
|
146 |
-
-moz-user-select: text;
|
147 |
-
-webkit-user-select: text;
|
148 |
-
user-select: text;
|
149 |
-
/*with `pre-line` chrome inserts instead of space*/
|
150 |
-
white-space: pre!important;
|
151 |
-
}
|
152 |
-
|
153 |
-
.ace_text-input.ace_composition {
|
154 |
-
background: inherit;
|
155 |
-
color: inherit;
|
156 |
-
z-index: 1000;
|
157 |
-
opacity: 1;
|
158 |
-
text-indent: 0;
|
159 |
-
}
|
160 |
-
|
161 |
-
.ace_layer {
|
162 |
-
z-index: 1;
|
163 |
-
position: absolute;
|
164 |
-
overflow: hidden;
|
165 |
-
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
166 |
-
word-wrap: normal;
|
167 |
-
white-space: pre;
|
168 |
-
height: 100%;
|
169 |
-
width: 100%;
|
170 |
-
box-sizing: border-box;
|
171 |
-
/* setting pointer-events: auto; on node under the mouse, which changes
|
172 |
-
during scroll, will break mouse wheel scrolling in Safari */
|
173 |
-
pointer-events: none;
|
174 |
-
}
|
175 |
-
|
176 |
-
.ace_gutter-layer {
|
177 |
-
position: relative;
|
178 |
-
width: auto;
|
179 |
-
text-align: right;
|
180 |
-
pointer-events: auto;
|
181 |
-
}
|
182 |
-
|
183 |
-
.ace_text-layer {
|
184 |
-
font: inherit !important;
|
185 |
-
}
|
186 |
-
|
187 |
-
.ace_cjk {
|
188 |
-
display: inline-block;
|
189 |
-
text-align: center;
|
190 |
-
}
|
191 |
-
|
192 |
-
.ace_cursor-layer {
|
193 |
-
z-index: 4;
|
194 |
-
}
|
195 |
-
|
196 |
-
.ace_cursor {
|
197 |
-
z-index: 4;
|
198 |
-
position: absolute;
|
199 |
-
box-sizing: border-box;
|
200 |
-
border-left: 2px solid;
|
201 |
-
/* workaround for smooth cursor repaintng whole screen in chrome */
|
202 |
-
transform: translatez(0);
|
203 |
-
}
|
204 |
-
|
205 |
-
.ace_multiselect .ace_cursor {
|
206 |
-
border-left-width: 1px;
|
207 |
-
}
|
208 |
-
|
209 |
-
.ace_slim-cursors .ace_cursor {
|
210 |
-
border-left-width: 1px;
|
211 |
-
}
|
212 |
-
|
213 |
-
.ace_overwrite-cursors .ace_cursor {
|
214 |
-
border-left-width: 0;
|
215 |
-
border-bottom: 1px solid;
|
216 |
-
}
|
217 |
-
|
218 |
-
.ace_hidden-cursors .ace_cursor {
|
219 |
-
opacity: 0.2;
|
220 |
-
}
|
221 |
-
|
222 |
-
.ace_smooth-blinking .ace_cursor {
|
223 |
-
transition: opacity 0.18s;
|
224 |
-
}
|
225 |
-
|
226 |
-
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
227 |
-
position: absolute;
|
228 |
-
z-index: 3;
|
229 |
-
}
|
230 |
-
|
231 |
-
.ace_marker-layer .ace_selection {
|
232 |
-
position: absolute;
|
233 |
-
z-index: 5;
|
234 |
-
}
|
235 |
-
|
236 |
-
.ace_marker-layer .ace_bracket {
|
237 |
-
position: absolute;
|
238 |
-
z-index: 6;
|
239 |
-
}
|
240 |
-
|
241 |
-
.ace_marker-layer .ace_active-line {
|
242 |
-
position: absolute;
|
243 |
-
z-index: 2;
|
244 |
-
}
|
245 |
-
|
246 |
-
.ace_marker-layer .ace_selected-word {
|
247 |
-
position: absolute;
|
248 |
-
z-index: 4;
|
249 |
-
box-sizing: border-box;
|
250 |
-
}
|
251 |
-
|
252 |
-
.ace_line .ace_fold {
|
253 |
-
box-sizing: border-box;
|
254 |
-
|
255 |
-
display: inline-block;
|
256 |
-
height: 11px;
|
257 |
-
margin-top: -2px;
|
258 |
-
vertical-align: middle;
|
259 |
-
|
260 |
-
background-image:
|
261 |
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
262 |
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
263 |
-
background-repeat: no-repeat, repeat-x;
|
264 |
-
background-position: center center, top left;
|
265 |
-
color: transparent;
|
266 |
-
|
267 |
-
border: 1px solid black;
|
268 |
-
border-radius: 2px;
|
269 |
-
|
270 |
-
cursor: pointer;
|
271 |
-
pointer-events: auto;
|
272 |
-
}
|
273 |
-
|
274 |
-
.ace_dark .ace_fold {
|
275 |
-
}
|
276 |
-
|
277 |
-
.ace_fold:hover{
|
278 |
-
background-image:
|
279 |
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
280 |
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
281 |
-
}
|
282 |
-
|
283 |
-
.ace_tooltip {
|
284 |
-
background-color: #FFF;
|
285 |
-
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
|
286 |
-
border: 1px solid gray;
|
287 |
-
border-radius: 1px;
|
288 |
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
289 |
-
color: black;
|
290 |
-
max-width: 100%;
|
291 |
-
padding: 3px 4px;
|
292 |
-
position: fixed;
|
293 |
-
z-index: 999999;
|
294 |
-
box-sizing: border-box;
|
295 |
-
cursor: default;
|
296 |
-
white-space: pre;
|
297 |
-
word-wrap: break-word;
|
298 |
-
line-height: normal;
|
299 |
-
font-style: normal;
|
300 |
-
font-weight: normal;
|
301 |
-
letter-spacing: normal;
|
302 |
-
pointer-events: none;
|
303 |
-
}
|
304 |
-
|
305 |
-
.ace_folding-enabled > .ace_gutter-cell {
|
306 |
-
padding-right: 13px;
|
307 |
-
}
|
308 |
-
|
309 |
-
.ace_fold-widget {
|
310 |
-
box-sizing: border-box;
|
311 |
-
|
312 |
-
margin: 0 -12px 0 1px;
|
313 |
-
display: none;
|
314 |
-
width: 11px;
|
315 |
-
vertical-align: top;
|
316 |
-
|
317 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
318 |
-
background-repeat: no-repeat;
|
319 |
-
background-position: center;
|
320 |
-
|
321 |
-
border-radius: 3px;
|
322 |
-
|
323 |
-
border: 1px solid transparent;
|
324 |
-
cursor: pointer;
|
325 |
-
}
|
326 |
-
|
327 |
-
.ace_folding-enabled .ace_fold-widget {
|
328 |
-
display: inline-block;
|
329 |
-
}
|
330 |
-
|
331 |
-
.ace_fold-widget.ace_end {
|
332 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
333 |
-
}
|
334 |
-
|
335 |
-
.ace_fold-widget.ace_closed {
|
336 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
337 |
-
}
|
338 |
-
|
339 |
-
.ace_fold-widget:hover {
|
340 |
-
border: 1px solid rgba(0, 0, 0, 0.3);
|
341 |
-
background-color: rgba(255, 255, 255, 0.2);
|
342 |
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
343 |
-
}
|
344 |
-
|
345 |
-
.ace_fold-widget:active {
|
346 |
-
border: 1px solid rgba(0, 0, 0, 0.4);
|
347 |
-
background-color: rgba(0, 0, 0, 0.05);
|
348 |
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
349 |
-
}
|
350 |
-
/**
|
351 |
-
* Dark version for fold widgets
|
352 |
-
*/
|
353 |
-
.ace_dark .ace_fold-widget {
|
354 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
355 |
-
}
|
356 |
-
.ace_dark .ace_fold-widget.ace_end {
|
357 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
358 |
-
}
|
359 |
-
.ace_dark .ace_fold-widget.ace_closed {
|
360 |
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
361 |
-
}
|
362 |
-
.ace_dark .ace_fold-widget:hover {
|
363 |
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
364 |
-
background-color: rgba(255, 255, 255, 0.1);
|
365 |
-
}
|
366 |
-
.ace_dark .ace_fold-widget:active {
|
367 |
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
368 |
-
}
|
369 |
-
|
370 |
-
.ace_fold-widget.ace_invalid {
|
371 |
-
background-color: #FFB4B4;
|
372 |
-
border-color: #DE5555;
|
373 |
-
}
|
374 |
-
|
375 |
-
.ace_fade-fold-widgets .ace_fold-widget {
|
376 |
-
transition: opacity 0.4s ease 0.05s;
|
377 |
-
opacity: 0;
|
378 |
-
}
|
379 |
-
|
380 |
-
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
381 |
-
transition: opacity 0.05s ease 0.05s;
|
382 |
-
opacity:1;
|
383 |
-
}
|
384 |
-
|
385 |
-
.ace_underline {
|
386 |
-
text-decoration: underline;
|
387 |
-
}
|
388 |
-
|
389 |
-
.ace_bold {
|
390 |
-
font-weight: bold;
|
391 |
-
}
|
392 |
-
|
393 |
-
.ace_nobold .ace_bold {
|
394 |
-
font-weight: normal;
|
395 |
-
}
|
396 |
-
|
397 |
-
.ace_italic {
|
398 |
-
font-style: italic;
|
399 |
-
}
|
400 |
-
|
401 |
-
|
402 |
-
.ace_error-marker {
|
403 |
-
background-color: rgba(255, 0, 0,0.2);
|
404 |
-
position: absolute;
|
405 |
-
z-index: 9;
|
406 |
-
}
|
407 |
-
|
408 |
-
.ace_highlight-marker {
|
409 |
-
background-color: rgba(255, 255, 0,0.2);
|
410 |
-
position: absolute;
|
411 |
-
z-index: 8;
|
412 |
-
}
|
413 |
-
|
414 |
-
/*
|
415 |
-
styles = []
|
416 |
-
for (var i = 1; i < 16; i++) {
|
417 |
-
styles.push(".ace_br" + i + "{" + (
|
418 |
-
["top-left", "top-right", "bottom-right", "bottom-left"]
|
419 |
-
).map(function(x, j) {
|
420 |
-
return i & (1<<j) ? "border-" + x + "-radius: 3px;" : ""
|
421 |
-
}).filter(Boolean).join(" ") + "}")
|
422 |
-
}
|
423 |
-
styles.join("\n")
|
424 |
-
*/
|
425 |
-
.ace_br1 {border-top-left-radius : 3px;}
|
426 |
-
.ace_br2 {border-top-right-radius : 3px;}
|
427 |
-
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
428 |
-
.ace_br4 {border-bottom-right-radius: 3px;}
|
429 |
-
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
430 |
-
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
431 |
-
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
432 |
-
.ace_br8 {border-bottom-left-radius : 3px;}
|
433 |
-
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
434 |
-
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
435 |
-
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
436 |
-
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
437 |
-
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
438 |
-
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
439 |
-
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
440 |
-
|
441 |
-
.ace_text-input-ios {
|
442 |
-
position: absolute !important;
|
443 |
-
top: -100000px !important;
|
444 |
-
left: -100000px !important;
|
445 |
-
}
|
1 |
+
.ace_editor {
|
2 |
+
position: relative;
|
3 |
+
overflow: hidden;
|
4 |
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
|
5 |
+
direction: ltr;
|
6 |
+
text-align: left;
|
7 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
8 |
+
}
|
9 |
+
|
10 |
+
.ace_scroller {
|
11 |
+
position: absolute;
|
12 |
+
overflow: hidden;
|
13 |
+
top: 0;
|
14 |
+
bottom: 0;
|
15 |
+
background-color: inherit;
|
16 |
+
-ms-user-select: none;
|
17 |
+
-moz-user-select: none;
|
18 |
+
-webkit-user-select: none;
|
19 |
+
user-select: none;
|
20 |
+
cursor: text;
|
21 |
+
}
|
22 |
+
|
23 |
+
.ace_content {
|
24 |
+
position: absolute;
|
25 |
+
box-sizing: border-box;
|
26 |
+
min-width: 100%;
|
27 |
+
}
|
28 |
+
|
29 |
+
.ace_dragging .ace_scroller:before{
|
30 |
+
position: absolute;
|
31 |
+
top: 0;
|
32 |
+
left: 0;
|
33 |
+
right: 0;
|
34 |
+
bottom: 0;
|
35 |
+
content: '';
|
36 |
+
background: rgba(250, 250, 250, 0.01);
|
37 |
+
z-index: 1000;
|
38 |
+
}
|
39 |
+
.ace_dragging.ace_dark .ace_scroller:before{
|
40 |
+
background: rgba(0, 0, 0, 0.01);
|
41 |
+
}
|
42 |
+
|
43 |
+
.ace_selecting, .ace_selecting * {
|
44 |
+
cursor: text !important;
|
45 |
+
}
|
46 |
+
|
47 |
+
.ace_gutter {
|
48 |
+
position: absolute;
|
49 |
+
overflow : hidden;
|
50 |
+
width: auto;
|
51 |
+
top: 0;
|
52 |
+
bottom: 0;
|
53 |
+
left: 0;
|
54 |
+
cursor: default;
|
55 |
+
z-index: 4;
|
56 |
+
-ms-user-select: none;
|
57 |
+
-moz-user-select: none;
|
58 |
+
-webkit-user-select: none;
|
59 |
+
user-select: none;
|
60 |
+
}
|
61 |
+
|
62 |
+
.ace_gutter-active-line {
|
63 |
+
position: absolute;
|
64 |
+
left: 0;
|
65 |
+
right: 0;
|
66 |
+
}
|
67 |
+
|
68 |
+
.ace_scroller.ace_scroll-left {
|
69 |
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
70 |
+
}
|
71 |
+
|
72 |
+
.ace_gutter-cell {
|
73 |
+
padding-left: 19px;
|
74 |
+
padding-right: 6px;
|
75 |
+
background-repeat: no-repeat;
|
76 |
+
}
|
77 |
+
|
78 |
+
.ace_gutter-cell.ace_error {
|
79 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
80 |
+
background-repeat: no-repeat;
|
81 |
+
background-position: 2px center;
|
82 |
+
}
|
83 |
+
|
84 |
+
.ace_gutter-cell.ace_warning {
|
85 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
86 |
+
background-position: 2px center;
|
87 |
+
}
|
88 |
+
|
89 |
+
.ace_gutter-cell.ace_info {
|
90 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
91 |
+
background-position: 2px center;
|
92 |
+
}
|
93 |
+
.ace_dark .ace_gutter-cell.ace_info {
|
94 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
95 |
+
}
|
96 |
+
|
97 |
+
.ace_scrollbar {
|
98 |
+
position: absolute;
|
99 |
+
right: 0;
|
100 |
+
bottom: 0;
|
101 |
+
z-index: 6;
|
102 |
+
}
|
103 |
+
|
104 |
+
.ace_scrollbar-inner {
|
105 |
+
position: absolute;
|
106 |
+
cursor: text;
|
107 |
+
left: 0;
|
108 |
+
top: 0;
|
109 |
+
}
|
110 |
+
|
111 |
+
.ace_scrollbar-v{
|
112 |
+
overflow-x: hidden;
|
113 |
+
overflow-y: scroll;
|
114 |
+
top: 0;
|
115 |
+
}
|
116 |
+
|
117 |
+
.ace_scrollbar-h {
|
118 |
+
overflow-x: scroll;
|
119 |
+
overflow-y: hidden;
|
120 |
+
left: 0;
|
121 |
+
}
|
122 |
+
|
123 |
+
.ace_print-margin {
|
124 |
+
position: absolute;
|
125 |
+
height: 100%;
|
126 |
+
}
|
127 |
+
|
128 |
+
.ace_text-input {
|
129 |
+
position: absolute;
|
130 |
+
z-index: 0;
|
131 |
+
width: 0.5em;
|
132 |
+
height: 1em;
|
133 |
+
opacity: 0;
|
134 |
+
background: transparent;
|
135 |
+
-moz-appearance: none;
|
136 |
+
appearance: none;
|
137 |
+
border: none;
|
138 |
+
resize: none;
|
139 |
+
outline: none;
|
140 |
+
overflow: hidden;
|
141 |
+
font: inherit;
|
142 |
+
padding: 0 1px;
|
143 |
+
margin: 0 -1px;
|
144 |
+
text-indent: -1em;
|
145 |
+
-ms-user-select: text;
|
146 |
+
-moz-user-select: text;
|
147 |
+
-webkit-user-select: text;
|
148 |
+
user-select: text;
|
149 |
+
/*with `pre-line` chrome inserts instead of space*/
|
150 |
+
white-space: pre!important;
|
151 |
+
}
|
152 |
+
|
153 |
+
.ace_text-input.ace_composition {
|
154 |
+
background: inherit;
|
155 |
+
color: inherit;
|
156 |
+
z-index: 1000;
|
157 |
+
opacity: 1;
|
158 |
+
text-indent: 0;
|
159 |
+
}
|
160 |
+
|
161 |
+
.ace_layer {
|
162 |
+
z-index: 1;
|
163 |
+
position: absolute;
|
164 |
+
overflow: hidden;
|
165 |
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
166 |
+
word-wrap: normal;
|
167 |
+
white-space: pre;
|
168 |
+
height: 100%;
|
169 |
+
width: 100%;
|
170 |
+
box-sizing: border-box;
|
171 |
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
172 |
+
during scroll, will break mouse wheel scrolling in Safari */
|
173 |
+
pointer-events: none;
|
174 |
+
}
|
175 |
+
|
176 |
+
.ace_gutter-layer {
|
177 |
+
position: relative;
|
178 |
+
width: auto;
|
179 |
+
text-align: right;
|
180 |
+
pointer-events: auto;
|
181 |
+
}
|
182 |
+
|
183 |
+
.ace_text-layer {
|
184 |
+
font: inherit !important;
|
185 |
+
}
|
186 |
+
|
187 |
+
.ace_cjk {
|
188 |
+
display: inline-block;
|
189 |
+
text-align: center;
|
190 |
+
}
|
191 |
+
|
192 |
+
.ace_cursor-layer {
|
193 |
+
z-index: 4;
|
194 |
+
}
|
195 |
+
|
196 |
+
.ace_cursor {
|
197 |
+
z-index: 4;
|
198 |
+
position: absolute;
|
199 |
+
box-sizing: border-box;
|
200 |
+
border-left: 2px solid;
|
201 |
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
202 |
+
transform: translatez(0);
|
203 |
+
}
|
204 |
+
|
205 |
+
.ace_multiselect .ace_cursor {
|
206 |
+
border-left-width: 1px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.ace_slim-cursors .ace_cursor {
|
210 |
+
border-left-width: 1px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.ace_overwrite-cursors .ace_cursor {
|
214 |
+
border-left-width: 0;
|
215 |
+
border-bottom: 1px solid;
|
216 |
+
}
|
217 |
+
|
218 |
+
.ace_hidden-cursors .ace_cursor {
|
219 |
+
opacity: 0.2;
|
220 |
+
}
|
221 |
+
|
222 |
+
.ace_smooth-blinking .ace_cursor {
|
223 |
+
transition: opacity 0.18s;
|
224 |
+
}
|
225 |
+
|
226 |
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
227 |
+
position: absolute;
|
228 |
+
z-index: 3;
|
229 |
+
}
|
230 |
+
|
231 |
+
.ace_marker-layer .ace_selection {
|
232 |
+
position: absolute;
|
233 |
+
z-index: 5;
|
234 |
+
}
|
235 |
+
|
236 |
+
.ace_marker-layer .ace_bracket {
|
237 |
+
position: absolute;
|
238 |
+
z-index: 6;
|
239 |
+
}
|
240 |
+
|
241 |
+
.ace_marker-layer .ace_active-line {
|
242 |
+
position: absolute;
|
243 |
+
z-index: 2;
|
244 |
+
}
|
245 |
+
|
246 |
+
.ace_marker-layer .ace_selected-word {
|
247 |
+
position: absolute;
|
248 |
+
z-index: 4;
|
249 |
+
box-sizing: border-box;
|
250 |
+
}
|
251 |
+
|
252 |
+
.ace_line .ace_fold {
|
253 |
+
box-sizing: border-box;
|
254 |
+
|
255 |
+
display: inline-block;
|
256 |
+
height: 11px;
|
257 |
+
margin-top: -2px;
|
258 |
+
vertical-align: middle;
|
259 |
+
|
260 |
+
background-image:
|
261 |
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
262 |
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
263 |
+
background-repeat: no-repeat, repeat-x;
|
264 |
+
background-position: center center, top left;
|
265 |
+
color: transparent;
|
266 |
+
|
267 |
+
border: 1px solid black;
|
268 |
+
border-radius: 2px;
|
269 |
+
|
270 |
+
cursor: pointer;
|
271 |
+
pointer-events: auto;
|
272 |
+
}
|
273 |
+
|
274 |
+
.ace_dark .ace_fold {
|
275 |
+
}
|
276 |
+
|
277 |
+
.ace_fold:hover{
|
278 |
+
background-image:
|
279 |
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
280 |
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
281 |
+
}
|
282 |
+
|
283 |
+
.ace_tooltip {
|
284 |
+
background-color: #FFF;
|
285 |
+
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
|
286 |
+
border: 1px solid gray;
|
287 |
+
border-radius: 1px;
|
288 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
289 |
+
color: black;
|
290 |
+
max-width: 100%;
|
291 |
+
padding: 3px 4px;
|
292 |
+
position: fixed;
|
293 |
+
z-index: 999999;
|
294 |
+
box-sizing: border-box;
|
295 |
+
cursor: default;
|
296 |
+
white-space: pre;
|
297 |
+
word-wrap: break-word;
|
298 |
+
line-height: normal;
|
299 |
+
font-style: normal;
|
300 |
+
font-weight: normal;
|
301 |
+
letter-spacing: normal;
|
302 |
+
pointer-events: none;
|
303 |
+
}
|
304 |
+
|
305 |
+
.ace_folding-enabled > .ace_gutter-cell {
|
306 |
+
padding-right: 13px;
|
307 |
+
}
|
308 |
+
|
309 |
+
.ace_fold-widget {
|
310 |
+
box-sizing: border-box;
|
311 |
+
|
312 |
+
margin: 0 -12px 0 1px;
|
313 |
+
display: none;
|
314 |
+
width: 11px;
|
315 |
+
vertical-align: top;
|
316 |
+
|
317 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
318 |
+
background-repeat: no-repeat;
|
319 |
+
background-position: center;
|
320 |
+
|
321 |
+
border-radius: 3px;
|
322 |
+
|
323 |
+
border: 1px solid transparent;
|
324 |
+
cursor: pointer;
|
325 |
+
}
|
326 |
+
|
327 |
+
.ace_folding-enabled .ace_fold-widget {
|
328 |
+
display: inline-block;
|
329 |
+
}
|
330 |
+
|
331 |
+
.ace_fold-widget.ace_end {
|
332 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
333 |
+
}
|
334 |
+
|
335 |
+
.ace_fold-widget.ace_closed {
|
336 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
337 |
+
}
|
338 |
+
|
339 |
+
.ace_fold-widget:hover {
|
340 |
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
341 |
+
background-color: rgba(255, 255, 255, 0.2);
|
342 |
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
343 |
+
}
|
344 |
+
|
345 |
+
.ace_fold-widget:active {
|
346 |
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
347 |
+
background-color: rgba(0, 0, 0, 0.05);
|
348 |
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
349 |
+
}
|
350 |
+
/**
|
351 |
+
* Dark version for fold widgets
|
352 |
+
*/
|
353 |
+
.ace_dark .ace_fold-widget {
|
354 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
355 |
+
}
|
356 |
+
.ace_dark .ace_fold-widget.ace_end {
|
357 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
358 |
+
}
|
359 |
+
.ace_dark .ace_fold-widget.ace_closed {
|
360 |
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
361 |
+
}
|
362 |
+
.ace_dark .ace_fold-widget:hover {
|
363 |
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
364 |
+
background-color: rgba(255, 255, 255, 0.1);
|
365 |
+
}
|
366 |
+
.ace_dark .ace_fold-widget:active {
|
367 |
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
368 |
+
}
|
369 |
+
|
370 |
+
.ace_fold-widget.ace_invalid {
|
371 |
+
background-color: #FFB4B4;
|
372 |
+
border-color: #DE5555;
|
373 |
+
}
|
374 |
+
|
375 |
+
.ace_fade-fold-widgets .ace_fold-widget {
|
376 |
+
transition: opacity 0.4s ease 0.05s;
|
377 |
+
opacity: 0;
|
378 |
+
}
|
379 |
+
|
380 |
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
381 |
+
transition: opacity 0.05s ease 0.05s;
|
382 |
+
opacity:1;
|
383 |
+
}
|
384 |
+
|
385 |
+
.ace_underline {
|
386 |
+
text-decoration: underline;
|
387 |
+
}
|
388 |
+
|
389 |
+
.ace_bold {
|
390 |
+
font-weight: bold;
|
391 |
+
}
|
392 |
+
|
393 |
+
.ace_nobold .ace_bold {
|
394 |
+
font-weight: normal;
|
395 |
+
}
|
396 |
+
|
397 |
+
.ace_italic {
|
398 |
+
font-style: italic;
|
399 |
+
}
|
400 |
+
|
401 |
+
|
402 |
+
.ace_error-marker {
|
403 |
+
background-color: rgba(255, 0, 0,0.2);
|
404 |
+
position: absolute;
|
405 |
+
z-index: 9;
|
406 |
+
}
|
407 |
+
|
408 |
+
.ace_highlight-marker {
|
409 |
+
background-color: rgba(255, 255, 0,0.2);
|
410 |
+
position: absolute;
|
411 |
+
z-index: 8;
|
412 |
+
}
|
413 |
+
|
414 |
+
/*
|
415 |
+
styles = []
|
416 |
+
for (var i = 1; i < 16; i++) {
|
417 |
+
styles.push(".ace_br" + i + "{" + (
|
418 |
+
["top-left", "top-right", "bottom-right", "bottom-left"]
|
419 |
+
).map(function(x, j) {
|
420 |
+
return i & (1<<j) ? "border-" + x + "-radius: 3px;" : ""
|
421 |
+
}).filter(Boolean).join(" ") + "}")
|
422 |
+
}
|
423 |
+
styles.join("\n")
|
424 |
+
*/
|
425 |
+
.ace_br1 {border-top-left-radius : 3px;}
|
426 |
+
.ace_br2 {border-top-right-radius : 3px;}
|
427 |
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
428 |
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
429 |
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
430 |
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
431 |
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
432 |
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
433 |
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
434 |
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
435 |
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
436 |
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
437 |
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
438 |
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
439 |
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
440 |
+
|
441 |
+
.ace_text-input-ios {
|
442 |
+
position: absolute !important;
|
443 |
+
top: -100000px !important;
|
444 |
+
left: -100000px !important;
|
445 |
+
}
|
css/admin-chat-box-style.css
CHANGED
File without changes
|
css/admin-chat-style.css
CHANGED
@@ -1,444 +1,443 @@
|
|
1 |
-
/**
|
2 |
-
* Chat page, header section, user info
|
3 |
-
*/
|
4 |
-
#nifty_wrapper .user_header_wrapper_info {
|
5 |
-
display: block;
|
6 |
-
position: relative;
|
7 |
-
top: -8px;
|
8 |
-
float: left;
|
9 |
-
width: 60% !important;
|
10 |
-
height: calc(100% + 1px);
|
11 |
-
padding: 8px;
|
12 |
-
overflow-x: hidden;
|
13 |
-
overflow-y: auto;
|
14 |
-
font-size: 0.9em;
|
15 |
-
line-height: 1em;
|
16 |
-
background-color: #fefefe;
|
17 |
-
border-radius: 3px;
|
18 |
-
}
|
19 |
-
|
20 |
-
#nifty_wrapper .user_header_wrapper_info h3 {
|
21 |
-
font-size: 1.5em;
|
22 |
-
margin-top:0px;
|
23 |
-
margin-bottom:8px;
|
24 |
-
}
|
25 |
-
#nifty_wrapper .user_header_wrapper_info h4 {
|
26 |
-
font-size: 1.3em;
|
27 |
-
margin-bottom:8px;
|
28 |
-
}
|
29 |
-
#nifty_wrapper .user_header_wrapper_info p {
|
30 |
-
font-size: 1em;
|
31 |
-
margin-bottom:0px;
|
32 |
-
}
|
33 |
-
|
34 |
-
/* Join chat button */
|
35 |
-
#nifty_wrapper .bleeper_join_chat_div button {
|
36 |
-
position: relative;
|
37 |
-
left: 33.3%;
|
38 |
-
top: 15px;
|
39 |
-
width: 33.3%;
|
40 |
-
background-color: #ed832f;
|
41 |
-
border: 1px solid #e2731b;
|
42 |
-
color: #fafafa;
|
43 |
-
font-weight: 600;
|
44 |
-
font-size: 1.2em;
|
45 |
-
}
|
46 |
-
|
47 |
-
@media(max-width:767px) {
|
48 |
-
|
49 |
-
/* Chat page, header section, user info */
|
50 |
-
#nifty_wrapper .user_header_wrapper_info h3,
|
51 |
-
#nifty_wrapper .user_header_wrapper_info h4,
|
52 |
-
#nifty_wrapper .user_header_wrapper_info p {
|
53 |
-
line-height:1;
|
54 |
-
}
|
55 |
-
#nifty_wrapper .user_header_wrapper_info h3 {
|
56 |
-
font-size: 1em;
|
57 |
-
}
|
58 |
-
#nifty_wrapper .user_header_wrapper_info h4 {
|
59 |
-
font-size: 0.9em;
|
60 |
-
}
|
61 |
-
#nifty_wrapper .user_header_wrapper_info p {
|
62 |
-
font-size: 0.9em;
|
63 |
-
}
|
64 |
-
|
65 |
-
#nifty_wrapper .user_header_wrapper_info h3 a,
|
66 |
-
#nifty_wrapper .user_header_wrapper_info h4 a,
|
67 |
-
#nifty_wrapper .user_header_wrapper_info p a {
|
68 |
-
display: block;
|
69 |
-
margin-top: 0px;
|
70 |
-
word-wrap: break-word;
|
71 |
-
line-height: 1em;
|
72 |
-
}
|
73 |
-
|
74 |
-
#nifty_wrapper .user_header_wrapper_info .chatInfoArea-Email:before {
|
75 |
-
display: inline-block;
|
76 |
-
position: relative;
|
77 |
-
left: 0px;
|
78 |
-
top: 0px;
|
79 |
-
margin-right:5px;
|
80 |
-
content:"email: ";
|
81 |
-
}
|
82 |
-
|
83 |
-
/* Chat page, header section, buttons */
|
84 |
-
#nifty_wrapper .eventbox {
|
85 |
-
position: absolute;
|
86 |
-
right: -3px;
|
87 |
-
top: 80px;
|
88 |
-
}
|
89 |
-
|
90 |
-
#nifty_wrapper span.minChat {
|
91 |
-
margin-top: -5px;
|
92 |
-
}
|
93 |
-
|
94 |
-
}
|
95 |
-
|
96 |
-
@media(max-width:500px) {
|
97 |
-
/* Chat page, header section, user image */
|
98 |
-
#nifty_wrapper .user_header_wrapper_img {
|
99 |
-
display:none;
|
100 |
-
}
|
101 |
-
#nifty_wrapper .user_header_wrapper_info {
|
102 |
-
width: 56% !important;
|
103 |
-
border: 1px solid #f1f1f1;
|
104 |
-
background-color: #fcfcfc;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Admin chat page
|
110 |
-
*/
|
111 |
-
#nifty_wrapper span.minChat {
|
112 |
-
margin-top: 0px;
|
113 |
-
}
|
114 |
-
#nifty_wrapper .chatArea .messages {
|
115 |
-
background-size: cover;
|
116 |
-
border: 1px solid #e6e6e6;
|
117 |
-
}
|
118 |
-
#nifty_wrapper .timedate {
|
119 |
-
display:none;
|
120 |
-
}
|
121 |
-
|
122 |
-
/* System notification messages */
|
123 |
-
#nifty_wrapper .messages .wplc_system_notification {
|
124 |
-
display: block;
|
125 |
-
position: relative;
|
126 |
-
top: 0px;
|
127 |
-
width: 100%;
|
128 |
-
}
|
129 |
-
#nifty_wrapper .messages .wplc_system_notification .messageBody {
|
130 |
-
display: block;
|
131 |
-
position: relative;
|
132 |
-
left: 0px;
|
133 |
-
top: 7px;
|
134 |
-
width: 100%;
|
135 |
-
margin-top: 10px;
|
136 |
-
margin-bottom: 10px;
|
137 |
-
padding: 10px;
|
138 |
-
background-color: #fafafa;
|
139 |
-
border: 1px solid #e6e6e6;
|
140 |
-
border-radius: 5px;
|
141 |
-
color: #555555;
|
142 |
-
line-height:1.2em;
|
143 |
-
}
|
144 |
-
#nifty_wrapper .messages .wplc_system_notification .messageBody .wplc_system_notification {
|
145 |
-
display: inline-block;
|
146 |
-
position: relative;
|
147 |
-
left: 0px;
|
148 |
-
top: 0px;
|
149 |
-
width: auto;
|
150 |
-
height:auto;
|
151 |
-
margin-top: 0px;
|
152 |
-
margin-bottom: 0px;
|
153 |
-
background-color: transparent;
|
154 |
-
border: none;
|
155 |
-
border-radius: 0px;
|
156 |
-
}
|
157 |
-
#nifty_wrapper .messages .wplc_system_notification .messageBody .chat_time {
|
158 |
-
display: block;
|
159 |
-
position: relative;
|
160 |
-
left: 0px;
|
161 |
-
top: 0px;
|
162 |
-
width: 100%;
|
163 |
-
margin-bottom: 5px;
|
164 |
-
font-size: 0.9em;
|
165 |
-
font-weight: 600;
|
166 |
-
color: #555555;
|
167 |
-
}
|
168 |
-
|
169 |
-
/* Admin and user messages */
|
170 |
-
#nifty_wrapper ul.messages {
|
171 |
-
padding-bottom: 35px;
|
172 |
-
}
|
173 |
-
#nifty_wrapper .messages .wplc-admin-message,
|
174 |
-
#nifty_wrapper .messages .wplc-user-message {
|
175 |
-
display: block;
|
176 |
-
position: relative;
|
177 |
-
width: 100%;
|
178 |
-
height: auto;
|
179 |
-
clear: both;
|
180 |
-
}
|
181 |
-
#nifty_wrapper .messages .wplc-admin-message::before,
|
182 |
-
#nifty_wrapper .messages .wplc-user-message::before {
|
183 |
-
display: none;
|
184 |
-
}
|
185 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content,
|
186 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content {
|
187 |
-
margin-top: 2px;
|
188 |
-
margin-bottom: 2px;
|
189 |
-
padding: 10px;
|
190 |
-
}
|
191 |
-
|
192 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content:before,
|
193 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content:after {
|
194 |
-
display: block;
|
195 |
-
position: absolute;
|
196 |
-
width: 0;
|
197 |
-
border-style: solid;
|
198 |
-
content: "";
|
199 |
-
}
|
200 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-chat-person-name,
|
201 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-admin-message .messageBody,
|
202 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-user-message .messageBody {
|
203 |
-
display: inline-block;
|
204 |
-
position: relative;
|
205 |
-
left: 0px;
|
206 |
-
top: 0px;
|
207 |
-
}
|
208 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-admin-message-avatar,
|
209 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-user-message-avatar {
|
210 |
-
border-radius: 50%;
|
211 |
-
}
|
212 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-chat-person-name {
|
213 |
-
margin-right:10px;
|
214 |
-
}
|
215 |
-
#nifty_wrapper .chatArea span.messageBody {
|
216 |
-
display:inline-block!important;
|
217 |
-
position:relative;
|
218 |
-
top:0px;
|
219 |
-
width:auto;
|
220 |
-
max-width: 100%;
|
221 |
-
height:auto;
|
222 |
-
font-size:1.2em;
|
223 |
-
}
|
224 |
-
span.bleeper-edit-message {
|
225 |
-
display: inline-block;
|
226 |
-
position: relative;
|
227 |
-
left: 0px;
|
228 |
-
width: auto;
|
229 |
-
height: auto;
|
230 |
-
margin-left: 20px;
|
231 |
-
margin-right: 0px;
|
232 |
-
margin-top: 0px;
|
233 |
-
font-size: 1.1em;
|
234 |
-
color: #ffffff;
|
235 |
-
font-weight: 500;
|
236 |
-
text-decoration: underline;
|
237 |
-
font-style: italic;
|
238 |
-
}
|
239 |
-
|
240 |
-
/* Admin messages */
|
241 |
-
#nifty_wrapper .messages .wplc-admin-message {
|
242 |
-
padding-right: 12px;
|
243 |
-
}
|
244 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content {
|
245 |
-
display: inline-block;
|
246 |
-
position: relative;
|
247 |
-
float: right;
|
248 |
-
max-width: calc(100% - 190px);
|
249 |
-
background-color:#ED832F;
|
250 |
-
color:#ffffff;
|
251 |
-
border-radius: 6px;
|
252 |
-
}
|
253 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content:after {
|
254 |
-
top: 11px;
|
255 |
-
right: -7px;
|
256 |
-
border-width: 6px 0px 6px 7px;
|
257 |
-
border-color: transparent #EB832C;
|
258 |
-
}
|
259 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-admin-message-avatar {
|
260 |
-
display: block;
|
261 |
-
position: relative;
|
262 |
-
float: right;
|
263 |
-
}
|
264 |
-
|
265 |
-
/* User messages */
|
266 |
-
#nifty_wrapper .messages .wplc-user-message {
|
267 |
-
padding-left:0px!important;
|
268 |
-
}
|
269 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content {
|
270 |
-
display: inline-block;
|
271 |
-
position: relative;
|
272 |
-
top: 0px;
|
273 |
-
left: 0px;
|
274 |
-
width: auto;
|
275 |
-
max-width: calc(100% - 250px);
|
276 |
-
background-color: rgba(90, 90, 90, 0.94);
|
277 |
-
color: #ffffff;
|
278 |
-
border-radius: 3px;
|
279 |
-
}
|
280 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content:before {
|
281 |
-
top: 15px;
|
282 |
-
left: -7px;
|
283 |
-
border-width: 6px 7px 6px 0px;
|
284 |
-
border-color: transparent #646464;
|
285 |
-
}
|
286 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-user-message-avatar {
|
287 |
-
display: inline-block;
|
288 |
-
position: relative;
|
289 |
-
left: 0px;
|
290 |
-
top: 0px;
|
291 |
-
margin-right: 10px;
|
292 |
-
}
|
293 |
-
|
294 |
-
/* User and admin timestamp popup */
|
295 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp,
|
296 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
297 |
-
display: block;
|
298 |
-
position: absolute;
|
299 |
-
z-index: 1;
|
300 |
-
width: auto;
|
301 |
-
height: auto;
|
302 |
-
padding-top: 6px;
|
303 |
-
padding-bottom: 6px;
|
304 |
-
padding-left: 10px;
|
305 |
-
padding-right: 10px;
|
306 |
-
background-color: rgba(39, 36, 36, 0.94);
|
307 |
-
border-radius:5px;
|
308 |
-
color: #fafafa;
|
309 |
-
font-size: 0.8em !important;
|
310 |
-
}
|
311 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp:before,
|
312 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp:before {
|
313 |
-
display: block;
|
314 |
-
position: absolute;
|
315 |
-
top: 9px;
|
316 |
-
width: 0;
|
317 |
-
border-color: transparent #272424;
|
318 |
-
border-style: solid;
|
319 |
-
content: "";
|
320 |
-
}
|
321 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp:before {
|
322 |
-
left: -7px;
|
323 |
-
border-width: 6px 7px 6px 0px;
|
324 |
-
}
|
325 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp:before {
|
326 |
-
right: -7px;
|
327 |
-
border-width: 6px 0px 6px 7px;
|
328 |
-
}
|
329 |
-
|
330 |
-
/* Admin timestamp popup */
|
331 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp.only-hours,
|
332 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
333 |
-
float: left;
|
334 |
-
top: 0px;
|
335 |
-
}
|
336 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
337 |
-
left: -200px;
|
338 |
-
}
|
339 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp.only-hours {
|
340 |
-
left: -80px;
|
341 |
-
}
|
342 |
-
|
343 |
-
/* User timestamp popup */
|
344 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
345 |
-
float:right;
|
346 |
-
top:0px;
|
347 |
-
}
|
348 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
349 |
-
right:-200px;
|
350 |
-
}
|
351 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp.only-hours {
|
352 |
-
right:-80px;
|
353 |
-
}
|
354 |
-
|
355 |
-
@media(max-width:767px) {
|
356 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content {
|
357 |
-
max-width: calc(100% - 100px);
|
358 |
-
}
|
359 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content {
|
360 |
-
max-width: calc(100% - 135px);
|
361 |
-
}
|
362 |
-
|
363 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
364 |
-
left: -100px;
|
365 |
-
}
|
366 |
-
|
367 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp,
|
368 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
369 |
-
max-width: 130px;
|
370 |
-
}
|
371 |
-
|
372 |
-
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
373 |
-
left: -100px;
|
374 |
-
}
|
375 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
376 |
-
right: -100px;
|
377 |
-
}
|
378 |
-
|
379 |
-
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp.only-hours {
|
380 |
-
right:-80px;
|
381 |
-
}
|
382 |
-
|
383 |
-
}
|
384 |
-
|
385 |
-
/* Quick messages button */
|
386 |
-
#nifty_wrapper #quick_response_drawer_handle {
|
387 |
-
z-index: 1;
|
388 |
-
}
|
389 |
-
|
390 |
-
/* Events box */
|
391 |
-
#nifty_wrapper .eventbox-wrapper {
|
392 |
-
overflow-y: auto;
|
393 |
-
height: calc(100% - 61px);
|
394 |
-
width: 356px;
|
395 |
-
border-bottom-right-radius: 5px;
|
396 |
-
border-bottom-left-radius: 5px;
|
397 |
-
}
|
398 |
-
|
399 |
-
/* Emoji's box */
|
400 |
-
.wdt-emoji-popup {
|
401 |
-
|
402 |
-
z-index: 5;
|
403 |
-
height: 300px;
|
404 |
-
margin-top:45px;
|
405 |
-
}
|
406 |
-
.wdt-emoji-popup .wdt-credit {
|
407 |
-
display: block;
|
408 |
-
position: relative;
|
409 |
-
left: 0px;
|
410 |
-
top: 0px;
|
411 |
-
padding-right: 15px;
|
412 |
-
color: #dcdcdc;
|
413 |
-
text-align: right;
|
414 |
-
}
|
415 |
-
|
416 |
-
/* Quick Response */
|
417 |
-
#quick_response_drawer_container {
|
418 |
-
display: block;
|
419 |
-
position: absolute;
|
420 |
-
float: right;
|
421 |
-
left: auto !important;
|
422 |
-
right: 23px;
|
423 |
-
bottom: 0px;
|
424 |
-
top: 48vh !important;
|
425 |
-
width: 57%;
|
426 |
-
max-height: 180px;
|
427 |
-
padding: 10px;
|
428 |
-
background: #fff;
|
429 |
-
overflow-y: auto;
|
430 |
-
border-radius: 2px;
|
431 |
-
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.1);
|
432 |
-
}
|
433 |
-
|
434 |
-
#chatTranscriptTitle {
|
435 |
-
display: block !important;
|
436 |
-
}
|
437 |
-
|
438 |
-
#chatTranscriptTitle.is-disabled {
|
439 |
-
color: currentColor;
|
440 |
-
cursor: not-allowed;
|
441 |
-
opacity: .5;
|
442 |
-
text-decoration: none;
|
443 |
-
}
|
444 |
-
|
1 |
+
/**
|
2 |
+
* Chat page, header section, user info
|
3 |
+
*/
|
4 |
+
#nifty_wrapper .user_header_wrapper_info {
|
5 |
+
display: block;
|
6 |
+
position: relative;
|
7 |
+
top: -8px;
|
8 |
+
float: left;
|
9 |
+
width: 60% !important;
|
10 |
+
height: calc(100% + 1px);
|
11 |
+
padding: 8px;
|
12 |
+
overflow-x: hidden;
|
13 |
+
overflow-y: auto;
|
14 |
+
font-size: 0.9em;
|
15 |
+
line-height: 1em;
|
16 |
+
background-color: #fefefe;
|
17 |
+
border-radius: 3px;
|
18 |
+
}
|
19 |
+
|
20 |
+
#nifty_wrapper .user_header_wrapper_info h3 {
|
21 |
+
font-size: 1.5em;
|
22 |
+
margin-top:0px;
|
23 |
+
margin-bottom:8px;
|
24 |
+
}
|
25 |
+
#nifty_wrapper .user_header_wrapper_info h4 {
|
26 |
+
font-size: 1.3em;
|
27 |
+
margin-bottom:8px;
|
28 |
+
}
|
29 |
+
#nifty_wrapper .user_header_wrapper_info p {
|
30 |
+
font-size: 1em;
|
31 |
+
margin-bottom:0px;
|
32 |
+
}
|
33 |
+
|
34 |
+
/* Join chat button */
|
35 |
+
#nifty_wrapper .bleeper_join_chat_div button {
|
36 |
+
position: relative;
|
37 |
+
left: 33.3%;
|
38 |
+
top: 15px;
|
39 |
+
width: 33.3%;
|
40 |
+
background-color: #ed832f;
|
41 |
+
border: 1px solid #e2731b;
|
42 |
+
color: #fafafa;
|
43 |
+
font-weight: 600;
|
44 |
+
font-size: 1.2em;
|
45 |
+
}
|
46 |
+
|
47 |
+
@media(max-width:767px) {
|
48 |
+
|
49 |
+
/* Chat page, header section, user info */
|
50 |
+
#nifty_wrapper .user_header_wrapper_info h3,
|
51 |
+
#nifty_wrapper .user_header_wrapper_info h4,
|
52 |
+
#nifty_wrapper .user_header_wrapper_info p {
|
53 |
+
line-height:1;
|
54 |
+
}
|
55 |
+
#nifty_wrapper .user_header_wrapper_info h3 {
|
56 |
+
font-size: 1em;
|
57 |
+
}
|
58 |
+
#nifty_wrapper .user_header_wrapper_info h4 {
|
59 |
+
font-size: 0.9em;
|
60 |
+
}
|
61 |
+
#nifty_wrapper .user_header_wrapper_info p {
|
62 |
+
font-size: 0.9em;
|
63 |
+
}
|
64 |
+
|
65 |
+
#nifty_wrapper .user_header_wrapper_info h3 a,
|
66 |
+
#nifty_wrapper .user_header_wrapper_info h4 a,
|
67 |
+
#nifty_wrapper .user_header_wrapper_info p a {
|
68 |
+
display: block;
|
69 |
+
margin-top: 0px;
|
70 |
+
word-wrap: break-word;
|
71 |
+
line-height: 1em;
|
72 |
+
}
|
73 |
+
|
74 |
+
#nifty_wrapper .user_header_wrapper_info .chatInfoArea-Email:before {
|
75 |
+
display: inline-block;
|
76 |
+
position: relative;
|
77 |
+
left: 0px;
|
78 |
+
top: 0px;
|
79 |
+
margin-right:5px;
|
80 |
+
content:"email: ";
|
81 |
+
}
|
82 |
+
|
83 |
+
/* Chat page, header section, buttons */
|
84 |
+
#nifty_wrapper .eventbox {
|
85 |
+
position: absolute;
|
86 |
+
right: -3px;
|
87 |
+
top: 80px;
|
88 |
+
}
|
89 |
+
|
90 |
+
#nifty_wrapper span.minChat {
|
91 |
+
margin-top: -5px;
|
92 |
+
}
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
@media(max-width:500px) {
|
97 |
+
/* Chat page, header section, user image */
|
98 |
+
#nifty_wrapper .user_header_wrapper_img {
|
99 |
+
display:none;
|
100 |
+
}
|
101 |
+
#nifty_wrapper .user_header_wrapper_info {
|
102 |
+
width: 56% !important;
|
103 |
+
border: 1px solid #f1f1f1;
|
104 |
+
background-color: #fcfcfc;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Admin chat page
|
110 |
+
*/
|
111 |
+
#nifty_wrapper span.minChat {
|
112 |
+
margin-top: 0px;
|
113 |
+
}
|
114 |
+
#nifty_wrapper .chatArea .messages {
|
115 |
+
background-size: cover;
|
116 |
+
border: 1px solid #e6e6e6;
|
117 |
+
}
|
118 |
+
#nifty_wrapper .timedate {
|
119 |
+
display:none;
|
120 |
+
}
|
121 |
+
|
122 |
+
/* System notification messages */
|
123 |
+
#nifty_wrapper .messages .wplc_system_notification {
|
124 |
+
display: block;
|
125 |
+
position: relative;
|
126 |
+
top: 0px;
|
127 |
+
width: 100%;
|
128 |
+
}
|
129 |
+
#nifty_wrapper .messages .wplc_system_notification .messageBody {
|
130 |
+
display: block;
|
131 |
+
position: relative;
|
132 |
+
left: 0px;
|
133 |
+
top: 7px;
|
134 |
+
width: 100%;
|
135 |
+
margin-top: 10px;
|
136 |
+
margin-bottom: 10px;
|
137 |
+
padding: 10px;
|
138 |
+
background-color: #fafafa;
|
139 |
+
border: 1px solid #e6e6e6;
|
140 |
+
border-radius: 5px;
|
141 |
+
color: #555555;
|
142 |
+
line-height:1.2em;
|
143 |
+
}
|
144 |
+
#nifty_wrapper .messages .wplc_system_notification .messageBody .wplc_system_notification {
|
145 |
+
display: inline-block;
|
146 |
+
position: relative;
|
147 |
+
left: 0px;
|
148 |
+
top: 0px;
|
149 |
+
width: auto;
|
150 |
+
height:auto;
|
151 |
+
margin-top: 0px;
|
152 |
+
margin-bottom: 0px;
|
153 |
+
background-color: transparent;
|
154 |
+
border: none;
|
155 |
+
border-radius: 0px;
|
156 |
+
}
|
157 |
+
#nifty_wrapper .messages .wplc_system_notification .messageBody .chat_time {
|
158 |
+
display: block;
|
159 |
+
position: relative;
|
160 |
+
left: 0px;
|
161 |
+
top: 0px;
|
162 |
+
width: 100%;
|
163 |
+
margin-bottom: 5px;
|
164 |
+
font-size: 0.9em;
|
165 |
+
font-weight: 600;
|
166 |
+
color: #555555;
|
167 |
+
}
|
168 |
+
|
169 |
+
/* Admin and user messages */
|
170 |
+
#nifty_wrapper ul.messages {
|
171 |
+
padding-bottom: 35px;
|
172 |
+
}
|
173 |
+
#nifty_wrapper .messages .wplc-admin-message,
|
174 |
+
#nifty_wrapper .messages .wplc-user-message {
|
175 |
+
display: block;
|
176 |
+
position: relative;
|
177 |
+
width: 100%;
|
178 |
+
height: auto;
|
179 |
+
clear: both;
|
180 |
+
}
|
181 |
+
#nifty_wrapper .messages .wplc-admin-message::before,
|
182 |
+
#nifty_wrapper .messages .wplc-user-message::before {
|
183 |
+
display: none;
|
184 |
+
}
|
185 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content,
|
186 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content {
|
187 |
+
margin-top: 2px;
|
188 |
+
margin-bottom: 2px;
|
189 |
+
padding: 10px;
|
190 |
+
}
|
191 |
+
|
192 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content:before,
|
193 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content:after {
|
194 |
+
display: block;
|
195 |
+
position: absolute;
|
196 |
+
width: 0;
|
197 |
+
border-style: solid;
|
198 |
+
content: "";
|
199 |
+
}
|
200 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-chat-person-name,
|
201 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-admin-message .messageBody,
|
202 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-user-message .messageBody {
|
203 |
+
display: inline-block;
|
204 |
+
position: relative;
|
205 |
+
left: 0px;
|
206 |
+
top: 0px;
|
207 |
+
}
|
208 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-admin-message-avatar,
|
209 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-user-message-avatar {
|
210 |
+
border-radius: 50%;
|
211 |
+
}
|
212 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content .wplc-chat-person-name {
|
213 |
+
margin-right:10px;
|
214 |
+
}
|
215 |
+
#nifty_wrapper .chatArea span.messageBody {
|
216 |
+
display:inline-block!important;
|
217 |
+
position:relative;
|
218 |
+
top:0px;
|
219 |
+
width:auto;
|
220 |
+
max-width: 100%;
|
221 |
+
height:auto;
|
222 |
+
font-size:1.2em;
|
223 |
+
}
|
224 |
+
span.bleeper-edit-message {
|
225 |
+
display: inline-block;
|
226 |
+
position: relative;
|
227 |
+
left: 0px;
|
228 |
+
width: auto;
|
229 |
+
height: auto;
|
230 |
+
margin-left: 20px;
|
231 |
+
margin-right: 0px;
|
232 |
+
margin-top: 0px;
|
233 |
+
font-size: 1.1em;
|
234 |
+
color: #ffffff;
|
235 |
+
font-weight: 500;
|
236 |
+
text-decoration: underline;
|
237 |
+
font-style: italic;
|
238 |
+
}
|
239 |
+
|
240 |
+
/* Admin messages */
|
241 |
+
#nifty_wrapper .messages .wplc-admin-message {
|
242 |
+
padding-right: 12px;
|
243 |
+
}
|
244 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content {
|
245 |
+
display: inline-block;
|
246 |
+
position: relative;
|
247 |
+
float: right;
|
248 |
+
max-width: calc(100% - 190px);
|
249 |
+
background-color:#ED832F;
|
250 |
+
color:#ffffff;
|
251 |
+
border-radius: 6px;
|
252 |
+
}
|
253 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content:after {
|
254 |
+
top: 11px;
|
255 |
+
right: -7px;
|
256 |
+
border-width: 6px 0px 6px 7px;
|
257 |
+
border-color: transparent #EB832C;
|
258 |
+
}
|
259 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-admin-message-avatar {
|
260 |
+
display: block;
|
261 |
+
position: relative;
|
262 |
+
float: right;
|
263 |
+
}
|
264 |
+
|
265 |
+
/* User messages */
|
266 |
+
#nifty_wrapper .messages .wplc-user-message {
|
267 |
+
padding-left:0px!important;
|
268 |
+
}
|
269 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content {
|
270 |
+
display: inline-block;
|
271 |
+
position: relative;
|
272 |
+
top: 0px;
|
273 |
+
left: 0px;
|
274 |
+
width: auto;
|
275 |
+
max-width: calc(100% - 250px);
|
276 |
+
background-color: rgba(90, 90, 90, 0.94);
|
277 |
+
color: #ffffff;
|
278 |
+
border-radius: 3px;
|
279 |
+
}
|
280 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content:before {
|
281 |
+
top: 15px;
|
282 |
+
left: -7px;
|
283 |
+
border-width: 6px 7px 6px 0px;
|
284 |
+
border-color: transparent #646464;
|
285 |
+
}
|
286 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-user-message-avatar {
|
287 |
+
display: inline-block;
|
288 |
+
position: relative;
|
289 |
+
left: 0px;
|
290 |
+
top: 0px;
|
291 |
+
margin-right: 10px;
|
292 |
+
}
|
293 |
+
|
294 |
+
/* User and admin timestamp popup */
|
295 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp,
|
296 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
297 |
+
display: block;
|
298 |
+
position: absolute;
|
299 |
+
z-index: 1;
|
300 |
+
width: auto;
|
301 |
+
height: auto;
|
302 |
+
padding-top: 6px;
|
303 |
+
padding-bottom: 6px;
|
304 |
+
padding-left: 10px;
|
305 |
+
padding-right: 10px;
|
306 |
+
background-color: rgba(39, 36, 36, 0.94);
|
307 |
+
border-radius:5px;
|
308 |
+
color: #fafafa;
|
309 |
+
font-size: 0.8em !important;
|
310 |
+
}
|
311 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp:before,
|
312 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp:before {
|
313 |
+
display: block;
|
314 |
+
position: absolute;
|
315 |
+
top: 9px;
|
316 |
+
width: 0;
|
317 |
+
border-color: transparent #272424;
|
318 |
+
border-style: solid;
|
319 |
+
content: "";
|
320 |
+
}
|
321 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp:before {
|
322 |
+
left: -7px;
|
323 |
+
border-width: 6px 7px 6px 0px;
|
324 |
+
}
|
325 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp:before {
|
326 |
+
right: -7px;
|
327 |
+
border-width: 6px 0px 6px 7px;
|
328 |
+
}
|
329 |
+
|
330 |
+
/* Admin timestamp popup */
|
331 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp.only-hours,
|
332 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
333 |
+
float: left;
|
334 |
+
top: 0px;
|
335 |
+
}
|
336 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
337 |
+
left: -200px;
|
338 |
+
}
|
339 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp.only-hours {
|
340 |
+
left: -80px;
|
341 |
+
}
|
342 |
+
|
343 |
+
/* User timestamp popup */
|
344 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
345 |
+
float:right;
|
346 |
+
top:0px;
|
347 |
+
}
|
348 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
349 |
+
right:-200px;
|
350 |
+
}
|
351 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp.only-hours {
|
352 |
+
right:-80px;
|
353 |
+
}
|
354 |
+
|
355 |
+
@media(max-width:767px) {
|
356 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-msg-content {
|
357 |
+
max-width: calc(100% - 100px);
|
358 |
+
}
|
359 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-msg-content {
|
360 |
+
max-width: calc(100% - 135px);
|
361 |
+
}
|
362 |
+
|
363 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
364 |
+
left: -100px;
|
365 |
+
}
|
366 |
+
|
367 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp,
|
368 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
369 |
+
max-width: 130px;
|
370 |
+
}
|
371 |
+
|
372 |
+
#nifty_wrapper .messages .wplc-admin-message .wplc-chatbox-msg-timestamp {
|
373 |
+
left: -100px;
|
374 |
+
}
|
375 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp {
|
376 |
+
right: -100px;
|
377 |
+
}
|
378 |
+
|
379 |
+
#nifty_wrapper .messages .wplc-user-message .wplc-chatbox-msg-timestamp.only-hours {
|
380 |
+
right:-80px;
|
381 |
+
}
|
382 |
+
|
383 |
+
}
|
384 |
+
|
385 |
+
/* Quick messages button */
|
386 |
+
#nifty_wrapper #quick_response_drawer_handle {
|
387 |
+
z-index: 1;
|
388 |
+
}
|
389 |
+
|
390 |
+
/* Events box */
|
391 |
+
#nifty_wrapper .eventbox-wrapper {
|
392 |
+
overflow-y: auto;
|
393 |
+
height: calc(100% - 61px);
|
394 |
+
width: 356px;
|
395 |
+
border-bottom-right-radius: 5px;
|
396 |
+
border-bottom-left-radius: 5px;
|
397 |
+
}
|
398 |
+
|
399 |
+
/* Emoji's box */
|
400 |
+
.wdt-emoji-popup {
|
401 |
+
|
402 |
+
z-index: 5;
|
403 |
+
height: 300px;
|
404 |
+
margin-top:45px;
|
405 |
+
}
|
406 |
+
.wdt-emoji-popup .wdt-credit {
|
407 |
+
display: block;
|
408 |
+
position: relative;
|
409 |
+
left: 0px;
|
410 |
+
top: 0px;
|
411 |
+
padding-right: 15px;
|
412 |
+
color: #dcdcdc;
|
413 |
+
text-align: right;
|
414 |
+
}
|
415 |
+
|
416 |
+
/* Quick Response */
|
417 |
+
#quick_response_drawer_container {
|
418 |
+
display: block;
|
419 |
+
position: absolute;
|
420 |
+
float: right;
|
421 |
+
left: auto !important;
|
422 |
+
right: 23px;
|
423 |
+
bottom: 0px;
|
424 |
+
top: 48vh !important;
|
425 |
+
width: 57%;
|
426 |
+
max-height: 180px;
|
427 |
+
padding: 10px;
|
428 |
+
background: #fff;
|
429 |
+
overflow-y: auto;
|
430 |
+
border-radius: 2px;
|
431 |
+
box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.1);
|
432 |
+
}
|
433 |
+
|
434 |
+
#chatTranscriptTitle {
|
435 |
+
display: block !important;
|
436 |
+
}
|
437 |
+
|
438 |
+
#chatTranscriptTitle.is-disabled {
|
439 |
+
color: currentColor;
|
440 |
+
cursor: not-allowed;
|
441 |
+
opacity: .5;
|
442 |
+
text-decoration: none;
|
443 |
+
}
|
|
css/admin_styles.css
CHANGED
@@ -1,315 +1,315 @@
|
|
1 |
-
|
2 |
-
/**
|
3 |
-
* Settings
|
4 |
-
*/
|
5 |
-
|
6 |
-
#wplc_settings .tooltip {
|
7 |
-
background-color: #333;
|
8 |
-
color: #eee;
|
9 |
-
padding: 15px;
|
10 |
-
border-radius: 15px;
|
11 |
-
opacity: 0.8;
|
12 |
-
}
|
13 |
-
|
14 |
-
#wplc_settings .form-table td {
|
15 |
-
font-size: 13px !important;
|
16 |
-
line-height: 1.5em !important;
|
17 |
-
}
|
18 |
-
|
19 |
-
|
20 |
-
.wplc-extension-label-box {
|
21 |
-
display:block;
|
22 |
-
overflow:auto;
|
23 |
-
clear:both;
|
24 |
-
}
|
25 |
-
.wplc-extension-label {
|
26 |
-
display:block;
|
27 |
-
float:left;
|
28 |
-
padding:5px;
|
29 |
-
margin-right:5px;
|
30 |
-
font-size:0.8em;
|
31 |
-
background-color:#bbb;
|
32 |
-
color:#FFF;
|
33 |
-
webkit-border-radius: 5px;
|
34 |
-
-moz-border-radius: 5px;
|
35 |
-
border-radius: 5px;
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
#wplc_tabs {
|
40 |
-
box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
41 |
-
-webkit-box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
42 |
-
-moz-box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
43 |
-
-o-box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
44 |
-
}
|
45 |
-
|
46 |
-
|
47 |
-
.wplc-extension {
|
48 |
-
|
49 |
-
float: left;
|
50 |
-
margin: 0 1% 1% 0;
|
51 |
-
background: #fff;
|
52 |
-
border: 1px solid #ccc;
|
53 |
-
width: 320px;
|
54 |
-
padding: 14px;
|
55 |
-
height: 370px;
|
56 |
-
position: relative;
|
57 |
-
|
58 |
-
}
|
59 |
-
.wplc-extension h3 {
|
60 |
-
margin: 0 0 8px;
|
61 |
-
font-size: 13px;
|
62 |
-
|
63 |
-
}
|
64 |
-
|
65 |
-
.wplc-extension .button-secondary {
|
66 |
-
position: absolute;
|
67 |
-
bottom: 14px;
|
68 |
-
left: 14px;
|
69 |
-
}
|
70 |
-
.wplc-plugin {
|
71 |
-
height: 250px;
|
72 |
-
}
|
73 |
-
|
74 |
-
|
75 |
-
.wplc_header_vh {
|
76 |
-
font: bold 14px/26px Arial;
|
77 |
-
padding: 0 0 0 0px;
|
78 |
-
color: #C2BBBE;
|
79 |
-
display: block;
|
80 |
-
text-transform: uppercase;
|
81 |
-
display:block;
|
82 |
-
}
|
83 |
-
.wplc_headerspan_v { min-width:120px; width:20%; display:block; }
|
84 |
-
.wplc_headerspan_nr { min-width:60px; width:10%; display:block; }
|
85 |
-
.wplc_headerspan_dev { min-width:60px; width:10%; display:block; }
|
86 |
-
.wplc_headerspan_d { min-width:200px; width:30%; display:block; }
|
87 |
-
.wplc_headerspan_d a { font-style: italic; }
|
88 |
-
.wplc_headerspan_t { min-width:60px; width:9%; display:block; }
|
89 |
-
.wplc_headerspan_s { min-width:80px; width:12%; display:block; }
|
90 |
-
.wplc_headerspan_a { min-width:100px; width:15%; display:block; }
|
91 |
-
.wplc_chat_ul_header {
|
92 |
-
clear: both;
|
93 |
-
overflow:auto;
|
94 |
-
display:block;
|
95 |
-
padding:10px;
|
96 |
-
}
|
97 |
-
|
98 |
-
|
99 |
-
.relevant_extension p {
|
100 |
-
margin-top:2px;
|
101 |
-
}
|
102 |
-
.relevant_extension h3 {
|
103 |
-
margin-bottom:2px;
|
104 |
-
}
|
105 |
-
.relevant_extension {
|
106 |
-
width: 49% !important;
|
107 |
-
height: 125px !important;
|
108 |
-
opacity:0.5;
|
109 |
-
}
|
110 |
-
.relevant_extension:hover {
|
111 |
-
opacity:1.0;
|
112 |
-
}
|
113 |
-
|
114 |
-
|
115 |
-
.relevant_extension .button-secondary {
|
116 |
-
right:10px !important;
|
117 |
-
left: initial !important;
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
.relevant_extension img {
|
123 |
-
margin-right:10px;
|
124 |
-
}
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
@media (min-width:320px) {
|
129 |
-
/* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
|
130 |
-
.relevant_extension {
|
131 |
-
width: 85% !important;
|
132 |
-
height: 145px !important;
|
133 |
-
opacity:0.5;
|
134 |
-
}
|
135 |
-
.relevant_extension img {
|
136 |
-
width:105px;
|
137 |
-
}
|
138 |
-
.wplc-extension .wp-post-image {
|
139 |
-
height: auto;
|
140 |
-
}
|
141 |
-
}
|
142 |
-
@media (min-width:480px) {
|
143 |
-
/* smartphones, Android phones, landscape iPhone */
|
144 |
-
.relevant_extension {
|
145 |
-
width: 94% !important;
|
146 |
-
height: 125px !important;
|
147 |
-
opacity:0.5;
|
148 |
-
}
|
149 |
-
.relevant_extension img {
|
150 |
-
width:105px;
|
151 |
-
}
|
152 |
-
.wplc-extension .wp-post-image {
|
153 |
-
height: auto;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
@media (min-width:600px) {
|
157 |
-
/* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
|
158 |
-
.relevant_extension {
|
159 |
-
width: 94% !important;
|
160 |
-
height: 125px !important;
|
161 |
-
opacity:0.5;
|
162 |
-
}
|
163 |
-
.relevant_extension img {
|
164 |
-
width:105px;
|
165 |
-
}
|
166 |
-
.wplc-extension .wp-post-image {
|
167 |
-
height: auto;
|
168 |
-
}
|
169 |
-
}
|
170 |
-
@media (min-width:801px) {
|
171 |
-
/* tablet, landscape iPad, lo-res laptops ands desktops */
|
172 |
-
.relevant_extension {
|
173 |
-
width: 43% !important;
|
174 |
-
height: 145px !important;
|
175 |
-
opacity:0.5;
|
176 |
-
}
|
177 |
-
.relevant_extension img {
|
178 |
-
width:95px;
|
179 |
-
}
|
180 |
-
.wplc-extension .wp-post-image {
|
181 |
-
height: auto;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
@media (min-width:1025px) {
|
185 |
-
/* big landscape tablets, laptops, and desktops */
|
186 |
-
.relevant_extension {
|
187 |
-
width: 44% !important;
|
188 |
-
height: 125px !important;
|
189 |
-
opacity:0.5;
|
190 |
-
}
|
191 |
-
.relevant_extension img {
|
192 |
-
width:125px;
|
193 |
-
}
|
194 |
-
.wplc-extension .wp-post-image {
|
195 |
-
height: auto;
|
196 |
-
}
|
197 |
-
}
|
198 |
-
@media (min-width:1281px) {
|
199 |
-
/* hi-res laptops and desktops */
|
200 |
-
.relevant_extension {
|
201 |
-
width: 32% !important;
|
202 |
-
height: 125px !important;
|
203 |
-
opacity:0.5;
|
204 |
-
}
|
205 |
-
.relevant_extension img {
|
206 |
-
width:110px;
|
207 |
-
}
|
208 |
-
.wplc-extension .wp-post-image {
|
209 |
-
height: auto;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
|
214 |
-
.wplc-palette-selection {
|
215 |
-
border: 1px solid #CCC;
|
216 |
-
border-radius: 5px;
|
217 |
-
padding: 5px;
|
218 |
-
margin: 5px;
|
219 |
-
height:100%;
|
220 |
-
|
221 |
-
}
|
222 |
-
|
223 |
-
.wplc_palette_single {
|
224 |
-
margin: 5px;
|
225 |
-
margin-top: 15px;
|
226 |
-
width: 162px;
|
227 |
-
height: 122px;
|
228 |
-
text-align: center;
|
229 |
-
display: inline-block;
|
230 |
-
vertical-align: top;
|
231 |
-
cursor: pointer;
|
232 |
-
|
233 |
-
}
|
234 |
-
.wplc-palette-top { display:block; width:100%; height:25%; }
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
#wplc_tabs .ui-tabs-anchor {
|
239 |
-
width: 100%;
|
240 |
-
}
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
/* Gutenberg styles */
|
245 |
-
#tabs-gutenberg input[type='button'] {
|
246 |
-
cursor: pointer;
|
247 |
-
}
|
248 |
-
|
249 |
-
#wplc_custom_js_editor, #wplc_custom_css_editor, #wplc_custom_html_editor {
|
250 |
-
width: 560px;
|
251 |
-
height: 285px;
|
252 |
-
margin: 10px 0 10px 0;
|
253 |
-
}
|
254 |
-
|
255 |
-
#wplc_gutenberg_icon {
|
256 |
-
cursor: pointer;
|
257 |
-
}
|
258 |
-
|
259 |
-
.wplc_code {
|
260 |
-
cursor: pointer;
|
261 |
-
transition: all .2s ease-in-out;
|
262 |
-
border-radius: 3px;
|
263 |
-
color: #696969;
|
264 |
-
}
|
265 |
-
|
266 |
-
.wplc_code:hover {
|
267 |
-
background: #d7d7d7;
|
268 |
-
}
|
269 |
-
|
270 |
-
.wplc_code:focus, .wplc_code:active {
|
271 |
-
background: #018add;
|
272 |
-
color: #fff;
|
273 |
-
}
|
274 |
-
|
275 |
-
|
276 |
-
.wplc_agent_container ul {
|
277 |
-
display:block;
|
278 |
-
overflow:auto;
|
279 |
-
}
|
280 |
-
.wplc_agent_container li{
|
281 |
-
display: block;
|
282 |
-
float: left;
|
283 |
-
text-align: center;
|
284 |
-
border: 1px solid #CCC;
|
285 |
-
width:150px;
|
286 |
-
height:310px;
|
287 |
-
padding: 10px;
|
288 |
-
border-radius: 5px;
|
289 |
-
margin: 10px;
|
290 |
-
box-shadow: 2px 2px 2px #CCC;
|
291 |
-
overflow: auto;
|
292 |
-
|
293 |
-
}
|
294 |
-
.wplc_agent_container img{
|
295 |
-
border-radius: 100px;
|
296 |
-
}
|
297 |
-
.wplc_agent_container h3 {
|
298 |
-
font: bold 12px/16px Arial;
|
299 |
-
padding: 0 0 0 0px;
|
300 |
-
color: #C2BBBE;
|
301 |
-
display: block;
|
302 |
-
height:40px;
|
303 |
-
text-transform: uppercase;
|
304 |
-
}
|
305 |
-
.wplc_agent_container small { word-wrap: break-word; display:block; height:50px; }
|
306 |
-
.wplc_agent_container select { width: 120px; }
|
307 |
-
|
308 |
-
.initiate_upsell {
|
309 |
-
position: absolute;
|
310 |
-
bottom: 0;
|
311 |
-
padding: 10px;
|
312 |
-
border-top: 1px solid #ccc;
|
313 |
-
width: 100%;
|
314 |
-
background-color: #fff;
|
315 |
}
|
1 |
+
|
2 |
+
/**
|
3 |
+
* Settings
|
4 |
+
*/
|
5 |
+
|
6 |
+
#wplc_settings .tooltip {
|
7 |
+
background-color: #333;
|
8 |
+
color: #eee;
|
9 |
+
padding: 15px;
|
10 |
+
border-radius: 15px;
|
11 |
+
opacity: 0.8;
|
12 |
+
}
|
13 |
+
|
14 |
+
#wplc_settings .form-table td {
|
15 |
+
font-size: 13px !important;
|
16 |
+
line-height: 1.5em !important;
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
.wplc-extension-label-box {
|
21 |
+
display:block;
|
22 |
+
overflow:auto;
|
23 |
+
clear:both;
|
24 |
+
}
|
25 |
+
.wplc-extension-label {
|
26 |
+
display:block;
|
27 |
+
float:left;
|
28 |
+
padding:5px;
|
29 |
+
margin-right:5px;
|
30 |
+
font-size:0.8em;
|
31 |
+
background-color:#bbb;
|
32 |
+
color:#FFF;
|
33 |
+
webkit-border-radius: 5px;
|
34 |
+
-moz-border-radius: 5px;
|
35 |
+
border-radius: 5px;
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
#wplc_tabs {
|
40 |
+
box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
41 |
+
-webkit-box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
42 |
+
-moz-box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
43 |
+
-o-box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
.wplc-extension {
|
48 |
+
|
49 |
+
float: left;
|
50 |
+
margin: 0 1% 1% 0;
|
51 |
+
background: #fff;
|
52 |
+
border: 1px solid #ccc;
|
53 |
+
width: 320px;
|
54 |
+
padding: 14px;
|
55 |
+
height: 370px;
|
56 |
+
position: relative;
|
57 |
+
|
58 |
+
}
|
59 |
+
.wplc-extension h3 {
|
60 |
+
margin: 0 0 8px;
|
61 |
+
font-size: 13px;
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
.wplc-extension .button-secondary {
|
66 |
+
position: absolute;
|
67 |
+
bottom: 14px;
|
68 |
+
left: 14px;
|
69 |
+
}
|
70 |
+
.wplc-plugin {
|
71 |
+
height: 250px;
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
.wplc_header_vh {
|
76 |
+
font: bold 14px/26px Arial;
|
77 |
+
padding: 0 0 0 0px;
|
78 |
+
color: #C2BBBE;
|
79 |
+
display: block;
|
80 |
+
text-transform: uppercase;
|
81 |
+
display:block;
|
82 |
+
}
|
83 |
+
.wplc_headerspan_v { min-width:120px; width:20%; display:block; }
|
84 |
+
.wplc_headerspan_nr { min-width:60px; width:10%; display:block; }
|
85 |
+
.wplc_headerspan_dev { min-width:60px; width:10%; display:block; }
|
86 |
+
.wplc_headerspan_d { min-width:200px; width:30%; display:block; }
|
87 |
+
.wplc_headerspan_d a { font-style: italic; }
|
88 |
+
.wplc_headerspan_t { min-width:60px; width:9%; display:block; }
|
89 |
+
.wplc_headerspan_s { min-width:80px; width:12%; display:block; }
|
90 |
+
.wplc_headerspan_a { min-width:100px; width:15%; display:block; }
|
91 |
+
.wplc_chat_ul_header {
|
92 |
+
clear: both;
|
93 |
+
overflow:auto;
|
94 |
+
display:block;
|
95 |
+
padding:10px;
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
.relevant_extension p {
|
100 |
+
margin-top:2px;
|
101 |
+
}
|
102 |
+
.relevant_extension h3 {
|
103 |
+
margin-bottom:2px;
|
104 |
+
}
|
105 |
+
.relevant_extension {
|
106 |
+
width: 49% !important;
|
107 |
+
height: 125px !important;
|
108 |
+
opacity:0.5;
|
109 |
+
}
|
110 |
+
.relevant_extension:hover {
|
111 |
+
opacity:1.0;
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
.relevant_extension .button-secondary {
|
116 |
+
right:10px !important;
|
117 |
+
left: initial !important;
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
|
122 |
+
.relevant_extension img {
|
123 |
+
margin-right:10px;
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
@media (min-width:320px) {
|
129 |
+
/* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
|
130 |
+
.relevant_extension {
|
131 |
+
width: 85% !important;
|
132 |
+
height: 145px !important;
|
133 |
+
opacity:0.5;
|
134 |
+
}
|
135 |
+
.relevant_extension img {
|
136 |
+
width:105px;
|
137 |
+
}
|
138 |
+
.wplc-extension .wp-post-image {
|
139 |
+
height: auto;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
@media (min-width:480px) {
|
143 |
+
/* smartphones, Android phones, landscape iPhone */
|
144 |
+
.relevant_extension {
|
145 |
+
width: 94% !important;
|
146 |
+
height: 125px !important;
|
147 |
+
opacity:0.5;
|
148 |
+
}
|
149 |
+
.relevant_extension img {
|
150 |
+
width:105px;
|
151 |
+
}
|
152 |
+
.wplc-extension .wp-post-image {
|
153 |
+
height: auto;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
@media (min-width:600px) {
|
157 |
+
/* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
|
158 |
+
.relevant_extension {
|
159 |
+
width: 94% !important;
|
160 |
+
height: 125px !important;
|
161 |
+
opacity:0.5;
|
162 |
+
}
|
163 |
+
.relevant_extension img {
|
164 |
+
width:105px;
|
165 |
+
}
|
166 |
+
.wplc-extension .wp-post-image {
|
167 |
+
height: auto;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
@media (min-width:801px) {
|
171 |
+
/* tablet, landscape iPad, lo-res laptops ands desktops */
|
172 |
+
.relevant_extension {
|
173 |
+
width: 43% !important;
|
174 |
+
height: 145px !important;
|
175 |
+
opacity:0.5;
|
176 |
+
}
|
177 |
+
.relevant_extension img {
|
178 |
+
width:95px;
|
179 |
+
}
|
180 |
+
.wplc-extension .wp-post-image {
|
181 |
+
height: auto;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
@media (min-width:1025px) {
|
185 |
+
/* big landscape tablets, laptops, and desktops */
|
186 |
+
.relevant_extension {
|
187 |
+
width: 44% !important;
|
188 |
+
height: 125px !important;
|
189 |
+
opacity:0.5;
|
190 |
+
}
|
191 |
+
.relevant_extension img {
|
192 |
+
width:125px;
|
193 |
+
}
|
194 |
+
.wplc-extension .wp-post-image {
|
195 |
+
height: auto;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
@media (min-width:1281px) {
|
199 |
+
/* hi-res laptops and desktops */
|
200 |
+
.relevant_extension {
|
201 |
+
width: 32% !important;
|
202 |
+
height: 125px !important;
|
203 |
+
opacity:0.5;
|
204 |
+
}
|
205 |
+
.relevant_extension img {
|
206 |
+
width:110px;
|
207 |
+
}
|
208 |
+
.wplc-extension .wp-post-image {
|
209 |
+
height: auto;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
|
214 |
+
.wplc-palette-selection {
|
215 |
+
border: 1px solid #CCC;
|
216 |
+
border-radius: 5px;
|
217 |
+
padding: 5px;
|
218 |
+
margin: 5px;
|
219 |
+
height:100%;
|
220 |
+
|
221 |
+
}
|
222 |
+
|
223 |
+
.wplc_palette_single {
|
224 |
+
margin: 5px;
|
225 |
+
margin-top: 15px;
|
226 |
+
width: 162px;
|
227 |
+
height: 122px;
|
228 |
+
text-align: center;
|
229 |
+
display: inline-block;
|
230 |
+
vertical-align: top;
|
231 |
+
cursor: pointer;
|
232 |
+
|
233 |
+
}
|
234 |
+
.wplc-palette-top { display:block; width:100%; height:25%; }
|
235 |
+
|
236 |
+
|
237 |
+
|
238 |
+
#wplc_tabs .ui-tabs-anchor {
|
239 |
+
width: 100%;
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
/* Gutenberg styles */
|
245 |
+
#tabs-gutenberg input[type='button'] {
|
246 |
+
cursor: pointer;
|
247 |
+
}
|
248 |
+
|
249 |
+
#wplc_custom_js_editor, #wplc_custom_css_editor, #wplc_custom_html_editor {
|
250 |
+
width: 560px;
|
251 |
+
height: 285px;
|
252 |
+
margin: 10px 0 10px 0;
|
253 |
+
}
|
254 |
+
|
255 |
+
#wplc_gutenberg_icon {
|
256 |
+
cursor: pointer;
|
257 |
+
}
|
258 |
+
|
259 |
+
.wplc_code {
|
260 |
+
cursor: pointer;
|
261 |
+
transition: all .2s ease-in-out;
|
262 |
+
border-radius: 3px;
|
263 |
+
color: #696969;
|
264 |
+
}
|
265 |
+
|
266 |
+
.wplc_code:hover {
|
267 |
+
background: #d7d7d7;
|
268 |
+
}
|
269 |
+
|
270 |
+
.wplc_code:focus, .wplc_code:active {
|
271 |
+
background: #018add;
|
272 |
+
color: #fff;
|
273 |
+
}
|
274 |
+
|
275 |
+
|
276 |
+
.wplc_agent_container ul {
|
277 |
+
display:block;
|
278 |
+
overflow:auto;
|
279 |
+
}
|
280 |
+
.wplc_agent_container li{
|
281 |
+
display: block;
|
282 |
+
float: left;
|
283 |
+
text-align: center;
|
284 |
+
border: 1px solid #CCC;
|
285 |
+
width:150px;
|
286 |
+
height:310px;
|
287 |
+
padding: 10px;
|
288 |
+
border-radius: 5px;
|
289 |
+
margin: 10px;
|
290 |
+
box-shadow: 2px 2px 2px #CCC;
|
291 |
+
overflow: auto;
|
292 |
+
|
293 |
+
}
|
294 |
+
.wplc_agent_container img{
|
295 |
+
border-radius: 100px;
|
296 |
+
}
|
297 |
+
.wplc_agent_container h3 {
|
298 |
+
font: bold 12px/16px Arial;
|
299 |
+
padding: 0 0 0 0px;
|
300 |
+
color: #C2BBBE;
|
301 |
+
display: block;
|
302 |
+
height:40px;
|
303 |
+
text-transform: uppercase;
|
304 |
+
}
|
305 |
+
.wplc_agent_container small { word-wrap: break-word; display:block; height:50px; }
|
306 |
+
.wplc_agent_container select { width: 120px; }
|
307 |
+
|
308 |
+
.initiate_upsell {
|
309 |
+
position: absolute;
|
310 |
+
bottom: 0;
|
311 |
+
padding: 10px;
|
312 |
+
border-top: 1px solid #ccc;
|
313 |
+
width: 100%;
|
314 |
+
background-color: #fff;
|
315 |
}
|
css/chat-style.css
CHANGED
@@ -1,923 +1,923 @@
|
|
1 |
-
|
2 |
-
#admin_chat_box {
|
3 |
-
display:block;
|
4 |
-
overflow:auto;
|
5 |
-
clear:both;
|
6 |
-
padding:20px;
|
7 |
-
-webkit-border-radius: 5px;
|
8 |
-
-moz-border-radius: 5px;
|
9 |
-
border-radius: 5px;
|
10 |
-
border: 1px solid #ccc;
|
11 |
-
background-color:#fff;
|
12 |
-
width:85%;
|
13 |
-
min-width:675px;
|
14 |
-
}
|
15 |
-
|
16 |
-
.wplc-sub-item-email-string {
|
17 |
-
white-space: nowrap;
|
18 |
-
display:inline-block;
|
19 |
-
width: 120px; /* IE6 needs any width */
|
20 |
-
overflow: hidden; /* "overflow" value must be different from visible"*/
|
21 |
-
-o-text-overflow: ellipsis; /* Opera < 11*/
|
22 |
-
text-overflow: ellipsis; /* IE, Safari (WebKit), Opera >= 11, FF > 6 */
|
23 |
-
}
|
24 |
-
.admin_chat_box {
|
25 |
-
-webkit-border-radius: 5px;
|
26 |
-
-moz-border-radius: 5px;
|
27 |
-
border-radius: 5px;
|
28 |
-
border: 1px solid #ccc;
|
29 |
-
float:left;
|
30 |
-
display:block;
|
31 |
-
background-color:white;
|
32 |
-
width: 50%;
|
33 |
-
min-width:300px;
|
34 |
-
/*height:315px;*/
|
35 |
-
background-color: #ffffff;
|
36 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#CCC), to(#FFF));
|
37 |
-
background-image: -webkit-linear-gradient(top, #CCC, #FFF);
|
38 |
-
background-image: -moz-linear-gradient(top, #CCC, #FFF);
|
39 |
-
background-image: -o-linear-gradient(top, #CCC, #FFF);
|
40 |
-
background-image: linear-gradient(to bottom, #CCC, #FFF);
|
41 |
-
}
|
42 |
-
.chat_response_box {
|
43 |
-
|
44 |
-
}
|
45 |
-
.admin_chat_box_inner {
|
46 |
-
height:210px;
|
47 |
-
padding:10px;
|
48 |
-
overflow:scroll;
|
49 |
-
overflow-x: hidden;
|
50 |
-
background-color:#FFF;
|
51 |
-
}
|
52 |
-
|
53 |
-
.admin_chat_box_inner_bottom {
|
54 |
-
/*height:60px;*/
|
55 |
-
width:100%;
|
56 |
-
border-top:1px solid #ccc;
|
57 |
-
display:block;
|
58 |
-
overflow:auto;
|
59 |
-
}
|
60 |
-
.admin_chat_quick_controls {
|
61 |
-
clear:left;
|
62 |
-
padding-left:10px;
|
63 |
-
}
|
64 |
-
|
65 |
-
.admin_visitor_info {
|
66 |
-
float:left;
|
67 |
-
width: 47%;
|
68 |
-
padding-left:15px;
|
69 |
-
min-width:250px;
|
70 |
-
}
|
71 |
-
|
72 |
-
#wplc_admin_chatmsg {
|
73 |
-
width:95%;
|
74 |
-
margin:0 auto;
|
75 |
-
margin-top:10px;
|
76 |
-
display:block;
|
77 |
-
height:50px;
|
78 |
-
padding:10px;
|
79 |
-
-webkit-border-radius: 5px;
|
80 |
-
-moz-border-radius: 5px;
|
81 |
-
border-radius: 5px;
|
82 |
-
border: 1px solid #ccc;
|
83 |
-
}
|
84 |
-
|
85 |
-
.admin_chat_img {
|
86 |
-
-webkit-border-radius: 5px;
|
87 |
-
-moz-border-radius: 5px;
|
88 |
-
border-radius: 5px;
|
89 |
-
}
|
90 |
-
|
91 |
-
.admin_chat_box .admin_chat_box_inner {
|
92 |
-
background: url('../images/bg/cloudy.jpg') repeat;
|
93 |
-
background-size: cover;
|
94 |
-
}
|
95 |
-
.wplc-admin-message {
|
96 |
-
padding:10px;
|
97 |
-
-webkit-border-radius: 2px;
|
98 |
-
-moz-border-radius: 2px;
|
99 |
-
border-radius: 2px;
|
100 |
-
border: 1px solid #ccc;
|
101 |
-
margin-top:2px;
|
102 |
-
background-color:#EEE;
|
103 |
-
display: inline-block;
|
104 |
-
float: left;
|
105 |
-
clear:both;
|
106 |
-
margin-bottom: 3px;
|
107 |
-
word-wrap: break-word;
|
108 |
-
max-width:96%;
|
109 |
-
}
|
110 |
-
|
111 |
-
.wplc-user-message {
|
112 |
-
padding:10px;
|
113 |
-
-webkit-border-radius: 2px;
|
114 |
-
-moz-border-radius: 2px;
|
115 |
-
border-radius: 2px;
|
116 |
-
border: 1px solid #ffdb99;
|
117 |
-
margin-top:2px;
|
118 |
-
background-color:#fff6ef;
|
119 |
-
color:#000;
|
120 |
-
display: inline-block;
|
121 |
-
float: right;
|
122 |
-
clear:both;
|
123 |
-
margin-bottom: 3px;
|
124 |
-
word-wrap: break-word;
|
125 |
-
max-width:96%;
|
126 |
-
position: relative;
|
127 |
-
right: 35px;
|
128 |
-
max-width: 71%;
|
129 |
-
}
|
130 |
-
|
131 |
-
.wplc-admin-message {
|
132 |
-
padding: 10px;
|
133 |
-
-webkit-border-radius: 2px;
|
134 |
-
-moz-border-radius: 2px;
|
135 |
-
border-radius: 2px;
|
136 |
-
border: 1px solid #666;
|
137 |
-
margin-top: 2px;
|
138 |
-
background-color: #666;
|
139 |
-
display: inline-block;
|
140 |
-
float: left;
|
141 |
-
clear: both;
|
142 |
-
margin-bottom: 3px;
|
143 |
-
position: relative;
|
144 |
-
left: 32px;
|
145 |
-
color: #FFF;
|
146 |
-
max-width: 82%;
|
147 |
-
word-wrap: break-word;
|
148 |
-
max-width: 71%;
|
149 |
-
}
|
150 |
-
|
151 |
-
.wplc-admin-message img{
|
152 |
-
border-radius: 25px;
|
153 |
-
position: absolute;
|
154 |
-
left: -37px;
|
155 |
-
top: 3px;
|
156 |
-
}
|
157 |
-
|
158 |
-
.wplc-user-message:before {
|
159 |
-
display: block;
|
160 |
-
width: 0;
|
161 |
-
top: 15px;
|
162 |
-
bottom: auto;
|
163 |
-
left: auto;
|
164 |
-
right: -7px;
|
165 |
-
border-width: 6px 0 6px 7px;
|
166 |
-
border-color: transparent #ffdb99;
|
167 |
-
content: "";
|
168 |
-
position: absolute;
|
169 |
-
border-style: solid;
|
170 |
-
}
|
171 |
-
|
172 |
-
.wplc-admin-message:before {
|
173 |
-
display: block;
|
174 |
-
width: 0;
|
175 |
-
top: 15px;
|
176 |
-
bottom: auto;
|
177 |
-
left: auto;
|
178 |
-
left: -7px;
|
179 |
-
border-width: 6px 7px 6px 0;
|
180 |
-
border-color: transparent #666;
|
181 |
-
content: "";
|
182 |
-
position: absolute;
|
183 |
-
border-style: solid;
|
184 |
-
}
|
185 |
-
|
186 |
-
.wplc-user-message img.wplc-user-message-avatar {
|
187 |
-
border-radius: 25px;
|
188 |
-
position: absolute;
|
189 |
-
right: -37px;
|
190 |
-
top: 3px;
|
191 |
-
}
|
192 |
-
|
193 |
-
.wplc-user-message hr, .wplc-admin-message hr{
|
194 |
-
margin-bottom: 0px !important;
|
195 |
-
}
|
196 |
-
/* ./Messages */
|
197 |
-
|
198 |
-
.chat_time {
|
199 |
-
display:block;
|
200 |
-
width:100%;
|
201 |
-
text-align:center;
|
202 |
-
font-size:0.8em;
|
203 |
-
color:#ccc;
|
204 |
-
clear:both;
|
205 |
-
|
206 |
-
}
|
207 |
-
|
208 |
-
.admin_visitor_advanced_info { clear:left; }
|
209 |
-
|
210 |
-
|
211 |
-
/*.admin_visitor_advanced_info {
|
212 |
-
clear:both;
|
213 |
-
font-size:0.9em;
|
214 |
-
margin-top:20px;
|
215 |
-
|
216 |
-
}*/
|
217 |
-
.admin_visitor_advanced_info .part1 {
|
218 |
-
color:#3b3b3b;
|
219 |
-
}
|
220 |
-
.admin_visitor_advanced_info .part2 {
|
221 |
-
color:#949494;
|
222 |
-
}
|
223 |
-
.admin_chat_name { font-size:1.3em; display:block; clear:right; font-weight:bold; margin-bottom:5px; }
|
224 |
-
.admin_chat_email { font-size:1em; display:block; clear:right; }
|
225 |
-
|
226 |
-
|
227 |
-
.end_chat_div {
|
228 |
-
display:block;
|
229 |
-
clear:both;
|
230 |
-
text-align:right;
|
231 |
-
font-size:10px;
|
232 |
-
width:85%;
|
233 |
-
margin-left: 40px;
|
234 |
-
margin-bottom:20px;
|
235 |
-
}
|
236 |
-
|
237 |
-
/* New Dashboard Layout */
|
238 |
-
.wplc_admin_dashboard_container{
|
239 |
-
width: 80%;
|
240 |
-
margin: 0 auto;
|
241 |
-
}
|
242 |
-
#wplc_admin_chat_area{
|
243 |
-
width: 65%;
|
244 |
-
display: inline-block;
|
245 |
-
background-color: #FFF;
|
246 |
-
float: left;
|
247 |
-
/*padding: 10px;*/
|
248 |
-
box-shadow: 1px 1px 3px #ccc;
|
249 |
-
}
|
250 |
-
|
251 |
-
#wplc_admin_visitor_area{
|
252 |
-
width: 30%;
|
253 |
-
display: inline-block;
|
254 |
-
background-color: #FFF;
|
255 |
-
float: right;
|
256 |
-
box-shadow: 1px 1px 3px #ccc;
|
257 |
-
}
|
258 |
-
|
259 |
-
.wplc_visitor_container{
|
260 |
-
padding: 10px;
|
261 |
-
}
|
262 |
-
.wplc_visitor_container h1{
|
263 |
-
text-align: center;
|
264 |
-
line-height: 22px;
|
265 |
-
}
|
266 |
-
|
267 |
-
.wplc_chats_container h2{
|
268 |
-
padding: 10px;
|
269 |
-
}
|
270 |
-
|
271 |
-
.wplc_chat_section {
|
272 |
-
width: 33.33%;
|
273 |
-
display: table-cell;
|
274 |
-
vertical-align: middle;
|
275 |
-
}
|
276 |
-
|
277 |
-
.wplc_agent_actions{
|
278 |
-
text-align: center;
|
279 |
-
}
|
280 |
-
|
281 |
-
.wplc_single_chat{
|
282 |
-
width: 100%;
|
283 |
-
display: inline-block;
|
284 |
-
border: 1px solid #EEE;
|
285 |
-
border-radius: 5px;
|
286 |
-
box-shadow: 1px 1px 21px #EEE;
|
287 |
-
margin: 8px auto;
|
288 |
-
padding: 10px;
|
289 |
-
}
|
290 |
-
.wplc_single_chat .wplc_user_image {
|
291 |
-
width: 30%;
|
292 |
-
display: inline-block;
|
293 |
-
float: left;
|
294 |
-
}
|
295 |
-
.wplc_user_meta_data {
|
296 |
-
width: 70%;
|
297 |
-
display: inline-block;
|
298 |
-
}
|
299 |
-
.wplc_single_chat .wplc_user_image img{
|
300 |
-
border-radius: 100px;
|
301 |
-
}
|
302 |
-
|
303 |
-
|
304 |
-
.wplc_single_visitor{
|
305 |
-
border-bottom: 1px solid #ccc;
|
306 |
-
padding: 20px;
|
307 |
-
}
|
308 |
-
|
309 |
-
.wplc_single_visitor .wplc_chat_status{
|
310 |
-
|
311 |
-
}
|
312 |
-
|
313 |
-
.wplc_single_visitor .wplc_user_image {
|
314 |
-
width: 120px;
|
315 |
-
display: inline-block;
|
316 |
-
margin-right: 10px;
|
317 |
-
}
|
318 |
-
|
319 |
-
.wplc_single_visitor .wplc_user_image img{
|
320 |
-
border-radius: 100px;
|
321 |
-
}
|
322 |
-
|
323 |
-
.wplc_single_visitor .wplc_user_meta_data{
|
324 |
-
display: inline-block;
|
325 |
-
vertical-align: top;
|
326 |
-
}
|
327 |
-
|
328 |
-
.wplc_single_visitor .wplc_user_name {
|
329 |
-
|
330 |
-
}
|
331 |
-
|
332 |
-
.wplc_single_visitor .wplc_user_name h3{
|
333 |
-
margin: 0;
|
334 |
-
padding: 0;
|
335 |
-
}
|
336 |
-
|
337 |
-
.wplc_single_visitor h3.ui-accordion .ui-accordion-icons{
|
338 |
-
margin: 0;
|
339 |
-
padding-left: 0;
|
340 |
-
}
|
341 |
-
|
342 |
-
.wplc_single_visitor .wplc_user_name h3 i{
|
343 |
-
padding: 0 10px;
|
344 |
-
}
|
345 |
-
.wplc_active{
|
346 |
-
color: green;
|
347 |
-
}
|
348 |
-
|
349 |
-
.wplc_pending{
|
350 |
-
color: orange;
|
351 |
-
}
|
352 |
-
|
353 |
-
.wplc_closed{
|
354 |
-
color: red;
|
355 |
-
}
|
356 |
-
|
357 |
-
.wplc_single_visitor .wplc_user_email{
|
358 |
-
|
359 |
-
}
|
360 |
-
|
361 |
-
.wplc_single_visitor .wplc_user_ip{
|
362 |
-
|
363 |
-
}
|
364 |
-
|
365 |
-
.wplc_single_visitor .wplc_current_page a{
|
366 |
-
width: 100%;
|
367 |
-
}
|
368 |
-
|
369 |
-
.wplc_single_visitor .wplc_actions{
|
370 |
-
|
371 |
-
}
|
372 |
-
|
373 |
-
.wplc_icon_message{
|
374 |
-
font-size: 10px;
|
375 |
-
font-weight: normal;
|
376 |
-
}
|
377 |
-
|
378 |
-
.wplc_page_title{
|
379 |
-
text-align: center;
|
380 |
-
}
|
381 |
-
|
382 |
-
.wplc_page_title h1{
|
383 |
-
font-size: 3em;
|
384 |
-
}
|
385 |
-
|
386 |
-
.wplc_visitor_icon{
|
387 |
-
padding-right: 10px;
|
388 |
-
|
389 |
-
}
|
390 |
-
|
391 |
-
@media all and (max-width: 550px) {
|
392 |
-
#wplc_admin_chat_area{
|
393 |
-
width: 100%;
|
394 |
-
padding: 0;
|
395 |
-
margin: 0 0 10px 0;
|
396 |
-
}
|
397 |
-
#wplc_admin_visitor_area{
|
398 |
-
width: 100%;
|
399 |
-
}
|
400 |
-
#wplc_admin_chat_area p{
|
401 |
-
padding: 10px
|
402 |
-
}
|
403 |
-
}
|
404 |
-
@media all and (max-width: 1440px) {
|
405 |
-
.wplc_single_chat .wplc_user_image {
|
406 |
-
width: 100%;
|
407 |
-
display: block;
|
408 |
-
text-align: center;
|
409 |
-
}
|
410 |
-
.wplc_user_meta_data {
|
411 |
-
width: 100%;
|
412 |
-
display: block;
|
413 |
-
text-align: center;
|
414 |
-
}
|
415 |
-
}
|
416 |
-
|
417 |
-
@media all and (max-width: 1200px) {
|
418 |
-
.wplc_chat_section.section_1 {
|
419 |
-
display: inline-block;
|
420 |
-
width: 100%;
|
421 |
-
padding: 10px;
|
422 |
-
}
|
423 |
-
}
|
424 |
-
|
425 |
-
@media all and (max-width: 850px) {
|
426 |
-
.wplc_chat_section.section_2 {
|
427 |
-
display: inline-block;
|
428 |
-
width: 100%;
|
429 |
-
padding: 10px;
|
430 |
-
}
|
431 |
-
.admin_visitor_advanced_info{
|
432 |
-
width: 93%;
|
433 |
-
clear:both;
|
434 |
-
}
|
435 |
-
}
|
436 |
-
|
437 |
-
.wplc_admin_dashboard_container p {
|
438 |
-
padding: 0 5px;
|
439 |
-
}
|
440 |
-
|
441 |
-
.toplevel_page_wplivechat-menu .wp-pointer-content h3 {
|
442 |
-
background-color: #ec822c;
|
443 |
-
border: 1px solid #ec822c;
|
444 |
-
}
|
445 |
-
.toplevel_page_wplivechat-menu .wp-pointer-content h3:before {
|
446 |
-
color: #ec822c;
|
447 |
-
}
|
448 |
-
|
449 |
-
#wplc_admin_chat_holder {
|
450 |
-
width:990px;
|
451 |
-
margin:0 auto;
|
452 |
-
display:block;
|
453 |
-
overflow:auto;
|
454 |
-
clear:both;
|
455 |
-
}
|
456 |
-
|
457 |
-
#wplc_admin_chat_area_new {
|
458 |
-
width: 750px;
|
459 |
-
font-size: 13px;
|
460 |
-
float:left;
|
461 |
-
display:block;
|
462 |
-
background-color:#FFF;
|
463 |
-
border-radius:25px;
|
464 |
-
}
|
465 |
-
#wplc_admin_chat_info_new {
|
466 |
-
float:left;
|
467 |
-
width:240px;
|
468 |
-
display:block;
|
469 |
-
margin-bottom:20px;
|
470 |
-
}
|
471 |
-
.wplc_chat_vis_count_box {
|
472 |
-
width:57%;
|
473 |
-
min-width:198px;
|
474 |
-
background-color:#FFF;
|
475 |
-
min-height:150px;
|
476 |
-
border-radius:25px;
|
477 |
-
margin-left:auto;
|
478 |
-
margin-right:auto;
|
479 |
-
display:block;
|
480 |
-
text-align:center;
|
481 |
-
padding:10px;
|
482 |
-
}
|
483 |
-
|
484 |
-
.wplc_vis_online {
|
485 |
-
font-size: 60px;
|
486 |
-
line-height:70px;
|
487 |
-
color: #ec822c;
|
488 |
-
text-align: center;
|
489 |
-
padding-top: 36px;
|
490 |
-
font-family: Arial;
|
491 |
-
display: block;
|
492 |
-
font-weight:bold;
|
493 |
-
}
|
494 |
-
|
495 |
-
#wplc_admin_chat_area_new li {
|
496 |
-
float: left;
|
497 |
-
background: none;
|
498 |
-
padding: 0 2px 0 0;
|
499 |
-
list-style:none;
|
500 |
-
margin:0;
|
501 |
-
}
|
502 |
-
|
503 |
-
#wplc_chat_ul {
|
504 |
-
clear: both;
|
505 |
-
overflow:auto;
|
506 |
-
display:block;
|
507 |
-
}
|
508 |
-
.wplc_p_cul { padding:10px; clear:both; display:block; overflow: auto; }
|
509 |
-
.wplc_p_cul:hover { background-color:#eee; border-radius:5px; }
|
510 |
-
|
511 |
-
.wplc_status_box {
|
512 |
-
padding: 3px;
|
513 |
-
border-radius: 5px;
|
514 |
-
color:white;
|
515 |
-
font-size:11px;
|
516 |
-
}
|
517 |
-
.wplc-agent-info {
|
518 |
-
font: bold 12px/24px Arial;
|
519 |
-
color: #C2BBBE;
|
520 |
-
text-transform: uppercase;
|
521 |
-
display: block;
|
522 |
-
}
|
523 |
-
.wplc_agents_online { color: #ec822c; }
|
524 |
-
.wplc_type_new { background-color: #E1734A; }
|
525 |
-
.wplc_type_returning { background-color: #ec822c; }
|
526 |
-
|
527 |
-
.wplc_status_1 { background-color: #CCCCCC; }
|
528 |
-
.wplc_status_4 { background-color: #CCCCCC; }
|
529 |
-
.wplc_status_8 { background-color: #CCCCCC; }
|
530 |
-
|
531 |
-
.wplc_status_5 { background-color: #B3D24B; }
|
532 |
-
|
533 |
-
.wplc_status_2 { background-color: #3278CD; }
|
534 |
-
.wplc_status_3 { background-color: #3278CD; }
|
535 |
-
|
536 |
-
.wplc_status_6 { background-color: red; }
|
537 |
-
.wplc_status_7 { background-color: #BFBCBB; }
|
538 |
-
.wplc_status_9 { background-color: #BFBCBB; }
|
539 |
-
|
540 |
-
.browser-tag { font-size:10px; }
|
541 |
-
.browser-tag img{ top:3px; position:relative }
|
542 |
-
.wplc-sub-item-header { color:#C7C3C3; font-style: italic; }
|
543 |
-
|
544 |
-
@media (min-width:320px) { #wplc_admin_chat_holder { width:100%; } #wplc_admin_chat_area_new { width:90%; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:none; } .wplc_chat_ul_header { display:none; } .wplc_p_cul { border-bottom:1px solid #ccc; } #wplc_admin_chat_area_new li { float:none; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:5px auto; text-align:center; } .wplc_chat_vis_count_box { min-width:180px; } }
|
545 |
-
@media (min-width:481px) { #wplc_admin_chat_holder { width:100%; } #wplc_admin_chat_area_new { width:90%; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:none; } .wplc_chat_ul_header { display:none; } .wplc_p_cul { border-bottom:1px solid #ccc; } #wplc_admin_chat_area_new li { float:none; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:5px auto; text-align:center; } .wplc_chat_vis_count_box { min-width:180px; } .wplc-sub-item-email-string { white-space: nowrap; width: 100%; /* IE6 needs any width */ overflow: hidden; /* "overflow" value must be different from visible"*/ -o-text-overflow: ellipsis; /* Opera < 11*/ text-overflow: ellipsis; /* IE, Safari (WebKit), Opera >= 11, FF > 6 */ } }
|
546 |
-
@media (min-width:641px) { #wplc_admin_chat_holder { width:650px; } #wplc_admin_chat_area_new { width:640px; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:block; } .wplc_headerspan_nr { display:none; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:180px; } }
|
547 |
-
@media (min-width:961px) { #wplc_admin_chat_holder { width:850px; } #wplc_admin_chat_area_new { width:700px; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:block; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:110px; } }
|
548 |
-
@media (min-width:1025px) { #wplc_admin_chat_holder { width:990px; } #wplc_admin_chat_area_new { width:700px; float:left; display:block; margin: 0; } #wplc_admin_chat_info_new { width:140px; float:left; display:block; margin: 0; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:block; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:110px; } }
|
549 |
-
@media (min-width:1281px) { #wplc_admin_chat_holder { width:990px; } #wplc_admin_chat_area_new { width:750px; float:left; display:block; margin: 0; } #wplc_admin_chat_info_new { width:240px; float:left; display:block; margin: 0; } .wplc_headerspan_t { display:block; } .wplc_headerspan_nr { display:block; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:198px; } }
|
550 |
-
|
551 |
-
.wplc_add_on_button_chat {
|
552 |
-
float:left; margin-right: 10px;
|
553 |
-
}
|
554 |
-
|
555 |
-
.wplc_no_visitors {
|
556 |
-
display: block;
|
557 |
-
width: 100%;
|
558 |
-
text-align: center;
|
559 |
-
font-style: italic;
|
560 |
-
}
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
#wplc_star_rating{
|
566 |
-
text-align: center;
|
567 |
-
padding: 10px;
|
568 |
-
}
|
569 |
-
|
570 |
-
#nifty_file_holder {
|
571 |
-
float: right;
|
572 |
-
margin-right: 13px;
|
573 |
-
margin-top: 4px;
|
574 |
-
}
|
575 |
-
|
576 |
-
.nifty_tedit_icon{
|
577 |
-
font-size: 12px;
|
578 |
-
padding-left: 6px;
|
579 |
-
}
|
580 |
-
|
581 |
-
#nifty_text_editor_holder{
|
582 |
-
margin-top:3px;
|
583 |
-
margin-left:4px;
|
584 |
-
}
|
585 |
-
|
586 |
-
.wplc_faded_upsell {
|
587 |
-
color: lightgrey;
|
588 |
-
}
|
589 |
-
.wplc_chat_area_temp { padding:20px; }
|
590 |
-
.offline-quote {
|
591 |
-
font-size: 26px;
|
592 |
-
font-style: italic;
|
593 |
-
text-align: center;
|
594 |
-
width: 100%;
|
595 |
-
display: block;
|
596 |
-
color: #343434;
|
597 |
-
}
|
598 |
-
.offline-status {
|
599 |
-
display: block;
|
600 |
-
width: 100%;
|
601 |
-
clear:both;
|
602 |
-
text-align: center;
|
603 |
-
line-height: 45px;
|
604 |
-
}
|
605 |
-
|
606 |
-
|
607 |
-
.wplc-logo {
|
608 |
-
|
609 |
-
padding-top: 50px;
|
610 |
-
max-width: 100vw;
|
611 |
-
padding-bottom: 50px;
|
612 |
-
|
613 |
-
}
|
614 |
-
|
615 |
-
.wplc_network_issue {
|
616 |
-
position: absolute;
|
617 |
-
background: white;
|
618 |
-
width: 400px;
|
619 |
-
height: 55px;
|
620 |
-
border-left: 4px solid #ec822c;
|
621 |
-
left: 0;
|
622 |
-
right: 0;
|
623 |
-
top: 0;
|
624 |
-
bottom: 0;
|
625 |
-
margin: auto;
|
626 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
|
627 |
-
-webkit-box-shadow: 0 0px 0px 0 rgba(0,0,0,0.16),0 2px 7px 0 rgba(0,0,0,0.12);
|
628 |
-
-moz-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
|
629 |
-
-o-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
|
630 |
-
}
|
631 |
-
|
632 |
-
.wplc_network_issue span {
|
633 |
-
width: 80%;
|
634 |
-
display: block;
|
635 |
-
padding-top: 5%;
|
636 |
-
padding-bottom: 5%;
|
637 |
-
padding-left: 10%;
|
638 |
-
padding-right: 10%;
|
639 |
-
margin: auto;
|
640 |
-
position: absolute;
|
641 |
-
top: 0;
|
642 |
-
bottom: 0;
|
643 |
-
}
|
644 |
-
|
645 |
-
.wplc_dashboard_additional_label {
|
646 |
-
width: 100%;
|
647 |
-
text-align: center;
|
648 |
-
display: block;
|
649 |
-
margin-top: 10px;
|
650 |
-
cursor: help;
|
651 |
-
}
|
652 |
-
|
653 |
-
.wplc_modal {
|
654 |
-
display: block;
|
655 |
-
position: fixed;
|
656 |
-
top: 0;
|
657 |
-
bottom: 0;
|
658 |
-
left: 0;
|
659 |
-
right: 0;
|
660 |
-
background: rgba(0, 0, 0, 0.3);
|
661 |
-
}
|
662 |
-
|
663 |
-
.wplc_modal_inner {
|
664 |
-
width: 60%;
|
665 |
-
height: 300px;
|
666 |
-
margin: auto;
|
667 |
-
background: #ffffff;
|
668 |
-
position: fixed;
|
669 |
-
z-index: 9999;
|
670 |
-
display: block;
|
671 |
-
top: 0;
|
672 |
-
bottom: 0;
|
673 |
-
left: 0;
|
674 |
-
right: 0;
|
675 |
-
border: 1px solid #9f9f9f;
|
676 |
-
border-radius: 3px;
|
677 |
-
}
|
678 |
-
|
679 |
-
.wplc_modal_inner_title {
|
680 |
-
font-size: 18px;
|
681 |
-
padding: 17px;
|
682 |
-
border-bottom: 1px solid #d5d5d5;
|
683 |
-
}
|
684 |
-
|
685 |
-
.wplc_modal_inner_content {
|
686 |
-
position: absolute;
|
687 |
-
display: block;
|
688 |
-
left: 10px;
|
689 |
-
right: 10px;
|
690 |
-
bottom: 55px;
|
691 |
-
top: 55px;
|
692 |
-
overflow-y: auto;
|
693 |
-
}
|
694 |
-
|
695 |
-
.wplc_modal_inner_actions {
|
696 |
-
height: 28px;
|
697 |
-
position: absolute;
|
698 |
-
bottom: 5px;
|
699 |
-
left: 0;
|
700 |
-
right: 0;
|
701 |
-
text-align: center;
|
702 |
-
}
|
703 |
-
|
704 |
-
span.wplc_system_notification {
|
705 |
-
display: block;
|
706 |
-
clear:both;
|
707 |
-
padding: 8px;
|
708 |
-
font-style: italic;
|
709 |
-
text-align: right;
|
710 |
-
}
|
711 |
-
.widefat th.sortable, .widefat th.sorted {
|
712 |
-
padding: 5px 10px !important;
|
713 |
-
}
|
714 |
-
|
715 |
-
@media (max-width: 1145px) {
|
716 |
-
.wplc-badge {
|
717 |
-
max-width: 35% !important;
|
718 |
-
float: none !important;
|
719 |
-
margin: 0 auto !important;
|
720 |
-
}
|
721 |
-
}
|
722 |
-
|
723 |
-
.wplc-chat-in-progress {
|
724 |
-
display: inline-block;
|
725 |
-
width: 100px;
|
726 |
-
margin-top: 5px;
|
727 |
-
}
|
728 |
-
|
729 |
-
.wplc-history__date {
|
730 |
-
display: block;
|
731 |
-
margin-bottom: 5px;
|
732 |
-
}
|
733 |
-
|
734 |
-
.wplc-history__date-end {
|
735 |
-
margin-bottom: 10px;
|
736 |
-
}
|
737 |
-
|
738 |
-
.wplc-history__date strong {
|
739 |
-
margin-right: 5px;
|
740 |
-
}
|
741 |
-
|
742 |
-
.wplc-exclude-post-types__item,
|
743 |
-
.wplc-require-user-info__item {
|
744 |
-
margin-bottom: 5px;
|
745 |
-
|
746 |
-
}
|
747 |
-
.wplc-chat-box-notification--disabled {
|
748 |
-
padding: 5px;
|
749 |
-
display: block;
|
750 |
-
width: 40%;
|
751 |
-
margin-left: auto;
|
752 |
-
margin-right: auto;
|
753 |
-
border: 1px solid #d26d6d;
|
754 |
-
background-color: #f3bfbf;
|
755 |
-
font-weight: bold;
|
756 |
-
}
|
757 |
-
|
758 |
-
.admin_chat_box_inner span.timedate {
|
759 |
-
clear: both;
|
760 |
-
position: relative;
|
761 |
-
font-size: 0.8em;
|
762 |
-
font-style:italic
|
763 |
-
}
|
764 |
-
|
765 |
-
.wplc-msg-float-left {
|
766 |
-
left: 32px;
|
767 |
-
float:left;
|
768 |
-
}
|
769 |
-
|
770 |
-
.wplc-msg-float-right {
|
771 |
-
right: 32px;
|
772 |
-
float:right;
|
773 |
-
}
|
774 |
-
|
775 |
-
|
776 |
-
#wplc-chat-box {
|
777 |
-
width: fit-content;
|
778 |
-
position: relative;
|
779 |
-
cursor: pointer;
|
780 |
-
}
|
781 |
-
|
782 |
-
.wplc_block {
|
783 |
-
position: relative;
|
784 |
-
display:inline-block;
|
785 |
-
background: #32373c;
|
786 |
-
color: #eee;
|
787 |
-
border-radius: 3px;
|
788 |
-
height: 35px;
|
789 |
-
padding-left: 45px;
|
790 |
-
margin: 5px 0 5px 0;
|
791 |
-
transition: all .2s ease-in-out;
|
792 |
-
cursor: pointer;
|
793 |
-
border-bottom: 0px solid #111;
|
794 |
-
font-size: 17px;
|
795 |
-
line-height: 35px;
|
796 |
-
}
|
797 |
-
|
798 |
-
|
799 |
-
.wplc_block:hover {
|
800 |
-
transform: translateY(-2px);
|
801 |
-
}
|
802 |
-
|
803 |
-
.wplc_block:after {
|
804 |
-
content: "";
|
805 |
-
position: absolute;
|
806 |
-
display: block;
|
807 |
-
height: 0px;
|
808 |
-
bottom: 0;
|
809 |
-
left: 0;
|
810 |
-
width: 100%;
|
811 |
-
background-color: #000;
|
812 |
-
opacity: 0;
|
813 |
-
transition: all .2s ease-in-out;
|
814 |
-
}
|
815 |
-
|
816 |
-
.wplc_block:hover:after {
|
817 |
-
height: 3px;
|
818 |
-
opacity: .2;
|
819 |
-
}
|
820 |
-
|
821 |
-
#wplc-chat-box.disabled:first-child:after {
|
822 |
-
content: "Disabled";
|
823 |
-
color:#fff;
|
824 |
-
font-size: 17px;
|
825 |
-
text-transform: uppercase;
|
826 |
-
text-align: center;
|
827 |
-
display: block;
|
828 |
-
position: absolute;
|
829 |
-
height: 100%;
|
830 |
-
width: 100%;
|
831 |
-
bottom: 0;
|
832 |
-
left: 0;
|
833 |
-
background: #ED832F;
|
834 |
-
opacity: .9;
|
835 |
-
}
|
836 |
-
|
837 |
-
.wplc_block_logo {
|
838 |
-
width: 35px;
|
839 |
-
height: 35px;
|
840 |
-
position: absolute;
|
841 |
-
left: 0;
|
842 |
-
background: #e7e7e7;
|
843 |
-
display: inline-block;
|
844 |
-
margin:0;
|
845 |
-
background-size: cover;
|
846 |
-
background-position: center;
|
847 |
-
background-color:#ED832F !important;
|
848 |
-
transition: all .2s ease-in-out;
|
849 |
-
box-sizing: border-box;
|
850 |
-
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
851 |
-
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
852 |
-
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
853 |
-
}
|
854 |
-
|
855 |
-
.wplc_block_text {
|
856 |
-
display: inline-block;
|
857 |
-
height: 100%;
|
858 |
-
margin-right: 7px;
|
859 |
-
}
|
860 |
-
|
861 |
-
.wplc_block_icon {
|
862 |
-
height: 100%;
|
863 |
-
width: 35px;
|
864 |
-
background: transparent;
|
865 |
-
display: inline-block;
|
866 |
-
}
|
867 |
-
|
868 |
-
.wplc_block_icon.disabled {
|
869 |
-
display: none;
|
870 |
-
}
|
871 |
-
|
872 |
-
/* Block size styles: small */
|
873 |
-
.wplc_block.sm {
|
874 |
-
height: 25px;
|
875 |
-
line-height: 25px;
|
876 |
-
padding-left: 30px;
|
877 |
-
font-size: 12px;
|
878 |
-
}
|
879 |
-
|
880 |
-
.wplc_block.sm:hover:after {
|
881 |
-
height: 2px;
|
882 |
-
opacity: .2;
|
883 |
-
}
|
884 |
-
|
885 |
-
.wplc_block.sm .wplc_block_logo {
|
886 |
-
height: 25px;
|
887 |
-
width: 25px;
|
888 |
-
}
|
889 |
-
|
890 |
-
.wplc_block.sm .wplc_block_text {
|
891 |
-
margin-right: 7px;
|
892 |
-
}
|
893 |
-
|
894 |
-
.wplc_block.sm .wplc_block_icon {
|
895 |
-
margin-right: 7px;
|
896 |
-
width: 13px;
|
897 |
-
}
|
898 |
-
|
899 |
-
/* Block size styles: large */
|
900 |
-
.wplc_block.lg {
|
901 |
-
height: 80px;
|
902 |
-
line-height: 80px;
|
903 |
-
padding-left: 100px;
|
904 |
-
font-size: 25px;
|
905 |
-
}
|
906 |
-
|
907 |
-
.wplc_block.lg:hover:after {
|
908 |
-
height: 6px;
|
909 |
-
opacity: .2;
|
910 |
-
}
|
911 |
-
|
912 |
-
.wplc_block.lg .wplc_block_logo {
|
913 |
-
height: 80px;
|
914 |
-
width: 80px;
|
915 |
-
}
|
916 |
-
|
917 |
-
.wplc_block.lg .wplc_block_text {
|
918 |
-
margin-right: 13px;
|
919 |
-
}
|
920 |
-
|
921 |
-
.wplc_block.lg .wplc_block_icon {
|
922 |
-
margin-right: 13px;
|
923 |
-
}
|
1 |
+
|
2 |
+
#admin_chat_box {
|
3 |
+
display:block;
|
4 |
+
overflow:auto;
|
5 |
+
clear:both;
|
6 |
+
padding:20px;
|
7 |
+
-webkit-border-radius: 5px;
|
8 |
+
-moz-border-radius: 5px;
|
9 |
+
border-radius: 5px;
|
10 |
+
border: 1px solid #ccc;
|
11 |
+
background-color:#fff;
|
12 |
+
width:85%;
|
13 |
+
min-width:675px;
|
14 |
+
}
|
15 |
+
|
16 |
+
.wplc-sub-item-email-string {
|
17 |
+
white-space: nowrap;
|
18 |
+
display:inline-block;
|
19 |
+
width: 120px; /* IE6 needs any width */
|
20 |
+
overflow: hidden; /* "overflow" value must be different from visible"*/
|
21 |
+
-o-text-overflow: ellipsis; /* Opera < 11*/
|
22 |
+
text-overflow: ellipsis; /* IE, Safari (WebKit), Opera >= 11, FF > 6 */
|
23 |
+
}
|
24 |
+
.admin_chat_box {
|
25 |
+
-webkit-border-radius: 5px;
|
26 |
+
-moz-border-radius: 5px;
|
27 |
+
border-radius: 5px;
|
28 |
+
border: 1px solid #ccc;
|
29 |
+
float:left;
|
30 |
+
display:block;
|
31 |
+
background-color:white;
|
32 |
+
width: 50%;
|
33 |
+
min-width:300px;
|
34 |
+
/*height:315px;*/
|
35 |
+
background-color: #ffffff;
|
36 |
+
background-image: -webkit-gradient(linear, left top, left bottom, from(#CCC), to(#FFF));
|
37 |
+
background-image: -webkit-linear-gradient(top, #CCC, #FFF);
|
38 |
+
background-image: -moz-linear-gradient(top, #CCC, #FFF);
|
39 |
+
background-image: -o-linear-gradient(top, #CCC, #FFF);
|
40 |
+
background-image: linear-gradient(to bottom, #CCC, #FFF);
|
41 |
+
}
|
42 |
+
.chat_response_box {
|
43 |
+
|
44 |
+
}
|
45 |
+
.admin_chat_box_inner {
|
46 |
+
height:210px;
|
47 |
+
padding:10px;
|
48 |
+
overflow:scroll;
|
49 |
+
overflow-x: hidden;
|
50 |
+
background-color:#FFF;
|
51 |
+
}
|
52 |
+
|
53 |
+
.admin_chat_box_inner_bottom {
|
54 |
+
/*height:60px;*/
|
55 |
+
width:100%;
|
56 |
+
border-top:1px solid #ccc;
|
57 |
+
display:block;
|
58 |
+
overflow:auto;
|
59 |
+
}
|
60 |
+
.admin_chat_quick_controls {
|
61 |
+
clear:left;
|
62 |
+
padding-left:10px;
|
63 |
+
}
|
64 |
+
|
65 |
+
.admin_visitor_info {
|
66 |
+
float:left;
|
67 |
+
width: 47%;
|
68 |
+
padding-left:15px;
|
69 |
+
min-width:250px;
|
70 |
+
}
|
71 |
+
|
72 |
+
#wplc_admin_chatmsg {
|
73 |
+
width:95%;
|
74 |
+
margin:0 auto;
|
75 |
+
margin-top:10px;
|
76 |
+
display:block;
|
77 |
+
height:50px;
|
78 |
+
padding:10px;
|
79 |
+
-webkit-border-radius: 5px;
|
80 |
+
-moz-border-radius: 5px;
|
81 |
+
border-radius: 5px;
|
82 |
+
border: 1px solid #ccc;
|
83 |
+
}
|
84 |
+
|
85 |
+
.admin_chat_img {
|
86 |
+
-webkit-border-radius: 5px;
|
87 |
+
-moz-border-radius: 5px;
|
88 |
+
border-radius: 5px;
|
89 |
+
}
|
90 |
+
|
91 |
+
.admin_chat_box .admin_chat_box_inner {
|
92 |
+
background: url('../images/bg/cloudy.jpg') repeat;
|
93 |
+
background-size: cover;
|
94 |
+
}
|
95 |
+
.wplc-admin-message {
|
96 |
+
padding:10px;
|
97 |
+
-webkit-border-radius: 2px;
|
98 |
+
-moz-border-radius: 2px;
|
99 |
+
border-radius: 2px;
|
100 |
+
border: 1px solid #ccc;
|
101 |
+
margin-top:2px;
|
102 |
+
background-color:#EEE;
|
103 |
+
display: inline-block;
|
104 |
+
float: left;
|
105 |
+
clear:both;
|
106 |
+
margin-bottom: 3px;
|
107 |
+
word-wrap: break-word;
|
108 |
+
max-width:96%;
|
109 |
+
}
|
110 |
+
|
111 |
+
.wplc-user-message {
|
112 |
+
padding:10px;
|
113 |
+
-webkit-border-radius: 2px;
|
114 |
+
-moz-border-radius: 2px;
|
115 |
+
border-radius: 2px;
|
116 |
+
border: 1px solid #ffdb99;
|
117 |
+
margin-top:2px;
|
118 |
+
background-color:#fff6ef;
|
119 |
+
color:#000;
|
120 |
+
display: inline-block;
|
121 |
+
float: right;
|
122 |
+
clear:both;
|
123 |
+
margin-bottom: 3px;
|
124 |
+
word-wrap: break-word;
|
125 |
+
max-width:96%;
|
126 |
+
position: relative;
|
127 |
+
right: 35px;
|
128 |
+
max-width: 71%;
|
129 |
+
}
|
130 |
+
|
131 |
+
.wplc-admin-message {
|
132 |
+
padding: 10px;
|
133 |
+
-webkit-border-radius: 2px;
|
134 |
+
-moz-border-radius: 2px;
|
135 |
+
border-radius: 2px;
|
136 |
+
border: 1px solid #666;
|
137 |
+
margin-top: 2px;
|
138 |
+
background-color: #666;
|
139 |
+
display: inline-block;
|
140 |
+
float: left;
|
141 |
+
clear: both;
|
142 |
+
margin-bottom: 3px;
|
143 |
+
position: relative;
|
144 |
+
left: 32px;
|
145 |
+
color: #FFF;
|
146 |
+
max-width: 82%;
|
147 |
+
word-wrap: break-word;
|
148 |
+
max-width: 71%;
|
149 |
+
}
|
150 |
+
|
151 |
+
.wplc-admin-message img{
|
152 |
+
border-radius: 25px;
|
153 |
+
position: absolute;
|
154 |
+
left: -37px;
|
155 |
+
top: 3px;
|
156 |
+
}
|
157 |
+
|
158 |
+
.wplc-user-message:before {
|
159 |
+
display: block;
|
160 |
+
width: 0;
|
161 |
+
top: 15px;
|
162 |
+
bottom: auto;
|
163 |
+
left: auto;
|
164 |
+
right: -7px;
|
165 |
+
border-width: 6px 0 6px 7px;
|
166 |
+
border-color: transparent #ffdb99;
|
167 |
+
content: "";
|
168 |
+
position: absolute;
|
169 |
+
border-style: solid;
|
170 |
+
}
|
171 |
+
|
172 |
+
.wplc-admin-message:before {
|
173 |
+
display: block;
|
174 |
+
width: 0;
|
175 |
+
top: 15px;
|
176 |
+
bottom: auto;
|
177 |
+
left: auto;
|
178 |
+
left: -7px;
|
179 |
+
border-width: 6px 7px 6px 0;
|
180 |
+
border-color: transparent #666;
|
181 |
+
content: "";
|
182 |
+
position: absolute;
|
183 |
+
border-style: solid;
|
184 |
+
}
|
185 |
+
|
186 |
+
.wplc-user-message img.wplc-user-message-avatar {
|
187 |
+
border-radius: 25px;
|
188 |
+
position: absolute;
|
189 |
+
right: -37px;
|
190 |
+
top: 3px;
|
191 |
+
}
|
192 |
+
|
193 |
+
.wplc-user-message hr, .wplc-admin-message hr{
|
194 |
+
margin-bottom: 0px !important;
|
195 |
+
}
|
196 |
+
/* ./Messages */
|
197 |
+
|
198 |
+
.chat_time {
|
199 |
+
display:block;
|
200 |
+
width:100%;
|
201 |
+
text-align:center;
|
202 |
+
font-size:0.8em;
|
203 |
+
color:#ccc;
|
204 |
+
clear:both;
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
.admin_visitor_advanced_info { clear:left; }
|
209 |
+
|
210 |
+
|
211 |
+
/*.admin_visitor_advanced_info {
|
212 |
+
clear:both;
|
213 |
+
font-size:0.9em;
|
214 |
+
margin-top:20px;
|
215 |
+
|
216 |
+
}*/
|
217 |
+
.admin_visitor_advanced_info .part1 {
|
218 |
+
color:#3b3b3b;
|
219 |
+
}
|
220 |
+
.admin_visitor_advanced_info .part2 {
|
221 |
+
color:#949494;
|
222 |
+
}
|
223 |
+
.admin_chat_name { font-size:1.3em; display:block; clear:right; font-weight:bold; margin-bottom:5px; }
|
224 |
+
.admin_chat_email { font-size:1em; display:block; clear:right; }
|
225 |
+
|
226 |
+
|
227 |
+
.end_chat_div {
|
228 |
+
display:block;
|
229 |
+
clear:both;
|
230 |
+
text-align:right;
|
231 |
+
font-size:10px;
|
232 |
+
width:85%;
|
233 |
+
margin-left: 40px;
|
234 |
+
margin-bottom:20px;
|
235 |
+
}
|
236 |
+
|
237 |
+
/* New Dashboard Layout */
|
238 |
+
.wplc_admin_dashboard_container{
|
239 |
+
width: 80%;
|
240 |
+
margin: 0 auto;
|
241 |
+
}
|
242 |
+
#wplc_admin_chat_area{
|
243 |
+
width: 65%;
|
244 |
+
display: inline-block;
|
245 |
+
background-color: #FFF;
|
246 |
+
float: left;
|
247 |
+
/*padding: 10px;*/
|
248 |
+
box-shadow: 1px 1px 3px #ccc;
|
249 |
+
}
|
250 |
+
|
251 |
+
#wplc_admin_visitor_area{
|
252 |
+
width: 30%;
|
253 |
+
display: inline-block;
|
254 |
+
background-color: #FFF;
|
255 |
+
float: right;
|
256 |
+
box-shadow: 1px 1px 3px #ccc;
|
257 |
+
}
|
258 |
+
|
259 |
+
.wplc_visitor_container{
|
260 |
+
padding: 10px;
|
261 |
+
}
|
262 |
+
.wplc_visitor_container h1{
|
263 |
+
text-align: center;
|
264 |
+
line-height: 22px;
|
265 |
+
}
|
266 |
+
|
267 |
+
.wplc_chats_container h2{
|
268 |
+
padding: 10px;
|
269 |
+
}
|
270 |
+
|
271 |
+
.wplc_chat_section {
|
272 |
+
width: 33.33%;
|
273 |
+
display: table-cell;
|
274 |
+
vertical-align: middle;
|
275 |
+
}
|
276 |
+
|
277 |
+
.wplc_agent_actions{
|
278 |
+
text-align: center;
|
279 |
+
}
|
280 |
+
|
281 |
+
.wplc_single_chat{
|
282 |
+
width: 100%;
|
283 |
+
display: inline-block;
|
284 |
+
border: 1px solid #EEE;
|
285 |
+
border-radius: 5px;
|
286 |
+
box-shadow: 1px 1px 21px #EEE;
|
287 |
+
margin: 8px auto;
|
288 |
+
padding: 10px;
|
289 |
+
}
|
290 |
+
.wplc_single_chat .wplc_user_image {
|
291 |
+
width: 30%;
|
292 |
+
display: inline-block;
|
293 |
+
float: left;
|
294 |
+
}
|
295 |
+
.wplc_user_meta_data {
|
296 |
+
width: 70%;
|
297 |
+
display: inline-block;
|
298 |
+
}
|
299 |
+
.wplc_single_chat .wplc_user_image img{
|
300 |
+
border-radius: 100px;
|
301 |
+
}
|
302 |
+
|
303 |
+
|
304 |
+
.wplc_single_visitor{
|
305 |
+
border-bottom: 1px solid #ccc;
|
306 |
+
padding: 20px;
|
307 |
+
}
|
308 |
+
|
309 |
+
.wplc_single_visitor .wplc_chat_status{
|
310 |
+
|
311 |
+
}
|
312 |
+
|
313 |
+
.wplc_single_visitor .wplc_user_image {
|
314 |
+
width: 120px;
|
315 |
+
display: inline-block;
|
316 |
+
margin-right: 10px;
|
317 |
+
}
|
318 |
+
|
319 |
+
.wplc_single_visitor .wplc_user_image img{
|
320 |
+
border-radius: 100px;
|
321 |
+
}
|
322 |
+
|
323 |
+
.wplc_single_visitor .wplc_user_meta_data{
|
324 |
+
display: inline-block;
|
325 |
+
vertical-align: top;
|
326 |
+
}
|
327 |
+
|
328 |
+
.wplc_single_visitor .wplc_user_name {
|
329 |
+
|
330 |
+
}
|
331 |
+
|
332 |
+
.wplc_single_visitor .wplc_user_name h3{
|
333 |
+
margin: 0;
|
334 |
+
padding: 0;
|
335 |
+
}
|
336 |
+
|
337 |
+
.wplc_single_visitor h3.ui-accordion .ui-accordion-icons{
|
338 |
+
margin: 0;
|
339 |
+
padding-left: 0;
|
340 |
+
}
|
341 |
+
|
342 |
+
.wplc_single_visitor .wplc_user_name h3 i{
|
343 |
+
padding: 0 10px;
|
344 |
+
}
|
345 |
+
.wplc_active{
|
346 |
+
color: green;
|
347 |
+
}
|
348 |
+
|
349 |
+
.wplc_pending{
|
350 |
+
color: orange;
|
351 |
+
}
|
352 |
+
|
353 |
+
.wplc_closed{
|
354 |
+
color: red;
|
355 |
+
}
|
356 |
+
|
357 |
+
.wplc_single_visitor .wplc_user_email{
|
358 |
+
|
359 |
+
}
|
360 |
+
|
361 |
+
.wplc_single_visitor .wplc_user_ip{
|
362 |
+
|
363 |
+
}
|
364 |
+
|
365 |
+
.wplc_single_visitor .wplc_current_page a{
|
366 |
+
width: 100%;
|
367 |
+
}
|
368 |
+
|
369 |
+
.wplc_single_visitor .wplc_actions{
|
370 |
+
|
371 |
+
}
|
372 |
+
|
373 |
+
.wplc_icon_message{
|
374 |
+
font-size: 10px;
|
375 |
+
font-weight: normal;
|
376 |
+
}
|
377 |
+
|
378 |
+
.wplc_page_title{
|
379 |
+
text-align: center;
|
380 |
+
}
|
381 |
+
|
382 |
+
.wplc_page_title h1{
|
383 |
+
font-size: 3em;
|
384 |
+
}
|
385 |
+
|
386 |
+
.wplc_visitor_icon{
|
387 |
+
padding-right: 10px;
|
388 |
+
|
389 |
+
}
|
390 |
+
|
391 |
+
@media all and (max-width: 550px) {
|
392 |
+
#wplc_admin_chat_area{
|
393 |
+
width: 100%;
|
394 |
+
padding: 0;
|
395 |
+
margin: 0 0 10px 0;
|
396 |
+
}
|
397 |
+
#wplc_admin_visitor_area{
|
398 |
+
width: 100%;
|
399 |
+
}
|
400 |
+
#wplc_admin_chat_area p{
|
401 |
+
padding: 10px
|
402 |
+
}
|
403 |
+
}
|
404 |
+
@media all and (max-width: 1440px) {
|
405 |
+
.wplc_single_chat .wplc_user_image {
|
406 |
+
width: 100%;
|
407 |
+
display: block;
|
408 |
+
text-align: center;
|
409 |
+
}
|
410 |
+
.wplc_user_meta_data {
|
411 |
+
width: 100%;
|
412 |
+
display: block;
|
413 |
+
text-align: center;
|
414 |
+
}
|
415 |
+
}
|
416 |
+
|
417 |
+
@media all and (max-width: 1200px) {
|
418 |
+
.wplc_chat_section.section_1 {
|
419 |
+
display: inline-block;
|
420 |
+
width: 100%;
|
421 |
+
padding: 10px;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
@media all and (max-width: 850px) {
|
426 |
+
.wplc_chat_section.section_2 {
|
427 |
+
display: inline-block;
|
428 |
+
width: 100%;
|
429 |
+
padding: 10px;
|
430 |
+
}
|
431 |
+
.admin_visitor_advanced_info{
|
432 |
+
width: 93%;
|
433 |
+
clear:both;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
.wplc_admin_dashboard_container p {
|
438 |
+
padding: 0 5px;
|
439 |
+
}
|
440 |
+
|
441 |
+
.toplevel_page_wplivechat-menu .wp-pointer-content h3 {
|
442 |
+
background-color: #ec822c;
|
443 |
+
border: 1px solid #ec822c;
|
444 |
+
}
|
445 |
+
.toplevel_page_wplivechat-menu .wp-pointer-content h3:before {
|
446 |
+
color: #ec822c;
|
447 |
+
}
|
448 |
+
|
449 |
+
#wplc_admin_chat_holder {
|
450 |
+
width:990px;
|
451 |
+
margin:0 auto;
|
452 |
+
display:block;
|
453 |
+
overflow:auto;
|
454 |
+
clear:both;
|
455 |
+
}
|
456 |
+
|
457 |
+
#wplc_admin_chat_area_new {
|
458 |
+
width: 750px;
|
459 |
+
font-size: 13px;
|
460 |
+
float:left;
|
461 |
+
display:block;
|
462 |
+
background-color:#FFF;
|
463 |
+
border-radius:25px;
|
464 |
+
}
|
465 |
+
#wplc_admin_chat_info_new {
|
466 |
+
float:left;
|
467 |
+
width:240px;
|
468 |
+
display:block;
|
469 |
+
margin-bottom:20px;
|
470 |
+
}
|
471 |
+
.wplc_chat_vis_count_box {
|
472 |
+
width:57%;
|
473 |
+
min-width:198px;
|
474 |
+
background-color:#FFF;
|
475 |
+
min-height:150px;
|
476 |
+
border-radius:25px;
|
477 |
+
margin-left:auto;
|
478 |
+
margin-right:auto;
|
479 |
+
display:block;
|
480 |
+
text-align:center;
|
481 |
+
padding:10px;
|
482 |
+
}
|
483 |
+
|
484 |
+
.wplc_vis_online {
|
485 |
+
font-size: 60px;
|
486 |
+
line-height:70px;
|
487 |
+
color: #ec822c;
|
488 |
+
text-align: center;
|
489 |
+
padding-top: 36px;
|
490 |
+
font-family: Arial;
|
491 |
+
display: block;
|
492 |
+
font-weight:bold;
|
493 |
+
}
|
494 |
+
|
495 |
+
#wplc_admin_chat_area_new li {
|
496 |
+
float: left;
|
497 |
+
background: none;
|
498 |
+
padding: 0 2px 0 0;
|
499 |
+
list-style:none;
|
500 |
+
margin:0;
|
501 |
+
}
|
502 |
+
|
503 |
+
#wplc_chat_ul {
|
504 |
+
clear: both;
|
505 |
+
overflow:auto;
|
506 |
+
display:block;
|
507 |
+
}
|
508 |
+
.wplc_p_cul { padding:10px; clear:both; display:block; overflow: auto; }
|
509 |
+
.wplc_p_cul:hover { background-color:#eee; border-radius:5px; }
|
510 |
+
|
511 |
+
.wplc_status_box {
|
512 |
+
padding: 3px;
|
513 |
+
border-radius: 5px;
|
514 |
+
color:white;
|
515 |
+
font-size:11px;
|
516 |
+
}
|
517 |
+
.wplc-agent-info {
|
518 |
+
font: bold 12px/24px Arial;
|
519 |
+
color: #C2BBBE;
|
520 |
+
text-transform: uppercase;
|
521 |
+
display: block;
|
522 |
+
}
|
523 |
+
.wplc_agents_online { color: #ec822c; }
|
524 |
+
.wplc_type_new { background-color: #E1734A; }
|
525 |
+
.wplc_type_returning { background-color: #ec822c; }
|
526 |
+
|
527 |
+
.wplc_status_1 { background-color: #CCCCCC; }
|
528 |
+
.wplc_status_4 { background-color: #CCCCCC; }
|
529 |
+
.wplc_status_8 { background-color: #CCCCCC; }
|
530 |
+
|
531 |
+
.wplc_status_5 { background-color: #B3D24B; }
|
532 |
+
|
533 |
+
.wplc_status_2 { background-color: #3278CD; }
|
534 |
+
.wplc_status_3 { background-color: #3278CD; }
|
535 |
+
|
536 |
+
.wplc_status_6 { background-color: red; }
|
537 |
+
.wplc_status_7 { background-color: #BFBCBB; }
|
538 |
+
.wplc_status_9 { background-color: #BFBCBB; }
|
539 |
+
|
540 |
+
.browser-tag { font-size:10px; }
|
541 |
+
.browser-tag img{ top:3px; position:relative }
|
542 |
+
.wplc-sub-item-header { color:#C7C3C3; font-style: italic; }
|
543 |
+
|
544 |
+
@media (min-width:320px) { #wplc_admin_chat_holder { width:100%; } #wplc_admin_chat_area_new { width:90%; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:none; } .wplc_chat_ul_header { display:none; } .wplc_p_cul { border-bottom:1px solid #ccc; } #wplc_admin_chat_area_new li { float:none; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:5px auto; text-align:center; } .wplc_chat_vis_count_box { min-width:180px; } }
|
545 |
+
@media (min-width:481px) { #wplc_admin_chat_holder { width:100%; } #wplc_admin_chat_area_new { width:90%; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:none; } .wplc_chat_ul_header { display:none; } .wplc_p_cul { border-bottom:1px solid #ccc; } #wplc_admin_chat_area_new li { float:none; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:5px auto; text-align:center; } .wplc_chat_vis_count_box { min-width:180px; } .wplc-sub-item-email-string { white-space: nowrap; width: 100%; /* IE6 needs any width */ overflow: hidden; /* "overflow" value must be different from visible"*/ -o-text-overflow: ellipsis; /* Opera < 11*/ text-overflow: ellipsis; /* IE, Safari (WebKit), Opera >= 11, FF > 6 */ } }
|
546 |
+
@media (min-width:641px) { #wplc_admin_chat_holder { width:650px; } #wplc_admin_chat_area_new { width:640px; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:block; } .wplc_headerspan_nr { display:none; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:180px; } }
|
547 |
+
@media (min-width:961px) { #wplc_admin_chat_holder { width:850px; } #wplc_admin_chat_area_new { width:700px; float:none; display:block; margin: 0 auto; } #wplc_admin_chat_info_new { width:240px; float:none; display:block; margin: 20px auto; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:block; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:110px; } }
|
548 |
+
@media (min-width:1025px) { #wplc_admin_chat_holder { width:990px; } #wplc_admin_chat_area_new { width:700px; float:left; display:block; margin: 0; } #wplc_admin_chat_info_new { width:140px; float:left; display:block; margin: 0; } .wplc_headerspan_t { display:none; } .wplc_headerspan_nr { display:block; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:110px; } }
|
549 |
+
@media (min-width:1281px) { #wplc_admin_chat_holder { width:990px; } #wplc_admin_chat_area_new { width:750px; float:left; display:block; margin: 0; } #wplc_admin_chat_info_new { width:240px; float:left; display:block; margin: 0; } .wplc_headerspan_t { display:block; } .wplc_headerspan_nr { display:block; } .wplc_chat_ul_header { display:block; } .wplc_p_cul { border-bottom:none; } #wplc_admin_chat_area_new li { float:left; } .wplc_headerspan_a,.wplc_headerspan_d,.wplc_headerspan_v,.wplc_headerspan_s { margin:0; text-align:left; } .wplc_chat_vis_count_box { min-width:198px; } }
|
550 |
+
|
551 |
+
.wplc_add_on_button_chat {
|
552 |
+
float:left; margin-right: 10px;
|
553 |
+
}
|
554 |
+
|
555 |
+
.wplc_no_visitors {
|
556 |
+
display: block;
|
557 |
+
width: 100%;
|
558 |
+
text-align: center;
|
559 |
+
font-style: italic;
|
560 |
+
}
|
561 |
+
|
562 |
+
|
563 |
+
|
564 |
+
|
565 |
+
#wplc_star_rating{
|
566 |
+
text-align: center;
|
567 |
+
padding: 10px;
|
568 |
+
}
|
569 |
+
|
570 |
+
#nifty_file_holder {
|
571 |
+
float: right;
|
572 |
+
margin-right: 13px;
|
573 |
+
margin-top: 4px;
|
574 |
+
}
|
575 |
+
|
576 |
+
.nifty_tedit_icon{
|
577 |
+
font-size: 12px;
|
578 |
+
padding-left: 6px;
|
579 |
+
}
|
580 |
+
|
581 |
+
#nifty_text_editor_holder{
|
582 |
+
margin-top:3px;
|
583 |
+
margin-left:4px;
|
584 |
+
}
|
585 |
+
|
586 |
+
.wplc_faded_upsell {
|
587 |
+
color: lightgrey;
|
588 |
+
}
|
589 |
+
.wplc_chat_area_temp { padding:20px; }
|
590 |
+
.offline-quote {
|
591 |
+
font-size: 26px;
|
592 |
+
font-style: italic;
|
593 |
+
text-align: center;
|
594 |
+
width: 100%;
|
595 |
+
display: block;
|
596 |
+
color: #343434;
|
597 |
+
}
|
598 |
+
.offline-status {
|
599 |
+
display: block;
|
600 |
+
width: 100%;
|
601 |
+
clear:both;
|
602 |
+
text-align: center;
|
603 |
+
line-height: 45px;
|
604 |
+
}
|
605 |
+
|
606 |
+
|
607 |
+
.wplc-logo {
|
608 |
+
|
609 |
+
padding-top: 50px;
|
610 |
+
max-width: 100vw;
|
611 |
+
padding-bottom: 50px;
|
612 |
+
|
613 |
+
}
|
614 |
+
|
615 |
+
.wplc_network_issue {
|
616 |
+
position: absolute;
|
617 |
+
background: white;
|
618 |
+
width: 400px;
|
619 |
+
height: 55px;
|
620 |
+
border-left: 4px solid #ec822c;
|
621 |
+
left: 0;
|
622 |
+
right: 0;
|
623 |
+
top: 0;
|
624 |
+
bottom: 0;
|
625 |
+
margin: auto;
|
626 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
|
627 |
+
-webkit-box-shadow: 0 0px 0px 0 rgba(0,0,0,0.16),0 2px 7px 0 rgba(0,0,0,0.12);
|
628 |
+
-moz-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
|
629 |
+
-o-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
|
630 |
+
}
|
631 |
+
|
632 |
+
.wplc_network_issue span {
|
633 |
+
width: 80%;
|
634 |
+
display: block;
|
635 |
+
padding-top: 5%;
|
636 |
+
padding-bottom: 5%;
|
637 |
+
padding-left: 10%;
|
638 |
+
padding-right: 10%;
|
639 |
+
margin: auto;
|
640 |
+
position: absolute;
|
641 |
+
top: 0;
|
642 |
+
bottom: 0;
|
643 |
+
}
|
644 |
+
|
645 |
+
.wplc_dashboard_additional_label {
|
646 |
+
width: 100%;
|
647 |
+
text-align: center;
|
648 |
+
display: block;
|
649 |
+
margin-top: 10px;
|
650 |
+
cursor: help;
|
651 |
+
}
|
652 |
+
|
653 |
+
.wplc_modal {
|
654 |
+
display: block;
|
655 |
+
position: fixed;
|
656 |
+
top: 0;
|
657 |
+
bottom: 0;
|
658 |
+
left: 0;
|
659 |
+
right: 0;
|
660 |
+
background: rgba(0, 0, 0, 0.3);
|
661 |
+
}
|
662 |
+
|
663 |
+
.wplc_modal_inner {
|
664 |
+
width: 60%;
|
665 |
+
height: 300px;
|
666 |
+
margin: auto;
|
667 |
+
background: #ffffff;
|
668 |
+
position: fixed;
|
669 |
+
z-index: 9999;
|
670 |
+
display: block;
|
671 |
+
top: 0;
|
672 |
+
bottom: 0;
|
673 |
+
left: 0;
|
674 |
+
right: 0;
|
675 |
+
border: 1px solid #9f9f9f;
|
676 |
+
border-radius: 3px;
|
677 |
+
}
|
678 |
+
|
679 |
+
.wplc_modal_inner_title {
|
680 |
+
font-size: 18px;
|
681 |
+
padding: 17px;
|
682 |
+
border-bottom: 1px solid #d5d5d5;
|
683 |
+
}
|
684 |
+
|
685 |
+
.wplc_modal_inner_content {
|
686 |
+
position: absolute;
|
687 |
+
display: block;
|
688 |
+
left: 10px;
|
689 |
+
right: 10px;
|
690 |
+
bottom: 55px;
|
691 |
+
top: 55px;
|
692 |
+
overflow-y: auto;
|
693 |
+
}
|
694 |
+
|
695 |
+
.wplc_modal_inner_actions {
|
696 |
+
height: 28px;
|
697 |
+
position: absolute;
|
698 |
+
bottom: 5px;
|
699 |
+
left: 0;
|
700 |
+
right: 0;
|
701 |
+
text-align: center;
|
702 |
+
}
|
703 |
+
|
704 |
+
span.wplc_system_notification {
|
705 |
+
display: block;
|
706 |
+
clear:both;
|
707 |
+
padding: 8px;
|
708 |
+
font-style: italic;
|
709 |
+
text-align: right;
|
710 |
+
}
|
711 |
+
.widefat th.sortable, .widefat th.sorted {
|
712 |
+
padding: 5px 10px !important;
|
713 |
+
}
|
714 |
+
|
715 |
+
@media (max-width: 1145px) {
|
716 |
+
.wplc-badge {
|
717 |
+
max-width: 35% !important;
|
718 |
+
float: none !important;
|
719 |
+
margin: 0 auto !important;
|
720 |
+
}
|
721 |
+
}
|
722 |
+
|
723 |
+
.wplc-chat-in-progress {
|
724 |
+
display: inline-block;
|
725 |
+
width: 100px;
|
726 |
+
margin-top: 5px;
|
727 |
+
}
|
728 |
+
|
729 |
+
.wplc-history__date {
|
730 |
+
display: block;
|
731 |
+
margin-bottom: 5px;
|
732 |
+
}
|
733 |
+
|
734 |
+
.wplc-history__date-end {
|
735 |
+
margin-bottom: 10px;
|
736 |
+
}
|
737 |
+
|
738 |
+
.wplc-history__date strong {
|
739 |
+
margin-right: 5px;
|
740 |
+
}
|
741 |
+
|
742 |
+
.wplc-exclude-post-types__item,
|
743 |
+
.wplc-require-user-info__item {
|
744 |
+
margin-bottom: 5px;
|
745 |
+
|
746 |
+
}
|
747 |
+
.wplc-chat-box-notification--disabled {
|
748 |
+
padding: 5px;
|
749 |
+
display: block;
|
750 |
+
width: 40%;
|
751 |
+
margin-left: auto;
|
752 |
+
margin-right: auto;
|
753 |
+
border: 1px solid #d26d6d;
|
754 |
+
background-color: #f3bfbf;
|
755 |
+
font-weight: bold;
|
756 |
+
}
|
757 |
+
|
758 |
+
.admin_chat_box_inner span.timedate {
|
759 |
+
clear: both;
|
760 |
+
position: relative;
|
761 |
+
font-size: 0.8em;
|
762 |
+
font-style:italic
|
763 |
+
}
|
764 |
+
|
765 |
+
.wplc-msg-float-left {
|
766 |
+
left: 32px;
|
767 |
+
float:left;
|
768 |
+
}
|
769 |
+
|
770 |
+
.wplc-msg-float-right {
|
771 |
+
right: 32px;
|
772 |
+
float:right;
|
773 |
+
}
|
774 |
+
|
775 |
+
|
776 |
+
#wplc-chat-box {
|
777 |
+
width: fit-content;
|
778 |
+
position: relative;
|
779 |
+
cursor: pointer;
|
780 |
+
}
|
781 |
+
|
782 |
+
.wplc_block {
|
783 |
+
position: relative;
|
784 |
+
display:inline-block;
|
785 |
+
background: #32373c;
|
786 |
+
color: #eee;
|
787 |
+
border-radius: 3px;
|
788 |
+
height: 35px;
|
789 |
+
padding-left: 45px;
|
790 |
+
margin: 5px 0 5px 0;
|
791 |
+
transition: all .2s ease-in-out;
|
792 |
+
cursor: pointer;
|
793 |
+
border-bottom: 0px solid #111;
|
794 |
+
font-size: 17px;
|
795 |
+
line-height: 35px;
|
796 |
+
}
|
797 |
+
|
798 |
+
|
799 |
+
.wplc_block:hover {
|
800 |
+
transform: translateY(-2px);
|
801 |
+
}
|
802 |
+
|
803 |
+
.wplc_block:after {
|
804 |
+
content: "";
|
805 |
+
position: absolute;
|
806 |
+
display: block;
|
807 |
+
height: 0px;
|
808 |
+
bottom: 0;
|
809 |
+
left: 0;
|
810 |
+
width: 100%;
|
811 |
+
background-color: #000;
|
812 |
+
opacity: 0;
|
813 |
+
transition: all .2s ease-in-out;
|
814 |
+
}
|
815 |
+
|
816 |
+
.wplc_block:hover:after {
|
817 |
+
height: 3px;
|
818 |
+
opacity: .2;
|
819 |
+
}
|
820 |
+
|
821 |
+
#wplc-chat-box.disabled:first-child:after {
|
822 |
+
content: "Disabled";
|
823 |
+
color:#fff;
|
824 |
+
font-size: 17px;
|
825 |
+
text-transform: uppercase;
|
826 |
+
text-align: center;
|
827 |
+
display: block;
|
828 |
+
position: absolute;
|
829 |
+
height: 100%;
|
830 |
+
width: 100%;
|
831 |
+
bottom: 0;
|
832 |
+
left: 0;
|
833 |
+
background: #ED832F;
|
834 |
+
opacity: .9;
|
835 |
+
}
|
836 |
+
|
837 |
+
.wplc_block_logo {
|
838 |
+
width: 35px;
|
839 |
+
height: 35px;
|
840 |
+
position: absolute;
|
841 |
+
left: 0;
|
842 |
+
background: #e7e7e7;
|
843 |
+
display: inline-block;
|
844 |
+
margin:0;
|
845 |
+
background-size: cover;
|
846 |
+
background-position: center;
|
847 |
+
background-color:#ED832F !important;
|
848 |
+
transition: all .2s ease-in-out;
|
849 |
+
box-sizing: border-box;
|
850 |
+
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
851 |
+
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
852 |
+
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
853 |
+
}
|
854 |
+
|
855 |
+
.wplc_block_text {
|
856 |
+
display: inline-block;
|
857 |
+
height: 100%;
|
858 |
+
margin-right: 7px;
|
859 |
+
}
|
860 |
+
|
861 |
+
.wplc_block_icon {
|
862 |
+
height: 100%;
|
863 |
+
width: 35px;
|
864 |
+
background: transparent;
|
865 |
+
display: inline-block;
|
866 |
+
}
|
867 |
+
|
868 |
+
.wplc_block_icon.disabled {
|
869 |
+
display: none;
|
870 |
+
}
|
871 |
+
|
872 |
+
/* Block size styles: small */
|
873 |
+
.wplc_block.sm {
|
874 |
+
height: 25px;
|
875 |
+
line-height: 25px;
|
876 |
+
padding-left: 30px;
|
877 |
+
font-size: 12px;
|
878 |
+
}
|
879 |
+
|
880 |
+
.wplc_block.sm:hover:after {
|
881 |
+
height: 2px;
|
882 |
+
opacity: .2;
|
883 |
+
}
|
884 |
+
|
885 |
+
.wplc_block.sm .wplc_block_logo {
|
886 |
+
height: 25px;
|
887 |
+
width: 25px;
|
888 |
+
}
|
889 |
+
|
890 |
+
.wplc_block.sm .wplc_block_text {
|
891 |
+
margin-right: 7px;
|
892 |
+
}
|
893 |
+
|
894 |
+
.wplc_block.sm .wplc_block_icon {
|
895 |
+
margin-right: 7px;
|
896 |
+
width: 13px;
|
897 |
+
}
|
898 |
+
|
899 |
+
/* Block size styles: large */
|
900 |
+
.wplc_block.lg {
|
901 |
+
height: 80px;
|
902 |
+
line-height: 80px;
|
903 |
+
padding-left: 100px;
|
904 |
+
font-size: 25px;
|
905 |
+
}
|
906 |
+
|
907 |
+
.wplc_block.lg:hover:after {
|
908 |
+
height: 6px;
|
909 |
+
opacity: .2;
|
910 |
+
}
|
911 |
+
|
912 |
+
.wplc_block.lg .wplc_block_logo {
|
913 |
+
height: 80px;
|
914 |
+
width: 80px;
|
915 |
+
}
|
916 |
+
|
917 |
+
.wplc_block.lg .wplc_block_text {
|
918 |
+
margin-right: 13px;
|
919 |
+
}
|
920 |
+
|
921 |
+
.wplc_block.lg .wplc_block_icon {
|
922 |
+
margin-right: 13px;
|
923 |
+
}
|
css/font-awesome.min.css
CHANGED
File without changes
|
css/fontawesome-iconpicker.css
CHANGED
@@ -1,335 +1,335 @@
|
|
1 |
-
/*!
|
2 |
-
* Font Awesome Icon Picker
|
3 |
-
* https://itsjavi.com/fontawesome-iconpicker/
|
4 |
-
*
|
5 |
-
* Originally written by (c) 2016 Javi Aguilar
|
6 |
-
* Licensed under the MIT License
|
7 |
-
* https://github.com/itsjavi/fontawesome-iconpicker/blob/master/LICENSE
|
8 |
-
*
|
9 |
-
*/
|
10 |
-
/*
|
11 |
-
* Font Awesome Icon Picker
|
12 |
-
* https://itsjavi.com/fontawesome-iconpicker/
|
13 |
-
*
|
14 |
-
* Originally written by (c) 2016 Javi Aguilar
|
15 |
-
* Licensed under the MIT License
|
16 |
-
* https://github.com/itsjavi/fontawesome-iconpicker/blob/master/LICENSE
|
17 |
-
*
|
18 |
-
*/
|
19 |
-
/*
|
20 |
-
* Font Awesome Icon Picker
|
21 |
-
* https://itsjavi.com/fontawesome-iconpicker/
|
22 |
-
*
|
23 |
-
* Originally written by (c) 2016 Javi Aguilar
|
24 |
-
* Licensed under the MIT License
|
25 |
-
* https://github.com/itsjavi/fontawesome-iconpicker/blob/master/LICENSE
|
26 |
-
*
|
27 |
-
*/
|
28 |
-
.iconpicker-popover.popover {
|
29 |
-
position: absolute;
|
30 |
-
top: 0;
|
31 |
-
left: 0;
|
32 |
-
display: none;
|
33 |
-
max-width: none;
|
34 |
-
padding: 1px;
|
35 |
-
text-align: left;
|
36 |
-
width: 216px;
|
37 |
-
background: #f7f7f7;
|
38 |
-
z-index: 100;
|
39 |
-
border: 1px solid #e7e7e7;
|
40 |
-
border-radius: 3px;
|
41 |
-
}
|
42 |
-
.iconpicker-popover.popover.top,
|
43 |
-
.iconpicker-popover.popover.topLeftCorner,
|
44 |
-
.iconpicker-popover.popover.topLeft,
|
45 |
-
.iconpicker-popover.popover.topRight,
|
46 |
-
.iconpicker-popover.popover.topRightCorner {
|
47 |
-
margin-top: -10px;
|
48 |
-
}
|
49 |
-
.iconpicker-popover.popover.right,
|
50 |
-
.iconpicker-popover.popover.rightTop,
|
51 |
-
.iconpicker-popover.popover.rightBottom {
|
52 |
-
margin-left: 10px;
|
53 |
-
}
|
54 |
-
.iconpicker-popover.popover.bottom,
|
55 |
-
.iconpicker-popover.popover.bottomRightCorner,
|
56 |
-
.iconpicker-popover.popover.bottomRight,
|
57 |
-
.iconpicker-popover.popover.bottomLeft,
|
58 |
-
.iconpicker-popover.popover.bottomLeftCorner {
|
59 |
-
margin-top: 10px;
|
60 |
-
}
|
61 |
-
.iconpicker-popover.popover.left,
|
62 |
-
.iconpicker-popover.popover.leftBottom,
|
63 |
-
.iconpicker-popover.popover.leftTop {
|
64 |
-
margin-left: -10px;
|
65 |
-
}
|
66 |
-
.iconpicker-popover.popover.inline {
|
67 |
-
margin: 0 0 12px 0;
|
68 |
-
position: relative;
|
69 |
-
display: inline-block;
|
70 |
-
opacity: 1;
|
71 |
-
top: auto;
|
72 |
-
left: auto;
|
73 |
-
bottom: auto;
|
74 |
-
right: auto;
|
75 |
-
max-width: 100%;
|
76 |
-
box-shadow: none;
|
77 |
-
z-index: auto;
|
78 |
-
vertical-align: top;
|
79 |
-
}
|
80 |
-
.iconpicker-popover.popover.inline > .arrow {
|
81 |
-
display: none;
|
82 |
-
}
|
83 |
-
.dropdown-menu .iconpicker-popover.inline {
|
84 |
-
margin: 0;
|
85 |
-
border: none;
|
86 |
-
}
|
87 |
-
.dropdown-menu.iconpicker-container {
|
88 |
-
padding: 0;
|
89 |
-
}
|
90 |
-
.iconpicker-popover.popover .popover-title {
|
91 |
-
padding: 12px;
|
92 |
-
font-size: 13px;
|
93 |
-
line-height: 15px;
|
94 |
-
border-bottom: 1px solid #ebebeb;
|
95 |
-
background-color: #f7f7f7;
|
96 |
-
}
|
97 |
-
.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search {
|
98 |
-
margin: 0 0 2px 0;
|
99 |
-
}
|
100 |
-
.iconpicker-popover.popover .popover-title-text ~ input[type=search].iconpicker-search {
|
101 |
-
margin-top: 12px;
|
102 |
-
}
|
103 |
-
.iconpicker-popover.popover .popover-content {
|
104 |
-
padding: 0px;
|
105 |
-
text-align: center;
|
106 |
-
}
|
107 |
-
.iconpicker-popover .popover-footer {
|
108 |
-
float: none;
|
109 |
-
clear: both;
|
110 |
-
padding: 12px;
|
111 |
-
text-align: right;
|
112 |
-
margin: 0;
|
113 |
-
border-top: 1px solid #ebebeb;
|
114 |
-
background-color: #f7f7f7;
|
115 |
-
}
|
116 |
-
.iconpicker-popover .popover-footer:before,
|
117 |
-
.iconpicker-popover .popover-footer:after {
|
118 |
-
content: " ";
|
119 |
-
display: table;
|
120 |
-
}
|
121 |
-
.iconpicker-popover .popover-footer:after {
|
122 |
-
clear: both;
|
123 |
-
}
|
124 |
-
.iconpicker-popover .popover-footer .iconpicker-btn {
|
125 |
-
margin-left: 10px;
|
126 |
-
}
|
127 |
-
.iconpicker-popover .popover-footer input[type=search].iconpicker-search {
|
128 |
-
/*width:auto;
|
129 |
-
float:left;*/
|
130 |
-
margin-bottom: 12px;
|
131 |
-
}
|
132 |
-
.iconpicker-popover.popover > .arrow,
|
133 |
-
.iconpicker-popover.popover > .arrow:after {
|
134 |
-
position: absolute;
|
135 |
-
display: block;
|
136 |
-
width: 0;
|
137 |
-
height: 0;
|
138 |
-
border-color: transparent;
|
139 |
-
border-style: solid;
|
140 |
-
}
|
141 |
-
.iconpicker-popover.popover > .arrow {
|
142 |
-
border-width: 11px;
|
143 |
-
}
|
144 |
-
.iconpicker-popover.popover > .arrow:after {
|
145 |
-
border-width: 10px;
|
146 |
-
content: "";
|
147 |
-
}
|
148 |
-
.iconpicker-popover.popover.top > .arrow,
|
149 |
-
.iconpicker-popover.popover.topLeft > .arrow,
|
150 |
-
.iconpicker-popover.popover.topRight > .arrow {
|
151 |
-
left: 50%;
|
152 |
-
margin-left: -11px;
|
153 |
-
border-bottom-width: 0;
|
154 |
-
border-top-color: #999999;
|
155 |
-
border-top-color: rgba(0, 0, 0, 0.25);
|
156 |
-
bottom: -11px;
|
157 |
-
}
|
158 |
-
.iconpicker-popover.popover.top > .arrow:after,
|
159 |
-
.iconpicker-popover.popover.topLeft > .arrow:after,
|
160 |
-
.iconpicker-popover.popover.topRight > .arrow:after {
|
161 |
-
content: " ";
|
162 |
-
bottom: 1px;
|
163 |
-
margin-left: -10px;
|
164 |
-
border-bottom-width: 0;
|
165 |
-
border-top-color: #ffffff;
|
166 |
-
}
|
167 |
-
.iconpicker-popover.popover.topLeft > .arrow {
|
168 |
-
left: 8px;
|
169 |
-
margin-left: 0;
|
170 |
-
}
|
171 |
-
.iconpicker-popover.popover.topRight > .arrow {
|
172 |
-
left: auto;
|
173 |
-
right: 8px;
|
174 |
-
margin-left: 0;
|
175 |
-
}
|
176 |
-
.iconpicker-popover.popover.right > .arrow,
|
177 |
-
.iconpicker-popover.popover.rightTop > .arrow,
|
178 |
-
.iconpicker-popover.popover.rightBottom > .arrow {
|
179 |
-
top: 50%;
|
180 |
-
left: 23px;
|
181 |
-
margin-top: -11px;
|
182 |
-
border-left-width: 0;
|
183 |
-
border-right-color: #999999;
|
184 |
-
border-right-color: rgba(0, 0, 0, 0.25);
|
185 |
-
}
|
186 |
-
.iconpicker-popover.popover.right > .arrow:after,
|
187 |
-
.iconpicker-popover.popover.rightTop > .arrow:after,
|
188 |
-
.iconpicker-popover.popover.rightBottom > .arrow:after {
|
189 |
-
content: " ";
|
190 |
-
left: 1px;
|
191 |
-
bottom: -10px;
|
192 |
-
border-left-width: 0;
|
193 |
-
border-right-color: #ffffff;
|
194 |
-
}
|
195 |
-
.iconpicker-popover.popover.rightTop > .arrow {
|
196 |
-
top: auto;
|
197 |
-
bottom: 8px;
|
198 |
-
margin-top: 0;
|
199 |
-
}
|
200 |
-
.iconpicker-popover.popover.rightBottom > .arrow {
|
201 |
-
top: 8px;
|
202 |
-
margin-top: 0;
|
203 |
-
}
|
204 |
-
.iconpicker-popover.popover.bottom > .arrow,
|
205 |
-
.iconpicker-popover.popover.bottomRight > .arrow,
|
206 |
-
.iconpicker-popover.popover.bottomLeft > .arrow {
|
207 |
-
left: 50%;
|
208 |
-
margin-left: -11px;
|
209 |
-
border-top-width: 0;
|
210 |
-
border-bottom-color: #999999;
|
211 |
-
border-bottom-color: rgba(0, 0, 0, 0.25);
|
212 |
-
top: -11px;
|
213 |
-
}
|
214 |
-
.iconpicker-popover.popover.bottom > .arrow:after,
|
215 |
-
.iconpicker-popover.popover.bottomRight > .arrow:after,
|
216 |
-
.iconpicker-popover.popover.bottomLeft > .arrow:after {
|
217 |
-
content: " ";
|
218 |
-
top: 1px;
|
219 |
-
margin-left: -10px;
|
220 |
-
border-top-width: 0;
|
221 |
-
border-bottom-color: #ffffff;
|
222 |
-
}
|
223 |
-
.iconpicker-popover.popover.bottomLeft > .arrow {
|
224 |
-
left: 8px;
|
225 |
-
margin-left: 0;
|
226 |
-
}
|
227 |
-
.iconpicker-popover.popover.bottomRight > .arrow {
|
228 |
-
left: auto;
|
229 |
-
right: 8px;
|
230 |
-
margin-left: 0;
|
231 |
-
}
|
232 |
-
.iconpicker-popover.popover.left > .arrow,
|
233 |
-
.iconpicker-popover.popover.leftBottom > .arrow,
|
234 |
-
.iconpicker-popover.popover.leftTop > .arrow {
|
235 |
-
top: 50%;
|
236 |
-
right: -11px;
|
237 |
-
margin-top: -11px;
|
238 |
-
border-right-width: 0;
|
239 |
-
border-left-color: #999999;
|
240 |
-
border-left-color: rgba(0, 0, 0, 0.25);
|
241 |
-
}
|
242 |
-
.iconpicker-popover.popover.left > .arrow:after,
|
243 |
-
.iconpicker-popover.popover.leftBottom > .arrow:after,
|
244 |
-
.iconpicker-popover.popover.leftTop > .arrow:after {
|
245 |
-
content: " ";
|
246 |
-
right: 1px;
|
247 |
-
border-right-width: 0;
|
248 |
-
border-left-color: #ffffff;
|
249 |
-
bottom: -10px;
|
250 |
-
}
|
251 |
-
.iconpicker-popover.popover.leftBottom > .arrow {
|
252 |
-
top: 8px;
|
253 |
-
margin-top: 0;
|
254 |
-
}
|
255 |
-
.iconpicker-popover.popover.leftTop > .arrow {
|
256 |
-
top: auto;
|
257 |
-
bottom: 8px;
|
258 |
-
margin-top: 0;
|
259 |
-
}
|
260 |
-
.iconpicker {
|
261 |
-
position: relative;
|
262 |
-
text-align: left;
|
263 |
-
text-shadow: none;
|
264 |
-
line-height: 0;
|
265 |
-
display: block;
|
266 |
-
margin: 0;
|
267 |
-
overflow: hidden;
|
268 |
-
}
|
269 |
-
.iconpicker * {
|
270 |
-
-webkit-box-sizing: content-box;
|
271 |
-
-moz-box-sizing: content-box;
|
272 |
-
box-sizing: content-box;
|
273 |
-
position: relative;
|
274 |
-
}
|
275 |
-
.iconpicker:before,
|
276 |
-
.iconpicker:after {
|
277 |
-
content: " ";
|
278 |
-
display: table;
|
279 |
-
}
|
280 |
-
.iconpicker:after {
|
281 |
-
clear: both;
|
282 |
-
}
|
283 |
-
.iconpicker .iconpicker-items {
|
284 |
-
position: relative;
|
285 |
-
clear: both;
|
286 |
-
float: none;
|
287 |
-
padding: 12px 0 0 12px;
|
288 |
-
background: #fff;
|
289 |
-
margin: 0;
|
290 |
-
overflow: hidden;
|
291 |
-
overflow-y: auto;
|
292 |
-
min-height: 49px;
|
293 |
-
max-height: 246px;
|
294 |
-
}
|
295 |
-
.iconpicker .iconpicker-items:before,
|
296 |
-
.iconpicker .iconpicker-items:after {
|
297 |
-
content: " ";
|
298 |
-
display: table;
|
299 |
-
}
|
300 |
-
.iconpicker .iconpicker-items:after {
|
301 |
-
clear: both;
|
302 |
-
}
|
303 |
-
.iconpicker .iconpicker-item {
|
304 |
-
float: left;
|
305 |
-
width: 14px;
|
306 |
-
height: 14px;
|
307 |
-
padding: 12px;
|
308 |
-
margin: 0 12px 12px 0;
|
309 |
-
text-align: center;
|
310 |
-
cursor: pointer;
|
311 |
-
border-radius: 3px;
|
312 |
-
font-size: 14px;
|
313 |
-
box-shadow: 0 0 0 1px #dddddd;
|
314 |
-
color: inherit;
|
315 |
-
/*&:nth-child(4n+4) {
|
316 |
-
margin-right: 0;
|
317 |
-
}
|
318 |
-
&:nth-last-child(-n+4) {
|
319 |
-
margin-bottom: 0;
|
320 |
-
}*/
|
321 |
-
}
|
322 |
-
.iconpicker .iconpicker-item:hover:not(.iconpicker-selected) {
|
323 |
-
background-color: #eeeeee;
|
324 |
-
}
|
325 |
-
.iconpicker .iconpicker-item.iconpicker-selected {
|
326 |
-
box-shadow: none;
|
327 |
-
color: #fff;
|
328 |
-
background-color: #ED832F !important;
|
329 |
-
}
|
330 |
-
.iconpicker-component {
|
331 |
-
cursor: pointer;
|
332 |
-
}
|
333 |
-
a.iconpicker-selected {
|
334 |
-
background: #ED832F !important;
|
335 |
}
|
1 |
+
/*!
|
2 |
+
* Font Awesome Icon Picker
|
3 |
+
* https://itsjavi.com/fontawesome-iconpicker/
|
4 |
+
*
|
5 |
+
* Originally written by (c) 2016 Javi Aguilar
|
6 |
+
* Licensed under the MIT License
|
7 |
+
* https://github.com/itsjavi/fontawesome-iconpicker/blob/master/LICENSE
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
/*
|
11 |
+
* Font Awesome Icon Picker
|
12 |
+
* https://itsjavi.com/fontawesome-iconpicker/
|
13 |
+
*
|
14 |
+
* Originally written by (c) 2016 Javi Aguilar
|
15 |
+
* Licensed under the MIT License
|
16 |
+
* https://github.com/itsjavi/fontawesome-iconpicker/blob/master/LICENSE
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
/*
|
20 |
+
* Font Awesome Icon Picker
|
21 |
+
* https://itsjavi.com/fontawesome-iconpicker/
|
22 |
+
*
|
23 |
+
* Originally written by (c) 2016 Javi Aguilar
|
24 |
+
* Licensed under the MIT License
|
25 |
+
* https://github.com/itsjavi/fontawesome-iconpicker/blob/master/LICENSE
|
26 |
+
*
|
27 |
+
*/
|
28 |
+
.iconpicker-popover.popover {
|
29 |
+
position: absolute;
|
30 |
+
top: 0;
|
31 |
+
left: 0;
|
32 |
+
display: none;
|
33 |
+
max-width: none;
|
34 |
+
padding: 1px;
|
35 |
+
text-align: left;
|
36 |
+
width: 216px;
|
37 |
+
background: #f7f7f7;
|
38 |
+
z-index: 100;
|
39 |
+
border: 1px solid #e7e7e7;
|
40 |
+
border-radius: 3px;
|
41 |
+
}
|
42 |
+
.iconpicker-popover.popover.top,
|
43 |
+
.iconpicker-popover.popover.topLeftCorner,
|
44 |
+
.iconpicker-popover.popover.topLeft,
|
45 |
+
.iconpicker-popover.popover.topRight,
|
46 |
+
.iconpicker-popover.popover.topRightCorner {
|
47 |
+
margin-top: -10px;
|
48 |
+
}
|
49 |
+
.iconpicker-popover.popover.right,
|
50 |
+
.iconpicker-popover.popover.rightTop,
|
51 |
+
.iconpicker-popover.popover.rightBottom {
|
52 |
+
margin-left: 10px;
|
53 |
+
}
|
54 |
+
.iconpicker-popover.popover.bottom,
|
55 |
+
.iconpicker-popover.popover.bottomRightCorner,
|
56 |
+
.iconpicker-popover.popover.bottomRight,
|
57 |
+
.iconpicker-popover.popover.bottomLeft,
|
58 |
+
.iconpicker-popover.popover.bottomLeftCorner {
|
59 |
+
margin-top: 10px;
|
60 |
+
}
|
61 |
+
.iconpicker-popover.popover.left,
|
62 |
+
.iconpicker-popover.popover.leftBottom,
|
63 |
+
.iconpicker-popover.popover.leftTop {
|
64 |
+
margin-left: -10px;
|
65 |
+
}
|
66 |
+
.iconpicker-popover.popover.inline {
|
67 |
+
margin: 0 0 12px 0;
|
68 |
+
position: relative;
|
69 |
+
display: inline-block;
|
70 |
+
opacity: 1;
|
71 |
+
top: auto;
|
72 |
+
left: auto;
|
73 |
+
bottom: auto;
|
74 |
+
right: auto;
|
75 |
+
max-width: 100%;
|
76 |
+
box-shadow: none;
|
77 |
+
z-index: auto;
|
78 |
+
vertical-align: top;
|
79 |
+
}
|
80 |
+
.iconpicker-popover.popover.inline > .arrow {
|
81 |
+
display: none;
|
82 |
+
}
|
83 |
+
.dropdown-menu .iconpicker-popover.inline {
|
84 |
+
margin: 0;
|
85 |
+
border: none;
|
86 |
+
}
|
87 |
+
.dropdown-menu.iconpicker-container {
|
88 |
+
padding: 0;
|
89 |
+
}
|
90 |
+
.iconpicker-popover.popover .popover-title {
|
91 |
+
padding: 12px;
|
92 |
+
font-size: 13px;
|
93 |
+
line-height: 15px;
|
94 |
+
border-bottom: 1px solid #ebebeb;
|
95 |
+
background-color: #f7f7f7;
|
96 |
+
}
|
97 |
+
.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search {
|
98 |
+
margin: 0 0 2px 0;
|
99 |
+
}
|
100 |
+
.iconpicker-popover.popover .popover-title-text ~ input[type=search].iconpicker-search {
|
101 |
+
margin-top: 12px;
|
102 |
+
}
|
103 |
+
.iconpicker-popover.popover .popover-content {
|
104 |
+
padding: 0px;
|
105 |
+
text-align: center;
|
106 |
+
}
|
107 |
+
.iconpicker-popover .popover-footer {
|
108 |
+
float: none;
|
109 |
+
clear: both;
|
110 |
+
padding: 12px;
|
111 |
+
text-align: right;
|
112 |
+
margin: 0;
|
113 |
+
border-top: 1px solid #ebebeb;
|
114 |
+
background-color: #f7f7f7;
|
115 |
+
}
|
116 |
+
.iconpicker-popover .popover-footer:before,
|
117 |
+
.iconpicker-popover .popover-footer:after {
|
118 |
+
content: " ";
|
119 |
+
display: table;
|
120 |
+
}
|
121 |
+
.iconpicker-popover .popover-footer:after {
|
122 |
+
clear: both;
|
123 |
+
}
|
124 |
+
.iconpicker-popover .popover-footer .iconpicker-btn {
|
125 |
+
margin-left: 10px;
|
126 |
+
}
|
127 |
+
.iconpicker-popover .popover-footer input[type=search].iconpicker-search {
|
128 |
+
/*width:auto;
|
129 |
+
float:left;*/
|
130 |
+
margin-bottom: 12px;
|
131 |
+
}
|
132 |
+
.iconpicker-popover.popover > .arrow,
|
133 |
+
.iconpicker-popover.popover > .arrow:after {
|
134 |
+
position: absolute;
|
135 |
+
display: block;
|
136 |
+
width: 0;
|
137 |
+
height: 0;
|
138 |
+
border-color: transparent;
|
139 |
+
border-style: solid;
|
140 |
+
}
|
141 |
+
.iconpicker-popover.popover > .arrow {
|
142 |
+
border-width: 11px;
|
143 |
+
}
|
144 |
+
.iconpicker-popover.popover > .arrow:after {
|
145 |
+
border-width: 10px;
|
146 |
+
content: "";
|
147 |
+
}
|
148 |
+
.iconpicker-popover.popover.top > .arrow,
|
149 |
+
.iconpicker-popover.popover.topLeft > .arrow,
|
150 |
+
.iconpicker-popover.popover.topRight > .arrow {
|
151 |
+
left: 50%;
|
152 |
+
margin-left: -11px;
|
153 |
+
border-bottom-width: 0;
|
154 |
+
border-top-color: #999999;
|
155 |
+
border-top-color: rgba(0, 0, 0, 0.25);
|
156 |
+
bottom: -11px;
|
157 |
+
}
|
158 |
+
.iconpicker-popover.popover.top > .arrow:after,
|
159 |
+
.iconpicker-popover.popover.topLeft > .arrow:after,
|
160 |
+
.iconpicker-popover.popover.topRight > .arrow:after {
|
161 |
+
content: " ";
|
162 |
+
bottom: 1px;
|
163 |
+
margin-left: -10px;
|
164 |
+
border-bottom-width: 0;
|
165 |
+
border-top-color: #ffffff;
|
166 |
+
}
|
167 |
+
.iconpicker-popover.popover.topLeft > .arrow {
|
168 |
+
left: 8px;
|
169 |
+
margin-left: 0;
|
170 |
+
}
|
171 |
+
.iconpicker-popover.popover.topRight > .arrow {
|
172 |
+
left: auto;
|
173 |
+
right: 8px;
|
174 |
+
margin-left: 0;
|
175 |
+
}
|
176 |
+
.iconpicker-popover.popover.right > .arrow,
|
177 |
+
.iconpicker-popover.popover.rightTop > .arrow,
|
178 |
+
.iconpicker-popover.popover.rightBottom > .arrow {
|
179 |
+
top: 50%;
|
180 |
+
left: 23px;
|
181 |
+
margin-top: -11px;
|
182 |
+
border-left-width: 0;
|
183 |
+
border-right-color: #999999;
|
184 |
+
border-right-color: rgba(0, 0, 0, 0.25);
|
185 |
+
}
|
186 |
+
.iconpicker-popover.popover.right > .arrow:after,
|
187 |
+
.iconpicker-popover.popover.rightTop > .arrow:after,
|
188 |
+
.iconpicker-popover.popover.rightBottom > .arrow:after {
|
189 |
+
content: " ";
|
190 |
+
left: 1px;
|
191 |
+
bottom: -10px;
|
192 |
+
border-left-width: 0;
|
193 |
+
border-right-color: #ffffff;
|
194 |
+
}
|
195 |
+
.iconpicker-popover.popover.rightTop > .arrow {
|
196 |
+
top: auto;
|
197 |
+
bottom: 8px;
|
198 |
+
margin-top: 0;
|
199 |
+
}
|
200 |
+
.iconpicker-popover.popover.rightBottom > .arrow {
|
201 |
+
top: 8px;
|
202 |
+
margin-top: 0;
|
203 |
+
}
|
204 |
+
.iconpicker-popover.popover.bottom > .arrow,
|
205 |
+
.iconpicker-popover.popover.bottomRight > .arrow,
|
206 |
+
.iconpicker-popover.popover.bottomLeft > .arrow {
|
207 |
+
left: 50%;
|
208 |
+
margin-left: -11px;
|
209 |
+
border-top-width: 0;
|
210 |
+
border-bottom-color: #999999;
|
211 |
+
border-bottom-color: rgba(0, 0, 0, 0.25);
|
212 |
+
top: -11px;
|
213 |
+
}
|
214 |
+
.iconpicker-popover.popover.bottom > .arrow:after,
|
215 |
+
.iconpicker-popover.popover.bottomRight > .arrow:after,
|
216 |
+
.iconpicker-popover.popover.bottomLeft > .arrow:after {
|
217 |
+
content: " ";
|
218 |
+
top: 1px;
|
219 |
+
margin-left: -10px;
|
220 |
+
border-top-width: 0;
|
221 |
+
border-bottom-color: #ffffff;
|
222 |
+
}
|
223 |
+
.iconpicker-popover.popover.bottomLeft > .arrow {
|
224 |
+
left: 8px;
|
225 |
+
margin-left: 0;
|
226 |
+
}
|
227 |
+
.iconpicker-popover.popover.bottomRight > .arrow {
|
228 |
+
left: auto;
|
229 |
+
right: 8px;
|
230 |
+
margin-left: 0;
|
231 |
+
}
|
232 |
+
.iconpicker-popover.popover.left > .arrow,
|
233 |
+
.iconpicker-popover.popover.leftBottom > .arrow,
|
234 |
+
.iconpicker-popover.popover.leftTop > .arrow {
|
235 |
+
top: 50%;
|
236 |
+
right: -11px;
|
237 |
+
margin-top: -11px;
|
238 |
+
border-right-width: 0;
|
239 |
+
border-left-color: #999999;
|
240 |
+
border-left-color: rgba(0, 0, 0, 0.25);
|
241 |
+
}
|
242 |
+
.iconpicker-popover.popover.left > .arrow:after,
|
243 |
+
.iconpicker-popover.popover.leftBottom > .arrow:after,
|
244 |
+
.iconpicker-popover.popover.leftTop > .arrow:after {
|
245 |
+
content: " ";
|
246 |
+
right: 1px;
|
247 |
+
border-right-width: 0;
|
248 |
+
border-left-color: #ffffff;
|
249 |
+
bottom: -10px;
|
250 |
+
}
|
251 |
+
.iconpicker-popover.popover.leftBottom > .arrow {
|
252 |
+
top: 8px;
|
253 |
+
margin-top: 0;
|
254 |
+
}
|
255 |
+
.iconpicker-popover.popover.leftTop > .arrow {
|
256 |
+
top: auto;
|
257 |
+
bottom: 8px;
|
258 |
+
margin-top: 0;
|
259 |
+
}
|
260 |
+
.iconpicker {
|
261 |
+
position: relative;
|
262 |
+
text-align: left;
|
263 |
+
text-shadow: none;
|
264 |
+
line-height: 0;
|
265 |
+
display: block;
|
266 |
+
margin: 0;
|
267 |
+
overflow: hidden;
|
268 |
+
}
|
269 |
+
.iconpicker * {
|
270 |
+
-webkit-box-sizing: content-box;
|
271 |
+
-moz-box-sizing: content-box;
|
272 |
+
box-sizing: content-box;
|
273 |
+
position: relative;
|
274 |
+
}
|
275 |
+
.iconpicker:before,
|
276 |
+
.iconpicker:after {
|
277 |
+
content: " ";
|
278 |
+
display: table;
|
279 |
+
}
|
280 |
+
.iconpicker:after {
|
281 |
+
clear: both;
|
282 |
+
}
|
283 |
+
.iconpicker .iconpicker-items {
|
284 |
+
position: relative;
|
285 |
+
clear: both;
|
286 |
+
float: none;
|
287 |
+
padding: 12px 0 0 12px;
|
288 |
+
background: #fff;
|
289 |
+
margin: 0;
|
290 |
+
overflow: hidden;
|
291 |
+
overflow-y: auto;
|
292 |
+
min-height: 49px;
|
293 |
+
max-height: 246px;
|
294 |
+
}
|
295 |
+
.iconpicker .iconpicker-items:before,
|
296 |
+
.iconpicker .iconpicker-items:after {
|
297 |
+
content: " ";
|
298 |
+
display: table;
|
299 |
+
}
|
300 |
+
.iconpicker .iconpicker-items:after {
|
301 |
+
clear: both;
|
302 |
+
}
|
303 |
+
.iconpicker .iconpicker-item {
|
304 |
+
float: left;
|
305 |
+
width: 14px;
|
306 |
+
height: 14px;
|
307 |
+
padding: 12px;
|
308 |
+
margin: 0 12px 12px 0;
|
309 |
+
text-align: center;
|
310 |
+
cursor: pointer;
|
311 |
+
border-radius: 3px;
|
312 |
+
font-size: 14px;
|
313 |
+
box-shadow: 0 0 0 1px #dddddd;
|
314 |
+
color: inherit;
|
315 |
+
/*&:nth-child(4n+4) {
|
316 |
+
margin-right: 0;
|
317 |
+
}
|
318 |
+
&:nth-last-child(-n+4) {
|
319 |
+
margin-bottom: 0;
|
320 |
+
}*/
|
321 |
+
}
|
322 |
+
.iconpicker .iconpicker-item:hover:not(.iconpicker-selected) {
|
323 |
+
background-color: #eeeeee;
|
324 |
+
}
|
325 |
+
.iconpicker .iconpicker-item.iconpicker-selected {
|
326 |
+
box-shadow: none;
|
327 |
+
color: #fff;
|
328 |
+
background-color: #ED832F !important;
|
329 |
+
}
|
330 |
+
.iconpicker-component {
|
331 |
+
cursor: pointer;
|
332 |
+
}
|
333 |
+
a.iconpicker-selected {
|
334 |
+
background: #ED832F !important;
|
335 |
}
|
css/images/ui-bg_flat_10_000000_40x100.png
CHANGED
File without changes
|
css/images/ui-bg_flat_75_ffffff_40x100.png
CHANGED
File without changes
|
css/images/ui-bg_glass_65_ffffff_1x400.png
CHANGED
File without changes
|
css/images/ui-bg_glass_75_dadada_1x400.png
CHANGED
File without changes
|
css/images/ui-bg_glass_75_e6e6e6_1x400.png
CHANGED
File without changes
|
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
CHANGED
File without changes
|
css/images/ui-icons_ffffff_256x240.png
CHANGED
File without changes
|
css/jquery-ui.css
CHANGED
File without changes
|
css/node_history_styles.css
CHANGED
@@ -44,7 +44,6 @@
|
|
44 |
|
45 |
.admin_chat_box_inner {
|
46 |
height: 90% !important;
|
47 |
-
overflow-y: auto;
|
48 |
}
|
49 |
|
50 |
.admin_visitor_advanced_info .part1 {
|
44 |
|
45 |
.admin_chat_box_inner {
|
46 |
height: 90% !important;
|
|
|
47 |
}
|
48 |
|
49 |
.admin_visitor_advanced_info .part1 {
|
css/remote_dash_styles.css
CHANGED
@@ -357,10 +357,6 @@ span.bleeper-edit-message {
|
|
357 |
width:60% !important;
|
358 |
}
|
359 |
|
360 |
-
.nifty_top_wrapper.bleeper-out-dash .wrap {
|
361 |
-
z-index: 9999 !important;
|
362 |
-
}
|
363 |
-
|
364 |
.admin_visitor_advanced_info {
|
365 |
border: 1px solid #ccc;
|
366 |
border-radius: 3px;
|
@@ -1256,9 +1252,3 @@ span.wplc_system_notification {
|
|
1256 |
color: #fff !important;
|
1257 |
text-decoration: underline !important;
|
1258 |
}
|
1259 |
-
|
1260 |
-
#nifty_wrapper .messages .wplc_system_notification .admin_visitor_advanced_info {
|
1261 |
-
background: none !important;
|
1262 |
-
border:none !important;
|
1263 |
-
padding: 0 !important;
|
1264 |
-
}
|
357 |
width:60% !important;
|
358 |
}
|
359 |
|
|
|
|
|
|
|
|
|
360 |
.admin_visitor_advanced_info {
|
361 |
border: 1px solid #ccc;
|
362 |
border-radius: 3px;
|
1252 |
color: #fff !important;
|
1253 |
text-decoration: underline !important;
|
1254 |
}
|
|
|
|
|
|
|
|
|
|
|
|
css/support-css.css
CHANGED
File without changes
|
css/themes/classic.css
CHANGED
@@ -101,7 +101,7 @@
|
|
101 |
border-radius: 5px 5px 0 0 ;
|
102 |
color:#999;
|
103 |
max-width: 280px;
|
104 |
-
|
105 |
z-index: 9999;
|
106 |
}
|
107 |
|
@@ -270,7 +270,7 @@
|
|
270 |
}
|
271 |
.wplc_close.wplc_left{
|
272 |
padding-right: 45px;
|
273 |
-
|
274 |
}
|
275 |
/*
|
276 |
.wplc_left #wplc_chatbox, .wplc_right #wplc_chatbox{
|
@@ -317,7 +317,7 @@ span.wplc_system_notification {
|
|
317 |
|
318 |
.wplc_close.wplc_right{
|
319 |
padding-left: 45px;
|
320 |
-
|
321 |
border-radius: 5px 0px 0px 5px !important;
|
322 |
}
|
323 |
.wplc_open.wplc_right #wp-live-chat-header{
|
@@ -445,7 +445,6 @@ span.wplc_system_notification {
|
|
445 |
|
446 |
#wp-live-chat-2-inner #wplc_start_chat_btn {
|
447 |
width:100%;
|
448 |
-
border:none;
|
449 |
}
|
450 |
|
451 |
#wplc_social_holder {
|
@@ -833,91 +832,4 @@ div#bleeper_chat_ended {
|
|
833 |
top: -35px;
|
834 |
opacity: .8;
|
835 |
}
|
836 |
-
}
|
837 |
-
|
838 |
-
input#wplc_chat_gdpr_opt_in {
|
839 |
-
display: inline-block;
|
840 |
-
width: inherit;
|
841 |
-
vertical-align:top;
|
842 |
-
margin-left: 2px;
|
843 |
-
margin-right: 2px;
|
844 |
-
}
|
845 |
-
|
846 |
-
label[for=wplc_chat_gdpr_opt_in] {
|
847 |
-
display: inline-block;
|
848 |
-
font-size: 0.7em;
|
849 |
-
max-width: 90%;
|
850 |
-
vertical-align: top;
|
851 |
-
}
|
852 |
-
|
853 |
-
.wplc_gdpr_privacy_notice {
|
854 |
-
margin-top: 10px;
|
855 |
-
margin-bottom: 10px;
|
856 |
-
font-size: 0.6em;
|
857 |
-
margin-left: 2em;
|
858 |
-
margin-right: 2em;
|
859 |
-
color: #bdbdbd;
|
860 |
-
}
|
861 |
-
|
862 |
-
.wplc_gdpr_privacy_notice a {
|
863 |
-
color: #8e8e8e;
|
864 |
-
}
|
865 |
-
|
866 |
-
.wplc_gdpr_privacy_notice a:hover{
|
867 |
-
color: #8e8e8e;
|
868 |
-
text-decoration: underline;
|
869 |
-
}
|
870 |
-
|
871 |
-
#wplc_end_chat_button {
|
872 |
-
position: absolute;
|
873 |
-
top: -32px;
|
874 |
-
right: 0;
|
875 |
-
padding: 5px;
|
876 |
-
font-size: 9px;
|
877 |
-
font-weight: 200;
|
878 |
-
border-radius: 4px;
|
879 |
-
background: #fff !important;
|
880 |
-
color: #333 !important;
|
881 |
-
line-height: 12px;
|
882 |
-
box-shadow: 0 0 15px 0 rgba(86, 86, 86, 0.11);
|
883 |
-
border: none;
|
884 |
-
}
|
885 |
-
|
886 |
-
.wplc_in_chat_notice {
|
887 |
-
position: absolute;
|
888 |
-
background: #fff;
|
889 |
-
/* height: 30%; */
|
890 |
-
bottom: 35%;
|
891 |
-
padding: 30px;
|
892 |
-
width: 80%;
|
893 |
-
margin-left: 8%;
|
894 |
-
box-shadow: 0px 0px 20px 0px #33333324;
|
895 |
-
border-radius: 5px;
|
896 |
-
z-index: 999999;
|
897 |
-
}
|
898 |
-
|
899 |
-
.wplc_in_chat_notice_heading {
|
900 |
-
font-size: 16px;
|
901 |
-
padding-bottom: 10px;
|
902 |
-
border-bottom: #eee 1px solid;
|
903 |
-
margin-bottom: 10px;
|
904 |
-
}
|
905 |
-
|
906 |
-
.wplc_in_chat_notice_content button {
|
907 |
-
padding: 5px;
|
908 |
-
font-size: 12px;
|
909 |
-
display: inline-block;
|
910 |
-
font-weight: 100;
|
911 |
-
margin-bottom: 5px;
|
912 |
-
border: none;
|
913 |
-
}
|
914 |
-
|
915 |
-
.wplc_in_chat_notice_content button:hover {
|
916 |
-
box-shadow: none;
|
917 |
-
padding: 5px;
|
918 |
-
cursor: pointer;
|
919 |
-
}
|
920 |
-
|
921 |
-
.wplc_in_chat_notice_content {
|
922 |
-
padding-top: 15px;
|
923 |
}
|
101 |
border-radius: 5px 5px 0 0 ;
|
102 |
color:#999;
|
103 |
max-width: 280px;
|
104 |
+
max-height: 400px;
|
105 |
z-index: 9999;
|
106 |
}
|
107 |
|
270 |
}
|
271 |
.wplc_close.wplc_left{
|
272 |
padding-right: 45px;
|
273 |
+
height: 220px;
|
274 |
}
|
275 |
/*
|
276 |
.wplc_left #wplc_chatbox, .wplc_right #wplc_chatbox{
|
317 |
|
318 |
.wplc_close.wplc_right{
|
319 |
padding-left: 45px;
|
320 |
+
height: 220px;
|
321 |
border-radius: 5px 0px 0px 5px !important;
|
322 |
}
|
323 |
.wplc_open.wplc_right #wp-live-chat-header{
|
445 |
|
446 |
#wp-live-chat-2-inner #wplc_start_chat_btn {
|
447 |
width:100%;
|
|
|
448 |
}
|
449 |
|
450 |
#wplc_social_holder {
|
832 |
top: -35px;
|
833 |
opacity: .8;
|
834 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
835 |
}
|
css/themes/modern.css
CHANGED
@@ -933,7 +933,6 @@ button.wplc_retry_chat {
|
|
933 |
|
934 |
#wplc_start_chat_btn, #wplc_na_msg_btn {
|
935 |
min-height: 40px;
|
936 |
-
border:none;
|
937 |
}
|
938 |
|
939 |
#speeching_button, #wplc_start_chat_btn, #wplc_na_msg_btn {
|
@@ -1009,7 +1008,7 @@ button.wplc_retry_chat {
|
|
1009 |
}
|
1010 |
}
|
1011 |
|
1012 |
-
@media screen and (max-width:
|
1013 |
|
1014 |
#wplc_chatmsg {
|
1015 |
font-size:16px !important;
|
@@ -1221,96 +1220,4 @@ div#bleeper_bell {
|
|
1221 |
40%, 60% {
|
1222 |
transform: translate3d(2px, 0, 0);
|
1223 |
}
|
1224 |
-
}
|
1225 |
-
|
1226 |
-
input#wplc_chat_gdpr_opt_in {
|
1227 |
-
display: inline-block;
|
1228 |
-
width: inherit;
|
1229 |
-
vertical-align:top;
|
1230 |
-
margin-left: 2px;
|
1231 |
-
margin-right: 2px;
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
label[for=wplc_chat_gdpr_opt_in] {
|
1235 |
-
display: inline-block;
|
1236 |
-
font-size: 0.7em;
|
1237 |
-
max-width: 90%;
|
1238 |
-
vertical-align: top;
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
.wplc_gdpr_privacy_notice {
|
1242 |
-
margin-top: 10px;
|
1243 |
-
margin-bottom: 10px;
|
1244 |
-
font-size: 0.6em;
|
1245 |
-
margin-left: 2em;
|
1246 |
-
margin-right: 2em;
|
1247 |
-
color: #bdbdbd;
|
1248 |
-
}
|
1249 |
-
|
1250 |
-
.wplc_gdpr_privacy_notice a {
|
1251 |
-
color: #8e8e8e;
|
1252 |
-
}
|
1253 |
-
|
1254 |
-
.wplc_gdpr_privacy_notice a:hover{
|
1255 |
-
color: #8e8e8e;
|
1256 |
-
text-decoration: underline;
|
1257 |
-
}
|
1258 |
-
|
1259 |
-
#wplc_end_chat_button {
|
1260 |
-
position: absolute;
|
1261 |
-
top: -32px;
|
1262 |
-
right: 0;
|
1263 |
-
padding: 5px;
|
1264 |
-
font-size: 9px;
|
1265 |
-
font-weight: 200;
|
1266 |
-
border-radius: 4px;
|
1267 |
-
background: #fff !important;
|
1268 |
-
color: #333 !important;
|
1269 |
-
line-height: 12px;
|
1270 |
-
box-shadow: 0 0 15px 0 rgba(86, 86, 86, 0.11);
|
1271 |
-
border: none;
|
1272 |
-
}
|
1273 |
-
|
1274 |
-
.wplc_in_chat_notice {
|
1275 |
-
position: absolute;
|
1276 |
-
background: #fff;
|
1277 |
-
/* height: 30%; */
|
1278 |
-
bottom: 35%;
|
1279 |
-
padding: 30px;
|
1280 |
-
width: 80%;
|
1281 |
-
margin-left: 8%;
|
1282 |
-
box-shadow: 0px 0px 20px 0px #33333324;
|
1283 |
-
border-radius: 5px;
|
1284 |
-
z-index: 999999;
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
.wplc_in_chat_notice_heading {
|
1288 |
-
font-size: 16px;
|
1289 |
-
padding-bottom: 10px;
|
1290 |
-
border-bottom: #eee 1px solid;
|
1291 |
-
margin-bottom: 10px;
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
.wplc_in_chat_notice_content button {
|
1295 |
-
padding: 5px;
|
1296 |
-
font-size: 12px;
|
1297 |
-
display: inline-block;
|
1298 |
-
font-weight: 100;
|
1299 |
-
border:none;
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
.wplc_in_chat_notice_content button:hover {
|
1303 |
-
box-shadow: none;
|
1304 |
-
padding: 5px;
|
1305 |
-
cursor: pointer;
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
.wplc_in_chat_notice_content {
|
1309 |
-
padding-top: 15px;
|
1310 |
-
}
|
1311 |
-
|
1312 |
-
.wp-live-chat-wraper .wpcf_wrapper {
|
1313 |
-
position: relative !important;
|
1314 |
-
padding: 20px;
|
1315 |
-
}
|
1316 |
-
|
933 |
|
934 |
#wplc_start_chat_btn, #wplc_na_msg_btn {
|
935 |
min-height: 40px;
|
|
|
936 |
}
|
937 |
|
938 |
#speeching_button, #wplc_start_chat_btn, #wplc_na_msg_btn {
|
1008 |
}
|
1009 |
}
|
1010 |
|
1011 |
+
@media screen and (max-width: 400px) {
|
1012 |
|
1013 |
#wplc_chatmsg {
|
1014 |
font-size:16px !important;
|
1220 |
40%, 60% {
|
1221 |
transform: translate3d(2px, 0, 0);
|
1222 |
}
|
1223 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/themes/position-bottom-left.css
CHANGED
File without changes
|
css/themes/position-bottom-right.css
CHANGED
File without changes
|
css/themes/position-left.css
CHANGED
File without changes
|
css/themes/position-right.css
CHANGED
File without changes
|
css/themes/theme-1.css
CHANGED
File without changes
|
css/themes/theme-2.css
CHANGED
File without changes
|
css/themes/theme-3.css
CHANGED
File without changes
|
css/themes/theme-4.css
CHANGED
File without changes
|
css/themes/theme-5.css
CHANGED
File without changes
|
css/themes/theme-default.css
CHANGED
File without changes
|
css/toastr.css
CHANGED
File without changes
|
css/wplc-survey-style-before.css
CHANGED
File without changes
|
css/wplc_gif_integration.css
CHANGED
@@ -1,364 +1,364 @@
|
|
1 |
-
/**
|
2 |
-
* GIF image style within a message
|
3 |
-
*/
|
4 |
-
.messageBody .gif-img {
|
5 |
-
max-width: 100%;
|
6 |
-
margin-bottom: -5px;
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* GIF Search box
|
11 |
-
*/
|
12 |
-
/* Loader */
|
13 |
-
.wplc-gif-integration-search-box .gif-sb-loader {
|
14 |
-
display:block;
|
15 |
-
position: absolute;
|
16 |
-
left:0px;
|
17 |
-
top:0px;
|
18 |
-
width: 100%;
|
19 |
-
height: 100%;
|
20 |
-
z-index: 1;
|
21 |
-
background-color:#ffffff;
|
22 |
-
}
|
23 |
-
.wplc-gif-integration-search-box .gif-sb-loader.hidden {
|
24 |
-
display: none;
|
25 |
-
z-index: 0;
|
26 |
-
}
|
27 |
-
.wplc-gif-integration-search-box .gif-sb-loader img {
|
28 |
-
display: block;
|
29 |
-
position: relative;
|
30 |
-
top: calc(50% - 25px);
|
31 |
-
width: 50px;
|
32 |
-
height: auto;
|
33 |
-
margin: auto;
|
34 |
-
}
|
35 |
-
|
36 |
-
/* Outter container */
|
37 |
-
.wplc-gif-integration-search-box.show,
|
38 |
-
.wplc-gif-integration-search-box {
|
39 |
-
display: block;
|
40 |
-
position: absolute;
|
41 |
-
bottom: 66px;
|
42 |
-
width: 70%;
|
43 |
-
margin-left:15%;
|
44 |
-
height: 300px;
|
45 |
-
background: #fafafa;
|
46 |
-
z-index: 100000000;
|
47 |
-
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
48 |
-
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
|
49 |
-
}
|
50 |
-
.wplc-gif-integration-search-box.show {
|
51 |
-
animation-name: present-gif-search-box;
|
52 |
-
animation-duration: 500ms;
|
53 |
-
animation-timing-function: ease-in-out;
|
54 |
-
animation-fill-mode: forwards;
|
55 |
-
|
56 |
-
-webkit-animation-name: present-gif-search-box;
|
57 |
-
-webkit-animation-duration: 500ms;
|
58 |
-
-webkit-animation-timing-function: ease-in-out;
|
59 |
-
-webkit-animation-fill-mode: forwards;
|
60 |
-
|
61 |
-
-moz-animation-name: present-gif-search-box;
|
62 |
-
-moz-animation-duration: 500ms;
|
63 |
-
-moz-animation-timing-function: ease-in-out;
|
64 |
-
-moz-animation-fill-mode: forwards;
|
65 |
-
|
66 |
-
-ms-animation-name: present-gif-search-box;
|
67 |
-
-ms-animation-duration: 500ms;
|
68 |
-
-ms-animation-timing-function: ease-in-out;
|
69 |
-
-ms-animation-fill-mode: forwards;
|
70 |
-
}
|
71 |
-
.wplc-gif-integration-search-box {
|
72 |
-
animation-name: dismiss-gif-search-box;
|
73 |
-
animation-duration: 500ms;
|
74 |
-
animation-timing-function: ease-in-out;
|
75 |
-
animation-fill-mode: forwards;
|
76 |
-
|
77 |
-
-webkit-animation-name: dismiss-gif-search-box;
|
78 |
-
-webkit-animation-duration: 500ms;
|
79 |
-
-webkit-animation-timing-function: ease-in-out;
|
80 |
-
-webkit-animation-fill-mode: forwards;
|
81 |
-
|
82 |
-
-moz-animation-name: dismiss-gif-search-box;
|
83 |
-
-moz-animation-duration: 500ms;
|
84 |
-
-moz-animation-timing-function: ease-in-out;
|
85 |
-
-moz-animation-fill-mode: forwards;
|
86 |
-
|
87 |
-
-ms-animation-name: dismiss-gif-search-box;
|
88 |
-
-ms-animation-duration: 500ms;
|
89 |
-
-ms-animation-timing-function: ease-in-out;
|
90 |
-
-ms-animation-fill-mode: forwards;
|
91 |
-
}
|
92 |
-
.wplc-gif-integration-search-box.hidden {
|
93 |
-
display: none;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Present full screen msg
|
98 |
-
*/
|
99 |
-
@keyframes present-gif-search-box {
|
100 |
-
0% {
|
101 |
-
left: 5000px;
|
102 |
-
}
|
103 |
-
100% {
|
104 |
-
left: 0px;
|
105 |
-
}
|
106 |
-
}
|
107 |
-
@-moz-keyframes present-gif-search-box {
|
108 |
-
0% {
|
109 |
-
left: 5000px;
|
110 |
-
}
|
111 |
-
100% {
|
112 |
-
left: 0px;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
@-webkit-keyframes present-gif-search-box {
|
116 |
-
0% {
|
117 |
-
left: 5000px;
|
118 |
-
}
|
119 |
-
100% {
|
120 |
-
left: 0px;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Dismiss full screen msg
|
126 |
-
*/
|
127 |
-
@keyframes dismiss-gif-search-box {
|
128 |
-
0% {
|
129 |
-
left: 0px;
|
130 |
-
}
|
131 |
-
100% {
|
132 |
-
left: 5000px;
|
133 |
-
}
|
134 |
-
}
|
135 |
-
@-moz-keyframes dismiss-gif-search-box {
|
136 |
-
0% {
|
137 |
-
left: 0px;
|
138 |
-
}
|
139 |
-
100% {
|
140 |
-
left: 5000px;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
@-webkit-keyframes dismiss-gif-search-box {
|
144 |
-
0% {
|
145 |
-
left: 0px;
|
146 |
-
}
|
147 |
-
100% {
|
148 |
-
left: 5000px;
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
@media(max-width:767px) {
|
153 |
-
|
154 |
-
.wplc-gif-integration-search-box.show,
|
155 |
-
.wplc-gif-integration-search-box {
|
156 |
-
bottom: 75px;
|
157 |
-
}
|
158 |
-
|
159 |
-
}
|
160 |
-
|
161 |
-
/* Header, Body and Footer */
|
162 |
-
.wplc-gif-integration-search-box .gif-sb-header,
|
163 |
-
.wplc-gif-integration-search-box .gif-sb-body,
|
164 |
-
.wplc-gif-integration-search-box .gif-sb-footer {
|
165 |
-
display: block;
|
166 |
-
position: relative;
|
167 |
-
left: 0px;
|
168 |
-
top: 0px;
|
169 |
-
width: 100%;
|
170 |
-
height: auto;
|
171 |
-
padding: 10px;
|
172 |
-
padding-top: 5px;
|
173 |
-
padding-bottom: 5px;
|
174 |
-
}
|
175 |
-
|
176 |
-
/* Header */
|
177 |
-
.wplc-gif-integration-search-box .gif-sb-header {
|
178 |
-
min-height: 10%;
|
179 |
-
background-color:#ffffff;
|
180 |
-
border: 1px solid #e6e6e6;
|
181 |
-
}
|
182 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-search-term,
|
183 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search, {
|
184 |
-
display: inline-block;
|
185 |
-
position: relative;
|
186 |
-
left: 0px;
|
187 |
-
margin: 0px;
|
188 |
-
border-bottom: 1px solid #f0f0f0 !important;
|
189 |
-
background-color: transparent !important;
|
190 |
-
border-right: none;
|
191 |
-
}
|
192 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search i,
|
193 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close i,
|
194 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover i,
|
195 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover i {
|
196 |
-
display: block;
|
197 |
-
position: relative;
|
198 |
-
left: 0px;
|
199 |
-
font-style: initial;
|
200 |
-
color:#ccc;
|
201 |
-
}
|
202 |
-
|
203 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close {
|
204 |
-
position: absolute;
|
205 |
-
top: 3px;
|
206 |
-
right: 4px;
|
207 |
-
|
208 |
-
border: none !important;
|
209 |
-
}
|
210 |
-
|
211 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search,
|
212 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close,
|
213 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover,
|
214 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover {
|
215 |
-
text-decoration: none !important;
|
216 |
-
}
|
217 |
-
|
218 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-search-term {
|
219 |
-
top: -1px;
|
220 |
-
width: 95%;
|
221 |
-
height: 38px;
|
222 |
-
margin-bottom: 0px !important;
|
223 |
-
padding-left: 10px !important;
|
224 |
-
padding-right: 10px !important;
|
225 |
-
background-color:transparent !important;
|
226 |
-
border-bottom:1px solid #eee !important;
|
227 |
-
border-top: none;
|
228 |
-
border-left: none;
|
229 |
-
border-right: none;
|
230 |
-
}
|
231 |
-
|
232 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search,
|
233 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover {
|
234 |
-
top: 0px;
|
235 |
-
left: 1px;
|
236 |
-
width: 10%;
|
237 |
-
height: 40px;
|
238 |
-
text-align: center;
|
239 |
-
padding-top: 10px;
|
240 |
-
border-radius: 3px;
|
241 |
-
|
242 |
-
}
|
243 |
-
|
244 |
-
|
245 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search i,
|
246 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover i {
|
247 |
-
top:0px;
|
248 |
-
left:-1px;
|
249 |
-
font-weight: 600;
|
250 |
-
}
|
251 |
-
|
252 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close {
|
253 |
-
color: #999999 !important;
|
254 |
-
cursor: pointer;
|
255 |
-
}
|
256 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover {
|
257 |
-
background-color: #ffffff;
|
258 |
-
color: #333333 !important;
|
259 |
-
}
|
260 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close i,
|
261 |
-
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover i {
|
262 |
-
top: -3px;
|
263 |
-
font-weight: 500;
|
264 |
-
}
|
265 |
-
|
266 |
-
/* Body */
|
267 |
-
.wplc-gif-integration-search-box .gif-sb-body {
|
268 |
-
min-height: 65%;
|
269 |
-
max-height: 195px;
|
270 |
-
background-color: #f0f0f0;
|
271 |
-
border: 1px solid #eaeaea;
|
272 |
-
overflow: auto;
|
273 |
-
}
|
274 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img,
|
275 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img:hover,
|
276 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img.selected-gif {
|
277 |
-
display:inline-block;
|
278 |
-
position:relative;
|
279 |
-
left:0px;
|
280 |
-
top:0px;
|
281 |
-
min-height:70px;
|
282 |
-
min-height:70px;
|
283 |
-
width: auto;
|
284 |
-
max-width: 100px;
|
285 |
-
margin-left: 2px;
|
286 |
-
margin-right: 2px;
|
287 |
-
margin-bottom: 1px;
|
288 |
-
}
|
289 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
290 |
-
opacity:0.7;
|
291 |
-
}
|
292 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img:hover {
|
293 |
-
opacity:1;
|
294 |
-
}
|
295 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img.selected-gif {
|
296 |
-
min-height:100px;
|
297 |
-
opacity:1;
|
298 |
-
}
|
299 |
-
|
300 |
-
@media(max-width:767px) {
|
301 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
302 |
-
width:50%;
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
@media(max-width:900px) {
|
307 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
308 |
-
width:33%;
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
@media(max-width:1200px) {
|
313 |
-
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
314 |
-
width:20%;
|
315 |
-
}
|
316 |
-
}
|
317 |
-
|
318 |
-
/* Footer */
|
319 |
-
.wplc-gif-integration-search-box .gif-sb-footer {
|
320 |
-
min-height: 10%;
|
321 |
-
background-color: #fafafa;
|
322 |
-
border: 1px solid #eaeaea;
|
323 |
-
font-size: 0.9em;
|
324 |
-
color: #777777;
|
325 |
-
}
|
326 |
-
|
327 |
-
/**
|
328 |
-
* Adjustments of the base style made for the admin chat
|
329 |
-
*/
|
330 |
-
/**
|
331 |
-
* GIF image style within a message
|
332 |
-
*/
|
333 |
-
#chat_area .messageBody .gif-img {
|
334 |
-
max-width: 100%;
|
335 |
-
margin-bottom: 0px;
|
336 |
-
}
|
337 |
-
|
338 |
-
/* Header */
|
339 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-search-term {
|
340 |
-
top:1px;
|
341 |
-
}
|
342 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search,
|
343 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover {
|
344 |
-
|
345 |
-
padding-top: 9px;
|
346 |
-
}
|
347 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close,
|
348 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover {
|
349 |
-
top: 2px;
|
350 |
-
height: 38px;
|
351 |
-
}
|
352 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close i,
|
353 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover i {
|
354 |
-
top: 0px;
|
355 |
-
}
|
356 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search i,
|
357 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover i {
|
358 |
-
top: 1px;
|
359 |
-
}
|
360 |
-
|
361 |
-
/* Body */
|
362 |
-
#chat_area .wplc-gif-integration-search-box .gif-sb-body {
|
363 |
-
min-height: 73%;
|
364 |
}
|
1 |
+
/**
|
2 |
+
* GIF image style within a message
|
3 |
+
*/
|
4 |
+
.messageBody .gif-img {
|
5 |
+
max-width: 100%;
|
6 |
+
margin-bottom: -5px;
|
7 |
+
}
|
8 |
+
|
9 |
+
/**
|
10 |
+
* GIF Search box
|
11 |
+
*/
|
12 |
+
/* Loader */
|
13 |
+
.wplc-gif-integration-search-box .gif-sb-loader {
|
14 |
+
display:block;
|
15 |
+
position: absolute;
|
16 |
+
left:0px;
|
17 |
+
top:0px;
|
18 |
+
width: 100%;
|
19 |
+
height: 100%;
|
20 |
+
z-index: 1;
|
21 |
+
background-color:#ffffff;
|
22 |
+
}
|
23 |
+
.wplc-gif-integration-search-box .gif-sb-loader.hidden {
|
24 |
+
display: none;
|
25 |
+
z-index: 0;
|
26 |
+
}
|
27 |
+
.wplc-gif-integration-search-box .gif-sb-loader img {
|
28 |
+
display: block;
|
29 |
+
position: relative;
|
30 |
+
top: calc(50% - 25px);
|
31 |
+
width: 50px;
|
32 |
+
height: auto;
|
33 |
+
margin: auto;
|
34 |
+
}
|
35 |
+
|
36 |
+
/* Outter container */
|
37 |
+
.wplc-gif-integration-search-box.show,
|
38 |
+
.wplc-gif-integration-search-box {
|
39 |
+
display: block;
|
40 |
+
position: absolute;
|
41 |
+
bottom: 66px;
|
42 |
+
width: 70%;
|
43 |
+
margin-left:15%;
|
44 |
+
height: 300px;
|
45 |
+
background: #fafafa;
|
46 |
+
z-index: 100000000;
|
47 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
48 |
+
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
|
49 |
+
}
|
50 |
+
.wplc-gif-integration-search-box.show {
|
51 |
+
animation-name: present-gif-search-box;
|
52 |
+
animation-duration: 500ms;
|
53 |
+
animation-timing-function: ease-in-out;
|
54 |
+
animation-fill-mode: forwards;
|
55 |
+
|
56 |
+
-webkit-animation-name: present-gif-search-box;
|
57 |
+
-webkit-animation-duration: 500ms;
|
58 |
+
-webkit-animation-timing-function: ease-in-out;
|
59 |
+
-webkit-animation-fill-mode: forwards;
|
60 |
+
|
61 |
+
-moz-animation-name: present-gif-search-box;
|
62 |
+
-moz-animation-duration: 500ms;
|
63 |
+
-moz-animation-timing-function: ease-in-out;
|
64 |
+
-moz-animation-fill-mode: forwards;
|
65 |
+
|
66 |
+
-ms-animation-name: present-gif-search-box;
|
67 |
+
-ms-animation-duration: 500ms;
|
68 |
+
-ms-animation-timing-function: ease-in-out;
|
69 |
+
-ms-animation-fill-mode: forwards;
|
70 |
+
}
|
71 |
+
.wplc-gif-integration-search-box {
|
72 |
+
animation-name: dismiss-gif-search-box;
|
73 |
+
animation-duration: 500ms;
|
74 |
+
animation-timing-function: ease-in-out;
|
75 |
+
animation-fill-mode: forwards;
|
76 |
+
|
77 |
+
-webkit-animation-name: dismiss-gif-search-box;
|
78 |
+
-webkit-animation-duration: 500ms;
|
79 |
+
-webkit-animation-timing-function: ease-in-out;
|
80 |
+
-webkit-animation-fill-mode: forwards;
|
81 |
+
|
82 |
+
-moz-animation-name: dismiss-gif-search-box;
|
83 |
+
-moz-animation-duration: 500ms;
|
84 |
+
-moz-animation-timing-function: ease-in-out;
|
85 |
+
-moz-animation-fill-mode: forwards;
|
86 |
+
|
87 |
+
-ms-animation-name: dismiss-gif-search-box;
|
88 |
+
-ms-animation-duration: 500ms;
|
89 |
+
-ms-animation-timing-function: ease-in-out;
|
90 |
+
-ms-animation-fill-mode: forwards;
|
91 |
+
}
|
92 |
+
.wplc-gif-integration-search-box.hidden {
|
93 |
+
display: none;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Present full screen msg
|
98 |
+
*/
|
99 |
+
@keyframes present-gif-search-box {
|
100 |
+
0% {
|
101 |
+
left: 5000px;
|
102 |
+
}
|
103 |
+
100% {
|
104 |
+
left: 0px;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
@-moz-keyframes present-gif-search-box {
|
108 |
+
0% {
|
109 |
+
left: 5000px;
|
110 |
+
}
|
111 |
+
100% {
|
112 |
+
left: 0px;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
@-webkit-keyframes present-gif-search-box {
|
116 |
+
0% {
|
117 |
+
left: 5000px;
|
118 |
+
}
|
119 |
+
100% {
|
120 |
+
left: 0px;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Dismiss full screen msg
|
126 |
+
*/
|
127 |
+
@keyframes dismiss-gif-search-box {
|
128 |
+
0% {
|
129 |
+
left: 0px;
|
130 |
+
}
|
131 |
+
100% {
|
132 |
+
left: 5000px;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
@-moz-keyframes dismiss-gif-search-box {
|
136 |
+
0% {
|
137 |
+
left: 0px;
|
138 |
+
}
|
139 |
+
100% {
|
140 |
+
left: 5000px;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
@-webkit-keyframes dismiss-gif-search-box {
|
144 |
+
0% {
|
145 |
+
left: 0px;
|
146 |
+
}
|
147 |
+
100% {
|
148 |
+
left: 5000px;
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
@media(max-width:767px) {
|
153 |
+
|
154 |
+
.wplc-gif-integration-search-box.show,
|
155 |
+
.wplc-gif-integration-search-box {
|
156 |
+
bottom: 75px;
|
157 |
+
}
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
/* Header, Body and Footer */
|
162 |
+
.wplc-gif-integration-search-box .gif-sb-header,
|
163 |
+
.wplc-gif-integration-search-box .gif-sb-body,
|
164 |
+
.wplc-gif-integration-search-box .gif-sb-footer {
|
165 |
+
display: block;
|
166 |
+
position: relative;
|
167 |
+
left: 0px;
|
168 |
+
top: 0px;
|
169 |
+
width: 100%;
|
170 |
+
height: auto;
|
171 |
+
padding: 10px;
|
172 |
+
padding-top: 5px;
|
173 |
+
padding-bottom: 5px;
|
174 |
+
}
|
175 |
+
|
176 |
+
/* Header */
|
177 |
+
.wplc-gif-integration-search-box .gif-sb-header {
|
178 |
+
min-height: 10%;
|
179 |
+
background-color:#ffffff;
|
180 |
+
border: 1px solid #e6e6e6;
|
181 |
+
}
|
182 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-search-term,
|
183 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search, {
|
184 |
+
display: inline-block;
|
185 |
+
position: relative;
|
186 |
+
left: 0px;
|
187 |
+
margin: 0px;
|
188 |
+
border-bottom: 1px solid #f0f0f0 !important;
|
189 |
+
background-color: transparent !important;
|
190 |
+
border-right: none;
|
191 |
+
}
|
192 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search i,
|
193 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close i,
|
194 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover i,
|
195 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover i {
|
196 |
+
display: block;
|
197 |
+
position: relative;
|
198 |
+
left: 0px;
|
199 |
+
font-style: initial;
|
200 |
+
color:#ccc;
|
201 |
+
}
|
202 |
+
|
203 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close {
|
204 |
+
position: absolute;
|
205 |
+
top: 3px;
|
206 |
+
right: 4px;
|
207 |
+
|
208 |
+
border: none !important;
|
209 |
+
}
|
210 |
+
|
211 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search,
|
212 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close,
|
213 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover,
|
214 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover {
|
215 |
+
text-decoration: none !important;
|
216 |
+
}
|
217 |
+
|
218 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-search-term {
|
219 |
+
top: -1px;
|
220 |
+
width: 95%;
|
221 |
+
height: 38px;
|
222 |
+
margin-bottom: 0px !important;
|
223 |
+
padding-left: 10px !important;
|
224 |
+
padding-right: 10px !important;
|
225 |
+
background-color:transparent !important;
|
226 |
+
border-bottom:1px solid #eee !important;
|
227 |
+
border-top: none;
|
228 |
+
border-left: none;
|
229 |
+
border-right: none;
|
230 |
+
}
|
231 |
+
|
232 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search,
|
233 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover {
|
234 |
+
top: 0px;
|
235 |
+
left: 1px;
|
236 |
+
width: 10%;
|
237 |
+
height: 40px;
|
238 |
+
text-align: center;
|
239 |
+
padding-top: 10px;
|
240 |
+
border-radius: 3px;
|
241 |
+
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search i,
|
246 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover i {
|
247 |
+
top:0px;
|
248 |
+
left:-1px;
|
249 |
+
font-weight: 600;
|
250 |
+
}
|
251 |
+
|
252 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close {
|
253 |
+
color: #999999 !important;
|
254 |
+
cursor: pointer;
|
255 |
+
}
|
256 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover {
|
257 |
+
background-color: #ffffff;
|
258 |
+
color: #333333 !important;
|
259 |
+
}
|
260 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close i,
|
261 |
+
.wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover i {
|
262 |
+
top: -3px;
|
263 |
+
font-weight: 500;
|
264 |
+
}
|
265 |
+
|
266 |
+
/* Body */
|
267 |
+
.wplc-gif-integration-search-box .gif-sb-body {
|
268 |
+
min-height: 65%;
|
269 |
+
max-height: 195px;
|
270 |
+
background-color: #f0f0f0;
|
271 |
+
border: 1px solid #eaeaea;
|
272 |
+
overflow: auto;
|
273 |
+
}
|
274 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img,
|
275 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img:hover,
|
276 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img.selected-gif {
|
277 |
+
display:inline-block;
|
278 |
+
position:relative;
|
279 |
+
left:0px;
|
280 |
+
top:0px;
|
281 |
+
min-height:70px;
|
282 |
+
min-height:70px;
|
283 |
+
width: auto;
|
284 |
+
max-width: 100px;
|
285 |
+
margin-left: 2px;
|
286 |
+
margin-right: 2px;
|
287 |
+
margin-bottom: 1px;
|
288 |
+
}
|
289 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
290 |
+
opacity:0.7;
|
291 |
+
}
|
292 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img:hover {
|
293 |
+
opacity:1;
|
294 |
+
}
|
295 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img.selected-gif {
|
296 |
+
min-height:100px;
|
297 |
+
opacity:1;
|
298 |
+
}
|
299 |
+
|
300 |
+
@media(max-width:767px) {
|
301 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
302 |
+
width:50%;
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
@media(max-width:900px) {
|
307 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
308 |
+
width:33%;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
@media(max-width:1200px) {
|
313 |
+
.wplc-gif-integration-search-box .gif-sb-body .gif-img {
|
314 |
+
width:20%;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
/* Footer */
|
319 |
+
.wplc-gif-integration-search-box .gif-sb-footer {
|
320 |
+
min-height: 10%;
|
321 |
+
background-color: #fafafa;
|
322 |
+
border: 1px solid #eaeaea;
|
323 |
+
font-size: 0.9em;
|
324 |
+
color: #777777;
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Adjustments of the base style made for the admin chat
|
329 |
+
*/
|
330 |
+
/**
|
331 |
+
* GIF image style within a message
|
332 |
+
*/
|
333 |
+
#chat_area .messageBody .gif-img {
|
334 |
+
max-width: 100%;
|
335 |
+
margin-bottom: 0px;
|
336 |
+
}
|
337 |
+
|
338 |
+
/* Header */
|
339 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-search-term {
|
340 |
+
top:1px;
|
341 |
+
}
|
342 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search,
|
343 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover {
|
344 |
+
|
345 |
+
padding-top: 9px;
|
346 |
+
}
|
347 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close,
|
348 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover {
|
349 |
+
top: 2px;
|
350 |
+
height: 38px;
|
351 |
+
}
|
352 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close i,
|
353 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-close:hover i {
|
354 |
+
top: 0px;
|
355 |
+
}
|
356 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search i,
|
357 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-header .gif-sb-confirm-search:hover i {
|
358 |
+
top: 1px;
|
359 |
+
}
|
360 |
+
|
361 |
+
/* Body */
|
362 |
+
#chat_area .wplc-gif-integration-search-box .gif-sb-body {
|
363 |
+
min-height: 73%;
|
364 |
}
|
css/wplc_gutenberg_template_styles.css
CHANGED
@@ -1,217 +1,217 @@
|
|
1 |
-
/* WPLC Gutenber Template Styles */
|
2 |
-
/* Custom Templates: Default - Light */
|
3 |
-
.wplc_block.light {
|
4 |
-
background: #ECEFF1;
|
5 |
-
color: #555;
|
6 |
-
border: 1px solid #ccc;
|
7 |
-
}
|
8 |
-
|
9 |
-
/* Custom Templates: Circle */
|
10 |
-
.wplc_block.circle {
|
11 |
-
background: transparent;
|
12 |
-
width: 50px;
|
13 |
-
height: 50px;
|
14 |
-
padding: 0;
|
15 |
-
position: relative;
|
16 |
-
}
|
17 |
-
|
18 |
-
.wplc_block.circle:after {
|
19 |
-
display: none;
|
20 |
-
}
|
21 |
-
|
22 |
-
.wplc_block.circle .wplc_block_logo {
|
23 |
-
position: relative;
|
24 |
-
width: 50px;
|
25 |
-
height: 50px;
|
26 |
-
padding: 0;
|
27 |
-
border-radius: 50%;
|
28 |
-
}
|
29 |
-
|
30 |
-
.wplc_block.sm.circle {
|
31 |
-
background: transparent;
|
32 |
-
width: 35px;
|
33 |
-
height: 35px;
|
34 |
-
padding: 0;
|
35 |
-
}
|
36 |
-
|
37 |
-
.wplc_block.sm.circle:after {
|
38 |
-
display: none;
|
39 |
-
}
|
40 |
-
|
41 |
-
.wplc_block.sm.circle .wplc_block_logo {
|
42 |
-
position: relative;
|
43 |
-
width: 35px;
|
44 |
-
height: 35px;
|
45 |
-
padding: 0;
|
46 |
-
border-radius: 50%;
|
47 |
-
}
|
48 |
-
|
49 |
-
.wplc_block.lg.circle {
|
50 |
-
background: transparent;
|
51 |
-
width: 65px;
|
52 |
-
height: 65px;
|
53 |
-
padding: 0;
|
54 |
-
}
|
55 |
-
|
56 |
-
.wplc_block.lg.circle:after {
|
57 |
-
display: none;
|
58 |
-
}
|
59 |
-
|
60 |
-
.wplc_block.lg.circle .wplc_block_logo {
|
61 |
-
position: relative;
|
62 |
-
width: 65px;
|
63 |
-
height: 65px;
|
64 |
-
padding: 0;
|
65 |
-
border-radius: 50%;
|
66 |
-
}
|
67 |
-
|
68 |
-
/* Custom Templates: Tooltip */
|
69 |
-
.wplc_block:hover .wplc_block_tooltip {
|
70 |
-
top: -62px;
|
71 |
-
background: #333;
|
72 |
-
color: #fff;
|
73 |
-
opacity: .85;
|
74 |
-
display: inline-block;
|
75 |
-
}
|
76 |
-
|
77 |
-
.wplc_block_tooltip {
|
78 |
-
min-width: 100px;
|
79 |
-
border-radius: 3px;
|
80 |
-
color: transparent;
|
81 |
-
position: absolute;
|
82 |
-
line-height: 25px;
|
83 |
-
padding: 10px;
|
84 |
-
top: -50px;
|
85 |
-
left: 0;
|
86 |
-
opacity: 0;
|
87 |
-
transition: opacity .2s ease-in-out, top .2s ease-in-out;
|
88 |
-
}
|
89 |
-
|
90 |
-
.wplc_block.circle:hover .wplc_block_tooltip {
|
91 |
-
top: -75px;
|
92 |
-
display: block;
|
93 |
-
}
|
94 |
-
.wplc_block.circle.sm:hover .wplc_block_tooltip {
|
95 |
-
top: -50px;
|
96 |
-
}
|
97 |
-
|
98 |
-
.wplc_block.circle.lg:hover .wplc_block_tooltip {
|
99 |
-
top: -100px;
|
100 |
-
}
|
101 |
-
|
102 |
-
/* Custom Templates: Chat Bubble */
|
103 |
-
.wplc_block.chat_bubble:before {
|
104 |
-
content: '';
|
105 |
-
position: absolute;
|
106 |
-
width: 0;
|
107 |
-
height: 0;
|
108 |
-
left: 0px;
|
109 |
-
bottom: -10px;
|
110 |
-
border: 8px solid;
|
111 |
-
border-color: #32373c transparent transparent #32373c;
|
112 |
-
}
|
113 |
-
|
114 |
-
.wplc_block.chat_bubble:hover:after {
|
115 |
-
content: '';
|
116 |
-
position: absolute;
|
117 |
-
width: 0;
|
118 |
-
height: 0;
|
119 |
-
}
|
120 |
-
|
121 |
-
.wplc_block.chat_bubble {
|
122 |
-
padding-left: 10px;
|
123 |
-
padding-right: 40px;
|
124 |
-
border-radius: 7px 7px 7px 0;
|
125 |
-
}
|
126 |
-
|
127 |
-
.wplc_block.chat_bubble .wplc_block_logo {
|
128 |
-
border:none;
|
129 |
-
right: 0px;
|
130 |
-
left: initial;
|
131 |
-
border-radius: 0 7px 7px 0;
|
132 |
-
}
|
133 |
-
|
134 |
-
.wplc_block.chat_bubble.sm {
|
135 |
-
padding-left: 10px;
|
136 |
-
padding-right: 25px;
|
137 |
-
}
|
138 |
-
|
139 |
-
.wplc_block.chat_bubble.lg {
|
140 |
-
padding-left: 20px;
|
141 |
-
padding-right: 80px;
|
142 |
-
}
|
143 |
-
|
144 |
-
/* Custom Templates: Rotating circle */
|
145 |
-
.wplc_block.rotate {
|
146 |
-
transform:rotate(0deg);
|
147 |
-
}
|
148 |
-
|
149 |
-
.wplc_block.rotate:hover {
|
150 |
-
transition: all .3s ease-in-out;
|
151 |
-
transform:rotate(-90deg);
|
152 |
-
}
|
153 |
-
|
154 |
-
.wplc_block.rotate .wplc_block_icon {
|
155 |
-
position: relative;
|
156 |
-
height: 100%;
|
157 |
-
width: 100%;
|
158 |
-
text-align: center;
|
159 |
-
font-size: 30px;
|
160 |
-
transform: rotate(90deg);
|
161 |
-
line-height: 150%;
|
162 |
-
}
|
163 |
-
|
164 |
-
.wplc_block.rotate .wplc_block_logo {
|
165 |
-
z-index: 10;
|
166 |
-
position: absolute;
|
167 |
-
}
|
168 |
-
.wplc_block.rotate {
|
169 |
-
border-radius: 50%;
|
170 |
-
background: #32373c;
|
171 |
-
}
|
172 |
-
|
173 |
-
.wplc_block.rotate .wplc_block_logo:hover {
|
174 |
-
opacity: 0;
|
175 |
-
}
|
176 |
-
|
177 |
-
.wplc_block.circle.rotate.lg .wplc_block_logo {
|
178 |
-
padding: 0;
|
179 |
-
margin: 0;
|
180 |
-
position:absolute;
|
181 |
-
}
|
182 |
-
|
183 |
-
.wplc_block.circle.rotate.lg {
|
184 |
-
background: #32373c;
|
185 |
-
}
|
186 |
-
|
187 |
-
.wplc_block.rotate.lg .wplc_block_icon {
|
188 |
-
position: relative;
|
189 |
-
height: 100%;
|
190 |
-
width: 100%;
|
191 |
-
text-align: center;
|
192 |
-
font-size: 30px;
|
193 |
-
transform: rotate(90deg);
|
194 |
-
line-height: 225%;
|
195 |
-
padding-right: 10px;
|
196 |
-
}
|
197 |
-
|
198 |
-
.wplc_block.circle.rotate.sm .wplc_block_logo {
|
199 |
-
padding: 0;
|
200 |
-
margin: 0;
|
201 |
-
position:absolute;
|
202 |
-
}
|
203 |
-
|
204 |
-
.wplc_block.circle.rotate.sm {
|
205 |
-
background: #32373c;
|
206 |
-
}
|
207 |
-
|
208 |
-
.wplc_block.rotate.sm .wplc_block_icon {
|
209 |
-
position: relative;
|
210 |
-
height: 100%;
|
211 |
-
width: 100%;
|
212 |
-
text-align: center;
|
213 |
-
font-size: 20px;
|
214 |
-
transform: rotate(90deg);
|
215 |
-
line-height: 100%;
|
216 |
-
right:5px;
|
217 |
}
|
1 |
+
/* WPLC Gutenber Template Styles */
|
2 |
+
/* Custom Templates: Default - Light */
|
3 |
+
.wplc_block.light {
|
4 |
+
background: #ECEFF1;
|
5 |
+
color: #555;
|
6 |
+
border: 1px solid #ccc;
|
7 |
+
}
|
8 |
+
|
9 |
+
/* Custom Templates: Circle */
|
10 |
+
.wplc_block.circle {
|
11 |
+
background: transparent;
|
12 |
+
width: 50px;
|
13 |
+
height: 50px;
|
14 |
+
padding: 0;
|
15 |
+
position: relative;
|
16 |
+
}
|
17 |
+
|
18 |
+
.wplc_block.circle:after {
|
19 |
+
display: none;
|
20 |
+
}
|
21 |
+
|
22 |
+
.wplc_block.circle .wplc_block_logo {
|
23 |
+
position: relative;
|
24 |
+
width: 50px;
|
25 |
+
height: 50px;
|
26 |
+
padding: 0;
|
27 |
+
border-radius: 50%;
|
28 |
+
}
|
29 |
+
|
30 |
+
.wplc_block.sm.circle {
|
31 |
+
background: transparent;
|
32 |
+
width: 35px;
|
33 |
+
height: 35px;
|
34 |
+
padding: 0;
|
35 |
+
}
|
36 |
+
|
37 |
+
.wplc_block.sm.circle:after {
|
38 |
+
display: none;
|
39 |
+
}
|
40 |
+
|
41 |
+
.wplc_block.sm.circle .wplc_block_logo {
|
42 |
+
position: relative;
|
43 |
+
width: 35px;
|
44 |
+
height: 35px;
|
45 |
+
padding: 0;
|
46 |
+
border-radius: 50%;
|
47 |
+
}
|
48 |
+
|
49 |
+
.wplc_block.lg.circle {
|
50 |
+
background: transparent;
|
51 |
+
width: 65px;
|
52 |
+
height: 65px;
|
53 |
+
padding: 0;
|
54 |
+
}
|
55 |
+
|
56 |
+
.wplc_block.lg.circle:after {
|
57 |
+
display: none;
|
58 |
+
}
|
59 |
+
|
60 |
+
.wplc_block.lg.circle .wplc_block_logo {
|
61 |
+
position: relative;
|
62 |
+
width: 65px;
|
63 |
+
height: 65px;
|
64 |
+
padding: 0;
|
65 |
+
border-radius: 50%;
|
66 |
+
}
|
67 |
+
|
68 |
+
/* Custom Templates: Tooltip */
|
69 |
+
.wplc_block:hover .wplc_block_tooltip {
|
70 |
+
top: -62px;
|
71 |
+
background: #333;
|
72 |
+
color: #fff;
|
73 |
+
opacity: .85;
|
74 |
+
display: inline-block;
|
75 |
+
}
|
76 |
+
|
77 |
+
.wplc_block_tooltip {
|
78 |
+
min-width: 100px;
|
79 |
+
border-radius: 3px;
|
80 |
+
color: transparent;
|
81 |
+
position: absolute;
|
82 |
+
line-height: 25px;
|
83 |
+
padding: 10px;
|
84 |
+
top: -50px;
|
85 |
+
left: 0;
|
86 |
+
opacity: 0;
|
87 |
+
transition: opacity .2s ease-in-out, top .2s ease-in-out;
|
88 |
+
}
|
89 |
+
|
90 |
+
.wplc_block.circle:hover .wplc_block_tooltip {
|
91 |
+
top: -75px;
|
92 |
+
display: block;
|
93 |
+
}
|
94 |
+
.wplc_block.circle.sm:hover .wplc_block_tooltip {
|
95 |
+
top: -50px;
|
96 |
+
}
|
97 |
+
|
98 |
+
.wplc_block.circle.lg:hover .wplc_block_tooltip {
|
99 |
+
top: -100px;
|
100 |
+
}
|
101 |
+
|
102 |
+
/* Custom Templates: Chat Bubble */
|
103 |
+
.wplc_block.chat_bubble:before {
|
104 |
+
content: '';
|
105 |
+
position: absolute;
|
106 |
+
width: 0;
|
107 |
+
height: 0;
|
108 |
+
left: 0px;
|
109 |
+
bottom: -10px;
|
110 |
+
border: 8px solid;
|
111 |
+
border-color: #32373c transparent transparent #32373c;
|
112 |
+
}
|
113 |
+
|
114 |
+
.wplc_block.chat_bubble:hover:after {
|
115 |
+
content: '';
|
116 |
+
position: absolute;
|
117 |
+
width: 0;
|
118 |
+
height: 0;
|
119 |
+
}
|
120 |
+
|
121 |
+
.wplc_block.chat_bubble {
|
122 |
+
padding-left: 10px;
|
123 |
+
padding-right: 40px;
|
124 |
+
border-radius: 7px 7px 7px 0;
|
125 |
+
}
|
126 |
+
|
127 |
+
.wplc_block.chat_bubble .wplc_block_logo {
|
128 |
+
border:none;
|
129 |
+
right: 0px;
|
130 |
+
left: initial;
|
131 |
+
border-radius: 0 7px 7px 0;
|
132 |
+
}
|
133 |
+
|
134 |
+
.wplc_block.chat_bubble.sm {
|
135 |
+
padding-left: 10px;
|
136 |
+
padding-right: 25px;
|
137 |
+
}
|
138 |
+
|
139 |
+
.wplc_block.chat_bubble.lg {
|
140 |
+
padding-left: 20px;
|
141 |
+
padding-right: 80px;
|
142 |
+
}
|
143 |
+
|
144 |
+
/* Custom Templates: Rotating circle */
|
145 |
+
.wplc_block.rotate {
|
146 |
+
transform:rotate(0deg);
|
147 |
+
}
|
148 |
+
|
149 |
+
.wplc_block.rotate:hover {
|
150 |
+
transition: all .3s ease-in-out;
|
151 |
+
transform:rotate(-90deg);
|
152 |
+
}
|
153 |
+
|
154 |
+
.wplc_block.rotate .wplc_block_icon {
|
155 |
+
position: relative;
|
156 |
+
height: 100%;
|
157 |
+
width: 100%;
|
158 |
+
text-align: center;
|
159 |
+
font-size: 30px;
|
160 |
+
transform: rotate(90deg);
|
161 |
+
line-height: 150%;
|
162 |
+
}
|
163 |
+
|
164 |
+
.wplc_block.rotate .wplc_block_logo {
|
165 |
+
z-index: 10;
|
166 |
+
position: absolute;
|
167 |
+
}
|
168 |
+
.wplc_block.rotate {
|
169 |
+
border-radius: 50%;
|
170 |
+
background: #32373c;
|
171 |
+
}
|
172 |
+
|
173 |
+
.wplc_block.rotate .wplc_block_logo:hover {
|
174 |
+
opacity: 0;
|
175 |
+
}
|
176 |
+
|
177 |
+
.wplc_block.circle.rotate.lg .wplc_block_logo {
|
178 |
+
padding: 0;
|
179 |
+
margin: 0;
|
180 |
+
position:absolute;
|
181 |
+
}
|
182 |
+
|
183 |
+
.wplc_block.circle.rotate.lg {
|
184 |
+
background: #32373c;
|
185 |
+
}
|
186 |
+
|
187 |
+
.wplc_block.rotate.lg .wplc_block_icon {
|
188 |
+
position: relative;
|
189 |
+
height: 100%;
|
190 |
+
width: 100%;
|
191 |
+
text-align: center;
|
192 |
+
font-size: 30px;
|
193 |
+
transform: rotate(90deg);
|
194 |
+
line-height: 225%;
|
195 |
+
padding-right: 10px;
|
196 |
+
}
|
197 |
+
|
198 |
+
.wplc_block.circle.rotate.sm .wplc_block_logo {
|
199 |
+
padding: 0;
|
200 |
+
margin: 0;
|
201 |
+
position:absolute;
|
202 |
+
}
|
203 |
+
|
204 |
+
.wplc_block.circle.rotate.sm {
|
205 |
+
background: #32373c;
|
206 |
+
}
|
207 |
+
|
208 |
+
.wplc_block.rotate.sm .wplc_block_icon {
|
209 |
+
position: relative;
|
210 |
+
height: 100%;
|
211 |
+
width: 100%;
|
212 |
+
text-align: center;
|
213 |
+
font-size: 20px;
|
214 |
+
transform: rotate(90deg);
|
215 |
+
line-height: 100%;
|
216 |
+
right:5px;
|
217 |
}
|
css/wplcstyle.css
CHANGED
@@ -1,250 +1,230 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
.wplc-chat-alert {
|
5 |
-
display: none;
|
6 |
-
width: 30px;
|
7 |
-
height: 30px;
|
8 |
-
position: absolute;
|
9 |
-
top: -10px;
|
10 |
-
right: -10px;
|
11 |
-
background-color: #666;
|
12 |
-
border-radius: 15px;
|
13 |
-
}
|
14 |
-
|
15 |
-
.wplc-chat-alert--theme-3 {
|
16 |
-
background-color: #5a0031;
|
17 |
-
}
|
18 |
-
|
19 |
-
.wplc-chat-alert.is-active {
|
20 |
-
display: inline-block;
|
21 |
-
}
|
22 |
-
|
23 |
-
.wplc-chat-alert:after {
|
24 |
-
content: '\f0a2';
|
25 |
-
position: absolute;
|
26 |
-
left: 7px;
|
27 |
-
font-family: FontAwesome;
|
28 |
-
color: #fff;
|
29 |
-
line-height: 30px;
|
30 |
-
}
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
.bleeper-edit-message {
|
35 |
-
display:none;
|
36 |
-
cursor: pointer;
|
37 |
-
margin-left:10px;
|
38 |
-
font-style: italic;
|
39 |
-
text-decoration: underline;
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Mobile Responsiveness (Jarek)
|
47 |
-
*/
|
48 |
-
@media (max-width: 767px) {
|
49 |
-
#wp-live-chat-2 {
|
50 |
-
min-height: 420px;
|
51 |
-
top: 2px;
|
52 |
-
}
|
53 |
-
|
54 |
-
#wp-live-chat.classic {
|
55 |
-
right: 30px !important;
|
56 |
-
}
|
57 |
-
|
58 |
-
#wp-live-chat.classic.wplc_right {
|
59 |
-
right: 0 !important;
|
60 |
-
}
|
61 |
-
|
62 |
-
#wp-live-chat.classic.wplc_left {
|
63 |
-
right: auto !important;
|
64 |
-
}
|
65 |
-
|
66 |
-
#wp-live-chat.classic.is-active {
|
67 |
-
top: 2px;
|
68 |
-
}
|
69 |
-
|
70 |
-
#wp-live-chat.mobile-active #wp-live-chat-2 {
|
71 |
-
min-height: auto;
|
72 |
-
top: auto;
|
73 |
-
}
|
74 |
-
|
75 |
-
#wp-live-chat-inner {
|
76 |
-
overflow-y: scroll;
|
77 |
-
}
|
78 |
-
|
79 |
-
#wp-live-chat-4 {
|
80 |
-
top: 2px !important;
|
81 |
-
bottom: 150px !important;
|
82 |
-
}
|
83 |
-
|
84 |
-
.wplc_left #wp-live-chat-4 {
|
85 |
-
bottom: 80px !important;
|
86 |
-
}
|
87 |
-
|
88 |
-
#wp-live-chat-4.is-full-height {
|
89 |
-
bottom: 70px !important;
|
90 |
-
}
|
91 |
-
|
92 |
-
#wp-live-chat.is-full-height.classic {
|
93 |
-
top: -40px;
|
94 |
-
}
|
95 |
-
|
96 |
-
.wplc_left #wp-live-chat-4 {
|
97 |
-
width: 225px;
|
98 |
-
}
|
99 |
-
|
100 |
-
.modern[original_pos="bottom_left"] #wp-live-chat-4 {
|
101 |
-
width: 310px;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
/* Gutenberg styles */
|
106 |
-
#wplc-chat-box.disabled {
|
107 |
-
display: none;
|
108 |
-
}
|
109 |
-
|
110 |
-
.wplc_live_chat_support_shortcode .wp-live-chat-wraper {
|
111 |
-
position: relative;
|
112 |
-
z-index: 0;
|
113 |
-
display: block;
|
114 |
-
}
|
115 |
-
|
116 |
-
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
117 |
-
position: relative;
|
118 |
-
height: 500px;
|
119 |
-
z-index: 0;
|
120 |
-
bottom: unset;
|
121 |
-
right: unset;
|
122 |
-
left: 70px;
|
123 |
-
top: -80px;
|
124 |
-
}
|
125 |
-
|
126 |
-
.wplc_live_chat_support_shortcode #wplc_hovercard {
|
127 |
-
position: absolute;
|
128 |
-
top: 0;
|
129 |
-
left: 70px;
|
130 |
-
bottom: unset;
|
131 |
-
z-index: 0;
|
132 |
-
}
|
133 |
-
|
134 |
-
.wplc_live_chat_support_shortcode #wp-live-chat {
|
135 |
-
position: relative;
|
136 |
-
z-index: 0;
|
137 |
-
}
|
138 |
-
|
139 |
-
.wplc_live_chat_support_shortcode {
|
140 |
-
position: relative;
|
141 |
-
transition: all .3s ease-in-out;
|
142 |
-
z-index: 10;
|
143 |
-
}
|
144 |
-
|
145 |
-
.wplc_live_chat_support_shortcode #wp-live-chat-2 {
|
146 |
-
position: relative;
|
147 |
-
left: 70px;
|
148 |
-
z-index: 5;
|
149 |
-
}
|
150 |
-
|
151 |
-
@media screen and (max-width: 500px) {
|
152 |
-
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
153 |
-
max-width: 280px;
|
154 |
-
}
|
155 |
-
.wplc_live_chat_support_shortcode #wp-live-chat-2 {
|
156 |
-
left: 0px !important;
|
157 |
-
}
|
158 |
-
.wplc_live_chat_support_shortcode #wplc_hovercard {
|
159 |
-
top: 80px !important;
|
160 |
-
left: -20px !important;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
@media screen and (max-width: 400px) {
|
165 |
-
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
166 |
-
max-width: 240px;
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
173 |
-
margin-bottom: 65px !important;
|
174 |
-
}
|
175 |
-
/* WPLC Gutenberg style: Wide */
|
176 |
-
.wplc_live_chat_support_shortcode.wplc_wide #wp-live-chat-4 {
|
177 |
-
width: 100%;
|
178 |
-
left: 0;
|
179 |
-
top: 0px;
|
180 |
-
}
|
181 |
-
|
182 |
-
.wplc_live_chat_support_shortcode.wplc_wide #wplc_hovercard {
|
183 |
-
top: 0px;
|
184 |
-
left: 0;
|
185 |
-
margin: 0 auto;
|
186 |
-
width: 70%;
|
187 |
-
}
|
188 |
-
|
189 |
-
.wplc_live_chat_support_shortcode.wplc_wide #wp-live-chat-2 {
|
190 |
-
top: 0;
|
191 |
-
width: 100%;
|
192 |
-
left: 0;
|
193 |
-
}
|
194 |
-
|
195 |
-
/* WPLC Gutenberg style: Center */
|
196 |
-
.wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-header {
|
197 |
-
margin: 0 auto;
|
198 |
-
left: 0;
|
199 |
-
top: 0px;
|
200 |
-
margin-bottom: 10px;
|
201 |
-
}
|
202 |
-
|
203 |
-
.wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-4 {
|
204 |
-
margin: 0 auto;
|
205 |
-
left: 0;
|
206 |
-
top: 0px;
|
207 |
-
}
|
208 |
-
|
209 |
-
.wplc_live_chat_support_shortcode.wplc_center #wplc_hovercard {
|
210 |
-
left: 0;
|
211 |
-
margin: 0 auto;
|
212 |
-
top: 75px;
|
213 |
-
}
|
214 |
-
|
215 |
-
.wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-2 {
|
216 |
-
left: 0px;
|
217 |
-
margin: 0px auto;
|
218 |
-
top: 0px;
|
219 |
-
}
|
220 |
-
|
221 |
-
/* Link override */
|
222 |
-
#wplc_chatbox .wplc-user-message a,
|
223 |
-
#wplc_chatbox .wplc-admin-message a {
|
224 |
-
color: #fff !important;
|
225 |
-
text-decoration:underline !important;
|
226 |
-
}
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
#wp-live-chat-inner .wpcf_wrapper {
|
232 |
-
position: inherit;
|
233 |
-
padding: 25px;
|
234 |
-
max-height: 400px;
|
235 |
-
margin-bottom:20px;
|
236 |
-
}
|
237 |
-
|
238 |
-
input#wplc_chat_gdpr_opt_in.incomplete + label {
|
239 |
-
border-left: 1px solid #bd0000 !important;
|
240 |
-
background: none !important;
|
241 |
-
padding: 4px;
|
242 |
-
}
|
243 |
-
|
244 |
-
|
245 |
-
@media screen and (max-width:510px){
|
246 |
-
#wp-live-chat.modern #wp-live-chat-2,
|
247 |
-
#wp-live-chat.modern #wp-live-chat-4 {
|
248 |
-
bottom:100px;
|
249 |
-
}
|
250 |
-
}
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
.wplc-chat-alert {
|
5 |
+
display: none;
|
6 |
+
width: 30px;
|
7 |
+
height: 30px;
|
8 |
+
position: absolute;
|
9 |
+
top: -10px;
|
10 |
+
right: -10px;
|
11 |
+
background-color: #666;
|
12 |
+
border-radius: 15px;
|
13 |
+
}
|
14 |
+
|
15 |
+
.wplc-chat-alert--theme-3 {
|
16 |
+
background-color: #5a0031;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wplc-chat-alert.is-active {
|
20 |
+
display: inline-block;
|
21 |
+
}
|
22 |
+
|
23 |
+
.wplc-chat-alert:after {
|
24 |
+
content: '\f0a2';
|
25 |
+
position: absolute;
|
26 |
+
left: 7px;
|
27 |
+
font-family: FontAwesome;
|
28 |
+
color: #fff;
|
29 |
+
line-height: 30px;
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
.bleeper-edit-message {
|
35 |
+
display:none;
|
36 |
+
cursor: pointer;
|
37 |
+
margin-left:10px;
|
38 |
+
font-style: italic;
|
39 |
+
text-decoration: underline;
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Mobile Responsiveness (Jarek)
|
47 |
+
*/
|
48 |
+
@media (max-width: 767px) {
|
49 |
+
#wp-live-chat-2 {
|
50 |
+
min-height: 420px;
|
51 |
+
top: 2px;
|
52 |
+
}
|
53 |
+
|
54 |
+
#wp-live-chat.classic {
|
55 |
+
right: 30px !important;
|
56 |
+
}
|
57 |
+
|
58 |
+
#wp-live-chat.classic.wplc_right {
|
59 |
+
right: 0 !important;
|
60 |
+
}
|
61 |
+
|
62 |
+
#wp-live-chat.classic.wplc_left {
|
63 |
+
right: auto !important;
|
64 |
+
}
|
65 |
+
|
66 |
+
#wp-live-chat.classic.is-active {
|
67 |
+
top: 2px;
|
68 |
+
}
|
69 |
+
|
70 |
+
#wp-live-chat.mobile-active #wp-live-chat-2 {
|
71 |
+
min-height: auto;
|
72 |
+
top: auto;
|
73 |
+
}
|
74 |
+
|
75 |
+
#wp-live-chat-inner {
|
76 |
+
overflow-y: scroll;
|
77 |
+
}
|
78 |
+
|
79 |
+
#wp-live-chat-4 {
|
80 |
+
top: 2px !important;
|
81 |
+
bottom: 150px !important;
|
82 |
+
}
|
83 |
+
|
84 |
+
.wplc_left #wp-live-chat-4 {
|
85 |
+
bottom: 80px !important;
|
86 |
+
}
|
87 |
+
|
88 |
+
#wp-live-chat-4.is-full-height {
|
89 |
+
bottom: 70px !important;
|
90 |
+
}
|
91 |
+
|
92 |
+
#wp-live-chat.is-full-height.classic {
|
93 |
+
top: -40px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.wplc_left #wp-live-chat-4 {
|
97 |
+
width: 225px;
|
98 |
+
}
|
99 |
+
|
100 |
+
.modern[original_pos="bottom_left"] #wp-live-chat-4 {
|
101 |
+
width: 310px;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
/* Gutenberg styles */
|
106 |
+
#wplc-chat-box.disabled {
|
107 |
+
display: none;
|
108 |
+
}
|
109 |
+
|
110 |
+
.wplc_live_chat_support_shortcode .wp-live-chat-wraper {
|
111 |
+
position: relative;
|
112 |
+
z-index: 0;
|
113 |
+
display: block;
|
114 |
+
}
|
115 |
+
|
116 |
+
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
117 |
+
position: relative;
|
118 |
+
height: 500px;
|
119 |
+
z-index: 0;
|
120 |
+
bottom: unset;
|
121 |
+
right: unset;
|
122 |
+
left: 70px;
|
123 |
+
top: -80px;
|
124 |
+
}
|
125 |
+
|
126 |
+
.wplc_live_chat_support_shortcode #wplc_hovercard {
|
127 |
+
position: absolute;
|
128 |
+
top: 0;
|
129 |
+
left: 70px;
|
130 |
+
bottom: unset;
|
131 |
+
z-index: 0;
|
132 |
+
}
|
133 |
+
|
134 |
+
.wplc_live_chat_support_shortcode #wp-live-chat {
|
135 |
+
position: relative;
|
136 |
+
z-index: 0;
|
137 |
+
}
|
138 |
+
|
139 |
+
.wplc_live_chat_support_shortcode {
|
140 |
+
position: relative;
|
141 |
+
transition: all .3s ease-in-out;
|
142 |
+
z-index: 10;
|
143 |
+
}
|
144 |
+
|
145 |
+
.wplc_live_chat_support_shortcode #wp-live-chat-2 {
|
146 |
+
position: relative;
|
147 |
+
left: 70px;
|
148 |
+
z-index: 5;
|
149 |
+
}
|
150 |
+
|
151 |
+
@media screen and (max-width: 500px) {
|
152 |
+
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
153 |
+
max-width: 280px;
|
154 |
+
}
|
155 |
+
.wplc_live_chat_support_shortcode #wp-live-chat-2 {
|
156 |
+
left: 0px !important;
|
157 |
+
}
|
158 |
+
.wplc_live_chat_support_shortcode #wplc_hovercard {
|
159 |
+
top: 80px !important;
|
160 |
+
left: -20px !important;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
@media screen and (max-width: 400px) {
|
165 |
+
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
166 |
+
max-width: 240px;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
|
172 |
+
.wplc_live_chat_support_shortcode #wp-live-chat-4 {
|
173 |
+
margin-bottom: 65px !important;
|
174 |
+
}
|
175 |
+
/* WPLC Gutenberg style: Wide */
|
176 |
+
.wplc_live_chat_support_shortcode.wplc_wide #wp-live-chat-4 {
|
177 |
+
width: 100%;
|
178 |
+
left: 0;
|
179 |
+
top: 0px;
|
180 |
+
}
|
181 |
+
|
182 |
+
.wplc_live_chat_support_shortcode.wplc_wide #wplc_hovercard {
|
183 |
+
top: 0px;
|
184 |
+
left: 0;
|
185 |
+
margin: 0 auto;
|
186 |
+
width: 70%;
|
187 |
+
}
|
188 |
+
|
189 |
+
.wplc_live_chat_support_shortcode.wplc_wide #wp-live-chat-2 {
|
190 |
+
top: 0;
|
191 |
+
width: 100%;
|
192 |
+
left: 0;
|
193 |
+
}
|
194 |
+
|
195 |
+
/* WPLC Gutenberg style: Center */
|
196 |
+
.wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-header {
|
197 |
+
margin: 0 auto;
|
198 |
+
left: 0;
|
199 |
+
top: 0px;
|
200 |
+
margin-bottom: 10px;
|
201 |
+
}
|
202 |
+
|
203 |
+
.wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-4 {
|
204 |
+
margin: 0 auto;
|
205 |
+
left: 0;
|
206 |
+
top: 0px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.wplc_live_chat_support_shortcode.wplc_center #wplc_hovercard {
|
210 |
+
left: 0;
|
211 |
+
margin: 0 auto;
|
212 |
+
top: 75px;
|
213 |
+
}
|
214 |
+
|
215 |
+
.wplc_live_chat_support_shortcode.wplc_center #wp-live-chat-2 {
|
216 |
+
left: 0px;
|
217 |
+
margin: 0px auto;
|
218 |
+
top: 0px;
|
219 |
+
}
|
220 |
+
|
221 |
+
/* Link override */
|
222 |
+
#wplc_chatbox .wplc-user-message a,
|
223 |
+
#wplc_chatbox .wplc-admin-message a {
|
224 |
+
color: #fff !important;
|
225 |
+
text-decoration:underline !important;
|
226 |
+
}
|
227 |
+
|
228 |
+
|
229 |
+
|
230 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/wplcstyle_old.css
CHANGED
File without changes
|
ding.mp3
CHANGED
File without changes
|
fonts/FontAwesome.otf
CHANGED
File without changes
|
fonts/fontawesome-webfont.eot
CHANGED
File without changes
|
fonts/fontawesome-webfont.svg
CHANGED
File without changes
|
fonts/fontawesome-webfont.ttf
CHANGED
File without changes
|
fonts/fontawesome-webfont.woff
CHANGED
File without changes
|
fonts/fontawesome-webfont.woff2
CHANGED
File without changes
|
functions.php
CHANGED
@@ -1,2443 +1,2370 @@
|
|
1 |
-
<?php
|
2 |
-
$wplc_basic_plugin_url = WPLC_BASIC_PLUGIN_URL;
|
3 |
-
|
4 |
-
function wplc_log_user_on_page($name,$email,$session, $is_mobile = false) {
|
5 |
-
global $wpdb;
|
6 |
-
global $wplc_tblname_chats;
|
7 |
-
|
8 |
-
$wplc_settings = get_option('WPLC_SETTINGS');
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
|
15 |
-
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
16 |
-
} else {
|
17 |
-
$ip_address = $_SERVER['REMOTE_ADDR'];
|
18 |
-
}
|
19 |
-
|
20 |
-
$user_data = array(
|
21 |
-
'ip' => $ip_address,
|
22 |
-
'user_agent' => $_SERVER['HTTP_USER_AGENT']
|
23 |
-
);
|
24 |
-
} else {
|
25 |
-
$user_data = array(
|
26 |
-
'ip' => "",
|
27 |
-
'user_agent' => $_SERVER['HTTP_USER_AGENT']
|
28 |
-
);
|
29 |
-
}
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
'
|
57 |
-
'
|
58 |
-
'
|
59 |
-
'
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
'%s',
|
72 |
-
'%s',
|
73 |
-
'%s',
|
74 |
-
'%s'
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$lastid
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
'
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
'
|
127 |
-
'
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
'
|
179 |
-
'
|
180 |
-
'
|
181 |
-
'
|
182 |
-
'
|
183 |
-
'
|
184 |
-
'
|
185 |
-
'
|
186 |
-
'
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
if ($from == "
|
208 |
-
$
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
$
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
'
|
270 |
-
'
|
271 |
-
'
|
272 |
-
'
|
273 |
-
'
|
274 |
-
'
|
275 |
-
'
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
//
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
$
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
<div class='wplc_chat_section
|
452 |
-
<div class='
|
453 |
-
<
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
</
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
$
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
$
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
return "
|
510 |
-
}
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
$
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
$
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
$
|
616 |
-
|
617 |
-
$
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
$
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
$
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
$data_array[$result->id]['
|
669 |
-
$
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
$data_array[$result->id]['
|
679 |
-
$data_array[$result->id]['
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
$
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
if(
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
$
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
$msg_hist[$id][
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
$string =
|
857 |
-
return
|
858 |
-
}
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
*/
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
}
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
$
|
972 |
-
|
973 |
-
|
974 |
-
$
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
$
|
984 |
-
|
985 |
-
|
986 |
-
if
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
$
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
$
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
$
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
/* this
|
1014 |
-
$display_notification =
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
if(
|
1039 |
-
$msg_array =
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
$
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
}
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
$
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
$
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
if (
|
1252 |
-
/*
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
$
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
$
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
"
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
"
|
1370 |
-
|
1371 |
-
|
1372 |
-
return
|
1373 |
-
}
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
}
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
$
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
//
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
//
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
$
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
//
|
1575 |
-
$mail->
|
1576 |
-
|
1577 |
-
$mail->
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
//
|
1588 |
-
$mail->
|
1589 |
-
|
1590 |
-
$
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
//
|
1599 |
-
$
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
'
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
$
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
array(
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
'
|
1793 |
-
'
|
1794 |
-
'
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
}
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
if
|
1879 |
-
if ($difference >=
|
1880 |
-
wplc_change_chat_status($id,
|
1881 |
-
}
|
1882 |
-
}
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
if ($
|
1895 |
-
|
1896 |
-
}
|
1897 |
-
}
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
function
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
if(
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
}
|
1996 |
-
|
1997 |
-
function
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
}
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
<
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
$
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
$
|
2191 |
-
|
2192 |
-
$
|
2193 |
-
$
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
$original_pos
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
$
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
$
|
2244 |
-
$
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
$
|
2254 |
-
} else if ($original_pos == '
|
2255 |
-
$wplc_starting_point = 'margin-bottom:
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
$
|
2268 |
-
|
2269 |
-
$
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
if($original_pos == '
|
2274 |
-
$wplc_starting_point = 'margin-bottom: 0px;
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
$
|
2288 |
-
|
2289 |
-
$
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
}
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
</select>
|
2371 |
-
<input type='text' name='wplc_elem_trigger_id' value='".$elem_trig_id."'>
|
2372 |
-
</td>
|
2373 |
-
</tr>
|
2374 |
-
";
|
2375 |
-
}
|
2376 |
-
|
2377 |
-
/**
|
2378 |
-
* Reverse of wplc_return_chat_id_by_rel
|
2379 |
-
*/
|
2380 |
-
function wplc_return_chat_rel_by_id($cid) {
|
2381 |
-
global $wpdb;
|
2382 |
-
global $wplc_tblname_chats;
|
2383 |
-
|
2384 |
-
$results = $wpdb->get_results("SELECT * FROM $wplc_tblname_chats WHERE `id` = '$cid' LIMIT 1");
|
2385 |
-
if ($results) {
|
2386 |
-
foreach ($results as $result) {
|
2387 |
-
if (isset($result->rel)) {
|
2388 |
-
return $result->rel;
|
2389 |
-
} else {
|
2390 |
-
return $cid;
|
2391 |
-
}
|
2392 |
-
}
|
2393 |
-
} else {
|
2394 |
-
return $cid;
|
2395 |
-
}
|
2396 |
-
|
2397 |
-
}
|
2398 |
-
|
2399 |
-
/*
|
2400 |
-
* Returns total message count for a chat
|
2401 |
-
*/
|
2402 |
-
function wplc_return_message_count_by_cid($cid) {
|
2403 |
-
global $wpdb;
|
2404 |
-
global $wplc_tblname_msgs;
|
2405 |
-
|
2406 |
-
$sql = "SELECT `id` FROM $wplc_tblname_msgs WHERE `chat_sess_id` = '$cid'";
|
2407 |
-
$results = $wpdb->get_results($sql);
|
2408 |
-
|
2409 |
-
$message_count = 0;
|
2410 |
-
foreach ($results as $result) {
|
2411 |
-
$message_count ++;
|
2412 |
-
}
|
2413 |
-
|
2414 |
-
return $message_count;
|
2415 |
-
}
|
2416 |
-
|
2417 |
-
function wplc_all_avatars() {
|
2418 |
-
$users = get_users(array(
|
2419 |
-
'meta_key' => 'wplc_ma_agent',
|
2420 |
-
));
|
2421 |
-
$avatars = array();
|
2422 |
-
foreach ($users as $user) {
|
2423 |
-
$avatars[$user->data->ID] = wplc_get_avatar($user->data->ID);
|
2424 |
-
}
|
2425 |
-
return $avatars;
|
2426 |
-
}
|
2427 |
-
|
2428 |
-
function wplc_get_avatar($id) {
|
2429 |
-
$wplc_settings = get_option("WPLC_SETTINGS");
|
2430 |
-
$user = get_user_by( 'id', $id );
|
2431 |
-
|
2432 |
-
if (isset($wplc_settings['wplc_avatar_source']) && $wplc_settings['wplc_avatar_source'] == 'gravatar') {
|
2433 |
-
return '//www.gravatar.com/avatar/' . md5( strtolower( trim( $user->data->user_email ) ) );
|
2434 |
-
} elseif (isset($wplc_settings['wplc_avatar_source']) && $wplc_settings['wplc_avatar_source'] == 'wp_avatar') {
|
2435 |
-
if (function_exists('get_wp_user_avatar')) {
|
2436 |
-
return get_wp_user_avatar_src($id);
|
2437 |
-
} else {
|
2438 |
-
return '//www.gravatar.com/avatar/' . md5( strtolower( trim( $user->data->user_email ) ) );
|
2439 |
-
}
|
2440 |
-
} else {
|
2441 |
-
return '//www.gravatar.com/avatar/' . md5( strtolower( trim( $user->data->user_email ) ) );
|
2442 |
-
}
|
2443 |
}
|
1 |
+
<?php
|
2 |
+
$wplc_basic_plugin_url = WPLC_BASIC_PLUGIN_URL;
|
3 |
+
|
4 |
+
function wplc_log_user_on_page($name,$email,$session, $is_mobile = false) {
|
5 |
+
global $wpdb;
|
6 |
+
global $wplc_tblname_chats;
|
7 |
+
|
8 |
+
$wplc_settings = get_option('WPLC_SETTINGS');
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
if(isset($wplc_settings['wplc_record_ip_address']) && $wplc_settings['wplc_record_ip_address'] == 1){
|
13 |
+
|
14 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
|
15 |
+
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
16 |
+
} else {
|
17 |
+
$ip_address = $_SERVER['REMOTE_ADDR'];
|
18 |
+
}
|
19 |
+
|
20 |
+
$user_data = array(
|
21 |
+
'ip' => $ip_address,
|
22 |
+
'user_agent' => $_SERVER['HTTP_USER_AGENT']
|
23 |
+
);
|
24 |
+
} else {
|
25 |
+
$user_data = array(
|
26 |
+
'ip' => "",
|
27 |
+
'user_agent' => $_SERVER['HTTP_USER_AGENT']
|
28 |
+
);
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
/* user types
|
33 |
+
* 1 = new
|
34 |
+
* 2 = returning
|
35 |
+
* 3 = timed out
|
36 |
+
*/
|
37 |
+
|
38 |
+
$other = array(
|
39 |
+
"user_type" => 1
|
40 |
+
);
|
41 |
+
|
42 |
+
if($is_mobile){
|
43 |
+
$other['user_is_mobile'] = true;
|
44 |
+
} else {
|
45 |
+
$other['user_is_mobile'] = false;
|
46 |
+
}
|
47 |
+
|
48 |
+
$other = apply_filters("wplc_log_user_on_page_insert_other_data_filter", $other);
|
49 |
+
|
50 |
+
$wplc_chat_session_data = array(
|
51 |
+
'status' => '5',
|
52 |
+
'timestamp' => current_time('mysql'),
|
53 |
+
'name' => $name,
|
54 |
+
'email' => $email,
|
55 |
+
'session' => $session,
|
56 |
+
'ip' => maybe_serialize($user_data),
|
57 |
+
'url' => sanitize_text_field($_SERVER['HTTP_REFERER']),
|
58 |
+
'last_active_timestamp' => current_time('mysql'),
|
59 |
+
'other' => maybe_serialize($other),
|
60 |
+
);
|
61 |
+
|
62 |
+
$wplc_chat_session_data = apply_filters("wplc_log_user_on_page_insert_filter", $wplc_chat_session_data);
|
63 |
+
|
64 |
+
/* Omitted from inser call as this defaults to string
|
65 |
+
$wplc_chat_session_types = array(
|
66 |
+
'%s',
|
67 |
+
'%s',
|
68 |
+
'%s',
|
69 |
+
'%s',
|
70 |
+
'%s',
|
71 |
+
'%s',
|
72 |
+
'%s',
|
73 |
+
'%s',
|
74 |
+
'%s'
|
75 |
+
); */
|
76 |
+
|
77 |
+
|
78 |
+
$wpdb->insert($wplc_tblname_chats, $wplc_chat_session_data);
|
79 |
+
$lastid = $wpdb->insert_id;
|
80 |
+
|
81 |
+
do_action("wplc_log_user_on_page_after_hook", $lastid, $wplc_chat_session_data);
|
82 |
+
|
83 |
+
|
84 |
+
return $lastid;
|
85 |
+
|
86 |
+
}
|
87 |
+
function wplc_update_user_on_page($cid, $status = 5,$session) {
|
88 |
+
global $wpdb;
|
89 |
+
global $wplc_tblname_chats;
|
90 |
+
$wplc_settings = get_option('WPLC_SETTINGS');
|
91 |
+
|
92 |
+
if(isset($wplc_settings['wplc_record_ip_address']) && $wplc_settings['wplc_record_ip_address'] == 1){
|
93 |
+
|
94 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
|
95 |
+
$ip_address = sanitize_text_field($_SERVER['HTTP_X_FORWARDED_FOR']);
|
96 |
+
} else {
|
97 |
+
$ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']);
|
98 |
+
}
|
99 |
+
$user_data = array(
|
100 |
+
'ip' => $ip_address,
|
101 |
+
'user_agent' => sanitize_text_field($_SERVER['HTTP_USER_AGENT'])
|
102 |
+
);
|
103 |
+
} else {
|
104 |
+
$user_data = array(
|
105 |
+
'ip' => "",
|
106 |
+
'user_agent' => sanitize_text_field($_SERVER['HTTP_USER_AGENT'])
|
107 |
+
);
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
$query = $wpdb->update(
|
113 |
+
$wplc_tblname_chats,
|
114 |
+
array(
|
115 |
+
'url' => sanitize_text_field($_SERVER['HTTP_REFERER']),
|
116 |
+
'last_active_timestamp' => current_time('mysql'),
|
117 |
+
'ip' => maybe_serialize($user_data),
|
118 |
+
'status' => $status,
|
119 |
+
'session' => $session,
|
120 |
+
),
|
121 |
+
array('id' => $cid),
|
122 |
+
array(
|
123 |
+
'%s',
|
124 |
+
'%s',
|
125 |
+
'%s',
|
126 |
+
'%d',
|
127 |
+
'%s'
|
128 |
+
),
|
129 |
+
array('%d')
|
130 |
+
);
|
131 |
+
|
132 |
+
|
133 |
+
return $query;
|
134 |
+
|
135 |
+
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
function wplc_record_chat_msg($from, $cid, $msg, $rest_check = false, $aid = false, $other = false) {
|
140 |
+
global $wpdb;
|
141 |
+
global $wplc_tblname_msgs;
|
142 |
+
|
143 |
+
|
144 |
+
if( ! filter_var($cid, FILTER_VALIDATE_INT) ) {
|
145 |
+
|
146 |
+
/**
|
147 |
+
* We need to identify if this CID is a node CID, and if so, return the WP CID from the wplc_chat_msgs table
|
148 |
+
*/
|
149 |
+
$cid = wplc_return_chat_id_by_rel($cid);
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* check if this CID even exists, if not, create it
|
154 |
+
*
|
155 |
+
* If it doesnt exist, it most likely is an agent-to-agent chat that we now need to save.
|
156 |
+
*/
|
157 |
+
|
158 |
+
global $wplc_tblname_chats;
|
159 |
+
$results = $wpdb->get_results("SELECT * FROM $wplc_tblname_chats WHERE `rel` = '".$cid."' OR `id` = '".$cid."' LIMIT 1");
|
160 |
+
if (!$results) {
|
161 |
+
/* it doesnt exist, lets put it in the table */
|
162 |
+
|
163 |
+
$wpdb->insert(
|
164 |
+
$wplc_tblname_chats,
|
165 |
+
array(
|
166 |
+
'status' => 3,
|
167 |
+
'timestamp' => current_time('mysql'),
|
168 |
+
'name' => 'agent-to-agent chat',
|
169 |
+
'email' => 'none',
|
170 |
+
'session' => '1',
|
171 |
+
'ip' => '0',
|
172 |
+
'url' => '',
|
173 |
+
'last_active_timestamp' => current_time('mysql'),
|
174 |
+
'other' => '',
|
175 |
+
'rel' => $cid,
|
176 |
+
),
|
177 |
+
array(
|
178 |
+
'%s',
|
179 |
+
'%s',
|
180 |
+
'%s',
|
181 |
+
'%s',
|
182 |
+
'%s',
|
183 |
+
'%s',
|
184 |
+
'%s',
|
185 |
+
'%s',
|
186 |
+
'%s',
|
187 |
+
'%s'
|
188 |
+
)
|
189 |
+
);
|
190 |
+
|
191 |
+
|
192 |
+
$cid = $wpdb->insert_id;
|
193 |
+
}
|
194 |
+
|
195 |
+
|
196 |
+
if ($from == "2" && $rest_check == false) {
|
197 |
+
$wplc_current_user = get_current_user_id();
|
198 |
+
|
199 |
+
if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
|
200 |
+
/*
|
201 |
+
-- modified in in 6.0.04 --
|
202 |
+
|
203 |
+
if(current_user_can('wplc_ma_agent') || current_user_can('manage_options')){
|
204 |
+
*/ } else { return "security issue"; }
|
205 |
+
}
|
206 |
+
|
207 |
+
if ($from == "1") {
|
208 |
+
$fromname = wplc_return_chat_name(sanitize_text_field($cid));
|
209 |
+
if (empty($fromname)) { $fromname = 'Guest'; }
|
210 |
+
//$fromemail = wplc_return_chat_email($cid);
|
211 |
+
$orig = '2';
|
212 |
+
}
|
213 |
+
else {
|
214 |
+
$fromname = apply_filters("wplc_filter_admin_name","Admin");
|
215 |
+
|
216 |
+
//$fromemail = "SET email";
|
217 |
+
$orig = '1';
|
218 |
+
}
|
219 |
+
|
220 |
+
$msg_id = '';
|
221 |
+
|
222 |
+
if ($other !== false) {
|
223 |
+
if (!empty($other->msgID)) {
|
224 |
+
$msg_id = $other->msgID;
|
225 |
+
} else {
|
226 |
+
$msg_id = '';
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
|
231 |
+
$orig_msg = $msg;
|
232 |
+
|
233 |
+
$msg = apply_filters("wplc_filter_message_control",$msg);
|
234 |
+
|
235 |
+
if (!$aid) {
|
236 |
+
$wplc_current_user = get_current_user_id();
|
237 |
+
|
238 |
+
if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
|
239 |
+
$other_data = array('aid'=>$wplc_current_user);
|
240 |
+
} else {
|
241 |
+
$other_data = '';
|
242 |
+
}
|
243 |
+
} else {
|
244 |
+
if( get_user_meta( $aid, 'wplc_ma_agent', true ) ){
|
245 |
+
$other_data = array('aid'=>$aid);
|
246 |
+
} else {
|
247 |
+
$other_data = '';
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
|
252 |
+
|
253 |
+
|
254 |
+
|
255 |
+
$wpdb->insert(
|
256 |
+
$wplc_tblname_msgs,
|
257 |
+
array(
|
258 |
+
'chat_sess_id' => $cid,
|
259 |
+
'timestamp' => current_time('mysql'),
|
260 |
+
'msgfrom' => $fromname,
|
261 |
+
'msg' => $msg,
|
262 |
+
'status' => 0,
|
263 |
+
'originates' => $orig,
|
264 |
+
'other' => maybe_serialize( $other_data ),
|
265 |
+
'rel' => $msg_id
|
266 |
+
),
|
267 |
+
array(
|
268 |
+
'%s',
|
269 |
+
'%s',
|
270 |
+
'%s',
|
271 |
+
'%s',
|
272 |
+
'%d',
|
273 |
+
'%s',
|
274 |
+
'%s',
|
275 |
+
'%s'
|
276 |
+
)
|
277 |
+
);
|
278 |
+
|
279 |
+
$data = array(
|
280 |
+
'cid' => $cid,
|
281 |
+
'from' => $from,
|
282 |
+
'msg' => $orig_msg,
|
283 |
+
'orig' => $orig
|
284 |
+
);
|
285 |
+
do_action("wplc_hook_message_sent",$data);
|
286 |
+
|
287 |
+
wplc_update_active_timestamp(sanitize_text_field($cid));
|
288 |
+
|
289 |
+
|
290 |
+
return true;
|
291 |
+
|
292 |
+
}
|
293 |
+
|
294 |
+
function wplc_update_active_timestamp($cid) {
|
295 |
+
global $wpdb;
|
296 |
+
global $wplc_tblname_chats;
|
297 |
+
// $results = $wpdb->get_results(
|
298 |
+
// "
|
299 |
+
// UPDATE $wplc_tblname_chats
|
300 |
+
// SET `last_active_timestamp` = '".date("Y-m-d H:i:s")."'
|
301 |
+
// WHERE `id` = '$cid'
|
302 |
+
// LIMIT 1
|
303 |
+
// "
|
304 |
+
// );
|
305 |
+
$wpdb->update(
|
306 |
+
$wplc_tblname_chats,
|
307 |
+
array(
|
308 |
+
'last_active_timestamp' => current_time('mysql')
|
309 |
+
),
|
310 |
+
array('id' => $cid),
|
311 |
+
array('%s'),
|
312 |
+
array('%d')
|
313 |
+
);
|
314 |
+
|
315 |
+
//wplc_change_chat_status(sanitize_text_field($cid),3);
|
316 |
+
return true;
|
317 |
+
|
318 |
+
}
|
319 |
+
|
320 |
+
function wplc_return_chat_name($cid) {
|
321 |
+
global $wpdb;
|
322 |
+
global $wplc_tblname_chats;
|
323 |
+
|
324 |
+
$results = $wpdb->get_results(
|
325 |
+
"
|
326 |
+
SELECT *
|
327 |
+
FROM $wplc_tblname_chats
|
328 |
+
WHERE `id` = '$cid'
|
329 |
+
"
|
330 |
+
);
|
331 |
+
foreach ($results as $result) {
|
332 |
+
return $result->name;
|
333 |
+
}
|
334 |
+
|
335 |
+
}
|
336 |
+
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Find out if we are dealing with a NODE CID and convert it to the WP CID.
|
340 |
+
*
|
341 |
+
* If it cannot find a relative, then simply return the original CID parsed through.
|
342 |
+
*
|
343 |
+
* @param string|int $rel The CId to compare
|
344 |
+
* @return string|int The suggested CID
|
345 |
+
*/
|
346 |
+
function wplc_return_chat_id_by_rel($rel) {
|
347 |
+
global $wpdb;
|
348 |
+
global $wplc_tblname_chats;
|
349 |
+
|
350 |
+
$results = $wpdb->get_results("SELECT * FROM $wplc_tblname_chats WHERE `rel` = '$rel' LIMIT 1");
|
351 |
+
if ($results) {
|
352 |
+
foreach ($results as $result) {
|
353 |
+
if (isset($result->id)) {
|
354 |
+
return $result->id;
|
355 |
+
} else {
|
356 |
+
return $rel;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
} else {
|
360 |
+
return $rel;
|
361 |
+
}
|
362 |
+
|
363 |
+
}
|
364 |
+
function wplc_return_chat_email($cid) {
|
365 |
+
global $wpdb;
|
366 |
+
global $wplc_tblname_chats;
|
367 |
+
$results = $wpdb->get_results(
|
368 |
+
"
|
369 |
+
SELECT *
|
370 |
+
FROM $wplc_tblname_chats
|
371 |
+
WHERE `id` = '$cid'
|
372 |
+
"
|
373 |
+
);
|
374 |
+
foreach ($results as $result) {
|
375 |
+
return $result->email;
|
376 |
+
}
|
377 |
+
|
378 |
+
}
|
379 |
+
function wplc_list_chats() {
|
380 |
+
|
381 |
+
global $wpdb;
|
382 |
+
global $wplc_tblname_chats;
|
383 |
+
$status = 3;
|
384 |
+
$wplc_c = 0;
|
385 |
+
$results = $wpdb->get_results(
|
386 |
+
"
|
387 |
+
SELECT *
|
388 |
+
FROM $wplc_tblname_chats
|
389 |
+
WHERE `status` = 3 OR `status` = 2 OR `status` = 10
|
390 |
+
ORDER BY `timestamp` ASC
|
391 |
+
|
392 |
+
"
|
393 |
+
);
|
394 |
+
|
395 |
+
$table = "<div class='wplc_chats_container'>";
|
396 |
+
|
397 |
+
if (!$results) {
|
398 |
+
$table.= "<p>".__("No chat sessions available at the moment","wplivechat")."</p>";
|
399 |
+
} else {
|
400 |
+
$table .= "<h2>".__('Active Chats', 'wplivechat')."</h2>";
|
401 |
+
|
402 |
+
foreach ($results as $result) {
|
403 |
+
unset($trstyle);
|
404 |
+
unset($actions);
|
405 |
+
$wplc_c++;
|
406 |
+
|
407 |
+
|
408 |
+
global $wplc_basic_plugin_url;
|
409 |
+
$user_data = maybe_unserialize($result->ip);
|
410 |
+
$user_ip = $user_data['ip'];
|
411 |
+
$browser = wplc_return_browser_string($user_data['user_agent']);
|
412 |
+
$browser_image = wplc_return_browser_image($browser,"16");
|
413 |
+
|
414 |
+
if($user_ip == ""){
|
415 |
+
$user_ip = __('IP Address not recorded', 'wplivechat');
|
416 |
+
} else {
|
417 |
+
$user_ip = "<a href='http://www.ip-adress.com/ip_tracer/" . $user_ip . "' title='".__('Whois for' ,'wplivechat')." ".$user_ip."' target='_BLANK'>".$user_ip."</a>";
|
418 |
+
}
|
419 |
+
|
420 |
+
if ($result->status == 2) {
|
421 |
+
$url = admin_url( 'admin.php?page=wplivechat-menu&action=ac&cid='.$result->id);
|
422 |
+
$actions = "<a href=\"".$url."\" class=\"wplc_open_chat button button-primary\" window-title=\"WP_Live_Chat_".$result->id."\">".__("Accept Chat","wplivechat")."</a>";
|
423 |
+
$trstyle = "style='background-color:#FFFBE4; height:30px;'";
|
424 |
+
$icon = "<i class=\"fa fa-phone wplc_pending\" title='".__('Incoming Chat', 'wplivechat')."' alt='".__('Incoming Chat', 'wplivechat')."'></i><div class='wplc_icon_message'>".__('You have an incoming chat.', 'wplivechat')."</div>";
|
425 |
+
}
|
426 |
+
if ($result->status == 3) {
|
427 |
+
$url = admin_url( 'admin.php?page=wplivechat-menu&action=ac&cid='.$result->id);
|
428 |
+
$actions = "<a href=\"".$url."\" class=\"wplc_open_chat button button-primary\" window-title=\"WP_Live_Chat_".$result->id."\">".__("Open Chat Window","wplivechat")."</a>";
|
429 |
+
$trstyle = "style='background-color:#F7FCFE; height:30px;'";
|
430 |
+
$icon = "<i class=\"fa fa-check-circle wplc_active\" title='".__('Chat Active', 'wplivechat')."' alt='".__('Chat Active', 'wplivechat')."'></i><div class='wplc_icon_message'>".__('This chat is active', 'wplivechat')."</div>";
|
431 |
+
}
|
432 |
+
|
433 |
+
|
434 |
+
/* if ($wplc_c>1) { $actions = wplc_get_msg(); } */
|
435 |
+
|
436 |
+
$trstyle = "";
|
437 |
+
|
438 |
+
$table .= "
|
439 |
+
<div class='wplc_single_chat' id='record_".$result->id."' $trstyle>
|
440 |
+
<div class='wplc_chat_section section_1'>
|
441 |
+
<div class='wplc_user_image' id='chat_image_".$result->id."'>
|
442 |
+
<img src=\"//www.gravatar.com/avatar/".md5($result->email)."?s=60&d=mm\" />
|
443 |
+
</div>
|
444 |
+
<div class='wplc_user_meta_data'>
|
445 |
+
<div class='wplc_user_name' id='chat_name_".$result->id."'>
|
446 |
+
<h3>".$result->name.$icon."</h3>
|
447 |
+
<a href='mailto:".$result->email."' target='_BLANK'>".$result->email."</a>
|
448 |
+
</div>
|
449 |
+
</div>
|
450 |
+
</div>
|
451 |
+
<div class='wplc_chat_section section_2'>
|
452 |
+
<div class='admin_visitor_advanced_info'>
|
453 |
+
<strong>" . __("Site Info", "wplivechat") . "</strong>
|
454 |
+
<hr />
|
455 |
+
<span class='part1'>" . __("Chat initiated on:", "wplivechat") . "</span> <span class='part2'> <a href='".esc_url($result->url)."' target='_BLANK'>" . esc_url($result->url) . "</a></span>
|
456 |
+
</div>
|
457 |
+
|
458 |
+
<div class='admin_visitor_advanced_info'>
|
459 |
+
<strong>" . __("Advanced Info", "wplivechat") . "</strong>
|
460 |
+
<hr />
|
461 |
+
<span class='part1'>" . __("Browser:", "wplivechat") . "</span><span class='part2'> $browser <img src='" . $wplc_basic_plugin_url . "/images/$browser_image' alt='$browser' title='$browser' /><br />
|
462 |
+
<span class='part1'>" . __("IP Address:", "wplivechat") . "</span><span class='part2'> ".$user_ip."
|
463 |
+
</div>
|
464 |
+
</div>
|
465 |
+
<div class='wplc_chat_section section_3'>
|
466 |
+
<div class='wplc_agent_actions'>
|
467 |
+
$actions
|
468 |
+
</div>
|
469 |
+
</div>
|
470 |
+
</div>
|
471 |
+
";
|
472 |
+
}
|
473 |
+
}
|
474 |
+
$table .= "</div>";
|
475 |
+
|
476 |
+
return $table;
|
477 |
+
}
|
478 |
+
|
479 |
+
function wplc_time_ago($time_ago)
|
480 |
+
{
|
481 |
+
$time_ago = strtotime($time_ago);
|
482 |
+
$cur_time = current_time('timestamp');
|
483 |
+
$time_elapsed = $cur_time - $time_ago;
|
484 |
+
$seconds = $time_elapsed ;
|
485 |
+
$minutes = round($time_elapsed / 60 );
|
486 |
+
$hours = round($time_elapsed / 3600);
|
487 |
+
$days = round($time_elapsed / 86400 );
|
488 |
+
$weeks = round($time_elapsed / 604800);
|
489 |
+
$months = round($time_elapsed / 2600640 );
|
490 |
+
$years = round($time_elapsed / 31207680 );
|
491 |
+
// Seconds
|
492 |
+
if($seconds <= 60){
|
493 |
+
return "0 min";
|
494 |
+
}
|
495 |
+
//Minutes
|
496 |
+
else if($minutes <=60){
|
497 |
+
if($minutes==1){
|
498 |
+
return "1 min";
|
499 |
+
}
|
500 |
+
else{
|
501 |
+
return "$minutes min";
|
502 |
+
}
|
503 |
+
}
|
504 |
+
//Hours
|
505 |
+
else if($hours <=24){
|
506 |
+
if($hours==1){
|
507 |
+
return "1 hr";
|
508 |
+
}else{
|
509 |
+
return "$hours hrs";
|
510 |
+
}
|
511 |
+
}
|
512 |
+
//Days
|
513 |
+
else if($days <= 7){
|
514 |
+
if($days==1){
|
515 |
+
return "1 day";
|
516 |
+
}else{
|
517 |
+
return "$days days";
|
518 |
+
}
|
519 |
+
}
|
520 |
+
//Weeks
|
521 |
+
else if($weeks <= 4.3){
|
522 |
+
if($weeks==1){
|
523 |
+
return "1 week";
|
524 |
+
}else{
|
525 |
+
return "$weeks weeks";
|
526 |
+
}
|
527 |
+
}
|
528 |
+
//Months
|
529 |
+
else if($months <=12){
|
530 |
+
if($months==1){
|
531 |
+
return "1 month";
|
532 |
+
}else{
|
533 |
+
return "$months months";
|
534 |
+
}
|
535 |
+
}
|
536 |
+
//Years
|
537 |
+
else{
|
538 |
+
if($years==1){
|
539 |
+
return "1 year";
|
540 |
+
}else{
|
541 |
+
return "$years years";
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
|
546 |
+
add_filter("wplc_filter_list_chats_actions","wplc_filter_control_list_chats_actions",15,3);
|
547 |
+
/**
|
548 |
+
* Only allow agents access
|
549 |
+
* @return void
|
550 |
+
* @since 6.0.00
|
551 |
+
* @version 6.0.04 Updated to ensure those with the correct access can access this function
|
552 |
+
* @author Nick Duncan <nick@codecabin.co.za>
|
553 |
+
*/
|
554 |
+
function wplc_filter_control_list_chats_actions($actions,$result,$post_data) {
|
555 |
+
$aid = apply_filters("wplc_filter_aid_in_action","");
|
556 |
+
|
557 |
+
$wplc_current_user = get_current_user_id();
|
558 |
+
|
559 |
+
if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
|
560 |
+
|
561 |
+
if (intval($result->status) == 2) {
|
562 |
+
$url_params = "&action=ac&cid=".$result->id.$aid;
|
563 |
+
$url = admin_url( 'admin.php?page=wplivechat-menu'.$url_params);
|
564 |
+
$actions = "<a href=\"".$url."\" class=\"wplc_open_chat button button-primary\" window-title=\"WP_Live_Chat_".$result->id."\">". apply_filters("wplc_accept_chat_button_filter", __("Accept Chat","wplivechat"), $result->id)."</a>";
|
565 |
+
}
|
566 |
+
else if (intval($result->status) == 3 || intval($result->status) == 10) {
|
567 |
+
$url_params = "&action=ac&cid=".$result->id.$aid;
|
568 |
+
$url = admin_url( 'admin.php?page=wplivechat-menu'.$url_params);
|
569 |
+
if ( ! function_exists("wplc_pro_version_control") || !isset( $result->agent_id ) || $wplc_current_user == $result->agent_id ) { //Added backwards compat checks
|
570 |
+
$actions = "<a href=\"".$url."\" class=\"wplc_open_chat button button-primary\" window-title=\"WP_Live_Chat_".$result->id."\">".__("Open Chat","wplivechat")."</a>";
|
571 |
+
} else {
|
572 |
+
$actions = "<span class=\"wplc-chat-in-progress\">" . __( "In progress with another agent", "wplivechat" ) . "</span>";
|
573 |
+
}
|
574 |
+
}
|
575 |
+
else if (intval($result->status) == 2) {
|
576 |
+
$url_params = "&action=ac&cid=".$result->id.$aid;
|
577 |
+
$url = admin_url( 'admin.php?page=wplivechat-menu'.$url_params);
|
578 |
+
$actions = "<a href=\"".$url."\" class=\"wplc_open_chat button button-primary\" window-title=\"WP_Live_Chat_".$result->id."\">".__("Accept Chat","wplivechat")."</a>";
|
579 |
+
}
|
580 |
+
else if (intval($result->status) == 12 ) {
|
581 |
+
$url_params = "&action=ac&cid=".$result->id.$aid;
|
582 |
+
$url = admin_url( 'admin.php?page=wplivechat-menu'.$url_params);
|
583 |
+
$actions = "<a href=\"".$url."\" class=\"wplc_open_chat button button-primary\" window-title=\"WP_Live_Chat_".$result->id."\">".__("Open Chat","wplivechat")."</a>";
|
584 |
+
}
|
585 |
+
} else {
|
586 |
+
$actions = "<a href='#'>".__( 'Only chat agents can accept chats', 'wplivechat' )."</a>";
|
587 |
+
}
|
588 |
+
return $actions;
|
589 |
+
}
|
590 |
+
|
591 |
+
function wplc_list_chats_new($post_data) {
|
592 |
+
|
593 |
+
global $wpdb;
|
594 |
+
global $wplc_tblname_chats;
|
595 |
+
|
596 |
+
$data_array = array();
|
597 |
+
$id_list = array();
|
598 |
+
|
599 |
+
$status = 3;
|
600 |
+
$wplc_c = 0;
|
601 |
+
|
602 |
+
// Retrieve count of users in same department or in no department
|
603 |
+
$user_id = get_current_user_id();
|
604 |
+
$user_department = get_user_meta($user_id ,"wplc_user_department", true);
|
605 |
+
|
606 |
+
$wplc_chat_count_sql = "SELECT COUNT(*) FROM $wplc_tblname_chats WHERE status IN (3,2,10,5,8,9,12)";
|
607 |
+
if($user_department > 0)
|
608 |
+
$wplc_chat_count_sql .= " AND (department_id=0 OR department_id=$user_department)";
|
609 |
+
$data_array['visitor_count'] = $wpdb->get_var($wplc_chat_count_sql);
|
610 |
+
|
611 |
+
// Retrieve data
|
612 |
+
$wplc_chat_sql = "SELECT * FROM $wplc_tblname_chats WHERE (`status` = 3 OR `status` = 2 OR `status` = 10 OR `status` = 5 or `status` = 8 or `status` = 9 or `status` = 12)";
|
613 |
+
$wplc_chat_sql .= apply_filters("wplc_alter_chat_list_sql_before_sorting", "");
|
614 |
+
|
615 |
+
$wplc_chat_sql .= " ORDER BY `timestamp` ASC";
|
616 |
+
|
617 |
+
$results = $wpdb->get_results($wplc_chat_sql);
|
618 |
+
|
619 |
+
|
620 |
+
if($results) {
|
621 |
+
|
622 |
+
|
623 |
+
foreach ($results as $result) {
|
624 |
+
unset($trstyle);
|
625 |
+
unset($actions);
|
626 |
+
|
627 |
+
|
628 |
+
|
629 |
+
|
630 |
+
global $wplc_basic_plugin_url;
|
631 |
+
$user_data = maybe_unserialize($result->ip);
|
632 |
+
$user_ip = $user_data['ip'];
|
633 |
+
$browser = wplc_return_browser_string($user_data['user_agent']);
|
634 |
+
$browser_image = wplc_return_browser_image($browser,"16");
|
635 |
+
|
636 |
+
if($user_ip == ""){
|
637 |
+
$user_ip = __('IP Address not recorded', 'wplivechat');
|
638 |
+
} else {
|
639 |
+
$user_ip = "<a href='http://www.ip-adress.com/ip_tracer/" . $user_ip . "' title='".__('Whois for' ,'wplivechat')." ".$user_ip."' target='_BLANK'>".$user_ip."</a>";
|
640 |
+
}
|
641 |
+
|
642 |
+
|
643 |
+
$actions = apply_filters("wplc_filter_list_chats_actions","",$result,$post_data);
|
644 |
+
|
645 |
+
|
646 |
+
$other_data = maybe_unserialize($result->other);
|
647 |
+
|
648 |
+
|
649 |
+
|
650 |
+
$trstyle = "";
|
651 |
+
|
652 |
+
$id_list[intval($result->id)] = true;
|
653 |
+
|
654 |
+
$data_array[$result->id]['name'] = $result->name;
|
655 |
+
$data_array[$result->id]['email'] = $result->email;
|
656 |
+
|
657 |
+
$data_array[$result->id]['status'] = $result->status;
|
658 |
+
$data_array[$result->id]['action'] = $actions;
|
659 |
+
$data_array[$result->id]['timestamp'] = wplc_time_ago($result->timestamp);
|
660 |
+
|
661 |
+
if ((current_time('timestamp') - strtotime($result->timestamp)) < 3600) {
|
662 |
+
$data_array[$result->id]['type'] = __("New","wplivechat");
|
663 |
+
} else {
|
664 |
+
$data_array[$result->id]['type'] = __("Returning","wplivechat");
|
665 |
+
}
|
666 |
+
|
667 |
+
$data_array[$result->id]['image'] = "<img src=\"//www.gravatar.com/avatar/".md5($result->email)."?s=30&d=mm\" class='wplc-user-message-avatar' />";
|
668 |
+
$data_array[$result->id]['data']['browsing'] = $result->url;
|
669 |
+
$path = parse_url($result->url, PHP_URL_PATH);
|
670 |
+
|
671 |
+
if (strlen($path) > 20) {
|
672 |
+
$data_array[$result->id]['data']['browsing_nice_url'] = substr($path,0,20).'...';
|
673 |
+
} else {
|
674 |
+
$data_array[$result->id]['data']['browsing_nice_url'] = $path;
|
675 |
+
}
|
676 |
+
|
677 |
+
$data_array[$result->id]['data']['browser'] = "<img src='" . $wplc_basic_plugin_url . "/images/$browser_image' alt='$browser' title='$browser' /> ";
|
678 |
+
$data_array[$result->id]['data']['ip'] = $user_ip;
|
679 |
+
$data_array[$result->id]['other'] = $other_data;
|
680 |
+
}
|
681 |
+
|
682 |
+
$data_array['ids'] = $id_list;
|
683 |
+
}
|
684 |
+
|
685 |
+
return json_encode($data_array);
|
686 |
+
}
|
687 |
+
|
688 |
+
|
689 |
+
|
690 |
+
function wplc_return_user_chat_messages($cid,$wplc_settings = false,$cdata = false) {
|
691 |
+
global $wpdb;
|
692 |
+
global $wplc_tblname_msgs;
|
693 |
+
|
694 |
+
if (!$wplc_settings) {
|
695 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
696 |
+
}
|
697 |
+
|
698 |
+
if(isset($wplc_settings['wplc_display_name']) && $wplc_settings['wplc_display_name'] == 1){ $display_name = 1; } else { $display_name = 0; }
|
699 |
+
|
700 |
+
$sql = "SELECT * FROM $wplc_tblname_msgs WHERE `chat_sess_id` = '$cid' AND `status` = '0' AND (`originates` = '1' OR `originates` = '0') ORDER BY `timestamp` ASC";
|
701 |
+
$results = $wpdb->get_results($sql);
|
702 |
+
if (!$cdata) {
|
703 |
+
$cdata = wplc_get_chat_data($cid,__LINE__);
|
704 |
+
}
|
705 |
+
|
706 |
+
|
707 |
+
$msg_hist = array();
|
708 |
+
foreach ($results as $result) {
|
709 |
+
$system_notification = false;
|
710 |
+
|
711 |
+
$id = $result->id;
|
712 |
+
$from = $result->msgfrom;
|
713 |
+
|
714 |
+
|
715 |
+
$msg = $result->msg;
|
716 |
+
|
717 |
+
if ( isset( $result->other ) ) { $other_data = maybe_unserialize( $result->other ); } else { $other_data = array(); }
|
718 |
+
if ($other_data == '') { $other_data = array(); }
|
719 |
+
|
720 |
+
$timestamp = strtotime( $result->timestamp );
|
721 |
+
$other_data['datetime'] = $timestamp;
|
722 |
+
|
723 |
+
//
|
724 |
+
if($result->originates == 1){
|
725 |
+
/* removed in 7.1.00
|
726 |
+
$class = "wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4";
|
727 |
+
if(function_exists("wplc_pro_get_admin_picture")){
|
728 |
+
$src = wplc_pro_get_admin_picture();
|
729 |
+
if($src){
|
730 |
+
$image = "<img src=".$src." width='20px' id='wp-live-chat-2-img'/>";
|
731 |
+
} else {
|
732 |
+
$image = "";
|
733 |
+
}
|
734 |
+
} else {
|
735 |
+
$other = maybe_unserialize($cdata->other);
|
736 |
+
if (isset($other['aid'])) {
|
737 |
+
|
738 |
+
|
739 |
+
$user_info = get_userdata(intval($other['aid']));
|
740 |
+
|
741 |
+
$image = "<img src='//www.gravatar.com/avatar/".md5($user_info->user_email)."?s=30' class='wplc-admin-message-avatar' />";
|
742 |
+
} else {
|
743 |
+
|
744 |
+
|
745 |
+
$image = "";
|
746 |
+
if(1 == 1) {
|
747 |
+
|
748 |
+
} else {
|
749 |
+
|
750 |
+
$image = "";
|
751 |
+
}
|
752 |
+
}
|
753 |
+
|
754 |
+
}
|
755 |
+
|
756 |
+
$from = apply_filters("wplc_filter_admin_name",$from, $cid);
|
757 |
+
*/
|
758 |
+
|
759 |
+
}
|
760 |
+
else if (intval($result->originates) == 0) {
|
761 |
+
/*
|
762 |
+
system notifications
|
763 |
+
from version 7
|
764 |
+
*/
|
765 |
+
$system_notification = true;
|
766 |
+
|
767 |
+
}
|
768 |
+
else {
|
769 |
+
|
770 |
+
/*
|
771 |
+
removed in 7.1.00
|
772 |
+
$class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
|
773 |
+
|
774 |
+
if(isset($_COOKIE['wplc_email']) && $_COOKIE['wplc_email'] != ""){ $wplc_user_gravatar = md5(strtolower(trim(sanitize_text_field($_COOKIE['wplc_email'])))); } else { $wplc_user_gravatar = ""; }
|
775 |
+
|
776 |
+
if($wplc_user_gravatar != ""){
|
777 |
+
$image = "<img src='//www.gravatar.com/avatar/$wplc_user_gravatar?s=30' class='wplc-user-message-avatar' />";
|
778 |
+
} else {
|
779 |
+
$image = "";
|
780 |
+
}
|
781 |
+
*/
|
782 |
+
}
|
783 |
+
|
784 |
+
if (!$system_notification) {
|
785 |
+
/* this is a normal message */
|
786 |
+
if(function_exists('wplc_encrypt_decrypt_msg')){
|
787 |
+
$msg = wplc_encrypt_decrypt_msg($msg);
|
788 |
+
}
|
789 |
+
|
790 |
+
$msg_array = maybe_unserialize( $msg );
|
791 |
+
|
792 |
+
if( is_array( $msg_array ) ){
|
793 |
+
$msg = $msg_array['m'];
|
794 |
+
}
|
795 |
+
|
796 |
+
$msg = stripslashes($msg);
|
797 |
+
|
798 |
+
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
799 |
+
|
800 |
+
$msg = stripslashes($msg);
|
801 |
+
|
802 |
+
$msg_hist[$id]['msg'] = $msg;
|
803 |
+
$msg_hist[$id]['originates'] = intval($result->originates);
|
804 |
+
$msg_hist[$id]['other'] = $other_data;
|
805 |
+
|
806 |
+
/*
|
807 |
+
removed this in 7.1.00 as the JS now handles this
|
808 |
+
if($display_name){
|
809 |
+
$msg_hist[$id]['msg'] = "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$image <strong>$from </strong> $msg</span><br /><div class='wplc-clear-float-message'></div>";
|
810 |
+
} else {
|
811 |
+
$msg_hist[$id]['msg'] = "<span class='wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4'>$msg</span><div class='wplc-clear-float-message'></div>";
|
812 |
+
}*/
|
813 |
+
} else {
|
814 |
+
/* add the system notification to the list */
|
815 |
+
if ( isset( $msg_hist[$id] ) ) { $msg_hist[$id] = array(); }
|
816 |
+
|
817 |
+
$msg_hist[$id]['msg'] = $msg;
|
818 |
+
$msg_hist[$id]['other'] = $other_data;
|
819 |
+
$msg_hist[$id]['originates'] = intval($result->originates);
|
820 |
+
}
|
821 |
+
|
822 |
+
|
823 |
+
|
824 |
+
|
825 |
+
}
|
826 |
+
|
827 |
+
return $msg_hist;
|
828 |
+
|
829 |
+
|
830 |
+
}
|
831 |
+
|
832 |
+
|
833 |
+
|
834 |
+
|
835 |
+
|
836 |
+
function wplc_return_no_answer_string($cid) {
|
837 |
+
|
838 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
839 |
+
if (isset($wplc_settings['wplc_user_no_answer'])) {
|
840 |
+
$string = stripslashes($wplc_settings['wplc_user_no_answer']);
|
841 |
+
} else {
|
842 |
+
$string = __("No agent was able to answer your chat request. Please try again.","wplivechat");
|
843 |
+
}
|
844 |
+
$string = apply_filters("wplc_filter_no_answer_string",$string,$cid);
|
845 |
+
return "<span class='wplc_system_notification wplc_no_answer wplc-color-4'><center>".$string."</center></span>";
|
846 |
+
}
|
847 |
+
add_filter("wplc_filter_no_answer_string","wplc_filter_control_no_answer_string",10,2);
|
848 |
+
|
849 |
+
/**
|
850 |
+
* Add the "retry chat" button when an agent hasnt answered
|
851 |
+
* @param string $string Original "No Answer" string
|
852 |
+
* @param intval $cid Chat ID
|
853 |
+
* @return string
|
854 |
+
*/
|
855 |
+
function wplc_filter_control_no_answer_string($string,$cid) {
|
856 |
+
$string = $string. " <br /><button class='wplc_retry_chat wplc-color-bg-1 wplc-color-2' cid='".$cid."'>".__("Request new chat","wplivechat")."</button>";
|
857 |
+
return $string;
|
858 |
+
}
|
859 |
+
|
860 |
+
|
861 |
+
function wplc_change_chat_status($id,$status,$aid = 0) {
|
862 |
+
global $wpdb;
|
863 |
+
global $wplc_tblname_chats;
|
864 |
+
|
865 |
+
if ($aid > 0) {
|
866 |
+
/* only run when accepting a chat */
|
867 |
+
$results = $wpdb->get_results("SELECT * FROM ".$wplc_tblname_chats." WHERE `id` = '".$id."' LIMIT 1");
|
868 |
+
foreach ($results as $result) {
|
869 |
+
$other = maybe_unserialize($result->other);
|
870 |
+
if (isset($other['aid']) && $other['aid'] > 0) {
|
871 |
+
/* we have recorded this already */
|
872 |
+
|
873 |
+
} else {
|
874 |
+
/* first time answering the chat! */
|
875 |
+
|
876 |
+
|
877 |
+
/* send welcome note */
|
878 |
+
/*
|
879 |
+
removed in version 7. added "chat notification events" instead, i.e. Agent has joined the chat.
|
880 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
881 |
+
$wplc_welcome = __('Welcome. How may I help you?', 'wplivechat');
|
882 |
+
if(isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1){ $wplc_using_locale = true; } else { $wplc_using_locale = false; }
|
883 |
+
if (!isset($wplc_settings['wplc_user_welcome_chat']) || $wplc_settings['wplc_user_welcome_chat'] == "") { $wplc_settings['wplc_user_welcome_chat'] = $wplc_welcome; }
|
884 |
+
$text2 = ($wplc_using_locale ? $wplc_welcome : stripslashes($wplc_settings['wplc_user_welcome_chat']));
|
885 |
+
|
886 |
+
$chat_id = sanitize_text_field($id);
|
887 |
+
$chat_msg = sanitize_text_field($text2);
|
888 |
+
$wplc_rec_msg = wplc_record_chat_msg("2",$chat_id,$chat_msg);
|
889 |
+
|
890 |
+
*/
|
891 |
+
|
892 |
+
|
893 |
+
}
|
894 |
+
|
895 |
+
$other['aid'] = $aid;
|
896 |
+
}
|
897 |
+
}
|
898 |
+
|
899 |
+
|
900 |
+
|
901 |
+
|
902 |
+
if ($aid > 0) {
|
903 |
+
$wpdb->update(
|
904 |
+
$wplc_tblname_chats,
|
905 |
+
array(
|
906 |
+
'status' => $status,
|
907 |
+
'other' => maybe_serialize($other),
|
908 |
+
'agent_id' => $aid
|
909 |
+
),
|
910 |
+
array('id' => $id),
|
911 |
+
array(
|
912 |
+
'%d',
|
913 |
+
'%s',
|
914 |
+
'%d'
|
915 |
+
),
|
916 |
+
array('%d')
|
917 |
+
);
|
918 |
+
} else {
|
919 |
+
$wpdb->update(
|
920 |
+
$wplc_tblname_chats,
|
921 |
+
array(
|
922 |
+
'status' => $status
|
923 |
+
),
|
924 |
+
array('id' => $id),
|
925 |
+
array('%d'),
|
926 |
+
array('%d')
|
927 |
+
);
|
928 |
+
}
|
929 |
+
|
930 |
+
do_action("wplc_change_chat_status_hook", $id, $status);
|
931 |
+
|
932 |
+
return true;
|
933 |
+
|
934 |
+
}
|
935 |
+
|
936 |
+
//come back here
|
937 |
+
function wplc_return_chat_messages($cid, $transcript = false, $html = true, $wplc_settings = false, $cdata = false, $display = 'string', $only_read_message = false) {
|
938 |
+
global $wpdb;
|
939 |
+
global $wplc_tblname_msgs;
|
940 |
+
|
941 |
+
|
942 |
+
if (!$wplc_settings) {
|
943 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
944 |
+
}
|
945 |
+
|
946 |
+
if(isset($wplc_settings['wplc_display_name']) && $wplc_settings['wplc_display_name'] == 1){ $display_name = 1; } else { $display_name = 0; }
|
947 |
+
|
948 |
+
$results = wplc_get_chat_messages($cid, $only_read_message, $wplc_settings);
|
949 |
+
if (!$results) { return; }
|
950 |
+
|
951 |
+
if (!$cdata) {
|
952 |
+
$cdata = wplc_get_chat_data($cid,__LINE__);
|
953 |
+
}
|
954 |
+
$msg_array = array();
|
955 |
+
$msg_hist = "";
|
956 |
+
$previous_time = "";
|
957 |
+
$previous_timestamp = 0;
|
958 |
+
foreach ($results as $result) {
|
959 |
+
$display_notification = false;
|
960 |
+
$system_notification = false;
|
961 |
+
|
962 |
+
$from = $result->msgfrom;
|
963 |
+
|
964 |
+
|
965 |
+
/* added a control here to see if we should use the NODE ID instead of the SQL ID */
|
966 |
+
if (empty($result->rel)) {
|
967 |
+
$id = $result->id;
|
968 |
+
} else {
|
969 |
+
$id = $result->rel;
|
970 |
+
}
|
971 |
+
$msg = $result->msg;
|
972 |
+
|
973 |
+
|
974 |
+
if ( isset( $result->other ) ) { $other_data = maybe_unserialize( $result->other ); } else { $other_data = array(); }
|
975 |
+
if ($other_data == '') { $other_data = array(); }
|
976 |
+
|
977 |
+
$timestamp = strtotime( $result->timestamp );
|
978 |
+
$other_data['datetime'] = $timestamp;
|
979 |
+
$other_data['datetimeUTC'] = strtotime( get_gmt_from_date( $result->timestamp ) );
|
980 |
+
$nice_time = date("d M Y H:i:s",$timestamp);
|
981 |
+
|
982 |
+
|
983 |
+
$agent_from = false;
|
984 |
+
|
985 |
+
$image = "";
|
986 |
+
if($result->originates == 1){
|
987 |
+
|
988 |
+
$agent_from = 'Agent';
|
989 |
+
|
990 |
+
} else if ($result->originates == 2){
|
991 |
+
|
992 |
+
|
993 |
+
} else if ($result->originates == 0 || $result->originates == 3) {
|
994 |
+
|
995 |
+
|
996 |
+
|
997 |
+
$system_notification = true;
|
998 |
+
$cuid = get_current_user_id();
|
999 |
+
$is_agent = get_user_meta(esc_html( $cuid ), 'wplc_ma_agent', true);
|
1000 |
+
if ($is_agent && $result->originates == 3 ) {
|
1001 |
+
/* this user is an agent and the notification is meant for an agent, therefore display it */
|
1002 |
+
$display_notification = true;
|
1003 |
+
|
1004 |
+
/* check if this came from the front end.. if it did, then dont display it (if this code is removed, all notifications will be displayed to agents who are logged in and chatting with themselves during testing, which may cause confusion) */
|
1005 |
+
if (isset($_POST) && isset($_POST['action']) && sanitize_text_field( $_POST['action'] ) == "wplc_call_to_server_visitor") {
|
1006 |
+
$display_notification = false;
|
1007 |
+
}
|
1008 |
+
}
|
1009 |
+
else if (!$is_agent && $result->originates == 0) {
|
1010 |
+
/* this user is a not an agent and the notification is meant for a users, therefore display it */
|
1011 |
+
$display_notification = true;
|
1012 |
+
} else {
|
1013 |
+
/* this notification is not intended for this user */
|
1014 |
+
$display_notification = false;
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
if (!$system_notification) {
|
1019 |
+
|
1020 |
+
if(function_exists('wplc_encrypt_decrypt_msg')){
|
1021 |
+
$msg = wplc_encrypt_decrypt_msg($msg);
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
1025 |
+
|
1026 |
+
if( is_serialized( $msg ) ){
|
1027 |
+
$msg_array = maybe_unserialize( $msg );
|
1028 |
+
|
1029 |
+
if( is_array( $msg_array ) ){
|
1030 |
+
$msg = $msg_array['m'];
|
1031 |
+
} else {
|
1032 |
+
$msg = $msg;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
$msg = stripslashes($msg);
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
if ( isset( $result->afrom ) && intval( $result->afrom ) > 0 ) {
|
1039 |
+
$msg_array[$id]['afrom'] = intval( $result->afrom ); $other_data['aid'] = intval( $result->afrom );
|
1040 |
+
|
1041 |
+
}
|
1042 |
+
if ( isset( $result->ato ) && intval( $result->ato ) > 0 ) { $msg_array[$id]['ato'] = intval( $result->ato ); }
|
1043 |
+
|
1044 |
+
|
1045 |
+
/* use the new "other" array to get the AID and agent name */
|
1046 |
+
if ( $result->originates == '1' && isset( $result->other ) ){
|
1047 |
+
$other_data = maybe_unserialize( $result->other );
|
1048 |
+
if ( isset( $other_data['aid'] ) ) {
|
1049 |
+
$user_info = get_userdata( intval( $other_data['aid'] ) );
|
1050 |
+
$agent_from = $user_info->display_name;
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/* get the name of the USER if there is one */
|
1056 |
+
if ( $result->originates == '2' && isset( $result->msgfrom ) ) {
|
1057 |
+
$user_from = $result->msgfrom;
|
1058 |
+
} else {
|
1059 |
+
$user_from = 'User';
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
|
1063 |
+
$msg_array[$id]['msg'] = $msg;
|
1064 |
+
|
1065 |
+
if ($agent_from !== false) {
|
1066 |
+
$msg_hist .= $agent_from . ": " . $msg . "<br />";
|
1067 |
+
} else {
|
1068 |
+
$msg_hist .= $user_from . ": " . $msg . "<br />";
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
|
1072 |
+
$msg_array[$id]['originates'] = $result->originates;
|
1073 |
+
$msg_array[$id]['other'] = $other_data;
|
1074 |
+
|
1075 |
+
|
1076 |
+
} else {
|
1077 |
+
/* this is a system notification */
|
1078 |
+
if ($display_notification) {
|
1079 |
+
$str = "<span class='chat_time wplc-color-4'>".$nice_time."</span> <span class='wplc_system_notification wplc-color-4'>".$msg."</span>";
|
1080 |
+
|
1081 |
+
if ( !isset( $msg_array[$id] ) ) { $msg_array[$id] = array(); }
|
1082 |
+
$msg_array[$id]['msg'] = $str;
|
1083 |
+
$msg_array[$id]['other'] = $other_data;
|
1084 |
+
$msg_array[$id]['originates'] = $result->originates;
|
1085 |
+
|
1086 |
+
$msg_hist .= $str;
|
1087 |
+
}
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
if ($display == 'string') { return $msg_hist; } else { return $msg_array; }
|
1093 |
+
|
1094 |
+
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Mark a message as 'read'
|
1099 |
+
*
|
1100 |
+
* Sets the 'status' of the message to 1 in the message table
|
1101 |
+
*
|
1102 |
+
* @param [int] $mid Message ID - Unique
|
1103 |
+
* @return bool
|
1104 |
+
*/
|
1105 |
+
function wplc_mark_message_as_read( $mid ) {
|
1106 |
+
global $wpdb;
|
1107 |
+
global $wplc_tblname_msgs;
|
1108 |
+
|
1109 |
+
$wpdb->update(
|
1110 |
+
$wplc_tblname_msgs,
|
1111 |
+
array(
|
1112 |
+
'status' => 1
|
1113 |
+
),
|
1114 |
+
array('id' => $mid),
|
1115 |
+
array('%d'),
|
1116 |
+
array('%d')
|
1117 |
+
);
|
1118 |
+
return true;
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
|
1122 |
+
/**
|
1123 |
+
* Mark all messages sent by an AGENT as read (a user has read them)
|
1124 |
+
*
|
1125 |
+
* @param int $cid Chat ID
|
1126 |
+
* @return string "ok"
|
1127 |
+
*/
|
1128 |
+
function wplc_mark_as_read_user_chat_messages($cid) {
|
1129 |
+
global $wpdb;
|
1130 |
+
global $wplc_tblname_msgs;
|
1131 |
+
|
1132 |
+
$results = $wpdb->get_results("SELECT *
|
1133 |
+
FROM $wplc_tblname_msgs
|
1134 |
+
WHERE `chat_sess_id` = '$cid' AND `status` = '0' AND (`originates` = 1 OR `originates` = 0)
|
1135 |
+
ORDER BY `timestamp` DESC");
|
1136 |
+
|
1137 |
+
|
1138 |
+
foreach ($results as $result) {
|
1139 |
+
$id = $result->id;
|
1140 |
+
|
1141 |
+
$wpdb->update(
|
1142 |
+
$wplc_tblname_msgs,
|
1143 |
+
array(
|
1144 |
+
'status' => 1
|
1145 |
+
),
|
1146 |
+
array('id' => $id),
|
1147 |
+
array('%d'),
|
1148 |
+
array('%d')
|
1149 |
+
);
|
1150 |
+
|
1151 |
+
|
1152 |
+
}
|
1153 |
+
return "ok";
|
1154 |
+
|
1155 |
+
|
1156 |
+
}
|
1157 |
+
/**
|
1158 |
+
* Mark all messages sent by a USER as read (an agent has read them)
|
1159 |
+
*
|
1160 |
+
* @param int $cid Chat ID
|
1161 |
+
* @return string "ok"
|
1162 |
+
*/
|
1163 |
+
function wplc_mark_as_read_agent_chat_messages($cid, $aid) {
|
1164 |
+
global $wpdb;
|
1165 |
+
global $wplc_tblname_msgs;
|
1166 |
+
|
1167 |
+
$results = $wpdb->get_results("SELECT *
|
1168 |
+
FROM $wplc_tblname_msgs
|
1169 |
+
WHERE `chat_sess_id` = '$cid' AND `ato` = '".intval( $aid )."'
|
1170 |
+
ORDER BY `timestamp` DESC");
|
1171 |
+
|
1172 |
+
|
1173 |
+
foreach ($results as $result) {
|
1174 |
+
$id = $result->id;
|
1175 |
+
|
1176 |
+
$wpdb->update(
|
1177 |
+
$wplc_tblname_msgs,
|
1178 |
+
array(
|
1179 |
+
'status' => 1
|
1180 |
+
),
|
1181 |
+
array('id' => $id),
|
1182 |
+
array('%d'),
|
1183 |
+
array('%d')
|
1184 |
+
);
|
1185 |
+
|
1186 |
+
|
1187 |
+
}
|
1188 |
+
return "ok";
|
1189 |
+
|
1190 |
+
|
1191 |
+
}
|
1192 |
+
|
1193 |
+
|
1194 |
+
//here
|
1195 |
+
function wplc_return_admin_chat_messages($cid) {
|
1196 |
+
$wplc_current_user = get_current_user_id();
|
1197 |
+
if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
|
1198 |
+
/*
|
1199 |
+
-- modified in in 6.0.04 --
|
1200 |
+
|
1201 |
+
if(current_user_can('wplc_ma_agent') || current_user_can('manage_options')){
|
1202 |
+
*/
|
1203 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
1204 |
+
|
1205 |
+
if(isset($wplc_settings['wplc_display_name']) && $wplc_settings['wplc_display_name'] == 1){ $display_name = 1; } else { $display_name = 0; }
|
1206 |
+
|
1207 |
+
global $wpdb;
|
1208 |
+
global $wplc_tblname_msgs;
|
1209 |
+
|
1210 |
+
/**
|
1211 |
+
* `Originates` - codes:
|
1212 |
+
* 0 - System notification to be delivered to users
|
1213 |
+
* 1 - Message from an agent
|
1214 |
+
* 2 - Message from a user
|
1215 |
+
* 3 - System notification to be delivered to agents
|
1216 |
+
*
|
1217 |
+
*/
|
1218 |
+
$results = $wpdb->get_results("SELECT * FROM $wplc_tblname_msgs WHERE `chat_sess_id` = '$cid' AND `status` = '0' AND (`originates` = '2' OR `originates` = '3') ORDER BY `timestamp` ASC");
|
1219 |
+
|
1220 |
+
|
1221 |
+
$msg_hist = array();
|
1222 |
+
foreach ($results as $result) {
|
1223 |
+
$system_notification = false;
|
1224 |
+
|
1225 |
+
$id = $result->id;
|
1226 |
+
wplc_mark_as_read_admin_chat_messages($id);
|
1227 |
+
$from = $result->msgfrom;
|
1228 |
+
|
1229 |
+
|
1230 |
+
$msg = $result->msg;
|
1231 |
+
|
1232 |
+
if ( isset( $result->other ) ) { $other_data = maybe_unserialize( $result->other ); } else { $other_data = array(); }
|
1233 |
+
if ($other_data == '') { $other_data = array(); }
|
1234 |
+
|
1235 |
+
$timestamp = strtotime( $result->timestamp );
|
1236 |
+
$other_data['datetime'] = $timestamp;
|
1237 |
+
|
1238 |
+
if (intval($result->originates) == 3) {
|
1239 |
+
/*
|
1240 |
+
system notifications
|
1241 |
+
from version 7
|
1242 |
+
*/
|
1243 |
+
$system_notification = true;
|
1244 |
+
|
1245 |
+
}
|
1246 |
+
else {
|
1247 |
+
|
1248 |
+
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
if (!$system_notification) {
|
1252 |
+
/* this is a normal message */
|
1253 |
+
if(function_exists('wplc_encrypt_decrypt_msg')){
|
1254 |
+
$msg = wplc_encrypt_decrypt_msg($msg);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
$msg_array = maybe_unserialize( $msg );
|
1258 |
+
|
1259 |
+
if( is_array( $msg_array ) ){
|
1260 |
+
$msg = $msg_array['m'];
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
$msg = stripslashes($msg);
|
1264 |
+
|
1265 |
+
$msg = apply_filters("wplc_filter_message_control_out",$msg);
|
1266 |
+
|
1267 |
+
$msg = stripslashes($msg);
|
1268 |
+
|
1269 |
+
$msg_hist[$id]['msg'] = $msg;
|
1270 |
+
$msg_hist[$id]['originates'] = intval($result->originates);
|
1271 |
+
$msg_hist[$id]['other'] = $other_data;
|
1272 |
+
|
1273 |
+
} else {
|
1274 |
+
/* add the system notification to the list */
|
1275 |
+
if ( isset( $msg_hist[$id] ) ) { $msg_hist[$id] = array(); }
|
1276 |
+
|
1277 |
+
$msg_hist[$id]['msg'] = $msg;
|
1278 |
+
$msg_hist[$id]['other'] = $other_data;
|
1279 |
+
$msg_hist[$id]['originates'] = intval($result->originates);
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
|
1283 |
+
|
1284 |
+
|
1285 |
+
}
|
1286 |
+
|
1287 |
+
return $msg_hist;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
|
1291 |
+
|
1292 |
+
else {
|
1293 |
+
return "security issue";
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
/**
|
1300 |
+
* Mark all messages sent by a USER as read (an agent has read them)
|
1301 |
+
*
|
1302 |
+
* @param int $cid Chat ID
|
1303 |
+
* @return string "ok"
|
1304 |
+
*/
|
1305 |
+
function wplc_mark_as_read_admin_chat_messages( $mid ) {
|
1306 |
+
$wplc_current_user = get_current_user_id();
|
1307 |
+
|
1308 |
+
if( get_user_meta( $wplc_current_user, 'wplc_ma_agent', true ) ){
|
1309 |
+
global $wpdb;
|
1310 |
+
global $wplc_tblname_msgs;
|
1311 |
+
|
1312 |
+
$wpdb->update(
|
1313 |
+
$wplc_tblname_msgs,
|
1314 |
+
array(
|
1315 |
+
'status' => 1
|
1316 |
+
),
|
1317 |
+
array('id' => $mid),
|
1318 |
+
array('%d'),
|
1319 |
+
array('%d')
|
1320 |
+
);
|
1321 |
+
|
1322 |
+
} else { return "security issue"; }
|
1323 |
+
|
1324 |
+
return "ok";
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
|
1328 |
+
|
1329 |
+
|
1330 |
+
|
1331 |
+
function wplc_return_chat_session_variable($cid) {
|
1332 |
+
global $wpdb;
|
1333 |
+
global $wplc_tblname_chats;
|
1334 |
+
$results = $wpdb->get_results(
|
1335 |
+
"
|
1336 |
+
SELECT *
|
1337 |
+
FROM $wplc_tblname_chats
|
1338 |
+
WHERE `id` = '$cid'
|
1339 |
+
"
|
1340 |
+
);
|
1341 |
+
foreach ($results as $result) {
|
1342 |
+
return $result->session;
|
1343 |
+
}
|
1344 |
+
}
|
1345 |
+
|
1346 |
+
|
1347 |
+
|
1348 |
+
function wplc_return_chat_status($cid) {
|
1349 |
+
global $wpdb;
|
1350 |
+
global $wplc_tblname_chats;
|
1351 |
+
$results = $wpdb->get_results(
|
1352 |
+
"
|
1353 |
+
SELECT *
|
1354 |
+
FROM $wplc_tblname_chats
|
1355 |
+
WHERE `id` = '$cid'
|
1356 |
+
"
|
1357 |
+
);
|
1358 |
+
foreach ($results as $result) {
|
1359 |
+
return $result->status;
|
1360 |
+
}
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
|
1364 |
+
function wplc_return_status($status) {
|
1365 |
+
if ($status == 1) {
|
1366 |
+
return __("complete","wplivechat");
|
1367 |
+
}
|
1368 |
+
if ($status == 2) {
|
1369 |
+
return __("pending", "wplivechat");
|
1370 |
+
}
|
1371 |
+
if ($status == 3) {
|
1372 |
+
return __("active", "wplivechat");
|
1373 |
+
}
|
1374 |
+
if ($status == 4) {
|
1375 |
+
return __("deleted", "wplivechat");
|
1376 |
+
}
|
1377 |
+
if ($status == 5) {
|
1378 |
+
return __("browsing", "wplivechat");
|
1379 |
+
}
|
1380 |
+
if ($status == 6) {
|
1381 |
+
return __("requesting chat", "wplivechat");
|
1382 |
+
}
|
1383 |
+
if($status == 8){
|
1384 |
+
return __("Chat Ended - User still browsing", "wplivechat");
|
1385 |
+
}
|
1386 |
+
if($status == 9){
|
1387 |
+
return __("User is browsing but doesn't want to chat", "wplivechat");
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
}
|
1391 |
+
|
1392 |
+
add_filter("wplc_filter_mail_body","wplc_filter_control_mail_body",10,2);
|
1393 |
+
function wplc_filter_control_mail_body($header,$msg) {
|
1394 |
+
$primary_bg_color = apply_filters("wplc_mailer_bg_color", "#ec822c"); //Default orange
|
1395 |
+
$body = '
|
1396 |
+
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
1397 |
+
<html>
|
1398 |
+
|
1399 |
+
<body>
|
1400 |
+
|
1401 |
+
|
1402 |
+
|
1403 |
+
<table id="" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: ' . $primary_bg_color . ';">
|
1404 |
+
<tbody>
|
1405 |
+
<tr>
|
1406 |
+
<td width="100%" style="padding: 30px 20px 100px 20px;">
|
1407 |
+
<table align="center" cellpadding="0" cellspacing="0" class="" width="100%" style="border-collapse: separate; max-width:600px;">
|
1408 |
+
<tbody>
|
1409 |
+
<tr>
|
1410 |
+
<td style="text-align: center; padding-bottom: 20px;">
|
1411 |
+
|
1412 |
+
<p>'.$header.'</p>
|
1413 |
+
</td>
|
1414 |
+
</tr>
|
1415 |
+
</tbody>
|
1416 |
+
</table>
|
1417 |
+
|
1418 |
+
<table id="" align="center" cellpadding="0" cellspacing="0" class="" width="100%" style="border-collapse: separate; max-width: 600px; font-family: Georgia, serif; font-size: 12px; color: rgb(51, 62, 72); border: 0px solid rgb(255, 255, 255); border-radius: 10px; background-color: rgb(255, 255, 255);">
|
1419 |
+
<tbody>
|
1420 |
+
<tr>
|
1421 |
+
<td class="sortable-list ui-sortable" style="padding:20px; text-align:center;">
|
1422 |
+
'.nl2br($msg).'
|
1423 |
+
</td>
|
1424 |
+
</tr>
|
1425 |
+
</tbody>
|
1426 |
+
</table>
|
1427 |
+
|
1428 |
+
<table align="center" cellpadding="0" cellspacing="0" class="" width="100%" style="border-collapse: separate; max-width:100%;">
|
1429 |
+
<tbody>
|
1430 |
+
<tr>
|
1431 |
+
<td style="padding:20px;">
|
1432 |
+
<table border="0" cellpadding="0" cellspacing="0" class="" width="100%">
|
1433 |
+
<tbody>
|
1434 |
+
<tr>
|
1435 |
+
<td id="" align="center">
|
1436 |
+
<p>'.site_url().'</p>
|
1437 |
+
</td>
|
1438 |
+
</tr>
|
1439 |
+
</tbody>
|
1440 |
+
</table>
|
1441 |
+
</td>
|
1442 |
+
</tr>
|
1443 |
+
</tbody>
|
1444 |
+
</table>
|
1445 |
+
</td>
|
1446 |
+
</tr>
|
1447 |
+
</tbody>
|
1448 |
+
</table>
|
1449 |
+
|
1450 |
+
|
1451 |
+
|
1452 |
+
</div>
|
1453 |
+
</body>
|
1454 |
+
</html>
|
1455 |
+
';
|
1456 |
+
return $body;
|
1457 |
+
}
|
1458 |
+
|
1459 |
+
|
1460 |
+
add_filter("wplc_mailer_bg_color","wplc_fitler_mailer_bg_color",10,1);
|
1461 |
+
function wplc_fitler_mailer_bg_color($default_color) {
|
1462 |
+
$wplc_settings = get_option('WPLC_SETTINGS');
|
1463 |
+
|
1464 |
+
if (isset($wplc_settings['wplc_theme'])) {
|
1465 |
+
$wplc_theme = $wplc_settings['wplc_theme'];
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
if (isset($wplc_theme)) {
|
1469 |
+
if($wplc_theme == 'theme-1') {
|
1470 |
+
$default_color = "#DB0000";
|
1471 |
+
} else if ($wplc_theme == 'theme-2'){
|
1472 |
+
$default_color = "#000000";
|
1473 |
+
} else if ($wplc_theme == 'theme-3'){
|
1474 |
+
$default_color = "#B97B9D";
|
1475 |
+
} else if ($wplc_theme == 'theme-4'){
|
1476 |
+
$default_color = "#1A14DB";
|
1477 |
+
} else if ($wplc_theme == 'theme-5'){
|
1478 |
+
$default_color = "#3DCC13";
|
1479 |
+
} else if ($wplc_theme == 'theme-6'){
|
1480 |
+
//Check what color is selected in palette
|
1481 |
+
if (isset($wplc_settings["wplc_settings_color1"])) {
|
1482 |
+
$default_color = "#" . $wplc_settings["wplc_settings_color1"];
|
1483 |
+
}
|
1484 |
+
}
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
return $default_color;
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
/**
|
1491 |
+
* Send an email to the admin based on the settings in the settings page
|
1492 |
+
* @param string $reply_to email of the user
|
1493 |
+
* @param string $reply_to_name name of the user
|
1494 |
+
* @param string $subject subject
|
1495 |
+
* @param string $msg message being emailed
|
1496 |
+
* @return void
|
1497 |
+
* @since 5.1.00
|
1498 |
+
*/
|
1499 |
+
function wplcmail($reply_to,$reply_to_name,$subject,$msg) {
|
1500 |
+
|
1501 |
+
$upload_dir = wp_upload_dir();
|
1502 |
+
|
1503 |
+
$wplc_pro_settings = get_option("WPLC_SETTINGS");
|
1504 |
+
if(isset($wplc_pro_settings['wplc_pro_chat_email_address'])){
|
1505 |
+
$email_address = $wplc_pro_settings['wplc_pro_chat_email_address'];
|
1506 |
+
}else{
|
1507 |
+
$email_address = get_option('admin_email');
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
$email_address = explode(',', $email_address);
|
1511 |
+
|
1512 |
+
if(get_option("wplc_mail_type") == "wp_mail" || !get_option('wplc_mail_type')){
|
1513 |
+
$headers[] = 'Content-type: text/html';
|
1514 |
+
$headers[] = 'Reply-To: '.$reply_to_name.'<'.$reply_to.'>';
|
1515 |
+
if($email_address){
|
1516 |
+
foreach($email_address as $email){
|
1517 |
+
/* Send offline message to each email address */
|
1518 |
+
$overbody = apply_filters("wplc_filter_mail_body",$subject,$msg);
|
1519 |
+
if (!wp_mail($email, $subject, $overbody, $headers)) {
|
1520 |
+
$handle = fopen($upload_dir['basedir'].'/wp_livechat_error_log.txt', 'a');
|
1521 |
+
$error = date("Y-m-d H:i:s") . " WP-Mail Failed to send \n";
|
1522 |
+
@fwrite($handle, $error);
|
1523 |
+
}
|
1524 |
+
}
|
1525 |
+
}
|
1526 |
+
// $to = $wplc_pro_settings['wplc_pro_chat_email_address'];
|
1527 |
+
return;
|
1528 |
+
} else {
|
1529 |
+
|
1530 |
+
|
1531 |
+
|
1532 |
+
//require 'phpmailer/PHPMailerAutoload.php';
|
1533 |
+
$wplc_pro_settings = get_option("WPLC_PRO_SETTINGS");
|
1534 |
+
$host = get_option('wplc_mail_host');
|
1535 |
+
$port = get_option('wplc_mail_port');
|
1536 |
+
$username = get_option("wplc_mail_username");
|
1537 |
+
$password = get_option("wplc_mail_password");
|
1538 |
+
if($host && $port && $username && $password){
|
1539 |
+
//Create a new PHPMailer instance
|
1540 |
+
|
1541 |
+
global $phpmailer;
|
1542 |
+
|
1543 |
+
// (Re)create it, if it's gone missing
|
1544 |
+
if ( ! ( $phpmailer instanceof PHPMailer ) ) {
|
1545 |
+
require_once ABSPATH . WPINC . '/class-phpmailer.php';
|
1546 |
+
require_once ABSPATH . WPINC . '/class-smtp.php';
|
1547 |
+
$mail = new PHPMailer( true );
|
1548 |
+
}
|
1549 |
+
|
1550 |
+
|
1551 |
+
|
1552 |
+
//$mail = new PHPMailer();
|
1553 |
+
|
1554 |
+
|
1555 |
+
$mail->isSMTP();
|
1556 |
+
//Enable SMTP debugging
|
1557 |
+
// 0 = off (for production use)
|
1558 |
+
// 1 = client messages
|
1559 |
+
// 2 = client and server messages
|
1560 |
+
$mail->SMTPDebug = 0;
|
1561 |
+
//Ask for HTML-friendly debug output
|
1562 |
+
$mail->Debugoutput = 'html';
|
1563 |
+
//Set the hostname of the mail server
|
1564 |
+
$mail->Host = $host;
|
1565 |
+
//Set the SMTP port number - likely to be 25, 26, 465 or 587
|
1566 |
+
$mail->Port = $port;
|
1567 |
+
//Set the encryption system to use - ssl (deprecated) or tls
|
1568 |
+
if($port == "587"){
|
1569 |
+
$mail->SMTPSecure = 'tls';
|
1570 |
+
} else if($port == "465"){
|
1571 |
+
$mail->SMTPSecure = 'ssl';
|
1572 |
+
}
|
1573 |
+
|
1574 |
+
// Empty out the values that may be set
|
1575 |
+
$mail->ClearAllRecipients();
|
1576 |
+
$mail->ClearAttachments();
|
1577 |
+
$mail->ClearCustomHeaders();
|
1578 |
+
$mail->ClearReplyTos();
|
1579 |
+
|
1580 |
+
|
1581 |
+
//Whether to use SMTP authentication
|
1582 |
+
$mail->SMTPAuth = true;
|
1583 |
+
//Username to use for SMTP authentication
|
1584 |
+
$mail->Username = $username;
|
1585 |
+
//Password to use for SMTP authentication
|
1586 |
+
$mail->Password = $password;
|
1587 |
+
//Set who the message is to be sent from
|
1588 |
+
$mail->setFrom($reply_to, $reply_to_name);
|
1589 |
+
//Set who the message is to be sent to
|
1590 |
+
if($email_address){
|
1591 |
+
foreach($email_address as $email){
|
1592 |
+
$mail->addAddress($email);
|
1593 |
+
}
|
1594 |
+
}
|
1595 |
+
//Set the subject line
|
1596 |
+
$mail->Subject = $subject;
|
1597 |
+
//Read an HTML message body from an external file, convert referenced images to embedded,
|
1598 |
+
//convert HTML into a basic plain-text alternative body
|
1599 |
+
$body = apply_filters("wplc_filter_mail_body",$subject,$msg);
|
1600 |
+
$mail->msgHTML($body);
|
1601 |
+
//Replace the plain text body with one created manually
|
1602 |
+
$mail->AltBody = $msg;
|
1603 |
+
|
1604 |
+
|
1605 |
+
//send the message, check for errors
|
1606 |
+
if (!$mail->send()) {
|
1607 |
+
$handle = fopen($upload_dir['basedir'].'/wp_livechat_error_log.txt', 'a');
|
1608 |
+
$error = date("Y-m-d H:i:s")." ".$mail->ErrorInfo." \n";
|
1609 |
+
@fwrite($handle, $error);
|
1610 |
+
}
|
1611 |
+
return;
|
1612 |
+
}
|
1613 |
+
}
|
1614 |
+
}
|
1615 |
+
/**
|
1616 |
+
* Sends offline messages to the admin (normally via ajax)
|
1617 |
+
* @param string $name Name of the user
|
1618 |
+
* @param string $email Email of the user
|
1619 |
+
* @param string $msg The message being sent to the admin
|
1620 |
+
* @param int $cid Chat ID
|
1621 |
+
* @return void
|
1622 |
+
*/
|
1623 |
+
function wplc_send_offline_msg($name,$email,$msg,$cid) {
|
1624 |
+
$subject = apply_filters("wplc_offline_message_subject_filter", __("WP Live Chat Support - Offline Message from ", "wplivechat") ) . "$name";
|
1625 |
+
$msg = __("Name", "wplivechat").": $name \n".
|
1626 |
+
__("Email", "wplivechat").": $email\n".
|
1627 |
+
__("Message", "wplivechat").": $msg\n\n".
|
1628 |
+
__("Via WP Live Chat Support", "wplivechat");
|
1629 |
+
wplcmail($email,$name, $subject, $msg);
|
1630 |
+
return;
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
|
1634 |
+
/**
|
1635 |
+
* Saves offline messages to the database
|
1636 |
+
* @param string $name User name
|
1637 |
+
* @param string $email User email
|
1638 |
+
* @param string $message Message being saved
|
1639 |
+
* @return Void
|
1640 |
+
* @since 5.1.00
|
1641 |
+
*/
|
1642 |
+
function wplc_store_offline_message($name, $email, $message){
|
1643 |
+
global $wpdb;
|
1644 |
+
global $wplc_tblname_offline_msgs;
|
1645 |
+
|
1646 |
+
$wplc_settings = get_option('WPLC_SETTINGS');
|
1647 |
+
|
1648 |
+
if(isset($wplc_settings['wplc_record_ip_address']) && $wplc_settings['wplc_record_ip_address'] == 1){
|
1649 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
|
1650 |
+
$ip_address = sanitize_text_field($_SERVER['HTTP_X_FORWARDED_FOR']);
|
1651 |
+
} else {
|
1652 |
+
$ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']);
|
1653 |
+
}
|
1654 |
+
$offline_ip_address = $ip_address;
|
1655 |
+
} else {
|
1656 |
+
$offline_ip_address = "";
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
|
1660 |
+
$ins_array = array(
|
1661 |
+
'timestamp' => current_time('mysql'),
|
1662 |
+
'name' => sanitize_text_field($name),
|
1663 |
+
'email' => sanitize_email($email),
|
1664 |
+
'message' => implode( "\n", array_map( 'sanitize_text_field', explode( "\n", $message ) ) ),
|
1665 |
+
'ip' => sanitize_text_field($offline_ip_address),
|
1666 |
+
'user_agent' => sanitize_text_field($_SERVER['HTTP_USER_AGENT'])
|
1667 |
+
);
|
1668 |
+
|
1669 |
+
$rows_affected = $wpdb->insert( $wplc_tblname_offline_msgs, $ins_array );
|
1670 |
+
return;
|
1671 |
+
}
|
1672 |
+
/**
|
1673 |
+
* Send what we have found as a system notification
|
1674 |
+
*/
|
1675 |
+
function wplc_send_welcome($cid,$wplc_settings) {
|
1676 |
+
|
1677 |
+
if (!isset($wplc_settings['wplc_welcome_msg'])) { $wplc_settings['wplc_welcome_msg'] = __("Please standby for an agent. While you wait for the agent you may type your message.","wplivechat"); }
|
1678 |
+
$mdata = array(
|
1679 |
+
'msg' => $wplc_settings['wplc_welcome_msg']
|
1680 |
+
);
|
1681 |
+
wplc_record_chat_notification('await_agent',$cid,$mdata);
|
1682 |
+
return;
|
1683 |
+
|
1684 |
+
}
|
1685 |
+
|
1686 |
+
|
1687 |
+
function wplc_user_initiate_chat($name,$email,$cid = null,$session) {
|
1688 |
+
|
1689 |
+
global $wpdb;
|
1690 |
+
global $wplc_tblname_chats;
|
1691 |
+
|
1692 |
+
|
1693 |
+
$wplc_settings = get_option('WPLC_SETTINGS');
|
1694 |
+
|
1695 |
+
if(isset($wplc_settings['wplc_record_ip_address']) && $wplc_settings['wplc_record_ip_address'] == 1){
|
1696 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
|
1697 |
+
$ip_address = sanitize_text_field($_SERVER['HTTP_X_FORWARDED_FOR']);
|
1698 |
+
} else {
|
1699 |
+
$ip_address = sanitize_text_field($_SERVER['REMOTE_ADDR']);
|
1700 |
+
}
|
1701 |
+
$user_data = array(
|
1702 |
+
'ip' => $ip_address,
|
1703 |
+
'user_agent' => sanitize_text_field($_SERVER['HTTP_USER_AGENT'])
|
1704 |
+
);
|
1705 |
+
$wplc_ce_ip = $ip_address;
|
1706 |
+
} else {
|
1707 |
+
$user_data = array(
|
1708 |
+
'ip' => "",
|
1709 |
+
'user_agent' => sanitize_text_field($_SERVER['HTTP_USER_AGENT'])
|
1710 |
+
);
|
1711 |
+
$wplc_ce_ip = null;
|
1712 |
+
}
|
1713 |
+
|
1714 |
+
if(function_exists('wplc_ce_activate')){
|
1715 |
+
/* Log the chat for statistical purposes as well */
|
1716 |
+
if(function_exists('wplc_ce_record_initial_chat')){
|
1717 |
+
wplc_ce_record_initial_chat($name, $email, $cid, $wplc_ce_ip, sanitize_text_field($_SERVER['HTTP_REFERER']));
|
1718 |
+
}
|
1719 |
+
}
|
1720 |
+
|
1721 |
+
if ($cid != null) {
|
1722 |
+
/* change from a visitor to a chat */
|
1723 |
+
|
1724 |
+
/**
|
1725 |
+
* This helps us identify if this user needs to be answered. The user can start typing so long but an agent still needs to answer the chat
|
1726 |
+
* @var serialized array
|
1727 |
+
*/
|
1728 |
+
$chat_data = wplc_get_chat_data($cid,__LINE__);
|
1729 |
+
|
1730 |
+
if (isset($chat_data->other)) {
|
1731 |
+
$other_data = maybe_unserialize( $chat_data->other );
|
1732 |
+
$other_data['unanswered'] = true;
|
1733 |
+
|
1734 |
+
$other_data = apply_filters("wplc_start_chat_hook_other_data_hook", $other_data);
|
1735 |
+
if (!isset($other_data['welcome'])) {
|
1736 |
+
//wplc_send_welcome($cid,$wplc_settings);
|
1737 |
+
$other_data['welcome'] = true;
|
1738 |
+
}
|
1739 |
+
|
1740 |
+
} else {
|
1741 |
+
//wplc_send_welcome($cid,$wplc_settings);
|
1742 |
+
$other_data = array();
|
1743 |
+
$other_data['welcome'] = true;
|
1744 |
+
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
|
1748 |
+
$wpdb->update(
|
1749 |
+
$wplc_tblname_chats,
|
1750 |
+
array(
|
1751 |
+
'status' => 2,
|
1752 |
+
'timestamp' => current_time('mysql'),
|
1753 |
+
'name' => $name,
|
1754 |
+
'email' => $email,
|
1755 |
+
'session' => $session,
|
1756 |
+
'ip' => maybe_serialize($user_data),
|
1757 |
+
'url' => sanitize_text_field($_SERVER['HTTP_REFERER']),
|
1758 |
+
'last_active_timestamp' => current_time('mysql'),
|
1759 |
+
'other' => maybe_serialize($other_data)
|
1760 |
+
),
|
1761 |
+
array('id' => $cid),
|
1762 |
+
array(
|
1763 |
+
'%d',
|
1764 |
+
'%s',
|
1765 |
+
'%s',
|
1766 |
+
'%s',
|
1767 |
+
'%s',
|
1768 |
+
'%s',
|
1769 |
+
'%s',
|
1770 |
+
'%s',
|
1771 |
+
'%s'
|
1772 |
+
),
|
1773 |
+
array('%d')
|
1774 |
+
);
|
1775 |
+
|
1776 |
+
do_action("wplc_hook_initiate_chat",array("cid" => $cid, "name" => $name, "email" => $email));
|
1777 |
+
|
1778 |
+
do_action("wplc_start_chat_hook_after_data_insert", $cid);
|
1779 |
+
return $cid;
|
1780 |
+
}
|
1781 |
+
else {
|
1782 |
+
$other_data = array();
|
1783 |
+
$other_data['unanswered'] = true;
|
1784 |
+
|
1785 |
+
$other_data = apply_filters("wplc_start_chat_hook_other_data_hook", $other_data);
|
1786 |
+
|
1787 |
+
|
1788 |
+
|
1789 |
+
$wpdb->insert(
|
1790 |
+
$wplc_tblname_chats,
|
1791 |
+
array(
|
1792 |
+
'status' => 2,
|
1793 |
+
'timestamp' => current_time('mysql'),
|
1794 |
+
'name' => $name,
|
1795 |
+
'email' => $email,
|
1796 |
+
'session' => $session,
|
1797 |
+
'ip' => maybe_serialize($user_data),
|
1798 |
+
'url' => sanitize_text_field($_SERVER['HTTP_REFERER']),
|
1799 |
+
'last_active_timestamp' => current_time('mysql'),
|
1800 |
+
'other' => maybe_serialize($other_data)
|
1801 |
+
),
|
1802 |
+
array(
|
1803 |
+
'%s',
|
1804 |
+
'%s',
|
1805 |
+
'%s',
|
1806 |
+
'%s',
|
1807 |
+
'%s',
|
1808 |
+
'%s',
|
1809 |
+
'%s',
|
1810 |
+
'%s',
|
1811 |
+
'%s'
|
1812 |
+
)
|
1813 |
+
);
|
1814 |
+
|
1815 |
+
|
1816 |
+
$lastid = $wpdb->insert_id;
|
1817 |
+
|
1818 |
+
|
1819 |
+
|
1820 |
+
|
1821 |
+
/* Nick: moved from top of function to bottom of function to try speed up the process of accepting the chart - version 7 */
|
1822 |
+
if (function_exists("wplc_list_chats_pro")) { /* check if functions-pro is around */
|
1823 |
+
wplc_pro_notify_via_email();
|
1824 |
+
}
|
1825 |
+
|
1826 |
+
do_action("wplc_start_chat_hook_after_data_insert", $lastid);
|
1827 |
+
return $lastid;
|
1828 |
+
}
|
1829 |
+
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
|
1833 |
+
|
1834 |
+
function wplc_get_msg() {
|
1835 |
+
return "<a href=\"javascript:void(0);\" class=\"wplc_second_chat_request button button-primary\" style='cursor:not-allowed' title=\"".__("Get Pro Add-on to accept more chats","wplivechat")."\" target=\"_BLANK\">".__("Accept Chat","wplivechat")."</a>";
|
1836 |
+
}
|
1837 |
+
function wplc_update_chat_statuses() {
|
1838 |
+
global $wpdb;
|
1839 |
+
global $wplc_tblname_chats;
|
1840 |
+
$results = $wpdb->get_results(
|
1841 |
+
"
|
1842 |
+
SELECT *
|
1843 |
+
FROM $wplc_tblname_chats
|
1844 |
+
WHERE `status` = '2' OR `status` = '3' OR `status` = '5' or `status` = '8' or `status` = '9' or `status` = '10' or `status` = 12
|
1845 |
+
"
|
1846 |
+
);
|
1847 |
+
foreach ($results as $result) {
|
1848 |
+
$id = $result->id;
|
1849 |
+
$timestamp = strtotime($result->last_active_timestamp);
|
1850 |
+
$datenow = current_time('timestamp');
|
1851 |
+
$difference = $datenow - $timestamp;
|
1852 |
+
|
1853 |
+
|
1854 |
+
|
1855 |
+
if (intval($result->status) == 2) {
|
1856 |
+
if ($difference >= 30) { // 60 seconds max
|
1857 |
+
wplc_change_chat_status($id,12);
|
1858 |
+
}
|
1859 |
+
}
|
1860 |
+
else if (intval($result->status) == 12) {
|
1861 |
+
if ($difference >= 30) { // 30 seconds max
|
1862 |
+
wplc_change_chat_status($id,0);
|
1863 |
+
}
|
1864 |
+
}
|
1865 |
+
else if (intval($result->status) == 3) {
|
1866 |
+
if ($difference >= 300) { // 5 minutes
|
1867 |
+
wplc_change_chat_status($id,1);
|
1868 |
+
}
|
1869 |
+
}
|
1870 |
+
else if (intval($result->status) == 5) {
|
1871 |
+
if ($difference >= 120) { // 2 minute timeout
|
1872 |
+
wplc_change_chat_status($id,7); // 7 - timedout
|
1873 |
+
}
|
1874 |
+
} else if(intval($result->status) == 8){ // chat is complete but user is still browsing
|
1875 |
+
if ($difference >= 45) { // 30 seconds
|
1876 |
+
wplc_change_chat_status($id,1); // 1 - chat is now complete
|
1877 |
+
}
|
1878 |
+
} else if(intval($result->status) == 9 || $result->status == 10){
|
1879 |
+
if ($difference >= 120) { // 120 seconds
|
1880 |
+
wplc_change_chat_status($id,7); // 7 - timedout
|
1881 |
+
}
|
1882 |
+
}
|
1883 |
+
}
|
1884 |
+
}
|
1885 |
+
function wplc_check_pending_chats(){
|
1886 |
+
global $wpdb;
|
1887 |
+
global $wplc_tblname_chats;
|
1888 |
+
$sql = "SELECT * FROM `$wplc_tblname_chats` WHERE `status` = 2";
|
1889 |
+
$wpdb->query($sql);
|
1890 |
+
$results = $wpdb->get_results($sql);
|
1891 |
+
if($results){
|
1892 |
+
foreach ($results as $result) {
|
1893 |
+
$other = maybe_unserialize($result->other);
|
1894 |
+
if (isset($other['unanswered'])) {
|
1895 |
+
return true;
|
1896 |
+
}
|
1897 |
+
}
|
1898 |
+
|
1899 |
+
}
|
1900 |
+
return false;
|
1901 |
+
}
|
1902 |
+
function wplc_get_active_and_pending_chats(){
|
1903 |
+
global $wpdb;
|
1904 |
+
global $wplc_tblname_chats;
|
1905 |
+
$sql = "SELECT * FROM `$wplc_tblname_chats` WHERE `status` = 2 OR `status` = 3 ORDER BY `status`";
|
1906 |
+
$results = $wpdb->get_results($sql);
|
1907 |
+
if($results){
|
1908 |
+
return $results;
|
1909 |
+
} else {
|
1910 |
+
return false;
|
1911 |
+
}
|
1912 |
+
}
|
1913 |
+
function wplc_convert_array_to_string($array){
|
1914 |
+
$string = "";
|
1915 |
+
if($array){
|
1916 |
+
foreach($array as $value){
|
1917 |
+
$string.= $value->id." ;";
|
1918 |
+
}
|
1919 |
+
} else {
|
1920 |
+
$string = false;
|
1921 |
+
}
|
1922 |
+
return $string;
|
1923 |
+
}
|
1924 |
+
|
1925 |
+
function wplc_return_browser_image($string,$size) {
|
1926 |
+
switch($string) {
|
1927 |
+
|
1928 |
+
case "Internet Explorer":
|
1929 |
+
return "internet-explorer_".$size."x".$size.".png";
|
1930 |
+
break;
|
1931 |
+
case "Mozilla Firefox":
|
1932 |
+
return "firefox_".$size."x".$size.".png";
|
1933 |
+
break;
|
1934 |
+
case "Opera":
|
1935 |
+
return "opera_".$size."x".$size.".png";
|
1936 |
+
break;
|
1937 |
+
case "Google Chrome":
|
1938 |
+
return "chrome_".$size."x".$size.".png";
|
1939 |
+
break;
|
1940 |
+
case "Safari":
|
1941 |
+
return "safari_".$size."x".$size.".png";
|
1942 |
+
break;
|
1943 |
+
case "Other browser":
|
1944 |
+
return "web_".$size."x".$size.".png";
|
1945 |
+
break;
|
1946 |
+
default:
|
1947 |
+
return "web_".$size."x".$size.".png";
|
1948 |
+
break;
|
1949 |
+
}
|
1950 |
+
|
1951 |
+
|
1952 |
+
}
|
1953 |
+
function wplc_return_browser_string($user_agent) {
|
1954 |
+
if(strpos($user_agent, 'MSIE') !== FALSE)
|
1955 |
+
return 'Internet Explorer';
|
1956 |
+
elseif(strpos($user_agent, 'Trident') !== FALSE) //For Supporting IE 11
|
1957 |
+
return 'Internet Explorer';
|
1958 |
+
elseif(strpos($user_agent, 'Edge') !== FALSE)
|
1959 |
+
return 'Internet Explorer';
|
1960 |
+
elseif(strpos($user_agent, 'Firefox') !== FALSE)
|
1961 |
+
return 'Mozilla Firefox';
|
1962 |
+
elseif(strpos($user_agent, 'Chrome') !== FALSE)
|
1963 |
+
return 'Google Chrome';
|
1964 |
+
elseif(strpos($user_agent, 'Opera Mini') !== FALSE)
|
1965 |
+
return "Opera";
|
1966 |
+
elseif(strpos($user_agent, 'Opera') !== FALSE)
|
1967 |
+
return "Opera";
|
1968 |
+
elseif(strpos($user_agent, 'Safari') !== FALSE)
|
1969 |
+
return "Safari";
|
1970 |
+
else
|
1971 |
+
return 'Other browser';
|
1972 |
+
}
|
1973 |
+
|
1974 |
+
function wplc_error_directory() {
|
1975 |
+
$upload_dir = wp_upload_dir();
|
1976 |
+
|
1977 |
+
if (is_multisite()) {
|
1978 |
+
if (!file_exists($upload_dir['basedir'].'/wp-live-chat-support')) {
|
1979 |
+
wp_mkdir_p($upload_dir['basedir'].'/wp-live-chat-support');
|
1980 |
+
$content = "Error log created";
|
1981 |
+
$fp = @fopen($upload_dir['basedir'].'/wp-live-chat-support/error_log.txt','w+');
|
1982 |
+
@fwrite($fp,$content);
|
1983 |
+
}
|
1984 |
+
} else {
|
1985 |
+
if (!file_exists($upload_dir['basedir'] .'/wp-live-chat-support')) {
|
1986 |
+
wp_mkdir_p($upload_dir['basedir'] . '/wp-live-chat-support');
|
1987 |
+
$content = "Error log created";
|
1988 |
+
$fp = @fopen($upload_dir['basedir'] . '/wp-live-chat-support/error_log.txt','w+');
|
1989 |
+
@fwrite($fp,$content);
|
1990 |
+
}
|
1991 |
+
|
1992 |
+
}
|
1993 |
+
return true;
|
1994 |
+
|
1995 |
+
}
|
1996 |
+
|
1997 |
+
function wplc_error_log($error) {
|
1998 |
+
return;
|
1999 |
+
$upload_dir = wp_upload_dir();
|
2000 |
+
$content = "\r\n[".date("Y-m-d")."] [".date("H:i:s")."]".$error;
|
2001 |
+
$fp = @fopen($upload_dir['basedir'].'/wp-live-chat-support/error_log.txt','a+');
|
2002 |
+
@fwrite($fp,$content);
|
2003 |
+
@fclose($fp);
|
2004 |
+
|
2005 |
+
|
2006 |
+
}
|
2007 |
+
function Memory_Usage($decimals = 2) {
|
2008 |
+
$result = 0;
|
2009 |
+
|
2010 |
+
if (function_exists('memory_get_usage')) {
|
2011 |
+
$result = memory_get_usage() / 1024;
|
2012 |
+
}
|
2013 |
+
|
2014 |
+
else {
|
2015 |
+
if (function_exists('exec')) {
|
2016 |
+
$output = array();
|
2017 |
+
|
2018 |
+
if (substr(strtoupper(PHP_OS), 0, 3) == 'WIN') {
|
2019 |
+
exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $output);
|
2020 |
+
|
2021 |
+
$result = preg_replace('/[\D]/', '', $output[5]);
|
2022 |
+
}
|
2023 |
+
|
2024 |
+
else {
|
2025 |
+
exec('ps -eo%mem,rss,pid | grep ' . getmypid(), $output);
|
2026 |
+
|
2027 |
+
$output = explode(' ', $output[0]);
|
2028 |
+
|
2029 |
+
$result = $output[1];
|
2030 |
+
}
|
2031 |
+
}
|
2032 |
+
}
|
2033 |
+
|
2034 |
+
return number_format(intval($result) / 1024, $decimals, '.', '')." mb";
|
2035 |
+
}
|
2036 |
+
function wplc_get_memory_usage() {
|
2037 |
+
$size = memory_get_usage(true);
|
2038 |
+
$unit=array('b','kb','mb','gb','tb','pb');
|
2039 |
+
return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
|
2040 |
+
|
2041 |
+
}
|
2042 |
+
function wplc_record_mem() {
|
2043 |
+
$upload_dir = wp_upload_dir();
|
2044 |
+
$data = array(
|
2045 |
+
'date' => current_time('mysql'),
|
2046 |
+
'php_mem' => wplc_get_memory_usage()
|
2047 |
+
);
|
2048 |
+
$fp = @fopen($upload_dir['basedir'].'/wp-live-chat-support'."/mem_usag.csv","a+");
|
2049 |
+
fputcsv($fp, $data);
|
2050 |
+
fclose($fp);
|
2051 |
+
}
|
2052 |
+
|
2053 |
+
function wplc_admin_display_missed_chats() {
|
2054 |
+
|
2055 |
+
global $wpdb;
|
2056 |
+
global $wplc_tblname_chats;
|
2057 |
+
|
2058 |
+
|
2059 |
+
if(isset($_GET['wplc_action']) && $_GET['wplc_action'] == 'remove_missed_cid'){
|
2060 |
+
if(isset($_GET['cid'])){
|
2061 |
+
if(isset($_GET['wplc_confirm'])){
|
2062 |
+
//Confirmed - delete
|
2063 |
+
$delete_sql = "";
|
2064 |
+
if ( empty( $_GET['cid'] ) ) {
|
2065 |
+
exit('No CID?');
|
2066 |
+
}
|
2067 |
+
$delete_sql = "DELETE FROM $wplc_tblname_chats WHERE `id` = '".intval( sanitize_text_field( $_GET['cid'] ) )."' LIMIT 1";
|
2068 |
+
|
2069 |
+
$wpdb->query($delete_sql);
|
2070 |
+
if ($wpdb->last_error) {
|
2071 |
+
echo "<div class='update-nag' style='margin-top: 0px;margin-bottom: 5px;'>
|
2072 |
+
".__("Error: Could not delete chat", "wplivechat")."<br>
|
2073 |
+
</div>";
|
2074 |
+
} else {
|
2075 |
+
echo "<div class='update-nag' style='margin-top: 0px;margin-bottom: 5px;border-color:#67d552;'>
|
2076 |
+
".__("Chat Deleted", "wplivechat")."<br>
|
2077 |
+
</div>";
|
2078 |
+
}
|
2079 |
+
|
2080 |
+
} else {
|
2081 |
+
//Prompt
|
2082 |
+
echo "<div class='update-nag' style='margin-top: 0px;margin-bottom: 5px;'>
|
2083 |
+
".__("Are you sure you would like to delete this chat?", "wplivechat")."<br>
|
2084 |
+
<a class='button' href='?page=wplivechat-menu-missed-chats&wplc_action=remove_missed_cid&cid=".$_GET['cid']."&wplc_confirm=1''>".__("Yes", "wplivechat")."</a> <a class='button' href='?page=wplivechat-menu-missed-chats'>".__("No", "wplivechat")."</a>
|
2085 |
+
</div>";
|
2086 |
+
}
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
|
2090 |
+
echo "
|
2091 |
+
<table class=\"wp-list-table widefat fixed \" cellspacing=\"0\">
|
2092 |
+
<thead>
|
2093 |
+
<tr>
|
2094 |
+
<th class='manage-column column-id'><span>" . __("Date", "wplivechat") . "</span></th>
|
2095 |
+
<th scope='col' id='wplc_name_colum' class='manage-column column-id'><span>" . __("Name", "wplivechat") . "</span></th>
|
2096 |
+
<th scope='col' id='wplc_email_colum' class='manage-column column-id'>" . __("Email", "wplivechat") . "</th>
|
2097 |
+
<th scope='col' id='wplc_url_colum' class='manage-column column-id'>" . __("URL", "wplivechat") . "</th>
|
2098 |
+
<th scope='col' id='wplc_url_colum' class='manage-column column-id'>" . __("Action", "wplivechat") . "</th>
|
2099 |
+
</tr>
|
2100 |
+
</thead>
|
2101 |
+
<tbody id=\"the-list\" class='list:wp_list_text_link'>";
|
2102 |
+
|
2103 |
+
|
2104 |
+
if (function_exists("wplc_register_pro_version")) {
|
2105 |
+
$sql = "SELECT * FROM $wplc_tblname_chats WHERE (`status` = 0 OR `agent_id` = 0) ORDER BY `timestamp` DESC";
|
2106 |
+
} else {
|
2107 |
+
$sql = "SELECT * FROM $wplc_tblname_chats WHERE `status` = 0 ORDER BY `timestamp` DESC";
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
$results = $wpdb->get_results($sql);
|
2111 |
+
|
2112 |
+
if (!$results) {
|
2113 |
+
echo "<tr><td></td><td>" . __("You have not missed any chat requests.", "wplivechat") . "</td></tr>";
|
2114 |
+
} else {
|
2115 |
+
foreach ($results as $result) {
|
2116 |
+
|
2117 |
+
$url = admin_url('admin.php?page=wplivechat-menu&action=history&cid=' . $result->id);
|
2118 |
+
$url2 = admin_url('admin.php?page=wplivechat-menu&action=download_history&type=csv&cid=' . $result->id);
|
2119 |
+
$url3 = "?page=wplivechat-menu-missed-chats&wplc_action=remove_missed_cid&cid=" . $result->id;
|
2120 |
+
$actions = "
|
2121 |
+
<a href='$url' class='button' title='".__('View Chat History', 'wplivechat')."' target='_BLANK' id=''><i class='fa fa-eye'></i></a> <a href='$url2' class='button' title='".__('Download Chat History', 'wplivechat')."' target='_BLANK' id=''><i class='fa fa-download'></i></a> <a href='$url3' class='button'><i class='fa fa-trash-o'></i></a>
|
2122 |
+
";
|
2123 |
+
|
2124 |
+
echo "<tr id=\"record_" . $result->id . "\">";
|
2125 |
+
echo "<td class='chat_id column-chat_d'>" . $result->timestamp . "</td>";
|
2126 |
+
echo "<td class='chat_name column_chat_name' id='chat_name_" . $result->id . "'><img src=\"//www.gravatar.com/avatar/" . md5($result->email) . "?s=30\" class='wplc-user-message-avatar' /> " . $result->name . "</td>";
|
2127 |
+
echo "<td class='chat_email column_chat_email' id='chat_email_" . $result->id . "'><a href='mailto:" . $result->email . "' title='Email " . ".$result->email." . "'>" . $result->email . "</a></td>";
|
2128 |
+
echo "<td class='chat_name column_chat_url' id='chat_url_" . $result->id . "'>" . esc_url($result->url) . "</td>";
|
2129 |
+
echo "<td class='chat_name column_chat_url'>".$actions."</td>";
|
2130 |
+
echo "</tr>";
|
2131 |
+
}
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
echo "
|
2135 |
+
</tbody>
|
2136 |
+
</table>";
|
2137 |
+
}
|
2138 |
+
|
2139 |
+
|
2140 |
+
/**
|
2141 |
+
* Compares the users IP address to the list in the banned IPs in the settings page
|
2142 |
+
* @return BOOL
|
2143 |
+
*/
|
2144 |
+
function wplc_is_user_banned_basic(){
|
2145 |
+
$banned_ip = get_option('WPLC_BANNED_IP_ADDRESSES');
|
2146 |
+
if($banned_ip){
|
2147 |
+
$banned_ip = maybe_unserialize($banned_ip);
|
2148 |
+
$banned = 0;
|
2149 |
+
if (is_array($banned_ip)) {
|
2150 |
+
foreach($banned_ip as $ip){
|
2151 |
+
|
2152 |
+
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {
|
2153 |
+
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
2154 |
+
} else {
|
2155 |
+
$ip_address = $_SERVER['REMOTE_ADDR'];
|
2156 |
+
}
|
2157 |
+
|
2158 |
+
if(isset($ip_address)){
|
2159 |
+
if($ip == $ip_address){
|
2160 |
+
$banned++;
|
2161 |
+
}
|
2162 |
+
} else {
|
2163 |
+
$banned = 0;
|
2164 |
+
}
|
2165 |
+
}
|
2166 |
+
} else {
|
2167 |
+
return 0;
|
2168 |
+
}
|
2169 |
+
} else {
|
2170 |
+
$banned = 0;
|
2171 |
+
}
|
2172 |
+
return $banned;
|
2173 |
+
}
|
2174 |
+
|
2175 |
+
|
2176 |
+
|
2177 |
+
|
2178 |
+
function wplc_return_animations_basic(){
|
2179 |
+
|
2180 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
2181 |
+
|
2182 |
+
if ($wplc_settings["wplc_settings_align"] == 1) {
|
2183 |
+
$original_pos = "bottom_left";
|
2184 |
+
//$wplc_box_align = "left:100px; bottom:0px;";
|
2185 |
+
$wplc_box_align = "bottom:0px;";
|
2186 |
+
} else if ($wplc_settings["wplc_settings_align"] == 2) {
|
2187 |
+
$original_pos = "bottom_right";
|
2188 |
+
//$wplc_box_align = "right:100px; bottom:0px;";
|
2189 |
+
$wplc_box_align = "bottom:0px;";
|
2190 |
+
} else if ($wplc_settings["wplc_settings_align"] == 3) {
|
2191 |
+
$original_pos = "left";
|
2192 |
+
// $wplc_box_align = "left:0; bottom:100px;";
|
2193 |
+
$wplc_box_align = " bottom:100px;";
|
2194 |
+
$wplc_class = "wplc_left";
|
2195 |
+
} else if ($wplc_settings["wplc_settings_align"] == 4) {
|
2196 |
+
$original_pos = "right";
|
2197 |
+
// $wplc_box_align = "right:0; bottom:100px;";
|
2198 |
+
$wplc_box_align = "bottom:100px;";
|
2199 |
+
$wplc_class = "wplc_right";
|
2200 |
+
}
|
2201 |
+
|
2202 |
+
$animation_data = array();
|
2203 |
+
|
2204 |
+
if(isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-1'){
|
2205 |
+
|
2206 |
+
if($original_pos == 'bottom_right'){
|
2207 |
+
$wplc_starting_point = 'margin-bottom: -350px; right: 20px;';
|
2208 |
+
$wplc_animation = 'animation-1';
|
2209 |
+
} else if ($original_pos == 'bottom_left'){
|
2210 |
+
$wplc_starting_point = 'margin-bottom: -350px; left: 20px;';
|
2211 |
+
$wplc_animation = 'animation-1';
|
2212 |
+
} else if ($original_pos == 'left'){
|
2213 |
+
$wplc_starting_point = 'margin-bottom: -350px; left: 0px;';
|
2214 |
+
$wplc_box_align = "left:0; bottom:100px;";
|
2215 |
+
$wplc_animation = 'animation-1';
|
2216 |
+
} else if ($original_pos == 'right'){
|
2217 |
+
$wplc_starting_point = 'margin-bottom: -350px; right: 0px;';
|
2218 |
+
$wplc_animation = 'animation-1';
|
2219 |
+
$wplc_box_align = "right:0; bottom:100px;";
|
2220 |
+
}
|
2221 |
+
|
2222 |
+
$animation_data['animation'] = $wplc_animation;
|
2223 |
+
$animation_data['starting_point'] = $wplc_starting_point;
|
2224 |
+
$animation_data['box_align'] = $wplc_box_align;
|
2225 |
+
|
2226 |
+
} else if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-2'){
|
2227 |
+
|
2228 |
+
if($original_pos == 'bottom_right'){
|
2229 |
+
$wplc_starting_point = 'margin-bottom: 0px; right: -300px;';
|
2230 |
+
$wplc_animation = 'animation-2-br';
|
2231 |
+
} else if ($original_pos == 'bottom_left'){
|
2232 |
+
$wplc_starting_point = 'margin-bottom: 0px; left: -300px;';
|
2233 |
+
$wplc_animation = 'animation-2-bl';
|
2234 |
+
} else if ($original_pos == 'left'){
|
2235 |
+
$wplc_starting_point = 'margin-bottom: 0px; left: -999px;';
|
2236 |
+
$wplc_animation = 'animation-2-l';
|
2237 |
+
} else if ($original_pos == 'right'){
|
2238 |
+
$wplc_starting_point = 'margin-bottom: 0px; right: -999px;';
|
2239 |
+
$wplc_animation = 'animation-2-r';
|
2240 |
+
}
|
2241 |
+
|
2242 |
+
$animation_data['animation'] = $wplc_animation;
|
2243 |
+
$animation_data['starting_point'] = $wplc_starting_point;
|
2244 |
+
$animation_data['box_align'] = $wplc_box_align;
|
2245 |
+
|
2246 |
+
} else if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-3'){
|
2247 |
+
|
2248 |
+
$wplc_animation = 'animation-3';
|
2249 |
+
|
2250 |
+
if($original_pos == 'bottom_right'){
|
2251 |
+
$wplc_starting_point = 'margin-bottom: 0; right: 20px; display: none;';
|
2252 |
+
} else if ($original_pos == 'bottom_left'){
|
2253 |
+
$wplc_starting_point = 'margin-bottom: 0px; left: 20px; display: none;';
|
2254 |
+
} else if ($original_pos == 'left'){
|
2255 |
+
$wplc_starting_point = 'margin-bottom: 100px; left: 0px; display: none;';
|
2256 |
+
} else if ($original_pos == 'right'){
|
2257 |
+
$wplc_starting_point = 'margin-bottom: 100px; right: 0px; display: none;';
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
$animation_data['animation'] = $wplc_animation;
|
2261 |
+
$animation_data['starting_point'] = $wplc_starting_point;
|
2262 |
+
$animation_data['box_align'] = $wplc_box_align;
|
2263 |
+
|
2264 |
+
} else if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-4'){
|
2265 |
+
// Dont use an animation
|
2266 |
+
|
2267 |
+
$wplc_animation = "animation-4";
|
2268 |
+
|
2269 |
+
if($original_pos == 'bottom_right'){
|
2270 |
+
$wplc_starting_point = 'margin-bottom: 0; right: 20px; display: none;';
|
2271 |
+
} else if ($original_pos == 'bottom_left'){
|
2272 |
+
$wplc_starting_point = 'margin-bottom: 0px; left: 20px; display: none;';
|
2273 |
+
} else if ($original_pos == 'left'){
|
2274 |
+
$wplc_starting_point = 'margin-bottom: 100px; left: 0px; display: none;';
|
2275 |
+
} else if ($original_pos == 'right'){
|
2276 |
+
$wplc_starting_point = 'margin-bottom: 100px; right: 0px; display: none;';
|
2277 |
+
}
|
2278 |
+
|
2279 |
+
$animation_data['animation'] = $wplc_animation;
|
2280 |
+
$animation_data['starting_point'] = $wplc_starting_point;
|
2281 |
+
$animation_data['box_align'] = $wplc_box_align;
|
2282 |
+
|
2283 |
+
} else {
|
2284 |
+
|
2285 |
+
if($original_pos == 'bottom_right'){
|
2286 |
+
$wplc_starting_point = 'margin-bottom: 0; right: 20px; display: none;';
|
2287 |
+
} else if ($original_pos == 'bottom_left'){
|
2288 |
+
$wplc_starting_point = 'margin-bottom: 0px; left: 20px; display: none;';
|
2289 |
+
} else if ($original_pos == 'left'){
|
2290 |
+
$wplc_starting_point = 'margin-bottom: 100px; left: 0px; display: none;';
|
2291 |
+
} else if ($original_pos == 'right'){
|
2292 |
+
$wplc_starting_point = 'margin-bottom: 100px; right: 0px; display: none;';
|
2293 |
+
}
|
2294 |
+
|
2295 |
+
$wplc_animation = 'none';
|
2296 |
+
|
2297 |
+
$animation_data['animation'] = $wplc_animation;
|
2298 |
+
$animation_data['starting_point'] = $wplc_starting_point;
|
2299 |
+
$animation_data['box_align'] = $wplc_box_align;
|
2300 |
+
}
|
2301 |
+
|
2302 |
+
return $animation_data;
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
|
2306 |
+
add_action("wplc_advanced_settings_above_performance", "wplc_advanced_settings_above_performance_control", 10, 1);
|
2307 |
+
function wplc_advanced_settings_above_performance_control($wplc_settings){
|
2308 |
+
$elem_trig_action = isset($wplc_settings['wplc_elem_trigger_action']) ? $wplc_settings['wplc_elem_trigger_action'] : "0";
|
2309 |
+
$elem_trig_type = isset($wplc_settings['wplc_elem_trigger_type']) ? $wplc_settings['wplc_elem_trigger_type'] : "0";
|
2310 |
+
$elem_trig_id = isset($wplc_settings['wplc_elem_trigger_id']) ? $wplc_settings['wplc_elem_trigger_id'] : "";
|
2311 |
+
|
2312 |
+
echo "<tr>
|
2313 |
+
<td width='350'>
|
2314 |
+
".__("Open chat window via", "wplivechat").":
|
2315 |
+
</td>
|
2316 |
+
<td>
|
2317 |
+
<select name='wplc_elem_trigger_action'>
|
2318 |
+
<option value='0' ".($elem_trig_action == "0" ? "selected" : "").">".__("Click", "wplivechat")."</option>
|
2319 |
+
<option value='1' ".($elem_trig_action == "1" ? "selected" : "").">".__("Hover", "wplivechat")."</option>
|
2320 |
+
</select>
|
2321 |
+
".__("element with", "wplivechat").":
|
2322 |
+
<select name='wplc_elem_trigger_type'>
|
2323 |
+
<option value='0' ".($elem_trig_type == "0" ? "selected" : "").">".__("Class", "wplivechat")."</option>
|
2324 |
+
<option value='1' ".($elem_trig_type == "1" ? "selected" : "").">".__("ID", "wplivechat")."</option>
|
2325 |
+
</select>
|
2326 |
+
<input type='text' name='wplc_elem_trigger_id' value='".$elem_trig_id."'>
|
2327 |
+
</td>
|
2328 |
+
</tr>
|
2329 |
+
";
|
2330 |
+
}
|
2331 |
+
|
2332 |
+
/**
|
2333 |
+
* Reverse of wplc_return_chat_id_by_rel
|
2334 |
+
*/
|
2335 |
+
function wplc_return_chat_rel_by_id($cid) {
|
2336 |
+
global $wpdb;
|
2337 |
+
global $wplc_tblname_chats;
|
2338 |
+
|
2339 |
+
$results = $wpdb->get_results("SELECT * FROM $wplc_tblname_chats WHERE `id` = '$cid' LIMIT 1");
|
2340 |
+
if ($results) {
|
2341 |
+
foreach ($results as $result) {
|
2342 |
+
if (isset($result->rel)) {
|
2343 |
+
return $result->rel;
|
2344 |
+
} else {
|
2345 |
+
return $cid;
|
2346 |
+
}
|
2347 |
+
}
|
2348 |
+
} else {
|
2349 |
+
return $cid;
|
2350 |
+
}
|
2351 |
+
|
2352 |
+
}
|
2353 |
+
|
2354 |
+
/*
|
2355 |
+
* Returns total message count for a chat
|
2356 |
+
*/
|
2357 |
+
function wplc_return_message_count_by_cid($cid) {
|
2358 |
+
global $wpdb;
|
2359 |
+
global $wplc_tblname_msgs;
|
2360 |
+
|
2361 |
+
$sql = "SELECT `id` FROM $wplc_tblname_msgs WHERE `chat_sess_id` = '$cid'";
|
2362 |
+
$results = $wpdb->get_results($sql);
|
2363 |
+
|
2364 |
+
$message_count = 0;
|
2365 |
+
foreach ($results as $result) {
|
2366 |
+
$message_count ++;
|
2367 |
+
}
|
2368 |
+
|
2369 |
+
return $message_count;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2370 |
}
|
images/48px.png
CHANGED
Binary file
|
images/48px_n.png
CHANGED
Binary file
|
images/add-on0.jpg
CHANGED
Binary file
|
images/add-on1.jpg
CHANGED
Binary file
|
images/add-on2.jpg
CHANGED
Binary file
|
images/add-on3.jpg
CHANGED
Binary file
|
images/add-on4.jpg
CHANGED
Binary file
|
images/ajax-loader.gif
CHANGED
Binary file
|
images/bg/cloudy.jpg
CHANGED
Binary file
|
images/bg/geometry.jpg
CHANGED
Binary file
|
images/bg/social.jpg
CHANGED
Binary file
|
images/bg/tech.jpg
CHANGED
Binary file
|
images/chaticon.png
CHANGED
Binary file
|
images/chrome_16x16.png
CHANGED
Binary file
|
images/chrome_32x32.png
CHANGED
Binary file
|
images/codecabin.png
CHANGED
Binary file
|
images/firefox_16x16.png
CHANGED
Binary file
|
images/firefox_32x32.png
CHANGED
Binary file
|
images/flash.ico
CHANGED
Binary file
|
images/gif_f.png
CHANGED
Binary file
|
images/iconCloseRetina.png
CHANGED
Binary file
|
images/iconRetina.png
CHANGED
Binary file
|
images/iconmicro.png
CHANGED
Binary file
|
images/internet-explorer_16x16.png
CHANGED
Binary file
|
images/internet-explorer_32x32.png
CHANGED
Binary file
|
images/loader2.gif
CHANGED
Binary file
|
images/opera_16x16.png
CHANGED
Binary file
|
images/opera_32x32.png
CHANGED
Binary file
|
images/performance.png
CHANGED
Binary file
|
images/plugin1.jpg
CHANGED
Binary file
|
images/plugin2.jpg
CHANGED
Binary file
|
images/reporting_sample.jpg
CHANGED
Binary file
|
images/safari_16x16.png
CHANGED
Binary file
|
images/safari_32x32.png
CHANGED
Binary file
|
images/support.png
CHANGED
Binary file
|
images/themes/newtheme-1.jpg
CHANGED
Binary file
|
images/themes/newtheme-2.jpg
CHANGED
Binary file
|
images/themes/theme-1.png
CHANGED
Binary file
|
images/themes/theme-2.png
CHANGED
Binary file
|
images/themes/theme-3.png
CHANGED
Binary file
|
images/themes/theme-4.png
CHANGED
Binary file
|
images/themes/theme-5.png
CHANGED
Binary file
|
images/themes/theme-6.png
CHANGED
Binary file
|
images/trigger_sample.jpg
CHANGED
Binary file
|
images/trigger_sample_front.jpg
CHANGED
Binary file
|
images/ui-bg_flat_10_000000_40x100.png
CHANGED
Binary file
|
images/ui-bg_glass_65_ffffff_1x400.png
CHANGED
Binary file
|
images/ui-icons_ffffff_256x240.png
CHANGED
Binary file
|
images/web_16x16.png
CHANGED
Binary file
|
images/web_32x32.png
CHANGED
Binary file
|
images/wplc-logo.png
CHANGED
Binary file
|
images/wplc_notification_icon.png
CHANGED
Binary file
|
includes/Mobile_Detect.php
CHANGED
File without changes
|
includes/blocks/wplc-chat-box/block.js
CHANGED
@@ -1,131 +1,130 @@
|
|
1 |
-
/* BLOCK: WP Live Chat Support Chat Box */
|
2 |
-
|
3 |
-
( function() {
|
4 |
-
|
5 |
-
var __ = wp.i18n.__;
|
6 |
-
var el = wp.element.createElement;
|
7 |
-
var children = wp.blocks.children;
|
8 |
-
var registerBlockType = wp.blocks.registerBlockType;
|
9 |
-
|
10 |
-
String.prototype.stripSlashes = function(){
|
11 |
-
return this.replace(/\\(.)/mg, "$1");
|
12 |
-
}
|
13 |
-
|
14 |
-
var wplc_logo = ( wplc_settings.wplc_logo ) ? wplc_settings.wplc_logo : 'https://bleeper.io/app/assets/images/wplc_loading.png';
|
15 |
-
var wplc_text = ( wplc_settings.wplc_text ) ? wplc_settings.wplc_text : 'Live Chat';
|
16 |
-
var wplc_icon = ( wplc_settings.wplc_icon ) ? wplc_settings.wplc_icon : 'fa-commenting-o';
|
17 |
-
var classes = ( wplc_settings.wplc_enabled == 0 ) ? ' disabled' : '';
|
18 |
-
var icon_classes = ( wplc_settings.wplc_icon_enabled == 0 ) ? ' disabled' : '';
|
19 |
-
var size_class = ' md';
|
20 |
-
var default_template = '<!-- Default HTML --><div class="wplc_block"><span class="wplc_block_logo">{wplc_logo}</span><span class="wplc_block_text">{wplc_text}</span><span class="wplc_block_icon">{wplc_icon}</span></div>';
|
21 |
-
var wplc_template = ( wplc_settings.wplc_custom_html ) ? wplc_settings.wplc_custom_html : default_template;
|
22 |
-
wplc_template = wplc_template.stripSlashes();
|
23 |
-
|
24 |
-
if ( wplc_settings.wplc_size == 1 ) {
|
25 |
-
size_class = ' sm';
|
26 |
-
} else if ( wplc_settings.wplc_size == 2 ) {
|
27 |
-
size_class = ' md';
|
28 |
-
} else if ( wplc_settings.wplc_size == 3 ) {
|
29 |
-
size_class = ' lg';
|
30 |
-
}
|
31 |
-
|
32 |
-
var wplc_styles = {
|
33 |
-
backgroundImage: 'url(' + wplc_logo + ')'
|
34 |
-
}
|
35 |
-
|
36 |
-
var placeholder_codes = ['wplc_logo', 'wplc_text', 'wplc_icon'],
|
37 |
-
placeholder_values = ['<span class="wplc_block_logo" style="background-image: url(\'' + wplc_logo + '\');"></span>', wplc_text, '<i class="fa ' + wplc_icon + '"></i>'];
|
38 |
-
|
39 |
-
for( var i = 0; i < placeholder_codes.length; i++ ) {
|
40 |
-
wplc_template = wplc_template.replace(new RegExp('{' + placeholder_codes[i] + '}', 'gi'), placeholder_values[i]);
|
41 |
-
}
|
42 |
-
|
43 |
-
registerBlockType( 'wp-live-chat-support/wplc-chat-box', {
|
44 |
-
title: __( 'WP Live Chat Trigger', 'WPLC' ),
|
45 |
-
icon: 'format-chat',
|
46 |
-
category: 'common',
|
47 |
-
|
48 |
-
edit: function( props ) {
|
49 |
-
output_wplc_block_logo = el(
|
50 |
-
'span',
|
51 |
-
{ className: 'wplc_block_logo',
|
52 |
-
style: wplc_styles
|
53 |
-
}
|
54 |
-
);
|
55 |
-
output_wplc_block_text = el(
|
56 |
-
'span',
|
57 |
-
{ className: 'wplc_block_text' },
|
58 |
-
wplc_text
|
59 |
-
);
|
60 |
-
|
61 |
-
icon = el(
|
62 |
-
'i',
|
63 |
-
{ className: 'fa fa-commenting-o' }
|
64 |
-
);
|
65 |
-
|
66 |
-
output_wplc_block_icon = el(
|
67 |
-
'span',
|
68 |
-
{ className: 'wplc_block_icon' + icon_classes },
|
69 |
-
icon
|
70 |
-
);
|
71 |
-
|
72 |
-
output = el(
|
73 |
-
'span',
|
74 |
-
{ className: 'wplc_block' + classes + size_class },
|
75 |
-
output_wplc_block_logo,
|
76 |
-
output_wplc_block_text,
|
77 |
-
output_wplc_block_icon
|
78 |
-
);
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
'
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
'
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
'
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
'
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
'
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
'
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
'
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
})();
|
1 |
+
/* BLOCK: WP Live Chat Support Chat Box */
|
2 |
+
|
3 |
+
( function() {
|
4 |
+
|
5 |
+
var __ = wp.i18n.__;
|
6 |
+
var el = wp.element.createElement;
|
7 |
+
var children = wp.blocks.source.children;
|
8 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
9 |
+
|
10 |
+
String.prototype.stripSlashes = function(){
|
11 |
+
return this.replace(/\\(.)/mg, "$1");
|
12 |
+
}
|
13 |
+
|
14 |
+
var wplc_logo = ( wplc_settings.wplc_logo ) ? wplc_settings.wplc_logo : 'https://bleeper.io/app/assets/images/wplc_loading.png';
|
15 |
+
var wplc_text = ( wplc_settings.wplc_text ) ? wplc_settings.wplc_text : 'Live Chat';
|
16 |
+
var wplc_icon = ( wplc_settings.wplc_icon ) ? wplc_settings.wplc_icon : 'fa-commenting-o';
|
17 |
+
var classes = ( wplc_settings.wplc_enabled == 0 ) ? ' disabled' : '';
|
18 |
+
var icon_classes = ( wplc_settings.wplc_icon_enabled == 0 ) ? ' disabled' : '';
|
19 |
+
var size_class = ' md';
|
20 |
+
var default_template = '<!-- Default HTML --><div class="wplc_block"><span class="wplc_block_logo">{wplc_logo}</span><span class="wplc_block_text">{wplc_text}</span><span class="wplc_block_icon">{wplc_icon}</span></div>';
|
21 |
+
var wplc_template = ( wplc_settings.wplc_custom_html ) ? wplc_settings.wplc_custom_html : default_template;
|
22 |
+
wplc_template = wplc_template.stripSlashes();
|
23 |
+
|
24 |
+
if ( wplc_settings.wplc_size == 1 ) {
|
25 |
+
size_class = ' sm';
|
26 |
+
} else if ( wplc_settings.wplc_size == 2 ) {
|
27 |
+
size_class = ' md';
|
28 |
+
} else if ( wplc_settings.wplc_size == 3 ) {
|
29 |
+
size_class = ' lg';
|
30 |
+
}
|
31 |
+
|
32 |
+
var wplc_styles = {
|
33 |
+
backgroundImage: 'url(' + wplc_logo + ')'
|
34 |
+
}
|
35 |
+
|
36 |
+
var placeholder_codes = ['wplc_logo', 'wplc_text', 'wplc_icon'],
|
37 |
+
placeholder_values = ['<span class="wplc_block_logo" style="background-image: url(\'' + wplc_logo + '\');"></span>', wplc_text, '<i class="fa ' + wplc_icon + '"></i>'];
|
38 |
+
|
39 |
+
for( var i = 0; i < placeholder_codes.length; i++ ) {
|
40 |
+
wplc_template = wplc_template.replace(new RegExp('{' + placeholder_codes[i] + '}', 'gi'), placeholder_values[i]);
|
41 |
+
}
|
42 |
+
|
43 |
+
registerBlockType( 'wp-live-chat-support/wplc-chat-box', {
|
44 |
+
title: __( 'WP Live Chat Trigger (WP Live Chat Support)', 'WPLC' ),
|
45 |
+
icon: 'format-chat',
|
46 |
+
category: 'common',
|
47 |
+
|
48 |
+
edit: function( props ) {
|
49 |
+
output_wplc_block_logo = el(
|
50 |
+
'span',
|
51 |
+
{ className: 'wplc_block_logo',
|
52 |
+
style: wplc_styles
|
53 |
+
}
|
54 |
+
);
|
55 |
+
output_wplc_block_text = el(
|
56 |
+
'span',
|
57 |
+
{ className: 'wplc_block_text' },
|
58 |
+
wplc_text
|
59 |
+
);
|
60 |
+
|
61 |
+
icon = el(
|
62 |
+
'i',
|
63 |
+
{ className: 'fa fa-commenting-o' }
|
64 |
+
);
|
65 |
+
|
66 |
+
output_wplc_block_icon = el(
|
67 |
+
'span',
|
68 |
+
{ className: 'wplc_block_icon' + icon_classes },
|
69 |
+
icon
|
70 |
+
);
|
71 |
+
|
72 |
+
output = el(
|
73 |
+
'span',
|
74 |
+
{ className: 'wplc_block' + classes + size_class },
|
75 |
+
output_wplc_block_logo,
|
76 |
+
output_wplc_block_text,
|
77 |
+
output_wplc_block_icon
|
78 |
+
);
|
79 |
+
|
80 |
+
return el(
|
81 |
+
'div',
|
82 |
+
{ id: 'wplc-chat-box',
|
83 |
+
className: classes,
|
84 |
+
dangerouslySetInnerHTML: { __html: wplc_template }
|
85 |
+
},
|
86 |
+
);
|
87 |
+
},
|
88 |
+
|
89 |
+
save: function( props ) {
|
90 |
+
output_wplc_block_logo = el(
|
91 |
+
'span',
|
92 |
+
{ className: 'wplc_block_logo',
|
93 |
+
style: wplc_styles
|
94 |
+
}
|
95 |
+
);
|
96 |
+
output_wplc_block_text = el(
|
97 |
+
'span',
|
98 |
+
{ className: 'wplc_block_text' },
|
99 |
+
wplc_text
|
100 |
+
);
|
101 |
+
|
102 |
+
icon = el(
|
103 |
+
'i',
|
104 |
+
{ className: 'fa fa-commenting-o' }
|
105 |
+
);
|
106 |
+
|
107 |
+
output_wplc_block_icon = el(
|
108 |
+
'span',
|
109 |
+
{ className: 'wplc_block_icon' + icon_classes },
|
110 |
+
icon
|
111 |
+
);
|
112 |
+
|
113 |
+
output = el(
|
114 |
+
'span',
|
115 |
+
{ className: 'wplc_block' + classes + size_class },
|
116 |
+
output_wplc_block_logo,
|
117 |
+
output_wplc_block_text,
|
118 |
+
output_wplc_block_icon
|
119 |
+
);
|
120 |
+
|
121 |
+
return el(
|
122 |
+
'div',
|
123 |
+
{ id: 'wplc-chat-box',
|
124 |
+
className: classes,
|
125 |
+
dangerouslySetInnerHTML: { __html: wplc_template }
|
126 |
+
}
|
127 |
+
);
|
128 |
+
},
|
129 |
+
} );
|
130 |
+
})();
|
|
includes/blocks/wplc-chat-box/editor.css
CHANGED
@@ -1,90 +1,90 @@
|
|
1 |
-
/* CSS for block-editor */
|
2 |
-
|
3 |
-
.wplc_block {
|
4 |
-
position: relative;
|
5 |
-
display:inline-block;
|
6 |
-
background: #32373c;
|
7 |
-
color: #eee;
|
8 |
-
border-radius: 3px;
|
9 |
-
height: 35px;
|
10 |
-
padding-left: 40px;
|
11 |
-
margin: 5px 0 5px 0;
|
12 |
-
transition: all .2s ease-in-out;
|
13 |
-
cursor: pointer;
|
14 |
-
border-bottom: 0px solid #111;
|
15 |
-
font-size: 17px;
|
16 |
-
line-height: 35px;
|
17 |
-
}
|
18 |
-
|
19 |
-
.wplc_block:hover {
|
20 |
-
transform: translateY(-2px);
|
21 |
-
}
|
22 |
-
|
23 |
-
.wplc_block:after {
|
24 |
-
content: "";
|
25 |
-
position: absolute;
|
26 |
-
display: block;
|
27 |
-
height: 0px;
|
28 |
-
bottom: 0;
|
29 |
-
left: 0;
|
30 |
-
width: 100%;
|
31 |
-
background-color: #000;
|
32 |
-
opacity: 0;
|
33 |
-
transition: all .2s ease-in-out;
|
34 |
-
}
|
35 |
-
|
36 |
-
.wplc_block:hover:after {
|
37 |
-
height: 3px;
|
38 |
-
opacity: .2
|
39 |
-
}
|
40 |
-
|
41 |
-
.wplc_block.disabled:after {
|
42 |
-
content: "Disabled";
|
43 |
-
color:#fff;
|
44 |
-
font-size: 17px;
|
45 |
-
text-transform: uppercase;
|
46 |
-
text-align: center;
|
47 |
-
display: block;
|
48 |
-
position: absolute;
|
49 |
-
height: 100%;
|
50 |
-
width: 100%;
|
51 |
-
bottom: 0;
|
52 |
-
left: 0;
|
53 |
-
background: #ED832F;
|
54 |
-
opacity: .9;
|
55 |
-
}
|
56 |
-
|
57 |
-
.wplc_block_logo {
|
58 |
-
width: 35px;
|
59 |
-
height: 35px;
|
60 |
-
position: absolute;
|
61 |
-
left: 0;
|
62 |
-
background: #e7e7e7;
|
63 |
-
display: inline-block;
|
64 |
-
margin:0;
|
65 |
-
background-size: cover;
|
66 |
-
background-position: center;
|
67 |
-
background-color:#ED832F !important;
|
68 |
-
transition: all .2s ease-in-out;
|
69 |
-
box-sizing: border-box;
|
70 |
-
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
71 |
-
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
72 |
-
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
73 |
-
}
|
74 |
-
|
75 |
-
.wplc_block_text {
|
76 |
-
display: inline-block;
|
77 |
-
height: 100%;
|
78 |
-
margin-right: 7px;
|
79 |
-
}
|
80 |
-
|
81 |
-
.wplc_block_icon {
|
82 |
-
height: 100%;
|
83 |
-
width: 35px;
|
84 |
-
background: transparent;
|
85 |
-
display: inline-block;
|
86 |
-
}
|
87 |
-
|
88 |
-
.wplc_block_icon.disabled {
|
89 |
-
display: none;
|
90 |
}
|
1 |
+
/* CSS for block-editor */
|
2 |
+
|
3 |
+
.wplc_block {
|
4 |
+
position: relative;
|
5 |
+
display:inline-block;
|
6 |
+
background: #32373c;
|
7 |
+
color: #eee;
|
8 |
+
border-radius: 3px;
|
9 |
+
height: 35px;
|
10 |
+
padding-left: 40px;
|
11 |
+
margin: 5px 0 5px 0;
|
12 |
+
transition: all .2s ease-in-out;
|
13 |
+
cursor: pointer;
|
14 |
+
border-bottom: 0px solid #111;
|
15 |
+
font-size: 17px;
|
16 |
+
line-height: 35px;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wplc_block:hover {
|
20 |
+
transform: translateY(-2px);
|
21 |
+
}
|
22 |
+
|
23 |
+
.wplc_block:after {
|
24 |
+
content: "";
|
25 |
+
position: absolute;
|
26 |
+
display: block;
|
27 |
+
height: 0px;
|
28 |
+
bottom: 0;
|
29 |
+
left: 0;
|
30 |
+
width: 100%;
|
31 |
+
background-color: #000;
|
32 |
+
opacity: 0;
|
33 |
+
transition: all .2s ease-in-out;
|
34 |
+
}
|
35 |
+
|
36 |
+
.wplc_block:hover:after {
|
37 |
+
height: 3px;
|
38 |
+
opacity: .2
|
39 |
+
}
|
40 |
+
|
41 |
+
.wplc_block.disabled:after {
|
42 |
+
content: "Disabled";
|
43 |
+
color:#fff;
|
44 |
+
font-size: 17px;
|
45 |
+
text-transform: uppercase;
|
46 |
+
text-align: center;
|
47 |
+
display: block;
|
48 |
+
position: absolute;
|
49 |
+
height: 100%;
|
50 |
+
width: 100%;
|
51 |
+
bottom: 0;
|
52 |
+
left: 0;
|
53 |
+
background: #ED832F;
|
54 |
+
opacity: .9;
|
55 |
+
}
|
56 |
+
|
57 |
+
.wplc_block_logo {
|
58 |
+
width: 35px;
|
59 |
+
height: 35px;
|
60 |
+
position: absolute;
|
61 |
+
left: 0;
|
62 |
+
background: #e7e7e7;
|
63 |
+
display: inline-block;
|
64 |
+
margin:0;
|
65 |
+
background-size: cover;
|
66 |
+
background-position: center;
|
67 |
+
background-color:#ED832F !important;
|
68 |
+
transition: all .2s ease-in-out;
|
69 |
+
box-sizing: border-box;
|
70 |
+
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
71 |
+
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
72 |
+
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
73 |
+
}
|
74 |
+
|
75 |
+
.wplc_block_text {
|
76 |
+
display: inline-block;
|
77 |
+
height: 100%;
|
78 |
+
margin-right: 7px;
|
79 |
+
}
|
80 |
+
|
81 |
+
.wplc_block_icon {
|
82 |
+
height: 100%;
|
83 |
+
width: 35px;
|
84 |
+
background: transparent;
|
85 |
+
display: inline-block;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wplc_block_icon.disabled {
|
89 |
+
display: none;
|
90 |
}
|
includes/blocks/wplc-chat-box/index.php
CHANGED
@@ -1,242 +1,241 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BLOCK: WP Live Chat Support Chat box
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
function wplc_gutenberg_block_settings() {
|
11 |
-
add_filter('wplc_filter_setting_tabs','wplc_gutenberg_setting_tabs');
|
12 |
-
add_action("wplc_hook_settings_page_more_tabs","wplc_gutenberg_settings_content");
|
13 |
-
}
|
14 |
-
|
15 |
-
add_action('admin_init', 'wplc_gutenberg_block_settings');
|
16 |
-
|
17 |
-
function wplc_gutenberg_setting_tabs($tab_array) {
|
18 |
-
$tab_array['gutenberg'] = array(
|
19 |
-
'href' => '#tabs-gutenberg',
|
20 |
-
'icon' => 'fa fa-commenting-o',
|
21 |
-
'label' => __('Gutenberg Blocks', 'wplivechat')
|
22 |
-
);
|
23 |
-
return $tab_array;
|
24 |
-
}
|
25 |
-
|
26 |
-
function wplc_gutenberg_settings_content() {
|
27 |
-
$gutenberg_settings = get_option('wplc_gutenberg_settings');
|
28 |
-
|
29 |
-
$gutenberg_enable = ( $gutenberg_settings['wplc_gutenberg_enable'] !== null ) ? $gutenberg_settings['wplc_gutenberg_enable'] : 1;
|
30 |
-
$checked = ( @$gutenberg_enable == 1 ? 'checked' : '' );
|
31 |
-
$gutenberg_size = ( $gutenberg_settings['wplc_gutenberg_size'] ) ? $gutenberg_settings['wplc_gutenberg_size'] : 2;
|
32 |
-
$gutenberg_defail_logo = 'https://bleeper.io/app/assets/images/wplc_loading.png';
|
33 |
-
$gutenberg_logo = ( $gutenberg_settings['wplc_gutenberg_logo'] == '' ) ? $gutenberg_defail_logo : $gutenberg_settings['wplc_gutenberg_logo'];
|
34 |
-
$gutenberg_text = ( $gutenberg_settings['wplc_gutenberg_text'] ) ? $gutenberg_settings['wplc_gutenberg_text'] : 'Live Chat';
|
35 |
-
$gutenberg_icon = ( $gutenberg_settings['wplc_gutenberg_icon'] ) ? $gutenberg_settings['wplc_gutenberg_icon'] : 'fa-commenting-o';
|
36 |
-
$gutenberg_enable_icon = ( $gutenberg_settings['wplc_gutenberg_enable_icon'] !== null ) ? $gutenberg_settings['wplc_gutenberg_enable_icon'] : 1;
|
37 |
-
$icon_checked = ( @$gutenberg_enable_icon == 1 ? 'checked' : '' );
|
38 |
-
$gutenberg_custom_html = ( $gutenberg_settings['wplc_custom_html'] ) ? $gutenberg_settings['wplc_custom_html'] : '';
|
39 |
-
?>
|
40 |
-
|
41 |
-
<div id="tabs-gutenberg">
|
42 |
-
<h3><?php _e('Gutenberg Blocks', 'wplivechat') ?></h3>
|
43 |
-
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
|
44 |
-
|
45 |
-
<tr>
|
46 |
-
<td width='300' valign='top'><?php _e('Enable Gutenberg Blocks', 'wplivechat') ?>:</td>
|
47 |
-
|
48 |
-
<td>
|
49 |
-
<input type="checkbox" id="activate_block" name="activate_block" <?php echo $checked ?>/>
|
50 |
-
</td>
|
51 |
-
</tr>
|
52 |
-
|
53 |
-
<tr>
|
54 |
-
<td width='300' valign='top'><?php _e('Gutenberg Block Size', 'wplivechat') ?>:</td>
|
55 |
-
<td>
|
56 |
-
<select id="wplc_gutenberg_size" name="wplc_gutenberg_size" value="1">
|
57 |
-
<option <?php echo ($gutenberg_size == 1) ? 'selected' : ''; ?> value="1">Small</option>
|
58 |
-
<option <?php echo ($gutenberg_size == 2) ? 'selected' : ''; ?> value="2">Medium</option>
|
59 |
-
<option <?php echo ($gutenberg_size == 3) ? 'selected' : ''; ?> value="3">Large</option>
|
60 |
-
</select>
|
61 |
-
</td>
|
62 |
-
</tr>
|
63 |
-
|
64 |
-
<tr>
|
65 |
-
<td width='300' valign='top'><?php _e('Block Logo', 'wplivechat') ?>:</td>
|
66 |
-
|
67 |
-
<td>
|
68 |
-
<input type="button" id="wplc_gutenberg_upload_logo" class="button button-primary" value="Upload Logo"/>
|
69 |
-
<input type="button" id="wplc_gutenberg_remove_logo" class="button button-default" value="Reset Logo"/>
|
70 |
-
<input type="hidden" id="wplc_gutenberg_default_logo" value="<?php echo $gutenberg_defail_logo; ?>" />
|
71 |
-
<input type="hidden" id="wplc_gutenberg_logo" name="wplc_gutenberg_logo" value="<?php echo $gutenberg_logo; ?>"/>
|
72 |
-
</td>
|
73 |
-
</tr>
|
74 |
-
|
75 |
-
<tr>
|
76 |
-
<td width='300' valign='top'><?php _e('Block Text', 'wplivechat') ?>:</td>
|
77 |
-
|
78 |
-
<td>
|
79 |
-
<input type="text" id="wplc_gutenberg_text" name="wplc_gutenberg_text" placeholder="Block text" value="<?php echo $gutenberg_text ?>"/>
|
80 |
-
</td>
|
81 |
-
</tr>
|
82 |
-
|
83 |
-
<tr>
|
84 |
-
<td width='300' valign='top'><?php _e('Display Icon', 'wplivechat') ?>:<td>
|
85 |
-
<input type="checkbox" id="wplc_gutenberg_enable_icon" name="wplc_gutenberg_enable_icon" <?php echo $icon_checked; ?>/>
|
86 |
-
</td>
|
87 |
-
</tr>
|
88 |
-
|
89 |
-
<tr>
|
90 |
-
<td width='300' valign='top'><?php _e('Block Icon', 'wplivechat') ?>:</td>
|
91 |
-
|
92 |
-
<td>
|
93 |
-
<input type="text" id="wplc_gutenberg_icon" name="wplc_gutenberg_icon" placeholder="Block icon" value="<?php echo $gutenberg_icon ?>"/>
|
94 |
-
</td>
|
95 |
-
</tr>
|
96 |
-
|
97 |
-
<tr>
|
98 |
-
<td width='300' valign='top'><?php _e("Block Preview", "wplivechat") ?>:</td>
|
99 |
-
|
100 |
-
<td>
|
101 |
-
<div id="wplc-chat-box" class="wplc_gutenberg_preview"></div>
|
102 |
-
</td>
|
103 |
-
</tr>
|
104 |
-
|
105 |
-
<tr>
|
106 |
-
<td width='300' valign='top'><?php _e('Custom HTML Template', 'wplivechat') ?>:
|
107 |
-
<small><p><i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip"></i> You can use the following placeholders to add content dynamically:</p>
|
108 |
-
<p><code class="wplc_code" title="Click to copy text">{wplc_logo}</code> - <?php _e('Displays the chosen logo', 'wplivechat'); ?></p>
|
109 |
-
<p><code class="wplc_code" title="Click to copy text">{wplc_text}</code> - <?php _e('Displays the chosen custom text', 'wplivechat'); ?></p>
|
110 |
-
<p><code class="wplc_code" title="Click to copy text">{wplc_icon}</code> - <?php _e('Displays the chosen icon', 'wplivechat'); ?></p></small>
|
111 |
-
</td>
|
112 |
-
|
113 |
-
<td>
|
114 |
-
<div id='wplc_custom_html_editor'></div>
|
115 |
-
<textarea name='wplc_custom_html' id='wplc_custom_html' style='display: none;' data-editor='css' rows='12'>
|
116 |
-
<?php echo strip_tags( stripslashes( trim($gutenberg_custom_html))); ?>
|
117 |
-
</textarea>
|
118 |
-
|
119 |
-
|
120 |
-
<input type="button" id="wplc_gutenberg_reset_html" class="button button-default" value="Reset Default"/>
|
121 |
-
<select id="wplc_custom_templates">
|
122 |
-
<option selected value="0">Select a Template</option>
|
123 |
-
<option value="template_default">Default - Dark</option>
|
124 |
-
<option value="template_default_light">Default - Light</option>
|
125 |
-
<option value="template_default_tooltip">Default - Tooltip</option>
|
126 |
-
<option value="template_circle">Circle - Default</option>
|
127 |
-
<option value="template_tooltip">Circle - Tooltip</option>
|
128 |
-
<option value="template_circle_rotate">Circle - Rotating</option>
|
129 |
-
<option value="template_chat_bubble">Chat Bubble</option>
|
130 |
-
|
131 |
-
</select>
|
132 |
-
</td>
|
133 |
-
</tr>
|
134 |
-
</table>
|
135 |
-
</div>
|
136 |
-
|
137 |
-
<?php
|
138 |
-
}
|
139 |
-
|
140 |
-
add_action('wplc_hook_admin_settings_save','wplc_gutenberg_save_settings');
|
141 |
-
|
142 |
-
function wplc_gutenberg_save_settings() {
|
143 |
-
|
144 |
-
if (isset($_POST['wplc_save_settings'])) {
|
145 |
-
|
146 |
-
if (isset($_POST['activate_block'])) {
|
147 |
-
$wplc_gutenberg_data['wplc_gutenberg_enable'] = 1;
|
148 |
-
} else {
|
149 |
-
$wplc_gutenberg_data['wplc_gutenberg_enable'] = 0;
|
150 |
-
}
|
151 |
-
|
152 |
-
if (isset($_POST['wplc_gutenberg_logo']) && $_POST['wplc_gutenberg_logo'] !== '0') {
|
153 |
-
$wplc_gutenberg_data['wplc_gutenberg_logo'] = esc_attr($_POST['wplc_gutenberg_logo']);
|
154 |
-
} else {
|
155 |
-
$wplc_gutenberg_data['wplc_gutenberg_logo'] = 'https://bleeper.io/app/assets/images/wplc_loading.png';
|
156 |
-
}
|
157 |
-
|
158 |
-
if (isset($_POST['wplc_gutenberg_size']) && $_POST['wplc_gutenberg_size'] !== '0') {
|
159 |
-
$wplc_gutenberg_data['wplc_gutenberg_size'] = esc_attr($_POST['wplc_gutenberg_size']);
|
160 |
-
} else {
|
161 |
-
$wplc_gutenberg_data['wplc_gutenberg_size'] = '2';
|
162 |
-
}
|
163 |
-
|
164 |
-
if (isset($_POST['wplc_gutenberg_text']) && $_POST['wplc_gutenberg_text'] !== '0') {
|
165 |
-
$wplc_gutenberg_data['wplc_gutenberg_text'] = esc_attr($_POST['wplc_gutenberg_text']);
|
166 |
-
} else {
|
167 |
-
$wplc_gutenberg_data['wplc_gutenberg_text'] = 'Live Chat';
|
168 |
-
}
|
169 |
-
|
170 |
-
if (isset($_POST['wplc_gutenberg_icon']) && $_POST['wplc_gutenberg_icon'] !== '0') {
|
171 |
-
$wplc_gutenberg_data['wplc_gutenberg_icon'] = esc_attr($_POST['wplc_gutenberg_icon']);
|
172 |
-
} else {
|
173 |
-
$wplc_gutenberg_data['wplc_gutenberg_icon'] = 'fa-commenting-o';
|
174 |
-
}
|
175 |
-
|
176 |
-
if (isset($_POST['wplc_gutenberg_enable_icon'])) {
|
177 |
-
$wplc_gutenberg_data['wplc_gutenberg_enable_icon'] = 1;
|
178 |
-
} else {
|
179 |
-
$wplc_gutenberg_data['wplc_gutenberg_enable_icon'] = 0;
|
180 |
-
}
|
181 |
-
|
182 |
-
if (isset($_POST['wplc_custom_html']) && $_POST['wplc_custom_html'] !== '0') {
|
183 |
-
$wplc_gutenberg_data['wplc_custom_html'] = esc_attr($_POST['wplc_custom_html']);
|
184 |
-
} else {
|
185 |
-
$default_html = '\n<div class="wplc_block">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
186 |
-
|
187 |
-
$wplc_gutenberg_data['wplc_custom_html'] = $default_html;
|
188 |
-
}
|
189 |
-
|
190 |
-
update_option('wplc_gutenberg_settings', $wplc_gutenberg_data);
|
191 |
-
}
|
192 |
-
}
|
193 |
-
|
194 |
-
add_action( 'enqueue_block_editor_assets', 'wplc_chat_box_block_editor_assets' );
|
195 |
-
|
196 |
-
function wplc_chat_box_block_editor_assets() {
|
197 |
-
// Scripts
|
198 |
-
wp_enqueue_script(
|
199 |
-
'wplc_chat_box',
|
200 |
-
plugins_url( 'block.js', __FILE__ ),
|
201 |
-
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
|
202 |
-
filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
|
203 |
-
);
|
204 |
-
|
205 |
-
$gutenberg_settings = get_option( 'wplc_gutenberg_settings' );
|
206 |
-
$gutenberg_logo = $gutenberg_settings['wplc_gutenberg_logo'];
|
207 |
-
$settings['
|
208 |
-
$settings['
|
209 |
-
$settings['
|
210 |
-
$settings['
|
211 |
-
|
212 |
-
|
213 |
-
$settings['
|
214 |
-
$settings['
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
'
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
'
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BLOCK: WP Live Chat Support Chat box
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
function wplc_gutenberg_block_settings() {
|
11 |
+
add_filter('wplc_filter_setting_tabs','wplc_gutenberg_setting_tabs');
|
12 |
+
add_action("wplc_hook_settings_page_more_tabs","wplc_gutenberg_settings_content");
|
13 |
+
}
|
14 |
+
|
15 |
+
add_action('admin_init', 'wplc_gutenberg_block_settings');
|
16 |
+
|
17 |
+
function wplc_gutenberg_setting_tabs($tab_array) {
|
18 |
+
$tab_array['gutenberg'] = array(
|
19 |
+
'href' => '#tabs-gutenberg',
|
20 |
+
'icon' => 'fa fa-commenting-o',
|
21 |
+
'label' => __('Gutenberg Blocks', 'wplivechat')
|
22 |
+
);
|
23 |
+
return $tab_array;
|
24 |
+
}
|
25 |
+
|
26 |
+
function wplc_gutenberg_settings_content() {
|
27 |
+
$gutenberg_settings = get_option('wplc_gutenberg_settings');
|
28 |
+
|
29 |
+
$gutenberg_enable = ( $gutenberg_settings['wplc_gutenberg_enable'] !== null ) ? $gutenberg_settings['wplc_gutenberg_enable'] : 1;
|
30 |
+
$checked = ( @$gutenberg_enable == 1 ? 'checked' : '' );
|
31 |
+
$gutenberg_size = ( $gutenberg_settings['wplc_gutenberg_size'] ) ? $gutenberg_settings['wplc_gutenberg_size'] : 2;
|
32 |
+
$gutenberg_defail_logo = 'https://bleeper.io/app/assets/images/wplc_loading.png';
|
33 |
+
$gutenberg_logo = ( $gutenberg_settings['wplc_gutenberg_logo'] == '' ) ? $gutenberg_defail_logo : $gutenberg_settings['wplc_gutenberg_logo'];
|
34 |
+
$gutenberg_text = ( $gutenberg_settings['wplc_gutenberg_text'] ) ? $gutenberg_settings['wplc_gutenberg_text'] : 'Live Chat';
|
35 |
+
$gutenberg_icon = ( $gutenberg_settings['wplc_gutenberg_icon'] ) ? $gutenberg_settings['wplc_gutenberg_icon'] : 'fa-commenting-o';
|
36 |
+
$gutenberg_enable_icon = ( $gutenberg_settings['wplc_gutenberg_enable_icon'] !== null ) ? $gutenberg_settings['wplc_gutenberg_enable_icon'] : 1;
|
37 |
+
$icon_checked = ( @$gutenberg_enable_icon == 1 ? 'checked' : '' );
|
38 |
+
$gutenberg_custom_html = ( $gutenberg_settings['wplc_custom_html'] ) ? $gutenberg_settings['wplc_custom_html'] : '';
|
39 |
+
?>
|
40 |
+
|
41 |
+
<div id="tabs-gutenberg">
|
42 |
+
<h3><?php _e('Gutenberg Blocks', 'wplivechat') ?></h3>
|
43 |
+
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
|
44 |
+
|
45 |
+
<tr>
|
46 |
+
<td width='300' valign='top'><?php _e('Enable Gutenberg Blocks', 'wplivechat') ?>:</td>
|
47 |
+
|
48 |
+
<td>
|
49 |
+
<input type="checkbox" id="activate_block" name="activate_block" <?php echo $checked ?>/>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
|
53 |
+
<tr>
|
54 |
+
<td width='300' valign='top'><?php _e('Gutenberg Block Size', 'wplivechat') ?>:</td>
|
55 |
+
<td>
|
56 |
+
<select id="wplc_gutenberg_size" name="wplc_gutenberg_size" value="1">
|
57 |
+
<option <?php echo ($gutenberg_size == 1) ? 'selected' : ''; ?> value="1">Small</option>
|
58 |
+
<option <?php echo ($gutenberg_size == 2) ? 'selected' : ''; ?> value="2">Medium</option>
|
59 |
+
<option <?php echo ($gutenberg_size == 3) ? 'selected' : ''; ?> value="3">Large</option>
|
60 |
+
</select>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
|
64 |
+
<tr>
|
65 |
+
<td width='300' valign='top'><?php _e('Block Logo', 'wplivechat') ?>:</td>
|
66 |
+
|
67 |
+
<td>
|
68 |
+
<input type="button" id="wplc_gutenberg_upload_logo" class="button button-primary" value="Upload Logo"/>
|
69 |
+
<input type="button" id="wplc_gutenberg_remove_logo" class="button button-default" value="Reset Logo"/>
|
70 |
+
<input type="hidden" id="wplc_gutenberg_default_logo" value="<?php echo $gutenberg_defail_logo; ?>" />
|
71 |
+
<input type="hidden" id="wplc_gutenberg_logo" name="wplc_gutenberg_logo" value="<?php echo $gutenberg_logo; ?>"/>
|
72 |
+
</td>
|
73 |
+
</tr>
|
74 |
+
|
75 |
+
<tr>
|
76 |
+
<td width='300' valign='top'><?php _e('Block Text', 'wplivechat') ?>:</td>
|
77 |
+
|
78 |
+
<td>
|
79 |
+
<input type="text" id="wplc_gutenberg_text" name="wplc_gutenberg_text" placeholder="Block text" value="<?php echo $gutenberg_text ?>"/>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
|
83 |
+
<tr>
|
84 |
+
<td width='300' valign='top'><?php _e('Display Icon', 'wplivechat') ?>:<td>
|
85 |
+
<input type="checkbox" id="wplc_gutenberg_enable_icon" name="wplc_gutenberg_enable_icon" <?php echo $icon_checked; ?>/>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
|
89 |
+
<tr>
|
90 |
+
<td width='300' valign='top'><?php _e('Block Icon', 'wplivechat') ?>:</td>
|
91 |
+
|
92 |
+
<td>
|
93 |
+
<input type="text" id="wplc_gutenberg_icon" name="wplc_gutenberg_icon" placeholder="Block icon" value="<?php echo $gutenberg_icon ?>"/>
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<td width='300' valign='top'><?php _e("Block Preview", "wplivechat") ?>:</td>
|
99 |
+
|
100 |
+
<td>
|
101 |
+
<div id="wplc-chat-box" class="wplc_gutenberg_preview"></div>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
|
105 |
+
<tr>
|
106 |
+
<td width='300' valign='top'><?php _e('Custom HTML Template', 'wplivechat') ?>:
|
107 |
+
<small><p><i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip"></i> You can use the following placeholders to add content dynamically:</p>
|
108 |
+
<p><code class="wplc_code" title="Click to copy text">{wplc_logo}</code> - <?php _e('Displays the chosen logo', 'wplivechat'); ?></p>
|
109 |
+
<p><code class="wplc_code" title="Click to copy text">{wplc_text}</code> - <?php _e('Displays the chosen custom text', 'wplivechat'); ?></p>
|
110 |
+
<p><code class="wplc_code" title="Click to copy text">{wplc_icon}</code> - <?php _e('Displays the chosen icon', 'wplivechat'); ?></p></small>
|
111 |
+
</td>
|
112 |
+
|
113 |
+
<td>
|
114 |
+
<div id='wplc_custom_html_editor'></div>
|
115 |
+
<textarea name='wplc_custom_html' id='wplc_custom_html' style='display: none;' data-editor='css' rows='12'>
|
116 |
+
<?php echo strip_tags( stripslashes( trim($gutenberg_custom_html))); ?>
|
117 |
+
</textarea>
|
118 |
+
|
119 |
+
|
120 |
+
<input type="button" id="wplc_gutenberg_reset_html" class="button button-default" value="Reset Default"/>
|
121 |
+
<select id="wplc_custom_templates">
|
122 |
+
<option selected value="0">Select a Template</option>
|
123 |
+
<option value="template_default">Default - Dark</option>
|
124 |
+
<option value="template_default_light">Default - Light</option>
|
125 |
+
<option value="template_default_tooltip">Default - Tooltip</option>
|
126 |
+
<option value="template_circle">Circle - Default</option>
|
127 |
+
<option value="template_tooltip">Circle - Tooltip</option>
|
128 |
+
<option value="template_circle_rotate">Circle - Rotating</option>
|
129 |
+
<option value="template_chat_bubble">Chat Bubble</option>
|
130 |
+
|
131 |
+
</select>
|
132 |
+
</td>
|
133 |
+
</tr>
|
134 |
+
</table>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<?php
|
138 |
+
}
|
139 |
+
|
140 |
+
add_action('wplc_hook_admin_settings_save','wplc_gutenberg_save_settings');
|
141 |
+
|
142 |
+
function wplc_gutenberg_save_settings() {
|
143 |
+
|
144 |
+
if (isset($_POST['wplc_save_settings'])) {
|
145 |
+
|
146 |
+
if (isset($_POST['activate_block'])) {
|
147 |
+
$wplc_gutenberg_data['wplc_gutenberg_enable'] = 1;
|
148 |
+
} else {
|
149 |
+
$wplc_gutenberg_data['wplc_gutenberg_enable'] = 0;
|
150 |
+
}
|
151 |
+
|
152 |
+
if (isset($_POST['wplc_gutenberg_logo']) && $_POST['wplc_gutenberg_logo'] !== '0') {
|
153 |
+
$wplc_gutenberg_data['wplc_gutenberg_logo'] = esc_attr($_POST['wplc_gutenberg_logo']);
|
154 |
+
} else {
|
155 |
+
$wplc_gutenberg_data['wplc_gutenberg_logo'] = 'https://bleeper.io/app/assets/images/wplc_loading.png';
|
156 |
+
}
|
157 |
+
|
158 |
+
if (isset($_POST['wplc_gutenberg_size']) && $_POST['wplc_gutenberg_size'] !== '0') {
|
159 |
+
$wplc_gutenberg_data['wplc_gutenberg_size'] = esc_attr($_POST['wplc_gutenberg_size']);
|
160 |
+
} else {
|
161 |
+
$wplc_gutenberg_data['wplc_gutenberg_size'] = '2';
|
162 |
+
}
|
163 |
+
|
164 |
+
if (isset($_POST['wplc_gutenberg_text']) && $_POST['wplc_gutenberg_text'] !== '0') {
|
165 |
+
$wplc_gutenberg_data['wplc_gutenberg_text'] = esc_attr($_POST['wplc_gutenberg_text']);
|
166 |
+
} else {
|
167 |
+
$wplc_gutenberg_data['wplc_gutenberg_text'] = 'Live Chat';
|
168 |
+
}
|
169 |
+
|
170 |
+
if (isset($_POST['wplc_gutenberg_icon']) && $_POST['wplc_gutenberg_icon'] !== '0') {
|
171 |
+
$wplc_gutenberg_data['wplc_gutenberg_icon'] = esc_attr($_POST['wplc_gutenberg_icon']);
|
172 |
+
} else {
|
173 |
+
$wplc_gutenberg_data['wplc_gutenberg_icon'] = 'fa-commenting-o';
|
174 |
+
}
|
175 |
+
|
176 |
+
if (isset($_POST['wplc_gutenberg_enable_icon'])) {
|
177 |
+
$wplc_gutenberg_data['wplc_gutenberg_enable_icon'] = 1;
|
178 |
+
} else {
|
179 |
+
$wplc_gutenberg_data['wplc_gutenberg_enable_icon'] = 0;
|
180 |
+
}
|
181 |
+
|
182 |
+
if (isset($_POST['wplc_custom_html']) && $_POST['wplc_custom_html'] !== '0') {
|
183 |
+
$wplc_gutenberg_data['wplc_custom_html'] = esc_attr($_POST['wplc_custom_html']);
|
184 |
+
} else {
|
185 |
+
$default_html = '\n<div class="wplc_block">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
186 |
+
|
187 |
+
$wplc_gutenberg_data['wplc_custom_html'] = $default_html;
|
188 |
+
}
|
189 |
+
|
190 |
+
update_option('wplc_gutenberg_settings', $wplc_gutenberg_data);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
add_action( 'enqueue_block_editor_assets', 'wplc_chat_box_block_editor_assets' );
|
195 |
+
|
196 |
+
function wplc_chat_box_block_editor_assets() {
|
197 |
+
// Scripts
|
198 |
+
wp_enqueue_script(
|
199 |
+
'wplc_chat_box',
|
200 |
+
plugins_url( 'block.js', __FILE__ ),
|
201 |
+
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
|
202 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
|
203 |
+
);
|
204 |
+
|
205 |
+
$gutenberg_settings = get_option( 'wplc_gutenberg_settings' );
|
206 |
+
$gutenberg_logo = $gutenberg_settings['wplc_gutenberg_logo'];
|
207 |
+
$settings['wplc_enabled'] = $gutenberg_settings['wplc_gutenberg_enable'];
|
208 |
+
$settings['wplc_size'] = ( $gutenberg_settings['wplc_gutenberg_size'] ? esc_attr( $gutenberg_settings['wplc_gutenberg_size'] ) : 2 );
|
209 |
+
$settings['wplc_logo'] = $gutenberg_logo;
|
210 |
+
$settings['wplc_text'] = ( $gutenberg_settings['wplc_gutenberg_text'] ? esc_attr( $gutenberg_settings['wplc_gutenberg_text'] ) : __( 'Live Chat', 'wplivechat' ) );
|
211 |
+
|
212 |
+
$settings['wplc_icon'] = ( $gutenberg_settings['wplc_gutenberg_icon'] ? esc_attr( $gutenberg_settings['wplc_gutenberg_icon'] ) : 'fa-commenting-o' );
|
213 |
+
$settings['wplc_icon_enabled'] = $gutenberg_settings['wplc_gutenberg_enable_icon'];
|
214 |
+
$settings['wplc_custom_html'] = $gutenberg_settings['wplc_custom_html'];
|
215 |
+
|
216 |
+
wp_localize_script( 'wplc_chat_box', 'wplc_settings', $settings );
|
217 |
+
|
218 |
+
// Styles
|
219 |
+
wp_enqueue_style(
|
220 |
+
'wplc_chat_box-editor',
|
221 |
+
plugins_url( 'editor.css', __FILE__ ),
|
222 |
+
array( 'wp-edit-blocks' ),
|
223 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )
|
224 |
+
);
|
225 |
+
}
|
226 |
+
|
227 |
+
add_action( 'enqueue_block_assets', 'wplc_chat_box_block_block_assets' );
|
228 |
+
|
229 |
+
function wplc_chat_box_block_block_assets() {
|
230 |
+
// Styles for front-end
|
231 |
+
wp_enqueue_style(
|
232 |
+
'wplc_chat_box-front-end',
|
233 |
+
plugins_url( 'style.css', __FILE__ ),
|
234 |
+
array( 'wp-blocks' ),
|
235 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
|
236 |
+
);
|
237 |
+
wp_enqueue_style(
|
238 |
+
'wplc_chat_box-front-end-template', plugins_url( 'wplc_gutenberg_template_styles.css', __FILE__ ), array( 'wp-blocks' ),
|
239 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'wplc_gutenberg_template_styles.css' )
|
240 |
+
);
|
241 |
+
}
|
|
includes/blocks/wplc-chat-box/style.css
CHANGED
@@ -1,149 +1,149 @@
|
|
1 |
-
/* CSS for front-end block */
|
2 |
-
#wplc-chat-box {
|
3 |
-
width: fit-content;
|
4 |
-
position: relative;
|
5 |
-
cursor: pointer;
|
6 |
-
}
|
7 |
-
|
8 |
-
.wplc_block {
|
9 |
-
position: relative;
|
10 |
-
display:inline-block;
|
11 |
-
background: #32373c;
|
12 |
-
color: #eee;
|
13 |
-
border-radius: 3px;
|
14 |
-
height: 35px;
|
15 |
-
padding-left: 45px;
|
16 |
-
margin: 5px 0 5px 0;
|
17 |
-
transition: all .2s ease-in-out;
|
18 |
-
cursor: pointer;
|
19 |
-
border-bottom: 0px solid #111;
|
20 |
-
font-size: 17px;
|
21 |
-
line-height: 35px;
|
22 |
-
}
|
23 |
-
|
24 |
-
|
25 |
-
.wplc_block:hover {
|
26 |
-
transform: translateY(-2px);
|
27 |
-
}
|
28 |
-
|
29 |
-
.wplc_block:after {
|
30 |
-
content: "";
|
31 |
-
position: absolute;
|
32 |
-
display: block;
|
33 |
-
height: 0px;
|
34 |
-
bottom: 0;
|
35 |
-
left: 0;
|
36 |
-
width: 100%;
|
37 |
-
background-color: #000;
|
38 |
-
opacity: 0;
|
39 |
-
transition: all .2s ease-in-out;
|
40 |
-
}
|
41 |
-
|
42 |
-
.wplc_block:hover:after {
|
43 |
-
height: 3px;
|
44 |
-
opacity: .2;
|
45 |
-
}
|
46 |
-
|
47 |
-
#wplc-chat-box.disabled:first-child:after {
|
48 |
-
content: "Disabled";
|
49 |
-
color:#fff;
|
50 |
-
font-size: 17px;
|
51 |
-
text-transform: uppercase;
|
52 |
-
text-align: center;
|
53 |
-
display: block;
|
54 |
-
position: absolute;
|
55 |
-
height: 100%;
|
56 |
-
width: 100%;
|
57 |
-
bottom: 0;
|
58 |
-
left: 0;
|
59 |
-
background: #ED832F;
|
60 |
-
opacity: .9;
|
61 |
-
}
|
62 |
-
|
63 |
-
.wplc_block_logo {
|
64 |
-
width: 35px;
|
65 |
-
height: 35px;
|
66 |
-
position: absolute;
|
67 |
-
left: 0;
|
68 |
-
background: #e7e7e7;
|
69 |
-
display: inline-block;
|
70 |
-
margin:0;
|
71 |
-
background-size: cover;
|
72 |
-
background-position: center;
|
73 |
-
background-color:#ED832F !important;
|
74 |
-
transition: all .2s ease-in-out;
|
75 |
-
box-sizing: border-box;
|
76 |
-
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
77 |
-
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
78 |
-
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
79 |
-
}
|
80 |
-
|
81 |
-
.wplc_block_text {
|
82 |
-
display: inline-block;
|
83 |
-
height: 100%;
|
84 |
-
margin-right: 7px;
|
85 |
-
}
|
86 |
-
|
87 |
-
.wplc_block_icon {
|
88 |
-
height: 100%;
|
89 |
-
width: 35px;
|
90 |
-
background: transparent;
|
91 |
-
display: inline-block;
|
92 |
-
}
|
93 |
-
|
94 |
-
.wplc_block_icon.disabled {
|
95 |
-
display: none;
|
96 |
-
}
|
97 |
-
|
98 |
-
/* Block size styles: small */
|
99 |
-
.wplc_block.sm {
|
100 |
-
height: 25px;
|
101 |
-
line-height: 25px;
|
102 |
-
padding-left: 30px;
|
103 |
-
font-size: 12px;
|
104 |
-
}
|
105 |
-
|
106 |
-
.wplc_block.sm:hover:after {
|
107 |
-
height: 2px;
|
108 |
-
opacity: .2;
|
109 |
-
}
|
110 |
-
|
111 |
-
.wplc_block.sm .wplc_block_logo {
|
112 |
-
height: 25px;
|
113 |
-
width: 25px;
|
114 |
-
}
|
115 |
-
|
116 |
-
.wplc_block.sm .wplc_block_text {
|
117 |
-
margin-right: 7px;
|
118 |
-
}
|
119 |
-
|
120 |
-
.wplc_block.sm .wplc_block_icon {
|
121 |
-
margin-right: 7px;
|
122 |
-
width: 13px;
|
123 |
-
}
|
124 |
-
|
125 |
-
/* Block size styles: large */
|
126 |
-
.wplc_block.lg {
|
127 |
-
height: 80px;
|
128 |
-
line-height: 80px;
|
129 |
-
padding-left: 100px;
|
130 |
-
font-size: 25px;
|
131 |
-
}
|
132 |
-
|
133 |
-
.wplc_block.lg:hover:after {
|
134 |
-
height: 6px;
|
135 |
-
opacity: .2;
|
136 |
-
}
|
137 |
-
|
138 |
-
.wplc_block.lg .wplc_block_logo {
|
139 |
-
height: 80px;
|
140 |
-
width: 80px;
|
141 |
-
}
|
142 |
-
|
143 |
-
.wplc_block.lg .wplc_block_text {
|
144 |
-
margin-right: 13px;
|
145 |
-
}
|
146 |
-
|
147 |
-
.wplc_block.lg .wplc_block_icon {
|
148 |
-
margin-right: 13px;
|
149 |
}
|
1 |
+
/* CSS for front-end block */
|
2 |
+
#wplc-chat-box {
|
3 |
+
width: fit-content;
|
4 |
+
position: relative;
|
5 |
+
cursor: pointer;
|
6 |
+
}
|
7 |
+
|
8 |
+
.wplc_block {
|
9 |
+
position: relative;
|
10 |
+
display:inline-block;
|
11 |
+
background: #32373c;
|
12 |
+
color: #eee;
|
13 |
+
border-radius: 3px;
|
14 |
+
height: 35px;
|
15 |
+
padding-left: 45px;
|
16 |
+
margin: 5px 0 5px 0;
|
17 |
+
transition: all .2s ease-in-out;
|
18 |
+
cursor: pointer;
|
19 |
+
border-bottom: 0px solid #111;
|
20 |
+
font-size: 17px;
|
21 |
+
line-height: 35px;
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
.wplc_block:hover {
|
26 |
+
transform: translateY(-2px);
|
27 |
+
}
|
28 |
+
|
29 |
+
.wplc_block:after {
|
30 |
+
content: "";
|
31 |
+
position: absolute;
|
32 |
+
display: block;
|
33 |
+
height: 0px;
|
34 |
+
bottom: 0;
|
35 |
+
left: 0;
|
36 |
+
width: 100%;
|
37 |
+
background-color: #000;
|
38 |
+
opacity: 0;
|
39 |
+
transition: all .2s ease-in-out;
|
40 |
+
}
|
41 |
+
|
42 |
+
.wplc_block:hover:after {
|
43 |
+
height: 3px;
|
44 |
+
opacity: .2;
|
45 |
+
}
|
46 |
+
|
47 |
+
#wplc-chat-box.disabled:first-child:after {
|
48 |
+
content: "Disabled";
|
49 |
+
color:#fff;
|
50 |
+
font-size: 17px;
|
51 |
+
text-transform: uppercase;
|
52 |
+
text-align: center;
|
53 |
+
display: block;
|
54 |
+
position: absolute;
|
55 |
+
height: 100%;
|
56 |
+
width: 100%;
|
57 |
+
bottom: 0;
|
58 |
+
left: 0;
|
59 |
+
background: #ED832F;
|
60 |
+
opacity: .9;
|
61 |
+
}
|
62 |
+
|
63 |
+
.wplc_block_logo {
|
64 |
+
width: 35px;
|
65 |
+
height: 35px;
|
66 |
+
position: absolute;
|
67 |
+
left: 0;
|
68 |
+
background: #e7e7e7;
|
69 |
+
display: inline-block;
|
70 |
+
margin:0;
|
71 |
+
background-size: cover;
|
72 |
+
background-position: center;
|
73 |
+
background-color:#ED832F !important;
|
74 |
+
transition: all .2s ease-in-out;
|
75 |
+
box-sizing: border-box;
|
76 |
+
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
77 |
+
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
78 |
+
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
79 |
+
}
|
80 |
+
|
81 |
+
.wplc_block_text {
|
82 |
+
display: inline-block;
|
83 |
+
height: 100%;
|
84 |
+
margin-right: 7px;
|
85 |
+
}
|
86 |
+
|
87 |
+
.wplc_block_icon {
|
88 |
+
height: 100%;
|
89 |
+
width: 35px;
|
90 |
+
background: transparent;
|
91 |
+
display: inline-block;
|
92 |
+
}
|
93 |
+
|
94 |
+
.wplc_block_icon.disabled {
|
95 |
+
display: none;
|
96 |
+
}
|
97 |
+
|
98 |
+
/* Block size styles: small */
|
99 |
+
.wplc_block.sm {
|
100 |
+
height: 25px;
|
101 |
+
line-height: 25px;
|
102 |
+
padding-left: 30px;
|
103 |
+
font-size: 12px;
|
104 |
+
}
|
105 |
+
|
106 |
+
.wplc_block.sm:hover:after {
|
107 |
+
height: 2px;
|
108 |
+
opacity: .2;
|
109 |
+
}
|
110 |
+
|
111 |
+
.wplc_block.sm .wplc_block_logo {
|
112 |
+
height: 25px;
|
113 |
+
width: 25px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.wplc_block.sm .wplc_block_text {
|
117 |
+
margin-right: 7px;
|
118 |
+
}
|
119 |
+
|
120 |
+
.wplc_block.sm .wplc_block_icon {
|
121 |
+
margin-right: 7px;
|
122 |
+
width: 13px;
|
123 |
+
}
|
124 |
+
|
125 |
+
/* Block size styles: large */
|
126 |
+
.wplc_block.lg {
|
127 |
+
height: 80px;
|
128 |
+
line-height: 80px;
|
129 |
+
padding-left: 100px;
|
130 |
+
font-size: 25px;
|
131 |
+
}
|
132 |
+
|
133 |
+
.wplc_block.lg:hover:after {
|
134 |
+
height: 6px;
|
135 |
+
opacity: .2;
|
136 |
+
}
|
137 |
+
|
138 |
+
.wplc_block.lg .wplc_block_logo {
|
139 |
+
height: 80px;
|
140 |
+
width: 80px;
|
141 |
+
}
|
142 |
+
|
143 |
+
.wplc_block.lg .wplc_block_text {
|
144 |
+
margin-right: 13px;
|
145 |
+
}
|
146 |
+
|
147 |
+
.wplc_block.lg .wplc_block_icon {
|
148 |
+
margin-right: 13px;
|
149 |
}
|
includes/blocks/wplc-chat-box/wplc_gutenberg_template_styles.css
CHANGED
@@ -1,366 +1,366 @@
|
|
1 |
-
/* WPLC Gutenber Template Styles */
|
2 |
-
|
3 |
-
#wplc-chat-box {
|
4 |
-
width: fit-content;
|
5 |
-
position: relative;
|
6 |
-
cursor: pointer;
|
7 |
-
}
|
8 |
-
|
9 |
-
.wplc_block {
|
10 |
-
position: relative;
|
11 |
-
display:inline-block;
|
12 |
-
background: #32373c;
|
13 |
-
color: #eee;
|
14 |
-
border-radius: 3px;
|
15 |
-
height: 35px;
|
16 |
-
padding-left: 45px;
|
17 |
-
margin: 5px 0 5px 0;
|
18 |
-
transition: all .2s ease-in-out;
|
19 |
-
cursor: pointer;
|
20 |
-
border-bottom: 0px solid #111;
|
21 |
-
font-size: 17px;
|
22 |
-
line-height: 35px;
|
23 |
-
}
|
24 |
-
|
25 |
-
|
26 |
-
.wplc_block:hover {
|
27 |
-
transform: translateY(-2px);
|
28 |
-
}
|
29 |
-
|
30 |
-
.wplc_block:after {
|
31 |
-
content: "";
|
32 |
-
position: absolute;
|
33 |
-
display: block;
|
34 |
-
height: 0px;
|
35 |
-
bottom: 0;
|
36 |
-
left: 0;
|
37 |
-
width: 100%;
|
38 |
-
background-color: #000;
|
39 |
-
opacity: 0;
|
40 |
-
transition: all .2s ease-in-out;
|
41 |
-
}
|
42 |
-
|
43 |
-
.wplc_block:hover:after {
|
44 |
-
height: 3px;
|
45 |
-
opacity: .2;
|
46 |
-
}
|
47 |
-
|
48 |
-
#wplc-chat-box.disabled:first-child:after {
|
49 |
-
content: "Disabled";
|
50 |
-
color:#fff;
|
51 |
-
font-size: 17px;
|
52 |
-
text-transform: uppercase;
|
53 |
-
text-align: center;
|
54 |
-
display: block;
|
55 |
-
position: absolute;
|
56 |
-
height: 100%;
|
57 |
-
width: 100%;
|
58 |
-
bottom: 0;
|
59 |
-
left: 0;
|
60 |
-
background: #ED832F;
|
61 |
-
opacity: .9;
|
62 |
-
}
|
63 |
-
|
64 |
-
.wplc_block_logo {
|
65 |
-
width: 35px;
|
66 |
-
height: 35px;
|
67 |
-
position: absolute;
|
68 |
-
left: 0;
|
69 |
-
background: #e7e7e7;
|
70 |
-
display: inline-block;
|
71 |
-
margin:0;
|
72 |
-
background-size: cover;
|
73 |
-
background-position: center;
|
74 |
-
background-color:#ED832F !important;
|
75 |
-
transition: all .2s ease-in-out;
|
76 |
-
box-sizing: border-box;
|
77 |
-
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
78 |
-
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
79 |
-
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
80 |
-
}
|
81 |
-
|
82 |
-
.wplc_block_text {
|
83 |
-
display: inline-block;
|
84 |
-
height: 100%;
|
85 |
-
margin-right: 7px;
|
86 |
-
}
|
87 |
-
|
88 |
-
.wplc_block_icon {
|
89 |
-
height: 100%;
|
90 |
-
width: 35px;
|
91 |
-
background: transparent;
|
92 |
-
display: inline-block;
|
93 |
-
}
|
94 |
-
|
95 |
-
.wplc_block_icon.disabled {
|
96 |
-
display: none;
|
97 |
-
}
|
98 |
-
|
99 |
-
/* Block size styles: small */
|
100 |
-
.wplc_block.sm {
|
101 |
-
height: 25px;
|
102 |
-
line-height: 25px;
|
103 |
-
padding-left: 30px;
|
104 |
-
font-size: 12px;
|
105 |
-
}
|
106 |
-
|
107 |
-
.wplc_block.sm:hover:after {
|
108 |
-
height: 2px;
|
109 |
-
opacity: .2;
|
110 |
-
}
|
111 |
-
|
112 |
-
.wplc_block.sm .wplc_block_logo {
|
113 |
-
height: 25px;
|
114 |
-
width: 25px;
|
115 |
-
}
|
116 |
-
|
117 |
-
.wplc_block.sm .wplc_block_text {
|
118 |
-
margin-right: 7px;
|
119 |
-
}
|
120 |
-
|
121 |
-
.wplc_block.sm .wplc_block_icon {
|
122 |
-
margin-right: 7px;
|
123 |
-
width: 13px;
|
124 |
-
}
|
125 |
-
|
126 |
-
/* Block size styles: large */
|
127 |
-
.wplc_block.lg {
|
128 |
-
height: 80px;
|
129 |
-
line-height: 80px;
|
130 |
-
padding-left: 100px;
|
131 |
-
font-size: 25px;
|
132 |
-
}
|
133 |
-
|
134 |
-
.wplc_block.lg:hover:after {
|
135 |
-
height: 6px;
|
136 |
-
opacity: .2;
|
137 |
-
}
|
138 |
-
|
139 |
-
.wplc_block.lg .wplc_block_logo {
|
140 |
-
height: 80px;
|
141 |
-
width: 80px;
|
142 |
-
}
|
143 |
-
|
144 |
-
.wplc_block.lg .wplc_block_text {
|
145 |
-
margin-right: 13px;
|
146 |
-
}
|
147 |
-
|
148 |
-
.wplc_block.lg .wplc_block_icon {
|
149 |
-
margin-right: 13px;
|
150 |
-
}
|
151 |
-
/* Custom Templates: Default - Light */
|
152 |
-
.wplc_block.light {
|
153 |
-
background: #ECEFF1;
|
154 |
-
color: #555;
|
155 |
-
border: 1px solid #ccc;
|
156 |
-
}
|
157 |
-
|
158 |
-
/* Custom Templates: Circle */
|
159 |
-
.wplc_block.circle {
|
160 |
-
background: transparent;
|
161 |
-
width: 50px;
|
162 |
-
height: 50px;
|
163 |
-
padding: 0;
|
164 |
-
position: relative;
|
165 |
-
}
|
166 |
-
|
167 |
-
.wplc_block.circle:after {
|
168 |
-
display: none;
|
169 |
-
}
|
170 |
-
|
171 |
-
.wplc_block.circle .wplc_block_logo {
|
172 |
-
position: relative;
|
173 |
-
width: 50px;
|
174 |
-
height: 50px;
|
175 |
-
padding: 0;
|
176 |
-
border-radius: 50%;
|
177 |
-
}
|
178 |
-
|
179 |
-
.wplc_block.sm.circle {
|
180 |
-
background: transparent;
|
181 |
-
width: 35px;
|
182 |
-
height: 35px;
|
183 |
-
padding: 0;
|
184 |
-
}
|
185 |
-
|
186 |
-
.wplc_block.sm.circle:after {
|
187 |
-
display: none;
|
188 |
-
}
|
189 |
-
|
190 |
-
.wplc_block.sm.circle .wplc_block_logo {
|
191 |
-
position: relative;
|
192 |
-
width: 35px;
|
193 |
-
height: 35px;
|
194 |
-
padding: 0;
|
195 |
-
border-radius: 50%;
|
196 |
-
}
|
197 |
-
|
198 |
-
.wplc_block.lg.circle {
|
199 |
-
background: transparent;
|
200 |
-
width: 65px;
|
201 |
-
height: 65px;
|
202 |
-
padding: 0;
|
203 |
-
}
|
204 |
-
|
205 |
-
.wplc_block.lg.circle:after {
|
206 |
-
display: none;
|
207 |
-
}
|
208 |
-
|
209 |
-
.wplc_block.lg.circle .wplc_block_logo {
|
210 |
-
position: relative;
|
211 |
-
width: 65px;
|
212 |
-
height: 65px;
|
213 |
-
padding: 0;
|
214 |
-
border-radius: 50%;
|
215 |
-
}
|
216 |
-
|
217 |
-
/* Custom Templates: Tooltip */
|
218 |
-
.wplc_block:hover .wplc_block_tooltip {
|
219 |
-
top: -62px;
|
220 |
-
background: #333;
|
221 |
-
color: #fff;
|
222 |
-
opacity: .85;
|
223 |
-
display: inline-block;
|
224 |
-
}
|
225 |
-
|
226 |
-
.wplc_block_tooltip {
|
227 |
-
min-width: 100px;
|
228 |
-
border-radius: 3px;
|
229 |
-
color: transparent;
|
230 |
-
position: absolute;
|
231 |
-
line-height: 25px;
|
232 |
-
padding: 10px;
|
233 |
-
top: -50px;
|
234 |
-
left: 0;
|
235 |
-
opacity: 0;
|
236 |
-
transition: opacity .2s ease-in-out, top .2s ease-in-out;
|
237 |
-
}
|
238 |
-
|
239 |
-
.wplc_block.circle:hover .wplc_block_tooltip {
|
240 |
-
top: -75px;
|
241 |
-
display: block;
|
242 |
-
}
|
243 |
-
.wplc_block.circle.sm:hover .wplc_block_tooltip {
|
244 |
-
top: -50px;
|
245 |
-
}
|
246 |
-
|
247 |
-
.wplc_block.circle.lg:hover .wplc_block_tooltip {
|
248 |
-
top: -100px;
|
249 |
-
}
|
250 |
-
|
251 |
-
/* Custom Templates: Chat Bubble */
|
252 |
-
.wplc_block.chat_bubble:before {
|
253 |
-
content: '';
|
254 |
-
position: absolute;
|
255 |
-
width: 0;
|
256 |
-
height: 0;
|
257 |
-
left: 0px;
|
258 |
-
bottom: -10px;
|
259 |
-
border: 8px solid;
|
260 |
-
border-color: #32373c transparent transparent #32373c;
|
261 |
-
}
|
262 |
-
|
263 |
-
.wplc_block.chat_bubble:hover:after {
|
264 |
-
content: '';
|
265 |
-
position: absolute;
|
266 |
-
width: 0;
|
267 |
-
height: 0;
|
268 |
-
}
|
269 |
-
|
270 |
-
.wplc_block.chat_bubble {
|
271 |
-
padding-left: 10px;
|
272 |
-
padding-right: 40px;
|
273 |
-
border-radius: 7px 7px 7px 0;
|
274 |
-
}
|
275 |
-
|
276 |
-
.wplc_block.chat_bubble .wplc_block_logo {
|
277 |
-
border:none;
|
278 |
-
right: 0px;
|
279 |
-
left: initial;
|
280 |
-
border-radius: 0 7px 7px 0;
|
281 |
-
}
|
282 |
-
|
283 |
-
.wplc_block.chat_bubble.sm {
|
284 |
-
padding-left: 10px;
|
285 |
-
padding-right: 25px;
|
286 |
-
}
|
287 |
-
|
288 |
-
.wplc_block.chat_bubble.lg {
|
289 |
-
padding-left: 20px;
|
290 |
-
padding-right: 80px;
|
291 |
-
}
|
292 |
-
|
293 |
-
/* Custom Templates: Rotating circle */
|
294 |
-
.wplc_block.rotate {
|
295 |
-
transform:rotate(0deg);
|
296 |
-
}
|
297 |
-
|
298 |
-
.wplc_block.rotate:hover {
|
299 |
-
transition: all .3s ease-in-out;
|
300 |
-
transform:rotate(-90deg);
|
301 |
-
}
|
302 |
-
|
303 |
-
.wplc_block.rotate .wplc_block_icon {
|
304 |
-
position: relative;
|
305 |
-
height: 100%;
|
306 |
-
width: 100%;
|
307 |
-
text-align: center;
|
308 |
-
font-size: 30px;
|
309 |
-
transform: rotate(90deg);
|
310 |
-
line-height: 150%;
|
311 |
-
}
|
312 |
-
|
313 |
-
.wplc_block.rotate .wplc_block_logo {
|
314 |
-
z-index: 10;
|
315 |
-
position: absolute;
|
316 |
-
}
|
317 |
-
.wplc_block.rotate {
|
318 |
-
border-radius: 50%;
|
319 |
-
background: #32373c;
|
320 |
-
}
|
321 |
-
|
322 |
-
.wplc_block.rotate .wplc_block_logo:hover {
|
323 |
-
opacity: 0;
|
324 |
-
}
|
325 |
-
|
326 |
-
.wplc_block.circle.rotate.lg .wplc_block_logo {
|
327 |
-
padding: 0;
|
328 |
-
margin: 0;
|
329 |
-
position:absolute;
|
330 |
-
}
|
331 |
-
|
332 |
-
.wplc_block.circle.rotate.lg {
|
333 |
-
background: #32373c;
|
334 |
-
}
|
335 |
-
|
336 |
-
.wplc_block.rotate.lg .wplc_block_icon {
|
337 |
-
position: relative;
|
338 |
-
height: 100%;
|
339 |
-
width: 100%;
|
340 |
-
text-align: center;
|
341 |
-
font-size: 30px;
|
342 |
-
transform: rotate(90deg);
|
343 |
-
line-height: 225%;
|
344 |
-
padding-right: 10px;
|
345 |
-
}
|
346 |
-
|
347 |
-
.wplc_block.circle.rotate.sm .wplc_block_logo {
|
348 |
-
padding: 0;
|
349 |
-
margin: 0;
|
350 |
-
position:absolute;
|
351 |
-
}
|
352 |
-
|
353 |
-
.wplc_block.circle.rotate.sm {
|
354 |
-
background: #32373c;
|
355 |
-
}
|
356 |
-
|
357 |
-
.wplc_block.rotate.sm .wplc_block_icon {
|
358 |
-
position: relative;
|
359 |
-
height: 100%;
|
360 |
-
width: 100%;
|
361 |
-
text-align: center;
|
362 |
-
font-size: 20px;
|
363 |
-
transform: rotate(90deg);
|
364 |
-
line-height: 100%;
|
365 |
-
right:5px;
|
366 |
}
|
1 |
+
/* WPLC Gutenber Template Styles */
|
2 |
+
|
3 |
+
#wplc-chat-box {
|
4 |
+
width: fit-content;
|
5 |
+
position: relative;
|
6 |
+
cursor: pointer;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wplc_block {
|
10 |
+
position: relative;
|
11 |
+
display:inline-block;
|
12 |
+
background: #32373c;
|
13 |
+
color: #eee;
|
14 |
+
border-radius: 3px;
|
15 |
+
height: 35px;
|
16 |
+
padding-left: 45px;
|
17 |
+
margin: 5px 0 5px 0;
|
18 |
+
transition: all .2s ease-in-out;
|
19 |
+
cursor: pointer;
|
20 |
+
border-bottom: 0px solid #111;
|
21 |
+
font-size: 17px;
|
22 |
+
line-height: 35px;
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
.wplc_block:hover {
|
27 |
+
transform: translateY(-2px);
|
28 |
+
}
|
29 |
+
|
30 |
+
.wplc_block:after {
|
31 |
+
content: "";
|
32 |
+
position: absolute;
|
33 |
+
display: block;
|
34 |
+
height: 0px;
|
35 |
+
bottom: 0;
|
36 |
+
left: 0;
|
37 |
+
width: 100%;
|
38 |
+
background-color: #000;
|
39 |
+
opacity: 0;
|
40 |
+
transition: all .2s ease-in-out;
|
41 |
+
}
|
42 |
+
|
43 |
+
.wplc_block:hover:after {
|
44 |
+
height: 3px;
|
45 |
+
opacity: .2;
|
46 |
+
}
|
47 |
+
|
48 |
+
#wplc-chat-box.disabled:first-child:after {
|
49 |
+
content: "Disabled";
|
50 |
+
color:#fff;
|
51 |
+
font-size: 17px;
|
52 |
+
text-transform: uppercase;
|
53 |
+
text-align: center;
|
54 |
+
display: block;
|
55 |
+
position: absolute;
|
56 |
+
height: 100%;
|
57 |
+
width: 100%;
|
58 |
+
bottom: 0;
|
59 |
+
left: 0;
|
60 |
+
background: #ED832F;
|
61 |
+
opacity: .9;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wplc_block_logo {
|
65 |
+
width: 35px;
|
66 |
+
height: 35px;
|
67 |
+
position: absolute;
|
68 |
+
left: 0;
|
69 |
+
background: #e7e7e7;
|
70 |
+
display: inline-block;
|
71 |
+
margin:0;
|
72 |
+
background-size: cover;
|
73 |
+
background-position: center;
|
74 |
+
background-color:#ED832F !important;
|
75 |
+
transition: all .2s ease-in-out;
|
76 |
+
box-sizing: border-box;
|
77 |
+
box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
78 |
+
-webkit-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
79 |
+
-moz-box-shadow: inset -2px 0px 0px 0px rgba(0,0,0,0.28);
|
80 |
+
}
|
81 |
+
|
82 |
+
.wplc_block_text {
|
83 |
+
display: inline-block;
|
84 |
+
height: 100%;
|
85 |
+
margin-right: 7px;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wplc_block_icon {
|
89 |
+
height: 100%;
|
90 |
+
width: 35px;
|
91 |
+
background: transparent;
|
92 |
+
display: inline-block;
|
93 |
+
}
|
94 |
+
|
95 |
+
.wplc_block_icon.disabled {
|
96 |
+
display: none;
|
97 |
+
}
|
98 |
+
|
99 |
+
/* Block size styles: small */
|
100 |
+
.wplc_block.sm {
|
101 |
+
height: 25px;
|
102 |
+
line-height: 25px;
|
103 |
+
padding-left: 30px;
|
104 |
+
font-size: 12px;
|
105 |
+
}
|
106 |
+
|
107 |
+
.wplc_block.sm:hover:after {
|
108 |
+
height: 2px;
|
109 |
+
opacity: .2;
|
110 |
+
}
|
111 |
+
|
112 |
+
.wplc_block.sm .wplc_block_logo {
|
113 |
+
height: 25px;
|
114 |
+
width: 25px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.wplc_block.sm .wplc_block_text {
|
118 |
+
margin-right: 7px;
|
119 |
+
}
|
120 |
+
|
121 |
+
.wplc_block.sm .wplc_block_icon {
|
122 |
+
margin-right: 7px;
|
123 |
+
width: 13px;
|
124 |
+
}
|
125 |
+
|
126 |
+
/* Block size styles: large */
|
127 |
+
.wplc_block.lg {
|
128 |
+
height: 80px;
|
129 |
+
line-height: 80px;
|
130 |
+
padding-left: 100px;
|
131 |
+
font-size: 25px;
|
132 |
+
}
|
133 |
+
|
134 |
+
.wplc_block.lg:hover:after {
|
135 |
+
height: 6px;
|
136 |
+
opacity: .2;
|
137 |
+
}
|
138 |
+
|
139 |
+
.wplc_block.lg .wplc_block_logo {
|
140 |
+
height: 80px;
|
141 |
+
width: 80px;
|
142 |
+
}
|
143 |
+
|
144 |
+
.wplc_block.lg .wplc_block_text {
|
145 |
+
margin-right: 13px;
|
146 |
+
}
|
147 |
+
|
148 |
+
.wplc_block.lg .wplc_block_icon {
|
149 |
+
margin-right: 13px;
|
150 |
+
}
|
151 |
+
/* Custom Templates: Default - Light */
|
152 |
+
.wplc_block.light {
|
153 |
+
background: #ECEFF1;
|
154 |
+
color: #555;
|
155 |
+
border: 1px solid #ccc;
|
156 |
+
}
|
157 |
+
|
158 |
+
/* Custom Templates: Circle */
|
159 |
+
.wplc_block.circle {
|
160 |
+
background: transparent;
|
161 |
+
width: 50px;
|
162 |
+
height: 50px;
|
163 |
+
padding: 0;
|
164 |
+
position: relative;
|
165 |
+
}
|
166 |
+
|
167 |
+
.wplc_block.circle:after {
|
168 |
+
display: none;
|
169 |
+
}
|
170 |
+
|
171 |
+
.wplc_block.circle .wplc_block_logo {
|
172 |
+
position: relative;
|
173 |
+
width: 50px;
|
174 |
+
height: 50px;
|
175 |
+
padding: 0;
|
176 |
+
border-radius: 50%;
|
177 |
+
}
|
178 |
+
|
179 |
+
.wplc_block.sm.circle {
|
180 |
+
background: transparent;
|
181 |
+
width: 35px;
|
182 |
+
height: 35px;
|
183 |
+
padding: 0;
|
184 |
+
}
|
185 |
+
|
186 |
+
.wplc_block.sm.circle:after {
|
187 |
+
display: none;
|
188 |
+
}
|
189 |
+
|
190 |
+
.wplc_block.sm.circle .wplc_block_logo {
|
191 |
+
position: relative;
|
192 |
+
width: 35px;
|
193 |
+
height: 35px;
|
194 |
+
padding: 0;
|
195 |
+
border-radius: 50%;
|
196 |
+
}
|
197 |
+
|
198 |
+
.wplc_block.lg.circle {
|
199 |
+
background: transparent;
|
200 |
+
width: 65px;
|
201 |
+
height: 65px;
|
202 |
+
padding: 0;
|
203 |
+
}
|
204 |
+
|
205 |
+
.wplc_block.lg.circle:after {
|
206 |
+
display: none;
|
207 |
+
}
|
208 |
+
|
209 |
+
.wplc_block.lg.circle .wplc_block_logo {
|
210 |
+
position: relative;
|
211 |
+
width: 65px;
|
212 |
+
height: 65px;
|
213 |
+
padding: 0;
|
214 |
+
border-radius: 50%;
|
215 |
+
}
|
216 |
+
|
217 |
+
/* Custom Templates: Tooltip */
|
218 |
+
.wplc_block:hover .wplc_block_tooltip {
|
219 |
+
top: -62px;
|
220 |
+
background: #333;
|
221 |
+
color: #fff;
|
222 |
+
opacity: .85;
|
223 |
+
display: inline-block;
|
224 |
+
}
|
225 |
+
|
226 |
+
.wplc_block_tooltip {
|
227 |
+
min-width: 100px;
|
228 |
+
border-radius: 3px;
|
229 |
+
color: transparent;
|
230 |
+
position: absolute;
|
231 |
+
line-height: 25px;
|
232 |
+
padding: 10px;
|
233 |
+
top: -50px;
|
234 |
+
left: 0;
|
235 |
+
opacity: 0;
|
236 |
+
transition: opacity .2s ease-in-out, top .2s ease-in-out;
|
237 |
+
}
|
238 |
+
|
239 |
+
.wplc_block.circle:hover .wplc_block_tooltip {
|
240 |
+
top: -75px;
|
241 |
+
display: block;
|
242 |
+
}
|
243 |
+
.wplc_block.circle.sm:hover .wplc_block_tooltip {
|
244 |
+
top: -50px;
|
245 |
+
}
|
246 |
+
|
247 |
+
.wplc_block.circle.lg:hover .wplc_block_tooltip {
|
248 |
+
top: -100px;
|
249 |
+
}
|
250 |
+
|
251 |
+
/* Custom Templates: Chat Bubble */
|
252 |
+
.wplc_block.chat_bubble:before {
|
253 |
+
content: '';
|
254 |
+
position: absolute;
|
255 |
+
width: 0;
|
256 |
+
height: 0;
|
257 |
+
left: 0px;
|
258 |
+
bottom: -10px;
|
259 |
+
border: 8px solid;
|
260 |
+
border-color: #32373c transparent transparent #32373c;
|
261 |
+
}
|
262 |
+
|
263 |
+
.wplc_block.chat_bubble:hover:after {
|
264 |
+
content: '';
|
265 |
+
position: absolute;
|
266 |
+
width: 0;
|
267 |
+
height: 0;
|
268 |
+
}
|
269 |
+
|
270 |
+
.wplc_block.chat_bubble {
|
271 |
+
padding-left: 10px;
|
272 |
+
padding-right: 40px;
|
273 |
+
border-radius: 7px 7px 7px 0;
|
274 |
+
}
|
275 |
+
|
276 |
+
.wplc_block.chat_bubble .wplc_block_logo {
|
277 |
+
border:none;
|
278 |
+
right: 0px;
|
279 |
+
left: initial;
|
280 |
+
border-radius: 0 7px 7px 0;
|
281 |
+
}
|
282 |
+
|
283 |
+
.wplc_block.chat_bubble.sm {
|
284 |
+
padding-left: 10px;
|
285 |
+
padding-right: 25px;
|
286 |
+
}
|
287 |
+
|
288 |
+
.wplc_block.chat_bubble.lg {
|
289 |
+
padding-left: 20px;
|
290 |
+
padding-right: 80px;
|
291 |
+
}
|
292 |
+
|
293 |
+
/* Custom Templates: Rotating circle */
|
294 |
+
.wplc_block.rotate {
|
295 |
+
transform:rotate(0deg);
|
296 |
+
}
|
297 |
+
|
298 |
+
.wplc_block.rotate:hover {
|
299 |
+
transition: all .3s ease-in-out;
|
300 |
+
transform:rotate(-90deg);
|
301 |
+
}
|
302 |
+
|
303 |
+
.wplc_block.rotate .wplc_block_icon {
|
304 |
+
position: relative;
|
305 |
+
height: 100%;
|
306 |
+
width: 100%;
|
307 |
+
text-align: center;
|
308 |
+
font-size: 30px;
|
309 |
+
transform: rotate(90deg);
|
310 |
+
line-height: 150%;
|
311 |
+
}
|
312 |
+
|
313 |
+
.wplc_block.rotate .wplc_block_logo {
|
314 |
+
z-index: 10;
|
315 |
+
position: absolute;
|
316 |
+
}
|
317 |
+
.wplc_block.rotate {
|
318 |
+
border-radius: 50%;
|
319 |
+
background: #32373c;
|
320 |
+
}
|
321 |
+
|
322 |
+
.wplc_block.rotate .wplc_block_logo:hover {
|
323 |
+
opacity: 0;
|
324 |
+
}
|
325 |
+
|
326 |
+
.wplc_block.circle.rotate.lg .wplc_block_logo {
|
327 |
+
padding: 0;
|
328 |
+
margin: 0;
|
329 |
+
position:absolute;
|
330 |
+
}
|
331 |
+
|
332 |
+
.wplc_block.circle.rotate.lg {
|
333 |
+
background: #32373c;
|
334 |
+
}
|
335 |
+
|
336 |
+
.wplc_block.rotate.lg .wplc_block_icon {
|
337 |
+
position: relative;
|
338 |
+
height: 100%;
|
339 |
+
width: 100%;
|
340 |
+
text-align: center;
|
341 |
+
font-size: 30px;
|
342 |
+
transform: rotate(90deg);
|
343 |
+
line-height: 225%;
|
344 |
+
padding-right: 10px;
|
345 |
+
}
|
346 |
+
|
347 |
+
.wplc_block.circle.rotate.sm .wplc_block_logo {
|
348 |
+
padding: 0;
|
349 |
+
margin: 0;
|
350 |
+
position:absolute;
|
351 |
+
}
|
352 |
+
|
353 |
+
.wplc_block.circle.rotate.sm {
|
354 |
+
background: #32373c;
|
355 |
+
}
|
356 |
+
|
357 |
+
.wplc_block.rotate.sm .wplc_block_icon {
|
358 |
+
position: relative;
|
359 |
+
height: 100%;
|
360 |
+
width: 100%;
|
361 |
+
text-align: center;
|
362 |
+
font-size: 20px;
|
363 |
+
transform: rotate(90deg);
|
364 |
+
line-height: 100%;
|
365 |
+
right:5px;
|
366 |
}
|
includes/blocks/wplc-inline-chat-box/block.js
CHANGED
@@ -1,121 +1,127 @@
|
|
1 |
-
/* BLOCK: WP Live Chat Support - Inline Chat Box */
|
2 |
-
|
3 |
-
( function() {
|
4 |
-
var __ = wp.i18n.__;
|
5 |
-
var el = wp.element.createElement;
|
6 |
-
var Editable = wp.blocks.Editable;
|
7 |
-
var children = wp.blocks.children;
|
8 |
-
var registerBlockType = wp.blocks.registerBlockType;
|
9 |
-
|
10 |
-
var chat_preview_loader = '<
|
11 |
-
|
12 |
-
registerBlockType( 'wp-live-chat-support/wplc-inline-chat-box', {
|
13 |
-
title: __( 'WP Live Chat Box', 'WPLC' ),
|
14 |
-
icon: 'format-chat',
|
15 |
-
category: 'common',
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
'
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
'
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* BLOCK: WP Live Chat Support - Inline Chat Box */
|
2 |
+
|
3 |
+
( function() {
|
4 |
+
var __ = wp.i18n.__;
|
5 |
+
var el = wp.element.createElement;
|
6 |
+
var Editable = wp.blocks.Editable;
|
7 |
+
var children = wp.blocks.source.children;
|
8 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
9 |
+
|
10 |
+
var chat_preview_loader = '<div class="wplc_gutenberg_loader"></div>';
|
11 |
+
|
12 |
+
registerBlockType( 'wp-live-chat-support/wplc-inline-chat-box', {
|
13 |
+
title: __( 'WP Live Chat Box (WP Live Chat Support)', 'WPLC' ),
|
14 |
+
icon: 'format-chat',
|
15 |
+
category: 'common',
|
16 |
+
attributes: {
|
17 |
+
content: children( 'p' ),
|
18 |
+
},
|
19 |
+
|
20 |
+
edit: function( props ) {
|
21 |
+
|
22 |
+
var content = props.attributes.content;
|
23 |
+
var focus = props.focus;
|
24 |
+
|
25 |
+
function onChangeContent( newContent ) {
|
26 |
+
props.setAttributes( { content: newContent } );
|
27 |
+
}
|
28 |
+
|
29 |
+
$(document).on('change', '.wplc_select_theme', function(){
|
30 |
+
var id = $(this).val();
|
31 |
+
onChangeContent( id );
|
32 |
+
});
|
33 |
+
|
34 |
+
theme_classes = 'wplc_' + content;
|
35 |
+
|
36 |
+
element = el(
|
37 |
+
'h3',
|
38 |
+
{ },
|
39 |
+
'Live Chat Box (WP Live Chat Support)'
|
40 |
+
);
|
41 |
+
|
42 |
+
select_text = el(
|
43 |
+
'span',
|
44 |
+
{ },
|
45 |
+
'Select a style: '
|
46 |
+
);
|
47 |
+
|
48 |
+
icon = el(
|
49 |
+
'span',
|
50 |
+
{ className: "wplc_gutenberg_icon dashicons dashicons-format-chat" }
|
51 |
+
);
|
52 |
+
|
53 |
+
chat_box_preview = el(
|
54 |
+
'div',
|
55 |
+
{
|
56 |
+
className: 'wplc_gutenberg_preview',
|
57 |
+
dangerouslySetInnerHTML: { __html: chat_preview_loader }
|
58 |
+
}
|
59 |
+
);
|
60 |
+
|
61 |
+
var option_1 = el(
|
62 |
+
'option',
|
63 |
+
{ value: 'normal', selected: 'selected' },
|
64 |
+
'Normal'
|
65 |
+
);
|
66 |
+
var option_2 = el(
|
67 |
+
'option',
|
68 |
+
{ value: 'center' },
|
69 |
+
'Center'
|
70 |
+
);
|
71 |
+
var option_3 = el(
|
72 |
+
'option',
|
73 |
+
{ value: 'wide' },
|
74 |
+
'Wide'
|
75 |
+
);
|
76 |
+
|
77 |
+
var select = el(
|
78 |
+
'select',
|
79 |
+
{ className: 'wplc_select_theme' },
|
80 |
+
option_1,
|
81 |
+
option_2,
|
82 |
+
option_3
|
83 |
+
);
|
84 |
+
|
85 |
+
var style = {
|
86 |
+
display: 'none'
|
87 |
+
}
|
88 |
+
|
89 |
+
var editable_content = el(
|
90 |
+
Editable,
|
91 |
+
{
|
92 |
+
tagName: 'p',
|
93 |
+
className: 'wplc_selected_theme',
|
94 |
+
value: content,
|
95 |
+
onChange: onChangeContent,
|
96 |
+
focus: focus,
|
97 |
+
onFocus: props.setFocus,
|
98 |
+
style: style
|
99 |
+
},
|
100 |
+
);
|
101 |
+
|
102 |
+
return el(
|
103 |
+
'div',
|
104 |
+
{ id: 'wplc-inline-chat-box',
|
105 |
+
className: theme_classes
|
106 |
+
},
|
107 |
+
element,
|
108 |
+
select_text,
|
109 |
+
select,
|
110 |
+
editable_content,
|
111 |
+
chat_box_preview
|
112 |
+
);
|
113 |
+
},
|
114 |
+
|
115 |
+
save: function( props ) {
|
116 |
+
var style_class = props.attributes.content;
|
117 |
+
var content = '[wplc_live_chat style="' + style_class + '"]';
|
118 |
+
|
119 |
+
return el(
|
120 |
+
'div',
|
121 |
+
{ id: 'wplc-inline-chat-box',
|
122 |
+
dangerouslySetInnerHTML: { __html: content }
|
123 |
+
}
|
124 |
+
);
|
125 |
+
},
|
126 |
+
} );
|
127 |
+
})();
|
includes/blocks/wplc-inline-chat-box/editor.css
CHANGED
@@ -1,178 +1,178 @@
|
|
1 |
-
/* Gutenberg Chat Box Styles */
|
2 |
-
@keyframes wplc_fade_in {
|
3 |
-
0% { opacity: 0; padding-top: 20px; }
|
4 |
-
100% { opacity: 1; }
|
5 |
-
}
|
6 |
-
|
7 |
-
#wplc-inline-chat-box .wplc_gutenberg_icon {
|
8 |
-
animation: wplc_fade_in .3s;
|
9 |
-
color: #ff4d4d;
|
10 |
-
display: block;
|
11 |
-
margin: 30px auto;
|
12 |
-
font-size: 50px;
|
13 |
-
}
|
14 |
-
|
15 |
-
.wplc_gutenberg_chat_box {
|
16 |
-
border: 1px solid #eee;
|
17 |
-
height: 500px;
|
18 |
-
width: 320px;
|
19 |
-
border-radius: 6px;
|
20 |
-
position: relative;
|
21 |
-
display: inline-block;
|
22 |
-
margin-top: 0;
|
23 |
-
}
|
24 |
-
|
25 |
-
.wplc_gutenberg_button {
|
26 |
-
width: 60px;
|
27 |
-
height: 60px;
|
28 |
-
background-size: cover;
|
29 |
-
background-repeat: no-repeat;
|
30 |
-
border-radius: 50%;
|
31 |
-
margin-bottom: 10px;
|
32 |
-
margin-right: 10px;
|
33 |
-
display: inline-block;
|
34 |
-
cursor: pointer;
|
35 |
-
}
|
36 |
-
|
37 |
-
.wplc_gutenberg_header {
|
38 |
-
border-radius: 6px 6px 0 0;
|
39 |
-
height: 80px;
|
40 |
-
width: 100%;
|
41 |
-
background: #ddd;
|
42 |
-
}
|
43 |
-
|
44 |
-
.wplc_gutenberg_text_box {
|
45 |
-
position: absolute;
|
46 |
-
bottom: 0;
|
47 |
-
left: 0;
|
48 |
-
width: 100%;
|
49 |
-
height: 60px;
|
50 |
-
background: #fff;
|
51 |
-
border-bottom-right-radius: 10px;
|
52 |
-
border-bottom-left-radius: 10px;
|
53 |
-
box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
54 |
-
}
|
55 |
-
|
56 |
-
.wplc_gutenberg_avatar {
|
57 |
-
display: inline-block;
|
58 |
-
margin: 10px;
|
59 |
-
margin-left: 35px;
|
60 |
-
}
|
61 |
-
|
62 |
-
.wplc_gutenberg_avatar img {
|
63 |
-
border-radius: 50%;
|
64 |
-
|
65 |
-
}
|
66 |
-
|
67 |
-
.wplc_gutenberg_name {
|
68 |
-
display: inline-block;
|
69 |
-
bottom: 24px;
|
70 |
-
font-weight: 600;
|
71 |
-
color: #fff;
|
72 |
-
position: absolute;
|
73 |
-
}
|
74 |
-
|
75 |
-
.wplc_gutenberg_header {
|
76 |
-
position: relative;
|
77 |
-
box-shadow: 0 5px 20px -2px rgba(0,0,0,.16);
|
78 |
-
}
|
79 |
-
|
80 |
-
.wplc_gutenberg_chevron {
|
81 |
-
position: absolute;
|
82 |
-
right: 10px;
|
83 |
-
bottom: 10px;
|
84 |
-
font-size: 24px;
|
85 |
-
color: #fff;
|
86 |
-
cursor: pointer;
|
87 |
-
}
|
88 |
-
|
89 |
-
.wplc_gutenberg_overlay_image {
|
90 |
-
width: 100%;
|
91 |
-
height: 100%;
|
92 |
-
position: absolute;
|
93 |
-
top: 0;
|
94 |
-
left: 0;
|
95 |
-
border-radius: 6px 6px 0 0;
|
96 |
-
background-size: cover;
|
97 |
-
background-repeat; no-repeat;
|
98 |
-
opacity: .1;
|
99 |
-
}
|
100 |
-
|
101 |
-
.wplc_gutenberg_text_box {
|
102 |
-
line-height: 60px;
|
103 |
-
padding-left: 30px;
|
104 |
-
color: #2b2b2b;
|
105 |
-
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
106 |
-
font-weight: normal;
|
107 |
-
font-size: 12px;
|
108 |
-
}
|
109 |
-
|
110 |
-
.wplc_gutenberg_body {
|
111 |
-
width: 100%;
|
112 |
-
height: 100%;
|
113 |
-
background-size: cover;
|
114 |
-
background-repeat: repeat;
|
115 |
-
position: absolute;
|
116 |
-
top: 0;
|
117 |
-
left: 0;
|
118 |
-
z-index: -1;
|
119 |
-
}
|
120 |
-
|
121 |
-
.wplc_gutenberg_loader {
|
122 |
-
border: 7px solid #f3f3f3;
|
123 |
-
border-top: 7px solid #ED832F;
|
124 |
-
border-radius: 50%;
|
125 |
-
width: 50px;
|
126 |
-
height: 50px;
|
127 |
-
animation: wplc_spin 2s linear infinite;
|
128 |
-
display: block;
|
129 |
-
margin: 0 auto;
|
130 |
-
}
|
131 |
-
|
132 |
-
@keyframes wplc_spin {
|
133 |
-
0% { transform: rotate(0deg); }
|
134 |
-
100% { transform: rotate(360deg); }
|
135 |
-
}
|
136 |
-
|
137 |
-
@keyframes wplc_fade_in {
|
138 |
-
0% { opacity: 0; padding-top:20px; }
|
139 |
-
100% { opacity: 1; }
|
140 |
-
}
|
141 |
-
|
142 |
-
.wplc_gutenberg_preview, .wplc_gutenberg_button, .wplc_gutenberg_chat_box {
|
143 |
-
animation: wplc_fade_in .3s;
|
144 |
-
}
|
145 |
-
|
146 |
-
.wplc_gutenberg_button {
|
147 |
-
transition: all 0.4s ease-in-out;
|
148 |
-
margin-bottom: 0;
|
149 |
-
}
|
150 |
-
|
151 |
-
.wplc_select_theme {
|
152 |
-
margin-bottom: 10px;
|
153 |
-
width: 150px;
|
154 |
-
display: block;
|
155 |
-
}
|
156 |
-
|
157 |
-
/* WPLC Gutenberg Themes/Layouts */
|
158 |
-
/* Center */
|
159 |
-
.wplc_center .wplc_gutenberg_chat_box {
|
160 |
-
margin: 0 auto;
|
161 |
-
display: block;
|
162 |
-
}
|
163 |
-
|
164 |
-
.wplc_center .wplc_gutenberg_button {
|
165 |
-
margin: 0 auto;
|
166 |
-
display: block;
|
167 |
-
margin-bottom: 10px;
|
168 |
-
}
|
169 |
-
|
170 |
-
/* Wide */
|
171 |
-
.wplc_wide .wplc_gutenberg_chat_box {
|
172 |
-
width: 100%;
|
173 |
-
margin-top: 0;
|
174 |
-
}
|
175 |
-
|
176 |
-
.wplc_wide .wplc_gutenberg_button {
|
177 |
-
margin-bottom: 0;
|
178 |
}
|
1 |
+
/* Gutenberg Chat Box Styles */
|
2 |
+
@keyframes wplc_fade_in {
|
3 |
+
0% { opacity: 0; padding-top: 20px; }
|
4 |
+
100% { opacity: 1; }
|
5 |
+
}
|
6 |
+
|
7 |
+
#wplc-inline-chat-box .wplc_gutenberg_icon {
|
8 |
+
animation: wplc_fade_in .3s;
|
9 |
+
color: #ff4d4d;
|
10 |
+
display: block;
|
11 |
+
margin: 30px auto;
|
12 |
+
font-size: 50px;
|
13 |
+
}
|
14 |
+
|
15 |
+
.wplc_gutenberg_chat_box {
|
16 |
+
border: 1px solid #eee;
|
17 |
+
height: 500px;
|
18 |
+
width: 320px;
|
19 |
+
border-radius: 6px;
|
20 |
+
position: relative;
|
21 |
+
display: inline-block;
|
22 |
+
margin-top: 0;
|
23 |
+
}
|
24 |
+
|
25 |
+
.wplc_gutenberg_button {
|
26 |
+
width: 60px;
|
27 |
+
height: 60px;
|
28 |
+
background-size: cover;
|
29 |
+
background-repeat: no-repeat;
|
30 |
+
border-radius: 50%;
|
31 |
+
margin-bottom: 10px;
|
32 |
+
margin-right: 10px;
|
33 |
+
display: inline-block;
|
34 |
+
cursor: pointer;
|
35 |
+
}
|
36 |
+
|
37 |
+
.wplc_gutenberg_header {
|
38 |
+
border-radius: 6px 6px 0 0;
|
39 |
+
height: 80px;
|
40 |
+
width: 100%;
|
41 |
+
background: #ddd;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wplc_gutenberg_text_box {
|
45 |
+
position: absolute;
|
46 |
+
bottom: 0;
|
47 |
+
left: 0;
|
48 |
+
width: 100%;
|
49 |
+
height: 60px;
|
50 |
+
background: #fff;
|
51 |
+
border-bottom-right-radius: 10px;
|
52 |
+
border-bottom-left-radius: 10px;
|
53 |
+
box-shadow: 0 0 40px 1px rgba(0,0,0,.07);
|
54 |
+
}
|
55 |
+
|
56 |
+
.wplc_gutenberg_avatar {
|
57 |
+
display: inline-block;
|
58 |
+
margin: 10px;
|
59 |
+
margin-left: 35px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.wplc_gutenberg_avatar img {
|
63 |
+
border-radius: 50%;
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
.wplc_gutenberg_name {
|
68 |
+
display: inline-block;
|
69 |
+
bottom: 24px;
|
70 |
+
font-weight: 600;
|
71 |
+
color: #fff;
|
72 |
+
position: absolute;
|
73 |
+
}
|
74 |
+
|
75 |
+
.wplc_gutenberg_header {
|
76 |
+
position: relative;
|
77 |
+
box-shadow: 0 5px 20px -2px rgba(0,0,0,.16);
|
78 |
+
}
|
79 |
+
|
80 |
+
.wplc_gutenberg_chevron {
|
81 |
+
position: absolute;
|
82 |
+
right: 10px;
|
83 |
+
bottom: 10px;
|
84 |
+
font-size: 24px;
|
85 |
+
color: #fff;
|
86 |
+
cursor: pointer;
|
87 |
+
}
|
88 |
+
|
89 |
+
.wplc_gutenberg_overlay_image {
|
90 |
+
width: 100%;
|
91 |
+
height: 100%;
|
92 |
+
position: absolute;
|
93 |
+
top: 0;
|
94 |
+
left: 0;
|
95 |
+
border-radius: 6px 6px 0 0;
|
96 |
+
background-size: cover;
|
97 |
+
background-repeat; no-repeat;
|
98 |
+
opacity: .1;
|
99 |
+
}
|
100 |
+
|
101 |
+
.wplc_gutenberg_text_box {
|
102 |
+
line-height: 60px;
|
103 |
+
padding-left: 30px;
|
104 |
+
color: #2b2b2b;
|
105 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
106 |
+
font-weight: normal;
|
107 |
+
font-size: 12px;
|
108 |
+
}
|
109 |
+
|
110 |
+
.wplc_gutenberg_body {
|
111 |
+
width: 100%;
|
112 |
+
height: 100%;
|
113 |
+
background-size: cover;
|
114 |
+
background-repeat: repeat;
|
115 |
+
position: absolute;
|
116 |
+
top: 0;
|
117 |
+
left: 0;
|
118 |
+
z-index: -1;
|
119 |
+
}
|
120 |
+
|
121 |
+
.wplc_gutenberg_loader {
|
122 |
+
border: 7px solid #f3f3f3;
|
123 |
+
border-top: 7px solid #ED832F;
|
124 |
+
border-radius: 50%;
|
125 |
+
width: 50px;
|
126 |
+
height: 50px;
|
127 |
+
animation: wplc_spin 2s linear infinite;
|
128 |
+
display: block;
|
129 |
+
margin: 0 auto;
|
130 |
+
}
|
131 |
+
|
132 |
+
@keyframes wplc_spin {
|
133 |
+
0% { transform: rotate(0deg); }
|
134 |
+
100% { transform: rotate(360deg); }
|
135 |
+
}
|
136 |
+
|
137 |
+
@keyframes wplc_fade_in {
|
138 |
+
0% { opacity: 0; padding-top:20px; }
|
139 |
+
100% { opacity: 1; }
|
140 |
+
}
|
141 |
+
|
142 |
+
.wplc_gutenberg_preview, .wplc_gutenberg_button, .wplc_gutenberg_chat_box {
|
143 |
+
animation: wplc_fade_in .3s;
|
144 |
+
}
|
145 |
+
|
146 |
+
.wplc_gutenberg_button {
|
147 |
+
transition: all 0.4s ease-in-out;
|
148 |
+
margin-bottom: 0;
|
149 |
+
}
|
150 |
+
|
151 |
+
.wplc_select_theme {
|
152 |
+
margin-bottom: 10px;
|
153 |
+
width: 150px;
|
154 |
+
display: block;
|
155 |
+
}
|
156 |
+
|
157 |
+
/* WPLC Gutenberg Themes/Layouts */
|
158 |
+
/* Center */
|
159 |
+
.wplc_center .wplc_gutenberg_chat_box {
|
160 |
+
margin: 0 auto;
|
161 |
+
display: block;
|
162 |
+
}
|
163 |
+
|
164 |
+
.wplc_center .wplc_gutenberg_button {
|
165 |
+
margin: 0 auto;
|
166 |
+
display: block;
|
167 |
+
margin-bottom: 10px;
|
168 |
+
}
|
169 |
+
|
170 |
+
/* Wide */
|
171 |
+
.wplc_wide .wplc_gutenberg_chat_box {
|
172 |
+
width: 100%;
|
173 |
+
margin-top: 0;
|
174 |
+
}
|
175 |
+
|
176 |
+
.wplc_wide .wplc_gutenberg_button {
|
177 |
+
margin-bottom: 0;
|
178 |
}
|
includes/blocks/wplc-inline-chat-box/index.php
CHANGED
@@ -1,61 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* BLOCK: WP Live Chat Support Chat box
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
add_action( 'enqueue_block_editor_assets', 'wplc_inline_chat_box_block_editor_assets' );
|
11 |
-
|
12 |
-
function wplc_inline_chat_box_block_editor_assets() {
|
13 |
-
$agent_data['id'] = get_current_user_id();
|
14 |
-
$agent_data['info'] = get_userdata( $agent_data['id'] );
|
15 |
-
$agent_data['name'] = $agent_data['info']->display_name;
|
16 |
-
$agent_data['email'] = md5($agent_data['info']->user_email);
|
17 |
-
|
18 |
-
$wplc_settings = get_option("WPLC_SETTINGS");
|
19 |
-
$style_settings['settings'] = get_option("WPLC_SETTINGS");
|
20 |
-
$style_settings['color_1'] = $wplc_settings['wplc_settings_color1'];
|
21 |
-
|
22 |
-
$wplc_images['background_image'] = plugins_url( '../../../images/bg/' . $wplc_settings['wplc_settings_bg'], __FILE__ );
|
23 |
-
$wplc_images['open_icon'] = plugins_url( '../../../images/iconRetina.png', __FILE__ );
|
24 |
-
$wplc_images['close_icon'] = plugins_url( '../../../images/iconCloseRetina.png', __FILE__ );
|
25 |
-
|
26 |
-
// Scripts
|
27 |
-
wp_enqueue_script( 'wplc_inline_chat_box',
|
28 |
-
plugins_url( 'block.js', __FILE__ ),
|
29 |
-
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
|
30 |
-
filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
|
31 |
-
);
|
32 |
-
|
33 |
-
wp_localize_script( 'wplc_inline_chat_box', 'wplc_agent_info', $agent_data );
|
34 |
-
wp_localize_script( 'wplc_inline_chat_box', 'wplc_styles', $style_settings );
|
35 |
-
wp_localize_script( 'wplc_inline_chat_box', 'wplc_images', $wplc_images );
|
36 |
-
|
37 |
-
wp_enqueue_script( 'wplc_chat_box_functions',
|
38 |
-
plugins_url( 'wplc_functions.js', __FILE__ ),
|
39 |
-
array( 'wp-blocks', 'wp-i18n', 'wp-element' )
|
40 |
-
);
|
41 |
-
|
42 |
-
|
43 |
-
// Styles
|
44 |
-
wp_enqueue_style( 'wplc_inline_chat_box-editor',
|
45 |
-
plugins_url( 'editor.css', __FILE__ ),
|
46 |
-
array( 'wp-edit-blocks' ),
|
47 |
-
filemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )
|
48 |
-
);
|
49 |
-
}
|
50 |
-
|
51 |
-
add_action( 'enqueue_block_assets', 'wplc_inline_chat_box_block_block_assets' );
|
52 |
-
|
53 |
-
function wplc_inline_chat_box_block_block_assets() {
|
54 |
-
|
55 |
-
// Styles for front-end
|
56 |
-
wp_enqueue_style( 'wplc_inline_chat_box_front_end',
|
57 |
-
plugins_url( 'style.css', __FILE__ ),
|
58 |
-
array( 'wp-blocks' ),
|
59 |
-
filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
|
60 |
-
);
|
61 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BLOCK: WP Live Chat Support Chat box
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
add_action( 'enqueue_block_editor_assets', 'wplc_inline_chat_box_block_editor_assets' );
|
11 |
+
|
12 |
+
function wplc_inline_chat_box_block_editor_assets() {
|
13 |
+
$agent_data['id'] = get_current_user_id();
|
14 |
+
$agent_data['info'] = get_userdata( $agent_data['id'] );
|
15 |
+
$agent_data['name'] = $agent_data['info']->display_name;
|
16 |
+
$agent_data['email'] = md5($agent_data['info']->user_email);
|
17 |
+
|
18 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
19 |
+
$style_settings['settings'] = get_option("WPLC_SETTINGS");
|
20 |
+
$style_settings['color_1'] = $wplc_settings['wplc_settings_color1'];
|
21 |
+
|
22 |
+
$wplc_images['background_image'] = plugins_url( '../../../images/bg/' . $wplc_settings['wplc_settings_bg'], __FILE__ );
|
23 |
+
$wplc_images['open_icon'] = plugins_url( '../../../images/iconRetina.png', __FILE__ );
|
24 |
+
$wplc_images['close_icon'] = plugins_url( '../../../images/iconCloseRetina.png', __FILE__ );
|
25 |
+
|
26 |
+
// Scripts
|
27 |
+
wp_enqueue_script( 'wplc_inline_chat_box',
|
28 |
+
plugins_url( 'block.js', __FILE__ ),
|
29 |
+
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
|
30 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
|
31 |
+
);
|
32 |
+
|
33 |
+
wp_localize_script( 'wplc_inline_chat_box', 'wplc_agent_info', $agent_data );
|
34 |
+
wp_localize_script( 'wplc_inline_chat_box', 'wplc_styles', $style_settings );
|
35 |
+
wp_localize_script( 'wplc_inline_chat_box', 'wplc_images', $wplc_images );
|
36 |
+
|
37 |
+
wp_enqueue_script( 'wplc_chat_box_functions',
|
38 |
+
plugins_url( 'wplc_functions.js', __FILE__ ),
|
39 |
+
array( 'wp-blocks', 'wp-i18n', 'wp-element' )
|
40 |
+
);
|
41 |
+
|
42 |
+
|
43 |
+
// Styles
|
44 |
+
wp_enqueue_style( 'wplc_inline_chat_box-editor',
|
45 |
+
plugins_url( 'editor.css', __FILE__ ),
|
46 |
+
array( 'wp-edit-blocks' ),
|
47 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
add_action( 'enqueue_block_assets', 'wplc_inline_chat_box_block_block_assets' );
|
52 |
+
|
53 |
+
function wplc_inline_chat_box_block_block_assets() {
|
54 |
+
|
55 |
+
// Styles for front-end
|
56 |
+
wp_enqueue_style( 'wplc_inline_chat_box_front_end',
|
57 |
+
plugins_url( 'style.css', __FILE__ ),
|
58 |
+
array( 'wp-blocks' ),
|
59 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
|
60 |
+
);
|
61 |
}
|
includes/blocks/wplc-inline-chat-box/wplc_functions.js
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
-
jQuery(function($){
|
2 |
-
|
3 |
-
var chat_box_button = '<div class="wplc_gutenberg_button active" style="background-color: #' + wplc_styles.color_1 + '; background-image: url(' + wplc_images.close_icon + ');"></div>';
|
4 |
-
var chatbox_preview_img = '<img class="wplc_gutenberg_avatar_img" style="max-width:inherit;" id="agent_grav_' + wplc_agent_info.id + '" title="' + wplc_agent_info.name + '" src="https://www.gravatar.com/avatar/' + wplc_agent_info.email + '?s=60" />';
|
5 |
-
var chatbox_preview_overlay_image = '<div class="wplc_gutenberg_overlay_image" style="background-image: url(\'https://www.gravatar.com/avatar/' + wplc_agent_info.email + '?s=60\');"></div>';
|
6 |
-
var chat_box_content = chat_box_button + '<div class="wplc_gutenberg_chat_box"><div class="wplc_gutenberg_header" style="background-color: #' + wplc_styles.color_1 + ' !important;"><span class="wplc_gutenberg_avatar">' + chatbox_preview_img + chatbox_preview_overlay_image + '</span><span class="wplc_gutenberg_name">' + wplc_agent_info.name + '</span><span class="wplc_gutenberg_chevron dashicons dashicons-arrow-up-alt2"></span></div><div class="wplc_gutenberg_body" style="background-image: url(' + wplc_images.background_image + ');"></div><div class="wplc_gutenberg_text_box"><span class="wplc_gutenberg_typing">'+
|
7 |
-
|
8 |
-
// Update select fields on page load
|
9 |
-
$('#wplc-inline-chat-box .wplc_selected_theme').each(function(){
|
10 |
-
var id = $(this).html();
|
11 |
-
$(this).closest('#wplc-inline-chat-box').find('.wplc_select_theme').val(id);
|
12 |
-
});
|
13 |
-
|
14 |
-
$('.wplc_gutenberg_preview').html(chat_box_content);
|
15 |
-
|
16 |
-
$('.wplc_gutenberg_button').css('transform', 'rotate(90deg)');
|
17 |
-
|
18 |
-
$(document).on('click', '.wplc_gutenberg_button', function(){
|
19 |
-
$(this).toggleClass('active');
|
20 |
-
if ($(this).hasClass('active')) {
|
21 |
-
wplc_gutenberg_close_chat_box(this, wplc_images.open_icon )
|
22 |
-
} else {
|
23 |
-
|
24 |
-
wplc_gutenberg_open_chat_box(this, wplc_images.close_icon)
|
25 |
-
}
|
26 |
-
});
|
27 |
-
});
|
28 |
-
|
29 |
-
function wplc_gutenberg_open_chat_box(button, icon) {
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
}
|
34 |
-
|
35 |
-
function wplc_gutenberg_close_chat_box(button, icon) {
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
}
|
1 |
+
jQuery(document).ready( function($){
|
2 |
+
|
3 |
+
var chat_box_button = '<div class="wplc_gutenberg_button active" style="background-color: #' + wplc_styles.color_1 + '; background-image: url(' + wplc_images.close_icon + ');"></div>';
|
4 |
+
var chatbox_preview_img = '<img class="wplc_gutenberg_avatar_img" style="max-width:inherit;" id="agent_grav_' + wplc_agent_info.id + '" title="' + wplc_agent_info.name + '" src="https://www.gravatar.com/avatar/' + wplc_agent_info.email + '?s=60" />';
|
5 |
+
var chatbox_preview_overlay_image = '<div class="wplc_gutenberg_overlay_image" style="background-image: url(\'https://www.gravatar.com/avatar/' + wplc_agent_info.email + '?s=60\');"></div>';
|
6 |
+
var chat_box_content = chat_box_button + '<div class="wplc_gutenberg_chat_box"><div class="wplc_gutenberg_header" style="background-color: #' + wplc_styles.color_1 + ' !important;"><span class="wplc_gutenberg_avatar">' + chatbox_preview_img + chatbox_preview_overlay_image + '</span><span class="wplc_gutenberg_name">' + wplc_agent_info.name + '</span><span class="wplc_gutenberg_chevron dashicons dashicons-arrow-up-alt2"></span></div><div class="wplc_gutenberg_body" style="background-image: url(' + wplc_images.background_image + ');"></div><div class="wplc_gutenberg_text_box"><span class="wplc_gutenberg_typing">'+bleeper_localized_strings[5]+'</span></div></div>';
|
7 |
+
|
8 |
+
// Update select fields on page load
|
9 |
+
$('#wplc-inline-chat-box .wplc_selected_theme').each(function(){
|
10 |
+
var id = $(this).html();
|
11 |
+
$(this).closest('#wplc-inline-chat-box').find('.wplc_select_theme').val(id);
|
12 |
+
});
|
13 |
+
|
14 |
+
$('.wplc_gutenberg_preview').html(chat_box_content);
|
15 |
+
|
16 |
+
$('.wplc_gutenberg_button').css('transform', 'rotate(90deg)');
|
17 |
+
|
18 |
+
$(document).on('click', '.wplc_gutenberg_button', function(){
|
19 |
+
$(this).toggleClass('active');
|
20 |
+
if ($(this).hasClass('active')) {
|
21 |
+
wplc_gutenberg_close_chat_box(this, wplc_images.open_icon )
|
22 |
+
} else {
|
23 |
+
|
24 |
+
wplc_gutenberg_open_chat_box(this, wplc_images.close_icon)
|
25 |
+
}
|
26 |
+
});
|
27 |
+
});
|
28 |
+
|
29 |
+
function wplc_gutenberg_open_chat_box(button, icon) {
|
30 |
+
$(button).css('background-image', 'url(' + icon + ')');
|
31 |
+
$(button).css('transform', 'rotate(90deg)');
|
32 |
+
$(button).closest('.wplc_gutenberg_preview').find('.wplc_gutenberg_chat_box').show();
|
33 |
+
}
|
34 |
+
|
35 |
+
function wplc_gutenberg_close_chat_box(button, icon) {
|
36 |
+
$(button).css('background-image', 'url(' + icon + ')');
|
37 |
+
$(button).css('transform', 'rotate(0deg)');
|
38 |
+
$(button).closest('.wplc_gutenberg_preview').find('.wplc_gutenberg_chat_box').hide();
|
39 |
}
|
includes/credits.php
CHANGED
File without changes
|
includes/deprecated.php
CHANGED
File without changes
|
includes/feedback-page.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$current_user = wp_get_current_user();
|
3 |
+
?><div class="wrap wplc_wrap">
|
4 |
+
|
5 |
+
|
6 |
+
<div id="icon-options-general" class="icon32 icon32-posts-post"><br></div><h2><?php _e("WP Live Chat Support Feedback","wplivechat") ?></h2>
|
7 |
+
<form name="wplc_feedback" action="" method="POST">
|
8 |
+
<table width='100%' class="wp-list-table widefat wplc_list_table fixed striped pages" style='width:50%'>
|
9 |
+
<tr>
|
10 |
+
<td width="250px" >
|
11 |
+
<label><?php _e("Your Name","wplivechat"); ?></label>
|
12 |
+
</td>
|
13 |
+
<td>
|
14 |
+
<input type="text" class='wplc-input' name="wplc_nl_feedback_name" value="<?php echo $current_user->user_firstname; ?>"/>
|
15 |
+
</td>
|
16 |
+
</tr>
|
17 |
+
<tr>
|
18 |
+
<td width="250px" >
|
19 |
+
<label><?php _e("Your Email","wplivechat"); ?></label>
|
20 |
+
</td>
|
21 |
+
<td>
|
22 |
+
<input type="text" class='wplc-input' name="wplc_nl_feedback_email" value="<?php echo $current_user->user_email; ?>"/>
|
23 |
+
</td>
|
24 |
+
</tr>
|
25 |
+
<tr>
|
26 |
+
<td width="250px" >
|
27 |
+
<label><?php _e("Your Website","wplivechat"); ?></label>
|
28 |
+
</td>
|
29 |
+
<td>
|
30 |
+
<input type="text" class='wplc-input' name="wplc_nl_feedback_website" value="<?php echo get_site_url(); ?>"/>
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<tr>
|
34 |
+
<td width="250px" valign='top' >
|
35 |
+
<label><?php _e("Feedback","wplivechat"); ?></label>
|
36 |
+
</td>
|
37 |
+
<td>
|
38 |
+
<textarea name="wplc_nl_feedback_feedback" cols='60' rows='10' style="max-width:100%;"></textarea>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td width="250px" valign='top' >
|
43 |
+
|
44 |
+
</td>
|
45 |
+
<td>
|
46 |
+
<input type='submit' name='wplc_nl_send_feedback' class='button-primary' value='<?php _e("Send Feedback","wplivechat") ?>' />
|
47 |
+
</td>
|
48 |
+
</tr>
|
49 |
+
</table>
|
50 |
+
|
51 |
+
</form>
|
52 |
+
|
includes/modal_control.php
CHANGED
File without changes
|
includes/notification_control.php
CHANGED
@@ -26,7 +26,7 @@ function wplc_filter_control_chat_notification_user_loaded($type,$cid,$data) {
|
|
26 |
global $wplc_tblname_msgs;
|
27 |
|
28 |
|
29 |
-
$msg = sprintf(__("User is browsing <small><a href='%s' target='_BLANK'>%s</a></small>","wplivechat")
|
30 |
|
31 |
$wpdb->insert(
|
32 |
$wplc_tblname_msgs,
|
26 |
global $wplc_tblname_msgs;
|
27 |
|
28 |
|
29 |
+
$msg = sprintf(__("User is browsing <small><a href='%s' target='_BLANK'>%s</a></small>","wplivechat"),$data['uri'],wplc_shortenurl($data['uri']));
|
30 |
|
31 |
$wpdb->insert(
|
32 |
$wplc_tblname_msgs,
|
includes/settings_page.php
CHANGED
@@ -1,1090 +1,1078 @@
|
|
1 |
-
<style>
|
2 |
-
.ui-tabs-vertical { }
|
3 |
-
.ui-tabs-vertical .ui-tabs-nav {
|
4 |
-
padding: .2em .1em .2em .2em;
|
5 |
-
float: left;
|
6 |
-
/* width: 10%; */
|
7 |
-
max-width: 20%;
|
8 |
-
min-width: 190px;
|
9 |
-
}
|
10 |
-
.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
|
11 |
-
.ui-tabs-vertical .ui-tabs-nav li a { display:block; }
|
12 |
-
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; }
|
13 |
-
.ui-tabs-vertical .ui-tabs-panel {
|
14 |
-
/* padding: 1em; */
|
15 |
-
float: left;
|
16 |
-
min-width: 67%;
|
17 |
-
max-width: 67%;
|
18 |
-
}
|
19 |
-
textarea, input[type='text'], input[type='email'], input[type='password']{ width: 100% !important; }
|
20 |
-
</style>
|
21 |
-
|
22 |
-
<?php
|
23 |
-
/**
|
24 |
-
* Removes the ajax loader and forces the settings page to load as is after 3 seconds.
|
25 |
-
*
|
26 |
-
* This has been put here to counter any PHP fatal warnings that may be experienced on the settings page.
|
27 |
-
*
|
28 |
-
* Putting this in the wplc_tabs.js file will not work as that file is not loaded if there is a PHP fatal error
|
29 |
-
*/
|
30 |
-
?>
|
31 |
-
<script>
|
32 |
-
setTimeout( function() {
|
33 |
-
jQuery("#wplc_settings_page_loader").remove();
|
34 |
-
jQuery(".wrap").css('display','block');
|
35 |
-
jQuery(".wplc_settings_save_notice").css('display','block');
|
36 |
-
},3000);
|
37 |
-
</script>
|
38 |
-
|
39 |
-
<?php wplc_stats("settings");
|
40 |
-
|
41 |
-
|
42 |
-
if (function_exists("wplc_string_check")) { wplc_string_check(); }
|
43 |
-
$wplc_settings = get_option("WPLC_SETTINGS");
|
44 |
-
|
45 |
-
?>
|
46 |
-
|
47 |
-
<?php
|
48 |
-
if (get_option("WPLC_HIDE_CHAT") == true) {
|
49 |
-
$wplc_hide_chat = "checked";
|
50 |
-
} else {
|
51 |
-
$wplc_hide_chat = "";
|
52 |
-
};
|
53 |
-
|
54 |
-
?>
|
55 |
-
<img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/ajax-loader.gif'; ?>' id='wplc_settings_page_loader' style='display: block; margin: 20px auto;' />
|
56 |
-
<div class="wrap wplc_wrap" style='display: none;'>
|
57 |
-
|
58 |
-
<style>
|
59 |
-
.wplc_light_grey{
|
60 |
-
color: #666;
|
61 |
-
}
|
62 |
-
</style>
|
63 |
-
<div id="icon-edit" class="icon32 icon32-posts-post">
|
64 |
-
<br>
|
65 |
-
</div>
|
66 |
-
<h2><?php _e("WP Live Chat Support Settings","wplivechat")?></h2>
|
67 |
-
<?php
|
68 |
-
|
69 |
-
$wplc_mail_type = get_option("wplc_mail_type");
|
70 |
-
if (!isset($wplc_mail_type) || $wplc_mail_type == "" || !$wplc_mail_type) { $wplc_mail_type = "wp_mail"; }
|
71 |
-
if (isset($wplc_settings["wplc_settings_align"])) { $wplc_settings_align[intval($wplc_settings["wplc_settings_align"])] = "SELECTED"; }
|
72 |
-
if (isset($wplc_settings["wplc_settings_enabled"])) { $wplc_settings_enabled[intval($wplc_settings["wplc_settings_enabled"])] = "SELECTED"; }
|
73 |
-
if (isset($wplc_settings["wplc_settings_fill"])) { $wplc_settings_fill = $wplc_settings["wplc_settings_fill"]; } else { $wplc_settings_fill = "ed832f"; }
|
74 |
-
if (isset($wplc_settings["wplc_settings_font"])) { $wplc_settings_font = $wplc_settings["wplc_settings_font"]; } else { $wplc_settings_font = "FFFFFF"; }
|
75 |
-
if (isset($wplc_settings["wplc_settings_color1"])) { $wplc_settings_color1 = $wplc_settings["wplc_settings_color1"]; } else { $wplc_settings_color1 = "ED832F"; }
|
76 |
-
if (isset($wplc_settings["wplc_settings_color2"])) { $wplc_settings_color2 = $wplc_settings["wplc_settings_color2"]; } else { $wplc_settings_color2 = "FFFFFF"; }
|
77 |
-
if (isset($wplc_settings["wplc_settings_color3"])) { $wplc_settings_color3 = $wplc_settings["wplc_settings_color3"]; } else { $wplc_settings_color3 = "EEEEEE"; }
|
78 |
-
if (isset($wplc_settings["wplc_settings_color4"])) { $wplc_settings_color4 = $wplc_settings["wplc_settings_color4"]; } else { $wplc_settings_color4 = "666666"; }
|
79 |
-
if (isset($wplc_settings["wplc_environment"])) { $wplc_environment[intval($wplc_settings["wplc_environment"])] = "SELECTED"; }
|
80 |
-
|
81 |
-
|
82 |
-
if(get_option("WPLC_HIDE_CHAT") == true) { $wplc_hide_chat = "checked"; } else { $wplc_hide_chat = ""; };
|
83 |
-
|
84 |
-
?>
|
85 |
-
<form action='' name='wplc_settings' method='POST' id='wplc_settings'>
|
86 |
-
|
87 |
-
<div id="wplc_tabs">
|
88 |
-
<ul>
|
89 |
-
<?php
|
90 |
-
$tab_array = array(
|
91 |
-
0 => array(
|
92 |
-
"href" => "#tabs-1",
|
93 |
-
"icon" => 'fa fa-gear',
|
94 |
-
"label" => __("General Settings","wplivechat")
|
95 |
-
),
|
96 |
-
1 => array(
|
97 |
-
"href" => "#tabs-2",
|
98 |
-
"icon" => 'fa fa-envelope',
|
99 |
-
"label" => __("Chat Box","wplivechat")
|
100 |
-
),
|
101 |
-
2 => array(
|
102 |
-
"href" => "#tabs-3",
|
103 |
-
"icon" => 'fa fa-book',
|
104 |
-
"label" => __("Offline Messages","wplivechat")
|
105 |
-
),
|
106 |
-
3 => array(
|
107 |
-
"href" => "#tabs-4",
|
108 |
-
"icon" => 'fa fa-pencil',
|
109 |
-
"label" => __("Styling","wplivechat")
|
110 |
-
),
|
111 |
-
4 => array(
|
112 |
-
"href" => "#tabs-5",
|
113 |
-
"icon" => 'fa fa-users',
|
114 |
-
"label" => __("Agents","wplivechat")
|
115 |
-
),
|
116 |
-
5 => array(
|
117 |
-
"href" => "#tabs-7",
|
118 |
-
"icon" => 'fa fa-gavel',
|
119 |
-
"label" => __("Blocked Visitors","wplivechat")
|
120 |
-
)
|
121 |
-
);
|
122 |
-
$tabs_top = apply_filters("wplc_filter_setting_tabs",$tab_array);
|
123 |
-
|
124 |
-
foreach ($tabs_top as $tab) {
|
125 |
-
echo "<li><a href=\"".$tab['href']."\"><i class=\"".$tab['icon']."\"></i> ".$tab['label']."</a></li>";
|
126 |
-
}
|
127 |
-
|
128 |
-
?>
|
129 |
-
|
130 |
-
</ul>
|
131 |
-
<div id="tabs-1">
|
132 |
-
<h3><?php _e("General Settings",'wplivechat')?></h3>
|
133 |
-
<table class='wp-list-table wplc_list_table widefat fixed striped pages' width='700'>
|
134 |
-
<tr>
|
135 |
-
<td width='350' valign='top'><?php _e("Chat enabled","wplivechat")?>: </td>
|
136 |
-
<td>
|
137 |
-
<select id='wplc_settings_enabled' name='wplc_settings_enabled'>
|
138 |
-
<option value="1" <?php if (isset($wplc_settings_enabled[1])) { echo $wplc_settings_enabled[1]; } ?>><?php _e("Yes","wplivechat"); ?></option>
|
139 |
-
<option value="2" <?php if (isset($wplc_settings_enabled[2])) { echo $wplc_settings_enabled[2]; }?>><?php _e("No","wplivechat"); ?></option>
|
140 |
-
</select>
|
141 |
-
</td>
|
142 |
-
</tr>
|
143 |
-
<?php /*
|
144 |
-
<tr>
|
145 |
-
<td width='200' valign='top'>
|
146 |
-
<?php _e("Show the 'Powered by WP Live Chat Support' link", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Checking this will display a Powered by WP Live Chat Support link', 'wplivechat'); ?>"></i>
|
147 |
-
</td>
|
148 |
-
<td>
|
149 |
-
<input type="checkbox" value="1" name="wplc_powered_by_link" <?php if (isset($wplc_settings['wplc_powered_by_link']) && $wplc_settings['wplc_powered_by_link'] == 1) { echo "checked"; } ?> />
|
150 |
-
</td>
|
151 |
-
</tr>
|
152 |
-
*/ ?>
|
153 |
-
|
154 |
-
<!--
|
155 |
-
<tr>
|
156 |
-
<td width='400' valign='top'>
|
157 |
-
<?php _e("Hide Chat", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Hides chat for 24hrs when user clicks X", "wplivechat") ?>"></i>
|
158 |
-
</td>
|
159 |
-
<td valign='top'>
|
160 |
-
<input type="checkbox" name="wplc_hide_chat" value="true" <?php echo $wplc_hide_chat ?>/>
|
161 |
-
</td>
|
162 |
-
</tr>
|
163 |
-
-->
|
164 |
-
<tr>
|
165 |
-
<td width='300' valign='top'>
|
166 |
-
<?php _e("Required Chat Box Fields","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Set default fields that will be displayed when users starting a chat", "wplivechat") ?>"></i>
|
167 |
-
</td>
|
168 |
-
<td valign='top'>
|
169 |
-
<div class="wplc-require-user-info__item">
|
170 |
-
<input type="radio" value="1" name="wplc_require_user_info" id="wplc_require_user_info_both" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == '1') { echo "checked"; } ?> />
|
171 |
-
<label for="wplc_require_user_info_both"><?php _e( 'Name and email', 'wplivechat' ); ?></label>
|
172 |
-
</div>
|
173 |
-
<div class="wplc-require-user-info__item">
|
174 |
-
<input type="radio" value="email" name="wplc_require_user_info" id="wplc_require_user_info_email" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == 'email') { echo "checked"; } ?> />
|
175 |
-
<label for="wplc_require_user_info_email"><?php _e( 'Email', 'wplivechat' ); ?></label>
|
176 |
-
</div>
|
177 |
-
<div class="wplc-require-user-info__item">
|
178 |
-
<input type="radio" value="name" name="wplc_require_user_info" id="wplc_require_user_info_name" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == 'name') { echo "checked"; } ?> />
|
179 |
-
<label for="wplc_require_user_info_name"><?php _e( 'Name', 'wplivechat' ); ?></label>
|
180 |
-
</div>
|
181 |
-
<div class="wplc-require-user-info__item">
|
182 |
-
<input type="radio" value="0" name="wplc_require_user_info" id="wplc_require_user_info_none" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == '0') { echo "checked"; } ?> />
|
183 |
-
<label for="wplc_require_user_info_none"><?php _e( 'No fields', 'wplivechat' ); ?></label>
|
184 |
-
</div>
|
185 |
-
</td>
|
186 |
-
</tr>
|
187 |
-
<tr class="wplc-user-default-visitor-name__row">
|
188 |
-
<td width='300' valign='top'>
|
189 |
-
<?php _e("Default visitor name","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("This name will be displayed for all not logged in visitors", "wplivechat") ?>"></i>
|
190 |
-
</td>
|
191 |
-
<td valign='top'>
|
192 |
-
<input type="text" name="wplc_user_default_visitor_name" id="wplc_user_default_visitor_name" value="<?php if ( isset( $wplc_settings['wplc_user_default_visitor_name'] ) ) { echo stripslashes( $wplc_settings['wplc_user_default_visitor_name'] ); } else { echo __( "Guest", "wplivechat" ); } ?>" />
|
193 |
-
</td>
|
194 |
-
</tr>
|
195 |
-
<tr>
|
196 |
-
<td width='300' valign='top'>
|
197 |
-
<?php _e("Input Field Replacement Text","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("This is the text that will show in place of the Name And Email fields", "wplivechat") ?>"></i>
|
198 |
-
</td>
|
199 |
-
<td valign='top'>
|
200 |
-
<textarea cols="45" rows="5" name="wplc_user_alternative_text" ><?php if(isset($wplc_settings['wplc_user_alternative_text'])) { echo stripslashes($wplc_settings['wplc_user_alternative_text']); } ?></textarea>
|
201 |
-
</td>
|
202 |
-
</tr>
|
203 |
-
<tr>
|
204 |
-
<td width='300' valign='top'>
|
205 |
-
<?php _e("Use Logged In User Details","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("A user's Name and Email Address will be used by default if they are logged in.", "wplivechat") ?>"></i>
|
206 |
-
</td>
|
207 |
-
<td valign='top'>
|
208 |
-
<input type="checkbox" value="1" name="wplc_loggedin_user_info" <?php if(isset($wplc_settings['wplc_loggedin_user_info']) && $wplc_settings['wplc_loggedin_user_info'] == 1 ) { echo "checked"; } ?> />
|
209 |
-
</td>
|
210 |
-
</tr>
|
211 |
-
<tr>
|
212 |
-
<td width='200' valign='top'>
|
213 |
-
<?php _e("Enable On Mobile Devices","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disabling this will mean that the Chat Box will not be displayed on mobile devices. (Smartphones and Tablets)", "wplivechat") ?>"></i>
|
214 |
-
</td>
|
215 |
-
<td valign='top'>
|
216 |
-
<input type="checkbox" value="1" name="wplc_enabled_on_mobile" <?php if(isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] == 1 ) { echo "checked"; } ?> />
|
217 |
-
</td>
|
218 |
-
</tr>
|
219 |
-
|
220 |
-
<td width='350' valign='top'>
|
221 |
-
<?php _e("Record a visitor's IP Address","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this to enable anonymity for your visitors", "wplivechat") ?>"></i>
|
222 |
-
</td>
|
223 |
-
<td valign='top'>
|
224 |
-
<input type="checkbox" value="1" name="wplc_record_ip_address" <?php if(isset($wplc_settings['wplc_record_ip_address']) && $wplc_settings['wplc_record_ip_address'] == 1 ) { echo "checked"; } ?> />
|
225 |
-
</td>
|
226 |
-
</tr
|
227 |
-
|
228 |
-
<?php if( isset( $wplc_settings['wplc_use_node_server'] ) && intval( $wplc_settings['wplc_use_node_server'] ) == 1 ){ ?>
|
229 |
-
<tr>
|
230 |
-
<td width='300' valign='top'>
|
231 |
-
<?php _e("Play a sound when there is a new visitor","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this to mute the sound that is played when a new visitor arrives", "wplivechat") ?>"></i>
|
232 |
-
</td>
|
233 |
-
<td valign='top'>
|
234 |
-
<input type="checkbox" value="1" name="wplc_enable_visitor_sound" <?php if(isset($wplc_settings['wplc_enable_visitor_sound']) && $wplc_settings['wplc_enable_visitor_sound'] == 1 ) { echo "checked"; } ?> />
|
235 |
-
</td>
|
236 |
-
</tr>
|
237 |
-
<?php } ?>
|
238 |
-
<tr>
|
239 |
-
<td width='300' valign='top'>
|
240 |
-
<?php _e("Play a sound when a new message is received","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this to mute the sound that is played when a new chat message is received", "wplivechat") ?>"></i>
|
241 |
-
</td>
|
242 |
-
<td valign='top'>
|
243 |
-
<input type="checkbox" value="1" name="wplc_enable_msg_sound" <?php if(isset($wplc_settings['wplc_enable_msg_sound']) && $wplc_settings['wplc_enable_msg_sound'] == 1 ) { echo "checked"; } ?> />
|
244 |
-
</td>
|
245 |
-
</tr>
|
246 |
-
|
247 |
-
<tr>
|
248 |
-
<td width='300' valign='top'>
|
249 |
-
<?php _e("Enable Font Awesome set","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this if you have Font Awesome set included with your theme", "wplivechat") ?>"></i>
|
250 |
-
</td>
|
251 |
-
<td valign='top'>
|
252 |
-
<input type="checkbox" value="1" name="wplc_enable_font_awesome" <?php if(isset($wplc_settings['wplc_enable_font_awesome']) && $wplc_settings['wplc_enable_font_awesome'] == 1 ) { echo "checked"; } ?> />
|
253 |
-
</td>
|
254 |
-
</tr>
|
255 |
-
<tr>
|
256 |
-
<td width='300' valign='top'>
|
257 |
-
<?php _e("Enable chat dashboard and notifications on all admin pages","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("This will load the chat dashboard on every admin page.", "wplivechat") ?>"></i>
|
258 |
-
</td>
|
259 |
-
<td valign='top'>
|
260 |
-
<input type="checkbox" value="1" name="wplc_enable_all_admin_pages" <?php if(isset($wplc_settings['wplc_enable_all_admin_pages']) && $wplc_settings['wplc_enable_all_admin_pages'] == 1 ) { echo "checked"; } ?> />
|
261 |
-
</td>
|
262 |
-
</tr>
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
<
|
272 |
-
|
273 |
-
|
274 |
-
<?php _e("
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
<
|
287 |
-
|
288 |
-
|
289 |
-
<?php _e("
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
<
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
<
|
321 |
-
|
322 |
-
|
323 |
-
<td
|
324 |
-
|
325 |
-
|
326 |
-
<option value="
|
327 |
-
<option value="
|
328 |
-
<option value="
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
<
|
352 |
-
|
353 |
-
|
354 |
-
<?php _e("
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
<
|
369 |
-
|
370 |
-
|
371 |
-
<?php _e("
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
<
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
</td>
|
469 |
-
</tr>
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
</td>
|
492 |
-
</tr>
|
493 |
-
<tr>
|
494 |
-
<td>
|
495 |
-
<?php _e("
|
496 |
-
</td>
|
497 |
-
<td>
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
<?php
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
<td>
|
557 |
-
|
558 |
-
<
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
<?php _e("
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
<tr>
|
593 |
-
<td width=
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
</td>
|
621 |
-
</tr>
|
622 |
-
<tr>
|
623 |
-
<td width="300" valign="top"><?php _e("
|
624 |
-
<td>
|
625 |
-
|
626 |
-
</td>
|
627 |
-
</tr>
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
<td>
|
637 |
-
|
638 |
-
</td>
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
<td width=
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
<tr>
|
675 |
-
<td
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
<
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
<div class='wplc-palette-top' style='background-color:#
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
<td>
|
897 |
-
|
898 |
-
<
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
</td>
|
906 |
-
</tr>
|
907 |
-
<tr>
|
908 |
-
<td width='200' valign='top'><?php _e("Palette Color
|
909 |
-
<td>
|
910 |
-
<input id="
|
911 |
-
</td>
|
912 |
-
</tr>
|
913 |
-
<tr>
|
914 |
-
<td width='200' valign='top'><?php _e("Palette Color
|
915 |
-
<td>
|
916 |
-
<input id="
|
917 |
-
</td>
|
918 |
-
</tr>
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
<td>
|
944 |
-
|
945 |
-
<input id="
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
<td>
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
<td>
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
<tr class="wplc_localization_strings">
|
978 |
-
<td width="200" valign="top"><?php _e("
|
979 |
-
<td>
|
980 |
-
<input id="
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
<div class='wplc_animation_image <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-
|
1011 |
-
echo 'wplc_animation_active';
|
1012 |
-
} ?>' id='
|
1013 |
-
<i class="fa fa-
|
1014 |
-
<p><?php _e('
|
1015 |
-
</div>
|
1016 |
-
<div class='wplc_animation_image <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-
|
1017 |
-
echo 'wplc_animation_active';
|
1018 |
-
} ?>' id='
|
1019 |
-
<i class="fa fa-
|
1020 |
-
<p><?php _e('
|
1021 |
-
</div>
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
<?php do_action("wplc_hook_settings_page_more_tabs"); ?>
|
1083 |
-
|
1084 |
-
</div>
|
1085 |
-
<p class='submit'><input type='submit' name='wplc_save_settings' class='button-primary' value='<?php _e("Save Settings","wplivechat")?>' /></p>
|
1086 |
-
</form>
|
1087 |
-
|
1088 |
-
</div>
|
1089 |
-
|
1090 |
-
|
1 |
+
<style>
|
2 |
+
.ui-tabs-vertical { }
|
3 |
+
.ui-tabs-vertical .ui-tabs-nav {
|
4 |
+
padding: .2em .1em .2em .2em;
|
5 |
+
float: left;
|
6 |
+
/* width: 10%; */
|
7 |
+
max-width: 20%;
|
8 |
+
min-width: 190px;
|
9 |
+
}
|
10 |
+
.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; }
|
11 |
+
.ui-tabs-vertical .ui-tabs-nav li a { display:block; }
|
12 |
+
.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; }
|
13 |
+
.ui-tabs-vertical .ui-tabs-panel {
|
14 |
+
/* padding: 1em; */
|
15 |
+
float: left;
|
16 |
+
min-width: 67%;
|
17 |
+
max-width: 67%;
|
18 |
+
}
|
19 |
+
textarea, input[type='text'], input[type='email'], input[type='password']{ width: 100% !important; }
|
20 |
+
</style>
|
21 |
+
|
22 |
+
<?php
|
23 |
+
/**
|
24 |
+
* Removes the ajax loader and forces the settings page to load as is after 3 seconds.
|
25 |
+
*
|
26 |
+
* This has been put here to counter any PHP fatal warnings that may be experienced on the settings page.
|
27 |
+
*
|
28 |
+
* Putting this in the wplc_tabs.js file will not work as that file is not loaded if there is a PHP fatal error
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<script>
|
32 |
+
setTimeout( function() {
|
33 |
+
jQuery("#wplc_settings_page_loader").remove();
|
34 |
+
jQuery(".wrap").css('display','block');
|
35 |
+
jQuery(".wplc_settings_save_notice").css('display','block');
|
36 |
+
},3000);
|
37 |
+
</script>
|
38 |
+
|
39 |
+
<?php wplc_stats("settings");
|
40 |
+
|
41 |
+
|
42 |
+
if (function_exists("wplc_string_check")) { wplc_string_check(); }
|
43 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
44 |
+
|
45 |
+
?>
|
46 |
+
|
47 |
+
<?php
|
48 |
+
if (get_option("WPLC_HIDE_CHAT") == true) {
|
49 |
+
$wplc_hide_chat = "checked";
|
50 |
+
} else {
|
51 |
+
$wplc_hide_chat = "";
|
52 |
+
};
|
53 |
+
|
54 |
+
?>
|
55 |
+
<img src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/ajax-loader.gif'; ?>' id='wplc_settings_page_loader' style='display: block; margin: 20px auto;' />
|
56 |
+
<div class="wrap wplc_wrap" style='display: none;'>
|
57 |
+
|
58 |
+
<style>
|
59 |
+
.wplc_light_grey{
|
60 |
+
color: #666;
|
61 |
+
}
|
62 |
+
</style>
|
63 |
+
<div id="icon-edit" class="icon32 icon32-posts-post">
|
64 |
+
<br>
|
65 |
+
</div>
|
66 |
+
<h2><?php _e("WP Live Chat Support Settings","wplivechat")?></h2>
|
67 |
+
<?php
|
68 |
+
|
69 |
+
$wplc_mail_type = get_option("wplc_mail_type");
|
70 |
+
if (!isset($wplc_mail_type) || $wplc_mail_type == "" || !$wplc_mail_type) { $wplc_mail_type = "wp_mail"; }
|
71 |
+
if (isset($wplc_settings["wplc_settings_align"])) { $wplc_settings_align[intval($wplc_settings["wplc_settings_align"])] = "SELECTED"; }
|
72 |
+
if (isset($wplc_settings["wplc_settings_enabled"])) { $wplc_settings_enabled[intval($wplc_settings["wplc_settings_enabled"])] = "SELECTED"; }
|
73 |
+
if (isset($wplc_settings["wplc_settings_fill"])) { $wplc_settings_fill = $wplc_settings["wplc_settings_fill"]; } else { $wplc_settings_fill = "ed832f"; }
|
74 |
+
if (isset($wplc_settings["wplc_settings_font"])) { $wplc_settings_font = $wplc_settings["wplc_settings_font"]; } else { $wplc_settings_font = "FFFFFF"; }
|
75 |
+
if (isset($wplc_settings["wplc_settings_color1"])) { $wplc_settings_color1 = $wplc_settings["wplc_settings_color1"]; } else { $wplc_settings_color1 = "ED832F"; }
|
76 |
+
if (isset($wplc_settings["wplc_settings_color2"])) { $wplc_settings_color2 = $wplc_settings["wplc_settings_color2"]; } else { $wplc_settings_color2 = "FFFFFF"; }
|
77 |
+
if (isset($wplc_settings["wplc_settings_color3"])) { $wplc_settings_color3 = $wplc_settings["wplc_settings_color3"]; } else { $wplc_settings_color3 = "EEEEEE"; }
|
78 |
+
if (isset($wplc_settings["wplc_settings_color4"])) { $wplc_settings_color4 = $wplc_settings["wplc_settings_color4"]; } else { $wplc_settings_color4 = "666666"; }
|
79 |
+
if (isset($wplc_settings["wplc_environment"])) { $wplc_environment[intval($wplc_settings["wplc_environment"])] = "SELECTED"; }
|
80 |
+
|
81 |
+
|
82 |
+
if(get_option("WPLC_HIDE_CHAT") == true) { $wplc_hide_chat = "checked"; } else { $wplc_hide_chat = ""; };
|
83 |
+
|
84 |
+
?>
|
85 |
+
<form action='' name='wplc_settings' method='POST' id='wplc_settings'>
|
86 |
+
|
87 |
+
<div id="wplc_tabs">
|
88 |
+
<ul>
|
89 |
+
<?php
|
90 |
+
$tab_array = array(
|
91 |
+
0 => array(
|
92 |
+
"href" => "#tabs-1",
|
93 |
+
"icon" => 'fa fa-gear',
|
94 |
+
"label" => __("General Settings","wplivechat")
|
95 |
+
),
|
96 |
+
1 => array(
|
97 |
+
"href" => "#tabs-2",
|
98 |
+
"icon" => 'fa fa-envelope',
|
99 |
+
"label" => __("Chat Box","wplivechat")
|
100 |
+
),
|
101 |
+
2 => array(
|
102 |
+
"href" => "#tabs-3",
|
103 |
+
"icon" => 'fa fa-book',
|
104 |
+
"label" => __("Offline Messages","wplivechat")
|
105 |
+
),
|
106 |
+
3 => array(
|
107 |
+
"href" => "#tabs-4",
|
108 |
+
"icon" => 'fa fa-pencil',
|
109 |
+
"label" => __("Styling","wplivechat")
|
110 |
+
),
|
111 |
+
4 => array(
|
112 |
+
"href" => "#tabs-5",
|
113 |
+
"icon" => 'fa fa-users',
|
114 |
+
"label" => __("Agents","wplivechat")
|
115 |
+
),
|
116 |
+
5 => array(
|
117 |
+
"href" => "#tabs-7",
|
118 |
+
"icon" => 'fa fa-gavel',
|
119 |
+
"label" => __("Blocked Visitors","wplivechat")
|
120 |
+
)
|
121 |
+
);
|
122 |
+
$tabs_top = apply_filters("wplc_filter_setting_tabs",$tab_array);
|
123 |
+
|
124 |
+
foreach ($tabs_top as $tab) {
|
125 |
+
echo "<li><a href=\"".$tab['href']."\"><i class=\"".$tab['icon']."\"></i> ".$tab['label']."</a></li>";
|
126 |
+
}
|
127 |
+
|
128 |
+
?>
|
129 |
+
|
130 |
+
</ul>
|
131 |
+
<div id="tabs-1">
|
132 |
+
<h3><?php _e("General Settings",'wplivechat')?></h3>
|
133 |
+
<table class='wp-list-table wplc_list_table widefat fixed striped pages' width='700'>
|
134 |
+
<tr>
|
135 |
+
<td width='350' valign='top'><?php _e("Chat enabled","wplivechat")?>: </td>
|
136 |
+
<td>
|
137 |
+
<select id='wplc_settings_enabled' name='wplc_settings_enabled'>
|
138 |
+
<option value="1" <?php if (isset($wplc_settings_enabled[1])) { echo $wplc_settings_enabled[1]; } ?>><?php _e("Yes","wplivechat"); ?></option>
|
139 |
+
<option value="2" <?php if (isset($wplc_settings_enabled[2])) { echo $wplc_settings_enabled[2]; }?>><?php _e("No","wplivechat"); ?></option>
|
140 |
+
</select>
|
141 |
+
</td>
|
142 |
+
</tr>
|
143 |
+
<?php /*
|
144 |
+
<tr>
|
145 |
+
<td width='200' valign='top'>
|
146 |
+
<?php _e("Show the 'Powered by WP Live Chat Support' link", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e('Checking this will display a Powered by WP Live Chat Support link', 'wplivechat'); ?>"></i>
|
147 |
+
</td>
|
148 |
+
<td>
|
149 |
+
<input type="checkbox" value="1" name="wplc_powered_by_link" <?php if (isset($wplc_settings['wplc_powered_by_link']) && $wplc_settings['wplc_powered_by_link'] == 1) { echo "checked"; } ?> />
|
150 |
+
</td>
|
151 |
+
</tr>
|
152 |
+
*/ ?>
|
153 |
+
|
154 |
+
<!--
|
155 |
+
<tr>
|
156 |
+
<td width='400' valign='top'>
|
157 |
+
<?php _e("Hide Chat", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Hides chat for 24hrs when user clicks X", "wplivechat") ?>"></i>
|
158 |
+
</td>
|
159 |
+
<td valign='top'>
|
160 |
+
<input type="checkbox" name="wplc_hide_chat" value="true" <?php echo $wplc_hide_chat ?>/>
|
161 |
+
</td>
|
162 |
+
</tr>
|
163 |
+
-->
|
164 |
+
<tr>
|
165 |
+
<td width='300' valign='top'>
|
166 |
+
<?php _e("Required Chat Box Fields","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Set default fields that will be displayed when users starting a chat", "wplivechat") ?>"></i>
|
167 |
+
</td>
|
168 |
+
<td valign='top'>
|
169 |
+
<div class="wplc-require-user-info__item">
|
170 |
+
<input type="radio" value="1" name="wplc_require_user_info" id="wplc_require_user_info_both" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == '1') { echo "checked"; } ?> />
|
171 |
+
<label for="wplc_require_user_info_both"><?php _e( 'Name and email', 'wplivechat' ); ?></label>
|
172 |
+
</div>
|
173 |
+
<div class="wplc-require-user-info__item">
|
174 |
+
<input type="radio" value="email" name="wplc_require_user_info" id="wplc_require_user_info_email" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == 'email') { echo "checked"; } ?> />
|
175 |
+
<label for="wplc_require_user_info_email"><?php _e( 'Email', 'wplivechat' ); ?></label>
|
176 |
+
</div>
|
177 |
+
<div class="wplc-require-user-info__item">
|
178 |
+
<input type="radio" value="name" name="wplc_require_user_info" id="wplc_require_user_info_name" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == 'name') { echo "checked"; } ?> />
|
179 |
+
<label for="wplc_require_user_info_name"><?php _e( 'Name', 'wplivechat' ); ?></label>
|
180 |
+
</div>
|
181 |
+
<div class="wplc-require-user-info__item">
|
182 |
+
<input type="radio" value="0" name="wplc_require_user_info" id="wplc_require_user_info_none" <?php if (isset($wplc_settings['wplc_require_user_info']) && $wplc_settings['wplc_require_user_info'] == '0') { echo "checked"; } ?> />
|
183 |
+
<label for="wplc_require_user_info_none"><?php _e( 'No fields', 'wplivechat' ); ?></label>
|
184 |
+
</div>
|
185 |
+
</td>
|
186 |
+
</tr>
|
187 |
+
<tr class="wplc-user-default-visitor-name__row">
|
188 |
+
<td width='300' valign='top'>
|
189 |
+
<?php _e("Default visitor name","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("This name will be displayed for all not logged in visitors", "wplivechat") ?>"></i>
|
190 |
+
</td>
|
191 |
+
<td valign='top'>
|
192 |
+
<input type="text" name="wplc_user_default_visitor_name" id="wplc_user_default_visitor_name" value="<?php if ( isset( $wplc_settings['wplc_user_default_visitor_name'] ) ) { echo stripslashes( $wplc_settings['wplc_user_default_visitor_name'] ); } else { echo __( "Guest", "wplivechat" ); } ?>" />
|
193 |
+
</td>
|
194 |
+
</tr>
|
195 |
+
<tr>
|
196 |
+
<td width='300' valign='top'>
|
197 |
+
<?php _e("Input Field Replacement Text","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("This is the text that will show in place of the Name And Email fields", "wplivechat") ?>"></i>
|
198 |
+
</td>
|
199 |
+
<td valign='top'>
|
200 |
+
<textarea cols="45" rows="5" name="wplc_user_alternative_text" ><?php if(isset($wplc_settings['wplc_user_alternative_text'])) { echo stripslashes($wplc_settings['wplc_user_alternative_text']); } ?></textarea>
|
201 |
+
</td>
|
202 |
+
</tr>
|
203 |
+
<tr>
|
204 |
+
<td width='300' valign='top'>
|
205 |
+
<?php _e("Use Logged In User Details","wplivechat")?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("A user's Name and Email Address will be used by default if they are logged in.", "wplivechat") ?>"></i>
|
206 |
+
</td>
|
207 |
+
<td valign='top'>
|
208 |
+
<input type="checkbox" value="1" name="wplc_loggedin_user_info" <?php if(isset($wplc_settings['wplc_loggedin_user_info']) && $wplc_settings['wplc_loggedin_user_info'] == 1 ) { echo "checked"; } ?> />
|
209 |
+
</td>
|
210 |
+
</tr>
|
211 |
+
<tr>
|
212 |
+
<td width='200' valign='top'>
|
213 |
+
<?php _e("Enable On Mobile Devices","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disabling this will mean that the Chat Box will not be displayed on mobile devices. (Smartphones and Tablets)", "wplivechat") ?>"></i>
|
214 |
+
</td>
|
215 |
+
<td valign='top'>
|
216 |
+
<input type="checkbox" value="1" name="wplc_enabled_on_mobile" <?php if(isset($wplc_settings['wplc_enabled_on_mobile']) && $wplc_settings['wplc_enabled_on_mobile'] == 1 ) { echo "checked"; } ?> />
|
217 |
+
</td>
|
218 |
+
</tr>
|
219 |
+
<tr>
|
220 |
+
<td width='350' valign='top'>
|
221 |
+
<?php _e("Record a visitor's IP Address","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this to enable anonymity for your visitors", "wplivechat") ?>"></i>
|
222 |
+
</td>
|
223 |
+
<td valign='top'>
|
224 |
+
<input type="checkbox" value="1" name="wplc_record_ip_address" <?php if(isset($wplc_settings['wplc_record_ip_address']) && $wplc_settings['wplc_record_ip_address'] == 1 ) { echo "checked"; } ?> />
|
225 |
+
</td>
|
226 |
+
</tr>
|
227 |
+
|
228 |
+
<?php if( isset( $wplc_settings['wplc_use_node_server'] ) && intval( $wplc_settings['wplc_use_node_server'] ) == 1 ){ ?>
|
229 |
+
<tr>
|
230 |
+
<td width='300' valign='top'>
|
231 |
+
<?php _e("Play a sound when there is a new visitor","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this to mute the sound that is played when a new visitor arrives", "wplivechat") ?>"></i>
|
232 |
+
</td>
|
233 |
+
<td valign='top'>
|
234 |
+
<input type="checkbox" value="1" name="wplc_enable_visitor_sound" <?php if(isset($wplc_settings['wplc_enable_visitor_sound']) && $wplc_settings['wplc_enable_visitor_sound'] == 1 ) { echo "checked"; } ?> />
|
235 |
+
</td>
|
236 |
+
</tr>
|
237 |
+
<?php } ?>
|
238 |
+
<tr>
|
239 |
+
<td width='300' valign='top'>
|
240 |
+
<?php _e("Play a sound when a new message is received","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this to mute the sound that is played when a new chat message is received", "wplivechat") ?>"></i>
|
241 |
+
</td>
|
242 |
+
<td valign='top'>
|
243 |
+
<input type="checkbox" value="1" name="wplc_enable_msg_sound" <?php if(isset($wplc_settings['wplc_enable_msg_sound']) && $wplc_settings['wplc_enable_msg_sound'] == 1 ) { echo "checked"; } ?> />
|
244 |
+
</td>
|
245 |
+
</tr>
|
246 |
+
|
247 |
+
<tr>
|
248 |
+
<td width='300' valign='top'>
|
249 |
+
<?php _e("Enable Font Awesome set","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Disable this if you have Font Awesome set included with your theme", "wplivechat") ?>"></i>
|
250 |
+
</td>
|
251 |
+
<td valign='top'>
|
252 |
+
<input type="checkbox" value="1" name="wplc_enable_font_awesome" <?php if(isset($wplc_settings['wplc_enable_font_awesome']) && $wplc_settings['wplc_enable_font_awesome'] == 1 ) { echo "checked"; } ?> />
|
253 |
+
</td>
|
254 |
+
</tr>
|
255 |
+
<tr>
|
256 |
+
<td width='300' valign='top'>
|
257 |
+
<?php _e("Enable chat dashboard and notifications on all admin pages","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("This will load the chat dashboard on every admin page.", "wplivechat") ?>"></i>
|
258 |
+
</td>
|
259 |
+
<td valign='top'>
|
260 |
+
<input type="checkbox" value="1" name="wplc_enable_all_admin_pages" <?php if(isset($wplc_settings['wplc_enable_all_admin_pages']) && $wplc_settings['wplc_enable_all_admin_pages'] == 1 ) { echo "checked"; } ?> />
|
261 |
+
</td>
|
262 |
+
</tr>
|
263 |
+
<?php if (!function_exists("wplc_pro_activate")) { ?>
|
264 |
+
|
265 |
+
<tr>
|
266 |
+
<td width='300' valign='top'>
|
267 |
+
<?php _e("Include chat window on the following pages","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Show the chat window on the following pages. Leave blank to show on all. (Use comma-separated Page ID's)", "wplivechat") ?>"></i>
|
268 |
+
</td>
|
269 |
+
<td valign='top'>
|
270 |
+
<input type="text" readonly="readonly" />
|
271 |
+
<small>
|
272 |
+
<i>
|
273 |
+
<?php _e("available in the","wplivechat")?>
|
274 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=include_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
275 |
+
<?php _e("only","wplivechat")?>
|
276 |
+
</i>
|
277 |
+
</small>
|
278 |
+
</td>
|
279 |
+
</tr>
|
280 |
+
<tr>
|
281 |
+
<td width='200' valign='top'>
|
282 |
+
<?php _e("Exclude chat window on the following pages","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Do not show the chat window on the following pages. Leave blank to show on all. (Use comma-separated Page ID's)", "wplivechat") ?>"></i>
|
283 |
+
</td>
|
284 |
+
<td valign='top'>
|
285 |
+
<input type="text" readonly="readonly"/>
|
286 |
+
<small>
|
287 |
+
<i>
|
288 |
+
<?php _e("available in the","wplivechat")?>
|
289 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
290 |
+
<?php _e("only","wplivechat")?>
|
291 |
+
</i>
|
292 |
+
</small>
|
293 |
+
</td>
|
294 |
+
</tr>
|
295 |
+
|
296 |
+
<tr class="wplc-exclude-post-types__row">
|
297 |
+
<td width='200' valign='top'>
|
298 |
+
<?php _e("Exclude chat window on selected post types","wplivechat"); ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Do not show the chat window on the following post types pages.", "wplivechat") ?>"></i>
|
299 |
+
</td>
|
300 |
+
<td valign='top'>
|
301 |
+
<input type="text" readonly="readonly"/>
|
302 |
+
<small>
|
303 |
+
<i>
|
304 |
+
<?php _e("available in the","wplivechat")?>
|
305 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=exclude_pages" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
306 |
+
<?php _e("only","wplivechat")?>
|
307 |
+
</i>
|
308 |
+
</small>
|
309 |
+
</td>
|
310 |
+
</tr>
|
311 |
+
|
312 |
+
<?php } ?>
|
313 |
+
</table>
|
314 |
+
<?php do_action('wplc_hook_admin_settings_main_settings_after'); ?>
|
315 |
+
|
316 |
+
|
317 |
+
</div>
|
318 |
+
<div id="tabs-2">
|
319 |
+
<h3><?php _e("Chat Window Settings",'wplivechat')?></h3>
|
320 |
+
<table class='wp-list-table wplc_list_table widefat fixed striped pages'>
|
321 |
+
<tr>
|
322 |
+
<td width='300' valign='top'><?php _e("Chat box alignment","wplivechat")?>:</td>
|
323 |
+
<td>
|
324 |
+
<select id='wplc_settings_align' name='wplc_settings_align'>
|
325 |
+
<option value="1" <?php if (isset($wplc_settings_align[1])) { echo $wplc_settings_align[1]; } ?>><?php _e("Bottom left","wplivechat"); ?></option>
|
326 |
+
<option value="2" <?php if (isset($wplc_settings_align[2])) { echo $wplc_settings_align[2]; } ?>><?php _e("Bottom right","wplivechat"); ?></option>
|
327 |
+
<option value="3" <?php if (isset($wplc_settings_align[3])) { echo $wplc_settings_align[3]; } ?>><?php _e("Left","wplivechat"); ?></option>
|
328 |
+
<option value="4" <?php if (isset($wplc_settings_align[4])) { echo $wplc_settings_align[4]; } ?>><?php _e("Right","wplivechat"); ?></option>
|
329 |
+
</select>
|
330 |
+
</td>
|
331 |
+
</tr>
|
332 |
+
<tr>
|
333 |
+
<td width='300'>
|
334 |
+
<?php _e("Auto Pop-up","wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Expand the chat box automatically (prompts the user to enter their name and email address).","wplivechat") ?>"></i>
|
335 |
+
</td>
|
336 |
+
<td>
|
337 |
+
<input type="checkbox" name="wplc_auto_pop_up" value="1" <?php if(isset($wplc_settings['wplc_auto_pop_up']) && $wplc_settings['wplc_auto_pop_up'] == 1 ) { echo "checked"; } ?>/>
|
338 |
+
</td>
|
339 |
+
</tr>
|
340 |
+
|
341 |
+
|
342 |
+
|
343 |
+
|
344 |
+
<?php if (!function_exists("wplc_pro_activate")) { ?>
|
345 |
+
<tr>
|
346 |
+
<td width='300'>
|
347 |
+
<?php _e("Display typing indicator","wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Display a typing animation as soon as someone starts typing.","wplivechat") ?>"></i>
|
348 |
+
</td>
|
349 |
+
<td>
|
350 |
+
<input type="checkbox" name="" value="" disabled />
|
351 |
+
<small>
|
352 |
+
<i>
|
353 |
+
<?php _e("available in the","wplivechat")?>
|
354 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=typing" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
355 |
+
<?php _e("only","wplivechat")?>
|
356 |
+
</i>
|
357 |
+
</small>
|
358 |
+
</td>
|
359 |
+
</tr>
|
360 |
+
<tr>
|
361 |
+
<tr>
|
362 |
+
|
363 |
+
<td width='300' valign='top'>
|
364 |
+
<?php _e("Name","wplivechat")?>:
|
365 |
+
</td>
|
366 |
+
<td>
|
367 |
+
<input type='text' size='50' maxlength='50' disabled readonly value='admin' />
|
368 |
+
<small>
|
369 |
+
<i>
|
370 |
+
<?php _e("available in the","wplivechat")?>
|
371 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=name" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
372 |
+
<?php _e("only","wplivechat")?>
|
373 |
+
</i>
|
374 |
+
</small>
|
375 |
+
</td>
|
376 |
+
</tr>
|
377 |
+
<!-- Chat Icon-->
|
378 |
+
<tr>
|
379 |
+
<td width='300' valign='top'>
|
380 |
+
<?php _e("Icon","wplivechat")?>:
|
381 |
+
</td>
|
382 |
+
<td>
|
383 |
+
<input id="wplc_pro_chat_button" type="button" value="<?php _e("Upload Image","wplivechat")?>" readonly disabled />
|
384 |
+
<small>
|
385 |
+
<i>
|
386 |
+
<?php _e("available in the","wplivechat")?>
|
387 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
388 |
+
<?php _e("only","wplivechat")?>
|
389 |
+
</i>
|
390 |
+
</small>
|
391 |
+
</td>
|
392 |
+
</tr>
|
393 |
+
<!-- Chat Pic-->
|
394 |
+
<tr>
|
395 |
+
<td width='300' valign='top'>
|
396 |
+
<?php _e("Picture","wplivechat")?>:
|
397 |
+
</td>
|
398 |
+
<td>
|
399 |
+
<input id="wplc_pro_pic_button" type="button" value="<?php _e("Upload Image","wplivechat")?>" readonly disabled />
|
400 |
+
<small>
|
401 |
+
<i>
|
402 |
+
<?php _e("available in the","wplivechat")?>
|
403 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
404 |
+
<?php _e("only","wplivechat")?>
|
405 |
+
</i>
|
406 |
+
</small>
|
407 |
+
</td>
|
408 |
+
</tr>
|
409 |
+
<!-- Chat Logo-->
|
410 |
+
<tr>
|
411 |
+
<td width='300' valign='top'>
|
412 |
+
<?php _e("Logo","wplivechat")?>:
|
413 |
+
</td>
|
414 |
+
<td>
|
415 |
+
<input id="wplc_pro_logo_button" type="button" value="<?php _e("Upload Image","wplivechat")?>" readonly disabled />
|
416 |
+
<small>
|
417 |
+
<i>
|
418 |
+
<?php _e("available in the","wplivechat")?>
|
419 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=pic" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
420 |
+
<?php _e("only","wplivechat")?>
|
421 |
+
</i>
|
422 |
+
</small>
|
423 |
+
</td>
|
424 |
+
</tr>
|
425 |
+
<!-- Chat Delay-->
|
426 |
+
<tr>
|
427 |
+
<td width='300' valign='top'>
|
428 |
+
<?php _e("Chat delay (seconds)","wplivechat")?>:
|
429 |
+
</td>
|
430 |
+
<td>
|
431 |
+
<input type='text' size='50' maxlength='50' disabled readonly value='10' />
|
432 |
+
<small>
|
433 |
+
<i>
|
434 |
+
<?php _e("available in the","wplivechat")?>
|
435 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=delay" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
436 |
+
<?php _e("only","wplivechat")?>
|
437 |
+
</i>
|
438 |
+
</small>
|
439 |
+
</td>
|
440 |
+
</tr>
|
441 |
+
<!-- Chat Notification if want to chat-->
|
442 |
+
<tr>
|
443 |
+
<td width='300' valign='top'>
|
444 |
+
<?php _e("Chat notifications", "wplivechat") ?>:
|
445 |
+
</td>
|
446 |
+
<td>
|
447 |
+
<input id='wplc_pro_chat_notification' name='wplc_pro_chat_notification' type='checkbox' value='yes' disabled="disabled" readonly/>
|
448 |
+
<?php _e("Alert me via email as soon as someone wants to chat", "wplivechat") ?>
|
449 |
+
<small>
|
450 |
+
<i>
|
451 |
+
<?php _e("available in the", "wplivechat") ?>
|
452 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=alert" title="<?php _e("Pro Add-on", "wplivechat") ?>" target="_BLANK"><?php _e("Pro Add-on", "wplivechat") ?></a>
|
453 |
+
<?php _e("only", "wplivechat") ?>
|
454 |
+
</i>
|
455 |
+
</small>
|
456 |
+
</td>
|
457 |
+
</tr>
|
458 |
+
<?php } ?>
|
459 |
+
|
460 |
+
<!-- <tr>
|
461 |
+
<td>
|
462 |
+
<?php //_e("Display name and avatar in chat", "wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php //_e("Display the agent and user name above each message in the chat window.", "wplivechat") ?>"></i>
|
463 |
+
</td>
|
464 |
+
<td>
|
465 |
+
<input type="checkbox" name="wplc_display_name" value="1" <?php //if (isset($wplc_settings['wplc_display_name']) && $wplc_settings['wplc_display_name'] == 1) {
|
466 |
+
//echo "checked";
|
467 |
+
//} ?>/>
|
468 |
+
</td>
|
469 |
+
</tr> -->
|
470 |
+
<tr>
|
471 |
+
<td>
|
472 |
+
<?php _e("Display details in chat message", "wplivechat") ?>
|
473 |
+
</td>
|
474 |
+
<td> <!-- $wplc_settings['wplc_display_name'] Remember for backwards compat -->
|
475 |
+
<?php if (isset($wplc_settings['wplc_show_name']) && $wplc_settings['wplc_show_name'] == 1) { $checked = "checked"; } else { $checked = ''; } ?>
|
476 |
+
<input type="checkbox" name="wplc_show_name" value="1" <?php echo $checked; ?>/> <label><?php _e("Show Name", "wplivechat"); ?></label><br/>
|
477 |
+
<?php if (isset($wplc_settings['wplc_show_avatar']) && $wplc_settings['wplc_show_avatar'] == 1) { $checked = "checked"; } else { $checked = ''; } ?>
|
478 |
+
<input type="checkbox" name="wplc_show_avatar" value="1" <?php echo $checked; ?>/> <label><?php _e("Show Avatar", "wplivechat"); ?></label>
|
479 |
+
</td>
|
480 |
+
</tr>
|
481 |
+
<tr>
|
482 |
+
<td>
|
483 |
+
<?php _e("Only show the chat window to users that are logged in", "wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("By checking this, only users that are logged in will be able to chat with you.", "wplivechat") ?>"></i>
|
484 |
+
</td>
|
485 |
+
<td>
|
486 |
+
<input type="checkbox" name="wplc_display_to_loggedin_only" value="1" <?php
|
487 |
+
if (isset($wplc_settings['wplc_display_to_loggedin_only']) && $wplc_settings['wplc_display_to_loggedin_only'] == 1) {
|
488 |
+
echo "checked";
|
489 |
+
}
|
490 |
+
?>/>
|
491 |
+
</td>
|
492 |
+
</tr>
|
493 |
+
<tr>
|
494 |
+
<td>
|
495 |
+
<?php _e("Display a timestamp in the chat window", "wplivechat") ?>
|
496 |
+
</td>
|
497 |
+
<td>
|
498 |
+
<?php if (isset($wplc_settings['wplc_show_date']) && $wplc_settings['wplc_show_date'] == 1) { $checked = "checked"; } else { $checked = ''; } ?>
|
499 |
+
<input type="checkbox" name="wplc_show_date" value="1" <?php echo $checked; ?>/> <label><?php _e("Show Date", "wplivechat"); ?></label><br/>
|
500 |
+
<?php if (isset($wplc_settings['wplc_show_time']) && $wplc_settings['wplc_show_time'] == 1) { $checked = "checked"; } else { $checked = ''; } ?>
|
501 |
+
<input type="checkbox" name="wplc_show_time" value="1" <?php echo $checked; ?>/> <label><?php _e("Show Time", "wplivechat"); ?></label>
|
502 |
+
</td>
|
503 |
+
</tr>
|
504 |
+
<tr>
|
505 |
+
<td>
|
506 |
+
<?php _e("Redirect user to thank you page when chat is ended", "wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("By checking this, users will be redirected to your thank you page when a chat is completed.", "wplivechat") ?>"></i>
|
507 |
+
</td>
|
508 |
+
<td>
|
509 |
+
<input type="checkbox" name="wplc_redirect_to_thank_you_page" value="1" <?php echo (isset($wplc_settings['wplc_redirect_to_thank_you_page']) && $wplc_settings['wplc_redirect_to_thank_you_page'] == 1 ? "checked" : "" ); ?> />
|
510 |
+
<input type="text" name="wplc_redirect_thank_you_url" value="<?php echo (isset($wplc_settings['wplc_redirect_thank_you_url']) ? urldecode($wplc_settings['wplc_redirect_thank_you_url']) : '' ); ?>" placeholder="<?php _e('Thank You Page URL', 'wplivechat'); ?>" />
|
511 |
+
</td>
|
512 |
+
</tr>
|
513 |
+
<?php
|
514 |
+
if(defined('WPLC_LIVE_CHAT_SUPPORT_PRO_LOADED'))
|
515 |
+
{
|
516 |
+
?>
|
517 |
+
<tr>
|
518 |
+
<td>
|
519 |
+
<?php
|
520 |
+
_e('Disable Emojis', 'wplivechat');
|
521 |
+
?>
|
522 |
+
</td>
|
523 |
+
<td>
|
524 |
+
<input type="checkbox" name="wplc_disable_emojis"
|
525 |
+
<?php
|
526 |
+
if(!empty($wplc_settings['wplc_disable_emojis']))
|
527 |
+
echo 'checked="checked"';
|
528 |
+
?>
|
529 |
+
/>
|
530 |
+
</tr>
|
531 |
+
<?php
|
532 |
+
}
|
533 |
+
?>
|
534 |
+
</table>
|
535 |
+
|
536 |
+
<?php if(!function_exists("wplc_chat_social_div") && !function_exists("wplc_pro_activate")){ ?>
|
537 |
+
|
538 |
+
<h3><?php _e("Social", 'wplivechat') ?></h3>
|
539 |
+
<hr>
|
540 |
+
<table class='wp-list-table wplc_list_table widefat fixed striped pages' >
|
541 |
+
<tbody>
|
542 |
+
<tr>
|
543 |
+
<td width='300' valign='top'><?php _e("Facebook URL", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Link your Facebook page here. Leave blank to hide", "wplivechat") ?>"></i></td>
|
544 |
+
<td>
|
545 |
+
<input id='wplc_social_fb' name='wplc_social_fb' placeholder="<?php _e("Facebook URL...", "wplivechat") ?>" type='text' disabled/>
|
546 |
+
<small>
|
547 |
+
<i>
|
548 |
+
<?php _e("available in the","wplivechat")?>
|
549 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=social_media" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
550 |
+
<?php _e("only","wplivechat")?>
|
551 |
+
</i>
|
552 |
+
</small>
|
553 |
+
</td>
|
554 |
+
</tr>
|
555 |
+
<tr>
|
556 |
+
<td width='300' valign='top'><?php _e("Twitter URL", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Link your Twitter page here. Leave blank to hide", "wplivechat") ?>"></i></td>
|
557 |
+
<td>
|
558 |
+
<input id='wplc_social_tw' name='wplc_social_tw' placeholder="<?php _e("Twitter URL...", "wplivechat") ?>" type='text' disabled/>
|
559 |
+
<small>
|
560 |
+
<i>
|
561 |
+
<?php _e("available in the","wplivechat")?>
|
562 |
+
<a href="http://www.wp-livechat.com/purchase-pro/?utm_source=plugin&utm_medium=link&utm_campaign=social_media" title="<?php _e("Pro Add-on","wplivechat")?>" target="_BLANK"><?php _e("Pro Add-on","wplivechat")?></a>
|
563 |
+
<?php _e("only","wplivechat")?>
|
564 |
+
</i>
|
565 |
+
</small>
|
566 |
+
</td>
|
567 |
+
</tr>
|
568 |
+
</tbody>
|
569 |
+
</table>
|
570 |
+
<?php } ?>
|
571 |
+
|
572 |
+
|
573 |
+
|
574 |
+
<?php do_action('wplc_hook_admin_settings_chat_box_settings_after'); ?>
|
575 |
+
|
576 |
+
</div>
|
577 |
+
<div id="tabs-3">
|
578 |
+
<h3><?php _e("Offline Messages", 'wplivechat') ?></h3>
|
579 |
+
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='100%'>
|
580 |
+
<tr>
|
581 |
+
<td width='300'>
|
582 |
+
<?php _e("Do not allow users to send offline messages", "wplivechat") ?> <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("The chat window will be hidden when it is offline. Users will not be able to send offline messages to you", "wplivechat") ?>"></i>
|
583 |
+
</td>
|
584 |
+
<td>
|
585 |
+
<input type="checkbox" name="wplc_hide_when_offline" value="1" <?php
|
586 |
+
if (isset($wplc_settings['wplc_hide_when_offline']) && $wplc_settings['wplc_hide_when_offline'] == 1) {
|
587 |
+
echo "checked";
|
588 |
+
}
|
589 |
+
?>/>
|
590 |
+
</td>
|
591 |
+
</tr>
|
592 |
+
<tr>
|
593 |
+
<td width="300" valign="top"><?php _e("Offline Chat Box Title", "wplivechat") ?>:</td>
|
594 |
+
<td>
|
595 |
+
<input id="wplc_pro_na" name="wplc_pro_na" type="text" size="50" maxlength="50" class="regular-text" value="<?php if (isset($wplc_settings['wplc_pro_na'])) { echo stripslashes($wplc_settings['wplc_pro_na']); } ?>" /> <br />
|
596 |
+
|
597 |
+
|
598 |
+
</td>
|
599 |
+
</tr>
|
600 |
+
<tr>
|
601 |
+
<td width="300" valign="top"><?php _e("Offline Text Fields", "wplivechat") ?>:</td>
|
602 |
+
<td>
|
603 |
+
<input id="wplc_pro_offline1" name="wplc_pro_offline1" type="text" size="50" maxlength="150" class="regular-text" value="<?php if (isset($wplc_settings['wplc_pro_offline1'])) { echo stripslashes($wplc_settings['wplc_pro_offline1']); } ?>" /> <br />
|
604 |
+
<input id="wplc_pro_offline2" name="wplc_pro_offline2" type="text" size="50" maxlength="50" class="regular-text" value="<?php if (isset($wplc_settings['wplc_pro_offline2'])) { echo stripslashes($wplc_settings['wplc_pro_offline2']); } ?>" /> <br />
|
605 |
+
<input id="wplc_pro_offline3" name="wplc_pro_offline3" type="text" size="50" maxlength="150" class="regular-text" value="<?php if (isset($wplc_settings['wplc_pro_offline3'])) { echo stripslashes($wplc_settings['wplc_pro_offline3']); } ?>" /> <br />
|
606 |
+
|
607 |
+
|
608 |
+
</td>
|
609 |
+
</tr>
|
610 |
+
<tr>
|
611 |
+
<td width="300" valign="top"><?php _e("Offline Button Text", "wplivechat") ?>:</td>
|
612 |
+
<td>
|
613 |
+
<input id="wplc_pro_offline_btn" name="wplc_pro_offline_btn" type="text" size="50" maxlength="50" class="regular-text" value="<?php if (isset($wplc_settings['wplc_pro_offline_btn'])) { echo stripslashes($wplc_settings['wplc_pro_offline_btn']); } ?>" /> <br />
|
614 |
+
</td>
|
615 |
+
</tr>
|
616 |
+
<tr>
|
617 |
+
<td width="300" valign="top"><?php _e("Offline Send Button Text", "wplivechat") ?>:</td>
|
618 |
+
<td>
|
619 |
+
<input id="wplc_pro_offline_btn_send" name="wplc_pro_offline_btn_send" type="text" size="50" maxlength="50" class="regular-text" value="<?php if (isset($wplc_settings['wplc_pro_offline_btn_send'])) { echo stripslashes($wplc_settings['wplc_pro_offline_btn_send']); } ?>" /> <br />
|
620 |
+
</td>
|
621 |
+
</tr>
|
622 |
+
<tr>
|
623 |
+
<td width="300" valign="top"><?php _e("Custom fields", "wplivechat") ?>:</td>
|
624 |
+
<td>
|
625 |
+
<?php do_action( "wplc_hook_offline_custom_fields_integration_settings" ); ?>
|
626 |
+
</td>
|
627 |
+
</tr>
|
628 |
+
|
629 |
+
</table>
|
630 |
+
|
631 |
+
<h4><?php _e("Email settings", 'wplivechat') ?></h4>
|
632 |
+
|
633 |
+
|
634 |
+
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
|
635 |
+
<tr>
|
636 |
+
<td width='300' valign='top'>
|
637 |
+
<?php _e("Email Address", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("Email address where offline messages are delivered to. Use comma separated email addresses to send to more than one email address", "wplivechat") ?>"></i>
|
638 |
+
</td>
|
639 |
+
<td>
|
640 |
+
<input id="wplc_pro_chat_email_address" name="wplc_pro_chat_email_address" class="regular-text" type="text" value="<?php if (isset($wplc_settings['wplc_pro_chat_email_address'])) {
|
641 |
+
echo $wplc_settings['wplc_pro_chat_email_address']; } ?>" />
|
642 |
+
</td>
|
643 |
+
</tr>
|
644 |
+
|
645 |
+
<tr>
|
646 |
+
<td width='300' valign='top'>
|
647 |
+
<?php _e("Subject", "wplivechat") ?>: <i class="fa fa-question-circle wplc_light_grey wplc_settings_tooltip" title="<?php _e("User name will be appended to the end of the subject.", "wplivechat") ?>"></i>
|
648 |
+
</td>
|
649 |
+
<td>
|
650 |
+
<input id="wplc_pro_chat_email_offline_subject" name="wplc_pro_chat_email_offline_subject" class="regular-text" type="text" value="<?php echo(isset($wplc_settings['wplc_pro_chat_email_offline_subject']) ? $wplc_settings['wplc_pro_chat_email_offline_subject'] : ""); ?>" placeholder="<?php echo __("WP Live Chat Support - Offline Message from ", "wplivechat"); ?>"/>
|
651 |
+
</td>
|
652 |
+
</tr>
|
653 |
+
|
654 |
+
</table>
|
655 |
+
|
656 |
+
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
|
657 |
+
<tr>
|
658 |
+
<td width="33%"><?php _e("Sending Method", "wplivechat") ?></td>
|
659 |
+
<td width="33%" style="text-align: center;"><?php _e("WP Mail", "wplivechat") ?></td>
|
660 |
+
<td width="33%" style="text-align: center;"><?php _e("PHP Mailer", "wplivechat") ?></td>
|
661 |
+
</tr>
|
662 |
+
<tr>
|
663 |
+
<td></td>
|
664 |
+
<td style="text-align: center;"><input class="wplc_mail_type_radio" type="radio" value="wp_mail" name="wplc_mail_type" <?php if ($wplc_mail_type == "wp_mail") {
|
665 |
+
echo "checked";
|
666 |
+
} ?>></td>
|
667 |
+
<td style="text-align: center;"><input id="wpcl_mail_type_php" class="wplc_mail_type_radio" type="radio" value="php_mailer" name="wplc_mail_type" <?php if ($wplc_mail_type == "php_mailer") {
|
668 |
+
echo "checked";
|
669 |
+
} ?>></td>
|
670 |
+
</tr>
|
671 |
+
</table>
|
672 |
+
<hr/>
|
673 |
+
<table id="wplc_smtp_details" class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='100%'>
|
674 |
+
<tr>
|
675 |
+
<td width="300" valign="top">
|
676 |
+
<?php _e("Host", "wplivechat") ?>:
|
677 |
+
</td>
|
678 |
+
<td>
|
679 |
+
<input id="wplc_mail_host" name="wplc_mail_host" type="text" class="regular-text" value="<?php echo get_option("wplc_mail_host") ?>" placeholder="smtp.example.com" />
|
680 |
+
</td>
|
681 |
+
</tr>
|
682 |
+
<tr>
|
683 |
+
<td>
|
684 |
+
<?php _e("Port", "wplivechat") ?>:
|
685 |
+
</td>
|
686 |
+
<td>
|
687 |
+
<input id="wplc_mail_port" name="wplc_mail_port" type="text" class="regular-text" value="<?php echo get_option("wplc_mail_port") ?>" placeholder="25" />
|
688 |
+
</td>
|
689 |
+
</tr>
|
690 |
+
<tr>
|
691 |
+
<td>
|
692 |
+
<?php _e("Username", "wplivechat") ?>:
|
693 |
+
</td>
|
694 |
+
<td>
|
695 |
+
<input id="wplc_mail_username" name="wplc_mail_username" type="text" class="regular-text" value="<?php echo get_option("wplc_mail_username") ?>" placeholder="me@example.com" />
|
696 |
+
</td>
|
697 |
+
</tr>
|
698 |
+
<tr>
|
699 |
+
<td>
|
700 |
+
<?php _e("Password", "wplivechat") ?>:
|
701 |
+
</td>
|
702 |
+
<td>
|
703 |
+
<input id="wplc_mail_password" name="wplc_mail_password" type="password" class="regular-text" value="<?php echo get_option("wplc_mail_password") ?>" placeholder="Password" />
|
704 |
+
</td>
|
705 |
+
</tr>
|
706 |
+
</table>
|
707 |
+
<?php do_action('wplc_hook_admin_settings_offline_messages_settings_after'); ?>
|
708 |
+
</div>
|
709 |
+
|
710 |
+
|
711 |
+
|
712 |
+
<div id="tabs-4">
|
713 |
+
<style>
|
714 |
+
.wplc_theme_block img{
|
715 |
+
border: 1px solid #CCC;
|
716 |
+
border-radius: 5px;
|
717 |
+
padding: 5px;
|
718 |
+
margin: 5px;
|
719 |
+
}
|
720 |
+
.wplc_theme_single{
|
721 |
+
width: 162px;
|
722 |
+
height: 162px;
|
723 |
+
text-align: center;
|
724 |
+
display: inline-block;
|
725 |
+
vertical-align: top;
|
726 |
+
margin: 5px;
|
727 |
+
}
|
728 |
+
.wplc_animation_block div{
|
729 |
+
display: inline-block;
|
730 |
+
width: 150px;
|
731 |
+
height: 150px;
|
732 |
+
border: 1px solid #CCC;
|
733 |
+
border-radius: 5px;
|
734 |
+
text-align: center;
|
735 |
+
margin: 10px;
|
736 |
+
}
|
737 |
+
.wplc_animation_block i{
|
738 |
+
font-size: 3em;
|
739 |
+
line-height: 150px;
|
740 |
+
}
|
741 |
+
.wplc_animation_block .wplc_red{
|
742 |
+
color: #E31230;
|
743 |
+
}
|
744 |
+
.wplc_animation_block .wplc_orange{
|
745 |
+
color: #EB832C;
|
746 |
+
}
|
747 |
+
.wplc_animation_active, .wplc_theme_active{
|
748 |
+
box-shadow: 2px 2px 2px #666666;
|
749 |
+
}
|
750 |
+
</style>
|
751 |
+
<style>
|
752 |
+
.wplc_animation_block div{
|
753 |
+
display: inline-block;
|
754 |
+
width: 150px;
|
755 |
+
height: 150px;
|
756 |
+
border: 1px solid #CCC;
|
757 |
+
border-radius: 5px;
|
758 |
+
text-align: center;
|
759 |
+
margin: 10px;
|
760 |
+
}
|
761 |
+
.wplc_animation_block i{
|
762 |
+
font-size: 3em;
|
763 |
+
line-height: 150px;
|
764 |
+
}
|
765 |
+
.wplc_animation_block .wplc_red{
|
766 |
+
color: #E31230;
|
767 |
+
}
|
768 |
+
.wplc_animation_block .wplc_orange{
|
769 |
+
color: #EB832C;
|
770 |
+
}
|
771 |
+
.wplc_animation_active{
|
772 |
+
box-shadow: 2px 2px 2px #CCC;
|
773 |
+
}
|
774 |
+
</style>
|
775 |
+
<h3><?php _e("Styling",'wplivechat')?></h3>
|
776 |
+
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages'>
|
777 |
+
|
778 |
+
|
779 |
+
<tr style='margin-bottom: 10px;'>
|
780 |
+
<td width='200'><label for=""><?php _e('Choose a theme', 'wplivechat'); ?></label></td>
|
781 |
+
<td>
|
782 |
+
<div class='wplc_theme_block'>
|
783 |
+
<div class='wplc_theme_image' id=''>
|
784 |
+
<div class='wplc_theme_single'>
|
785 |
+
<img style='width:162px;' src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/newtheme-1.jpg'; ?>' title="<?php _e('Classic', 'wplivechat'); ?>" alt="<?php _e('Classic', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-1') { echo 'wplc_theme_active'; } ?>' id='wplc_newtheme_1'/>
|
786 |
+
<?php _e('Classic', 'wplivechat'); ?>
|
787 |
+
</div>
|
788 |
+
<div class='wplc_theme_single'>
|
789 |
+
<img style='width:162px;' src='<?php echo WPLC_BASIC_PLUGIN_URL.'images/themes/newtheme-2.jpg'; ?>' title="<?php _e('Modern', 'wplivechat'); ?>" alt="<?php _e('Modern', 'wplivechat'); ?>" class='<?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-2') { echo 'wplc_theme_active'; } ?>' id='wplc_newtheme_2'/>
|
790 |
+
<?php _e('Modern', 'wplivechat'); ?>
|
791 |
+
</div>
|
792 |
+
|
793 |
+
</div>
|
794 |
+
</div>
|
795 |
+
<input type="radio" name="wplc_newtheme" value="theme-1" class="wplc_hide_input" id="wplc_new_rb_theme_1" <?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-1') { echo 'checked'; } ?>/>
|
796 |
+
<input type="radio" name="wplc_newtheme" value="theme-2" class="wplc_hide_input" id="wplc_new_rb_theme_2" <?php if (isset($wplc_settings['wplc_newtheme']) && $wplc_settings['wplc_newtheme'] == 'theme-2') { echo 'checked'; } ?>/>
|
797 |
+
|
798 |
+
</td>
|
799 |
+
</tr>
|
800 |
+
<tr height="30">
|
801 |
+
<td> </td>
|
802 |
+
<td> </td>
|
803 |
+
</tr>
|
804 |
+
|
805 |
+
<tr style='margin-bottom: 10px;'>
|
806 |
+
<td><label for=""><?php _e('Color Scheme', 'wplivechat'); ?></label></td>
|
807 |
+
<td>
|
808 |
+
<div class='wplc_theme_block'>
|
809 |
+
<div class='wplc_palette'>
|
810 |
+
<div class='wplc_palette_single'>
|
811 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-default') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_default'>
|
812 |
+
<div class='wplc-palette-top' style='background-color:#ED832F;'></div>
|
813 |
+
<div class='wplc-palette-top' style='background-color:#FFF;'></div>
|
814 |
+
<div class='wplc-palette-top' style='background-color:#EEE;'></div>
|
815 |
+
<div class='wplc-palette-top' style='background-color:#666;'></div>
|
816 |
+
</div>
|
817 |
+
</div>
|
818 |
+
|
819 |
+
<div class='wplc_palette_single'>
|
820 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-1') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_1'>
|
821 |
+
<div class='wplc-palette-top' style='background-color:#DB0000;'></div>
|
822 |
+
<div class='wplc-palette-top' style='background-color:#FFF;'></div>
|
823 |
+
<div class='wplc-palette-top' style='background-color:#000;'></div>
|
824 |
+
<div class='wplc-palette-top' style='background-color:#666;'></div>
|
825 |
+
</div>
|
826 |
+
</div>
|
827 |
+
<div class='wplc_palette_single'>
|
828 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-2') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_2'>
|
829 |
+
<div class='wplc-palette-top' style='background-color:#000;'></div>
|
830 |
+
<div class='wplc-palette-top' style='background-color:#FFF;'></div>
|
831 |
+
<div class='wplc-palette-top' style='background-color:#888;'></div>
|
832 |
+
<div class='wplc-palette-top' style='background-color:#666;'></div>
|
833 |
+
</div>
|
834 |
+
</div>
|
835 |
+
<div class='wplc_palette_single'>
|
836 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-3') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_3'>
|
837 |
+
<div class='wplc-palette-top' style='background-color:#B97B9D;'></div>
|
838 |
+
<div class='wplc-palette-top' style='background-color:#FFF;'></div>
|
839 |
+
<div class='wplc-palette-top' style='background-color:#EEE;'></div>
|
840 |
+
<div class='wplc-palette-top' style='background-color:#5A0031;'></div>
|
841 |
+
</div>
|
842 |
+
</div>
|
843 |
+
<div class='wplc_palette_single'>
|
844 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_4'>
|
845 |
+
<div class='wplc-palette-top' style='background-color:#1A14DB;'></div>
|
846 |
+
<div class='wplc-palette-top' style='background-color:#FDFDFF;'></div>
|
847 |
+
<div class='wplc-palette-top' style='background-color:#7F7FB3;'></div>
|
848 |
+
<div class='wplc-palette-top' style='background-color:#666;'></div>
|
849 |
+
</div>
|
850 |
+
</div>
|
851 |
+
<div class='wplc_palette_single'>
|
852 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-5') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_5'>
|
853 |
+
<div class='wplc-palette-top' style='background-color:#3DCC13;'></div>
|
854 |
+
<div class='wplc-palette-top' style='background-color:#FDFDFF;'></div>
|
855 |
+
<div class='wplc-palette-top' style='background-color:#EEE;'></div>
|
856 |
+
<div class='wplc-palette-top' style='background-color:#666;'></div>
|
857 |
+
</div>
|
858 |
+
</div>
|
859 |
+
<div class='wplc_palette_single'>
|
860 |
+
<div class='wplc-palette-selection <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-6') { echo 'wplc_theme_active'; } ?>' id='wplc_theme_6'>
|
861 |
+
<div class='wplc-palette-top' style='padding-top:3px'><?php _e("Choose","wplivechat"); ?></div>
|
862 |
+
<div class='wplc-palette-top' style='padding-top:3px'><?php _e("Your","wplivechat"); ?></div>
|
863 |
+
<div class='wplc-palette-top' style='padding-top:3px'><?php _e("Colors","wplivechat"); ?></div>
|
864 |
+
<div class='wplc-palette-top' style='padding-top:3px'><?php _e("Below","wplivechat"); ?></div>
|
865 |
+
</div>
|
866 |
+
</div>
|
867 |
+
|
868 |
+
|
869 |
+
</div>
|
870 |
+
</div>
|
871 |
+
<input type="radio" name="wplc_theme" value="theme-default" class="wplc_hide_input" id="wplc_rb_theme_default" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-default') { echo 'checked'; } ?>/>
|
872 |
+
<input type="radio" name="wplc_theme" value="theme-1" class="wplc_hide_input" id="wplc_rb_theme_1" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-1') { echo 'checked'; } ?>/>
|
873 |
+
<input type="radio" name="wplc_theme" value="theme-2" class="wplc_hide_input" id="wplc_rb_theme_2" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-2') { echo 'checked'; } ?>/>
|
874 |
+
<input type="radio" name="wplc_theme" value="theme-3" class="wplc_hide_input" id="wplc_rb_theme_3" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-3') { echo 'checked'; } ?>/>
|
875 |
+
<input type="radio" name="wplc_theme" value="theme-4" class="wplc_hide_input" id="wplc_rb_theme_4" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-4') { echo 'checked'; } ?>/>
|
876 |
+
<input type="radio" name="wplc_theme" value="theme-5" class="wplc_hide_input" id="wplc_rb_theme_5" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-5') { echo 'checked'; } ?>/>
|
877 |
+
<input type="radio" name="wplc_theme" value="theme-6" class="wplc_hide_input" id="wplc_rb_theme_6" <?php if (isset($wplc_settings['wplc_theme']) && $wplc_settings['wplc_theme'] == 'theme-6') { echo 'checked'; } ?>/>
|
878 |
+
|
879 |
+
</td>
|
880 |
+
</tr>
|
881 |
+
|
882 |
+
<tr>
|
883 |
+
<td width='300' valign='top'><?php _e("Chat background","wplivechat")?>:</td>
|
884 |
+
<td>
|
885 |
+
|
886 |
+
<select id='wplc_settings_bg' name='wplc_settings_bg'>
|
887 |
+
<option value="cloudy.jpg" <?php if (!isset($wplc_settings['wplc_settings_bg']) || ($wplc_settings['wplc_settings_bg'] == "cloudy.jpg") ) { echo "selected"; } ?>><?php _e("Cloudy","wplivechat"); ?></option>
|
888 |
+
<option value="geometry.jpg" <?php if (isset($wplc_settings['wplc_settings_bg']) && $wplc_settings['wplc_settings_bg'] == "geometry.jpg") { echo "selected"; } ?>><?php _e("Geometry","wplivechat"); ?></option>
|
889 |
+
<option value="tech.jpg" <?php if (isset($wplc_settings['wplc_settings_bg']) && $wplc_settings['wplc_settings_bg'] == "tech.jpg") { echo "selected"; } ?>><?php _e("Tech","wplivechat"); ?></option>
|
890 |
+
<option value="social.jpg" <?php if (isset($wplc_settings['wplc_settings_bg']) && $wplc_settings['wplc_settings_bg'] == "social.jpg") { echo "selected"; } ?>><?php _e("Social","wplivechat"); ?></option>
|
891 |
+
<option value="0" <?php if (isset($wplc_settings['wplc_settings_bg']) && $wplc_settings['wplc_settings_bg'] == "0") { echo "selected"; } ?>><?php _e("None","wplivechat"); ?></option>
|
892 |
+
</select>
|
893 |
+
</td>
|
894 |
+
</tr>
|
895 |
+
<tr>
|
896 |
+
<td width='200' valign='top'><?php _e("Palette Color 1","wplivechat")?>:</td>
|
897 |
+
<td>
|
898 |
+
<input id="wplc_settings_color1" name="wplc_settings_color1" type="text" class="color" value="<?php if (isset($wplc_settings_color1)) { echo $wplc_settings_color1; } else { echo 'ED832F'; } ?>" />
|
899 |
+
</td>
|
900 |
+
</tr>
|
901 |
+
<tr>
|
902 |
+
<td width='200' valign='top'><?php _e("Palette Color 2","wplivechat")?>:</td>
|
903 |
+
<td>
|
904 |
+
<input id="wplc_settings_color2" name="wplc_settings_color2" type="text" class="color" value="<?php if (isset($wplc_settings_color2)) { echo $wplc_settings_color2; } else { echo 'FFFFFF'; } ?>" />
|
905 |
+
</td>
|
906 |
+
</tr>
|
907 |
+
<tr>
|
908 |
+
<td width='200' valign='top'><?php _e("Palette Color 3","wplivechat")?>:</td>
|
909 |
+
<td>
|
910 |
+
<input id="wplc_settings_color3" name="wplc_settings_color3" type="text" class="color" value="<?php if (isset($wplc_settings_color3)) { echo $wplc_settings_color3; } else { echo 'EEEEEE'; } ?>" />
|
911 |
+
</td>
|
912 |
+
</tr>
|
913 |
+
<tr>
|
914 |
+
<td width='200' valign='top'><?php _e("Palette Color 4","wplivechat")?>:</td>
|
915 |
+
<td>
|
916 |
+
<input id="wplc_settings_color4" name="wplc_settings_color4" type="text" class="color" value="<?php if (isset($wplc_settings_color4)) { echo $wplc_settings_color4; } else { echo '666666'; } ?>" />
|
917 |
+
</td>
|
918 |
+
</tr>
|
919 |
+
|
920 |
+
<tr>
|
921 |
+
<td width="200" valign="top"><?php _e("I'm using a localization plugin", "wplivechat") ?></td>
|
922 |
+
<td>
|
923 |
+
<input type="checkbox" name="wplc_using_localization_plugin" id="wplc_using_localization_plugin" value="1" <?php if (isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1) { echo 'checked'; } ?>/>
|
924 |
+
<br/><small><?php echo sprintf( __("Enable this if you are using a localization plugin. Should you wish to change the below strings with this option enabled, please visit the documentation %s", "wplivechat"), "<a href='https://wp-livechat.com/documentation/changing-strings-in-the-chat-window-when-using-a-localization-plugin/' target='_BLANK'>".__("here", "wplivechat") ); ?></small>
|
925 |
+
</td>
|
926 |
+
</tr>
|
927 |
+
|
928 |
+
<tr style='height:30px;'><td></td><td></td></tr>
|
929 |
+
<tr class="wplc_localization_strings">
|
930 |
+
<td width="200" valign="top"><?php _e("First Section Text", "wplivechat") ?>:</td>
|
931 |
+
<td>
|
932 |
+
<input id="wplc_pro_fst1" name="wplc_pro_fst1" type="text" size="50" maxlength="50" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_pro_fst1']) ?>" /> <br />
|
933 |
+
<input id="wplc_pro_fst2" name="wplc_pro_fst2" type="text" size="50" maxlength="50" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_pro_fst2']) ?>" /> <br />
|
934 |
+
</td>
|
935 |
+
</tr>
|
936 |
+
<tr class="wplc_localization_strings">
|
937 |
+
<td width="200" valign="top"><?php _e("Intro Text", "wplivechat") ?>:</td>
|
938 |
+
<td>
|
939 |
+
<input id="wplc_pro_intro" name="wplc_pro_intro" type="text" size="50" maxlength="150" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_pro_intro']) ?>" /> <br />
|
940 |
+
</td>
|
941 |
+
</tr>
|
942 |
+
<tr class="wplc_localization_strings">
|
943 |
+
<td width="200" valign="top"><?php _e("Second Section Text", "wplivechat") ?>:</td>
|
944 |
+
<td>
|
945 |
+
<input id="wplc_pro_sst1" name="wplc_pro_sst1" type="text" size="50" maxlength="30" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_pro_sst1']) ?>" /> <br />
|
946 |
+
<input id="wplc_pro_sst2" name="wplc_pro_sst2" type="text" size="50" maxlength="70" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_pro_sst2']) ?>" /> <br />
|
947 |
+
</td>
|
948 |
+
</tr>
|
949 |
+
<tr class="wplc_localization_strings">
|
950 |
+
<td width="200" valign="top"><?php _e("Reactivate Chat Section Text", "wplivechat") ?>:</td>
|
951 |
+
<td>
|
952 |
+
<input id="wplc_pro_tst1" name="wplc_pro_tst1" type="text" size="50" maxlength="50" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_pro_tst1']) ?>" /> <br />
|
953 |
+
|
954 |
+
|
955 |
+
</td>
|
956 |
+
</tr>
|
957 |
+
<?php /* removed as this has been replaced with the "welcome_msg" below
|
958 |
+
<tr class="wplc_localization_strings">
|
959 |
+
<td width="200" valign="top"><?php _e("User chat welcome", "wplivechat") ?>:</td>
|
960 |
+
<td>
|
961 |
+
<input id="wplc_user_welcome_chat" name="wplc_user_welcome_chat" type="text" size="50" maxlength="150" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_user_welcome_chat']) ?>" /> <br />
|
962 |
+
</td>
|
963 |
+
</tr>
|
964 |
+
*/ ?>
|
965 |
+
<tr class="wplc_localization_strings">
|
966 |
+
<td width="200" valign="top"><?php _e("Welcome message", "wplivechat") ?>:</td>
|
967 |
+
<td>
|
968 |
+
<input id="wplc_welcome_msg" name="wplc_welcome_msg" type="text" size="50" maxlength="350" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_welcome_msg']) ?>" /> <span class='description'><?php _e('This text is shown as soon as a user starts a chat and waits for an agent to join', 'wplivechat'); ?></span><br />
|
969 |
+
</td>
|
970 |
+
</tr>
|
971 |
+
<tr class="wplc_localization_strings">
|
972 |
+
<td width="200" valign="top"><?php _e("No answer", "wplivechat") ?>:</td>
|
973 |
+
<td>
|
974 |
+
<input id="wplc_user_no_answer" name="wplc_user_no_answer" type="text" size="50" maxlength="150" class="regular-text" value="<?php echo (isset($wplc_settings['wplc_user_no_answer']) ? stripslashes($wplc_settings['wplc_user_no_answer']) : __("There is No Answer. Please Try Again Later.","wplivechat")); ?>" /> <span class='description'><?php _e('This text is shown to the user when an agent has failed to answer a chat ', 'wplivechat'); ?></span><br />
|
975 |
+
</td>
|
976 |
+
</tr>
|
977 |
+
<tr class="wplc_localization_strings">
|
978 |
+
<td width="200" valign="top"><?php _e("Other text", "wplivechat") ?>:</td>
|
979 |
+
<td>
|
980 |
+
<input id="wplc_user_enter" name="wplc_user_enter" type="text" size="50" maxlength="150" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_user_enter']) ?>" /><br />
|
981 |
+
<input id="wplc_text_chat_ended" name="wplc_text_chat_ended" type="text" size="50" maxlength="150" class="regular-text" value="<?php echo ( empty( $wplc_settings['wplc_text_chat_ended'] ) ) ? stripslashes(__("The chat has been ended by the operator.", "wplivechat")) : stripslashes( $wplc_settings['wplc_text_chat_ended'] ) ?>" /> <br />
|
982 |
+
</td>
|
983 |
+
</tr>
|
984 |
+
<!--
|
985 |
+
<tr class="wplc_localization_strings">
|
986 |
+
<td width="200" valign="top"><?php _e("Close Button Text", "wplivechat") ?>:</td>
|
987 |
+
<td>
|
988 |
+
<input id="wplc_close_btn_text" name="wplc_close_btn_text" type="text" size="50" maxlength="150" class="regular-text" value="<?php echo stripslashes($wplc_settings['wplc_close_btn_text']) ?>" /><br />
|
989 |
+
</td>
|
990 |
+
</tr>
|
991 |
+
-->
|
992 |
+
|
993 |
+
<tr>
|
994 |
+
<th><label for=""><?php _e('Choose an animation', 'wplivechat'); ?></label></th>
|
995 |
+
|
996 |
+
<td>
|
997 |
+
<div class='wplc_animation_block'>
|
998 |
+
<div class='wplc_animation_image <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-1') {
|
999 |
+
echo 'wplc_animation_active';
|
1000 |
+
} ?>' id='wplc_animation_1'>
|
1001 |
+
<i class="fa fa-arrow-circle-up wplc_orange"></i>
|
1002 |
+
<p><?php _e('Slide Up', 'wplivechat'); ?></p>
|
1003 |
+
</div>
|
1004 |
+
<div class='wplc_animation_image <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-2') {
|
1005 |
+
echo 'wplc_animation_active';
|
1006 |
+
} ?>' id='wplc_animation_2'>
|
1007 |
+
<i class="fa fa-arrows-h wplc_red"></i>
|
1008 |
+
<p><?php _e('Slide From The Side', 'wplivechat'); ?></p>
|
1009 |
+
</div>
|
1010 |
+
<div class='wplc_animation_image <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-3') {
|
1011 |
+
echo 'wplc_animation_active';
|
1012 |
+
} ?>' id='wplc_animation_3'>
|
1013 |
+
<i class="fa fa-arrows-alt wplc_orange"></i>
|
1014 |
+
<p><?php _e('Fade In', 'wplivechat'); ?></p>
|
1015 |
+
</div>
|
1016 |
+
<div class='wplc_animation_image <?php if ((isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-4') || !isset($wplc_settings['wplc_animation'])) {
|
1017 |
+
echo 'wplc_animation_active';
|
1018 |
+
} ?>' id='wplc_animation_4'>
|
1019 |
+
<i class="fa fa-thumb-tack wplc_red"></i>
|
1020 |
+
<p><?php _e('No Animation', 'wplivechat'); ?></p>
|
1021 |
+
</div>
|
1022 |
+
</div>
|
1023 |
+
<input type="radio" name="wplc_animation" value="animation-1" class="wplc_hide_input" id="wplc_rb_animation_1" class='wplc_hide_input' <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-1') {
|
1024 |
+
echo 'checked';
|
1025 |
+
} ?>/>
|
1026 |
+
<input type="radio" name="wplc_animation" value="animation-2" class="wplc_hide_input" id="wplc_rb_animation_2" class='wplc_hide_input' <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-2') {
|
1027 |
+
echo 'checked';
|
1028 |
+
} ?>/>
|
1029 |
+
<input type="radio" name="wplc_animation" value="animation-3" class="wplc_hide_input" id="wplc_rb_animation_3" class='wplc_hide_input' <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-3') {
|
1030 |
+
echo 'checked';
|
1031 |
+
} ?>/>
|
1032 |
+
<input type="radio" name="wplc_animation" value="animation-4" class="wplc_hide_input" id="wplc_rb_animation_4" class='wplc_hide_input' <?php if (isset($wplc_settings['wplc_animation']) && $wplc_settings['wplc_animation'] == 'animation-4') {
|
1033 |
+
echo 'checked';
|
1034 |
+
} ?>/>
|
1035 |
+
</td>
|
1036 |
+
</tr>
|
1037 |
+
</table>
|
1038 |
+
</div>
|
1039 |
+
<div id="tabs-5">
|
1040 |
+
|
1041 |
+
|
1042 |
+
<?php do_action("wplc_hook_agents_settings"); ?>
|
1043 |
+
|
1044 |
+
|
1045 |
+
</div>
|
1046 |
+
<div id="tabs-7">
|
1047 |
+
<h3><?php _e("Blocked Visitors - Based on IP Address", "wplivechat") ?></h3>
|
1048 |
+
<table class='form-table wp-list-table wplc_list_table widefat fixed striped pages' width='100%'>
|
1049 |
+
<tr>
|
1050 |
+
<td>
|
1051 |
+
<textarea name="wplc_ban_users_ip" style="width: 50%; min-height: 200px;" placeholder="<?php _e('Enter each IP Address you would like to block on a new line', 'wplivechat'); ?>" autocomplete="false"><?php
|
1052 |
+
$ip_addresses = get_option('WPLC_BANNED_IP_ADDRESSES');
|
1053 |
+
if($ip_addresses){
|
1054 |
+
$ip_addresses = maybe_unserialize($ip_addresses);
|
1055 |
+
if ($ip_addresses && is_array($ip_addresses)) {
|
1056 |
+
foreach($ip_addresses as $ip){
|
1057 |
+
echo $ip."\n";
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
}
|
1061 |
+
?></textarea>
|
1062 |
+
<p class="description"><?php _e('Blocking a user\'s IP Address here will hide the chat window from them, preventing them from chatting with you. Each IP Address must be on a new line', 'wplivechat'); ?></p>
|
1063 |
+
</td>
|
1064 |
+
</tr>
|
1065 |
+
</table>
|
1066 |
+
</div>
|
1067 |
+
|
1068 |
+
|
1069 |
+
|
1070 |
+
<?php do_action("wplc_hook_settings_page_more_tabs"); ?>
|
1071 |
+
|
1072 |
+
</div>
|
1073 |
+
<p class='submit'><input type='submit' name='wplc_save_settings' class='button-primary' value='<?php _e("Save Settings","wplivechat")?>' /></p>
|
1074 |
+
</form>
|
1075 |
+
|
1076 |
+
</div>
|
1077 |
+
|
1078 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/shortcodes.php
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
add_filter("init","wplc_test",10,4);
|
4 |
-
|
5 |
-
function wplc_test() {
|
6 |
-
add_shortcode('wplc_live_chat', 'wplc_live_chat_box_shortcode');
|
7 |
-
}
|
8 |
-
|
9 |
-
function wplc_live_chat_box_shortcode( $atts, $content = null ) {
|
10 |
-
$wplc_settings = get_option("WPLC_SETTINGS");
|
11 |
-
$logged_in = apply_filters("wplc_loggedin_filter",false);
|
12 |
-
$wplc_using_locale = (isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1) ? true : false;
|
13 |
-
|
14 |
-
$wplc_chat_box_content = wplc_theme_control_function($wplc_settings, $logged_in, $wplc_using_locale, $_COOKIE['wplc_cid']);
|
15 |
-
|
16 |
-
// get attributes
|
17 |
-
$atts = shortcode_atts(
|
18 |
-
array(
|
19 |
-
'style' => 'normal'
|
20 |
-
),
|
21 |
-
$atts,
|
22 |
-
'wplc_live_chat'
|
23 |
-
);
|
24 |
-
|
25 |
-
$output = '<div class="wplc_live_chat_support_shortcode wplc_' . $atts['style'] . '">';
|
26 |
-
$output .= $wplc_chat_box_content;
|
27 |
-
$output .= '</div">';
|
28 |
-
return $output;
|
29 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
add_filter("init","wplc_test",10,4);
|
4 |
+
|
5 |
+
function wplc_test() {
|
6 |
+
add_shortcode('wplc_live_chat', 'wplc_live_chat_box_shortcode');
|
7 |
+
}
|
8 |
+
|
9 |
+
function wplc_live_chat_box_shortcode( $atts, $content = null ) {
|
10 |
+
$wplc_settings = get_option("WPLC_SETTINGS");
|
11 |
+
$logged_in = apply_filters("wplc_loggedin_filter",false);
|
12 |
+
$wplc_using_locale = (isset($wplc_settings['wplc_using_localization_plugin']) && $wplc_settings['wplc_using_localization_plugin'] == 1) ? true : false;
|
13 |
+
|
14 |
+
$wplc_chat_box_content = wplc_theme_control_function($wplc_settings, $logged_in, $wplc_using_locale, $_COOKIE['wplc_cid']);
|
15 |
+
|
16 |
+
// get attributes
|
17 |
+
$atts = shortcode_atts(
|
18 |
+
array(
|
19 |
+
'style' => 'normal'
|
20 |
+
),
|
21 |
+
$atts,
|
22 |
+
'wplc_live_chat'
|
23 |
+
);
|
24 |
+
|
25 |
+
$output = '<div class="wplc_live_chat_support_shortcode wplc_' . $atts['style'] . '">';
|
26 |
+
$output .= $wplc_chat_box_content;
|
27 |
+
$output .= '</div">';
|
28 |
+
return $output;
|
29 |
}
|
includes/surveys.php
CHANGED
@@ -120,7 +120,7 @@ function wplc_survey_hook_control_settings_page_more_tabs() {
|
|
120 |
<?php
|
121 |
|
122 |
global $wplc_version;
|
123 |
-
wp_register_script('wplc-lead-form-script', plugins_url('
|
124 |
wp_enqueue_script('wplc-lead-form-script');
|
125 |
}
|
126 |
|
@@ -192,7 +192,7 @@ function wplc_filter_control_live_chat_box_pre_layer1($content) {
|
|
192 |
if( isset( $settings['wplc_enable_surveys'] ) && intval($settings['wplc_enable_surveys']) == 1 && !isset($_COOKIE['ns_participated'])){
|
193 |
|
194 |
if( isset( $settings['survey_display']) && $settings['survey_display'] == '1' ) {
|
195 |
-
$content .= "<img src='".plugins_url('
|
196 |
return $content;
|
197 |
}
|
198 |
}
|
@@ -284,10 +284,10 @@ function wplc_nimble_load_scripts() {
|
|
284 |
wp_localize_script( 'nimble-squirrel-user-script', 'ns_clear_div', $clear_div );
|
285 |
|
286 |
|
287 |
-
wp_register_style('wplc-survey-style', plugins_url('
|
288 |
wp_enqueue_style('wplc-survey-style');
|
289 |
if( isset( $settings['survey_display']) && $settings['survey_display'] == '1' ) {
|
290 |
-
wp_register_style('wplc-survey-before-style', plugins_url('
|
291 |
wp_enqueue_style('wplc-survey-before-style');
|
292 |
}
|
293 |
}
|
@@ -326,7 +326,7 @@ function wplc_hook_survey_push_js_to_front() {
|
|
326 |
|
327 |
global $wplc_version;
|
328 |
$wplc_settings = get_option('WPLC_SETTINGS');
|
329 |
-
wp_register_script('wplc-survey-script', plugins_url('
|
330 |
wp_enqueue_script('wplc-survey-script');
|
331 |
wp_localize_script( 'wplc-survey-script', 'wplc_end_chat_string', $wplc_settings['wplc_pro_sst1e_survey'] );
|
332 |
wp_localize_script( 'wplc-survey-script', 'wplc_button_string', $wplc_settings['wplc_pro_sst1_survey'] );
|
@@ -362,7 +362,7 @@ function wplc_admin_survey_layout() {
|
|
362 |
}
|
363 |
else {
|
364 |
|
365 |
-
$link1 = sprintf( __( 'Register on <a href="%s" target="_BLANK" title="NimbleSquirrel">NimbleSquirrel</a> (It\'s free)', 'wplivechat' ),
|
366 |
'http://app.nimblesquirrel.com/join.php?email='.get_option("admin_email")."&site=".site_url().'&utm_source=wplc&utm_medium=click&utm_campaign=plugin_register'
|
367 |
);
|
368 |
$link2 = sprintf( __( '<a href="%s" target="_BLANK" title="Create a survey">Create a survey</a>.', 'wplivechat' ),
|
120 |
<?php
|
121 |
|
122 |
global $wplc_version;
|
123 |
+
wp_register_script('wplc-lead-form-script', plugins_url('/js/wplc_lead_forms.js', __DIR__),array('jquery'),$wplc_version);
|
124 |
wp_enqueue_script('wplc-lead-form-script');
|
125 |
}
|
126 |
|
192 |
if( isset( $settings['wplc_enable_surveys'] ) && intval($settings['wplc_enable_surveys']) == 1 && !isset($_COOKIE['ns_participated'])){
|
193 |
|
194 |
if( isset( $settings['survey_display']) && $settings['survey_display'] == '1' ) {
|
195 |
+
$content .= "<img src='".plugins_url('/images/loader2.gif', __DIR__)."' style='display:block; margin-left:auto; margin-right:auto;' / >";
|
196 |
return $content;
|
197 |
}
|
198 |
}
|
284 |
wp_localize_script( 'nimble-squirrel-user-script', 'ns_clear_div', $clear_div );
|
285 |
|
286 |
|
287 |
+
wp_register_style('wplc-survey-style', plugins_url('/css/wplc-survey-style.css', __DIR__));
|
288 |
wp_enqueue_style('wplc-survey-style');
|
289 |
if( isset( $settings['survey_display']) && $settings['survey_display'] == '1' ) {
|
290 |
+
wp_register_style('wplc-survey-before-style', plugins_url('/css/wplc-survey-style-before.css', __DIR__));
|
291 |
wp_enqueue_style('wplc-survey-before-style');
|
292 |
}
|
293 |
}
|
326 |
|
327 |
global $wplc_version;
|
328 |
$wplc_settings = get_option('WPLC_SETTINGS');
|
329 |
+
wp_register_script('wplc-survey-script', plugins_url('/js/wplc_surveys.js', __DIR__),array('jquery'),$wplc_version);
|
330 |
wp_enqueue_script('wplc-survey-script');
|
331 |
wp_localize_script( 'wplc-survey-script', 'wplc_end_chat_string', $wplc_settings['wplc_pro_sst1e_survey'] );
|
332 |
wp_localize_script( 'wplc-survey-script', 'wplc_button_string', $wplc_settings['wplc_pro_sst1_survey'] );
|
362 |
}
|
363 |
else {
|
364 |
|
365 |
+
$link1 = sprintf( __( 'Register on <a href="%s" target="_BLANK" title="NimbleSquirrel">NimbleSquirrel</a> (It\'s free.)', 'wplivechat' ),
|
366 |
'http://app.nimblesquirrel.com/join.php?email='.get_option("admin_email")."&site=".site_url().'&utm_source=wplc&utm_medium=click&utm_campaign=plugin_register'
|
367 |
);
|
368 |
$link2 = sprintf( __( '<a href="%s" target="_BLANK" title="Create a survey">Create a survey</a>.', 'wplivechat' ),
|
includes/update_control.class.php
CHANGED
@@ -65,20 +65,9 @@ final class wplc_update_control {
|
|
65 |
if (empty($checked_data->checked))
|
66 |
return $checked_data;
|
67 |
|
68 |
-
if ( empty( $checked_data->checked[$this->wplc_api_slug . '/' . $this->wplc_api_slug . '.php'] ) ) {
|
69 |
-
$plugin_data = get_plugin_data( trailingslashit( dirname( dirname( dirname( __FILE__ ) ) ) ) . $this->wplc_api_slug . '/' . $this->wplc_api_slug . '.php' );
|
70 |
-
if ( ! empty( $plugin_data['Version'] ) ) {
|
71 |
-
$version = $plugin_data['Version'];
|
72 |
-
} else {
|
73 |
-
$version = '0.0';
|
74 |
-
}
|
75 |
-
} else {
|
76 |
-
$version = $checked_data->checked[$this->wplc_api_slug . '/' . $this->wplc_api_slug . '.php'];
|
77 |
-
}
|
78 |
-
|
79 |
$args = array(
|
80 |
'slug' => $this->wplc_api_slug,
|
81 |
-
'version' => $
|
82 |
);
|
83 |
|
84 |
$request_string = array(
|
65 |
if (empty($checked_data->checked))
|
66 |
return $checked_data;
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
$args = array(
|
69 |
'slug' => $this->wplc_api_slug,
|
70 |
+
'version' => $checked_data->checked[$this->wplc_api_slug . '/' . $this->wplc_api_slug . '.php'],
|
71 |
);
|
72 |
|
73 |
$request_string = array(
|
includes/welcome_page.php
CHANGED
@@ -1,160 +1,160 @@
|
|
1 |
-
<?php //global $wpgmza_global_array; ?>
|
2 |
-
<div class="wrap about-wrap">
|
3 |
-
<p> </p>
|
4 |
-
<h1 style='margin-right: 0;'><?php _e("Welcome to WP Live Chat Support v8","wplivechat"); ?> <div class="wplc-badge" style=' float: right; display: block; max-width: 20%; margin-left: 15%;'><img src='<?php echo WPLC_BASIC_PLUGIN_URL . "images/wplc-logo.png"; ?>' /></div></h1>
|
5 |
-
|
6 |
-
<div class="about-text"><?php _e("WP Live Chat Support is the most cost effective, feature rich, amazingly supported and most positively reviewed live chat plugin on WordPress!","wplivechat"); ?></div>
|
7 |
-
|
8 |
-
<a class="button-primary" style='padding:5px; padding-right:15px; padding-left:15px; height:inherit;' href="admin.php?page=wplivechat-menu&override=1"><?php echo __("Skip intro and start accepting chats","wplivechat"); ?></a>
|
9 |
-
<p> </p>
|
10 |
-
|
11 |
-
<?php
|
12 |
-
|
13 |
-
if( !isset( $_GET['action'] ) ){
|
14 |
-
$welcome_active = 'nav-tab-active';
|
15 |
-
$credits_active = '';
|
16 |
-
} else {
|
17 |
-
if( $_GET['action'] == 'welcome' ){
|
18 |
-
$welcome_active = 'nav-tab-active';
|
19 |
-
$credits_active = '';
|
20 |
-
} else if( $_GET['action'] == 'credits' ){
|
21 |
-
$credits_active = 'nav-tab-active';
|
22 |
-
$welcome_active = '';
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
?>
|
27 |
-
<h2 class="nav-tab-wrapper wp-clearfix">
|
28 |
-
<a href="admin.php?page=wplivechat-menu&action=welcome" class="nav-tab <?php echo $welcome_active; ?>"><?php _e("Welcome","wplivechat"); ?></a>
|
29 |
-
<a href="admin.php?page=wplivechat-menu&action=credits" class="nav-tab <?php echo $credits_active; ?>"><?php _e("Credits","wplivechat"); ?></a>
|
30 |
-
|
31 |
-
</h2>
|
32 |
-
<?php if( !isset( $_GET['action'] ) || ( isset( $_GET['action'] ) && $_GET['action'] == 'welcome' ) ){ ?>
|
33 |
-
<h2>What's new in Version 8?</h2>
|
34 |
-
<center><img src='<?php echo WPLC_BASIC_PLUGIN_URL; ?>/images/performance.png' style='width:300px;' /></center>
|
35 |
-
<div class="feature-section three-col">
|
36 |
-
<div class="col">
|
37 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-bolt" aria-hidden="true"></i><br/><h4><?php _e("Incredibly fast server","wplivechat"); ?></h4></div>
|
38 |
-
|
39 |
-
<p style='text-align: center;'><?php _e("Use our server to handle the load and save 1000%+ on server resources!","wplivechat"); ?></p>
|
40 |
-
</div>
|
41 |
-
<div class="col">
|
42 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-dashboard" aria-hidden="true"></i><br/><h4><?php _e("New Dashboard","wplivechat"); ?></h4></div>
|
43 |
-
<p style='text-align: center;'><?php _e("Handle all your chats in one area, on any admin page.","wplivechat"); ?></p>
|
44 |
-
</div>
|
45 |
-
<div class="col">
|
46 |
-
<div style='text-align: center;' ><i class="fa-4x far fa-smile" aria-hidden="true"></i><br/><h4><?php _e("Emojis!","wplivechat"); ?></h4></div>
|
47 |
-
<p style='text-align: center;'><?php _e("Add a touch of your own personality with emojis!","wplivechat"); ?></p>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<h2>New Pro features</h2>
|
52 |
-
<div class="feature-section three-col">
|
53 |
-
<div class="col">
|
54 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-commenting-o" aria-hidden="true"></i><br/><h4><?php _e("Typing Preview","wplivechat"); ?></h4></div>
|
55 |
-
|
56 |
-
<p style='text-align: center;'><?php _e("See what your customers are typing before they even send it!","wplivechat"); ?></p>
|
57 |
-
</div>
|
58 |
-
<div class="col">
|
59 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-users" aria-hidden="true"></i><br/><h4><?php _e("Multiple Agents Per Chat","wplivechat"); ?></h4></div>
|
60 |
-
|
61 |
-
<p style='text-align: center;'><?php _e("More than one agent can join and be involved in a chat.","wplivechat"); ?></p>
|
62 |
-
</div>
|
63 |
-
<div class="col">
|
64 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-random" aria-hidden="true"></i><br/><h4><?php _e("Agent to Agent Chat","wplivechat"); ?></h4></div>
|
65 |
-
|
66 |
-
<p style='text-align: center;'><?php _e( "Chat directly to other agents on our new dashboard.","wplivechat"); ?></p>
|
67 |
-
</div>
|
68 |
-
</div>
|
69 |
-
<div class="feature-section three-col">
|
70 |
-
<div class="col">
|
71 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-eraser" aria-hidden="true"></i><br/><h4><?php _e("Edit Messages","wplivechat"); ?></h4></div>
|
72 |
-
|
73 |
-
<p style='text-align: center;'><?php _e("Simply press the UP arrow or use the EDIT link to edit a message that you have already sent.","wplivechat"); ?></p>
|
74 |
-
</div>
|
75 |
-
<div class="col">
|
76 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-heartbeat" aria-hidden="true"></i><br/><h4><?php _e("Event Monitoring","wplivechat"); ?></h4></div>
|
77 |
-
|
78 |
-
<p style='text-align: center;'><?php _e("Know exactly what the user is doing in real time.","wplivechat"); ?></p>
|
79 |
-
</div>
|
80 |
-
<div class="col">
|
81 |
-
<div style='text-align: center;' ><i class="fa-4x fa fa-apple" aria-hidden="true"></i><br/><h4><?php _e("iOS app","wplivechat"); ?></h4></div>
|
82 |
-
|
83 |
-
<p style='text-align: center;'><?php _e( "The new iOS app is finally here!","wplivechat"); ?></p>
|
84 |
-
</div>
|
85 |
-
</div>
|
86 |
-
|
87 |
-
<hr />
|
88 |
-
|
89 |
-
<div class="feature-section normal clear" >
|
90 |
-
<div class="changelog ">
|
91 |
-
|
92 |
-
<form method="post" name="wplc_find_us_form" style="font-size: 16px;">
|
93 |
-
<div style="text-align: left; width:275px;">
|
94 |
-
<input type="radio" name="wplc_find_us" id="wordpress" value='repository'>
|
95 |
-
<label for="wordpress">
|
96 |
-
<?php _e('WordPress.org plugin repository ', 'wplivechat'); ?>
|
97 |
-
</label>
|
98 |
-
<br/>
|
99 |
-
<input type='text' placeholder="<?php _e('Search Term', 'wplivechat'); ?>" name='wplc_nl_search_term' style='margin-top:5px; margin-left: 23px; width: 100% '>
|
100 |
-
<br/>
|
101 |
-
<input type="radio" name="wplc_find_us" id="search_engine" value='search_engine'>
|
102 |
-
<label for="search_engine">
|
103 |
-
<?php _e('Google or other search Engine', 'wplivechat'); ?>
|
104 |
-
</label>
|
105 |
-
<br/>
|
106 |
-
<input type="radio" name="wplc_find_us" id="friend" value='friend'>
|
107 |
-
|
108 |
-
<label for='friend'>
|
109 |
-
<?php _e('Friend recommendation', 'wplivechat'); ?>
|
110 |
-
</label>
|
111 |
-
<br/>
|
112 |
-
<input type="radio" name="wplc_find_us" id='other' value='other'>
|
113 |
-
|
114 |
-
<label for='other'>
|
115 |
-
<?php _e('Other', 'wplivechat'); ?>
|
116 |
-
</label>
|
117 |
-
<br/>
|
118 |
-
|
119 |
-
<textarea placeholder="<?php _e('Please Explain', 'wplivechat'); ?>" style='margin-top:5px; margin-left: 23px; width: 100%' name='wplc_nl_findus_other_url'></textarea>
|
120 |
-
</div>
|
121 |
-
<div>
|
122 |
-
|
123 |
-
</div>
|
124 |
-
<div>
|
125 |
-
|
126 |
-
</div>
|
127 |
-
<div style='margin-top: 20px;'>
|
128 |
-
<button name='action' value='wplc_submit_find_us' class="button-primary" style=""><?php _e('Submit', 'wplivechat'); ?></button> <a href='<?php echo admin_url("/admin.php?page=wplivechat-menu&override=1"); ?>'class="button"><?php _e('Skip', 'wplivechat'); ?></a>
|
129 |
-
</div>
|
130 |
-
</form>
|
131 |
-
<br/><br/>
|
132 |
-
|
133 |
-
<hr />
|
134 |
-
|
135 |
-
<div class="feature-section three-col">
|
136 |
-
<div class='col'>
|
137 |
-
<h4><?php _e("New to WP Live Chat Support?","wplivechat"); ?></h4>
|
138 |
-
<p><?php _e("You may want to","wp-google-maps"); ?> <a href='https://wp-livechat.com/documentation/' target='_blank' title='Documentation'><?php _e("review our documentation","wplivechat"); ?></a> <?php _e("before you get started. If you're a tech-savvy individual, you may skip this step.","wplivechat"); ?></p>
|
139 |
-
</div>
|
140 |
-
<div class='col'>
|
141 |
-
<h4><?php _e("Help me!","wplivechat"); ?></h4>
|
142 |
-
<p><?php _e("Visit our","wplivechat"); ?> <a title='Support Desk' target='_blank' href='https://wp-livechat.com/contact-us/'><?php _e("Support Desk","wplivechat"); ?></a> <?php _e("for quick and friendly help. We'll answer your request within 24hours.","wplivechat"); ?></p>
|
143 |
-
</div>
|
144 |
-
<div class='col'>
|
145 |
-
<h4><?php _e("Feedback","wp-google-maps"); ?></h4>
|
146 |
-
<p><?php _e("We need you to help us make this plugin better.","wplivechat"); ?> <a href='https://wp-livechat.com/contact-us/' title='Feedback' target='_BLANK'><?php _e("Send us your feedback","wplivechat"); ?></a> <?php _e("and we'll act on it as soon as humanly possible.","wplivechat"); ?></p>
|
147 |
-
</div>
|
148 |
-
</div>
|
149 |
-
|
150 |
-
<a class="button-primary" style='padding:5px; padding-right:15px; padding-left:15px; height:inherit;' href="admin.php?page=wplivechat-menu&override=1"><?php echo __("OK! Let's start","wplivechat"); ?></a>
|
151 |
-
|
152 |
-
</div>
|
153 |
-
</div>
|
154 |
-
|
155 |
-
</div>
|
156 |
-
<?php } else {
|
157 |
-
$path = plugin_dir_path(__FILE__).'credits.php';
|
158 |
-
include $path;
|
159 |
-
}
|
160 |
?>
|
1 |
+
<?php //global $wpgmza_global_array; ?>
|
2 |
+
<div class="wrap about-wrap">
|
3 |
+
<p> </p>
|
4 |
+
<h1 style='margin-right: 0;'><?php _e("Welcome to WP Live Chat Support v8","wplivechat"); ?> <div class="wplc-badge" style=' float: right; display: block; max-width: 20%; margin-left: 15%;'><img src='<?php echo WPLC_BASIC_PLUGIN_URL . "images/wplc-logo.png"; ?>' /></div></h1>
|
5 |
+
|
6 |
+
<div class="about-text"><?php _e("WP Live Chat Support is the most cost effective, feature rich, amazingly supported and most positively reviewed live chat plugin on WordPress!","wplivechat"); ?></div>
|
7 |
+
|
8 |
+
<a class="button-primary" style='padding:5px; padding-right:15px; padding-left:15px; height:inherit;' href="admin.php?page=wplivechat-menu&override=1"><?php echo __("Skip intro and start accepting chats","wplivechat"); ?></a>
|
9 |
+
<p> </p>
|
10 |
+
|
11 |
+
<?php
|
12 |
+
|
13 |
+
if( !isset( $_GET['action'] ) ){
|
14 |
+
$welcome_active = 'nav-tab-active';
|
15 |
+
$credits_active = '';
|
16 |
+
} else {
|
17 |
+
if( $_GET['action'] == 'welcome' ){
|
18 |
+
$welcome_active = 'nav-tab-active';
|
19 |
+
$credits_active = '';
|
20 |
+
} else if( $_GET['action'] == 'credits' ){
|
21 |
+
$credits_active = 'nav-tab-active';
|
22 |
+
$welcome_active = '';
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
?>
|
27 |
+
<h2 class="nav-tab-wrapper wp-clearfix">
|
28 |
+
<a href="admin.php?page=wplivechat-menu&action=welcome" class="nav-tab <?php echo $welcome_active; ?>"><?php _e("Welcome","wplivechat"); ?></a>
|
29 |
+
<a href="admin.php?page=wplivechat-menu&action=credits" class="nav-tab <?php echo $credits_active; ?>"><?php _e("Credits","wplivechat"); ?></a>
|
30 |
+
|
31 |
+
</h2>
|
32 |
+
<?php if( !isset( $_GET['action'] ) || ( isset( $_GET['action'] ) && $_GET['action'] == 'welcome' ) ){ ?>
|
33 |
+
<h2>What's new in Version 8?</h2>
|
34 |
+
<center><img src='<?php echo WPLC_BASIC_PLUGIN_URL; ?>/images/performance.png' style='width:300px;' /></center>
|
35 |
+
<div class="feature-section three-col">
|
36 |
+
<div class="col">
|
37 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-bolt" aria-hidden="true"></i><br/><h4><?php _e("Incredibly fast server","wplivechat"); ?></h4></div>
|
38 |
+
|
39 |
+
<p style='text-align: center;'><?php _e("Use our server to handle the load and save 1000%+ on server resources!","wplivechat"); ?></p>
|
40 |
+
</div>
|
41 |
+
<div class="col">
|
42 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-dashboard" aria-hidden="true"></i><br/><h4><?php _e("New Dashboard","wplivechat"); ?></h4></div>
|
43 |
+
<p style='text-align: center;'><?php _e("Handle all your chats in one area, on any admin page.","wplivechat"); ?></p>
|
44 |
+
</div>
|
45 |
+
<div class="col">
|
46 |
+
<div style='text-align: center;' ><i class="fa-4x far fa-smile" aria-hidden="true"></i><br/><h4><?php _e("Emojis!","wplivechat"); ?></h4></div>
|
47 |
+
<p style='text-align: center;'><?php _e("Add a touch of your own personality with emojis!","wplivechat"); ?></p>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
<h2>New Pro features</h2>
|
52 |
+
<div class="feature-section three-col">
|
53 |
+
<div class="col">
|
54 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-commenting-o" aria-hidden="true"></i><br/><h4><?php _e("Typing Preview","wplivechat"); ?></h4></div>
|
55 |
+
|
56 |
+
<p style='text-align: center;'><?php _e("See what your customers are typing before they even send it!","wplivechat"); ?></p>
|
57 |
+
</div>
|
58 |
+
<div class="col">
|
59 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-users" aria-hidden="true"></i><br/><h4><?php _e("Multiple Agents Per Chat","wplivechat"); ?></h4></div>
|
60 |
+
|
61 |
+
<p style='text-align: center;'><?php _e("More than one agent can join and be involved in a chat.","wplivechat"); ?></p>
|
62 |
+
</div>
|
63 |
+
<div class="col">
|
64 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-random" aria-hidden="true"></i><br/><h4><?php _e("Agent to Agent Chat","wplivechat"); ?></h4></div>
|
65 |
+
|
66 |
+
<p style='text-align: center;'><?php _e( "Chat directly to other agents on our new dashboard.","wplivechat"); ?></p>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
<div class="feature-section three-col">
|
70 |
+
<div class="col">
|
71 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-eraser" aria-hidden="true"></i><br/><h4><?php _e("Edit Messages","wplivechat"); ?></h4></div>
|
72 |
+
|
73 |
+
<p style='text-align: center;'><?php _e("Simply press the UP arrow or use the EDIT link to edit a message that you have already sent.","wplivechat"); ?></p>
|
74 |
+
</div>
|
75 |
+
<div class="col">
|
76 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-heartbeat" aria-hidden="true"></i><br/><h4><?php _e("Event Monitoring","wplivechat"); ?></h4></div>
|
77 |
+
|
78 |
+
<p style='text-align: center;'><?php _e("Know exactly what the user is doing in real time.","wplivechat"); ?></p>
|
79 |
+
</div>
|
80 |
+
<div class="col">
|
81 |
+
<div style='text-align: center;' ><i class="fa-4x fa fa-apple" aria-hidden="true"></i><br/><h4><?php _e("iOS app","wplivechat"); ?></h4></div>
|
82 |
+
|
83 |
+
<p style='text-align: center;'><?php _e( "The new iOS app is finally here!","wplivechat"); ?></p>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<hr />
|
88 |
+
|
89 |
+
<div class="feature-section normal clear" >
|
90 |
+
<div class="changelog ">
|
91 |
+
<h2 style="font-size: 25px; text-align: left;"><?php _e('How did you find us?', 'wplivechat'); ?></h2>
|
92 |
+
<form method="post" name="wplc_find_us_form" style="font-size: 16px;">
|
93 |
+
<div style="text-align: left; width:275px;">
|
94 |
+
<input type="radio" name="wplc_find_us" id="wordpress" value='repository'>
|
95 |
+
<label for="wordpress">
|
96 |
+
<?php _e('WordPress.org plugin repository ', 'wplivechat'); ?>
|
97 |
+
</label>
|
98 |
+
<br/>
|
99 |
+
<input type='text' placeholder="<?php _e('Search Term', 'wplivechat'); ?>" name='wplc_nl_search_term' style='margin-top:5px; margin-left: 23px; width: 100% '>
|
100 |
+
<br/>
|
101 |
+
<input type="radio" name="wplc_find_us" id="search_engine" value='search_engine'>
|
102 |
+
<label for="search_engine">
|
103 |
+
<?php _e('Google or other search Engine', 'wplivechat'); ?>
|
104 |
+
</label>
|
105 |
+
<br/>
|
106 |
+
<input type="radio" name="wplc_find_us" id="friend" value='friend'>
|
107 |
+
|
108 |
+
<label for='friend'>
|
109 |
+
<?php _e('Friend recommendation', 'wplivechat'); ?>
|
110 |
+
</label>
|
111 |
+
<br/>
|
112 |
+
<input type="radio" name="wplc_find_us" id='other' value='other'>
|
113 |
+
|
114 |
+
<label for='other'>
|
115 |
+
<?php _e('Other', 'wplivechat'); ?>
|
116 |
+
</label>
|
117 |
+
<br/>
|
118 |
+
|
119 |
+
<textarea placeholder="<?php _e('Please Explain', 'wplivechat'); ?>" style='margin-top:5px; margin-left: 23px; width: 100%' name='wplc_nl_findus_other_url'></textarea>
|
120 |
+
</div>
|
121 |
+
<div>
|
122 |
+
|
123 |
+
</div>
|
124 |
+
<div>
|
125 |
+
|
126 |
+
</div>
|
127 |
+
<div style='margin-top: 20px;'>
|
128 |
+
<button name='action' value='wplc_submit_find_us' class="button-primary" style=""><?php _e('Submit', 'wplivechat'); ?></button> <a href='<?php echo admin_url("/admin.php?page=wplivechat-menu&override=1"); ?>'class="button"><?php _e('Skip', 'wplivechat'); ?></a>
|
129 |
+
</div>
|
130 |
+
</form>
|
131 |
+
<br/><br/>
|
132 |
+
|
133 |
+
<hr />
|
134 |
+
|
135 |
+
<div class="feature-section three-col">
|
136 |
+
<div class='col'>
|
137 |
+
<h4><?php _e("New to WP Live Chat Support?","wplivechat"); ?></h4>
|
138 |
+
<p><?php _e("You may want to","wp-google-maps"); ?> <a href='https://wp-livechat.com/documentation/' target='_blank' title='Documentation'><?php _e("review our documentation","wplivechat"); ?></a> <?php _e("before you get started. If you're a tech-savvy individual, you may skip this step.","wplivechat"); ?></p>
|
139 |
+
</div>
|
140 |
+
<div class='col'>
|
141 |
+
<h4><?php _e("Help me!","wplivechat"); ?></h4>
|
142 |
+
<p><?php _e("Visit our","wplivechat"); ?> <a title='Support Desk' target='_blank' href='https://wp-livechat.com/contact-us/'><?php _e("Support Desk","wplivechat"); ?></a> <?php _e("for quick and friendly help. We'll answer your request within 24hours.","wplivechat"); ?></p>
|
143 |
+
</div>
|
144 |
+
<div class='col'>
|
145 |
+
<h4><?php _e("Feedback","wp-google-maps"); ?></h4>
|
146 |
+
<p><?php _e("We need you to help us make this plugin better.","wplivechat"); ?> <a href='https://wp-livechat.com/contact-us/' title='Feedback' target='_BLANK'><?php _e("Send us your feedback","wplivechat"); ?></a> <?php _e("and we'll act on it as soon as humanly possible.","wplivechat"); ?></p>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
|
150 |
+
<a class="button-primary" style='padding:5px; padding-right:15px; padding-left:15px; height:inherit;' href="admin.php?page=wplivechat-menu&override=1"><?php echo __("OK! Let's start","wplivechat"); ?></a>
|
151 |
+
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
|
155 |
+
</div>
|
156 |
+
<?php } else {
|
157 |
+
$path = plugin_dir_path(__FILE__).'credits.php';
|
158 |
+
include $path;
|
159 |
+
}
|
160 |
?>
|
js/ace.js
CHANGED
@@ -1,134 +1,134 @@
|
|
1 |
-
/* ***** BEGIN LICENSE BLOCK *****
|
2 |
-
* Distributed under the BSD license:
|
3 |
-
*
|
4 |
-
* Copyright (c) 2010, Ajax.org B.V.
|
5 |
-
* All rights reserved.
|
6 |
-
*
|
7 |
-
* Redistribution and use in source and binary forms, with or without
|
8 |
-
* modification, are permitted provided that the following conditions are met:
|
9 |
-
* * Redistributions of source code must retain the above copyright
|
10 |
-
* notice, this list of conditions and the following disclaimer.
|
11 |
-
* * Redistributions in binary form must reproduce the above copyright
|
12 |
-
* notice, this list of conditions and the following disclaimer in the
|
13 |
-
* documentation and/or other materials provided with the distribution.
|
14 |
-
* * Neither the name of Ajax.org B.V. nor the
|
15 |
-
* names of its contributors may be used to endorse or promote products
|
16 |
-
* derived from this software without specific prior written permission.
|
17 |
-
*
|
18 |
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19 |
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20 |
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21 |
-
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22 |
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23 |
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24 |
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25 |
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26 |
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27 |
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28 |
-
*
|
29 |
-
* ***** END LICENSE BLOCK ***** */
|
30 |
-
|
31 |
-
/**
|
32 |
-
* The main class required to set up an Ace instance in the browser.
|
33 |
-
*
|
34 |
-
* @class Ace
|
35 |
-
**/
|
36 |
-
|
37 |
-
define(function(require, exports, module) {
|
38 |
-
"use strict";
|
39 |
-
|
40 |
-
require("./lib/fixoldbrowsers");
|
41 |
-
|
42 |
-
var dom = require("./lib/dom");
|
43 |
-
var event = require("./lib/event");
|
44 |
-
|
45 |
-
var Editor = require("./editor").Editor;
|
46 |
-
var EditSession = require("./edit_session").EditSession;
|
47 |
-
var UndoManager = require("./undomanager").UndoManager;
|
48 |
-
var Renderer = require("./virtual_renderer").VirtualRenderer;
|
49 |
-
|
50 |
-
// The following require()s are for inclusion in the built ace file
|
51 |
-
require("./worker/worker_client");
|
52 |
-
require("./keyboard/hash_handler");
|
53 |
-
require("./placeholder");
|
54 |
-
require("./multi_select");
|
55 |
-
require("./mode/folding/fold_mode");
|
56 |
-
require("./theme/textmate");
|
57 |
-
require("./ext/error_marker");
|
58 |
-
|
59 |
-
exports.config = require("./config");
|
60 |
-
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Provides access to require in packed noconflict mode
|
64 |
-
* @param {String} moduleName
|
65 |
-
* @returns {Object}
|
66 |
-
**/
|
67 |
-
exports.require = require;
|
68 |
-
define = 'bob';
|
69 |
-
|
70 |
-
if (typeof define === "function")
|
71 |
-
exports.define = define;
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Embeds the Ace editor into the DOM, at the element provided by `el`.
|
75 |
-
* @param {String | DOMElement} el Either the id of an element, or the element itself
|
76 |
-
* @param {Object } options Options for the editor
|
77 |
-
*
|
78 |
-
**/
|
79 |
-
exports.edit = function(el, options) {
|
80 |
-
if (typeof el == "string") {
|
81 |
-
var _id = el;
|
82 |
-
el = document.getElementById(_id);
|
83 |
-
if (!el)
|
84 |
-
throw new Error("ace.edit can't find div #" + _id);
|
85 |
-
}
|
86 |
-
|
87 |
-
if (el && el.env && el.env.editor instanceof Editor)
|
88 |
-
return el.env.editor;
|
89 |
-
|
90 |
-
var value = "";
|
91 |
-
if (el && /input|textarea/i.test(el.tagName)) {
|
92 |
-
var oldNode = el;
|
93 |
-
value = oldNode.value;
|
94 |
-
el = dom.createElement("pre");
|
95 |
-
oldNode.parentNode.replaceChild(el, oldNode);
|
96 |
-
} else if (el) {
|
97 |
-
value = dom.getInnerText(el);
|
98 |
-
el.innerHTML = "";
|
99 |
-
}
|
100 |
-
|
101 |
-
var doc = exports.createEditSession(value);
|
102 |
-
|
103 |
-
var editor = new Editor(new Renderer(el), doc, options);
|
104 |
-
|
105 |
-
var env = {
|
106 |
-
document: doc,
|
107 |
-
editor: editor,
|
108 |
-
onResize: editor.resize.bind(editor, null)
|
109 |
-
};
|
110 |
-
if (oldNode) env.textarea = oldNode;
|
111 |
-
event.addListener(window, "resize", env.onResize);
|
112 |
-
editor.on("destroy", function() {
|
113 |
-
event.removeListener(window, "resize", env.onResize);
|
114 |
-
env.editor.container.env = null; // prevent memory leak on old ie
|
115 |
-
});
|
116 |
-
editor.container.env = editor.env = env;
|
117 |
-
return editor;
|
118 |
-
};
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Creates a new [[EditSession]], and returns the associated [[Document]].
|
122 |
-
* @param {Document | String} text {:textParam}
|
123 |
-
* @param {TextMode} mode {:modeParam}
|
124 |
-
*
|
125 |
-
**/
|
126 |
-
exports.createEditSession = function(text, mode) {
|
127 |
-
var doc = new EditSession(text, mode);
|
128 |
-
doc.setUndoManager(new UndoManager());
|
129 |
-
return doc;
|
130 |
-
};
|
131 |
-
exports.EditSession = EditSession;
|
132 |
-
exports.UndoManager = UndoManager;
|
133 |
-
exports.version = "1.2.9";
|
134 |
-
});
|
1 |
+
/* ***** BEGIN LICENSE BLOCK *****
|
2 |
+
* Distributed under the BSD license:
|
3 |
+
*
|
4 |
+
* Copyright (c) 2010, Ajax.org B.V.
|
5 |
+
* All rights reserved.
|
6 |
+
*
|
7 |
+
* Redistribution and use in source and binary forms, with or without
|
8 |
+
* modification, are permitted provided that the following conditions are met:
|
9 |
+
* * Redistributions of source code must retain the above copyright
|
10 |
+
* notice, this list of conditions and the following disclaimer.
|
11 |
+
* * Redistributions in binary form must reproduce the above copyright
|
12 |
+
* notice, this list of conditions and the following disclaimer in the
|
13 |
+
* documentation and/or other materials provided with the distribution.
|
14 |
+
* * Neither the name of Ajax.org B.V. nor the
|
15 |
+
* names of its contributors may be used to endorse or promote products
|
16 |
+
* derived from this software without specific prior written permission.
|
17 |
+
*
|
18 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19 |
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20 |
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21 |
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22 |
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23 |
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24 |
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25 |
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27 |
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28 |
+
*
|
29 |
+
* ***** END LICENSE BLOCK ***** */
|
30 |
+
|
31 |
+
/**
|
32 |
+
* The main class required to set up an Ace instance in the browser.
|
33 |
+
*
|
34 |
+
* @class Ace
|
35 |
+
**/
|
36 |
+
|
37 |
+
define(function(require, exports, module) {
|
38 |
+
"use strict";
|
39 |
+
|
40 |
+
require("./lib/fixoldbrowsers");
|
41 |
+
|
42 |
+
var dom = require("./lib/dom");
|
43 |
+
var event = require("./lib/event");
|
44 |
+
|
45 |
+
var Editor = require("./editor").Editor;
|
46 |
+
var EditSession = require("./edit_session").EditSession;
|
47 |
+
var UndoManager = require("./undomanager").UndoManager;
|
48 |
+
var Renderer = require("./virtual_renderer").VirtualRenderer;
|
49 |
+
|
50 |
+
// The following require()s are for inclusion in the built ace file
|
51 |
+
require("./worker/worker_client");
|
52 |
+
require("./keyboard/hash_handler");
|
53 |
+
require("./placeholder");
|
54 |
+
require("./multi_select");
|
55 |
+
require("./mode/folding/fold_mode");
|
56 |
+
require("./theme/textmate");
|
57 |
+
require("./ext/error_marker");
|
58 |
+
|
59 |
+
exports.config = require("./config");
|
60 |
+
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Provides access to require in packed noconflict mode
|
64 |
+
* @param {String} moduleName
|
65 |
+
* @returns {Object}
|
66 |
+
**/
|
67 |
+
exports.require = require;
|
68 |
+
define = 'bob';
|
69 |
+
|
70 |
+
if (typeof define === "function")
|
71 |
+
exports.define = define;
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Embeds the Ace editor into the DOM, at the element provided by `el`.
|
75 |
+
* @param {String | DOMElement} el Either the id of an element, or the element itself
|
76 |
+
* @param {Object } options Options for the editor
|
77 |
+
*
|
78 |
+
**/
|
79 |
+
exports.edit = function(el, options) {
|
80 |
+
if (typeof el == "string") {
|
81 |
+
var _id = el;
|
82 |
+
el = document.getElementById(_id);
|
83 |
+
if (!el)
|
84 |
+
throw new Error("ace.edit can't find div #" + _id);
|
85 |
+
}
|
86 |
+
|
87 |
+
if (el && el.env && el.env.editor instanceof Editor)
|
88 |
+
return el.env.editor;
|
89 |
+
|
90 |
+
var value = "";
|
91 |
+
if (el && /input|textarea/i.test(el.tagName)) {
|
92 |
+
var oldNode = el;
|
93 |
+
value = oldNode.value;
|
94 |
+
el = dom.createElement("pre");
|
95 |
+
oldNode.parentNode.replaceChild(el, oldNode);
|
96 |
+
} else if (el) {
|
97 |
+
value = dom.getInnerText(el);
|
98 |
+
el.innerHTML = "";
|
99 |
+
}
|
100 |
+
|
101 |
+
var doc = exports.createEditSession(value);
|
102 |
+
|
103 |
+
var editor = new Editor(new Renderer(el), doc, options);
|
104 |
+
|
105 |
+
var env = {
|
106 |
+
document: doc,
|
107 |
+
editor: editor,
|
108 |
+
onResize: editor.resize.bind(editor, null)
|
109 |
+
};
|
110 |
+
if (oldNode) env.textarea = oldNode;
|
111 |
+
event.addListener(window, "resize", env.onResize);
|
112 |
+
editor.on("destroy", function() {
|
113 |
+
event.removeListener(window, "resize", env.onResize);
|
114 |
+
env.editor.container.env = null; // prevent memory leak on old ie
|
115 |
+
});
|
116 |
+
editor.container.env = editor.env = env;
|
117 |
+
return editor;
|
118 |
+
};
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Creates a new [[EditSession]], and returns the associated [[Document]].
|
122 |
+
* @param {Document | String} text {:textParam}
|
123 |
+
* @param {TextMode} mode {:modeParam}
|
124 |
+
*
|
125 |
+
**/
|
126 |
+
exports.createEditSession = function(text, mode) {
|
127 |
+
var doc = new EditSession(text, mode);
|
128 |
+
doc.setUndoManager(new UndoManager());
|
129 |
+
return doc;
|
130 |
+
};
|
131 |
+
exports.EditSession = EditSession;
|
132 |
+
exports.UndoManager = UndoManager;
|
133 |
+
exports.version = "1.2.9";
|
134 |
+
});
|
js/arrow.gif
CHANGED
File without changes
|
js/cross.gif
CHANGED
File without changes
|
js/fontawesome-iconpicker.js
CHANGED
@@ -1,1025 +1,1025 @@
|
|
1 |
-
(function(a) {
|
2 |
-
if (typeof define === "function" && define.amd) {
|
3 |
-
define([ "jquery" ], a);
|
4 |
-
} else {
|
5 |
-
a(jQuery);
|
6 |
-
}
|
7 |
-
})(function(a) {
|
8 |
-
a.ui = a.ui || {};
|
9 |
-
var b = a.ui.version = "1.12.1";
|
10 |
-
(function() {
|
11 |
-
var b, c = Math.max, d = Math.abs, e = /left|center|right/, f = /top|center|bottom/, g = /[\+\-]\d+(\.[\d]+)?%?/, h = /^\w+/, i = /%$/, j = a.fn.pos;
|
12 |
-
function k(a, b, c) {
|
13 |
-
return [ parseFloat(a[0]) * (i.test(a[0]) ? b / 100 : 1), parseFloat(a[1]) * (i.test(a[1]) ? c / 100 : 1) ];
|
14 |
-
}
|
15 |
-
function l(b, c) {
|
16 |
-
return parseInt(a.css(b, c), 10) || 0;
|
17 |
-
}
|
18 |
-
function m(b) {
|
19 |
-
var c = b[0];
|
20 |
-
if (c.nodeType === 9) {
|
21 |
-
return {
|
22 |
-
width: b.width(),
|
23 |
-
height: b.height(),
|
24 |
-
offset: {
|
25 |
-
top: 0,
|
26 |
-
left: 0
|
27 |
-
}
|
28 |
-
};
|
29 |
-
}
|
30 |
-
if (a.isWindow(c)) {
|
31 |
-
return {
|
32 |
-
width: b.width(),
|
33 |
-
height: b.height(),
|
34 |
-
offset: {
|
35 |
-
top: b.scrollTop(),
|
36 |
-
left: b.scrollLeft()
|
37 |
-
}
|
38 |
-
};
|
39 |
-
}
|
40 |
-
if (c.preventDefault) {
|
41 |
-
return {
|
42 |
-
width: 0,
|
43 |
-
height: 0,
|
44 |
-
offset: {
|
45 |
-
top: c.pageY,
|
46 |
-
left: c.pageX
|
47 |
-
}
|
48 |
-
};
|
49 |
-
}
|
50 |
-
return {
|
51 |
-
width: b.outerWidth(),
|
52 |
-
height: b.outerHeight(),
|
53 |
-
offset: b.offset()
|
54 |
-
};
|
55 |
-
}
|
56 |
-
a.pos = {
|
57 |
-
scrollbarWidth: function() {
|
58 |
-
if (b !== undefined) {
|
59 |
-
return b;
|
60 |
-
}
|
61 |
-
var c, d, e = a("<div " + "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + "<div style='height:100px;width:auto;'></div></div>"), f = e.children()[0];
|
62 |
-
a("body").append(e);
|
63 |
-
c = f.offsetWidth;
|
64 |
-
e.css("overflow", "scroll");
|
65 |
-
d = f.offsetWidth;
|
66 |
-
if (c === d) {
|
67 |
-
d = e[0].clientWidth;
|
68 |
-
}
|
69 |
-
e.remove();
|
70 |
-
return b = c - d;
|
71 |
-
},
|
72 |
-
getScrollInfo: function(b) {
|
73 |
-
var c = b.isWindow || b.isDocument ? "" : b.element.css("overflow-x"), d = b.isWindow || b.isDocument ? "" : b.element.css("overflow-y"), e = c === "scroll" || c === "auto" && b.width < b.element[0].scrollWidth, f = d === "scroll" || d === "auto" && b.height < b.element[0].scrollHeight;
|
74 |
-
return {
|
75 |
-
width: f ? a.pos.scrollbarWidth() : 0,
|
76 |
-
height: e ? a.pos.scrollbarWidth() : 0
|
77 |
-
};
|
78 |
-
},
|
79 |
-
getWithinInfo: function(b) {
|
80 |
-
var c = a(b || window), d = a.isWindow(c[0]), e = !!c[0] && c[0].nodeType === 9, f = !d && !e;
|
81 |
-
return {
|
82 |
-
element: c,
|
83 |
-
isWindow: d,
|
84 |
-
isDocument: e,
|
85 |
-
offset: f ? a(b).offset() : {
|
86 |
-
left: 0,
|
87 |
-
top: 0
|
88 |
-
},
|
89 |
-
scrollLeft: c.scrollLeft(),
|
90 |
-
scrollTop: c.scrollTop(),
|
91 |
-
width: c.outerWidth(),
|
92 |
-
height: c.outerHeight()
|
93 |
-
};
|
94 |
-
}
|
95 |
-
};
|
96 |
-
a.fn.pos = function(b) {
|
97 |
-
if (!b || !b.of) {
|
98 |
-
return j.apply(this, arguments);
|
99 |
-
}
|
100 |
-
b = a.extend({}, b);
|
101 |
-
var i, n, o, p, q, r, s = a(b.of), t = a.pos.getWithinInfo(b.within), u = a.pos.getScrollInfo(t), v = (b.collision || "flip").split(" "), w = {};
|
102 |
-
r = m(s);
|
103 |
-
if (s[0].preventDefault) {
|
104 |
-
b.at = "left top";
|
105 |
-
}
|
106 |
-
n = r.width;
|
107 |
-
o = r.height;
|
108 |
-
p = r.offset;
|
109 |
-
q = a.extend({}, p);
|
110 |
-
a.each([ "my", "at" ], function() {
|
111 |
-
var a = (b[this] || "").split(" "), c, d;
|
112 |
-
if (a.length === 1) {
|
113 |
-
a = e.test(a[0]) ? a.concat([ "center" ]) : f.test(a[0]) ? [ "center" ].concat(a) : [ "center", "center" ];
|
114 |
-
}
|
115 |
-
a[0] = e.test(a[0]) ? a[0] : "center";
|
116 |
-
a[1] = f.test(a[1]) ? a[1] : "center";
|
117 |
-
c = g.exec(a[0]);
|
118 |
-
d = g.exec(a[1]);
|
119 |
-
w[this] = [ c ? c[0] : 0, d ? d[0] : 0 ];
|
120 |
-
b[this] = [ h.exec(a[0])[0], h.exec(a[1])[0] ];
|
121 |
-
});
|
122 |
-
if (v.length === 1) {
|
123 |
-
v[1] = v[0];
|
124 |
-
}
|
125 |
-
if (b.at[0] === "right") {
|
126 |
-
q.left += n;
|
127 |
-
} else if (b.at[0] === "center") {
|
128 |
-
q.left += n / 2;
|
129 |
-
}
|
130 |
-
if (b.at[1] === "bottom") {
|
131 |
-
q.top += o;
|
132 |
-
} else if (b.at[1] === "center") {
|
133 |
-
q.top += o / 2;
|
134 |
-
}
|
135 |
-
i = k(w.at, n, o);
|
136 |
-
q.left += i[0];
|
137 |
-
q.top += i[1];
|
138 |
-
return this.each(function() {
|
139 |
-
var e, f, g = a(this), h = g.outerWidth(), j = g.outerHeight(), m = l(this, "marginLeft"), r = l(this, "marginTop"), x = h + m + l(this, "marginRight") + u.width, y = j + r + l(this, "marginBottom") + u.height, z = a.extend({}, q), A = k(w.my, g.outerWidth(), g.outerHeight());
|
140 |
-
if (b.my[0] === "right") {
|
141 |
-
z.left -= h;
|
142 |
-
} else if (b.my[0] === "center") {
|
143 |
-
z.left -= h / 2;
|
144 |
-
}
|
145 |
-
if (b.my[1] === "bottom") {
|
146 |
-
z.top -= j;
|
147 |
-
} else if (b.my[1] === "center") {
|
148 |
-
z.top -= j / 2;
|
149 |
-
}
|
150 |
-
z.left += A[0];
|
151 |
-
z.top += A[1];
|
152 |
-
e = {
|
153 |
-
marginLeft: m,
|
154 |
-
marginTop: r
|
155 |
-
};
|
156 |
-
a.each([ "left", "top" ], function(c, d) {
|
157 |
-
if (a.ui.pos[v[c]]) {
|
158 |
-
a.ui.pos[v[c]][d](z, {
|
159 |
-
targetWidth: n,
|
160 |
-
targetHeight: o,
|
161 |
-
elemWidth: h,
|
162 |
-
elemHeight: j,
|
163 |
-
collisionPosition: e,
|
164 |
-
collisionWidth: x,
|
165 |
-
collisionHeight: y,
|
166 |
-
offset: [ i[0] + A[0], i[1] + A[1] ],
|
167 |
-
my: b.my,
|
168 |
-
at: b.at,
|
169 |
-
within: t,
|
170 |
-
elem: g
|
171 |
-
});
|
172 |
-
}
|
173 |
-
});
|
174 |
-
if (b.using) {
|
175 |
-
f = function(a) {
|
176 |
-
var e = p.left - z.left, f = e + n - h, i = p.top - z.top, k = i + o - j, l = {
|
177 |
-
target: {
|
178 |
-
element: s,
|
179 |
-
left: p.left,
|
180 |
-
top: p.top,
|
181 |
-
width: n,
|
182 |
-
height: o
|
183 |
-
},
|
184 |
-
element: {
|
185 |
-
element: g,
|
186 |
-
left: z.left,
|
187 |
-
top: z.top,
|
188 |
-
width: h,
|
189 |
-
height: j
|
190 |
-
},
|
191 |
-
horizontal: f < 0 ? "left" : e > 0 ? "right" : "center",
|
192 |
-
vertical: k < 0 ? "top" : i > 0 ? "bottom" : "middle"
|
193 |
-
};
|
194 |
-
if (n < h && d(e + f) < n) {
|
195 |
-
l.horizontal = "center";
|
196 |
-
}
|
197 |
-
if (o < j && d(i + k) < o) {
|
198 |
-
l.vertical = "middle";
|
199 |
-
}
|
200 |
-
if (c(d(e), d(f)) > c(d(i), d(k))) {
|
201 |
-
l.important = "horizontal";
|
202 |
-
} else {
|
203 |
-
l.important = "vertical";
|
204 |
-
}
|
205 |
-
b.using.call(this, a, l);
|
206 |
-
};
|
207 |
-
}
|
208 |
-
g.offset(a.extend(z, {
|
209 |
-
using: f
|
210 |
-
}));
|
211 |
-
});
|
212 |
-
};
|
213 |
-
a.ui.pos = {
|
214 |
-
_trigger: function(a, b, c, d) {
|
215 |
-
if (b.elem) {
|
216 |
-
b.elem.trigger({
|
217 |
-
type: c,
|
218 |
-
position: a,
|
219 |
-
positionData: b,
|
220 |
-
triggered: d
|
221 |
-
});
|
222 |
-
}
|
223 |
-
},
|
224 |
-
fit: {
|
225 |
-
left: function(b, d) {
|
226 |
-
a.ui.pos._trigger(b, d, "posCollide", "fitLeft");
|
227 |
-
var e = d.within, f = e.isWindow ? e.scrollLeft : e.offset.left, g = e.width, h = b.left - d.collisionPosition.marginLeft, i = f - h, j = h + d.collisionWidth - g - f, k;
|
228 |
-
if (d.collisionWidth > g) {
|
229 |
-
if (i > 0 && j <= 0) {
|
230 |
-
k = b.left + i + d.collisionWidth - g - f;
|
231 |
-
b.left += i - k;
|
232 |
-
} else if (j > 0 && i <= 0) {
|
233 |
-
b.left = f;
|
234 |
-
} else {
|
235 |
-
if (i > j) {
|
236 |
-
b.left = f + g - d.collisionWidth;
|
237 |
-
} else {
|
238 |
-
b.left = f;
|
239 |
-
}
|
240 |
-
}
|
241 |
-
} else if (i > 0) {
|
242 |
-
b.left += i;
|
243 |
-
} else if (j > 0) {
|
244 |
-
b.left -= j;
|
245 |
-
} else {
|
246 |
-
b.left = c(b.left - h, b.left);
|
247 |
-
}
|
248 |
-
a.ui.pos._trigger(b, d, "posCollided", "fitLeft");
|
249 |
-
},
|
250 |
-
top: function(b, d) {
|
251 |
-
a.ui.pos._trigger(b, d, "posCollide", "fitTop");
|
252 |
-
var e = d.within, f = e.isWindow ? e.scrollTop : e.offset.top, g = d.within.height, h = b.top - d.collisionPosition.marginTop, i = f - h, j = h + d.collisionHeight - g - f, k;
|
253 |
-
if (d.collisionHeight > g) {
|
254 |
-
if (i > 0 && j <= 0) {
|
255 |
-
k = b.top + i + d.collisionHeight - g - f;
|
256 |
-
b.top += i - k;
|
257 |
-
} else if (j > 0 && i <= 0) {
|
258 |
-
b.top = f;
|
259 |
-
} else {
|
260 |
-
if (i > j) {
|
261 |
-
b.top = f + g - d.collisionHeight;
|
262 |
-
} else {
|
263 |
-
b.top = f;
|
264 |
-
}
|
265 |
-
}
|
266 |
-
} else if (i > 0) {
|
267 |
-
b.top += i;
|
268 |
-
} else if (j > 0) {
|
269 |
-
b.top -= j;
|
270 |
-
} else {
|
271 |
-
b.top = c(b.top - h, b.top);
|
272 |
-
}
|
273 |
-
a.ui.pos._trigger(b, d, "posCollided", "fitTop");
|
274 |
-
}
|
275 |
-
},
|
276 |
-
flip: {
|
277 |
-
left: function(b, c) {
|
278 |
-
a.ui.pos._trigger(b, c, "posCollide", "flipLeft");
|
279 |
-
var e = c.within, f = e.offset.left + e.scrollLeft, g = e.width, h = e.isWindow ? e.scrollLeft : e.offset.left, i = b.left - c.collisionPosition.marginLeft, j = i - h, k = i + c.collisionWidth - g - h, l = c.my[0] === "left" ? -c.elemWidth : c.my[0] === "right" ? c.elemWidth : 0, m = c.at[0] === "left" ? c.targetWidth : c.at[0] === "right" ? -c.targetWidth : 0, n = -2 * c.offset[0], o, p;
|
280 |
-
if (j < 0) {
|
281 |
-
o = b.left + l + m + n + c.collisionWidth - g - f;
|
282 |
-
if (o < 0 || o < d(j)) {
|
283 |
-
b.left += l + m + n;
|
284 |
-
}
|
285 |
-
} else if (k > 0) {
|
286 |
-
p = b.left - c.collisionPosition.marginLeft + l + m + n - h;
|
287 |
-
if (p > 0 || d(p) < k) {
|
288 |
-
b.left += l + m + n;
|
289 |
-
}
|
290 |
-
}
|
291 |
-
a.ui.pos._trigger(b, c, "posCollided", "flipLeft");
|
292 |
-
},
|
293 |
-
top: function(b, c) {
|
294 |
-
a.ui.pos._trigger(b, c, "posCollide", "flipTop");
|
295 |
-
var e = c.within, f = e.offset.top + e.scrollTop, g = e.height, h = e.isWindow ? e.scrollTop : e.offset.top, i = b.top - c.collisionPosition.marginTop, j = i - h, k = i + c.collisionHeight - g - h, l = c.my[1] === "top", m = l ? -c.elemHeight : c.my[1] === "bottom" ? c.elemHeight : 0, n = c.at[1] === "top" ? c.targetHeight : c.at[1] === "bottom" ? -c.targetHeight : 0, o = -2 * c.offset[1], p, q;
|
296 |
-
if (j < 0) {
|
297 |
-
q = b.top + m + n + o + c.collisionHeight - g - f;
|
298 |
-
if (q < 0 || q < d(j)) {
|
299 |
-
b.top += m + n + o;
|
300 |
-
}
|
301 |
-
} else if (k > 0) {
|
302 |
-
p = b.top - c.collisionPosition.marginTop + m + n + o - h;
|
303 |
-
if (p > 0 || d(p) < k) {
|
304 |
-
b.top += m + n + o;
|
305 |
-
}
|
306 |
-
}
|
307 |
-
a.ui.pos._trigger(b, c, "posCollided", "flipTop");
|
308 |
-
}
|
309 |
-
},
|
310 |
-
flipfit: {
|
311 |
-
left: function() {
|
312 |
-
a.ui.pos.flip.left.apply(this, arguments);
|
313 |
-
a.ui.pos.fit.left.apply(this, arguments);
|
314 |
-
},
|
315 |
-
top: function() {
|
316 |
-
a.ui.pos.flip.top.apply(this, arguments);
|
317 |
-
a.ui.pos.fit.top.apply(this, arguments);
|
318 |
-
}
|
319 |
-
}
|
320 |
-
};
|
321 |
-
(function() {
|
322 |
-
var b, c, d, e, f, g = document.getElementsByTagName("body")[0], h = document.createElement("div");
|
323 |
-
b = document.createElement(g ? "div" : "body");
|
324 |
-
d = {
|
325 |
-
visibility: "hidden",
|
326 |
-
width: 0,
|
327 |
-
height: 0,
|
328 |
-
border: 0,
|
329 |
-
margin: 0,
|
330 |
-
background: "none"
|
331 |
-
};
|
332 |
-
if (g) {
|
333 |
-
a.extend(d, {
|
334 |
-
position: "absolute",
|
335 |
-
left: "-1000px",
|
336 |
-
top: "-1000px"
|
337 |
-
});
|
338 |
-
}
|
339 |
-
for (f in d) {
|
340 |
-
b.style[f] = d[f];
|
341 |
-
}
|
342 |
-
b.appendChild(h);
|
343 |
-
c = g || document.documentElement;
|
344 |
-
c.insertBefore(b, c.firstChild);
|
345 |
-
h.style.cssText = "position: absolute; left: 10.7432222px;";
|
346 |
-
e = a(h).offset().left;
|
347 |
-
a.support.offsetFractions = e > 10 && e < 11;
|
348 |
-
b.innerHTML = "";
|
349 |
-
c.removeChild(b);
|
350 |
-
})();
|
351 |
-
})();
|
352 |
-
var c = a.ui.position;
|
353 |
-
});
|
354 |
-
|
355 |
-
(function(a) {
|
356 |
-
"use strict";
|
357 |
-
if (typeof define === "function" && define.amd) {
|
358 |
-
define([ "jquery" ], a);
|
359 |
-
} else if (window.jQuery && !window.jQuery.fn.iconpicker) {
|
360 |
-
a(window.jQuery);
|
361 |
-
}
|
362 |
-
})(function(a) {
|
363 |
-
"use strict";
|
364 |
-
var b = {
|
365 |
-
isEmpty: function(a) {
|
366 |
-
return a === false || a === "" || a === null || a === undefined;
|
367 |
-
},
|
368 |
-
isEmptyObject: function(a) {
|
369 |
-
return this.isEmpty(a) === true || a.length === 0;
|
370 |
-
},
|
371 |
-
isElement: function(b) {
|
372 |
-
return a(b).length > 0;
|
373 |
-
},
|
374 |
-
isString: function(a) {
|
375 |
-
return typeof a === "string" || a instanceof String;
|
376 |
-
},
|
377 |
-
isArray: function(b) {
|
378 |
-
return a.isArray(b);
|
379 |
-
},
|
380 |
-
inArray: function(b, c) {
|
381 |
-
return a.inArray(b, c) !== -1;
|
382 |
-
},
|
383 |
-
throwError: function(a) {
|
384 |
-
throw "Font Awesome Icon Picker Exception: " + a;
|
385 |
-
}
|
386 |
-
};
|
387 |
-
var c = function(d, e) {
|
388 |
-
this._id = c._idCounter++;
|
389 |
-
this.element = a(d).addClass("iconpicker-element");
|
390 |
-
this._trigger("iconpickerCreate");
|
391 |
-
this.options = a.extend({}, c.defaultOptions, this.element.data(), e);
|
392 |
-
this.options.templates = a.extend({}, c.defaultOptions.templates, this.options.templates);
|
393 |
-
this.options.originalPlacement = this.options.placement;
|
394 |
-
this.container = b.isElement(this.options.container) ? a(this.options.container) : false;
|
395 |
-
if (this.container === false) {
|
396 |
-
if (this.element.is(".dropdown-toggle")) {
|
397 |
-
this.container = a("~ .dropdown-menu:first", this.element);
|
398 |
-
} else {
|
399 |
-
this.container = this.element.is("input,textarea,button,.btn") ? this.element.parent() : this.element;
|
400 |
-
}
|
401 |
-
}
|
402 |
-
this.container.addClass("iconpicker-container");
|
403 |
-
if (this.isDropdownMenu()) {
|
404 |
-
this.options.templates.search = false;
|
405 |
-
this.options.templates.buttons = false;
|
406 |
-
this.options.placement = "inline";
|
407 |
-
}
|
408 |
-
this.input = this.element.is("input,textarea") ? this.element.addClass("iconpicker-input") : false;
|
409 |
-
if (this.input === false) {
|
410 |
-
this.input = this.container.find(this.options.input);
|
411 |
-
if (!this.input.is("input,textarea")) {
|
412 |
-
this.input = false;
|
413 |
-
}
|
414 |
-
}
|
415 |
-
this.component = this.isDropdownMenu() ? this.container.parent().find(this.options.component) : this.container.find(this.options.component);
|
416 |
-
if (this.component.length === 0) {
|
417 |
-
this.component = false;
|
418 |
-
} else {
|
419 |
-
this.component.find("i").addClass("iconpicker-component");
|
420 |
-
}
|
421 |
-
this._createPopover();
|
422 |
-
this._createIconpicker();
|
423 |
-
if (this.getAcceptButton().length === 0) {
|
424 |
-
this.options.mustAccept = false;
|
425 |
-
}
|
426 |
-
if (this.isInputGroup()) {
|
427 |
-
this.container.parent().append(this.popover);
|
428 |
-
} else {
|
429 |
-
this.container.append(this.popover);
|
430 |
-
}
|
431 |
-
this._bindElementEvents();
|
432 |
-
this._bindWindowEvents();
|
433 |
-
this.update(this.options.selected);
|
434 |
-
if (this.isInline()) {
|
435 |
-
this.show();
|
436 |
-
}
|
437 |
-
this._trigger("iconpickerCreated");
|
438 |
-
};
|
439 |
-
c._idCounter = 0;
|
440 |
-
c.defaultOptions = {
|
441 |
-
title: false,
|
442 |
-
selected: false,
|
443 |
-
defaultValue: false,
|
444 |
-
placement: "bottom",
|
445 |
-
collision: "none",
|
446 |
-
animation: true,
|
447 |
-
hideOnSelect: false,
|
448 |
-
showFooter: false,
|
449 |
-
searchInFooter: false,
|
450 |
-
mustAccept: false,
|
451 |
-
selectedCustomClass: "bg-primary",
|
452 |
-
icons: [],
|
453 |
-
fullClassFormatter: function(a) {
|
454 |
-
return "fa " + a;
|
455 |
-
},
|
456 |
-
input: "input,.iconpicker-input",
|
457 |
-
inputSearch: false,
|
458 |
-
container: false,
|
459 |
-
component: ".input-group-addon,.iconpicker-component",
|
460 |
-
templates: {
|
461 |
-
popover: '<div class="iconpicker-popover popover"><div class="arrow"></div>' + '<div class="popover-title"></div><div class="popover-content"></div></div>',
|
462 |
-
footer: '<div class="popover-footer"></div>',
|
463 |
-
buttons: '<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button>' + ' <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',
|
464 |
-
search: '<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',
|
465 |
-
iconpicker: '<div class="iconpicker"><div class="iconpicker-items"></div></div>',
|
466 |
-
iconpickerItem: '<a role="button" href="#" class="iconpicker-item"><i></i></a>'
|
467 |
-
}
|
468 |
-
};
|
469 |
-
c.batch = function(b, c) {
|
470 |
-
var d = Array.prototype.slice.call(arguments, 2);
|
471 |
-
return a(b).each(function() {
|
472 |
-
var b = a(this).data("iconpicker");
|
473 |
-
if (!!b) {
|
474 |
-
b[c].apply(b, d);
|
475 |
-
}
|
476 |
-
});
|
477 |
-
};
|
478 |
-
c.prototype = {
|
479 |
-
constructor: c,
|
480 |
-
options: {},
|
481 |
-
_id: 0,
|
482 |
-
_trigger: function(b, c) {
|
483 |
-
c = c || {};
|
484 |
-
this.element.trigger(a.extend({
|
485 |
-
type: b,
|
486 |
-
iconpickerInstance: this
|
487 |
-
}, c));
|
488 |
-
},
|
489 |
-
_createPopover: function() {
|
490 |
-
this.popover = a(this.options.templates.popover);
|
491 |
-
var c = this.popover.find(".popover-title");
|
492 |
-
if (!!this.options.title) {
|
493 |
-
c.append(a('<div class="popover-title-text">' + this.options.title + "</div>"));
|
494 |
-
}
|
495 |
-
if (this.hasSeparatedSearchInput() && !this.options.searchInFooter) {
|
496 |
-
c.append(this.options.templates.search);
|
497 |
-
} else if (!this.options.title) {
|
498 |
-
c.remove();
|
499 |
-
}
|
500 |
-
if (this.options.showFooter && !b.isEmpty(this.options.templates.footer)) {
|
501 |
-
var d = a(this.options.templates.footer);
|
502 |
-
if (this.hasSeparatedSearchInput() && this.options.searchInFooter) {
|
503 |
-
d.append(a(this.options.templates.search));
|
504 |
-
}
|
505 |
-
if (!b.isEmpty(this.options.templates.buttons)) {
|
506 |
-
d.append(a(this.options.templates.buttons));
|
507 |
-
}
|
508 |
-
this.popover.append(d);
|
509 |
-
}
|
510 |
-
if (this.options.animation === true) {
|
511 |
-
this.popover.addClass("fade");
|
512 |
-
}
|
513 |
-
return this.popover;
|
514 |
-
},
|
515 |
-
_createIconpicker: function() {
|
516 |
-
var b = this;
|
517 |
-
this.iconpicker = a(this.options.templates.iconpicker);
|
518 |
-
var c = function(c) {
|
519 |
-
var d = a(this);
|
520 |
-
if (d.is("i")) {
|
521 |
-
d = d.parent();
|
522 |
-
}
|
523 |
-
b._trigger("iconpickerSelect", {
|
524 |
-
iconpickerItem: d,
|
525 |
-
iconpickerValue: b.iconpickerValue
|
526 |
-
});
|
527 |
-
if (b.options.mustAccept === false) {
|
528 |
-
b.update(d.data("iconpickerValue"));
|
529 |
-
b._trigger("iconpickerSelected", {
|
530 |
-
iconpickerItem: this,
|
531 |
-
iconpickerValue: b.iconpickerValue
|
532 |
-
});
|
533 |
-
} else {
|
534 |
-
b.update(d.data("iconpickerValue"), true);
|
535 |
-
}
|
536 |
-
if (b.options.hideOnSelect && b.options.mustAccept === false) {
|
537 |
-
b.hide();
|
538 |
-
}
|
539 |
-
c.preventDefault();
|
540 |
-
return false;
|
541 |
-
};
|
542 |
-
for (var d in this.options.icons) {
|
543 |
-
if (typeof this.options.icons[d] === "string") {
|
544 |
-
var e = a(this.options.templates.iconpickerItem);
|
545 |
-
e.find("i").addClass(this.options.fullClassFormatter(this.options.icons[d]));
|
546 |
-
e.data("iconpickerValue", this.options.icons[d]).on("click.iconpicker", c);
|
547 |
-
this.iconpicker.find(".iconpicker-items").append(e.attr("title", "." + this.options.icons[d]));
|
548 |
-
}
|
549 |
-
}
|
550 |
-
this.popover.find(".popover-content").append(this.iconpicker);
|
551 |
-
return this.iconpicker;
|
552 |
-
},
|
553 |
-
_isEventInsideIconpicker: function(b) {
|
554 |
-
var c = a(b.target);
|
555 |
-
if ((!c.hasClass("iconpicker-element") || c.hasClass("iconpicker-element") && !c.is(this.element)) && c.parents(".iconpicker-popover").length === 0) {
|
556 |
-
return false;
|
557 |
-
}
|
558 |
-
return true;
|
559 |
-
},
|
560 |
-
_bindElementEvents: function() {
|
561 |
-
var c = this;
|
562 |
-
this.getSearchInput().on("keyup.iconpicker", function() {
|
563 |
-
c.filter(a(this).val().toLowerCase());
|
564 |
-
});
|
565 |
-
this.getAcceptButton().on("click.iconpicker", function() {
|
566 |
-
var a = c.iconpicker.find(".iconpicker-selected").get(0);
|
567 |
-
c.update(c.iconpickerValue);
|
568 |
-
c._trigger("iconpickerSelected", {
|
569 |
-
iconpickerItem: a,
|
570 |
-
iconpickerValue: c.iconpickerValue
|
571 |
-
});
|
572 |
-
if (!c.isInline()) {
|
573 |
-
c.hide();
|
574 |
-
}
|
575 |
-
});
|
576 |
-
this.getCancelButton().on("click.iconpicker", function() {
|
577 |
-
if (!c.isInline()) {
|
578 |
-
c.hide();
|
579 |
-
}
|
580 |
-
});
|
581 |
-
this.element.on("focus.iconpicker", function(a) {
|
582 |
-
c.show();
|
583 |
-
a.stopPropagation();
|
584 |
-
});
|
585 |
-
if (this.hasComponent()) {
|
586 |
-
this.component.on("click.iconpicker", function() {
|
587 |
-
c.toggle();
|
588 |
-
});
|
589 |
-
}
|
590 |
-
if (this.hasInput()) {
|
591 |
-
this.input.on("keyup.iconpicker", function(d) {
|
592 |
-
if (!b.inArray(d.keyCode, [ 38, 40, 37, 39, 16, 17, 18, 9, 8, 91, 93, 20, 46, 186, 190, 46, 78, 188, 44, 86 ])) {
|
593 |
-
c.update();
|
594 |
-
} else {
|
595 |
-
c._updateFormGroupStatus(c.getValid(this.value) !== false);
|
596 |
-
}
|
597 |
-
if (c.options.inputSearch === true) {
|
598 |
-
c.filter(a(this).val().toLowerCase());
|
599 |
-
}
|
600 |
-
});
|
601 |
-
}
|
602 |
-
},
|
603 |
-
_bindWindowEvents: function() {
|
604 |
-
var b = a(window.document);
|
605 |
-
var c = this;
|
606 |
-
var d = ".iconpicker.inst" + this._id;
|
607 |
-
a(window).on("resize.iconpicker" + d + " orientationchange.iconpicker" + d, function(a) {
|
608 |
-
if (c.popover.hasClass("in")) {
|
609 |
-
c.updatePlacement();
|
610 |
-
}
|
611 |
-
});
|
612 |
-
if (!c.isInline()) {
|
613 |
-
b.on("mouseup" + d, function(a) {
|
614 |
-
if (!c._isEventInsideIconpicker(a) && !c.isInline()) {
|
615 |
-
c.hide();
|
616 |
-
}
|
617 |
-
a.stopPropagation();
|
618 |
-
a.preventDefault();
|
619 |
-
return false;
|
620 |
-
});
|
621 |
-
}
|
622 |
-
return false;
|
623 |
-
},
|
624 |
-
_unbindElementEvents: function() {
|
625 |
-
this.popover.off(".iconpicker");
|
626 |
-
this.element.off(".iconpicker");
|
627 |
-
if (this.hasInput()) {
|
628 |
-
this.input.off(".iconpicker");
|
629 |
-
}
|
630 |
-
if (this.hasComponent()) {
|
631 |
-
this.component.off(".iconpicker");
|
632 |
-
}
|
633 |
-
if (this.hasContainer()) {
|
634 |
-
this.container.off(".iconpicker");
|
635 |
-
}
|
636 |
-
},
|
637 |
-
_unbindWindowEvents: function() {
|
638 |
-
a(window).off(".iconpicker.inst" + this._id);
|
639 |
-
a(window.document).off(".iconpicker.inst" + this._id);
|
640 |
-
},
|
641 |
-
updatePlacement: function(b, c) {
|
642 |
-
b = b || this.options.placement;
|
643 |
-
this.options.placement = b;
|
644 |
-
c = c || this.options.collision;
|
645 |
-
c = c === true ? "flip" : c;
|
646 |
-
var d = {
|
647 |
-
at: "right bottom",
|
648 |
-
my: "right top",
|
649 |
-
of: this.hasInput() && !this.isInputGroup() ? this.input : this.container,
|
650 |
-
collision: c === true ? "flip" : c,
|
651 |
-
within: window
|
652 |
-
};
|
653 |
-
this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner " + "rightTop right rightBottom bottomRight bottomRightCorner " + "bottom bottomLeft bottomLeftCorner leftBottom left leftTop");
|
654 |
-
if (typeof b === "object") {
|
655 |
-
return this.popover.pos(a.extend({}, d, b));
|
656 |
-
}
|
657 |
-
switch (b) {
|
658 |
-
case "inline":
|
659 |
-
{
|
660 |
-
d = false;
|
661 |
-
}
|
662 |
-
break;
|
663 |
-
|
664 |
-
case "topLeftCorner":
|
665 |
-
{
|
666 |
-
d.my = "right bottom";
|
667 |
-
d.at = "left top";
|
668 |
-
}
|
669 |
-
break;
|
670 |
-
|
671 |
-
case "topLeft":
|
672 |
-
{
|
673 |
-
d.my = "left bottom";
|
674 |
-
d.at = "left top";
|
675 |
-
}
|
676 |
-
break;
|
677 |
-
|
678 |
-
case "top":
|
679 |
-
{
|
680 |
-
d.my = "center bottom";
|
681 |
-
d.at = "center top";
|
682 |
-
}
|
683 |
-
break;
|
684 |
-
|
685 |
-
case "topRight":
|
686 |
-
{
|
687 |
-
d.my = "right bottom";
|
688 |
-
d.at = "right top";
|
689 |
-
}
|
690 |
-
break;
|
691 |
-
|
692 |
-
case "topRightCorner":
|
693 |
-
{
|
694 |
-
d.my = "left bottom";
|
695 |
-
d.at = "right top";
|
696 |
-
}
|
697 |
-
break;
|
698 |
-
|
699 |
-
case "rightTop":
|
700 |
-
{
|
701 |
-
d.my = "left bottom";
|
702 |
-
d.at = "right center";
|
703 |
-
}
|
704 |
-
break;
|
705 |
-
|
706 |
-
case "right":
|
707 |
-
{
|
708 |
-
d.my = "left center";
|
709 |
-
d.at = "right center";
|
710 |
-
}
|
711 |
-
break;
|
712 |
-
|
713 |
-
case "rightBottom":
|
714 |
-
{
|
715 |
-
d.my = "left top";
|
716 |
-
d.at = "right center";
|
717 |
-
}
|
718 |
-
break;
|
719 |
-
|
720 |
-
case "bottomRightCorner":
|
721 |
-
{
|
722 |
-
d.my = "left top";
|
723 |
-
d.at = "right bottom";
|
724 |
-
}
|
725 |
-
break;
|
726 |
-
|
727 |
-
case "bottomRight":
|
728 |
-
{
|
729 |
-
d.my = "right top";
|
730 |
-
d.at = "right bottom";
|
731 |
-
}
|
732 |
-
break;
|
733 |
-
|
734 |
-
case "bottom":
|
735 |
-
{
|
736 |
-
d.my = "center top";
|
737 |
-
d.at = "center bottom";
|
738 |
-
}
|
739 |
-
break;
|
740 |
-
|
741 |
-
case "bottomLeft":
|
742 |
-
{
|
743 |
-
d.my = "left top";
|
744 |
-
d.at = "left bottom";
|
745 |
-
}
|
746 |
-
break;
|
747 |
-
|
748 |
-
case "bottomLeftCorner":
|
749 |
-
{
|
750 |
-
d.my = "right top";
|
751 |
-
d.at = "left bottom";
|
752 |
-
}
|
753 |
-
break;
|
754 |
-
|
755 |
-
case "leftBottom":
|
756 |
-
{
|
757 |
-
d.my = "right top";
|
758 |
-
d.at = "left center";
|
759 |
-
}
|
760 |
-
break;
|
761 |
-
|
762 |
-
case "left":
|
763 |
-
{
|
764 |
-
d.my = "right center";
|
765 |
-
d.at = "left center";
|
766 |
-
}
|
767 |
-
break;
|
768 |
-
|
769 |
-
case "leftTop":
|
770 |
-
{
|
771 |
-
d.my = "right bottom";
|
772 |
-
d.at = "left center";
|
773 |
-
}
|
774 |
-
break;
|
775 |
-
|
776 |
-
default:
|
777 |
-
{
|
778 |
-
return false;
|
779 |
-
}
|
780 |
-
break;
|
781 |
-
}
|
782 |
-
this.popover.css({
|
783 |
-
display: this.options.placement === "inline" ? "" : "block"
|
784 |
-
});
|
785 |
-
if (d !== false) {
|
786 |
-
this.popover.pos(d).css("maxWidth", a(window).width() - this.container.offset().left - 5);
|
787 |
-
} else {
|
788 |
-
this.popover.css({
|
789 |
-
top: "auto",
|
790 |
-
right: "auto",
|
791 |
-
bottom: "auto",
|
792 |
-
left: "auto",
|
793 |
-
maxWidth: "none"
|
794 |
-
});
|
795 |
-
}
|
796 |
-
this.popover.addClass(this.options.placement);
|
797 |
-
return true;
|
798 |
-
},
|
799 |
-
_updateComponents: function() {
|
800 |
-
this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected " + this.options.selectedCustomClass);
|
801 |
-
if (this.iconpickerValue) {
|
802 |
-
this.iconpicker.find("." + this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g, ".")).parent().addClass("iconpicker-selected " + this.options.selectedCustomClass);
|
803 |
-
}
|
804 |
-
if (this.hasComponent()) {
|
805 |
-
var a = this.component.find("i");
|
806 |
-
if (a.length > 0) {
|
807 |
-
a.attr("class", this.options.fullClassFormatter(this.iconpickerValue));
|
808 |
-
} else {
|
809 |
-
this.component.html(this.getHtml());
|
810 |
-
}
|
811 |
-
}
|
812 |
-
},
|
813 |
-
_updateFormGroupStatus: function(a) {
|
814 |
-
if (this.hasInput()) {
|
815 |
-
if (a !== false) {
|
816 |
-
this.input.parents(".form-group:first").removeClass("has-error");
|
817 |
-
} else {
|
818 |
-
this.input.parents(".form-group:first").addClass("has-error");
|
819 |
-
}
|
820 |
-
return true;
|
821 |
-
}
|
822 |
-
return false;
|
823 |
-
},
|
824 |
-
getValid: function(c) {
|
825 |
-
if (!b.isString(c)) {
|
826 |
-
c = "";
|
827 |
-
}
|
828 |
-
var d = c === "";
|
829 |
-
c = a.trim(c);
|
830 |
-
if (b.inArray(c, this.options.icons) || d) {
|
831 |
-
return c;
|
832 |
-
}
|
833 |
-
return false;
|
834 |
-
},
|
835 |
-
setValue: function(a) {
|
836 |
-
var b = this.getValid(a);
|
837 |
-
if (b !== false) {
|
838 |
-
this.iconpickerValue = b;
|
839 |
-
this._trigger("iconpickerSetValue", {
|
840 |
-
iconpickerValue: b
|
841 |
-
});
|
842 |
-
return this.iconpickerValue;
|
843 |
-
} else {
|
844 |
-
this._trigger("iconpickerInvalid", {
|
845 |
-
iconpickerValue: a
|
846 |
-
});
|
847 |
-
return false;
|
848 |
-
}
|
849 |
-
},
|
850 |
-
getHtml: function() {
|
851 |
-
return '<i class="' + this.options.fullClassFormatter(this.iconpickerValue) + '"></i>';
|
852 |
-
},
|
853 |
-
setSourceValue: function(a) {
|
854 |
-
a = this.setValue(a);
|
855 |
-
if (a !== false && a !== "") {
|
856 |
-
if (this.hasInput()) {
|
857 |
-
this.input.val(this.iconpickerValue);
|
858 |
-
} else {
|
859 |
-
this.element.data("iconpickerValue", this.iconpickerValue);
|
860 |
-
}
|
861 |
-
this._trigger("iconpickerSetSourceValue", {
|
862 |
-
iconpickerValue: a
|
863 |
-
});
|
864 |
-
}
|
865 |
-
return a;
|
866 |
-
},
|
867 |
-
getSourceValue: function(a) {
|
868 |
-
a = a || this.options.defaultValue;
|
869 |
-
var b = a;
|
870 |
-
if (this.hasInput()) {
|
871 |
-
b = this.input.val();
|
872 |
-
} else {
|
873 |
-
b = this.element.data("iconpickerValue");
|
874 |
-
}
|
875 |
-
if (b === undefined || b === "" || b === null || b === false) {
|
876 |
-
b = a;
|
877 |
-
}
|
878 |
-
return b;
|
879 |
-
},
|
880 |
-
hasInput: function() {
|
881 |
-
return this.input !== false;
|
882 |
-
},
|
883 |
-
isInputSearch: function() {
|
884 |
-
return this.hasInput() && this.options.inputSearch === true;
|
885 |
-
},
|
886 |
-
isInputGroup: function() {
|
887 |
-
return this.container.is(".input-group");
|
888 |
-
},
|
889 |
-
isDropdownMenu: function() {
|
890 |
-
return this.container.is(".dropdown-menu");
|
891 |
-
},
|
892 |
-
hasSeparatedSearchInput: function() {
|
893 |
-
return this.options.templates.search !== false && !this.isInputSearch();
|
894 |
-
},
|
895 |
-
hasComponent: function() {
|
896 |
-
return this.component !== false;
|
897 |
-
},
|
898 |
-
hasContainer: function() {
|
899 |
-
return this.container !== false;
|
900 |
-
},
|
901 |
-
getAcceptButton: function() {
|
902 |
-
return this.popover.find(".iconpicker-btn-accept");
|
903 |
-
},
|
904 |
-
getCancelButton: function() {
|
905 |
-
return this.popover.find(".iconpicker-btn-cancel");
|
906 |
-
},
|
907 |
-
getSearchInput: function() {
|
908 |
-
return this.popover.find(".iconpicker-search");
|
909 |
-
},
|
910 |
-
filter: function(c) {
|
911 |
-
if (b.isEmpty(c)) {
|
912 |
-
this.iconpicker.find(".iconpicker-item").show();
|
913 |
-
return a(false);
|
914 |
-
} else {
|
915 |
-
var d = [];
|
916 |
-
this.iconpicker.find(".iconpicker-item").each(function() {
|
917 |
-
var b = a(this);
|
918 |
-
var e = b.attr("title").toLowerCase();
|
919 |
-
var f = false;
|
920 |
-
try {
|
921 |
-
f = new RegExp(c, "g");
|
922 |
-
} catch (a) {
|
923 |
-
f = false;
|
924 |
-
}
|
925 |
-
if (f !== false && e.match(f)) {
|
926 |
-
d.push(b);
|
927 |
-
b.show();
|
928 |
-
} else {
|
929 |
-
b.hide();
|
930 |
-
}
|
931 |
-
});
|
932 |
-
return d;
|
933 |
-
}
|
934 |
-
},
|
935 |
-
show: function() {
|
936 |
-
if (this.popover.hasClass("in")) {
|
937 |
-
return false;
|
938 |
-
}
|
939 |
-
a.iconpicker.batch(a(".iconpicker-popover.in:not(.inline)").not(this.popover), "hide");
|
940 |
-
this._trigger("iconpickerShow");
|
941 |
-
this.updatePlacement();
|
942 |
-
this.popover.addClass("in");
|
943 |
-
setTimeout(a.proxy(function() {
|
944 |
-
this.popover.css("display", this.isInline() ? "" : "block");
|
945 |
-
this._trigger("iconpickerShown");
|
946 |
-
}, this), this.options.animation ? 300 : 1);
|
947 |
-
},
|
948 |
-
hide: function() {
|
949 |
-
if (!this.popover.hasClass("in")) {
|
950 |
-
return false;
|
951 |
-
}
|
952 |
-
this._trigger("iconpickerHide");
|
953 |
-
this.popover.removeClass("in");
|
954 |
-
setTimeout(a.proxy(function() {
|
955 |
-
this.popover.css("display", "none");
|
956 |
-
this.getSearchInput().val("");
|
957 |
-
this.filter("");
|
958 |
-
this._trigger("iconpickerHidden");
|
959 |
-
}, this), this.options.animation ? 300 : 1);
|
960 |
-
},
|
961 |
-
toggle: function() {
|
962 |
-
if (this.popover.is(":visible")) {
|
963 |
-
this.hide();
|
964 |
-
} else {
|
965 |
-
this.show(true);
|
966 |
-
}
|
967 |
-
},
|
968 |
-
update: function(a, b) {
|
969 |
-
a = a ? a : this.getSourceValue(this.iconpickerValue);
|
970 |
-
this._trigger("iconpickerUpdate");
|
971 |
-
if (b === true) {
|
972 |
-
a = this.setValue(a);
|
973 |
-
} else {
|
974 |
-
a = this.setSourceValue(a);
|
975 |
-
this._updateFormGroupStatus(a !== false);
|
976 |
-
}
|
977 |
-
if (a !== false) {
|
978 |
-
this._updateComponents();
|
979 |
-
}
|
980 |
-
this._trigger("iconpickerUpdated");
|
981 |
-
return a;
|
982 |
-
},
|
983 |
-
destroy: function() {
|
984 |
-
this._trigger("iconpickerDestroy");
|
985 |
-
this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element");
|
986 |
-
this._unbindElementEvents();
|
987 |
-
this._unbindWindowEvents();
|
988 |
-
a(this.popover).remove();
|
989 |
-
this._trigger("iconpickerDestroyed");
|
990 |
-
},
|
991 |
-
disable: function() {
|
992 |
-
if (this.hasInput()) {
|
993 |
-
this.input.prop("disabled", true);
|
994 |
-
return true;
|
995 |
-
}
|
996 |
-
return false;
|
997 |
-
},
|
998 |
-
enable: function() {
|
999 |
-
if (this.hasInput()) {
|
1000 |
-
this.input.prop("disabled", false);
|
1001 |
-
return true;
|
1002 |
-
}
|
1003 |
-
return false;
|
1004 |
-
},
|
1005 |
-
isDisabled: function() {
|
1006 |
-
if (this.hasInput()) {
|
1007 |
-
return this.input.prop("disabled") === true;
|
1008 |
-
}
|
1009 |
-
return false;
|
1010 |
-
},
|
1011 |
-
isInline: function() {
|
1012 |
-
return this.options.placement === "inline" || this.popover.hasClass("inline");
|
1013 |
-
}
|
1014 |
-
};
|
1015 |
-
a.iconpicker = c;
|
1016 |
-
a.fn.iconpicker = function(b) {
|
1017 |
-
return this.each(function() {
|
1018 |
-
var d = a(this);
|
1019 |
-
if (!d.data("iconpicker")) {
|
1020 |
-
d.data("iconpicker", new c(this, typeof b === "object" ? b : {}));
|
1021 |
-
}
|
1022 |
-
});
|
1023 |
-
};
|
1024 |
-
c.defaultOptions.icons = [ "fa-500px", "fa-adjust", "fa-adn", "fa-align-center", "fa-align-justify", "fa-align-left", "fa-align-right", "fa-amazon", "fa-ambulance", "fa-american-sign-language-interpreting", "fa-anchor", "fa-android", "fa-angellist", "fa-angle-double-down", "fa-angle-double-left", "fa-angle-double-right", "fa-angle-double-up", "fa-angle-down", "fa-angle-left", "fa-angle-right", "fa-angle-up", "fa-apple", "fa-archive", "fa-area-chart", "fa-arrow-circle-down", "fa-arrow-circle-left", "fa-arrow-circle-o-down", "fa-arrow-circle-o-left", "fa-arrow-circle-o-right", "fa-arrow-circle-o-up", "fa-arrow-circle-right", "fa-arrow-circle-up", "fa-arrow-down", "fa-arrow-left", "fa-arrow-right", "fa-arrow-up", "fa-arrows", "fa-arrows-alt", "fa-arrows-h", "fa-arrows-v", "fa-asl-interpreting", "fa-assistive-listening-systems", "fa-asterisk", "fa-at", "fa-audio-description", "fa-automobile", "fa-backward", "fa-balance-scale", "fa-ban", "fa-bandcamp", "fa-bank", "fa-bar-chart", "fa-bar-chart-o", "fa-barcode", "fa-bars", "fa-bath", "fa-bathtub", "fa-battery", "fa-battery-0", "fa-battery-1", "fa-battery-2", "fa-battery-3", "fa-battery-4", "fa-battery-empty", "fa-battery-full", "fa-battery-half", "fa-battery-quarter", "fa-battery-three-quarters", "fa-bed", "fa-beer", "fa-behance", "fa-behance-square", "fa-bell", "fa-bell-o", "fa-bell-slash", "fa-bell-slash-o", "fa-bicycle", "fa-binoculars", "fa-birthday-cake", "fa-bitbucket", "fa-bitbucket-square", "fa-bitcoin", "fa-black-tie", "fa-blind", "fa-bluetooth", "fa-bluetooth-b", "fa-bold", "fa-bolt", "fa-bomb", "fa-book", "fa-bookmark", "fa-bookmark-o", "fa-braille", "fa-briefcase", "fa-btc", "fa-bug", "fa-building", "fa-building-o", "fa-bullhorn", "fa-bullseye", "fa-bus", "fa-buysellads", "fa-cab", "fa-calculator", "fa-calendar", "fa-calendar-check-o", "fa-calendar-minus-o", "fa-calendar-o", "fa-calendar-plus-o", "fa-calendar-times-o", "fa-camera", "fa-camera-retro", "fa-car", "fa-caret-down", "fa-caret-left", "fa-caret-right", "fa-caret-square-o-down", "fa-caret-square-o-left", "fa-caret-square-o-right", "fa-caret-square-o-up", "fa-caret-up", "fa-cart-arrow-down", "fa-cart-plus", "fa-cc", "fa-cc-amex", "fa-cc-diners-club", "fa-cc-discover", "fa-cc-jcb", "fa-cc-mastercard", "fa-cc-paypal", "fa-cc-stripe", "fa-cc-visa", "fa-certificate", "fa-chain", "fa-chain-broken", "fa-check", "fa-check-circle", "fa-check-circle-o", "fa-check-square", "fa-check-square-o", "fa-chevron-circle-down", "fa-chevron-circle-left", "fa-chevron-circle-right", "fa-chevron-circle-up", "fa-chevron-down", "fa-chevron-left", "fa-chevron-right", "fa-chevron-up", "fa-child", "fa-chrome", "fa-circle", "fa-circle-o", "fa-circle-o-notch", "fa-circle-thin", "fa-clipboard", "fa-clock-o", "fa-clone", "fa-close", "fa-cloud", "fa-cloud-download", "fa-cloud-upload", "fa-cny", "fa-code", "fa-code-fork", "fa-codepen", "fa-codiepie", "fa-coffee", "fa-cog", "fa-cogs", "fa-columns", "fa-comment", "fa-comment-o", "fa-commenting", "fa-commenting-o", "fa-comments", "fa-comments-o", "fa-compass", "fa-compress", "fa-connectdevelop", "fa-contao", "fa-copy", "fa-copyright", "fa-creative-commons", "fa-credit-card", "fa-credit-card-alt", "fa-crop", "fa-crosshairs", "fa-css3", "fa-cube", "fa-cubes", "fa-cut", "fa-cutlery", "fa-dashboard", "fa-dashcube", "fa-database", "fa-deaf", "fa-deafness", "fa-dedent", "fa-delicious", "fa-desktop", "fa-deviantart", "fa-diamond", "fa-digg", "fa-dollar", "fa-dot-circle-o", "fa-download", "fa-dribbble", "fa-drivers-license", "fa-drivers-license-o", "fa-dropbox", "fa-drupal", "fa-edge", "fa-edit", "fa-eercast", "fa-eject", "fa-ellipsis-h", "fa-ellipsis-v", "fa-empire", "fa-envelope", "fa-envelope-o", "fa-envelope-open", "fa-envelope-open-o", "fa-envelope-square", "fa-envira", "fa-eraser", "fa-etsy", "fa-eur", "fa-euro", "fa-exchange", "fa-exclamation", "fa-exclamation-circle", "fa-exclamation-triangle", "fa-expand", "fa-expeditedssl", "fa-external-link", "fa-external-link-square", "fa-eye", "fa-eye-slash", "fa-eyedropper", "fa-fa", "fa-facebook", "fa-facebook-f", "fa-facebook-official", "fa-facebook-square", "fa-fast-backward", "fa-fast-forward", "fa-fax", "fa-feed", "fa-female", "fa-fighter-jet", "fa-file", "fa-file-archive-o", "fa-file-audio-o", "fa-file-code-o", "fa-file-excel-o", "fa-file-image-o", "fa-file-movie-o", "fa-file-o", "fa-file-pdf-o", "fa-file-photo-o", "fa-file-picture-o", "fa-file-powerpoint-o", "fa-file-sound-o", "fa-file-text", "fa-file-text-o", "fa-file-video-o", "fa-file-word-o", "fa-file-zip-o", "fa-files-o", "fa-film", "fa-filter", "fa-fire", "fa-fire-extinguisher", "fa-firefox", "fa-first-order", "fa-flag", "fa-flag-checkered", "fa-flag-o", "fa-flash", "fa-flask", "fa-flickr", "fa-floppy-o", "fa-folder", "fa-folder-o", "fa-folder-open", "fa-folder-open-o", "fa-font", "fa-font-awesome", "fa-fonticons", "fa-fort-awesome", "fa-forumbee", "fa-forward", "fa-foursquare", "fa-free-code-camp", "fa-frown-o", "fa-futbol-o", "fa-gamepad", "fa-gavel", "fa-gbp", "fa-ge", "fa-gear", "fa-gears", "fa-genderless", "fa-get-pocket", "fa-gg", "fa-gg-circle", "fa-gift", "fa-git", "fa-git-square", "fa-github", "fa-github-alt", "fa-github-square", "fa-gitlab", "fa-gittip", "fa-glass", "fa-glide", "fa-glide-g", "fa-globe", "fa-google", "fa-google-plus", "fa-google-plus-circle", "fa-google-plus-official", "fa-google-plus-square", "fa-google-wallet", "fa-graduation-cap", "fa-gratipay", "fa-grav", "fa-group", "fa-h-square", "fa-hacker-news", "fa-hand-grab-o", "fa-hand-lizard-o", "fa-hand-o-down", "fa-hand-o-left", "fa-hand-o-right", "fa-hand-o-up", "fa-hand-paper-o", "fa-hand-peace-o", "fa-hand-pointer-o", "fa-hand-rock-o", "fa-hand-scissors-o", "fa-hand-spock-o", "fa-hand-stop-o", "fa-hard-of-hearing", "fa-hashtag", "fa-hdd-o", "fa-header", "fa-headphones", "fa-heart", "fa-heart-o", "fa-heartbeat", "fa-history", "fa-home", "fa-hospital-o", "fa-hotel", "fa-hourglass", "fa-hourglass-1", "fa-hourglass-2", "fa-hourglass-3", "fa-hourglass-end", "fa-hourglass-half", "fa-hourglass-o", "fa-hourglass-start", "fa-houzz", "fa-html5", "fa-i-cursor", "fa-id-badge", "fa-id-card", "fa-id-card-o", "fa-ils", "fa-image", "fa-imdb", "fa-inbox", "fa-indent", "fa-industry", "fa-info", "fa-info-circle", "fa-inr", "fa-instagram", "fa-institution", "fa-internet-explorer", "fa-intersex", "fa-ioxhost", "fa-italic", "fa-joomla", "fa-jpy", "fa-jsfiddle", "fa-key", "fa-keyboard-o", "fa-krw", "fa-language", "fa-laptop", "fa-lastfm", "fa-lastfm-square", "fa-leaf", "fa-leanpub", "fa-legal", "fa-lemon-o", "fa-level-down", "fa-level-up", "fa-life-bouy", "fa-life-buoy", "fa-life-ring", "fa-life-saver", "fa-lightbulb-o", "fa-line-chart", "fa-link", "fa-linkedin", "fa-linkedin-square", "fa-linux", "fa-list", "fa-list-alt", "fa-list-ol", "fa-list-ul", "fa-location-arrow", "fa-lock", "fa-long-arrow-down", "fa-long-arrow-left", "fa-long-arrow-right", "fa-long-arrow-up", "fa-low-vision", "fa-magic", "fa-magnet", "fa-mail-forward", "fa-mail-reply", "fa-mail-reply-all", "fa-male", "fa-map", "fa-map-marker", "fa-map-o", "fa-map-pin", "fa-map-signs", "fa-mars", "fa-mars-double", "fa-mars-stroke", "fa-mars-stroke-h", "fa-mars-stroke-v", "fa-maxcdn", "fa-meanpath", "fa-medium", "fa-medkit", "fa-meetup", "fa-meh-o", "fa-mercury", "fa-microchip", "fa-microphone", "fa-microphone-slash", "fa-minus", "fa-minus-circle", "fa-minus-square", "fa-minus-square-o", "fa-mixcloud", "fa-mobile", "fa-mobile-phone", "fa-modx", "fa-money", "fa-moon-o", "fa-mortar-board", "fa-motorcycle", "fa-mouse-pointer", "fa-music", "fa-navicon", "fa-neuter", "fa-newspaper-o", "fa-object-group", "fa-object-ungroup", "fa-odnoklassniki", "fa-odnoklassniki-square", "fa-opencart", "fa-openid", "fa-opera", "fa-optin-monster", "fa-outdent", "fa-pagelines", "fa-paint-brush", "fa-paper-plane", "fa-paper-plane-o", "fa-paperclip", "fa-paragraph", "fa-paste", "fa-pause", "fa-pause-circle", "fa-pause-circle-o", "fa-paw", "fa-paypal", "fa-pencil", "fa-pencil-square", "fa-pencil-square-o", "fa-percent", "fa-phone", "fa-phone-square", "fa-photo", "fa-picture-o", "fa-pie-chart", "fa-pied-piper", "fa-pied-piper-alt", "fa-pied-piper-pp", "fa-pinterest", "fa-pinterest-p", "fa-pinterest-square", "fa-plane", "fa-play", "fa-play-circle", "fa-play-circle-o", "fa-plug", "fa-plus", "fa-plus-circle", "fa-plus-square", "fa-plus-square-o", "fa-podcast", "fa-power-off", "fa-print", "fa-product-hunt", "fa-puzzle-piece", "fa-qq", "fa-qrcode", "fa-question", "fa-question-circle", "fa-question-circle-o", "fa-quora", "fa-quote-left", "fa-quote-right", "fa-ra", "fa-random", "fa-ravelry", "fa-rebel", "fa-recycle", "fa-reddit", "fa-reddit-alien", "fa-reddit-square", "fa-refresh", "fa-registered", "fa-remove", "fa-renren", "fa-reorder", "fa-repeat", "fa-reply", "fa-reply-all", "fa-resistance", "fa-retweet", "fa-rmb", "fa-road", "fa-rocket", "fa-rotate-left", "fa-rotate-right", "fa-rouble", "fa-rss", "fa-rss-square", "fa-rub", "fa-ruble", "fa-rupee", "fa-s15", "fa-safari", "fa-save", "fa-scissors", "fa-scribd", "fa-search", "fa-search-minus", "fa-search-plus", "fa-sellsy", "fa-send", "fa-send-o", "fa-server", "fa-share", "fa-share-alt", "fa-share-alt-square", "fa-share-square", "fa-share-square-o", "fa-shekel", "fa-sheqel", "fa-shield", "fa-ship", "fa-shirtsinbulk", "fa-shopping-bag", "fa-shopping-basket", "fa-shopping-cart", "fa-shower", "fa-sign-in", "fa-sign-language", "fa-sign-out", "fa-signal", "fa-signing", "fa-simplybuilt", "fa-sitemap", "fa-skyatlas", "fa-skype", "fa-slack", "fa-sliders", "fa-slideshare", "fa-smile-o", "fa-snapchat", "fa-snapchat-ghost", "fa-snapchat-square", "fa-snowflake-o", "fa-soccer-ball-o", "fa-sort", "fa-sort-alpha-asc", "fa-sort-alpha-desc", "fa-sort-amount-asc", "fa-sort-amount-desc", "fa-sort-asc", "fa-sort-desc", "fa-sort-down", "fa-sort-numeric-asc", "fa-sort-numeric-desc", "fa-sort-up", "fa-soundcloud", "fa-space-shuttle", "fa-spinner", "fa-spoon", "fa-spotify", "fa-square", "fa-square-o", "fa-stack-exchange", "fa-stack-overflow", "fa-star", "fa-star-half", "fa-star-half-empty", "fa-star-half-full", "fa-star-half-o", "fa-star-o", "fa-steam", "fa-steam-square", "fa-step-backward", "fa-step-forward", "fa-stethoscope", "fa-sticky-note", "fa-sticky-note-o", "fa-stop", "fa-stop-circle", "fa-stop-circle-o", "fa-street-view", "fa-strikethrough", "fa-stumbleupon", "fa-stumbleupon-circle", "fa-subscript", "fa-subway", "fa-suitcase", "fa-sun-o", "fa-superpowers", "fa-superscript", "fa-support", "fa-table", "fa-tablet", "fa-tachometer", "fa-tag", "fa-tags", "fa-tasks", "fa-taxi", "fa-telegram", "fa-television", "fa-tencent-weibo", "fa-terminal", "fa-text-height", "fa-text-width", "fa-th", "fa-th-large", "fa-th-list", "fa-themeisle", "fa-thermometer", "fa-thermometer-0", "fa-thermometer-1", "fa-thermometer-2", "fa-thermometer-3", "fa-thermometer-4", "fa-thermometer-empty", "fa-thermometer-full", "fa-thermometer-half", "fa-thermometer-quarter", "fa-thermometer-three-quarters", "fa-thumb-tack", "fa-thumbs-down", "fa-thumbs-o-down", "fa-thumbs-o-up", "fa-thumbs-up", "fa-ticket", "fa-times", "fa-times-circle", "fa-times-circle-o", "fa-times-rectangle", "fa-times-rectangle-o", "fa-tint", "fa-toggle-down", "fa-toggle-left", "fa-toggle-off", "fa-toggle-on", "fa-toggle-right", "fa-toggle-up", "fa-trademark", "fa-train", "fa-transgender", "fa-transgender-alt", "fa-trash", "fa-trash-o", "fa-tree", "fa-trello", "fa-tripadvisor", "fa-trophy", "fa-truck", "fa-try", "fa-tty", "fa-tumblr", "fa-tumblr-square", "fa-turkish-lira", "fa-tv", "fa-twitch", "fa-twitter", "fa-twitter-square", "fa-umbrella", "fa-underline", "fa-undo", "fa-universal-access", "fa-university", "fa-unlink", "fa-unlock", "fa-unlock-alt", "fa-unsorted", "fa-upload", "fa-usb", "fa-usd", "fa-user", "fa-user-circle", "fa-user-circle-o", "fa-user-md", "fa-user-o", "fa-user-plus", "fa-user-secret", "fa-user-times", "fa-users", "fa-vcard", "fa-vcard-o", "fa-venus", "fa-venus-double", "fa-venus-mars", "fa-viacoin", "fa-viadeo", "fa-viadeo-square", "fa-video-camera", "fa-vimeo", "fa-vimeo-square", "fa-vine", "fa-vk", "fa-volume-control-phone", "fa-volume-down", "fa-volume-off", "fa-volume-up", "fa-warning", "fa-wechat", "fa-weibo", "fa-weixin", "fa-whatsapp", "fa-wheelchair", "fa-wheelchair-alt", "fa-wifi", "fa-wikipedia-w", "fa-window-close", "fa-window-close-o", "fa-window-maximize", "fa-window-minimize", "fa-window-restore", "fa-windows", "fa-won", "fa-wordpress", "fa-wpbeginner", "fa-wpexplorer", "fa-wpforms", "fa-wrench", "fa-xing", "fa-xing-square", "fa-y-combinator", "fa-y-combinator-square", "fa-yahoo", "fa-yc", "fa-yc-square", "fa-yelp", "fa-yen", "fa-yoast", "fa-youtube", "fa-youtube-play", "fa-youtube-square" ];
|
1025 |
});
|
1 |
+
(function(a) {
|
2 |
+
if (typeof define === "function" && define.amd) {
|
3 |
+
define([ "jquery" ], a);
|
4 |
+
} else {
|
5 |
+
a(jQuery);
|
6 |
+
}
|
7 |
+
})(function(a) {
|
8 |
+
a.ui = a.ui || {};
|
9 |
+
var b = a.ui.version = "1.12.1";
|
10 |
+
(function() {
|
11 |
+
var b, c = Math.max, d = Math.abs, e = /left|center|right/, f = /top|center|bottom/, g = /[\+\-]\d+(\.[\d]+)?%?/, h = /^\w+/, i = /%$/, j = a.fn.pos;
|
12 |
+
function k(a, b, c) {
|
13 |
+
return [ parseFloat(a[0]) * (i.test(a[0]) ? b / 100 : 1), parseFloat(a[1]) * (i.test(a[1]) ? c / 100 : 1) ];
|
14 |
+
}
|
15 |
+
function l(b, c) {
|
16 |
+
return parseInt(a.css(b, c), 10) || 0;
|
17 |
+
}
|
18 |
+
function m(b) {
|
19 |
+
var c = b[0];
|
20 |
+
if (c.nodeType === 9) {
|
21 |
+
return {
|
22 |
+
width: b.width(),
|
23 |
+
height: b.height(),
|
24 |
+
offset: {
|
25 |
+
top: 0,
|
26 |
+
left: 0
|
27 |
+
}
|
28 |
+
};
|
29 |
+
}
|
30 |
+
if (a.isWindow(c)) {
|
31 |
+
return {
|
32 |
+
width: b.width(),
|
33 |
+
height: b.height(),
|
34 |
+
offset: {
|
35 |
+
top: b.scrollTop(),
|
36 |
+
left: b.scrollLeft()
|
37 |
+
}
|
38 |
+
};
|
39 |
+
}
|
40 |
+
if (c.preventDefault) {
|
41 |
+
return {
|
42 |
+
width: 0,
|
43 |
+
height: 0,
|
44 |
+
offset: {
|
45 |
+
top: c.pageY,
|
46 |
+
left: c.pageX
|
47 |
+
}
|
48 |
+
};
|
49 |
+
}
|
50 |
+
return {
|
51 |
+
width: b.outerWidth(),
|
52 |
+
height: b.outerHeight(),
|
53 |
+
offset: b.offset()
|
54 |
+
};
|
55 |
+
}
|
56 |
+
a.pos = {
|
57 |
+
scrollbarWidth: function() {
|
58 |
+
if (b !== undefined) {
|
59 |
+
return b;
|
60 |
+
}
|
61 |
+
var c, d, e = a("<div " + "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + "<div style='height:100px;width:auto;'></div></div>"), f = e.children()[0];
|
62 |
+
a("body").append(e);
|
63 |
+
c = f.offsetWidth;
|
64 |
+
e.css("overflow", "scroll");
|
65 |
+
d = f.offsetWidth;
|
66 |
+
if (c === d) {
|
67 |
+
d = e[0].clientWidth;
|
68 |
+
}
|
69 |
+
e.remove();
|
70 |
+
return b = c - d;
|
71 |
+
},
|
72 |
+
getScrollInfo: function(b) {
|
73 |
+
var c = b.isWindow || b.isDocument ? "" : b.element.css("overflow-x"), d = b.isWindow || b.isDocument ? "" : b.element.css("overflow-y"), e = c === "scroll" || c === "auto" && b.width < b.element[0].scrollWidth, f = d === "scroll" || d === "auto" && b.height < b.element[0].scrollHeight;
|
74 |
+
return {
|
75 |
+
width: f ? a.pos.scrollbarWidth() : 0,
|
76 |
+
height: e ? a.pos.scrollbarWidth() : 0
|
77 |
+
};
|
78 |
+
},
|
79 |
+
getWithinInfo: function(b) {
|
80 |
+
var c = a(b || window), d = a.isWindow(c[0]), e = !!c[0] && c[0].nodeType === 9, f = !d && !e;
|
81 |
+
return {
|
82 |
+
element: c,
|
83 |
+
isWindow: d,
|
84 |
+
isDocument: e,
|
85 |
+
offset: f ? a(b).offset() : {
|
86 |
+
left: 0,
|
87 |
+
top: 0
|
88 |
+
},
|
89 |
+
scrollLeft: c.scrollLeft(),
|
90 |
+
scrollTop: c.scrollTop(),
|
91 |
+
width: c.outerWidth(),
|
92 |
+
height: c.outerHeight()
|
93 |
+
};
|
94 |
+
}
|
95 |
+
};
|
96 |
+
a.fn.pos = function(b) {
|
97 |
+
if (!b || !b.of) {
|
98 |
+
return j.apply(this, arguments);
|
99 |
+
}
|
100 |
+
b = a.extend({}, b);
|
101 |
+
var i, n, o, p, q, r, s = a(b.of), t = a.pos.getWithinInfo(b.within), u = a.pos.getScrollInfo(t), v = (b.collision || "flip").split(" "), w = {};
|
102 |
+
r = m(s);
|
103 |
+
if (s[0].preventDefault) {
|
104 |
+
b.at = "left top";
|
105 |
+
}
|
106 |
+
n = r.width;
|
107 |
+
o = r.height;
|
108 |
+
p = r.offset;
|
109 |
+
q = a.extend({}, p);
|
110 |
+
a.each([ "my", "at" ], function() {
|
111 |
+
var a = (b[this] || "").split(" "), c, d;
|
112 |
+
if (a.length === 1) {
|
113 |
+
a = e.test(a[0]) ? a.concat([ "center" ]) : f.test(a[0]) ? [ "center" ].concat(a) : [ "center", "center" ];
|
114 |
+
}
|
115 |
+
a[0] = e.test(a[0]) ? a[0] : "center";
|
116 |
+
a[1] = f.test(a[1]) ? a[1] : "center";
|
117 |
+
c = g.exec(a[0]);
|
118 |
+
d = g.exec(a[1]);
|
119 |
+
w[this] = [ c ? c[0] : 0, d ? d[0] : 0 ];
|
120 |
+
b[this] = [ h.exec(a[0])[0], h.exec(a[1])[0] ];
|
121 |
+
});
|
122 |
+
if (v.length === 1) {
|
123 |
+
v[1] = v[0];
|
124 |
+
}
|
125 |
+
if (b.at[0] === "right") {
|
126 |
+
q.left += n;
|
127 |
+
} else if (b.at[0] === "center") {
|
128 |
+
q.left += n / 2;
|
129 |
+
}
|
130 |
+
if (b.at[1] === "bottom") {
|
131 |
+
q.top += o;
|
132 |
+
} else if (b.at[1] === "center") {
|
133 |
+
q.top += o / 2;
|
134 |
+
}
|
135 |
+
i = k(w.at, n, o);
|
136 |
+
q.left += i[0];
|
137 |
+
q.top += i[1];
|
138 |
+
return this.each(function() {
|
139 |
+
var e, f, g = a(this), h = g.outerWidth(), j = g.outerHeight(), m = l(this, "marginLeft"), r = l(this, "marginTop"), x = h + m + l(this, "marginRight") + u.width, y = j + r + l(this, "marginBottom") + u.height, z = a.extend({}, q), A = k(w.my, g.outerWidth(), g.outerHeight());
|
140 |
+
if (b.my[0] === "right") {
|
141 |
+
z.left -= h;
|
142 |
+
} else if (b.my[0] === "center") {
|
143 |
+
z.left -= h / 2;
|
144 |
+
}
|
145 |
+
if (b.my[1] === "bottom") {
|
146 |
+
z.top -= j;
|
147 |
+
} else if (b.my[1] === "center") {
|
148 |
+
z.top -= j / 2;
|
149 |
+
}
|
150 |
+
z.left += A[0];
|
151 |
+
z.top += A[1];
|
152 |
+
e = {
|
153 |
+
marginLeft: m,
|
154 |
+
marginTop: r
|
155 |
+
};
|
156 |
+
a.each([ "left", "top" ], function(c, d) {
|
157 |
+
if (a.ui.pos[v[c]]) {
|
158 |
+
a.ui.pos[v[c]][d](z, {
|
159 |
+
targetWidth: n,
|
160 |
+
targetHeight: o,
|
161 |
+
elemWidth: h,
|
162 |
+
elemHeight: j,
|
163 |
+
collisionPosition: e,
|
164 |
+
collisionWidth: x,
|
165 |
+
collisionHeight: y,
|
166 |
+
offset: [ i[0] + A[0], i[1] + A[1] ],
|
167 |
+
my: b.my,
|
168 |
+
at: b.at,
|
169 |
+
within: t,
|
170 |
+
elem: g
|
171 |
+
});
|
172 |
+
}
|
173 |
+
});
|
174 |
+
if (b.using) {
|
175 |
+
f = function(a) {
|
176 |
+
var e = p.left - z.left, f = e + n - h, i = p.top - z.top, k = i + o - j, l = {
|
177 |
+
target: {
|
178 |
+
element: s,
|
179 |
+
left: p.left,
|
180 |
+
top: p.top,
|
181 |
+
width: n,
|
182 |
+
height: o
|
183 |
+
},
|
184 |
+
element: {
|
185 |
+
element: g,
|
186 |
+
left: z.left,
|
187 |
+
top: z.top,
|
188 |
+
width: h,
|
189 |
+
height: j
|
190 |
+
},
|
191 |
+
horizontal: f < 0 ? "left" : e > 0 ? "right" : "center",
|
192 |
+
vertical: k < 0 ? "top" : i > 0 ? "bottom" : "middle"
|
193 |
+
};
|
194 |
+
if (n < h && d(e + f) < n) {
|
195 |
+
l.horizontal = "center";
|
196 |
+
}
|
197 |
+
if (o < j && d(i + k) < o) {
|
198 |
+
l.vertical = "middle";
|
199 |
+
}
|
200 |
+
if (c(d(e), d(f)) > c(d(i), d(k))) {
|
201 |
+
l.important = "horizontal";
|
202 |
+
} else {
|
203 |
+
l.important = "vertical";
|
204 |
+
}
|
205 |
+
b.using.call(this, a, l);
|
206 |
+
};
|
207 |
+
}
|
208 |
+
g.offset(a.extend(z, {
|
209 |
+
using: f
|
210 |
+
}));
|
211 |
+
});
|
212 |
+
};
|
213 |
+
a.ui.pos = {
|
214 |
+
_trigger: function(a, b, c, d) {
|
215 |
+
if (b.elem) {
|
216 |
+
b.elem.trigger({
|
217 |
+
type: c,
|
218 |
+
position: a,
|
219 |
+
positionData: b,
|
220 |
+
triggered: d
|
221 |
+
});
|
222 |
+
}
|
223 |
+
},
|
224 |
+
fit: {
|
225 |
+
left: function(b, d) {
|
226 |
+
a.ui.pos._trigger(b, d, "posCollide", "fitLeft");
|
227 |
+
var e = d.within, f = e.isWindow ? e.scrollLeft : e.offset.left, g = e.width, h = b.left - d.collisionPosition.marginLeft, i = f - h, j = h + d.collisionWidth - g - f, k;
|
228 |
+
if (d.collisionWidth > g) {
|
229 |
+
if (i > 0 && j <= 0) {
|
230 |
+
k = b.left + i + d.collisionWidth - g - f;
|
231 |
+
b.left += i - k;
|
232 |
+
} else if (j > 0 && i <= 0) {
|
233 |
+
b.left = f;
|
234 |
+
} else {
|
235 |
+
if (i > j) {
|
236 |
+
b.left = f + g - d.collisionWidth;
|
237 |
+
} else {
|
238 |
+
b.left = f;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
} else if (i > 0) {
|
242 |
+
b.left += i;
|
243 |
+
} else if (j > 0) {
|
244 |
+
b.left -= j;
|
245 |
+
} else {
|
246 |
+
b.left = c(b.left - h, b.left);
|
247 |
+
}
|
248 |
+
a.ui.pos._trigger(b, d, "posCollided", "fitLeft");
|
249 |
+
},
|
250 |
+
top: function(b, d) {
|
251 |
+
a.ui.pos._trigger(b, d, "posCollide", "fitTop");
|
252 |
+
var e = d.within, f = e.isWindow ? e.scrollTop : e.offset.top, g = d.within.height, h = b.top - d.collisionPosition.marginTop, i = f - h, j = h + d.collisionHeight - g - f, k;
|
253 |
+
if (d.collisionHeight > g) {
|
254 |
+
if (i > 0 && j <= 0) {
|
255 |
+
k = b.top + i + d.collisionHeight - g - f;
|
256 |
+
b.top += i - k;
|
257 |
+
} else if (j > 0 && i <= 0) {
|
258 |
+
b.top = f;
|
259 |
+
} else {
|
260 |
+
if (i > j) {
|
261 |
+
b.top = f + g - d.collisionHeight;
|
262 |
+
} else {
|
263 |
+
b.top = f;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
} else if (i > 0) {
|
267 |
+
b.top += i;
|
268 |
+
} else if (j > 0) {
|
269 |
+
b.top -= j;
|
270 |
+
} else {
|
271 |
+
b.top = c(b.top - h, b.top);
|
272 |
+
}
|
273 |
+
a.ui.pos._trigger(b, d, "posCollided", "fitTop");
|
274 |
+
}
|
275 |
+
},
|
276 |
+
flip: {
|
277 |
+
left: function(b, c) {
|
278 |
+
a.ui.pos._trigger(b, c, "posCollide", "flipLeft");
|
279 |
+
var e = c.within, f = e.offset.left + e.scrollLeft, g = e.width, h = e.isWindow ? e.scrollLeft : e.offset.left, i = b.left - c.collisionPosition.marginLeft, j = i - h, k = i + c.collisionWidth - g - h, l = c.my[0] === "left" ? -c.elemWidth : c.my[0] === "right" ? c.elemWidth : 0, m = c.at[0] === "left" ? c.targetWidth : c.at[0] === "right" ? -c.targetWidth : 0, n = -2 * c.offset[0], o, p;
|
280 |
+
if (j < 0) {
|
281 |
+
o = b.left + l + m + n + c.collisionWidth - g - f;
|
282 |
+
if (o < 0 || o < d(j)) {
|
283 |
+
b.left += l + m + n;
|
284 |
+
}
|
285 |
+
} else if (k > 0) {
|
286 |
+
p = b.left - c.collisionPosition.marginLeft + l + m + n - h;
|
287 |
+
if (p > 0 || d(p) < k) {
|
288 |
+
b.left += l + m + n;
|
289 |
+
}
|
290 |
+
}
|
291 |
+
a.ui.pos._trigger(b, c, "posCollided", "flipLeft");
|
292 |
+
},
|
293 |
+
top: function(b, c) {
|
294 |
+
a.ui.pos._trigger(b, c, "posCollide", "flipTop");
|
295 |
+
var e = c.within, f = e.offset.top + e.scrollTop, g = e.height, h = e.isWindow ? e.scrollTop : e.offset.top, i = b.top - c.collisionPosition.marginTop, j = i - h, k = i + c.collisionHeight - g - h, l = c.my[1] === "top", m = l ? -c.elemHeight : c.my[1] === "bottom" ? c.elemHeight : 0, n = c.at[1] === "top" ? c.targetHeight : c.at[1] === "bottom" ? -c.targetHeight : 0, o = -2 * c.offset[1], p, q;
|
296 |
+
if (j < 0) {
|
297 |
+
q = b.top + m + n + o + c.collisionHeight - g - f;
|
298 |
+
if (q < 0 || q < d(j)) {
|
299 |
+
b.top += m + n + o;
|
300 |
+
}
|
301 |
+
} else if (k > 0) {
|
302 |
+
p = b.top - c.collisionPosition.marginTop + m + n + o - h;
|
303 |
+
if (p > 0 || d(p) < k) {
|
304 |
+
b.top += m + n + o;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
a.ui.pos._trigger(b, c, "posCollided", "flipTop");
|
308 |
+
}
|
309 |
+
},
|
310 |
+
flipfit: {
|
311 |
+
left: function() {
|
312 |
+
a.ui.pos.flip.left.apply(this, arguments);
|
313 |
+
a.ui.pos.fit.left.apply(this, arguments);
|
314 |
+
},
|
315 |
+
top: function() {
|
316 |
+
a.ui.pos.flip.top.apply(this, arguments);
|
317 |
+
a.ui.pos.fit.top.apply(this, arguments);
|
318 |
+
}
|
319 |
+
}
|
320 |
+
};
|
321 |
+
(function() {
|
322 |
+
var b, c, d, e, f, g = document.getElementsByTagName("body")[0], h = document.createElement("div");
|
323 |
+
b = document.createElement(g ? "div" : "body");
|
324 |
+
d = {
|
325 |
+
visibility: "hidden",
|
326 |
+
width: 0,
|
327 |
+
height: 0,
|
328 |
+
border: 0,
|
329 |
+
margin: 0,
|
330 |
+
background: "none"
|
331 |
+
};
|
332 |
+
if (g) {
|
333 |
+
a.extend(d, {
|
334 |
+
position: "absolute",
|
335 |
+
left: "-1000px",
|
336 |
+
top: "-1000px"
|
337 |
+
});
|
338 |
+
}
|
339 |
+
for (f in d) {
|
340 |
+
b.style[f] = d[f];
|
341 |
+
}
|
342 |
+
b.appendChild(h);
|
343 |
+
c = g || document.documentElement;
|
344 |
+
c.insertBefore(b, c.firstChild);
|
345 |
+
h.style.cssText = "position: absolute; left: 10.7432222px;";
|
346 |
+
e = a(h).offset().left;
|
347 |
+
a.support.offsetFractions = e > 10 && e < 11;
|
348 |
+
b.innerHTML = "";
|
349 |
+
c.removeChild(b);
|
350 |
+
})();
|
351 |
+
})();
|
352 |
+
var c = a.ui.position;
|
353 |
+
});
|
354 |
+
|
355 |
+
(function(a) {
|
356 |
+
"use strict";
|
357 |
+
if (typeof define === "function" && define.amd) {
|
358 |
+
define([ "jquery" ], a);
|
359 |
+
} else if (window.jQuery && !window.jQuery.fn.iconpicker) {
|
360 |
+
a(window.jQuery);
|
361 |
+
}
|
362 |
+
})(function(a) {
|
363 |
+
"use strict";
|
364 |
+
var b = {
|
365 |
+
isEmpty: function(a) {
|
366 |
+
return a === false || a === "" || a === null || a === undefined;
|
367 |
+
},
|
368 |
+
isEmptyObject: function(a) {
|
369 |
+
return this.isEmpty(a) === true || a.length === 0;
|
370 |
+
},
|
371 |
+
isElement: function(b) {
|
372 |
+
return a(b).length > 0;
|
373 |
+
},
|
374 |
+
isString: function(a) {
|
375 |
+
return typeof a === "string" || a instanceof String;
|
376 |
+
},
|
377 |
+
isArray: function(b) {
|
378 |
+
return a.isArray(b);
|
379 |
+
},
|
380 |
+
inArray: function(b, c) {
|
381 |
+
return a.inArray(b, c) !== -1;
|
382 |
+
},
|
383 |
+
throwError: function(a) {
|
384 |
+
throw "Font Awesome Icon Picker Exception: " + a;
|
385 |
+
}
|
386 |
+
};
|
387 |
+
var c = function(d, e) {
|
388 |
+
this._id = c._idCounter++;
|
389 |
+
this.element = a(d).addClass("iconpicker-element");
|
390 |
+
this._trigger("iconpickerCreate");
|
391 |
+
this.options = a.extend({}, c.defaultOptions, this.element.data(), e);
|
392 |
+
this.options.templates = a.extend({}, c.defaultOptions.templates, this.options.templates);
|
393 |
+
this.options.originalPlacement = this.options.placement;
|
394 |
+
this.container = b.isElement(this.options.container) ? a(this.options.container) : false;
|
395 |
+
if (this.container === false) {
|
396 |
+
if (this.element.is(".dropdown-toggle")) {
|
397 |
+
this.container = a("~ .dropdown-menu:first", this.element);
|
398 |
+
} else {
|
399 |
+
this.container = this.element.is("input,textarea,button,.btn") ? this.element.parent() : this.element;
|
400 |
+
}
|
401 |
+
}
|
402 |
+
this.container.addClass("iconpicker-container");
|
403 |
+
if (this.isDropdownMenu()) {
|
404 |
+
this.options.templates.search = false;
|
405 |
+
this.options.templates.buttons = false;
|
406 |
+
this.options.placement = "inline";
|
407 |
+
}
|
408 |
+
this.input = this.element.is("input,textarea") ? this.element.addClass("iconpicker-input") : false;
|
409 |
+
if (this.input === false) {
|
410 |
+
this.input = this.container.find(this.options.input);
|
411 |
+
if (!this.input.is("input,textarea")) {
|
412 |
+
this.input = false;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
this.component = this.isDropdownMenu() ? this.container.parent().find(this.options.component) : this.container.find(this.options.component);
|
416 |
+
if (this.component.length === 0) {
|
417 |
+
this.component = false;
|
418 |
+
} else {
|
419 |
+
this.component.find("i").addClass("iconpicker-component");
|
420 |
+
}
|
421 |
+
this._createPopover();
|
422 |
+
this._createIconpicker();
|
423 |
+
if (this.getAcceptButton().length === 0) {
|
424 |
+
this.options.mustAccept = false;
|
425 |
+
}
|
426 |
+
if (this.isInputGroup()) {
|
427 |
+
this.container.parent().append(this.popover);
|
428 |
+
} else {
|
429 |
+
this.container.append(this.popover);
|
430 |
+
}
|
431 |
+
this._bindElementEvents();
|
432 |
+
this._bindWindowEvents();
|
433 |
+
this.update(this.options.selected);
|
434 |
+
if (this.isInline()) {
|
435 |
+
this.show();
|
436 |
+
}
|
437 |
+
this._trigger("iconpickerCreated");
|
438 |
+
};
|
439 |
+
c._idCounter = 0;
|
440 |
+
c.defaultOptions = {
|
441 |
+
title: false,
|
442 |
+
selected: false,
|
443 |
+
defaultValue: false,
|
444 |
+
placement: "bottom",
|
445 |
+
collision: "none",
|
446 |
+
animation: true,
|
447 |
+
hideOnSelect: false,
|
448 |
+
showFooter: false,
|
449 |
+
searchInFooter: false,
|
450 |
+
mustAccept: false,
|
451 |
+
selectedCustomClass: "bg-primary",
|
452 |
+
icons: [],
|
453 |
+
fullClassFormatter: function(a) {
|
454 |
+
return "fa " + a;
|
455 |
+
},
|
456 |
+
input: "input,.iconpicker-input",
|
457 |
+
inputSearch: false,
|
458 |
+
container: false,
|
459 |
+
component: ".input-group-addon,.iconpicker-component",
|
460 |
+
templates: {
|
461 |
+
popover: '<div class="iconpicker-popover popover"><div class="arrow"></div>' + '<div class="popover-title"></div><div class="popover-content"></div></div>',
|
462 |
+
footer: '<div class="popover-footer"></div>',
|
463 |
+
buttons: '<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button>' + ' <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',
|
464 |
+
search: '<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',
|
465 |
+
iconpicker: '<div class="iconpicker"><div class="iconpicker-items"></div></div>',
|
466 |
+
iconpickerItem: '<a role="button" href="#" class="iconpicker-item"><i></i></a>'
|
467 |
+
}
|
468 |
+
};
|
469 |
+
c.batch = function(b, c) {
|
470 |
+
var d = Array.prototype.slice.call(arguments, 2);
|
471 |
+
return a(b).each(function() {
|
472 |
+
var b = a(this).data("iconpicker");
|
473 |
+
if (!!b) {
|
474 |
+
b[c].apply(b, d);
|
475 |
+
}
|
476 |
+
});
|
477 |
+
};
|
478 |
+
c.prototype = {
|
479 |
+
constructor: c,
|
480 |
+
options: {},
|
481 |
+
_id: 0,
|
482 |
+
_trigger: function(b, c) {
|
483 |
+
c = c || {};
|
484 |
+
this.element.trigger(a.extend({
|
485 |
+
type: b,
|
486 |
+
iconpickerInstance: this
|
487 |
+
}, c));
|
488 |
+
},
|
489 |
+
_createPopover: function() {
|
490 |
+
this.popover = a(this.options.templates.popover);
|
491 |
+
var c = this.popover.find(".popover-title");
|
492 |
+
if (!!this.options.title) {
|
493 |
+
c.append(a('<div class="popover-title-text">' + this.options.title + "</div>"));
|
494 |
+
}
|
495 |
+
if (this.hasSeparatedSearchInput() && !this.options.searchInFooter) {
|
496 |
+
c.append(this.options.templates.search);
|
497 |
+
} else if (!this.options.title) {
|
498 |
+
c.remove();
|
499 |
+
}
|
500 |
+
if (this.options.showFooter && !b.isEmpty(this.options.templates.footer)) {
|
501 |
+
var d = a(this.options.templates.footer);
|
502 |
+
if (this.hasSeparatedSearchInput() && this.options.searchInFooter) {
|
503 |
+
d.append(a(this.options.templates.search));
|
504 |
+
}
|
505 |
+
if (!b.isEmpty(this.options.templates.buttons)) {
|
506 |
+
d.append(a(this.options.templates.buttons));
|
507 |
+
}
|
508 |
+
this.popover.append(d);
|
509 |
+
}
|
510 |
+
if (this.options.animation === true) {
|
511 |
+
this.popover.addClass("fade");
|
512 |
+
}
|
513 |
+
return this.popover;
|
514 |
+
},
|
515 |
+
_createIconpicker: function() {
|
516 |
+
var b = this;
|
517 |
+
this.iconpicker = a(this.options.templates.iconpicker);
|
518 |
+
var c = function(c) {
|
519 |
+
var d = a(this);
|
520 |
+
if (d.is("i")) {
|
521 |
+
d = d.parent();
|
522 |
+
}
|
523 |
+
b._trigger("iconpickerSelect", {
|
524 |
+
iconpickerItem: d,
|
525 |
+
iconpickerValue: b.iconpickerValue
|
526 |
+
});
|
527 |
+
if (b.options.mustAccept === false) {
|
528 |
+
b.update(d.data("iconpickerValue"));
|
529 |
+
b._trigger("iconpickerSelected", {
|
530 |
+
iconpickerItem: this,
|
531 |
+
iconpickerValue: b.iconpickerValue
|
532 |
+
});
|
533 |
+
} else {
|
534 |
+
b.update(d.data("iconpickerValue"), true);
|
535 |
+
}
|
536 |
+
if (b.options.hideOnSelect && b.options.mustAccept === false) {
|
537 |
+
b.hide();
|
538 |
+
}
|
539 |
+
c.preventDefault();
|
540 |
+
return false;
|
541 |
+
};
|
542 |
+
for (var d in this.options.icons) {
|
543 |
+
if (typeof this.options.icons[d] === "string") {
|
544 |
+
var e = a(this.options.templates.iconpickerItem);
|
545 |
+
e.find("i").addClass(this.options.fullClassFormatter(this.options.icons[d]));
|
546 |
+
e.data("iconpickerValue", this.options.icons[d]).on("click.iconpicker", c);
|
547 |
+
this.iconpicker.find(".iconpicker-items").append(e.attr("title", "." + this.options.icons[d]));
|
548 |
+
}
|
549 |
+
}
|
550 |
+
this.popover.find(".popover-content").append(this.iconpicker);
|
551 |
+
return this.iconpicker;
|
552 |
+
},
|
553 |
+
_isEventInsideIconpicker: function(b) {
|
554 |
+
var c = a(b.target);
|
555 |
+
if ((!c.hasClass("iconpicker-element") || c.hasClass("iconpicker-element") && !c.is(this.element)) && c.parents(".iconpicker-popover").length === 0) {
|
556 |
+
return false;
|
557 |
+
}
|
558 |
+
return true;
|
559 |
+
},
|
560 |
+
_bindElementEvents: function() {
|
561 |
+
var c = this;
|
562 |
+
this.getSearchInput().on("keyup.iconpicker", function() {
|
563 |
+
c.filter(a(this).val().toLowerCase());
|
564 |
+
});
|
565 |
+
this.getAcceptButton().on("click.iconpicker", function() {
|
566 |
+
var a = c.iconpicker.find(".iconpicker-selected").get(0);
|
567 |
+
c.update(c.iconpickerValue);
|
568 |
+
c._trigger("iconpickerSelected", {
|
569 |
+
iconpickerItem: a,
|
570 |
+
iconpickerValue: c.iconpickerValue
|
571 |
+
});
|
572 |
+
if (!c.isInline()) {
|
573 |
+
c.hide();
|
574 |
+
}
|
575 |
+
});
|
576 |
+
this.getCancelButton().on("click.iconpicker", function() {
|
577 |
+
if (!c.isInline()) {
|
578 |
+
c.hide();
|
579 |
+
}
|
580 |
+
});
|
581 |
+
this.element.on("focus.iconpicker", function(a) {
|
582 |
+
c.show();
|
583 |
+
a.stopPropagation();
|
584 |
+
});
|
585 |
+
if (this.hasComponent()) {
|
586 |
+
this.component.on("click.iconpicker", function() {
|
587 |
+
c.toggle();
|
588 |
+
});
|
589 |
+
}
|
590 |
+
if (this.hasInput()) {
|
591 |
+
this.input.on("keyup.iconpicker", function(d) {
|
592 |
+
if (!b.inArray(d.keyCode, [ 38, 40, 37, 39, 16, 17, 18, 9, 8, 91, 93, 20, 46, 186, 190, 46, 78, 188, 44, 86 ])) {
|
593 |
+
c.update();
|
594 |
+
} else {
|
595 |
+
c._updateFormGroupStatus(c.getValid(this.value) !== false);
|
596 |
+
}
|
597 |
+
if (c.options.inputSearch === true) {
|
598 |
+
c.filter(a(this).val().toLowerCase());
|
599 |
+
}
|
600 |
+
});
|
601 |
+
}
|
602 |
+
},
|
603 |
+
_bindWindowEvents: function() {
|
604 |
+
var b = a(window.document);
|
605 |
+
var c = this;
|
606 |
+
var d = ".iconpicker.inst" + this._id;
|
607 |
+
a(window).on("resize.iconpicker" + d + " orientationchange.iconpicker" + d, function(a) {
|
608 |
+
if (c.popover.hasClass("in")) {
|
609 |
+
c.updatePlacement();
|
610 |
+
}
|
611 |
+
});
|
612 |
+
if (!c.isInline()) {
|
613 |
+
b.on("mouseup" + d, function(a) {
|
614 |
+
if (!c._isEventInsideIconpicker(a) && !c.isInline()) {
|
615 |
+
c.hide();
|
616 |
+
}
|
617 |
+
a.stopPropagation();
|
618 |
+
a.preventDefault();
|
619 |
+
return false;
|
620 |
+
});
|
621 |
+
}
|
622 |
+
return false;
|
623 |
+
},
|
624 |
+
_unbindElementEvents: function() {
|
625 |
+
this.popover.off(".iconpicker");
|
626 |
+
this.element.off(".iconpicker");
|
627 |
+
if (this.hasInput()) {
|
628 |
+
this.input.off(".iconpicker");
|
629 |
+
}
|
630 |
+
if (this.hasComponent()) {
|
631 |
+
this.component.off(".iconpicker");
|
632 |
+
}
|
633 |
+
if (this.hasContainer()) {
|
634 |
+
this.container.off(".iconpicker");
|
635 |
+
}
|
636 |
+
},
|
637 |
+
_unbindWindowEvents: function() {
|
638 |
+
a(window).off(".iconpicker.inst" + this._id);
|
639 |
+
a(window.document).off(".iconpicker.inst" + this._id);
|
640 |
+
},
|
641 |
+
updatePlacement: function(b, c) {
|
642 |
+
b = b || this.options.placement;
|
643 |
+
this.options.placement = b;
|
644 |
+
c = c || this.options.collision;
|
645 |
+
c = c === true ? "flip" : c;
|
646 |
+
var d = {
|
647 |
+
at: "right bottom",
|
648 |
+
my: "right top",
|
649 |
+
of: this.hasInput() && !this.isInputGroup() ? this.input : this.container,
|
650 |
+
collision: c === true ? "flip" : c,
|
651 |
+
within: window
|
652 |
+
};
|
653 |
+
this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner " + "rightTop right rightBottom bottomRight bottomRightCorner " + "bottom bottomLeft bottomLeftCorner leftBottom left leftTop");
|
654 |
+
if (typeof b === "object") {
|
655 |
+
return this.popover.pos(a.extend({}, d, b));
|
656 |
+
}
|
657 |
+
switch (b) {
|
658 |
+
case "inline":
|
659 |
+
{
|
660 |
+
d = false;
|
661 |
+
}
|
662 |
+
break;
|
663 |
+
|
664 |
+
case "topLeftCorner":
|
665 |
+
{
|
666 |
+
d.my = "right bottom";
|
667 |
+
d.at = "left top";
|
668 |
+
}
|
669 |
+
break;
|
670 |
+
|
671 |
+
case "topLeft":
|
672 |
+
{
|
673 |
+
d.my = "left bottom";
|
674 |
+
d.at = "left top";
|
675 |
+
}
|
676 |
+
break;
|
677 |
+
|
678 |
+
case "top":
|
679 |
+
{
|
680 |
+
d.my = "center bottom";
|
681 |
+
d.at = "center top";
|
682 |
+
}
|
683 |
+
break;
|
684 |
+
|
685 |
+
case "topRight":
|
686 |
+
{
|
687 |
+
d.my = "right bottom";
|
688 |
+
d.at = "right top";
|
689 |
+
}
|
690 |
+
break;
|
691 |
+
|
692 |
+
case "topRightCorner":
|
693 |
+
{
|
694 |
+
d.my = "left bottom";
|
695 |
+
d.at = "right top";
|
696 |
+
}
|
697 |
+
break;
|
698 |
+
|
699 |
+
case "rightTop":
|
700 |
+
{
|
701 |
+
d.my = "left bottom";
|
702 |
+
d.at = "right center";
|
703 |
+
}
|
704 |
+
break;
|
705 |
+
|
706 |
+
case "right":
|
707 |
+
{
|
708 |
+
d.my = "left center";
|
709 |
+
d.at = "right center";
|
710 |
+
}
|
711 |
+
break;
|
712 |
+
|
713 |
+
case "rightBottom":
|
714 |
+
{
|
715 |
+
d.my = "left top";
|
716 |
+
d.at = "right center";
|
717 |
+
}
|
718 |
+
break;
|
719 |
+
|
720 |
+
case "bottomRightCorner":
|
721 |
+
{
|
722 |
+
d.my = "left top";
|
723 |
+
d.at = "right bottom";
|
724 |
+
}
|
725 |
+
break;
|
726 |
+
|
727 |
+
case "bottomRight":
|
728 |
+
{
|
729 |
+
d.my = "right top";
|
730 |
+
d.at = "right bottom";
|
731 |
+
}
|
732 |
+
break;
|
733 |
+
|
734 |
+
case "bottom":
|
735 |
+
{
|
736 |
+
d.my = "center top";
|
737 |
+
d.at = "center bottom";
|
738 |
+
}
|
739 |
+
break;
|
740 |
+
|
741 |
+
case "bottomLeft":
|
742 |
+
{
|
743 |
+
d.my = "left top";
|
744 |
+
d.at = "left bottom";
|
745 |
+
}
|
746 |
+
break;
|
747 |
+
|
748 |
+
case "bottomLeftCorner":
|
749 |
+
{
|
750 |
+
d.my = "right top";
|
751 |
+
d.at = "left bottom";
|
752 |
+
}
|
753 |
+
break;
|
754 |
+
|
755 |
+
case "leftBottom":
|
756 |
+
{
|
757 |
+
d.my = "right top";
|
758 |
+
d.at = "left center";
|
759 |
+
}
|
760 |
+
break;
|
761 |
+
|
762 |
+
case "left":
|
763 |
+
{
|
764 |
+
d.my = "right center";
|
765 |
+
d.at = "left center";
|
766 |
+
}
|
767 |
+
break;
|
768 |
+
|
769 |
+
case "leftTop":
|
770 |
+
{
|
771 |
+
d.my = "right bottom";
|
772 |
+
d.at = "left center";
|
773 |
+
}
|
774 |
+
break;
|
775 |
+
|
776 |
+
default:
|
777 |
+
{
|
778 |
+
return false;
|
779 |
+
}
|
780 |
+
break;
|
781 |
+
}
|
782 |
+
this.popover.css({
|
783 |
+
display: this.options.placement === "inline" ? "" : "block"
|
784 |
+
});
|
785 |
+
if (d !== false) {
|
786 |
+
this.popover.pos(d).css("maxWidth", a(window).width() - this.container.offset().left - 5);
|
787 |
+
} else {
|
788 |
+
this.popover.css({
|
789 |
+
top: "auto",
|
790 |
+
right: "auto",
|
791 |
+
bottom: "auto",
|
792 |
+
left: "auto",
|
793 |
+
maxWidth: "none"
|
794 |
+
});
|
795 |
+
}
|
796 |
+
this.popover.addClass(this.options.placement);
|
797 |
+
return true;
|
798 |
+
},
|
799 |
+
_updateComponents: function() {
|
800 |
+
this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected " + this.options.selectedCustomClass);
|
801 |
+
if (this.iconpickerValue) {
|
802 |
+
this.iconpicker.find("." + this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g, ".")).parent().addClass("iconpicker-selected " + this.options.selectedCustomClass);
|
803 |
+
}
|
804 |
+
if (this.hasComponent()) {
|
805 |
+
var a = this.component.find("i");
|
806 |
+
if (a.length > 0) {
|
807 |
+
a.attr("class", this.options.fullClassFormatter(this.iconpickerValue));
|
808 |
+
} else {
|
809 |
+
this.component.html(this.getHtml());
|
810 |
+
}
|
811 |
+
}
|
812 |
+
},
|
813 |
+
_updateFormGroupStatus: function(a) {
|
814 |
+
if (this.hasInput()) {
|
815 |
+
if (a !== false) {
|
816 |
+
this.input.parents(".form-group:first").removeClass("has-error");
|
817 |
+
} else {
|
818 |
+
this.input.parents(".form-group:first").addClass("has-error");
|
819 |
+
}
|
820 |
+
return true;
|
821 |
+
}
|
822 |
+
return false;
|
823 |
+
},
|
824 |
+
getValid: function(c) {
|
825 |
+
if (!b.isString(c)) {
|
826 |
+
c = "";
|
827 |
+
}
|
828 |
+
var d = c === "";
|
829 |
+
c = a.trim(c);
|
830 |
+
if (b.inArray(c, this.options.icons) || d) {
|
831 |
+
return c;
|
832 |
+
}
|
833 |
+
return false;
|
834 |
+
},
|
835 |
+
setValue: function(a) {
|
836 |
+
var b = this.getValid(a);
|
837 |
+
if (b !== false) {
|
838 |
+
this.iconpickerValue = b;
|
839 |
+
this._trigger("iconpickerSetValue", {
|
840 |
+
iconpickerValue: b
|
841 |
+
});
|
842 |
+
return this.iconpickerValue;
|
843 |
+
} else {
|
844 |
+
this._trigger("iconpickerInvalid", {
|
845 |
+
iconpickerValue: a
|
846 |
+
});
|
847 |
+
return false;
|
848 |
+
}
|
849 |
+
},
|
850 |
+
getHtml: function() {
|
851 |
+
return '<i class="' + this.options.fullClassFormatter(this.iconpickerValue) + '"></i>';
|
852 |
+
},
|
853 |
+
setSourceValue: function(a) {
|
854 |
+
a = this.setValue(a);
|
855 |
+
if (a !== false && a !== "") {
|
856 |
+
if (this.hasInput()) {
|
857 |
+
this.input.val(this.iconpickerValue);
|
858 |
+
} else {
|
859 |
+
this.element.data("iconpickerValue", this.iconpickerValue);
|
860 |
+
}
|
861 |
+
this._trigger("iconpickerSetSourceValue", {
|
862 |
+
iconpickerValue: a
|
863 |
+
});
|
864 |
+
}
|
865 |
+
return a;
|
866 |
+
},
|
867 |
+
getSourceValue: function(a) {
|
868 |
+
a = a || this.options.defaultValue;
|
869 |
+
var b = a;
|
870 |
+
if (this.hasInput()) {
|
871 |
+
b = this.input.val();
|
872 |
+
} else {
|
873 |
+
b = this.element.data("iconpickerValue");
|
874 |
+
}
|
875 |
+
if (b === undefined || b === "" || b === null || b === false) {
|
876 |
+
b = a;
|
877 |
+
}
|
878 |
+
return b;
|
879 |
+
},
|
880 |
+
hasInput: function() {
|
881 |
+
return this.input !== false;
|
882 |
+
},
|
883 |
+
isInputSearch: function() {
|
884 |
+
return this.hasInput() && this.options.inputSearch === true;
|
885 |
+
},
|
886 |
+
isInputGroup: function() {
|
887 |
+
return this.container.is(".input-group");
|
888 |
+
},
|
889 |
+
isDropdownMenu: function() {
|
890 |
+
return this.container.is(".dropdown-menu");
|
891 |
+
},
|
892 |
+
hasSeparatedSearchInput: function() {
|
893 |
+
return this.options.templates.search !== false && !this.isInputSearch();
|
894 |
+
},
|
895 |
+
hasComponent: function() {
|
896 |
+
return this.component !== false;
|
897 |
+
},
|
898 |
+
hasContainer: function() {
|
899 |
+
return this.container !== false;
|
900 |
+
},
|
901 |
+
getAcceptButton: function() {
|
902 |
+
return this.popover.find(".iconpicker-btn-accept");
|
903 |
+
},
|
904 |
+
getCancelButton: function() {
|
905 |
+
return this.popover.find(".iconpicker-btn-cancel");
|
906 |
+
},
|
907 |
+
getSearchInput: function() {
|
908 |
+
return this.popover.find(".iconpicker-search");
|
909 |
+
},
|
910 |
+
filter: function(c) {
|
911 |
+
if (b.isEmpty(c)) {
|
912 |
+
this.iconpicker.find(".iconpicker-item").show();
|
913 |
+
return a(false);
|
914 |
+
} else {
|
915 |
+
var d = [];
|
916 |
+
this.iconpicker.find(".iconpicker-item").each(function() {
|
917 |
+
var b = a(this);
|
918 |
+
var e = b.attr("title").toLowerCase();
|
919 |
+
var f = false;
|
920 |
+
try {
|
921 |
+
f = new RegExp(c, "g");
|
922 |
+
} catch (a) {
|
923 |
+
f = false;
|
924 |
+
}
|
925 |
+
if (f !== false && e.match(f)) {
|
926 |
+
d.push(b);
|
927 |
+
b.show();
|
928 |
+
} else {
|
929 |
+
b.hide();
|
930 |
+
}
|
931 |
+
});
|
932 |
+
return d;
|
933 |
+
}
|
934 |
+
},
|
935 |
+
show: function() {
|
936 |
+
if (this.popover.hasClass("in")) {
|
937 |
+
return false;
|
938 |
+
}
|
939 |
+
a.iconpicker.batch(a(".iconpicker-popover.in:not(.inline)").not(this.popover), "hide");
|
940 |
+
this._trigger("iconpickerShow");
|
941 |
+
this.updatePlacement();
|
942 |
+
this.popover.addClass("in");
|
943 |
+
setTimeout(a.proxy(function() {
|
944 |
+
this.popover.css("display", this.isInline() ? "" : "block");
|
945 |
+
this._trigger("iconpickerShown");
|
946 |
+
}, this), this.options.animation ? 300 : 1);
|
947 |
+
},
|
948 |
+
hide: function() {
|
949 |
+
if (!this.popover.hasClass("in")) {
|
950 |
+
return false;
|
951 |
+
}
|
952 |
+
this._trigger("iconpickerHide");
|
953 |
+
this.popover.removeClass("in");
|
954 |
+
setTimeout(a.proxy(function() {
|
955 |
+
this.popover.css("display", "none");
|
956 |
+
this.getSearchInput().val("");
|
957 |
+
this.filter("");
|
958 |
+
this._trigger("iconpickerHidden");
|
959 |
+
}, this), this.options.animation ? 300 : 1);
|
960 |
+
},
|
961 |
+
toggle: function() {
|
962 |
+
if (this.popover.is(":visible")) {
|
963 |
+
this.hide();
|
964 |
+
} else {
|
965 |
+
this.show(true);
|
966 |
+
}
|
967 |
+
},
|
968 |
+
update: function(a, b) {
|
969 |
+
a = a ? a : this.getSourceValue(this.iconpickerValue);
|
970 |
+
this._trigger("iconpickerUpdate");
|
971 |
+
if (b === true) {
|
972 |
+
a = this.setValue(a);
|
973 |
+
} else {
|
974 |
+
a = this.setSourceValue(a);
|
975 |
+
this._updateFormGroupStatus(a !== false);
|
976 |
+
}
|
977 |
+
if (a !== false) {
|
978 |
+
this._updateComponents();
|
979 |
+
}
|
980 |
+
this._trigger("iconpickerUpdated");
|
981 |
+
return a;
|
982 |
+
},
|
983 |
+
destroy: function() {
|
984 |
+
this._trigger("iconpickerDestroy");
|
985 |
+
this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element");
|
986 |
+
this._unbindElementEvents();
|
987 |
+
this._unbindWindowEvents();
|
988 |
+
a(this.popover).remove();
|
989 |
+
this._trigger("iconpickerDestroyed");
|
990 |
+
},
|
991 |
+
disable: function() {
|
992 |
+
if (this.hasInput()) {
|
993 |
+
this.input.prop("disabled", true);
|
994 |
+
return true;
|
995 |
+
}
|
996 |
+
return false;
|
997 |
+
},
|
998 |
+
enable: function() {
|
999 |
+
if (this.hasInput()) {
|
1000 |
+
this.input.prop("disabled", false);
|
1001 |
+
return true;
|
1002 |
+
}
|
1003 |
+
return false;
|
1004 |
+
},
|
1005 |
+
isDisabled: function() {
|
1006 |
+
if (this.hasInput()) {
|
1007 |
+
return this.input.prop("disabled") === true;
|
1008 |
+
}
|
1009 |
+
return false;
|
1010 |
+
},
|
1011 |
+
isInline: function() {
|
1012 |
+
return this.options.placement === "inline" || this.popover.hasClass("inline");
|
1013 |
+
}
|
1014 |
+
};
|
1015 |
+
a.iconpicker = c;
|
1016 |
+
a.fn.iconpicker = function(b) {
|
1017 |
+
return this.each(function() {
|
1018 |
+
var d = a(this);
|
1019 |
+
if (!d.data("iconpicker")) {
|
1020 |
+
d.data("iconpicker", new c(this, typeof b === "object" ? b : {}));
|
1021 |
+
}
|
1022 |
+
});
|
1023 |
+
};
|
1024 |
+
c.defaultOptions.icons = [ "fa-500px", "fa-adjust", "fa-adn", "fa-align-center", "fa-align-justify", "fa-align-left", "fa-align-right", "fa-amazon", "fa-ambulance", "fa-american-sign-language-interpreting", "fa-anchor", "fa-android", "fa-angellist", "fa-angle-double-down", "fa-angle-double-left", "fa-angle-double-right", "fa-angle-double-up", "fa-angle-down", "fa-angle-left", "fa-angle-right", "fa-angle-up", "fa-apple", "fa-archive", "fa-area-chart", "fa-arrow-circle-down", "fa-arrow-circle-left", "fa-arrow-circle-o-down", "fa-arrow-circle-o-left", "fa-arrow-circle-o-right", "fa-arrow-circle-o-up", "fa-arrow-circle-right", "fa-arrow-circle-up", "fa-arrow-down", "fa-arrow-left", "fa-arrow-right", "fa-arrow-up", "fa-arrows", "fa-arrows-alt", "fa-arrows-h", "fa-arrows-v", "fa-asl-interpreting", "fa-assistive-listening-systems", "fa-asterisk", "fa-at", "fa-audio-description", "fa-automobile", "fa-backward", "fa-balance-scale", "fa-ban", "fa-bandcamp", "fa-bank", "fa-bar-chart", "fa-bar-chart-o", "fa-barcode", "fa-bars", "fa-bath", "fa-bathtub", "fa-battery", "fa-battery-0", "fa-battery-1", "fa-battery-2", "fa-battery-3", "fa-battery-4", "fa-battery-empty", "fa-battery-full", "fa-battery-half", "fa-battery-quarter", "fa-battery-three-quarters", "fa-bed", "fa-beer", "fa-behance", "fa-behance-square", "fa-bell", "fa-bell-o", "fa-bell-slash", "fa-bell-slash-o", "fa-bicycle", "fa-binoculars", "fa-birthday-cake", "fa-bitbucket", "fa-bitbucket-square", "fa-bitcoin", "fa-black-tie", "fa-blind", "fa-bluetooth", "fa-bluetooth-b", "fa-bold", "fa-bolt", "fa-bomb", "fa-book", "fa-bookmark", "fa-bookmark-o", "fa-braille", "fa-briefcase", "fa-btc", "fa-bug", "fa-building", "fa-building-o", "fa-bullhorn", "fa-bullseye", "fa-bus", "fa-buysellads", "fa-cab", "fa-calculator", "fa-calendar", "fa-calendar-check-o", "fa-calendar-minus-o", "fa-calendar-o", "fa-calendar-plus-o", "fa-calendar-times-o", "fa-camera", "fa-camera-retro", "fa-car", "fa-caret-down", "fa-caret-left", "fa-caret-right", "fa-caret-square-o-down", "fa-caret-square-o-left", "fa-caret-square-o-right", "fa-caret-square-o-up", "fa-caret-up", "fa-cart-arrow-down", "fa-cart-plus", "fa-cc", "fa-cc-amex", "fa-cc-diners-club", "fa-cc-discover", "fa-cc-jcb", "fa-cc-mastercard", "fa-cc-paypal", "fa-cc-stripe", "fa-cc-visa", "fa-certificate", "fa-chain", "fa-chain-broken", "fa-check", "fa-check-circle", "fa-check-circle-o", "fa-check-square", "fa-check-square-o", "fa-chevron-circle-down", "fa-chevron-circle-left", "fa-chevron-circle-right", "fa-chevron-circle-up", "fa-chevron-down", "fa-chevron-left", "fa-chevron-right", "fa-chevron-up", "fa-child", "fa-chrome", "fa-circle", "fa-circle-o", "fa-circle-o-notch", "fa-circle-thin", "fa-clipboard", "fa-clock-o", "fa-clone", "fa-close", "fa-cloud", "fa-cloud-download", "fa-cloud-upload", "fa-cny", "fa-code", "fa-code-fork", "fa-codepen", "fa-codiepie", "fa-coffee", "fa-cog", "fa-cogs", "fa-columns", "fa-comment", "fa-comment-o", "fa-commenting", "fa-commenting-o", "fa-comments", "fa-comments-o", "fa-compass", "fa-compress", "fa-connectdevelop", "fa-contao", "fa-copy", "fa-copyright", "fa-creative-commons", "fa-credit-card", "fa-credit-card-alt", "fa-crop", "fa-crosshairs", "fa-css3", "fa-cube", "fa-cubes", "fa-cut", "fa-cutlery", "fa-dashboard", "fa-dashcube", "fa-database", "fa-deaf", "fa-deafness", "fa-dedent", "fa-delicious", "fa-desktop", "fa-deviantart", "fa-diamond", "fa-digg", "fa-dollar", "fa-dot-circle-o", "fa-download", "fa-dribbble", "fa-drivers-license", "fa-drivers-license-o", "fa-dropbox", "fa-drupal", "fa-edge", "fa-edit", "fa-eercast", "fa-eject", "fa-ellipsis-h", "fa-ellipsis-v", "fa-empire", "fa-envelope", "fa-envelope-o", "fa-envelope-open", "fa-envelope-open-o", "fa-envelope-square", "fa-envira", "fa-eraser", "fa-etsy", "fa-eur", "fa-euro", "fa-exchange", "fa-exclamation", "fa-exclamation-circle", "fa-exclamation-triangle", "fa-expand", "fa-expeditedssl", "fa-external-link", "fa-external-link-square", "fa-eye", "fa-eye-slash", "fa-eyedropper", "fa-fa", "fa-facebook", "fa-facebook-f", "fa-facebook-official", "fa-facebook-square", "fa-fast-backward", "fa-fast-forward", "fa-fax", "fa-feed", "fa-female", "fa-fighter-jet", "fa-file", "fa-file-archive-o", "fa-file-audio-o", "fa-file-code-o", "fa-file-excel-o", "fa-file-image-o", "fa-file-movie-o", "fa-file-o", "fa-file-pdf-o", "fa-file-photo-o", "fa-file-picture-o", "fa-file-powerpoint-o", "fa-file-sound-o", "fa-file-text", "fa-file-text-o", "fa-file-video-o", "fa-file-word-o", "fa-file-zip-o", "fa-files-o", "fa-film", "fa-filter", "fa-fire", "fa-fire-extinguisher", "fa-firefox", "fa-first-order", "fa-flag", "fa-flag-checkered", "fa-flag-o", "fa-flash", "fa-flask", "fa-flickr", "fa-floppy-o", "fa-folder", "fa-folder-o", "fa-folder-open", "fa-folder-open-o", "fa-font", "fa-font-awesome", "fa-fonticons", "fa-fort-awesome", "fa-forumbee", "fa-forward", "fa-foursquare", "fa-free-code-camp", "fa-frown-o", "fa-futbol-o", "fa-gamepad", "fa-gavel", "fa-gbp", "fa-ge", "fa-gear", "fa-gears", "fa-genderless", "fa-get-pocket", "fa-gg", "fa-gg-circle", "fa-gift", "fa-git", "fa-git-square", "fa-github", "fa-github-alt", "fa-github-square", "fa-gitlab", "fa-gittip", "fa-glass", "fa-glide", "fa-glide-g", "fa-globe", "fa-google", "fa-google-plus", "fa-google-plus-circle", "fa-google-plus-official", "fa-google-plus-square", "fa-google-wallet", "fa-graduation-cap", "fa-gratipay", "fa-grav", "fa-group", "fa-h-square", "fa-hacker-news", "fa-hand-grab-o", "fa-hand-lizard-o", "fa-hand-o-down", "fa-hand-o-left", "fa-hand-o-right", "fa-hand-o-up", "fa-hand-paper-o", "fa-hand-peace-o", "fa-hand-pointer-o", "fa-hand-rock-o", "fa-hand-scissors-o", "fa-hand-spock-o", "fa-hand-stop-o", "fa-hard-of-hearing", "fa-hashtag", "fa-hdd-o", "fa-header", "fa-headphones", "fa-heart", "fa-heart-o", "fa-heartbeat", "fa-history", "fa-home", "fa-hospital-o", "fa-hotel", "fa-hourglass", "fa-hourglass-1", "fa-hourglass-2", "fa-hourglass-3", "fa-hourglass-end", "fa-hourglass-half", "fa-hourglass-o", "fa-hourglass-start", "fa-houzz", "fa-html5", "fa-i-cursor", "fa-id-badge", "fa-id-card", "fa-id-card-o", "fa-ils", "fa-image", "fa-imdb", "fa-inbox", "fa-indent", "fa-industry", "fa-info", "fa-info-circle", "fa-inr", "fa-instagram", "fa-institution", "fa-internet-explorer", "fa-intersex", "fa-ioxhost", "fa-italic", "fa-joomla", "fa-jpy", "fa-jsfiddle", "fa-key", "fa-keyboard-o", "fa-krw", "fa-language", "fa-laptop", "fa-lastfm", "fa-lastfm-square", "fa-leaf", "fa-leanpub", "fa-legal", "fa-lemon-o", "fa-level-down", "fa-level-up", "fa-life-bouy", "fa-life-buoy", "fa-life-ring", "fa-life-saver", "fa-lightbulb-o", "fa-line-chart", "fa-link", "fa-linkedin", "fa-linkedin-square", "fa-linux", "fa-list", "fa-list-alt", "fa-list-ol", "fa-list-ul", "fa-location-arrow", "fa-lock", "fa-long-arrow-down", "fa-long-arrow-left", "fa-long-arrow-right", "fa-long-arrow-up", "fa-low-vision", "fa-magic", "fa-magnet", "fa-mail-forward", "fa-mail-reply", "fa-mail-reply-all", "fa-male", "fa-map", "fa-map-marker", "fa-map-o", "fa-map-pin", "fa-map-signs", "fa-mars", "fa-mars-double", "fa-mars-stroke", "fa-mars-stroke-h", "fa-mars-stroke-v", "fa-maxcdn", "fa-meanpath", "fa-medium", "fa-medkit", "fa-meetup", "fa-meh-o", "fa-mercury", "fa-microchip", "fa-microphone", "fa-microphone-slash", "fa-minus", "fa-minus-circle", "fa-minus-square", "fa-minus-square-o", "fa-mixcloud", "fa-mobile", "fa-mobile-phone", "fa-modx", "fa-money", "fa-moon-o", "fa-mortar-board", "fa-motorcycle", "fa-mouse-pointer", "fa-music", "fa-navicon", "fa-neuter", "fa-newspaper-o", "fa-object-group", "fa-object-ungroup", "fa-odnoklassniki", "fa-odnoklassniki-square", "fa-opencart", "fa-openid", "fa-opera", "fa-optin-monster", "fa-outdent", "fa-pagelines", "fa-paint-brush", "fa-paper-plane", "fa-paper-plane-o", "fa-paperclip", "fa-paragraph", "fa-paste", "fa-pause", "fa-pause-circle", "fa-pause-circle-o", "fa-paw", "fa-paypal", "fa-pencil", "fa-pencil-square", "fa-pencil-square-o", "fa-percent", "fa-phone", "fa-phone-square", "fa-photo", "fa-picture-o", "fa-pie-chart", "fa-pied-piper", "fa-pied-piper-alt", "fa-pied-piper-pp", "fa-pinterest", "fa-pinterest-p", "fa-pinterest-square", "fa-plane", "fa-play", "fa-play-circle", "fa-play-circle-o", "fa-plug", "fa-plus", "fa-plus-circle", "fa-plus-square", "fa-plus-square-o", "fa-podcast", "fa-power-off", "fa-print", "fa-product-hunt", "fa-puzzle-piece", "fa-qq", "fa-qrcode", "fa-question", "fa-question-circle", "fa-question-circle-o", "fa-quora", "fa-quote-left", "fa-quote-right", "fa-ra", "fa-random", "fa-ravelry", "fa-rebel", "fa-recycle", "fa-reddit", "fa-reddit-alien", "fa-reddit-square", "fa-refresh", "fa-registered", "fa-remove", "fa-renren", "fa-reorder", "fa-repeat", "fa-reply", "fa-reply-all", "fa-resistance", "fa-retweet", "fa-rmb", "fa-road", "fa-rocket", "fa-rotate-left", "fa-rotate-right", "fa-rouble", "fa-rss", "fa-rss-square", "fa-rub", "fa-ruble", "fa-rupee", "fa-s15", "fa-safari", "fa-save", "fa-scissors", "fa-scribd", "fa-search", "fa-search-minus", "fa-search-plus", "fa-sellsy", "fa-send", "fa-send-o", "fa-server", "fa-share", "fa-share-alt", "fa-share-alt-square", "fa-share-square", "fa-share-square-o", "fa-shekel", "fa-sheqel", "fa-shield", "fa-ship", "fa-shirtsinbulk", "fa-shopping-bag", "fa-shopping-basket", "fa-shopping-cart", "fa-shower", "fa-sign-in", "fa-sign-language", "fa-sign-out", "fa-signal", "fa-signing", "fa-simplybuilt", "fa-sitemap", "fa-skyatlas", "fa-skype", "fa-slack", "fa-sliders", "fa-slideshare", "fa-smile-o", "fa-snapchat", "fa-snapchat-ghost", "fa-snapchat-square", "fa-snowflake-o", "fa-soccer-ball-o", "fa-sort", "fa-sort-alpha-asc", "fa-sort-alpha-desc", "fa-sort-amount-asc", "fa-sort-amount-desc", "fa-sort-asc", "fa-sort-desc", "fa-sort-down", "fa-sort-numeric-asc", "fa-sort-numeric-desc", "fa-sort-up", "fa-soundcloud", "fa-space-shuttle", "fa-spinner", "fa-spoon", "fa-spotify", "fa-square", "fa-square-o", "fa-stack-exchange", "fa-stack-overflow", "fa-star", "fa-star-half", "fa-star-half-empty", "fa-star-half-full", "fa-star-half-o", "fa-star-o", "fa-steam", "fa-steam-square", "fa-step-backward", "fa-step-forward", "fa-stethoscope", "fa-sticky-note", "fa-sticky-note-o", "fa-stop", "fa-stop-circle", "fa-stop-circle-o", "fa-street-view", "fa-strikethrough", "fa-stumbleupon", "fa-stumbleupon-circle", "fa-subscript", "fa-subway", "fa-suitcase", "fa-sun-o", "fa-superpowers", "fa-superscript", "fa-support", "fa-table", "fa-tablet", "fa-tachometer", "fa-tag", "fa-tags", "fa-tasks", "fa-taxi", "fa-telegram", "fa-television", "fa-tencent-weibo", "fa-terminal", "fa-text-height", "fa-text-width", "fa-th", "fa-th-large", "fa-th-list", "fa-themeisle", "fa-thermometer", "fa-thermometer-0", "fa-thermometer-1", "fa-thermometer-2", "fa-thermometer-3", "fa-thermometer-4", "fa-thermometer-empty", "fa-thermometer-full", "fa-thermometer-half", "fa-thermometer-quarter", "fa-thermometer-three-quarters", "fa-thumb-tack", "fa-thumbs-down", "fa-thumbs-o-down", "fa-thumbs-o-up", "fa-thumbs-up", "fa-ticket", "fa-times", "fa-times-circle", "fa-times-circle-o", "fa-times-rectangle", "fa-times-rectangle-o", "fa-tint", "fa-toggle-down", "fa-toggle-left", "fa-toggle-off", "fa-toggle-on", "fa-toggle-right", "fa-toggle-up", "fa-trademark", "fa-train", "fa-transgender", "fa-transgender-alt", "fa-trash", "fa-trash-o", "fa-tree", "fa-trello", "fa-tripadvisor", "fa-trophy", "fa-truck", "fa-try", "fa-tty", "fa-tumblr", "fa-tumblr-square", "fa-turkish-lira", "fa-tv", "fa-twitch", "fa-twitter", "fa-twitter-square", "fa-umbrella", "fa-underline", "fa-undo", "fa-universal-access", "fa-university", "fa-unlink", "fa-unlock", "fa-unlock-alt", "fa-unsorted", "fa-upload", "fa-usb", "fa-usd", "fa-user", "fa-user-circle", "fa-user-circle-o", "fa-user-md", "fa-user-o", "fa-user-plus", "fa-user-secret", "fa-user-times", "fa-users", "fa-vcard", "fa-vcard-o", "fa-venus", "fa-venus-double", "fa-venus-mars", "fa-viacoin", "fa-viadeo", "fa-viadeo-square", "fa-video-camera", "fa-vimeo", "fa-vimeo-square", "fa-vine", "fa-vk", "fa-volume-control-phone", "fa-volume-down", "fa-volume-off", "fa-volume-up", "fa-warning", "fa-wechat", "fa-weibo", "fa-weixin", "fa-whatsapp", "fa-wheelchair", "fa-wheelchair-alt", "fa-wifi", "fa-wikipedia-w", "fa-window-close", "fa-window-close-o", "fa-window-maximize", "fa-window-minimize", "fa-window-restore", "fa-windows", "fa-won", "fa-wordpress", "fa-wpbeginner", "fa-wpexplorer", "fa-wpforms", "fa-wrench", "fa-xing", "fa-xing-square", "fa-y-combinator", "fa-y-combinator-square", "fa-yahoo", "fa-yc", "fa-yc-square", "fa-yelp", "fa-yen", "fa-yoast", "fa-youtube", "fa-youtube-play", "fa-youtube-square" ];
|
1025 |
});
|
js/hs.png
CHANGED
File without changes
|
js/hv.png
CHANGED
File without changes
|
js/jquery-cookie.js
CHANGED
File without changes
|
js/jscolor.js
CHANGED
File without changes
|
js/md5.js
CHANGED
File without changes
|
js/themes/classic.js
CHANGED
@@ -1,168 +1,167 @@
|
|
1 |
-
jQuery(document).on("wplc_minimize_chat", function( e ) {
|
2 |
-
jQuery('#wp-live-chat').height("");
|
3 |
-
if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
|
4 |
-
jQuery("#wp-live-chat").css("left", "");
|
5 |
-
jQuery("#wp-live-chat").css("bottom", "0");
|
6 |
-
jQuery("#wp-live-chat").css("right", "100px");
|
7 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
|
8 |
-
jQuery("#wp-live-chat").css("left", "100px");
|
9 |
-
jQuery("#wp-live-chat").css("bottom", "0");
|
10 |
-
jQuery("#wp-live-chat").css("right", "");
|
11 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
|
12 |
-
jQuery("#wp-live-chat").css("left", "0");
|
13 |
-
jQuery("#wp-live-chat").css("bottom", "100px");
|
14 |
-
jQuery("#wp-live-chat").css("width", "");
|
15 |
-
jQuery("#wp-live-chat").css("height", "");
|
16 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
|
17 |
-
jQuery("#wp-live-chat").css("left", "");
|
18 |
-
jQuery("#wp-live-chat").css("right", "0");
|
19 |
-
jQuery("#wp-live-chat").css("bottom", "100px");
|
20 |
-
jQuery("#wp-live-chat").css("width", "");
|
21 |
-
jQuery("#wp-live-chat").css("height", "");
|
22 |
-
}
|
23 |
-
jQuery('#wp-live-chat').addClass("wplc_close");
|
24 |
-
jQuery('#wp-live-chat').removeClass("wplc_open");
|
25 |
-
//jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
|
26 |
-
jQuery("#wp-live-chat").css("top", "");
|
27 |
-
jQuery("#wp-live-chat-1").show();
|
28 |
-
jQuery("#wp-live-chat-1").css('cursor', 'pointer');
|
29 |
-
jQuery("#wp-live-chat-2").hide();
|
30 |
-
jQuery("#wp-live-chat-3").hide();
|
31 |
-
jQuery("#wp-live-chat-4").hide();
|
32 |
-
jQuery("#wplc_social_holder").hide();
|
33 |
-
jQuery("#nifty_ratings_holder").hide();
|
34 |
-
jQuery("#wp-live-chat-react").hide();
|
35 |
-
jQuery("#wp-live-chat-minimize").hide();
|
36 |
-
});
|
37 |
-
jQuery(document).on("click", "#wp-live-chat", function( e ){
|
38 |
-
|
39 |
-
});
|
40 |
-
|
41 |
-
jQuery(document).on("wplc_start_chat", function( e ) {
|
42 |
-
jQuery("#wp-live-chat-2-inner").hide("slow");
|
43 |
-
/* changed in version 7 as we now allow users to start typing immediately */
|
44 |
-
/* jQuery("#wp-live-chat-3").show(); */
|
45 |
-
jQuery.event.trigger({type: "wplc_open_chat_1"});
|
46 |
-
jQuery.event.trigger({type: "wplc_open_chat_2", wplc_online: wplc_online});
|
47 |
-
});
|
48 |
-
jQuery(document).on( "wplc_open_chat_1", function( e ) {
|
49 |
-
|
50 |
-
jQuery('#wp-live-chat').removeClass("wplc_close");
|
51 |
-
jQuery('#wp-live-chat').addClass("wplc_open");
|
52 |
-
jQuery("#wp-live-chat-react").hide();
|
53 |
-
jQuery("#wp-live-chat-header").css('cursor', 'all-scroll');
|
54 |
-
Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
|
55 |
-
jQuery("#wp-live-chat-minimize").show();
|
56 |
-
|
57 |
-
/* set the width again as jQuery sometimes messes this up completely. */
|
58 |
-
if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
|
59 |
-
jQuery("#wp-live-chat").css("width", "280px");
|
60 |
-
jQuery("#wp-live-chat").css("height", "auto !important");
|
61 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
|
62 |
-
jQuery("#wp-live-chat").css("width", "280px");
|
63 |
-
jQuery("#wp-live-chat").css("height", "auto !important");
|
64 |
-
}
|
65 |
-
|
66 |
-
|
67 |
-
jQuery(function() {
|
68 |
-
jQuery( "#wp-live-chat" ).draggable({
|
69 |
-
handle: "#wp-live-chat-header",
|
70 |
-
drag: function( event, ui ) {
|
71 |
-
jQuery(this).css("right","");
|
72 |
-
jQuery(this).css("bottom","inherit");
|
73 |
-
}
|
74 |
-
});
|
75 |
-
});
|
76 |
-
|
77 |
-
|
78 |
-
});
|
79 |
-
|
80 |
-
|
81 |
-
jQuery(document).on( "wplc_open_chat_2", function( e ) {
|
82 |
-
|
83 |
-
jQuery("#wp-live-chat-2").hide();
|
84 |
-
|
85 |
-
if(!jQuery("#wp-live-chat").hasClass("wplc_open")){
|
86 |
-
jQuery("#wplc_chatmsg").focus();
|
87 |
-
}
|
88 |
-
|
89 |
-
jQuery("#wp-live-chat-header").addClass("active");
|
90 |
-
jQuery("#wp-live-chat").addClass("mobile-active");
|
91 |
-
|
92 |
-
wplc_chat_status = Cookies.get('wplc_chat_status');
|
93 |
-
if (typeof e.wplc_online !== "undefined" && e.wplc_online === true) {
|
94 |
-
jQuery("#wp-live-chat-4").show();
|
95 |
-
jQuery("#wplc_social_holder").show();
|
96 |
-
jQuery("#nifty_ratings_holder").show();
|
97 |
-
jQuery("#wp-live-chat-1").css("cursor","pointer");
|
98 |
-
} else if (e.wplc_online === false) {
|
99 |
-
jQuery("#wp-live-chat-2").show();
|
100 |
-
jQuery("#wp-live-chat").css("height","auto !important");
|
101 |
-
jQuery("#wp-live-chat-4").hide();
|
102 |
-
jQuery("#wplc_social_holder").hide();
|
103 |
-
jQuery("#nifty_ratings_holder").hide();
|
104 |
-
jQuery("#wp-live-chat-1").css("cursor","pointer");
|
105 |
-
}
|
106 |
-
|
107 |
-
jQuery("#wp-live-chat-3").hide();
|
108 |
-
jQuery("#wp-live-chat-close").hide();
|
109 |
-
//jQuery("#wp-live-chat-minimize").css("right","23px");
|
110 |
-
Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
111 |
-
});
|
112 |
-
|
113 |
-
jQuery(function() {
|
114 |
-
//opens chat when clicked on top bar
|
115 |
-
jQuery("body").on("click", "#wp-live-chat-1", function() {
|
116 |
-
//jQuery.event.trigger({type: "wplc_open_chat"});
|
117 |
-
});
|
118 |
-
jQuery("body").on("click", ".wplc_retry_chat", function() {
|
119 |
-
Cookies.set('wplc_chat_status', 5);
|
120 |
-
jQuery("#wplc_chatbox").html("");
|
121 |
-
jQuery("#wp-live-chat-4").fadeOut();
|
122 |
-
jQuery("#wp-live-chat-2").fadeIn();
|
123 |
-
jQuery("#wp-live-chat-2-inner").fadeIn();
|
124 |
-
wplc_shown_welcome = false;
|
125 |
-
});
|
126 |
-
jQuery("body").on("click", "#speeching_button", function() {
|
127 |
-
jQuery("#wplc_hovercard").hide();
|
128 |
-
wplc_is_chat_open = true;
|
129 |
-
jQuery.event.trigger({type: "wplc_open_chat"});
|
130 |
-
jQuery("#wp-live-chat-minimize").show();
|
131 |
-
|
132 |
-
});
|
133 |
-
|
134 |
-
jQuery("body").on("click", "#wplc_hovercard_min", function(){
|
135 |
-
jQuery("#wplc_hovercard").fadeOut();
|
136 |
-
});
|
137 |
-
|
138 |
-
jQuery("body").on("click", "#wp-live-chat-header", function(){
|
139 |
-
jQuery("#wplc_hovercard").hide();
|
140 |
-
jQuery("#wp-live-chat").css("height","");
|
141 |
-
jQuery("#wplc-chat-alert").removeClass('is-active');
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
jQuery
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
jQuery
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
});
|
1 |
+
jQuery(document).on("wplc_minimize_chat", function( e ) {
|
2 |
+
jQuery('#wp-live-chat').height("");
|
3 |
+
if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
|
4 |
+
jQuery("#wp-live-chat").css("left", "");
|
5 |
+
jQuery("#wp-live-chat").css("bottom", "0");
|
6 |
+
jQuery("#wp-live-chat").css("right", "100px");
|
7 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
|
8 |
+
jQuery("#wp-live-chat").css("left", "100px");
|
9 |
+
jQuery("#wp-live-chat").css("bottom", "0");
|
10 |
+
jQuery("#wp-live-chat").css("right", "");
|
11 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
|
12 |
+
jQuery("#wp-live-chat").css("left", "0");
|
13 |
+
jQuery("#wp-live-chat").css("bottom", "100px");
|
14 |
+
jQuery("#wp-live-chat").css("width", "");
|
15 |
+
jQuery("#wp-live-chat").css("height", "");
|
16 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
|
17 |
+
jQuery("#wp-live-chat").css("left", "");
|
18 |
+
jQuery("#wp-live-chat").css("right", "0");
|
19 |
+
jQuery("#wp-live-chat").css("bottom", "100px");
|
20 |
+
jQuery("#wp-live-chat").css("width", "");
|
21 |
+
jQuery("#wp-live-chat").css("height", "");
|
22 |
+
}
|
23 |
+
jQuery('#wp-live-chat').addClass("wplc_close");
|
24 |
+
jQuery('#wp-live-chat').removeClass("wplc_open");
|
25 |
+
//jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
|
26 |
+
jQuery("#wp-live-chat").css("top", "");
|
27 |
+
jQuery("#wp-live-chat-1").show();
|
28 |
+
jQuery("#wp-live-chat-1").css('cursor', 'pointer');
|
29 |
+
jQuery("#wp-live-chat-2").hide();
|
30 |
+
jQuery("#wp-live-chat-3").hide();
|
31 |
+
jQuery("#wp-live-chat-4").hide();
|
32 |
+
jQuery("#wplc_social_holder").hide();
|
33 |
+
jQuery("#nifty_ratings_holder").hide();
|
34 |
+
jQuery("#wp-live-chat-react").hide();
|
35 |
+
jQuery("#wp-live-chat-minimize").hide();
|
36 |
+
});
|
37 |
+
jQuery(document).on("click", "#wp-live-chat", function( e ){
|
38 |
+
|
39 |
+
});
|
40 |
+
|
41 |
+
jQuery(document).on("wplc_start_chat", function( e ) {
|
42 |
+
jQuery("#wp-live-chat-2-inner").hide("slow");
|
43 |
+
/* changed in version 7 as we now allow users to start typing immediately */
|
44 |
+
/* jQuery("#wp-live-chat-3").show(); */
|
45 |
+
jQuery.event.trigger({type: "wplc_open_chat_1"});
|
46 |
+
jQuery.event.trigger({type: "wplc_open_chat_2", wplc_online: wplc_online});
|
47 |
+
});
|
48 |
+
jQuery(document).on( "wplc_open_chat_1", function( e ) {
|
49 |
+
|
50 |
+
jQuery('#wp-live-chat').removeClass("wplc_close");
|
51 |
+
jQuery('#wp-live-chat').addClass("wplc_open");
|
52 |
+
jQuery("#wp-live-chat-react").hide();
|
53 |
+
jQuery("#wp-live-chat-header").css('cursor', 'all-scroll');
|
54 |
+
Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
|
55 |
+
jQuery("#wp-live-chat-minimize").show();
|
56 |
+
|
57 |
+
/* set the width again as jQuery sometimes messes this up completely. */
|
58 |
+
if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
|
59 |
+
jQuery("#wp-live-chat").css("width", "280px");
|
60 |
+
jQuery("#wp-live-chat").css("height", "auto !important");
|
61 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
|
62 |
+
jQuery("#wp-live-chat").css("width", "280px");
|
63 |
+
jQuery("#wp-live-chat").css("height", "auto !important");
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
jQuery(function() {
|
68 |
+
jQuery( "#wp-live-chat" ).draggable({
|
69 |
+
handle: "#wp-live-chat-header",
|
70 |
+
drag: function( event, ui ) {
|
71 |
+
jQuery(this).css("right","");
|
72 |
+
jQuery(this).css("bottom","inherit");
|
73 |
+
}
|
74 |
+
});
|
75 |
+
});
|
76 |
+
|
77 |
+
|
78 |
+
});
|
79 |
+
|
80 |
+
|
81 |
+
jQuery(document).on( "wplc_open_chat_2", function( e ) {
|
82 |
+
|
83 |
+
jQuery("#wp-live-chat-2").hide();
|
84 |
+
|
85 |
+
if(!jQuery("#wp-live-chat").hasClass("wplc_open")){
|
86 |
+
jQuery("#wplc_chatmsg").focus();
|
87 |
+
}
|
88 |
+
|
89 |
+
jQuery("#wp-live-chat-header").addClass("active");
|
90 |
+
jQuery("#wp-live-chat").addClass("mobile-active");
|
91 |
+
|
92 |
+
wplc_chat_status = Cookies.get('wplc_chat_status');
|
93 |
+
if (typeof e.wplc_online !== "undefined" && e.wplc_online === true) {
|
94 |
+
jQuery("#wp-live-chat-4").show();
|
95 |
+
jQuery("#wplc_social_holder").show();
|
96 |
+
jQuery("#nifty_ratings_holder").show();
|
97 |
+
jQuery("#wp-live-chat-1").css("cursor","pointer");
|
98 |
+
} else if (e.wplc_online === false) {
|
99 |
+
jQuery("#wp-live-chat-2").show();
|
100 |
+
jQuery("#wp-live-chat").css("height","auto !important");
|
101 |
+
jQuery("#wp-live-chat-4").hide();
|
102 |
+
jQuery("#wplc_social_holder").hide();
|
103 |
+
jQuery("#nifty_ratings_holder").hide();
|
104 |
+
jQuery("#wp-live-chat-1").css("cursor","pointer");
|
105 |
+
}
|
106 |
+
|
107 |
+
jQuery("#wp-live-chat-3").hide();
|
108 |
+
jQuery("#wp-live-chat-close").hide();
|
109 |
+
//jQuery("#wp-live-chat-minimize").css("right","23px");
|
110 |
+
Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
111 |
+
});
|
112 |
+
|
113 |
+
jQuery(document).ready(function() {
|
114 |
+
//opens chat when clicked on top bar
|
115 |
+
jQuery("body").on("click", "#wp-live-chat-1", function() {
|
116 |
+
//jQuery.event.trigger({type: "wplc_open_chat"});
|
117 |
+
});
|
118 |
+
jQuery("body").on("click", ".wplc_retry_chat", function() {
|
119 |
+
Cookies.set('wplc_chat_status', 5);
|
120 |
+
jQuery("#wplc_chatbox").html("");
|
121 |
+
jQuery("#wp-live-chat-4").fadeOut();
|
122 |
+
jQuery("#wp-live-chat-2").fadeIn();
|
123 |
+
jQuery("#wp-live-chat-2-inner").fadeIn();
|
124 |
+
wplc_shown_welcome = false;
|
125 |
+
});
|
126 |
+
jQuery("body").on("click", "#speeching_button", function() {
|
127 |
+
jQuery("#wplc_hovercard").hide();
|
128 |
+
wplc_is_chat_open = true;
|
129 |
+
jQuery.event.trigger({type: "wplc_open_chat"});
|
130 |
+
jQuery("#wp-live-chat-minimize").show();
|
131 |
+
|
132 |
+
});
|
133 |
+
|
134 |
+
jQuery("body").on("click", "#wplc_hovercard_min", function(){
|
135 |
+
jQuery("#wplc_hovercard").fadeOut();
|
136 |
+
});
|
137 |
+
|
138 |
+
jQuery("body").on("click", "#wp-live-chat-header", function(){
|
139 |
+
jQuery("#wplc_hovercard").hide();
|
140 |
+
jQuery("#wp-live-chat").css("height","");
|
141 |
+
jQuery("#wplc-chat-alert").removeClass('is-active');
|
142 |
+
});
|
143 |
+
|
144 |
+
jQuery("body").on("click", "#wp-live-chat-header", function(){
|
145 |
+
//if (!wplc_is_chat_open) {
|
146 |
+
|
147 |
+
if (jQuery(this).hasClass('active')) {
|
148 |
+
jQuery(this).removeClass('active');
|
149 |
+
jQuery.event.trigger({type: "wplc_minimize_chat"});
|
150 |
+
|
151 |
+
Cookies.set('wplc_minimize', "yes", { expires: 1, path: '/' });
|
152 |
+
|
153 |
+
} else {
|
154 |
+
//jQuery(this).addClass('active');
|
155 |
+
jQuery.event.trigger({type: "wplc_open_chat"});
|
156 |
+
jQuery("#wp-live-chat-minimize").show();
|
157 |
+
|
158 |
+
Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
//}
|
165 |
+
});
|
166 |
+
|
167 |
+
});
|
|
js/themes/modern.js
CHANGED
@@ -1,476 +1,474 @@
|
|
1 |
-
jQuery(document).on("bleeper_agent_disconnected", function(e) {
|
2 |
-
var taid = jQuery(".wplc_agent_info").attr('aid');
|
3 |
-
if (taid == e.ndata.aid) {
|
4 |
-
jQuery(".wplc_agent_info").html("");
|
5 |
-
wplc_animate_agent_header_down();
|
6 |
-
jQuery("#wplc_chatbox").css("top","18px");
|
7 |
-
}
|
8 |
-
});
|
9 |
-
jQuery(document).on("bleeper_agent_left", function(e) {
|
10 |
-
var taid = jQuery(".wplc_agent_info").attr('aid');
|
11 |
-
if (taid == e.ndata.agent) {
|
12 |
-
jQuery(".wplc_agent_info").html("");
|
13 |
-
wplc_animate_agent_header_down();
|
14 |
-
jQuery("#wplc_chatbox").css("top","18px");
|
15 |
-
}
|
16 |
-
});
|
17 |
-
|
18 |
-
|
19 |
-
jQuery(document).on("wplc_minimize_chat", function( e ) {
|
20 |
-
wplc_is_chat_open = false;
|
21 |
-
jQuery('#wp-live-chat').height("");
|
22 |
-
if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
|
23 |
-
jQuery("#wp-live-chat").css("left", "");
|
24 |
-
jQuery("#wp-live-chat").css("bottom", "0");
|
25 |
-
jQuery("#wp-live-chat").css("right", "20px");
|
26 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
|
27 |
-
jQuery("#wp-live-chat").css("left", "20px");
|
28 |
-
jQuery("#wp-live-chat").css("bottom", "0");
|
29 |
-
jQuery("#wp-live-chat").css("right", "");
|
30 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
|
31 |
-
jQuery("#wp-live-chat").css("left", "20px");
|
32 |
-
jQuery("#wp-live-chat").css("bottom", "100px");
|
33 |
-
} else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
|
34 |
-
//jQuery("#wp-live-chat").css("left", "");
|
35 |
-
//jQuery("#wp-live-chat").css("right", "0");
|
36 |
-
//jQuery("#wp-live-chat").css("bottom", "100px");
|
37 |
-
//jQuery("#wp-live-chat").css("width", "");
|
38 |
-
}
|
39 |
-
jQuery('#wp-live-chat').addClass("wplc_close");
|
40 |
-
jQuery('#wp-live-chat').removeClass("wplc_open");
|
41 |
-
//jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
|
42 |
-
jQuery("#wp-live-chat").css("top", "");
|
43 |
-
jQuery("#wp-live-chat").css("height", "");
|
44 |
-
jQuery("#wp-live-chat-1").show();
|
45 |
-
jQuery("#wp-live-chat-1").css('cursor', 'pointer');
|
46 |
-
jQuery("#wp-live-chat-2").hide();
|
47 |
-
jQuery("#wp-live-chat-3").hide();
|
48 |
-
jQuery("#wp-live-chat-4").hide();
|
49 |
-
jQuery("#wplc_social_holder").hide();
|
50 |
-
jQuery("#nifty_ratings_holder").hide();
|
51 |
-
jQuery("#nifty_ratings_holder").hide();
|
52 |
-
jQuery("#wp-live-chat-react").hide();
|
53 |
-
jQuery("#wp-live-chat-minimize").hide();
|
54 |
-
|
55 |
-
jQuery("#wp-live-chat-header").show();
|
56 |
-
|
57 |
-
});
|
58 |
-
|
59 |
-
jQuery(document).on("wplc_start_chat", function( e ) {
|
60 |
-
jQuery("#wp-live-chat-2-inner").hide("slow");
|
61 |
-
/* changed in version 7 as we now allow users to start typing immediately */
|
62 |
-
/* jQuery("#wp-live-chat-3").show(); */
|
63 |
-
jQuery.event.trigger({type: "wplc_open_chat_1"});
|
64 |
-
jQuery.event.trigger({type: "wplc_open_chat_2", wplc_online: wplc_online});
|
65 |
-
|
66 |
-
});
|
67 |
-
|
68 |
-
jQuery(document).on( "wplc_open_chat_1", function( e ) {
|
69 |
-
jQuery('#wp-live-chat').removeClass("wplc_close");
|
70 |
-
jQuery('#wp-live-chat').addClass("wplc_open");
|
71 |
-
jQuery("#wp-live-chat-react").hide();
|
72 |
-
|
73 |
-
//jQuery("#wp-live-chat-header").hide();
|
74 |
-
|
75 |
-
Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
|
76 |
-
jQuery("#wp-live-chat-minimize").show();
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
});
|
82 |
-
jQuery(document).on("wplc_agent_joined", function(e) {
|
83 |
-
|
84 |
-
var temail = '';
|
85 |
-
var tname = '';
|
86 |
-
var taid = '';
|
87 |
-
var ta_tagline = '';
|
88 |
-
var ta_bio = '';
|
89 |
-
var ta_social_links = '';
|
90 |
-
|
91 |
-
if (typeof e.ndata.other.email !== "undefined") { temail = e.ndata.other.email; }
|
92 |
-
if (typeof e.ndata.other.name !== "undefined") { tname = e.ndata.other.name; }
|
93 |
-
if (typeof e.ndata.other.aid !== "undefined") { taid = parseInt(e.ndata.other.aid); }
|
94 |
-
if (typeof e.ndata.other.agent_tagline !== "undefined") { ta_tagline = e.ndata.other.agent_tagline; }
|
95 |
-
if (typeof e.ndata.other.agent_bio !== "undefined") { ta_bio = e.ndata.other.agent_bio; }
|
96 |
-
if (typeof e.ndata.other.social_links !== "undefined") { ta_social_links = e.ndata.other.social_links; }
|
97 |
-
|
98 |
-
//Ensure this agent ID is valid before proceeding
|
99 |
-
if(!isNaN(taid)){
|
100 |
-
|
101 |
-
jQuery(".wplc_no_answer").remove();
|
102 |
-
|
103 |
-
jQuery(".admin_chat_name").html(tname);
|
104 |
-
wplc_node_pair_name = tname;
|
105 |
-
wplc_agent_name = tname;
|
106 |
-
|
107 |
-
var timageurl =
|
108 |
-
|
109 |
-
if(jQuery(".wplc_agent_info").html().trim() === "" || typeof jQuery(".wplc_agent_info").attr("aid") === "undefined"){
|
110 |
-
//No Agents have joined yet
|
111 |
-
jQuery(".wplc_agent_info").html('');
|
112 |
-
jQuery(".wplc_agent_info").attr("aid",taid);
|
113 |
-
|
114 |
-
if ( ! jQuery( '#agent_grav_'+taid ).length ) {
|
115 |
-
jQuery('<p/>', {
|
116 |
-
'class': '',
|
117 |
-
'style': 'text-align:center;',
|
118 |
-
html: '<img class="img-thumbnail img-circle wplc_thumb32 wplc_agent_involved" style="max-width:inherit;" id="agent_grav_'+taid+'" title="'+tname+'" src="'+timageurl+'?s=
|
119 |
-
}).appendTo('.wplc_agent_info');
|
120 |
-
|
121 |
-
jQuery('<span/>', {
|
122 |
-
'class': 'bleeper_pullup down',
|
123 |
-
html: '<i class="fa fa-angle-up"></i>'
|
124 |
-
|
125 |
-
}).appendTo('.wplc_agent_info');
|
126 |
-
}
|
127 |
-
|
128 |
-
var csst = "url(https://www.gravatar.com/avatar/20a6e5c8b75ce87f4896f46ed6f49832?s=60);";
|
129 |
-
|
130 |
-
jQuery("#wplc_chatbox_header_bg").css('background-image', 'url('+timageurl+'?s=380)');
|
131 |
-
jQuery("#wplc_chatbox").css("top",
|
132 |
-
jQuery("#wplc_chatbox_header").height()+18+"px"
|
133 |
-
);
|
134 |
-
|
135 |
-
} else {
|
136 |
-
|
137 |
-
var wplc_tracked_agents = jQuery(".wplc_agent_info").attr("aid");
|
138 |
-
var wplc_tracked_agents_object = wplc_tracked_agents.split(",");
|
139 |
-
|
140 |
-
var wplc_tracked_agent_match = false; //No duplicates found yet
|
141 |
-
for(var i in wplc_tracked_agents_object){
|
142 |
-
var wplc_indexed_agent_id = parseInt(wplc_tracked_agents_object[i]);
|
143 |
-
|
144 |
-
if(wplc_indexed_agent_id === taid){
|
145 |
-
//Match - This agent is already being tracked
|
146 |
-
wplc_tracked_agent_match = true;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
if(!wplc_tracked_agent_match) {
|
151 |
-
//Agent is not being tracked yet
|
152 |
-
wplc_tracked_agents += "," + taid;
|
153 |
-
jQuery(".wplc_agent_info").attr("aid", wplc_tracked_agents);
|
154 |
-
|
155 |
-
//Update Names
|
156 |
-
var wplc_current_agent_names = jQuery(".wplc_agent_name").text();
|
157 |
-
jQuery(".wplc_agent_name").text(wplc_current_agent_names + ", " + tname);
|
158 |
-
|
159 |
-
//Hide the tagline, it is not needed for two agents in my opinion - Dylan Auty
|
160 |
-
jQuery(".wplc_agent_tagline").hide();
|
161 |
-
|
162 |
-
//Hide social links, it is too cluttered to add more here
|
163 |
-
jQuery(".wplc_agent_social_links").hide();
|
164 |
-
|
165 |
-
//Change the way the images are displayed
|
166 |
-
jQuery("img.wplc_agent_involved").removeClass("wplc_thumb32").addClass("wplc_thumb16_stacked");
|
167 |
-
|
168 |
-
//Add the new agents image as well
|
169 |
-
var wplc_new_agent_grav = '<img class="img-thumbnail img-circle wplc_thumb16_stacked wplc_agent_involved" style="max-width:inherit;" id="agent_grav_'+taid+'" title="'+tname+'" src="'+timageurl+'?s=
|
170 |
-
jQuery(wplc_new_agent_grav).insertAfter("img.wplc_agent_involved:last");
|
171 |
-
|
172 |
-
//Update the height of the header
|
173 |
-
jQuery("#wplc_chatbox_header").css("max-height", jQuery("#wplc_chatbox_header").outerHeight());
|
174 |
-
jQuery("#wplc_chatbox").css("top", jQuery("#wplc_chatbox_header").height()+"px"); //Final update incase anything has changes
|
175 |
-
|
176 |
-
|
177 |
-
jQuery("#wplc_chatbox_header_bg").css("background-image", "none");
|
178 |
-
}
|
179 |
-
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
|
184 |
-
});
|
185 |
-
|
186 |
-
jQuery(document).on("bleeper_build_involved_agents_header", function(e){
|
187 |
-
if(typeof e.ndata !== "undefined"){
|
188 |
-
if(typeof e.ndata.chatid !== "undefined" && typeof e.ndata.agents !== "undefined"){
|
189 |
-
if(e.ndata.chatid === chatid){
|
190 |
-
var agent_match = e.ndata.agents;
|
191 |
-
for(var i in agent_match){
|
192 |
-
var current_agent = agent_match[i];
|
193 |
-
|
194 |
-
if(typeof wplc_agent_data[current_agent] !== "undefined"){
|
195 |
-
wplc_agent_data[current_agent].md5;
|
196 |
-
wplc_agent_data[current_agent].name;
|
197 |
-
|
198 |
-
var other = {
|
199 |
-
email: wplc_agent_data[current_agent].md5,
|
200 |
-
name: wplc_agent_data[current_agent].name,
|
201 |
-
aid: current_agent
|
202 |
-
};
|
203 |
-
|
204 |
-
jQuery.event.trigger({type: "wplc_agent_joined", ndata: {other: other}});
|
205 |
-
}
|
206 |
-
}
|
207 |
-
}
|
208 |
-
}
|
209 |
-
}
|
210 |
-
});
|
211 |
-
|
212 |
-
|
213 |
-
jQuery(document).on("wplc_animation_done", function(e) {
|
214 |
-
|
215 |
-
jQuery("#nifty_text_editor_holder").remove();
|
216 |
-
jQuery("#wplc_msg_notice").remove();
|
217 |
-
jQuery("#wp-live-chat-minimize").remove();
|
218 |
-
|
219 |
-
jQuery("#wplc_logo").prependTo("#wplc_chatbox_header");
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
if (jQuery("wplc_chatbox").hasClass("wplc-shrink")) {
|
226 |
-
/**
|
227 |
-
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
228 |
-
*/
|
229 |
-
jQuery("#wplc_chatbox").css("top",
|
230 |
-
jQuery("#wplc_chatbox_header").height()+18+"px"
|
231 |
-
);
|
232 |
-
jQuery("#wplc_logo").show();
|
233 |
-
} else {
|
234 |
-
/**
|
235 |
-
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
236 |
-
*/
|
237 |
-
jQuery("#wplc_chatbox").css("top",
|
238 |
-
jQuery("#wplc_chatbox_header").height()+18+"px"
|
239 |
-
);
|
240 |
-
jQuery("#wplc_logo").hide();
|
241 |
-
}
|
242 |
-
jQuery("#wplc_chatbox").css("bottom", "0");
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
});
|
247 |
-
jQuery(document).on( "wplc_open_chat_2", function( e ) {
|
248 |
-
|
249 |
-
wplc_chat_status = Cookies.get('wplc_chat_status');
|
250 |
-
|
251 |
-
|
252 |
-
if (Cookies.get('wplc_minimize') === 'yes'
|
253 |
-
|
254 |
-
jQuery("#wp-live-chat-1").hide();
|
255 |
-
jQuery("#wp-live-chat-2-inner").hide();
|
256 |
-
|
257 |
-
jQuery("#wp-live-chat-2").show();
|
258 |
-
|
259 |
-
if(!jQuery("#wp-live-chat-header").hasClass("active")){
|
260 |
-
jQuery("#wplc_chatmsg").focus();
|
261 |
-
}
|
262 |
-
|
263 |
-
jQuery("#wp-live-chat-header").addClass("active");
|
264 |
-
jQuery("#wp-live-chat").addClass("mobile-active");
|
265 |
-
|
266 |
-
|
267 |
-
wplc_chat_status = Cookies.get('wplc_chat_status');
|
268 |
-
|
269 |
-
if (typeof e.wplc_online !== "undefined" && e.wplc_online === true) {
|
270 |
-
jQuery("#wp-live-chat-4").show();
|
271 |
-
jQuery("#wplc_social_holder").show();
|
272 |
-
jQuery("#nifty_ratings_holder").show();
|
273 |
-
jQuery.event.trigger({type: "wplc_animation_done"});
|
274 |
-
|
275 |
-
|
276 |
-
}
|
277 |
-
setTimeout(function() {
|
278 |
-
wplc_scroll_to_bottom();
|
279 |
-
},1000);
|
280 |
-
|
281 |
-
jQuery("#wp-live-chat-3").hide();
|
282 |
-
jQuery("#wplc_chatmsg").focus();
|
283 |
-
jQuery("#wp-live-chat-minimize").css("right","23px");
|
284 |
-
Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
285 |
-
}
|
286 |
-
|
287 |
-
|
288 |
-
});
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
var wplc_leave_window_alone = false;
|
293 |
-
var wplc_currently_animating_agent_header = false;
|
294 |
-
|
295 |
-
jQuery(function() {
|
296 |
-
|
297 |
-
|
298 |
-
jQuery("body").on("mousewheel", "#wplc_chatbox", function(turn, delta){
|
299 |
-
|
300 |
-
if (delta == 1) {
|
301 |
-
/**
|
302 |
-
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
303 |
-
*/
|
304 |
-
|
305 |
-
wplc_animate_agent_header_up();
|
306 |
-
|
307 |
-
} else {
|
308 |
-
// going down
|
309 |
-
/**
|
310 |
-
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
311 |
-
*/
|
312 |
-
wplc_animate_agent_header_down();
|
313 |
-
|
314 |
-
}
|
315 |
-
|
316 |
-
});
|
317 |
-
|
318 |
-
jQuery("body").on("click", ".bleeper_pullup", function() {
|
319 |
-
if (jQuery(".bleeper_pullup").hasClass('down')) {
|
320 |
-
wplc_animate_agent_header_down();
|
321 |
-
|
322 |
-
} else {
|
323 |
-
wplc_animate_agent_header_up();
|
324 |
-
|
325 |
-
}
|
326 |
-
});
|
327 |
-
|
328 |
-
|
329 |
-
//opens chat when clicked on top bar
|
330 |
-
jQuery("body").on("click", "#wp-live-chat-header", function() {
|
331 |
-
|
332 |
-
|
333 |
-
});
|
334 |
-
|
335 |
-
|
336 |
-
jQuery("body").on("click", ".wplc_retry_chat", function() {
|
337 |
-
jQuery("#wplc_chatbox").html("");
|
338 |
-
jQuery("#wp-live-chat-4").fadeOut();
|
339 |
-
Cookies.remove('wplc_chat_status');
|
340 |
-
jQuery("#wp-live-chat-2-inner").fadeIn();
|
341 |
-
wplc_shown_welcome = false;
|
342 |
-
});
|
343 |
-
|
344 |
-
|
345 |
-
jQuery("body").on("click", "#wp-live-chat-header", function(){
|
346 |
-
//if (!wplc_is_chat_open) {
|
347 |
-
|
348 |
-
if (jQuery(this).hasClass('active')) {
|
349 |
-
jQuery("#wplc_hovercard").fadeOut("fast");
|
350 |
-
jQuery("#wp-live-chat-2").fadeOut("fast");
|
351 |
-
jQuery(this).removeClass('active');
|
352 |
-
jQuery.event.trigger({type: "wplc_minimize_chat"});
|
353 |
-
|
354 |
-
Cookies.set('wplc_minimize', "yes", { expires: 1, path: '/' });
|
355 |
-
|
356 |
-
} else {
|
357 |
-
jQuery("#wplc_hovercard").fadeIn('fast');
|
358 |
-
jQuery(this).addClass('active');
|
359 |
-
|
360 |
-
wplc_chat_status = Cookies.get('wplc_chat_status');
|
361 |
-
nc_status = Cookies.get('nc_status');
|
362 |
-
if (parseInt(wplc_chat_status) == 3 || parseInt(wplc_chat_status) == 2 || parseInt(wplc_chat_status) == 0 || parseInt(wplc_chat_status) == 12 || parseInt(wplc_chat_status) == 10 || nc_status === 'active') {
|
363 |
-
|
364 |
-
jQuery("#bleeper_bell").hide();
|
365 |
-
|
366 |
-
jQuery("#speeching_button").click();
|
367 |
-
}
|
368 |
-
|
369 |
-
//Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
370 |
-
|
371 |
-
}
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
jQuery("
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
jQuery("#wplc_chatbox_header").
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
jQuery(".bleeper_pullup").
|
434 |
-
jQuery(".bleeper_pullup").
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
jQuery("#
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
jQuery("#
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
jQuery(".bleeper_pullup").
|
471 |
-
jQuery(".bleeper_pullup").
|
472 |
-
|
473 |
-
|
474 |
-
}
|
475 |
-
|
476 |
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
|
1 |
+
jQuery(document).on("bleeper_agent_disconnected", function(e) {
|
2 |
+
var taid = jQuery(".wplc_agent_info").attr('aid');
|
3 |
+
if (taid == e.ndata.aid) {
|
4 |
+
jQuery(".wplc_agent_info").html("");
|
5 |
+
wplc_animate_agent_header_down();
|
6 |
+
jQuery("#wplc_chatbox").css("top","18px");
|
7 |
+
}
|
8 |
+
});
|
9 |
+
jQuery(document).on("bleeper_agent_left", function(e) {
|
10 |
+
var taid = jQuery(".wplc_agent_info").attr('aid');
|
11 |
+
if (taid == e.ndata.agent) {
|
12 |
+
jQuery(".wplc_agent_info").html("");
|
13 |
+
wplc_animate_agent_header_down();
|
14 |
+
jQuery("#wplc_chatbox").css("top","18px");
|
15 |
+
}
|
16 |
+
});
|
17 |
+
|
18 |
+
|
19 |
+
jQuery(document).on("wplc_minimize_chat", function( e ) {
|
20 |
+
wplc_is_chat_open = false;
|
21 |
+
jQuery('#wp-live-chat').height("");
|
22 |
+
if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_right"){
|
23 |
+
jQuery("#wp-live-chat").css("left", "");
|
24 |
+
jQuery("#wp-live-chat").css("bottom", "0");
|
25 |
+
jQuery("#wp-live-chat").css("right", "20px");
|
26 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "bottom_left"){
|
27 |
+
jQuery("#wp-live-chat").css("left", "20px");
|
28 |
+
jQuery("#wp-live-chat").css("bottom", "0");
|
29 |
+
jQuery("#wp-live-chat").css("right", "");
|
30 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "left"){
|
31 |
+
jQuery("#wp-live-chat").css("left", "20px");
|
32 |
+
jQuery("#wp-live-chat").css("bottom", "100px");
|
33 |
+
} else if(jQuery("#wp-live-chat").attr("original_pos") === "right"){
|
34 |
+
//jQuery("#wp-live-chat").css("left", "");
|
35 |
+
//jQuery("#wp-live-chat").css("right", "0");
|
36 |
+
//jQuery("#wp-live-chat").css("bottom", "100px");
|
37 |
+
//jQuery("#wp-live-chat").css("width", "");
|
38 |
+
}
|
39 |
+
jQuery('#wp-live-chat').addClass("wplc_close");
|
40 |
+
jQuery('#wp-live-chat').removeClass("wplc_open");
|
41 |
+
//jQuery("#wp-live-chat").css(jQuery("#wp-live-chat").attr("original_pos"), "100px");
|
42 |
+
jQuery("#wp-live-chat").css("top", "");
|
43 |
+
jQuery("#wp-live-chat").css("height", "");
|
44 |
+
jQuery("#wp-live-chat-1").show();
|
45 |
+
jQuery("#wp-live-chat-1").css('cursor', 'pointer');
|
46 |
+
jQuery("#wp-live-chat-2").hide();
|
47 |
+
jQuery("#wp-live-chat-3").hide();
|
48 |
+
jQuery("#wp-live-chat-4").hide();
|
49 |
+
jQuery("#wplc_social_holder").hide();
|
50 |
+
jQuery("#nifty_ratings_holder").hide();
|
51 |
+
jQuery("#nifty_ratings_holder").hide();
|
52 |
+
jQuery("#wp-live-chat-react").hide();
|
53 |
+
jQuery("#wp-live-chat-minimize").hide();
|
54 |
+
|
55 |
+
jQuery("#wp-live-chat-header").show();
|
56 |
+
|
57 |
+
});
|
58 |
+
|
59 |
+
jQuery(document).on("wplc_start_chat", function( e ) {
|
60 |
+
jQuery("#wp-live-chat-2-inner").hide("slow");
|
61 |
+
/* changed in version 7 as we now allow users to start typing immediately */
|
62 |
+
/* jQuery("#wp-live-chat-3").show(); */
|
63 |
+
jQuery.event.trigger({type: "wplc_open_chat_1"});
|
64 |
+
jQuery.event.trigger({type: "wplc_open_chat_2", wplc_online: wplc_online});
|
65 |
+
|
66 |
+
});
|
67 |
+
|
68 |
+
jQuery(document).on( "wplc_open_chat_1", function( e ) {
|
69 |
+
jQuery('#wp-live-chat').removeClass("wplc_close");
|
70 |
+
jQuery('#wp-live-chat').addClass("wplc_open");
|
71 |
+
jQuery("#wp-live-chat-react").hide();
|
72 |
+
|
73 |
+
//jQuery("#wp-live-chat-header").hide();
|
74 |
+
|
75 |
+
Cookies.set('wplc_hide', "", { expires: 1, path: '/' });
|
76 |
+
jQuery("#wp-live-chat-minimize").show();
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
});
|
82 |
+
jQuery(document).on("wplc_agent_joined", function(e) {
|
83 |
+
|
84 |
+
var temail = '';
|
85 |
+
var tname = '';
|
86 |
+
var taid = '';
|
87 |
+
var ta_tagline = '';
|
88 |
+
var ta_bio = '';
|
89 |
+
var ta_social_links = '';
|
90 |
+
|
91 |
+
if (typeof e.ndata.other.email !== "undefined") { temail = e.ndata.other.email; }
|
92 |
+
if (typeof e.ndata.other.name !== "undefined") { tname = e.ndata.other.name; }
|
93 |
+
if (typeof e.ndata.other.aid !== "undefined") { taid = parseInt(e.ndata.other.aid); }
|
94 |
+
if (typeof e.ndata.other.agent_tagline !== "undefined") { ta_tagline = e.ndata.other.agent_tagline; }
|
95 |
+
if (typeof e.ndata.other.agent_bio !== "undefined") { ta_bio = e.ndata.other.agent_bio; }
|
96 |
+
if (typeof e.ndata.other.social_links !== "undefined") { ta_social_links = e.ndata.other.social_links; }
|
97 |
+
|
98 |
+
//Ensure this agent ID is valid before proceeding
|
99 |
+
if(!isNaN(taid)){
|
100 |
+
|
101 |
+
jQuery(".wplc_no_answer").remove();
|
102 |
+
|
103 |
+
jQuery(".admin_chat_name").html(tname);
|
104 |
+
wplc_node_pair_name = tname;
|
105 |
+
wplc_agent_name = tname;
|
106 |
+
|
107 |
+
var timageurl = 'https://www.gravatar.com/avatar/'+temail;
|
108 |
+
|
109 |
+
if(jQuery(".wplc_agent_info").html().trim() === "" || typeof jQuery(".wplc_agent_info").attr("aid") === "undefined"){
|
110 |
+
//No Agents have joined yet
|
111 |
+
jQuery(".wplc_agent_info").html('');
|
112 |
+
jQuery(".wplc_agent_info").attr("aid",taid);
|
113 |
+
|
114 |
+
if ( ! jQuery( '#agent_grav_'+taid ).length ) {
|
115 |
+
jQuery('<p/>', {
|
116 |
+
'class': '',
|
117 |
+
'style': 'text-align:center;',
|
118 |
+
html: '<img class="img-thumbnail img-circle wplc_thumb32 wplc_agent_involved" style="max-width:inherit;" id="agent_grav_'+taid+'" title="'+tname+'" src="'+timageurl+'?s=40" /><br /><span class="wplc_agent_name wplc-color-2">'+tname+'</span>'+ta_tagline+ta_bio+ta_social_links
|
119 |
+
}).appendTo('.wplc_agent_info');
|
120 |
+
|
121 |
+
jQuery('<span/>', {
|
122 |
+
'class': 'bleeper_pullup down',
|
123 |
+
html: '<i class="fa fa-angle-up"></i>'
|
124 |
+
|
125 |
+
}).appendTo('.wplc_agent_info');
|
126 |
+
}
|
127 |
+
|
128 |
+
var csst = "url(https://www.gravatar.com/avatar/20a6e5c8b75ce87f4896f46ed6f49832?s=60);";
|
129 |
+
|
130 |
+
jQuery("#wplc_chatbox_header_bg").css('background-image', 'url('+timageurl+'?s=380)');
|
131 |
+
jQuery("#wplc_chatbox").css("top",
|
132 |
+
jQuery("#wplc_chatbox_header").height()+18+"px"
|
133 |
+
);
|
134 |
+
|
135 |
+
} else {
|
136 |
+
|
137 |
+
var wplc_tracked_agents = jQuery(".wplc_agent_info").attr("aid");
|
138 |
+
var wplc_tracked_agents_object = wplc_tracked_agents.split(",");
|
139 |
+
|
140 |
+
var wplc_tracked_agent_match = false; //No duplicates found yet
|
141 |
+
for(var i in wplc_tracked_agents_object){
|
142 |
+
var wplc_indexed_agent_id = parseInt(wplc_tracked_agents_object[i]);
|
143 |
+
|
144 |
+
if(wplc_indexed_agent_id === taid){
|
145 |
+
//Match - This agent is already being tracked
|
146 |
+
wplc_tracked_agent_match = true;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
if(!wplc_tracked_agent_match) {
|
151 |
+
//Agent is not being tracked yet
|
152 |
+
wplc_tracked_agents += "," + taid;
|
153 |
+
jQuery(".wplc_agent_info").attr("aid", wplc_tracked_agents);
|
154 |
+
|
155 |
+
//Update Names
|
156 |
+
var wplc_current_agent_names = jQuery(".wplc_agent_name").text();
|
157 |
+
jQuery(".wplc_agent_name").text(wplc_current_agent_names + ", " + tname);
|
158 |
+
|
159 |
+
//Hide the tagline, it is not needed for two agents in my opinion - Dylan Auty
|
160 |
+
jQuery(".wplc_agent_tagline").hide();
|
161 |
+
|
162 |
+
//Hide social links, it is too cluttered to add more here
|
163 |
+
jQuery(".wplc_agent_social_links").hide();
|
164 |
+
|
165 |
+
//Change the way the images are displayed
|
166 |
+
jQuery("img.wplc_agent_involved").removeClass("wplc_thumb32").addClass("wplc_thumb16_stacked");
|
167 |
+
|
168 |
+
//Add the new agents image as well
|
169 |
+
var wplc_new_agent_grav = '<img class="img-thumbnail img-circle wplc_thumb16_stacked wplc_agent_involved" style="max-width:inherit;" id="agent_grav_'+taid+'" title="'+tname+'" src="'+timageurl+'?s=40" />';
|
170 |
+
jQuery(wplc_new_agent_grav).insertAfter("img.wplc_agent_involved:last");
|
171 |
+
|
172 |
+
//Update the height of the header
|
173 |
+
jQuery("#wplc_chatbox_header").css("max-height", jQuery("#wplc_chatbox_header").outerHeight());
|
174 |
+
jQuery("#wplc_chatbox").css("top", jQuery("#wplc_chatbox_header").height()+"px"); //Final update incase anything has changes
|
175 |
+
|
176 |
+
|
177 |
+
jQuery("#wplc_chatbox_header_bg").css("background-image", "none");
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
});
|
185 |
+
|
186 |
+
jQuery(document).on("bleeper_build_involved_agents_header", function(e){
|
187 |
+
if(typeof e.ndata !== "undefined"){
|
188 |
+
if(typeof e.ndata.chatid !== "undefined" && typeof e.ndata.agents !== "undefined"){
|
189 |
+
if(e.ndata.chatid === chatid){
|
190 |
+
var agent_match = e.ndata.agents;
|
191 |
+
for(var i in agent_match){
|
192 |
+
var current_agent = agent_match[i];
|
193 |
+
|
194 |
+
if(typeof wplc_agent_data[current_agent] !== "undefined"){
|
195 |
+
wplc_agent_data[current_agent].md5;
|
196 |
+
wplc_agent_data[current_agent].name;
|
197 |
+
|
198 |
+
var other = {
|
199 |
+
email: wplc_agent_data[current_agent].md5,
|
200 |
+
name: wplc_agent_data[current_agent].name,
|
201 |
+
aid: current_agent
|
202 |
+
};
|
203 |
+
|
204 |
+
jQuery.event.trigger({type: "wplc_agent_joined", ndata: {other: other}});
|
205 |
+
}
|
206 |
+
}
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
+
});
|
211 |
+
|
212 |
+
|
213 |
+
jQuery(document).on("wplc_animation_done", function(e) {
|
214 |
+
|
215 |
+
jQuery("#nifty_text_editor_holder").remove();
|
216 |
+
jQuery("#wplc_msg_notice").remove();
|
217 |
+
jQuery("#wp-live-chat-minimize").remove();
|
218 |
+
|
219 |
+
jQuery("#wplc_logo").prependTo("#wplc_chatbox_header");
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
if (jQuery("wplc_chatbox").hasClass("wplc-shrink")) {
|
226 |
+
/**
|
227 |
+
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
228 |
+
*/
|
229 |
+
jQuery("#wplc_chatbox").css("top",
|
230 |
+
jQuery("#wplc_chatbox_header").height()+18+"px"
|
231 |
+
);
|
232 |
+
jQuery("#wplc_logo").show();
|
233 |
+
} else {
|
234 |
+
/**
|
235 |
+
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
236 |
+
*/
|
237 |
+
jQuery("#wplc_chatbox").css("top",
|
238 |
+
jQuery("#wplc_chatbox_header").height()+18+"px"
|
239 |
+
);
|
240 |
+
jQuery("#wplc_logo").hide();
|
241 |
+
}
|
242 |
+
jQuery("#wplc_chatbox").css("bottom", "0");
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
});
|
247 |
+
jQuery(document).on( "wplc_open_chat_2", function( e ) {
|
248 |
+
|
249 |
+
wplc_chat_status = Cookies.get('wplc_chat_status');
|
250 |
+
|
251 |
+
|
252 |
+
if (Cookies.get('wplc_minimize') === 'yes') { } else {
|
253 |
+
|
254 |
+
jQuery("#wp-live-chat-1").hide();
|
255 |
+
jQuery("#wp-live-chat-2-inner").hide();
|
256 |
+
|
257 |
+
jQuery("#wp-live-chat-2").show();
|
258 |
+
|
259 |
+
if(!jQuery("#wp-live-chat-header").hasClass("active")){
|
260 |
+
jQuery("#wplc_chatmsg").focus();
|
261 |
+
}
|
262 |
+
|
263 |
+
jQuery("#wp-live-chat-header").addClass("active");
|
264 |
+
jQuery("#wp-live-chat").addClass("mobile-active");
|
265 |
+
|
266 |
+
|
267 |
+
wplc_chat_status = Cookies.get('wplc_chat_status');
|
268 |
+
|
269 |
+
if (typeof e.wplc_online !== "undefined" && e.wplc_online === true) {
|
270 |
+
jQuery("#wp-live-chat-4").show();
|
271 |
+
jQuery("#wplc_social_holder").show();
|
272 |
+
jQuery("#nifty_ratings_holder").show();
|
273 |
+
jQuery.event.trigger({type: "wplc_animation_done"});
|
274 |
+
|
275 |
+
|
276 |
+
}
|
277 |
+
setTimeout(function() {
|
278 |
+
wplc_scroll_to_bottom();
|
279 |
+
},1000);
|
280 |
+
|
281 |
+
jQuery("#wp-live-chat-3").hide();
|
282 |
+
jQuery("#wplc_chatmsg").focus();
|
283 |
+
jQuery("#wp-live-chat-minimize").css("right","23px");
|
284 |
+
Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
285 |
+
}
|
286 |
+
|
287 |
+
|
288 |
+
});
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
var wplc_leave_window_alone = false;
|
293 |
+
var wplc_currently_animating_agent_header = false;
|
294 |
+
|
295 |
+
jQuery(document).ready(function() {
|
296 |
+
|
297 |
+
|
298 |
+
jQuery("body").on("mousewheel", "#wplc_chatbox", function(turn, delta){
|
299 |
+
|
300 |
+
if (delta == 1) {
|
301 |
+
/**
|
302 |
+
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
303 |
+
*/
|
304 |
+
|
305 |
+
wplc_animate_agent_header_up();
|
306 |
+
|
307 |
+
} else {
|
308 |
+
// going down
|
309 |
+
/**
|
310 |
+
* The +18px is to compensate for the 18px of padding at the bottom of the header box
|
311 |
+
*/
|
312 |
+
wplc_animate_agent_header_down();
|
313 |
+
|
314 |
+
}
|
315 |
+
|
316 |
+
});
|
317 |
+
|
318 |
+
jQuery("body").on("click", ".bleeper_pullup", function() {
|
319 |
+
if (jQuery(".bleeper_pullup").hasClass('down')) {
|
320 |
+
wplc_animate_agent_header_down();
|
321 |
+
|
322 |
+
} else {
|
323 |
+
wplc_animate_agent_header_up();
|
324 |
+
|
325 |
+
}
|
326 |
+
});
|
327 |
+
|
328 |
+
|
329 |
+
//opens chat when clicked on top bar
|
330 |
+
jQuery("body").on("click", "#wp-live-chat-header", function() {
|
331 |
+
|
332 |
+
|
333 |
+
});
|
334 |
+
|
335 |
+
|
336 |
+
jQuery("body").on("click", ".wplc_retry_chat", function() {
|
337 |
+
jQuery("#wplc_chatbox").html("");
|
338 |
+
jQuery("#wp-live-chat-4").fadeOut();
|
339 |
+
Cookies.remove('wplc_chat_status');
|
340 |
+
jQuery("#wp-live-chat-2-inner").fadeIn();
|
341 |
+
wplc_shown_welcome = false;
|
342 |
+
});
|
343 |
+
|
344 |
+
|
345 |
+
jQuery("body").on("click", "#wp-live-chat-header", function(){
|
346 |
+
//if (!wplc_is_chat_open) {
|
347 |
+
|
348 |
+
if (jQuery(this).hasClass('active')) {
|
349 |
+
jQuery("#wplc_hovercard").fadeOut("fast");
|
350 |
+
jQuery("#wp-live-chat-2").fadeOut("fast");
|
351 |
+
jQuery(this).removeClass('active');
|
352 |
+
jQuery.event.trigger({type: "wplc_minimize_chat"});
|
353 |
+
|
354 |
+
Cookies.set('wplc_minimize', "yes", { expires: 1, path: '/' });
|
355 |
+
|
356 |
+
} else {
|
357 |
+
jQuery("#wplc_hovercard").fadeIn('fast');
|
358 |
+
jQuery(this).addClass('active');
|
359 |
+
|
360 |
+
wplc_chat_status = Cookies.get('wplc_chat_status');
|
361 |
+
nc_status = Cookies.get('nc_status');
|
362 |
+
if (parseInt(wplc_chat_status) == 3 || parseInt(wplc_chat_status) == 2 || parseInt(wplc_chat_status) == 0 || parseInt(wplc_chat_status) == 12 || parseInt(wplc_chat_status) == 10 || nc_status === 'active') {
|
363 |
+
|
364 |
+
jQuery("#bleeper_bell").hide();
|
365 |
+
|
366 |
+
jQuery("#speeching_button").click();
|
367 |
+
}
|
368 |
+
|
369 |
+
//Cookies.set('wplc_minimize', "", { expires: 1, path: '/' });
|
370 |
+
|
371 |
+
}
|
372 |
+
|
373 |
+
|
374 |
+
|
375 |
+
//}
|
376 |
+
});
|
377 |
+
jQuery("body").on("click", "#wplc_hovercard_min", function() {
|
378 |
+
jQuery("#wplc_hovercard").fadeOut('fast');
|
379 |
+
});
|
380 |
+
jQuery("body").on("click", "#speeching_button", function() {
|
381 |
+
jQuery("#wplc_hovercard").fadeOut("fast");
|
382 |
+
jQuery("#wplc-chat-alert").removeClass('is-active');
|
383 |
+
wplc_is_chat_open = true;
|
384 |
+
jQuery.event.trigger({type: "wplc_open_chat"});
|
385 |
+
|
386 |
+
});
|
387 |
+
jQuery("body").on("click", "#wp-live-chat-minimize", function() {
|
388 |
+
|
389 |
+
jQuery("#wp-live-chat-header").removeClass('active');
|
390 |
+
});
|
391 |
+
|
392 |
+
|
393 |
+
|
394 |
+
|
395 |
+
|
396 |
+
|
397 |
+
|
398 |
+
|
399 |
+
|
400 |
+
});
|
401 |
+
|
402 |
+
|
403 |
+
|
404 |
+
function wplc_animate_agent_header_up() {
|
405 |
+
if(!wplc_currently_animating_agent_header && jQuery("#wplc_chatbox_header").hasClass("wplc-shrink") && jQuery('#wplc_chatbox_header .wplc_agent_info:first-child').html() !== ""){
|
406 |
+
wplc_currently_animating_agent_header = true;
|
407 |
+
jQuery("#wplc_chatbox_header").removeClass("wplc-shrink");
|
408 |
+
|
409 |
+
jQuery("#wplc_chatbox_header").animate(
|
410 |
+
{ maxHeight: "280px", },
|
411 |
+
{
|
412 |
+
duration: 700,
|
413 |
+
complete: function() {
|
414 |
+
// Animation complete
|
415 |
+
|
416 |
+
jQuery("#wplc_logo").show();
|
417 |
+
wplc_currently_animating_agent_header = false;
|
418 |
+
|
419 |
+
jQuery("#wplc_chatbox_header").css("max-height", jQuery("#wplc_chatbox_header").outerHeight());
|
420 |
+
jQuery("#wplc_chatbox").css("top", jQuery("#wplc_chatbox_header").height()+18+"px"); //Final update incase anything has changes
|
421 |
+
|
422 |
+
|
423 |
+
},
|
424 |
+
progress: function() {
|
425 |
+
jQuery("#wplc_chatbox").css("top", jQuery("#wplc_chatbox_header").height()+18+"px"); //Live movement updates
|
426 |
+
|
427 |
+
}
|
428 |
+
}
|
429 |
+
);
|
430 |
+
}
|
431 |
+
jQuery(".bleeper_pullup").removeClass('up');
|
432 |
+
jQuery(".bleeper_pullup").addClass('down');
|
433 |
+
jQuery(".bleeper_pullup").html("<i class='fa fa-angle-up'></i>");
|
434 |
+
jQuery(".bleeper_pullup").css('bottom','5px');
|
435 |
+
}
|
436 |
+
function wplc_animate_agent_header_down() {
|
437 |
+
if(!wplc_currently_animating_agent_header && !jQuery("#wplc_chatbox_header").hasClass("wplc-shrink") && jQuery('#wplc_chatbox_header .wplc_agent_info:first-child').html() !== ""){
|
438 |
+
wplc_currently_animating_agent_header = true;
|
439 |
+
|
440 |
+
jQuery("#wplc_chatbox_header").addClass("wplc-shrink");
|
441 |
+
|
442 |
+
jQuery("#wplc_chatbox").css("top", "50px");
|
443 |
+
|
444 |
+
|
445 |
+
jQuery("#wplc_chatbox_header").animate(
|
446 |
+
{ height: "50px", maxHeight: "50px"},
|
447 |
+
{
|
448 |
+
duration: 200,
|
449 |
+
start: function(){
|
450 |
+
jQuery("#wplc_logo").hide();
|
451 |
+
|
452 |
+
},
|
453 |
+
complete: function() {
|
454 |
+
// Animation complete
|
455 |
+
wplc_currently_animating_agent_header = false;
|
456 |
+
|
457 |
+
jQuery("#wplc_chatbox_header").css("max-height", "50px");
|
458 |
+
jQuery("#wplc_chatbox_header").css("height", "auto");
|
459 |
+
|
460 |
+
//jQuery("#wplc_chatbox").css("top", jQuery("#wplc_chatbox_header").height()+18+"px");
|
461 |
+
|
462 |
+
|
463 |
+
}
|
464 |
+
}
|
465 |
+
);
|
466 |
+
|
467 |
+
}
|
468 |
+
jQuery(".bleeper_pullup").removeClass('down');
|
469 |
+
jQuery(".bleeper_pullup").addClass('up');
|
470 |
+
jQuery(".bleeper_pullup").html("<i class='fa fa-angle-down'></i>");
|
471 |
+
jQuery(".bleeper_pullup").css('bottom','0px');
|
472 |
+
}
|
473 |
+
|
|
|
|
|
474 |
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
|
js/toastr.js
CHANGED
File without changes
|
js/wplc-admin-modal.js
CHANGED
@@ -5,7 +5,7 @@ var wplc_modal_cancel_callback = null;
|
|
5 |
var wplc_modal_confirm_closes_modal = true;
|
6 |
|
7 |
jQuery(function(){
|
8 |
-
jQuery(function(){
|
9 |
jQuery("body").on("click", ".wplc_modal_trigger_open", function(){
|
10 |
var current_modal_id = jQuery(this).attr("modal_id");
|
11 |
jQuery("#wplc_modal_" + current_modal_id).fadeIn();
|
@@ -61,7 +61,7 @@ function wplc_modal_remove_callback(){
|
|
61 |
|
62 |
(function($) {
|
63 |
|
64 |
-
$(function(event) {
|
65 |
if(!window.wdtEmojiBundle)
|
66 |
return;
|
67 |
|
5 |
var wplc_modal_confirm_closes_modal = true;
|
6 |
|
7 |
jQuery(function(){
|
8 |
+
jQuery(document).ready(function(){
|
9 |
jQuery("body").on("click", ".wplc_modal_trigger_open", function(){
|
10 |
var current_modal_id = jQuery(this).attr("modal_id");
|
11 |
jQuery("#wplc_modal_" + current_modal_id).fadeIn();
|
61 |
|
62 |
(function($) {
|
63 |
|
64 |
+
$(document).ready(function(event) {
|
65 |
if(!window.wdtEmojiBundle)
|
66 |
return;
|
67 |
|
js/wplc-admin-pointers.js
CHANGED
@@ -36,7 +36,7 @@ wp_button_pointer_array[5] = {
|
|
36 |
};
|
37 |
|
38 |
|
39 |
-
jQuery(function($) {
|
40 |
|
41 |
jQuery('body').on("click", ".wplc_initiate_chat", function (e) {
|
42 |
e.preventDefault();
|
36 |
};
|
37 |
|
38 |
|
39 |
+
jQuery(document).ready( function($) {
|
40 |
|
41 |
jQuery('body').on("click", ".wplc_initiate_chat", function (e) {
|
42 |
e.preventDefault();
|
js/wplc_admin_dynamic_translations.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
jQuery(function(){
|
2 |
-
jQuery(document).on("bleeper_dom_ready", function(e) {
|
3 |
-
if(typeof wplc_dynamic_translation_array !== "undefined"){
|
4 |
-
for(var index in wplc_dynamic_translation_array){
|
5 |
-
jQuery("#" + index).html(wplc_dynamic_translation_array[index]);
|
6 |
-
}
|
7 |
-
}
|
8 |
-
});
|
9 |
});
|
1 |
+
jQuery(function(){
|
2 |
+
jQuery(document).on("bleeper_dom_ready", function(e) {
|
3 |
+
if(typeof wplc_dynamic_translation_array !== "undefined"){
|
4 |
+
for(var index in wplc_dynamic_translation_array){
|
5 |
+
jQuery("#" + index).html(wplc_dynamic_translation_array[index]);
|
6 |
+
}
|
7 |
+
}
|
8 |
+
});
|
9 |
});
|
js/wplc_admin_popup.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
(function($) {
|
2 |
-
|
3 |
-
$(function(event) {
|
4 |
-
var container = "#wpbody";
|
5 |
-
|
6 |
-
if($("#editor.gutenberg__editor").length)
|
7 |
-
container = "#editor.gutenberg__editor";
|
8 |
-
|
9 |
-
$(".floating-right-toolbar i").draggable({
|
10 |
-
snap: container,
|
11 |
-
containment: container // This prevents the icon from being dragged into the header, where it becomes invisible
|
12 |
-
});
|
13 |
-
});
|
14 |
-
|
15 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
+
|
3 |
+
$(document).ready(function(event) {
|
4 |
+
var container = "#wpbody";
|
5 |
+
|
6 |
+
if($("#editor.gutenberg__editor").length)
|
7 |
+
container = "#editor.gutenberg__editor";
|
8 |
+
|
9 |
+
$(".floating-right-toolbar i").draggable({
|
10 |
+
snap: container,
|
11 |
+
containment: container // This prevents the icon from being dragged into the header, where it becomes invisible
|
12 |
+
});
|
13 |
+
});
|
14 |
+
|
15 |
})(jQuery);
|
js/wplc_error_handling.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
/* developed to stop other plugins and themes erroneous code from stopping our plugin from working */
|
2 |
-
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
|
3 |
-
if (window.console) { console.log('Error: ' + errorMsg + ' \nScript: ' + url + ' \nLine: ' + lineNumber + ' \nColumn: ' + column + ' \nStackTrace: ' + errorObj); }
|
4 |
-
return true;
|
5 |
-
}
|
1 |
+
/* developed to stop other plugins and themes erroneous code from stopping our plugin from working */
|
2 |
+
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
|
3 |
+
if (window.console) { console.log('Error: ' + errorMsg + ' \nScript: ' + url + ' \nLine: ' + lineNumber + ' \nColumn: ' + column + ' \nStackTrace: ' + errorObj); }
|
4 |
+
return true;
|
5 |
+
}
|
js/wplc_gutenberg.js
CHANGED
@@ -1,201 +1,201 @@
|
|
1 |
-
// Gutenberg functions
|
2 |
-
jQuery(function($){
|
3 |
-
|
4 |
-
var sizes = ['sm','md','lg'];
|
5 |
-
|
6 |
-
// Initate settings
|
7 |
-
initiate_gutenberg_settings();
|
8 |
-
|
9 |
-
$('#wplc_gutenberg_size').on('change', function() {
|
10 |
-
$('.wplc_block').removeClass('sm').removeClass('md').removeClass('lg');
|
11 |
-
$('.wplc_block').addClass(sizes[$(this).val()-1]);
|
12 |
-
});
|
13 |
-
|
14 |
-
$('#wplc_gutenberg_icon').on('change', function() {
|
15 |
-
var fontawesome_class = 'fa ' + $(this).val().replace(/\./g, "");
|
16 |
-
$('.wplc_block_icon i').removeClass().addClass(fontawesome_class);
|
17 |
-
});
|
18 |
-
|
19 |
-
$('.iconpicker-item').on('click', function() {
|
20 |
-
var fontawesome_class = 'fa ' + $(this).attr('title').replace(/\./g, "");
|
21 |
-
$('.wplc_block_icon i').removeClass().addClass(fontawesome_class);
|
22 |
-
});
|
23 |
-
|
24 |
-
$('#wplc_gutenberg_text').on('change', function() {
|
25 |
-
var text = $(this).val();
|
26 |
-
$('.wplc_block_text').html(text);
|
27 |
-
});
|
28 |
-
|
29 |
-
$('#activate_block').on('change', function() {
|
30 |
-
if ($(this).is(':checked')) {
|
31 |
-
$('.wplc_block').removeClass('disabled');
|
32 |
-
} else {
|
33 |
-
$('.wplc_block').addClass('disabled');
|
34 |
-
}
|
35 |
-
});
|
36 |
-
|
37 |
-
$('#wplc_gutenberg_enable_icon').on('change', function() {
|
38 |
-
if ($(this).is(':checked')) {
|
39 |
-
$('.wplc_block_icon').show();
|
40 |
-
$('#wplc_gutenberg_icon').removeAttr('disabled');
|
41 |
-
} else {
|
42 |
-
$('.wplc_block_icon').hide();
|
43 |
-
$('#wplc_gutenberg_icon').attr('disabled', 'disabled');
|
44 |
-
}
|
45 |
-
});
|
46 |
-
|
47 |
-
$('.wplc_code').on('click', function(){
|
48 |
-
var $temp = $('<input>');
|
49 |
-
$('body').append($temp);
|
50 |
-
$temp.val($(this).text()).select();
|
51 |
-
document.execCommand('copy');
|
52 |
-
$temp.remove();
|
53 |
-
$(this).closest('p').append('<p class="wplc_copied_message">'+ $(this).text() + ' copied to clipboard.</p>').find('.wplc_copied_message').fadeOut( 'slow' );
|
54 |
-
});
|
55 |
-
|
56 |
-
// Allow users to upload a logo image
|
57 |
-
var media_uploader;
|
58 |
-
$('#wplc_gutenberg_upload_logo').on( 'click', function(e) {
|
59 |
-
|
60 |
-
e.preventDefault();
|
61 |
-
|
62 |
-
if ( media_uploader ) {
|
63 |
-
media_uploader.open();
|
64 |
-
return;
|
65 |
-
}
|
66 |
-
|
67 |
-
media_uploader = wp.media.frames.file_frame = wp.media({
|
68 |
-
title: 'Select a Logo',
|
69 |
-
button: {
|
70 |
-
text: 'Select Logo'
|
71 |
-
},
|
72 |
-
multiple: false
|
73 |
-
});
|
74 |
-
|
75 |
-
media_uploader.on( 'select', function() {
|
76 |
-
attachment = media_uploader.state().get( 'selection' ).first().toJSON();
|
77 |
-
$('#wplc_gutenberg_logo').val(attachment.url);
|
78 |
-
$('.wplc_block_logo').css('background-image', 'url(' + attachment.url + ')');
|
79 |
-
});
|
80 |
-
|
81 |
-
media_uploader.open();
|
82 |
-
|
83 |
-
});
|
84 |
-
|
85 |
-
$('#wplc_gutenberg_remove_logo').on('click', function(e) {
|
86 |
-
e.preventDefault();
|
87 |
-
if (confirm("Are you sure you want to reset the logo to the default logo?")) {
|
88 |
-
$('#wplc_gutenberg_logo').val($('#wplc_gutenberg_default_logo').val());
|
89 |
-
$('.wplc_block_logo').css('background-image', 'url("' + $('#wplc_gutenberg_default_logo').val() + '")');
|
90 |
-
}
|
91 |
-
return;
|
92 |
-
});
|
93 |
-
|
94 |
-
function initiate_gutenberg_settings() {
|
95 |
-
// Editor
|
96 |
-
var editor_js = ace.edit( 'wplc_custom_js_editor' );
|
97 |
-
editor_js.setTheme( 'ace/theme/monokai' );
|
98 |
-
editor_js.getSession().setMode( 'ace/mode/javascript' );
|
99 |
-
editor_js.setValue( $('#wplc_custom_js').val(), 1 );
|
100 |
-
editor_js.getSession().on("change", function () {
|
101 |
-
$('#wplc_custom_js').val( editor_js.getSession().getValue() );
|
102 |
-
});
|
103 |
-
|
104 |
-
var editor_css = ace.edit( 'wplc_custom_css_editor' );
|
105 |
-
editor_css.setTheme( 'ace/theme/monokai' );
|
106 |
-
editor_css.getSession().setMode( 'ace/mode/css' );
|
107 |
-
editor_css.setValue( $('#wplc_custom_css').val(), 1 );
|
108 |
-
editor_css.getSession().on("change", function () {
|
109 |
-
$('#wplc_custom_css').val( editor_css.getSession().getValue() );
|
110 |
-
});
|
111 |
-
|
112 |
-
var editor_html = ace.edit( 'wplc_custom_html_editor' );
|
113 |
-
editor_html.$blockScrolling = Infinity;
|
114 |
-
editor_html.setTheme( 'ace/theme/monokai' );
|
115 |
-
editor_html.getSession().setMode( 'ace/mode/html' );
|
116 |
-
editor_html.setValue( $.trim($('#wplc_custom_html').val()), 1 );
|
117 |
-
editor_html.getSession().on("change", function () {
|
118 |
-
$('#wplc_custom_html').val( editor_html.getSession().getValue() );
|
119 |
-
});
|
120 |
-
|
121 |
-
if ($.trim(editor_html.getSession().getValue()) == '') {
|
122 |
-
editor_html.setValue( $.trim(default_html), 1 );
|
123 |
-
}
|
124 |
-
|
125 |
-
$('#wplc_gutenberg_reset_html').on('click', function() {
|
126 |
-
editor_html.setValue( $.trim(default_html), 1 );
|
127 |
-
});
|
128 |
-
|
129 |
-
$('#wplc_settings').on('submit', function(){
|
130 |
-
if ($.trim(editor_html.getSession().getValue()) == '' ) {
|
131 |
-
editor_html.setValue( default_html, 1 );
|
132 |
-
}
|
133 |
-
});
|
134 |
-
|
135 |
-
// Predefined Templates
|
136 |
-
wplc_gutenberg_templates( editor_html );
|
137 |
-
|
138 |
-
// Initiate FontAwesome Icon Picker
|
139 |
-
$('#wplc_gutenberg_icon').iconpicker({
|
140 |
-
placement: 'bottomRight'
|
141 |
-
});
|
142 |
-
|
143 |
-
$('.wplc_block').removeClass('sm').removeClass('md').removeClass('lg');
|
144 |
-
$('.wplc_block').addClass(sizes[$('#wplc_gutenberg_size').val()-1]);
|
145 |
-
|
146 |
-
if ($('#wplc_gutenberg_enable_icon').is(':checked')) {
|
147 |
-
$('.wplc_block_icon').show();
|
148 |
-
$('#wplc_gutenberg_icon').removeAttr('disabled');
|
149 |
-
} else {
|
150 |
-
$('.wplc_block_icon').hide();
|
151 |
-
$('#wplc_gutenberg_icon').attr('disabled', 'disabled');
|
152 |
-
}
|
153 |
-
|
154 |
-
if ($('#activate_block').is(':checked')) {
|
155 |
-
$('.wplc_block').removeClass('disabled');
|
156 |
-
} else {
|
157 |
-
$('.wplc_block').addClass('disabled');
|
158 |
-
}
|
159 |
-
}
|
160 |
-
|
161 |
-
function wplc_gutenberg_templates( editor ) {
|
162 |
-
|
163 |
-
var templates = new Array();
|
164 |
-
templates['template_default'] = '<!-- Default Template - Dark -->\n<div class="wplc_block">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
165 |
-
templates['template_default_tooltip'] = '<!-- Default - Tooltip -->\n<!-- Hover over the block to see the tooltip -->\n<div class="wplc_block">\n\t<span class="wplc_block_tooltip">Want to chat?</span>\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
166 |
-
templates['template_default_light'] = '<!-- Default - Light Template -->\n<div class="wplc_block light">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
167 |
-
templates['template_tooltip'] = '<!-- Cricle - Tooltip Template -->\n<!-- Hover over the block to see the tooltip -->\n<div class="wplc_block circle">\n\t<span class="wplc_block_tooltip">Chat with us!</span>\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n</div>';
|
168 |
-
templates['template_circle'] = '<!-- Circle Template -->\n<div class="wplc_block circle">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n</div>';
|
169 |
-
templates['template_chat_bubble'] = '<!-- Chat Bubble Template -->\n<div class="wplc_block chat_bubble">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n</div>';
|
170 |
-
templates['template_circle_rotate'] = '<!-- Circle - Rotating Template -->\n<!-- Hover over the icon to see it rotate -->\n<div class="wplc_block circle rotate">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
171 |
-
|
172 |
-
var current_template = wplc_gutenberg_filter_template( editor.getSession().getValue() );
|
173 |
-
|
174 |
-
$(document).find('.wplc_gutenberg_preview').html(current_template);
|
175 |
-
var sizes = ['sm','md','lg'];
|
176 |
-
|
177 |
-
$('#wplc_custom_templates').on('change', function(){
|
178 |
-
if ($(this).val() !== '0') {
|
179 |
-
var template = wplc_gutenberg_filter_template( $.trim(templates[$(this).val()]) );
|
180 |
-
template = template.replace('wplc_block', 'wplc_block ' + sizes[$(document).find('#wplc_gutenberg_size').val()-1]);
|
181 |
-
editor.setValue( template, 1 );
|
182 |
-
$(document).find('.wplc_gutenberg_preview').html(template);
|
183 |
-
}
|
184 |
-
});
|
185 |
-
}
|
186 |
-
|
187 |
-
function wplc_gutenberg_filter_template( template ) {
|
188 |
-
var logo = $(document).find('#wplc_gutenberg_logo').val();
|
189 |
-
var text = $(document).find('#wplc_gutenberg_text').val();
|
190 |
-
var icon = $(document).find('#wplc_gutenberg_icon').val();
|
191 |
-
var placeholder_codes = ['wplc_logo', 'wplc_text', 'wplc_icon'],
|
192 |
-
placeholder_values = ['<span class="wplc_block_logo" style="background-image: url(\'' + logo + '\');"></span>', text, '<i class="fa ' + icon + '"></i>'];
|
193 |
-
|
194 |
-
for( var i = 0; i < placeholder_codes.length; i++ ) {
|
195 |
-
template = template.replace(new RegExp('{' + placeholder_codes[i] + '}', 'gi'), placeholder_values[i]);
|
196 |
-
}
|
197 |
-
|
198 |
-
return template;
|
199 |
-
}
|
200 |
-
|
201 |
});
|
1 |
+
// Gutenberg functions
|
2 |
+
jQuery(document).ready(function($){
|
3 |
+
|
4 |
+
var sizes = ['sm','md','lg'];
|
5 |
+
|
6 |
+
// Initate settings
|
7 |
+
initiate_gutenberg_settings();
|
8 |
+
|
9 |
+
$('#wplc_gutenberg_size').on('change', function() {
|
10 |
+
$('.wplc_block').removeClass('sm').removeClass('md').removeClass('lg');
|
11 |
+
$('.wplc_block').addClass(sizes[$(this).val()-1]);
|
12 |
+
});
|
13 |
+
|
14 |
+
$('#wplc_gutenberg_icon').on('change', function() {
|
15 |
+
var fontawesome_class = 'fa ' + $(this).val().replace(/\./g, "");
|
16 |
+
$('.wplc_block_icon i').removeClass().addClass(fontawesome_class);
|
17 |
+
});
|
18 |
+
|
19 |
+
$('.iconpicker-item').on('click', function() {
|
20 |
+
var fontawesome_class = 'fa ' + $(this).attr('title').replace(/\./g, "");
|
21 |
+
$('.wplc_block_icon i').removeClass().addClass(fontawesome_class);
|
22 |
+
});
|
23 |
+
|
24 |
+
$('#wplc_gutenberg_text').on('change', function() {
|
25 |
+
var text = $(this).val();
|
26 |
+
$('.wplc_block_text').html(text);
|
27 |
+
});
|
28 |
+
|
29 |
+
$('#activate_block').on('change', function() {
|
30 |
+
if ($(this).is(':checked')) {
|
31 |
+
$('.wplc_block').removeClass('disabled');
|
32 |
+
} else {
|
33 |
+
$('.wplc_block').addClass('disabled');
|
34 |
+
}
|
35 |
+
});
|
36 |
+
|
37 |
+
$('#wplc_gutenberg_enable_icon').on('change', function() {
|
38 |
+
if ($(this).is(':checked')) {
|
39 |
+
$('.wplc_block_icon').show();
|
40 |
+
$('#wplc_gutenberg_icon').removeAttr('disabled');
|
41 |
+
} else {
|
42 |
+
$('.wplc_block_icon').hide();
|
43 |
+
$('#wplc_gutenberg_icon').attr('disabled', 'disabled');
|
44 |
+
}
|
45 |
+
});
|
46 |
+
|
47 |
+
$('.wplc_code').on('click', function(){
|
48 |
+
var $temp = $('<input>');
|
49 |
+
$('body').append($temp);
|
50 |
+
$temp.val($(this).text()).select();
|
51 |
+
document.execCommand('copy');
|
52 |
+
$temp.remove();
|
53 |
+
$(this).closest('p').append('<p class="wplc_copied_message">'+ $(this).text() + ' copied to clipboard.</p>').find('.wplc_copied_message').fadeOut( 'slow' );
|
54 |
+
});
|
55 |
+
|
56 |
+
// Allow users to upload a logo image
|
57 |
+
var media_uploader;
|
58 |
+
$('#wplc_gutenberg_upload_logo').on( 'click', function(e) {
|
59 |
+
|
60 |
+
e.preventDefault();
|
61 |
+
|
62 |
+
if ( media_uploader ) {
|
63 |
+
media_uploader.open();
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
media_uploader = wp.media.frames.file_frame = wp.media({
|
68 |
+
title: 'Select a Logo',
|
69 |
+
button: {
|
70 |
+
text: 'Select Logo'
|
71 |
+
},
|
72 |
+
multiple: false
|
73 |
+
});
|
74 |
+
|
75 |
+
media_uploader.on( 'select', function() {
|
76 |
+
attachment = media_uploader.state().get( 'selection' ).first().toJSON();
|
77 |
+
$('#wplc_gutenberg_logo').val(attachment.url);
|
78 |
+
$('.wplc_block_logo').css('background-image', 'url(' + attachment.url + ')');
|
79 |
+
});
|
80 |
+
|
81 |
+
media_uploader.open();
|
82 |
+
|
83 |
+
});
|
84 |
+
|
85 |
+
$('#wplc_gutenberg_remove_logo').on('click', function(e) {
|
86 |
+
e.preventDefault();
|
87 |
+
if (confirm("Are you sure you want to reset the logo to the default logo?")) {
|
88 |
+
$('#wplc_gutenberg_logo').val($('#wplc_gutenberg_default_logo').val());
|
89 |
+
$('.wplc_block_logo').css('background-image', 'url("' + $('#wplc_gutenberg_default_logo').val() + '")');
|
90 |
+
}
|
91 |
+
return;
|
92 |
+
});
|
93 |
+
|
94 |
+
function initiate_gutenberg_settings() {
|
95 |
+
// Editor
|
96 |
+
var editor_js = ace.edit( 'wplc_custom_js_editor' );
|
97 |
+
editor_js.setTheme( 'ace/theme/monokai' );
|
98 |
+
editor_js.getSession().setMode( 'ace/mode/javascript' );
|
99 |
+
editor_js.setValue( $('#wplc_custom_js').val(), 1 );
|
100 |
+
editor_js.getSession().on("change", function () {
|
101 |
+
$('#wplc_custom_js').val( editor_js.getSession().getValue() );
|
102 |
+
});
|
103 |
+
|
104 |
+
var editor_css = ace.edit( 'wplc_custom_css_editor' );
|
105 |
+
editor_css.setTheme( 'ace/theme/monokai' );
|
106 |
+
editor_css.getSession().setMode( 'ace/mode/css' );
|
107 |
+
editor_css.setValue( $('#wplc_custom_css').val(), 1 );
|
108 |
+
editor_css.getSession().on("change", function () {
|
109 |
+
$('#wplc_custom_css').val( editor_css.getSession().getValue() );
|
110 |
+
});
|
111 |
+
|
112 |
+
var editor_html = ace.edit( 'wplc_custom_html_editor' );
|
113 |
+
editor_html.$blockScrolling = Infinity;
|
114 |
+
editor_html.setTheme( 'ace/theme/monokai' );
|
115 |
+
editor_html.getSession().setMode( 'ace/mode/html' );
|
116 |
+
editor_html.setValue( $.trim($('#wplc_custom_html').val()), 1 );
|
117 |
+
editor_html.getSession().on("change", function () {
|
118 |
+
$('#wplc_custom_html').val( editor_html.getSession().getValue() );
|
119 |
+
});
|
120 |
+
|
121 |
+
if ($.trim(editor_html.getSession().getValue()) == '') {
|
122 |
+
editor_html.setValue( $.trim(default_html), 1 );
|
123 |
+
}
|
124 |
+
|
125 |
+
$('#wplc_gutenberg_reset_html').on('click', function() {
|
126 |
+
editor_html.setValue( $.trim(default_html), 1 );
|
127 |
+
});
|
128 |
+
|
129 |
+
$('#wplc_settings').on('submit', function(){
|
130 |
+
if ($.trim(editor_html.getSession().getValue()) == '' ) {
|
131 |
+
editor_html.setValue( default_html, 1 );
|
132 |
+
}
|
133 |
+
});
|
134 |
+
|
135 |
+
// Predefined Templates
|
136 |
+
wplc_gutenberg_templates( editor_html );
|
137 |
+
|
138 |
+
// Initiate FontAwesome Icon Picker
|
139 |
+
$('#wplc_gutenberg_icon').iconpicker({
|
140 |
+
placement: 'bottomRight'
|
141 |
+
});
|
142 |
+
|
143 |
+
$('.wplc_block').removeClass('sm').removeClass('md').removeClass('lg');
|
144 |
+
$('.wplc_block').addClass(sizes[$('#wplc_gutenberg_size').val()-1]);
|
145 |
+
|
146 |
+
if ($('#wplc_gutenberg_enable_icon').is(':checked')) {
|
147 |
+
$('.wplc_block_icon').show();
|
148 |
+
$('#wplc_gutenberg_icon').removeAttr('disabled');
|
149 |
+
} else {
|
150 |
+
$('.wplc_block_icon').hide();
|
151 |
+
$('#wplc_gutenberg_icon').attr('disabled', 'disabled');
|
152 |
+
}
|
153 |
+
|
154 |
+
if ($('#activate_block').is(':checked')) {
|
155 |
+
$('.wplc_block').removeClass('disabled');
|
156 |
+
} else {
|
157 |
+
$('.wplc_block').addClass('disabled');
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
function wplc_gutenberg_templates( editor ) {
|
162 |
+
|
163 |
+
var templates = new Array();
|
164 |
+
templates['template_default'] = '<!-- Default Template - Dark -->\n<div class="wplc_block">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
165 |
+
templates['template_default_tooltip'] = '<!-- Default - Tooltip -->\n<!-- Hover over the block to see the tooltip -->\n<div class="wplc_block">\n\t<span class="wplc_block_tooltip">Want to chat?</span>\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
166 |
+
templates['template_default_light'] = '<!-- Default - Light Template -->\n<div class="wplc_block light">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
167 |
+
templates['template_tooltip'] = '<!-- Cricle - Tooltip Template -->\n<!-- Hover over the block to see the tooltip -->\n<div class="wplc_block circle">\n\t<span class="wplc_block_tooltip">Chat with us!</span>\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n</div>';
|
168 |
+
templates['template_circle'] = '<!-- Circle Template -->\n<div class="wplc_block circle">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n</div>';
|
169 |
+
templates['template_chat_bubble'] = '<!-- Chat Bubble Template -->\n<div class="wplc_block chat_bubble">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_text">{wplc_text}</span>\n</div>';
|
170 |
+
templates['template_circle_rotate'] = '<!-- Circle - Rotating Template -->\n<!-- Hover over the icon to see it rotate -->\n<div class="wplc_block circle rotate">\n\t<span class="wplc_block_logo">{wplc_logo}</span>\n\t<span class="wplc_block_icon">{wplc_icon}</span>\n</div>';
|
171 |
+
|
172 |
+
var current_template = wplc_gutenberg_filter_template( editor.getSession().getValue() );
|
173 |
+
|
174 |
+
$(document).find('.wplc_gutenberg_preview').html(current_template);
|
175 |
+
var sizes = ['sm','md','lg'];
|
176 |
+
|
177 |
+
$('#wplc_custom_templates').on('change', function(){
|
178 |
+
if ($(this).val() !== '0') {
|
179 |
+
var template = wplc_gutenberg_filter_template( $.trim(templates[$(this).val()]) );
|
180 |
+
template = template.replace('wplc_block', 'wplc_block ' + sizes[$(document).find('#wplc_gutenberg_size').val()-1]);
|
181 |
+
editor.setValue( template, 1 );
|
182 |
+
$(document).find('.wplc_gutenberg_preview').html(template);
|
183 |
+
}
|
184 |
+
});
|
185 |
+
}
|
186 |
+
|
187 |
+
function wplc_gutenberg_filter_template( template ) {
|
188 |
+
var logo = $(document).find('#wplc_gutenberg_logo').val();
|
189 |
+
var text = $(document).find('#wplc_gutenberg_text').val();
|
190 |
+
var icon = $(document).find('#wplc_gutenberg_icon').val();
|
191 |
+
var placeholder_codes = ['wplc_logo', 'wplc_text', 'wplc_icon'],
|
192 |
+
placeholder_values = ['<span class="wplc_block_logo" style="background-image: url(\'' + logo + '\');"></span>', text, '<i class="fa ' + icon + '"></i>'];
|
193 |
+
|
194 |
+
for( var i = 0; i < placeholder_codes.length; i++ ) {
|
195 |
+
template = template.replace(new RegExp('{' + placeholder_codes[i] + '}', 'gi'), placeholder_values[i]);
|
196 |
+
}
|
197 |
+
|
198 |
+
return template;
|
199 |
+
}
|
200 |
+
|
201 |
});
|
js/wplc_heartbeat.js
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
(function( $ ) {
|
2 |
-
"use strict";
|
3 |
-
$(function() {
|
4 |
-
$( document ).on( 'heartbeat-send', function( e, data ) {
|
5 |
-
data['client'] = 'wplc_heartbeat';
|
6 |
-
});
|
7 |
-
|
8 |
-
|
9 |
-
var wplc_set_transient = null;
|
10 |
-
|
11 |
-
wplc_set_transient = setInterval(function () {
|
12 |
-
wpcl_admin_set_transient();
|
13 |
-
}, 60000);
|
14 |
-
wpcl_admin_set_transient();
|
15 |
-
function wpcl_admin_set_transient() {
|
16 |
-
var data = {
|
17 |
-
action: 'wplc_admin_set_transient',
|
18 |
-
security: wplc_transient_nonce
|
19 |
-
|
20 |
-
};
|
21 |
-
if (typeof ajaxurl === "undefined" && typeof wplc_ajaxurl !== "undefined") { var ajaxurl = wplc_ajaxurl; }
|
22 |
-
$.post(ajaxurl, data, function (response) {});
|
23 |
-
}
|
24 |
-
});
|
25 |
}( jQuery ));
|
1 |
+
(function( $ ) {
|
2 |
+
"use strict";
|
3 |
+
$(function() {
|
4 |
+
$( document ).on( 'heartbeat-send', function( e, data ) {
|
5 |
+
data['client'] = 'wplc_heartbeat';
|
6 |
+
});
|
7 |
+
|
8 |
+
|
9 |
+
var wplc_set_transient = null;
|
10 |
+
|
11 |
+
wplc_set_transient = setInterval(function () {
|
12 |
+
wpcl_admin_set_transient();
|
13 |
+
}, 60000);
|
14 |
+
wpcl_admin_set_transient();
|
15 |
+
function wpcl_admin_set_transient() {
|
16 |
+
var data = {
|
17 |
+
action: 'wplc_admin_set_transient',
|
18 |
+
security: wplc_transient_nonce
|
19 |
+
|
20 |
+
};
|
21 |
+
if (typeof ajaxurl === "undefined" && typeof wplc_ajaxurl !== "undefined") { var ajaxurl = wplc_ajaxurl; }
|
22 |
+
$.post(ajaxurl, data, function (response) {});
|
23 |
+
}
|
24 |
+
});
|
25 |
}( jQuery ));
|
js/wplc_lead_forms.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
jQuery("#nimble_lead_form").change(function() {
|
2 |
-
jQuery("#nimble_survey").prop('selectedIndex',0);
|
3 |
-
});
|
4 |
-
|
5 |
-
jQuery("#nimble_survey").change(function() {
|
6 |
-
jQuery("#nimble_lead_form").prop('selectedIndex',0);
|
7 |
});
|
1 |
+
jQuery("#nimble_lead_form").change(function() {
|
2 |
+
jQuery("#nimble_survey").prop('selectedIndex',0);
|
3 |
+
});
|
4 |
+
|
5 |
+
jQuery("#nimble_survey").change(function() {
|
6 |
+
jQuery("#nimble_lead_form").prop('selectedIndex',0);
|
7 |
});
|
js/wplc_node_offline_mode_controller.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
jQuery(function(){
|
2 |
-
jQuery(document).on("bleeper_connect", function(e) {
|
3 |
-
setTimeout(function(){
|
4 |
-
var wplc_offline_prompt_title = jQuery("#wplc_offline_mode_prompt").text();
|
5 |
-
var wplc_offline_prompt_body = jQuery("#wplc_offline_mode_prompt_container").html();
|
6 |
-
jQuery("#wplc_offline_mode_prompt_container").hide();
|
7 |
-
jQuery(".nifty_admin_overlay").fadeIn();
|
8 |
-
niftyShowDialog(wplc_offline_prompt_title, "", "", function(){}, function(){});
|
9 |
-
|
10 |
-
jQuery(".nifty_admin_chat_prompt_message").html(wplc_offline_prompt_body);
|
11 |
-
jQuery('.nifty_admin_chat_prompt_actions').hide();
|
12 |
-
|
13 |
-
jQuery('.nifty_admin_chat_prompt').css("width", "50%");
|
14 |
-
}, 1500);
|
15 |
-
})
|
16 |
});
|
1 |
+
jQuery(function(){
|
2 |
+
jQuery(document).on("bleeper_connect", function(e) {
|
3 |
+
setTimeout(function(){
|
4 |
+
var wplc_offline_prompt_title = jQuery("#wplc_offline_mode_prompt").text();
|
5 |
+
var wplc_offline_prompt_body = jQuery("#wplc_offline_mode_prompt_container").html();
|
6 |
+
jQuery("#wplc_offline_mode_prompt_container").hide();
|
7 |
+
jQuery(".nifty_admin_overlay").fadeIn();
|
8 |
+
niftyShowDialog(wplc_offline_prompt_title, "", "", function(){}, function(){});
|
9 |
+
|
10 |
+
jQuery(".nifty_admin_chat_prompt_message").html(wplc_offline_prompt_body);
|
11 |
+
jQuery('.nifty_admin_chat_prompt_actions').hide();
|
12 |
+
|
13 |
+
jQuery('.nifty_admin_chat_prompt').css("width", "50%");
|
14 |
+
}, 1500);
|
15 |
+
})
|
16 |
});
|
js/wplc_plugin_row.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function(){
|
2 |
+
|
3 |
+
jQuery("body").on("click", "#wplc_signup_newsletter_btn", function() {
|
4 |
+
|
5 |
+
var a_email = jQuery("#wplc_signup_newsletter").val();
|
6 |
+
jQuery("#wplc_signup_newsletter").hide('slow');
|
7 |
+
jQuery("#wplc_signup_newsletter_btn").hide('slow');
|
8 |
+
jQuery("#wplc_signup_newsletter_hide").hide('slow');
|
9 |
+
jQuery("#wplc_subscribe_div").html("Thank you!");
|
10 |
+
var data = {
|
11 |
+
action: 'wplc_subscribe',
|
12 |
+
prod: 'wplcs',
|
13 |
+
a_email: a_email
|
14 |
+
|
15 |
+
};
|
16 |
+
jQuery.post('//ccplugins.co/newsletter-subscription/index.php', data, function(response) {
|
17 |
+
returned_data = JSON.parse(response);
|
18 |
+
|
19 |
+
});
|
20 |
+
|
21 |
+
var data = {
|
22 |
+
action: 'wplc_subscribe_hide',
|
23 |
+
security: wplc_sub_nonce
|
24 |
+
|
25 |
+
};
|
26 |
+
jQuery.post(ajaxurl, data, function(response) {
|
27 |
+
|
28 |
+
});
|
29 |
+
|
30 |
+
|
31 |
+
});
|
32 |
+
|
33 |
+
jQuery("body").on("click", "#wplc_signup_newsletter_hide", function() {
|
34 |
+
|
35 |
+
jQuery(".wplc_sub_div").hide("fast");
|
36 |
+
jQuery("#wplc_signup_newsletter").hide('slow');
|
37 |
+
jQuery("#wplc_signup_newsletter_btn").hide('slow');
|
38 |
+
jQuery("#wplc_signup_newsletter_hide").hide('slow');
|
39 |
+
|
40 |
+
var data = {
|
41 |
+
action: 'wplc_subscribe_hide',
|
42 |
+
security: wplc_sub_nonce
|
43 |
+
};
|
44 |
+
|
45 |
+
jQuery.post(ajaxurl, data, function(response) {
|
46 |
+
|
47 |
+
});
|
48 |
+
|
49 |
+
});
|
50 |
+
|
51 |
+
});
|
js/wplc_server.js
CHANGED
@@ -1,1105 +1,1056 @@
|
|
1 |
-
/*
|
2 |
-
* Hanldes Message transportation within WPLC
|
3 |
-
*/
|
4 |
-
var gifExtensionPattern = new RegExp(/\.(gif)\b/);
|
5 |
-
|
6 |
-
var wplc_server_method = null;
|
7 |
-
var wplc_supress_server_logs = true; //We are now surpressing server logs
|
8 |
-
var wplc_node_socket = null; //Will not be set unless
|
9 |
-
var wplc_node_send_queue = new Array();
|
10 |
-
var wplc_node_message_receiver = null;
|
11 |
-
var wplc_node_message_restart_handler = null;
|
12 |
-
var wplc_node_client_event_logger = null;
|
13 |
-
var wplc_node_sockets_ready = false;
|
14 |
-
var wplc_transport_prepared = false;
|
15 |
-
|
16 |
-
var wplc_node_async_array = new Array(); //Array which will be sent to our async URL for storage
|
17 |
-
var wplc_node_async_send_rate = 1; //Amount of messages that need to be present before we sent the async request
|
18 |
-
var wplc_node_async_cookie_check_complete = false;
|
19 |
-
|
20 |
-
var wplc_node_port_open = true; //This can be set to false to prevent any future data being sent
|
21 |
-
var wplc_node_is_client_typing = false;
|
22 |
-
var wplc_node_is_pair_typing_indicator_visible = false;
|
23 |
-
var wplc_node_pair_name = "";
|
24 |
-
|
25 |
-
var wplc_node_switch_ajax_complete = false;
|
26 |
-
var wplc_node_retry_count = 0;
|
27 |
-
|
28 |
-
var wplc_msg_history = new Array();
|
29 |
-
|
30 |
-
var wplc_xhr; //XHR global (allows us to abort previous AJAX request when the agent flips between screens quickly)
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
function WPLCServer(){
|
35 |
-
var wplc_server_ref = this;
|
36 |
-
//Default to ajax until chat starts
|
37 |
-
wplc_server_method = WPLCServer.Ajax;
|
38 |
-
wplc_server_ref.send = wplc_server_method.send;
|
39 |
-
|
40 |
-
wplc_server_ref.isInSocketMode = wplc_server_method.isInSocketMode;
|
41 |
-
wplc_server_ref.isPreparingSocketMode = wplc_server_method.isPreparingSocketMode;
|
42 |
-
wplc_server_ref.transportPrepared = wplc_server_method.transportPrepared;
|
43 |
-
wplc_server_ref.asyncStorage = wplc_server_method.asyncStorage;
|
44 |
-
wplc_server_ref.forceClosePort = wplc_server_method.forceClosePort;
|
45 |
-
wplc_server_ref.sendMessage = wplc_server_method.sendMessage;
|
46 |
-
|
47 |
-
|
48 |
-
wplc_server_ref.prepareTransport = function(callback, messageHandler, restartHandler, clientEventLog){
|
49 |
-
wplc_server_log("-------------------");
|
50 |
-
wplc_server_log("Preparing Transport");
|
51 |
-
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
52 |
-
if(window.WebSocket){
|
53 |
-
//Sockets are supported
|
54 |
-
wplc_server_method = WPLCServer.Socket;
|
55 |
-
wplc_server_log("Socket Mode");
|
56 |
-
} else {
|
57 |
-
wplc_server_method = WPLCServer.Ajax;
|
58 |
-
wplc_server_log("Ajax Mode");
|
59 |
-
}
|
60 |
-
} else {
|
61 |
-
wplc_server_method = WPLCServer.Ajax;
|
62 |
-
wplc_server_log("Ajax Mode");
|
63 |
-
}
|
64 |
-
|
65 |
-
wplc_server_method.init(function(){
|
66 |
-
wplc_server_ref.send = wplc_server_method.send;
|
67 |
-
wplc_server_ref.isInSocketMode = wplc_server_method.isInSocketMode;
|
68 |
-
wplc_server_ref.isPreparingSocketMode = wplc_server_method.isPreparingSocketMode;
|
69 |
-
wplc_server_ref.transportPrepared = wplc_server_method.transportPrepared;
|
70 |
-
wplc_server_ref.asyncStorage = wplc_server_method.asyncStorage;
|
71 |
-
wplc_server_ref.forceClosePort = wplc_server_method.forceClosePort;
|
72 |
-
wplc_server_ref.sendMessage = wplc_server_method.sendMessage;
|
73 |
-
|
74 |
-
if(typeof callback === "function"){
|
75 |
-
callback();
|
76 |
-
}
|
77 |
-
}, messageHandler, function(){
|
78 |
-
wplc_server_method = WPLCServer.Ajax;
|
79 |
-
wplc_server_log("Ajax Mode - Fail Over");
|
80 |
-
|
81 |
-
wplc_server_ref.send = wplc_server_method.send;
|
82 |
-
wplc_server_ref.isInSocketMode = wplc_server_method.isInSocketMode;
|
83 |
-
wplc_server_ref.isPreparingSocketMode = function(){ return false; };
|
84 |
-
wplc_server_ref.transportPrepared = wplc_server_method.transportPrepared;
|
85 |
-
wplc_server_ref.asyncStorage = wplc_server_method.asyncStorage;
|
86 |
-
wplc_server_ref.forceClosePort = wplc_server_method.forceClosePort;
|
87 |
-
wplc_server_ref.sendMessage = wplc_server_method.sendMessage;
|
88 |
-
|
89 |
-
if(typeof wplc_ajaxurl !== "undefined" && typeof wplc_nonce !== "undefined" && typeof wplc_cid !== "undefined"){
|
90 |
-
var wplc_fail_over_data = {
|
91 |
-
action: 'wplc_node_switch_to_ajax',
|
92 |
-
security: wplc_nonce,
|
93 |
-
cid: wplc_cid
|
94 |
-
};
|
95 |
-
|
96 |
-
jQuery.ajax({
|
97 |
-
url : wplc_ajaxurl,
|
98 |
-
data : wplc_fail_over_data,
|
99 |
-
type : "POST",
|
100 |
-
timeout : 120000,
|
101 |
-
success : function(response){
|
102 |
-
wplc_server_log("Ajax Mode Enabled");
|
103 |
-
},
|
104 |
-
error : function(error, exception){
|
105 |
-
wplc_server_log("Chat Fail Over Could Not Be Setup");
|
106 |
-
},
|
107 |
-
complete : function(response){
|
108 |
-
if(typeof callback === "function"){
|
109 |
-
callback();
|
110 |
-
}
|
111 |
-
}
|
112 |
-
});
|
113 |
-
}
|
114 |
-
}, restartHandler, clientEventLog);
|
115 |
-
|
116 |
-
wplc_server_log("Transport Prepared");
|
117 |
-
wplc_server_log("-------------------");
|
118 |
-
wplc_transport_prepared = true;
|
119 |
-
}
|
120 |
-
|
121 |
-
wplc_server_ref.browserIsSocketReady = function(){
|
122 |
-
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
123 |
-
if(window.WebSocket){
|
124 |
-
return true;
|
125 |
-
} else {
|
126 |
-
return false;
|
127 |
-
}
|
128 |
-
} else {
|
129 |
-
return false;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
WPLCServer.Socket = {
|
135 |
-
/*
|
136 |
-
init : function(callback, messageHandler, failOver, restartHandler, clientEventLog){
|
137 |
-
wplc_node_message_receiver = (typeof messageHandler !== "undefined" && typeof messageHandler === "function") ? messageHandler : false;
|
138 |
-
wplc_node_message_restart_handler = (typeof restartHandler !== "undefined" && typeof restartHandler === "function") ? restartHandler : false;
|
139 |
-
wplc_node_client_event_logger = (typeof clientEventLog !== "undefined" && typeof clientEventLog === "function") ? clientEventLog : false;
|
140 |
-
|
141 |
-
wplc_server_log("Socket Init");
|
142 |
-
//wplc_node_socket = new WebSocket('wss://wp-livechat.us-2.evennode.com');
|
143 |
-
|
144 |
-
|
145 |
-
if(wplc_node_async_cookie_check_complete !== true){
|
146 |
-
//Check if there are any messages we forgot to send via async
|
147 |
-
if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
|
148 |
-
var wplc_node_async_cookie_data = Cookies.getJSON("wplc_server_async_storage");
|
149 |
-
if(typeof wplc_node_async_cookie_data !== "undefined" && wplc_node_async_cookie_data !== "undefined" && wplc_node_async_cookie_data !== undefined && wplc_node_async_cookie_data !== null){
|
150 |
-
wplc_server_log("Async Cookies Found -> Sync...");
|
151 |
-
wplc_node_parse_async_from_object(wplc_node_async_cookie_data, function(){
|
152 |
-
wplc_node_async_cookie_check_complete = true;
|
153 |
-
});
|
154 |
-
}
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
wplc_node_socket.onerror = function(event){
|
159 |
-
wplc_server_error("Could not connect to server. Changing transport method.");
|
160 |
-
if(typeof failOver === "function" && wplc_node_sockets_ready !== true){
|
161 |
-
failOver();
|
162 |
-
wplc_node_switch_ajax_complete = true;
|
163 |
-
if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
|
164 |
-
wplc_node_client_event_logger("Connection Error - Switching methods");
|
165 |
-
}
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
wplc_node_socket.onopen = function(event) {
|
170 |
-
wplc_server_log("This socket is open");
|
171 |
-
wplc_node_sockets_ready = true; //Sockets are available and ready for use
|
172 |
-
if(typeof callback === "function"){
|
173 |
-
callback();
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
wplc_node_socket.onmessage = function(event){
|
178 |
-
if(typeof wplc_node_message_receiver === "function" && wplc_node_message_receiver !== false && wplc_node_message_receiver !== null){
|
179 |
-
//Delegate to handler
|
180 |
-
if(wplc_node_port_open){
|
181 |
-
wplc_node_message_receiver(event.data);
|
182 |
-
wplc_node_global_message_receiver(event.data);
|
183 |
-
}
|
184 |
-
}
|
185 |
-
|
186 |
-
}
|
187 |
-
|
188 |
-
wplc_node_socket.onclose = function(event) {
|
189 |
-
wplc_server_log("This socket is closed");
|
190 |
-
if (typeof wplc_node_message_restart_handler === "function") {
|
191 |
-
if (wplc_node_retry_count < 5 && wplc_node_switch_ajax_complete !== true) {
|
192 |
-
setTimeout(function(){
|
193 |
-
wplc_node_message_restart_handler(event.data);
|
194 |
-
wplc_node_retry_count++;
|
195 |
-
if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
|
196 |
-
wplc_node_client_event_logger("Connection Error - Retrying in 5 seconds...");
|
197 |
-
}
|
198 |
-
}, 5000);
|
199 |
-
} else {
|
200 |
-
if(wplc_node_retry_count >= 5){
|
201 |
-
if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
|
202 |
-
wplc_node_client_event_logger("Connection Error - Please refresh your browser");
|
203 |
-
}
|
204 |
-
}
|
205 |
-
}
|
206 |
-
}
|
207 |
-
}
|
208 |
-
|
209 |
-
|
210 |
-
},
|
211 |
-
send : function (wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
212 |
-
wplc_origin_url = wplc_send_url.replace("/wp-admin/admin-ajax.php", "");
|
213 |
-
wplc_send_data.origin_url = wplc_origin_url;
|
214 |
-
wplc_socket_send(wplc_send_data, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
|
215 |
-
|
216 |
-
if(wplc_node_async_cookie_check_complete){
|
217 |
-
//Now lets update the sync quick
|
218 |
-
wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout);
|
219 |
-
wplc_node_async_cookie_check_complete = false; //Stop infinite loop
|
220 |
-
}
|
221 |
-
},
|
222 |
-
isInSocketMode : function (){
|
223 |
-
return wplc_node_sockets_ready;
|
224 |
-
},
|
225 |
-
isPreparingSocketMode : function(){
|
226 |
-
var preparing = false;
|
227 |
-
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
228 |
-
if(window.WebSocket){
|
229 |
-
preparing = true;
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
return preparing;
|
234 |
-
},
|
235 |
-
transportPrepared : function(){
|
236 |
-
return wplc_transport_prepared;
|
237 |
-
},
|
238 |
-
asyncStorage : function(wplc_send_url, wplc_send_data, wplc_send_timeout){
|
239 |
-
wplc_node_async_array.push(wplc_send_data.msg);
|
240 |
-
|
241 |
-
if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
|
242 |
-
Cookies.set('wplc_server_async_storage', JSON.stringify(wplc_node_async_array), { expires: 1, path: '/' });
|
243 |
-
}
|
244 |
-
|
245 |
-
if(wplc_node_async_array.length >= wplc_node_async_send_rate){
|
246 |
-
wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout);
|
247 |
-
}
|
248 |
-
},
|
249 |
-
forceClosePort : function(){
|
250 |
-
wplc_node_port_open = false;
|
251 |
-
},
|
252 |
-
sendMessage : function(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
253 |
-
wplc_origin_url = wplc_send_url.replace("/wp-admin/admin-ajax.php", "");
|
254 |
-
wplc_send_data.origin_url = wplc_origin_url;
|
255 |
-
wplc_socket_add_to_queue(wplc_send_data, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
|
256 |
-
} */
|
257 |
-
|
258 |
-
};
|
259 |
-
|
260 |
-
WPLCServer.Ajax = {
|
261 |
-
init : function(callback, messageHandler, failOver, restartHandler, clientEventLog){
|
262 |
-
wplc_server_log("Ajax Init");
|
263 |
-
if(typeof callback === "function"){
|
264 |
-
callback();
|
265 |
-
}
|
266 |
-
},
|
267 |
-
send : function (wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
268 |
-
jQuery.ajax({
|
269 |
-
url : wplc_send_url,
|
270 |
-
data : wplc_send_data,
|
271 |
-
type : wplc_send_type,
|
272 |
-
timeout : wplc_send_timeout,
|
273 |
-
success : function(response){
|
274 |
-
if(typeof wplc_send_success_callback === "function"){
|
275 |
-
if(typeof wplc_send_data['action'] !== "undefined" && wplc_send_data['action'] !== "wplc_start_chat"){ //Is this the start?
|
276 |
-
wplc_send_success_callback(response);
|
277 |
-
} else {
|
278 |
-
//Check if we are going to go into socket mode after this?
|
279 |
-
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
280 |
-
if(window.WebSocket){
|
281 |
-
wplc_send_success_callback(response); //Send the data if we are going to sockets after this
|
282 |
-
}
|
283 |
-
}
|
284 |
-
}
|
285 |
-
}
|
286 |
-
},
|
287 |
-
error : function(error, exception){
|
288 |
-
if(typeof wplc_send_fail_callback === "function"){
|
289 |
-
wplc_send_fail_callback(error, exception);
|
290 |
-
}
|
291 |
-
},
|
292 |
-
complete : function(response){
|
293 |
-
if(typeof wplc_send_complete_callback === "function"){
|
294 |
-
wplc_send_complete_callback(response, wplc_send_data);
|
295 |
-
}
|
296 |
-
}
|
297 |
-
});
|
298 |
-
},
|
299 |
-
isInSocketMode : function (){
|
300 |
-
return wplc_node_sockets_ready;
|
301 |
-
},
|
302 |
-
isPreparingSocketMode : function(){
|
303 |
-
var preparing = false;
|
304 |
-
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
305 |
-
if(window.WebSocket){
|
306 |
-
preparing = true;
|
307 |
-
}
|
308 |
-
}
|
309 |
-
|
310 |
-
return preparing;
|
311 |
-
},
|
312 |
-
transportPrepared : function(){
|
313 |
-
return wplc_transport_prepared;
|
314 |
-
},
|
315 |
-
asyncStorage : function(wplc_send_url, wplc_send_data, wplc_send_timeout){
|
316 |
-
//Do nothing -> Ajax handles
|
317 |
-
},
|
318 |
-
forceClosePort : function(){
|
319 |
-
//Do Nothing ajax doesnt use socket ports
|
320 |
-
},
|
321 |
-
sendMessage : function(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
322 |
-
WPLCServer.Ajax.send(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
|
323 |
-
}
|
324 |
-
};
|
325 |
-
|
326 |
-
|
327 |
-
function wplc_server_log(msg){
|
328 |
-
if(wplc_supress_server_logs !== true && window.console){
|
329 |
-
console.log("WPLC SERVER: " + msg);
|
330 |
-
}
|
331 |
-
}
|
332 |
-
|
333 |
-
function wplc_server_error(msg){
|
334 |
-
if(window.console){
|
335 |
-
console.error("WPLC SERVER ERROR: " + msg);
|
336 |
-
}
|
337 |
-
}
|
338 |
-
|
339 |
-
function wplc_socket_send(data, success, fail, complete){
|
340 |
-
if(wplc_node_port_open){
|
341 |
-
wplc_socket_add_to_queue(data, success, fail, complete);
|
342 |
-
|
343 |
-
//if(data.action !== "wplc_user_send_msg" && data.action !== "wplc_admin_send_msg"){
|
344 |
-
var wplc_current_queue_item = wplc_socket_get_next_in_queue();
|
345 |
-
if(wplc_current_queue_item !== false){
|
346 |
-
if(typeof wplc_node_socket !== "undefined" && wplc_node_socket !== null){
|
347 |
-
if(wplc_node_socket.readyState !== WebSocket.CONNECTING && wplc_node_socket.readyState !== WebSocket.CLOSING && wplc_node_socket.readyState !== WebSocket.CLOSED){
|
348 |
-
wplc_current_queue_item.data.is_typing = typeof wplc_node_is_client_typing !== "undefined" ? wplc_node_is_client_typing : false;
|
349 |
-
wplc_node_socket.send(JSON.stringify(wplc_current_queue_item.data));
|
350 |
-
|
351 |
-
if(typeof wplc_current_queue_item.success === "function"){
|
352 |
-
wplc_current_queue_item.success();
|
353 |
-
}
|
354 |
-
} else {
|
355 |
-
//Try again in a sec just now -> Add it to the queue
|
356 |
-
setTimeout(function(){
|
357 |
-
wplc_socket_send(data, success, fail, complete);
|
358 |
-
}, 500);
|
359 |
-
}
|
360 |
-
} else {
|
361 |
-
setTimeout(function(){
|
362 |
-
//Try again in a sec just now -> Add it to the queue
|
363 |
-
wplc_socket_send(data, success, fail, complete);
|
364 |
-
}, 500);
|
365 |
-
}
|
366 |
-
}
|
367 |
-
//}
|
368 |
-
}
|
369 |
-
}
|
370 |
-
|
371 |
-
function wplc_sanitize_attributes( str ){
|
372 |
-
var wplc_allowed_attributes = "onload,onclick,alert,onerror,dalert";
|
373 |
-
var allowed_attr = wplc_allowed_attributes.split(",");
|
374 |
-
for( i = 0; i < allowed_attr.length; i++ ){
|
375 |
-
str = str.replace(allowed_attr[i], '');
|
376 |
-
}
|
377 |
-
|
378 |
-
return str;
|
379 |
-
}
|
380 |
-
|
381 |
-
function wplc_socket_add_to_queue(data, success, fail, complete){
|
382 |
-
if(typeof data.server_token === "undefined"){
|
383 |
-
if(typeof bleeper_api_key !== "undefined"){
|
384 |
-
data.server_token = bleeper_api_key;
|
385 |
-
} else {
|
386 |
-
wplc_server_error("No Server Token Present, Something will go wrong");
|
387 |
-
}
|
388 |
-
}
|
389 |
-
|
390 |
-
|
391 |
-
var queue_item = {
|
392 |
-
data: data,
|
393 |
-
success: success,
|
394 |
-
fail: fail,
|
395 |
-
complete: complete
|
396 |
-
}
|
397 |
-
|
398 |
-
if(wplc_node_send_queue.length > 0){
|
399 |
-
var last_item = wplc_node_send_queue[wplc_node_send_queue.length - 1];
|
400 |
-
if(JSON.stringify(last_item.data) !== JSON.stringify(data)){
|
401 |
-
wplc_node_send_queue.push(queue_item);
|
402 |
-
}
|
403 |
-
} else {
|
404 |
-
wplc_node_send_queue.push(queue_item);
|
405 |
-
}
|
406 |
-
}
|
407 |
-
|
408 |
-
function wplc_socket_get_next_in_queue(){
|
409 |
-
if(wplc_node_send_queue.length > 0){
|
410 |
-
return wplc_node_send_queue.shift();
|
411 |
-
} else {
|
412 |
-
return false;
|
413 |
-
}
|
414 |
-
}
|
415 |
-
|
416 |
-
function wplc_rest_api(type, wplc_send_data, wplc_send_timeout, next) {
|
417 |
-
|
418 |
-
if (typeof wplc_xhr !== "undefined" && typeof wplc_xhr.abort() !== "undefined") { wplc_xhr.abort(); }
|
419 |
-
if (typeof next === "undefined" || next === null) { next = function() {}; }
|
420 |
-
var wplc_node_ajax_action = type;
|
421 |
-
//Send the data to the Async
|
422 |
-
if(typeof wplc_restapi_enabled !== "undefined" && parseInt(wplc_restapi_enabled) === 1 && typeof wplc_restapi_endpoint !== "undefined"){
|
423 |
-
//REST API is ready to rumble
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
wplc_send_url = wplc_restapi_endpoint + "/" + type + "?nocache="+anti_cache;
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
var prepared_data = wplc_send_data;
|
432 |
-
|
433 |
-
var x = {
|
434 |
-
action : wplc_node_ajax_action,
|
435 |
-
relay_action : wplc_send_data.action,
|
436 |
-
chat_id : wplc_send_data.cid,
|
437 |
-
security : wplc_send_data.security,
|
438 |
-
message : wplc_send_data.msg,
|
439 |
-
server_token : wplc_restapi_token,
|
440 |
-
wplc_extra_data:document.wplc_extra_data,
|
441 |
-
wplc_data : wplc_send_data
|
442 |
-
};
|
443 |
-
|
444 |
-
|
445 |
-
prepared_data.server_token = wplc_restapi_token;
|
446 |
-
prepared_data.token = wplc_restapi_token; /* backwards compat */
|
447 |
-
if (typeof prepared_data.wplc_extra_data === "undefined") {
|
448 |
-
prepared_data.wplc_extra_data = document.wplc_extra_data;
|
449 |
-
}
|
450 |
-
prepared_data._wpnonce = wplc_restapi_nonce;
|
451 |
-
|
452 |
-
wplc_xhr = jQuery.ajax({
|
453 |
-
url : wplc_send_url,
|
454 |
-
data : prepared_data,
|
455 |
-
type : "POST",
|
456 |
-
timeout : wplc_send_timeout,
|
457 |
-
success : function(response){
|
458 |
-
wplc_server_log("REST SEND = SUCCESS");
|
459 |
-
next(response);
|
460 |
-
},
|
461 |
-
error : function(error, exception){
|
462 |
-
wplc_server_log("REST SEND = FAIL");
|
463 |
-
next();
|
464 |
-
},
|
465 |
-
complete : function(response){
|
466 |
-
next(response);
|
467 |
-
}
|
468 |
-
});
|
469 |
-
} else {
|
470 |
-
wplc_server_log("NO REST API :(");
|
471 |
-
next();
|
472 |
-
}
|
473 |
-
|
474 |
-
}
|
475 |
-
|
476 |
-
function wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout){
|
477 |
-
var wplc_node_ajax_action = "wplc_node_async_storage_ajax";
|
478 |
-
//Send the data to the Async
|
479 |
-
if(typeof wplc_restapi_enabled !== "undefined" && parseInt(wplc_restapi_enabled) === 1 && typeof wplc_restapi_endpoint !== "undefined"){
|
480 |
-
//REST API is ready to rumble
|
481 |
-
wplc_send_url = wplc_restapi_endpoint + "/async_storage";
|
482 |
-
} else {
|
483 |
-
//Ajax time! Cause the Rest she Left
|
484 |
-
}
|
485 |
-
|
486 |
-
var prepared_data = {
|
487 |
-
action : wplc_node_ajax_action,
|
488 |
-
relay_action : wplc_send_data.action,
|
489 |
-
chat_id : wplc_send_data.cid,
|
490 |
-
security : wplc_send_data.security,
|
491 |
-
messages : JSON.stringify(wplc_node_async_array),
|
492 |
-
wplc_extra_data:document.wplc_extra_data
|
493 |
-
};
|
494 |
-
|
495 |
-
if(typeof bleeper_api_key !== "undefined"){
|
496 |
-
prepared_data.server_token = bleeper_api_key;
|
497 |
-
}
|
498 |
-
|
499 |
-
/*
|
500 |
-
wplc_node_async_array = new Array(); //Clearing the storage array before the next data can be sent through
|
501 |
-
if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
|
502 |
-
Cookies.remove('wplc_server_async_storage'); //Clear the cookies now so that we don't do this again.
|
503 |
-
}
|
504 |
-
*/
|
505 |
-
jQuery.ajax({
|
506 |
-
url : wplc_send_url,
|
507 |
-
data : prepared_data,
|
508 |
-
type : "POST",
|
509 |
-
timeout : wplc_send_timeout,
|
510 |
-
success : function(response){
|
511 |
-
wplc_server_log("ASYNC STORAGE = SUCCESS");
|
512 |
-
},
|
513 |
-
error : function(error, exception){
|
514 |
-
wplc_server_log("ASYNC STORAGE = FAIL");
|
515 |
-
},
|
516 |
-
complete : function(response){
|
517 |
-
|
518 |
-
}
|
519 |
-
});
|
520 |
-
}
|
521 |
-
|
522 |
-
function wplc_json_validator(str) {
|
523 |
-
try {
|
524 |
-
JSON.parse(str);
|
525 |
-
} catch (e) {
|
526 |
-
return false;
|
527 |
-
}
|
528 |
-
return true;
|
529 |
-
}
|
530 |
-
|
531 |
-
function wplc_node_parse_async_from_object(obj, complete){
|
532 |
-
for(var i in obj){
|
533 |
-
if(obj.hasOwnProperty(i)){
|
534 |
-
wplc_node_async_array.push(obj[i]);
|
535 |
-
}
|
536 |
-
}
|
537 |
-
|
538 |
-
if(typeof complete === "function"){
|
539 |
-
complete();
|
540 |
-
}
|
541 |
-
}
|
542 |
-
|
543 |
-
function wplc_node_global_message_receiver(data){
|
544 |
-
if(data){
|
545 |
-
if (typeof data !== "object") {
|
546 |
-
data = JSON.parse(data);
|
547 |
-
}
|
548 |
-
}
|
549 |
-
|
550 |
-
if(typeof data['pair_name'] !== "undefined"){
|
551 |
-
if(data['pair_name'] !== wplc_node_pair_name){
|
552 |
-
wplc_node_pair_name = data['pair_name'];
|
553 |
-
}
|
554 |
-
}
|
555 |
-
|
556 |
-
if(typeof data['pair_typing'] !== "undefined"){
|
557 |
-
|
558 |
-
if(data['pair_typing'] === true || data['pair_typing'] === "true"){
|
559 |
-
if(wplc_node_is_pair_typing_indicator_visible === false){
|
560 |
-
if (jQuery("#wplc_user_typing").length>0) { } else {
|
561 |
-
jQuery(".typing_indicator").html("<span id='wplc_user_typing'>"+wplc_node_pair_name+" "+wplc_localized_string_is_typing_single+"</span>");
|
562 |
-
jQuery(".typing_indicator").addClass("typing_indicator_active");
|
563 |
-
}
|
564 |
-
}
|
565 |
-
wplc_node_is_pair_typing_indicator_visible = true;
|
566 |
-
} else {
|
567 |
-
if(wplc_node_is_pair_typing_indicator_visible === true){
|
568 |
-
if (jQuery("#wplc_user_typing").length>0) {
|
569 |
-
jQuery("#wplc_user_typing").fadeOut("slow").remove();
|
570 |
-
jQuery(".typing_indicator").removeClass("typing_indicator_active");
|
571 |
-
}
|
572 |
-
}
|
573 |
-
wplc_node_is_pair_typing_indicator_visible = false;
|
574 |
-
}
|
575 |
-
|
576 |
-
}
|
577 |
-
}
|
578 |
-
String.prototype.wplcStripSlashes = function(){
|
579 |
-
return this.replace(/\\(.)/mg, "$1");
|
580 |
-
}
|
581 |
-
|
582 |
-
function wplc_add_date_and_time(the_message,originates) {
|
583 |
-
|
584 |
-
if (parseInt(originates) === 1 || parseInt(originates) === 2) {
|
585 |
-
|
586 |
-
var time_msg = '';
|
587 |
-
|
588 |
-
/* identfy the timestamp */
|
589 |
-
if (typeof the_message.other === "undefined" || typeof the_message.other.datetime === "undefined" || the_message.other === false) {
|
590 |
-
/* only run if it hasnt got a timestamp in the .other.datetime key */
|
591 |
-
if (typeof the_message.timestamp !== "undefined") {
|
592 |
-
/* most likely came from node as node */
|
593 |
-
|
594 |
-
if (typeof the_message.other !== "object") { the_message.other = {}; }
|
595 |
-
the_message.other.datetime = the_message.timestamp;
|
596 |
-
|
597 |
-
}
|
598 |
-
}
|
599 |
-
|
600 |
-
if (typeof the_message.other === "undefined" || typeof the_message.other.datetime === "undefined") {
|
601 |
-
/* there is no datetime so return nothing */
|
602 |
-
return '';
|
603 |
-
} else {
|
604 |
-
if (typeof wplc_show_chat_detail !== "undefined") {
|
605 |
-
|
606 |
-
var datetimestamp = the_message.other.hasOwnProperty( 'datetimeUTC' ) ? the_message.other.datetimeUTC : the_message.other.datetime;
|
607 |
-
var dateTime = new Date( parseInt( datetimestamp ) * 1000 );
|
608 |
-
|
609 |
-
if ( typeof wplc_show_chat_detail.date !== 'undefined' && '1' === wplc_show_chat_detail.date ) {
|
610 |
-
|
611 |
-
var date_format = typeof wplc_datetime_format !== 'undefined' && wplc_datetime_format.hasOwnProperty( 'date_format' ) ? wplc_datetime_format.date_format : 'n/d';
|
612 |
-
var date_month = dateTime.getMonth();
|
613 |
-
var date_day = dateTime.getDate();
|
614 |
-
var date_months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
615 |
-
var date_days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
616 |
-
var date_day_no = dateTime.getDay();
|
617 |
-
var date_year = dateTime.getFullYear();
|
618 |
-
|
619 |
-
time_msg += date_format
|
620 |
-
.replace( /S/g, '%S%' )
|
621 |
-
.replace( /D/g, '%D%' )
|
622 |
-
.replace( /l/g, '%l%' )
|
623 |
-
.replace( /F/g, '%F%' )
|
624 |
-
.replace( /M/g, '%M%' )
|
625 |
-
.replace( /j/g, date_day )
|
626 |
-
.replace( /d/g, date_day < 10 ? '0' + date_day : date_day )
|
627 |
-
.replace( /w/g, date_day_no )
|
628 |
-
.replace( /n/g, date_month + 1 )
|
629 |
-
.replace( /m/g, date_month + 1 < 10 ? '0' + ( date_month + 1 ) : date_month + 1 )
|
630 |
-
.replace( /Y/g, date_year )
|
631 |
-
.replace( /y/g, date_year.toString().substr( 2, 2 ) )
|
632 |
-
.replace( /%S%/g, 1 === date_day ? 'st' : ( 2 === date_day ? 'nd' : ( 3 === date_day ? 'rd' : 'th' ) ) )
|
633 |
-
.replace( /%D%/g, date_days[ date_day_no ].substr( 0, 3 ) )
|
634 |
-
.replace( /%l%/g, date_days[ date_day_no ] )
|
635 |
-
.replace( /%F%/g, date_months[ date_month ] )
|
636 |
-
.replace( /%M%/g, date_months[ date_month ].substr( 0, 3 ) ) + ' ';
|
637 |
-
|
638 |
-
}
|
639 |
-
if ( typeof wplc_show_chat_detail.time !== "undefined" && '1' === wplc_show_chat_detail.time ) {
|
640 |
-
|
641 |
-
var time_format = typeof wplc_datetime_format !== 'undefined' && wplc_datetime_format.hasOwnProperty( 'time_format' ) ? wplc_datetime_format.time_format : 'H:i';
|
642 |
-
var time_hours_12 = dateTime.getHours() > 12 ? dateTime.getHours() - 12 : ( dateTime.getHours() < 1 ? 12 : dateTime.getHours() );
|
643 |
-
var time_hours_24 = dateTime.getHours();
|
644 |
-
var time_am_pm = time_hours_24 > 11 ? 'pm' : 'am';
|
645 |
-
var time_minutes = dateTime.getMinutes();
|
646 |
-
|
647 |
-
time_msg += time_format
|
648 |
-
.replace( /g/g, time_hours_12 )
|
649 |
-
.replace( /h/g, time_hours_12 < 10 ? '0' + time_hours_12 : time_hours_12 )
|
650 |
-
.replace( /G/g, time_hours_24 )
|
651 |
-
.replace( /H/g, time_hours_24 < 10 ? '0' + time_hours_24 : time_hours_24 )
|
652 |
-
.replace( /i/g, time_minutes < 10 ? '0' +
|
653 |
-
.replace( /a/g, time_am_pm.toLowerCase() )
|
654 |
-
.replace( /A/g, time_am_pm.toUpperCase() );
|
655 |
-
|
656 |
-
}
|
657 |
-
if (time_msg !== '') {
|
658 |
-
if (parseInt(originates) === 1) { aoru_class = 'wplc-msg-float-left'; } else { aoru_class = 'wplc-msg-float-right'; }
|
659 |
-
time_msg = '<span class="timedate '+aoru_class+'">'+time_msg+'</span>';
|
660 |
-
}
|
661 |
-
}
|
662 |
-
|
663 |
-
|
664 |
-
return time_msg;
|
665 |
-
}
|
666 |
-
} else {
|
667 |
-
return '';
|
668 |
-
}
|
669 |
-
|
670 |
-
}
|
671 |
-
|
672 |
-
function wplc_get_chat_person_name_msg_field(name) {
|
673 |
-
try {
|
674 |
-
return '<span class="wplc-chat-person-name">' + name + ': </span>';
|
675 |
-
} catch(err) {
|
676 |
-
//console.log("Could not wplc_get_chat_person_name_msg_field() " + err);
|
677 |
-
}
|
678 |
-
}
|
679 |
-
|
680 |
-
/**
|
681 |
-
* Removes undesired strings from a message which contains a GIF URL and returns only the gif url
|
682 |
-
* @param {*} message_content
|
683 |
-
*/
|
684 |
-
function getCleanedGif(message_content) {
|
685 |
-
if (typeof(message_content) !== "undefined") {
|
686 |
-
var msgParts = message_content.split(" ");
|
687 |
-
|
688 |
-
if (typeof(msgParts) !== "undefined") {
|
689 |
-
|
690 |
-
for (var i = 0; i < msgParts.length; i++) {
|
691 |
-
var msgPart = msgParts[i];
|
692 |
-
|
693 |
-
if (typeof(msgPart) !== "undefined") {
|
694 |
-
|
695 |
-
if (gifExtensionPattern.test(msgPart)) {
|
696 |
-
var cleanedGifUrl = msgPart.replace("href=", "");
|
697 |
-
cleanedGifUrl = cleanedGifUrl.replace(/\"/g, "");
|
698 |
-
|
699 |
-
return cleanedGifUrl;
|
700 |
-
}
|
701 |
-
}
|
702 |
-
}
|
703 |
-
}
|
704 |
-
}
|
705 |
-
|
706 |
-
return "";
|
707 |
-
}
|
708 |
-
|
709 |
-
/**
|
710 |
-
* Pushes the message object to the chat box
|
711 |
-
*
|
712 |
-
* @param {object} the_message The message object
|
713 |
-
* @param {string} aoru a for Agent, u for User
|
714 |
-
* @return void
|
715 |
-
*/
|
716 |
-
function wplc_push_message_to_chatbox(the_message, aoru, next) {
|
717 |
-
|
718 |
-
/**
|
719 |
-
* First check if we have processed this message already, by comparing the ID
|
720 |
-
*
|
721 |
-
* Some system notifications may not come through with an ID so we can accept those.
|
722 |
-
*/
|
723 |
-
var add_message = true;
|
724 |
-
if (typeof the_message.mid !== "undefined" && aoru === "u") {
|
725 |
-
if (parseInt(the_message.mid) === 0 || the_message.mid === null) {
|
726 |
-
add_message = true;
|
727 |
-
} else {
|
728 |
-
if (typeof wplc_msg_history[the_message.mid] !== "undefined") {
|
729 |
-
/* we have this message already */
|
730 |
-
add_message = false;
|
731 |
-
} else {
|
732 |
-
/* add this to our history */
|
733 |
-
wplc_msg_history[the_message.mid] = true;
|
734 |
-
}
|
735 |
-
}
|
736 |
-
}
|
737 |
-
if (add_message) {
|
738 |
-
if (typeof the_message.originates !== "undefined" && the_message.originates !== null && the_message.originates !== "null"){
|
739 |
-
var message_class = "";
|
740 |
-
var grav_hash = "";
|
741 |
-
var message_grav = "";
|
742 |
-
var message_from = "";
|
743 |
-
var message_content = "";
|
744 |
-
var message_aid;
|
745 |
-
|
746 |
-
var message_edit_string = "";
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
} else
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
if (
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
} else {
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
if (typeof
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
concatenated_message += "<
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
function wplc_node_renew_typing() {
|
1059 |
-
clearTimeout(wplc_node_searchTimeout);
|
1060 |
-
wplc_node_searchTimeout = setTimeout(wplc_node_clear_typing, 1000);
|
1061 |
-
}
|
1062 |
-
function wplc_node_clear_typing() {
|
1063 |
-
wplc_node_is_client_typing = false;
|
1064 |
-
clearTimeout(wplc_node_searchTimeout);
|
1065 |
-
}
|
1066 |
-
});
|
1067 |
-
});
|
1068 |
-
|
1069 |
-
var wplc_generate_system_notification_object = function(msg,other,originates) {
|
1070 |
-
the_message = {};
|
1071 |
-
the_message.originates = originates;
|
1072 |
-
the_message.msg = msg;
|
1073 |
-
the_message.other = other;
|
1074 |
-
var wplc_d = new Date();
|
1075 |
-
the_message.other.datetime = Math.round( wplc_d.getTime() / 1000 );
|
1076 |
-
return the_message;
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
function wplc_display_system_notification(message) {
|
1080 |
-
message_output = '<div id="bleeper_notification_message" class="wplc-color-bg-1 wplc-color-2">' + message.msg + '</div>';
|
1081 |
-
|
1082 |
-
if (jQuery('#bleeper_notification_message').length == 0) {
|
1083 |
-
jQuery('#wp-live-chat-4').prepend(message_output);
|
1084 |
-
}
|
1085 |
-
}
|
1086 |
-
|
1087 |
-
function wplc_clear_system_notification() {
|
1088 |
-
if (jQuery('#bleeper_notification_message').length !== 0) {
|
1089 |
-
jQuery('#bleeper_notification_message').remove();
|
1090 |
-
}
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
/*
|
1094 |
-
* Updates the message element with a new message.
|
1095 |
-
* - mid: Message ID which is appended to class selector as .message_{mid}
|
1096 |
-
* - message: The html/text to insert into this container
|
1097 |
-
* - inner_container_class: Optional, used to select the first child of the class type within the primary message container
|
1098 |
-
* Nice for selecting the 'messageBody' class specifically
|
1099 |
-
*/
|
1100 |
-
function wplc_update_message_element_by_mid(mid, message, inner_container_class){
|
1101 |
-
var element_selector = ".message_" + mid;
|
1102 |
-
element_selector += (typeof inner_container_class !== "undefined" && inner_container_class !== false) ? (" ." + inner_container_class) : "";
|
1103 |
-
|
1104 |
-
jQuery(element_selector).html(message);
|
1105 |
}
|
1 |
+
/*
|
2 |
+
* Hanldes Message transportation within WPLC
|
3 |
+
*/
|
4 |
+
var gifExtensionPattern = new RegExp(/\.(gif)\b/);
|
5 |
+
|
6 |
+
var wplc_server_method = null;
|
7 |
+
var wplc_supress_server_logs = true; //We are now surpressing server logs
|
8 |
+
var wplc_node_socket = null; //Will not be set unless
|
9 |
+
var wplc_node_send_queue = new Array();
|
10 |
+
var wplc_node_message_receiver = null;
|
11 |
+
var wplc_node_message_restart_handler = null;
|
12 |
+
var wplc_node_client_event_logger = null;
|
13 |
+
var wplc_node_sockets_ready = false;
|
14 |
+
var wplc_transport_prepared = false;
|
15 |
+
|
16 |
+
var wplc_node_async_array = new Array(); //Array which will be sent to our async URL for storage
|
17 |
+
var wplc_node_async_send_rate = 1; //Amount of messages that need to be present before we sent the async request
|
18 |
+
var wplc_node_async_cookie_check_complete = false;
|
19 |
+
|
20 |
+
var wplc_node_port_open = true; //This can be set to false to prevent any future data being sent
|
21 |
+
var wplc_node_is_client_typing = false;
|
22 |
+
var wplc_node_is_pair_typing_indicator_visible = false;
|
23 |
+
var wplc_node_pair_name = "";
|
24 |
+
|
25 |
+
var wplc_node_switch_ajax_complete = false;
|
26 |
+
var wplc_node_retry_count = 0;
|
27 |
+
|
28 |
+
var wplc_msg_history = new Array();
|
29 |
+
|
30 |
+
var wplc_xhr; //XHR global (allows us to abort previous AJAX request when the agent flips between screens quickly)
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
function WPLCServer(){
|
35 |
+
var wplc_server_ref = this;
|
36 |
+
//Default to ajax until chat starts
|
37 |
+
wplc_server_method = WPLCServer.Ajax;
|
38 |
+
wplc_server_ref.send = wplc_server_method.send;
|
39 |
+
|
40 |
+
wplc_server_ref.isInSocketMode = wplc_server_method.isInSocketMode;
|
41 |
+
wplc_server_ref.isPreparingSocketMode = wplc_server_method.isPreparingSocketMode;
|
42 |
+
wplc_server_ref.transportPrepared = wplc_server_method.transportPrepared;
|
43 |
+
wplc_server_ref.asyncStorage = wplc_server_method.asyncStorage;
|
44 |
+
wplc_server_ref.forceClosePort = wplc_server_method.forceClosePort;
|
45 |
+
wplc_server_ref.sendMessage = wplc_server_method.sendMessage;
|
46 |
+
|
47 |
+
|
48 |
+
wplc_server_ref.prepareTransport = function(callback, messageHandler, restartHandler, clientEventLog){
|
49 |
+
wplc_server_log("-------------------");
|
50 |
+
wplc_server_log("Preparing Transport");
|
51 |
+
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
52 |
+
if(window.WebSocket){
|
53 |
+
//Sockets are supported
|
54 |
+
wplc_server_method = WPLCServer.Socket;
|
55 |
+
wplc_server_log("Socket Mode");
|
56 |
+
} else {
|
57 |
+
wplc_server_method = WPLCServer.Ajax;
|
58 |
+
wplc_server_log("Ajax Mode");
|
59 |
+
}
|
60 |
+
} else {
|
61 |
+
wplc_server_method = WPLCServer.Ajax;
|
62 |
+
wplc_server_log("Ajax Mode");
|
63 |
+
}
|
64 |
+
|
65 |
+
wplc_server_method.init(function(){
|
66 |
+
wplc_server_ref.send = wplc_server_method.send;
|
67 |
+
wplc_server_ref.isInSocketMode = wplc_server_method.isInSocketMode;
|
68 |
+
wplc_server_ref.isPreparingSocketMode = wplc_server_method.isPreparingSocketMode;
|
69 |
+
wplc_server_ref.transportPrepared = wplc_server_method.transportPrepared;
|
70 |
+
wplc_server_ref.asyncStorage = wplc_server_method.asyncStorage;
|
71 |
+
wplc_server_ref.forceClosePort = wplc_server_method.forceClosePort;
|
72 |
+
wplc_server_ref.sendMessage = wplc_server_method.sendMessage;
|
73 |
+
|
74 |
+
if(typeof callback === "function"){
|
75 |
+
callback();
|
76 |
+
}
|
77 |
+
}, messageHandler, function(){
|
78 |
+
wplc_server_method = WPLCServer.Ajax;
|
79 |
+
wplc_server_log("Ajax Mode - Fail Over");
|
80 |
+
|
81 |
+
wplc_server_ref.send = wplc_server_method.send;
|
82 |
+
wplc_server_ref.isInSocketMode = wplc_server_method.isInSocketMode;
|
83 |
+
wplc_server_ref.isPreparingSocketMode = function(){ return false; };
|
84 |
+
wplc_server_ref.transportPrepared = wplc_server_method.transportPrepared;
|
85 |
+
wplc_server_ref.asyncStorage = wplc_server_method.asyncStorage;
|
86 |
+
wplc_server_ref.forceClosePort = wplc_server_method.forceClosePort;
|
87 |
+
wplc_server_ref.sendMessage = wplc_server_method.sendMessage;
|
88 |
+
|
89 |
+
if(typeof wplc_ajaxurl !== "undefined" && typeof wplc_nonce !== "undefined" && typeof wplc_cid !== "undefined"){
|
90 |
+
var wplc_fail_over_data = {
|
91 |
+
action: 'wplc_node_switch_to_ajax',
|
92 |
+
security: wplc_nonce,
|
93 |
+
cid: wplc_cid
|
94 |
+
};
|
95 |
+
|
96 |
+
jQuery.ajax({
|
97 |
+
url : wplc_ajaxurl,
|
98 |
+
data : wplc_fail_over_data,
|
99 |
+
type : "POST",
|
100 |
+
timeout : 120000,
|
101 |
+
success : function(response){
|
102 |
+
wplc_server_log("Ajax Mode Enabled");
|
103 |
+
},
|
104 |
+
error : function(error, exception){
|
105 |
+
wplc_server_log("Chat Fail Over Could Not Be Setup");
|
106 |
+
},
|
107 |
+
complete : function(response){
|
108 |
+
if(typeof callback === "function"){
|
109 |
+
callback();
|
110 |
+
}
|
111 |
+
}
|
112 |
+
});
|
113 |
+
}
|
114 |
+
}, restartHandler, clientEventLog);
|
115 |
+
|
116 |
+
wplc_server_log("Transport Prepared");
|
117 |
+
wplc_server_log("-------------------");
|
118 |
+
wplc_transport_prepared = true;
|
119 |
+
}
|
120 |
+
|
121 |
+
wplc_server_ref.browserIsSocketReady = function(){
|
122 |
+
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
123 |
+
if(window.WebSocket){
|
124 |
+
return true;
|
125 |
+
} else {
|
126 |
+
return false;
|
127 |
+
}
|
128 |
+
} else {
|
129 |
+
return false;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
WPLCServer.Socket = {
|
135 |
+
/*
|
136 |
+
init : function(callback, messageHandler, failOver, restartHandler, clientEventLog){
|
137 |
+
wplc_node_message_receiver = (typeof messageHandler !== "undefined" && typeof messageHandler === "function") ? messageHandler : false;
|
138 |
+
wplc_node_message_restart_handler = (typeof restartHandler !== "undefined" && typeof restartHandler === "function") ? restartHandler : false;
|
139 |
+
wplc_node_client_event_logger = (typeof clientEventLog !== "undefined" && typeof clientEventLog === "function") ? clientEventLog : false;
|
140 |
+
|
141 |
+
wplc_server_log("Socket Init");
|
142 |
+
//wplc_node_socket = new WebSocket('wss://wp-livechat.us-2.evennode.com');
|
143 |
+
|
144 |
+
|
145 |
+
if(wplc_node_async_cookie_check_complete !== true){
|
146 |
+
//Check if there are any messages we forgot to send via async
|
147 |
+
if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
|
148 |
+
var wplc_node_async_cookie_data = Cookies.getJSON("wplc_server_async_storage");
|
149 |
+
if(typeof wplc_node_async_cookie_data !== "undefined" && wplc_node_async_cookie_data !== "undefined" && wplc_node_async_cookie_data !== undefined && wplc_node_async_cookie_data !== null){
|
150 |
+
wplc_server_log("Async Cookies Found -> Sync...");
|
151 |
+
wplc_node_parse_async_from_object(wplc_node_async_cookie_data, function(){
|
152 |
+
wplc_node_async_cookie_check_complete = true;
|
153 |
+
});
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
wplc_node_socket.onerror = function(event){
|
159 |
+
wplc_server_error("Could not connect to server. Changing transport method.");
|
160 |
+
if(typeof failOver === "function" && wplc_node_sockets_ready !== true){
|
161 |
+
failOver();
|
162 |
+
wplc_node_switch_ajax_complete = true;
|
163 |
+
if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
|
164 |
+
wplc_node_client_event_logger("Connection Error - Switching methods");
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
wplc_node_socket.onopen = function(event) {
|
170 |
+
wplc_server_log("This socket is open");
|
171 |
+
wplc_node_sockets_ready = true; //Sockets are available and ready for use
|
172 |
+
if(typeof callback === "function"){
|
173 |
+
callback();
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
wplc_node_socket.onmessage = function(event){
|
178 |
+
if(typeof wplc_node_message_receiver === "function" && wplc_node_message_receiver !== false && wplc_node_message_receiver !== null){
|
179 |
+
//Delegate to handler
|
180 |
+
if(wplc_node_port_open){
|
181 |
+
wplc_node_message_receiver(event.data);
|
182 |
+
wplc_node_global_message_receiver(event.data);
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
wplc_node_socket.onclose = function(event) {
|
189 |
+
wplc_server_log("This socket is closed");
|
190 |
+
if (typeof wplc_node_message_restart_handler === "function") {
|
191 |
+
if (wplc_node_retry_count < 5 && wplc_node_switch_ajax_complete !== true) {
|
192 |
+
setTimeout(function(){
|
193 |
+
wplc_node_message_restart_handler(event.data);
|
194 |
+
wplc_node_retry_count++;
|
195 |
+
if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
|
196 |
+
wplc_node_client_event_logger("Connection Error - Retrying in 5 seconds...");
|
197 |
+
}
|
198 |
+
}, 5000);
|
199 |
+
} else {
|
200 |
+
if(wplc_node_retry_count >= 5){
|
201 |
+
if(typeof wplc_node_client_event_logger !== "undefined" && typeof wplc_node_client_event_logger === "function"){
|
202 |
+
wplc_node_client_event_logger("Connection Error - Please refresh your browser");
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
|
210 |
+
},
|
211 |
+
send : function (wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
212 |
+
wplc_origin_url = wplc_send_url.replace("/wp-admin/admin-ajax.php", "");
|
213 |
+
wplc_send_data.origin_url = wplc_origin_url;
|
214 |
+
wplc_socket_send(wplc_send_data, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
|
215 |
+
|
216 |
+
if(wplc_node_async_cookie_check_complete){
|
217 |
+
//Now lets update the sync quick
|
218 |
+
wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout);
|
219 |
+
wplc_node_async_cookie_check_complete = false; //Stop infinite loop
|
220 |
+
}
|
221 |
+
},
|
222 |
+
isInSocketMode : function (){
|
223 |
+
return wplc_node_sockets_ready;
|
224 |
+
},
|
225 |
+
isPreparingSocketMode : function(){
|
226 |
+
var preparing = false;
|
227 |
+
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
228 |
+
if(window.WebSocket){
|
229 |
+
preparing = true;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
return preparing;
|
234 |
+
},
|
235 |
+
transportPrepared : function(){
|
236 |
+
return wplc_transport_prepared;
|
237 |
+
},
|
238 |
+
asyncStorage : function(wplc_send_url, wplc_send_data, wplc_send_timeout){
|
239 |
+
wplc_node_async_array.push(wplc_send_data.msg);
|
240 |
+
|
241 |
+
if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
|
242 |
+
Cookies.set('wplc_server_async_storage', JSON.stringify(wplc_node_async_array), { expires: 1, path: '/' });
|
243 |
+
}
|
244 |
+
|
245 |
+
if(wplc_node_async_array.length >= wplc_node_async_send_rate){
|
246 |
+
wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout);
|
247 |
+
}
|
248 |
+
},
|
249 |
+
forceClosePort : function(){
|
250 |
+
wplc_node_port_open = false;
|
251 |
+
},
|
252 |
+
sendMessage : function(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
253 |
+
wplc_origin_url = wplc_send_url.replace("/wp-admin/admin-ajax.php", "");
|
254 |
+
wplc_send_data.origin_url = wplc_origin_url;
|
255 |
+
wplc_socket_add_to_queue(wplc_send_data, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
|
256 |
+
} */
|
257 |
+
|
258 |
+
};
|
259 |
+
|
260 |
+
WPLCServer.Ajax = {
|
261 |
+
init : function(callback, messageHandler, failOver, restartHandler, clientEventLog){
|
262 |
+
wplc_server_log("Ajax Init");
|
263 |
+
if(typeof callback === "function"){
|
264 |
+
callback();
|
265 |
+
}
|
266 |
+
},
|
267 |
+
send : function (wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
268 |
+
jQuery.ajax({
|
269 |
+
url : wplc_send_url,
|
270 |
+
data : wplc_send_data,
|
271 |
+
type : wplc_send_type,
|
272 |
+
timeout : wplc_send_timeout,
|
273 |
+
success : function(response){
|
274 |
+
if(typeof wplc_send_success_callback === "function"){
|
275 |
+
if(typeof wplc_send_data['action'] !== "undefined" && wplc_send_data['action'] !== "wplc_start_chat"){ //Is this the start?
|
276 |
+
wplc_send_success_callback(response);
|
277 |
+
} else {
|
278 |
+
//Check if we are going to go into socket mode after this?
|
279 |
+
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
280 |
+
if(window.WebSocket){
|
281 |
+
wplc_send_success_callback(response); //Send the data if we are going to sockets after this
|
282 |
+
}
|
283 |
+
}
|
284 |
+
}
|
285 |
+
}
|
286 |
+
},
|
287 |
+
error : function(error, exception){
|
288 |
+
if(typeof wplc_send_fail_callback === "function"){
|
289 |
+
wplc_send_fail_callback(error, exception);
|
290 |
+
}
|
291 |
+
},
|
292 |
+
complete : function(response){
|
293 |
+
if(typeof wplc_send_complete_callback === "function"){
|
294 |
+
wplc_send_complete_callback(response, wplc_send_data);
|
295 |
+
}
|
296 |
+
}
|
297 |
+
});
|
298 |
+
},
|
299 |
+
isInSocketMode : function (){
|
300 |
+
return wplc_node_sockets_ready;
|
301 |
+
},
|
302 |
+
isPreparingSocketMode : function(){
|
303 |
+
var preparing = false;
|
304 |
+
if(typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true"){
|
305 |
+
if(window.WebSocket){
|
306 |
+
preparing = true;
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
return preparing;
|
311 |
+
},
|
312 |
+
transportPrepared : function(){
|
313 |
+
return wplc_transport_prepared;
|
314 |
+
},
|
315 |
+
asyncStorage : function(wplc_send_url, wplc_send_data, wplc_send_timeout){
|
316 |
+
//Do nothing -> Ajax handles
|
317 |
+
},
|
318 |
+
forceClosePort : function(){
|
319 |
+
//Do Nothing ajax doesnt use socket ports
|
320 |
+
},
|
321 |
+
sendMessage : function(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback){
|
322 |
+
WPLCServer.Ajax.send(wplc_send_url, wplc_send_data, wplc_send_type, wplc_send_timeout, wplc_send_success_callback, wplc_send_fail_callback, wplc_send_complete_callback);
|
323 |
+
}
|
324 |
+
};
|
325 |
+
|
326 |
+
|
327 |
+
function wplc_server_log(msg){
|
328 |
+
if(wplc_supress_server_logs !== true && window.console){
|
329 |
+
console.log("WPLC SERVER: " + msg);
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
function wplc_server_error(msg){
|
334 |
+
if(window.console){
|
335 |
+
console.error("WPLC SERVER ERROR: " + msg);
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
function wplc_socket_send(data, success, fail, complete){
|
340 |
+
if(wplc_node_port_open){
|
341 |
+
wplc_socket_add_to_queue(data, success, fail, complete);
|
342 |
+
|
343 |
+
//if(data.action !== "wplc_user_send_msg" && data.action !== "wplc_admin_send_msg"){
|
344 |
+
var wplc_current_queue_item = wplc_socket_get_next_in_queue();
|
345 |
+
if(wplc_current_queue_item !== false){
|
346 |
+
if(typeof wplc_node_socket !== "undefined" && wplc_node_socket !== null){
|
347 |
+
if(wplc_node_socket.readyState !== WebSocket.CONNECTING && wplc_node_socket.readyState !== WebSocket.CLOSING && wplc_node_socket.readyState !== WebSocket.CLOSED){
|
348 |
+
wplc_current_queue_item.data.is_typing = typeof wplc_node_is_client_typing !== "undefined" ? wplc_node_is_client_typing : false;
|
349 |
+
wplc_node_socket.send(JSON.stringify(wplc_current_queue_item.data));
|
350 |
+
|
351 |
+
if(typeof wplc_current_queue_item.success === "function"){
|
352 |
+
wplc_current_queue_item.success();
|
353 |
+
}
|
354 |
+
} else {
|
355 |
+
//Try again in a sec just now -> Add it to the queue
|
356 |
+
setTimeout(function(){
|
357 |
+
wplc_socket_send(data, success, fail, complete);
|
358 |
+
}, 500);
|
359 |
+
}
|
360 |
+
} else {
|
361 |
+
setTimeout(function(){
|
362 |
+
//Try again in a sec just now -> Add it to the queue
|
363 |
+
wplc_socket_send(data, success, fail, complete);
|
364 |
+
}, 500);
|
365 |
+
}
|
366 |
+
}
|
367 |
+
//}
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
function wplc_sanitize_attributes( str ){
|
372 |
+
var wplc_allowed_attributes = "onload,onclick,alert,onerror,dalert";
|
373 |
+
var allowed_attr = wplc_allowed_attributes.split(",");
|
374 |
+
for( i = 0; i < allowed_attr.length; i++ ){
|
375 |
+
str = str.replace(allowed_attr[i], '');
|
376 |
+
}
|
377 |
+
|
378 |
+
return str;
|
379 |
+
}
|
380 |
+
|
381 |
+
function wplc_socket_add_to_queue(data, success, fail, complete){
|
382 |
+
if(typeof data.server_token === "undefined"){
|
383 |
+
if(typeof bleeper_api_key !== "undefined"){
|
384 |
+
data.server_token = bleeper_api_key;
|
385 |
+
} else {
|
386 |
+
wplc_server_error("No Server Token Present, Something will go wrong");
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
var queue_item = {
|
392 |
+
data: data,
|
393 |
+
success: success,
|
394 |
+
fail: fail,
|
395 |
+
complete: complete
|
396 |
+
}
|
397 |
+
|
398 |
+
if(wplc_node_send_queue.length > 0){
|
399 |
+
var last_item = wplc_node_send_queue[wplc_node_send_queue.length - 1];
|
400 |
+
if(JSON.stringify(last_item.data) !== JSON.stringify(data)){
|
401 |
+
wplc_node_send_queue.push(queue_item);
|
402 |
+
}
|
403 |
+
} else {
|
404 |
+
wplc_node_send_queue.push(queue_item);
|
405 |
+
}
|
406 |
+
}
|
407 |
+
|
408 |
+
function wplc_socket_get_next_in_queue(){
|
409 |
+
if(wplc_node_send_queue.length > 0){
|
410 |
+
return wplc_node_send_queue.shift();
|
411 |
+
} else {
|
412 |
+
return false;
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
function wplc_rest_api(type, wplc_send_data, wplc_send_timeout, next) {
|
417 |
+
|
418 |
+
if (typeof wplc_xhr !== "undefined" && typeof wplc_xhr.abort() !== "undefined") { wplc_xhr.abort(); }
|
419 |
+
if (typeof next === "undefined" || next === null) { next = function() {}; }
|
420 |
+
var wplc_node_ajax_action = type;
|
421 |
+
//Send the data to the Async
|
422 |
+
if(typeof wplc_restapi_enabled !== "undefined" && parseInt(wplc_restapi_enabled) === 1 && typeof wplc_restapi_endpoint !== "undefined"){
|
423 |
+
//REST API is ready to rumble
|
424 |
+
|
425 |
+
let anti_cache = Date.now();
|
426 |
+
|
427 |
+
wplc_send_url = wplc_restapi_endpoint + "/" + type + "?nocache="+anti_cache;
|
428 |
+
|
429 |
+
|
430 |
+
|
431 |
+
var prepared_data = wplc_send_data;
|
432 |
+
|
433 |
+
var x = {
|
434 |
+
action : wplc_node_ajax_action,
|
435 |
+
relay_action : wplc_send_data.action,
|
436 |
+
chat_id : wplc_send_data.cid,
|
437 |
+
security : wplc_send_data.security,
|
438 |
+
message : wplc_send_data.msg,
|
439 |
+
server_token : wplc_restapi_token,
|
440 |
+
wplc_extra_data:document.wplc_extra_data,
|
441 |
+
wplc_data : wplc_send_data
|
442 |
+
};
|
443 |
+
|
444 |
+
|
445 |
+
prepared_data.server_token = wplc_restapi_token;
|
446 |
+
prepared_data.token = wplc_restapi_token; /* backwards compat */
|
447 |
+
if (typeof prepared_data.wplc_extra_data === "undefined") {
|
448 |
+
prepared_data.wplc_extra_data = document.wplc_extra_data;
|
449 |
+
}
|
450 |
+
prepared_data._wpnonce = wplc_restapi_nonce;
|
451 |
+
|
452 |
+
wplc_xhr = jQuery.ajax({
|
453 |
+
url : wplc_send_url,
|
454 |
+
data : prepared_data,
|
455 |
+
type : "POST",
|
456 |
+
timeout : wplc_send_timeout,
|
457 |
+
success : function(response){
|
458 |
+
wplc_server_log("REST SEND = SUCCESS");
|
459 |
+
next(response);
|
460 |
+
},
|
461 |
+
error : function(error, exception){
|
462 |
+
wplc_server_log("REST SEND = FAIL");
|
463 |
+
next();
|
464 |
+
},
|
465 |
+
complete : function(response){
|
466 |
+
next(response);
|
467 |
+
}
|
468 |
+
});
|
469 |
+
} else {
|
470 |
+
wplc_server_log("NO REST API :(");
|
471 |
+
next();
|
472 |
+
}
|
473 |
+
|
474 |
+
}
|
475 |
+
|
476 |
+
function wplc_socket_async_storage_handler(wplc_send_url, wplc_send_data, wplc_send_timeout){
|
477 |
+
var wplc_node_ajax_action = "wplc_node_async_storage_ajax";
|
478 |
+
//Send the data to the Async
|
479 |
+
if(typeof wplc_restapi_enabled !== "undefined" && parseInt(wplc_restapi_enabled) === 1 && typeof wplc_restapi_endpoint !== "undefined"){
|
480 |
+
//REST API is ready to rumble
|
481 |
+
wplc_send_url = wplc_restapi_endpoint + "/async_storage";
|
482 |
+
} else {
|
483 |
+
//Ajax time! Cause the Rest she Left
|
484 |
+
}
|
485 |
+
|
486 |
+
var prepared_data = {
|
487 |
+
action : wplc_node_ajax_action,
|
488 |
+
relay_action : wplc_send_data.action,
|
489 |
+
chat_id : wplc_send_data.cid,
|
490 |
+
security : wplc_send_data.security,
|
491 |
+
messages : JSON.stringify(wplc_node_async_array),
|
492 |
+
wplc_extra_data:document.wplc_extra_data
|
493 |
+
};
|
494 |
+
|
495 |
+
if(typeof bleeper_api_key !== "undefined"){
|
496 |
+
prepared_data.server_token = bleeper_api_key;
|
497 |
+
}
|
498 |
+
|
499 |
+
/*
|
500 |
+
wplc_node_async_array = new Array(); //Clearing the storage array before the next data can be sent through
|
501 |
+
if(typeof Cookies !== "undefined" && typeof Cookies === "function"){
|
502 |
+
Cookies.remove('wplc_server_async_storage'); //Clear the cookies now so that we don't do this again.
|
503 |
+
}
|
504 |
+
*/
|
505 |
+
jQuery.ajax({
|
506 |
+
url : wplc_send_url,
|
507 |
+
data : prepared_data,
|
508 |
+
type : "POST",
|
509 |
+
timeout : wplc_send_timeout,
|
510 |
+
success : function(response){
|
511 |
+
wplc_server_log("ASYNC STORAGE = SUCCESS");
|
512 |
+
},
|
513 |
+
error : function(error, exception){
|
514 |
+
wplc_server_log("ASYNC STORAGE = FAIL");
|
515 |
+
},
|
516 |
+
complete : function(response){
|
517 |
+
|
518 |
+
}
|
519 |
+
});
|
520 |
+
}
|
521 |
+
|
522 |
+
function wplc_json_validator(str) {
|
523 |
+
try {
|
524 |
+
JSON.parse(str);
|
525 |
+
} catch (e) {
|
526 |
+
return false;
|
527 |
+
}
|
528 |
+
return true;
|
529 |
+
}
|
530 |
+
|
531 |
+
function wplc_node_parse_async_from_object(obj, complete){
|
532 |
+
for(var i in obj){
|
533 |
+
if(obj.hasOwnProperty(i)){
|
534 |
+
wplc_node_async_array.push(obj[i]);
|
535 |
+
}
|
536 |
+
}
|
537 |
+
|
538 |
+
if(typeof complete === "function"){
|
539 |
+
complete();
|
540 |
+
}
|
541 |
+
}
|
542 |
+
|
543 |
+
function wplc_node_global_message_receiver(data){
|
544 |
+
if(data){
|
545 |
+
if (typeof data !== "object") {
|
546 |
+
data = JSON.parse(data);
|
547 |
+
}
|
548 |
+
}
|
549 |
+
|
550 |
+
if(typeof data['pair_name'] !== "undefined"){
|
551 |
+
if(data['pair_name'] !== wplc_node_pair_name){
|
552 |
+
wplc_node_pair_name = data['pair_name'];
|
553 |
+
}
|
554 |
+
}
|
555 |
+
|
556 |
+
if(typeof data['pair_typing'] !== "undefined"){
|
557 |
+
|
558 |
+
if(data['pair_typing'] === true || data['pair_typing'] === "true"){
|
559 |
+
if(wplc_node_is_pair_typing_indicator_visible === false){
|
560 |
+
if (jQuery("#wplc_user_typing").length>0) { } else {
|
561 |
+
jQuery(".typing_indicator").html("<span id='wplc_user_typing'>"+wplc_node_pair_name+" "+wplc_localized_string_is_typing_single+"</span>");
|
562 |
+
jQuery(".typing_indicator").addClass("typing_indicator_active");
|
563 |
+
}
|
564 |
+
}
|
565 |
+
wplc_node_is_pair_typing_indicator_visible = true;
|
566 |
+
} else {
|
567 |
+
if(wplc_node_is_pair_typing_indicator_visible === true){
|
568 |
+
if (jQuery("#wplc_user_typing").length>0) {
|
569 |
+
jQuery("#wplc_user_typing").fadeOut("slow").remove();
|
570 |
+
jQuery(".typing_indicator").removeClass("typing_indicator_active");
|
571 |
+
}
|
572 |
+
}
|
573 |
+
wplc_node_is_pair_typing_indicator_visible = false;
|
574 |
+
}
|
575 |
+
|
576 |
+
}
|
577 |
+
}
|
578 |
+
String.prototype.wplcStripSlashes = function(){
|
579 |
+
return this.replace(/\\(.)/mg, "$1");
|
580 |
+
}
|
581 |
+
|
582 |
+
function wplc_add_date_and_time(the_message,originates) {
|
583 |
+
|
584 |
+
if (parseInt(originates) === 1 || parseInt(originates) === 2) {
|
585 |
+
|
586 |
+
var time_msg = '';
|
587 |
+
|
588 |
+
/* identfy the timestamp */
|
589 |
+
if (typeof the_message.other === "undefined" || typeof the_message.other.datetime === "undefined" || the_message.other === false) {
|
590 |
+
/* only run if it hasnt got a timestamp in the .other.datetime key */
|
591 |
+
if (typeof the_message.timestamp !== "undefined") {
|
592 |
+
/* most likely came from node as node */
|
593 |
+
|
594 |
+
if (typeof the_message.other !== "object") { the_message.other = {}; }
|
595 |
+
the_message.other.datetime = the_message.timestamp;
|
596 |
+
|
597 |
+
}
|
598 |
+
}
|
599 |
+
|
600 |
+
if (typeof the_message.other === "undefined" || typeof the_message.other.datetime === "undefined") {
|
601 |
+
/* there is no datetime so return nothing */
|
602 |
+
return '';
|
603 |
+
} else {
|
604 |
+
if (typeof wplc_show_chat_detail !== "undefined") {
|
605 |
+
|
606 |
+
var datetimestamp = the_message.other.hasOwnProperty( 'datetimeUTC' ) ? the_message.other.datetimeUTC : the_message.other.datetime;
|
607 |
+
var dateTime = new Date( parseInt( datetimestamp ) * 1000 );
|
608 |
+
|
609 |
+
if ( typeof wplc_show_chat_detail.date !== 'undefined' && '1' === wplc_show_chat_detail.date ) {
|
610 |
+
|
611 |
+
var date_format = typeof wplc_datetime_format !== 'undefined' && wplc_datetime_format.hasOwnProperty( 'date_format' ) ? wplc_datetime_format.date_format : 'n/d';
|
612 |
+
var date_month = dateTime.getMonth();
|
613 |
+
var date_day = dateTime.getDate();
|
614 |
+
var date_months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
615 |
+
var date_days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
616 |
+
var date_day_no = dateTime.getDay();
|
617 |
+
var date_year = dateTime.getFullYear();
|
618 |
+
|
619 |
+
time_msg += date_format
|
620 |
+
.replace( /S/g, '%S%' )
|
621 |
+
.replace( /D/g, '%D%' )
|
622 |
+
.replace( /l/g, '%l%' )
|
623 |
+
.replace( /F/g, '%F%' )
|
624 |
+
.replace( /M/g, '%M%' )
|
625 |
+
.replace( /j/g, date_day )
|
626 |
+
.replace( /d/g, date_day < 10 ? '0' + date_day : date_day )
|
627 |
+
.replace( /w/g, date_day_no )
|
628 |
+
.replace( /n/g, date_month + 1 )
|
629 |
+
.replace( /m/g, date_month + 1 < 10 ? '0' + ( date_month + 1 ) : date_month + 1 )
|
630 |
+
.replace( /Y/g, date_year )
|
631 |
+
.replace( /y/g, date_year.toString().substr( 2, 2 ) )
|
632 |
+
.replace( /%S%/g, 1 === date_day ? 'st' : ( 2 === date_day ? 'nd' : ( 3 === date_day ? 'rd' : 'th' ) ) )
|
633 |
+
.replace( /%D%/g, date_days[ date_day_no ].substr( 0, 3 ) )
|
634 |
+
.replace( /%l%/g, date_days[ date_day_no ] )
|
635 |
+
.replace( /%F%/g, date_months[ date_month ] )
|
636 |
+
.replace( /%M%/g, date_months[ date_month ].substr( 0, 3 ) ) + ' ';
|
637 |
+
|
638 |
+
}
|
639 |
+
if ( typeof wplc_show_chat_detail.time !== "undefined" && '1' === wplc_show_chat_detail.time ) {
|
640 |
+
|
641 |
+
var time_format = typeof wplc_datetime_format !== 'undefined' && wplc_datetime_format.hasOwnProperty( 'time_format' ) ? wplc_datetime_format.time_format : 'H:i';
|
642 |
+
var time_hours_12 = dateTime.getHours() > 12 ? dateTime.getHours() - 12 : ( dateTime.getHours() < 1 ? 12 : dateTime.getHours() );
|
643 |
+
var time_hours_24 = dateTime.getHours();
|
644 |
+
var time_am_pm = time_hours_24 > 11 ? 'pm' : 'am';
|
645 |
+
var time_minutes = dateTime.getMinutes();
|
646 |
+
|
647 |
+
time_msg += time_format
|
648 |
+
.replace( /g/g, time_hours_12 )
|
649 |
+
.replace( /h/g, time_hours_12 < 10 ? '0' + time_hours_12 : time_hours_12 )
|
650 |
+
.replace( /G/g, time_hours_24 )
|
651 |
+
.replace( /H/g, time_hours_24 < 10 ? '0' + time_hours_24 : time_hours_24 )
|
652 |
+
.replace( /i/g, time_minutes < 10 ? '0' + time_hours_24 : time_hours_24 )
|
653 |
+
.replace( /a/g, time_am_pm.toLowerCase() )
|
654 |
+
.replace( /A/g, time_am_pm.toUpperCase() );
|
655 |
+
|
656 |
+
}
|
657 |
+
if (time_msg !== '') {
|
658 |
+
if (parseInt(originates) === 1) { aoru_class = 'wplc-msg-float-left'; } else { aoru_class = 'wplc-msg-float-right'; }
|
659 |
+
time_msg = '<span class="timedate '+aoru_class+'">'+time_msg+'</span>';
|
660 |
+
}
|
661 |
+
}
|
662 |
+
|
663 |
+
|
664 |
+
return time_msg;
|
665 |
+
}
|
666 |
+
} else {
|
667 |
+
return '';
|
668 |
+
}
|
669 |
+
|
670 |
+
}
|
671 |
+
|
672 |
+
function wplc_get_chat_person_name_msg_field(name) {
|
673 |
+
try {
|
674 |
+
return '<span class="wplc-chat-person-name">' + name + ': </span>';
|
675 |
+
} catch(err) {
|
676 |
+
//console.log("Could not wplc_get_chat_person_name_msg_field() " + err);
|
677 |
+
}
|
678 |
+
}
|
679 |
+
|
680 |
+
/**
|
681 |
+
* Removes undesired strings from a message which contains a GIF URL and returns only the gif url
|
682 |
+
* @param {*} message_content
|
683 |
+
*/
|
684 |
+
function getCleanedGif(message_content) {
|
685 |
+
if (typeof(message_content) !== "undefined") {
|
686 |
+
var msgParts = message_content.split(" ");
|
687 |
+
|
688 |
+
if (typeof(msgParts) !== "undefined") {
|
689 |
+
|
690 |
+
for (var i = 0; i < msgParts.length; i++) {
|
691 |
+
var msgPart = msgParts[i];
|
692 |
+
|
693 |
+
if (typeof(msgPart) !== "undefined") {
|
694 |
+
|
695 |
+
if (gifExtensionPattern.test(msgPart)) {
|
696 |
+
var cleanedGifUrl = msgPart.replace("href=", "");
|
697 |
+
cleanedGifUrl = cleanedGifUrl.replace(/\"/g, "");
|
698 |
+
|
699 |
+
return cleanedGifUrl;
|
700 |
+
}
|
701 |
+
}
|
702 |
+
}
|
703 |
+
}
|
704 |
+
}
|
705 |
+
|
706 |
+
return "";
|
707 |
+
}
|
708 |
+
|
709 |
+
/**
|
710 |
+
* Pushes the message object to the chat box
|
711 |
+
*
|
712 |
+
* @param {object} the_message The message object
|
713 |
+
* @param {string} aoru a for Agent, u for User
|
714 |
+
* @return void
|
715 |
+
*/
|
716 |
+
function wplc_push_message_to_chatbox(the_message, aoru, next) {
|
717 |
+
|
718 |
+
/**
|
719 |
+
* First check if we have processed this message already, by comparing the ID
|
720 |
+
*
|
721 |
+
* Some system notifications may not come through with an ID so we can accept those.
|
722 |
+
*/
|
723 |
+
var add_message = true;
|
724 |
+
if (typeof the_message.mid !== "undefined" && aoru === "u") {
|
725 |
+
if (parseInt(the_message.mid) === 0 || the_message.mid === null) {
|
726 |
+
add_message = true;
|
727 |
+
} else {
|
728 |
+
if (typeof wplc_msg_history[the_message.mid] !== "undefined") {
|
729 |
+
/* we have this message already */
|
730 |
+
add_message = false;
|
731 |
+
} else {
|
732 |
+
/* add this to our history */
|
733 |
+
wplc_msg_history[the_message.mid] = true;
|
734 |
+
}
|
735 |
+
}
|
736 |
+
}
|
737 |
+
if (add_message) {
|
738 |
+
if (typeof the_message.originates !== "undefined" && the_message.originates !== null && the_message.originates !== "null"){
|
739 |
+
var message_class = "";
|
740 |
+
var grav_hash = "";
|
741 |
+
var message_grav = "";
|
742 |
+
var message_from = "";
|
743 |
+
var message_content = "";
|
744 |
+
var message_aid;
|
745 |
+
|
746 |
+
var message_edit_string = "";
|
747 |
+
|
748 |
+
if (parseInt(the_message.originates) === 1) {
|
749 |
+
//From Admin
|
750 |
+
|
751 |
+
/* Define which agent it was sent from */
|
752 |
+
if (typeof the_message.other !== "undefined" && typeof the_message.other.aid !== "undefined") {
|
753 |
+
message_aid = the_message.other.aid.toString(); /* set it to a string because wp_localize doesnt know how to set keys as integers */
|
754 |
+
} else if (typeof the_message.other !== "undefined" && typeof the_message.other.agent_id !== "undefined") {
|
755 |
+
/* cloud server uses "agent_id" instead of "aid" */
|
756 |
+
message_aid = the_message.other.agent_id.toString();
|
757 |
+
} else {
|
758 |
+
message_aid = false;
|
759 |
+
}
|
760 |
+
message_class = "wplc-admin-message wplc-color-bg-4 wplc-color-2 wplc-color-border-4";
|
761 |
+
|
762 |
+
if (aoru === 'u') {
|
763 |
+
|
764 |
+
/* message came from admin, intended for user */
|
765 |
+
if (message_aid !== false && typeof wplc_agent_data !== "undefined" && typeof wplc_agent_data[message_aid] !== "undefined") {
|
766 |
+
/* we know who the agent was that sent this message (v7.1.00+) */
|
767 |
+
if (typeof wplc_show_chat_detail !== "undefined") {
|
768 |
+
if (typeof wplc_show_chat_detail.avatar !== "undefined" && wplc_show_chat_detail.avatar === "1") { message_grav = (typeof wplc_agent_data[message_aid].md5 !== "undefined" ? "<img src='//www.gravatar.com/avatar/"+wplc_agent_data[message_aid].md5+"?s=80' class='wplc-admin-message-avatar' />" : ""); }
|
769 |
+
if (typeof wplc_show_chat_detail.name !== "undefined" && wplc_show_chat_detail.name === "1") { message_from = (typeof wplc_agent_data[message_aid].name !== "undefined" ? wplc_get_chat_person_name_msg_field(wplc_agent_data[message_aid].name) : ""); }
|
770 |
+
}
|
771 |
+
|
772 |
+
} else {
|
773 |
+
/* we do'nt know which agent sent this message, so lets set it as the current user instead (backwards compat) */
|
774 |
+
if (typeof wplc_show_chat_detail !== "undefined") {
|
775 |
+
if (typeof wplc_show_chat_detail.avatar !== "undefined" && wplc_show_chat_detail.avatar === "1") { message_grav = (typeof wplc_current_agent.email !== "undefined" ? "<img src='//www.gravatar.com/avatar/"+wplc_current_agent.email+"?s=80' class='wplc-admin-message-avatar' />" : ""); }
|
776 |
+
if (typeof wplc_show_chat_detail.name !== "undefined" && wplc_show_chat_detail.name === "1") { message_from = (typeof wplc_current_agent.name !== "undefined" ? wplc_get_chat_person_name_msg_field(wplc_current_agent.name) : ""); }
|
777 |
+
}
|
778 |
+
}
|
779 |
+
} else {
|
780 |
+
|
781 |
+
if(typeof agent_id !== "undefined" && typeof message_aid !== "undefined"){
|
782 |
+
if(parseInt(agent_id) === parseInt(message_aid)){
|
783 |
+
//I own this message
|
784 |
+
message_edit_string = "<span class='bleeper-edit-message' style='display:none;'>Edit</span>";
|
785 |
+
|
786 |
+
}
|
787 |
+
}
|
788 |
+
|
789 |
+
if (message_aid !== false && typeof wplc_agent_data !== "undefined" && typeof wplc_agent_data[message_aid] !== "undefined") {
|
790 |
+
|
791 |
+
/* we know who the agent was that sent this message (v7.1.00+) */
|
792 |
+
if (typeof wplc_show_chat_detail !== "undefined") {
|
793 |
+
if (typeof wplc_show_chat_detail.avatar !== "undefined" && wplc_show_chat_detail.avatar === "1") { message_grav = (typeof wplc_agent_data[message_aid].md5 !== "undefined" ? "<img src='//www.gravatar.com/avatar/"+wplc_agent_data[message_aid].md5+"?s=80' class='wplc-admin-message-avatar' />" : ""); }
|
794 |
+
if (typeof wplc_show_chat_detail.name !== "undefined" && wplc_show_chat_detail.name === "1") { message_from = (typeof wplc_agent_data[message_aid].name !== "undefined" ? wplc_get_chat_person_name_msg_field(wplc_agent_data[message_aid].name) : ""); }
|
795 |
+
}
|
796 |
+
|
797 |
+
} else {
|
798 |
+
if (typeof wplc_show_chat_detail.avatar !== "undefined" && wplc_show_chat_detail.avatar === "1") {
|
799 |
+
message_grav = (typeof wplc_admin_agent_email !== "undefined" ? "<img src='//www.gravatar.com/avatar/"+wplc_admin_agent_email+"?s=80' class='wplc-admin-message-avatar' />" : "");
|
800 |
+
}
|
801 |
+
if (typeof wplc_show_chat_detail.name !== "undefined" && wplc_show_chat_detail.name === "1") {
|
802 |
+
message_from = (typeof wplc_admin_agent_name !== "undefined" ? wplc_get_chat_person_name_msg_field(wplc_admin_agent_name) : "");
|
803 |
+
}
|
804 |
+
}
|
805 |
+
}
|
806 |
+
|
807 |
+
message_content = the_message.msg.wplcStripSlashes();
|
808 |
+
wplc_new_message_sound = true;
|
809 |
+
|
810 |
+
} else if (parseInt(the_message.originates) === 0 || parseInt(the_message.originates) === 3) {
|
811 |
+
//System Notification
|
812 |
+
message_class = "wplc_system_notification wplc-color-4";
|
813 |
+
message_content = the_message.msg;
|
814 |
+
if (typeof the_message.other.ntype !== "undefined") {
|
815 |
+
if (the_message.other.ntype === "joined") {
|
816 |
+
jQuery.event.trigger({type: "wplc_agent_joined", ndata:the_message});
|
817 |
+
}
|
818 |
+
}
|
819 |
+
|
820 |
+
} else {
|
821 |
+
/* most likely from the user */
|
822 |
+
message_class = "wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1";
|
823 |
+
if (aoru === 'u') {
|
824 |
+
message_edit_string = "<span class='bleeper-edit-message' style='display:none;'>Edit</span>";
|
825 |
+
|
826 |
+
if (jQuery(wplc_email).val() !== "") {
|
827 |
+
message_grav = md5(jQuery(wplc_email).val());
|
828 |
+
|
829 |
+
} else {
|
830 |
+
if (typeof visitor_list !== "undefined" && typeof visitor_list[active_chatid] !== "undefined" && typeof visitor_list[active_chatid].email !== "undefined") {
|
831 |
+
message_grav = md5(visitor_list[active_chatid].email);
|
832 |
+
} else {
|
833 |
+
if(typeof wplc_cookie_email !== "undefined" && wplc_cookie_email !== ""){
|
834 |
+
message_grav = md5(wplc_cookie_email);
|
835 |
+
} else {
|
836 |
+
message_grav = 'x';
|
837 |
+
}
|
838 |
+
}
|
839 |
+
}
|
840 |
+
|
841 |
+
message_grav = "<img src='//www.gravatar.com/avatar/" + message_grav + "?s=80' class='wplc-user-message-avatar' />";
|
842 |
+
if (typeof Cookies.get("wplc_name") === "undefined") {
|
843 |
+
message_from = wplc_get_chat_person_name_msg_field("Guest");
|
844 |
+
} else {
|
845 |
+
message_from = wplc_get_chat_person_name_msg_field(Cookies.get("wplc_name"));
|
846 |
+
}
|
847 |
+
} else {
|
848 |
+
if (typeof wplc_chat_email !== "undefined") {
|
849 |
+
message_grav = wplc_chat_email;
|
850 |
+
|
851 |
+
} else {
|
852 |
+
if (typeof visitor_list !== "undefined" && typeof visitor_list[active_chatid] !== "undefined" && typeof visitor_list[active_chatid].email !== "undefined") {
|
853 |
+
message_grav = md5(visitor_list[active_chatid].email);
|
854 |
+
} else {
|
855 |
+
if(typeof wplc_cookie_email !== "undefined" && wplc_cookie_email !== ""){
|
856 |
+
message_grav = md5(wplc_cookie_email);
|
857 |
+
} else {
|
858 |
+
message_grav = 'x';
|
859 |
+
}
|
860 |
+
}
|
861 |
+
}
|
862 |
+
message_grav = "<img src='//www.gravatar.com/avatar/" + message_grav + "?s=80' class='wplc-user-message-avatar' />";
|
863 |
+
if (typeof wplc_chat_name !== "undefined") {
|
864 |
+
message_from = wplc_get_chat_person_name_msg_field(wplc_chat_name);
|
865 |
+
}
|
866 |
+
}
|
867 |
+
message_content = the_message.msg.wplcStripSlashes();
|
868 |
+
}
|
869 |
+
|
870 |
+
if (typeof the_message.other !== "undefined" && typeof the_message.other.from_an_agent !== "undefined"){
|
871 |
+
if(the_message.other.from_an_agent === true || the_message.other.from_an_agent === "true"){
|
872 |
+
//Cannot edit this
|
873 |
+
message_edit_string = "";
|
874 |
+
}
|
875 |
+
}
|
876 |
+
message_class += " message_"+the_message.mid;
|
877 |
+
|
878 |
+
if (message_content !== ""){
|
879 |
+
message_content = wplc_sanitize_attributes(message_content);
|
880 |
+
|
881 |
+
// Open the HTML of a message
|
882 |
+
var concatenated_message = "<span class='" + message_class + "' mid='"+the_message.mid+"'>";
|
883 |
+
|
884 |
+
if (typeof wplc_show_chat_detail !== "undefined") {
|
885 |
+
|
886 |
+
if (typeof wplc_show_chat_detail.avatar !== "undefined" && wplc_show_chat_detail.avatar === "1") {
|
887 |
+
concatenated_message += message_grav;
|
888 |
+
}
|
889 |
+
|
890 |
+
// Add a wrapper for the person name and the message, this wrapper is necessary to implement the UI of the admin chat
|
891 |
+
concatenated_message += "<div class='wplc-msg-content' mid='"+the_message.mid+"'>";
|
892 |
+
|
893 |
+
if (typeof wplc_show_chat_detail.name !== "undefined" && wplc_show_chat_detail.name === "1") {
|
894 |
+
concatenated_message += message_from;
|
895 |
+
}
|
896 |
+
} else {
|
897 |
+
// Add a wrapper for the person name and the message, this wrapper is necessary to implement the UI of the admin chat
|
898 |
+
concatenated_message += "<div class='wplc-msg-content'>";
|
899 |
+
}
|
900 |
+
|
901 |
+
var original_message = message_content;
|
902 |
+
if (typeof niftyFormatParser !== "undefined"){
|
903 |
+
message_content = niftyFormatParser(message_content);
|
904 |
+
}
|
905 |
+
|
906 |
+
// If it is a GIF message
|
907 |
+
if (gifExtensionPattern.test(message_content)) {
|
908 |
+
cleanedGif = getCleanedGif(message_content);
|
909 |
+
concatenated_message += "<span class='messageBody' data-message='"+ cleanedGif +"'><img src='"+ cleanedGif + "' class='gif-img'/></span>"+ message_edit_string;
|
910 |
+
} else {
|
911 |
+
// If it is a regular message
|
912 |
+
concatenated_message += "<span class='messageBody' data-message='" + original_message + "'>"+message_content+"</span>"+ message_edit_string;
|
913 |
+
}
|
914 |
+
|
915 |
+
// Close the person name/message wrapper, if it was added
|
916 |
+
concatenated_message += "</div>";
|
917 |
+
|
918 |
+
// Close the HTML of a message
|
919 |
+
concatenated_message += "</span>";
|
920 |
+
concatenated_message += wplc_add_date_and_time(the_message,the_message.originates);
|
921 |
+
|
922 |
+
if (aoru === 'u') {
|
923 |
+
wplc_chat_box_elemn = "#wplc_chatbox";
|
924 |
+
} else {
|
925 |
+
|
926 |
+
if (typeof bleeper_remote_enabled !== "undefined"){
|
927 |
+
wplc_chat_box_elemn = "#messages";
|
928 |
+
} else {
|
929 |
+
wplc_chat_box_elemn = "#admin_chat_box_area_"+wplc_cid;
|
930 |
+
}
|
931 |
+
}
|
932 |
+
|
933 |
+
|
934 |
+
jQuery(wplc_chat_box_elemn).append(concatenated_message);
|
935 |
+
|
936 |
+
}
|
937 |
+
}
|
938 |
+
}
|
939 |
+
next();
|
940 |
+
}
|
941 |
+
|
942 |
+
jQuery(function(){
|
943 |
+
jQuery(document).ready(function(){
|
944 |
+
var wplc_node_searchTimeout;
|
945 |
+
|
946 |
+
jQuery("body").on("keydown","#wplc_chatmsg, #wplc_admin_chatmsg", function(e) {
|
947 |
+
if(typeof wplc_node_sockets_ready !== "undefined" && wplc_node_sockets_ready === true){
|
948 |
+
if(typeof wplc_node_is_client_typing !== "undefined"){
|
949 |
+
if (e.which <= 90 && e.which >= 48) {
|
950 |
+
if (wplc_node_is_client_typing) {
|
951 |
+
wplc_node_renew_typing();
|
952 |
+
return;
|
953 |
+
}
|
954 |
+
wplc_node_is_client_typing = true;
|
955 |
+
|
956 |
+
wplc_node_searchTimeout = setTimeout(wplc_node_clear_typing, 1000);
|
957 |
+
}
|
958 |
+
}
|
959 |
+
}
|
960 |
+
});
|
961 |
+
|
962 |
+
jQuery("body").on("click", "#wplc_na_msg_btn", function() {
|
963 |
+
var wplc_name = jQuery("#wplc_name").val();
|
964 |
+
var wplc_email = jQuery("#wplc_email").val();
|
965 |
+
var wplc_msg = jQuery("#wplc_message").val();
|
966 |
+
var wplc_domain = jQuery("#wplc_domain_offline").val();
|
967 |
+
var ip_address = jQuery("#wplc_ip_address").val();
|
968 |
+
|
969 |
+
if (wplc_name.length <= 0) { alert(wplc_error_messages.valid_name); return false; }
|
970 |
+
if (wplc_email.length <= 0) { alert(wplc_error_messages.valid_email); return false; }
|
971 |
+
var testEmail = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,12}$/i;
|
972 |
+
if (!testEmail.test(wplc_email)){
|
973 |
+
alert(wplc_error_messages.valid_email); return false;
|
974 |
+
}
|
975 |
+
if (wplc_msg.length <= 0) { alert(wplc_error_messages.empty_message); return false; }
|
976 |
+
jQuery("#wp-live-chat-2-info").hide();
|
977 |
+
jQuery("#wplc_message_div").html(wplc_offline_msg);
|
978 |
+
|
979 |
+
wplc_cid = Cookies.get('wplc_cid');
|
980 |
+
|
981 |
+
var data = {
|
982 |
+
action: 'wplc_user_send_offline_message',
|
983 |
+
security: wplc_nonce,
|
984 |
+
cid: wplc_cid,
|
985 |
+
name: wplc_name,
|
986 |
+
email: wplc_email,
|
987 |
+
msg: wplc_msg,
|
988 |
+
ip: ip_address,
|
989 |
+
domain: wplc_domain,
|
990 |
+
wplc_extra_data:wplc_extra_data
|
991 |
+
};
|
992 |
+
|
993 |
+
jQuery.post(wplc_ajaxurl_site, data, function(response) {
|
994 |
+
jQuery("#wplc_message_div").html(wplc_offline_msg3);
|
995 |
+
});
|
996 |
+
if (typeof wplc_enable_ga !== "undefined" && wplc_enable_ga === '1') {
|
997 |
+
if (typeof ga !== "undefined") {
|
998 |
+
ga('send', {
|
999 |
+
hitType: 'event',
|
1000 |
+
eventCategory: 'WP_Live_Chat_Support',
|
1001 |
+
eventAction: 'Event',
|
1002 |
+
eventLabel: 'User Send Offline Message'
|
1003 |
+
});
|
1004 |
+
}
|
1005 |
+
}
|
1006 |
+
});
|
1007 |
+
|
1008 |
+
|
1009 |
+
function wplc_node_renew_typing() {
|
1010 |
+
clearTimeout(wplc_node_searchTimeout);
|
1011 |
+
wplc_node_searchTimeout = setTimeout(wplc_node_clear_typing, 1000);
|
1012 |
+
}
|
1013 |
+
function wplc_node_clear_typing() {
|
1014 |
+
wplc_node_is_client_typing = false;
|
1015 |
+
clearTimeout(wplc_node_searchTimeout);
|
1016 |
+
}
|
1017 |
+
});
|
1018 |
+
});
|
1019 |
+
|
1020 |
+
var wplc_generate_system_notification_object = function(msg,other,originates) {
|
1021 |
+
the_message = {};
|
1022 |
+
the_message.originates = originates;
|
1023 |
+
the_message.msg = msg;
|
1024 |
+
the_message.other = other;
|
1025 |
+
var wplc_d = new Date();
|
1026 |
+
the_message.other.datetime = Math.round( wplc_d.getTime() / 1000 );
|
1027 |
+
return the_message;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
function wplc_display_system_notification(message) {
|
1031 |
+
message_output = '<div id="bleeper_notification_message" class="wplc-color-bg-1 wplc-color-2">' + message.msg + '</div>';
|
1032 |
+
|
1033 |
+
if (jQuery('#bleeper_notification_message').length == 0) {
|
1034 |
+
jQuery('#wp-live-chat-4').prepend(message_output);
|
1035 |
+
}
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
function wplc_clear_system_notification() {
|
1039 |
+
if (jQuery('#bleeper_notification_message').length !== 0) {
|
1040 |
+
jQuery('#bleeper_notification_message').remove();
|
1041 |
+
}
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
/*
|
1045 |
+
* Updates the message element with a new message.
|
1046 |
+
* - mid: Message ID which is appended to class selector as .message_{mid}
|
1047 |
+
* - message: The html/text to insert into this container
|
1048 |
+
* - inner_container_class: Optional, used to select the first child of the class type within the primary message container
|
1049 |
+
* Nice for selecting the 'messageBody' class specifically
|
1050 |
+
*/
|
1051 |
+
function wplc_update_message_element_by_mid(mid, message, inner_container_class){
|
1052 |
+
var element_selector = ".message_" + mid;
|
1053 |
+
element_selector += (typeof inner_container_class !== "undefined" && inner_container_class !== false) ? (" ." + inner_container_class) : "";
|
1054 |
+
|
1055 |
+
jQuery(element_selector).html(message);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1056 |
}
|
js/wplc_surveys.js
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
var orig_title_wplc;
|
2 |
-
jQuery(document).on("wplc_end_chat
|
3 |
-
if (typeof wplc_extra_div_enabled !== "undefined" && wplc_extra_div_enabled === "1") {
|
4 |
-
jQuery("#wp-live-chat-4").hide();
|
5 |
-
jQuery("#wplc-extra-div").show();
|
6 |
-
orig_title_wplc = jQuery("#wplc_first_message").html();
|
7 |
-
jQuery("#wplc_first_message").html(wplc_end_chat_string);
|
8 |
-
jQuery("#nimblesquirrel_div").attr('style', 'width: 100% !important');
|
9 |
-
}
|
10 |
-
|
11 |
-
});
|
12 |
-
|
13 |
-
|
14 |
-
jQuery(document).on("wplc_minimize_chat", function( e ) {
|
15 |
-
if (typeof wplc_extra_div_enabled !== "undefined" && wplc_extra_div_enabled === "1") {
|
16 |
-
jQuery("#wplc-extra-div").hide();
|
17 |
-
jQuery("#wplc_first_message").html(orig_title_wplc);
|
18 |
-
}
|
19 |
-
});
|
20 |
-
|
21 |
-
|
22 |
-
jQuery(document).on("click", "#wp-live-chat-header", function() {
|
23 |
-
jQuery("#nimblesquirrel_div").attr('style', 'width: 100% !important');
|
24 |
-
});
|
1 |
+
var orig_title_wplc;
|
2 |
+
jQuery(document).on("wplc_end_chat", function( e ) {
|
3 |
+
if (typeof wplc_extra_div_enabled !== "undefined" && wplc_extra_div_enabled === "1") {
|
4 |
+
jQuery("#wp-live-chat-4").hide();
|
5 |
+
jQuery("#wplc-extra-div").show();
|
6 |
+
orig_title_wplc = jQuery("#wplc_first_message").html();
|
7 |
+
jQuery("#wplc_first_message").html(wplc_end_chat_string);
|
8 |
+
jQuery("#nimblesquirrel_div").attr('style', 'width: 100% !important');
|
9 |
+
}
|
10 |
+
|
11 |
+
});
|
12 |
+
|
13 |
+
|
14 |
+
jQuery(document).on("wplc_minimize_chat", function( e ) {
|
15 |
+
if (typeof wplc_extra_div_enabled !== "undefined" && wplc_extra_div_enabled === "1") {
|
16 |
+
jQuery("#wplc-extra-div").hide();
|
17 |
+
jQuery("#wplc_first_message").html(orig_title_wplc);
|
18 |
+
}
|
19 |
+
});
|
20 |
+
|
21 |
+
|
22 |
+
jQuery(document).on("click", "#wp-live-chat-header", function() {
|
23 |
+
jQuery("#nimblesquirrel_div").attr('style', 'width: 100% !important');
|
24 |
+
});
|
js/wplc_tabs.js
CHANGED
@@ -1,267 +1,267 @@
|
|
1 |
-
jQuery(function() {
|
2 |
-
|
3 |
-
function storeActiveTab(event, ui)
|
4 |
-
{
|
5 |
-
if(!window.sessionStorage)
|
6 |
-
return;
|
7 |
-
|
8 |
-
sessionStorage.setItem(
|
9 |
-
"wplc-tabs-index",
|
10 |
-
jQuery(event.target).tabs("option", "active")
|
11 |
-
);
|
12 |
-
}
|
13 |
-
|
14 |
-
function recallActiveTab()
|
15 |
-
{
|
16 |
-
if(!window.sessionStorage)
|
17 |
-
return 0;
|
18 |
-
|
19 |
-
var active = sessionStorage.getItem("wplc-tabs-index");
|
20 |
-
|
21 |
-
if(isNaN(active))
|
22 |
-
active = 0;
|
23 |
-
|
24 |
-
return active;
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
if(jQuery("input[type=radio][name='wplc_mail_type']:checked").val() === "php_mailer"){
|
29 |
-
jQuery("#wplc_smtp_details").show();
|
30 |
-
} else {
|
31 |
-
jQuery("#wplc_smtp_details").hide();
|
32 |
-
}
|
33 |
-
|
34 |
-
jQuery('.wplc_mail_type_radio').click(
|
35 |
-
function(e){
|
36 |
-
if (jQuery(this).is(':checked') && jQuery(this).val() === "php_mailer"){
|
37 |
-
jQuery("#wplc_smtp_details").show();
|
38 |
-
} else {
|
39 |
-
jQuery("#wplc_smtp_details").hide();
|
40 |
-
}
|
41 |
-
});
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
jQuery("#wplc_tabs").tabs({
|
46 |
-
create: function(event, ui)
|
47 |
-
{
|
48 |
-
jQuery("#wplc_settings_page_loader").remove();
|
49 |
-
jQuery(".wrap").fadeIn();
|
50 |
-
jQuery(".wplc_settings_save_notice").fadeIn();
|
51 |
-
},
|
52 |
-
active: recallActiveTab(),
|
53 |
-
activate: storeActiveTab
|
54 |
-
}).addClass( "ui-tabs-vertical ui-helper-clearfix" );
|
55 |
-
|
56 |
-
jQuery( "#wplc_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
jQuery(".wplc_hide_input").hide();
|
61 |
-
|
62 |
-
jQuery("#wplc_animation_1").click(function() {
|
63 |
-
jQuery("#wplc_rb_animation_1").attr('checked', true);
|
64 |
-
jQuery("#wplc_rb_animation_2").attr('checked', false);
|
65 |
-
jQuery("#wplc_rb_animation_3").attr('checked', false);
|
66 |
-
jQuery("#wplc_rb_animation_4").attr('checked', false);
|
67 |
-
jQuery("#wplc_animation_1").addClass("wplc_animation_active");
|
68 |
-
jQuery("#wplc_animation_2").removeClass("wplc_animation_active");
|
69 |
-
jQuery("#wplc_animation_3").removeClass("wplc_animation_active");
|
70 |
-
jQuery("#wplc_animation_4").removeClass("wplc_animation_active");
|
71 |
-
});
|
72 |
-
|
73 |
-
jQuery("#wplc_animation_2").click(function() {
|
74 |
-
jQuery("#wplc_rb_animation_1").attr('checked', false);
|
75 |
-
jQuery("#wplc_rb_animation_2").attr('checked', true);
|
76 |
-
jQuery("#wplc_rb_animation_3").attr('checked', false);
|
77 |
-
jQuery("#wplc_rb_animation_4").attr('checked', false);
|
78 |
-
jQuery("#wplc_animation_1").removeClass("wplc_animation_active");
|
79 |
-
jQuery("#wplc_animation_2").addClass("wplc_animation_active");
|
80 |
-
jQuery("#wplc_animation_3").removeClass("wplc_animation_active");
|
81 |
-
jQuery("#wplc_animation_4").removeClass("wplc_animation_active");
|
82 |
-
});
|
83 |
-
|
84 |
-
jQuery("#wplc_animation_3").click(function() {
|
85 |
-
jQuery("#wplc_rb_animation_1").attr('checked', false);
|
86 |
-
jQuery("#wplc_rb_animation_2").attr('checked', false);
|
87 |
-
jQuery("#wplc_rb_animation_3").attr('checked', true);
|
88 |
-
jQuery("#wplc_rb_animation_4").attr('checked', false);
|
89 |
-
jQuery("#wplc_animation_1").removeClass("wplc_animation_active");
|
90 |
-
jQuery("#wplc_animation_2").removeClass("wplc_animation_active");
|
91 |
-
jQuery("#wplc_animation_3").addClass("wplc_animation_active");
|
92 |
-
jQuery("#wplc_animation_4").removeClass("wplc_animation_active");
|
93 |
-
});
|
94 |
-
|
95 |
-
jQuery("#wplc_animation_4").click(function() {
|
96 |
-
jQuery("#wplc_rb_animation_1").attr('checked', false);
|
97 |
-
jQuery("#wplc_rb_animation_2").attr('checked', false);
|
98 |
-
jQuery("#wplc_rb_animation_3").attr('checked', false);
|
99 |
-
jQuery("#wplc_rb_animation_4").attr('checked', true);
|
100 |
-
jQuery("#wplc_animation_1").removeClass("wplc_animation_active");
|
101 |
-
jQuery("#wplc_animation_2").removeClass("wplc_animation_active");
|
102 |
-
jQuery("#wplc_animation_3").removeClass("wplc_animation_active");
|
103 |
-
jQuery("#wplc_animation_4").addClass("wplc_animation_active");
|
104 |
-
});
|
105 |
-
|
106 |
-
|
107 |
-
/* Themes */
|
108 |
-
jQuery("#wplc_newtheme_1").click(function() {
|
109 |
-
jQuery("#wplc_new_rb_theme_1").attr('checked', true);
|
110 |
-
jQuery("#wplc_new_rb_theme_2").attr('checked', false);
|
111 |
-
jQuery("#wplc_newtheme_1").addClass("wplc_theme_active");
|
112 |
-
jQuery("#wplc_newtheme_2").removeClass("wplc_theme_active");
|
113 |
-
});
|
114 |
-
|
115 |
-
jQuery("#wplc_newtheme_2").click(function() {
|
116 |
-
jQuery("#wplc_new_rb_theme_1").attr('checked', false);
|
117 |
-
jQuery("#wplc_new_rb_theme_2").attr('checked', true);
|
118 |
-
jQuery("#wplc_newtheme_1").removeClass("wplc_theme_active");
|
119 |
-
jQuery("#wplc_newtheme_2").addClass("wplc_theme_active");
|
120 |
-
});
|
121 |
-
|
122 |
-
|
123 |
-
/* Colour Schemes */
|
124 |
-
|
125 |
-
jQuery("#wplc_theme_default").click(function() {
|
126 |
-
jQuery("#wplc_rb_theme_default").attr('checked', true);
|
127 |
-
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
128 |
-
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
129 |
-
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
130 |
-
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
131 |
-
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
132 |
-
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
133 |
-
jQuery("#wplc_theme_default").addClass("wplc_theme_active");
|
134 |
-
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
135 |
-
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
136 |
-
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
137 |
-
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
138 |
-
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
139 |
-
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
140 |
-
});
|
141 |
-
|
142 |
-
jQuery("#wplc_theme_1").click(function() {
|
143 |
-
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
144 |
-
jQuery("#wplc_rb_theme_1").attr('checked', true);
|
145 |
-
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
146 |
-
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
147 |
-
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
148 |
-
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
149 |
-
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
150 |
-
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
151 |
-
jQuery("#wplc_theme_1").addClass("wplc_theme_active");
|
152 |
-
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
153 |
-
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
154 |
-
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
155 |
-
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
156 |
-
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
157 |
-
});
|
158 |
-
|
159 |
-
jQuery("#wplc_theme_2").click(function() {
|
160 |
-
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
161 |
-
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
162 |
-
jQuery("#wplc_rb_theme_2").attr('checked', true);
|
163 |
-
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
164 |
-
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
165 |
-
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
166 |
-
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
167 |
-
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
168 |
-
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
169 |
-
jQuery("#wplc_theme_2").addClass("wplc_theme_active");
|
170 |
-
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
171 |
-
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
172 |
-
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
173 |
-
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
174 |
-
});
|
175 |
-
|
176 |
-
jQuery("#wplc_theme_3").click(function() {
|
177 |
-
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
178 |
-
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
179 |
-
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
180 |
-
jQuery("#wplc_rb_theme_3").attr('checked', true);
|
181 |
-
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
182 |
-
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
183 |
-
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
184 |
-
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
185 |
-
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
186 |
-
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
187 |
-
jQuery("#wplc_theme_3").addClass("wplc_theme_active");
|
188 |
-
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
189 |
-
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
190 |
-
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
191 |
-
});
|
192 |
-
|
193 |
-
jQuery("#wplc_theme_4").click(function() {
|
194 |
-
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
195 |
-
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
196 |
-
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
197 |
-
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
198 |
-
jQuery("#wplc_rb_theme_4").attr('checked', true);
|
199 |
-
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
200 |
-
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
201 |
-
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
202 |
-
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
203 |
-
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
204 |
-
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
205 |
-
jQuery("#wplc_theme_4").addClass("wplc_theme_active");
|
206 |
-
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
207 |
-
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
208 |
-
});
|
209 |
-
|
210 |
-
jQuery("#wplc_theme_5").click(function() {
|
211 |
-
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
212 |
-
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
213 |
-
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
214 |
-
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
215 |
-
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
216 |
-
jQuery("#wplc_rb_theme_5").attr('checked', true);
|
217 |
-
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
218 |
-
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
219 |
-
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
220 |
-
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
221 |
-
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
222 |
-
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
223 |
-
jQuery("#wplc_theme_5").addClass("wplc_theme_active");
|
224 |
-
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
225 |
-
});
|
226 |
-
|
227 |
-
jQuery("#wplc_theme_6").click(function() {
|
228 |
-
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
229 |
-
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
230 |
-
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
231 |
-
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
232 |
-
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
233 |
-
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
234 |
-
jQuery("#wplc_rb_theme_6").attr('checked', true);
|
235 |
-
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
236 |
-
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
237 |
-
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
238 |
-
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
239 |
-
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
240 |
-
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
241 |
-
jQuery("#wplc_theme_6").addClass("wplc_theme_active");
|
242 |
-
});
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
jQuery(function () {
|
249 |
-
jQuery(".wplc_settings_tooltip").tooltip({
|
250 |
-
position: {
|
251 |
-
my: "left+15 center",
|
252 |
-
at: "right center",
|
253 |
-
|
254 |
-
},
|
255 |
-
template: '<div class="tooltip wplc_tooltip_control"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
|
256 |
-
onShow: function(){
|
257 |
-
var $trigger = this.getTrigger();
|
258 |
-
var offset = $trigger.offset();
|
259 |
-
this.getTip().css({
|
260 |
-
'top' : offset.top,
|
261 |
-
'left' : offset.left
|
262 |
-
});
|
263 |
-
}
|
264 |
-
});
|
265 |
-
});
|
266 |
-
|
267 |
-
});
|
1 |
+
jQuery("document").ready(function() {
|
2 |
+
|
3 |
+
function storeActiveTab(event, ui)
|
4 |
+
{
|
5 |
+
if(!window.sessionStorage)
|
6 |
+
return;
|
7 |
+
|
8 |
+
sessionStorage.setItem(
|
9 |
+
"wplc-tabs-index",
|
10 |
+
jQuery(event.target).tabs("option", "active")
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
function recallActiveTab()
|
15 |
+
{
|
16 |
+
if(!window.sessionStorage)
|
17 |
+
return 0;
|
18 |
+
|
19 |
+
var active = sessionStorage.getItem("wplc-tabs-index");
|
20 |
+
|
21 |
+
if(isNaN(active))
|
22 |
+
active = 0;
|
23 |
+
|
24 |
+
return active;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
if(jQuery("input[type=radio][name='wplc_mail_type']:checked").val() === "php_mailer"){
|
29 |
+
jQuery("#wplc_smtp_details").show();
|
30 |
+
} else {
|
31 |
+
jQuery("#wplc_smtp_details").hide();
|
32 |
+
}
|
33 |
+
|
34 |
+
jQuery('.wplc_mail_type_radio').click(
|
35 |
+
function(e){
|
36 |
+
if (jQuery(this).is(':checked') && jQuery(this).val() === "php_mailer"){
|
37 |
+
jQuery("#wplc_smtp_details").show();
|
38 |
+
} else {
|
39 |
+
jQuery("#wplc_smtp_details").hide();
|
40 |
+
}
|
41 |
+
});
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
+
jQuery("#wplc_tabs").tabs({
|
46 |
+
create: function(event, ui)
|
47 |
+
{
|
48 |
+
jQuery("#wplc_settings_page_loader").remove();
|
49 |
+
jQuery(".wrap").fadeIn();
|
50 |
+
jQuery(".wplc_settings_save_notice").fadeIn();
|
51 |
+
},
|
52 |
+
active: recallActiveTab(),
|
53 |
+
activate: storeActiveTab
|
54 |
+
}).addClass( "ui-tabs-vertical ui-helper-clearfix" );
|
55 |
+
|
56 |
+
jQuery( "#wplc_tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
jQuery(".wplc_hide_input").hide();
|
61 |
+
|
62 |
+
jQuery("#wplc_animation_1").click(function() {
|
63 |
+
jQuery("#wplc_rb_animation_1").attr('checked', true);
|
64 |
+
jQuery("#wplc_rb_animation_2").attr('checked', false);
|
65 |
+
jQuery("#wplc_rb_animation_3").attr('checked', false);
|
66 |
+
jQuery("#wplc_rb_animation_4").attr('checked', false);
|
67 |
+
jQuery("#wplc_animation_1").addClass("wplc_animation_active");
|
68 |
+
jQuery("#wplc_animation_2").removeClass("wplc_animation_active");
|
69 |
+
jQuery("#wplc_animation_3").removeClass("wplc_animation_active");
|
70 |
+
jQuery("#wplc_animation_4").removeClass("wplc_animation_active");
|
71 |
+
});
|
72 |
+
|
73 |
+
jQuery("#wplc_animation_2").click(function() {
|
74 |
+
jQuery("#wplc_rb_animation_1").attr('checked', false);
|
75 |
+
jQuery("#wplc_rb_animation_2").attr('checked', true);
|
76 |
+
jQuery("#wplc_rb_animation_3").attr('checked', false);
|
77 |
+
jQuery("#wplc_rb_animation_4").attr('checked', false);
|
78 |
+
jQuery("#wplc_animation_1").removeClass("wplc_animation_active");
|
79 |
+
jQuery("#wplc_animation_2").addClass("wplc_animation_active");
|
80 |
+
jQuery("#wplc_animation_3").removeClass("wplc_animation_active");
|
81 |
+
jQuery("#wplc_animation_4").removeClass("wplc_animation_active");
|
82 |
+
});
|
83 |
+
|
84 |
+
jQuery("#wplc_animation_3").click(function() {
|
85 |
+
jQuery("#wplc_rb_animation_1").attr('checked', false);
|
86 |
+
jQuery("#wplc_rb_animation_2").attr('checked', false);
|
87 |
+
jQuery("#wplc_rb_animation_3").attr('checked', true);
|
88 |
+
jQuery("#wplc_rb_animation_4").attr('checked', false);
|
89 |
+
jQuery("#wplc_animation_1").removeClass("wplc_animation_active");
|
90 |
+
jQuery("#wplc_animation_2").removeClass("wplc_animation_active");
|
91 |
+
jQuery("#wplc_animation_3").addClass("wplc_animation_active");
|
92 |
+
jQuery("#wplc_animation_4").removeClass("wplc_animation_active");
|
93 |
+
});
|
94 |
+
|
95 |
+
jQuery("#wplc_animation_4").click(function() {
|
96 |
+
jQuery("#wplc_rb_animation_1").attr('checked', false);
|
97 |
+
jQuery("#wplc_rb_animation_2").attr('checked', false);
|
98 |
+
jQuery("#wplc_rb_animation_3").attr('checked', false);
|
99 |
+
jQuery("#wplc_rb_animation_4").attr('checked', true);
|
100 |
+
jQuery("#wplc_animation_1").removeClass("wplc_animation_active");
|
101 |
+
jQuery("#wplc_animation_2").removeClass("wplc_animation_active");
|
102 |
+
jQuery("#wplc_animation_3").removeClass("wplc_animation_active");
|
103 |
+
jQuery("#wplc_animation_4").addClass("wplc_animation_active");
|
104 |
+
});
|
105 |
+
|
106 |
+
|
107 |
+
/* Themes */
|
108 |
+
jQuery("#wplc_newtheme_1").click(function() {
|
109 |
+
jQuery("#wplc_new_rb_theme_1").attr('checked', true);
|
110 |
+
jQuery("#wplc_new_rb_theme_2").attr('checked', false);
|
111 |
+
jQuery("#wplc_newtheme_1").addClass("wplc_theme_active");
|
112 |
+
jQuery("#wplc_newtheme_2").removeClass("wplc_theme_active");
|
113 |
+
});
|
114 |
+
|
115 |
+
jQuery("#wplc_newtheme_2").click(function() {
|
116 |
+
jQuery("#wplc_new_rb_theme_1").attr('checked', false);
|
117 |
+
jQuery("#wplc_new_rb_theme_2").attr('checked', true);
|
118 |
+
jQuery("#wplc_newtheme_1").removeClass("wplc_theme_active");
|
119 |
+
jQuery("#wplc_newtheme_2").addClass("wplc_theme_active");
|
120 |
+
});
|
121 |
+
|
122 |
+
|
123 |
+
/* Colour Schemes */
|
124 |
+
|
125 |
+
jQuery("#wplc_theme_default").click(function() {
|
126 |
+
jQuery("#wplc_rb_theme_default").attr('checked', true);
|
127 |
+
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
128 |
+
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
129 |
+
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
130 |
+
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
131 |
+
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
132 |
+
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
133 |
+
jQuery("#wplc_theme_default").addClass("wplc_theme_active");
|
134 |
+
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
135 |
+
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
136 |
+
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
137 |
+
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
138 |
+
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
139 |
+
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
140 |
+
});
|
141 |
+
|
142 |
+
jQuery("#wplc_theme_1").click(function() {
|
143 |
+
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
144 |
+
jQuery("#wplc_rb_theme_1").attr('checked', true);
|
145 |
+
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
146 |
+
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
147 |
+
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
148 |
+
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
149 |
+
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
150 |
+
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
151 |
+
jQuery("#wplc_theme_1").addClass("wplc_theme_active");
|
152 |
+
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
153 |
+
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
154 |
+
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
155 |
+
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
156 |
+
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
157 |
+
});
|
158 |
+
|
159 |
+
jQuery("#wplc_theme_2").click(function() {
|
160 |
+
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
161 |
+
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
162 |
+
jQuery("#wplc_rb_theme_2").attr('checked', true);
|
163 |
+
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
164 |
+
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
165 |
+
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
166 |
+
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
167 |
+
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
168 |
+
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
169 |
+
jQuery("#wplc_theme_2").addClass("wplc_theme_active");
|
170 |
+
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
171 |
+
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
172 |
+
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
173 |
+
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
174 |
+
});
|
175 |
+
|
176 |
+
jQuery("#wplc_theme_3").click(function() {
|
177 |
+
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
178 |
+
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
179 |
+
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
180 |
+
jQuery("#wplc_rb_theme_3").attr('checked', true);
|
181 |
+
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
182 |
+
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
183 |
+
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
184 |
+
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
185 |
+
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
186 |
+
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
187 |
+
jQuery("#wplc_theme_3").addClass("wplc_theme_active");
|
188 |
+
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
189 |
+
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
190 |
+
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
191 |
+
});
|
192 |
+
|
193 |
+
jQuery("#wplc_theme_4").click(function() {
|
194 |
+
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
195 |
+
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
196 |
+
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
197 |
+
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
198 |
+
jQuery("#wplc_rb_theme_4").attr('checked', true);
|
199 |
+
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
200 |
+
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
201 |
+
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
202 |
+
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
203 |
+
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
204 |
+
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
205 |
+
jQuery("#wplc_theme_4").addClass("wplc_theme_active");
|
206 |
+
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
207 |
+
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
208 |
+
});
|
209 |
+
|
210 |
+
jQuery("#wplc_theme_5").click(function() {
|
211 |
+
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
212 |
+
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
213 |
+
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
214 |
+
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
215 |
+
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
216 |
+
jQuery("#wplc_rb_theme_5").attr('checked', true);
|
217 |
+
jQuery("#wplc_rb_theme_6").attr('checked', false);
|
218 |
+
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
219 |
+
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
220 |
+
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
221 |
+
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
222 |
+
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
223 |
+
jQuery("#wplc_theme_5").addClass("wplc_theme_active");
|
224 |
+
jQuery("#wplc_theme_6").removeClass("wplc_theme_active");
|
225 |
+
});
|
226 |
+
|
227 |
+
jQuery("#wplc_theme_6").click(function() {
|
228 |
+
jQuery("#wplc_rb_theme_default").attr('checked', false);
|
229 |
+
jQuery("#wplc_rb_theme_1").attr('checked', false);
|
230 |
+
jQuery("#wplc_rb_theme_2").attr('checked', false);
|
231 |
+
jQuery("#wplc_rb_theme_3").attr('checked', false);
|
232 |
+
jQuery("#wplc_rb_theme_4").attr('checked', false);
|
233 |
+
jQuery("#wplc_rb_theme_5").attr('checked', false);
|
234 |
+
jQuery("#wplc_rb_theme_6").attr('checked', true);
|
235 |
+
jQuery("#wplc_theme_default").removeClass("wplc_theme_active");
|
236 |
+
jQuery("#wplc_theme_1").removeClass("wplc_theme_active");
|
237 |
+
jQuery("#wplc_theme_2").removeClass("wplc_theme_active");
|
238 |
+
jQuery("#wplc_theme_3").removeClass("wplc_theme_active");
|
239 |
+
jQuery("#wplc_theme_4").removeClass("wplc_theme_active");
|
240 |
+
jQuery("#wplc_theme_5").removeClass("wplc_theme_active");
|
241 |
+
jQuery("#wplc_theme_6").addClass("wplc_theme_active");
|
242 |
+
});
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
+
|
248 |
+
jQuery(function () {
|
249 |
+
jQuery(".wplc_settings_tooltip").tooltip({
|
250 |
+
position: {
|
251 |
+
my: "left+15 center",
|
252 |
+
at: "right center",
|
253 |
+
|
254 |
+
},
|
255 |
+
template: '<div class="tooltip wplc_tooltip_control"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
|
256 |
+
onShow: function(){
|
257 |
+
var $trigger = this.getTrigger();
|
258 |
+
var offset = $trigger.offset();
|
259 |
+
this.getTip().css({
|
260 |
+
'top' : offset.top,
|
261 |
+
'left' : offset.left
|
262 |
+
});
|
263 |
+
}
|
264 |
+
});
|
265 |
+
});
|
266 |
+
|
267 |
+
});
|
js/wplc_transcript.js
CHANGED
@@ -1,60 +1,60 @@
|
|
1 |
-
jQuery('body').on('click', '#chatTranscriptTitle, #wplc_admin_email_transcript, .endChat', sendTranscript);
|
2 |
-
|
3 |
-
function sendTranscript(event) {
|
4 |
-
var data = {};
|
5 |
-
var isCloseChatClicked = false;
|
6 |
-
if (jQuery(event.target).hasClass('endChat')) {
|
7 |
-
isCloseChatClicked = true;
|
8 |
-
data.el = 'endChat';
|
9 |
-
}
|
10 |
-
if (jQuery('#chatTranscriptTitle').length) {
|
11 |
-
if (!isCloseChatClicked) {
|
12 |
-
jQuery("#chatTranscriptTitle").addClass('is-disabled');
|
13 |
-
}
|
14 |
-
var cur_id = jQuery('#chatCloseTitle').attr('cid');
|
15 |
-
data.action = 'wplc_et_admin_email_transcript';
|
16 |
-
data.security = wplc_transcript_nonce.ajax_nonce;
|
17 |
-
data.cid = cur_id;
|
18 |
-
jQuery.post(ajaxurl, data, function(response) {
|
19 |
-
if (typeof response === 'string' && response.length < 1) {
|
20 |
-
return;
|
21 |
-
}
|
22 |
-
returned_data = JSON.parse(response);
|
23 |
-
if (returned_data.constructor === Object) {
|
24 |
-
jQuery('.nifty_admin_chat_prompt, .nifty_admin_overlay').css('display', 'block');
|
25 |
-
jQuery('#nifty_admin_chat_prompt_confirm').css('display', 'none');
|
26 |
-
jQuery('.nifty_admin_chat_prompt_title').html(wplc_transcript_nonce.string_title);
|
27 |
-
jQuery('#nifty_admin_chat_prompt_cancel').html(wplc_transcript_nonce.string_close);
|
28 |
-
if (returned_data.errorstring) {
|
29 |
-
jQuery('.nifty_admin_chat_prompt_message').html(wplc_transcript_nonce.string_error1);
|
30 |
-
} else {
|
31 |
-
jQuery('.nifty_admin_chat_prompt_message').html(wplc_transcript_nonce.string_chat_emailed);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
});
|
35 |
-
} else {
|
36 |
-
if (!isCloseChatClicked) {
|
37 |
-
jQuery(".wplc_admin_email_transcript").hide();
|
38 |
-
html = "<span class='wplc_et_loading'><em>" + wplc_transcript_nonce.string_loading + "</em></span>";
|
39 |
-
jQuery(".wplc_admin_email_transcript").after(html);
|
40 |
-
}
|
41 |
-
var cur_id = jQuery(this).attr("cid");
|
42 |
-
data.action = 'wplc_et_admin_email_transcript';
|
43 |
-
data.security = wplc_transcript_nonce.ajax_nonce;
|
44 |
-
data.cid = cur_id;
|
45 |
-
jQuery.post(ajaxurl, data, function (response) {
|
46 |
-
returned_data = JSON.parse(response);
|
47 |
-
if (returned_data.constructor === Object) {
|
48 |
-
if (returned_data.errorstring) {
|
49 |
-
jQuery(".wplc_admin_email_transcript").after("<p><strong>" + wplc_transcript_nonce.string_error1 + "</strong></p>");
|
50 |
-
} else {
|
51 |
-
jQuery(".wplc_et_loading").hide();
|
52 |
-
|
53 |
-
html = "<span class=''>" + wplc_transcript_nonce.string_chat_emailed + "</span>";
|
54 |
-
jQuery("#wplc_admin_email_transcript").after(html);
|
55 |
-
jQuery("#wplc_admin_email_transcript").hide();
|
56 |
-
}
|
57 |
-
}
|
58 |
-
});
|
59 |
-
}
|
60 |
}
|
1 |
+
jQuery('body').on('click', '#chatTranscriptTitle, #wplc_admin_email_transcript, .endChat', sendTranscript);
|
2 |
+
|
3 |
+
function sendTranscript(event) {
|
4 |
+
var data = {};
|
5 |
+
var isCloseChatClicked = false;
|
6 |
+
if (jQuery(event.target).hasClass('endChat')) {
|
7 |
+
isCloseChatClicked = true;
|
8 |
+
data.el = 'endChat';
|
9 |
+
}
|
10 |
+
if (jQuery('#chatTranscriptTitle').length) {
|
11 |
+
if (!isCloseChatClicked) {
|
12 |
+
jQuery("#chatTranscriptTitle").addClass('is-disabled');
|
13 |
+
}
|
14 |
+
var cur_id = jQuery('#chatCloseTitle').attr('cid');
|
15 |
+
data.action = 'wplc_et_admin_email_transcript';
|
16 |
+
data.security = wplc_transcript_nonce.ajax_nonce;
|
17 |
+
data.cid = cur_id;
|
18 |
+
jQuery.post(ajaxurl, data, function(response) {
|
19 |
+
if (typeof response === 'string' && response.length < 1) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
returned_data = JSON.parse(response);
|
23 |
+
if (returned_data.constructor === Object) {
|
24 |
+
jQuery('.nifty_admin_chat_prompt, .nifty_admin_overlay').css('display', 'block');
|
25 |
+
jQuery('#nifty_admin_chat_prompt_confirm').css('display', 'none');
|
26 |
+
jQuery('.nifty_admin_chat_prompt_title').html(wplc_transcript_nonce.string_title);
|
27 |
+
jQuery('#nifty_admin_chat_prompt_cancel').html(wplc_transcript_nonce.string_close);
|
28 |
+
if (returned_data.errorstring) {
|
29 |
+
jQuery('.nifty_admin_chat_prompt_message').html(wplc_transcript_nonce.string_error1);
|
30 |
+
} else {
|
31 |
+
jQuery('.nifty_admin_chat_prompt_message').html(wplc_transcript_nonce.string_chat_emailed);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
});
|
35 |
+
} else {
|
36 |
+
if (!isCloseChatClicked) {
|
37 |
+
jQuery(".wplc_admin_email_transcript").hide();
|
38 |
+
html = "<span class='wplc_et_loading'><em>" + wplc_transcript_nonce.string_loading + "</em></span>";
|
39 |
+
jQuery(".wplc_admin_email_transcript").after(html);
|
40 |
+
}
|
41 |
+
var cur_id = jQuery(this).attr("cid");
|
42 |
+
data.action = 'wplc_et_admin_email_transcript';
|
43 |
+
data.security = wplc_transcript_nonce.ajax_nonce;
|
44 |
+
data.cid = cur_id;
|
45 |
+
jQuery.post(ajaxurl, data, function (response) {
|
46 |
+
returned_data = JSON.parse(response);
|
47 |
+
if (returned_data.constructor === Object) {
|
48 |
+
if (returned_data.errorstring) {
|
49 |
+
jQuery(".wplc_admin_email_transcript").after("<p><strong>" + wplc_transcript_nonce.string_error1 + "</strong></p>");
|
50 |
+
} else {
|
51 |
+
jQuery(".wplc_et_loading").hide();
|
52 |
+
|
53 |
+
html = "<span class=''>" + wplc_transcript_nonce.string_chat_emailed + "</span>";
|
54 |
+
jQuery("#wplc_admin_email_transcript").after(html);
|
55 |
+
jQuery("#wplc_admin_email_transcript").hide();
|
56 |
+
}
|
57 |
+
}
|
58 |
+
});
|
59 |
+
}
|
60 |
}
|
js/wplc_u.js
CHANGED
@@ -1,976 +1,915 @@
|
|
1 |
-
/*
|
2 |
-
* Cookie Status
|
3 |
-
*
|
4 |
-
* 1 - complete - user has left site
|
5 |
-
* 2 - pending - user waiting for chat to be answered by admin
|
6 |
-
* 3 - active chat - user and admin are chatting
|
7 |
-
* 4 - deleted
|
8 |
-
* 5 - browsing - no data has been inputted
|
9 |
-
* 6 - requesting chat - admin has requested a chat with user
|
10 |
-
* 7 - timed out - visitor has timed out
|
11 |
-
* 8 - complete but now browsing again
|
12 |
-
* 9 - user closed chat before starting chat
|
13 |
-
* 10 - user minimized active chat
|
14 |
-
* 11 - user moved on to another page (session variable is different)
|
15 |
-
* 12 - user has not been answered after sending chat request and is still active
|
16 |
-
*
|
17 |
-
*/
|
18 |
-
var wplc_is_chat_open = false;
|
19 |
-
var wplc_online = false;
|
20 |
-
var wplc_agent_name = "";
|
21 |
-
var msg_history = new Array();
|
22 |
-
var wplc_is_minimized = false; /* global to hold whether or not the chat box is minimized */
|
23 |
-
|
24 |
-
var wplc_retry_interval = null;
|
25 |
-
|
26 |
-
var wplc_run = true;
|
27 |
-
|
28 |
-
var wplc_server = null;
|
29 |
-
wplc_server = new WPLCServer();
|
30 |
-
|
31 |
-
var wplc_server_last_loop_data = null;
|
32 |
-
|
33 |
-
var wplc_shown_welcome = false;
|
34 |
-
|
35 |
-
var wplc_current_agent = false;
|
36 |
-
|
37 |
-
/* node support */
|
38 |
-
var ns_obj = {};
|
39 |
-
|
40 |
-
|
41 |
-
/* node variable mapping */
|
42 |
-
var welcome_message = '';
|
43 |
-
|
44 |
-
var wplc_session_variable = new Date().getTime();
|
45 |
-
var wplc_cid;
|
46 |
-
var wplc_check_hide_cookie;
|
47 |
-
var wplc_chat_status = "";
|
48 |
-
var wplc_cookie_name = "";
|
49 |
-
var wplc_cookie_email = "";
|
50 |
-
var wplc_init_chat_box_check = true;
|
51 |
-
var wplc_cid = null;
|
52 |
-
|
53 |
-
var initial_data = {};
|
54 |
-
var wplc_fist_run = true;
|
55 |
-
var wplc_long_poll_delay = 1500;
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
jQuery("#
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
wplc_chat_status
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
response
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
var
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
nc
|
190 |
-
nc.
|
191 |
-
nc.
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
*
|
251 |
-
*
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
if
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
}
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
if(
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
}
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
if (
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
}
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
}
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
};
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
}
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
if
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
}
|
712 |
-
}
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
}
|
718 |
-
}
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
}
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
}
|
813 |
-
|
814 |
-
}
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
}
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
function
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
this.son.setAttribute("volume",this.volume);
|
917 |
-
this.son.setAttribute("autostart","true");
|
918 |
-
this.son.setAttribute("loop",this.loop);
|
919 |
-
document.body.appendChild(this.son);
|
920 |
-
}
|
921 |
-
this.remove=function()
|
922 |
-
{
|
923 |
-
document.body.removeChild(this.son);
|
924 |
-
this.finish=true;
|
925 |
-
}
|
926 |
-
this.init=function(volume,loop)
|
927 |
-
{
|
928 |
-
this.finish=false;
|
929 |
-
this.volume=volume;
|
930 |
-
this.loop=loop;
|
931 |
-
}
|
932 |
-
}
|
933 |
-
|
934 |
-
|
935 |
-
function wplc_strip(str) {
|
936 |
-
str=str.replace(/<br>/gi, "\n");
|
937 |
-
str=str.replace(/<p.*>/gi, "\n");
|
938 |
-
str=str.replace(/<a.*href="(.*?)".*>(.*?)<\/a>/gi, " $2 ($1) ");
|
939 |
-
str=str.replace(/<(?:.|\s)*?>/g, "");
|
940 |
-
|
941 |
-
str=str.replace('iframe', "");
|
942 |
-
str=str.replace('src', "");
|
943 |
-
str=str.replace('href', "");
|
944 |
-
str=str.replace('<', "");
|
945 |
-
str=str.replace('>', "");
|
946 |
-
|
947 |
-
/* remove the last carriage return from the text area output */
|
948 |
-
str=str.replace(/\n$/, "")
|
949 |
-
|
950 |
-
return str;
|
951 |
-
}
|
952 |
-
|
953 |
-
(function($) {
|
954 |
-
|
955 |
-
$(function(event) {
|
956 |
-
|
957 |
-
if(!window.wdtEmojiBundle)
|
958 |
-
return;
|
959 |
-
|
960 |
-
$(document.body).on("click", function(event) {
|
961 |
-
|
962 |
-
// If click event isn't on the emoji window, or the emoji open button, close the emoji window
|
963 |
-
if($(event.target).closest(".wdt-emoji-picker, .wdt-emoji-popup").length == 0 && !(
|
964 |
-
event.target.parentNode == null && $(event.target).hasClass("fa-smile-o")
|
965 |
-
))
|
966 |
-
wdtEmojiBundle.close();
|
967 |
-
|
968 |
-
});
|
969 |
-
|
970 |
-
// Close emoji window on scroll
|
971 |
-
$(window).scroll(function(event) {
|
972 |
-
wdtEmojiBundle.close();
|
973 |
-
});
|
974 |
-
});
|
975 |
-
|
976 |
-
})(jQuery);
|
1 |
+
/*
|
2 |
+
* Cookie Status
|
3 |
+
*
|
4 |
+
* 1 - complete - user has left site
|
5 |
+
* 2 - pending - user waiting for chat to be answered by admin
|
6 |
+
* 3 - active chat - user and admin are chatting
|
7 |
+
* 4 - deleted
|
8 |
+
* 5 - browsing - no data has been inputted
|
9 |
+
* 6 - requesting chat - admin has requested a chat with user
|
10 |
+
* 7 - timed out - visitor has timed out
|
11 |
+
* 8 - complete but now browsing again
|
12 |
+
* 9 - user closed chat before starting chat
|
13 |
+
* 10 - user minimized active chat
|
14 |
+
* 11 - user moved on to another page (session variable is different)
|
15 |
+
* 12 - user has not been answered after sending chat request and is still active
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
var wplc_is_chat_open = false;
|
19 |
+
var wplc_online = false;
|
20 |
+
var wplc_agent_name = "";
|
21 |
+
var msg_history = new Array();
|
22 |
+
var wplc_is_minimized = false; /* global to hold whether or not the chat box is minimized */
|
23 |
+
|
24 |
+
var wplc_retry_interval = null;
|
25 |
+
|
26 |
+
var wplc_run = true;
|
27 |
+
|
28 |
+
var wplc_server = null;
|
29 |
+
wplc_server = new WPLCServer();
|
30 |
+
|
31 |
+
var wplc_server_last_loop_data = null;
|
32 |
+
|
33 |
+
var wplc_shown_welcome = false;
|
34 |
+
|
35 |
+
var wplc_current_agent = false;
|
36 |
+
|
37 |
+
/* node support */
|
38 |
+
var ns_obj = {};
|
39 |
+
|
40 |
+
|
41 |
+
/* node variable mapping */
|
42 |
+
var welcome_message = '';
|
43 |
+
|
44 |
+
var wplc_session_variable = new Date().getTime();
|
45 |
+
var wplc_cid;
|
46 |
+
var wplc_check_hide_cookie;
|
47 |
+
var wplc_chat_status = "";
|
48 |
+
var wplc_cookie_name = "";
|
49 |
+
var wplc_cookie_email = "";
|
50 |
+
var wplc_init_chat_box_check = true;
|
51 |
+
var wplc_cid = null;
|
52 |
+
|
53 |
+
var initial_data = {};
|
54 |
+
var wplc_fist_run = true;
|
55 |
+
var wplc_long_poll_delay = 1500;
|
56 |
+
|
57 |
+
|
58 |
+
jQuery(document).ready(function() {
|
59 |
+
|
60 |
+
/* Gutenberg functions */
|
61 |
+
jQuery('.wp-block-wp-live-chat-support-wplc-chat-box').on('click',function(){
|
62 |
+
jQuery("#wplc_hovercard").fadeOut("fast");
|
63 |
+
jQuery("#wplc-chat-alert").removeClass('is-active');
|
64 |
+
wplc_is_chat_open = true;
|
65 |
+
jQuery.event.trigger({type: "wplc_open_chat"});
|
66 |
+
});
|
67 |
+
|
68 |
+
wplc_map_node_variables();
|
69 |
+
|
70 |
+
/* preload the images */
|
71 |
+
wplc_preload();
|
72 |
+
|
73 |
+
wplc_cid = Cookies.get('wplc_cid');
|
74 |
+
|
75 |
+
if(typeof wplc_cid === 'undefined'){
|
76 |
+
wplc_cid = null;
|
77 |
+
} else {
|
78 |
+
wplc_cid = Cookies.get('wplc_cid');
|
79 |
+
}
|
80 |
+
|
81 |
+
wplc_check_hide_cookie = Cookies.get('wplc_hide');
|
82 |
+
wplc_check_minimize_cookie = Cookies.get('wplc_minimize');
|
83 |
+
wplc_chat_status = Cookies.get('wplc_chat_status');
|
84 |
+
wplc_cookie_name = Cookies.get('wplc_name');
|
85 |
+
wplc_cookie_email = Cookies.get('wplc_email');
|
86 |
+
// Always start on 5 - ajax will then return chat status if active
|
87 |
+
|
88 |
+
Cookies.set('wplc_chat_status', 5, { expires: 1, path: '/' });
|
89 |
+
wplc_chat_status = 5;
|
90 |
+
//if (typeof wplc_chat_status !== "undefined" && parseInt(wplc_chat_status) === 3) { } else {
|
91 |
+
|
92 |
+
//}
|
93 |
+
|
94 |
+
//Preflight check for WPML integration
|
95 |
+
var wplc_wpml_body_language = jQuery("html").attr("lang");
|
96 |
+
if(typeof wplc_wpml_body_language !== "undefined"){
|
97 |
+
if(wplc_wpml_body_language.indexOf("-") !== -1){
|
98 |
+
wplc_wpml_body_language = wplc_wpml_body_language.substr(0, wplc_wpml_body_language.indexOf("-"));
|
99 |
+
}
|
100 |
+
Cookies.set('_icl_current_language', wplc_wpml_body_language, { expires: 1, path: '/' });
|
101 |
+
}
|
102 |
+
|
103 |
+
var data = {
|
104 |
+
action: 'wplc_get_chat_box',
|
105 |
+
security: wplc_nonce,
|
106 |
+
cid: wplc_cid
|
107 |
+
};
|
108 |
+
|
109 |
+
jQuery.ajax({
|
110 |
+
url: wplc_ajaxurl_site,
|
111 |
+
data:data,
|
112 |
+
type:"POST",
|
113 |
+
success: function(response) {
|
114 |
+
/* inject html */
|
115 |
+
if(response){
|
116 |
+
if (response === "0") { if (window.console) { console.log('WP Live Chat Support Return Error'); } wplc_run = false; return; }
|
117 |
+
response = JSON.parse(response);
|
118 |
+
|
119 |
+
|
120 |
+
jQuery( "body" ).append( response['cbox']);
|
121 |
+
|
122 |
+
wplc_listenForScrollEvent(jQuery("#wplc_chatbox"));
|
123 |
+
|
124 |
+
if( typeof wplc_cookie_name == 'undefined' || typeof wplc_cookie_email == 'undefined' ){
|
125 |
+
|
126 |
+
var wplc_cookie_name = jQuery( jQuery.parseHTML( response['cbox'] ) ).find( "#wplc_name" ).val();
|
127 |
+
var wplc_cookie_email = jQuery( jQuery.parseHTML( response['cbox'] ) ).find( "#wplc_email" ).val();
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
+
/* is an agent online? */
|
134 |
+
if (response['online'] === false) {
|
135 |
+
wplc_run = false;
|
136 |
+
wplc_online = false;
|
137 |
+
ns_obj.o = '0';
|
138 |
+
|
139 |
+
} else {
|
140 |
+
wplc_online = true;
|
141 |
+
ns_obj.o = '1';
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
if (wplc_filter_run_override !== "1" || wplc_online === false) { wplc_run = false; } else { /* we can run */ }
|
147 |
+
|
148 |
+
|
149 |
+
/* has this user been assigned an agent? */
|
150 |
+
if (typeof response['type'] === "undefined") {
|
151 |
+
wplc_shown_welcome = false;
|
152 |
+
} else {
|
153 |
+
if (response['type'] === "returning") {
|
154 |
+
wplc_shown_welcome = true;
|
155 |
+
/* set the agent vars so we can access them on the fly */
|
156 |
+
if (typeof response['agent_data'] !== "undefined") {
|
157 |
+
wplc_current_agent = response['agent_data'];
|
158 |
+
}
|
159 |
+
} else {
|
160 |
+
wplc_shown_welcome = false;
|
161 |
+
}
|
162 |
+
|
163 |
+
}
|
164 |
+
|
165 |
+
|
166 |
+
/*Support mobile loggin*/
|
167 |
+
var wplc_mobile_check = false;
|
168 |
+
if(typeof wplc_is_mobile !== "undefined" && (wplc_is_mobile === "true" || wplc_is_mobile === true)){
|
169 |
+
wplc_mobile_check = true;
|
170 |
+
}
|
171 |
+
|
172 |
+
/* start long polling */
|
173 |
+
var data = {
|
174 |
+
action: 'wplc_call_to_server_visitor',
|
175 |
+
security: wplc_nonce,
|
176 |
+
cid:wplc_cid,
|
177 |
+
wplc_name: wplc_cookie_name,
|
178 |
+
wplc_email: wplc_cookie_email,
|
179 |
+
status:wplc_chat_status,
|
180 |
+
wplcsession:wplc_session_variable,
|
181 |
+
wplc_is_mobile: wplc_mobile_check,
|
182 |
+
wplc_extra_data:wplc_extra_data
|
183 |
+
};
|
184 |
+
|
185 |
+
if(wplc_server.browserIsSocketReady()){
|
186 |
+
data.socket = true;
|
187 |
+
|
188 |
+
/* load node relay code */
|
189 |
+
var nc = document.createElement("script");
|
190 |
+
nc.type = "text/javascript";
|
191 |
+
nc.async = true;
|
192 |
+
nc.src = "https://bleeper.io/app/assets/js/bleeper-dev.js";
|
193 |
+
//nc.src = "http://127.0.0.1/nick-bleeper-dev.js";
|
194 |
+
|
195 |
+
document.getElementsByTagName("head")[0].appendChild(nc);
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
initial_data = data;
|
200 |
+
// ajax long polling function
|
201 |
+
if (wplc_filter_run_override !== "1" || wplc_online === false) {
|
202 |
+
|
203 |
+
wplc_call_to_server_chat(data,true,true);
|
204 |
+
} else {
|
205 |
+
|
206 |
+
wplc_call_to_server_chat(data,true,false);
|
207 |
+
}
|
208 |
+
|
209 |
+
if(wplc_cid !== null && wplc_init_chat_box_check == true && wplc_init_chat_box !== false){
|
210 |
+
|
211 |
+
wplc_init_chat_box(wplc_cid,wplc_chat_status);
|
212 |
+
} else {
|
213 |
+
//Node and offline
|
214 |
+
if(typeof wplc_use_node_server !== "undefined" && (wplc_use_node_server === "true" || wplc_use_node_server === true)){
|
215 |
+
|
216 |
+
wplc_cbox_animation();
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
+
}
|
222 |
+
|
223 |
+
}
|
224 |
+
|
225 |
+
});
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Preload images from the localized variable
|
229 |
+
* @return void
|
230 |
+
*/
|
231 |
+
function wplc_preload() {
|
232 |
+
var images = [];
|
233 |
+
if (typeof wplc_preload_images !== "undefined" && typeof wplc_preload_images === "object" ) {
|
234 |
+
var wplc_i = 0;
|
235 |
+
for (var key in wplc_preload_images) {
|
236 |
+
images[wplc_i] = new Image();
|
237 |
+
images[wplc_i].src = wplc_preload_images[key];
|
238 |
+
wplc_i++;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Detect if the chatbox is being scrolled.
|
246 |
+
*
|
247 |
+
* This had to be created as jQuery does not allow the scroll event to bubble up the DOM tree.
|
248 |
+
*
|
249 |
+
* Thank you Bikal Basnet (https://stackoverflow.com/questions/16505182/bind-scroll-event-to-dynamic-div)
|
250 |
+
*
|
251 |
+
* @param object el The element in question
|
252 |
+
*/
|
253 |
+
function wplc_listenForScrollEvent(el) {
|
254 |
+
el.on("scroll", function(){
|
255 |
+
el.trigger("wplc-custom-scroll");
|
256 |
+
})
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
|
261 |
+
|
262 |
+
jQuery("body").on('keyup', '#wplc_email, #wplc_name', function (e) {
|
263 |
+
if (e.keyCode == 13) {
|
264 |
+
jQuery("#wplc_start_chat_btn").trigger("click")
|
265 |
+
}
|
266 |
+
});
|
267 |
+
|
268 |
+
// Fix conflict with Responsive Lighbox plugin
|
269 |
+
setTimeout(function () {
|
270 |
+
if (jQuery('html').hasClass('nivo-lightbox-notouch') || jQuery('a[rel*="lightbox"]').length) {
|
271 |
+
jQuery("body").on("keyup", function (event) {
|
272 |
+
if (event.keyCode === 13) {
|
273 |
+
jQuery("#wplc_send_msg").trigger("click");
|
274 |
+
}
|
275 |
+
});
|
276 |
+
}
|
277 |
+
}, 5000);
|
278 |
+
|
279 |
+
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
|
280 |
+
setTimeout(function () {
|
281 |
+
var liveChat4 = jQuery('#wp-live-chat-4');
|
282 |
+
var liveChat = jQuery('#wp-live-chat');
|
283 |
+
if (!liveChat.hasClass('classic')) {
|
284 |
+
jQuery('body').on('click', function (event) {
|
285 |
+
if (liveChat.hasClass('mobile-active')) {
|
286 |
+
if (event.target.id !== 'wplc_chatmsg' && event.target.className !== 'wdt-emoji-picker') {
|
287 |
+
liveChat4.removeClass('is-full-height');
|
288 |
+
} else {
|
289 |
+
liveChat4.addClass('is-full-height');
|
290 |
+
}
|
291 |
+
}
|
292 |
+
});
|
293 |
+
} else {
|
294 |
+
jQuery('body').on('click', function (event) {
|
295 |
+
if (liveChat.hasClass('mobile-active')) {
|
296 |
+
if (event.target.id !== 'wplc_chatmsg' && event.target.className !== 'wdt-emoji-picker') {
|
297 |
+
liveChat.removeClass('is-full-height');
|
298 |
+
} else {
|
299 |
+
liveChat.addClass('is-full-height');
|
300 |
+
}
|
301 |
+
}
|
302 |
+
});
|
303 |
+
}
|
304 |
+
}, 500);
|
305 |
+
}
|
306 |
+
});
|
307 |
+
|
308 |
+
|
309 |
+
function wplc_map_node_variables() {
|
310 |
+
if (typeof wplc_welcome_msg !== "undefined") {
|
311 |
+
welcome_message = wplc_welcome_msg;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* This instantly sends the user the welcome message (i.e. to wait for any agent and start typing so long)
|
317 |
+
*
|
318 |
+
*
|
319 |
+
*/
|
320 |
+
function wplc_send_welcome_message() {
|
321 |
+
if(wplc_welcome_msg !== "" && !wplc_shown_welcome){
|
322 |
+
message_class = "wplc_system_notification wplc-color-4";
|
323 |
+
var concatenated_message = "<span class='" + message_class + "'>";
|
324 |
+
concatenated_message += wplc_welcome_msg;
|
325 |
+
concatenated_message += "</span>";
|
326 |
+
|
327 |
+
if(typeof niftyFormatParser !== "undefined"){
|
328 |
+
jQuery("#wplc_chatbox").append(niftyFormatParser(concatenated_message));
|
329 |
+
} else{
|
330 |
+
jQuery("#wplc_chatbox").append(concatenated_message);
|
331 |
+
}
|
332 |
+
wplc_scroll_to_bottom();
|
333 |
+
|
334 |
+
wplc_shown_welcome = true;
|
335 |
+
}
|
336 |
+
|
337 |
+
}
|
338 |
+
|
339 |
+
jQuery(document).ready(function(){
|
340 |
+
if (wplc_online) {
|
341 |
+
jQuery(document).on('click', '#wp-live-chat-header', function() {
|
342 |
+
jQuery('#speeching_button').html(wplc_pro_sst1);
|
343 |
+
jQuery('#wplc_name').val(wplc_user_default_visitor_name);
|
344 |
+
})
|
345 |
+
} else {
|
346 |
+
jQuery('#wplc_na_msg_btn').val(wplc_pro_offline_btn_send);
|
347 |
+
}
|
348 |
+
})
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Scrolls the chat box to the bottom
|
352 |
+
*
|
353 |
+
*/
|
354 |
+
function wplc_scroll_to_bottom() {
|
355 |
+
var height = jQuery('#wplc_chatbox')[0].scrollHeight;
|
356 |
+
jQuery('#wplc_chatbox').scrollTop(height);
|
357 |
+
}
|
358 |
+
|
359 |
+
|
360 |
+
|
361 |
+
function wplc_user_message_receiver(data){
|
362 |
+
if(typeof wplc_loop_response_handler !== "undefined" && typeof wplc_loop_response_handler === "function"){
|
363 |
+
wplc_loop_response_handler(data, wplc_server_last_loop_data);
|
364 |
+
data = JSON.parse(data);
|
365 |
+
if(typeof data['status'] !== "undefined"){
|
366 |
+
delete wplc_server_last_loop_data.status;
|
367 |
+
}
|
368 |
+
|
369 |
+
if(data.keep_alive === true){
|
370 |
+
|
371 |
+
setTimeout(function(){
|
372 |
+
wplc_server_last_loop_data.status = wplc_chat_status;
|
373 |
+
wplc_call_to_server_chat(wplc_server_last_loop_data);
|
374 |
+
},100);
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
function wplc_user_retry_handler(data){
|
380 |
+
var tstatus = Cookies.get("wplc_chat_status");
|
381 |
+
|
382 |
+
if (tstatus !== "undefined") {
|
383 |
+
if(tstatus !== 8 || tstatus !== 1){
|
384 |
+
wplc_retry_interval = setTimeout(function(){
|
385 |
+
|
386 |
+
wplc_server.prepareTransport(function(){
|
387 |
+
//Transport ready...
|
388 |
+
wplc_server_last_loop_data.status = parseInt(tstatus); //Set to existing status
|
389 |
+
wplc_call_to_server_chat(wplc_server_last_loop_data);
|
390 |
+
}, wplc_user_message_receiver, wplc_user_retry_handler, wplc_log_connection_error);
|
391 |
+
|
392 |
+
|
393 |
+
},500);
|
394 |
+
}
|
395 |
+
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
function wplc_call_to_server_chat(data,first_run,short_poll) {
|
400 |
+
|
401 |
+
if (typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true") {
|
402 |
+
//not sending to WP
|
403 |
+
return;
|
404 |
+
} else {
|
405 |
+
|
406 |
+
|
407 |
+
if (typeof first_run === "undefined") { first_run = false; };
|
408 |
+
if (typeof short_poll === "undefined") { short_poll = false; };
|
409 |
+
data.first_run = first_run;
|
410 |
+
data.short_poll = short_poll;
|
411 |
+
|
412 |
+
if(typeof Cookies.get('wplc_name') !== "undefined"){
|
413 |
+
data.msg_from_print = Cookies.get('wplc_name');
|
414 |
+
}
|
415 |
+
|
416 |
+
wplc_server_last_loop_data = data;
|
417 |
+
|
418 |
+
wplc_server.send(wplc_ajaxurl, data, "POST", 120000,
|
419 |
+
function(response) {
|
420 |
+
wplc_long_poll_delay = 1500;
|
421 |
+
wplc_loop_response_handler(response, data);
|
422 |
+
},
|
423 |
+
function(jqXHR, exception) {
|
424 |
+
wplc_long_poll_delay = 5000;
|
425 |
+
|
426 |
+
if (jqXHR.status == 404) {
|
427 |
+
wplc_log_connection_error('Error: Requested page not found. [404]');
|
428 |
+
wplc_run = false;
|
429 |
+
} else if (jqXHR.status == 500) {
|
430 |
+
wplc_log_connection_error('Error: Internal Server Error [500].');
|
431 |
+
wplc_log_connection_error('Retrying in 5 seconds...');
|
432 |
+
wplc_run = true;
|
433 |
+
} else if (exception === 'parsererror') {
|
434 |
+
wplc_log_connection_error('Error: Requested JSON parse failed.');
|
435 |
+
wplc_run = false;
|
436 |
+
} else if (exception === 'abort') {
|
437 |
+
wplc_log_connection_error('Error: Ajax request aborted.');
|
438 |
+
wplc_run = false;
|
439 |
+
} else {
|
440 |
+
wplc_log_connection_error('Error: Uncaught Error.\n' + jqXHR.responseText);
|
441 |
+
wplc_log_connection_error('Retrying in 5 seconds...');
|
442 |
+
wplc_run = true;
|
443 |
+
}
|
444 |
+
},
|
445 |
+
function(response){
|
446 |
+
if (wplc_run) {
|
447 |
+
if(wplc_server.isInSocketMode() === false && wplc_server.isPreparingSocketMode() === false){
|
448 |
+
setTimeout(function() {
|
449 |
+
wplc_call_to_server_chat(data,false,false);
|
450 |
+
}, wplc_long_poll_delay);
|
451 |
+
} else if ((wplc_server.isInSocketMode() === false && wplc_server.isPreparingSocketMode() === true) && (typeof wplc_transport_prepared !== "undefined" && wplc_transport_prepared === false)) {
|
452 |
+
/* Allows for initiate chat to work on the node server */
|
453 |
+
if (typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true") {
|
454 |
+
/* do not run this if using not the node jedi */
|
455 |
+
setTimeout(function() {
|
456 |
+
wplc_call_to_server_chat(data,false,true);
|
457 |
+
}, 7500);
|
458 |
+
}
|
459 |
+
} else {
|
460 |
+
if(typeof response !== "undefined" && typeof response.responseText !== "undefined" && response.responseText !== ""){
|
461 |
+
var response_data = JSON.parse(response.responseText);
|
462 |
+
if (typeof wplc_transport_prepared !== "undefined") {
|
463 |
+
if(wplc_transport_prepared !== true && (parseInt(response_data.status) === 3 || parseInt(response_data.status) === 2)){
|
464 |
+
//Transport is unprepared and the user has returned to the page with a status 3/2
|
465 |
+
wplc_server.prepareTransport(function(){
|
466 |
+
wplc_call_to_server_chat(data,false,false);
|
467 |
+
}, wplc_user_message_receiver, wplc_user_retry_handler, wplc_log_connection_error);
|
468 |
+
}
|
469 |
+
}
|
470 |
+
}
|
471 |
+
}
|
472 |
+
}
|
473 |
+
}
|
474 |
+
);
|
475 |
+
}
|
476 |
+
|
477 |
+
};
|
478 |
+
|
479 |
+
function wplc_loop_response_handler(response, data){
|
480 |
+
if(response){
|
481 |
+
if (response === "0") { if (window.console) { console.log('WP Live Chat Support Return Error'); } wplc_run = false; return; }
|
482 |
+
if (typeof response !== "object") {
|
483 |
+
response = JSON.parse(response);
|
484 |
+
}
|
485 |
+
|
486 |
+
data['action_2'] = "";
|
487 |
+
if(typeof response['wplc_name'] !== "undefined"){ data['wplc_name'] = response['wplc_name']; /* Cookies.set('wplc_name', response['wplc_name'], { expires: 1, path: '/' });*/ }
|
488 |
+
if(typeof response['wplc_email'] !== "undefined"){ data['wplc_email'] = response['wplc_email']; /* Cookies.set('wplc_email', response['wplc_email'], { expires: 1, path: '/' }); */ }
|
489 |
+
if(typeof response['cid'] !== "undefined"){ data['cid'] = response['cid']; Cookies.set('wplc_cid', response['cid'], { expires: 1, path: '/' }); }
|
490 |
+
if(typeof response['aname'] !== "undefined") { wplc_agent_name = response['aname']; }
|
491 |
+
if(typeof response['cid'] !== "undefined" && wplc_cid !== jQuery.trim(response['cid'])){ wplc_cid = jQuery.trim(response['cid']); jQuery("#wplc_cid").val(wplc_cid); }
|
492 |
+
if(typeof response['status'] !== "undefined" && parseInt(wplc_chat_status) !== parseInt(response['status'])){
|
493 |
+
wplc_chat_status = response['status'];
|
494 |
+
Cookies.set('wplc_chat_status', null, { path: '/' });
|
495 |
+
Cookies.set('wplc_chat_status', wplc_chat_status, { expires: 1, path: '/' });
|
496 |
+
}
|
497 |
+
|
498 |
+
/* Trigger for handling responses */
|
499 |
+
jQuery.event.trigger({type: "wplc_user_chat_loop",response:response});
|
500 |
+
|
501 |
+
/* Process status changes */
|
502 |
+
if(data['status'] == response['status']){
|
503 |
+
|
504 |
+
if(data['status'] == 5 && wplc_init_chat_box_check === true && wplc_init_chat_box !== false){ // open chat box on load
|
505 |
+
wplc_init_chat_box(data['cid'], data['status']);
|
506 |
+
}
|
507 |
+
if((response['status'] == 3 || response['status'] == 2) && response['data'] != null){ // if active and data is returned
|
508 |
+
wplc_run = true;
|
509 |
+
var wplc_new_message_sound = false;
|
510 |
+
if (typeof response['data'] === "object") {
|
511 |
+
|
512 |
+
for (var index in response['data']) {
|
513 |
+
if(typeof response['data'][index] !== "object"){
|
514 |
+
if (typeof msg_history[index] === "undefined") {
|
515 |
+
//Not from node
|
516 |
+
/* we dont have this message */
|
517 |
+
msg_history[index] = true;
|
518 |
+
|
519 |
+
msg_to_parse = response['data'][index].wplcStripSlashes();
|
520 |
+
|
521 |
+
if(typeof niftyFormatParser !== "undefined"){
|
522 |
+
jQuery("#wplc_chatbox").append(niftyFormatParser(msg_to_parse));
|
523 |
+
} else{
|
524 |
+
|
525 |
+
jQuery("#wplc_chatbox").append(response['data'][index].wplcStripSlashes());
|
526 |
+
}
|
527 |
+
|
528 |
+
wplc_new_message_sound = true;
|
529 |
+
|
530 |
+
} else {
|
531 |
+
/* we already have this message */
|
532 |
+
}
|
533 |
+
} else {
|
534 |
+
var the_message = response['data'][index];
|
535 |
+
the_message.mid = index;
|
536 |
+
wplc_push_message_to_chatbox(the_message,'u', function() {
|
537 |
+
wplc_scroll_to_bottom();
|
538 |
+
});
|
539 |
+
|
540 |
+
|
541 |
+
}
|
542 |
+
}
|
543 |
+
}
|
544 |
+
else {
|
545 |
+
/* backwards compatibility - response['data'] is a string */
|
546 |
+
if(typeof niftyFormatParser !== "undefined"){
|
547 |
+
jQuery("#wplc_chatbox").append(niftyFormatParser(response['data'].wplcStripSlashes()));
|
548 |
+
} else{
|
549 |
+
jQuery("#wplc_chatbox").append(response['data'].wplcStripSlashes());
|
550 |
+
|
551 |
+
}
|
552 |
+
wplc_new_message_sound = true;
|
553 |
+
}
|
554 |
+
|
555 |
+
if(wplc_new_message_sound){
|
556 |
+
wplc_scroll_to_bottom();
|
557 |
+
if (typeof wplc_enable_ding !== 'undefined' && wplc_enable_ding === "1") {
|
558 |
+
new Audio(wplc_plugin_url+'ding.mp3').play();
|
559 |
+
}
|
560 |
+
}
|
561 |
+
}
|
562 |
+
|
563 |
+
} else {
|
564 |
+
data['status'] = wplc_chat_status;
|
565 |
+
Cookies.set('wplc_chat_status', wplc_chat_status, { expires: 1, path: '/' });
|
566 |
+
if(response['status'] == 0 || response['status'] == 12){ // no answer from admin
|
567 |
+
jQuery("#wp-live-chat-3").hide();
|
568 |
+
if (typeof response['data'] !== "undefined") {
|
569 |
+
jQuery("#wplc_chatbox").append(response['data'].wplcStripSlashes()+"<hr />");
|
570 |
+
}
|
571 |
+
|
572 |
+
}
|
573 |
+
else if(response['status'] == 8){ // chat has been ended by admin
|
574 |
+
wplc_run = false;
|
575 |
+
|
576 |
+
document.getElementById('wplc_chatmsg').disabled = true;
|
577 |
+
wplc_shown_welcome = false;
|
578 |
+
|
579 |
+
the_message = wplc_generate_system_notification_object(wplc_error_messages.chat_ended_by_operator, {}, 0);
|
580 |
+
wplc_push_message_to_chatbox(the_message,'u', function() {
|
581 |
+
wplc_scroll_to_bottom();
|
582 |
+
});
|
583 |
+
|
584 |
+
|
585 |
+
/*
|
586 |
+
if(typeof response['data'] === "object") {
|
587 |
+
for (var index in response['data']) {
|
588 |
+
if(typeof response['data'][index] === "object"){
|
589 |
+
|
590 |
+
var the_message = response['data'][index];
|
591 |
+
if(typeof the_message.originates !== "undefined"){
|
592 |
+
var message_class = "";
|
593 |
+
var message_content = "";
|
594 |
+
|
595 |
+
if (parseInt(the_message.originates) === 0){
|
596 |
+
//System Notification
|
597 |
+
message_class = "wplc_system_notification wplc-color-4";
|
598 |
+
message_content = the_message.msg;
|
599 |
+
if(message_content !== ""){
|
600 |
+
var concatenated_message = "<span class='" + message_class + "'>";
|
601 |
+
concatenated_message += message_content;
|
602 |
+
concatenated_message += "</span>";
|
603 |
+
|
604 |
+
if(typeof niftyFormatParser !== "undefined"){
|
605 |
+
jQuery("#wplc_chatbox").append(niftyFormatParser(concatenated_message));
|
606 |
+
} else{
|
607 |
+
jQuery("#wplc_chatbox").append(concatenated_message);
|
608 |
+
}
|
609 |
+
}
|
610 |
+
}
|
611 |
+
}
|
612 |
+
}
|
613 |
+
}
|
614 |
+
} else {
|
615 |
+
//Backwards Compat
|
616 |
+
jQuery("#wplc_chatbox").append("<em>"+response['data']+"</em><br />");
|
617 |
+
}*/
|
618 |
+
|
619 |
+
|
620 |
+
|
621 |
+
|
622 |
+
|
623 |
+
jQuery.event.trigger({type: "wplc_end_chat"});
|
624 |
+
|
625 |
+
}
|
626 |
+
else if(parseInt(response['status']) == 11){ /* use moved on to another page (perhaps in another tab so close this instance */
|
627 |
+
jQuery("#wp-live-chat").css({ "display" : "none" });
|
628 |
+
wplc_run = false;
|
629 |
+
}
|
630 |
+
else if(parseInt(response['status']) == 3 || parseInt(response['status']) == 2 || parseInt(response['status']) == 10){ // re-initialize chat
|
631 |
+
wplc_run = true;
|
632 |
+
if(parseInt(response['status']) == 3) { // only if not minimized open aswell
|
633 |
+
/* HERE NODE */
|
634 |
+
|
635 |
+
if (typeof wplc_use_node_server !== "undefined" && wplc_use_node_server === "true") {
|
636 |
+
/* do not run this if using not the node jedi */
|
637 |
+
|
638 |
+
if (typeof wplc_transport_prepared !== "undefined" && wplc_transport_prepared === false) {
|
639 |
+
wplc_server.prepareTransport(function(){
|
640 |
+
wplc_call_to_server_chat(wplc_server_last_loop_data,false,false);
|
641 |
+
}, wplc_user_message_receiver, wplc_user_retry_handler, wplc_log_connection_error);
|
642 |
+
}
|
643 |
+
}
|
644 |
+
if (!wplc_is_minimized) {
|
645 |
+
if (!wplc_is_chat_open) {
|
646 |
+
wplc_cbox_animation();
|
647 |
+
setTimeout(function() {
|
648 |
+
open_chat(0);
|
649 |
+
},1500);
|
650 |
+
}
|
651 |
+
}
|
652 |
+
|
653 |
+
|
654 |
+
if(jQuery('#wp-live-chat').hasClass('wplc_left') === true || jQuery('#wp-live-chat').hasClass('wplc_right') === true){
|
655 |
+
//jQuery('#wp-live-chat').height("400px");
|
656 |
+
}
|
657 |
+
}
|
658 |
+
if(parseInt(response['status']) == 10) { // only if not minimized open aswell
|
659 |
+
wplc_run = true;
|
660 |
+
open_chat(0);
|
661 |
+
|
662 |
+
}
|
663 |
+
if(response['data'] != null){ // append messages to chat area
|
664 |
+
if (typeof response['data'] === "object") {
|
665 |
+
|
666 |
+
for (var index in response['data']) {
|
667 |
+
wplc_new_message_sound = false;
|
668 |
+
if(typeof response['data'][index] !== "object"){
|
669 |
+
|
670 |
+
if (typeof msg_history[index] === "undefined") {
|
671 |
+
/* we dont have this message */
|
672 |
+
msg_history[index] = true;
|
673 |
+
if(typeof niftyFormatParser !== "undefined"){
|
674 |
+
jQuery("#wplc_chatbox").append(niftyFormatParser(response['data'][index].wplcStripSlashes()));
|
675 |
+
} else{
|
676 |
+
jQuery("#wplc_chatbox").append(response['data'][index].wplcStripSlashes());
|
677 |
+
}
|
678 |
+
|
679 |
+
wplc_new_message_sound = true;
|
680 |
+
} else {
|
681 |
+
/* we already have this message */
|
682 |
+
}
|
683 |
+
} else {
|
684 |
+
var the_message = response['data'][index];
|
685 |
+
the_message.mid = index;
|
686 |
+
wplc_push_message_to_chatbox(the_message,'u', function() {
|
687 |
+
wplc_scroll_to_bottom();
|
688 |
+
});
|
689 |
+
|
690 |
+
|
691 |
+
}
|
692 |
+
|
693 |
+
if(wplc_new_message_sound){
|
694 |
+
if (response['alert']) {
|
695 |
+
jQuery('#wplc-chat-alert').addClass('is-active');
|
696 |
+
}
|
697 |
+
wplc_scroll_to_bottom();
|
698 |
+
if (typeof wplc_enable_ding !== 'undefined' && wplc_enable_ding === "1") {
|
699 |
+
new Audio(wplc_plugin_url+'ding.mp3').play();
|
700 |
+
}
|
701 |
+
}
|
702 |
+
}
|
703 |
+
}
|
704 |
+
else {
|
705 |
+
/* backwards compatibility - response['data'] is a string */
|
706 |
+
if(typeof niftyFormatParser !== "undefined"){
|
707 |
+
jQuery("#wplc_chatbox").append(niftyFormatParser(response['data'].wplcStripSlashes()));
|
708 |
+
} else{
|
709 |
+
jQuery("#wplc_chatbox").append(response['data'].wplcStripSlashes());
|
710 |
+
|
711 |
+
}
|
712 |
+
}
|
713 |
+
|
714 |
+
if(response['data']){
|
715 |
+
wplc_scroll_to_bottom();
|
716 |
+
|
717 |
+
}
|
718 |
+
}
|
719 |
+
}
|
720 |
+
}
|
721 |
+
}
|
722 |
+
}
|
723 |
+
|
724 |
+
|
725 |
+
|
726 |
+
function wplc_log_connection_error(error){
|
727 |
+
if (window.console) { console.log(error); }
|
728 |
+
|
729 |
+
jQuery("#wplc_chatbox").append("<small>" + error + "</small><br>");
|
730 |
+
wplc_scroll_to_bottom();
|
731 |
+
}
|
732 |
+
|
733 |
+
function wplc_display_error(error) {
|
734 |
+
|
735 |
+
the_message = {};
|
736 |
+
the_message.originates = 2;
|
737 |
+
the_message.msg = error;
|
738 |
+
the_message.other = {};
|
739 |
+
var wplc_d = new Date();
|
740 |
+
the_message.other.datetime = Math.round( wplc_d.getTime() / 1000 );
|
741 |
+
wplc_push_message_to_chatbox(the_message,'u', function() {
|
742 |
+
wplc_scroll_to_bottom();
|
743 |
+
});
|
744 |
+
|
745 |
+
|
746 |
+
|
747 |
+
}
|
748 |
+
|
749 |
+
var wplc_init_chat_box = function(cid, status){
|
750 |
+
if(wplc_chat_status == 9 && wplc_check_hide_cookie == "yes"){
|
751 |
+
} else if (wplc_chat_status === 3) {
|
752 |
+
wplc_cbox_animation();
|
753 |
+
} else {
|
754 |
+
|
755 |
+
if(wplc_check_hide_cookie != "yes"){
|
756 |
+
wplc_dc = setTimeout(function (){
|
757 |
+
wplc_cbox_animation();
|
758 |
+
}, parseInt(window.wplc_delay));
|
759 |
+
}
|
760 |
+
}
|
761 |
+
wplc_init_chat_box = false;
|
762 |
+
jQuery.event.trigger({type: "wplc_init_complete"});
|
763 |
+
}
|
764 |
+
|
765 |
+
function wplc_cbox_animation() {
|
766 |
+
/*
|
767 |
+
* 1- Slide Up
|
768 |
+
* 2- Slide Across (Left/Right)
|
769 |
+
* 3- Slide Down
|
770 |
+
* 4- Fade In
|
771 |
+
*/
|
772 |
+
|
773 |
+
|
774 |
+
var wplc_window_id = jQuery("#wp-live-chat");
|
775 |
+
|
776 |
+
var wplc_theme_chosen = jQuery(wplc_window_id).attr('wplc_animation');
|
777 |
+
|
778 |
+
switch(wplc_theme_chosen){
|
779 |
+
case 'none':
|
780 |
+
jQuery(wplc_window_id).css('display', 'block');
|
781 |
+
break;
|
782 |
+
case 'animation-1':
|
783 |
+
// Slide Up
|
784 |
+
jQuery(wplc_window_id).animate({'marginBottom' : '0px'}, 1000);
|
785 |
+
break;
|
786 |
+
case 'animation-2-bl':
|
787 |
+
// Slide Accross from left
|
788 |
+
jQuery(wplc_window_id).animate({'left' : '20px'}, 1000);
|
789 |
+
break;
|
790 |
+
case 'animation-2-br':
|
791 |
+
// Slide Accross from right
|
792 |
+
jQuery(wplc_window_id).animate({'right' : '20px'}, 1000);
|
793 |
+
break;
|
794 |
+
case 'animation-2-l':
|
795 |
+
// Slide Accross from left
|
796 |
+
jQuery(wplc_window_id).animate({"left" : '0px'}, 1000);
|
797 |
+
break;
|
798 |
+
case 'animation-2-r':
|
799 |
+
|
800 |
+
// Slide Accross from right
|
801 |
+
jQuery(wplc_window_id).animate({'right' : '0px'}, 1000);
|
802 |
+
break;
|
803 |
+
case 'animation-3':
|
804 |
+
// Fade In
|
805 |
+
jQuery(wplc_window_id).fadeIn('slow');
|
806 |
+
case 'animation-4':
|
807 |
+
jQuery(wplc_window_id).css('display', 'block');
|
808 |
+
break;
|
809 |
+
default:
|
810 |
+
jQuery(wplc_window_id).css('display', 'block');
|
811 |
+
break;
|
812 |
+
}
|
813 |
+
|
814 |
+
//jQuery("#wp-live-chat").css({ "display" : "block" });
|
815 |
+
if(jQuery("#wp-live-chat").attr('wplc-auto-pop-up') === "1"){
|
816 |
+
|
817 |
+
var wplc_force_must_min = Cookies.get('wplc_minimize');
|
818 |
+
if(wplc_force_must_min === 'yes'){
|
819 |
+
/* User has actively chosen to minimize the chat, leave it alone */
|
820 |
+
} else {
|
821 |
+
setTimeout(function(){
|
822 |
+
open_chat(0);
|
823 |
+
},1000);
|
824 |
+
/**
|
825 |
+
* Adding this fixes the bug that stops the chat window from opening when an agent initialises a chat with a user
|
826 |
+
*
|
827 |
+
* Reasoning: when running open_chat(), wplc_is_chat_open is set to TRUE at the end of the function, and stops any future request to open_chat();
|
828 |
+
*
|
829 |
+
*/
|
830 |
+
wplc_is_chat_open = false;
|
831 |
+
}
|
832 |
+
}
|
833 |
+
|
834 |
+
jQuery.event.trigger({type: "wplc_animation_done"});
|
835 |
+
}
|
836 |
+
|
837 |
+
|
838 |
+
function wplc_sound(source,volume,loop) {
|
839 |
+
this.source=source;
|
840 |
+
this.volume=volume;
|
841 |
+
this.loop=loop;
|
842 |
+
var son;
|
843 |
+
this.son=son;
|
844 |
+
this.finish=false;
|
845 |
+
this.stop=function()
|
846 |
+
{
|
847 |
+
document.body.removeChild(this.son);
|
848 |
+
}
|
849 |
+
this.start=function()
|
850 |
+
{
|
851 |
+
if(this.finish)return false;
|
852 |
+
this.son=document.createElement("embed");
|
853 |
+
this.son.setAttribute("src",this.source);
|
854 |
+
this.son.setAttribute("hidden","true");
|
855 |
+
this.son.setAttribute("volume",this.volume);
|
856 |
+
this.son.setAttribute("autostart","true");
|
857 |
+
this.son.setAttribute("loop",this.loop);
|
858 |
+
document.body.appendChild(this.son);
|
859 |
+
}
|
860 |
+
this.remove=function()
|
861 |
+
{
|
862 |
+
document.body.removeChild(this.son);
|
863 |
+
this.finish=true;
|
864 |
+
}
|
865 |
+
this.init=function(volume,loop)
|
866 |
+
{
|
867 |
+
this.finish=false;
|
868 |
+
this.volume=volume;
|
869 |
+
this.loop=loop;
|
870 |
+
}
|
871 |
+
}
|
872 |
+
|
873 |
+
|
874 |
+
function wplc_strip(str) {
|
875 |
+
str=str.replace(/<br>/gi, "\n");
|
876 |
+
str=str.replace(/<p.*>/gi, "\n");
|
877 |
+
str=str.replace(/<a.*href="(.*?)".*>(.*?)<\/a>/gi, " $2 ($1) ");
|
878 |
+
str=str.replace(/<(?:.|\s)*?>/g, "");
|
879 |
+
|
880 |
+
str=str.replace('iframe', "");
|
881 |
+
str=str.replace('src', "");
|
882 |
+
str=str.replace('href', "");
|
883 |
+
str=str.replace('<', "");
|
884 |
+
str=str.replace('>', "");
|
885 |
+
|
886 |
+
/* remove the last carriage return from the text area output */
|
887 |
+
str=str.replace(/\n$/, "")
|
888 |
+
|
889 |
+
return str;
|
890 |
+
}
|
891 |
+
|
892 |
+
(function($) {
|
893 |
+
|
894 |
+
$(document).ready(function(event) {
|
895 |
+
|
896 |
+
if(!window.wdtEmojiBundle)
|
897 |
+
return;
|
898 |
+
|
899 |
+
$(document.body).on("click", function(event) {
|
900 |
+
|
901 |
+
// If click event isn't on the emoji window, or the emoji open button, close the emoji window
|
902 |
+
if($(event.target).closest(".wdt-emoji-picker, .wdt-emoji-popup").length == 0 && !(
|
903 |
+
event.target.parentNode == null && $(event.target).hasClass("fa-smile-o")
|
904 |
+
))
|
905 |
+
wdtEmojiBundle.close();
|
906 |
+
|
907 |
+
});
|
908 |
+
|
909 |
+
// Close emoji window on scroll
|
910 |
+
$(window).scroll(function(event) {
|
911 |
+
wdtEmojiBundle.close();
|
912 |
+
});
|
913 |
+
});
|
914 |
+
|
915 |
+
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/wplc_u.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var wplc_is_chat_open=!1;jQuery(function(){function n(a,c,e){"undefined"==typeof c&&(c=!1),"undefined"==typeof e&&(e=!1),a.first_run=c,a.short_poll=e,jQuery.ajax({url:wplc_ajaxurl,data:a,type:"POST",success:function(c){if(k=1500,c){if("0"===c)return window.console&&console.log("WP Live Chat Support Return Error"),void(l=!1);if(c=JSON.parse(c),a.wplc_name=c.wplc_name,a.wplc_email=c.wplc_email,a.action_2="",a.cid=c.cid,Cookies.set("wplc_cid",c.cid,{expires:1,path:"/"}),Cookies.set("wplc_name",c.wplc_name,{expires:1,path:"/"}),Cookies.set("wplc_email",c.wplc_email,{expires:1,path:"/"}),b=jQuery.trim(c.cid),d=c.status,Cookies.set("wplc_chat_status",null,{path:"/"}),Cookies.set("wplc_chat_status",d,{expires:1,path:"/"}),jQuery.event.trigger({type:"wplc_user_chat_loop",response:c}),a.status==c.status){if(5==a.status&&g===!0&&q!==!1&&q(a.cid,a.status),3==c.status&&null!=c.data&&(l=!0,"undefined"!=typeof niftyFormatParser?jQuery("#wplc_chatbox").append(niftyFormatParser(c.data.wplcStripSlashes())):jQuery("#wplc_chatbox").append(c.data.wplcStripSlashes()),c.data)){var e=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(e),"undefined"!=typeof wplc_enable_ding&&"1"===wplc_enable_ding&&new Audio(wplc_plugin_url+"/wp-live-chat-support/ding.mp3").play()}}else if(a.status=d,Cookies.set("wplc_chat_status",d,{expires:1,path:"/"}),0==c.status)jQuery("#wp-live-chat-3").hide(),jQuery("#wp-live-chat-react").show().empty().append("<center>"+c.data+"</center>");else if(8==c.status){l=!1,jQuery("#wp-live-chat-minimize").show(),document.getElementById("wplc_chatmsg").disabled=!0,jQuery("#wplc_chatbox").append("<em>"+c.data+"</em><br />");var e=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(e),jQuery.event.trigger({type:"wplc_end_chat"})}else if(11==parseInt(c.status))jQuery("#wp-live-chat").css({display:"none"}),l=!1;else if((3==parseInt(c.status)||10==parseInt(c.status))&&(l=!0,jQuery("#wplc_cid").val(b),3==parseInt(c.status)&&(s(0),jQuery("#wp-live-chat").hasClass("wplc_left")!==!0&&jQuery("#wp-live-chat").hasClass("wplc_right")!==!0||jQuery("#wp-live-chat").height("400px")),10==parseInt(c.status)&&(l=!0,s(0)),null!=c.data&&("undefined"!=typeof niftyFormatParser?jQuery("#wplc_chatbox").append(niftyFormatParser(c.data.wplcStripSlashes())):jQuery("#wplc_chatbox").append(c.data.wplcStripSlashes()),c.data))){var e=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(e)}}},error:function(a,b){k=5e3,404==a.status?(o("Error: Requested page not found. [404]"),l=!1):500==a.status?(o("Error: Internal Server Error [500]."),o("Retrying in 5 seconds..."),l=!0):"parsererror"===b?(o("Error: Requested JSON parse failed."),l=!1):"abort"===b?(o("Error: Ajax request aborted."),l=!1):(o("Error: Uncaught Error.\n"+a.responseText),o("Retrying in 5 seconds..."),l=!0)},complete:function(b){l&&setTimeout(function(){n(a,!1,!1)},k)},timeout:12e4})}function o(a){window.console&&console.log(a),jQuery("#wplc_chatbox").append("<small>"+a+"</small><br>");var b=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(b)}function q(a,b){9==d&&"yes"==c||"yes"!=c&&(wplc_dc=setTimeout(function(){var a=jQuery("#wp-live-chat"),b=jQuery(a).attr("wplc_animation");switch(b){case"none":jQuery(a).css("display","block");break;case"animation-1":jQuery(a).animate({marginBottom:"0px"},1e3);break;case"animation-2-bl":jQuery(a).animate({left:"100px"},1e3);break;case"animation-2-br":jQuery(a).animate({right:"100px"},1e3);break;case"animation-2-l":jQuery(a).animate({left:"0px"},1e3);break;case"animation-2-r":jQuery(a).animate({right:"0px"},1e3);break;case"animation-3":jQuery(a).fadeIn("slow");case"animation-4":jQuery(a).css("display","block");break;default:jQuery(a).css("display","block")}"1"===jQuery("#wp-live-chat").attr("wplc-auto-pop-up")&&s(0),jQuery.event.trigger({type:"wplc_animation_done"})},parseInt(window.wplc_delay))),q=!1}function s(a){if(jQuery.event.trigger({type:"wplc_open_chat_1"}),d=Cookies.get("wplc_chat_status"),3==parseInt(d)){jQuery.event.trigger({type:"wplc_open_chat_2",wplc_online:h}),Cookies.set("wplc_had_chat",!0,{path:"/"});var c={action:"wplc_user_maximize_chat",security:wplc_nonce,cid:b};jQuery.post(wplc_ajaxurl,c,function(a){})}else if(10==parseInt(d))jQuery("#wp-live-chat-minimize").trigger("click");else if(5==d||9==d||8==d){if(jQuery("#wp-live-chat-2").is(":visible")===!1&&jQuery("#wp-live-chat-4").is(":visible")===!1){jQuery("#wp-live-chat-2").show();var e=Cookies.get("wplc_name");"no email set"!==Cookies.get("wplc_email")&&e.indexOf("user")>=0&&(jQuery("#wplc_name").val(Cookies.get("wplc_name")),jQuery("#wplc_email").val(Cookies.get("wplc_email")))}}else if(2==d)jQuery("#wp-live-chat-3").show();else if(1==d){jQuery("#wp-live-chat-4").show(),jQuery("#wplc_social_holder").show(),jQuery("#nifty_ratings_holder").show(),jQuery.event.trigger({type:"wplc_animation_done"}),jQuery("#wplc_chatbox").append("The chat has been ended by the operator.<br />");var f=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(f),jQuery("#wp-live-chat-minimize").hide(),document.getElementById("wplc_chatmsg").disabled=!0}}function t(a){return a=a.replace(/<br>/gi,"\n"),a=a.replace(/<p.*>/gi,"\n"),a=a.replace(/<a.*href="(.*?)".*>(.*?)<\/a>/gi," $2 ($1) "),a=a.replace(/<(?:.|\s)*?>/g,""),a=a.replace("iframe",""),a=a.replace("src",""),a=a.replace("href",""),a=a.replace("<",""),a=a.replace(">","")}function u(a,b){"undefined"!=typeof d.length&&d.length>0&&(10!==parseInt(d)&&7!==parseInt(d)||Cookies.set("wplc_chat_status",3,{expires:1,path:"/"}),0===parseInt(d)&&Cookies.set("wplc_chat_status",5,{expires:1,path:"/"}),8===parseInt(d)&&Cookies.set("wplc_chat_status",5,{expires:1,path:"/"})),b()}var b,c,a=(new Date).getTime(),d="",e="",f="",g=!0,b=null,h=!1,i={},k=1500;b=Cookies.get("wplc_cid"),b="undefined"==typeof b?null:Cookies.get("wplc_cid"),c=Cookies.get("wplc_hide"),wplc_check_minimize_cookie=Cookies.get("wplc_minimize"),d=Cookies.get("wplc_chat_status"),e=Cookies.get("wplc_name"),f=Cookies.get("wplc_email"),Cookies.set("wplc_chat_status",5,{expires:1,path:"/"}),d=5;var l=!0,m={action:"wplc_get_chat_box",security:wplc_nonce};if(jQuery.ajax({url:wplc_ajaxurl_site,data:m,type:"POST",success:function(c){if(c){if("0"===c)return window.console&&console.log("WP Live Chat Support Return Error"),void(l=!1);if(c=JSON.parse(c),jQuery("body").append(c.cbox),"undefined"==typeof e||"undefined"==typeof f)var e=jQuery(jQuery.parseHTML(c.cbox)).find("#wplc_name").val(),f=jQuery(jQuery.parseHTML(c.cbox)).find("#wplc_email").val();c.online===!1?(l=!1,h=!1):h=!0,"1"===wplc_filter_run_override&&h!==!1||(l=!1);var j=!1;"undefined"==typeof wplc_is_mobile||"true"!==wplc_is_mobile&&wplc_is_mobile!==!0||(j=!0);var k={action:"wplc_call_to_server_visitor",security:wplc_nonce,cid:b,wplc_name:e,wplc_email:f,status:d,wplcsession:a,wplc_is_mobile:j,wplc_extra_data:wplc_extra_data};i=k,"1"!==wplc_filter_run_override||h===!1?n(k,!0,!0):n(k,!0,!1),null!==b&&1==g&&q!==!1&&q(b,d)}}}),jQuery("#wp-live-chat [placeholder]").focus(function(){var a=jQuery(this);a.val()==a.attr("placeholder")&&(a.val(""),a.removeClass("placeholder"))}).blur(function(){var a=jQuery(this);""!=a.val()&&a.val()!=a.attr("placeholder")||(a.addClass("placeholder"),a.val(a.attr("placeholder")))}).blur(),jQuery("body").on("click","#wp-live-chat-minimize",function(){if(jQuery.event.trigger({type:"wplc_minimize_chat"}),Cookies.set("wplc_minimize","yes",{expires:1,path:"/"}),d=Cookies.get("wplc_chat_status"),5!=d&&10!=d&&9!=d&&8!=d){var a={action:"wplc_user_minimize_chat",security:wplc_nonce,cid:b};jQuery.post(wplc_ajaxurl,a,function(a){})}}),jQuery("body").on("click","#wp-live-chat-close",function(){if(jQuery("#wp-live-chat").hide(),jQuery("#wp-live-chat-1").hide(),jQuery("#wp-live-chat-2").hide(),jQuery("#wp-live-chat-3").hide(),jQuery("#wp-live-chat-4").hide(),jQuery("#wplc_social_holder").hide(),jQuery("#nifty_ratings_holder").hide(),jQuery("#wp-live-chat-react").hide(),jQuery("#wp-live-chat-minimize").hide(),"undefined"!=typeof wplc_hide_chat&&""!==wplc_hide_chat&&null!==wplc_hide_chat)Cookies.set("wplc_hide",wplc_hide_chat,{expires:1,path:"/"});else{var a=new Date,c=2;a.setTime(a.getTime()+60*c*1e3),Cookies.set("wplc_hide","yes",{expires:a,path:"/"})}var e={action:"wplc_user_close_chat",security:wplc_nonce,cid:b,status:d};jQuery.post(wplc_ajaxurl,e,function(a){})}),jQuery("body").on("click",".wp-live-chat-now",function(){s(0)}),jQuery("body").on("click","#wplc_start_chat_btn",function(){var c=jQuery("#wplc_name").val(),d=jQuery("#wplc_email").val();if(c.length<=0)return alert("Please enter your name"),!1;if(d.length<=0)return alert("Please enter your email address"),!1;if("1"!==jQuery("#wplc_email").attr("wplc_hide")){var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;if(!e.test(d))return alert("Please Enter a Valid Email Address"),!1}l=!0,"1"===wplc_filter_run_override||h===!1||(i.status=2,n(i,!1,!1)),jQuery.event.trigger({type:"wplc_start_chat"});var f=new Date;if(f.setTime(f.getTime()+12e4),b=Cookies.get("wplc_cid"),"undefined"!=typeof b&&null!==b)var g={action:"wplc_start_chat",security:wplc_nonce,name:c,email:d,cid:b,wplcsession:a,wplc_extra_data:wplc_extra_data};else var g={action:"wplc_start_chat",security:wplc_nonce,name:c,email:d,wplcsession:a,wplc_extra_data:wplc_extra_data};jQuery.post(wplc_ajaxurl,g,function(a){Cookies.set("wplc_chat_status",2,{expires:f,path:"/"}),Cookies.set("wplc_name",c,{path:"/"}),Cookies.set("wplc_email",d,{path:"/"}),b=jQuery.trim(a)})}),jQuery("body").on("click","#wplc_na_msg_btn",function(){var a=jQuery("#wplc_name").val(),c=jQuery("#wplc_email").val(),d=jQuery("#wplc_message").val(),e=jQuery("#wplc_domain_offline").val(),f=jQuery("#wplc_ip_address").val();if(a.length<=0)return alert("Please enter your name"),!1;if(c.length<=0)return alert("Please enter your email address"),!1;var g=/^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;if(!g.test(c))return alert("Please Enter a Valid Email Address"),!1;if(d.length<=0)return alert("Please enter a message"),!1;jQuery("#wp-live-chat-2-info").hide(),jQuery("#wplc_message_div").html(wplc_offline_msg),b=Cookies.get("wplc_cid");var h={action:"wplc_user_send_offline_message",security:wplc_nonce,cid:b,name:a,email:c,msg:d,ip:f,domain:e,wplc_extra_data:wplc_extra_data};jQuery.post(wplc_ajaxurl_site,h,function(a){jQuery("#wplc_message_div").html(wplc_offline_msg3)})}),jQuery("body").on("keyup","#wplc_chatmsg",function(a){13===a.keyCode&&jQuery("#wplc_send_msg").trigger("click")}),jQuery("body").on("click","#wplc_send_msg",function(){var a=jQuery("#wplc_cid").val(),b=t(document.getElementById("wplc_chatmsg").value),c=jQuery("#wplc_name").val();"undefined"!=typeof c&&null!=c&&""!=c||(c=Cookies.get("wplc_name"));var d=jQuery("#wplc_email").val();"undefined"!=typeof d&&null!=d&&""!=d||(d=Cookies.get("wplc_email")),jQuery("#wplc_chatmsg").val("");var e=b;"undefined"!=typeof niftyFormatParser&&(e=niftyFormatParser(e)),"display"==wplc_display_name?wplc_gravatar_image.length>1?jQuery("#wplc_chatbox").append("<span class='wplc-user-message xcvxxcv wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>"+wplc_gravatar_image+" <strong>"+c+"</strong>: "+e+"</span><br /><div class='wplc-clear-float-message'></div>"):jQuery("#wplc_chatbox").append("<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'><img src='//www.gravatar.com/avatar/"+md5(d)+"?s=30' class='wplc-user-message-avatar' /> <strong>"+c+"</strong>: "+e+"</span><br /><div class='wplc-clear-float-message'></div>"):jQuery("#wplc_chatbox").append("<span class='wplc-user-message wplc-color-bg-1 wplc-color-2 wplc-color-border-1'>"+e+"</span><div class='wplc-clear-float-message'></div>");var f=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(f);var g={action:"wplc_user_send_msg",security:wplc_nonce,cid:a,msg:b,wplc_extra_data:wplc_extra_data};jQuery.post(wplc_ajaxurl,g,function(a){})}),jQuery(document).on("wplc_open_chat",function(a){d=Cookies.get("wplc_chat_status");u(status,function(){s()})}),String.prototype.wplcStripSlashes=function(){return this.replace(/\\(.)/gm,"$1")},"undefined"!=typeof wplc_elem_trigger_id&&""!==wplc_elem_trigger_id){var v=0,w=0;"undefined"!=typeof wplc_elem_trigger_action&&""!==wplc_elem_trigger_action&&(v=parseInt(wplc_elem_trigger_action)),"undefined"!=typeof wplc_elem_trigger_type&&""!==wplc_elem_trigger_type&&(w=parseInt(wplc_elem_trigger_type)),jQuery((1===w?"#":".")+wplc_elem_trigger_id).on(1===v?"mouseenter":"click",function(){s(0)})}});
|
1 |
+
var wplc_is_chat_open=!1;jQuery(document).ready(function(){function n(a,c,e){"undefined"==typeof c&&(c=!1),"undefined"==typeof e&&(e=!1),a.first_run=c,a.short_poll=e,jQuery.ajax({url:wplc_ajaxurl,data:a,type:"POST",success:function(c){if(k=1500,c){if("0"===c)return window.console&&console.log("WP Live Chat Support Return Error"),void(l=!1);if(c=JSON.parse(c),a.wplc_name=c.wplc_name,a.wplc_email=c.wplc_email,a.action_2="",a.cid=c.cid,Cookies.set("wplc_cid",c.cid,{expires:1,path:"/"}),Cookies.set("wplc_name",c.wplc_name,{expires:1,path:"/"}),Cookies.set("wplc_email",c.wplc_email,{expires:1,path:"/"}),b=jQuery.trim(c.cid),d=c.status,Cookies.set("wplc_chat_status",null,{path:"/"}),Cookies.set("wplc_chat_status",d,{expires:1,path:"/"}),jQuery.event.trigger({type:"wplc_user_chat_loop",response:c}),a.status==c.status){if(5==a.status&&g===!0&&q!==!1&&q(a.cid,a.status),3==c.status&&null!=c.data&&(l=!0,"undefined"!=typeof niftyFormatParser?jQuery("#wplc_chatbox").append(niftyFormatParser(c.data.wplcStripSlashes())):jQuery("#wplc_chatbox").append(c.data.wplcStripSlashes()),c.data)){var e=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(e),"undefined"!=typeof wplc_enable_ding&&"1"===wplc_enable_ding&&new Audio(wplc_plugin_url+"/wp-live-chat-support/ding.mp3").play()}}else if(a.status=d,Cookies.set("wplc_chat_status",d,{expires:1,path:"/"}),0==c.status)jQuery("#wp-live-chat-3").hide(),jQuery("#wp-live-chat-react").show().empty().append("<center>"+c.data+"</center>");else if(8==c.status){l=!1,jQuery("#wp-live-chat-minimize").show(),document.getElementById("wplc_chatmsg").disabled=!0,jQuery("#wplc_chatbox").append("<em>"+c.data+"</em><br />");var e=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(e),jQuery.event.trigger({type:"wplc_end_chat"})}else if(11==parseInt(c.status))jQuery("#wp-live-chat").css({display:"none"}),l=!1;else if((3==parseInt(c.status)||10==parseInt(c.status))&&(l=!0,jQuery("#wplc_cid").val(b),3==parseInt(c.status)&&(s(0),jQuery("#wp-live-chat").hasClass("wplc_left")!==!0&&jQuery("#wp-live-chat").hasClass("wplc_right")!==!0||jQuery("#wp-live-chat").height("400px")),10==parseInt(c.status)&&(l=!0,s(0)),null!=c.data&&("undefined"!=typeof niftyFormatParser?jQuery("#wplc_chatbox").append(niftyFormatParser(c.data.wplcStripSlashes())):jQuery("#wplc_chatbox").append(c.data.wplcStripSlashes()),c.data))){var e=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(e)}}},error:function(a,b){k=5e3,404==a.status?(o("Error: Requested page not found. [404]"),l=!1):500==a.status?(o("Error: Internal Server Error [500]."),o("Retrying in 5 seconds..."),l=!0):"parsererror"===b?(o("Error: Requested JSON parse failed."),l=!1):"abort"===b?(o("Error: Ajax request aborted."),l=!1):(o("Error: Uncaught Error.\n"+a.responseText),o("Retrying in 5 seconds..."),l=!0)},complete:function(b){l&&setTimeout(function(){n(a,!1,!1)},k)},timeout:12e4})}function o(a){window.console&&console.log(a),jQuery("#wplc_chatbox").append("<small>"+a+"</small><br>");var b=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(b)}function q(a,b){9==d&&"yes"==c||"yes"!=c&&(wplc_dc=setTimeout(function(){var a=jQuery("#wp-live-chat"),b=jQuery(a).attr("wplc_animation");switch(b){case"none":jQuery(a).css("display","block");break;case"animation-1":jQuery(a).animate({marginBottom:"0px"},1e3);break;case"animation-2-bl":jQuery(a).animate({left:"100px"},1e3);break;case"animation-2-br":jQuery(a).animate({right:"100px"},1e3);break;case"animation-2-l":jQuery(a).animate({left:"0px"},1e3);break;case"animation-2-r":jQuery(a).animate({right:"0px"},1e3);break;case"animation-3":jQuery(a).fadeIn("slow");case"animation-4":jQuery(a).css("display","block");break;default:jQuery(a).css("display","block")}"1"===jQuery("#wp-live-chat").attr("wplc-auto-pop-up")&&s(0),jQuery.event.trigger({type:"wplc_animation_done"})},parseInt(window.wplc_delay))),q=!1}function s(a){if(jQuery.event.trigger({type:"wplc_open_chat_1"}),d=Cookies.get("wplc_chat_status"),3==parseInt(d)){jQuery.event.trigger({type:"wplc_open_chat_2",wplc_online:h}),Cookies.set("wplc_had_chat",!0,{path:"/"});var c={action:"wplc_user_maximize_chat",security:wplc_nonce,cid:b};jQuery.post(wplc_ajaxurl,c,function(a){})}else if(10==parseInt(d))jQuery("#wp-live-chat-minimize").trigger("click");else if(5==d||9==d||8==d){if(jQuery("#wp-live-chat-2").is(":visible")===!1&&jQuery("#wp-live-chat-4").is(":visible")===!1){jQuery("#wp-live-chat-2").show();var e=Cookies.get("wplc_name");"no email set"!==Cookies.get("wplc_email")&&e.indexOf("user")>=0&&(jQuery("#wplc_name").val(Cookies.get("wplc_name")),jQuery("#wplc_email").val(Cookies.get("wplc_email")))}}else if(2==d)jQuery("#wp-live-chat-3").show();else if(1==d){jQuery("#wp-live-chat-4").show(),jQuery("#wplc_social_holder").show(),jQuery("#nifty_ratings_holder").show(),jQuery.event.trigger({type:"wplc_animation_done"}),jQuery("#wplc_chatbox").append("The chat has been ended by the operator.<br />");var f=jQuery("#wplc_chatbox")[0].scrollHeight;jQuery("#wplc_chatbox").scrollTop(f),jQuery("#wp-live-chat-minimize").hide(),document.getElementById("wplc_chatmsg").disabled=!0}}function t(a){return a=a.replace(/<br>/gi,"\n"),a=a.replace(/<p.*>/gi,"\n"),a=a.replace(/<a.*href="(.*?)".*>(.*?)<\/a>/gi," $2 ($1) "),a=a.replace(/<(?:.|\s)*?>/g,""),a=a.replace("iframe",""),a=a.replace("src",""),a=a.replace("href",""),a=a.replace("<",""),a=a.replace(">","")}function u(a,b){"undefined"!=typeof d.length&&d.length>0&&(10!==parseInt(d)&&7!==parseInt(d)||Cookies.set("wplc_chat_status",3,{expires:1,path:"/"}),0===parseInt(d)&&Cookies.set("wplc_chat_status",5,{expires:1,path:"/"}),8===parseInt(d)&&Cookies.set("wplc_chat_status",5,{expires:1,path:"/"})),b()}var b,c,a=(new Date).getTime(),d="",e="",f="",g=!0,b=null,h=!1,i={},k=1500;b=Cookies.get("wplc_cid"),b="undefined"==typeof b?null:Cookies.get("wplc_cid"),c=Cookies.get("wplc_hide"),wplc_check_minimize_cookie=Cookies.get("wplc_minimize"),d=Cookies.get("wplc_chat_status"),e=Cookies.get("wplc_name"),f=Cookies.get("wplc_email"),Cookies.set("wplc_chat_status",5,{expires:1,path:"/"}),d=5;var l=!0,m={action:"wplc_get_chat_box",security:wplc_nonce};if(jQuery.ajax({url:wplc_ajaxurl_site,data:m,type:"POST",success:function(c){if(c){if("0"===c)return window.console&&console.log("WP Live Chat Support Return Error"),void(l=!1);if(c=JSON.parse(c),jQuery("body").append(c.cbox),"undefined"==typeof e||"undefined"==typeof f)var e=jQuery(jQuery.parseHTML(c.cbox)).find("#wplc_name").val(),f=jQuery(jQuery.parseHTML(c.cbox)).find("#wplc_email").val();c.online===!1?(l=!1,h=!1):h=!0,"1"===wplc_filter_run_override&&h!==!1||(l=!1);var j=!1;"undefined"==typeof wplc_is_mobile||"true"!==wplc_is_mobile&&wplc_is_mobile!==!0||(j=!0);var k={action:"wplc_call_to_server_visitor",security:wplc_nonce,cid:b,wplc_name:e,wplc_email:f,status:d,wplcsession:a,wplc_is_mobile:j,wplc_extra_data:wplc_extra_data};i=k,"1"!==wplc_filter_run_override||h===!1?n(k,!0,!0):n(k,!0,!1),null!==b&&1==g&&q!==!1&&q(b,d)}}}),jQuery("#wp-live-chat [placeholder]").focus(function(){var a=jQuery(this);a.val()==a.attr("placeholder")&&(a.val(""),a.removeClass("placeholder"))}).blur(function(){var a=jQuery(this);""!=a.val()&&a.val()!=a.attr("placeholder")||(a.addClass("placeholder"),a.val(a.attr("placeholder")))}).blur(),jQuery("body").on("click","#wp-live-chat-minimize",function(){if(jQuery.event.trigger({type:"wplc_minimize_chat"}),Cookies.set("wplc_minimize","yes",{expires:1,path:"/"}),d=Cookies.get("wplc_chat_status"),5!=d&&10!=d&&9!=d&&8!=d){var a={action:"wplc_user_minimize_chat",security:wplc_nonce,cid:b};jQuery.post(wplc_ajaxurl,a,function(a){})}}),jQuery("body").on("click","#wp-live-chat-close",function(){if(jQuery("#wp-live-chat").hide(),jQuery("#wp-live-chat-1").hide(),jQuery("#wp-live-chat-2").hide(),jQuery("#wp-live-chat-3").hide(),jQuery("#wp-live-chat-4").hide(),jQuery("#wplc_social_holder").hide(),jQuery("#nifty_ratings_holder").hide(),jQuery("#wp-live-chat-react").hide(),jQuery("#wp-live-chat-minimize").hide(),"undefined"!=typeof wplc_hide_chat&&""!==wplc_hide_chat&&null!==wplc_hide_chat)Cookies.set("wplc_hide",wplc_hide_chat,{expires:1,path:"/"});else{var a=new Date,c=2;a.setTime(a.getTime()+60*c*1e3),Cookies.set("wplc_hide","yes",{expires:a,path:"/"})}var e={action:"wplc_user_close_chat",security:wplc_nonce,cid:b,status:d};jQuery.post(wplc_ajaxurl,e,function(a){})}),jQuery("body").on("click",".wp-live-chat-now",function(){s(0)}),jQuery("body").on("click","#wplc_start_chat_btn",function(){var c=jQuery("#wplc_name").val(),d=jQuery("#wplc_email").val();if(c.length<=0)return alert("Please enter your name"),!1;if(d.length<=0)return alert("Please enter your email address"),!1;if("1"!==jQuery("#wplc_email").attr("wplc_hide")){var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;if(!e.test(d
|