Permalink
Browse files

Tweaks

  • Loading branch information...
1 parent 1bdb8be commit 1f348b6f5aa4f3f63638b8551ce07fc604aed954 @qwzybug qwzybug committed Apr 7, 2012
Showing with 57 additions and 8 deletions.
  1. +13 −0 css/style.css
  2. BIN img/playhead.png
  3. +3 −8 index.html
  4. +41 −0 js/widget.js
View
@@ -177,3 +177,16 @@ padding:10px;
}
+
+.player {
+ margin-left: -5px;
+}
+
+#playhead {
+ display: block;
+ width: 44px;
+ height: 44px;
+ background-image: url(../img/playhead.png);
+ position: absolute;
+ left: -22px;
+}
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -41,7 +41,7 @@ <h2>The Web of David Coleman Headley</h2>
<div id="content" role="main">
<div id="background"></div>
<div id="chart"></div>
- <!-- <div id="foreground"></div> -->
+ <div id="foreground"></div>
</div>
<footer>
@@ -66,12 +66,7 @@ <h2>The Web of David Coleman Headley</h2>
if (supportsAudio) {
var player_code = '<p class="player">\
- <span id="playtoggle" />\
- <span id="gutter">\
- <span id="loading" />\
- <span id="handle" class="ui-slider-handle" />\
- </span>\
- <span id="timeleft" />\
+ <span id="playhead" />\
<audio id="popcorn" preload="metadata">\
<source src="media/narration.mp3" type="audio/mpeg"></source>\
<source src="media/narration.ogg" type="audio/vorbis"></source>\
@@ -82,7 +77,7 @@ <h2>The Web of David Coleman Headley</h2>
audio = $('.player audio').get(0);
loadingIndicator = $('.player #loading');
- positionIndicator = $('.player #handle');
+ positionIndicator = $('.player #playhead');
timeleft = $('.player #timeleft');
View
@@ -0,0 +1,41 @@
+var popup;
+
+function createPopup(thisnode, title, imgsrc, videosrc, x, y){
+ if (popup) {
+ removePopup();
+ }
+
+ // if (!popup)
+ // {
+ popup = $('<div id="popup"/>');
+ var $title = $('<h2>' + title + '</h2>');
+
+ popup.append("<a id='popup_link' href='" + videosrc + "'><img src='photos/" + imgsrc + "'></a>").append($title);
+ popup.append("<a id='closebox' class='close' href='#'>X</a>");
+
+ popup.css("top", y).css("left", x);
+
+ $("#content").append(popup).animate({opacity:1},'slow');
+
+ $('#closebox').click(function (e) {
+ e.preventDefault();
+ removePopup();
+ //load video popup?
+ });
+ // }
+
+ // $("#content").append(popup).style("opacity", 1);
+ //
+ // $("#popup h2").text(title);
+ // $("#popup a#popup_link").attr("href", videosrc);
+ // $("#popup img").attr("src", "photos/" + imgsrc);
+ //
+ // popup.css("top", y).css("left", x);
+
+}
+
+function removePopup(){
+ popup.animate({opacity:0},'slow');
+ popup.remove();
+ popup = null;
+}

0 comments on commit 1f348b6

Please sign in to comment.