Changeset f94e442 in github for program/steps/mail/compose.inc


Ignore:
Timestamp:
Dec 16, 2011 1:38:59 PM (18 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
74d4c7f9
Parents:
e10f1385
Message:

Add more classes and options to HTML elements for better styleability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/steps/mail/compose.inc

    ra90ad28 rf94e442  
    12341234      $button = Q(rcube_label('delete')); 
    12351235 
    1236     foreach ($COMPOSE['attachments'] as $id => $a_prop) 
    1237     { 
     1236    foreach ($COMPOSE['attachments'] as $id => $a_prop) { 
    12381237      if (empty($a_prop)) 
    12391238        continue; 
    12401239 
    1241       $out .= html::tag('li', array('id' => 'rcmfile'.$id), 
     1240      $out .= html::tag('li', array('id' => 'rcmfile'.$id, 'class' => rcmail_filetype2classname($a_prop['mimetype'], $a_prop['name'])), 
    12421241        html::a(array( 
    12431242            'href' => "#delete", 
    12441243            'title' => rcube_label('delete'), 
    1245             'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id)), 
     1244            'onclick' => sprintf("return %s.command('remove-attachment','rcmfile%s', this)", JS_OBJECT_NAME, $id), 
     1245            'class' => 'delete'), 
    12461246          $button) . Q($a_prop['name'])); 
    12471247         
     
    12681268  global $RCMAIL, $OUTPUT; 
    12691269 
    1270   // add ID if not given 
    1271   if (!$attrib['id']) 
    1272     $attrib['id'] = 'rcmUploadbox'; 
     1270  // set defaults 
     1271  $attrib += array('id' => 'rcmUploadbox', 'buttons' => 'yes'); 
    12731272 
    12741273  // Get filesize, enable upload progress bar 
     
    12811280      html::div(null, rcmail_compose_attachment_field(array('size' => $attrib['attachmentfieldsize']))) . 
    12821281      html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) . 
    1283       html::div('buttons', 
     1282      (get_boolean($attrib['buttons']) ? html::div('buttons', 
    12841283        $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' . 
    12851284        $button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('send-attachment', this.form)")) 
    1286       ) 
     1285      ) : '') 
    12871286    ) 
    12881287  ); 
    12891288 
    1290   $OUTPUT->add_gui_object('uploadbox', $attrib['id']); 
     1289  $OUTPUT->add_gui_object('uploadform', $attrib['id']); 
    12911290  return $out; 
    12921291} 
Note: See TracChangeset for help on using the changeset viewer.