Opened 4 years ago
Last modified 4 years ago
#1485775 new Feature Patches
Toggle Trash Icon Empty or Full Trash
| Reported by: | lacri | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | later |
| Component: | User Interface | Version: | 0.2.1 |
| Severity: | trivial | Keywords: | trash icon full empty toggle |
| Cc: | eric.appelt@… |
Description
to toggle Trash Icon to show if trash is empty or full
add this to /skins/default/mail.css
#mailboxlist li.trash.unread
{
background-image: url(images/icons/full_trash_image.png);
}
you must only modiefie the original trash image in a full trash image
and add this to /skins/default/images/icons/
Attachments (5)
Change History (13)
Changed 4 years ago by lacri
comment:1 Changed 4 years ago by lacri
here is the modiefied image and the css code for this
#mailboxlist li.trash.unread {
background-image: url(images/icons/folder-trsh_f.png);
}
you must only upload the attached image to /skins/default/images/icons/
comment:2 Changed 4 years ago by lacri
sorry folder-trsh_f.png is not correct ;)
#mailboxlist li.trash.unread {
background-image: url(images/icons/folder-trash_f.png);
}
comment:3 Changed 4 years ago by alec
- Milestone changed from 0.2.2 to later
Nice, but unread != non-empty. If folder contains some messages and all are seen the icon is not set properly. To do this we'll need some javascript logic.
comment:4 Changed 4 years ago by lacri
- Cc eric.appelt@… added
- Type changed from Feature Requests to Patches
add to /skins/default/mail.css
#mailboxlist li.trash.full
{
background-image: url(images/icons/trash_f.png);
}
then in /program/include/main.inc in function rcmail_render_folder_tree_html
after $msgcounts = $RCMAIL->imap->get_cache('messagecount');
$trashcounts = $RCMAIL->imap->messagecount($CONFIG['trash_mbox']);
then in the some function replace
else if ($folderid?==$CONFIGtrash_mbox?)
$classes[] = 'trash';
with
else if ($folder['id']==$CONFIG['trash_mbox'] and $trashcounts == 0)
$classes[] = 'trash';
else if ($folder['id']==$CONFIG['trash_mbox'] and $trashcounts >= 1) {
$classes[] = 'trash';
$classes[] = 'full';
}
then in the /program/js/app.js search mycount = this.env.unread_counts[mbox] ? this.env.unread_counts[mbox] : 0; and add after
if(this.env.messagecount)
{
trashcount = this.env.messagecount ? this.env.messagecount : 0;
}
and search
set the right classes
if ((mycount+childcount)>0)
$(item).addClass('unread');
else
$(item).removeClass('unread');
and add after
if((trashcount)>0)
$(item).addClass('full');
else
$(item).removeClass('full');
thats it ;)
comment:5 Changed 4 years ago by lacri
the finally version can you find here
http://www.roundcubeforum.net/plug-ins/4408-toggle-empty-full-trash-icon.html#post17663
display full trash Icon if any messages in the trash folder (read or unread messages)
and display if read or unread messages in the trash
icon will toogle when messages move into empty trash and toggle to empty trash icon
when you clear trash or move messages in another folder.
its fully implemented for using drag and drop.
comment:6 Changed 4 years ago by alec
Create diff file, please.
comment:7 Changed 4 years ago by lacri
here is the diff ...
sorry my tortoise generate no beautiful diffs
The diff is for RC 0.2.1
Changed 4 years ago by lacri
comment:8 Changed 4 years ago by lacri
here is a new version for toggle trash icon works perfekt for me over 3 Months
i have made a new diff for this on a clear [b4ee74cd] RC the 3 last files are modified folders.gif and png sprites with the full trash icon to toggle and the diff.
i hope this comes in to the RC core ;)

full trash icon