نتایج جستجو برای: گلابی‌وحشی

تعداد نتایج: 0  

جستجو نتیجه ای نداشت. لطفا عبارت جستجو را بررسی کنید و با عبارت های مشابه دوباره تلاش کنید

نمودار تعداد نتایج جستجو در هر سال

با کلیک روی نمودار نتایج را به سال انتشار فیلتر کنید

function paginate(evt) { url=/search_year_filter/ var term=document.getElementById("search_meta_data").dataset.term pg=parseInt(evt.target.text) var data={ "year":filter_year, "term":term, "pgn":pg } filtered_res=post_and_fetch(data,url) window.scrollTo(0,0); } function update_search_meta(search_meta) { meta_place=document.getElementById("search_meta_data") term=search_meta.term active_pgn=search_meta.pgn num_res=search_meta.num_res num_pages=search_meta.num_pages year=search_meta.year meta_place.dataset.term=term meta_place.dataset.page=active_pgn meta_place.dataset.num_res=num_res meta_place.dataset.num_pages=num_pages meta_place.dataset.year=year document.getElementById("num_result_place").innerHTML=num_res if (year !== "unfilter"){ document.getElementById("year_filter_label").style="display:inline;" document.getElementById("year_filter_place").innerHTML=year }else { document.getElementById("year_filter_label").style="display:none;" document.getElementById("year_filter_place").innerHTML="" } } function update_pagination() { search_meta_place=document.getElementById('search_meta_data') num_pages=search_meta_place.dataset.num_pages; active_pgn=parseInt(search_meta_place.dataset.page); document.getElementById("pgn-ul").innerHTML=""; pgn_html=""; for (i = 1; i <= num_pages; i++){ if (i===active_pgn){ actv="active" }else {actv=""} pgn_li="
  • " +i+ "
  • "; pgn_html+=pgn_li; } document.getElementById("pgn-ul").innerHTML=pgn_html var pgn_links = document.querySelectorAll('.mypgn'); pgn_links.forEach(function(pgn_link) { pgn_link.addEventListener('click', paginate) }) } function post_and_fetch(data,url) { showLoading() xhr = new XMLHttpRequest(); xhr.open('POST', url, true); xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { var resp = xhr.responseText; resp_json=JSON.parse(resp) resp_place = document.getElementById("search_result_div") resp_place.innerHTML = resp_json['results'] search_meta = resp_json['meta'] update_search_meta(search_meta) update_pagination() hideLoading() } }; xhr.send(JSON.stringify(data)); } function unfilter() { url=/search_year_filter/ var term=document.getElementById("search_meta_data").dataset.term var data={ "year":"unfilter", "term":term, "pgn":1 } filtered_res=post_and_fetch(data,url) } function deactivate_all_bars(){ var yrchart = document.querySelectorAll('.ct-bar'); yrchart.forEach(function(bar) { bar.dataset.active = false bar.style = "stroke:#71a3c5;" }) } year_chart.on("created", function() { var yrchart = document.querySelectorAll('.ct-bar'); yrchart.forEach(function(check) { check.addEventListener('click', checkIndex); }) }); function checkIndex(event) { var yrchart = document.querySelectorAll('.ct-bar'); var year_bar = event.target if (year_bar.dataset.active == "true") { unfilter_res = unfilter() year_bar.dataset.active = false year_bar.style = "stroke:#1d2b3699;" } else { deactivate_all_bars() year_bar.dataset.active = true year_bar.style = "stroke:#e56f6f;" filter_year = chart_data['labels'][Array.from(yrchart).indexOf(year_bar)] url=/search_year_filter/ var term=document.getElementById("search_meta_data").dataset.term var data={ "year":filter_year, "term":term, "pgn":1 } filtered_res=post_and_fetch(data,url) } } function showLoading() { document.getElementById("loading").style.display = "block"; setTimeout(hideLoading, 10000); // 10 seconds } function hideLoading() { document.getElementById("loading").style.display = "none"; } -->