Projet

Général

Profil

Révision c8d66f01

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/admin_menu/README.txt
20 20

  
21 21
-- INSTALLATION --
22 22

  
23
* Install as usual, see http://drupal.org/node/70151 for further information.
23
* Install as usual, see http://drupal.org/node/895232 for further information.
24 24

  
25 25
* You likely want to disable Toolbar module, since its output clashes with
26 26
  Administration menu.
drupal7/sites/all/modules/admin_menu/admin_devel/admin_devel.info
4 4
core = 7.x
5 5
scripts[] = admin_devel.js
6 6

  
7
; Information added by drupal.org packaging script on 2013-01-31
8
version = "7.x-3.0-rc4"
7
; Information added by Drupal.org packaging script on 2014-12-19
8
version = "7.x-3.0-rc5"
9 9
core = "7.x"
10 10
project = "admin_menu"
11
datestamp = "1359651687"
11
datestamp = "1419029284"
12 12

  
drupal7/sites/all/modules/admin_menu/admin_menu.color.css
32 32
#admin-menu li li.expandable {
33 33
  background-color: #b93f3f;
34 34
}
35
#admin-menu li li:hover,
36
#admin-menu li li.iehover {
35
#admin-menu li li:hover {
37 36
  background-color: #690f0f;
38 37
}
39 38
#admin-menu li li.expandable:hover a,
drupal7/sites/all/modules/admin_menu/admin_menu.css
98 98
#admin-menu .dropdown li li {
99 99
  background: #202020;
100 100
  filter: Alpha(opacity=88);
101
  float: none;
101 102
  opacity: 0.88;
102 103
  width: 160px; /* Required for Opera */
103 104
}
......
126 127
#admin-menu .dropdown li:hover ul ul,
127 128
#admin-menu .dropdown li:hover ul ul ul,
128 129
#admin-menu .dropdown li:hover ul ul ul ul,
129
#admin-menu .dropdown li:hover ul ul ul ul ul,
130
#admin-menu .dropdown li.iehover ul ul,
131
#admin-menu .dropdown li.iehover ul ul ul,
132
#admin-menu .dropdown li.iehover ul ul ul ul,
133
#admin-menu .dropdown li.iehover ul ul ul ul ul {
130
#admin-menu .dropdown li:hover ul ul ul ul ul {
134 131
  display: none;
135 132
  left: -999em; /* LTR */
136 133
}
......
140 137
#admin-menu .dropdown li li:hover ul,
141 138
#admin-menu .dropdown li li li:hover ul,
142 139
#admin-menu .dropdown li li li li:hover ul,
143
#admin-menu .dropdown li li li li li:hover ul,
144
#admin-menu .dropdown li.iehover ul,
145
#admin-menu .dropdown li li.iehover ul,
146
#admin-menu .dropdown li li li.iehover ul,
147
#admin-menu .dropdown li li li li.iehover ul,
148
#admin-menu .dropdown li li li li li.iehover ul {
140
#admin-menu .dropdown li li li li li:hover ul {
149 141
  display: block;
150 142
  left: auto; /* LTR */
151 143
}
......
157 149
#admin-menu .dropdown li li.expandable {
158 150
  background: #45454A url(images/arrow.png) no-repeat 145px 6px;
159 151
}
160
#admin-menu .dropdown li li:hover,
161
#admin-menu .dropdown li li.iehover {
152
#admin-menu .dropdown li li:hover {
162 153
  background-color: #111;
163 154
}
164 155
#admin-menu .dropdown li li:hover a,
......
175 166
#admin-menu .dropdown li li.expandable:hover li.expandable:hover li a {
176 167
  border-color: #323232;
177 168
}
178
#admin-menu .dropdown li li:hover li a,
179
#admin-menu .dropdown li li.iehover li a,
180
#admin-menu .dropdown li li.iehover li.iehover li a {
169
#admin-menu .dropdown li li:hover li a {
181 170
  color: #EEE;
182 171
}
183
#admin-menu .dropdown li li.iehover a,
184
#admin-menu .dropdown li li.iehover li.iehover a,
185
#admin-menu .dropdown li li.iehover li.iehover li.iehover a {
186
  color: #FFF;
187
  width: 90%; /* IE */
188
}
189 172

  
190 173
/* Search form */
191 174
#admin-menu .admin-menu-search .form-item {
drupal7/sites/all/modules/admin_menu/admin_menu.inc
497 497
    );
498 498
  }
499 499

  
500
  // Add link to toggle developer modules (performance).
501
  $saved_state = variable_get('admin_menu_devel_modules_enabled', NULL);
502
  $links['icon']['toggle-modules'] = array(
503
    '#title' => isset($saved_state) ? t('Enable developer modules') : t('Disable developer modules'),
504
    '#weight' => 88,
505
    '#access' => user_access('administer modules'),
506
    '#href' => 'admin_menu/toggle-modules',
507
    '#options' => array(
508
      'query' => $destination + array('token' => drupal_get_token('admin_menu/toggle-modules')),
509
    ),
510
  );
511

  
512 500
  // Add Devel module menu links.
513 501
  if (module_exists('devel')) {
514 502
    $devel_tree = menu_build_tree('devel');
......
697 685
    '#title' => t('Cache menu in client-side browser'),
698 686
    '#default_value' => variable_get('admin_menu_cache_client', 1),
699 687
  );
700
  // Fetch all available modules manually, since module_list() only returns
701
  // currently enabled modules, which makes this setting pointless if developer
702
  // modules are currently disabled.
703
  $all_modules = array();
704
  $result = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' ORDER BY name ASC");
705
  foreach ($result as $module) {
706
    if (file_exists($module->filename)) {
707
      $info = unserialize($module->info);
708
      $all_modules[$module->name] = $info['name'];
709
    }
710
  }
711
  $devel_modules = variable_get('admin_menu_devel_modules', _admin_menu_developer_modules());
712
  $devel_modules = array_intersect_key($all_modules, array_flip($devel_modules));
713
  $form['performance']['admin_menu_devel_modules_skip'] = array(
714
    '#type' => 'checkboxes',
715
    '#title' => t('Developer modules to keep enabled'),
716
    '#default_value' => variable_get('admin_menu_devel_modules_skip', array()),
717
    '#options' => $devel_modules,
718
    '#access' => !empty($devel_modules),
719
    '#description' => t('The selected modules will not be disabled when the link %disable-developer-modules below the icon in the menu is invoked.', array(
720
      '%disable-developer-modules' => t('Disable developer modules'),
721
    )),
722
  );
723 688

  
724 689
  return system_settings_form($form);
725 690
}
......
783 748
  );
784 749
}
785 750

  
786
/**
787
 * Menu callback; Enable/disable developer modules.
788
 *
789
 * This can save up to 150ms on each uncached page request.
790
 */
791
function admin_menu_toggle_modules() {
792
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], current_path())) {
793
    return MENU_ACCESS_DENIED;
794
  }
795

  
796
  $rebuild = FALSE;
797
  $saved_state = variable_get('admin_menu_devel_modules_enabled', NULL);
798
  if (isset($saved_state)) {
799
    // Re-enable modules that were enabled before.
800
    module_enable($saved_state);
801
    variable_del('admin_menu_devel_modules_enabled');
802
    drupal_set_message(t('Enabled these modules: !module-list.', array('!module-list' => implode(', ', $saved_state))));
803
    $rebuild = TRUE;
804
  }
805
  else {
806
    // Allow site admins to override this variable via settings.php.
807
    $devel_modules = variable_get('admin_menu_devel_modules', _admin_menu_developer_modules());
808
    // Store currently enabled modules in a variable.
809
    $devel_modules = array_intersect(module_list(FALSE, FALSE), $devel_modules);
810
    $devel_modules = array_diff($devel_modules, variable_get('admin_menu_devel_modules_skip', array()));
811
    if (!empty($devel_modules)) {
812
      variable_set('admin_menu_devel_modules_enabled', $devel_modules);
813
      // Disable developer modules.
814
      module_disable($devel_modules);
815
      drupal_set_message(t('Disabled these modules: !module-list.', array('!module-list' => implode(', ', $devel_modules))));
816
      $rebuild = TRUE;
817
    }
818
    else {
819
      drupal_set_message(t('No developer modules are enabled.'));
820
    }
821
  }
822
  if ($rebuild) {
823
    // Make sure everything is rebuilt, basically a combination of the calls
824
    // from system_modules() and system_modules_submit().
825
    drupal_theme_rebuild();
826
    menu_rebuild();
827
    cache_clear_all('schema', 'cache');
828
    cache_clear_all();
829
    drupal_clear_css_cache();
830
    drupal_clear_js_cache();
831
    // Synchronize to catch any actions that were added or removed.
832
    actions_synchronize();
833
    // Finally, flush admin_menu's cache.
834
    admin_menu_flush_caches();
835
  }
836
  drupal_goto();
837
}
838

  
839
/**
840
 * Helper function to return a default list of developer modules.
841
 */
842
function _admin_menu_developer_modules() {
843
  return array(
844
    'admin_devel',
845
    'cache_disable',
846
    'coder',
847
    'content_copy',
848
    'context_ui',
849
    'debug',
850
    'delete_all',
851
    'demo',
852
    'devel',
853
    'devel_node_access',
854
    'devel_themer',
855
    'field_ui',
856
    'fontyourface_ui',
857
    'form_controller',
858
    'imagecache_ui',
859
    'journal',
860
    'l10n_client',
861
    'l10n_update',
862
    'macro',
863
    'rules_admin',
864
    'stringoverrides',
865
    'trace',
866
    'upgrade_status',
867
    'user_display_ui',
868
    'util',
869
    'views_ui',
870
    'views_theme_wizard',
871
  );
872
}
873

  
874 751
/**
875 752
 * Flush all caches or a specific one.
876 753
 *
drupal7/sites/all/modules/admin_menu/admin_menu.info
8 8
dependencies[] = system (>7.10)
9 9
files[] = tests/admin_menu.test
10 10

  
11
; Information added by drupal.org packaging script on 2013-01-31
12
version = "7.x-3.0-rc4"
11
; Information added by Drupal.org packaging script on 2014-12-19
12
version = "7.x-3.0-rc5"
13 13
core = "7.x"
14 14
project = "admin_menu"
15
datestamp = "1359651687"
15
datestamp = "1419029284"
16 16

  
drupal7/sites/all/modules/admin_menu/admin_menu.install
33 33
function admin_menu_uninstall() {
34 34
  // Delete variables.
35 35
  variable_del('admin_menu_components');
36
  variable_del('admin_menu_devel_modules');
37
  variable_del('admin_menu_devel_modules_enabled');
38
  variable_del('admin_menu_devel_modules_skip');
39 36
  variable_del('admin_menu_margin_top');
40 37
  variable_del('admin_menu_position_fixed');
41 38
  variable_del('admin_menu_tweak_modules');
......
44 41
  variable_del('admin_menu_display');
45 42
  variable_del('admin_menu_cache_server');
46 43
  variable_del('admin_menu_cache_client');
44
  // Unused variables still should be deleted.
45
  variable_del('admin_menu_devel_modules');
46
  variable_del('admin_menu_devel_modules_enabled');
47
  variable_del('admin_menu_devel_modules_skip');
47 48
}
48 49

  
49 50
/**
drupal7/sites/all/modules/admin_menu/admin_menu.js
219 219
 *   it will not run last.
220 220
 */
221 221
Drupal.admin.behaviors.hover = function (context, settings, $adminMenu) {
222
  // Hover emulation for IE 6.
223
  if ($.browser.msie && parseInt(jQuery.browser.version) == 6) {
224
    $('li', $adminMenu).hover(
225
      function () {
226
        $(this).addClass('iehover');
227
      },
228
      function () {
229
        $(this).removeClass('iehover');
230
      }
231
    );
232
  }
233

  
234 222
  // Delayed mouseout.
235 223
  $('li.expandable', $adminMenu).hover(
236 224
    function () {
drupal7/sites/all/modules/admin_menu/admin_menu.map.inc
58 58

  
59 59
/**
60 60
 * Implements hook_admin_menu_map() on behalf of Field UI module.
61
 *
62
 * @todo Figure out how to fix the comment entity bundle mappings.
61 63
 */
62 64
function field_ui_admin_menu_map() {
63 65
  $map = array();
64
  foreach (entity_get_info() as $obj_type => $info) {
65
    foreach ($info['bundles'] as $bundle_name => $bundle_info) {
66
      if (isset($bundle_info['admin'])) {
67
        $arguments = array();
68
        switch ($obj_type) {
69
          case 'comment':
70
            $fields = array();
71
            foreach (field_info_instances($obj_type, $bundle_name) as $field) {
72
              $fields[] = $field['field_name'];
73
            }
74
            // @todo Make Comment module expose the original node type bundle,
75
            //   pretty please.
76
            if (drupal_substr($bundle_name, 0, 13) == 'comment_node_') {
77
              $bundle_name = drupal_substr($bundle_name, 13);
78
            }
79
            // @todo Doesn't work yet. Why?
80
            $arguments = array(
81
              '%comment_node_type' => array($bundle_name),
82
              '%field_ui_menu' => $fields,
83
            );
84
            break;
85 66

  
86
          case 'node':
87
            $fields = array();
88
            foreach (field_info_instances($obj_type, $bundle_name) as $field) {
89
              $fields[] = $field['field_name'];
90
            }
91
            $arguments = array(
92
              '%node_type' => array($bundle_name),
93
              '%field_ui_menu' => $fields,
94
            );
95
            break;
67
  foreach (entity_get_info() as $entity_type => $entity_info) {
68
    if (!$entity_info['fieldable']) {
69
      continue;
70
    }
71

  
72
    foreach ($entity_info['bundles'] as $bundle => $bundle_info) {
73
      // @see field_ui_menu()
74
      if (!isset($bundle_info['admin'])) {
75
        continue;
76
      }
96 77

  
97
          case 'taxonomy_term':
98
            $fields = array();
99
            foreach (field_info_instances($obj_type, $bundle_name) as $field) {
100
              $fields[] = $field['field_name'];
101
            }
102
            // Map machine_name to vid.
103
            $arguments = array(
104
              '%taxonomy_vocabulary_machine_name' => array($bundle_name),
105
              '%field_ui_menu' => $fields,
106
            );
107
            break;
78
      // Check access to this bundle.
79
      $bundle_info['admin'] += array(
80
        'access callback' => 'user_access',
81
        'access arguments' => array('administer site configuration'),
82
      );
83
      if (!call_user_func_array($bundle_info['admin']['access callback'], $bundle_info['admin']['access arguments'])) {
84
        continue;
85
      }
108 86

  
109
          case 'user':
110
            $arguments = array(
111
              '%field_ui_menu' => array_keys(field_info_fields('user')),
112
            );
113
            break;
87
      if ($fields = field_info_instances($entity_type, $bundle)) {
88
        $path = $bundle_info['admin']['path'];
89
        $argument = array();
90
        if (isset($bundle_info['admin']['bundle argument'])) {
91
          $bundle_arg = arg($bundle_info['admin']['bundle argument'], $path);
92
          $argument[$bundle_arg] = array($bundle);
114 93
        }
115
        if (!empty($arguments)) {
116
          $path = $bundle_info['admin']['path'];
117
          $map["$path/fields/%field_ui_menu"]['parent'] = "$path/fields";
118
          $map["$path/fields/%field_ui_menu"]['arguments'][] = $arguments;
94
        $argument['%field_ui_menu'] = array_keys($fields);
95

  
96
        if (!isset($map["$path/fields/%field_ui_menu"])) {
97
          $map["$path/fields/%field_ui_menu"] = array(
98
            'parent' => "$path/fields",
99
            'arguments' => array(),
100
          );
119 101
        }
102
        $map["$path/fields/%field_ui_menu"]['arguments'][] = $argument;
120 103
      }
121 104
    }
122 105
  }
106

  
123 107
  return $map;
124 108
}
125 109

  
......
161 145
  );
162 146
  return $map;
163 147
}
164

  
drupal7/sites/all/modules/admin_menu/admin_menu.module
87 87
    'file' => 'admin_menu.inc',
88 88
  );
89 89
  // Menu link callbacks.
90
  $items['admin_menu/toggle-modules'] = array(
91
    'page callback' => 'admin_menu_toggle_modules',
92
    'access arguments' => array('administer modules'),
93
    'type' => MENU_CALLBACK,
94
    'file' => 'admin_menu.inc',
95
  );
96 90
  $items['admin_menu/flush-cache'] = array(
97 91
    'page callback' => 'admin_menu_flush_cache',
98 92
    'access arguments' => array('flush caches'),
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.info
4 4
core = 7.x
5 5
dependencies[] = admin_menu
6 6

  
7
; Information added by drupal.org packaging script on 2013-01-31
8
version = "7.x-3.0-rc4"
7
; Information added by Drupal.org packaging script on 2014-12-19
8
version = "7.x-3.0-rc5"
9 9
core = "7.x"
10 10
project = "admin_menu"
11
datestamp = "1359651687"
11
datestamp = "1419029284"
12 12

  
drupal7/sites/all/modules/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module
70 70
    '#title' => t('Show shortcuts'),
71 71
    '#href' => '',
72 72
    '#options' => array(
73
      'attributes' => array('class' => 'shortcut-toggle'),
73
      'attributes' => array('class' => array('shortcut-toggle')),
74 74
    ),
75 75
  );
76 76

  

Formats disponibles : Unified diff