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}}

- +