Commit 6fc2f18c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

clear button moved from custommap

parent bb88002a
......@@ -288,26 +288,6 @@ CustomMap.prototype.createMapMenu = function() {
})();
this.divBelt.appendChild(submenuButtonDiv2);
}
var rightHeaderMenu = document.createElement('div');
rightHeaderMenu.className = "rightHeaderMenu";
var submenuButtonDiv = document.createElement('button');
submenuButtonDiv.id = "clear_button";
submenuButtonDiv.className = "overview_button";
submenuButtonDiv.innerHTML = "<i class='fa fa-times' style='font-size:18px; font-weight:300; padding-right:10px;'></i> CLEAR";
submenuButtonDiv.title = "Clear all queries";
submenuButtonDiv.style.display = 'inline';
submenuButtonDiv.onclick = (function() {
return function() {
selfMap.clearData();
return false;
};
})();
rightHeaderMenu.appendChild(submenuButtonDiv);
this.divBelt.appendChild(rightHeaderMenu);
};
CustomMap.prototype.registerSource = function(overlayCollection) {
......
......@@ -283,7 +283,16 @@ function create(params) {
return false;
};
})();
var clearButton = document.getElementsByName("clearButton")[0];
clearButton.onclick = (function() {
return function() {
result.clearData();
return false;
};
})();
if (ServerConnector.getSessionData().getShowComments()) {
result.getControl(ControlType.COMMENT_CHECKBOX).checked=true;
return result.refreshComments();
......
......@@ -61,6 +61,10 @@ Helper.prototype.createMenuDiv = function() {
refreshCommentButton.setAttribute("name", "refreshCommentButton");
result.appendChild(refreshCommentButton);
var clearButton = document.createElement("button");
clearButton.setAttribute("name", "clearButton");
result.appendChild(clearButton);
return result;
};
......
......@@ -134,6 +134,10 @@ function initMap(){
<i class='fa fa-refresh' style='font-size:21px; font-weight:400;'></i>
</button>
</div>
<button name="clearButton" class="overview_button" title="Clear all queries">
<i class='fa fa-times' style='font-size:18px; font-weight:300; padding-right:10px;'></i>
CLEAR
</button>
</div>
</div>
<div id="mapElement" class="mapClass"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment