From: Michael M Slusarz Date: Tue, 8 Dec 2009 23:05:09 +0000 (-0700) Subject: Clean up non-javascript expand address handling. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=dd29474aac6fd2e295327509bf0367b5dd0ea5f0;p=horde.git Clean up non-javascript expand address handling. Remove expand address ability if javascript is disabled in IMP Add ability to select ambiguous matching addresses in MIMP via checkboxes. --- diff --git a/imp/compose-dimp.php b/imp/compose-dimp.php index 69c8f0c98..5368c3e90 100644 --- a/imp/compose-dimp.php +++ b/imp/compose-dimp.php @@ -125,12 +125,12 @@ if (count($_POST)) { $header['from'] = $from; $header['replyto'] = $identity->getValue('replyto_addr'); - $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to'), Horde_Util::getFormData('to_list'), Horde_Util::getFormData('to_field'), Horde_Util::getFormData('to_new')); + $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to')); if ($prefs->getValue('compose_cc')) { - $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc'), Horde_Util::getFormData('cc_list'), Horde_Util::getFormData('cc_field'), Horde_Util::getFormData('cc_new')); + $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc')); } if ($prefs->getValue('compose_bcc')) { - $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc'), Horde_Util::getFormData('bcc_list'), Horde_Util::getFormData('bcc_field'), Horde_Util::getFormData('bcc_new')); + $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc')); } $message = Horde_Util::getFormData('message'); diff --git a/imp/compose-mimp.php b/imp/compose-mimp.php index ee31ee68a..f1f9ed423 100644 --- a/imp/compose-mimp.php +++ b/imp/compose-mimp.php @@ -30,8 +30,18 @@ require_once dirname(__FILE__) . '/lib/Application.php'; new IMP_Application(array('init' => true, 'tz' => true)); /* The message text and headers. */ +$expand = array(); +$header = array('to' => '', 'cc' => '', 'bcc' => ''); $msg = ''; -$header = array(); + +/* Get the list of headers to display. */ +$display_hdrs = array('to' => _("To: ")); +if ($prefs->getValue('compose_cc')) { + $display_hdrs['cc'] = _("Cc: "); +} +if ($prefs->getValue('compose_bcc')) { + $display_hdrs['bcc'] = ("Bcc: "); +} /* Set the current identity. */ $identity = Horde_Prefs_Identity::singleton(array('imp', 'imp')); @@ -59,7 +69,27 @@ if ($imp_imap->isReadOnly($sent_mail_folder)) { $compose_disable = !IMP::canCompose(); /* Initialize the IMP_Compose:: object. */ -$imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache')); +$composeCache = Horde_Util::getFormData('composeCache'); +$imp_compose = IMP_Compose::singleton($composeCache); + +foreach (array_keys($display_hdrs) as $val) { + $header[$val] = Horde_Util::getFormData($val); + + /* If we are reloading the screen, check for expand matches. */ + if ($composeCache) { + $expanded = array(); + for ($i = 0; $i < 5; ++$i) { + if ($tmp = Horde_Util::getFormData($val . '_expand_' . $i)) { + $expanded[] = $tmp; + } + } + if (!empty($expanded)) { + $header['to'] = strlen($header['to']) + ? implode(', ', $expanded) . ', ' . $header['to'] + : implode(', ', $expanded); + } + } +} /* Run through the action handlers. */ $actionID = Horde_Util::getFormData('a'); @@ -86,15 +116,19 @@ case 'd': case _("Expand Names"): $action = Horde_Util::getFormData('action'); $imp_ui = new IMP_Ui_Compose(); - $header['to'] = $imp_ui->expandAddresses(Horde_Util::getFormData('to'), $imp_compose); - if ($action !== 'rc') { - if ($prefs->getValue('compose_cc')) { - $header['cc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('cc'), $imp_compose); - } - if ($prefs->getValue('compose_bcc')) { - $header['bcc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('bcc'), $imp_compose); + + foreach (array_keys($display_hdrs) as $val) { + if (($val == 'to') || ($action != 'rc')) { + $res = $imp_ui->expandAddresses($header[$val], $imp_compose); + if (is_string($res)) { + $header[$val] = $res; + } else { + $header[$val] = $res[0]; + $expand[$val] = array_slice($res, 1); + } } } + if (!is_null($action)) { $actionID = $action; } @@ -110,7 +144,7 @@ case 'rl': break; } $actions = array('r' => 'reply', 'ra' => 'reply_all', 'rl' => 'reply_list'); - $reply_msg = $imp_compose->replyMessage($actions[$actionID], $imp_contents, Horde_Util::getFormData('to')); + $reply_msg = $imp_compose->replyMessage($actions[$actionID], $imp_contents, $header['to']); $header = $reply_msg['headers']; $notification->push(_("Reply text will be automatically appended to your outgoing message."), 'horde.message'); @@ -134,7 +168,7 @@ case _("Redirect"): $imp_ui = new IMP_Ui_Compose(); - $f_to = $imp_ui->getAddressList(Horde_Util::getFormData('to')); + $f_to = $imp_ui->getAddressList($header['to']); try { $imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents); @@ -166,8 +200,9 @@ case _("Send"): } $message = Horde_Util::getFormData('message', ''); - $f_to = Horde_Util::getFormData('to'); + $f_to = $header['to']; $f_cc = $f_bcc = null; + $old_header = $header; $header = array(); $thismailbox = $imp_compose->getMetadata('mailbox'); @@ -204,12 +239,8 @@ case _("Send"): $imp_ui = new IMP_Ui_Compose(); - $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to')); - if ($prefs->getValue('compose_cc')) { - $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc')); - } - if ($prefs->getValue('compose_bcc')) { - $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc')); + foreach ($display_hdrs as $val) { + $header[$val] = $imp_ui->getAddressList($old_header[$val]); } switch ($actionID) { @@ -272,14 +303,12 @@ $select_list = $identity->getSelectList(); if (empty($msg)) { $msg = Horde_Util::getFormData('message', ''); } -foreach (array('to', 'cc', 'bcc', 'subject') as $val) { - if (empty($header[$val])) { - $header[$val] = Horde_Util::getFormData($val); - } +if (empty($header['subject'])) { + $header['subject'] = Horde_Util::getFormData('subject'); } $menu = new Horde_Mobile_card('o', _("Menu")); -$mset = &$menu->add(new Horde_Mobile_linkset()); +$mset = $menu->add(new Horde_Mobile_linkset()); IMP_Mimp::addMIMPMenu($mset, 'compose'); if ($actionID == 'rc') { diff --git a/imp/compose.php b/imp/compose.php index adaa85d01..2bd717a54 100644 --- a/imp/compose.php +++ b/imp/compose.php @@ -78,7 +78,7 @@ if (!$prefs->isLocked('default_identity')) { /* Catch submits if javascript is not present. */ if (!($actionID = Horde_Util::getFormData('actionID'))) { - foreach (array('send_message', 'save_draft', 'cancel_compose', 'add_attachment', 'compose_expand_addr') as $val) { + foreach (array('send_message', 'save_draft', 'cancel_compose', 'add_attachment') as $val) { if (Horde_Util::getFormData('btn_' . $val)) { $actionID = $val; break; @@ -169,8 +169,7 @@ $charset = $prefs->isLocked('sending_charset') ? Horde_Nls::getEmailCharset() : $encoding = empty($charset) ? Horde_Nls::getEmailCharset() : $charset; /* Is this a popup window? */ -$has_js = $browser->hasFeature('javascript'); -$isPopup = (($prefs->getValue('compose_popup') || Horde_Util::getFormData('popup')) && $has_js); +$isPopup = ($prefs->getValue('compose_popup') || Horde_Util::getFormData('popup')); /* Determine the composition type - text or HTML. $rtemode is null if browser does not support it. */ @@ -291,16 +290,6 @@ case 'draft': $get_sig = false; break; -case 'compose_expand_addr': -case 'redirect_expand_addr': - $header['to'] = $imp_ui->expandAddresses(Horde_Util::getFormData('to'), $imp_compose); - if ($actionID == 'compose_expand_addr') { - $header['cc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('cc'), $imp_compose); - $header['bcc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('bcc'), $imp_compose); - } - $get_sig = false; - break; - case 'reply': case 'reply_all': case 'reply_auto': @@ -354,7 +343,7 @@ case 'redirect_send': break; } - $f_to = Horde_Util::getFormData('to', $imp_ui->getAddressList(Horde_Util::getFormData('to'), Horde_Util::getFormData('to_list'), Horde_Util::getFormData('to_field'), Horde_Util::getFormData('to_new'))); + $f_to = $imp_ui->getAddressList(Horde_Util::getFormData('to')); try { $imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents); @@ -395,12 +384,12 @@ case 'send_message': } $header['replyto'] = $identity->getValue('replyto_addr'); - $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to'), Horde_Util::getFormData('to_list'), Horde_Util::getFormData('to_field'), Horde_Util::getFormData('to_new')); + $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to')); if ($prefs->getValue('compose_cc')) { - $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc'), Horde_Util::getFormData('cc_list'), Horde_Util::getFormData('cc_field'), Horde_Util::getFormData('cc_new')); + $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc')); } if ($prefs->getValue('compose_bcc')) { - $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc'), Horde_Util::getFormData('bcc_list'), Horde_Util::getFormData('bcc_field'), Horde_Util::getFormData('bcc_new')); + $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc')); } $message = Horde_Util::getFormData('message'); @@ -598,11 +587,11 @@ case 'add_attachment': $composeCacheID = $imp_compose->getCacheId(); /* Are we in redirect mode? */ -$redirect = in_array($actionID, array('redirect_compose', 'redirect_expand_addr')); +$redirect = ($actionID == 'redirect_compose'); /* Attach autocompleters to the compose form elements. */ $spellcheck = false; -if ($has_js) { +if ($browser->hasFeature('javascript')) { if ($redirect) { $imp_ui->attachAutoCompleter(array('to')); } else { @@ -694,7 +683,7 @@ if (!$token && ($actionID != 'draft')) { foreach (array('to', 'cc', 'bcc', 'subject') as $val) { if (!isset($header[$val])) { - $header[$val] = Horde_Util::getFormData($val, $imp_ui->getAddressList(Horde_Util::getFormData($val), Horde_Util::getFormData($val . '_list'), Horde_Util::getFormData($val . '_field'), Horde_Util::getFormData($val . '_new'))); + $header[$val] = $imp_ui->getAddressList(Horde_Util::getFormData($val)); } } @@ -834,49 +823,11 @@ if ($redirect) { if ($registry->hasMethod('contacts/search')) { $t->set('has_search', true); $t->set('abook', Horde::link('#', _("Address Book"), 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '
' . _("Address Book") . ''); - if (!$has_js) { - $t->set('expand', Horde::link('#', _("Expand Names"), 'widget', null, "$('actionID').value='redirect_expand_addr';ImpCompose.uniqSubmit();return false;") . Horde::img('expand.png') . '
' . _("Expand Names") . '', true); - } } $t->set('to', Horde::label('to', _("To"))); - - $tabindex = -1; - if (is_array($header['to'])) { - $t->set('multiple_to', true); - $first_to = true; - $to_hdrs = array(); - foreach ($header['to'] as $to_item) { - $entry = array(); - if (count($to_item) > 1) { - $entry['multiple'] = true; - $entry['select_tabindex'] = ++$tabindex; - $entry['select_name'] = htmlspecialchars($to_item[0]); - $entry['select_to'] = array(); - for ($i = 1, $items = count($to_item); $i < $items; ++$i) { - $entry['select_to'][] = array('val' => htmlspecialchars($to_item[$i])); - } - } else { - $entry['multiple'] = null; - $entry['input_value'] = htmlspecialchars($to_item); - } - $entry['input_tabindex'] = ++$tabindex; - - if ($first_to) { - $first_to = false; - $entry['help'] = Horde_Help::link('imp', 'compose-to'); - } else { - $entry['help'] = null; - } - $to_hdrs[] = $entry; - } - $t->set('to_new_tabindex', ++$tabindex); - $t->set('to_hdrs', $to_hdrs); - } else { - $t->set('input_tabindex', ++$tabindex); - $t->set('input_value', htmlspecialchars($header['to'])); - $t->set('help', Horde_Help::link('imp', 'compose-to')); - } + $t->set('input_value', htmlspecialchars($header['to'])); + $t->set('help', Horde_Help::link('imp', 'compose-to')); $template_output = $t->fetch(IMP_TEMPLATES . '/compose/redirect.html'); } else { @@ -964,48 +915,12 @@ if ($redirect) { $address_array = array(); foreach ($addr_array as $val => $label) { - $addr = array( + $address_array[] = array( 'id' => $val, - 'label' => Horde::label($val, $label), + 'input_tabindex' => ++$tabindex, + 'input_value' => htmlspecialchars($header[$val]), + 'label' => Horde::label($val, $label) ); - - $first_addr = false; - if (is_array($header[$val])) { - $addr['multiple'] = true; - $first_addr = true; - $hdrs = array(); - foreach ($header[$val] as $item) { - $entry = array(); - if (count($item) > 1) { - $entry['multiple'] = true; - $entry['select_tabindex'] = ++$tabindex; - $entry['select_name'] = htmlspecialchars($item[0]); - $entry['select_arr'] = array(); - for ($i = 1, $items = count($item); $i < $items; ++$i) { - $entry['select_arr'][] = array('val' => htmlspecialchars($item[$i])); - } - $entry['input_value'] = null; - } else { - $entry['multiple'] = null; - $entry['input_value'] = htmlspecialchars($item); - } - $entry['input_tabindex'] = ++$tabindex; - - if ($first_addr) { - $first_addr = false; - $entry['help'] = Horde_Help::link('imp', 'compose-' . $val); - } else { - $entry['help'] = null; - } - $hdrs[] = $entry; - } - $addr['hdrs'] = $hdrs; - } else { - $addr['multiple'] = false; - $addr['input_tabindex'] = ++$tabindex; - $addr['input_value'] = htmlspecialchars($header[$val]); - } - $address_array[] = $addr; } $t->set('addr', $address_array); @@ -1059,16 +974,8 @@ if ($redirect) { $compose_options[] = array( 'url' => Horde::link('#', '', 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;'), 'img' => Horde::img('addressbook_browse.png'), - 'label' => $show_text ? _("Address Book") : ''); - if (!$has_js) { - $compose_options[] = array( - 'url' => Horde::link( - '#', '', 'widget', null, - "ImpCompose.uniqSubmit('compose_expand_addr'); return false;", - '', '', array('name' => 'btn_compose_expand_addr')), - 'img' => Horde::img('expand.png'), - 'label' => $show_text ? _("Expand Names") : ''); - } + 'label' => $show_text ? _("Address Book") : '' + ); } if ($spellcheck) { $compose_options[] = array( diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES index e10a8975c..fe918c856 100644 --- a/imp/docs/CHANGES +++ b/imp/docs/CHANGES @@ -2,6 +2,7 @@ v5.0-git -------- +[mms] Improved address expansion in MIMP. [mms] Load folders on-demand in sidebar (DIMP). [mms] Add priority setting to DIMP. [mms] Simplify and improve priority header generation/display. diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index d56f90a7d..13ea31a7a 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -219,7 +219,7 @@ class IMP_Compose $addr = $headers[$k]; if ($session) { try { - Horde_Mime::encodeAddress($this->formatAddr($addr), $charset, $_SESSION['imp']['maildomain']); + Horde_Mime::encodeAddress(self::formatAddr($addr), $charset, $_SESSION['imp']['maildomain']); } catch (Horde_Mime_Exception $e) { throw new IMP_Compose_Exception(sprintf(_("Saving the draft failed. The %s header contains an invalid e-mail address: %s."), $k, $e->getMessage()), $e->getCode()); } @@ -2500,7 +2500,7 @@ class IMP_Compose $headers = array(); foreach (array('to', 'cc', 'bcc', 'subject') as $val) { - $headers[$val] = $imp_ui->getAddressList(Horde_Util::getFormData($val), Horde_Util::getFormData($val . '_list'), Horde_Util::getFormData($val . '_field'), Horde_Util::getFormData($val . '_new')); + $headers[$val] = $imp_ui->getAddressList(Horde_Util::getFormData($val)); } try { @@ -2554,7 +2554,9 @@ class IMP_Compose { /* If there are angle brackets (<>), or a colon (group name * delimiter), assume the user knew what they were doing. */ - return (!empty($addr) && (strpos($addr, '>') === false) && (strpos($addr, ':') === false)) + return (!empty($addr) && + (strpos($addr, '>') === false) && + (strpos($addr, ':') === false)) ? preg_replace('|\s+|', ', ', trim(strtr($addr, ';,', ' '))) : $addr; } diff --git a/imp/lib/Ui/Compose.php b/imp/lib/Ui/Compose.php index 4a10c45ae..6c349c9e9 100644 --- a/imp/lib/Ui/Compose.php +++ b/imp/lib/Ui/Compose.php @@ -14,21 +14,48 @@ class IMP_Ui_Compose { /** + * Expand addresses in a string. Only the last address in the string will + * be expanded. + * + * @var string $input The input string. + * @var IMP_Compose $imp_compose An IMP_Compose object. + * + * @return mixed If a string, this value should be used as the new + * input string. If an array, the first value is the + * input string without the search string; the second + * value is the search string; and the third value is + * the list of matching addresses. */ public function expandAddresses($input, $imp_compose) { - $addr_list = $this->getAddressList($input); + $addr_list = $this->getAddressList($input, array('addr_list' => true)); if (empty($addr_list)) { return ''; } - $res = $imp_compose->expandAddresses($addr_list); + $search = array_pop($addr_list); + + /* Don't search if the search string looks like an e-mail address. */ + if ((strpos($search, '<') !== false) || + (strpos($search, '@') !== false)) { + array_push($addr_list, $search); + return implode(', ', $addr_list); + } + + $res = $imp_compose->expandAddresses($search, array('levenshtein' => true)); - if (is_array($res)) { - $GLOBALS['notification']->push(_("Please resolve ambiguous or invalid addresses."), 'horde.warning'); + if (count($res) == 1) { + array_push($addr_list, reset($res)); + return implode(', ', $addr_list); } - return $res; + $GLOBALS['notification']->push(_("Ambiguous address found."), 'horde.warning'); + + return array( + implode(', ', $addr_list), + $search, + $res + ); } /** @@ -127,45 +154,34 @@ class IMP_Ui_Compose } /** + * Given an address input, parses the input to obtain the list of + * addresses to use on the compose page. + * + * @param string $addr The value of the header string. + * @param array $opts Additional options: + *
+     * 'addr_list' - (boolean) Return the list of address components?
+     *               DEFAULT: false
+     * 
+ * + * @return mixed TODO */ - public function getAddressList($to, $to_list = array(), $to_field = array(), - $to_new = '', $expand = false) + public function getAddressList($addr, $opts = array()) { - $to = rtrim(trim($to), ','); - if (!empty($to)) { + $addr = rtrim(trim($addr), ','); + $addr_list = array(); + + if (!empty($addr)) { // Although we allow ';' to delimit addresses in the UI, need to // convert to RFC-compliant ',' delimiter for processing. - $clean_to = ''; - foreach (Horde_Mime_Address::explode($to, ',;') as $val) { - $val = trim($val); - $clean_to .= $val . (($val[Horde_String::length($val) - 1] == ';') ? ' ' : ', '); - } - if ($expand) { - return $clean_to; - } else { - return IMP_Compose::formatAddr($clean_to); - } - } - - $tmp = array(); - if (is_array($to_field)) { - foreach ($to_field as $key => $address) { - $tmp[$key] = $address; - } - } - if (is_array($to_list)) { - foreach ($to_list as $key => $address) { - if ($address != '') { - $tmp[$key] = $address; - } + foreach (Horde_Mime_Address::explode($addr, ',;') as $val) { + $addr_list[] = IMP_Compose::formatAddr(trim($val)); } } - $to_new = rtrim(trim($to_new), ','); - if (!empty($to_new)) { - $tmp[] = $to_new; - } - return implode(', ', $tmp); + return empty($opts['addr_list']) + ? implode(', ', $addr_list) + : $addr_list; } /** diff --git a/imp/templates/compose/compose-mimp.inc b/imp/templates/compose/compose-mimp.inc index 235885a01..ae3a63d7f 100644 --- a/imp/templates/compose/compose-mimp.inc +++ b/imp/templates/compose/compose-mimp.inc @@ -1,33 +1,41 @@ add(new Horde_Mobile_card('m', $title)); +$c = $mimp_render->add(new Horde_Mobile_card('m', $title)); $c->softkey('#o', _("Menu")); $imp_notify->setMobileObject($c); $notification->notify(array('listeners' => 'status')); -$f = &$c->add(new Horde_Mobile_form('compose-mimp.php')); +$f = $c->add(new Horde_Mobile_form('compose-mimp.php')); // Hidden Variables. $f->add(new Horde_Mobile_hidden('composeCache', $cacheID)); $f->add(new Horde_Mobile_hidden('resume_draft', Horde_Util::getFormData('resume_draft', $resume_draft))); if (!$prefs->isLocked('default_identity')) { - $ib = &$f->add(new Horde_Mobile_block(new Horde_Mobile_text(_("Identity: ")))); - $ident_sel = &$ib->add(new Horde_Mobile_select('identity')); + $ib = $f->add(new Horde_Mobile_block(new Horde_Mobile_text(_("Identity: ")))); + $ident_sel = $ib->add(new Horde_Mobile_select('identity')); $default = Horde_Util::getFormData('identity', $identity->getDefault()); foreach ($select_list as $key => $select) { $ident_sel->add($select, $key, ($key == $default)); } } -$f->add(new Horde_Mobile_input('to', $header['to'], _("To: "))); -if ($prefs->getValue('compose_cc')) { - $f->add(new Horde_Mobile_input('cc', $header['cc'], _("Cc: "))); -} -if ($prefs->getValue('compose_bcc')) { - $f->add(new Horde_Mobile_input('bcc', $header['bcc'], _("Bcc: "))); +foreach ($display_hdrs as $key => $val) { + $f->add(new Horde_Mobile_input($key, $header[$key], $val)); + if (isset($expand[$key])) { + if (count($expand[$key][1]) > 5) { + $f->add(new Horde_Mobile_text(sprintf(_("Ambiguous matches for \"%s\" (first 5 matches displayed):"), $expand[$key][0]))); + } else { + $f->add(new Horde_Mobile_text(sprintf(_("Ambiguous matches for \"%s\":"), $expand[$key][0]))); + } + + foreach (array_slice($expand[$key][1], 0, 5) as $key2 => $val2) { + $f->add(new Horde_Mobile_checkbox($key . '_expand_' . $key2, htmlspecialchars($val2), $val2, false)); + } + } } + $f->add(new Horde_Mobile_input('subject', $header['subject'], _("Subject: "))); $f->add(new Horde_Mobile_textarea('message', $msg, _("Message: "), 10, 80)); diff --git a/imp/templates/compose/compose.html b/imp/templates/compose/compose.html index 0a957361b..2395f753c 100644 --- a/imp/templates/compose/compose.html +++ b/imp/templates/compose/compose.html @@ -55,33 +55,11 @@   - - - - -   - - - - - - - - - - -
-
diff --git a/imp/templates/compose/redirect.html b/imp/templates/compose/redirect.html index 845ff3bca..786b19d80 100644 --- a/imp/templates/compose/redirect.html +++ b/imp/templates/compose/redirect.html @@ -17,7 +17,6 @@ -
@@ -28,52 +27,14 @@   - - - - - - - - - - - - - - - - -
- - - - - - -
- - - - -
- - -
-
  
 
- +
 
diff --git a/imp/themes/graphics/expand.png b/imp/themes/graphics/expand.png deleted file mode 100644 index 993674b5f..000000000 Binary files a/imp/themes/graphics/expand.png and /dev/null differ diff --git a/imp/themes/silver/graphics/expand.png b/imp/themes/silver/graphics/expand.png deleted file mode 100644 index fe5d85a17..000000000 Binary files a/imp/themes/silver/graphics/expand.png and /dev/null differ diff --git a/imp/themes/tango-blue/graphics/expand.png b/imp/themes/tango-blue/graphics/expand.png deleted file mode 100644 index 8714caec8..000000000 Binary files a/imp/themes/tango-blue/graphics/expand.png and /dev/null differ