diff --git a/3.0/themes/pear4gallery3/admin/controllers/admin_theme_options.php b/3.0/themes/pear4gallery3/admin/controllers/admin_theme_options.php index 999334f1..cd784e24 100644 --- a/3.0/themes/pear4gallery3/admin/controllers/admin_theme_options.php +++ b/3.0/themes/pear4gallery3/admin/controllers/admin_theme_options.php @@ -87,7 +87,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { ->checked(module::get_var("th_pear4gallery3", "hide_logo")); $group->dropdown("mainmenu_view") ->label(t("Main page View")) - ->options(array("grid" => t("Grid (Default)"), "mosaic" => t("Mosaic"))) + ->options(array("grid" => t("Grid (Default)"), "mosaic" => t("Mosaic"), "carousel" => t("Carousel"))) ->selected(module::get_var("th_pear4gallery3", "mainmenu_view")); $group->checkbox("show_guest_menu") ->label(t("Show Main Menu for Guest Users")) diff --git a/3.0/themes/pear4gallery3/css/pear.css b/3.0/themes/pear4gallery3/css/pear.css index 475a0757..2be381c2 100644 --- a/3.0/themes/pear4gallery3/css/pear.css +++ b/3.0/themes/pear4gallery3/css/pear.css @@ -1,8 +1,6 @@ .gallery-thumb { float: left; - margin-bottom: 5px; - margin-left: 5px; - margin-right: 5px; + padding: 3px 5px 7px 5px; position: relative; text-align: center; cursor: pointer; @@ -40,9 +38,11 @@ th, td { .giTitle { font-size: 1.1em; font-weight: bold; - margin: 3px 10px !important; + margin: 0.3em 3px !important; padding: 0 0; text-align: left; + height: 1.2em; + overflow: hidden; } #gsNavBar div { diff --git a/3.0/themes/pear4gallery3/icons/movie.png b/3.0/themes/pear4gallery3/icons/movie.png new file mode 100644 index 00000000..97793bb7 Binary files /dev/null and b/3.0/themes/pear4gallery3/icons/movie.png differ diff --git a/3.0/themes/pear4gallery3/icons/pear.css b/3.0/themes/pear4gallery3/icons/pear.css index 03988e76..fe2bac04 100644 --- a/3.0/themes/pear4gallery3/icons/pear.css +++ b/3.0/themes/pear4gallery3/icons/pear.css @@ -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; diff --git a/3.0/themes/pear4gallery3/js/pear.js b/3.0/themes/pear4gallery3/js/pear.js index 8f5ace87..d1c8d44a 100644 --- a/3.0/themes/pear4gallery3/js/pear.js +++ b/3.0/themes/pear4gallery3/js/pear.js @@ -1,3 +1,4 @@ +var viewMode=""; var skimimg = 0; var hash=""; var bgcolor="black"; @@ -5,9 +6,8 @@ var detailViewMode=false; var savedHeight = 0; var savedWidth = 0; -$(window).resize(function (e) { - if (window.innerHeight == savedHeight && - window.innerWidth == savedWidth) { e.stop(); } +$(window).resize(function () { + if (window.innerHeight == savedHeight && window.innerWidth == savedWidth) return; savedHeight = window.innerHeight; savedWidth = window.innerWidth; mosaicResize(); @@ -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"; @@ -66,14 +66,16 @@ function scaleIt(v,sliding){ // Remap the 0-1 scale to fit the desired range //v=.26+(v*(1.0-.26)); - size = (mosaicView) ? v/2 : v; + var size = (mosaicView) ? v/2 : v; toggleReflex(true); $(".p-photo").each(function (i) { $(this).attr({height: size+'px',width: size + 'px'}); $(this).css({height: size+'px',width: size+'px'});}); + $(".g-photo").css({width: size+'px'}); if(!mosaicView && !sliding) toggleReflex(false); + thumbPadding(); } function setCookie(c_name,value,expiredays) { @@ -153,17 +155,24 @@ function swatchImg(imageId) updateHash(); $('#info_detail').attr('href', slideshowImages[currentImg][1]); } - +function getViewMode() +{ + var vm = detailViewMode ? "detail" : viewMode; + if(vm !== '') + vm = "&viewMode=" + vm; + return vm; +} function updateHash() { - viewMode = detailViewMode ? "detail" : (mosaicView ? "mosaic" : "grid"); - hash = "#img=" + currentImg + "&viewMode=" + viewMode + "&bgcolor=" + bgcolor; + var img=""; + if(currentImg !== 0) + img = "img=" + currentImg; + hash = "#" + img + getViewMode() + "&bgcolor=" + bgcolor; window.location.hash = hash; } function getAlbumHash(img) { - viewMode = detailViewMode ? "detail" : (mosaicView ? "mosaic" : "grid"); - return "#img=" + img + "&viewMode=" + viewMode + "&bgcolor=" + bgcolor; + return "#img=" + img + getViewMode() + "&bgcolor=" + bgcolor; } var currentImg=0; @@ -186,8 +195,6 @@ function mosaicResize() myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } - if($('#pearImageFlow').length != 0) - $('#pearImageFlow').css({'height' : (myHeight-87)+'px', 'width': myWidth+'px', 'minHeight': ((myHeight-70)*0.9)+'px'}); if($('#imageflow').length != 0) $('#imageflow').css({'height': (myHeight-53)+'px', 'width': (((myWidth*0.5)<(myHeight-53)) ? myWidth : ((myHeight-65)*2)) +'px'}); $('#detailImageView').css({'height': myHeight-165+"px"}); @@ -196,10 +203,14 @@ function mosaicResize() $('#img_detail').css({'height': iHeight+"px", 'width':iWidth+"px"}); myWidth=myWidth-7; + myHeight = myHeight - $('#g-site-status').outerHeight(true); + $('#pearFlowPadd').css({'height' : myHeight-90-(Math.round(myWidth / 2.4))+'px'}); ($('#paginator').length != 0) ? myHeight-=165: myHeight-=138; 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"}); @@ -214,10 +225,20 @@ function mosaicResize() (iRatio>(myWidth/myHeight)) ? $('#mosaicImg').attr({height: myWidth/iRatio,width: myWidth}) : $('#mosaicImg').attr({height: myHeight,width: myHeight*iRatio}); if(iHeight
'+$('#mosaicGridContainer img').eq(i).attr('alt')+'"
'; - var img = ''+slideshowImages[i][4]+''; - console.log(img); - $('#pearImageFlow').append(img); - } if(!pearCarousel){ - pearCarousel = new ImageFlow(); - pearCarousel.init({ImageFlowID: 'pearImageFlow', aspectRatio: 2.4, imagesHeight: 0.6, opacity: true, reflections: false, startID: currentImg, onClick: function() {focusImage($(this).attr('longdesc'));}, startAnimation: true, xStep: 200, imageFocusM: 1.7, imageFocusMax: 4, opacityArray: [10, 9, 6, 2], percentOther: 130, captions: false, slider: false}); + for (var i = 0; i < slideshowImages.length; i++) { + var img = '
'+$('#mosaicGridContainer img').eq(i).attr('alt')+'"
'; + var img = ''+slideshowImages[i][4]+''; + // console.log(img); + $('#pearImageFlow').append(img); + } + pearCarousel = new ImageFlow(); + pearCarousel.init({ImageFlowID: 'pearImageFlow', aspectRatio: 2.4, imagesHeight: 0.6, opacity: true, reflections: false, startID: currentImg+1, onClick: function() {focusImage($(this).attr('longdesc'));}, startAnimation: true, xStep: 200, imageFocusM: 1.7, imageFocusMax: 4, opacityArray: [10, 9, 6, 2], percentOther: 130, captions: false, slider: false}); } -/* - current=(currentImg)*-xstep; - caption_id=currentImg; - refresh(true); - - iShow(conf_images); - iShow(conf_scrollbar); - initMouseWheel(); - initMouseDrag(); - mosaicResize(); - - moveTo(current); - glideTo(current, caption_id); -*/ switchMode('carousel'); + mosaicResize(); } function setKeys() { @@ -436,6 +457,7 @@ var hovering=false; function switchMode(mode){ $('#mosaic,#grid,#carousel').removeClass("sel sel-with-viewSwitcher"); $('#'+mode).addClass("sel sel-with-viewSwitcher"); + updateHash(); } function preFetch() diff --git a/3.0/themes/pear4gallery3/theme.info b/3.0/themes/pear4gallery3/theme.info index dc766e36..c94543d2 100644 --- a/3.0/themes/pear4gallery3/theme.info +++ b/3.0/themes/pear4gallery3/theme.info @@ -1,6 +1,6 @@ name = ".Pear Theme" description = "A theme with the intention to mimic Apples mobile me gallery." -version = 2.3 +version = 2.7 author = "Fredrik Erlandsson " site = 1 admin = 0 diff --git a/3.0/themes/pear4gallery3/views/album.html.php b/3.0/themes/pear4gallery3/views/album.html.php index cdc4ffda..455dba8f 100644 --- a/3.0/themes/pear4gallery3/views/album.html.php +++ b/3.0/themes/pear4gallery3/views/album.html.php @@ -30,13 +30,19 @@ $(function() { is_photo()): ?> + is_movie()): ?> + + + is_movie()): ?> + + thumb_bottom($child) ?> context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>

@@ -69,7 +78,7 @@ endif; var slideshowImages = new Array(); $child): ?> is_album() || $child->is_movie())): ?> - slideshowImages.push(['resize_url() ?>', 'id") ?>', 'width ?>','height ?>', 'title ?>', 'file_url() ?>', 'url() ?>']); + slideshowImages.push(['resize_url() ?>', 'id") ?>', 'width ?>','height ?>', 'title, ENT_QUOTES) ?>', 'file_url() ?>', 'url() ?>']); @@ -87,4 +96,5 @@ endif; album_bottom() ?> paginator() ?> + diff --git a/3.0/themes/pear4gallery3/views/movie.html.php b/3.0/themes/pear4gallery3/views/movie.html.php index 158857db..adab9d1b 100644 --- a/3.0/themes/pear4gallery3/views/movie.html.php +++ b/3.0/themes/pear4gallery3/views/movie.html.php @@ -1,9 +1,12 @@ +
photo_top() ?> paginator() ?> - +
resize_top($item) ?> movie_img(array("class" => "g-movie", "id" => "g-item-id-{$item->id}")) ?> @@ -14,6 +17,6 @@

title) ?>

description)) ?>
- +
photo_bottom() ?>
diff --git a/3.0/themes/pear4gallery3/views/page.html.php b/3.0/themes/pear4gallery3/views/page.html.php index eb2ce1d7..cc06af5d 100644 --- a/3.0/themes/pear4gallery3/views/page.html.php +++ b/3.0/themes/pear4gallery3/views/page.html.php @@ -122,7 +122,7 @@ item()): ?> - +
item()->title, 40)) ?>   @@ -154,8 +154,8 @@
-
-
+
+
@@ -169,14 +169,15 @@
-
+page_subtype != "movie"): ?> +
Grid
-
+
Mosaic
-
+