Articles: " + response.coverage.total + " | About casualties: " + response.coverage.casualties + " | Last hour: " + response.coverage.lastHour + "
"); } }); */ } function SetSliderNews() { $(".news_slider").slick({ dots: true, infinite: true, centerMode: false, slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed: 3000, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: true, dots: true } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); $(".more_news").click(function () { var idNews = $(this).data("ref"); $('#' + idNews).css("display", "none") $('#' + idNews + '_hidden').css("display", "block"); }); $(".less_news").click(function () { var idNews = $(this).data("ref"); $('#' + idNews + '_hidden').css("display", "none") $('#' + idNews).css("display", "block"); }); } $(function () { $("#summaryNews").html(""); $("#latestNews").html(""); BuildNewsDetails(); if(!reportHasMaps){ $( "#mapcol2" ).remove(); $( "#mapcol1" ).removeClass("col-lg-6"); $( "#mapcol1" ).addClass("col-lg-12"); map.updateSize(); map.render(); } else { var strMap = ' '; $('#map2').html(strMap); /*$('#map2').html('');*/ $(".maps_slider").slick({ dots: false, infinite: true, centerMode: false, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 3000 }); } if (reportEventtype != "VO") { $("#contentVoWeekly").remove(); /* $("#volcanoDetails").remove();*/ } if (!reportShowSectionDescription) $( "#sectionDescription" ).remove(); if (!reportHasDBNews) { $( "#sectionDBNews" ).remove(); } else { $("#contentDBNews").slick({ dots: true, infinite: true, centerMode: false, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 3000 }); } if (!reportHasDBModeration) { $("#sectionModeration").remove(); } else { $("#contentModeration").slick({ dots: true, infinite: true, centerMode: false, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 3000 }); } if(!reportHasDocs){ $( "#sectionDocuments" ).remove(); } else { $( "#actDocument" ).removeClass("activations_minitabs"); $( "#actDocument" ).addClass("activations_minitabs_sel"); $("#actDocument").html('Analytical products'); } if (reportHasSat) { $( "#actSat" ).removeClass("activations_minitabs"); $( "#actSat" ).addClass("activations_minitabs_sel"); $('#actSat').html('Satellite products'); } if(reportHasVosocc){ $( "#actVosocc" ).removeClass("activations_minitabs"); $( "#actVosocc" ).addClass("activations_minitabs_sel"); $('#actVosocc').html('Vitual OSOCC'); } /*if (reportEventtype != null) { $("#actSat").removeClass("activations_minitabs"); $("#actSat").addClass("activations_minitabs_sel"); $('#actSat').html('Satellite products'); }*/ if(reportHasAssessment){ $( "#actAssessment" ).removeClass("activations_minitabs"); $( "#actAssessment" ).addClass("activations_minitabs_sel"); $('#actAssessment').html('Meteo assessment'); } if (reportEventtype!="EQ"){ $('#sectionPager').hide(); $('#sectionPopGraph').hide(); if (reportEventtype == "TC") { $('#additional_sources').slideUp(); $('#expand_source').on('click',function(){ if ($('#additional_sources').is(":visible")) { $('#additional_sources').slideUp(); $('#icon_expand_source').removeClass("fa-angle-double-up"); $('#icon_expand_source').addClass("fa-angle-double-down"); } else { $('#additional_sources').slideDown(); $('#icon_expand_source').removeClass("fa-angle-double-down"); $('#icon_expand_source').addClass("fa-angle-double-up"); } }); $('#detail_models').on('click', function () { if ($('#additional_sources').is(":visible")) { $('#additional_sources').slideUp(); $('#icon_expand_source').removeClass("fa-angle-double-up"); $('#icon_expand_source').addClass("fa-angle-double-down"); } else { $('#additional_sources').slideDown(); $('#icon_expand_source').removeClass("fa-angle-double-down"); $('#icon_expand_source').addClass("fa-angle-double-up"); } }); } } else{ if (imagePager!='') { $('#pager_EQ').html(''); } else{ $('#sectionPager').hide(); } $('#tableScoreMain').on('click',function(){ if ($('#tableScoreDetail').is(":visible")) { $('#tableScoreDetail').slideUp(); } else { $('#tableScoreDetail').slideDown(); } }); /* $('#tableScoreMain').mouseover(function(){ $('#tableScoreDetail').slideDown(); }); $('#tableScoreMain').mouseout(function(){ $('#tableScoreDetail').slideUp(); }); */ } if (!reportShowAlertBar){ $( "#alertbar" ).remove(); } $(".news_slider").slick({ dots: true, infinite: true, centerMode: false, slidesToShow: 4, slidesToScroll: 1, autoplay: true, autoplaySpeed: 3000, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 3, infinite: true, dots: true } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); $(".more_news").click(function () { var idNews = $(this).data("ref"); $('#'+idNews).css("display","none") $('#'+idNews+'_hidden').css("display","block"); }); $(".less_news").click(function () { var idNews = $(this).data("ref"); $('#'+idNews+'_hidden').css("display","none") $('#'+idNews).css("display","block"); }); // Script for score bar if (reportEventtype=="TC") { reportAlertScoreBar("#alertscorebar",reportAlertscore,reportCurrentAlertscore); } else { reportAlertScoreBar("#alertscorebar", reportAlertscore); if (reportAlertscore == -1) $("#alertscorebar").remove(); } if (reportEventtype == "VO") { earthquakePopBar('containerPopGraph', 'Population near Volcano', jPopLegend, jPopData); } else { earthquakePopBar('containerPopGraph', 'Population near epicenter', jPopLegend, jPopData); } //Function to hide popover when click outside box $('html').on('click', function (e) { if (typeof $(e.target).data('original-title') == 'undefined' && !$(e.target).parents().is('.popover.in')) { $('[data-original-title]').popover('hide'); } }); /* $("#countryInform").mouseover(function (e) { $("#countryInform").popover('toggle'); }); $("#countryInform").popover({ html: true, trigger: 'focus', placement: "right", container: '#containerCountryInform', content: function () { return $('#informcard').html(); } }); */ });