1jQuery(document).ready(function($) { 2 3 // Set up paging 4 if ($.morepager) { 5 $('.MorePager').not('.Message .MorePager').morepager({ 6 pageContainerSelector: 'ul.Discussions:last, ul.Drafts:last', 7 afterPageLoaded: function() { 8 $(document).trigger('DiscussionPagingComplete'); 9 } 10 }); 11 } 12 13 if ($('.AdminCheck :checkbox').not(':checked').length == 1) { 14 $('.AdminCheck [name="Toggle"]').prop('checked', true).change(); 15 } 16 17 /* Discussion Checkboxes */ 18 $('.AdminCheck [name="Toggle"]').click(function() { 19 if ($(this).prop('checked')) { 20 $('.DataList .AdminCheck :checkbox, tbody .AdminCheck :checkbox').prop('checked', true).change(); 21 } else { 22 $('.DataList .AdminCheck :checkbox, tbody .AdminCheck :checkbox').prop('checked', false).change(); 23 } 24 }); 25 $('.AdminCheck :checkbox').click(function() { 26 // retrieve all checked ids 27 var checkIDs = $('.DataList .AdminCheck :checkbox, tbody .AdminCheck :checkbox'); 28 var aCheckIDs = new Array(); 29 checkIDs.each(function() { 30 checkID = $(this); 31 32 // jQuery 1.9 removed the old behaviour of checkID.attr('checked') when 33 // checking for boolean checked value. It now returns undefined. The 34 // correct method to check boolean checked is with checkID.prop('checked'); 35 // Vanilla would either return the string 'checked' or '', so make 36 // sure same return values are generated. 37 aCheckIDs[aCheckIDs.length] = { 38 'checkId': checkID.val(), 39 'checked': checkID.prop('checked') || '' // originally just, wrong: checkID.attr('checked') 40 }; 41 }); 42 $.ajax({ 43 type: "POST", 44 url: gdn.url('/moderation/checkeddiscussions'), 45 data: {'CheckIDs': aCheckIDs, 'DeliveryMethod': 'JSON', 'TransientKey': gdn.definition('TransientKey')}, 46 dataType: "json", 47 error: function(XMLHttpRequest, textStatus, errorThrown) { 48 gdn.informMessage(XMLHttpRequest.responseText, {'CssClass': 'Dismissable'}); 49 }, 50 success: function(json) { 51 gdn.inform(json); 52 } 53 }); 54 }); 55 56});
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.