Updated code for image overlay on grid entries

This commit is contained in:
Andreas Stöckel 2011-04-01 12:49:14 +00:00
parent 7de4a37624
commit 151da7e0bd
2 changed files with 28 additions and 13 deletions

View File

@ -1674,12 +1674,18 @@ function egwGridViewRow_doUpdateData(_immediate)
});
overlayCntr.append(icon);
for (var i = 0; i < this.item.iconOverlay.length; i++)
if (this.item.iconOverlay.length > 0)
{
var overlay = $(document.createElement("img"));
overlay.addClass("overlay");
overlay.attr("src", this.item.iconOverlay[i]);
overlayCntr.append(overlay);
var overlayCntr2 = $(document.createElement("span"));
overlayCntr2.addClass("overlayContainer");
for (var i = 0; i < this.item.iconOverlay.length; i++)
{
var overlay = $(document.createElement("img"));
overlay.addClass("overlay");
overlay.attr("src", this.item.iconOverlay[i]);
overlayCntr2.append(overlay);
}
overlayCntr.append(overlayCntr2);
}
icon.addClass("icon");

View File

@ -652,13 +652,29 @@ Preferences tabs
-khtml-user-select: none;
user-select: none;
overflow: visible;
display: inline-block;
}
.egwGridView_grid span.iconOverlayContainer img.overlay {
.egwGridView_grid span.overlayContainer {
position: absolute;
right: -2px;
bottom: -2px;
vertical-align: bottom;
text-align: right;
}
.egwGridView_grid span.iconContainer {
display: inline-block;
padding: 0;
margin: 0;
text-align: center;
}
.egwGridView_grid span.overlayContainer img.overlay {
position: relative;
top: 1px;
margin: 0;
padding: 0;
}
.egwGridView_grid img.icon {
@ -696,13 +712,6 @@ Preferences tabs
background-position: 0 0;
}
.egwGridView_grid span.iconContainer {
display: inline-block;
padding: 0;
margin: 0;
text-align: center;
}
.egwGridView_grid span.caption {
cursor: default;
-moz-user-select: none;