Projet

Général

Profil

Révision 96a203dd

Ajouté par Assos Assos il y a plus de 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
4 4
dependencies[] = ctools
5 5
package = Chaos tool suite
6 6

  
7
; Information added by Drupal.org packaging script on 2014-02-12
8
version = "7.x-1.4"
7
; Information added by Drupal.org packaging script on 2014-11-19
8
version = "7.x-1.5"
9 9
core = "7.x"
10 10
project = "ctools"
11
datestamp = "1392220730"
11
datestamp = "1416423525"
12 12

  
drupal7/sites/all/modules/ctools/ctools.info
6 6
files[] = includes/math-expr.inc
7 7
files[] = includes/stylizer.inc
8 8

  
9
; Information added by Drupal.org packaging script on 2014-02-12
10
version = "7.x-1.4"
9
; Information added by Drupal.org packaging script on 2014-11-19
10
version = "7.x-1.5"
11 11
core = "7.x"
12 12
project = "ctools"
13
datestamp = "1392220730"
13
datestamp = "1416423525"
14 14

  
drupal7/sites/all/modules/ctools/ctools.module
298 298

  
299 299
/**
300 300
 * Set a token/value pair to be replaced later in the request, specifically in
301
 * ctools_preprocess_page().
301
 * ctools_page_token_processing().
302 302
 *
303 303
 * @param $token
304 304
 *   The token to be replaced later, during page rendering.  This should
......
654 654
      list($type, $argument) = $key;
655 655
      switch ($type) {
656 656
        case 'variable':
657
          $tokens[$token] = isset($variables[$argument]) ? $variables[$argument] : '';
657
          $tokens[$token] = isset($elements[$argument]) ? $elements[$argument] : '';
658 658
          break;
659 659
        case 'callback':
660 660
          if (is_string($argument) && function_exists($argument)) {
661
            $tokens[$token] = $argument($variables);
661
            $tokens[$token] = $argument($elements);
662 662
          }
663 663
          if (is_array($argument) && function_exists($argument[0])) {
664 664
            $function = array_shift($argument);
665
            $argument = array_merge(array(&$variables), $argument);
665
            $argument = array_merge(array(&$elements), $argument);
666 666
            $tokens[$token] = call_user_func_array($function, $argument);
667 667
          }
668 668
          break;
drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
4 4
package = Chaos tool suite
5 5
dependencies[] = ctools
6 6

  
7
; Information added by Drupal.org packaging script on 2014-02-12
8
version = "7.x-1.4"
7
; Information added by Drupal.org packaging script on 2014-11-19
8
version = "7.x-1.5"
9 9
core = "7.x"
10 10
project = "ctools"
11
datestamp = "1392220730"
11
datestamp = "1416423525"
12 12

  
drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
4 4
dependencies[] = ctools
5 5
core = 7.x
6 6

  
7
; Information added by Drupal.org packaging script on 2014-02-12
8
version = "7.x-1.4"
7
; Information added by Drupal.org packaging script on 2014-11-19
8
version = "7.x-1.5"
9 9
core = "7.x"
10 10
project = "ctools"
11
datestamp = "1392220730"
11
datestamp = "1416423525"
12 12

  
drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
4 4
package = Chaos tool suite
5 5
dependencies[] = ctools
6 6

  
7
; Information added by Drupal.org packaging script on 2014-02-12
8
version = "7.x-1.4"
7
; Information added by Drupal.org packaging script on 2014-11-19
8
version = "7.x-1.5"
9 9
core = "7.x"
10 10
project = "ctools"
11
datestamp = "1392220730"
11
datestamp = "1416423525"
12 12

  
drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
7 7
dependencies[] = advanced_help
8 8
core = 7.x
9 9

  
10
; Information added by Drupal.org packaging script on 2014-02-12
11
version = "7.x-1.4"
10
; Information added by Drupal.org packaging script on 2014-11-19
11
version = "7.x-1.5"
12 12
core = "7.x"
13 13
project = "ctools"
14
datestamp = "1392220730"
14
datestamp = "1416423525"
15 15

  
drupal7/sites/all/modules/ctools/help/plugins-creating.html
24 24
<dt>cache table</dt>
25 25
<dd><em>Defaults to:</em> <strong>'cache'</strong></dd>
26 26
<dd>If 'cache' is TRUE, then this value specifies the cache table where the cached plugin information will be stored.</dd>
27
<dt>classes</dt>
28
<dd><em>Defaults to:</em> <strong>array()</strong></dd>
29
<dd>An array of <em>class identifiers</em>(i.e. plugin array keys) which a plugin of this type uses to provide classes to the CTools autoloader. For example, if <strong>classes</strong> is set to array('class'), then CTools will search each <strong>$plugin['class']</strong> for a class to autoload. Depending of the plugin structure, a <em>class identifier</em> may be either:</dd>
30
<dl>
31
<dt>- a file name:</dt>
32
<dd>the file which holds the class with the name structure as: <em>[filename].[class].php</em></dd>
33
<dd>in this case the class name can be different than the <em>class identifier</em></dd>
34
<dt>- the class name:</dt>
35
<dd>if the class is in the same file as the $plugin</dd>
36
<dd>the plugin <em>.inc</em> file can have a different name than the <em>class identifier</em></dd>
37
</dl>
27 38
<dt>defaults</dt>
28 39
<dd><em>Defaults to:</em> <strong>array()</strong></dd>
29 40
<dd>An array of defaults that should be added to each plugin; this can be used to ensure that every plugin has the basic data necessary. These defaults will not ovewrite data supplied by the plugin. This could also be a function name, in which case the callback will be used to provide defaults. NOTE, however, that the callback-based approach is deprecated as it is redundant with the 'process' callback, and as such will be removed in later versions. Consequently, you should only use the array form for maximum cross-version compatibility.</dd>
drupal7/sites/all/modules/ctools/includes/ajax.inc
49 49
  return l($text, $dest, array('html' => TRUE, 'attributes' => array('class' => array($type, $class), 'title' => $alt)));
50 50
}
51 51

  
52
/**
53
 * Render an icon and related text as a link. This will automatically apply an AJAX class
54
 * to the link and add the appropriate javascript to make this happen.
55
 *
56
 * Note: 'html' => true so be sure any text is vetted! Chances are these kinds of buttons will
57
 * not use user input so this is a very minor concern.
58
 *
59
 * @param $text
60
 *   The text that will be displayed as the link.
61
 * @param $image
62
 *   The icon image to include in the link.
63
 * @param $dest
64
 *   The destination of the link.
65
 * @param $alt
66
 *   The title text of the link.
67
 * @param $class
68
 *   Any class to apply to the link. @todo this should be a options array.
69
 * @param $type
70
 *   A type to use, in case a different behavior should be attached. Defaults
71
 *   to ctools-use-ajax.
72
 */
73
function ctools_ajax_icon_text_button($text, $image, $dest, $alt, $class = '', $type = 'use-ajax') {
74
  drupal_add_library('system', 'drupal.ajax');
75
  $rendered_image = theme('image', array('path' => $image));
76
  $link_content = $rendered_image . "<span>" . $text . "</span>";
77
  return l($link_content, $dest, array('html' => TRUE, 'attributes' => array('class' => array($type, $class), 'title' => $alt)));
78
}
79

  
52 80
/**
53 81
 * Set a single property to a value, on all matched elements.
54 82
 *
drupal7/sites/all/modules/ctools/includes/modal.inc
188 188
 * Wrap a form so that we can use it properly with AJAX. Essentially if the
189 189
 * form wishes to render, it automatically does that, otherwise it returns
190 190
 * so we can see submission results.
191

  
192
 * @param array $form
193
 *   An associative array containing the structure of the form.
194
 * @param array $form_state
195
 *   An associative array containing the current state of the form.
196
 *   If the 'reset_html_ids' key is set to TRUE, it will prevent HTML IDs in
197
 *   forms from being incremented.
191 198
 *
192
 * @return
199
 * @return mixed
193 200
 *   The output of the form, if it was rendered. If $form_state['ajax']
194 201
 *   is set, this will use ctools_modal_form_render so it will be
195 202
 *   a $command object suitable for ajax_render already.
......
199 206
 *   form will never be redirected.
200 207
 */
201 208
function ctools_modal_form_wrapper($form_id, &$form_state) {
209
  // Since this will run again on form rebuild while still in the modal, prevent
210
  // form IDs from being incremented.
211
  // @todo https://drupal.org/node/1305882
212
  if (!empty($form_state['reset_html_ids']) && !empty($_POST['ajax_html_ids'])) {
213
    unset($_POST['ajax_html_ids']);
214
  }
215

  
202 216
  // This won't override settings already in.
203 217
  $form_state += array(
204 218
    're_render' => FALSE,
drupal7/sites/all/modules/ctools/includes/utility.inc
29 29
    }
30 30
  }
31 31
}
32

  
33
/**
34
 * Implementation of hook_theme_registry_alter()
35
 */
36
function ctools_theme_registry_alter(&$registry) {
37
  // Move this one last last last so it can catch changes made by modules and themes.
38
  $key = array_search('ctools_preprocess_page', $registry['page']['preprocess functions']);
39
  if ($key) {
40
    unset($registry['page']['preprocess functions'][$key]);
41
  }
42
  $registry['page']['preprocess functions'][] = 'ctools_preprocess_page';
43
}
44

  
drupal7/sites/all/modules/ctools/js/modal.js
258 258
        $('input[type=submit], button', this).click(function(event) {
259 259
          Drupal.ajax[base].element = this;
260 260
          this.form.clk = this;
261
          // Stop autocomplete from submitting.
262
          if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) {
263
            return false;
264
          }
261 265
          // An empty event means we were triggered via .click() and
262 266
          // in jquery 1.4 this won't trigger a submit.
263 267
          if (event.bubbles == undefined) {
drupal7/sites/all/modules/ctools/page_manager/page_manager.info
4 4
dependencies[] = ctools
5 5
package = Chaos tool suite
6 6

  
7
; Information added by Drupal.org packaging script on 2014-02-12
8
version = "7.x-1.4"
7
; Information added by Drupal.org packaging script on 2014-11-19
8
version = "7.x-1.5"
9 9
core = "7.x"
10 10
project = "ctools"
11
datestamp = "1392220730"
11
datestamp = "1416423525"
12 12

  
drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc
443 443
      '#type' => 'checkbox',
444 444
      '#default_value' => !empty($page->make_frontpage),
445 445
      '#title' => t('Make this your site home page.'),
446
      '#description' => t('To set this panel as your home page you must create a unique path name with no % placeholders in the path. The site home page is currently set to %homepage on the !siteinfo configuration form.', array('!siteinfo' => l(t('Site Information'), 'admin/settings/site-information'), '%homepage' => '/' . $frontpage)),
446
      '#description' => t('To set this panel as your home page you must create a unique path name with no % placeholders in the path. The site home page is currently set to %homepage on the !siteinfo configuration form.', array('!siteinfo' => l(t('Site Information'), 'admin/config/system/site-information'), '%homepage' => '/' . $frontpage)),
447 447
    );
448 448
    $form['admin_paths'] = array(
449 449
      '#type' => 'checkbox',
drupal7/sites/all/modules/ctools/plugins/contexts/string.inc
14 14
  'title' => t('String'),
15 15
  'description' => t('A context that is just a string.'),
16 16
  'context' => 'ctools_context_create_string',
17
  'edit form' => 'ctools_context_string_settings_form',
18
  'defaults' => '',
17 19
  'keyword' => 'string',
18 20
  'no ui' => FALSE,
19 21
  'context name' => 'string',
......
44 46
  }
45 47

  
46 48
  if ($data !== FALSE ) {
47
    $context->data = $data;
49
    // Support the array storage from the settings form but also handle direct input from arguments.
50
    $context->data = is_array($data) ? $data['string'] : $data;
48 51
    $context->title = ($conf) ? check_plain($data['identifier']) : check_plain($data);
49 52
    return $context;
50 53
  }
......
62 65
  }
63 66
}
64 67

  
68
/**
69
 * String settings form.
70
 */
71
function ctools_context_string_settings_form($form, &$form_state) {
72
  $conf = &$form_state['conf'];
73

  
74
  $form['string'] = array(
75
    '#title' => t('Enter the string'),
76
    '#type' => 'textfield',
77
    '#maxlength' => 512,
78
    '#weight' => -10,
79
    '#default_value' => $conf['string'],
80
  );
81

  
82
  return $form;
83
}
84

  
85
function ctools_context_string_settings_form_submit($form, &$form_state) {
86
  $form_state['conf']['string'] = $form_state['values']['string'];
87
}
drupal7/sites/all/modules/ctools/plugins/relationships/entity_from_field.inc
154 154
 * Return a new context based on an existing context.
155 155
 */
156 156
function ctools_entity_from_field_context($context, $conf) {
157
  // Perform access check on current logged in user.
158
  global $user;
159
  // Clone user object so account can be passed by value to access callback.
160
  $account = clone $user;
161

  
157 162
  $delta = !empty($conf['delta']) ? intval($conf['delta']) : 0;
158 163
  $plugin = $conf['name'];
159 164
  list($plugin, $plugin_name) = explode(':', $plugin);
......
176 181

  
177 182
        $plugin_info = ctools_get_relationship($conf['name']);
178 183
        $to_entity_id = $items[$delta][$plugin_info['source key']];
179
        $loaded_to_entity = array_shift(entity_load($to_entity, array($to_entity_id)));
180
        if(function_exists($to_entity_info['access callback']) && !call_user_func($to_entity_info['access callback'], 'view', $loaded_to_entity)) {
184
        $loaded_to_entity = entity_load($to_entity, array($to_entity_id));
185
        $loaded_to_entity = array_shift($loaded_to_entity);
186

  
187
        // Pass current user account and entity type to access callback.
188
        if (function_exists($to_entity_info['access callback']) && !call_user_func($to_entity_info['access callback'], 'view', $loaded_to_entity, $account, $to_entity)) {
181 189
          return ctools_context_create_empty('entity:' . $to_entity, NULL);
182 190
        }
183 191
        else {
drupal7/sites/all/modules/ctools/stylizer/stylizer.info
5 5
dependencies[] = ctools
6 6
dependencies[] = color
7 7

  
8
; Information added by Drupal.org packaging script on 2014-02-12
9
version = "7.x-1.4"
8
; Information added by Drupal.org packaging script on 2014-11-19
9
version = "7.x-1.5"
10 10
core = "7.x"
11 11
project = "ctools"
12
datestamp = "1392220730"
12
datestamp = "1416423525"
13 13

  
drupal7/sites/all/modules/ctools/term_depth/term_depth.info
3 3
core = 7.x
4 4
dependencies[] = ctools
5 5
package = Chaos tool suite
6
; Information added by Drupal.org packaging script on 2014-02-12
7
version = "7.x-1.4"
6
; Information added by Drupal.org packaging script on 2014-11-19
7
version = "7.x-1.5"
8 8
core = "7.x"
9 9
project = "ctools"
10
datestamp = "1392220730"
10
datestamp = "1416423525"
11 11

  
drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
7 7

  
8 8
files[] = ctools_export.test
9 9

  
10
; Information added by Drupal.org packaging script on 2014-02-12
11
version = "7.x-1.4"
10
; Information added by Drupal.org packaging script on 2014-11-19
11
version = "7.x-1.5"
12 12
core = "7.x"
13 13
project = "ctools"
14
datestamp = "1392220730"
14
datestamp = "1416423525"
15 15

  
drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
11 11
files[] = math_expression_stack.test
12 12
hidden = TRUE
13 13

  
14
; Information added by Drupal.org packaging script on 2014-02-12
15
version = "7.x-1.4"
14
; Information added by Drupal.org packaging script on 2014-11-19
15
version = "7.x-1.5"
16 16
core = "7.x"
17 17
project = "ctools"
18
datestamp = "1392220730"
18
datestamp = "1416423525"
19 19

  
drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views.inc
145 145
      }
146 146
      if (!empty($contexts[$cid])) {
147 147
        $arg = ctools_context_convert_context($contexts[$cid], $converter, array('sanitize' => FALSE));
148
        array_splice($args, $count, 0, array($arg));
148 149
      }
149 150
      else {
150 151
        // Make sure we put an argument in even if it was not there.
151 152
        $arg = NULL;
152 153
      }
153
      array_splice($args, $count, 0, array($arg));
154 154
    }
155 155
  }
156 156

  
drupal7/sites/all/modules/ctools/views_content/views_content.info
9 9
files[] = plugins/views/views_content_plugin_display_panel_pane.inc
10 10
files[] = plugins/views/views_content_plugin_style_ctools_context.inc
11 11

  
12
; Information added by Drupal.org packaging script on 2014-02-12
13
version = "7.x-1.4"
12
; Information added by Drupal.org packaging script on 2014-11-19
13
version = "7.x-1.5"
14 14
core = "7.x"
15 15
project = "ctools"
16
datestamp = "1392220730"
16
datestamp = "1416423525"
17 17

  

Formats disponibles : Unified diff