[imp] folder view popup
Jan Schneider
janmailing@gmx.de
Fri, 25 May 2001 17:22:27 +0200
---------------------- multipart/mixed attachment
Hi,
there was a little bug in my diff, here's the new one.
Zitat von Jan Schneider <janmailing@gmx.de>:
> Hi,
>
> attached you find a diff to folders.php that opens the folder with new
> messages
> if an user confirms the popup to do so. Also attached is the necessary
> confirm.inc from templates/folders.
>
> It would be nice if someone could modify folders.php so that the seen flag is
>
> set immediatly after imp detected unseen messages.
> Otherwise the user gets a popup window two times: in folder view and after
> choosing to open the folder with the new messages.
>
> Have fun, Jan.
>
> ::::::::::::::::::::::::::::::::::::::::
> AMMMa AG - discover your knowledge
> :::::::::::::::::::::::::::
> Detmolder Str. 25-33 :: D-33604 Bielefeld
> fon +49.521.96878-0 :: fax +49.521.96878-20
> http://www.ammma.de
> ::::::::::::::::::::::::::::::::::::::::::::::
>
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::
---------------------- multipart/mixed attachment
Index: folders.php
===================================================================
RCS file: /cvs/horde/imp/folders.php,v
retrieving revision 2.114
diff -u -r2.114 folders.php
--- folders.php 2001/05/23 16:52:01 2.114
+++ folders.php 2001/05/25 15:20:53
@@ -360,11 +360,15 @@
/* Check to see if user wants new mail notification */
if ($prefs->getValue('nav_popup')) {
$alert = '';
+ $count = 0;
foreach ($newmsgs as $mb => $nm) {
- $alert .= IMP::displayFolder($mb) . _(" - $nm new message" . ($nm > 1 ? 's' : '')) . '\n';
+ $count++;
+ $mailbox_message = $mb;
+ $alert .= IMP::displayFolder($mailbox_message) . ($nm > 1 ? _(" - $nm new messages") : _(" - $nm new message")) . '\n';
}
if (!empty($alert)) {
- include $conf['paths']['templates'] . '/folders/alert.inc';
+ if ($count == 1) include $conf['paths']['templates'] . '/folders/confirm.inc';
+ else include $conf['paths']['templates'] . '/folders/alert.inc';
}
}
---------------------- multipart/mixed attachment--