Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/ecom1.picotech.app/public_html_ecom1/public/dist/js/custom/ drwxr-xr-x |
Viewing file: Select action/file-type: "use strict";if($(".main-body .page-wrapper").find("#option-add-container").length||$(".main-body .page-wrapper").find("#option-edit-container").length){var label="",custom=!0,hideOrNot=!1,rowid=2;function typeCheck(){label.length>0?($("#select_first").hide(),$("#option_div").show(),"field"==label||"textarea"==label||"date"==label||"date_time"==label||"time"==label?(hideTable(),custom=!1,hideOrNot=!0):(custom=!0,hideOrNot=!1,showTable())):(custom=!1,$("#option_div").hide(),$("#select_first").show())}function hideTable(){let e=$("input[name='row_identify[]']").map(function(){return $(this).val()}).get();for(let t=1;t<e.length;t++)$("#rowid-"+e[t]).remove();$(".bar").hide(),$(".label").hide(),$(".delete").hide(),$("#add-new-value").hide()}function showTable(){$(".bar").show(),$(".label").show(),$(".delete").show(),$("#add-new-value").show()}function tabValidation(){if($("#name").val().length>0&&$("#type").val().length>0){let e=$("input[name='row_identify[]']").map(function(){return $(this).val()}).get(),t=parseInt(e.length),a=0;for(let i=0;i<t;i++)$.each($("#priceChk-"+e[i]),function(){0==hideOrNot?$("#labelChk-"+e[i]).val().length<1&&(a=1):a=0,($(this).val().length<1||1==a)&&($("#group").removeClass("show"),$("#group").removeClass("active"),$("#v-pills-home-tab").removeClass("active"),$("#v-pills-home-tab").removeAttr("aria-selected"),$("#v-pills-home-tab").attr("aria-selected","false"),$("#v-pills-profile-tab").removeAttr("aria-selected"),$("#v-pills-profile-tab").attr("aria-selected","true"),$("#v-pills-profile-tab").addClass("active"),$("#options").addClass("show"),$("#options").addClass("active"))})}}function customValidation(){let e=$("input[name='row_identify[]']").map(function(){return $(this).val()}).get(),t=1,a=1,i=parseInt(e.length),l=0,n=0;for(let o=0;o<i;o++){if($.each($("#priceChk-"+e[o]),function(){t=$(this).val()?1:0,0==hideOrNot&&(a=$("#labelChk-"+e[o]).val()?1:0)}),0==t){$("#priceChk-"+e[o]).addClass("err1"),$("#value-price-"+e[o]).text(jsLang("This field is required.")),l=1;break}if($("#priceChk-"+e[o]).removeClass("err1"),$("#value-price-"+e[o]).text(""),l=0,0==a){$("#labelChk-"+e[o]).addClass("err1"),$("#value-label-"+e[o]).text(jsLang("This field is required.")),n=1;break}$("#labelChk-"+e[o]).removeClass("err1"),$("#value-label-"+e[o]).text(""),n=0}return 0==l&&1==t&&1==a&&0==n}$(".select2").select2(),$("#option_div").hide(),$(".main-body .page-wrapper").find("#option-edit-container").length&&(rowid=$("#row_id").val(),label=$("#type :selected").val(),typeCheck()),$("#type").change(function(){label=$("#type :selected").val(),typeCheck()}),$(document).on("change",".errorChk",function(e){if($(this).hasClass("err1")&&""!=$(this).val){$(this).removeClass("err1");let e=$(this).attr("id");$("#"+e).next("span").text("")}}),$(document).on("click","#btnSubmit",function(e){""!=$("#category_id").val()&&""!=$("#name").val()&&""!=$("#type").val()||($("#group").addClass("show"),$("#group").addClass("active"),$("#v-pills-home-tab").addClass("active"),$("#v-pills-home-tab").removeAttr("aria-selected"),$("#v-pills-home-tab").attr("aria-selected","true"),$("#v-pills-profile-tab").removeAttr("aria-selected"),$("#v-pills-profile-tab").attr("aria-selected","false"),$("#v-pills-profile-tab").removeClass("active"),$("#options").removeClass("show"),$("#options").removeClass("active"))}),$("#optionForm").on("submit",function(e){tabValidation(),0==customValidation()?e.preventDefault():($("#spinnerText").text(jsLang("Please wait...")),$(".spinner").css({display:"inline-block","line-height":"0"}),$("#btnSubmit").attr("disabled",!0))}),$(document).on("click","#add-new-value",function(e){if(e.preventDefault(),1==custom){let e=`<tr draggable="false" class="" id="rowid-${rowid}">\n <td class="text-center bar">\n <i class="fa fa-bars"></i>\n </td>\n <td class="label">\n <input type="text" name="label[]" class="form-control errorChk" id="labelChk-${rowid}">\n <span id="value-label-${rowid}" class="validationMsg"></span>\n </td>\n <td>\n <div class="form-group">\n <input type="text" name="price[]" class="form-control positive-float-number errorChk" id="priceChk-${rowid}" maxlength="8">\n <span id="value-price-${rowid}" class="validationMsg"></span>\n <input type="hidden" name="row_identify[]" value="${rowid}">\n </div>\n </td>\n <td>\n <select class="form-control" name="price_type[]" id="price_type">\n <option value="Fixed">${jsLang("Fixed")}</option>\n <option value="Percent">${jsLang("Percent")}</option>\n </select>\n </td>\n <td class="text-center delete">\n <button type="button" id="delete-value" class="btn btn-xs btn-danger delete-row" data-row-id="${rowid}" data-toggle="tooltip" data-title="Delete Value" data-original-title="" title="">\n <i class="feather icon-trash-2"></i>\n </button>\n </td>\n </tr>`;rowid++,$("#values").append(e)}}),$("#values").sortable({distance:2,delay:300,opacity:.8,cursor:"move"}),$(document).on("click",".delete-row",function(e){e.preventDefault();var t=$(this).attr("data-row-id");$("#rowid-"+t).remove()})}$(".main-body .page-wrapper").find("#option-list-container").length&&($(document).on("click","#csv, #pdf",function(e){e.preventDefault(),window.location=SITE_URL+"/options/"+this.id}),$(".select2").select2()); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0038 ]-- |