1ACC.close = { 2 _autoload: [ 3 ["bindCloseAccountModalButtons", $(".js-close-account-popup-button").length != 0], 4 ["bindCloseAccountButton", $(".js-close-account-popup-button").length != 0] 5 ], 6 7 bindCloseAccountModalButtons: function () { 8 $('.js-close-account-popup-button').click(function (event) { 9 event.preventDefault(); 10 var popupTitle = $('.js-close-account-popup-button').data("popupTitle"); 11 var popupTitleHtml = ACC.common.encodeHtml(popupTitle); 12 ACC.colorbox.open(popupTitleHtml, { 13 inline: true, 14 href: "#popup_confirm_account_removal", 15 className: "js-close-account-popup", 16 width: '500px', 17 onComplete: function () { 18 $(this).colorbox.resize(); 19 } 20 }) 21 }); 22 }, 23 24 bindCloseAccountButton: function () { 25 $(document).on("click", '.js-close-account-action', function (event) { 26 event.preventDefault(); 27 var url = ACC.config.encodedContextPath + '/my-account/close-account'; 28 $.ajax({ 29 url: url, 30 type: 'POST', 31 success: function (response) { 32 ACC.colorbox.close(); 33 var url = ACC.config.encodedContextPath + '/logout?closeAcc=true' 34 window.location.replace(url); 35 }, 36 error: function (jqXHR, textStatus, errorThrown) { 37 console.log("Failed to close account. Error: [" + errorThrown + "]"); 38 window.location.reload(); 39 } 40 }); 41 }); 42 } 43};
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.