From: Michael M Slusarz Date: Wed, 7 Oct 2009 05:16:33 +0000 (-0600) Subject: Add ability to reload folder list in dimp. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4c2e2f0eace3a042d7f1ff134f0763c3ba030f4d;p=horde.git Add ability to reload folder list in dimp. Should never be needed, but if folder list does somehow manage to become corrupt, this will fix things. --- diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index d325fab3b..55665c346 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -10,7 +10,7 @@ var DimpBase = { // Vars used and defaulting to null/false: // cfolderaction, folder, folderswitch, offset, pollPE, pp, sfolder, - // showunsub, uid, viewport + // uid, viewport // message_list_template set via js/mailbox-dimp.js bcache: $H(), cacheids: {}, @@ -18,6 +18,7 @@ var DimpBase = { pivotrow: -1, ppcache: {}, ppfifo: [], + showunsub: 0, tcache: {}, // Preview pane cache size is 20 entries. Given that a reasonable guess @@ -726,6 +727,10 @@ var DimpBase = { }.bind(this)); break; + case 'ctx_folderopts_reload': + this._reloadFolders(); + break; + case 'ctx_container_expand': case 'ctx_container_collapse': case 'ctx_folder_expand': @@ -2261,11 +2266,15 @@ var DimpBase = { toggleSubscribed: function() { this.showunsub = !this.showunsub; + $('ctx_folderopts_sub', 'ctx_folderopts_unsub').invoke('toggle'); + this._reloadFolders(); + }, + + _reloadFolders: function() + { $('foldersLoading').show(); $('foldersSidebar').hide(); - $('ctx_folderopts_sub', 'ctx_folderopts_unsub').invoke('toggle'); - // TODO - Only do for unsub -> sub switch [ $('specialfolders').childElements(), $('dropbase').nextSiblings() ].flatten().each(function(elt) { this.deleteFolderElt(elt.readAttribute('id'), true); }, this); diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index 35ab5d21f..d4c8e62c6 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -365,7 +365,8 @@ function _simpleButton($id, $text, $image, $imagedir = null) - + + diff --git a/imp/themes/screen-dimp.css b/imp/themes/screen-dimp.css index ba0ebfdf1..235db75b7 100644 --- a/imp/themes/screen-dimp.css +++ b/imp/themes/screen-dimp.css @@ -981,6 +981,9 @@ span.dimpactionDrafts { #ctx_contacts_add span.contextImg { background-image: url("graphics/add_contact.png"); } +#ctx_folderopts_reload span.contextImg { + background-image: url("graphics/reload.png"); +} #ctx_flag span.contextImg.flagUser { border: 1px black solid; height: 15px; diff --git a/imp/themes/silver/screen-dimp.css b/imp/themes/silver/screen-dimp.css index 4cf06d545..d436514d6 100644 --- a/imp/themes/silver/screen-dimp.css +++ b/imp/themes/silver/screen-dimp.css @@ -124,6 +124,9 @@ span.dimpactionDrafts { #ctx_contacts_add span.contextImg { background-image: url("graphics/add_contact.png"); } +#ctx_folderopts_reload span.contextImg { + background-image: url("graphics/reload.png"); +} /* Other images */ #msg_newwin span.iconImg, #msg_newwin_options span.iconImg { diff --git a/imp/themes/tango-blue/screen-dimp.css b/imp/themes/tango-blue/screen-dimp.css index c3f4ec399..2e068f1e8 100644 --- a/imp/themes/tango-blue/screen-dimp.css +++ b/imp/themes/tango-blue/screen-dimp.css @@ -14,3 +14,7 @@ #dimpmain_portal { background-color: #c9daed; } + +#ctx_folderopts_reload span.contextImg { + background-image: url("graphics/reload.png"); +}