1
0
mirror of https://github.com/moparisthebest/mail synced 2025-02-07 10:30:18 -05:00

[WO-92] fix scrolling bus in mail list

This commit is contained in:
Tankred Hase 2013-11-13 14:10:43 +01:00
parent c5dd7c07b9
commit d779ef679d
2 changed files with 5 additions and 5 deletions

View File

@ -354,17 +354,17 @@ define(function(require) {
// //
var ngModule = angular.module('mail-list', []); var ngModule = angular.module('mail-list', []);
ngModule.directive('ngIscroll', function($timeout) { ngModule.directive('ngIscroll', function($parse) {
return { return {
link: function(scope, elm) { link: function(scope, elm, attrs) {
$timeout(function() { var model = $parse(attrs.ngIscroll);
scope.$watch(model, function() {
var myScroll; var myScroll;
// activate iscroll // activate iscroll
myScroll = new IScroll(elm[0], { myScroll = new IScroll(elm[0], {
mouseWheel: true mouseWheel: true
}); });
}); });
} }
}; };
}); });

View File

@ -4,7 +4,7 @@
<h2>{{state.nav.currentFolder.type}}</h2> <h2>{{state.nav.currentFolder.type}}</h2>
</header> </header>
<div class="list-wrapper" ng-iscroll> <div class="list-wrapper" ng-iscroll="emails">
<ul class="mail-list"> <ul class="mail-list">
<li ng-class="{'mail-list-active': email === state.mailList.selected, 'mail-list-attachment': email.attachments !== undefined && email.attachments.length > 0, 'mail-list-unread': email.unread, 'mail-list-replied': email.answered}" ng-click="select(email)" ng-repeat="email in emails"> <li ng-class="{'mail-list-active': email === state.mailList.selected, 'mail-list-attachment': email.attachments !== undefined && email.attachments.length > 0, 'mail-list-unread': email.unread, 'mail-list-replied': email.answered}" ng-click="select(email)" ng-repeat="email in emails">
<h3>{{email.from[0].name || email.from[0].address}}</h3> <h3>{{email.from[0].name || email.from[0].address}}</h3>