1var NewsHelper = new function () { 2 3 this.LoadMainNews = function (languageNews) { 4 $.ajax({ 5 url: "/" + languageNews + "/News/GetLastTreeNews", 6 method: "GET", 7 async: false, 8 data: { lang: languageNews } 9 }).done(function (news) { 10 $.map(news, function (value, index) { 11 var newshref = '"/' + languageNews + '/news/Details?id=' + value.id + '"'; 12 if (index === 0) { 13 $('.select-news').append( 14 '<div class="news__img-container"><img src="' + value.base64 + '"/></div>' + 15 '<div class="news__date">' + value.createDate + '</div>' + 16 '<p class="news__content"><a href=' + newshref + '>' + value.title + '</a></p>' 17 ); 18 } else if (index < 5) { 19 var list_item = ""; 20 var list_block = "news-block-list__item--blue"; 21 if (index === 1) 22 list_item = "news-block-list__date--first"; 23 else if (index === 2 || index === 4) { 24 list_item = "news-block-list__date--second"; 25 list_block = "news-block-list__item--white"; 26 } 27 $('.news-block-list').append('<li class="news-block-list__item ' + list_block + '">' + 28 '<span class="news-block-list__date ' + list_item + '">' + value.createDate + 29 '</span><p class="news-block-list__content"><a href=' + newshref + 30 '>' + value.title + '</a></p></li>' 31 ); 32 } 33 }); 34 }); 35 }; 36 37 $(document).ready(function () { 38 NewsHelper.SearchSubmit(); 39 }); 40 41 this.SearchSubmit = function (backToFirstPage) { 42 if ($('#newsSearchForm').length < 1) 43 return false; 44 45 if (backToFirstPage == true) { } 46 else 47 $(".current-page").val(1); 48 var data = $('#newsSearchForm').serialize(); 49 NewsHelper.GetResult(data); 50 NewsHelper.GetResultCount(data); 51 } 52 53 this.GetResult = function (dataSerialize) { 54 $('#newsResult').addClass('disabledbutton'); 55 CommonHelper.ShowLoader(); 56 $.ajax({
57 url: '/' + languageUI + '/News/Index', 58 method: 'post', 59 data: dataSerialize, 60 async: true 61 }).done(function (output) { 62 $("#newsResult").html(output); 63 CommonHelper.HideLoader(); 64 $('#newsResult').removeClass('disabledbutton'); 65 }); 66 } 67 68 69 this.GetResultCount = function (dataSerialize) { 70 $('#newsResult').addClass('disabledbutton'); 71 CommonHelper.ShowLoader(); 72 $.ajax({ 73 url: '/' + languageUI + '/News/GetResultCount', 74 method: 'post', 75 data: dataSerialize, 76 async: true 77 }).done(function (output) { 78 $('.pagination-news').pagination({ 79 prevText: '<', 80 nextText: '>', 81 currentPage: $('.current-page').val(), 82 items: output, 83 itemsOnPage: 10, 84 cssStyle: 'light-theme', 85 onPageClick: function (pageNumber, event) { 86 $(".current-page").val(pageNumber); 87 NewsHelper.SearchSubmit(true); 88 } 89 }); 90 }); 91 } 92 93}
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.