From: Michael M Slusarz Date: Tue, 11 Nov 2008 20:06:20 +0000 (-0700) Subject: Status reporting updates. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1163611fba000dc8b8c46d741b6e0395716d8200;p=horde.git Status reporting updates. --- diff --git a/imp/lib/Mime/Viewer/alternative.php b/imp/lib/Mime/Viewer/alternative.php index eebc3f328..5448a8ccc 100644 --- a/imp/lib/Mime/Viewer/alternative.php +++ b/imp/lib/Mime/Viewer/alternative.php @@ -59,8 +59,10 @@ class IMP_Horde_Mime_Viewer_alternative extends Horde_Mime_Viewer_Driver if (is_null($display_id)) { return array( 'status' => array( - 'text' => _("There are no alternative parts that can be displayed inline."), - 'type' => 'info' + array( + 'text' => array(_("There are no alternative parts that can be displayed inline.")), + 'type' => 'info' + ) ) ); } diff --git a/imp/lib/Mime/Viewer/html.php b/imp/lib/Mime/Viewer/html.php index 0d665f146..92d21cdb4 100644 --- a/imp/lib/Mime/Viewer/html.php +++ b/imp/lib/Mime/Viewer/html.php @@ -221,7 +221,7 @@ class IMP_Horde_Mime_Viewer_html extends Horde_Mime_Viewer_html /* If we are viewing inline, give option to view in separate window. */ if ($inline && $this->getConfigParam('external')) { $cleanhtml['status'][] = array( - 'data' => $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("Show this HTML in a new window?")), + 'text' => array($this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("Show this HTML in a new window?"))), 'type' => 'info' ); } diff --git a/imp/lib/Mime/Viewer/images.php b/imp/lib/Mime/Viewer/images.php index 44b026768..fb837a765 100644 --- a/imp/lib/Mime/Viewer/images.php +++ b/imp/lib/Mime/Viewer/images.php @@ -90,17 +90,21 @@ class IMP_Horde_Mime_Viewer_images extends Horde_Mime_Viewer_images /* The browser cannot view this image. Inform the user of this and * ask user if we should convert to another image type. */ - $msg = _("Your browser does not support inline display of this image type."); + $status = array(_("Your browser does not support inline display of this image type.")); /* See if we can convert to an inline browser viewable form. */ $img = $this->_getHordeImageOb(false); if ($img && $GLOBALS['browser']->isViewable($img->getContentType())) { $convert_link = $contents->linkViewJS($this->_mimepart, 'view_attach', _("HERE"), null, null, array('img_load_convert' => 1)); - $msg .= '
' . sprintf(_("Click %s to convert the image file into a format your browser can view."), $convert_link); + $status[] = sprintf(_("Click %s to convert the image file into a format your browser can view."), $convert_link); } return array( - 'status' => array('text' => $msg) + 'status' => array( + array( + 'text' => $status + ) + } ); } @@ -120,18 +124,21 @@ class IMP_Horde_Mime_Viewer_images extends Horde_Mime_Viewer_images return array(); } - $status = array( - sprintf(_("An image named %s is attached to this message. A thumbnail is below."), $this->_mimepart->getName(true)), - ); + $status = array(sprintf(_("An image named %s is attached to this message. A thumbnail is below."), $this->_mimepart->getName(true))); if ($GLOBALS['browser']->hasFeature('javascript')) { - $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', Horde::img($this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('img_view_thumbnail' => 1), false), _("View Attachment"), null, ''), null, null, null); + $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', Horde::img($this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('img_view_thumbnail' => 1)), false), _("View Attachment"), null, ''), null, null, null); } else { - $status[] = Horde::link($this->_params['contents']->urlView($this->_mimepart, 'view_attach')) . Horde::img($this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('img_view_thumbnail' => 1), false), _("View Attachment"), null, '') . ''; + $status[] = Horde::link($this->_params['contents']->urlView($this->_mimepart, 'view_attach')) . Horde::img($this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('img_view_thumbnail' => 1)), false), _("View Attachment"), null, '') . ''; } return array( - 'status' => array('text' => implode('
', $status)) + 'status' => array( + array( + 'icon' => Horde::img('mime/image.png', _("Thumbnail of attached image")), + 'text' => $status + ) + ) ); } diff --git a/imp/lib/Mime/Viewer/related.php b/imp/lib/Mime/Viewer/related.php index c874e62f8..86c765cbd 100644 --- a/imp/lib/Mime/Viewer/related.php +++ b/imp/lib/Mime/Viewer/related.php @@ -55,8 +55,10 @@ class IMP_Horde_Mime_Viewer_related extends Horde_Mime_Viewer_Driver { return array( 'status' => array( - 'text' => sprintf(_("Click %s to view this multipart/related part in a separate window."), $contents->linkViewJS($this->mime_part, 'view_attach', _("HERE"), _("View content in a separate window"))), - 'icon' => Horde::img('mime/html.png', _("HTML")) + array ( + 'text' => array(sprintf(_("Click %s to view this multipart/related part in a separate window."), $contents->linkViewJS($this->mime_part, 'view_attach', _("HERE"), _("View content in a separate window")))), + 'icon' => Horde::img('mime/html.png', _("HTML")) + ) ) ); } @@ -66,7 +68,7 @@ class IMP_Horde_Mime_Viewer_related extends Horde_Mime_Viewer_Driver * * @param boolean $inline Are we viewing inline? * - * @return array Two elements: html and status. + * @return array See self::render(). */ protected function _IMPrender($inline) {