https://selegermoor.ch/wp-content/plugins/saferpay_woocommerce_gateway/assets/js/notify.js?ver=2.1.3
1/** 2 * Saferpay PaymentService 3 * 4 * NOTICE OF LICENSE 5 * 6 * Once you have purchased the software with PIT Solutions AG / Six Payment services AG 7 * or one of its authorised resellers and provided that you comply with the conditions of this contract, 8 * PIT Solutions AG and Six Payment services AG grants you a non-exclusive license, 9 * unlimited in time for the usage of the software in the manner of and for the purposes specified in License.txt 10 * available in extension package, according to the subsequent regulations 11 * 12 * DISCLAIMER 13 * 14 * Do not edit or add to this file if you wish to upgrade this extension to 15 * newer versions in the future. 16 * 17 * @category Saferpay 18 * @package Saferpay_PaymentService 19 * @author PIT Solutions Pvt. Ltd. 20 * @copyright Copyright (c) 2020 PIT Solutions AG. (www.pitsolutions.ch) and Six Payment services AG ( https://www.six-payment-services.com/) 21 * @license https://www.webshopextension.com/en/licence-agreement-saferpay 22 * 23 */ 24 25let Notify = { 26 load: false, 27 active: false, 28 visible: false, 29 type: null, 30 ok: null, 31 cancel: null, 32 timer : null, 33 oktext:'OK', 34 canceltext:'cancel', 35 init: function () { 36 37 this.jQuerywrapper = jQuery('<div class="notify-wrapper"><div class="notify-window"><h3></h3><p></p><div class="buttons"><button class="ok">OK</buton><button class="cancel">Cancel</buton></div></div></div>'); 38 jQuery('body').append(this.jQuerywrapper); 39 this.jQuerywindow = jQuery('.notify-window', this.jQuerywrapper); 40 this.load = true; 41 this.bind(); 42 }, 43 reset: function () { 44 jQuery('h3', this.jQuerywindow).hide(); 45 jQuery('p', this.jQuerywindow).hide(); 46 jQuery('.buttons', this.jQuerywindow).hide(); 47 jQuery('button.ok', this.jQuerywindow).hide(); 48 jQuery('button.cancel', this.jQuerywindow).hide(); 49 }, 50 bind: function () { 51 let self = this; 52 53 this.jQuerywrapper.on('click', function (e) { 54 let jQuerytarget = jQuery(e.target); 55 if (jQuerytarget.is('.notify-window') || jQuerytarget.closest('.notify-window').length > 0) { 56 // no action to be done 57 } else { 58 self.hide(); 59 } 60 }); 61 62 63 this.jQuerywrapper.on('click', 'button.ok', function () { 64 if (!self.active) return; 65 self.hide(); 66 if (self.ok) { 67 self.ok(); 68 } 69 }); 70 71 this.jQuerywrapper.on('click', 'button.cancel', function () { 72 if (!self.active) return; 73 self.hide(); 74 if (self.cancel) { 75 self.cancel(); 76 } 77 }); 78 }, 79 alert: function (param) { 80 81 if (typeof (param) === 'string') { 82 this.show({ title: param, type: 'alert' }); 83 } else { 84 param.type = 'alert'; 85 this.show(param); 86 } 87 }, 88 error: function (param) { 89 this.alert(param); 90 }, 91 confirm: function (param) { 92 if (typeof (param) === 'string') { 93 this.show({ title: param, type: 'confirm' }); 94 } else { 95 param.type = 'confirm'; 96 this.show(param); 97 } 98 }, 99 success: function (param) { 100 if (typeof (param) === 'string') { 101 this.show({ title: param, type: 'success' }); 102 } else { 103 param.type = 'success'; 104 this.show(param); 105 } 106 jQuery(".smallLoader").hide(); 107 108 }, 109 suc: function (param) { 110 this.success(param); 111 }, 112 show: function (param) { 113 if (!this.load) { 114 this.init(); 115 } 116 if (this.timer) { 117 clearTimeout(this.timer); 118 } 119 this.reset(); 120 this.jQuerywindow.removeClass('alert confirm success').addClass(param.type); 121 if (param.title) { 122 jQuery('h3', this.jQuerywindow).text(param.title).show(); 123 if (param.type == 'alert') { 124 jQuery('h3', this.jQuerywindow).prepend(jQuery('<i class="fas fa-exclamation-circle" aria-hidden="true">')); 125 } else if (param.type == 'confirm') { 126 jQuery('h3', this.jQuerywindow).prepend(jQuery('<i class="fas fa-question-circle" aria-hidden="true">')); 127 }else if (param.type == 'success') { 128 jQuery('h3', this.jQuerywindow).prepend(jQuery('<i class="fas fa-check" aria-hidden="true">')); 129 } 130 } 131 132 if (param.text) { 133 jQuery('p', this.jQuerywindow).text(param.text).show(); 134 } else if (param.html) { 135 jQuery('p', this.jQuerywindow).html(param.html).show(); 136 } 137 138 if (param.type == 'alert' || param.type == 'confirm' || param.type == 'success') { 139 jQuery('.buttons .ok', this.jQuerywindow).text(param.oktext).show(); 140 if (param.type == 'confirm') { 141 jQuery('.buttons .cancel', this.jQuerywindow).text(param.canceltext).show(); 142 } 143 jQuery('.buttons', this.jQuerywindow).show(); 144 } 145 146 // callback 147 this.ok = null; 148 // focus callback 149 if (param.focus) { 150 this.ok = function () { 151 param.focus.focus(); 152 } 153 } 154 if (param.ok) { 155 this.ok = param.ok; 156 } 157 this.cancel = null; 158 if (param.cancel) { 159 this.cancel = param.cancel; 160 } 161 162 this.jQuerywrapper.show(); 163 let self = this; 164 setTimeout(function () { 165 self.jQuerywrapper.addClass('show'); 166 self.active = true; 167 }, 0); 168 }, 169 hide: function () { 170 this.jQuerywrapper.removeClass('show'); 171 this.active = false; 172 let self = this; 173 this.timer = setTimeout(function () { 174 self.jQuerywrapper.hide(); 175 }, 300); 176 }, 177 top: function () { 178 let top = (jQuery(window).height() - this.jQuerywindow.outerHeight()) / 2; 179 if (top < 0) { 180 top = 0; 181 } 182 this.jQuerywindow.css('top', top); 183 }, 184 loading: function (msg) { 185 if (!msg) return; 186 jQuery.ajaxLoadingMsg = msg; 187 } 188}
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.