remove console.log

This commit is contained in:
sanj 2010-11-14 07:30:22 +05:30
parent 1f2fedf419
commit d36922521a
4 changed files with 120 additions and 79 deletions

14
COPYING Normal file
View File

@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@ -29,8 +29,24 @@ h1 {
font-family: "Times New Roman", Times, serif; font-family: "Times New Roman", Times, serif;
} }
#loading {
position: fixed;
right: 0px;
bottom: 40%;
top: 40%;
width: 320px;
height: 20%;
font-size: 24px;
font-weight: bold;
color: #fff;
background: #898989;
opacity: 0;
z-index: 1000;
}
#padmaSidebar { #padmaSidebar {
width: 320px; width: 320px;
height: 100%;
margin-right: 10px; margin-right: 10px;
position: fixed; position: fixed;
top: 0px; top: 0px;
@ -43,6 +59,9 @@ h1 {
#aboutTxt { #aboutTxt {
color: #363636; color: #363636;
padding: 15px; padding: 15px;
height: 90%;
margin-top: 10%;
overflow-y: scroll;
} }
#padmaSidebarRelative { #padmaSidebarRelative {
@ -55,10 +74,10 @@ h1 {
.annotationText { .annotationText {
color: #363636; color: #363636;
margin-top: 15px; margin-top: 8px;
margin-bottom: 15px; margin-bottom: 8px;
font-size: 13px; font-size: 13px;
height: 360px; height: 300px;
overflow-y: auto; overflow-y: auto;
width: 90%; width: 90%;
margin-left: auto; margin-left: auto;
@ -78,7 +97,7 @@ h1 {
.padmaViewer video { .padmaViewer video {
width: 320px; width: 320px;
margin-top: 25px; margin-top: 10px;
margin-left: -6px; margin-left: -6px;
} }
@ -90,7 +109,7 @@ h1 {
} }
.padmaLink:hover { .padmaLink:hover {
color: blue; color: red;
} }
.padmaViewer .close { .padmaViewer .close {

View File

@ -23,6 +23,7 @@ function setupPadmaLink(videoObj, data) {
var mid_frame_npt = ms2npt(parseInt((npt2ms(linkData.tcIn) + npt2ms(linkData.tcOut)) / 2)); var mid_frame_npt = ms2npt(parseInt((npt2ms(linkData.tcIn) + npt2ms(linkData.tcOut)) / 2));
// console.log(mid_frame_npt); // console.log(mid_frame_npt);
var thumbUrl = videoObj.getFrame(mid_frame_npt); var thumbUrl = videoObj.getFrame(mid_frame_npt);
break;
default: default:
var frame_npt = ms2npt(videoObj.video.poster_frame); var frame_npt = ms2npt(videoObj.video.poster_frame);
var thumbUrl = videoObj.getFrame(frame_npt); var thumbUrl = videoObj.getFrame(frame_npt);
@ -40,38 +41,7 @@ function setupPadmaLink(videoObj, data) {
$a.click(function(e) { $a.click(function(e) {
function sidebarAnimateIn() {
/*
$container.animate({'width': '400px'}, function() {
$(this).animate({'backgroundColor': '#000000'});
});
var docWidth = $(document).width();
var newWidth = docWidth - 440;
$('#essay').animate({'width': newWidth + "px"});
*/
// $container.show();
$('#aboutTxt').hide();
}
function sidebarAnimateOut() {
$container.find('.padmaViewer').empty();
$('#aboutTxt').show();
/*
$container.animate({'width': '0px'}, function() {
$(this).animate({'backgroundColor': '#ffffff'});
});
$('#essay').animate({'width': '100%'});
*/
}
function isSidebarVisible() {
if (padmaContainer.width() > 0) {
return true;
} else {
return false;
}
}
// sidebarAnimateIn(); // sidebarAnimateIn();
e.preventDefault(); e.preventDefault();
var currentVideo = padmaContainer.data("currentVideo"); var currentVideo = padmaContainer.data("currentVideo");
@ -90,6 +60,12 @@ function setupPadmaLink(videoObj, data) {
if (!isSidebarVisible()) { if (!isSidebarVisible()) {
sidebarAnimateIn(); sidebarAnimateIn();
} }
videoObj.getLayersData(displayLayer, {'linkData': linkData});
$('#loading').fadeTo(0.5);
function displayLayer(videoObj, data) {
$('#loading').fadeOut();
var linkData = data.linkData;
var html = tmpl("tmpl_sidebar", {'video': videoObj, 'linkData': linkData}); var html = tmpl("tmpl_sidebar", {'video': videoObj, 'linkData': linkData});
$('#padmaSidebarWrapper').html(html); $('#padmaSidebarWrapper').html(html);
$('#aboutTxt').hide(); $('#aboutTxt').hide();
@ -143,9 +119,40 @@ function setupPadmaLink(videoObj, data) {
// cleanupVideo(videoObj); // cleanupVideo(videoObj);
sidebarAnimateOut(); sidebarAnimateOut();
}); });
}
function sidebarAnimateIn() {
/*
$container.animate({'width': '400px'}, function() {
$(this).animate({'backgroundColor': '#000000'});
}); });
var docWidth = $(document).width();
var newWidth = docWidth - 440;
$('#essay').animate({'width': newWidth + "px"});
*/
// $container.show();
$('#aboutTxt').fadeOut();
}
function sidebarAnimateOut() {
$container.find('.padmaViewer').empty();
$('#aboutTxt').show();
/*
$container.animate({'width': '0px'}, function() {
$(this).animate({'backgroundColor': '#ffffff'});
});
$('#essay').animate({'width': '100%'});
*/
}
function isSidebarVisible() {
if (padmaContainer.width() > 0) {
return true;
} else {
return false;
}
}
});
} }
//All functions that destroy the video must call this to ensure clean-ups are handled //All functions that destroy the video must call this to ensure clean-ups are handled

View File

@ -69,6 +69,7 @@
</div> </div>
</script> </script>
{% autoescape off %} {% autoescape off %}
<div id="loading"></div>
<div id="wrapper"> <div id="wrapper">
<h1> <h1>
{{ text.title }} {{ text.title }}