aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-10-20 18:28:19 -0200
committerSilvio <silvio@devlet.com.br>2010-10-20 18:28:19 -0200
commitfa23188a2821dd44a4a738dde4554d91a37f0b00 (patch)
treec21c851937d3efb0d6beb9b8469d2f28df6ad3e7
parent5123f2cea22a71b159987a9056f0fe31666aa34b (diff)
downloadjquery_gallery_view-fa23188a2821dd44a4a738dde4554d91a37f0b00.tar.gz
jquery_gallery_view-fa23188a2821dd44a4a738dde4554d91a37f0b00.tar.bz2
JS add fix
-rw-r--r--jquery_gallery_view.module11
1 files changed, 6 insertions, 5 deletions
diff --git a/jquery_gallery_view.module b/jquery_gallery_view.module
index 6ac2c58..329248b 100644
--- a/jquery_gallery_view.module
+++ b/jquery_gallery_view.module
@@ -45,15 +45,15 @@ function jquery_gallery_view_field($fields) {
* @param $view
* View data.
*/
-function jquery_gallery_view_setup_photos($view) {
+function jquery_gallery_view_setup_photos($view, $field) {
// Setup files folder
$files = variable_get('file_directory_path', conf_path() .'/files');
foreach ($view->result as $result) {
- $fid = $result->node_data_field_photo_fid;
+ $fid = $result->{'node_data_field_'. $field .'_fid'};
if ($fid != NULL) {
$file = field_file_load($fid);
- $data = unserialize($result->node_data_field_photo_data);
+ $data = unserialize($result->{'node_data_field_'. $field .'_data'});
$photos[] = array(
'filename' => $file['filename'],
'title' => $data['title'],
@@ -63,6 +63,7 @@ function jquery_gallery_view_setup_photos($view) {
// Add needed javascript
drupal_add_js(array('jqueryGalleryView' => array('photos' => $photos)), 'setting');
- drupal_add_js(drupal_get_path('module', 'jqueryGalleryView') .'/js/jquery-galleryview/jquery.galleryview-2.1.1-pack.js');
- drupal_add_js(drupal_get_path('module', 'jqueryGalleryView') .'/js/jquery-galleryview/jquery.timers-1.2.js');
+ drupal_add_js(drupal_get_path('module', 'jquery_gallery_view') .'/js/jquery-gallery_view.js');
+ drupal_add_js(drupal_get_path('module', 'jquery_gallery_view') .'/js/jquery-galleryview/jquery.galleryview-2.1.1-pack.js');
+ drupal_add_js(drupal_get_path('module', 'jquery_gallery_view') .'/js/jquery-galleryview/jquery.timers-1.2.js');
}