Файловый менеджер - Редактировать - /home/lmsyaran/public_html/media/com_phocacart/js/phoca/phocapos.min.js
Назад
function phUpdateUrlParameter(e,o,r){var t,a,n;if(void 0!==r?(a="",1<(n=(t=r).split("#")).length&&(a=n[1])):(t=window.location.href,a=location.hash),0<=(t=t.replace(a,"")).indexOf(e+"=")?t=t.substring(0,t.indexOf(e))+e+"="+o+(n=0<=(n=(n=t.substring(t.indexOf(e))).substring(n.indexOf("=")+1)).indexOf("&")?n.substring(n.indexOf("&")):""):t.indexOf("?")<0?t+="?"+e+"="+o:t+="&"+e+"="+o,t=t.replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""),void 0!==r)return t+a;window.history.pushState(null,null,t+a)}function phDoSubmitFormUpdateInputBox(e,o){return phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"HTML",success:function(e){jQuery("#phPosInputBox").html(e)}}),!1}function phDoSubmitFormUpdateCategoriesBox(e,o){return"main.content.customers"!=jQuery("#phPosPaginationBox input[name=page]").val()||(phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"HTML",success:function(e){jQuery("#phPosCategoriesBox").html(e)}})),!1}function phPosCurrentData(e,o,r){var t=Joomla.getOptions("phVarsPC").token;return"format="+(void 0!==o?o:"raw")+"&tmpl=component&page="+(void 0!==e?e:jQuery("#phPosPaginationBox input[name=page]").val())+(void 0!==r?"&id="+r:"")+"&ticketid="+jQuery("#phPosPaginationBox input[name=ticketid]").val()+"&unitid="+jQuery("#phPosPaginationBox input[name=unitid]").val()+"§ionid="+jQuery("#phPosPaginationBox input[name=sectionid]").val()+"&"+t+"=1"}function phPosClearFilter(){phUpdateUrlParameter("category",""),jQuery("input.phPosCategoryCheckbox:checkbox:checked").prop("checked",!1),jQuery("label.phCheckBoxCategory").removeClass("active"),phUpdateUrlParameter("search",""),jQuery("#phPosSearch").val("")}function phPosManagePageFocus(e){if(1!=Joomla.getOptions("phParamsPC").posFocusInputFields)return!0;"main.content.products"==e?jQuery("#phPosSearch").is(":focus")||jQuery("#phPosSku").focus():"main.content.customers"==e?jQuery("#phPosSearch").is(":focus")||jQuery("#phPosCard").focus():"main.content.paymentmethods"==e?jQuery("#phPosSearch").is(":focus")||jQuery("#phcoupon").focus():"main.content.payment"==e&&jQuery("#phAmountTendered").focus()}function phPosManagePage(){var e=jQuery("#phPosPaginationBox input[name=page]").val();"main.content.products"==e?(jQuery(".ph-pos-checkbox-box").show(),jQuery(".ph-pos-sku-product-box").show(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-search-box").show(),jQuery(".ph-pos-date-order-box").hide(),phPosManagePageFocus(e)):"main.content.customers"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").show(),jQuery(".ph-pos-card-user-box").show(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide(),phPosManagePageFocus(e)):"main.content.order"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide()):"main.content.orders"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").show()):"main.content.paymentmethods"==e||"main.content.payment"==e?(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide(),phPosManagePageFocus(e)):(jQuery(".ph-pos-checkbox-box").hide(),jQuery(".ph-pos-search-box").hide(),jQuery(".ph-pos-card-user-box").hide(),jQuery(".ph-pos-sku-product-box").hide(),jQuery(".ph-pos-date-order-box").hide())}function phAddSuffixToUrl(e,o){return e+(-1!=e.indexOf("?")?"&":"?")+o}function phAjaxEditPos(e,o,r,t){var a=phAddSuffixToUrl(window.location.href,"format=raw"),n=phPosCurrentData("main.input"),s=phPosCurrentData("main.categories"),p=phPosCurrentData("main.cart","json");return phRequest=jQuery.ajax({type:"POST",url:o,async:!0,cache:"false",data:e,dataType:"JSON",success:function(e){var o;1==e.status?(o="undefined"!==e.id?e.id:"",o=phPosCurrentData(r,"raw",o),phDoSubmitFormUpdateCategoriesBox(s,a),phRenderPage(o,a),phDoSubmitFormUpdateInputBox(n,a),phDoSubmitFormUpdateCart(p),jQuery(".ph-pos-message-box").html(e.message)):0==e.status&&(o=phPosCurrentData(t),phRenderPage(o,a),phDoSubmitFormUpdateInputBox(n,a),phDoSubmitFormUpdateCart(p),jQuery(".ph-pos-message-box").html(e.error))}}),!1}function phFindMember(e){var o="search="+e+"&"+phPosCurrentData();phUpdateUrlParameter("search",e);e=phAddSuffixToUrl(window.location.href,"format=raw");phRenderPage(o,e),jQuery(".ph-pos-message-box").html("")}function phScrollPosCart(e){var o;0<jQuery("#ph-msg-ns").length?e.animate({scrollTop:0},1500):(o=e[0].scrollHeight,e.animate({scrollTop:o},1500))}function phConfirm(o,e,r){return jQuery("#phDialogConfirm .modal-body").html(r),jQuery("#phDialogConfirm").modal(),jQuery("#phDialogConfirm").modal({keyboard:!1}),jQuery("#phDialogConfirm").modal("show"),jQuery("#phDialogConfirmSave").on("click",function(e){return phPosCloseTicketFormConfirmed=!0,""!=o&&jQuery(o).submit(),!0}),!1}jQuery(document).ready(function(){phPosManagePage(),jQuery(document).on("submit","#phPosSkuProductForm",function(){setTimeout(function(){jQuery("#phPosSku").val("")},100)}),jQuery(document).on("submit","#phPosCardUserForm",function(){setTimeout(function(){jQuery("#phPosCard").val("")},100)});var e=Joomla.getOptions("phLangPC"),o=document.getElementsByTagName("script"),t=0;jQuery.each(o,function(e,o){var r=o.src,o=r.indexOf("?"),r=(r=r.substring(0,-1!=o?o:r.length)).split("\\\\").pop().split("/").pop();"bootstrap.min.js"!=r&&"bootstrap.js"!=r||t++}),1<t&&(jQuery("#phPosWarningMsgBox").text(e.COM_PHOCACART_WARNING_BOOTSTRAP_JS_LOADED_MORE_THAN_ONCE),jQuery("#phPosWarningMsgBox").show()),jQuery(document).on("click",".loadMainContent",function(e){phPosClearFilter();var o=phAddSuffixToUrl(window.location.href,"format=raw"),r=jQuery(this).closest("form").serialize();phRenderPage(r,o),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),jQuery(document).on("click",".editMainContent",function(e){phPosClearFilter();var o=phAddSuffixToUrl(window.location.href,"format=json"),r=jQuery(this).closest("form");phAjaxEditPos(r.serialize(),o,r.find('input[name="redirectsuccess"]').val(),r.find('input[name="redirecterror"]').val()),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),jQuery(document).on("submit","#phPosCardUserForm",function(e){phPosClearFilter();var o=phAddSuffixToUrl(window.location.href,"format=json");phAjaxEditPos(jQuery("#phPosCardUserForm").serialize(),o,"main.content.products","main.content.products"),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),jQuery(document).on("submit","#phPosDateOrdersForm",function(e){phPosClearFilter();var o=phAddSuffixToUrl(window.location.href,"format=raw"),r=jQuery("#phPosDateOrdersForm").serialize();phRenderPage(r,o),jQuery(".ph-pos-message-box").html(""),e.preventDefault()}),phPosCloseTicketFormConfirmed=!1,jQuery(document).on("submit","#phPosCloseTicketForm",function(e){var o=jQuery(this).data("txt");return phPosCloseTicketFormConfirmed?!(phPosCloseTicketFormConfirmed=!1):(phConfirm("#phPosCloseTicketForm","",o),e.preventDefault(),!1)}),jQuery(document).on("change","#phPosCategoriesBox .phPosCategoryCheckbox",function(){var e,o;2==Joomla.getOptions("phParamsPC").posFilterCategory?(e=[],jQuery("input.phPosCategoryCheckbox:checkbox:checked").each(function(){e.push(jQuery(this).val())}),o=e.join(",")):(o=jQuery(this).val(),jQuery("input.phPosCategoryCheckbox:checkbox:checked").each(function(){o!=jQuery(this).val()&&(jQuery(this).prop("checked",!1),jQuery("label.phCheckBoxCategory").removeClass("active"))}),0==jQuery(this).prop("checked")&&(o=""));var r="category="+o+"&"+phPosCurrentData();phUpdateUrlParameter("category",o);var t=phAddSuffixToUrl(window.location.href,"format=raw");phRenderPage(r,t),jQuery(".ph-pos-message-box").html("")});var r=null;jQuery("#phPosSearch").keyup(function(){clearTimeout(r);var e=jQuery(this);r=setTimeout(function(){phFindMember(e.val())},800)}),jQuery("#phPosContentBox").on("click",".phOrderPrintBtn",function(e){var o=Joomla.getOptions("phVarsPC"),r=Joomla.getOptions("phParamsPC").posServerPrint,t=o.urlOrder,a=jQuery(this).data("order"),n=jQuery(this).data("type"),o=(jQuery("#phPosOrderPrintBox").attr("data-order"),jQuery("#phPosOrderPrintBox").attr("data-type"));if("-1"==n){if(2!=r&&3!=r)return window.print(),!1;if("4"!=o)return window.print(),!1;o=phAddSuffixToUrl(t,"id="+a+"&type="+o+"&pos=1&printserver=1");return phRequestPrint=jQuery.ajax({type:"GET",url:o,async:!0,cache:"false",dataType:"HTML",success:function(e){jQuery(".ph-pos-message-box").html("<div>"+e+"</div>")}}),e.preventDefault(),!1}var s="phType"+n,t=phAddSuffixToUrl(t,"id="+a+"&type="+n+"&pos=1");phRequest=jQuery.ajax({type:"GET",url:t,async:!0,cache:"false",dataType:"HTML",success:function(e){jQuery("#phPosOrderPrintBox").attr("class",s),jQuery("#phPosOrderPrintBox").attr("data-type",n),jQuery("#phPosOrderPrintBox").html(e)}}),e.preventDefault()});var a=jQuery("#phPosCart");phScrollPosCart(a),a.on("DOMSubtreeModified",function(){""!=a.text()&&phScrollPosCart(a)})});
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка