Skip to content

Commit

Permalink
path correto pra plots modelogro DRS e municípios. Fix #83
Browse files Browse the repository at this point in the history
  • Loading branch information
renatocoutinho committed Jun 4, 2020
1 parent 36f4375 commit fc59024
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions js/lib_locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,35 +279,56 @@ function updatePage(current_uf) {
// placeholders
if ($(".placeholder_svg").length) {
$(".codegena_iframe:not(.responsive_iframe)").each(function () {
var new_src = "./web/" + folder_mun + basename($(this).attr("data-src"));
if ($(this).hasClass("hospt"))
var new_src = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("data-src"));
else
var new_src = "./web/" + folder_mun + basename($(this).attr("data-src"));
$(this).attr("data-src", new_src);
})
$(".placeholder_svg").each(function () {
var new_svg = "./web/" + folder_mun + basename($(this).attr("src"));
if ($(this).hasClass("hospt"))
var new_svg = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("src"));
else
var new_svg = "./web/" + folder_mun + basename($(this).attr("src"));
$(this).attr("src", new_svg);
})
$("source[media='(max-width: 575.98px)']").each(function () {
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
if ($(this).hasClass("hospt"))
var new_src = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("srcset"));
else
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
$(this).attr("srcset", new_src);
})
$("source[media='(max-width: 767.98px)']").each(function () {
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
if ($(this).hasClass("hospt"))
var new_src = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("srcset"));
else
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
$(this).attr("srcset", new_src);
})
$("source[media='(max-width: 991.98px)']").each(function () {
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
if ($(this).hasClass("hospt"))
var new_src = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("srcset"));
else
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
$(this).attr("srcset", new_src);
})
$("source[media='(max-width: 1199.98px)']").each(function () {
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
if ($(this).hasClass("hospt"))
var new_src = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("srcset"));
else
var new_src = "./web/" + folder_mun + basename($(this).attr("srcset"));
$(this).attr("srcset", new_src);
})
}

// widget interativo
if ($(".responsive_iframe").length) {
$(".responsive_iframe > iframe").each(function () {
var new_src = "./web/" + folder_mun + basename($(this).attr("src"));
if ($(this).hasClass("hospt"))
var new_src = "./web/projecao_leitos/" + folder_mun + basename($(this).attr("src"));
else
var new_src = "./web/" + folder_mun + basename($(this).attr("src"));
$(this).attr("src", new_src);
})
}
Expand Down Expand Up @@ -343,4 +364,4 @@ function updatePage(current_uf) {
}

}
}
}

0 comments on commit fc59024

Please sign in to comment.