From 8353517969d4256a86c1085cb3c3804f08a14001 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 6 Jul 2012 12:24:03 +0200 Subject: [PATCH 01/64] use OC_Connector_Sabre_Client --- apps/files_external/lib/webdav.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 32dd26ae6c..7511096f0d 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -36,18 +36,18 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->root.='/'; } - $capath = ''; - if($caview = \OCP\Files::getStorage('files_external')) { - $capath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath(""); - } $settings = array( 'baseUri' => $this->createBaseUri(), 'userName' => $this->user, 'password' => $this->password, - 'capath' => $capath, ); - $this->client = new Sabre_DAV_Client($settings); + $this->client = new OC_Connector_Sabre_Client($settings); + + if($caview = \OCP\Files::getStorage('files_external')) { + $this->client->setCurlSettings(array(CURLOPT_CAPATH => \OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath(""), + CURLOPT_SSL_VERIFYPEER => false)); + } //create the root folder if necesary $this->mkdir(''); } From ba8dee05209e136a8911862b21ff6ad90d67f149 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 6 Jul 2012 12:26:54 +0200 Subject: [PATCH 02/64] introduce subclassed client.php and revert changes to 3rdparty --- 3rdparty/Sabre/DAV/Client.php | 7 -- lib/connector/sabre/client.php | 168 +++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 7 deletions(-) create mode 100644 lib/connector/sabre/client.php diff --git a/3rdparty/Sabre/DAV/Client.php b/3rdparty/Sabre/DAV/Client.php index d257c86da1..075e84caa1 100644 --- a/3rdparty/Sabre/DAV/Client.php +++ b/3rdparty/Sabre/DAV/Client.php @@ -22,7 +22,6 @@ class Sabre_DAV_Client { protected $userName; protected $password; protected $proxy; - protected $capath; /** * Constructor @@ -50,10 +49,6 @@ class Sabre_DAV_Client { 'proxy' ); - $this->capath = ''; - if (isset($settings['capath'])) { - $this->capath = $settings['capath']; - } foreach($validSettings as $validSetting) { if (isset($settings[$validSetting])) { @@ -259,8 +254,6 @@ class Sabre_DAV_Client { //CURLOPT_SSL_VERIFYPEER => false, ); - if ($this->capath != '') $curlSettings[CURLOPT_CAPATH] = $this->capath; - switch ($method) { case 'PUT': $curlSettings[CURLOPT_PUT] = true; diff --git a/lib/connector/sabre/client.php b/lib/connector/sabre/client.php new file mode 100644 index 0000000000..bcf564c06d --- /dev/null +++ b/lib/connector/sabre/client.php @@ -0,0 +1,168 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + * + */ + +class OC_Connector_Sabre_Client extends Sabre_DAV_Client { + + protected $curlSettings; + + public function __construct(array $settings) { + //set default curl settings + $this->curlSettings = array( + CURLOPT_RETURNTRANSFER => true, + // Return headers as part of the response + CURLOPT_HEADER => true, + // Automatically follow redirects + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_MAXREDIRS => 5, + CURLOPT_SSL_VERIFYPEER => true, + //CURLOPT_SSL_VERIFYPEER => false, + ); + parent::__construct($settings); + } + + public function setCurlSettings($settings) { + if (is_array($settings)) { + foreach ($settings as $k => $v) { + $this->curlSettings[$k] = $v; + } + } + } + + /** + * Copied from SabreDAV with some modification to use user defined curlSettings + * Performs an actual HTTP request, and returns the result. + * + * If the specified url is relative, it will be expanded based on the base + * url. + * + * The returned array contains 3 keys: + * * body - the response body + * * httpCode - a HTTP code (200, 404, etc) + * * headers - a list of response http headers. The header names have + * been lowercased. + * + * @param string $method + * @param string $url + * @param string $body + * @param array $headers + * @return array + */ + public function request($method, $url = '', $body = null, $headers = array()) { + + $this->curlSettings[CURLOPT_POSTFIELDS] = $body; + $url = $this->getAbsoluteUrl($url); + + switch ($method) { + case 'PUT': + $this->curlSettings[CURLOPT_PUT] = true; + break; + case 'HEAD' : + + // do not read body with HEAD requests (this is neccessary because cURL does not ignore the body with HEAD + // requests when the Content-Length header is given - which in turn is perfectly valid according to HTTP + // specs...) cURL does unfortunately return an error in this case ("transfer closed transfer closed with + // ... bytes remaining to read") this can be circumvented by explicitly telling cURL to ignore the + // response body + $this->curlSettings[CURLOPT_NOBODY] = true; + $this->curlSettings[CURLOPT_CUSTOMREQUEST] = 'HEAD'; + break; + + default: + $this->curlSettings[CURLOPT_CUSTOMREQUEST] = $method; + break; + + } + + // Adding HTTP headers + $nHeaders = array(); + foreach($headers as $key=>$value) { + + $nHeaders[] = $key . ': ' . $value; + + } + $this->curlSettings[CURLOPT_HTTPHEADER] = $nHeaders; + + if ($this->proxy) { + $this->curlSettings[CURLOPT_PROXY] = $this->proxy; + } + + if ($this->userName) { + $this->curlSettings[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC | CURLAUTH_DIGEST; + $this->curlSettings[CURLOPT_USERPWD] = $this->userName . ':' . $this->password; + } + + list( + $response, + $curlInfo, + $curlErrNo, + $curlError + ) = $this->curlRequest($url, $this->curlSettings); + + $headerBlob = substr($response, 0, $curlInfo['header_size']); + $response = substr($response, $curlInfo['header_size']); + + // In the case of 100 Continue, or redirects we'll have multiple lists + // of headers for each separate HTTP response. We can easily split this + // because they are separated by \r\n\r\n + $headerBlob = explode("\r\n\r\n", trim($headerBlob, "\r\n")); + + // We only care about the last set of headers + $headerBlob = $headerBlob[count($headerBlob)-1]; + + // Splitting headers + $headerBlob = explode("\r\n", $headerBlob); + + $headers = array(); + foreach($headerBlob as $header) { + $parts = explode(':', $header, 2); + if (count($parts)==2) { + $headers[strtolower(trim($parts[0]))] = trim($parts[1]); + } + } + + $response = array( + 'body' => $response, + 'statusCode' => $curlInfo['http_code'], + 'headers' => $headers + ); + + if ($curlErrNo) { + throw new Sabre_DAV_Exception('[CURL] Error while making request: ' . $curlError . ' (error code: ' . $curlErrNo . ')'); + } + + if ($response['statusCode']>=400) { + switch ($response['statusCode']) { + case 404: + throw new Sabre_DAV_Exception_NotFound('Resource ' . $url . ' not found.'); + break; + + default: + throw new Sabre_DAV_Exception('HTTP error response. (errorcode ' . $response['statusCode'] . ')'); + } + } + + return $response; + + } + +} \ No newline at end of file From 963faf64587163d2dbeaf5dc4fd577412a04e0c2 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 6 Jul 2012 12:35:29 +0200 Subject: [PATCH 03/64] CURLOPT_SSL_VERIFYPEER=false shouldn't be in master --- apps/files_external/lib/webdav.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 7511096f0d..9b874e62e3 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -45,8 +45,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->client = new OC_Connector_Sabre_Client($settings); if($caview = \OCP\Files::getStorage('files_external')) { - $this->client->setCurlSettings(array(CURLOPT_CAPATH => \OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath(""), - CURLOPT_SSL_VERIFYPEER => false)); + $this->client->setCurlSettings(array(CURLOPT_CAPATH => \OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath(""))); } //create the root folder if necesary $this->mkdir(''); From ab1b4f1f0381b05debabdcee22cb1c4f54fa4219 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 6 Jul 2012 12:05:43 +0200 Subject: [PATCH 04/64] Fugly fixed include. --- apps/contacts/ajax/categories/rescan.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/contacts/ajax/categories/rescan.php b/apps/contacts/ajax/categories/rescan.php index 48ec165381..f9d9ef7ba6 100644 --- a/apps/contacts/ajax/categories/rescan.php +++ b/apps/contacts/ajax/categories/rescan.php @@ -10,7 +10,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); -require_once('../loghandler.php'); +require_once(__DIR__.'../loghandler.php'); $addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); if(count($addressbooks) == 0) { From a1872412bf24e175f4545216b597963137945aad Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 6 Jul 2012 12:07:02 +0200 Subject: [PATCH 05/64] Correct hack ;) --- apps/contacts/ajax/categories/rescan.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/contacts/ajax/categories/rescan.php b/apps/contacts/ajax/categories/rescan.php index f9d9ef7ba6..679f57aa26 100644 --- a/apps/contacts/ajax/categories/rescan.php +++ b/apps/contacts/ajax/categories/rescan.php @@ -10,7 +10,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); -require_once(__DIR__.'../loghandler.php'); +require_once(__DIR__.'/../loghandler.php'); $addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); if(count($addressbooks) == 0) { From cafbd023379073623295d11ae06be55a5f2cb569 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 6 Jul 2012 13:24:56 +0200 Subject: [PATCH 06/64] Fix endless loop when no addressbooks. --- apps/contacts/lib/addressbook.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/contacts/lib/addressbook.php b/apps/contacts/lib/addressbook.php index 40675efd8b..7549464f46 100644 --- a/apps/contacts/lib/addressbook.php +++ b/apps/contacts/lib/addressbook.php @@ -148,10 +148,17 @@ class OC_Contacts_Addressbook{ * @return insertid */ public static function add($uid,$name,$description=''){ - $all = self::all($uid); + try { + $stmt = OCP\DB::prepare( 'SELECT uri FROM *PREFIX*contacts_addressbooks WHERE userid = ? ' ); + $result = $stmt->execute(array($uid)); + } catch(Exception $e) { + OCP\Util::writeLog('contacts',__CLASS__.'::'.__METHOD__.' exception: '.$e->getMessage(),OCP\Util::ERROR); + OCP\Util::writeLog('contacts',__CLASS__.'::'.__METHOD__.' uid: '.$uid,OCP\Util::DEBUG); + return false; + } $uris = array(); - foreach($all as $i){ - $uris[] = $i['uri']; + while($row = $result->fetchRow()){ + $uris[] = $row['uri']; } $uri = self::createURI($name, $uris ); From 75d01b065da91acb7512b3df82d69c8d931c50b3 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Fri, 6 Jul 2012 13:49:04 +0200 Subject: [PATCH 07/64] Make export batch size configurable. --- apps/contacts/export.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/contacts/export.php b/apps/contacts/export.php index ba7b06e40d..58fdb040a5 100644 --- a/apps/contacts/export.php +++ b/apps/contacts/export.php @@ -19,11 +19,12 @@ if(isset($bookid)){ header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf'); $start = 0; - while($cardobjects = OC_Contacts_VCard::all($bookid, $start, 20)){ + $batchsize = OCP\Config::getUserValue(OCP\User::getUser(), 'contacts', 'export_batch_size', 20); + while($cardobjects = OC_Contacts_VCard::all($bookid, $start, $batchsize)){ foreach($cardobjects as $card) { echo $card['carddata'] . $nl; } - $start += 20; + $start += $batchsize; } }elseif(isset($contactid)){ $data = OC_Contacts_App::getContactObject($contactid); From e91b4bc2ac79f8855c57accfce2558ead52d2943 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 6 Jul 2012 15:58:38 +0200 Subject: [PATCH 08/64] allow user to upload his own root certificate for secure webdav mount --- .../ajax/addRootCertificate.php | 16 ++++++++++- .../ajax/removeRootCertificate.php | 3 ++- apps/files_external/lib/config.php | 27 ++++++++++++++++++- apps/files_external/lib/webdav.php | 2 +- apps/files_external/templates/settings.php | 2 +- lib/connector/sabre/client.php | 2 +- 6 files changed, 46 insertions(+), 6 deletions(-) diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php index 33cd64d2c7..c192855629 100644 --- a/apps/files_external/ajax/addRootCertificate.php +++ b/apps/files_external/ajax/addRootCertificate.php @@ -4,9 +4,23 @@ OCP\JSON::checkAppEnabled('files_external'); $view = \OCP\Files::getStorage("files_external"); $from = $_FILES['rootcert_import']['tmp_name']; -$to = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").$_FILES['rootcert_import']['name']; +$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'; +$to = $path.$_FILES['rootcert_import']['name']; move_uploaded_file($from, $to); +//check if it is a PEM certificate, otherwise convert it if possible +$fh = fopen($to, 'r'); +$data = fread($fh, filesize($to)); +fclose($fh); +if (!strpos($data, 'BEGIN CERTIFICATE')) { + $pem = chunk_split(base64_encode($data), 64, "\n"); + $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n"; + $fh = fopen($to, 'w'); + fwrite($fh, $pem); +} + +OC_Mount_Config::createCertificateBundle(); + header("Location: settings/personal.php"); exit; ?> \ No newline at end of file diff --git a/apps/files_external/ajax/removeRootCertificate.php b/apps/files_external/ajax/removeRootCertificate.php index 05f2fdef2d..a00922f421 100644 --- a/apps/files_external/ajax/removeRootCertificate.php +++ b/apps/files_external/ajax/removeRootCertificate.php @@ -4,6 +4,7 @@ OCP\JSON::checkAppEnabled('files_external'); $view = \OCP\Files::getStorage("files_external"); $cert = $_POST['cert']; -$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").$cert; +$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert; unlink($file); +OC_Mount_Config::createCertificateBundle(); ?> \ No newline at end of file diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 4e82e6b254..5630df77a9 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -244,7 +244,8 @@ class OC_Mount_Config { */ public static function getCertificates() { $view = \OCP\Files::getStorage('files_external'); - $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath(""); + $path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'; + if (!is_dir($path)) mkdir($path); $result = array(); $handle = opendir($path); while (false !== ($file = readdir($handle))) { @@ -252,6 +253,30 @@ class OC_Mount_Config { } return $result; } + + /** + * creates certificate bundle + */ + public static function createCertificateBundle() { + $view = \OCP\Files::getStorage("files_external"); + $path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath(""); + + $certs = OC_Mount_Config::getCertificates(); + $fh_certs = fopen($path."/rootcerts.crt", 'w'); + foreach ($certs as $cert) { + $file=$path.'/uploads/'.$cert; + $fh = fopen($file, "r"); + $data = fread($fh, filesize($file)); + fclose($fh); + if (strpos($data, 'BEGIN CERTIFICATE')) { + fwrite($fh_certs, $data); + } + } + + fclose($fh_certs); + + return true; + } } diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 9b874e62e3..ea6ca65b97 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -45,7 +45,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{ $this->client = new OC_Connector_Sabre_Client($settings); if($caview = \OCP\Files::getStorage('files_external')) { - $this->client->setCurlSettings(array(CURLOPT_CAPATH => \OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath(""))); + $this->client->setCurlSettings(array(CURLOPT_CAINFO => \OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt')); } //create the root folder if necesary $this->mkdir(''); diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 8f8fe8d527..3d65e9b747 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -81,7 +81,7 @@
- + '> diff --git a/lib/connector/sabre/client.php b/lib/connector/sabre/client.php index bcf564c06d..b799b541a0 100644 --- a/lib/connector/sabre/client.php +++ b/lib/connector/sabre/client.php @@ -68,7 +68,7 @@ class OC_Connector_Sabre_Client extends Sabre_DAV_Client { * @return array */ public function request($method, $url = '', $body = null, $headers = array()) { - + $this->curlSettings[CURLOPT_POSTFIELDS] = $body; $url = $this->getAbsoluteUrl($url); From ca26bcc581ed7e19cdd236e0bc2010c4f3008679 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 6 Jul 2012 17:09:20 +0200 Subject: [PATCH 09/64] close file after write process --- apps/files_external/ajax/addRootCertificate.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php index c192855629..c5f49a82d3 100644 --- a/apps/files_external/ajax/addRootCertificate.php +++ b/apps/files_external/ajax/addRootCertificate.php @@ -17,6 +17,7 @@ if (!strpos($data, 'BEGIN CERTIFICATE')) { $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n"; $fh = fopen($to, 'w'); fwrite($fh, $pem); + fclose($fh); } OC_Mount_Config::createCertificateBundle(); From b96753079542d76ef16dcba835de0c4b75158c47 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Fri, 6 Jul 2012 18:42:41 +0200 Subject: [PATCH 10/64] increase the time limit again to a sensible granularity of 1 min. Please talk to me before changing this. --- apps/files_versions/lib/versions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 5611e538ad..4f0ee2c6d5 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -33,7 +33,7 @@ class Storage { const DEFAULTFOLDER='versions'; const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp'; const DEFAULTMAXFILESIZE=1048576; // 10MB - const DEFAULTMININTERVAL=1; // 2 min + const DEFAULTMININTERVAL=60; // 1 min const DEFAULTMAXVERSIONS=50; private $view; From 466d7c0d99eab914960295f27496a9380cd8d125 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 6 Jul 2012 15:51:01 -0400 Subject: [PATCH 11/64] Improvements and bug fix for log reading, fixes bug oc-982 --- lib/log/owncloud.php | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 92914af8fc..42ae7867ff 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -63,25 +63,38 @@ class OC_Log_Owncloud { self::init(); $minLevel=OC_Config::getValue( "loglevel", OC_Log::WARN ); $entries = array(); - $handle = @fopen(self::$logFile, 'r'); + $handle = @fopen(self::$logFile, 'rb'); if ($handle) { - // Just a guess to set the file pointer to the right spot - $maxLineLength = 150; - fseek($handle, -($limit * $maxLineLength + $offset * $maxLineLength), SEEK_END); - // Skip first line, because it is most likely a partial line - fgets($handle); - while (!feof($handle)) { - $line = fgets($handle); - if (!empty($line)) { - $entry = json_decode($line); - if ($entry->level >= $minLevel) { - $entries[] = $entry; + fseek($handle, 0, SEEK_END); + $pos = ftell($handle); + $line = ''; + $entriesCount = 0; + $lines = 0; + // Loop through each character of the file looking for new lines + while ($pos >= 0 && $entriesCount < $limit) { + fseek($handle, $pos); + $ch = fgetc($handle); + if ($ch == "\n" || $pos == 0) { + if ($line != '') { + // Add the first character if at the start of the file, because it doesn't hit the else in the loop + if ($pos == 0) { + $line = $ch.$line; + } + $lines++; + $entry = json_decode($line); + // Add the line as an entry if it is passed the offset and is equal or above the log level + if ($lines > $offset && $entry->level >= $minLevel) { + $entries[] = $entry; + $entriesCount++; + } + $line = ''; } + } else { + $line = $ch.$line; } + $pos--; } fclose($handle); - // Extract the needed entries and reverse the order - $entries = array_reverse(array_slice($entries, -($limit + $offset), $limit)); } return $entries; } From 90e4af312a68049d08d7701e069143387613545a Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 6 Jul 2012 16:38:54 -0400 Subject: [PATCH 12/64] Fix time formatting for minutes, prepend 0 if minutes is less than 10 --- core/js/js.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/js/js.js b/core/js/js.js index d6483b2c22..df834157cd 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -518,5 +518,5 @@ function formatDate(date){ } var monthNames = [ t('files','January'), t('files','February'), t('files','March'), t('files','April'), t('files','May'), t('files','June'), t('files','July'), t('files','August'), t('files','September'), t('files','October'), t('files','November'), t('files','December') ]; - return monthNames[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+', '+((date.getHours()<10)?'0':'')+date.getHours()+':'+date.getMinutes(); + return monthNames[date.getMonth()]+' '+date.getDate()+', '+date.getFullYear()+', '+((date.getHours()<10)?'0':'')+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes(); } From f955e5e9b2ed03137f6c5a264a97500be9107bbe Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 6 Jul 2012 17:29:45 -0400 Subject: [PATCH 13/64] Move line counter so we only count lines towards the offset that are equal or above the log level --- lib/log/owncloud.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/log/owncloud.php b/lib/log/owncloud.php index 42ae7867ff..9eb21832c5 100644 --- a/lib/log/owncloud.php +++ b/lib/log/owncloud.php @@ -80,12 +80,14 @@ class OC_Log_Owncloud { if ($pos == 0) { $line = $ch.$line; } - $lines++; $entry = json_decode($line); // Add the line as an entry if it is passed the offset and is equal or above the log level - if ($lines > $offset && $entry->level >= $minLevel) { - $entries[] = $entry; - $entriesCount++; + if ($entry->level >= $minLevel) { + $lines++; + if ($lines > $offset) { + $entries[] = $entry; + $entriesCount++; + } } $line = ''; } From ec7bb86b2875c9e5afbd7db57de3c872afc3e90b Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 15:00:02 +0200 Subject: [PATCH 14/64] Fixes a problem with the user creation ("User already existed" even if the user don't exists.) Thanks to Phil Reinhardt for pointing this out. --- lib/user.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/user.php b/lib/user.php index d02c1208a8..3029ec1acc 100644 --- a/lib/user.php +++ b/lib/user.php @@ -345,9 +345,8 @@ class OC_User { * @return boolean */ public static function userExists($uid){ - static $user_exists_checked = null; - if (!is_null($user_exists_checked)) { - return $user_exists_checked; + if (!is_null($user_exists_checked)) { + return $user_exists_checked; } foreach(self::$_usedBackends as $backend){ $result=$backend->userExists($uid); From 777eb1d8b1d68f93d986bf2c8280e7416a1694e6 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 15:27:04 +0200 Subject: [PATCH 15/64] CSRF check in the settings --- settings/ajax/changepassword.php | 2 ++ settings/ajax/creategroup.php | 2 ++ settings/ajax/createuser.php | 1 + settings/ajax/disableapp.php | 1 + settings/ajax/enableapp.php | 1 + settings/ajax/lostpassword.php | 2 +- settings/ajax/openid.php | 1 + settings/ajax/removegroup.php | 1 + settings/ajax/removeuser.php | 1 + settings/ajax/setlanguage.php | 1 + settings/ajax/setloglevel.php | 1 + settings/ajax/setquota.php | 1 + settings/ajax/togglegroups.php | 1 + 13 files changed, 15 insertions(+), 1 deletion(-) diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index 860ea98787..604298b1cf 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -9,6 +9,8 @@ $oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:''; // Check if we are a user OC_JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + if( (!OC_Group::inGroup( OC_User::getUser(), 'admin' ) && ($username!=OC_User::getUser() || !OC_User::checkPassword($username,$oldPassword)))) { OC_JSON::error( array( "data" => array( "message" => "Authentication error" ))); exit(); diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php index 57d82e7bd9..3626600ad9 100644 --- a/settings/ajax/creategroup.php +++ b/settings/ajax/creategroup.php @@ -9,6 +9,8 @@ if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )) exit(); } +OCP\JSON::callCheck(); + $groupname = $_POST["groupname"]; // Does the group exist? diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index 6714711bc8..079b4750b7 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -8,6 +8,7 @@ if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )) OC_JSON::error(array("data" => array( "message" => "Authentication error" ))); exit(); } +OCP\JSON::callCheck(); $groups = array(); if( isset( $_POST["groups"] )){ diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php index 53e9be379e..cc00698870 100644 --- a/settings/ajax/disableapp.php +++ b/settings/ajax/disableapp.php @@ -2,6 +2,7 @@ // Init owncloud require_once('../../lib/base.php'); OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); OC_JSON::setContentTypeHeader(); OC_App::disable($_POST['appid']); diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php index cb116ebe4e..bd53a50210 100644 --- a/settings/ajax/enableapp.php +++ b/settings/ajax/enableapp.php @@ -3,6 +3,7 @@ // Init owncloud require_once('../../lib/base.php'); OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); OC_JSON::setContentTypeHeader(); if(OC_App::enable($_POST['appid'])){ diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php index c6df8551f5..68f6b7933e 100644 --- a/settings/ajax/lostpassword.php +++ b/settings/ajax/lostpassword.php @@ -2,8 +2,8 @@ // Init owncloud require_once('../../lib/base.php'); - OC_JSON::checkLoggedIn(); +OCP\JSON::callCheck(); $l=OC_L10N::get('core'); diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php index 58d071255c..883cd52bfe 100644 --- a/settings/ajax/openid.php +++ b/settings/ajax/openid.php @@ -6,6 +6,7 @@ require_once('../../lib/base.php'); $l=OC_L10N::get('settings'); OC_JSON::checkLoggedIn(); +OCP\JSON::callCheck(); OC_JSON::checkAppEnabled('user_openid'); // Get data diff --git a/settings/ajax/removegroup.php b/settings/ajax/removegroup.php index 4d36478189..19cbe51fd5 100644 --- a/settings/ajax/removegroup.php +++ b/settings/ajax/removegroup.php @@ -4,6 +4,7 @@ require_once('../../lib/base.php'); OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); $name = $_POST["groupname"]; diff --git a/settings/ajax/removeuser.php b/settings/ajax/removeuser.php index 2c288997a1..63388b3ca6 100644 --- a/settings/ajax/removeuser.php +++ b/settings/ajax/removeuser.php @@ -4,6 +4,7 @@ require_once('../../lib/base.php'); OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); $username = $_POST["username"]; diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index e3b00c3bc8..6b8c9274e6 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -6,6 +6,7 @@ require_once('../../lib/base.php'); $l=OC_L10N::get('settings'); OC_JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get data diff --git a/settings/ajax/setloglevel.php b/settings/ajax/setloglevel.php index 298cbd6473..4b97ba2aa3 100644 --- a/settings/ajax/setloglevel.php +++ b/settings/ajax/setloglevel.php @@ -7,6 +7,7 @@ require_once('../../lib/base.php'); OC_Util::checkAdminUser(); +OCP\JSON::callCheck(); OC_Config::setValue( 'loglevel', $_POST['level'] ); diff --git a/settings/ajax/setquota.php b/settings/ajax/setquota.php index f59017600a..44c2067824 100644 --- a/settings/ajax/setquota.php +++ b/settings/ajax/setquota.php @@ -9,6 +9,7 @@ require_once('../../lib/base.php'); OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); $username = isset($_POST["username"])?$_POST["username"]:''; diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php index 7773c1049c..a7cdeb2cfb 100644 --- a/settings/ajax/togglegroups.php +++ b/settings/ajax/togglegroups.php @@ -4,6 +4,7 @@ require_once('../../lib/base.php'); OC_JSON::checkAdminUser(); +OCP\JSON::callCheck(); $success = true; $error = "add user to"; From b46d3019ca4ebc346811eb52a7607702d69975a4 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 15:52:49 +0200 Subject: [PATCH 16/64] Uninitialized variable --- lib/user.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/user.php b/lib/user.php index 3029ec1acc..2b4e367ab7 100644 --- a/lib/user.php +++ b/lib/user.php @@ -345,6 +345,7 @@ class OC_User { * @return boolean */ public static function userExists($uid){ + static $user_exists_checked = null; if (!is_null($user_exists_checked)) { return $user_exists_checked; } From c63db28eafbe4745faf44a4774cc857e830939c9 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 15:54:52 +0200 Subject: [PATCH 17/64] CSRF check --- apps/bookmarks/ajax/addBookmark.php | 2 ++ apps/bookmarks/ajax/delBookmark.php | 2 ++ apps/bookmarks/ajax/editBookmark.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/apps/bookmarks/ajax/addBookmark.php b/apps/bookmarks/ajax/addBookmark.php index 6b5a0f71d4..483716405a 100644 --- a/apps/bookmarks/ajax/addBookmark.php +++ b/apps/bookmarks/ajax/addBookmark.php @@ -28,6 +28,8 @@ $RUNTIME_NOSETUPFS=true; // Check if we are a user OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + OCP\JSON::checkAppEnabled('bookmarks'); require_once(OC_App::getAppPath('bookmarks').'/bookmarksHelper.php'); diff --git a/apps/bookmarks/ajax/delBookmark.php b/apps/bookmarks/ajax/delBookmark.php index 5a067701c9..f40f02ebab 100644 --- a/apps/bookmarks/ajax/delBookmark.php +++ b/apps/bookmarks/ajax/delBookmark.php @@ -28,6 +28,8 @@ $RUNTIME_NOSETUPFS=true; // Check if we are a user OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + OCP\JSON::checkAppEnabled('bookmarks'); $id = $_POST['id']; diff --git a/apps/bookmarks/ajax/editBookmark.php b/apps/bookmarks/ajax/editBookmark.php index 439b680dc2..0b37d161af 100644 --- a/apps/bookmarks/ajax/editBookmark.php +++ b/apps/bookmarks/ajax/editBookmark.php @@ -28,6 +28,8 @@ $RUNTIME_NOSETUPFS=true; // Check if we are a user OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + OCP\JSON::checkAppEnabled('bookmarks'); $CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" ); From 0abcf0a421e26a17de00d3bf3a890da1f1689c16 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 15:58:11 +0200 Subject: [PATCH 18/64] CSRF checks --- apps/files/ajax/delete.php | 1 + apps/files/ajax/move.php | 1 + apps/files/ajax/newfile.php | 1 + apps/files/ajax/newfolder.php | 1 + apps/files/ajax/rename.php | 1 + apps/files/ajax/upload.php | 1 + 6 files changed, 6 insertions(+) diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index ed155de0dc..161d820f73 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -4,6 +4,7 @@ OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get data $dir = stripslashes($_GET["dir"]); diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 945fe4e7b8..56171dd0ed 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -4,6 +4,7 @@ OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get data $dir = stripslashes($_GET["dir"]); diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index edb7841487..7236deb65c 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -4,6 +4,7 @@ OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get the params $dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : ''; diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php index c5c37914c6..ae92bcf09b 100644 --- a/apps/files/ajax/newfolder.php +++ b/apps/files/ajax/newfolder.php @@ -4,6 +4,7 @@ OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get the params $dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : ''; diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index e2fa3d54a6..8e98308eb5 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -4,6 +4,7 @@ OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get data $dir = stripslashes($_GET["dir"]); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index b779924cfb..5553cf5a13 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -7,6 +7,7 @@ OCP\JSON::setContentTypeHeader('text/plain'); OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); if (!isset($_FILES['files'])) { OCP\JSON::error(array("data" => array( "message" => "No file was uploaded. Unknown error" ))); From b7c510a61a5eaeba76284628fe76fc60b7035aed Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 16:02:33 +0200 Subject: [PATCH 19/64] CSRF checks --- apps/external/ajax/setsites.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/external/ajax/setsites.php b/apps/external/ajax/setsites.php index 772863974a..188e71e891 100644 --- a/apps/external/ajax/setsites.php +++ b/apps/external/ajax/setsites.php @@ -8,6 +8,7 @@ OCP\User::checkAdminUser(); +OCP\JSON::callCheck(); $sites = array(); for ($i = 0; $i < sizeof($_POST['site_name']); $i++) { From 04a0755fd364b16bfb461382b1409fbb6336a359 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 16:03:21 +0200 Subject: [PATCH 20/64] CSRF checks --- apps/files_sharing/ajax/email.php | 2 ++ apps/files_sharing/ajax/setpermissions.php | 1 + apps/files_sharing/ajax/share.php | 1 + apps/files_sharing/ajax/unshare.php | 1 + 4 files changed, 5 insertions(+) diff --git a/apps/files_sharing/ajax/email.php b/apps/files_sharing/ajax/email.php index 523c3d2078..e1dccb7d0f 100644 --- a/apps/files_sharing/ajax/email.php +++ b/apps/files_sharing/ajax/email.php @@ -1,6 +1,8 @@ Date: Sat, 7 Jul 2012 16:08:27 +0200 Subject: [PATCH 21/64] CSRF checks --- apps/files_texteditor/ajax/savefile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_texteditor/ajax/savefile.php b/apps/files_texteditor/ajax/savefile.php index 961db7105e..f3ac323e32 100644 --- a/apps/files_texteditor/ajax/savefile.php +++ b/apps/files_texteditor/ajax/savefile.php @@ -26,6 +26,7 @@ // Check if we are a user OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); // Get paramteres $filecontents = isset($_POST['filecontents']) ? $_POST['filecontents'] : false; From ea70ca3ce3cbbaac0e24e30304f44dfc37c11f56 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 7 Jul 2012 16:12:21 +0200 Subject: [PATCH 22/64] CSRF checks --- apps/files_external/ajax/addMountPoint.php | 2 ++ apps/files_external/ajax/removeMountPoint.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apps/files_external/ajax/addMountPoint.php b/apps/files_external/ajax/addMountPoint.php index 549cb6a342..0eedfdb333 100644 --- a/apps/files_external/ajax/addMountPoint.php +++ b/apps/files_external/ajax/addMountPoint.php @@ -1,6 +1,8 @@ Date: Sun, 8 Jul 2012 13:28:12 +0200 Subject: [PATCH 23/64] Add missing requesttoken. --- apps/contacts/ajax/importaddressbook.php | 1 + apps/contacts/templates/part.importaddressbook.php | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/contacts/ajax/importaddressbook.php b/apps/contacts/ajax/importaddressbook.php index f93bbfa4d9..3c01e24a18 100644 --- a/apps/contacts/ajax/importaddressbook.php +++ b/apps/contacts/ajax/importaddressbook.php @@ -18,6 +18,7 @@ $maxUploadFilesize = min($maxUploadFilesize ,$freeSpace); $tmpl = new OCP\Template('contacts', 'part.importaddressbook'); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); +$tmpl->assign('requesttoken', $_SERVER['HTTP_REQUESTTOKEN']); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->printpage(); ?> diff --git a/apps/contacts/templates/part.importaddressbook.php b/apps/contacts/templates/part.importaddressbook.php index 01f8dd77d0..8ceb5f3538 100644 --- a/apps/contacts/templates/part.importaddressbook.php +++ b/apps/contacts/templates/part.importaddressbook.php @@ -12,6 +12,7 @@
t('Select address book to import to:') ?>
+ '> From 77f07c672e5f98396eac70046b848d9ad0c2dc61 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 9 Jul 2012 12:49:04 +0200 Subject: [PATCH 40/64] remove hard coded path --- apps/files_external/templates/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 7639fe0513..e8bc94790d 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -1,4 +1,4 @@ - +
t('External Storage'); ?>
'> From 6f408c36516638c3dceb86582823eb312a0bbc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 4 Jul 2012 23:36:49 +0200 Subject: [PATCH 41/64] add supersized slideshow --- apps/gallery/css/supersized.css | 25 + apps/gallery/css/supersized.shutter.css | 74 ++ apps/gallery/img/supersized/back.png | Bin 0 -> 2629 bytes apps/gallery/img/supersized/bg-black.png | Bin 0 -> 1074 bytes apps/gallery/img/supersized/bg-hover.png | Bin 0 -> 960 bytes .../img/supersized/button-tray-down.png | Bin 0 -> 1506 bytes .../gallery/img/supersized/button-tray-up.png | Bin 0 -> 1466 bytes apps/gallery/img/supersized/forward.png | Bin 0 -> 2614 bytes apps/gallery/img/supersized/nav-bg.png | Bin 0 -> 995 bytes apps/gallery/img/supersized/nav-dot.png | Bin 0 -> 1901 bytes apps/gallery/img/supersized/pause.png | Bin 0 -> 1131 bytes apps/gallery/img/supersized/play.png | Bin 0 -> 1562 bytes apps/gallery/img/supersized/progress-back.png | Bin 0 -> 929 bytes apps/gallery/img/supersized/progress-bar.png | Bin 0 -> 929 bytes apps/gallery/img/supersized/progress.gif | Bin 0 -> 2608 bytes .../img/supersized/supersized-logo.png | Bin 0 -> 3982 bytes apps/gallery/img/supersized/thumb-back.png | Bin 0 -> 2122 bytes apps/gallery/img/supersized/thumb-forward.png | Bin 0 -> 2118 bytes apps/gallery/index.php | 6 + apps/gallery/js/jquery.easing.min.js | 71 ++ apps/gallery/js/slideshow.js | 58 ++ apps/gallery/js/supersized.3.2.7.js | 930 ++++++++++++++++++ apps/gallery/js/supersized.3.2.7.min.js | 13 + apps/gallery/js/supersized.shutter.js | 337 +++++++ apps/gallery/js/supersized.shutter.min.js | 14 + apps/gallery/templates/index.php | 52 +- 26 files changed, 1579 insertions(+), 1 deletion(-) create mode 100644 apps/gallery/css/supersized.css create mode 100644 apps/gallery/css/supersized.shutter.css create mode 100644 apps/gallery/img/supersized/back.png create mode 100644 apps/gallery/img/supersized/bg-black.png create mode 100644 apps/gallery/img/supersized/bg-hover.png create mode 100644 apps/gallery/img/supersized/button-tray-down.png create mode 100644 apps/gallery/img/supersized/button-tray-up.png create mode 100644 apps/gallery/img/supersized/forward.png create mode 100644 apps/gallery/img/supersized/nav-bg.png create mode 100644 apps/gallery/img/supersized/nav-dot.png create mode 100644 apps/gallery/img/supersized/pause.png create mode 100644 apps/gallery/img/supersized/play.png create mode 100644 apps/gallery/img/supersized/progress-back.png create mode 100644 apps/gallery/img/supersized/progress-bar.png create mode 100644 apps/gallery/img/supersized/progress.gif create mode 100644 apps/gallery/img/supersized/supersized-logo.png create mode 100644 apps/gallery/img/supersized/thumb-back.png create mode 100644 apps/gallery/img/supersized/thumb-forward.png create mode 100644 apps/gallery/js/jquery.easing.min.js create mode 100644 apps/gallery/js/slideshow.js create mode 100644 apps/gallery/js/supersized.3.2.7.js create mode 100644 apps/gallery/js/supersized.3.2.7.min.js create mode 100644 apps/gallery/js/supersized.shutter.js create mode 100644 apps/gallery/js/supersized.shutter.min.js diff --git a/apps/gallery/css/supersized.css b/apps/gallery/css/supersized.css new file mode 100644 index 0000000000..617f501120 --- /dev/null +++ b/apps/gallery/css/supersized.css @@ -0,0 +1,25 @@ +/* + + Supersized - Fullscreen Slideshow jQuery Plugin + Version : 3.2.7 + Site : www.buildinternet.com/project/supersized + + Author : Sam Dunn + Company : One Mighty Roar (www.onemightyroar.com) + License : MIT License / GPL License + +*/ +#supersized-loader { display:none; position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center;} + +#supersized { visibility:hidden; display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:200; height:100%; width:100%; } +#supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; } +#supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/ +#supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; } /*Quality*/ + +#supersized li { display:block; list-style:none; z-index:150; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; } +#supersized a { width:100%; height:100%; display:block; } +#supersized li.prevslide { z-index:160; } +#supersized li.activeslide { z-index:170; } +#supersized li.image-loading { background:#111 url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center; width:100%; height:100%; } +#supersized li.image-loading img{ visibility:hidden; } +#supersized li.prevslide img, #supersized li.activeslide img{ display:inline; } diff --git a/apps/gallery/css/supersized.shutter.css b/apps/gallery/css/supersized.shutter.css new file mode 100644 index 0000000000..0084d4bb9c --- /dev/null +++ b/apps/gallery/css/supersized.shutter.css @@ -0,0 +1,74 @@ +/* + + Supersized - Fullscreen Slideshow jQuery Plugin + Version : 3.2.7 + Site : www.buildinternet.com/project/supersized + + Theme : Shutter 1.2 + Author : Sam Dunn + Company : One Mighty Roar (www.onemightyroar.com) + License : MIT License / GPL License + +*/ + +/* Controls Bar +----------------------------*/ +#slideshow-controls-wrapper { margin:0 auto; height:42px; width:100%; bottom:0px; left:0; z-index:204; background:url('%appswebroot%/gallery/img/supersized/nav-bg.png') repeat-x; position:fixed; } +#slideshow-controls { overflow:hidden; height:100%; position:relative; text-align:left; z-index:205; } +#slidecounter { float:left; color:#999; font:14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 0 -1px 0; margin:0px 10px 0 15px; line-height:42px; } +#slidecaption { overflow:hidden; float:left; color:#FFF; font:400 14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 1px 1px 2px; margin:0 20px 0 0; line-height:42px; } + +/*#navigation { float:right; margin:0px 20px 0 0; }*/ +#play-button{ float:left; margin-top:1px;border-right:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } +#play-button:hover{ background-position:0 1px; cursor:pointer; } + +#prevslide, #nextslide{ position:fixed; height:43px; width:43px; top:50%; margin-top:-21px; opacity:0.6; z-index:204; } +#prevslide{ left:10px; background:url('%appswebroot%/gallery/img/supersized/back.png'); } +#nextslide{ right:10px; background:url('%appswebroot%/gallery/img/supersized/forward.png'); } +#prevslide:active, #nextslide:active{ margin-top:-19px; } +#prevslide:hover, #nextslide:hover{ cursor:pointer; } + +ul#slide-list{ padding:15px 0; float:left; position:absolute; left:50%; } +ul#slide-list li{ list-style:none; width:12px; height:12px; float:left; margin:0 5px 0 0; } +ul#slide-list li.current-slide a, ul#slide-list li.current-slide a:hover{ background-position:0 0px; } +ul#slide-list li a{ display:block; width:12px; height:12px; background:url('%appswebroot%/gallery/img/supersized/nav-dot.png') no-repeat 0 -24px; } +ul#slide-list li a:hover{ background-position:0 -12px; cursor:pointer; } + +#tray-button{ float:right; margin-top:1px; border-left:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } +#tray-button:hover{ background-position:0 1px; cursor:pointer; } + + +/* Progress Bar +----------------------------*/ +#progress-back{ z-index:205; position:fixed; bottom:42px; left:0; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-back.png') repeat-x; } +#progress-bar{ position:relative; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-bar.png') repeat-x; } + + +/* Thumbnail Navigation +----------------------------*/ +#nextthumb,#prevthumb { z-index:202; display:none; position:fixed; bottom:61px; height:75px; width:100px; overflow:hidden; background:#ddd; border:1px solid #fff; -webkit-box-shadow:0 0 5px #000; } +#nextthumb { right:12px; } +#prevthumb { left:12px; } +#nextthumb img, #prevthumb img { width:150px; height:auto; } +#nextthumb:active, #prevthumb:active { bottom:59px; } +#nextthumb:hover, #prevthumb:hover { cursor:pointer; } + + +/* Thumbnail Tray +----------------------------*/ +#thumb-tray{ position:fixed; z-index:203; bottom:0; left:0; background:url('%appswebroot%/gallery/img/supersized/bg-black.png'); height:150px; width:100%; overflow:hidden; text-align:center; -moz-box-shadow: 0px 0px 4px #000; -webkit-box-shadow: 0px 0px 4px #000; box-shadow: 0px 0px 4px #000; } + +#thumb-back, #thumb-forward{ position:absolute; z-index:5; bottom:42px; height:108px; width:40px; } +#thumb-back{ left:0; background: url('%appswebroot%/gallery/img/supersized/thumb-back.png') no-repeat center center;} +#thumb-forward{ right:0; background:url('%appswebroot%/gallery/img/supersized/thumb-forward.png') no-repeat center center;} +#thumb-back:hover, #thumb-forward:hover{ cursor:pointer; background-color:rgba(256,256,256, 0.1); } +#thumb-back:hover{ border-right:1px solid rgba(256,256,256, 0.2); } +#thumb-forward:hover{ border-left:1px solid rgba(256,256,256, 0.2); } + + +ul#thumb-list{ display:inline-block; list-style:none; position:relative; left:0px; padding:0 0px; } +ul#thumb-list li{ background:#111; list-style:none; display:inline; width:150px; height:108px; overflow:hidden; float:left; margin:0; } +ul#thumb-list li img { width:200px; height:auto; opacity:0.5; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter:alpha(opacity=60); -webkit-transition: all 100ms ease-in-out; -moz-transition: all 100ms ease-in-out; -o-transition: all 100ms ease-in-out; -ms-transition: all 100ms ease-in-out; transition: all 100ms ease-in-out; } +ul#thumb-list li.current-thumb img, ul#thumb-list li:hover img{ opacity:1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); } +ul#thumb-list li:hover{ cursor:pointer; } + diff --git a/apps/gallery/img/supersized/back.png b/apps/gallery/img/supersized/back.png new file mode 100644 index 0000000000000000000000000000000000000000..44cd0ae703cb0810dc707f0da621708e14018fdd GIT binary patch literal 2629 zcmaJ@dpuO>A0F3o+aeX(G|iyI+%TA77Hfv2L1SWEYK@u0Ok*x)&NM@_Qi_$7%C$9; zlxisawxrFqWYbRCLb64+63eQnNM=lMSG`#$IMIq5+GzDD{M z`Y;&G$ZsQ=2K9Ce&thHZ-M=lq5$eoA3Ihxl#(*-W7=U@Ph0y@qkI#$+XaJL)5Pu7B zhrzTETsi|}P&X4I!))@fr!PzKQ;tZ zP0WrV(#Sp^Ye6#-f&+pgA_gOq$m4#vZ& zOcqzLF#mw3Qi*;73CI+%06#Jb0V$xlTsHArikFi&#Tn~F#(Lp!6s)U{E7=u~#Z&O! zSVyd**C#Gn$dd8_0r-i_{+EmUB6lGQd=XTc42Zcq0k)4=$cKN}GLid5FL=rq^*(ah zU-W|a`63qsnZYbv?0;SKrzI#o3&YQ`g(jba4+x;Ni=kN0Z5V;REZtf^vKL+6(^0T% zb8x6xW8iJRL5@`Ce6nW1ddVuYy_iV2R*b^R=DLTCR!zaL=-{Y!;-!c09yl{%4X;|m z=bEZtwLSuINY;PQXK zN=bby!6ffCMRTbxUGJ(k{i_XHMkhnv*85*{zUz0_HYlw@={K`)YYJM+=}`hD%v?+8jUvRU}jj6o}Rw*@ciX1gXvL?KEYCdsZ{zVec8IPsp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)YME_RMSDt zv)c^gA|oH29)57~glQaMR=sE+(~A(iGU{eapwXNEoQhI!mq>y=7(24B`fV9CAZU+V zpQteXDV(oY%4s@lYIW`Oq>f+8US83riA}z~t>4?}WNXZMhlM>19n4C}dQjrZO|wrb z!eFBsx*J^3Ye&{U_P3s#oRp1?jcu?b&*mIEHm>uoJyw~0d)OxJz^E|3ntT6@Qms~J zgdAFDV^bs)3g>B};WHwCuy?h2enZQX)hiUIv_cy62DqnNODqa`$5Q5vJq$~$s;cz+ z+kEvv(5c_@@7=pMR@xGszQ1HkW+#drwd04#6&vG5J&(t3 zQFUr%WzTT2W<3z7+#uo1tGmiB_v{x@6LiaG^UHj6_~T^zdI*O7=WW=#AiIv)C>VOowC z`*XZusC6%-rf1>0u5nC(cN|;Q^EJ657nPixt%+h4DSA;Z=L&_Il#@{vWtUu?SYsD^ zbjh{PxaGCncobZpMb>fP+`@J(ATFGjtUBv+k=N=ixc2&7ifg$7OGbz<_K%BR9)K+2<_rts7dGKN<@#N0-^V{(&u2&oStE)He{RXOzJiGt^ literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/bg-hover.png b/apps/gallery/img/supersized/bg-hover.png new file mode 100644 index 0000000000000000000000000000000000000000..1ca2022e106454b787657cecabc88aa30eb744fb GIT binary patch literal 960 zcmaJ=zi-n(7 zAjH(pAXQ>uhk=EWfdwHkv9nb4AE>$^!N569(hez>&UfGGz4yKQ?z@BP?t`_}+p8SM ztyOl^8k?8cfY+|F|GW678*I8owI;2THXRy1<_Z>RVNh|54z6Lt8a?@r^Bi{t+Knb{ z>JMd;IJ^;I_|Wkfo8$7^p=X#qOhF5GY*&FNpT9t0TMB$6=}7lVxNGl>eOw>!Hq3F) z%vo^zKFEhM6L2s!Kx7u<|El+c?NP%5SJy{Tj!y!LR^2F~5VlJ19 zG!lt8L&SrTON}t@2C45$K`)3YNu-dxrVre$IU6GFoiL>@&) zngMnF|4_%7qXSyQ=YAIo2aS=3g&GdXz&F{&wPR5#PcHe`pu}$w(w|ka+9i|(UE+aK zT>`pc+HMq2@VYKn+<+Rci7ToCnF4RymRwAUITfX|DK%XdMGa-kSv4ymNs~$_iIRmG zS0(1a!7iO~t#fYfQf|}=j>j^q*tefztLzg8OpYwu3%rzzny5)>mFblhdpYA;3%pFZ z+NE59nGvFky>QX9E!I8Ja^AKqm^VIlS-1PFtsBDQ59~>#Dr%t-{%oypZ2bN4m0J!E zj==He{_pE|UcB5t0moZ+Pj7CXt{g7ET{`;pE!O|DvcAW?dA{}R(0czmdQ%l`SN&Mr Gd-V^>d@1<= literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/button-tray-down.png b/apps/gallery/img/supersized/button-tray-down.png new file mode 100644 index 0000000000000000000000000000000000000000..99b92aef122f08800dd80bd79b92fd7d2293a692 GIT binary patch literal 1506 zcmeAS@N?(olHy`uVBq!ia0vp^W8U}fi7AzZCsS=07?_nZLn2Bde0{8v^Ko2Tt~skz|cV7z)0WFNY~KZ%Gk)tz(4^Clz_GsrKDK}xwt{?0`hE?GD=Dctn~HE z%ggo3jrH=2()A53EiFN27#ZmTRp=I1=9MH?=;jqG!%T2VElw`VEGWs$&r<-In3$Ab zT4JjNbScCOxdm`z^NOLt1Pn0!io^naLp=kKmtYEgeeo;J&4sHjE(uCSxEHIz#UYgi zsro^w#rdU0$-sz9QwCX8VC7ttnpl!w6q28x0}I7~jQo=P;*9(P1?ON>1>eNv%sdbu ztlrnx$}_LHBrz{J)zigR321^|W@d_&lew#fv9XJ@sez-3p`ojRql=}frKO{(g{8BL zk%@^BOs`9Ra%paAUI|QZ3PP_7PQ9R{kXrz>*(J3ovn(~mttdZN0qkX~Oe}6OF)=nU zH#IfKX&zK>3Kq9O^;+Q6s}FRHJ}6?5A{r(HOg$hbJlO&{@Pwb52Tbinz+^32Cga7x zz!c``;uunK>&*=RY~etWqxqMFR%?iu>%LS!;TO}Xva9SWe}JHLhWR6}g2aF`>$VBq zEm?TX$?NF0?gVkJsHO=&)VaM)6U3BC1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!)UOOi;y!I-Ysnocez5 zi|Y2@|Mxfjdf##3oC{$qk1n3`TuAj;*i&91w=yH?+21aH?A-gk{5~IBb526Yk{KsL zLMCLTtbCmO{KbzSDl^i=Z02c2oX^?xJ9DC@Cik4{?OU>EO^b^?-7xiZW8$pvFYb#j z*b8_*`1^Ib%CWG6%~uq-jpKs?f}`2n67MA@7D|@Hrh8xi8gxV?&fuBz!(|80Z?u>r zd6T`OmeHebuIRK$n;L#b9Lxv|EzLCB%Mp2cm*>IXU%t3LaE`7P`v3p%*`zmXvu#-S z^Yb2G@Gkam=)sDfl_^}S_QZw#i@vK>Hn-{iD`}~Ad)~f=nOnOa@xKs|o}KXc`CK2* z8w{%TmJBo692TR+MVm(#Z}1X%{%kax;Em3<|lbemv0mI2>+ciIZ11M2V>n;uN%gddg%q{ zCN|wZvMyTq=e75Xjyu-r7UV3q%25A4mdKI;Vst07H-=f&c&j literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/forward.png b/apps/gallery/img/supersized/forward.png new file mode 100644 index 0000000000000000000000000000000000000000..e2084ab3fafe805cc4fa302bc4d2723932fba46f GIT binary patch literal 2614 zcmaJ@eLRzU8($VV6g`NFm?i0CZ?rHbX5L~FE8;kr?Z()f+t?<`OC`}ES&EoWgw2Fb zDRiQxx3lOC6_tfT<)x0}-SbSRI?o?Z&;9w__wRRIpYQj3UDxlrexJ{s;p^kRLSwB4 z1Oi#%=|S{UuA3KMbv5Nz5fam^T-I=11G)a}a4wGm0uW~!I}Ct%GAR*&A3&iAV(tPC z5C{}bCkJu^N!~arn~9_>Vvu|$N6Cgj9JcW}6lyfUg@pkTbQT^y+ISrfqto#404xbj z;5{$bfe&~&k$}j z9{zVyfh1p;3mXJrSR@)jMQ=sJwqlSN>n%1mHkL3eGzN`ATcI#k2#gKR+6sq8!@fLl zWi*f$j`JhBeTk*C@bE}3mxDv0csw4GXN_co5h#qEo!z2_l@&sXK*S1ITnZn-ie3Lz zfe6G>K{|&^XR~07ij**R92XB)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?giC|GS4pYSGHA%IsUf$Pm!5YsnH{9&7D>52R$Gqv ze^e}Uznjq>^d6F4VmvRYCIcsd~gEOK#v^vb7?O|<;7XBEcwUhOtlLGkJ61t^N~RGMdtu(zLWKuMNZ zdbX7fPmPDyO_vcKJ$pt`xw9#`=$2wxvtaj5cDI|cT4%DCy0|c7hl`7g&Qn3b)J;UP z`8xh&Nz(_3KP|MxB>j1Ea#n$s*z7`-hEKIuK2lg-R<>tIvVX*3c1!&UfJSS=I5?bX zr)uZ7f zPng8OWxM7B`+qgYqo>< zfrp`@;6+4FdJ>%AX|SOl1QCazhaEh4^5_S6R`8{3I}g^t%X|OF@AvzEzSZL7nf|`x zeH_R28xwko?R(f7>OH{zk57I?Y&%BtRaz!>7Rp!M<0TVT&ACB4w{#VnPtQR*wA*l09_MoJ*T zyeMU}*;pf)OfWT9c$a94U+kd z@`?uc&h#8KZv9>#*gUj<=H`v}*~3SV+}XIcwRIxbw|#bM_`%&Lmrh?-r}g_w>t7x| n|JJ*DVdLqqo~_Ln_3gwf?oD|*`uX|YTKw#c{G`4%K6CXCqme#T literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/nav-dot.png b/apps/gallery/img/supersized/nav-dot.png new file mode 100644 index 0000000000000000000000000000000000000000..a28a50789f37f6afc9abc8b1495c76cacf7a1889 GIT binary patch literal 1901 zcmaJ?c~BEq9F8ecjRB?=6-CH4K`|PVYzX8a!6E^TArTTRp-N$stPo+dFWN~D-B{56QMxm`@BQ9<-}gJ;Y<{$2 zsT*kyi9jH@Nta2K_)5lKzbUTx_uRJbAMj;17NN#e=o%~&GQor}9jbu=DFP+KN*K~* zt-A<|2!wa2`dBrlmPZM-D8huC7^Vd=;%ovzwAf;Vw5c!#Xy9bMK};R`zK#m$bz*8< zken?yhQlfPW!WZJm92=?W~XWeI_lz3Kx7f(0tk#jfCWi2n1vQG^|h`L-#d?4RNyrP zOBGZ92}&)G2EtJj3c8F+FMkoQjYJO~=GkJkozsK#Xr>4d$^j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Kku8!fmFF4%j9K@hFec{A?d)l#Wn}~2 z-rjI&dw2ID%^gvB+tS{wz9Npp-k_jE*6KH$-AYAEs@Rc5T4P;_~~mwSN(WVQd$ zBT!EeODQdtMrpB?Q=smbU5ww+P0S{U`Uc08l`KGHH|W(2p89m>9z|*@Pj!YwMl|Cf zqqP()&{1ehDTS;ORjGy;S?_RIKnF-B9X)5*oWoNKx*T4++cZTkKv0&aew#{*?PMHU zfDHK=pTdM0GR*qfU~ME4*-i!+mZ6yd%?5mIgbM~Zh9Qd|g|k^|4<`xD#auYzsSH9U zN7MOy-k%Tpq18*X(P-4w2n2i>;j{Y z1!M%R6ok1_727iqK|2FYGTsp)MOo1dH(tPtB9}C5BpV7y3Ot1s{F@GW)yIxLyj5|n=EmyB*VpW= zB|OaWCEhM#>C4%!`I=Q1`i2LdjU5`Dv^%|<-hcTT{Kq1`*u;Blzw2cG3mV9I5$5!*gJl3!)*Ih@Oi_}p^CNli{4^$ ZE4zq&)l;5ihI!yV|74;~xY^Wo;umj`cl`hW literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/play.png b/apps/gallery/img/supersized/play.png new file mode 100644 index 0000000000000000000000000000000000000000..16e53f8674546f9d1530ef1b29a8559eaa948386 GIT binary patch literal 1562 zcmaJ>eM}Q)96mrN;!uJJbu;F;#^|u^-4)u>h9YgR*vbyDR6!ibaXsKB*DKe97Fnif zG%bFjGEwKZLzzl~I(2kv7RBLoo2ELQi4J8Zn4ufQZ-(xQ6!!=2lDqf)y?LJJ_q^}> zJn#bqiA8SaKkr4rm%*{9iHUOl|aytleF~x($R4HxOLVx+rLLhC^ zLb(bY!5s#wj5aOdsGKF4R&vQ=Qf-4~rGhDLjUd2KJOR3ya=TOG)&T2bPxTSWdIH-V8PLiV? zJk8p{fFe=MR`Oa%aQbEojAK~V?i@NM;lN-w;eb&Y64+7@h~xhcWtd^KlebWB{f;Q? zv{pMP*g`qkN{$pRu0$MY<lZDwg>7#JdSJ3 zb|+8RNy?0AAwfY#(>9IXkc_I-iX;`5oQ|SKBpF3fy+WC&Ga{HyZcqlf7)w?%l${T9 zZEv}XcX9(!U>rhcjN<4j%9hTt3^=%D4LyRFL`2Pd?VmSDeT}V3@h_%0}6aYfknK7N!eXFMt&zh(cE&ClenR5J_ zroZpaRp_!_MZB&ZGvVH7S@+d_DB9ckJqCU=YE49Jetw3bUR1x~V4mNa|L|zf(U=6! zN=tm2&-d{8c>9`O@wG?C?H9}YY_2=Ew_f(YXh{pN-B&esdD*X2nOI#E{DBDQyIVw`bH%TDnNKrAQK^*Qq4Z=5r-+JJh1*RTFFCGOP_QNWQM?O4!lwqT~x5eZDRD z`NE$rNE*-qE@JBL-7}hgCgq`o1^@s6 literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/progress-back.png b/apps/gallery/img/supersized/progress-back.png new file mode 100644 index 0000000000000000000000000000000000000000..68cd45b6706bc9b1870d83842c89fc3423429a67 GIT binary patch literal 929 zcmaJ=J#W)M7nbtU%MX+CVll+;eBB^*UbBr^75UlS{}&pls=6EUD} zY%Kf*M*aW;BVuJj%6lLE#b9-Xn5o>q% zzWCP<-#5kfn74+!PcQf!Gomy@IwHV}@tE`o4i{HnNkdWY!e}t$L;r;p&{)M1qvmlc z*ox9P$x|Fm2?rxGjuIRG`t%usD74|rijVx%A(QBA$w+_M83fB|V21GIDQM)D5QquK zAdfGT%*t)J(zV1{UTYAnAbe`Wo1lh%7dVs=P*G7SKve{)x~i9tYqi=FU?3f7$k247 zq}QynVIc(89~9nLcwzP2_S%=QY&hXOwKQ!$pR4n-O4(S`P1BSbhEWoTQnpAq&Pz#l zR4BM43s{u$h$cWP;t`#38;VG8Qi#)yY?7_ZBnqbGIMs9&$&?D9@Bbef#~XCUd*n9W ze+p-VMM|_D$>@v)qHz~T(p73Xj9^aLfYQsNiroq2G@H;AIQ zBp{w^L!qEXQD_-v)2tdb_t-^kU2ma!yYAL2sM4x9sEo?Zg6q;?7L$Y*-0+s$+RBxq z5U0YkOIY-Zgl$G+uu9pAw#Rb1Rd3A=x5wgaXGL*2lKm;pN&$wwzUX_W*k_SSa*Ucq ziDWBE^*Bq2KcNB)=qQYB`0MKh1Yuyq=cb3eq)x}-$%51FqSf;k6WpuoQ@> zARvp*;}mB$T3Bv{jCvza<8sf>>_-LkA)!!U{xQB3EtAXza^ z57r6}O?@6FB4jbh70G~2g$-q-S1ClvMmA1YWs(KcGLmSzit?1!K+pR>G>SIpRCMTd zy#EwVd-H^99h$N!_hsXT2f3>R*EuDE@g8I6>ngU#Ot5s!5>W4&z$1Pb=k^lsdDx9p zL1Le}jt!-P8ioNjteSOXRP;j!HFdp#D$R;hF_GCY>!^fEwKdma{xqVoSaXAGuCbMy zk3y74&kp6`YZ^2;i@-8v9Bz%J+}x_S;s)DeL0h?+3`WZv`&XmaS8{st<7RB7u^D_C z%W3CwtY3UOdn%vAJ=dxAvLA!rmzNiXyM;SHA1F6(D{sCRPTxQK@-crjZlmRVe*E(7 E9|9d3=>Px# literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/progress.gif b/apps/gallery/img/supersized/progress.gif new file mode 100644 index 0000000000000000000000000000000000000000..f3e45e0569c02ae3fe7114691e5b5aba892e9ef4 GIT binary patch literal 2608 zcmdVcdr(tX9tZGC9yiG~=H_)naswe?Kn8g&RT|OlKrRHxN(e$}*dR-|NeGA`|R>g+BX>~=c+qutq=_K%)F z?q6r--1*G!e7`3)UM^j)^#Z(ruYu*Yw6w(I@d5(_WipvcrAkjv_wn(O%jG(q4nS4yLK%~ij76zp!h%DIZmvVT|BYh#daYTn6Yt3}8^zjO zZ9(1+tu8ocyI}|5{ftC|T)P67e`gs10GA?*O>ta0l}s$ovPwiF9p-{aN%w1!`U_6! zE6JVvi-WfIr&q1sm>zo7uofN3B%)6&Zwa9g6ev_@7a@CABtbi9C29r?F#&?R05u+= zL(#fY8jGzJf}Ul1Qc5AvynAaQMV6{(adu-ImWf(dc&ZO$7s^eH!6b$$)}$K6U{jpw z%=OczcvGz%V44)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J5xZt;Z&8V{`Ar4Q6lQ$s!D;r00a5b)XLl28)Ix7&Eh-!WoKun?Cf1|DjJR6 z9$`V~`4^ZhDR5uWSo~PM5Odi6lwx-Jsf@Pr>Z^I?2Bj%|nycb9xURGxk3(XaBV*ep zwx8h!D4O)q^#tU2g|owsl(tR<)`g2{gC9_aXL4_TGoNu(7GyNh7~^NYY%C0&6_7@d z!&+|$aupR7wK2b9J)fbno|YRq4O==G6bi+0!smg`Np3|a!3%Iwp8s2sLs=K$jNQlu zT2Q&nhh4>`bn&$bkt+``Rb?05!}Y@Xfz=I@XLx?R9~dC5XKn6MrzDALrXV_IA^6YE z2|d@p4^y0-=`y_;a782xwyHH9+CMrf#W{m)AHQBLPIho`*qrIQD;7~QHt~H(LpT?n z%@{3pe0CgQLe5W3bm#1jc+=82(4v^N@wq>rUQzgITDS?rJC3~{(Y6Tl?UuSTP@Fa& zy!rLR%eaJ{QKsj z+qL=m`IQ9)1$VzM4Yiltkp+P!&u-P5i*C7G$0%d5*p<_hNg|Jue4yeet@bkc zi)GGDdjgE@^G>Gli@f7K&%SoFDKu`rdNm&s{Qw;2q!a}C%lKz0);1gxE)?aTNS^KGuQm(A6{hT-OR`!Ku(Qi3#N7k)_6G;6 j&g^9aGoo|$AkBd0PdAhLVBZe@ya8tDb4Fz-mp}gljV>X8 literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/thumb-back.png b/apps/gallery/img/supersized/thumb-back.png new file mode 100644 index 0000000000000000000000000000000000000000..3c969ebd5276c73df8c1e8f4fb205731f00a0793 GIT binary patch literal 2122 zcmaJ?c~nzZ9uA6tAO&O@w$bDPts-QD5Qw1~NCFW;k$n>h$pZppA$eg_Jc2BOkPJjc z7z?D-kwKJ2kRmp?P#Dy*iY+MXwCFjC!k{b)GA}B2{;>1TdGFreJ>U2JzI*R?&dc}p z@zB*a*G3=^x(rXMA3R#BUM&syE7F}f4G(4zEd=rx#6T%55s0901koUp!DGdOejtmJ zmed215s1wIHy{KGVS1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d|=l|hrw?Jh@TAtNrk?%s>4 zwk^FUL%EfgeV5VyAH!Rnd--I^>5Xh=KSdE2AHzvUXp zdi(lhiCI00+FVZ z_}=EGB)b}ynqr=N)I;sT@Gz^$SS`7*nUX%p$tnO(l;60taNaySY~6h4&cnCNM$0%^ zr%NVR0gb;5SR0v~*)Ne0&K>M3=?UmsIrn06>Fq_SOeTNObhflqt}(S6kgh%Ne7Vrp zIR7*#mQF6tmM>^g4e>Q~S_2`|U6$GoXZkxkI}3XokA#lKCHAu+2r7sT>?f}sKWdQV zXwtVVU7UNH!IyQ5sl9gg_CG4o<3ZbPB@`wafj(bp(Vg9b)V(Nam*}Etk8ylN=#!;-Sto+>mnClsy zz!1LHc|e3iI_vbvDp=c{-fH~)?Vk$&L9MzQdn>B{)YfT=VEpM3^_iKO)upzU{B-|g z@vBo1X@Nu{#WxsvhnyhSo@(ys*lBKI@#uQ9^u<5JO%<(rKWc?T(|xaBj%bYaMp_LF xtS2ovX^j0adwo)T{R_FB(gRpQTdeN6iAXqGEl}=_>r?&R88jd26}PCY{{nWXZV&(f literal 0 HcmV?d00001 diff --git a/apps/gallery/img/supersized/thumb-forward.png b/apps/gallery/img/supersized/thumb-forward.png new file mode 100644 index 0000000000000000000000000000000000000000..afe451c75d0d6072a77a67f5ebbbf862dda8e3c4 GIT binary patch literal 2118 zcmaJ?dpKKZ8jo=)hE%KVpqXx@jMheOB*;n?afyl{(G{vwksPEXCzpc=k6PDKw8g5@ zr{gk))-^6ei?%x2t}Zngx?>krqok%!m6mQ@W=}fR*+15v=Q-#5-tYPSe((Fe@9%j| zmY=Vup}v_u0)a4Oc+pw#ic-J2I`CI&I8_KQrjR=aVuRsO99Ie;T=-xZfMy7}5daI| z^5Z3afD;0ti4g>FAP&=q$^(Tst{Q`r3&k)SfpBt`i@Cfg078cW5dskn^Rn|c1})&z zFo9$yfhl$aA_ZOwDZp0v2JjS7JV!pp`3TxcPK5=80K`Shh0!7zRZhda*QLUH^)ViU zeh-17XqexM;xPTtZlDxElW_za9)UtYQ;0aCt)0ESJr+$O5D9n!2~Q;15bde9Br1V` z{_tSnY*KzWl|}dXkPD7zm`Df`Q}Ot?xHw##Ee@1M;E9foj%p1O$p%K)$l^s1S8gMc z9o$l&12UdeAch2>2(4D+hJi5<4FgyD+ZBZ3kFp}!hc>|t!^^p1JP}7wUug@-Wd47s zQ1}rogIK`t_5M#`SwOrPz_S1u7$fDug9|^XP9>(gNdYbdN&`SJdaH|mkst)hB0(|Q zjZH=~xjcbL9lysjnN)^I2606^fI+8WU#x-D4#%1*W$>NB@pxpRXNa@Jb z)URDtRkP_6qQ+(p7C=4NYq2})d%4qQ9NOqDz~}R0WU}Ru4NAt_H@M&mlH1m>^sMJ!Zfd=LlI`_*+EAHJEqt~3h`3;QG%V@_DYnwWI3 zt8#Fy!S!te0|T*kAk;aLZZ>Uvv#_XWjN!m2>^DA$ zPM#JD>qq5wmrCX_x+%wB-S%}ZbA5oU_vbwcC03>w3r5hx ztN`nnhouf{C)2)Jd?$85We@iP@1}zL_v=8bmdJs$l^B$NqC_HzoMoP_0?TinF(Q`cH8D7&#v1SHZi8=Yth7Ch{^FwjilzD~$Zuh13M?+=u z)IR@-M>VL63*E2nZ|3CX`ARZShrAp2l1#Jj6?oeu)wNyB4JABTUfamD2nT>!+U(II z<~PXSDV370*4EeKUfQ|G*NUIzGIdve{nwkgn3#>4tf5%rmEauJSwCf0SJ#|$^d$9< z4;L(RQZ4?z`p*)Ai%*IMa%FWL?m?vrDjBArUbsX^ng=HDF2g+^Xub6="); + $("#supersized-loader").remove(); + $("#supersized").remove(); + $(".supersizedHolder").append("
    "); + $("#supersized").show(); + $('#slideshow-content').show(); + + + jQuery(function($){ + + $.supersized({ + + // Functionality + slide_interval : 3000, // Length between transitions + transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left + transition_speed : 700, // Speed of transition + + // Components + slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank') + slides : images // Slideshow Images + + }); + }); + + }); + + //close slideshow on esc and remove holder + $(document).keyup(function(e) { + if (e.keyCode == 27) { // esc + $.endSlideshow(); + } + }); + +}); diff --git a/apps/gallery/js/supersized.3.2.7.js b/apps/gallery/js/supersized.3.2.7.js new file mode 100644 index 0000000000..f5a1c0bbc2 --- /dev/null +++ b/apps/gallery/js/supersized.3.2.7.js @@ -0,0 +1,930 @@ +/* + + Supersized - Fullscreen Slideshow jQuery Plugin + Version : 3.2.7 + Site : www.buildinternet.com/project/supersized + + Author : Sam Dunn + Company : One Mighty Roar (www.onemightyroar.com) + License : MIT License / GPL License + +*/ + +(function($){ + + /* Place Supersized Elements + ----------------------------*/ + $(document).ready(function() { + $('body').append('
      '); + }); + + + $.supersized = function(options){ + + /* Variables + ----------------------------*/ + var el = '#supersized', + base = this; + // Access to jQuery and DOM versions of element + base.$el = $(el); + base.el = el; + vars = $.supersized.vars; + // Add a reverse reference to the DOM object + base.$el.data("supersized", base); + api = base.$el.data('supersized'); + + base.init = function(){ + // Combine options and vars + $.supersized.vars = $.extend($.supersized.vars, $.supersized.themeVars); + $.supersized.vars.options = $.extend({},$.supersized.defaultOptions, $.supersized.themeOptions, options); + base.options = $.supersized.vars.options; + + base._build(); + }; + + + /* Build Elements + ----------------------------*/ + base._build = function(){ + // Add in slide markers + var thisSlide = 0, + slideSet = '', + markers = '', + markerContent, + thumbMarkers = '', + thumbImage; + + while(thisSlide <= base.options.slides.length-1){ + //Determine slide link content + switch(base.options.slide_links){ + case 'num': + markerContent = thisSlide; + break; + case 'name': + markerContent = base.options.slides[thisSlide].title; + break; + case 'blank': + markerContent = ''; + break; + } + + slideSet = slideSet+'
    • '; + + if(thisSlide == base.options.start_slide-1){ + // Slide links + if (base.options.slide_links)markers = markers+''; + // Slide Thumbnail Links + if (base.options.thumb_links){ + base.options.slides[thisSlide].thumb ? thumbImage = base.options.slides[thisSlide].thumb : thumbImage = base.options.slides[thisSlide].image; + thumbMarkers = thumbMarkers+'
    • '; + }; + }else{ + // Slide links + if (base.options.slide_links) markers = markers+''; + // Slide Thumbnail Links + if (base.options.thumb_links){ + base.options.slides[thisSlide].thumb ? thumbImage = base.options.slides[thisSlide].thumb : thumbImage = base.options.slides[thisSlide].image; + thumbMarkers = thumbMarkers+'
    • '; + }; + } + thisSlide++; + } + + if (base.options.slide_links) $(vars.slide_list).html(markers); + if (base.options.thumb_links && vars.thumb_tray.length){ + $(vars.thumb_tray).append('
        '+thumbMarkers+'
      '); + } + + $(base.el).append(slideSet); + + // Add in thumbnails + if (base.options.thumbnail_navigation){ + // Load previous thumbnail + vars.current_slide - 1 < 0 ? prevThumb = base.options.slides.length - 1 : prevThumb = vars.current_slide - 1; + $(vars.prev_thumb).show().html($("").attr("src", base.options.slides[prevThumb].image)); + + // Load next thumbnail + vars.current_slide == base.options.slides.length - 1 ? nextThumb = 0 : nextThumb = vars.current_slide + 1; + $(vars.next_thumb).show().html($("").attr("src", base.options.slides[nextThumb].image)); + } + + base._start(); // Get things started + }; + + + /* Initialize + ----------------------------*/ + base._start = function(){ + + // Determine if starting slide random + if (base.options.start_slide){ + vars.current_slide = base.options.start_slide - 1; + }else{ + vars.current_slide = Math.floor(Math.random()*base.options.slides.length); // Generate random slide number + } + + // If links should open in new window + var linkTarget = base.options.new_window ? ' target="_blank"' : ''; + + // Set slideshow quality (Supported only in FF and IE, no Webkit) + if (base.options.performance == 3){ + base.$el.addClass('speed'); // Faster transitions + } else if ((base.options.performance == 1) || (base.options.performance == 2)){ + base.$el.addClass('quality'); // Higher image quality + } + + // Shuffle slide order if needed + if (base.options.random){ + arr = base.options.slides; + for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x); // Fisher-Yates shuffle algorithm (jsfromhell.com/array/shuffle) + base.options.slides = arr; + } + + /*-----Load initial set of images-----*/ + + if (base.options.slides.length > 1){ + if(base.options.slides.length > 2){ + // Set previous image + vars.current_slide - 1 < 0 ? loadPrev = base.options.slides.length - 1 : loadPrev = vars.current_slide - 1; // If slide is 1, load last slide as previous + var imageLink = (base.options.slides[loadPrev].url) ? "href='" + base.options.slides[loadPrev].url + "'" : ""; + + var imgPrev = $(''); + var slidePrev = base.el+' li:eq('+loadPrev+')'; + imgPrev.appendTo(slidePrev).wrap('').parent().parent().addClass('image-loading prevslide'); + + imgPrev.load(function(){ + $(this).data('origWidth', $(this).width()).data('origHeight', $(this).height()); + base.resizeNow(); // Resize background image + }); // End Load + } + } else { + // Slideshow turned off if there is only one slide + base.options.slideshow = 0; + } + + // Set current image + imageLink = (api.getField('url')) ? "href='" + api.getField('url') + "'" : ""; + var img = $(''); + + var slideCurrent= base.el+' li:eq('+vars.current_slide+')'; + img.appendTo(slideCurrent).wrap('').parent().parent().addClass('image-loading activeslide'); + + img.load(function(){ + base._origDim($(this)); + base.resizeNow(); // Resize background image + base.launch(); + if( typeof theme != 'undefined' && typeof theme._init == "function" ) theme._init(); // Load Theme + }); + + if (base.options.slides.length > 1){ + // Set next image + vars.current_slide == base.options.slides.length - 1 ? loadNext = 0 : loadNext = vars.current_slide + 1; // If slide is last, load first slide as next + imageLink = (base.options.slides[loadNext].url) ? "href='" + base.options.slides[loadNext].url + "'" : ""; + + var imgNext = $(''); + var slideNext = base.el+' li:eq('+loadNext+')'; + imgNext.appendTo(slideNext).wrap('').parent().parent().addClass('image-loading'); + + imgNext.load(function(){ + $(this).data('origWidth', $(this).width()).data('origHeight', $(this).height()); + base.resizeNow(); // Resize background image + }); // End Load + } + /*-----End load initial images-----*/ + + // Hide elements to be faded in + base.$el.css('visibility','hidden'); + $('.load-item').hide(); + + }; + + + /* Launch Supersized + ----------------------------*/ + base.launch = function(){ + + base.$el.css('visibility','visible'); + $('#supersized-loader').remove(); //Hide loading animation + + // Call theme function for before slide transition + if( typeof theme != 'undefined' && typeof theme.beforeAnimation == "function" ) theme.beforeAnimation('next'); + $('.load-item').show(); + + // Keyboard Navigation + if (base.options.keyboard_nav){ + $(document.documentElement).keyup(function (event) { + + if(vars.in_animation) return false; // Abort if currently animating + + // Left Arrow or Down Arrow + if ((event.keyCode == 37) || (event.keyCode == 40)) { + clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup + base.prevSlide(); + + // Right Arrow or Up Arrow + } else if ((event.keyCode == 39) || (event.keyCode == 38)) { + clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup + base.nextSlide(); + + // Spacebar + } else if (event.keyCode == 32 && !vars.hover_pause) { + clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup + base.playToggle(); + } + + }); + } + + // Pause when hover on image + if (base.options.slideshow && base.options.pause_hover){ + $(base.el).hover(function() { + if(vars.in_animation) return false; // Abort if currently animating + vars.hover_pause = true; // Mark slideshow paused from hover + if(!vars.is_paused){ + vars.hover_pause = 'resume'; // It needs to resume afterwards + base.playToggle(); + } + }, function() { + if(vars.hover_pause == 'resume'){ + base.playToggle(); + vars.hover_pause = false; + } + }); + } + + if (base.options.slide_links){ + // Slide marker clicked + $(vars.slide_list+'> li').click(function(){ + + index = $(vars.slide_list+'> li').index(this); + targetSlide = index + 1; + + base.goTo(targetSlide); + return false; + + }); + } + + // Thumb marker clicked + if (base.options.thumb_links){ + $(vars.thumb_list+'> li').click(function(){ + + index = $(vars.thumb_list+'> li').index(this); + targetSlide = index + 1; + + api.goTo(targetSlide); + return false; + + }); + } + + // Start slideshow if enabled + if (base.options.slideshow && base.options.slides.length > 1){ + + // Start slideshow if autoplay enabled + if (base.options.autoplay && base.options.slides.length > 1){ + vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval); // Initiate slide interval + }else{ + vars.is_paused = true; // Mark as paused + } + + //Prevent navigation items from being dragged + $('.load-item img').bind("contextmenu mousedown",function(){ + return false; + }); + + } + + // Adjust image when browser is resized + $(window).resize(function(){ + base.resizeNow(); + }); + + }; + + + /* Resize Images + ----------------------------*/ + base.resizeNow = function(){ + + return base.$el.each(function() { + // Resize each image seperately + $('img', base.el).each(function(){ + + thisSlide = $(this); + var ratio = (thisSlide.data('origHeight')/thisSlide.data('origWidth')).toFixed(2); // Define image ratio + + // Gather browser size + var browserwidth = base.$el.width(), + browserheight = base.$el.height(), + offset; + + /*-----Resize Image-----*/ + if (base.options.fit_always){ // Fit always is enabled + if ((browserheight/browserwidth) > ratio){ + resizeWidth(); + } else { + resizeHeight(); + } + }else{ // Normal Resize + if ((browserheight <= base.options.min_height) && (browserwidth <= base.options.min_width)){ // If window smaller than minimum width and height + + if ((browserheight/browserwidth) > ratio){ + base.options.fit_landscape && ratio < 1 ? resizeWidth(true) : resizeHeight(true); // If landscapes are set to fit + } else { + base.options.fit_portrait && ratio >= 1 ? resizeHeight(true) : resizeWidth(true); // If portraits are set to fit + } + + } else if (browserwidth <= base.options.min_width){ // If window only smaller than minimum width + + if ((browserheight/browserwidth) > ratio){ + base.options.fit_landscape && ratio < 1 ? resizeWidth(true) : resizeHeight(); // If landscapes are set to fit + } else { + base.options.fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(true); // If portraits are set to fit + } + + } else if (browserheight <= base.options.min_height){ // If window only smaller than minimum height + + if ((browserheight/browserwidth) > ratio){ + base.options.fit_landscape && ratio < 1 ? resizeWidth() : resizeHeight(true); // If landscapes are set to fit + } else { + base.options.fit_portrait && ratio >= 1 ? resizeHeight(true) : resizeWidth(); // If portraits are set to fit + } + + } else { // If larger than minimums + + if ((browserheight/browserwidth) > ratio){ + base.options.fit_landscape && ratio < 1 ? resizeWidth() : resizeHeight(); // If landscapes are set to fit + } else { + base.options.fit_portrait && ratio >= 1 ? resizeHeight() : resizeWidth(); // If portraits are set to fit + } + + } + } + /*-----End Image Resize-----*/ + + + /*-----Resize Functions-----*/ + + function resizeWidth(minimum){ + if (minimum){ // If minimum height needs to be considered + if(thisSlide.width() < browserwidth || thisSlide.width() < base.options.min_width ){ + if (thisSlide.width() * ratio >= base.options.min_height){ + thisSlide.width(base.options.min_width); + thisSlide.height(thisSlide.width() * ratio); + }else{ + resizeHeight(); + } + } + }else{ + if (base.options.min_height >= browserheight && !base.options.fit_landscape){ // If minimum height needs to be considered + if (browserwidth * ratio >= base.options.min_height || (browserwidth * ratio >= base.options.min_height && ratio <= 1)){ // If resizing would push below minimum height or image is a landscape + thisSlide.width(browserwidth); + thisSlide.height(browserwidth * ratio); + } else if (ratio > 1){ // Else the image is portrait + thisSlide.height(base.options.min_height); + thisSlide.width(thisSlide.height() / ratio); + } else if (thisSlide.width() < browserwidth) { + thisSlide.width(browserwidth); + thisSlide.height(thisSlide.width() * ratio); + } + }else{ // Otherwise, resize as normal + thisSlide.width(browserwidth); + thisSlide.height(browserwidth * ratio); + } + } + }; + + function resizeHeight(minimum){ + if (minimum){ // If minimum height needs to be considered + if(thisSlide.height() < browserheight){ + if (thisSlide.height() / ratio >= base.options.min_width){ + thisSlide.height(base.options.min_height); + thisSlide.width(thisSlide.height() / ratio); + }else{ + resizeWidth(true); + } + } + }else{ // Otherwise, resized as normal + if (base.options.min_width >= browserwidth){ // If minimum width needs to be considered + if (browserheight / ratio >= base.options.min_width || ratio > 1){ // If resizing would push below minimum width or image is a portrait + thisSlide.height(browserheight); + thisSlide.width(browserheight / ratio); + } else if (ratio <= 1){ // Else the image is landscape + thisSlide.width(base.options.min_width); + thisSlide.height(thisSlide.width() * ratio); + } + }else{ // Otherwise, resize as normal + thisSlide.height(browserheight); + thisSlide.width(browserheight / ratio); + } + } + }; + + /*-----End Resize Functions-----*/ + + if (thisSlide.parents('li').hasClass('image-loading')){ + $('.image-loading').removeClass('image-loading'); + } + + // Horizontally Center + if (base.options.horizontal_center){ + $(this).css('left', (browserwidth - $(this).width())/2); + } + + // Vertically Center + if (base.options.vertical_center){ + $(this).css('top', (browserheight - $(this).height())/2); + } + + }); + + // Basic image drag and right click protection + if (base.options.image_protect){ + + $('img', base.el).bind("contextmenu mousedown",function(){ + return false; + }); + + } + + return false; + + }); + + }; + + + /* Next Slide + ----------------------------*/ + base.nextSlide = function(){ + + if(vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating + else vars.in_animation = true; // Otherwise set animation marker + + clearInterval(vars.slideshow_interval); // Stop slideshow + + var slides = base.options.slides, // Pull in slides array + liveslide = base.$el.find('.activeslide'); // Find active slide + $('.prevslide').removeClass('prevslide'); + liveslide.removeClass('activeslide').addClass('prevslide'); // Remove active class & update previous slide + + // Get the slide number of new slide + vars.current_slide + 1 == base.options.slides.length ? vars.current_slide = 0 : vars.current_slide++; + + var nextslide = $(base.el+' li:eq('+vars.current_slide+')'), + prevslide = base.$el.find('.prevslide'); + + // If hybrid mode is on drop quality for transition + if (base.options.performance == 1) base.$el.removeClass('quality').addClass('speed'); + + + /*-----Load Image-----*/ + + loadSlide = false; + + vars.current_slide == base.options.slides.length - 1 ? loadSlide = 0 : loadSlide = vars.current_slide + 1; // Determine next slide + + var targetList = base.el+' li:eq('+loadSlide+')'; + if (!$(targetList).html()){ + + // If links should open in new window + var linkTarget = base.options.new_window ? ' target="_blank"' : ''; + + imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it + var img = $(''); + + img.appendTo(targetList).wrap('').parent().parent().addClass('image-loading').css('visibility','hidden'); + + img.load(function(){ + base._origDim($(this)); + base.resizeNow(); + }); // End Load + }; + + // Update thumbnails (if enabled) + if (base.options.thumbnail_navigation == 1){ + + // Load previous thumbnail + vars.current_slide - 1 < 0 ? prevThumb = base.options.slides.length - 1 : prevThumb = vars.current_slide - 1; + $(vars.prev_thumb).html($("").attr("src", base.options.slides[prevThumb].image)); + + // Load next thumbnail + nextThumb = loadSlide; + $(vars.next_thumb).html($("").attr("src", base.options.slides[nextThumb].image)); + + } + + + + /*-----End Load Image-----*/ + + + // Call theme function for before slide transition + if( typeof theme != 'undefined' && typeof theme.beforeAnimation == "function" ) theme.beforeAnimation('next'); + + //Update slide markers + if (base.options.slide_links){ + $('.current-slide').removeClass('current-slide'); + $(vars.slide_list +'> li' ).eq(vars.current_slide).addClass('current-slide'); + } + + nextslide.css('visibility','hidden').addClass('activeslide'); // Update active slide + + switch(base.options.transition){ + case 0: case 'none': // No transition + nextslide.css('visibility','visible'); vars.in_animation = false; base.afterAnimation(); + break; + case 1: case 'fade': // Fade + nextslide.animate({opacity : 0},0).css('visibility','visible').animate({opacity : 1, avoidTransforms : false}, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 2: case 'slideTop': // Slide Top + nextslide.animate({top : -base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 3: case 'slideRight': // Slide Right + nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 4: case 'slideBottom': // Slide Bottom + nextslide.animate({top : base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 5: case 'slideLeft': // Slide Left + nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 6: case 'carouselRight': // Carousel Right + nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + liveslide.animate({ left: -base.$el.width(), avoidTransforms : false }, base.options.transition_speed ); + break; + case 7: case 'carouselLeft': // Carousel Left + nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + liveslide.animate({ left: base.$el.width(), avoidTransforms : false }, base.options.transition_speed ); + break; + } + return false; + }; + + + /* Previous Slide + ----------------------------*/ + base.prevSlide = function(){ + + if(vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating + else vars.in_animation = true; // Otherwise set animation marker + + clearInterval(vars.slideshow_interval); // Stop slideshow + + var slides = base.options.slides, // Pull in slides array + liveslide = base.$el.find('.activeslide'); // Find active slide + $('.prevslide').removeClass('prevslide'); + liveslide.removeClass('activeslide').addClass('prevslide'); // Remove active class & update previous slide + + // Get current slide number + vars.current_slide == 0 ? vars.current_slide = base.options.slides.length - 1 : vars.current_slide-- ; + + var nextslide = $(base.el+' li:eq('+vars.current_slide+')'), + prevslide = base.$el.find('.prevslide'); + + // If hybrid mode is on drop quality for transition + if (base.options.performance == 1) base.$el.removeClass('quality').addClass('speed'); + + + /*-----Load Image-----*/ + + loadSlide = vars.current_slide; + + var targetList = base.el+' li:eq('+loadSlide+')'; + if (!$(targetList).html()){ + // If links should open in new window + var linkTarget = base.options.new_window ? ' target="_blank"' : ''; + imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it + var img = $(''); + + img.appendTo(targetList).wrap('').parent().parent().addClass('image-loading').css('visibility','hidden'); + + img.load(function(){ + base._origDim($(this)); + base.resizeNow(); + }); // End Load + }; + + // Update thumbnails (if enabled) + if (base.options.thumbnail_navigation == 1){ + + // Load previous thumbnail + //prevThumb = loadSlide; + loadSlide == 0 ? prevThumb = base.options.slides.length - 1 : prevThumb = loadSlide - 1; + $(vars.prev_thumb).html($("").attr("src", base.options.slides[prevThumb].image)); + + // Load next thumbnail + vars.current_slide == base.options.slides.length - 1 ? nextThumb = 0 : nextThumb = vars.current_slide + 1; + $(vars.next_thumb).html($("").attr("src", base.options.slides[nextThumb].image)); + } + + /*-----End Load Image-----*/ + + + // Call theme function for before slide transition + if( typeof theme != 'undefined' && typeof theme.beforeAnimation == "function" ) theme.beforeAnimation('prev'); + + //Update slide markers + if (base.options.slide_links){ + $('.current-slide').removeClass('current-slide'); + $(vars.slide_list +'> li' ).eq(vars.current_slide).addClass('current-slide'); + } + + nextslide.css('visibility','hidden').addClass('activeslide'); // Update active slide + + switch(base.options.transition){ + case 0: case 'none': // No transition + nextslide.css('visibility','visible'); vars.in_animation = false; base.afterAnimation(); + break; + case 1: case 'fade': // Fade + nextslide.animate({opacity : 0},0).css('visibility','visible').animate({opacity : 1, avoidTransforms : false}, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 2: case 'slideTop': // Slide Top (reverse) + nextslide.animate({top : base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 3: case 'slideRight': // Slide Right (reverse) + nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 4: case 'slideBottom': // Slide Bottom (reverse) + nextslide.animate({top : -base.$el.height()}, 0 ).css('visibility','visible').animate({ top:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 5: case 'slideLeft': // Slide Left (reverse) + nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + break; + case 6: case 'carouselRight': // Carousel Right (reverse) + nextslide.animate({left : -base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + liveslide.animate({left : 0}, 0 ).animate({ left: base.$el.width(), avoidTransforms : false}, base.options.transition_speed ); + break; + case 7: case 'carouselLeft': // Carousel Left (reverse) + nextslide.animate({left : base.$el.width()}, 0 ).css('visibility','visible').animate({ left:0, avoidTransforms : false }, base.options.transition_speed, function(){ base.afterAnimation(); }); + liveslide.animate({left : 0}, 0 ).animate({ left: -base.$el.width(), avoidTransforms : false }, base.options.transition_speed ); + break; + } + return false; + }; + + + /* Play/Pause Toggle + ----------------------------*/ + base.playToggle = function(){ + + if (vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating + + if (vars.is_paused){ + + vars.is_paused = false; + + // Call theme function for play + if( typeof theme != 'undefined' && typeof theme.playToggle == "function" ) theme.playToggle('play'); + + // Resume slideshow + vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval); + + }else{ + + vars.is_paused = true; + + // Call theme function for pause + if( typeof theme != 'undefined' && typeof theme.playToggle == "function" ) theme.playToggle('pause'); + + // Stop slideshow + clearInterval(vars.slideshow_interval); + + } + + return false; + + }; + + + /* Go to specific slide + ----------------------------*/ + base.goTo = function(targetSlide){ + if (vars.in_animation || !api.options.slideshow) return false; // Abort if currently animating + + var totalSlides = base.options.slides.length; + + // If target outside range + if(targetSlide < 0){ + targetSlide = totalSlides; + }else if(targetSlide > totalSlides){ + targetSlide = 1; + } + targetSlide = totalSlides - targetSlide + 1; + + clearInterval(vars.slideshow_interval); // Stop slideshow, prevent buildup + + // Call theme function for goTo trigger + if (typeof theme != 'undefined' && typeof theme.goTo == "function" ) theme.goTo(); + + if (vars.current_slide == totalSlides - targetSlide){ + if(!(vars.is_paused)){ + vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval); + } + return false; + } + + // If ahead of current position + if(totalSlides - targetSlide > vars.current_slide ){ + + // Adjust for new next slide + vars.current_slide = totalSlides-targetSlide-1; + vars.update_images = 'next'; + base._placeSlide(vars.update_images); + + //Otherwise it's before current position + }else if(totalSlides - targetSlide < vars.current_slide){ + + // Adjust for new prev slide + vars.current_slide = totalSlides-targetSlide+1; + vars.update_images = 'prev'; + base._placeSlide(vars.update_images); + + } + + // set active markers + if (base.options.slide_links){ + $(vars.slide_list +'> .current-slide').removeClass('current-slide'); + $(vars.slide_list +'> li').eq((totalSlides-targetSlide)).addClass('current-slide'); + } + + if (base.options.thumb_links){ + $(vars.thumb_list +'> .current-thumb').removeClass('current-thumb'); + $(vars.thumb_list +'> li').eq((totalSlides-targetSlide)).addClass('current-thumb'); + } + + }; + + + /* Place Slide + ----------------------------*/ + base._placeSlide = function(place){ + + // If links should open in new window + var linkTarget = base.options.new_window ? ' target="_blank"' : ''; + + loadSlide = false; + + if (place == 'next'){ + + vars.current_slide == base.options.slides.length - 1 ? loadSlide = 0 : loadSlide = vars.current_slide + 1; // Determine next slide + + var targetList = base.el+' li:eq('+loadSlide+')'; + + if (!$(targetList).html()){ + // If links should open in new window + var linkTarget = base.options.new_window ? ' target="_blank"' : ''; + + imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it + var img = $(''); + + img.appendTo(targetList).wrap('').parent().parent().addClass('image-loading').css('visibility','hidden'); + + img.load(function(){ + base._origDim($(this)); + base.resizeNow(); + }); // End Load + }; + + base.nextSlide(); + + }else if (place == 'prev'){ + + vars.current_slide - 1 < 0 ? loadSlide = base.options.slides.length - 1 : loadSlide = vars.current_slide - 1; // Determine next slide + + var targetList = base.el+' li:eq('+loadSlide+')'; + + if (!$(targetList).html()){ + // If links should open in new window + var linkTarget = base.options.new_window ? ' target="_blank"' : ''; + + imageLink = (base.options.slides[loadSlide].url) ? "href='" + base.options.slides[loadSlide].url + "'" : ""; // If link exists, build it + var img = $(''); + + img.appendTo(targetList).wrap('').parent().parent().addClass('image-loading').css('visibility','hidden'); + + img.load(function(){ + base._origDim($(this)); + base.resizeNow(); + }); // End Load + }; + base.prevSlide(); + } + + }; + + + /* Get Original Dimensions + ----------------------------*/ + base._origDim = function(targetSlide){ + targetSlide.data('origWidth', targetSlide.width()).data('origHeight', targetSlide.height()); + }; + + + /* After Slide Animation + ----------------------------*/ + base.afterAnimation = function(){ + + // If hybrid mode is on swap back to higher image quality + if (base.options.performance == 1){ + base.$el.removeClass('speed').addClass('quality'); + } + + // Update previous slide + if (vars.update_images){ + vars.current_slide - 1 < 0 ? setPrev = base.options.slides.length - 1 : setPrev = vars.current_slide-1; + vars.update_images = false; + $('.prevslide').removeClass('prevslide'); + $(base.el+' li:eq('+setPrev+')').addClass('prevslide'); + } + + vars.in_animation = false; + + // Resume slideshow + if (!vars.is_paused && base.options.slideshow){ + vars.slideshow_interval = setInterval(base.nextSlide, base.options.slide_interval); + if (base.options.stop_loop && vars.current_slide == base.options.slides.length - 1 ) base.playToggle(); + } + + // Call theme function for after slide transition + if (typeof theme != 'undefined' && typeof theme.afterAnimation == "function" ) theme.afterAnimation(); + + return false; + + }; + + base.getField = function(field){ + return base.options.slides[vars.current_slide][field]; + }; + + // Make it go! + base.init(); + }; + + + /* Global Variables + ----------------------------*/ + $.supersized.vars = { + + // Elements + thumb_tray : '#thumb-tray', // Thumbnail tray + thumb_list : '#thumb-list', // Thumbnail list + slide_list : '#slide-list', // Slide link list + + // Internal variables + current_slide : 0, // Current slide number + in_animation : false, // Prevents animations from stacking + is_paused : false, // Tracks paused on/off + hover_pause : false, // If slideshow is paused from hover + slideshow_interval : false, // Stores slideshow timer + update_images : false, // Trigger to update images after slide jump + options : {} // Stores assembled options list + + }; + + + /* Default Options + ----------------------------*/ + $.supersized.defaultOptions = { + + // Functionality + slideshow : 1, // Slideshow on/off + autoplay : 1, // Slideshow starts playing automatically + start_slide : 1, // Start slide (0 is random) + stop_loop : 0, // Stops slideshow on last slide + random : 0, // Randomize slide order (Ignores start slide) + slide_interval : 5000, // Length between transitions + transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left + transition_speed : 750, // Speed of transition + new_window : 1, // Image links open in new window/tab + pause_hover : 0, // Pause slideshow on hover + keyboard_nav : 1, // Keyboard navigation on/off + performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit) + image_protect : 1, // Disables image dragging and right click with Javascript + + // Size & Position + fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions) + fit_landscape : 0, // Landscape images will not exceed browser width + fit_portrait : 1, // Portrait images will not exceed browser height + min_width : 0, // Min width allowed (in pixels) + min_height : 0, // Min height allowed (in pixels) + horizontal_center : 1, // Horizontally center background + vertical_center : 1, // Vertically center background + + + // Components + slide_links : 1, // Individual links for each slide (Options: false, 'num', 'name', 'blank') + thumb_links : 1, // Individual thumb links for each slide + thumbnail_navigation : 0 // Thumbnail navigation + + }; + + $.fn.supersized = function(options){ + return this.each(function(){ + (new $.supersized(options)); + }); + }; + +})(jQuery); + diff --git a/apps/gallery/js/supersized.3.2.7.min.js b/apps/gallery/js/supersized.3.2.7.min.js new file mode 100644 index 0000000000..b9cea9cee1 --- /dev/null +++ b/apps/gallery/js/supersized.3.2.7.min.js @@ -0,0 +1,13 @@ +/* + + Supersized - Fullscreen Slideshow jQuery Plugin + Version : 3.2.7 + Site : www.buildinternet.com/project/supersized + + Author : Sam Dunn + Company : One Mighty Roar (www.onemightyroar.com) + License : MIT License / GPL License + +*/ + +(function(a){a(document).ready(function(){a("body").append('
        ')});a.supersized=function(b){var c="#supersized",d=this;d.$el=a(c);d.el=c;vars=a.supersized.vars;d.$el.data("supersized",d);api=d.$el.data("supersized");d.init=function(){a.supersized.vars=a.extend(a.supersized.vars,a.supersized.themeVars);a.supersized.vars.options=a.extend({},a.supersized.defaultOptions,a.supersized.themeOptions,b);d.options=a.supersized.vars.options;d._build()};d._build=function(){var g=0,e="",j="",h,f="",i;while(g<=d.options.slides.length-1){switch(d.options.slide_links){case"num":h=g;break;case"name":h=d.options.slides[g].title;break;case"blank":h="";break}e=e+'
      • ';if(g==d.options.start_slide-1){if(d.options.slide_links){j=j+'"}if(d.options.thumb_links){d.options.slides[g].thumb?i=d.options.slides[g].thumb:i=d.options.slides[g].image;f=f+'
      • '}}else{if(d.options.slide_links){j=j+'"}if(d.options.thumb_links){d.options.slides[g].thumb?i=d.options.slides[g].thumb:i=d.options.slides[g].image;f=f+'
      • '}}g++}if(d.options.slide_links){a(vars.slide_list).html(j)}if(d.options.thumb_links&&vars.thumb_tray.length){a(vars.thumb_tray).append('
          '+f+"
        ")}a(d.el).append(e);if(d.options.thumbnail_navigation){vars.current_slide-1<0?prevThumb=d.options.slides.length-1:prevThumb=vars.current_slide-1;a(vars.prev_thumb).show().html(a("").attr("src",d.options.slides[prevThumb].image));vars.current_slide==d.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;a(vars.next_thumb).show().html(a("").attr("src",d.options.slides[nextThumb].image))}d._start()};d._start=function(){if(d.options.start_slide){vars.current_slide=d.options.start_slide-1}else{vars.current_slide=Math.floor(Math.random()*d.options.slides.length)}var o=d.options.new_window?' target="_blank"':"";if(d.options.performance==3){d.$el.addClass("speed")}else{if((d.options.performance==1)||(d.options.performance==2)){d.$el.addClass("quality")}}if(d.options.random){arr=d.options.slides;for(var h,m,k=arr.length;k;h=parseInt(Math.random()*k),m=arr[--k],arr[k]=arr[h],arr[h]=m){}d.options.slides=arr}if(d.options.slides.length>1){if(d.options.slides.length>2){vars.current_slide-1<0?loadPrev=d.options.slides.length-1:loadPrev=vars.current_slide-1;var g=(d.options.slides[loadPrev].url)?"href='"+d.options.slides[loadPrev].url+"'":"";var q=a('');var n=d.el+" li:eq("+loadPrev+")";q.appendTo(n).wrap("").parent().parent().addClass("image-loading prevslide");q.load(function(){a(this).data("origWidth",a(this).width()).data("origHeight",a(this).height());d.resizeNow()})}}else{d.options.slideshow=0}g=(api.getField("url"))?"href='"+api.getField("url")+"'":"";var l=a('');var f=d.el+" li:eq("+vars.current_slide+")";l.appendTo(f).wrap("").parent().parent().addClass("image-loading activeslide");l.load(function(){d._origDim(a(this));d.resizeNow();d.launch();if(typeof theme!="undefined"&&typeof theme._init=="function"){theme._init()}});if(d.options.slides.length>1){vars.current_slide==d.options.slides.length-1?loadNext=0:loadNext=vars.current_slide+1;g=(d.options.slides[loadNext].url)?"href='"+d.options.slides[loadNext].url+"'":"";var e=a('');var p=d.el+" li:eq("+loadNext+")";e.appendTo(p).wrap("").parent().parent().addClass("image-loading");e.load(function(){a(this).data("origWidth",a(this).width()).data("origHeight",a(this).height());d.resizeNow()})}d.$el.css("visibility","hidden");a(".load-item").hide()};d.launch=function(){d.$el.css("visibility","visible");a("#supersized-loader").remove();if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("next")}a(".load-item").show();if(d.options.keyboard_nav){a(document.documentElement).keyup(function(e){if(vars.in_animation){return false}if((e.keyCode==37)||(e.keyCode==40)){clearInterval(vars.slideshow_interval);d.prevSlide()}else{if((e.keyCode==39)||(e.keyCode==38)){clearInterval(vars.slideshow_interval);d.nextSlide()}else{if(e.keyCode==32&&!vars.hover_pause){clearInterval(vars.slideshow_interval);d.playToggle()}}}})}if(d.options.slideshow&&d.options.pause_hover){a(d.el).hover(function(){if(vars.in_animation){return false}vars.hover_pause=true;if(!vars.is_paused){vars.hover_pause="resume";d.playToggle()}},function(){if(vars.hover_pause=="resume"){d.playToggle();vars.hover_pause=false}})}if(d.options.slide_links){a(vars.slide_list+"> li").click(function(){index=a(vars.slide_list+"> li").index(this);targetSlide=index+1;d.goTo(targetSlide);return false})}if(d.options.thumb_links){a(vars.thumb_list+"> li").click(function(){index=a(vars.thumb_list+"> li").index(this);targetSlide=index+1;api.goTo(targetSlide);return false})}if(d.options.slideshow&&d.options.slides.length>1){if(d.options.autoplay&&d.options.slides.length>1){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}else{vars.is_paused=true}a(".load-item img").bind("contextmenu mousedown",function(){return false})}a(window).resize(function(){d.resizeNow()})};d.resizeNow=function(){return d.$el.each(function(){a("img",d.el).each(function(){thisSlide=a(this);var f=(thisSlide.data("origHeight")/thisSlide.data("origWidth")).toFixed(2);var e=d.$el.width(),h=d.$el.height(),i;if(d.options.fit_always){if((h/e)>f){g()}else{j()}}else{if((h<=d.options.min_height)&&(e<=d.options.min_width)){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j(true)}else{d.options.fit_portrait&&f>=1?j(true):g(true)}}else{if(e<=d.options.min_width){if((h/e)>f){d.options.fit_landscape&&f<1?g(true):j()}else{d.options.fit_portrait&&f>=1?j():g(true)}}else{if(h<=d.options.min_height){if((h/e)>f){d.options.fit_landscape&&f<1?g():j(true)}else{d.options.fit_portrait&&f>=1?j(true):g()}}else{if((h/e)>f){d.options.fit_landscape&&f<1?g():j()}else{d.options.fit_portrait&&f>=1?j():g()}}}}}function g(k){if(k){if(thisSlide.width()=d.options.min_height){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}else{j()}}}else{if(d.options.min_height>=h&&!d.options.fit_landscape){if(e*f>=d.options.min_height||(e*f>=d.options.min_height&&f<=1)){thisSlide.width(e);thisSlide.height(e*f)}else{if(f>1){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{if(thisSlide.width()=d.options.min_width){thisSlide.height(d.options.min_height);thisSlide.width(thisSlide.height()/f)}else{g(true)}}}else{if(d.options.min_width>=e){if(h/f>=d.options.min_width||f>1){thisSlide.height(h);thisSlide.width(h/f)}else{if(f<=1){thisSlide.width(d.options.min_width);thisSlide.height(thisSlide.width()*f)}}}else{thisSlide.height(h);thisSlide.width(h/f)}}}if(thisSlide.parents("li").hasClass("image-loading")){a(".image-loading").removeClass("image-loading")}if(d.options.horizontal_center){a(this).css("left",(e-a(this).width())/2)}if(d.options.vertical_center){a(this).css("top",(h-a(this).height())/2)}});if(d.options.image_protect){a("img",d.el).bind("contextmenu mousedown",function(){return false})}return false})};d.nextSlide=function(){if(vars.in_animation||!api.options.slideshow){return false}else{vars.in_animation=true}clearInterval(vars.slideshow_interval);var h=d.options.slides,e=d.$el.find(".activeslide");a(".prevslide").removeClass("prevslide");e.removeClass("activeslide").addClass("prevslide");vars.current_slide+1==d.options.slides.length?vars.current_slide=0:vars.current_slide++;var g=a(d.el+" li:eq("+vars.current_slide+")"),i=d.$el.find(".prevslide");if(d.options.performance==1){d.$el.removeClass("quality").addClass("speed")}loadSlide=false;vars.current_slide==d.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;var k=d.el+" li:eq("+loadSlide+")";if(!a(k).html()){var j=d.options.new_window?' target="_blank"':"";imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('');f.appendTo(k).wrap("").parent().parent().addClass("image-loading").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()})}if(d.options.thumbnail_navigation==1){vars.current_slide-1<0?prevThumb=d.options.slides.length-1:prevThumb=vars.current_slide-1;a(vars.prev_thumb).html(a("").attr("src",d.options.slides[prevThumb].image));nextThumb=loadSlide;a(vars.next_thumb).html(a("").attr("src",d.options.slides[nextThumb].image))}if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("next")}if(d.options.slide_links){a(".current-slide").removeClass("current-slide");a(vars.slide_list+"> li").eq(vars.current_slide).addClass("current-slide")}g.css("visibility","hidden").addClass("activeslide");switch(d.options.transition){case 0:case"none":g.css("visibility","visible");vars.in_animation=false;d.afterAnimation();break;case 1:case"fade":g.animate({opacity:0},0).css("visibility","visible").animate({opacity:1,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 2:case"slideTop":g.animate({top:-d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 3:case"slideRight":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 4:case"slideBottom":g.animate({top:d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 5:case"slideLeft":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 6:case"carouselRight":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:-d.$el.width(),avoidTransforms:false},d.options.transition_speed);break;case 7:case"carouselLeft":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:d.$el.width(),avoidTransforms:false},d.options.transition_speed);break}return false};d.prevSlide=function(){if(vars.in_animation||!api.options.slideshow){return false}else{vars.in_animation=true}clearInterval(vars.slideshow_interval);var h=d.options.slides,e=d.$el.find(".activeslide");a(".prevslide").removeClass("prevslide");e.removeClass("activeslide").addClass("prevslide");vars.current_slide==0?vars.current_slide=d.options.slides.length-1:vars.current_slide--;var g=a(d.el+" li:eq("+vars.current_slide+")"),i=d.$el.find(".prevslide");if(d.options.performance==1){d.$el.removeClass("quality").addClass("speed")}loadSlide=vars.current_slide;var k=d.el+" li:eq("+loadSlide+")";if(!a(k).html()){var j=d.options.new_window?' target="_blank"':"";imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('');f.appendTo(k).wrap("").parent().parent().addClass("image-loading").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()})}if(d.options.thumbnail_navigation==1){loadSlide==0?prevThumb=d.options.slides.length-1:prevThumb=loadSlide-1;a(vars.prev_thumb).html(a("").attr("src",d.options.slides[prevThumb].image));vars.current_slide==d.options.slides.length-1?nextThumb=0:nextThumb=vars.current_slide+1;a(vars.next_thumb).html(a("").attr("src",d.options.slides[nextThumb].image))}if(typeof theme!="undefined"&&typeof theme.beforeAnimation=="function"){theme.beforeAnimation("prev")}if(d.options.slide_links){a(".current-slide").removeClass("current-slide");a(vars.slide_list+"> li").eq(vars.current_slide).addClass("current-slide")}g.css("visibility","hidden").addClass("activeslide");switch(d.options.transition){case 0:case"none":g.css("visibility","visible");vars.in_animation=false;d.afterAnimation();break;case 1:case"fade":g.animate({opacity:0},0).css("visibility","visible").animate({opacity:1,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 2:case"slideTop":g.animate({top:d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 3:case"slideRight":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 4:case"slideBottom":g.animate({top:-d.$el.height()},0).css("visibility","visible").animate({top:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 5:case"slideLeft":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});break;case 6:case"carouselRight":g.animate({left:-d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:0},0).animate({left:d.$el.width(),avoidTransforms:false},d.options.transition_speed);break;case 7:case"carouselLeft":g.animate({left:d.$el.width()},0).css("visibility","visible").animate({left:0,avoidTransforms:false},d.options.transition_speed,function(){d.afterAnimation()});e.animate({left:0},0).animate({left:-d.$el.width(),avoidTransforms:false},d.options.transition_speed);break}return false};d.playToggle=function(){if(vars.in_animation||!api.options.slideshow){return false}if(vars.is_paused){vars.is_paused=false;if(typeof theme!="undefined"&&typeof theme.playToggle=="function"){theme.playToggle("play")}vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}else{vars.is_paused=true;if(typeof theme!="undefined"&&typeof theme.playToggle=="function"){theme.playToggle("pause")}clearInterval(vars.slideshow_interval)}return false};d.goTo=function(f){if(vars.in_animation||!api.options.slideshow){return false}var e=d.options.slides.length;if(f<0){f=e}else{if(f>e){f=1}}f=e-f+1;clearInterval(vars.slideshow_interval);if(typeof theme!="undefined"&&typeof theme.goTo=="function"){theme.goTo()}if(vars.current_slide==e-f){if(!(vars.is_paused)){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval)}return false}if(e-f>vars.current_slide){vars.current_slide=e-f-1;vars.update_images="next";d._placeSlide(vars.update_images)}else{if(e-f .current-slide").removeClass("current-slide");a(vars.slide_list+"> li").eq((e-f)).addClass("current-slide")}if(d.options.thumb_links){a(vars.thumb_list+"> .current-thumb").removeClass("current-thumb");a(vars.thumb_list+"> li").eq((e-f)).addClass("current-thumb")}};d._placeSlide=function(e){var h=d.options.new_window?' target="_blank"':"";loadSlide=false;if(e=="next"){vars.current_slide==d.options.slides.length-1?loadSlide=0:loadSlide=vars.current_slide+1;var g=d.el+" li:eq("+loadSlide+")";if(!a(g).html()){var h=d.options.new_window?' target="_blank"':"";imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('');f.appendTo(g).wrap("").parent().parent().addClass("image-loading").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()})}d.nextSlide()}else{if(e=="prev"){vars.current_slide-1<0?loadSlide=d.options.slides.length-1:loadSlide=vars.current_slide-1;var g=d.el+" li:eq("+loadSlide+")";if(!a(g).html()){var h=d.options.new_window?' target="_blank"':"";imageLink=(d.options.slides[loadSlide].url)?"href='"+d.options.slides[loadSlide].url+"'":"";var f=a('');f.appendTo(g).wrap("").parent().parent().addClass("image-loading").css("visibility","hidden");f.load(function(){d._origDim(a(this));d.resizeNow()})}d.prevSlide()}}};d._origDim=function(e){e.data("origWidth",e.width()).data("origHeight",e.height())};d.afterAnimation=function(){if(d.options.performance==1){d.$el.removeClass("speed").addClass("quality")}if(vars.update_images){vars.current_slide-1<0?setPrev=d.options.slides.length-1:setPrev=vars.current_slide-1;vars.update_images=false;a(".prevslide").removeClass("prevslide");a(d.el+" li:eq("+setPrev+")").addClass("prevslide")}vars.in_animation=false;if(!vars.is_paused&&d.options.slideshow){vars.slideshow_interval=setInterval(d.nextSlide,d.options.slide_interval);if(d.options.stop_loop&&vars.current_slide==d.options.slides.length-1){d.playToggle()}}if(typeof theme!="undefined"&&typeof theme.afterAnimation=="function"){theme.afterAnimation()}return false};d.getField=function(e){return d.options.slides[vars.current_slide][e]};d.init()};a.supersized.vars={thumb_tray:"#thumb-tray",thumb_list:"#thumb-list",slide_list:"#slide-list",current_slide:0,in_animation:false,is_paused:false,hover_pause:false,slideshow_interval:false,update_images:false,options:{}};a.supersized.defaultOptions={slideshow:1,autoplay:1,start_slide:1,stop_loop:0,random:0,slide_interval:5000,transition:1,transition_speed:750,new_window:1,pause_hover:0,keyboard_nav:1,performance:1,image_protect:1,fit_always:0,fit_landscape:0,fit_portrait:1,min_width:0,min_height:0,horizontal_center:1,vertical_center:1,slide_links:1,thumb_links:1,thumbnail_navigation:0};a.fn.supersized=function(b){return this.each(function(){(new a.supersized(b))})}})(jQuery); \ No newline at end of file diff --git a/apps/gallery/js/supersized.shutter.js b/apps/gallery/js/supersized.shutter.js new file mode 100644 index 0000000000..cc3025a94a --- /dev/null +++ b/apps/gallery/js/supersized.shutter.js @@ -0,0 +1,337 @@ +/* + + Supersized - Fullscreen Slideshow jQuery Plugin + Version : 3.2.7 + Theme : Shutter 1.1 + + Site : www.buildinternet.com/project/supersized + Author : Sam Dunn + Company : One Mighty Roar (www.onemightyroar.com) + License : MIT License / GPL License + +*/ + +(function($){ + + theme = { + + + /* Initial Placement + ----------------------------*/ + _init : function(){ + + // Center Slide Links + if (api.options.slide_links) $(vars.slide_list).css('margin-left', -$(vars.slide_list).width()/2); + + // Start progressbar if autoplay enabled + if (api.options.autoplay){ + if (api.options.progress_bar) theme.progressBar(); + }else{ + if ($(vars.play_button).attr('src')) $(vars.play_button).attr("src", vars.image_path + "play.png"); // If pause play button is image, swap src + if (api.options.progress_bar) $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ); // Place progress bar + } + + + /* Thumbnail Tray + ----------------------------*/ + // Hide tray off screen + $(vars.thumb_tray).animate({bottom : -$(vars.thumb_tray).height()}, 0 ); + + // Thumbnail Tray Toggle + $(vars.tray_button).toggle(function(){ + $(vars.thumb_tray).stop().animate({bottom : 0, avoidTransforms : true}, 300 ); + if ($(vars.tray_arrow).attr('src')) $(vars.tray_arrow).attr("src", vars.image_path + "button-tray-down.png"); + return false; + }, function() { + $(vars.thumb_tray).stop().animate({bottom : -$(vars.thumb_tray).height(), avoidTransforms : true}, 300 ); + if ($(vars.tray_arrow).attr('src')) $(vars.tray_arrow).attr("src", vars.image_path + "button-tray-up.png"); + return false; + }); + + // Make thumb tray proper size + $(vars.thumb_list).width($('> li', vars.thumb_list).length * $('> li', vars.thumb_list).outerWidth(true)); //Adjust to true width of thumb markers + + // Display total slides + if ($(vars.slide_total).length){ + $(vars.slide_total).html(api.options.slides.length); + } + + + /* Thumbnail Tray Navigation + ----------------------------*/ + if (api.options.thumb_links){ + //Hide thumb arrows if not needed + if ($(vars.thumb_list).width() <= $(vars.thumb_tray).width()){ + $(vars.thumb_back +','+vars.thumb_forward).fadeOut(0); + } + + // Thumb Intervals + vars.thumb_interval = Math.floor($(vars.thumb_tray).width() / $('> li', vars.thumb_list).outerWidth(true)) * $('> li', vars.thumb_list).outerWidth(true); + vars.thumb_page = 0; + + // Cycle thumbs forward + $(vars.thumb_forward).click(function(){ + if (vars.thumb_page - vars.thumb_interval <= -$(vars.thumb_list).width()){ + vars.thumb_page = 0; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + }else{ + vars.thumb_page = vars.thumb_page - vars.thumb_interval; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + } + }); + + // Cycle thumbs backwards + $(vars.thumb_back).click(function(){ + if (vars.thumb_page + vars.thumb_interval > 0){ + vars.thumb_page = Math.floor($(vars.thumb_list).width() / vars.thumb_interval) * -vars.thumb_interval; + if ($(vars.thumb_list).width() <= -vars.thumb_page) vars.thumb_page = vars.thumb_page + vars.thumb_interval; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + }else{ + vars.thumb_page = vars.thumb_page + vars.thumb_interval; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + } + }); + + } + + + /* Navigation Items + ----------------------------*/ + $(vars.next_slide).click(function() { + api.nextSlide(); + }); + + $(vars.prev_slide).click(function() { + api.prevSlide(); + }); + + // Full Opacity on Hover + if(jQuery.support.opacity){ + $(vars.prev_slide +','+vars.next_slide).mouseover(function() { + $(this).stop().animate({opacity:1},100); + }).mouseout(function(){ + $(this).stop().animate({opacity:0.6},100); + }); + } + + if (api.options.thumbnail_navigation){ + // Next thumbnail clicked + $(vars.next_thumb).click(function() { + api.nextSlide(); + }); + // Previous thumbnail clicked + $(vars.prev_thumb).click(function() { + api.prevSlide(); + }); + } + + $(vars.play_button).click(function() { + api.playToggle(); + }); + + + /* Thumbnail Mouse Scrub + ----------------------------*/ + if (api.options.mouse_scrub){ + $(vars.thumb_tray).mousemove(function(e) { + var containerWidth = $(vars.thumb_tray).width(), + listWidth = $(vars.thumb_list).width(); + if (listWidth > containerWidth){ + var mousePos = 1, + diff = e.pageX - mousePos; + if (diff > 10 || diff < -10) { + mousePos = e.pageX; + newX = (containerWidth - listWidth) * (e.pageX/containerWidth); + diff = parseInt(Math.abs(parseInt($(vars.thumb_list).css('left'))-newX )).toFixed(0); + $(vars.thumb_list).stop().animate({'left':newX}, {duration:diff*3, easing:'easeOutExpo'}); + } + } + }); + } + + + /* Window Resize + ----------------------------*/ + $(window).resize(function(){ + + // Delay progress bar on resize + if (api.options.progress_bar && !vars.in_animation){ + if (vars.slideshow_interval) clearInterval(vars.slideshow_interval); + if (api.options.slides.length - 1 > 0) clearInterval(vars.slideshow_interval); + + $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ); + + if (!vars.progressDelay && api.options.slideshow){ + // Delay slideshow from resuming so Chrome can refocus images + vars.progressDelay = setTimeout(function() { + if (!vars.is_paused){ + theme.progressBar(); + vars.slideshow_interval = setInterval(api.nextSlide, api.options.slide_interval); + } + vars.progressDelay = false; + }, 1000); + } + } + + // Thumb Links + if (api.options.thumb_links && vars.thumb_tray.length){ + // Update Thumb Interval & Page + vars.thumb_page = 0; + vars.thumb_interval = Math.floor($(vars.thumb_tray).width() / $('> li', vars.thumb_list).outerWidth(true)) * $('> li', vars.thumb_list).outerWidth(true); + + // Adjust thumbnail markers + if ($(vars.thumb_list).width() > $(vars.thumb_tray).width()){ + $(vars.thumb_back +','+vars.thumb_forward).fadeIn('fast'); + $(vars.thumb_list).stop().animate({'left':0}, 200); + }else{ + $(vars.thumb_back +','+vars.thumb_forward).fadeOut('fast'); + } + + } + }); + + + }, + + + /* Go To Slide + ----------------------------*/ + goTo : function(){ + if (api.options.progress_bar && !vars.is_paused){ + $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ); + theme.progressBar(); + } + }, + + /* Play & Pause Toggle + ----------------------------*/ + playToggle : function(state){ + + if (state =='play'){ + // If image, swap to pause + if ($(vars.play_button).attr('src')) $(vars.play_button).attr("src", vars.image_path + "pause.png"); + if (api.options.progress_bar && !vars.is_paused) theme.progressBar(); + }else if (state == 'pause'){ + // If image, swap to play + if ($(vars.play_button).attr('src')) $(vars.play_button).attr("src", vars.image_path + "play.png"); + if (api.options.progress_bar && vars.is_paused)$(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ); + } + + }, + + + /* Before Slide Transition + ----------------------------*/ + beforeAnimation : function(direction){ + if (api.options.progress_bar && !vars.is_paused) $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ); + + /* Update Fields + ----------------------------*/ + // Update slide caption + if ($(vars.slide_caption).length){ + (api.getField('title')) ? $(vars.slide_caption).html(api.getField('title')) : $(vars.slide_caption).html(''); + } + // Update slide number + if (vars.slide_current.length){ + $(vars.slide_current).html(vars.current_slide + 1); + } + + + // Highlight current thumbnail and adjust row position + if (api.options.thumb_links){ + + $('.current-thumb').removeClass('current-thumb'); + $('li', vars.thumb_list).eq(vars.current_slide).addClass('current-thumb'); + + // If thumb out of view + if ($(vars.thumb_list).width() > $(vars.thumb_tray).width()){ + // If next slide direction + if (direction == 'next'){ + if (vars.current_slide == 0){ + vars.thumb_page = 0; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + } else if ($('.current-thumb').offset().left - $(vars.thumb_tray).offset().left >= vars.thumb_interval){ + vars.thumb_page = vars.thumb_page - vars.thumb_interval; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + } + // If previous slide direction + }else if(direction == 'prev'){ + if (vars.current_slide == api.options.slides.length - 1){ + vars.thumb_page = Math.floor($(vars.thumb_list).width() / vars.thumb_interval) * -vars.thumb_interval; + if ($(vars.thumb_list).width() <= -vars.thumb_page) vars.thumb_page = vars.thumb_page + vars.thumb_interval; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + } else if ($('.current-thumb').offset().left - $(vars.thumb_tray).offset().left < 0){ + if (vars.thumb_page + vars.thumb_interval > 0) return false; + vars.thumb_page = vars.thumb_page + vars.thumb_interval; + $(vars.thumb_list).stop().animate({'left': vars.thumb_page}, {duration:500, easing:'easeOutExpo'}); + } + } + } + + + } + + }, + + + /* After Slide Transition + ----------------------------*/ + afterAnimation : function(){ + if (api.options.progress_bar && !vars.is_paused) theme.progressBar(); // Start progress bar + }, + + + /* Progress Bar + ----------------------------*/ + progressBar : function(){ + $(vars.progress_bar).stop().animate({left : -$(window).width()}, 0 ).animate({left:0}, api.options.slide_interval); + } + + + }; + + + /* Theme Specific Variables + ----------------------------*/ + $.supersized.themeVars = { + + // Internal Variables + progress_delay : false, // Delay after resize before resuming slideshow + thumb_page : false, // Thumbnail page + thumb_interval : false, // Thumbnail interval + image_path : OC.webroot+"/apps/gallery/img/supersized/", // Default image path + + // General Elements + play_button : '#pauseplay', // Play/Pause button + next_slide : '#nextslide', // Next slide button + prev_slide : '#prevslide', // Prev slide button + next_thumb : '#nextthumb', // Next slide thumb button + prev_thumb : '#prevthumb', // Prev slide thumb button + + slide_caption : '#slidecaption', // Slide caption + slide_current : '.slidenumber', // Current slide number + slide_total : '.totalslides', // Total Slides + slide_list : '#slide-list', // Slide jump list + + thumb_tray : '#thumb-tray', // Thumbnail tray + thumb_list : '#thumb-list', // Thumbnail list + thumb_forward : '#thumb-forward', // Cycles forward through thumbnail list + thumb_back : '#thumb-back', // Cycles backwards through thumbnail list + tray_arrow : '#tray-arrow', // Thumbnail tray button arrow + tray_button : '#tray-button', // Thumbnail tray button + + progress_bar : '#progress-bar' // Progress bar + + }; + + /* Theme Specific Options + ----------------------------*/ + $.supersized.themeOptions = { + + progress_bar : 1, // Timer for each slide + mouse_scrub : 0 // Thumbnails move with mouse + + }; + + +})(jQuery); diff --git a/apps/gallery/js/supersized.shutter.min.js b/apps/gallery/js/supersized.shutter.min.js new file mode 100644 index 0000000000..52ea4a3384 --- /dev/null +++ b/apps/gallery/js/supersized.shutter.min.js @@ -0,0 +1,14 @@ +/* + + Supersized - Fullscreen Slideshow jQuery Plugin + Version : 3.2.7 + Theme : Shutter 1.1 + + Site : www.buildinternet.com/project/supersized + Author : Sam Dunn + Company : One Mighty Roar (www.onemightyroar.com) + License : MIT License / GPL License + +*/ + +(function(a){theme={_init:function(){if(api.options.slide_links){a(vars.slide_list).css("margin-left",-a(vars.slide_list).width()/2)}if(api.options.autoplay){if(api.options.progress_bar){theme.progressBar()}}else{if(a(vars.play_button).attr("src")){a(vars.play_button).attr("src",vars.image_path+"play.png")}if(api.options.progress_bar){a(vars.progress_bar).stop().animate({left:-a(window).width()},0)}}a(vars.thumb_tray).animate({bottom:-a(vars.thumb_tray).height()},0);a(vars.tray_button).toggle(function(){a(vars.thumb_tray).stop().animate({bottom:0,avoidTransforms:true},300);if(a(vars.tray_arrow).attr("src")){a(vars.tray_arrow).attr("src",vars.image_path+"button-tray-down.png")}return false},function(){a(vars.thumb_tray).stop().animate({bottom:-a(vars.thumb_tray).height(),avoidTransforms:true},300);if(a(vars.tray_arrow).attr("src")){a(vars.tray_arrow).attr("src",vars.image_path+"button-tray-up.png")}return false});a(vars.thumb_list).width(a("> li",vars.thumb_list).length*a("> li",vars.thumb_list).outerWidth(true));if(a(vars.slide_total).length){a(vars.slide_total).html(api.options.slides.length)}if(api.options.thumb_links){if(a(vars.thumb_list).width()<=a(vars.thumb_tray).width()){a(vars.thumb_back+","+vars.thumb_forward).fadeOut(0)}vars.thumb_interval=Math.floor(a(vars.thumb_tray).width()/a("> li",vars.thumb_list).outerWidth(true))*a("> li",vars.thumb_list).outerWidth(true);vars.thumb_page=0;a(vars.thumb_forward).click(function(){if(vars.thumb_page-vars.thumb_interval<=-a(vars.thumb_list).width()){vars.thumb_page=0;a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}else{vars.thumb_page=vars.thumb_page-vars.thumb_interval;a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}});a(vars.thumb_back).click(function(){if(vars.thumb_page+vars.thumb_interval>0){vars.thumb_page=Math.floor(a(vars.thumb_list).width()/vars.thumb_interval)*-vars.thumb_interval;if(a(vars.thumb_list).width()<=-vars.thumb_page){vars.thumb_page=vars.thumb_page+vars.thumb_interval}a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}else{vars.thumb_page=vars.thumb_page+vars.thumb_interval;a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}})}a(vars.next_slide).click(function(){api.nextSlide()});a(vars.prev_slide).click(function(){api.prevSlide()});if(jQuery.support.opacity){a(vars.prev_slide+","+vars.next_slide).mouseover(function(){a(this).stop().animate({opacity:1},100)}).mouseout(function(){a(this).stop().animate({opacity:0.6},100)})}if(api.options.thumbnail_navigation){a(vars.next_thumb).click(function(){api.nextSlide()});a(vars.prev_thumb).click(function(){api.prevSlide()})}a(vars.play_button).click(function(){api.playToggle()});if(api.options.mouse_scrub){a(vars.thumb_tray).mousemove(function(f){var c=a(vars.thumb_tray).width(),g=a(vars.thumb_list).width();if(g>c){var b=1,d=f.pageX-b;if(d>10||d<-10){b=f.pageX;newX=(c-g)*(f.pageX/c);d=parseInt(Math.abs(parseInt(a(vars.thumb_list).css("left"))-newX)).toFixed(0);a(vars.thumb_list).stop().animate({left:newX},{duration:d*3,easing:"easeOutExpo"})}}})}a(window).resize(function(){if(api.options.progress_bar&&!vars.in_animation){if(vars.slideshow_interval){clearInterval(vars.slideshow_interval)}if(api.options.slides.length-1>0){clearInterval(vars.slideshow_interval)}a(vars.progress_bar).stop().animate({left:-a(window).width()},0);if(!vars.progressDelay&&api.options.slideshow){vars.progressDelay=setTimeout(function(){if(!vars.is_paused){theme.progressBar();vars.slideshow_interval=setInterval(api.nextSlide,api.options.slide_interval)}vars.progressDelay=false},1000)}}if(api.options.thumb_links&&vars.thumb_tray.length){vars.thumb_page=0;vars.thumb_interval=Math.floor(a(vars.thumb_tray).width()/a("> li",vars.thumb_list).outerWidth(true))*a("> li",vars.thumb_list).outerWidth(true);if(a(vars.thumb_list).width()>a(vars.thumb_tray).width()){a(vars.thumb_back+","+vars.thumb_forward).fadeIn("fast");a(vars.thumb_list).stop().animate({left:0},200)}else{a(vars.thumb_back+","+vars.thumb_forward).fadeOut("fast")}}})},goTo:function(b){if(api.options.progress_bar&&!vars.is_paused){a(vars.progress_bar).stop().animate({left:-a(window).width()},0);theme.progressBar()}},playToggle:function(b){if(b=="play"){if(a(vars.play_button).attr("src")){a(vars.play_button).attr("src",vars.image_path+"pause.png")}if(api.options.progress_bar&&!vars.is_paused){theme.progressBar()}}else{if(b=="pause"){if(a(vars.play_button).attr("src")){a(vars.play_button).attr("src",vars.image_path+"play.png")}if(api.options.progress_bar&&vars.is_paused){a(vars.progress_bar).stop().animate({left:-a(window).width()},0)}}}},beforeAnimation:function(b){if(api.options.progress_bar&&!vars.is_paused){a(vars.progress_bar).stop().animate({left:-a(window).width()},0)}if(a(vars.slide_caption).length){(api.getField("title"))?a(vars.slide_caption).html(api.getField("title")):a(vars.slide_caption).html("")}if(vars.slide_current.length){a(vars.slide_current).html(vars.current_slide+1)}if(api.options.thumb_links){a(".current-thumb").removeClass("current-thumb");a("li",vars.thumb_list).eq(vars.current_slide).addClass("current-thumb");if(a(vars.thumb_list).width()>a(vars.thumb_tray).width()){if(b=="next"){if(vars.current_slide==0){vars.thumb_page=0;a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}else{if(a(".current-thumb").offset().left-a(vars.thumb_tray).offset().left>=vars.thumb_interval){vars.thumb_page=vars.thumb_page-vars.thumb_interval;a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}}}else{if(b=="prev"){if(vars.current_slide==api.options.slides.length-1){vars.thumb_page=Math.floor(a(vars.thumb_list).width()/vars.thumb_interval)*-vars.thumb_interval;if(a(vars.thumb_list).width()<=-vars.thumb_page){vars.thumb_page=vars.thumb_page+vars.thumb_interval}a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}else{if(a(".current-thumb").offset().left-a(vars.thumb_tray).offset().left<0){if(vars.thumb_page+vars.thumb_interval>0){return false}vars.thumb_page=vars.thumb_page+vars.thumb_interval;a(vars.thumb_list).stop().animate({left:vars.thumb_page},{duration:500,easing:"easeOutExpo"})}}}}}}},afterAnimation:function(){if(api.options.progress_bar&&!vars.is_paused){theme.progressBar()}},progressBar:function(){a(vars.progress_bar).stop().animate({left:-a(window).width()},0).animate({left:0},api.options.slide_interval)}};a.supersized.themeVars={progress_delay:false,thumb_page:false,thumb_interval:false,image_path:OC.webroot+"/apps/gallery/img/supersized/",play_button:"#pauseplay",next_slide:"#nextslide",prev_slide:"#prevslide",next_thumb:"#nextthumb",prev_thumb:"#prevthumb",slide_caption:"#slidecaption",slide_current:".slidenumber",slide_total:".totalslides",slide_list:"#slide-list",thumb_tray:"#thumb-tray",thumb_list:"#thumb-list",thumb_forward:"#thumb-forward",thumb_back:"#thumb-back",tray_arrow:"#tray-arrow",tray_button:"#tray-button",progress_bar:"#progress-bar"};a.supersized.themeOptions={progress_bar:1,mouse_scrub:0}})(jQuery); diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index c90932cefd..048fb6c5bb 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -22,7 +22,10 @@ $(document).ready(function() { } } -?>
        +?> +
        + +
        get(); ?>
        + + + From b67199bb452483ec7d3c3d338b2f3a0c667e42e7 Mon Sep 17 00:00:00 2001 From: jfd Date: Mon, 9 Jul 2012 16:04:46 +0200 Subject: [PATCH 42/64] add css id attribute, minor fixes --- apps/gallery/css/styles.css | 2 +- apps/gallery/css/supersized.css | 24 ++++---- apps/gallery/css/supersized.shutter.css | 76 ++++++++++++------------- apps/gallery/index.php | 10 ++-- apps/gallery/js/slideshow.js | 12 ++-- apps/gallery/templates/index.php | 2 +- apps/gallery/templates/view_album.php | 8 +-- 7 files changed, 67 insertions(+), 67 deletions(-) diff --git a/apps/gallery/css/styles.css b/apps/gallery/css/styles.css index dcef1f08c6..fa87e51c85 100644 --- a/apps/gallery/css/styles.css +++ b/apps/gallery/css/styles.css @@ -1,5 +1,5 @@ #gallerycontent { margin-top: 2.8em; overflow: visible; } -#g-settings {position: absolute; left 13.5em; top: 0;} +#g-settings {position: absolute; left: 13.5em; top: 0;} div#controls input[type=button] { -webkit-transition: opacity 0.5s ease-in-out; -moz-transition: opacity 0.5s ease-in-out; -o-transition: opacity 0.5s ease-in-out; opacity: 1; position:absolute; right:13.5em; top:0em; } input[type=button]:disabled { opacity: 0.5 } .ui-dialog tr {background-color: #eee;} diff --git a/apps/gallery/css/supersized.css b/apps/gallery/css/supersized.css index 617f501120..57ee7e23a5 100644 --- a/apps/gallery/css/supersized.css +++ b/apps/gallery/css/supersized.css @@ -9,17 +9,17 @@ License : MIT License / GPL License */ -#supersized-loader { display:none; position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center;} +#supersized-holder #supersized-loader { display:none; position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center;} -#supersized { visibility:hidden; display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:200; height:100%; width:100%; } -#supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; } -#supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/ -#supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; } /*Quality*/ +#supersized-holder #supersized { visibility:hidden; display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:200; height:100%; width:100%; } +#supersized-holder #supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; } +#supersized-holder #supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/ +#supersized-holder #supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; } /*Quality*/ -#supersized li { display:block; list-style:none; z-index:150; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; } -#supersized a { width:100%; height:100%; display:block; } -#supersized li.prevslide { z-index:160; } -#supersized li.activeslide { z-index:170; } -#supersized li.image-loading { background:#111 url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center; width:100%; height:100%; } -#supersized li.image-loading img{ visibility:hidden; } -#supersized li.prevslide img, #supersized li.activeslide img{ display:inline; } +#supersized-holder #supersized li { display:block; list-style:none; z-index:150; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; } +#supersized-holder #supersized a { width:100%; height:100%; display:block; } +#supersized-holder #supersized li.prevslide { z-index:160; } +#supersized-holder #supersized li.activeslide { z-index:170; } +#supersized-holder #supersized li.image-loading { background:#111 url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center; width:100%; height:100%; } +#supersized-holder #supersized li.image-loading img{ visibility:hidden; } +#supersized-holder #supersized li.prevslide img, #supersized-holder #supersized li.activeslide img{ display:inline; } diff --git a/apps/gallery/css/supersized.shutter.css b/apps/gallery/css/supersized.shutter.css index 0084d4bb9c..428c254c3b 100644 --- a/apps/gallery/css/supersized.shutter.css +++ b/apps/gallery/css/supersized.shutter.css @@ -13,62 +13,62 @@ /* Controls Bar ----------------------------*/ -#slideshow-controls-wrapper { margin:0 auto; height:42px; width:100%; bottom:0px; left:0; z-index:204; background:url('%appswebroot%/gallery/img/supersized/nav-bg.png') repeat-x; position:fixed; } -#slideshow-controls { overflow:hidden; height:100%; position:relative; text-align:left; z-index:205; } -#slidecounter { float:left; color:#999; font:14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 0 -1px 0; margin:0px 10px 0 15px; line-height:42px; } -#slidecaption { overflow:hidden; float:left; color:#FFF; font:400 14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 1px 1px 2px; margin:0 20px 0 0; line-height:42px; } +#slideshow-content #slideshow-controls-wrapper { margin:0 auto; height:42px; width:100%; bottom:0px; left:0; z-index:204; background:url('%appswebroot%/gallery/img/supersized/nav-bg.png') repeat-x; position:fixed; } +#slideshow-content #slideshow-controls { overflow:hidden; height:100%; position:relative; text-align:left; z-index:205; } +#slideshow-content #slidecounter { float:left; color:#999; font:14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 0 -1px 0; margin:0px 10px 0 15px; line-height:42px; } +#slideshow-content #slidecaption { overflow:hidden; float:left; color:#FFF; font:400 14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 1px 1px 2px; margin:0 20px 0 0; line-height:42px; } /*#navigation { float:right; margin:0px 20px 0 0; }*/ -#play-button{ float:left; margin-top:1px;border-right:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } -#play-button:hover{ background-position:0 1px; cursor:pointer; } +#slideshow-content #play-button{ float:left; margin-top:1px;border-right:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } +#slideshow-content #play-button:hover{ background-position:0 1px; cursor:pointer; } -#prevslide, #nextslide{ position:fixed; height:43px; width:43px; top:50%; margin-top:-21px; opacity:0.6; z-index:204; } -#prevslide{ left:10px; background:url('%appswebroot%/gallery/img/supersized/back.png'); } -#nextslide{ right:10px; background:url('%appswebroot%/gallery/img/supersized/forward.png'); } -#prevslide:active, #nextslide:active{ margin-top:-19px; } -#prevslide:hover, #nextslide:hover{ cursor:pointer; } +#slideshow-content #prevslide, #nextslide{ position:fixed; height:43px; width:43px; top:50%; margin-top:-21px; opacity:0.6; z-index:204; } +#slideshow-content #prevslide{ left:10px; background:url('%appswebroot%/gallery/img/supersized/back.png'); } +#slideshow-content #nextslide{ right:10px; background:url('%appswebroot%/gallery/img/supersized/forward.png'); } +#slideshow-content #prevslide:active, #nextslide:active{ margin-top:-19px; } +#slideshow-content #prevslide:hover, #nextslide:hover{ cursor:pointer; } -ul#slide-list{ padding:15px 0; float:left; position:absolute; left:50%; } -ul#slide-list li{ list-style:none; width:12px; height:12px; float:left; margin:0 5px 0 0; } -ul#slide-list li.current-slide a, ul#slide-list li.current-slide a:hover{ background-position:0 0px; } -ul#slide-list li a{ display:block; width:12px; height:12px; background:url('%appswebroot%/gallery/img/supersized/nav-dot.png') no-repeat 0 -24px; } -ul#slide-list li a:hover{ background-position:0 -12px; cursor:pointer; } +#slideshow-content ul#slide-list{ padding:15px 0; float:left; position:absolute; left:50%; } +#slideshow-content ul#slide-list li{ list-style:none; width:12px; height:12px; float:left; margin:0 5px 0 0; } +#slideshow-content ul#slide-list li.current-slide a, ul#slide-list li.current-slide a:hover{ background-position:0 0px; } +#slideshow-content ul#slide-list li a{ display:block; width:12px; height:12px; background:url('%appswebroot%/gallery/img/supersized/nav-dot.png') no-repeat 0 -24px; } +#slideshow-content ul#slide-list li a:hover{ background-position:0 -12px; cursor:pointer; } -#tray-button{ float:right; margin-top:1px; border-left:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } -#tray-button:hover{ background-position:0 1px; cursor:pointer; } +#slideshow-content #tray-button{ float:right; margin-top:1px; border-left:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } +#slideshow-content #tray-button:hover{ background-position:0 1px; cursor:pointer; } /* Progress Bar ----------------------------*/ -#progress-back{ z-index:205; position:fixed; bottom:42px; left:0; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-back.png') repeat-x; } -#progress-bar{ position:relative; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-bar.png') repeat-x; } +#slideshow-content #progress-back{ z-index:205; position:fixed; bottom:42px; left:0; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-back.png') repeat-x; } +#slideshow-content #progress-bar{ position:relative; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-bar.png') repeat-x; } /* Thumbnail Navigation ----------------------------*/ -#nextthumb,#prevthumb { z-index:202; display:none; position:fixed; bottom:61px; height:75px; width:100px; overflow:hidden; background:#ddd; border:1px solid #fff; -webkit-box-shadow:0 0 5px #000; } -#nextthumb { right:12px; } -#prevthumb { left:12px; } -#nextthumb img, #prevthumb img { width:150px; height:auto; } -#nextthumb:active, #prevthumb:active { bottom:59px; } -#nextthumb:hover, #prevthumb:hover { cursor:pointer; } +#slideshow-content #nextthumb, #slideshow-content #prevthumb { z-index:202; display:none; position:fixed; bottom:61px; height:75px; width:100px; overflow:hidden; background:#ddd; border:1px solid #fff; -webkit-box-shadow:0 0 5px #000; } +#slideshow-content #nextthumb { right:12px; } +#slideshow-content #prevthumb { left:12px; } +#slideshow-content #nextthumb img, #slideshow-content #prevthumb img { width:150px; height:auto; } +#slideshow-content #nextthumb:active, #slideshow-content #prevthumb:active { bottom:59px; } +#slideshow-content #nextthumb:hover, #slideshow-content #prevthumb:hover { cursor:pointer; } /* Thumbnail Tray ----------------------------*/ -#thumb-tray{ position:fixed; z-index:203; bottom:0; left:0; background:url('%appswebroot%/gallery/img/supersized/bg-black.png'); height:150px; width:100%; overflow:hidden; text-align:center; -moz-box-shadow: 0px 0px 4px #000; -webkit-box-shadow: 0px 0px 4px #000; box-shadow: 0px 0px 4px #000; } +#slideshow-content #thumb-tray{ position:fixed; z-index:203; bottom:0; left:0; background:url('%appswebroot%/gallery/img/supersized/bg-black.png'); height:150px; width:100%; overflow:hidden; text-align:center; -moz-box-shadow: 0px 0px 4px #000; -webkit-box-shadow: 0px 0px 4px #000; box-shadow: 0px 0px 4px #000; } -#thumb-back, #thumb-forward{ position:absolute; z-index:5; bottom:42px; height:108px; width:40px; } -#thumb-back{ left:0; background: url('%appswebroot%/gallery/img/supersized/thumb-back.png') no-repeat center center;} -#thumb-forward{ right:0; background:url('%appswebroot%/gallery/img/supersized/thumb-forward.png') no-repeat center center;} -#thumb-back:hover, #thumb-forward:hover{ cursor:pointer; background-color:rgba(256,256,256, 0.1); } -#thumb-back:hover{ border-right:1px solid rgba(256,256,256, 0.2); } -#thumb-forward:hover{ border-left:1px solid rgba(256,256,256, 0.2); } +#slideshow-content #thumb-back, #slideshow-content #thumb-forward{ position:absolute; z-index:5; bottom:42px; height:108px; width:40px; } +#slideshow-content #thumb-back{ left:0; background: url('%appswebroot%/gallery/img/supersized/thumb-back.png') no-repeat center center;} +#slideshow-content #thumb-forward{ right:0; background:url('%appswebroot%/gallery/img/supersized/thumb-forward.png') no-repeat center center;} +#slideshow-content #thumb-back:hover, #slideshow-content #thumb-forward:hover{ cursor:pointer; background-color:rgba(256,256,256, 0.1); } +#slideshow-content #thumb-back:hover{ border-right:1px solid rgba(256,256,256, 0.2); } +#slideshow-content #thumb-forward:hover{ border-left:1px solid rgba(256,256,256, 0.2); } -ul#thumb-list{ display:inline-block; list-style:none; position:relative; left:0px; padding:0 0px; } -ul#thumb-list li{ background:#111; list-style:none; display:inline; width:150px; height:108px; overflow:hidden; float:left; margin:0; } -ul#thumb-list li img { width:200px; height:auto; opacity:0.5; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter:alpha(opacity=60); -webkit-transition: all 100ms ease-in-out; -moz-transition: all 100ms ease-in-out; -o-transition: all 100ms ease-in-out; -ms-transition: all 100ms ease-in-out; transition: all 100ms ease-in-out; } -ul#thumb-list li.current-thumb img, ul#thumb-list li:hover img{ opacity:1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); } -ul#thumb-list li:hover{ cursor:pointer; } +#slideshow-content ul#thumb-list{ display:inline-block; list-style:none; position:relative; left:0px; padding:0 0px; } +#slideshow-content ul#thumb-list li{ background:#111; list-style:none; display:inline; width:150px; height:108px; overflow:hidden; float:left; margin:0; } +#slideshow-content ul#thumb-list li img { width:200px; height:auto; opacity:0.5; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter:alpha(opacity=60); -webkit-transition: all 100ms ease-in-out; -moz-transition: all 100ms ease-in-out; -o-transition: all 100ms ease-in-out; -ms-transition: all 100ms ease-in-out; transition: all 100ms ease-in-out; } +#slideshow-content ul#thumb-list li.current-thumb img, #slideshow-content ul#thumb-list li:hover img{ opacity:1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); } +#slideshow-content ul#thumb-list li:hover{ cursor:pointer; } diff --git a/apps/gallery/index.php b/apps/gallery/index.php index c7eafc9a1c..a891e2889f 100644 --- a/apps/gallery/index.php +++ b/apps/gallery/index.php @@ -32,12 +32,12 @@ OCP\Util::addStyle('gallery', 'styles'); OCP\Util::addScript('gallery', 'pictures'); OCP\Util::addStyle( 'gallery', 'supersized' ); OCP\Util::addStyle( 'gallery', 'supersized.shutter' ); -OCP\Util::addscript('gallery', 'slideshow'); -OCP\Util::addscript('gallery', 'jquery.easing.min'); -OCP\Util::addscript('gallery', 'supersized.3.2.7.min'); -OCP\Util::addscript('gallery', 'supersized.shutter.min'); +OCP\Util::addScript('gallery', 'slideshow'); +OCP\Util::addScript('gallery', 'jquery.easing.min'); +OCP\Util::addScript('gallery', 'supersized.3.2.7.min'); +OCP\Util::addScript('gallery', 'supersized.shutter.min'); -include('gallery/lib/tiles.php'); +include 'gallery/lib/tiles.php'; $root = !empty($_GET['root']) ? $_GET['root'] : '/'; $images = \OC_FileCache::searchByMime('image', null, '/'.\OCP\USER::getUser().'/files'.$root); diff --git a/apps/gallery/js/slideshow.js b/apps/gallery/js/slideshow.js index 01d5a4cf2c..88e89f39ff 100644 --- a/apps/gallery/js/slideshow.js +++ b/apps/gallery/js/slideshow.js @@ -5,7 +5,7 @@ $(document).ready(function(){ clearInterval($.supersized.vars.slideshow_interval); }; - $(".supersizedHolder").remove(); + $('#supersized-holder').remove(); $('#slideshow-content').hide(); $('#thumb-list').remove(); } @@ -22,11 +22,11 @@ $(document).ready(function(){ return; } - $("body").append("
        "); - $("#supersized-loader").remove(); - $("#supersized").remove(); - $(".supersizedHolder").append("
          "); - $("#supersized").show(); + $('body').append("
          "); + $('#supersized-loader').remove(); + $('#supersized').remove(); + $('#supersized-holder').append("
            "); + $('#supersized').show(); $('#slideshow-content').show(); diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index 048fb6c5bb..b2efd5342f 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -37,7 +37,7 @@ echo $_['tl']->get(); -