1/** Copyright 2018 Sakis Gkiokas 2 * 3 * This file is part of codwfeeplus module for Prestashop. 4 * 5 * Codwfeeplus is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * Codwfeeplus is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * For any recommendations and/or suggestions please contact me 16 * at [email protected] 17 * 18 * @author Sakis Gkiokas <[email protected]> 19 * @copyright 2018 Sakis Gkiokas 20 * @license https://opensource.org/licenses/GPL-3.0 GNU General Public License version 3 21 */ 22$(document).ready(function () { 23 24 function replace_cart_summary(cod_active) { 25 if (!$("#codwfeeplus_payment_infos").length) { 26 return; 27 } 28 var cart_summary = $("#js-checkout-summary"); 29 var cart_table = $("#order-items"); 30 var _url = $("#codwfeeplus_payment_infos").attr("data-ajaxurl"); 31 var datas = {cod_active: cod_active ? 1 : 0}; 32 $.ajax({
33 type: 'POST', 34 url: _url, 35 data: datas, 36 success: function (data) { 37 if (typeof data !== "undefined") { 38 if (cart_summary.length) { 39 cart_summary.replaceWith(data.preview); 40 } 41 if (cart_table.length) { 42 cart_table.replaceWith(data.table_preview); 43 } 44 } 45 }, 46 error: function (data) { 47 } 48 49 }) 50 } 51 $('input[data-module-name="codwfeeplus"]').on("change", null, function () { 52 replace_cart_summary(true); 53 }); 54 55// $('input[type=radio][name=payment-option]').each(function (index, value) { 56// var lang = $(this).attr('data-lang'); 57// label_arr[lang] = $(this).attr('value'); 58// }); 59// 60 $('input[type=radio][name=payment-option]').on("change", null, function () { 61 if ($('input[data-module-name="codwfeeplus"]').length) { 62 if ($(this).attr('data-module-name') != 'codwfeeplus') { 63 replace_cart_summary(false); 64 } 65 } 66 }); 67// $('input[type="radio"]').on('deselect', function () { 68// alert("DEselected"); 69// }); 70});
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.