From: ScottDowne Date: Mon, 5 Jul 2010 17:59:20 +0000 (-0400) Subject: colour overlay on divs X-Git-Tag: v0.1~42^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d5c649b9cd4e447bfbf5478b2addb198ddf4c6de;p=popcorn-js.git colour overlay on divs --- diff --git a/index.html b/index.html index 4d0adbd..b4125a7 100644 --- a/index.html +++ b/index.html @@ -138,7 +138,7 @@

Twitter Updates  

Collapse -
+
@@ -149,7 +149,7 @@

Flickr Images  

Collapse -
+
@@ -173,7 +173,7 @@

Twitter

Collapse -
+
@@ -183,22 +183,18 @@

Wikipedia

Collapse -
-
- -
-

Google News -

-
-
-
+
+ +
+

Google News +

+
+

This video's copyright information

-
- Attribution -
+
diff --git a/popcorn.js b/popcorn.js index 01a6a2f..de9ce59 100644 --- a/popcorn.js +++ b/popcorn.js @@ -45,6 +45,13 @@ commandObject = manager.commandObjects[i]; if (commandObject.running && (commandObject.params["in"] > t || commandObject.params["out"] < t)) { commandObject.running = false; + + + if (VideoCommand.active[commandObject.params.target] <= 0 || --VideoCommand.active[commandObject.params.target] <= 0) { + $("#" + commandObject.params.target + " .inactive").fadeIn(500); + } + + commandObject.onOut(); commandObject.removeOverlay(); } @@ -59,7 +66,14 @@ } if (!commandObject.running && commandObject.params["in"] < t && commandObject.params["out"] > t) { commandObject.running = true; - if (typeof commandObject.flash=="undefined") { + + $("#" + commandObject.params.target + " .inactive").hide(); + VideoCommand.active[commandObject.params.target]++; + + if (commandObject.params.target) { + $("#" + commandObject.params.target + " .overlay").show().fadeOut(500); + } + if (typeof commandObject.flash == "undefined") { var section = $(commandObject.target).parents('section'); if (!section.hasClass('hover')) { section.addClass('hover'); @@ -136,7 +150,7 @@ } } } - + // Checkes for a resourceid and gets all the attributes from that resource if (this.params.resourceid) { for (var attributeName in this.videoManager.manifestObjects[this.params.resourceid]) { @@ -170,7 +184,12 @@ this.image.setAttribute('style', 'display:none'); }; } + + if (!VideoCommand.active[this.params.target]) { + VideoCommand.active[this.params.target] = 0; + } }; + VideoCommand.active = {}; VideoCommand.count = 0; //////////////////////////////////////////////////////////////////////////// diff --git a/style.css b/style.css index 9b338ac..12e6b3d 100644 --- a/style.css +++ b/style.css @@ -355,6 +355,32 @@ border: 1px solid #d9d9d9; margin-bottom: 15px; } +.overlay{ +z-index: 9001; +display: none; +top: 0px; +left: 0px; +opacity: 0.4; +filter: alpha(opacity=40); +height: 100%; +width: 100%; +background: red; +position: absolute; +} + +.inactive{ +z-index: 9001; +display: inline; +top: 0px; +left: 0px; +opacity: 0.4; +filter: alpha(opacity=40); +height: 100%; +width: 100%; +background: grey; +position: absolute; +} + section.hover{ -webkit-box-shadow: -1px 1px 1px #bdc7c6; -moz-box-shadow: -1px 1px 1px #bdc7c6;