/[drupal]/contributions/modules/weight/weight.views.inc
ViewVC logotype

Diff of /contributions/modules/weight/weight.views.inc

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

revision 1.2.2.1, Mon Jan 26 00:28:54 2009 UTC revision 1.2.2.2, Wed Sep 9 20:39:28 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: weight.views.inc,v 1.7 2009/01/02 01:46:55 nancyw Exp $  // $Id: weight.views.inc,v 1.2.2.1 2009/01/26 00:28:54 nancyw Exp $
3  /**  /**
4   * @file   * @file
5   * Views2 support for Weight module.   * Views2 support for Weight module.
6   */   */
7  /**  /**
8   * Implementation of hook_views_data()   * Implementation of hook_views_data().
9   */   */
10  function weight_views_data() {  function weight_views_data() {
11    $data['node_weight'] = array(    $data['node_weight'] = array(
# Line 58  function weight_views_plugins() { Line 58  function weight_views_plugins() {
58          'uses fields' => TRUE,          'uses fields' => TRUE,
59          'uses options' => TRUE,          'uses options' => TRUE,
60          'type' => 'normal',          'type' => 'normal',
61         ),          ),
62      ),        ),
63    );      );
64  }  }
65    
66  /**  /**
# Line 69  function weight_views_plugins() { Line 69  function weight_views_plugins() {
69  function weight_views_handlers() {  function weight_views_handlers() {
70    return array(    return array(
71      'info' => array(      'info' => array(
72        'path' => drupal_get_path('module', 'weight') /*.'/handlers'*/,        'path' => drupal_get_path('module', 'weight') /* .'/handlers' */,
73       ),        ),
74      'handlers' => array(      'handlers' => array(
75        'weight_handler_field_sticky' => array(        'weight_handler_field_sticky' => array(
76          'parent' => 'views_handler_field_numeric',          'parent' => 'views_handler_field_numeric',
77        ),        ),
78        'weight_handler_sort' => array(        'weight_handler_sort' => array(
79          'parent' => 'views_handler_sort',          'parent' => 'views_handler_sort',
80         ),          ),
81       ),        ),
82     );      );
83  }  }
84    
85  /**  /**
# Line 127  function theme_weight_view_weight($view, Line 127  function theme_weight_view_weight($view,
127          $header[$field] = l($label . $image, $_GET['q'], $link_options);          $header[$field] = l($label . $image, $_GET['q'], $link_options);
128        }        }
129      }      }
130    
131      // Create a second variable so we can easily find what fields we have and what the      // Create a second variable so we can easily find what fields we have and what the
132      // CSS classes should be.      // CSS classes should be.
133      $weight_fields[$field] = views_css_safe($field);      $weight_fields[$field] = views_css_safe($field);
# Line 192  function weight_view_weight_form(&$form_ Line 192  function weight_view_weight_form(&$form_
192      if (is_numeric($count)) {      if (is_numeric($count)) {
193        foreach ($row as $field => $content) {        foreach ($row as $field => $content) {
194          $nid = $row['nid_hidden'];          $nid = $row['nid_hidden'];
195          if (substr($field, 0, 6) == 'weight') {          if (drupal_substr($field, 0, 6) == 'weight') {
196            $form['rows'][$count][$field] = array(            $form['rows'][$count][$field] = array(
197              '#default_value' => $content,              '#default_value' => $content,
198              '#type' => 'weight',              '#type' => 'weight',

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

  ViewVC Help
Powered by ViewVC 1.1.2