update css & js

This commit is contained in:
rolux 2013-02-12 16:55:00 +05:30
parent d92080fcc8
commit 243c4c486c
2 changed files with 9 additions and 3 deletions

View File

@ -7,18 +7,22 @@
border-radius: 16px;
background-color: rgba(0, 0, 0, 0.5);
box-shadow: 0 0 2px rgb(0, 0, 0);
cursor: pointer;
}
.playButton {
.button.playButton {
left: 0;
top: 0;
right: 0;
bottom: 0;
margin: auto;
}
.editButton {
.button.editButton {
right: 8px;
bottom: 8px;
}
.interface {
position: absolute;
}
.interface.video {
cursor: pointer;
}

View File

@ -12,12 +12,12 @@ function getVideoOverlay(page) {
var id = this.counter;
if (editable || videoOverlay[page][id]) {
var div = document.createElement('div');
div.className = 'interface';
div.style.left = image.left + 'px';
div.style.top = image.top + 'px';
div.style.width = image.width + 'px';
div.style.height = image.height + 'px';
if (videoOverlay[page] && videoOverlay[page][id]) {
div.className = 'interface video';
div.title = 'Click to Play';
div.onclick = function(event) {
event.preventDefault();
@ -29,6 +29,8 @@ function getVideoOverlay(page) {
img.className = 'button playButton';
img.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2Ij48cG9seWdvbiBwb2ludHM9IjU2LDMyIDI0OCwxMjggNTYsMjI0IiBmaWxsPSIjRkZGRkZGIi8+PC9zdmc+PCEtLXsiY29sb3IiOiJ2aWRlbyIsIm5hbWUiOiJzeW1ib2xQbGF5IiwidGhlbWUiOiJveGRhcmsifS0tPg==';
div.appendChild(img);
} else {
div.className = 'interface';
}
if (editable) {
var img = document.createElement('img');