Projet

Général

Profil

Révision 74f6bef0

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/adaptivetheme/at_core/inc/forms/settings.debug.inc
4 4
 * @file
5 5
 * Generate settings for the Debuggers form.
6 6
 */
7
function at_core_debug_form(&$form) {
8
  $form['at-settings']['debug'] = array(
9
    '#type' => 'fieldset',
10
    '#title' => t('Debuggers'),
11
  );
12
  $form['at-settings']['debug']['debug-layout'] = array(
13
    '#type' => 'fieldset',
14
    '#title' => t('Debuggers'),
15
    '#description' => t('<h3>Debuggers</h3>'),
16
  );
7 17

  
8
$form['at-settings']['debug'] = array(
9
  '#type' => 'fieldset',
10
  '#title' => t('Debuggers'),
11
);
12
$form['at-settings']['debug']['debug-layout'] = array(
13
  '#type' => 'fieldset',
14
  '#title' => t('Debuggers'),
15
  '#description' => t('<h3>Debuggers</h3>'),
16
);
18
  // Highlight regions
19
  $form['at-settings']['debug']['debug-layout']['expose_regions'] = array(
20
    '#type' => 'checkbox',
21
    '#title' => t('Highlight regions'),
22
    '#default_value' => at_get_setting('expose_regions'),
23
  );
17 24

  
18
// Highlight regions
19
$form['at-settings']['debug']['debug-layout']['expose_regions'] = array(
20
  '#type' => 'checkbox',
21
  '#title' => t('Highlight regions'),
22
  '#default_value' => at_get_setting('expose_regions'),
23
);
25
  // Window size bookmarklet
26
  $form['at-settings']['debug']['debug-layout']['show_window_size'] = array(
27
    '#type' => 'checkbox',
28
    '#title' => t('Show window size - appears in the bottom right corner'),
29
    '#default_value' => at_get_setting('show_window_size'),
30
  );
24 31

  
25
// Window size bookmarklet
26
$form['at-settings']['debug']['debug-layout']['show_window_size'] = array(
27
  '#type' => 'checkbox',
28
  '#title' => t('Show window size - appears in the bottom right corner'),
29
  '#default_value' => at_get_setting('show_window_size'),
30
);
32
  // Version test
33
  $form['at-settings']['debug']['debug-layout']['atcore_version_test'] = array(
34
    '#type' => 'checkbox',
35
    '#title' => t('Sub-theme compatibility test'),
36
    '#default_value' => at_get_setting('atcore_version_test'),
37
  );
31 38

  
32
// Version test
33
$form['at-settings']['debug']['debug-layout']['atcore_version_test'] = array(
34
  '#type' => 'checkbox',
35
  '#title' => t('Sub-theme compatibility test'),
36
  '#default_value' => at_get_setting('atcore_version_test'),
37
);
39
  // Debug panels
40
  $form['at-settings']['debug']['debug-panels'] = array(
41
    '#type' => 'fieldset',
42
    '#title' => t('<h3>Debug Panels and Gpanels Layouts</h3>'),
43
    '#description' => t('<h3>Debug Panels and Gpanels Layouts</h3>'),
44
  );
45
  $form['at-settings']['debug']['debug-panels']['load_all_panels'] = array(
46
    '#type' => 'checkbox',
47
    '#title' => t('Load all panels in the front page content region'),
48
    '#default_value' => at_get_setting('load_all_panels'),
49
    '#description' => t('This will only load the layouts that ship with AT Core, the test is hard coded.'),
50
  );
51
  $form['at-settings']['debug']['debug-panels']['load_all_panels_no_sidebars'] = array(
52
    '#type' => 'checkbox',
53
    '#title' => t('Disable sidebars for the front page'),
54
    '#default_value' => at_get_setting('load_all_panels_no_sidebars'),
55
    '#states' => array(
56
      'visible' => array('input[name="load_all_panels"]' => array('checked' => TRUE)),
57
    ),
58
  );
38 59

  
39
// Debug panels
40
$form['at-settings']['debug']['debug-panels'] = array(
41
  '#type' => 'fieldset',
42
  '#title' => t('<h3>Debug Panels and Gpanels Layouts</h3>'),
43
  '#description' => t('<h3>Debug Panels and Gpanels Layouts</h3>'),
44
);
45
$form['at-settings']['debug']['debug-panels']['load_all_panels'] = array(
46
  '#type' => 'checkbox',
47
  '#title' => t('Load all panels in the front page content region'),
48
  '#default_value' => at_get_setting('load_all_panels'),
49
  '#description' => t('This will only load the layouts that ship with AT Core, the test is hard coded.'),
50
);
51
$form['at-settings']['debug']['debug-panels']['load_all_panels_no_sidebars'] = array(
52
  '#type' => 'checkbox',
53
  '#title' => t('Disable sidebars for the front page'),
54
  '#default_value' => at_get_setting('load_all_panels_no_sidebars'),
55
  '#states' => array(
56
    'visible' => array('input[name="load_all_panels"]' => array('checked' => TRUE)),
57
  ),
58
);
60
  // All media queries
61
  $queries  = '<dl>';
62
  $queries .= '<dt>Standard layout</dt><dd>@media ' . at_get_setting('bigscreen_media_query') . '</dd>';
63
  $queries .= '<dt>Tablet landscape</dt><dd>@media ' . at_get_setting('tablet_landscape_media_query') . '</dd>';
64
  $queries .= '<dt>Tablet portrait</dt><dd>@media ' . at_get_setting('tablet_portrait_media_query') . '</dd>';
65
  $queries .= '<dt>Smalltouch landscape</dt><dd>@media ' . at_get_setting('smalltouch_landscape_media_query') . '</dd>';
66
  $queries .= '<dt>Smalltouch portrait</dt><dd>@media ' . at_get_setting('smalltouch_portrait_media_query') . '</dd>';
67
  $queries .= '</dl>';
59 68

  
60
// All media queries
61
$queries  = '<dl>';
62
$queries .= '<dt>Standard layout</dt><dd>@media ' . at_get_setting('bigscreen_media_query') . '</dd>';
63
$queries .= '<dt>Tablet landscape</dt><dd>@media ' . at_get_setting('tablet_landscape_media_query') . '</dd>';
64
$queries .= '<dt>Tablet portrait</dt><dd>@media ' . at_get_setting('tablet_portrait_media_query') . '</dd>';
65
$queries .= '<dt>Smartphone landscape</dt><dd>@media ' . at_get_setting('smartphone_landscape_media_query') . '</dd>';
66
$queries .= '<dt>Smartphone portrait</dt><dd>@media ' . at_get_setting('smartphone_portrait_media_query') . '</dd>';
67
$queries .= '</dl>';
69
  // Sanity check
70
  $queries = filter_xss($queries);
68 71

  
69
// Sanity check
70
$queries = filter_xss($queries);
71

  
72
$form['at-settings']['debug']['mediaqueries'] = array(
73
  '#type' => 'fieldset',
74
  '#title' => t('<h3>All Media Queries</h3>'),
75
  '#description' => t('<h3>All Media Queries</h3><p>This shows the media queries currently being used by your theme. This is provided so you can easily save a backup copy for reference.</p>'),
76
);
77
$form['at-settings']['debug']['mediaqueries']['output'] = array(
78
  '#markup' => $queries ? $queries : '',
79
);
72
  $form['at-settings']['debug']['mediaqueries'] = array(
73
    '#type' => 'fieldset',
74
    '#title' => t('<h3>All Media Queries</h3>'),
75
    '#description' => t('<h3>All Media Queries</h3><p>This shows the media queries currently being used by your theme. This is provided so you can easily save a backup copy for reference.</p>'),
76
  );
77
  $form['at-settings']['debug']['mediaqueries']['output'] = array(
78
    '#markup' => $queries ? $queries : '',
79
  );
80
}

Formats disponibles : Unified diff