1
0

Video support.

This commit is contained in:
Fredrik Erlandsson 2011-09-30 12:06:29 +02:00
parent 99e46d8b79
commit 88b1fcd478
6 changed files with 38 additions and 10 deletions

BIN
icons/movie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1,6 +1,17 @@
.gallery-thumb-round {
background: url('rounded.png') no-repeat scroll left top;
position: absolute;
height: 200px;
width: 200px;
}
.p-video{
background: url('movie.png') no-repeat center;
position: absolute;
width: 200px;
height: 200px;
left: 0px;
top: 0px;
}
.skimm_div {
@ -59,7 +70,7 @@ height:40px;
display: block;
z-index: 100;
background: transparent url('pear_logo_sml.png') no-repeat center left;
width: 83px;
width: 30px;
height: 40px;
border: 0px;
padding: 0px;
@ -301,7 +312,7 @@ cursor: default;
#viewControls {
position: relative;
color: #616161;
width: 381px;
width: 334px;
float: left;
margin-left: 30px;
margin-top: 13px;

View File

@ -24,7 +24,7 @@ function swatchSkin(intSkin){
case 'dkgrey' :
case 1 :
$('div.gallery-thumb-round').css('backgroundPosition' , "-200px 0px");
$('#mosaicTable').css('backgroundColor' , "#262626");
$('#mosaicTable,.pear').css('backgroundColor' , "#262626");
$('p.giTitle').css("color", "#a9a9a9");
$("#dkgrey").addClass("dkgrey sel dkgrey-with-sel-with-swatch");
bgcolor="dkgrey";
@ -33,7 +33,7 @@ function swatchSkin(intSkin){
case 'ltgrey' :
case 2 :
$('div.gallery-thumb-round').css('backgroundPosition' , "-400px 0px");
$('#mosaicTable').css('backgroundColor' , "#d9d9d9");
$('#mosaicTable,.pear').css('backgroundColor' , "#d9d9d9");
$('p.giTitle').css("color", "#333333");
$("#ltgrey").addClass("ltgrey sel ltgrey-with-sel-with-swatch");
bgcolor="ltgrey";
@ -42,7 +42,7 @@ function swatchSkin(intSkin){
case 'white' :
case 3 :
$('div.gallery-thumb-round').css('backgroundPosition' , "-600px 0px");
$('#mosaicTable').css('backgroundColor' , "#ffffff");
$('#mosaicTable,.pear').css('backgroundColor' , "#ffffff");
$('p.giTitle').css("color", "#444444");
$("#white").addClass("white sel white-with-sel-with-swatch");
bgcolor="white";
@ -52,7 +52,7 @@ function swatchSkin(intSkin){
case 0 :
default:
$('div.gallery-thumb-round').css('backgroundPosition' , "0px 0px");
$('#mosaicTable').css('backgroundColor' , "#000");
$('#mosaicTable,.pear').css('backgroundColor' , "#000");
$('p.giTitle').css("color", "#a3a3a3");
$("#black").addClass("black sel black-with-sel-with-swatch");
bgcolor="black";
@ -200,6 +200,8 @@ function mosaicResize()
myHeight = myHeight - $('#g-site-status').outerHeight(true);
$('#g-header').css('top', $('#gsNavBar').outerHeight(true)+$('#g-site-status').outerHeight(true)-4);
if($('#g-movie').length)
myHeight+=18;
if ( !mosaicView )
{
$('#mosaicGridContainer').css({'height': (myHeight+33)+"px", 'width': myWidth+"px"});
@ -253,6 +255,7 @@ function bodyLoad(viewMode, bgcolor) {
if (co==null || co=="")
swatchSkin(bgcolor);
if(typeof slideshowImages != 'undefined')
if(!slideshowImages.length)
viewMode='grid';

View File

@ -30,13 +30,19 @@ $(function() {
<? if ($child->is_photo()): ?>
<? $img_class = "g-thumbnail p-photo"; ?>
<? endif ?>
<? if ($child->is_movie()): ?>
<a href="<?= $child->url() ?>">
<? endif ?>
<div id="g-thumb-id-<?= $child->id ?>" class="g-item gallery-thumb <?= $item_class ?>" title="<?= $child->description?>">
<?= $theme->thumb_top($child) ?>
<? if ($child->is_album()): ?>
<div class="gallery-thumb-round" style="height: 200px; width: 200px;"></div>
<? if ($child->is_album() || $child->is_movie()): ?>
<div class="gallery-thumb-round"></div>
<? endif ?>
<? if ($child->has_thumb()): ?>
<?= $child->thumb_img(array("class" => $img_class, "id" => "thumb_$child->id", "style" => "width: 200px; height 200px;")) ?>
<? if ($child->is_movie()): ?>
<span class="p-video"></span>
<? endif ?>
<? endif ?>
<?// Begin skimming
if($child->is_album()):
@ -56,6 +62,9 @@ endif;
<p class="giTitle <? if(!$child->is_album()) print 'center';?>"><?= html::purify(text::limit_chars($child->title, 20)) ?> </p>
<? if($child->is_album()): ?><div class="giInfo"><?= count($granchildren)?> photos</div><? endif ?>
</div>
<? if ($child->is_movie()): ?>
</a>
<? endif ?>
<?/* <?= $theme->thumb_bottom($child) ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<h2><span class="<?= $item_class ?>"></span>

View File

@ -1,9 +1,12 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
$(function() { bodyLoad('grid',''); });
</script>
<div id="g-item">
<?= $theme->photo_top() ?>
<?= $theme->paginator() ?>
<div id="mosaicGridContainer">
<div id="g-movie" class="ui-helper-clearfix">
<?= $theme->resize_top($item) ?>
<?= $item->movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?>
@ -14,6 +17,6 @@
<h1><?= html::purify($item->title) ?></h1>
<div><?= nl2br(html::purify($item->description)) ?></div>
</div>
</div>
<?= $theme->photo_bottom() ?>
</div>

View File

@ -169,6 +169,7 @@
</div>
<div class="" style="" id="viewControls">
<? if ($theme->page_subtype != "movie"): ?>
<div title="Display this album in a grid view" id="grid" class="grid viewSwitcher sel sel-with-viewSwitcher" onclick="switchToGrid();">
<div class="label">Grid</div>
</div>
@ -185,6 +186,7 @@
<div class="label">Slideshow</div>
</div>
<div class="clear"></div>
<? endif ?>
</div>
<? if (!module::get_var("th_pear4gallery3", "hide_logo")): ?><button id="logoButton"></button><?endif?>
</div>