1 2$(function () { 3 //$('.pagination-consulting').bootpag({ 4 // total: $(".total-pages").val(), 5 // page: $(".current-page").val(), 6 // maxVisible: 10, 7 // leaps: true, 8 // firstLastUse: true 9 //}).on('page', function (event, num) { 10 // window.location.href = '/' + languageUI + '/Consulting/Index?page=' + num; 11 //}); 12 13 $('.pagination-journal').pagination({ 14 prevText: '<', 15 nextText: '>', 16 currentPage: $(".current-page").val(), 17 items: $(".total").val(), 18 itemsOnPage: 10, 19 cssStyle: 'light-theme', 20 onPageClick: function (pageNumber, event) { 21 $(".current-page").val(pageNumber); 22 JournalHelper.SearchSubmit(); 23 //window.location.href = '/' + languageUI + '/Consulting/Index?page=' + pageNumber; 24 } 25 }); 26}); 27 28var JournalHelper = new function () { 29 this.SearchSubmit = function (backToFirstPage) { 30 if ($('#journalSearchForm').length < 1) 31 return false; 32 33 if (backToFirstPage == true) { } 34 else 35 $(".current-page").val(1); 36 var data = $('#journalSearchForm').serialize(); 37 JournalHelper.GetResult(data); 38 JournalHelper.GetFilter(data); 39 JournalHelper.GetResultCount(data); 40 //window.location.href = '/' + languageUI + '/Consulting/Index?' + data; 41 } 42 43 this.GetResult = function (dataSerialize) { 44 45 $('#journalResult').addClass('disabledbutton'); 46 CommonHelper.ShowLoader(); 47 $.ajax({
48 url: '/' + languageUI + '/Journal/Index', 49 method: 'post', 50 data: dataSerialize, 51 async: true 52 }).done(function (output) { 53 $("#journalResult").html(output); 54 CommonHelper.HideLoader(); 55 DocumentHelper.SortClick(); 56 $('#journalResult').removeClass('disabledbutton'); 57 }); 58 } 59 60 this.GetFilter = function (dataSerialize) { 61 $('.filter-container').addClass('disabledbutton'); 62 $("#filterLoader").show(); 63 $.ajax({ 64 url: '/' + languageUI + '/Journal/GetFilters', 65 method: 'post', 66 data: dataSerialize 67 }).done(function (themes) { 68 JournalHelper.InitFilter(themes, 'journal-filters', 'theme', ''); 69 70 $(".isRewriteFilterPanel").val("false"); 71 // $(".filter-container").html(output); 72 73 $('.i-checks').iCheck({ 74 checkboxClass: 'icheckbox_square-green', 75 radioClass: 'iradio_square-green', 76 }); 77 78 //TODO: ÑоÑÑиÑовка поÑле ÑезÑлÑÑаÑа 79 CommonHelper.CheckOnSelect('check-theme', 'selectedThemes', 'unselectedThemes', true, true, JournalHelper.SearchSubmit, JournalHelper.GetFilter); 80 $("#filterLoader").hide(); 81 $('.filter-container').removeClass('disabledbutton'); 82 }); 83 } 84 85 this.GetResultCount = function (dataSerialize) { 86 $('#journalResult').addClass('disabledbutton'); 87 CommonHelper.ShowLoader(); 88 $.ajax({
89 url: '/' + languageUI + '/Journal/GetResultCount', 90 method: 'post', 91 data: dataSerialize, 92 async: true 93 }).done(function (output) { 94 $('.pagination-journal').pagination({ 95 prevText: '<', 96 nextText: '>', 97 currentPage: $('.current-page').val(), 98 items: output, 99 itemsOnPage: 10, 100 cssStyle: 'light-theme', 101 onPageClick: function (pageNumber, event) { 102 $(".current-page").val(pageNumber); 103 JournalHelper.SearchSubmit(true); 104 } 105 }); 106 }); 107 } 108 109 this.Search = function () { 110 var total = 0; 111 112 if ($(".form-search-journal").length < 1) 113 return false; 114 CommonHelper.ShowLoader(); 115 var formData = $(".form-search-journal").serialize(); 116 //console.log(formData) 117 $.ajax({ 118 url: '/' + languageUI + '/Journal/GetResultCount', 119 method: 'post', 120 data: formData 121 }).done(function (output) { 122 total = output; 123 }); 124 $.ajax({
125 url: '/' + languageUI + '/Journal/Index', 126 method: 'post', 127 data: formData 128 }).done(function (output) { 129 //console.log(index) 130 $("#journalResult").html(output); 131 CommonHelper.HideLoader(); 132 $('.pagination-journal').pagination({ 133 prevText: '<', 134 nextText: '>', 135 currentPage: $('.current-page').val(), 136 items: total, 137 itemsOnPage: 10, 138 cssStyle: 'light-theme', 139 onPageClick: function (pageNumber, event) { 140 $(".current-page").val(pageNumber); 141 JournalHelper.Search(); 142 } 143 }); 144 }); 145 return false; 146 } 147 148 this.InitFilter = function (items, containerClassName, itemClassName, unSelectedItems) { 149 var unArr = (unSelectedItems != null && unSelectedItems != "") ? unSelectedItems.split(',') : []; 150 151 var isRewrite = $(".isRewriteFilterPanel").val(); 152 if (isRewrite == "true") { 153 $("." + containerClassName).html(""); 154 } 155 else { 156 $("." + containerClassName).find("span[class*=-count-]").html("0"); 157 } 158 159 $.each(items, function (index, item) { 160 var $countItem = $("." + containerClassName).find(".check-" + itemClassName + "-count-" + item.id); 161 162 if ($countItem.length > 0) { 163 $countItem.html(item.count); 164 } 165 else { 166 //checked 167 var _checked = ""; 168 var ischecked = $.grep(unArr, function (row) { return row == item.code; }); 169 if (unArr.length > 0 && ischecked.length > 0) 170 _checked = ""; 171 172 $("." + containerClassName).append('<label><input type="checkbox" value="' + item.id + '" class="i-checks check-' + itemClassName + '" ' + _checked + ' /> ' + item.name + ' (<span class="check-' + itemClassName + '-count-' + item.id + '">' + item.count + '</span>)</label><br />'); 173 } 174 }); 175 } 176 177 this.InitSort = function (type) { 178 //console.log(type) 179 if (!type) 180 return 181 182 $("#journalSortInput").val(type); 183 JournalHelper.SearchSubmit(); 184 } 185}
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.