contextOnClick: function(parentfunc, elt, baseelt, menu)
{
- var flag, id = elt.readAttribute('id');
+ var flag, id = elt.readAttribute('id'), tmp;
switch (id) {
case 'ctx_folder_create':
}.bind(this));
break;
+ case 'ctx_container_expand':
+ case 'ctx_container_collapse':
+ case 'ctx_folder_expand':
+ case 'ctx_folder_collapse':
+ tmp = baseelt.up('LI');
+ [ tmp, $(this.getSubFolderId(tmp.readAttribute('id'))).select('LI.folder') ].flatten().each(function(f) {
+ this._toggleSubFolder(f, (id == 'ctx_container_expand' || id == 'ctx_folder_expand') ? 'exp' : 'col', true);
+ }.bind(this));
+ break;
+
case 'ctx_message_spam':
case 'ctx_message_ham':
this.reportSpam(id == 'ctx_message_spam');
tmp = baseelt.hasAttribute('u');
[ $('ctx_folder_poll') ].invoke(tmp ? 'hide' : 'show');
[ $('ctx_folder_nopoll') ].invoke(tmp ? 'show' : 'hide');
+
+ tmp = $(this.getSubFolderId(baseelt.readAttribute('id')));
+ $('ctx_folder_collapse', 'ctx_folder_expand').invoke(tmp ? 'show' : 'hide');
+ [ $('ctx_folder_expand').previous() ].invoke(tmp ? 'addClassName' : 'removeClassName', 'sep');
break;
case 'ctx_reply':
<a id="ctx_folder_sub"><span class="contextImg"></span><?php echo _("Subscribe") ?></a>
<a id="ctx_folder_unsub"><span class="contextImg"></span><?php echo _("Unsubscribe") ?></a>
<?php endif; ?>
+ <a id="ctx_folder_expand" style="display:none"><span class="contextImg"></span><?php echo _("Expand All") ?></a>
+ <a id="ctx_folder_collapse" style="display:none"><span class="contextImg"></span><?php echo _("Collapse All") ?></a>
</div>
<div class="context" id="ctx_container" style="display:none">
<a id="ctx_container_create"><span class="contextImg"></span><?php echo _("Create subfolder") ?></a>
- <a id="ctx_container_rename"><span class="contextImg"></span><?php echo _("Rename Folder") ?></a>
+ <a id="ctx_container_rename" class="sep"><span class="contextImg"></span><?php echo _("Rename Folder") ?></a>
+ <a id="ctx_container_expand"><span class="contextImg"></span><?php echo _("Expand All") ?></a>
+ <a id="ctx_container_collapse"><span class="contextImg"></span><?php echo _("Collapse All") ?></a>
</div>
+<?php if ($conf['user']['allow_folders']): ?>
<div class="context" id="ctx_folderopts" style="display:none">
<a id="ctx_folderopts_new"><span class="contextImg"></span><?php echo _("New Folder") ?></a>
-<?php if ($conf['user']['allow_folders'] && $use_sub): ?>
+<?php if ($use_sub): ?>
<a id="ctx_folderopts_sub" style="display:none"><span class="contextImg"></span><?php echo _("Hide Unsubscribed") ?></a>
<a id="ctx_folderopts_unsub"><span class="contextImg"></span><?php echo _("Show Unsubscribed") ?></a>
<?php endif; ?>
<a id="ctx_folderopts_expand"><span class="contextImg"></span><?php echo _("Expand All") ?></a>
<a id="ctx_folderopts_collapse"><span class="contextImg"></span><?php echo _("Collapse All") ?></a>
</div>
+<?php endif; ?>
<div class="context" id="ctx_message" style="display:none">
<a id="ctx_message_reply"><span class="contextImg"></span><?php echo _("Reply") ?></a>
#ctx_folder_sub span.contextImg, #ctx_folder_unsub span.contextImg, #ctx_folderopts_sub span.contextImg, #ctx_folderopts_unsub span.contextImg {
background-image: url("graphics/folders/folder.png");
}
-#sidebarPanel span.col, #ctx_folderopts_collapse span.contextImg {
+#sidebarPanel span.col, #ctx_folderopts_collapse span.contextImg, #ctx_container_collapse span.contextImg, #ctx_folder_collapse span.contextImg {
background-image: url("graphics/folders/minus.png");
}
-#sidebarPanel span.exp, #ctx_folderopts_expand span.contextImg {
+#sidebarPanel span.exp, #ctx_folderopts_expand span.contextImg, #ctx_container_expand span.contextImg, #ctx_folder_expand span.contextImg {
background-image: url("graphics/folders/plus.png");
}
#normalfolders {
#ctx_folder_sub span.contextImg, #ctx_folder_unsub span.contextImg, #ctx_folderopts_sub span.contextImg, #ctx_folderopts_unsub span.contextImg {
background-image: url("graphics/folders/folder.png");
}
-#sidebarPanel span.col, #ctx_folderopts_collapse span.contextImg {
+#sidebarPanel span.col, #ctx_folderopts_collapse span.contextImg, #ctx_container_collapse span.contextImg, #ctx_folder_collapse span.contextImg {
background-image: url("graphics/folders/minus.png");
}
-#sidebarPanel span.exp, #ctx_folderopts_expand span.contextImg {
+#sidebarPanel span.exp, #ctx_folderopts_expand span.contextImg, #ctx_container_expand span.contextImg, #ctx_folder_expand span.contextImg {
background-image: url("graphics/folders/plus.png");
}