1 2function SearchController() { 3 var _this = this; 4 5 _this.ajaxType = 7383; 6 7 this.init = function() { 8 jQuery("body").delegate("a.solr-ajaxified", "click", _this.handleClickOnAjaxifiedUri); 9 }; 10 11 this.handleClickOnAjaxifiedUri = function() { 12 var clickedLink = jQuery(this); 13 14 var solrContainer = clickedLink.closest(".tx_solr"); 15 var solrParent = solrContainer.parent(); 16 17 var loader = jQuery("<div class='tx-solr-loader'></div>"); 18 var uri = clickedLink.uri(); 19 20 solrParent.append(loader); 21 uri.addQuery("type", _this.ajaxType); 22 23 jQuery.get( 24 uri.href(), 25 function(data) { 26 solrContainer = solrContainer.replaceWith(data); 27 _this.scrollToTopOfElement(solrParent, 50); 28 jQuery("body").trigger("tx_solr_updated"); 29 loader.fadeOut().remove(); 30 history.replaceState({}, null, uri.removeQuery("type").href()); 31 } 32 ); 33 return false; 34 }; 35 36 this.scrollToTopOfElement = function(element, deltaTop) { 37 jQuery('html, body').animate({ 38 scrollTop: (element.offset().top - deltaTop) + 'px' 39 }, 'slow'); 40 }; 41 42 this.setAjaxType = function(ajaxType) { 43 _this.ajaxType = ajaxType; 44 }; 45} 46 47jQuery(document).ready(function() { 48 var solrSearchController = new SearchController(); 49 // solrSearchController.init(); 50 51 if(typeof solrSearchAjaxType !== "undefined") { 52 // solrSearchController.setAjaxType(solrSearchAjaxType); 53 } 54});
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.