1/** 2 * Copyright since 2007 PrestaShop SA and Contributors 3 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 4 * 5 * NOTICE OF LICENSE 6 * 7 * This source file is subject to the Academic Free License version 3.0 8 * that is bundled with this package in the file LICENSE.md. 9 * It is also available through the world-wide-web at this URL: 10 * https://opensource.org/licenses/AFL-3.0 11 * If you did not receive a copy of the license and are unable to 12 * obtain it through the world-wide-web, please send an email 13 * to [email protected] so we can send you a copy immediately. 14 * 15 * @author SeQura Tech <[email protected]> 16 * @copyright Since 2013 SeQura WorldWide SA and Contributors 17 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 18 */ 19SequraIdentificationPopupLoader = { 20 url: '', 21 loadForm: function () { 22 var params = { 23 ajax:true, 24 random:Math.random(), 25 }; 26 if(this.product){ 27 params.product = this.product; 28 } 29 if(this.campaign){ 30 params.campaign = this.campaign; 31 } 32 jQuery.ajax({ 33 context: this, 34 url: this.url, 35 data: params, 36 method: 'POST', 37 beforeSend: function (xhr) { 38 this.showLoadingAnimation() 39 }, 40 success: this.loadFormsuccess, 41 error: function () { 42 alert("Lo sentimos, método de pago no disponible. Por favor, seleccione otro."); 43 } 44 }); 45 }, 46 loadFormsuccess: function (response) { 47 jQuery('#sq-identification-' + this.product).remove(); 48 jQuery('body').append(response); 49 this.showFor(this.product); 50 }, 51 showForm: function () { 52 this.removeForm(); 53 this.loadForm(); 54 }, 55 showFor: function () { 56 if (window.SequraFormInstance) { 57 var self = this; 58 window.SequraFormInstance.setCloseCallback(function(){ 59 if(typeof hide_progress === "function"){ 60 hide_progress(); 61 } 62 if(typeof self.closeCallback === "function"){ 63 self.closeCallback(); 64 } 65 window.SequraFormInstance.defaultCloseCallback(); 66 }); 67 window.SequraFormInstance.setElement("sq-identification-" + this.product); 68 window.SequraFormInstance.show(); 69 this.hideLoadingAnimation(); 70 } else { 71 var context = this; 72 window.setTimeout(function () { 73 context.showFor() 74 }, 100); 75 } 76 }, 77 removeForm: function () { 78 jQuery('#sq-identification-' + this.product).remove(); 79 }, 80 81 opcShowForm: function (url , product, campaign) { 82 SequraIdentificationPopupLoader.url = url; 83 SequraIdentificationPopupLoader.product = product; 84 SequraIdentificationPopupLoader.campaign = campaign; 85 SequraIdentificationPopupLoader.closeCallback = function() { 86 window.location.reload(); 87 }; 88 SequraIdentificationPopupLoader.showForm(); 89 }, 90 91 showLoadingAnimation: function(){ 92 jQuery('body').append('<div id="lds-sequra-container"><div><div class="lds-sequra"><div></div><div></div><div></div></div></div></div>'); 93 }, 94 95 hideLoadingAnimation: function(){ 96 jQuery('#lds-sequra-container').remove(); 97 } 98};
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.