var citydata = [] var querylength = 0 var queryparams = "" var urlParams var filterstring = "" var globalDataCount = {} var globalData = [] var windoWidth function showLoaderScreen() { $(".divloader").css("display", "flex").hide().fadeIn(); } function hideLoaderScreen() { $(".divloader").fadeOut(); } windoWidth = $(window).width() $(document).ready(function () { showLoaderScreen() document.location.search.length != 0 ? querylength = 1 : querylength = 0 urlParams = new URLSearchParams(window.location.search); queryparams = window.location.search; $.ajax({ url: "https://rms.rmto.ir/bama-index" + window.location.search, type: "GET", success: function (result) { globalDataCount = result.counts globalData = result.data hideLoaderScreen() checkWindowSize() showFilterBama(queryparams) showcountall(globalDataCount.projects) if (globalData.length != 0) { showcountproject(globalDataCount.projectTypes) status_num(globalDataCount.last_statuses) showprovincefilter(globalDataCount.provinces) axisfilter(globalDataCount.axis_types) showyearfilter(globalDataCount.years) prioritiesfilter(globalDataCount.priorities) followupprioritiesfilter(globalDataCount.followup_priority) } // else { // showFilterNone() // hideLoaderScreen() // } }, error: function (error) { Swal.fire({ icon: "error", title: "خطا سرور", text: "مشکل در دریافت اطلاعات ", confirmButtonText: "بارگذاری مجدد", }).then((result) => { if (result.isConfirmed) { location.reload(true); return true; } }); }, }); }) // data-filter show/hide $(".filter-type").on("click", function () { var dataid = $(this).data('filter'); if ($('.filter-type-' + dataid).css("display") == "none") { $('.filter-type-' + dataid).show(1000) } else { $('.filter-type-' + dataid).hide(1000) } }) //data-filter show/hide function paginatepage() { var width = $(window).width(); if (width < 766) { // $('div.content').removeClass('col-sm-6').addClass('col-sm-12'); } // Number of items and limits the number of items per page var numberOfItems = $("#projectcontent .content").length; var limitPerPage = 6; // Total pages rounded upwards var totalPages = Math.ceil(numberOfItems / limitPerPage); var paginationSize = 7; var currentPage; function showPage(whichPage) { if (whichPage < 1 || whichPage > totalPages) return false; currentPage = whichPage; $("#exampleshowpage .content").hide() .slice((currentPage - 1) * limitPerPage, currentPage * limitPerPage).show(); // Replace the navigation items (not prev/next): $(".pagination li").slice(1, -1).remove(); getPageList(totalPages, currentPage, paginationSize).forEach(item => { $("
(${array[i].count})
(${array[i].count})
(${array[i].count})