Party Pizza Tomaszów Maz. - Tomaszów Mazowiecki - Orły Gastronomii (2022)

'); timerId = setInterval(addDot,250); if (type > 0) { setTimeout(removeDotedDiv, 4000, type); } else { setTimeout(removeDotedDiv, 10, type); } } function addDot() { let step = $('.typing-indicator-doted').data('step'); if (step >= 0 && step < 4) { $('.typing-indicator-doted').data('step', step + 1); $('.typing-indicator-doted').append('.'); } else { $('.typing-indicator-doted').data('step', 0); $('.typing-indicator-doted').text(''); } scrollMessageDiv(); } function removeDotedDiv (type) { $('.typing-indicator-doted').hide(); clearInterval(timerId); $('.messages').append(getTimeDiv()); $('.messages').append(getAdminMessageDiv(type)); scrollMessageDiv(); if (type == 1) { $('#chat_signup_companyNameString').show(); $('#chat_signup_companyNameString').focus(); $('#submitCompany-btn').show(); } else if (type == 2) { $('#chat_signup_companyNameString').show(); $('#chat_signup_companyNameString').focus(); $('#submitCompany-btn').show(); }else if (type == 3) { $('#chat_signup_question').show(); $('#chat_signup_question').focus(); $('#submitQuestion-btn').show(); } else if (type == 4) { $('#chat_signup_phone').show(); $('#chat_signup_phone').focus(); $('#submitPhone-btn').show(); } else if (type == 5) { $('#chat_signup_submit').removeClass('disabled'); $('#chat_signup_submit').show(); } else if (type == 6) { $('#chat_signup_phone').show(); $('#chat_signup_phone').focus(); $('#submitPhone-btn').show(); } else if (type == 7) { $('#chat_signup_submit').removeClass('disabled'); $('#chat_signup_submit').show(); }else if (type == 8) { $('#chat_signup_email').show(); $('#chat_signup_email').focus(); $('#submitEmail-btn').removeClass('disabled'); $('#submitEmail-btn').show(); } } function getTimeDiv(type, timeString = '') { if (type == 2 && timeString !== '') { return '

' + timeString + '

' + getTimeSyting() + '

' + timeString + '

' + getTimeSyting() + '

' + text + '

Cześć, chętnie Ci pomogę! 🙂 Kliknij proszę w odpowiedni temat rozmowy! 🙂

\n\

Jestem Laureatem, chcę odebrać materiały marketingowe

\n\

Chcę zgłosić swoją firmę do Orłów

\n\

Mam inną sprawę

\n\

'; switch(type) { case 1: let text = 'Gratulacje\u0021\u0020\uD83D\uDE42\u0020Dzi\u0119ki\u0020swojej\u0020ci\u0119\u017Ckiej\u0020pracy,\u0020wyprzedzi\u0142e\u015B\u0020112\u0020645\u0020firm\u0020z\u0020bran\u017Cy\u0021\u0020\u0020Podaj\u0020prosz\u0119\u0020\u003Cb\u003Enazw\u0119\u0020swojej\u0020firmy\u0020i\u0020miasto\u003C\/b\u003E\u0020i\u0020naci\u015Bnij\u0020przycisk\u0020\u201CDALEJ\u201C'; setTimeout(function() { sendChatDataRequest('message', text, 1); },1000, text); message = '

' + text + '

'; break; case 2: let text2 = 'Podaj proszę nazwę swojej firmy i miasto i naciśnij przycisk “DALEJ”'; setTimeout(function() { sendChatDataRequest('message', text2, 1); },1000, text2); message = '

' + text2 + '

'; break; case 3: let text3 = 'Zadaj proszę swoje pytanie 🙂 Kiedy będziesz już gotowy, naciśnij przycisk “DALEJ” 🙂'; setTimeout(function() { sendChatDataRequest('message', text3, 1); },1000, text3); message = '

' + text3 + '

'; break; case 4: let text4 = 'Dziękuję! 🙂 Pragnę poinformować, że kontaktujemy się z Laureatami drogą telefoniczną - proszę Cię zatem o podanie numeru telefonu do kontaktu - oddzwonimy w najbliższym możliwym czasie! 🙂'; sendChatDataRequest('message', text4, 1); message = '

' + text4 + '

'; break; case 5: let text5 = 'Do usłyszenia! 🙂 Już kilka tysięcy firm w Polsce jest zadowolonymi posiadaczami materiałów marketingowych Orłów.'; let imagePath = 'https://www.orlygastronomii.pl/media/cache/gallery_image/assets/img/carousel/uploaded/Projekt_bez_tytu%C5%82u-kopia.jpg'; let imageString5 = ""<a class='chat-image-link' href='#'><img src='\/assets\/img\/carousel\/uploaded\/Projekt_bez_tytu\u0142u-kopia.jpg' style='width: 100%;'><\/a>"".replace(/"/g, ''); sendChatDataRequest('message', text5 + imageString5, 1); message = '

\n\

\n\ ' + text5 + '
\n\ \n\

\n\

'; break; case 6: let text6 = 'Podaj proszę numer telefonu - w przypadku, kiedy zakwalifikujesz się do grona Laureatów - będziemy kontaktować się drogą telefoniczną!'; sendChatDataRequest('message', text6, 1); message = '

' + text6 + '

'; break; case 7: let text7 = ''; text7 = 'Dziękuję! Jeśli Twoja średnia ocen pozwoli na zakwalifikowanie się do Orłów (co najmniej 10 ocen oraz ocena końcowa powyżej 8/10 pkt) - skontaktujemy się z Tobą drogą telefoniczną. Tak, jak inni Laureaci, będziesz miał też możliwość odebrania materiałów marketingowych.'; let imagePath7 = 'https://www.orlygastronomii.pl/media/cache/gallery_image/assets/img/carousel/uploaded/Projekt_bez_tytu%C5%82u-kopia.jpg'; let imageString7 = ""<a class='chat-image-link' href='#'><img src='\/assets\/img\/carousel\/uploaded\/Projekt_bez_tytu\u0142u-kopia.jpg' style='width: 100%;'><\/a>"".replace(/"/g, ''); sendChatDataRequest('message', (text7 + imageString7), 1); message = '

' + text7 + '\ \n\

'; break; case 8: let text8 = 'Podaj proszę swój adres e-mail - właśnie na niego otrzymasz odpowiedź na swoje pytanie 🙂'; sendChatDataRequest('message', text8, 1); message = '

' + text8 + '

'; break; case 9: let text9 = 'Dziękuję! Skontaktujemy się z Tobą w najbliższym możliwym czasie! 🙂'; sendChatDataRequest('message', text9, 1); message = '

' + text9 + '

'; break; } $('.unread-messages-span').hide(); $('.unread-messages-span-mobile').hide(); return message; } $(document).on( 'click', '.user-action-link', function(e){ e.preventDefault(); let type = $(this).data('type'); if (type == 1 || type == 2 || type == 3) { chatSignupModel.type = type; sendChatDataRequest('sessionId', 0); sendChatDataRequest('chatFormType', type); /** 1 - admin, 2 - user */ sendChatDataRequest('message', 'Cześć, chętnie Ci pomogę! 🙂 Kliknij proszę w odpowiedni temat rozmowy! 🙂', 1); sendChatDataRequest('makeObject', type); $('#chat_signup_conversationType').val(type); $('.action-select-div').hide(); addUserActionMessage($(this).text()); let text2 = $(this).text(); setTimeout(function() { sendChatDataRequest('message', text2, 2); },500, text2); sendChatDataRequest('chatFormStep', 1); } addAdminMessage(type); }); function addUserActionMessage(text) { $('.messages').append(getTimeDiv(2)); $('.messages').append(agetUserActionMessage(text)); scrollMessageDiv(); } function agetUserActionMessage(text) { return '

' + text + '

'; } checkFormInputs(); scrollMessageDiv(); $('#chat_signup_companyNameString').on('keypress', function(e){ let replaceString = $(this).val() .replace(/ /g, ''); if (e.keyCode === 13 && replaceString !== '') { let current = $('#chat_signup_companyNameString').val().trim(); addUserActionMessage(current); $('#chat_signup_companyName').val(current); setTimeout(function() { sendChatDataRequest('message', current, 2); },100, current); $('#chat_signup_companyNameString').val(''); sendChatDataRequest('chatCompanyName', $('#chat_signup_companyName').val()); updateChatSessionDataRequest('companyName', $('#chat_signup_companyName').val()); sendChatDataRequest('step1_complete', 1); sendChatDataRequest('chatFormStep', 2); if (chatSignupModel.type == 1) { addAdminMessage(4); } else if (chatSignupModel.type == 2) { addAdminMessage(6); } $('#submitCompany-btn').hide(); companyChatBtnAction(); } if (replaceString.length > 0 ) { $('#submitCompany-btn').removeClass('disabled'); } else { $('#submitCompany-btn').addClass('disabled'); } }); $('#chat_signup_phone').on('keypress', function(e){ let replaceString = $(this).val() .replace(/ /g, ''); if (e.keyCode === 13 && replaceString !== '') { $('#submitPhone-btn').trigger('click'); } else if (e.keyCode === 13 && replaceString === '') { $(this).val(''); } }); $('#chat_signup_question').on('keypress', function(e){ let replaceString = $(this).val() .replace(/ /g, ''); if (e.keyCode === 13 && replaceString !== '') { $('#submitQuestion-btn').trigger('click'); } else if (e.keyCode === 13 && replaceString === '') { $(this).val(''); } }); $('#chat_signup_email').on('keypress', function(e){ let replaceString = $(this).val() .replace(/ /g, ''); if (e.keyCode === 13 && replaceString !== '') { $('#submitEmail-btn').trigger('click'); } else if (e.keyCode === 13 && replaceString === '') { $(this).val(''); } }); function scrollMessageDiv() { $('.messages').scrollTop(9999); } $('.signup-chat-help-btn').on('click', function(){ scrollMessageDiv(); }); $(document).on('click', 'nav#mobile-navbar button[aria-expanded="false"]', function (e) { $('.close-chat-form').trigger('click'); }); $('.close-chat-form').on('click', function(e) { e.preventDefault(); e.stopPropagation(); $('#chat').removeClass('modal', 1000, "easeInBack"); $('#chat-form').removeClass('max-chat-height400'); $('#chat-form').addClass('max-chat-height43'); $(this).hide(); $('.open-chat-form').show(); var currentTime = new Date(); currentTime.setTime(currentTime.getTime() + 1000 * 60 * 5); setLocalCookie('chatFormShow', 0, currentTime); let step = '0'; let stepComplete = 0; if (step == 1) { stepComplete = '0'; } else if (step == 1){ stepComplete = '0'; } if ('' == 1 || '' == '1') { if ( '1' == 0 && stepComplete == 0) { if ($(window).width() < 768) { $('.unread-messages-span').hide(); $('.unread-messages-span-mobile').show(); } else { $('.unread-messages-span-mobile').hide(); $('.unread-messages-span').show(); } } else { $('.unread-messages-span').hide(); $('.unread-messages-span-mobile').hide(); } } }); $('.open-chat-form').on('click', function(e) { e.preventDefault(); e.stopPropagation(); $('#chat-form').removeClass('max-chat-height43'); $('#chat-form').addClass('max-chat-height400'); $(this).hide(); $('.close-chat-form').show(); var currentTime = new Date(); currentTime.setTime(currentTime.getTime() + 1000 * 60 * 5); setLocalCookie('chatFormShow', 1, currentTime); setLocalCookie('showUnreadMessagesNumber', 1, currentTime); $('.unread-messages-span').hide(); $('.unread-messages-span-mobile').hide(); }); $('#startChat-btn').on('click', function(e) { e.preventDefault(); sendChatDataRequest('chatFormStep', 1); $('#signup-time-1 p').html(getTimeSyting()); startChatBtnAction(); $(this).hide(); }); $('#submitCompany-btn').on('click', function(e) { e.preventDefault(); $('#chat_signup_companyNameString').removeClass('border border-danger'); let press = jQuery.Event("keypress"); press.which = 13; press.keyCode = 13; $("#chat_signup_companyNameString").trigger(press); }); $('#submitPhone-btn').on('click', function(e) { e.preventDefault(); $('#chat_signup_phone').hide(); $(this).hide(); let type = $(this).data('type'); let value = $('#chat_signup_phone').val(); sendChatDataRequest('chatFormPhone', value); sendChatDataRequest('chatFormStep', 2); sendChatDataRequest('message', value, 2); sendChatDataRequest('step2_complete', 1); updateChatSessionDataRequest('phone', value); addUserActionMessage(value); if (chatSignupModel.type == 1) { addAdminMessage(type); } else if (chatSignupModel.type == 2) { addAdminMessage(7); } return false; }); $('#submitQuestion-btn').on('click', function(e) { e.preventDefault(); $('#chat_signup_question').hide(); $(this).hide(); let value = $('#chat_signup_question').val(); sendChatDataRequest('chatFormQuestion', value); sendChatDataRequest('chatFormStep', 2); sendChatDataRequest('message', value, 2); sendChatDataRequest('step1_complete', 1); updateChatSessionDataRequest('question', value); addUserActionMessage(value); addAdminMessage(8); return false; }); $('#submitEmail-btn').on('click', function(e) { e.preventDefault(); let value = $('#chat_signup_email').val(); $('#chat_signup_email').hide(); $(this).hide(); $('#chat_signup_submit').show(); sendChatDataRequest('chatFormEmail', value); sendChatDataRequest('chatFormStep', 2); sendChatDataRequest('message', value, 2); sendChatDataRequest('step2_complete', 1); updateChatSessionDataRequest('email', value); addUserActionMessage(value); addAdminMessage(9); return false; }); $('#chat_signup_submit').on('click', function(e) { e.preventDefault(); var currentTime = new Date(); currentTime.setTime(currentTime.getTime() + 1000 * 60 * 5); setLocalCookie('chatFormShow', 0, currentTime); setLocalCookie('showUnreadMessagesNumber', 0, currentTime); $('form[name=chat_signup]').submit(); }); $('#chat_signup_nameSurname').on('keyup', function() { if ($(this).val().length > 0) { $('#submitName-btn').removeClass('disabled'); } else { $('#submitName-btn').addClass('disabled'); } }); $('#chat_signup_phone').on('keyup', function() { if ($(this).val().length > 0) { $('#submitPhone-btn').removeClass('disabled'); } else { $('#submitPhone-btn').addClass('disabled'); } }); $('#chat_signup_question').on('keyup', function() { if ($(this).val().length > 0) { $('#submitQuestion-btn').removeClass('disabled'); } else { $('#submitQuestion-btn').addClass('disabled'); } }); $('.open-chat-area').on('click', function(e){ e.preventDefault(); $('.open-chat-form').trigger('click'); }); $(document).on( 'click', '.chat-image-link', function(e){ e.preventDefault(); $(".chat-darker").fadeToggle(); $('.chatColageModalBlock').fadeToggle(); }); $(".chatColageModalBlock").click(function () { $(".chat-darker").fadeOut(); $(".chatColageModalBlock").fadeOut(); }); setFormPlaceholders(); $("#messages-container").animate({ scrollTop: 99999 }, 3000); $(window).resize(function(){ if ($(window).width() < 768) { $('#chat-form').addClass('chat-form-mobile'); $('.chat-form-live-chat').css('right', '45px'); } else { $('#chat-form').removeClass('chat-form-mobile'); $('.chat-form-live-chat').css('right', '10px'); } }); };///////////////////////////////////////////////////////////////////////////////// function setFormPlaceholders() { $('#chat_signup_companyNameString').attr("placeholder", 'Podaj Nazwe Firmy ...'); $('#chat_signup_phone').attr("placeholder", 'Nr telefonu'); $('#chat_signup_question').attr("placeholder", 'Zadaj proszę swoje pytanie'); $('#chat_signup_email').attr("placeholder", 'Email'); } function getTimeSyting() { let dt = new Date(); return ('0' + dt.getHours()).slice(-2)+':'+('0' + dt.getMinutes()).slice(-2); } function sendChatDataRequest(pName, pValue, mType = null) { var $path = '/set-chat-signups-session-data'; if (pName == 'message') { pValue = pValue.replace(/'/g, '').replace(/"/g, ''); } $.ajax({ method: "POST", url: $path, data: { paramName: pName, paramValue: pValue, messageType: mType }, success: function (data) { if (pName === 'makeObject') { $('form[name=chat_signup]').data("session-id", data.sessionId); } }, error: function (data) { console.error('Error DATA', data); } }); } function startChatBtnAction() { $('#chat_signup_nameSurname').css('display', 'block'); $('#chat_signup_nameSurname').focus(); $('#submitName-btn').show(); $('.close-chat-form').hide(); } function companyChatBtnAction() { $('#chat_signup_phone').focus(); $('#chat_signup_companyName').hide(); $('#chat_signup_companyNameString').hide(); $('.close-chat-form').show(); } function checkSignupStep(chatSignupModel) { switch(chatSignupModel.step) { case '1' : if (chatSignupModel.type == 1 || chatSignupModel.type == 2) { startChatBtnAction(); $('#chat_signup_nameSurname').hide(); if (!chatSignupModel.step1Complete) { $('#chat_signup_companyNameString').css('display', 'block'); $('#chat_signup_companyNameString').focus(); $('#submitCompany-btn').show(); if (chatSignupModel.companyName.length > 0) { $('#submitCompany-btn').removeClass('disabled'); } } } else if (chatSignupModel.type == 3) { if (!chatSignupModel.step1Complete) { $('#chat_signup_question').css('display', 'block'); $('#chat_signup_question').focus(); $('#submitQuestion-btn').show(); } } break; case '2' : if (chatSignupModel.type == 1 || chatSignupModel.type == 2) { $('#startChat-btn').hide(); $('#submitName-btn').hide(); if (!chatSignupModel.step2Complete) { $('#chat_signup_phone').css('display', 'block'); $('#chat_signup_phone').focus(); $('#submitPhone-btn').show(); } else { $('#chat_signup_submit').show(); } } else if (chatSignupModel.type == 3) { if (!chatSignupModel.step2Complete) { $('#chat_signup_email').css('display', 'block'); $('#chat_signup_email').focus(); $('#submitEmail-btn').removeClass('disabled'); $('#submitEmail-btn').show(); } else { $('#chat_signup_submit').show(); } } break; case '3' : $('#startChat-btn').hide(); $('#submitName-btn').hide(); $('#submitCompany-btn').hide(); companyChatBtnAction(); break; default: $('#submitName-btn').hide(); $('#submitCompany-btn').hide(); break; } } function checkFormInputs() { if ($('#chat_signup_nameSurname').val().length > 0) { $('#submitName-btn').removeClass('disabled'); } else { $('#submitName-btn').addClass('disabled'); } if ($('#chat_signup_companyName').val().length > 0) { $('#submitCompany-btn').removeClass('disabled'); } else { $('#submitCompany-btn').addClass('disabled'); } if ($('#chat_signup_companyNameString').val().length > 0) { $('#submitCompany-btn').removeClass('disabled'); } else { $('#submitCompany-btn').addClass('disabled'); } if ($('#chat_signup_phone').val().length > 5) { $('#submitPhone-btn').removeClass('disabled'); } else { $('#submitPhone-btn').addClass('disabled'); } } function updateChatSessionDataRequest(mName, mValue) { let sessionId = $('form[name=chat_signup]').data("session-id"); let path = "/ajax-update-chat-session-signup/SOME_SESSION_ID"; path = path.replace("SOME_SESSION_ID", sessionId); $.ajax({ method: "POST", url: path, data: { methodName: mName, value: mValue }, success: function (data) { }, error: function (data) { console.error('Error DATA', data); } }); } function setLocalCookie(cname, cvalue, extime) { var expires = "expires="+ extime.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; }

Top Articles

You might also like

Latest Posts

Article information

Author: Lidia Grady

Last Updated: 11/17/2022

Views: 5664

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Lidia Grady

Birthday: 1992-01-22

Address: Suite 493 356 Dale Fall, New Wanda, RI 52485

Phone: +29914464387516

Job: Customer Engineer

Hobby: Cryptography, Writing, Dowsing, Stand-up comedy, Calligraphy, Web surfing, Ghost hunting

Introduction: My name is Lidia Grady, I am a thankful, fine, glamorous, lucky, lively, pleasant, shiny person who loves writing and wants to share my knowledge and understanding with you.