Merge pull request #188 from jonathanKingston/hover-highlight-120

Popup hover and clickable area changes. Fixes #120
This commit is contained in:
luke crouch 2017-02-15 13:50:27 -06:00 committed by GitHub
commit fd9df09107
2 changed files with 11 additions and 4 deletions

View file

@ -118,7 +118,7 @@ table.unstriped tbody tr {
padding-right: 10px; padding-right: 10px;
} }
.container-panel-row:hover .usercontext-icon { .container-panel-row .usercontext-icon:hover {
background-image: url('/img/container-newtab.svg'); background-image: url('/img/container-newtab.svg');
fill: 'gray'; fill: 'gray';
filter: url('/img/filters.svg#fill'); filter: url('/img/filters.svg#fill');
@ -352,6 +352,10 @@ table.unstriped tbody tr {
cursor: pointer; cursor: pointer;
} }
.clickable:hover {
background-color: #ebebeb;
}
.edit-containers-panel-footer a { .edit-containers-panel-footer a {
color: #fff; color: #fff;
} }

View file

@ -230,7 +230,10 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
const arrowClass = hasTabs ? "show-tabs-img" : "no-tabs-img"; const arrowClass = hasTabs ? "show-tabs-img" : "no-tabs-img";
const tr = document.createElement("tr"); const tr = document.createElement("tr");
fragment.appendChild(tr); fragment.appendChild(tr);
tr.classList.add("container-panel-row");
if (hasTabs) {
tr.classList.add("container-panel-row", "clickable"); tr.classList.add("container-panel-row", "clickable");
}
tr.innerHTML = ` tr.innerHTML = `
<td> <td>
<div class="userContext-icon open-newtab" <div class="userContext-icon open-newtab"
@ -238,7 +241,7 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
data-identity-color="${identity.color}"> data-identity-color="${identity.color}">
</div> </div>
</td> </td>
<td class="open-newtab container-name">${identity.name}</td> <td class="container-name">${identity.name}</td>
<td class="show-tabs"><img src="/img/container-arrow.svg" class="show-tabs ${arrowClass}" /></td>`; <td class="show-tabs"><img src="/img/container-arrow.svg" class="show-tabs ${arrowClass}" /></td>`;
tr.addEventListener("click", e => { tr.addEventListener("click", e => {
@ -257,7 +260,7 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
}).catch(() => { }).catch(() => {
window.close(); window.close();
}); });
} else if (hasTabs && e.target.matches(".show-tabs")) { } else if (hasTabs) {
Logic.showPanel(P_CONTAINER_INFO, identity); Logic.showPanel(P_CONTAINER_INFO, identity);
} }
}); });