Skip to content
Snippets Groups Projects
Commit 8b674e9c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '165-lef-panel-table-style-between-tabs' into 'master'

submap left panel style is similar to overlays

Closes #165

See merge request !84
parents a0809c5e 5f3f3201
No related branches found
No related tags found
1 merge request!84submap left panel style is similar to overlays
......@@ -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;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment