fix display of list items

This commit is contained in:
Ziad-I
2024-07-28 22:01:13 +03:00
parent ec3dc71c0e
commit 2538c47d01
3 changed files with 10 additions and 5 deletions
@@ -223,6 +223,10 @@ nav ul li a.active {
overflow: auto; overflow: auto;
} }
li.svg-name {
list-style-type: none;
}
#dropdown-menu:focus { #dropdown-menu:focus {
outline: none; outline: none;
} }
@@ -110,10 +110,11 @@ function displayDrawingsNames() {
drawings = allDrawings[ifcFile].drawings; drawings = allDrawings[ifcFile].drawings;
sheets = allDrawings[ifcFile].sheets; sheets = allDrawings[ifcFile].sheets;
function createLabel(text, index, type) { function createSvgNames(text, index, type) {
var label = $("<li></lio>") var label = $("<li></lio>")
.text(text) .text(text)
.attr("id", index) .attr("id", index)
.addClass("svg-name")
.click(function () { .click(function () {
console.log("ID:", $(this).attr("id"), "Name:", text); console.log("ID:", $(this).attr("id"), "Name:", text);
}); });
@@ -123,11 +124,11 @@ function displayDrawingsNames() {
} }
drawings.forEach(function (drawing, index) { drawings.forEach(function (drawing, index) {
createLabel(drawing.name, index, "drawing"); createSvgNames(drawing.name, index, "drawing");
}); });
sheets.forEach(function (sheet, index) { sheets.forEach(function (sheet, index) {
createLabel(sheet.name, index, "sheet"); createSvgNames(sheet.name, index, "sheet");
}); });
} }
@@ -77,9 +77,9 @@
<div id="collapseOne" class="collapse show"> <div id="collapseOne" class="collapse show">
<div class="card-body"> <div class="card-body">
<div class="sub-panel pl-2" id="drawings-sub-panel"> <ul class="sub-panel pl-2" id="drawings-sub-panel">
<!-- Drawings will be dynamically populated here --> <!-- Drawings will be dynamically populated here -->
</div> </ul>
</div> </div>
</div> </div>
</div> </div>