1intelli.common = function() 2{ 3 var dialog = null; 4 5 return { 6 init: function() 7 { 8 }, 9 10 reportBrokenListing: function(id) 11 { 12 if (confirm(intelli.lang.do_you_want_report_broken)) 13 { 14 $.get("ajax.php", {action: 'report', id: id}, function(data) 15 { 16 alert(intelli.lang.broken_report_sent); 17 }); 18 } 19 20 return false; 21 }, 22 23 actionFavorites: function(listing_id, account_id, action) 24 { 25 var msg = ('add' == action) ? intelli.lang.add_favorite : intelli.lang.remove_favorite; 26 27 if (confirm(msg)) 28 { 29 $.post("ajax.php", { action: 'favorites', account_id: account_id, listing_id: listing_id, trigger: action}, function(data) 30 { 31 window.location.href = window.location.href; 32 }); 33 } 34 35 return false; 36 }, 37 38 moveListing: function(id, cat) 39 { 40 var html = ''; 41 var idLink = id; 42 43 if (!confirm(intelli.lang.listing_move_confirmation)) 44 { 45 return false; 46 } 47 48 $("tr[class='tree']").remove(); 49 50 html += '<tr class="tree"><td>'; 51 html += '<fieldset style="collapsible"><legend><span id="change_category_text">'+ intelli.lang.move_listing +'</span></legend>'; 52 html += '<div id="tree"></div>'; 53 html += '</fieldset>'; 54 html += '</td></tr>'; 55 56 $('#tdlisting' + idLink).parent().after(html); 57 58 var moveTree = new intelli.tree({ 59 id: 'tree', 60 type: 'radio', 61 state: cat, 62 expanded: '0', 63 hideRoot: false, 64 callback: function() 65 { 66 if (!confirm(intelli.lang.listing_fin_move_confirmation)) 67 { 68 return false; 69 } 70 71 var idCat = $(this).attr('id').split('_')[2]; 72 73 $.get('ajax.php', {action: 'moving', idcat: idCat, idlink: idLink}, function(data) 74 { 75 $('#tree').html(data); 76 $('#tdlisting' + idLink).parent().remove(); 77 }); 78 } 79 }); 80 81 moveTree.init(); 82 }, 83 84 deleteListing: function(listing) 85 { 86 if (confirm(intelli.lang.do_you_want_delete_listing)) 87 { 88 $.post("edit-account.php", {listing: listing, delete_listing: 1}, function(data) 89 { 90 $('#tdlisting' + listing).parent('tr').remove(); 91 92 alert(data); 93 }); 94 } 95 }, 96 97 toggleFieldset: function (fieldset) 98 { 99 var content; 100 if ($(fieldset).is('.collapsed')) 101 { 102 content = $('> div', fieldset).hide(); 103 104 $(fieldset).removeClass('collapsed'); 105 106 content.slideDown(300, function() 107 { 108 // Make sure we open to height auto 109 $(this).css('height', 'auto'); 110 }); 111 } 112 else 113 { 114 $('> div', fieldset).slideUp('medium', function() 115 { 116 $(this.parentNode).addClass('collapsed'); 117 }); 118 } 119 } 120 } 121}();
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.