From 7b87551404b68f33612d2a5bab1651883974e9a3 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 27 Jun 2014 12:24:48 +0200 Subject: [PATCH 1/5] Put mail-list wrapper into GPU layer --- src/sass/views/_mail-list.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sass/views/_mail-list.scss b/src/sass/views/_mail-list.scss index d913fa3..0d11d9b 100755 --- a/src/sass/views/_mail-list.scss +++ b/src/sass/views/_mail-list.scss @@ -60,6 +60,7 @@ flex-grow: 1; padding: 0 ($padding-horizontal - $scrollbar-width) 0 $padding-horizontal; overflow-y: scroll; + transform: translatez(0); } footer { From 7c65b48f347381e07b3a66e3bf1f4f3802f58fa9 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 27 Jun 2014 12:31:44 +0200 Subject: [PATCH 2/5] Put reader body into GPU layer --- src/sass/views/_read.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sass/views/_read.scss b/src/sass/views/_read.scss index 3e06c1b..7b0fd83 100644 --- a/src/sass/views/_read.scss +++ b/src/sass/views/_read.scss @@ -137,6 +137,7 @@ line-height: 1.5em; overflow-y: scroll; user-select: text; + transform: translatez(0); .line { cursor: text; From a479d5850e9b4b370d93c492d39f0ab0c02980a9 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 27 Jun 2014 12:36:43 +0200 Subject: [PATCH 3/5] Use custom wo-touch directive rather than ng-click --- src/js/controller/mail-list.js | 23 +++++++++++++++++++++++ src/tpl/about.html | 2 +- src/tpl/account.html | 6 +++--- src/tpl/add-account.html | 2 +- src/tpl/contacts.html | 4 ++-- src/tpl/dialog.html | 6 +++--- src/tpl/login-existing.html | 2 +- src/tpl/login-initial.html | 4 ++-- src/tpl/login-new-device.html | 2 +- src/tpl/login-privatekey-download.html | 2 +- src/tpl/mail-list.html | 8 +++++--- src/tpl/navigation.html | 10 +++++----- src/tpl/privatekey-upload.html | 6 +++--- src/tpl/read.html | 22 +++++++++++----------- src/tpl/set-passphrase.html | 4 ++-- src/tpl/write.html | 10 +++++----- 16 files changed, 69 insertions(+), 44 deletions(-) diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index 8afdb87..0e677b9 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -275,6 +275,29 @@ define(function(require) { var ngModule = angular.module('mail-list', []); + ngModule.directive('woTouch', function($parse) { + return function(scope, elm, attrs) { + var handler = $parse(attrs.woTouch); + + elm.on('touchstart', function() { + elm.addClass('active'); + }); + elm.on('touchleave touchcancel touchmove', function() { + elm.removeClass('active'); + }); + + elm.on('touchend click', function(event) { + event.preventDefault(); + elm.removeClass('active'); + scope.$apply(function() { + handler(scope, { + $event: event + }); + }); + }); + }; + }); + ngModule.directive('listScroll', function() { return { link: function(scope, elm, attrs) { diff --git a/src/tpl/about.html b/src/tpl/about.html index caf7399..0b459cd 100644 --- a/src/tpl/about.html +++ b/src/tpl/about.html @@ -1,6 +1,6 @@ diff --git a/src/tpl/mail-list.html b/src/tpl/mail-list.html index 6c1be69..c5bb1b2 100644 --- a/src/tpl/mail-list.html +++ b/src/tpl/mail-list.html @@ -1,8 +1,8 @@
-
+

{{state.nav.currentFolder.type}}

- +