]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
colour overlay on divs
authorScottDowne <sdowne@learn.senecac.on.ca>
Mon, 5 Jul 2010 17:59:20 +0000 (13:59 -0400)
committerScottDowne <sdowne@learn.senecac.on.ca>
Mon, 5 Jul 2010 17:59:20 +0000 (13:59 -0400)
index.html
popcorn.js
style.css

index 4d0adbd454566743cb7c510a35be8de81652a437..b4125a768083f01c0a6e7e133a24be64d301764c 100644 (file)
                   <h3><img src="images/logo_twitter.png" alt="Twitter Updates" width="" height="" />
                   <span>&nbsp;</span></h3>
                   <a href="#" class="collapse"><span>Collapse</span></a>
-                  <div id="personaltwitter" class="content"></div>
+                  <div id="personaltwitter" class="content"><div class="overlay"></div><div class="inactive"></div></div>
                 </section>
                          
               </div>
                   <h3><img src="images/logo_flickr.png" alt="Flickr Images" width="" height="" />
                                       <span>&nbsp;</span></h3>
                   <a href="#" class="collapse"><span>Collapse</span></a>
-                  <div id="personalflickr" class="content"></div>
+                  <div id="personalflickr" class="content"><div class="overlay"></div><div class="inactive"></div></div>
                 </section>
               </div>
               <!-- End Column B -->
                 <section>
                   <h3><img src="images/logo_twitter.png" alt="Twitter" width="" height="" /></h3>
                   <a href="#" class="collapse"><span>Collapse</span></a>
-                  <div id="twitter" class="content"></div>
+                  <div id="twitter" class="content"><div class="overlay"></div><div class="inactive"></div></div>
                 </section>
               </div>
               <!-- End Column A -->
                   <h3><img src="images/logo_wiki.png" alt="Wikipedia" width="" height="" /></h3>
                   <a href="#" class="collapse"><span>Collapse</span></a>
 
-                  <div class="content" id="wikidiv">
-                                       </div>
-                               </section>
-              <section>
-                                 <h3><img src="images/logo_google_news.png" alt="Google News" width="" height="" />
-                                 </h3> 
-                                 <div id="googlenewsdiv">
-                                 </div>
-                         </section>
+                  <div class="content" id="wikidiv"><div class="overlay"></div><div class="inactive"></div></div>
+                                       </section>
+                <section>
+                                   <h3><img src="images/logo_google_news.png" alt="Google News" width="" height="" />
+                                   </h3> 
+                                   <div id="googlenewsdiv"><div class="overlay"></div><div class="inactive"></div></div>
+                           </section>
               </div>
               <!-- End Column B -->
                    <h1><span>This video's copyright information</span></h1>
               <section>
-                <div id="container5">
-                  Attribution
-                </div>
+                <div id="container5"></div>
               </section>
             </div>
             <!-- End Right Contents -->
index 01a6a2f91691adef78e646d53ab8f4d3ea5a75e0..de9ce591be052a58c77c7f159e7d14d099270282 100644 (file)
         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();
         }
         }
         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');    
         }
       }
     }
-    
+
     // 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]) {
         this.image.setAttribute('style', 'display:none');
       };
     }
+
+    if (!VideoCommand.active[this.params.target]) {
+      VideoCommand.active[this.params.target] = 0;
+    }
   };
+  VideoCommand.active = {};
   VideoCommand.count = 0;
 
   ////////////////////////////////////////////////////////////////////////////
index 9b338ac6813cae497ac3bf89083d13f995efee46..12e6b3dc4bacd6a8ae307ee3641a1a681801f827 100644 (file)
--- 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;