From: Michael M Slusarz Date: Wed, 4 Nov 2009 19:45:01 +0000 (-0700) Subject: Removed unused code X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8786efdf10c082eb66260a7080e116596f00ff2d;p=horde.git Removed unused code --- diff --git a/imp/lib/Dimp.php b/imp/lib/Dimp.php index 1439d93bf..5fb7f9b4b 100644 --- a/imp/lib/Dimp.php +++ b/imp/lib/Dimp.php @@ -22,33 +22,21 @@ class IMP_Dimp * 'icon' - The icon CSS classname. * 'id' - The DOM ID of the link. * 'title' - The title string. - * 'tooltip' - Tooltip text to use. * * * @return string An HTML link to $url. */ static public function actionButton($params = array()) { - $tooltip = (empty($params['tooltip'])) ? '' : $params['tooltip']; - - if (empty($params['title'])) { - $old_error = error_reporting(0); - $tooltip = nl2br(htmlspecialchars($tooltip, ENT_QUOTES, Horde_Nls::getCharset())); - $title = $ak = ''; - } else { - $title = $params['title']; - $ak = Horde::getAccessKey($title); - } - - return Horde::link('', $tooltip, + return Horde::link('', '', empty($params['class']) ? '' : $params['class'], - '', '', '', $ak, + '', '', '', Horde::getAccessKey($params['title']), empty($params['id']) ? array() : array('id' => $params['id']), - !empty($title)) + true) . (!empty($params['icon']) ? '' : '') - . $title . ''; + . $params['title'] . ''; } /** diff --git a/imp/templates/chunks/compose.php b/imp/templates/chunks/compose.php index edab1ae79..761504dd8 100644 --- a/imp/templates/chunks/compose.php +++ b/imp/templates/chunks/compose.php @@ -18,19 +18,6 @@ $save_attach = $GLOBALS['prefs']->getValue('save_attachments'); /* Determine if compose mode is disabled. */ $compose_disable = !IMP::canCompose(); -// Small utility function to simplify creating dimpactions buttons. -// As of right now, we don't show text only links. -function _createDAcompose($text, $image, $id) -{ - $params = array('icon' => $image, 'id' => $id); - if (!in_array($GLOBALS['prefs']->getValue('menu_view'), array('text', 'both'))) { - $params['tooltip'] = $text; - } else { - $params['title'] = $text; - } - echo '
' . IMP_Dimp::actionButton($params) . '
'; -} - ?>
@@ -41,10 +28,10 @@ function _createDAcompose($text, $image, $id)
- +
'Forward', 'id' => 'send_button', 'title' => _("Send"))); ?>
- - +
'Spellcheck', 'id' => 'spellcheck', 'title' => _("Check Spelling"))); ?>
+
'Drafts', 'id' => 'draft_button', 'title' => _("Save as Draft"))); ?>
diff --git a/imp/templates/chunks/message.php b/imp/templates/chunks/message.php index aad8de832..c25e71cf4 100644 --- a/imp/templates/chunks/message.php +++ b/imp/templates/chunks/message.php @@ -1,43 +1,28 @@ getValue('menu_view'); -$show_text = ($menu_view == 'text' || $menu_view == 'both'); - -// Small utility function to simplify creating dimpactions buttons. -// As of right now, we don't show text only links. -function _createDAfmsg($text, $image, $id, $class = '', $show_text = true) -{ - $params = array('icon' => $image, 'id' => $id, 'class' => $class); - if ($show_text) { - $params['title'] = $text; - } else { - $params['tooltip'] = $text; - } - echo '
' . IMP_Dimp::actionButton($params) . '
'; -} - ?>
- - +
'noselectDisable', 'icon' => 'Reply', 'id' => 'button_reply', 'title' => _("Reply"))) ?>
+
'noselectDisable', 'icon' => 'Forward', 'id' => 'button_forward', 'title' => _("Forward"))) ?>
- +
'noselectDisable', 'icon' => 'Spam', 'id' => 'button_spam', 'title' => _("Spam"))) ?>
- +
'noselectDisable', 'icon' => 'Ham', 'id' => 'button_ham', 'title' => _("Innocent"))) ?>
- - - - +
'noselectDisable', 'icon' => 'Delete', 'id' => 'button_deleted', 'title' => _("Delete"))) ?>
+
'Compose', 'title' => _("Compose"))) ?>
+
'Checkmail', 'title' => _("Get Mail"))) ?>
+
'Other', 'id' => 'button_other', 'title' => _("Other Actions"))) ?>