1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Use Library Manager to load libraries. Use JS behaviors. Add "Order images by" pref.

This commit is contained in:
Lóna Lore
2016-03-29 11:22:25 +02:00
parent 3198440697
commit 6b9838ae99
11 changed files with 467 additions and 322 deletions

View File

@@ -66,24 +66,11 @@ 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::library('load', 'jquery.prettyPhoto');
e107::css('gallery', 'css/gallery.css');
e107::js('gallery', 'js/gallery.js');
e107::js('footer-inline',$prettyPhoto,'jquery');
$this->catList = e107::getMedia()->getCategories('gallery');
}