diff options
| author | fisharebest <fisharebest@gmail.com> | 2013-01-22 08:56:56 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2013-01-22 08:56:56 +0000 |
| commit | 0e55a1b9400ef4667731e3a21150368f664f7fae (patch) | |
| tree | 5442ad6c62579d9bb6d15c3060ba5f5e44c98561 /js/webtrees.js | |
| parent | cd69abdf50b3007195dd4543cdac2627e7716073 (diff) | |
| download | webtrees-0e55a1b9400ef4667731e3a21150368f664f7fae.tar.gz webtrees-0e55a1b9400ef4667731e3a21150368f664f7fae.tar.bz2 webtrees-0e55a1b9400ef4667731e3a21150368f664f7fae.zip | |
Remove the lightbox plugin from the "album" module. Add the colorbox module (temporarily) in its place.
Diffstat (limited to 'js/webtrees.js')
| -rw-r--r-- | js/webtrees.js | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/js/webtrees.js b/js/webtrees.js index 1a16025993..36724b8013 100644 --- a/js/webtrees.js +++ b/js/webtrees.js @@ -106,20 +106,6 @@ function closePopupAndReloadParent(url) { window.close(); } -function openImage(filename, width, height) { - height=height+50; - screenW = screen.width; - screenH = screen.height; - if (width>screenW-100) width=screenW-100; - if (height>screenH-110) height=screenH-120; - if (filename.indexOf('imageview.php')!=0) { - // just a filename was passed in, turn it into a full url - filename = 'imageview.php?filename='+filename; - } - window.open(filename,'_blank','top=50,left=50,height='+height+',width='+width+',scrollbars=1,resizable=1'); - return false; -} - // variables to hold mouse x-y pos.s var msX = 0; var msY = 0; @@ -1381,3 +1367,14 @@ function findPosY(obj) { curtop += obj.y; return curtop; } + +// This is the default way to show image galleries. Custom themes may choose their own. +function activate_colorbox() { + $.extend($.colorbox.settings, {maxWidth:"80%",maxHeight:"80%"}); + + // TODO - gallery feature not working correctly... + jQuery("a[rel=gallery]").live("click",function(e){ + e.preventDefault(); + jQuery(this).colorbox({open:true}); + }); +} |
