clicking below collapse button
This commit is contained in:
parent
0b6e71dd25
commit
a16a8aefe7
@ -40,16 +40,20 @@ function setupVideo(thumb, url) {
|
|||||||
videoHide = document.createElement("img");
|
videoHide = document.createElement("img");
|
||||||
videoHide.src = configRoot + "cc/collapse.gif";
|
videoHide.src = configRoot + "cc/collapse.gif";
|
||||||
videoHide.alt = "[ - ]";
|
videoHide.alt = "[ - ]";
|
||||||
videoHide.title = "Collapse to thumbnail";
|
videoHide.title = "Collapse video";
|
||||||
videoHide.style.verticalAlign = "top";
|
videoHide.style.verticalAlign = "top";
|
||||||
videoHide.style.marginRight = "2px";
|
videoHide.style.marginRight = "2px";
|
||||||
videoHide.addEventListener("click", unexpand, false);
|
|
||||||
|
|
||||||
videoContainer = document.createElement("div");
|
videoContainer = document.createElement("div");
|
||||||
videoContainer.style.whiteSpace = "nowrap";
|
videoContainer.style.whiteSpace = "nowrap";
|
||||||
videoContainer.appendChild(videoHide);
|
videoContainer.appendChild(videoHide);
|
||||||
videoContainer.appendChild(video);
|
videoContainer.appendChild(video);
|
||||||
thumb.parentNode.insertBefore(videoContainer, thumb.nextSibling);
|
thumb.parentNode.insertBefore(videoContainer, thumb.nextSibling);
|
||||||
|
|
||||||
|
// Clicking anywhere in the strip beneath the collapse button collapses the video
|
||||||
|
videoContainer.addEventListener("click", function(e) {
|
||||||
|
if (e.target != video) unexpand();
|
||||||
|
} , false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user