From 243c4c486ca20ed56531e0bbc74e35a70ed94ed2 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 12 Feb 2013 16:55:00 +0530 Subject: [PATCH] update css & js --- static/css/videopdf.css | 8 ++++++-- static/videoOverlay.js | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/static/css/videopdf.css b/static/css/videopdf.css index 719f637..6b51199 100644 --- a/static/css/videopdf.css +++ b/static/css/videopdf.css @@ -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; +} diff --git a/static/videoOverlay.js b/static/videoOverlay.js index a6af509..444f0d8 100644 --- a/static/videoOverlay.js +++ b/static/videoOverlay.js @@ -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');