/[drupal]/contributions/modules/jcarousellite/modules/jcarousellite_views/jcarousellite_views_plugin_style.inc
ViewVC logotype

Diff of /contributions/modules/jcarousellite/modules/jcarousellite_views/jcarousellite_views_plugin_style.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Wed Sep 16 23:54:12 2009 UTC revision 1.1.2.1, Wed Sep 16 23:54:12 2009 UTC
# Line 0  Line 1 
1    <?php
2    // $Id: views_bulk_operations_plugin_style.inc,v 1.1.2.27 2009/04/14 06:54:29 kratib Exp $
3    
4    class jcarousellite_views_plugin_style extends views_plugin_style_list {
5      function options(&$options) {
6        parent::options($options);
7        $options['display_result'] = TRUE;
8        $options['merge_single_action'] = TRUE;
9        //$this->populate_operations($options);
10      }
11    
12      function options_form(&$form, &$form_values) {
13        parent::options_form($form, $form_values);
14        unset($form['alignment']);
15        /*
16        $form['display_result'] = array(
17          '#type' => 'checkbox',
18          '#title' => t('Display processing result'),
19          '#description' => t('Check this box to let Drupal display a message with the result of processing the selected objects.'),
20          '#default_value' => $this->options['display_result'],
21        );
22        $form['merge_single_action'] = array(
23          '#type' => 'checkbox',
24          '#title' => t('Merge single action\'s form with node selection view'),
25          '#description' => t('In case only one action is selected *and* this action is configurable, display its action form along with the node selection view.'),
26          '#default_value' => $this->options['merge_single_action'],
27        );
28        */
29      }
30    
31      function options_validate(&$form, &$form_values) {
32      }
33    
34      function render() {
35        //dpr($this);
36        drupal_add_css(drupal_get_path('module', 'jcarousellite_views') .'/jcarousellite_views.css');
37        drupal_add_js(drupal_get_path('module', 'jcarousellite') . '/js/jcarousellite.js');
38        drupal_add_js(drupal_get_path('module', 'jcarousellite') . '/js/jquery.easing.js');
39        drupal_add_js(drupal_get_path('module', 'jcarousellite') . '/js/jquery.mousewheel.js');
40        drupal_add_js("$('.view-id-test .view-content .item-list').jCarouselLite({
41            btnNext: '.jcarousellite-next',
42            btnPrev: '.jcarousellite-prev',
43            mouseWheel: true,
44            visible: 4
45        });", 'inline', 'footer');
46        // Group the rows according to the grouping field, if specified.
47        $sets = $this->render_grouping($this->view->result, $this->options['grouping']);
48    
49        // Render each group separately and concatenate.  Plugins may override this
50        // method if they wish some other way of handling grouping.
51        $output = $view_output = '';
52        foreach ($sets as $title => $records) {
53          if ($this->uses_row_plugin()) {
54            $rows = array();
55            foreach ($records as $label => $row) {
56              $rows[] = $this->row_plugin->render($row);
57            }
58          }
59          else {
60            $rows = $records;
61          }
62          $view_output .= theme($this->theme_functions(), $this->view, $this->options, $rows, $title);
63        }
64        $output .= jcarousellite_callback('add_prev', $view->vid, $counter[$view->vid]);
65        $output .= $view_output;
66        $output .= jcarousellite_callback('add_next', $view->vid, $counter[$view->vid]);
67    
68        return $output;
69      }
70    }
71    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2