1var AutoPosters = function() { 2 var self = this; 3 this.listing_id = 0; 4 5 /** 6 * Sending post to the provider handlers 7 * 8 * @param {int} listing_id - Sending listing ID 9 */ 10 this.sendPost = function (listing_id) { 11 self.setID(listing_id); 12 var data = { 13 item: 'getProviders' 14 }; 15 16 self.sendAjax(data, function (providers) { 17 self.providersSendPost(providers); 18 }); 19 }; 20 21 /** 22 * Sending AJAX 23 * 24 * @param {object} data - Sending data 25 * @param {object} callback - Callback function 26 */ 27 this.sendAjax = function (data, callback) { 28 $.post(rlConfig["ajax_url"], data, 29 function(response){ 30 callback(response); 31 }, 'json') 32 }; 33 34 /** 35 * Send post to the wall via provider 36 * @param {array} providers - Array of the active providers 37 */ 38 this.providersSendPost = function(providers) { 39 if (providers) { 40 $.each(providers, function(index, provider) { 41 var data = { 42 item: 'sendListingToProvider', 43 provider: provider, 44 listing_id: self.getID() 45 }; 46 47 self.sendAjax(data, function(response){ 48 49 }); 50 }); 51 } 52 }; 53 54 /** 55 * Listing ID setter 56 * @param {int} id 57 */ 58 this.setID = function (id) { 59 self.listing_id = id; 60 }; 61 62 /** 63 * Listing ID getter 64 * @returns {int} 65 */ 66 this.getID = function () { 67 return self.listing_id; 68 }; 69};
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.