From 4b9665a952e723075185b7ef8837c9e38432f63a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sat, 4 Jun 2011 20:43:32 +0200 Subject: [PATCH] image viewer plugin --- apps/files_imageviewer/appinfo/app.php | 6 ++++ apps/files_imageviewer/appinfo/info.xml | 10 ++++++ apps/files_imageviewer/css/lightbox.css | 21 +++++++++++ apps/files_imageviewer/js/lightbox.js | 46 +++++++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 apps/files_imageviewer/appinfo/app.php create mode 100644 apps/files_imageviewer/appinfo/info.xml create mode 100644 apps/files_imageviewer/css/lightbox.css create mode 100644 apps/files_imageviewer/js/lightbox.js diff --git a/apps/files_imageviewer/appinfo/app.php b/apps/files_imageviewer/appinfo/app.php new file mode 100644 index 0000000000..bc0059b8b6 --- /dev/null +++ b/apps/files_imageviewer/appinfo/app.php @@ -0,0 +1,6 @@ + diff --git a/apps/files_imageviewer/appinfo/info.xml b/apps/files_imageviewer/appinfo/info.xml new file mode 100644 index 0000000000..f658409be7 --- /dev/null +++ b/apps/files_imageviewer/appinfo/info.xml @@ -0,0 +1,10 @@ + + + files_imageview + Imageviewer + Simple image viewer for owncloud + 1.0 + AGPL + Robin Appelman + 2 + \ No newline at end of file diff --git a/apps/files_imageviewer/css/lightbox.css b/apps/files_imageviewer/css/lightbox.css new file mode 100644 index 0000000000..225b11ff9a --- /dev/null +++ b/apps/files_imageviewer/css/lightbox.css @@ -0,0 +1,21 @@ +#lightbox_overlay{ + position:absolute; + height:100%; + width:100%; + top:0px; + left:0px; + opacity:0.5; + filter: alpha(opacity = 50); + background-color:black; + z-index:9999; +} + +#lightbox{ + position:absolute; + max-height:90%; + max-width:90%; + top:10px; + margin-left:auto; + margin-right:auto; + z-index:9999; +} \ No newline at end of file diff --git a/apps/files_imageviewer/js/lightbox.js b/apps/files_imageviewer/js/lightbox.js new file mode 100644 index 0000000000..dd091aa0d7 --- /dev/null +++ b/apps/files_imageviewer/js/lightbox.js @@ -0,0 +1,46 @@ +$(document).ready(function() { + images={};//image cache + FileActions.register('image','View',function(filename){ + var location='ajax/download.php?files='+filename+'&dir='+$('#dir').val(); + var overlay=$('