* view tab and various other links
*/
window.updateLinks = function (loc, zoom, layers, object) {
$(".geolink").each(function (index, link) {
var href = link.href.split(/[?#]/)[0],
* view tab and various other links
*/
window.updateLinks = function (loc, zoom, layers, object) {
$(".geolink").each(function (index, link) {
var href = link.href.split(/[?#]/)[0],
- args = querystring.parse(link.search.substring(1)),
- editlink = $(link).hasClass("editlink");
+ args = Qs.parse(link.search.substring(1)),
+ editlink = $(link).hasClass("editlink");
- $("#edit_tab")
- .tooltip({ placement: "bottom" })
- .off("click.minzoom")
- .on("click.minzoom", function () { return !editDisabled; })
+ var editTab = $("#edit_tab");
+ editTab
+ // Disable the button group and also the buttons to avoid
+ // inconsistent behaviour when zooming
- .attr("data-original-title", editDisabled ?
- I18n.t("javascripts.site.edit_disabled_tooltip") : "");
+ .find("a")
+ .toggleClass("disabled", editDisabled);
+ var editTooltip = bootstrap.Tooltip.getOrCreateInstance(editTab[0], { placement: "bottom" });
+ if (editDisabled) {
+ editTooltip.enable();
+ } else {
+ editTooltip.disable();
+ }
$("header").children(":visible").each(function (i, e) {
compactWidth = compactWidth + $(e).outerWidth();
});
$("header").children(":visible").each(function (i, e) {
compactWidth = compactWidth + $(e).outerWidth();
});