From e0e83b1f95c754897930f4727830edd3f2b61e4b Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 20 Oct 2010 17:47:25 -0200 Subject: Initial import --- js/jquery_gallery_view.js | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 js/jquery_gallery_view.js (limited to 'js') diff --git a/js/jquery_gallery_view.js b/js/jquery_gallery_view.js new file mode 100644 index 0000000..909ee0e --- /dev/null +++ b/js/jquery_gallery_view.js @@ -0,0 +1,52 @@ +// $Id$ + +Drupal.behaviors.jqueryGalleryViewBehavior = function (context) { + // Add custom site title class + $('.views-field-title').attr('class', 'views-field-site-title'); + + // Add photos + if (Drupal.settings.jqueryGalleryView.photos != null) { + var photos = Drupal.settings.jqueryGalleryView.photos; + + // Image sizes + var width = 300; + var height = 200; + + // Image paths + var base_url = window.location.protocol + '//' + window.location.hostname; + var files = Drupal.settings.jqueryGalleryView.files; + var base_location = base_url + '/' + Drupal.settings.basePath + files + '/'; + var imagecache = 'imagecache/' + width + 'x' + height + '/'; + var image_folder = base_location + imagecache + '/'; + + // Other variables + var panel = new String(); + var file = new String(); + var title = new String(); + + // Setup panels and fimstrip + for(i=0; i'; + + // Add to the gallery + $('#jquery-gallery-view').append(panel); + } + + // Add gallery view + $('#jquery-gallery-view').galleryView({ + panel_width: 300, + panel_height: 250, + frame_width: 100, + frame_height: 50, + filmstrip_position: 'bottom', + overlay_position: 'top', + transition_interval: 0, + fade_panels: false, + }); + } +} -- cgit v1.2.3