From 3332344c51db2077a9cdc22dff5e0c5264125c83 Mon Sep 17 00:00:00 2001 From: Remdex Date: Mon, 9 Mar 2015 17:04:25 +0100 Subject: [PATCH 1/2] Componentize get status --- .../defaulttheme/tpl/lhchat/getstatus.tpl.php | 16 +++++++++++----- .../getstatus/lhc_chat_multiinclude.tpl.php | 9 +++++++++ .../tpl/lhchat/getstatus/we_here.tpl.php | 14 ++------------ .../lhchat/getstatus/we_here_substatus.tpl.php | 13 +++++++++++++ .../part/operator_profile_start_chat.tpl.php | 1 + .../operator_profile_start_chat_post.tpl.php | 5 +++++ 6 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/getstatus/lhc_chat_multiinclude.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here_substatus.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat_post.tpl.php diff --git a/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php index ff31fa7bcc..ed7d9aafa1 100644 --- a/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php +++ b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus.tpl.php @@ -123,7 +123,7 @@ cookieDataPers : {}, domain : false, isSharing : false, - + extensionArgs : '', getCookieDomain : function(domain) { if (this.domain !== false) { return this.domain; @@ -281,7 +281,7 @@ parseOptions : function() { argumentsQuery = new Array(); - + var paramsReturn = ''; if (typeof LHCChatOptions != 'undefined') { if (typeof LHCChatOptions.attr != 'undefined') { if (LHCChatOptions.attr.length > 0){ @@ -307,11 +307,15 @@ }; if (argumentsQuery.length > 0) { - return '&'+argumentsQuery.join('&'); + paramsReturn = '&'+argumentsQuery.join('&'); }; }; - return ''; + if (this.extensionArgs != '') { + paramsReturn = paramsReturn + this.extensionArgs; + } + + return paramsReturn; }, parseOptionsOnline : function(){ @@ -807,7 +811,7 @@ },current_value*1000); ?>); }, - + handleMessage : function(e) { var action = e.data.split(':')[0]; if (action == 'lhc_sizing_chat') { @@ -857,6 +861,8 @@ } }; + + if ( window.attachEvent ) { // IE window.attachEvent("onmessage", lh_inst.handleMessage); diff --git a/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/lhc_chat_multiinclude.tpl.php b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/lhc_chat_multiinclude.tpl.php new file mode 100644 index 0000000000..da748802dd --- /dev/null +++ b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/lhc_chat_multiinclude.tpl.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here.tpl.php b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here.tpl.php index 402c075597..b9af4e0d99 100644 --- a/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here.tpl.php +++ b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here.tpl.php @@ -3,18 +3,8 @@ if (this.isOnline == true) { var lhc_hnh = current_value > 0) : ?>lh_inst.getPersistentAttribute('lhc_hnh');lh_inst.cookieData.lhc_hnh; if (lhc_hnh == null || lhc_hnh == undefined || parseInt(lhc_hnh) < ) { -var titleText = (typeof LHCChatOptions.opt.nh_title_text != 'undefined') ? LHCChatOptions.opt.nh_title_text : need_help_header !== '') : print json_encode($theme->need_help_header); else : ?>getTranslation('chat/getstatus','Need help?'),ENT_QUOTES))?>; -var subTitleText = (typeof LHCChatOptions.opt.nh_sub_title_text != 'undefined') ? LHCChatOptions.opt.nh_sub_title_text : need_help_text !== '') : print json_encode($theme->need_help_text); else : ?>getTranslation('chat/getstatus','Our staff is always ready to help'),ENT_QUOTES))?>; -var imageTooltip = (typeof LHCChatOptions.opt.nh_image != 'undefined') ? LHCChatOptions.opt.nh_image : 'current_value?>//need_help_image_url !== false) : print $theme->need_help_image_url; else : ?>'; -subStatus = '
'+ -''+ -'×'; -if (imageTooltip !== false) { -subStatus += '
'; -}; -subStatus += '
'+titleText+'
'+ -''+subTitleText+''+ -'
';}; + + if (!this.cssNHWasAdded) { this.cssNHWasAdded = true; diff --git a/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here_substatus.tpl.php b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here_substatus.tpl.php new file mode 100644 index 0000000000..b6f5390437 --- /dev/null +++ b/lhc_web/design/defaulttheme/tpl/lhchat/getstatus/we_here_substatus.tpl.php @@ -0,0 +1,13 @@ +var titleText = (typeof LHCChatOptions.opt.nh_title_text != 'undefined') ? LHCChatOptions.opt.nh_title_text : need_help_header !== '') : print json_encode($theme->need_help_header); else : ?>getTranslation('chat/getstatus','Need help?'),ENT_QUOTES))?>; +var subTitleText = (typeof LHCChatOptions.opt.nh_sub_title_text != 'undefined') ? LHCChatOptions.opt.nh_sub_title_text : need_help_text !== '') : print json_encode($theme->need_help_text); else : ?>getTranslation('chat/getstatus','Our staff is always ready to help'),ENT_QUOTES))?>; +var imageTooltip = (typeof LHCChatOptions.opt.nh_image != 'undefined') ? LHCChatOptions.opt.nh_image : 'current_value?>//need_help_image_url !== false) : print $theme->need_help_image_url; else : ?>'; + +subStatus = '
'+ +''+ +'×'; +if (imageTooltip !== false) { +subStatus += '
'; +}; +subStatus += '
'+titleText+'
'+ +''+subTitleText+''+ +'
';}; \ No newline at end of file diff --git a/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat.tpl.php b/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat.tpl.php index 46de10fd0b..eb59bd52e7 100644 --- a/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat.tpl.php +++ b/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat.tpl.php @@ -12,5 +12,6 @@ intro_operator_text != '') : ?>intro_operator_text); ?>getTranslation('chat/startchat','Have a question? Ask us!');?> + diff --git a/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat_post.tpl.php b/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat_post.tpl.php new file mode 100644 index 0000000000..46ba388c10 --- /dev/null +++ b/lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_start_chat_post.tpl.php @@ -0,0 +1,5 @@ + \ No newline at end of file From 8397c6ab501a602f256a479dd30a3467e064e936 Mon Sep 17 00:00:00 2001 From: Remdex Date: Fri, 13 Mar 2015 16:30:13 +0100 Subject: [PATCH 2/2] Enhancements --- lhc_web/cron.php | 8 ++ lhc_web/design/defaulttheme/css/app.css | 6 ++ .../js/lh/dist/1-2f8b94502c46061841b2.js | 1 - .../js/lh/dist/1-5dae9e1f43c9a11fb867.js | 1 + .../js/lh/dist/2-9d425e902cb902dd9eb8.js | 2 +- .../design/defaulttheme/js/lh/dist/bundle.js | 2 +- .../js/lh/lh-modules/reveal-modal.js | 31 +++++- .../defaulttheme/tpl/lhchat/chat.tpl.php | 5 +- .../tpl/lhchat/customer_user_settings.tpl.php | 2 + ...ustomer_user_settings_multiinclude.tpl.php | 5 + .../angular_show_list_multiinclude.tpl.php | 5 + ...ht_panel_post_pending_multiinclude.tpl.php | 5 + .../tpl/lhchat/offline_form.tpl.php | 1 + .../part/offline_button_multiinclude.tpl.php | 6 ++ .../tpl/lhchat/part/operator_profile.tpl.php | 6 +- .../lhchat/part/operator_profile_post.tpl.php | 4 + .../lhchat/part/operator_profile_pre.tpl.php | 4 + ...peratormessage_button_multiinclude.tpl.php | 5 + .../tpl/lhchat/readoperatormessage.tpl.php | 2 + .../tpl/lhkernel/alert_info.tpl.php | 7 ++ .../defaulttheme/tpl/pagelayouts/main.php | 2 + lhc_web/lib/core/lhcore/lhsearchhandler.php | 8 +- .../modules/lhchat/readoperatormessage.php | 4 + lhc_web/modules/lhchat/syncadmininterface.php | 2 + .../util/generate_translation_file_ext.php | 95 +++++++++++++++++++ 25 files changed, 207 insertions(+), 12 deletions(-) delete mode 100644 lhc_web/design/defaulttheme/js/lh/dist/1-2f8b94502c46061841b2.js create mode 100644 lhc_web/design/defaulttheme/js/lh/dist/1-5dae9e1f43c9a11fb867.js create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/customer_user_settings_multiinclude.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/lists/angular_show_list_multiinclude.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/lists/right_panel_post_pending_multiinclude.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/part/offline_button_multiinclude.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_post.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/part/operator_profile_pre.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhchat/part/readoperatormessage_button_multiinclude.tpl.php create mode 100644 lhc_web/design/defaulttheme/tpl/lhkernel/alert_info.tpl.php create mode 100644 lhc_web/modules/lhcron/util/generate_translation_file_ext.php diff --git a/lhc_web/cron.php b/lhc_web/cron.php index fd0d050157..6994ad9424 100644 --- a/lhc_web/cron.php +++ b/lhc_web/cron.php @@ -48,6 +48,14 @@ function __autoload( $className ) ) ); +$cronjobPathOption = $input->registerOption( + new ezcConsoleOption( + 'p', + 'path', + ezcConsoleInput::TYPE_STRING + ) +); + $extensionPartOption = $input->registerOption( new ezcConsoleOption( 'e', diff --git a/lhc_web/design/defaulttheme/css/app.css b/lhc_web/design/defaulttheme/css/app.css index 67571fa293..7b324a076a 100644 --- a/lhc_web/design/defaulttheme/css/app.css +++ b/lhc_web/design/defaulttheme/css/app.css @@ -18,6 +18,11 @@ body { outline: 0; } +#myModal, +.modal-open{ + padding-right:0px !important; +} + .btrad-reset{ border-top-right-radius: 0px; border-top-left-radius: 0px; @@ -55,6 +60,7 @@ img{max-height:100%} #widget-layout .alert{ margin-bottom:10px; + font-size:12px; } #widget-layout textarea, diff --git a/lhc_web/design/defaulttheme/js/lh/dist/1-2f8b94502c46061841b2.js b/lhc_web/design/defaulttheme/js/lh/dist/1-2f8b94502c46061841b2.js deleted file mode 100644 index 78f4fe3ed2..0000000000 --- a/lhc_web/design/defaulttheme/js/lh/dist/1-2f8b94502c46061841b2.js +++ /dev/null @@ -1 +0,0 @@ -webpackJsonp([1],{3:function(a){var e={cancelcolorbox:function(){$("#myModal").foundation("reveal","close")},initializeModal:function(a){var e=void 0!=a?a:"myModal";0==$("#"+e).size()&&$("body").prepend('')},revealModal:function(a){e.initializeModal("myModal"),"undefined"==typeof a.iframe?jQuery.get(a.url,function(a){$("#myModal").html(a).modal("show")}):$("#myModal").html('