Projet

Général

Profil

Révision 64156087

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/panels/includes/display-edit.inc
1 1
<?php
2 2

  
3
/*
3
/**
4 4
 * @file
5 5
 * Core Panels API include file containing various display-editing functions.
6 6
 * This includes all the basic editing forms (content, layout, layout settings)
......
40 40
}
41 41

  
42 42
/**
43
 * Form definition for the panels display editor
43
 * Form definition for the panels display editor.
44 44
 *
45 45
 * No validation function is necessary, as all 'validation' is handled
46 46
 * either in the lead-up to form rendering (through the selection of
......
48 48
 * the ajax modals & content types.
49 49
 *
50 50
 * @ingroup forms
51
 *
51 52
 * @see panels_edit_display_submit()
52 53
 */
53 54
function panels_edit_display_form($form, &$form_state) {
......
157 158
      $display->panels[$region_id] = array();
158 159
      if ($panes) {
159 160
        $pids = explode(',', $panes);
160
        // need to filter the array, b/c passing it in a hidden field can generate trash
161
        // Need to filter the array, b/c passing it in a hidden field can generate trash.
161 162
        foreach (array_filter($pids) as $pid) {
162 163
          if ($old_content[$pid]) {
163 164
            $display->panels[$region_id][] = $pid;
......
221 222
  ctools_include('dependent');
222 223

  
223 224
  if ($form_state['display_title']) {
224
    $form['display_title'] = array (
225
    $form['display_title'] = array(
225 226
      '#tree' => TRUE,
226 227
    );
227 228

  
......
252 253
      // We have to create a manual fieldset because fieldsets do not support IDs.
253 254
      // Use 'hidden' instead of 'markup' so that the process will run.
254 255
      // Add js for collapsible fieldsets manually
255
//      drupal_add_js('misc/form.js');
256
//      drupal_add_js('misc/collapse.js');
257
//      $form['display_title']['contexts_prefix'] = array(
258
//        '#type' => 'hidden',
259
//        '#id' => 'edit-display-substitutions',
260
//        '#prefix' => '<div><fieldset id="edit-display-substitutions" class="collapsed collapsible"><legend>' . t('Substitutions') . '</legend><div class="fieldset-wrapper">',
261
//        '#process' => array('ctools_dependent_process'),
262
//        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
263
//      );
264

  
256
      //      drupal_add_js('misc/form.js');
257
      //      drupal_add_js('misc/collapse.js');
258
      //      $form['display_title']['contexts_prefix'] = array(
259
      //        '#type' => 'hidden',
260
      //        '#id' => 'edit-display-substitutions',
261
      //        '#prefix' => '<div><fieldset id="edit-display-substitutions" class="collapsed collapsible"><legend>' . t('Substitutions') . '</legend><div class="fieldset-wrapper">',
262
      //        '#process' => array('ctools_dependent_process'),
263
      //        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
264
      //      );
265 265
      $rows = array();
266 266
      foreach ($display->context as $context) {
267 267
        foreach (ctools_context_get_converters('%' . check_plain($context->keyword) . ':', $context) as $keyword => $title) {
......
279 279
        '#collapsible' => TRUE,
280 280
        '#collapsed' => TRUE,
281 281
        '#value' => theme('table', array('header' => $header, 'rows' => $rows)),
282
//        '#process' => array('form_process_fieldset', 'ctools_dependent_process'),
283
//        '#id' => 'edit-display-title-context',
284
//        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
282
      // '#process' => array('form_process_fieldset', 'ctools_dependent_process'),      //        '#id' => 'edit-display-title-context',
283
      //        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
285 284
      );
286
//      $form['display_title']['contexts_suffix'] = array(
287
//        '#value' => '</div></fieldset></div>',
288
//      );
285
      // $form['display_title']['contexts_suffix'] = array(      //        '#value' => '</div></fieldset></div>',
286
      //      );.
289 287
    }
290 288
  }
291 289

  
292
  // TODO doc the ability to do this as part of the API
290
  // TODO doc the ability to do this as part of the API.
293 291
  if (!empty($layout['settings form']) && function_exists($layout['settings form'])) {
294 292
    $form['layout_settings'] = $layout['settings form']($display, $layout, $display->layout_settings);
295 293
  }

Formats disponibles : Unified diff