Projet

Général

Profil

Révision 9df8b457

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views_bulk_operations/views/views_bulk_operations_handler_field_operations.inc
55 55
      'contains' => array(
56 56
        'display_type' => array('default' => 0),
57 57
        'enable_select_all_pages' => array('default' => TRUE),
58
        'row_clickable' => array('default' => TRUE),
58 59
        'force_single' => array('default' => FALSE),
59 60
        'entity_load_capacity' => array('default' => 10),
60 61
        'skip_batching' => array('default' => 0),
......
63 64
    $options['vbo_operations'] = array(
64 65
      'default' => array(),
65 66
      'unpack_translatable' => 'unpack_operations',
67
      'export' => 'export_vbo_operations',
66 68
    );
67 69

  
68 70
    return $options;
69 71
  }
70 72

  
73
  function export_vbo_operations($indent, $prefix, $storage, $option, $definition, $parents) {
74
    // Anti-recursion, since we use the parent export helper.
75
    unset($definition['export']);
76

  
77
    // Find and remove all unselected/disabled operations.
78
    foreach ($storage['vbo_operations'] as $operation_id => $operation) {
79
      if (empty($operation['selected'])) {
80
        unset($storage['vbo_operations'][$operation_id]);
81
      }
82
    }
83

  
84
    return parent::export_option($indent, $prefix, $storage, $option, $definition, $parents);
85
  }
86

  
71 87
  function unpack_operations(&$translatable, $storage, $option, $definition, $parents, $keys) {
72 88
    $translatable[] = array(
73 89
      'value' => t('- Choose an operation -'),
......
107 123
      '#default_value' => $this->options['vbo_settings']['enable_select_all_pages'],
108 124
      '#description' => t('Check this box to enable the ability to select all items on all pages.'),
109 125
    );
126
    $form['vbo_settings']['row_clickable'] = array(
127
      '#type' => 'checkbox',
128
      '#title' => t('Make the whole row clickable'),
129
      '#default_value' => $this->options['vbo_settings']['row_clickable'],
130
      '#description' => t('Check this box to select an item when its row has been clicked. Requires JavaScript.'),
131
    );
110 132
    $form['vbo_settings']['force_single'] = array(
111 133
      '#type' => 'checkbox',
112 134
      '#title' => t('Force single'),

Formats disponibles : Unified diff