summaryrefslogtreecommitdiff
path: root/skins/classic/functions.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-08 12:52:26 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-08 12:52:26 +0200
commit66233b76c83b8e31bc1ff301352393299130a18c (patch)
treef9b1d88a7699aa8e1e6ddfb16b691b6c48a6e67a /skins/classic/functions.js
parent00dd283999fd42870bc2ea8412a4e39f7c52060c (diff)
Added folder searching in Folder Manager
Diffstat (limited to 'skins/classic/functions.js')
-rw-r--r--skins/classic/functions.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/skins/classic/functions.js b/skins/classic/functions.js
index b521be3bb..f17f393c2 100644
--- a/skins/classic/functions.js
+++ b/skins/classic/functions.js
@@ -636,6 +636,36 @@ enable_command: function(p)
var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
$('a.button.replyAll').attr('title', label);
}
+},
+
+folder_search_init: function(container)
+{
+ // animation to unfold list search box
+ $('.boxtitle a.search', container).click(function(e) {
+ var title = $('.boxtitle', container),
+ box = $('.listsearchbox', container),
+ dir = box.is(':visible') ? -1 : 1;
+
+ box.slideToggle({
+ duration: 160,
+ progress: function(animation, progress) {
+ if (dir < 0) progress = 1 - progress;
+ $('.boxlistcontent', container).css('top', (title.outerHeight() + 24 * progress) + 'px');
+ },
+ complete: function() {
+ box.toggleClass('expanded');
+ if (box.is(':visible')) {
+ box.find('input[type=text]').focus();
+ }
+ else {
+ $('a.reset', box).click();
+ }
+ // TODO: save state in cookie
+ }
+ });
+
+ return false;
+ });
}
};
@@ -1012,5 +1042,10 @@ function rcube_init_mail_ui()
rcmail.addEventListener('afterupload-photo', function(){ rcmail_ui.show_popup('uploadform', false); })
.gui_object('dragmenu', 'dragmenu');
}
+ else if (rcmail.env.task == 'settings') {
+ if (rcmail.env.action == 'folders') {
+ rcmail_ui.folder_search_init($('#folder-manager'));
+ }
+ }
});
}