<div id="permalink">
<a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a><br/>
<a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a><br/>
- <a href="javascript:void();" id="ReportBug">Report a problem</a>
+ <a href="javascript:void();" id="ReportBug" class="reportProblem">Report a problem</a>
</div>
<div id="attribution">
cookieLifetime : 1000,
cookiePath : "/my/map/",
permalinkURL : "http://www.openstreetmap.org/",
- theme : "/stylesheets/openstreetbugs.css"
+ theme : "/stylesheets/openstreetbugs.css",
+ visibility : false
});
map.addLayer(map.osbLayer);
lBug.addEventListener('click',function (e) {
map.osbControl.activate(); document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "crosshair" },false);
+ map.events.register("zoomend",map,function () { var zoom = map.getZoom(); var lBug = document.getElementById('ReportBug')
+ if (zoom > 11) { lBug.style.visibility = 'visible';} else {lBug.style.visibility = "hidden";}});
+
<% end %>
var marker = feature.createMarker();
marker.feature = feature;
marker.events.register("click", feature, this.markerClick);
- marker.events.register("mouseover", feature, this.markerMouseOver);
- marker.events.register("mouseout", feature, this.markerMouseOut);
+ //marker.events.register("mouseover", feature, this.markerMouseOver);
+ //marker.events.register("mouseout", feature, this.markerMouseOut);
this.addMarker(marker);
this.bugs[id] = feature;
var newContent = document.createElement("div");
el1 = document.createElement("h3");
- el1.appendChild(document.createTextNode(closed ? i18n("javascripts.osb.Fixed Error") : i18n("javascripts.osb.Unresolved Error")));
+ el1.appendChild(document.createTextNode(putAJAXMarker.bugs[id][2] ? i18n("javascripts.osb.Fixed Error") : i18n("javascripts.osb.Unresolved Error")));
el1.appendChild(document.createTextNode(" ["));
el2 = document.createElement("a");
el2.className = (i == 0 ? "osb-description" : "osb-comment");
el2.appendChild(document.createTextNode(putAJAXMarker.bugs[id][1][i]));
el1.appendChild(el2);
+ if (i == 0) { el2 = document.createElement("br"); el1.appendChild(el2);};
}
containerDescription.appendChild(el1);
el1 = document.createElement("p");
el1.className = "osb-fixed";
el2 = document.createElement("em");
- el2.appendChild(document.createTextNode(i18n("javascripts.osb.Has been fixed.")));
+ el2.appendChild(document.createTextNode(i18n("javascripts.osb.Has been fixed")));
el1.appendChild(el2);
containerDescription.appendChild(el1);
}
el1.appendChild(el2);
el2 = document.createElement("dd");
var inputComment = document.createElement("textarea");
- inputComment.setAttribute("cols",40);
+ inputComment.setAttribute("cols",40);
+ inputComment.setAttribute("rows",3);
+
el2.appendChild(inputComment);
el1.appendChild(el2);
el1.className = "buttons";
el2 = document.createElement("li");
el3 = document.createElement("input");
- el3.setAttribute("type", "submit");
+ el3.setAttribute("type", "button");
+ el3.onclick = function(){ this.form.onsubmit(); return false; };
el3.value = i18n("javascripts.osb.Add comment");
el2.appendChild(el3);
el1.appendChild(el2);
newContent.appendChild(el1);
var el_form = document.createElement("form");
- el_form.onsubmit = function() { control.osbLayer.createBug(lonlatApi, inputDescription.value); marker.feature = null; feature.destroy(); return false; };
el1 = document.createElement("dl");
el2 = document.createElement("dt");
el3.appendChild(document.createTextNode(i18n("javascripts.osb.Login")));
el2.appendChild(el3);
el1.appendChild(el2);
+ el2 = document.createElement("br");
+ el1.appendChild(el2);
el2 = document.createElement("dt");
el2.appendChild(document.createTextNode(i18n("javascripts.osb.Bug description")));
el2 = document.createElement("dd");
var inputDescription = document.createElement("textarea");
inputDescription.setAttribute("cols",40);
+ inputDescription.setAttribute("rows",3);
el2.appendChild(inputDescription);
el1.appendChild(el2);
el_form.appendChild(el1);
el1 = document.createElement("div");
el2 = document.createElement("input");
- el2.setAttribute("type", "submit");
+ el2.setAttribute("type", "button");
el2.value = i18n("javascripts.osb.Create");
+ el2.onclick = function() { control.osbLayer.createBug(lonlatApi, inputDescription.value); marker.feature = null; feature.destroy(); return false; };
+ el1.appendChild(el2);
+ el2 = document.createElement("input");
+ el2.setAttribute("type", "button");
+ el2.value = i18n("javascripts.osb.Cancel");
+ el2.onclick = function(){ feature.destroy(); };
el1.appendChild(el2);
el_form.appendChild(el1);
newContent.appendChild(el_form);
+ el2 = document.createElement("hr");
+ el1.appendChild(el2);
+ el2 = document.createElement("a");
+ el2.setAttribute("href","edit");
+ el2.appendChild(document.createTextNode(i18n("javascripts.osb.edityourself")));
+ el1.appendChild(el2);
+
feature.data.popupContentHTML = newContent;
var popup = feature.createPopup(true);
popup.events.register("close", this, function(){ feature.destroy(); });