1$sa =jQuery; 2$sa( 3 function () { 4 $sa('.woocommerce-address-fields [name=billing_phone]').on( 5 "change", function (e) { 6 if(smsalert_mdet.update_otp_enable=='on') { 7 var new_phone = $sa('[name=billing_phone]:last-child').val(); 8 var old_phone = $sa('#old_billing_phone').val(); 9 if(new_phone != '' && new_phone != old_phone) { 10 $sa(this).parents('form').find('[id^="sa_verify_"]').removeClass("sa-default-btn-hide"); 11 $sa('[name="save_address"]').addClass("sa-default-btn-hide"); 12 } 13 else{ 14 $sa('[name="save_address"]').removeClass("sa-default-btn-hide"); 15 $sa(this).parents('form').find('[id^="sa_verify_"]').addClass("sa-default-btn-hide"); 16 } 17 } 18 } 19 ); 20 /* $sa('.sa-default-btn-hide[name="save_address"]').each(function(index) { 21 $sa(this).removeClass('sa-default-btn-hide'); 22 $sa(this).parents('form').find('#sa_verify').addClass("sa-default-btn-hide"); 23 }); */ 24 25 $sa('input[id="reg_email"]').each( 26 function (index) { 27 //if(smsalert_mdet.mail_accept==0) 28 { 29 //$sa(this).closest(".form-required").removeClass("form-required").find(".description").remove(); 30 //$sa(this).parent().hide(); 31 } 32 /* else if(smsalert_mdet.mail_accept==1){ 33 $sa(this).parent().children("label").html("Email"); 34 $sa(this).closest(".form-required").removeClass("form-required").find(".description").remove(); 35 } */ 36 } 37 ); 38 var register = $sa("#smsalert_name").closest(".register"); 39 register.find(".woocommerce-Button, button[name='register']").each( 40 function () { 41 if ($sa(this).attr("name") == "register") { 42 if (!$sa(this).text()!=smsalert_mdet.signupwithotp) { 43 //$sa(this).val(smsalert_mdet.signupwithotp); 44 //$sa(this).find('span').text(smsalert_mdet.signupwithotp); 45 } 46 } 47 } 48 ); 49 } 50); 51// login js 52$sa( 53 function ($) { 54 function isEmpty(el) 55 { 56 return !$sa.trim(el) 57 } 58 var tokenCon; 59 var akCallback = -1; 60 var body = $sa("body"); 61 var modcontainer = $sa(".smsalert-modal"); 62 var noanim = false; 63 /* $.fn.smsalert_login_modal = function($this) { 64 show_smsalert_login_modal($this); 65 return false 66 }; */ 67 $sa(document).on( 68 "click", ".smsalert-login-modal", function () { 69 //$sa('.smsalert-modal').show(); 70 // if (!$sa(this).attr("attr-disclick")) { 71 show_smsalert_login_modal($sa(this)) 72 // } 73 return false 74 } 75 ); 76 function getUrlParams(url) 77 { 78 var params = {}; 79 url.substring(0).replace( 80 /[?&]+([^=&]+)=([^&]*)/gi, 81 function (str, key, value) { 82 params[key] = value; 83 } 84 ); 85 return params; 86 } 87 88 function show_smsalert_login_modal($this) 89 { 90 //$sa(".u-column2").css("display",'none'); 91 var windowWidth = $sa(window).width(); 92 var params = getUrlParams($this.attr("href")); 93 var def = params["default"]; 94 var showonly = params["showonly"]; 95 var modal_id = params["modal_id"]; 96 97 $sa("#"+modal_id+".smsalert-modal").show(); 98 99 if (showonly == 'login,register' || showonly == 'register,login') { 100 101 if(def == 'login') { 102 $sa("#"+modal_id+" .u-column2").css("display",'none'); 103 $sa("#"+modal_id+" .u-column1, #"+modal_id+" .signdesc").css("display",'block'); 104 } 105 else{ 106 $sa("#"+modal_id+" .backtoLoginContainer, #"+modal_id+" .u-column2").css("display",'block'); 107 $sa("#"+modal_id+" .u-column1, #"+modal_id+" .signdesc").css("display",'none'); 108 //$sa("#"+modal_id+" #slide_form").css("transform","translateX(-373px)"); 109 } 110 } 111 else if ((def == 'register' && showonly=='') || showonly=='register') { 112 $sa("#"+modal_id+" .u-column1,#"+modal_id+" .signdesc").css("display",'none'); 113 $sa("#"+modal_id+" .u-column2").css("display",'block'); 114 //$sa("#slide_form").css("transform","translateX(-373px)"); 115 } 116 else if ((def == 'register' && showonly=='') || showonly=='register_with_otp') { 117 $sa("#"+modal_id+" .u-column1,#"+modal_id+" .signdesc").css("display",'none'); 118 $sa("#"+modal_id+" .u-column2").css("display",'block'); 119 $sa("#"+modal_id+" .sa_myaccount_btn[name=sa_myaccount_btn_signup]").trigger("click"); 120 //$sa("#slide_form").css("transform","translateX(-373px)"); 121 } 122 else if ((def == 'login' && showonly=='') || showonly=='login') { 123 $sa("#"+modal_id+" .u-column1").css("display",'block'); 124 $sa("#"+modal_id+" .u-column2,#"+modal_id+" .signdesc").css("display",'none'); 125 } 126 127 var display = $this.attr('data-display'); 128 129 $sa("#"+modal_id+".smsalert-modal.smsalertModal").removeClass("from-left from-right"); 130 $sa("#"+modal_id+".smsalert-modal.smsalertModal").addClass(display); 131 132 if(display == 'from-right') { 133 $sa("#"+modal_id+".from-right > .modal-content").animate( 134 { 135 right:'0', 136 opacity:'1', 137 padding: '15px' 138 }, 139 { 140 easing: 'swing', 141 duration: 200, 142 complete: function () { 143 var wc_width = $sa("#"+modal_id+" .smsalert_validate_field").width(); 144 if($sa("#"+modal_id+" #slide_form .u-column1").length==0) { 145 $sa("#"+modal_id+" #slide_form .woocommerce").css({"width":wc_width}); 146 } 147 else 148 { 149 $sa("#"+modal_id+" #slide_form .u-column1, #"+modal_id+" #slide_form .u-column2").css({"width":wc_width}); 150 } 151 } 152 } 153 ); 154 } 155 if(display == 'from-left') { 156 $sa("#"+modal_id+".from-left > .modal-content").animate( 157 { 158 left:'0', 159 opacity:'1', 160 padding: '15px' 161 }, 162 { 163 easing: 'swing', 164 duration: 200, 165 complete: function () { 166 if($sa("#"+modal_id+" #slide_form .u-column1").length==0) { 167 var wc_width = $sa("#"+modal_id+" .smsalert_validate_field").width(); 168 $sa("#"+modal_id+" #slide_form .woocommerce").css({"width":wc_width}); 169 } 170 else 171 { 172 $sa("#"+modal_id+" #slide_form .u-column1, #"+modal_id+" #slide_form .u-column2").css({"width":wc_width}); 173 } 174 } 175 } 176 ); 177 } 178 179 180 181 182 183 184 /* modcontainer.css({ 185 display: "block" 186 }); */ 187 return false 188 } 189 190 191 $sa(document).on( 192 "click", ".smsalert-modal .backtoLogin", function () { 193 var modal_id = $sa(this).parents(".smsalert-modal").attr("id"); 194 $sa("#"+modal_id+" .backtoLoginContainer").css("display",'none'); 195 $sa("#"+modal_id+" .signdesc").css("display",'block'); 196 197 //if($sa("#"+modal_id+".from-left #slide_form").length || $sa("#"+modal_id+".from-right #slide_form").length || $sa("#"+modal_id+".center #slide_form").length){ 198 199 if($sa("#"+modal_id+" #slide_form").length) { 200 201 202 $sa("#"+modal_id+" #slide_form").css("transform","translateX(0)"); 203 $sa("#"+modal_id+" .u-column1, #"+modal_id+" .signdesc").show(); 204 }else{ 205 $sa("#"+modal_id+" .u-column2").css("display",'none'); 206 $sa("#"+modal_id+" .u-column1").css("display",'block'); 207 $sa("#"+modal_id+" .signupbutton").css("display",'block'); 208 } 209 } 210 ); 211 212 $sa(document).on( 213 "click", ".smsalert-modal .signupbutton", function () { 214 215 var modal_id = $sa(this).parents(".smsalert-modal").attr("id"); 216 $sa("#"+modal_id+" .backtoLoginContainer").css("display",'block'); 217 $sa("#"+modal_id+" .signdesc").css("display",'none'); 218 //if($sa("#"+modal_id+".from-left #slide_form").length || $sa("#"+modal_id+".from-right #slide_form").length || $sa("#"+modal_id+".center #slide_form").length){ 219 220 //if($sa("#"+modal_id+" #slide_form").length){ 221 $sa("#"+modal_id+" .u-column2").show(); 222 $sa("#"+modal_id+" .u-column1").css("display",'none'); 223 //$sa("#"+modal_id+" #slide_form").css("transform","translateX(-373px)"); 224 //}else{ 225 226 //$sa("#"+modal_id+" .u-column2").css("display",'block'); 227 //$sa("#"+modal_id+" .u-column1").css("display",'none'); 228 //} 229 } 230 ); 231 } 232); 233 234/* $sa(document).on("click", ".smsalert-login-modal", function(){ 235 236 var modal_id = $sa(this).attr('data-modal-id'); 237 var display = $sa(this).attr('data-display'); 238 239 $sa(".smsalert-modal.smsalertModal").removeClass("from-left from-right"); 240 $sa(".smsalert-modal.smsalertModal").addClass(display); 241 if(display == 'from-right'){ 242 $sa(".from-right > .modal-content").animate({right:'0',opacity:'1'}, 100); 243 } 244 if(display == 'from-left'){ 245 $sa(".from-left > .modal-content").animate({left:'0',opacity:'1'}, 100);; 246 } 247}); */ 248 249$sa(document).on( 250 "click",".from-right > .modal-content > .close,.from-left > .modal-content > .close",function () {
251 $sa(".modal-content").removeAttr("style"); 252 $sa(".smsalert-modal.smsalertModal").hide('slow'); 253 } 254); 255 256$sa('body').click( 257 function (e) { 258 var container = $sa(".modal-content"); 259 if (!container.is(e.target) && container.has(e.target).length === 0) { 260 $sa('.smsalert-modal > .modal-content > .close').trigger('click'); 261 } 262 } 263);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.