Projet

Général

Profil

Révision bfb52287

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/tao/template.php
43 43
    'modules/system/system.base.css' => FALSE,
44 44
    'modules/system/system.maintenance.css' => FALSE,
45 45
    'modules/system/system.menus.css' => FALSE,
46
    'modules/system/system.messages.css' => FALSE,
47 46
    'modules/system/system.theme.css' => FALSE,
48 47
    'modules/taxonomy/taxonomy.css' => FALSE,
49 48
    'modules/tracker/tracker.css' => FALSE,
......
98 97
 */
99 98
function tao_preprocess_html(&$vars) {
100 99
  $vars['classes_array'][] = 'tao';
100

  
101
  // Add IE from theme file.
102
  $tao_path = drupal_get_path('theme', 'tao');
103
  $info = drupal_parse_info_file($tao_path.'/tao.info');
104
  $ie = $info['stylesheets']['ie'];
105
  foreach ($ie as $key => $value) {
106
    drupal_add_css(
107
      $tao_path.'/'.$value,
108
      array(
109
        'browsers' => array(
110
          'IE' => $key,
111
          '!IE' => FALSE
112
        )
113
      )
114
    );
115
  }
116

  
101 117
}
102 118

  
103 119
/**
......
119 135
  $vars['hook'] = 'block';
120 136

  
121 137
  $vars['attributes_array']['id'] = $vars['block_html_id'];
138
  $vars['attributes_array']['class'] = $vars['classes_array'];
122 139

  
123
  $vars['title_attributes_array']['class'][] = 'block-title';
140
  $vars['title_attributes_array']['class'][] = $vars['hook'] . '-title';
124 141
  $vars['title_attributes_array']['class'][] = 'clearfix';
125 142

  
126
  $vars['content_attributes_array']['class'][] = 'block-content';
143
  $vars['content_attributes_array']['class'][] = $vars['hook'] . '-content';
127 144
  $vars['content_attributes_array']['class'][] = 'clearfix';
128 145
  if ($vars['block']->module == 'block') {
129 146
    $vars['content_attributes_array']['class'][] = 'prose';
......
148 165
function tao_preprocess_node(&$vars) {
149 166
  $vars['hook'] = 'node';
150 167

  
168
  $vars['classes_array'][] = 'clearfix';
169

  
151 170
  $vars['attributes_array']['id'] = "node-{$vars['node']->nid}";
152 171

  
153
  $vars['title_attributes_array']['class'][] = 'node-title';
172
  $vars['title_attributes_array']['class'][] = $vars['hook'] . '-title';
154 173
  $vars['title_attributes_array']['class'][] = 'clearfix';
155 174

  
156
  $vars['content_attributes_array']['class'][] = 'node-content';
175
  $vars['content_attributes_array']['class'][] = $vars['hook'] . '-content';
157 176
  $vars['content_attributes_array']['class'][] = 'clearfix';
158 177
  $vars['content_attributes_array']['class'][] = 'prose';
159 178

  
......
181 200
function tao_preprocess_comment(&$vars) {
182 201
  $vars['hook'] = 'comment';
183 202

  
184
  $vars['title_attributes_array']['class'][] = 'comment-title';
203
  $vars['classes_array'][] = 'clearfix';
204

  
205
  $vars['title_attributes_array']['class'][] = $vars['hook'] . '-title';
185 206
  $vars['title_attributes_array']['class'][] = 'clearfix';
186 207

  
187
  $vars['content_attributes_array']['class'][] = 'comment-content';
208
  $vars['content_attributes_array']['class'][] = $vars['hook'] . '-content';
188 209
  $vars['content_attributes_array']['class'][] = 'clearfix';
189 210

  
190 211
  $vars['submitted'] = t('Submitted by !username on !datetime', array(
......
210 231
    $vars['attributes']['class'][] = 'titled';
211 232
  }
212 233
  if (!empty($element['#id'])) {
213
    $vars['attributes']['id'] = $element['#id'];
234
    if (!empty($element["#attributes"]["id"])) {
235
      $vars['attributes']['id'] = $element["#attributes"]["id"];
236
    } else {
237
      $vars['attributes']['id'] = $element['#id'];
238
    }
214 239
  }
215 240

  
216 241
  $description = !empty($element['#description']) ? "<div class='description'>{$element['#description']}</div>" : '';
......
239 264
 * Override of theme('textarea').
240 265
 * Deprecate misc/textarea.js in favor of using the 'resize' CSS3 property.
241 266
 */
242
function tao_textarea($variables) {
243
  $element = $variables['element'];
267
function tao_textarea($vars) {
268
  $element = $vars['element'];
244 269
  $element['#attributes']['name'] = $element['#name'];
245 270
  $element['#attributes']['id'] = $element['#id'];
246 271
  $element['#attributes']['cols'] = $element['#cols'];
......
305 330
    'attributes' => array('class' => 'links pager pager-links')
306 331
  ));
307 332
  if ($pager_list) {
308
    return "<div class='pager clearfix'>$pager_list $pager_links</div>";
333
    return '<div class="pager clearfix">' . $pager_list . ' ' . $pager_links . '</div>';
309 334
  }
310 335
}
311 336

  

Formats disponibles : Unified diff