1(function ($) { 2 $(document).ready(function () { 3 $('body').on('click', '.mark_sold', function (e) { 4 e.preventDefault(); 5 var _this = $(this); 6 var listingID = $(this).attr('data-listing-id'); 7 var actionType = $(this).attr('data-action'); 8 // Post via AJAX 9 var data = { 10 'action': 'mas_user_dashboard_action', 11 'post_id': listingID, 12 'action_type': actionType, 13 }; 14 $.post(mas_main_js.ajaxurl, data, function (response) { 15 $('.mark_sold').after('<span class="directorist-mas-notifier">' + response['message'] + '</span>'); 16 if(response['action_response'] === 'marked'){ 17 $(_this).addClass('directorist-mas-checked'); 18 }else if(response['action_response'] === 'unmarked'){ 19 $(_this).removeClass('directorist-mas-checked'); 20 } 21 }, 'json'); 22 setTimeout(function () { 23 $('.directorist-mas-notifier').fadeOut().remove(); 24 }, 2000); 25 26 if(actionType == "sold"){ 27 $(this).parent('.directorist-dropdown-menu__list').find('.directorist-checkbox-absent-input').removeClass('directorist-mas-checked'); 28 } 29 30 }); 31 32 $('body').on('click', '.mark_negotiate', function (e) { 33 e.preventDefault(); 34 var _this = $(this); 35 var listingID = $(this).attr('data-listing-id'); 36 var actionType = $(this).attr('data-action'); 37 // Post via AJAX 38 var data = { 39 'action': 'mas_user_dashboard_action', 40 'post_id': listingID, 41 'action_type': actionType, 42 }; 43 $.post(mas_main_js.ajaxurl, data, function (response) { 44 $('.mark_negotiate').after('<span class="directorist-mas-notifier">' + response['message'] + '</span>'); 45 if(response['action_response'] === 'marked'){ 46 $(_this).addClass('directorist-mas-checked'); 47 }else if(response['action_response'] === 'unmarked'){ 48 $(_this).removeClass('directorist-mas-checked'); 49 } 50 }, 'json'); 51 setTimeout(function () { 52 $('.directorist-mas-notifier').fadeOut().remove(); 53 }, 2000); 54 if(actionType == "negotiate"){ 55 $(this).parent('.directorist-dropdown-menu__list').find('.directorist-checkbox-absent-input').removeClass('directorist-mas-checked'); 56 $(this).addClass('directorist-mas-checked'); 57 } 58 59 }); 60 }); 61})(jQuery); 62
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.