1; 2(function ($, window, document, undefined) { 3 4 $.fn.wc_wishlists_form = function () { 5 var $form = this; 6 7 if ($form.hasClass('variations_form')) { 8 $form.find('.wl-add-to').addClass('disabled'); 9 } 10 11 $form 12 .on('hide_variation', function () { 13 $form.find('.wl-add-to').addClass('disabled'); 14 }) 15 .on('show_variation', function () { 16 $form.find('.wl-add-to').removeClass('disabled'); 17 }); 18 19 20 setTimeout(function () { 21 $form.trigger('check_variations'); 22 }, 50); 23 24 }; 25 26 $(document).on('wc_variation_form', function (e) { 27 var $form = $(e.target); 28 $form.wc_wishlists_form(); 29 }); 30 31})(jQuery, window, document); 32 33 34(function ($) { 35 36 37 jQuery(document).ready(function ($) { 38 var $wlTabs = $("ul.wl-tabs [role='tab']"); 39 40 if ($wlTabs.length) { 41 var selectWlTab = function ($tab, moveFocus) { 42 $wlTabs.each(function () { 43 var isSelected = this === $tab[0]; 44 45 $(this) 46 .attr("aria-selected", isSelected ? "true" : "false") 47 .attr("tabindex", isSelected ? "0" : "-1") 48 .closest("li").toggleClass("active", isSelected); 49 50 $($(this).attr("href")).toggle(isSelected); 51 }); 52 53 if (moveFocus) { 54 $tab.trigger("focus"); 55 } 56 }; 57 58 selectWlTab($wlTabs.first(), false); 59 60 $wlTabs.on("click", function (event) { 61 event.preventDefault(); 62 selectWlTab($(this), false); 63 }); 64 65 $wlTabs.on("keydown", function (event) { 66 var step = event.key === "ArrowRight" ? 1 : (event.key === "ArrowLeft" ? -1 : 0); 67 68 if (!step) { 69 return; 70 } 71 72 event.preventDefault(); 73 74 var index = $wlTabs.index(this); 75 // Wraps in both directions, so the ends of the strip are not 76 // dead stops for a keyboard user. 77 var next = (index + step + $wlTabs.length) % $wlTabs.length; 78 79 selectWlTab($wlTabs.eq(next), true); 80 }); 81 } 82 83 84 85 $('.wlconfirm').click(function () { 86 var message = $(this).data('message'); 87 88 var answer = confirm(message ? message : wishlist_params.are_you_sure); 89 return answer; 90 }); 91
92 $('input[type=checkbox]', '.wl-table thead tr th').click(function () { 93 $(this).closest('table').find(':checkbox').attr('checked', this.checked); 94 }); 95 96 97 $('.share-via-email-button').click(function (event) { 98 var form_id = $(this).data('form'); 99 $('#' + form_id).trigger('submit', []); 100 return true; 101 }); 102 103 104 $('.move-list-sel').change(function (event) { 105 106 $('.move-list-sel').val($(this).val()); 107 108 }); 109 110 $('.btn-apply').click(function (event) { 111 event.preventDefault(); 112 113 $("#wlupdateaction").val('bulk'); 114 $('#wl-items-form').submit(); 115 116 return false; 117 }); 118 119 $('#wleditaction1').change(function () { 120 $('#wleditaction2').val($(this).val()); 121 }); 122 123 $('#wleditaction2').change(function () { 124 $('#wleditaction1').val($(this).val()); 125 }); 126 127 128 $('.wishlist-add-to-cart-button').click(function (e) { 129 e.preventDefault(); 130 const href = ($(this).attr('href')); 131 const qty = $(this).closest('tr').find('input.qty'); 132 const qty_val = (qty && qty.length) ? qty.val() : 1; 133 window.location = href + '&quantity=' + qty_val; 134 return false; 135 }); 136 137 $('.wishlist-add-to-cart-button-view').click(function (e) { 138 e.preventDefault(); 139 140 var href = ($(this).attr('href')); 141 var qty = prompt(wishlist_params.quantity_prompt, $(this).data('qty')); 142 143 if (qty == null || qty == "") { 144 return false; 145 } else { 146 var url = href + '&quantity=' + qty; 147 window.location = url; 148 return false; 149 } 150 151 }); 152 153 154 }); 155 156})(jQuery); 157 158 159(function($){ 160 161 162 163})(jQuery);
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.