mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Upgraded JS Library (prettyPhoto) in the gallery plugin.
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
* THIS SCRIPT IS HIGHLY EXPERIMENTAL. USE AT OWN RISK.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class plugin_gallery_index_controller extends eControllerFront
|
||||
{
|
||||
/**
|
||||
@@ -63,6 +66,24 @@ class plugin_gallery_index_controller extends eControllerFront
|
||||
public function init()
|
||||
{
|
||||
e107::plugLan('gallery', 'front');
|
||||
e107::js('gallery', 'jslib/prettyPhoto/js/jquery.prettyPhoto.js','jquery');
|
||||
e107::css('gallery', 'jslib/prettyPhoto/css/prettyPhoto.css','jquery');
|
||||
e107::css('gallery', 'gallery_style.css');
|
||||
|
||||
$prettyPhoto = <<<JS
|
||||
$(document).ready(function(){
|
||||
$("a[data-gal^='prettyPhoto']").prettyPhoto(
|
||||
{
|
||||
hook: 'data-gal',
|
||||
theme: 'pp_default',
|
||||
overlay_gallery: false,
|
||||
deeplinking: false
|
||||
}
|
||||
);
|
||||
});
|
||||
JS;
|
||||
|
||||
e107::js('footer-inline',$prettyPhoto,'jquery');
|
||||
$this->catList = e107::getMedia()->getCategories('gallery');
|
||||
}
|
||||
|
||||
@@ -108,8 +129,8 @@ class plugin_gallery_index_controller extends eControllerFront
|
||||
$this->addTitle($title)->addBody($text);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->addTitle(LAN_PLUGIN_GALLERY_TITLE)->addBody($text);
|
||||
{
|
||||
$this->addTitle(LAN_PLUGIN_GALLERY_TITLE)->addBody($text);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,12 +148,12 @@ class plugin_gallery_index_controller extends eControllerFront
|
||||
// get ID by SEF
|
||||
$_cid = null;
|
||||
foreach ($this->catList as $id => $row)
|
||||
{
|
||||
{
|
||||
if($cid === $row['media_cat_sef'])
|
||||
{
|
||||
$_cid = $id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$cid = $_cid;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user