1jQuery(function($){ 2 NggAjaxNavigation = { 3 loading_image: null, 4 5 /** 6 * Initializes the AJAX paginators 7 */ 8 init: function(){ 9 var self = this; 10 $('body').on('click', 'a.page-numbers, a.prev, a.next', function(e){ 11 var $this = $(this); 12 var $gallery = $this.parents('.ngg-galleryoverview:first'); 13 var gallery_id= $gallery.attr('id').replace('ngg-gallery-','').replace(/-\d+$/, ''); 14 15 if ($gallery.hasClass('ngg-ajax-pagination-none')) 16 return; 17 18 e.preventDefault(); 19 20 self.toggle_busy(true); 21 22 $.get($this.attr('href'), function(response){ 23 var html = $(response); 24 $gallery.replaceWith(html.find('div[id*="ngg-gallery-'+gallery_id+'"]')); 25 26 // Let the user know that we've refreshed the content 27 $(document).trigger('refreshed'); 28 29 30 }).always(function() { 31 self.toggle_busy(false); 32 }); 33 }); 34 }, 35 36 /** 37 * Gets the querystring parameters for a url 38 * @param url 39 * @return {Object} 40 */ 41 get_querystring_params_from_url: function(url){ 42 var url_params = {}; 43 var url_parts = url.split('?'); 44 if (url_parts.length == 2) { 45 url_parts = url_parts[1].split('&'); 46 for (var key in url_parts) { 47 var param = url_parts[key].split('='); 48 url_params[param[0]] = param.length == 2 ? param[1] : ''; 49 } 50 } 51 return url_params; 52 }, 53 54 55 toggle_busy: function(busy) { 56 $('body, a').css('cursor', busy ? 'wait' : 'auto'); 57 } 58 }; 59 60 NggAjaxNavigation.init(); 61});
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.