From 4910b0666edeeebb18ac9682cb898dba8f22962a Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Thu, 15 Aug 2013 02:57:11 -0400 Subject: [PATCH] Distinguish mobile/tablet/touch devices --- program/js/app.js | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 6f5bfbc..dedad37 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -398,7 +398,7 @@ } else if (this.env.action == 'edit-folder' && this.gui_objects.editform) { this.enable_command('save', 'folder-size', true); - parent.rcmail.env.messagecount = this.env.messagecount; + parent.rcmail.env.exists = this.env.messagecount; parent.rcmail.enable_command('purge', this.env.messagecount); $("input[type='text']").first().select(); } @@ -1731,6 +1731,14 @@ if (!row.depth && row.has_children && (expando = document.getElementById('rcmexpando'+row.uid))) { row.expando = expando; expando.onmousedown = function(e) { return self.expand_message_row(e, uid); }; + if (bw.touch) { + expando.addEventListener('touchend', function(e) { + if (e.changedTouches.length == 1) { + self.expand_message_row(e, uid); + return rcube_event.cancel(e); + } + }, false); + } } this.triggerEvent('insertrow', { uid:uid, row:row }); -- Gitblit v1.9.1