Commit 5f3f3201 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

submap left panel style is similar to overlays

parent a0809c5e
......@@ -46,13 +46,14 @@ SubmapPanel.prototype.createRow = function(model) {
var openTd = document.createElement("td");
if (model.getId() !== self.getMap().getId()) {
var button = document.createElement("button");
var img = guiUtils.createIcon("icons/search.png");
button.appendChild(img);
button.onclick = function() {
var link = document.createElement("a");
link.href = "#";
link.onclick = function() {
self.getMap().openSubmap(model.getId());
};
openTd.appendChild(button);
link.appendChild(img);
openTd.appendChild(link);
}
result.appendChild(openTd);
......@@ -69,9 +70,11 @@ SubmapPanel.prototype.createTableHeader = function() {
nameTd.innerHTML = "Name";
row.appendChild(nameTd);
var viewTd = document.createElement("th");
viewTd.innerHTML = "View";
row.appendChild(viewTd);
row.appendChild(Functions.createElement({
type : "th",
style : "width: 60px;",
content : "View"
}));
result.appendChild(row);
return result;
......@@ -125,10 +128,14 @@ SubmapPanel.prototype.createTable = function(models, type) {
result.appendChild(table);
table.appendChild(self.createTableHeader());
var tableBody = Functions.createElement({
type : "tbody",
});
table.appendChild(tableBody);
for (var i = 0; i < models.length; i++) {
table.appendChild(self.createRow(models[i]));
tableBody.appendChild(self.createRow(models[i]));
}
return result;
};
......
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