Merge branch 'dev/WO-419'

Conflicts:
	package.json
This commit is contained in:
Tankred Hase 2014-06-17 14:42:22 +02:00
commit 237c03fa8d
27 changed files with 1067 additions and 177 deletions

Binary file not shown.

View File

@ -10,17 +10,18 @@
<glyph unicode="&#xe000;" d="M512 960c-282.046 0-512-229.954-512-512s229.954-512 512-512c282.046 0 512 229.954 512 512s-229.954 512-512 512zM620.454 448l216.954-216.954-108.454-108.454-216.954 216.954-216.954-216.954-108.454 108.454 216.954 216.954-216.954 216.954 108.454 108.454 216.954-216.954 216.954 216.954 108.454-108.454-216.954-216.954z" />
<glyph unicode="&#xe001;" d="M923.090 828.37h426.728v-125.254h-426.728zM1076.13 976.802h125.254v-426.728h-125.254zM848.85-39.052c-4.654-32.488 0-32.488-46.406-37.096-27.834-4.654-194.84-4.654-366.452-4.654-194.84 0-398.894 0-412.812 4.654-55.668 13.918-23.18 120.6 51.014 171.614 60.322 37.096 180.922 97.42 213.364 102.028 46.406 9.262 51.014 37.096 0 125.254-9.262 18.572-23.18 78.848-23.18 143.778 0 102.028 18.572 171.614 106.682 208.756 18.572 4.654 37.096 9.262 55.668 9.262 60.322 0 115.944-32.488 139.17-83.502 32.488-64.93 18.572-236.544-18.572-296.866-41.752-69.586-37.096-92.766 9.262-102.028 27.834-9.262 120.6-51.014 208.756-97.42 60.326-32.442 92.768-88.112 83.506-143.78zM1136.454 81.548c0-23.18 0-27.834-32.488-32.488-18.572-4.654-102.028-4.654-208.756-4.654-18.572 41.752-51.014 83.502-102.028 106.682-55.668 32.488-115.944 60.322-167.006 83.502 32.488 13.918 60.322 27.834 74.24 32.488 32.488 9.262 37.096 27.834 0 97.42-9.262 18.572-18.572 64.93-23.18 115.944 0 78.848 18.572 134.516 88.11 162.35 13.918 4.654 27.834 4.654 41.752 4.654 46.406 0 88.11-23.18 106.682-64.93 23.18-51.014 13.918-185.53-13.918-236.544-32.488-55.668-27.834-74.24 9.262-78.848 23.18-4.654 92.766-41.752 162.35-78.848 41.8-23.226 69.588-64.978 64.98-106.728z" horiz-adv-x="1348" />
<glyph unicode="&#xe002;" d="M0 551.488l458.048 420.416v-213.312c884.736 0 821.952-840.768 821.952-840.768-175.68 583.552-821.952 414.144-821.952 414.144v-213.312l-458.048 432.832z" horiz-adv-x="1280" />
<glyph unicode="&#xe003;" d="M677.79 796.648c4.876 4.876 39.010 39.010 97.524 58.514 78.020 24.38 160.914 4.876 224.304-58.514 63.39-63.39 87.772-141.41 58.514-224.304-19.504-58.514-53.638-97.524-58.514-102.4l-448.61-448.61c-78.020-78.020-273.066-180.42-453.486 0-180.42 180.42-78.020 375.466 0 448.61l482.742 482.742c19.504 19.504 48.762 19.504 63.39 0 19.504-19.504 19.504-48.762 0-63.39l-482.742-482.742c-9.752-4.876-160.914-160.914 0-321.828 156.038-156.038 307.2-14.628 321.828 0l448.61 453.486c0 0 24.38 24.38 39.010 63.39 14.628 48.762 4.876 87.772-39.010 131.658-87.772 87.772-175.542 14.628-195.048 0l-419.352-419.352c-14.628-14.628-24.38-39.010 0-68.266 24.38-24.38 48.762-14.628 63.39 0l292.572 292.572c19.504 14.628 48.762 14.628 63.39 0 19.504-19.504 19.504-48.762 0-68.266l-292.572-287.696c-39.010-39.010-121.904-68.266-195.048 0-73.142 68.266-39.010 156.038 0 195.048l429.108 419.348z" horiz-adv-x="1072" />
<glyph unicode="&#xe003;" d="M677.79 796.648c4.876 4.876 39.010 39.010 97.524 58.514 78.020 24.38 160.914 4.876 224.304-58.514s87.772-141.41 58.514-224.304c-19.504-58.514-53.638-97.524-58.514-102.4l-448.61-448.61c-78.020-78.020-273.066-180.42-453.486 0s-78.020 375.466 0 448.61l482.742 482.742c19.504 19.504 48.762 19.504 63.39 0 19.504-19.504 19.504-48.762 0-63.39l-482.742-482.742c-9.752-4.876-160.914-160.914 0-321.828 156.038-156.038 307.2-14.628 321.828 0l448.61 453.486c0 0 24.38 24.38 39.010 63.39 14.628 48.762 4.876 87.772-39.010 131.658-87.772 87.772-175.542 14.628-195.048 0l-419.352-419.352c-14.628-14.628-24.38-39.010 0-68.266 24.38-24.38 48.762-14.628 63.39 0l292.572 292.572c19.504 14.628 48.762 14.628 63.39 0 19.504-19.504 19.504-48.762 0-68.266l-292.572-287.696c-39.010-39.010-121.904-68.266-195.048 0-73.142 68.266-39.010 156.038 0 195.048l429.108 419.348z" horiz-adv-x="1072" />
<glyph unicode="&#xe004;" d="M0 951.326h1445.648v-193.114h-1445.648zM0 137.788h1445.648v-193.174h-1445.648zM0 547.508h1445.648v-193.174h-1445.648z" horiz-adv-x="1444" />
<glyph unicode="&#xe005;" d="M764.712 818.958c26.138 0 46.996-20.912 46.996-46.996v-31.366c0-20.912-15.684-41.822-36.594-46.996v-679.182c0-41.822-36.594-78.362-83.59-78.362l-574.626-0.056c-46.996 0-83.59 36.594-83.59 78.362v679.182c-20.912 5.228-36.596 26.14-36.596 47.050v31.314c0 26.138 20.912 46.996 46.996 46.996h141.042l0.056 57.506c0 46.996 36.54 83.59 78.362 83.59h276.912c46.996 0 83.59-36.594 83.59-83.59v-57.452h141.042zM670.666 30.046c5.228 0 10.456 5.228 10.456 10.456v653.042h-553.822v-653.042c0-5.228 5.228-10.456 10.456-10.456h532.91zM237.030 82.27c-26.138 0-46.996 20.912-46.996 46.996l-0.002 465.004c0 26.138 20.912 41.822 46.996 41.822h10.456c26.138 0 46.996-20.912 46.996-41.822v-465.004c0-26.138-20.912-46.996-46.996-46.996h-10.454zM263.168 886.864c-5.228 0-10.456 0-10.456-10.454v-57.452h302.996v57.452c0 5.228-5.228 10.456-10.456 10.456l-282.084-0.002zM398.982 82.27c-26.138 0-46.996 20.912-46.996 46.996v465.004c0 26.138 20.912 41.822 46.996 41.822h5.228c26.138 0 46.996-20.912 46.996-41.822v-465.004c0-26.138-20.912-46.996-46.996-46.996h-5.228zM560.936 82.27c-26.138 0-46.996 20.912-46.996 46.996v465.004c0 26.138 20.912 41.822 46.996 41.822h10.456c26.138 0 46.996-20.912 46.996-41.822v-465.004c0-26.138-20.912-46.996-46.996-46.996h-10.456z" horiz-adv-x="808" />
<glyph unicode="&#xe006;" d="M876.828 327.396l126.066 126.066v-372.622c0-76.744-60.302-136.988-131.528-136.988l-739.838-0.058c-76.744 0-131.528 60.302-131.528 136.988v734.378c0 76.688 60.302 136.99 131.528 136.99h750.762l-126.066-126.066h-580.836c-27.42 0-49.322-21.902-49.322-49.322v-652.118c0-27.42 21.902-49.322 49.322-49.322h652.118c27.42 0 49.322 21.902 49.322 49.322v202.752zM613.774 239.73l-131.528 131.528-49.322-180.85 180.85 49.322zM657.636 283.592l427.464 427.464-131.586 131.468-427.406-421.944 131.528-136.988zM1134.364 754.858l60.302 60.302-136.988 136.99-60.302-60.302 136.988-136.99z" horiz-adv-x="1194" />
<glyph unicode="&#xe007;" d="M117.76 954.88l906.176-906.112-121.408-121.408-906.176 906.112zM-3.648 57.536l906.112 906.112 121.408-121.344-906.112-906.176z" />
<glyph unicode="&#xe008;" d="M0 960l1024-1024h-1024z" />
<glyph unicode="&#xe009;" d="M681.984 655.104v-119.744h-153.6v119.744c0 81.472-64.768 147.712-144.384 147.712s-144.384-66.24-144.384-147.712v-119.744h-153.6v119.744c-0.064 168.064 133.696 304.896 297.984 304.896 164.352 0 297.984-136.832 297.984-304.896zM0 476.096v-540.096h768v540.096h-768zM308.224-0.896l24.192 195.968 5.12 41.792c-21.632 15.232-35.712 40.64-35.712 69.44 0 11.136 2.112 21.696 5.888 31.296 12.096 30.848 41.664 52.736 76.288 52.736 34.624 0 64.192-21.888 76.288-52.736 3.776-9.664 5.888-20.224 5.888-31.296 0-28.8-14.208-54.272-35.84-69.312l5.184-41.856 24.064-195.968h-151.36z" horiz-adv-x="768" />
<glyph unicode="&#xe009;" d="M681.984 655.104v-119.744h-153.6v119.744c0 81.472-64.768 147.712-144.384 147.712s-144.384-66.24-144.384-147.712v-119.744h-153.6v119.744c-0.064 168.064 133.696 304.896 297.984 304.896 164.352 0 297.984-136.832 297.984-304.896zM0 476.096v-540.096h768v540.096h-768zM308.224-0.896l24.192 195.968 5.12 41.792c-21.632 15.232-35.712 40.64-35.712 69.44 0 11.136 2.112 21.696 5.888 31.296 12.096 30.848 41.664 52.736 76.288 52.736s64.192-21.888 76.288-52.736c3.776-9.664 5.888-20.224 5.888-31.296 0-28.8-14.208-54.272-35.84-69.312l5.184-41.856 24.064-195.968h-151.36z" horiz-adv-x="768" />
<glyph unicode="&#xe010;" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM448 704h128v-128h-128zM640 192h-256v64h64v192h-64v64h192v-256h64z" />
<glyph unicode="&#xe011;" d="M768 320.032l-182.82 182.822 438.82 329.15-128.010 127.996-548.52-219.442-172.7 172.706c-49.78 49.778-119.302 61.706-154.502 26.508-35.198-35.198-23.268-104.726 26.51-154.5l172.686-172.684-219.464-548.582 127.99-128.006 329.19 438.868 182.826-182.828v-255.98h127.994l63.992 191.988 191.988 63.996v127.992l-255.98-0.004z" />
<glyph unicode="&#xe012;" d="M1120.549 655.726v-119.954h-155.063v119.954c0 81.92-64.366 146.286-143.36 146.286s-143.36-67.291-143.36-146.286v-119.954h-155.063v119.954c0 166.766 134.583 304.274 298.423 304.274s298.423-137.509 298.423-304.274zM0 477.257v-541.257h766.537v541.257h-766.537zM307.2 0.366l23.406 196.023 5.851 40.96c-20.48 14.629-35.109 40.96-35.109 70.217 0 11.703 2.926 20.48 5.851 32.183 11.703 32.183 40.96 52.663 76.069 52.663 35.109 0 64.366-20.48 76.069-52.663 2.926-8.777 5.851-20.48 5.851-32.183 0-29.257-14.629-55.589-35.109-70.217l5.851-40.96 23.406-196.023h-152.137z" horiz-adv-x="1121" />
<glyph unicode="&#xe012;" d="M1120.549 655.726v-119.954h-155.063v119.954c0 81.92-64.366 146.286-143.36 146.286s-143.36-67.291-143.36-146.286v-119.954h-155.063v119.954c0 166.766 134.583 304.274 298.423 304.274s298.423-137.509 298.423-304.274zM0 477.257v-541.257h766.537v541.257h-766.537zM307.2 0.366l23.406 196.023 5.851 40.96c-20.48 14.629-35.109 40.96-35.109 70.217 0 11.703 2.926 20.48 5.851 32.183 11.703 32.183 40.96 52.663 76.069 52.663s64.366-20.48 76.069-52.663c2.926-8.777 5.851-20.48 5.851-32.183 0-29.257-14.629-55.589-35.109-70.217l5.851-40.96 23.406-196.023h-152.137z" horiz-adv-x="1121" />
<glyph unicode="&#xe013;" d="M1352.048-64l-49.054 141.030c-91.976 257.533-300.455 309.653-459.88 309.653-76.647 0-144.096-12.263-174.754-21.461l9.198-214.611-459.88 389.365 423.090 420.024 9.198-202.347c85.844 3.066 162.491-6.132 233.006-24.527h6.132l3.066-3.066c469.078-122.635 459.88-640.766 459.88-643.832v-150.228zM843.114 441.868c144.096 0 324.982-39.856 441.485-208.479-30.659 150.228-125.701 374.036-407.76 444.551l-6.132 3.066c-70.515 18.395-153.293 24.527-245.269 21.461h-27.593l-6.132 134.898-291.257-288.192 318.85-269.796-6.132 128.766 21.461 6.132c0 0 91.976 27.593 208.479 27.593zM462.946 153.677l-462.946 389.365 423.090 416.958 12.263-171.689-55.186-6.132-6.132 52.12-291.257-288.192 315.784-266.731-3.066 49.054 55.186 6.132z" horiz-adv-x="1355" />
<glyph unicode="&#xe014;" d="M1073.595-64l-40.843 134.199c-81.687 268.399-297.573 323.829-466.781 323.829-61.265 0-110.86-8.752-137.117-11.67v-207.134l-428.855 399.681 428.855 385.094v-198.382c212.969-5.835 376.342-70.017 490.12-192.547 186.712-201.299 166.291-481.368 166.291-493.037l-11.67-140.034zM568.889 449.459c125.447 0 335.499-32.091 455.111-224.638-14.587 93.356-52.513 212.969-142.952 312.16-107.943 116.695-268.399 175.043-475.533 175.043h-26.256v131.282l-300.49-268.399 300.49-277.151v128.365l20.422 5.835c0 0 70.017 17.504 169.208 17.504z" horiz-adv-x="1085" />
<glyph unicode="&#xe015;" d="M458.105-64v272.842h-458.105v495.158l458.105 3.368v252.632l461.474-424.421 101.053-97.684-562.526-501.895zM60.632 269.474h458.105v-198.737l410.947 367.158-53.895 53.895-357.053 330.105v-175.158l-458.105-3.368v-373.895z" horiz-adv-x="1017" />
<glyph unicode="&#xe016;" d="M-0.001 447.998l511.995 511.995 47.513-47.513-511.995-511.995-47.513 47.513zM47.517 495.519l511.995-511.995-47.513-47.513-511.995 511.995 47.513 47.513z" horiz-adv-x="560" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Binary file not shown.

View File

@ -20,9 +20,9 @@ requirejs([
'js/controller/navigation',
'cryptoLib/util',
'js/util/error',
'fastclick',
'angularSanitize',
'angularRoute',
'angularTouch',
'angularAnimate'
], function(
angular,
@ -42,7 +42,8 @@ requirejs([
WriteCtrl,
NavigationCtrl,
util,
errorUtil
errorUtil,
FastClick
) {
'use strict';
@ -53,7 +54,6 @@ requirejs([
var app = angular.module('mail', [
'ngSanitize',
'ngRoute',
'ngTouch',
'ngAnimate',
'navigation',
'mail-list',
@ -103,6 +103,8 @@ requirejs([
$rootScope.state = {};
// attach global error handler
errorUtil.attachHandler($rootScope);
// attach fastclick
FastClick.attach(document.body);
});
// inject controllers from ng-included view templates

View File

@ -4,7 +4,6 @@ define(function(require) {
var angular = require('angular'),
_ = require('underscore'),
appController = require('js/app-controller'),
IScroll = require('iscroll'),
notification = require('js/util/notification'),
emailDao, outboxBo, keychainDao;
@ -54,7 +53,10 @@ define(function(require) {
}
$scope.state.mailList.selected = email;
$scope.state.read.toggle(true);
$timeout(function() {
// toogle read ste in next digest step to speed up css transition to read mode
$scope.state.read.toggle(true);
});
keychainDao.refreshKeyForUserId(email.from[0].address, onKeyRefreshed);
@ -273,12 +275,12 @@ define(function(require) {
var ngModule = angular.module('mail-list', []);
ngModule.directive('ngIscroll', function($timeout) {
ngModule.directive('listScroll', function() {
return {
link: function(scope, elm, attrs) {
var model = attrs.ngIscroll,
var model = attrs.listScroll,
listEl = elm[0],
myScroll;
scrollTimeout;
/*
* iterates over the mails in the mail list and loads their bodies if they are visible in the viewport
@ -320,20 +322,19 @@ define(function(require) {
}
};
// activate iscroll
myScroll = new IScroll(listEl, {
mouseWheel: true,
scrollbars: true,
fadeScrollbars: true
});
myScroll.on('scrollEnd', scope.loadVisibleBodies);
// load body when scrolling
listEl.onscroll = function() {
if (scrollTimeout) {
// remove timeout so that only scroll end
clearTimeout(scrollTimeout);
}
scrollTimeout = setTimeout(function() {
scope.loadVisibleBodies();
}, 300);
};
// refresh iScroll when model length changes
// load the visible message bodies, when the list is re-initialized and when scrolling stopped
scope.$watchCollection(model, function() {
$timeout(function() {
myScroll.refresh();
});
// load the visible message bodies, when the list is re-initialized and when scrolling stopped
scope.loadVisibleBodies();
});
}

View File

@ -1,13 +0,0 @@
/*
AngularJS v1.2.16
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(function(y,w,z){'use strict';function u(f,a,c){r.directive(f,["$parse","$swipe",function(m,p){var q=75,g=0.3,e=30;return function(h,n,l){function k(d){if(!b)return!1;var s=Math.abs(d.y-b.y);d=(d.x-b.x)*a;return v&&s<q&&0<d&&d>e&&s/d<g}var s=m(l[f]),b,v;p.bind(n,{start:function(d,s){b=d;v=!0},cancel:function(b){v=!1},end:function(b,a){k(b)&&h.$apply(function(){n.triggerHandler(c);s(h,{$event:a})})}})}}])}var r=w.module("ngTouch",[]);r.factory("$swipe",[function(){function f(a){var c=a.touches&&a.touches.length?
a.touches:[a];a=a.changedTouches&&a.changedTouches[0]||a.originalEvent&&a.originalEvent.changedTouches&&a.originalEvent.changedTouches[0]||c[0].originalEvent||c[0];return{x:a.clientX,y:a.clientY}}return{bind:function(a,c){var m,p,q,g,e=!1;a.on("touchstart mousedown",function(a){q=f(a);e=!0;p=m=0;g=q;c.start&&c.start(q,a)});a.on("touchcancel",function(a){e=!1;c.cancel&&c.cancel(a)});a.on("touchmove mousemove",function(a){if(e&&q){var n=f(a);m+=Math.abs(n.x-g.x);p+=Math.abs(n.y-g.y);g=n;10>m&&10>p||
(p>m?(e=!1,c.cancel&&c.cancel(a)):(a.preventDefault(),c.move&&c.move(n,a)))}});a.on("touchend mouseup",function(a){e&&(e=!1,c.end&&c.end(f(a),a))})}}}]);r.config(["$provide",function(f){f.decorator("ngClickDirective",["$delegate",function(a){a.shift();return a}])}]);r.directive("ngClick",["$parse","$timeout","$rootElement",function(f,a,c){function m(a,b,c){for(var d=0;d<a.length;d+=2)if(Math.abs(a[d]-b)<e&&Math.abs(a[d+1]-c)<e)return a.splice(d,d+2),!0;return!1}function p(a){if(!(Date.now()-n>g)){var b=
a.touches&&a.touches.length?a.touches:[a],c=b[0].clientX,b=b[0].clientY;1>c&&1>b||k&&k[0]===c&&k[1]===b||(k&&(k=null),"label"===a.target.tagName.toLowerCase()&&(k=[c,b]),m(l,c,b)||(a.stopPropagation(),a.preventDefault(),a.target&&a.target.blur()))}}function q(c){c=c.touches&&c.touches.length?c.touches:[c];var b=c[0].clientX,e=c[0].clientY;l.push(b,e);a(function(){for(var a=0;a<l.length;a+=2)if(l[a]==b&&l[a+1]==e){l.splice(a,a+2);break}},g,!1)}var g=2500,e=25,h="ng-click-active",n,l,k;return function(a,
b,e){function d(){k=!1;b.removeClass(h)}var g=f(e.ngClick),k=!1,t,r,u,x;b.on("touchstart",function(a){k=!0;t=a.target?a.target:a.srcElement;3==t.nodeType&&(t=t.parentNode);b.addClass(h);r=Date.now();a=a.touches&&a.touches.length?a.touches:[a];a=a[0].originalEvent||a[0];u=a.clientX;x=a.clientY});b.on("touchmove",function(a){d()});b.on("touchcancel",function(a){d()});b.on("touchend",function(a){var g=Date.now()-r,f=a.changedTouches&&a.changedTouches.length?a.changedTouches:a.touches&&a.touches.length?
a.touches:[a],h=f[0].originalEvent||f[0],f=h.clientX,h=h.clientY,s=Math.sqrt(Math.pow(f-u,2)+Math.pow(h-x,2));k&&(750>g&&12>s)&&(l||(c[0].addEventListener("click",p,!0),c[0].addEventListener("touchstart",q,!0),l=[]),n=Date.now(),m(l,f,h),t&&t.blur(),w.isDefined(e.disabled)&&!1!==e.disabled||b.triggerHandler("click",[a]));d()});b.onclick=function(a){};b.on("click",function(b,c){a.$apply(function(){g(a,{$event:c||b})})});b.on("mousedown",function(a){b.addClass(h)});b.on("mousemove mouseup",function(a){b.removeClass(h)})}}]);
u("ngSwipeLeft",-1,"swipeleft");u("ngSwipeRight",1,"swiperight")})(window,window.angular);
//# sourceMappingURL=angular-touch.min.js.map

818
src/lib/fastclick/fastclick.js Executable file
View File

@ -0,0 +1,818 @@
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @version 1.0.2
* @codingstandard ftlabs-jsv2
* @copyright The Financial Times Limited [All Rights Reserved]
* @license MIT License (see LICENSE.txt)
*/
/*jslint browser:true, node:true*/
/*global define, Event, Node*/
/**
* Instantiate fast-clicking listeners on the specified layer.
*
* @constructor
* @param {Element} layer The layer to listen on
* @param {Object} options The options to override the defaults
*/
function FastClick(layer, options) {
'use strict';
var oldOnClick;
options = options || {};
/**
* Whether a click is currently being tracked.
*
* @type boolean
*/
this.trackingClick = false;
/**
* Timestamp for when click tracking started.
*
* @type number
*/
this.trackingClickStart = 0;
/**
* The element being tracked for a click.
*
* @type EventTarget
*/
this.targetElement = null;
/**
* X-coordinate of touch start event.
*
* @type number
*/
this.touchStartX = 0;
/**
* Y-coordinate of touch start event.
*
* @type number
*/
this.touchStartY = 0;
/**
* ID of the last touch, retrieved from Touch.identifier.
*
* @type number
*/
this.lastTouchIdentifier = 0;
/**
* Touchmove boundary, beyond which a click will be cancelled.
*
* @type number
*/
this.touchBoundary = options.touchBoundary || 10;
/**
* The FastClick layer.
*
* @type Element
*/
this.layer = layer;
/**
* The minimum time between tap(touchstart and touchend) events
*
* @type number
*/
this.tapDelay = options.tapDelay || 200;
if (FastClick.notNeeded(layer)) {
return;
}
// Some old versions of Android don't have Function.prototype.bind
function bind(method, context) {
return function() { return method.apply(context, arguments); };
}
var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
var context = this;
for (var i = 0, l = methods.length; i < l; i++) {
context[methods[i]] = bind(context[methods[i]], context);
}
// Set up event handlers as required
if (deviceIsAndroid) {
layer.addEventListener('mouseover', this.onMouse, true);
layer.addEventListener('mousedown', this.onMouse, true);
layer.addEventListener('mouseup', this.onMouse, true);
}
layer.addEventListener('click', this.onClick, true);
layer.addEventListener('touchstart', this.onTouchStart, false);
layer.addEventListener('touchmove', this.onTouchMove, false);
layer.addEventListener('touchend', this.onTouchEnd, false);
layer.addEventListener('touchcancel', this.onTouchCancel, false);
// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
// layer when they are cancelled.
if (!Event.prototype.stopImmediatePropagation) {
layer.removeEventListener = function(type, callback, capture) {
var rmv = Node.prototype.removeEventListener;
if (type === 'click') {
rmv.call(layer, type, callback.hijacked || callback, capture);
} else {
rmv.call(layer, type, callback, capture);
}
};
layer.addEventListener = function(type, callback, capture) {
var adv = Node.prototype.addEventListener;
if (type === 'click') {
adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
if (!event.propagationStopped) {
callback(event);
}
}), capture);
} else {
adv.call(layer, type, callback, capture);
}
};
}
// If a handler is already declared in the element's onclick attribute, it will be fired before
// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
// adding it as listener.
if (typeof layer.onclick === 'function') {
// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
// - the old one won't work if passed to addEventListener directly.
oldOnClick = layer.onclick;
layer.addEventListener('click', function(event) {
oldOnClick(event);
}, false);
layer.onclick = null;
}
}
/**
* Android requires exceptions.
*
* @type boolean
*/
var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0;
/**
* iOS requires exceptions.
*
* @type boolean
*/
var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent);
/**
* iOS 4 requires an exception for select elements.
*
* @type boolean
*/
var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
/**
* iOS 6.0(+?) requires the target element to be manually derived
*
* @type boolean
*/
var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS ([6-9]|\d{2})_\d/).test(navigator.userAgent);
/**
* BlackBerry requires exceptions.
*
* @type boolean
*/
var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
/**
* Determine whether a given element requires a native click.
*
* @param {EventTarget|Element} target Target DOM element
* @returns {boolean} Returns true if the element needs a native click
*/
FastClick.prototype.needsClick = function(target) {
'use strict';
switch (target.nodeName.toLowerCase()) {
// Don't send a synthetic click to disabled inputs (issue #62)
case 'button':
case 'select':
case 'textarea':
if (target.disabled) {
return true;
}
break;
case 'input':
// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
if ((deviceIsIOS && target.type === 'file') || target.disabled) {
return true;
}
break;
case 'label':
case 'video':
return true;
}
return (/\bneedsclick\b/).test(target.className);
};
/**
* Determine whether a given element requires a call to focus to simulate click into element.
*
* @param {EventTarget|Element} target Target DOM element
* @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
*/
FastClick.prototype.needsFocus = function(target) {
'use strict';
switch (target.nodeName.toLowerCase()) {
case 'textarea':
return true;
case 'select':
return !deviceIsAndroid;
case 'input':
switch (target.type) {
case 'button':
case 'checkbox':
case 'file':
case 'image':
case 'radio':
case 'submit':
return false;
}
// No point in attempting to focus disabled inputs
return !target.disabled && !target.readOnly;
default:
return (/\bneedsfocus\b/).test(target.className);
}
};
/**
* Send a click event to the specified element.
*
* @param {EventTarget|Element} targetElement
* @param {Event} event
*/
FastClick.prototype.sendClick = function(targetElement, event) {
'use strict';
var clickEvent, touch;
// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
if (document.activeElement && document.activeElement !== targetElement) {
document.activeElement.blur();
}
touch = event.changedTouches[0];
// Synthesise a click event, with an extra attribute so it can be tracked
clickEvent = document.createEvent('MouseEvents');
clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
clickEvent.forwardedTouchEvent = true;
targetElement.dispatchEvent(clickEvent);
};
FastClick.prototype.determineEventType = function(targetElement) {
'use strict';
//Issue #159: Android Chrome Select Box does not open with a synthetic click event
if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
return 'mousedown';
}
return 'click';
};
/**
* @param {EventTarget|Element} targetElement
*/
FastClick.prototype.focus = function(targetElement) {
'use strict';
var length;
// Issue #160: on iOS 7, some input elements (e.g. date datetime) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time') {
length = targetElement.value.length;
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
};
/**
* Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
*
* @param {EventTarget|Element} targetElement
*/
FastClick.prototype.updateScrollParent = function(targetElement) {
'use strict';
var scrollParent, parentElement;
scrollParent = targetElement.fastClickScrollParent;
// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
// target element was moved to another parent.
if (!scrollParent || !scrollParent.contains(targetElement)) {
parentElement = targetElement;
do {
if (parentElement.scrollHeight > parentElement.offsetHeight) {
scrollParent = parentElement;
targetElement.fastClickScrollParent = parentElement;
break;
}
parentElement = parentElement.parentElement;
} while (parentElement);
}
// Always update the scroll top tracker if possible.
if (scrollParent) {
scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
}
};
/**
* @param {EventTarget} targetElement
* @returns {Element|EventTarget}
*/
FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
'use strict';
// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
if (eventTarget.nodeType === Node.TEXT_NODE) {
return eventTarget.parentNode;
}
return eventTarget;
};
/**
* On touch start, record the position and scroll offset.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchStart = function(event) {
'use strict';
var targetElement, touch, selection;
// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
if (event.targetTouches.length > 1) {
return true;
}
targetElement = this.getTargetElementFromEventTarget(event.target);
touch = event.targetTouches[0];
if (deviceIsIOS) {
// Only trusted events will deselect text on iOS (issue #49)
selection = window.getSelection();
if (selection.rangeCount && !selection.isCollapsed) {
return true;
}
if (!deviceIsIOS4) {
// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
// with the same identifier as the touch event that previously triggered the click that triggered the alert.
// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
if (touch.identifier === this.lastTouchIdentifier) {
event.preventDefault();
return false;
}
this.lastTouchIdentifier = touch.identifier;
// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
// 1) the user does a fling scroll on the scrollable layer
// 2) the user stops the fling scroll with another tap
// then the event.target of the last 'touchend' event will be the element that was under the user's finger
// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
this.updateScrollParent(targetElement);
}
}
this.trackingClick = true;
this.trackingClickStart = event.timeStamp;
this.targetElement = targetElement;
this.touchStartX = touch.pageX;
this.touchStartY = touch.pageY;
// Prevent phantom clicks on fast double-tap (issue #36)
if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
event.preventDefault();
}
return true;
};
/**
* Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.touchHasMoved = function(event) {
'use strict';
var touch = event.changedTouches[0], boundary = this.touchBoundary;
if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
return true;
}
return false;
};
/**
* Update the last position.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchMove = function(event) {
'use strict';
if (!this.trackingClick) {
return true;
}
// If the touch has moved, cancel the click tracking
if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
this.trackingClick = false;
this.targetElement = null;
}
return true;
};
/**
* Attempt to find the labelled control for the given label element.
*
* @param {EventTarget|HTMLLabelElement} labelElement
* @returns {Element|null}
*/
FastClick.prototype.findControl = function(labelElement) {
'use strict';
// Fast path for newer browsers supporting the HTML5 control attribute
if (labelElement.control !== undefined) {
return labelElement.control;
}
// All browsers under test that support touch events also support the HTML5 htmlFor attribute
if (labelElement.htmlFor) {
return document.getElementById(labelElement.htmlFor);
}
// If no for attribute exists, attempt to retrieve the first labellable descendant element
// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
};
/**
* On touch end, determine whether to send a click event at once.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchEnd = function(event) {
'use strict';
var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
if (!this.trackingClick) {
return true;
}
// Prevent phantom clicks on fast double-tap (issue #36)
if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
this.cancelNextClick = true;
return true;
}
// Reset to prevent wrong click cancel on input (issue #156).
this.cancelNextClick = false;
this.lastClickTime = event.timeStamp;
trackingClickStart = this.trackingClickStart;
this.trackingClick = false;
this.trackingClickStart = 0;
// On some iOS devices, the targetElement supplied with the event is invalid if the layer
// is performing a transition or scroll, and has to be re-detected manually. Note that
// for this to function correctly, it must be called *after* the event target is checked!
// See issue #57; also filed as rdar://13048589 .
if (deviceIsIOSWithBadTarget) {
touch = event.changedTouches[0];
// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
}
targetTagName = targetElement.tagName.toLowerCase();
if (targetTagName === 'label') {
forElement = this.findControl(targetElement);
if (forElement) {
this.focus(targetElement);
if (deviceIsAndroid) {
return false;
}
targetElement = forElement;
}
} else if (this.needsFocus(targetElement)) {
// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
this.targetElement = null;
return false;
}
this.focus(targetElement);
this.sendClick(targetElement, event);
// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
if (!deviceIsIOS || targetTagName !== 'select') {
this.targetElement = null;
event.preventDefault();
}
return false;
}
if (deviceIsIOS && !deviceIsIOS4) {
// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
scrollParent = targetElement.fastClickScrollParent;
if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
return true;
}
}
// Prevent the actual click from going though - unless the target node is marked as requiring
// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
if (!this.needsClick(targetElement)) {
event.preventDefault();
this.sendClick(targetElement, event);
}
return false;
};
/**
* On touch cancel, stop tracking the click.
*
* @returns {void}
*/
FastClick.prototype.onTouchCancel = function() {
'use strict';
this.trackingClick = false;
this.targetElement = null;
};
/**
* Determine mouse events which should be permitted.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onMouse = function(event) {
'use strict';
// If a target element was never set (because a touch event was never fired) allow the event
if (!this.targetElement) {
return true;
}
if (event.forwardedTouchEvent) {
return true;
}
// Programmatically generated events targeting a specific element should be permitted
if (!event.cancelable) {
return true;
}
// Derive and check the target element to see whether the mouse event needs to be permitted;
// unless explicitly enabled, prevent non-touch click events from triggering actions,
// to prevent ghost/doubleclicks.
if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
// Prevent any user-added listeners declared on FastClick element from being fired.
if (event.stopImmediatePropagation) {
event.stopImmediatePropagation();
} else {
// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
event.propagationStopped = true;
}
// Cancel the event
event.stopPropagation();
event.preventDefault();
return false;
}
// If the mouse event is permitted, return true for the action to go through.
return true;
};
/**
* On actual clicks, determine whether this is a touch-generated click, a click action occurring
* naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
* an actual click which should be permitted.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onClick = function(event) {
'use strict';
var permitted;
// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
if (this.trackingClick) {
this.targetElement = null;
this.trackingClick = false;
return true;
}
// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
if (event.target.type === 'submit' && event.detail === 0) {
return true;
}
permitted = this.onMouse(event);
// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
if (!permitted) {
this.targetElement = null;
}
// If clicks are permitted, return true for the action to go through.
return permitted;
};
/**
* Remove all FastClick's event listeners.
*
* @returns {void}
*/
FastClick.prototype.destroy = function() {
'use strict';
var layer = this.layer;
if (deviceIsAndroid) {
layer.removeEventListener('mouseover', this.onMouse, true);
layer.removeEventListener('mousedown', this.onMouse, true);
layer.removeEventListener('mouseup', this.onMouse, true);
}
layer.removeEventListener('click', this.onClick, true);
layer.removeEventListener('touchstart', this.onTouchStart, false);
layer.removeEventListener('touchmove', this.onTouchMove, false);
layer.removeEventListener('touchend', this.onTouchEnd, false);
layer.removeEventListener('touchcancel', this.onTouchCancel, false);
};
/**
* Check whether FastClick is needed.
*
* @param {Element} layer The layer to listen on
*/
FastClick.notNeeded = function(layer) {
'use strict';
var metaViewport;
var chromeVersion;
var blackberryVersion;
// Devices that don't support touch don't need FastClick
if (typeof window.ontouchstart === 'undefined') {
return true;
}
// Chrome version - zero for other browsers
chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
if (chromeVersion) {
if (deviceIsAndroid) {
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport) {
// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
return true;
}
// Chrome 32 and above with width=device-width or less don't need FastClick
if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
return true;
}
}
// Chrome desktop doesn't need FastClick (issue #15)
} else {
return true;
}
}
if (deviceIsBlackBerry10) {
blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
// BlackBerry 10.3+ does not require Fastclick library.
// https://github.com/ftlabs/fastclick/issues/251
if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport) {
// user-scalable=no eliminates click delay.
if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
return true;
}
// width=device-width (or less than device-width) eliminates click delay.
if (document.documentElement.scrollWidth <= window.outerWidth) {
return true;
}
}
}
}
// IE10 with -ms-touch-action: none, which disables double-tap-to-zoom (issue #97)
if (layer.style.msTouchAction === 'none') {
return true;
}
return false;
};
/**
* Factory method for creating a FastClick object
*
* @param {Element} layer The layer to listen on
* @param {Object} options The options to override the defaults
*/
FastClick.attach = function(layer, options) {
'use strict';
return new FastClick(layer, options);
};
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// AMD. Register as an anonymous module.
define(function() {
'use strict';
return FastClick;
});
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = FastClick.attach;
module.exports.FastClick = FastClick;
} else {
window.FastClick = FastClick;
}

File diff suppressed because one or more lines are too long

View File

@ -14,14 +14,13 @@
lawnchairIDB: 'lawnchair/lawnchair-adapter-indexed-db-git',
angular: 'angular/angular.min',
angularRoute: 'angular/angular-route.min',
angularTouch: 'angular/angular-touch.min',
angularSanitize: 'angular/angular-sanitize.min',
angularAnimate: 'angular/angular-animate.min',
uuid: 'uuid/uuid',
forge: 'forge/forge.min',
punycode: 'punycode.min',
openpgp: 'openpgp/openpgp.min',
iscroll: 'iscroll/iscroll-min'
fastclick: 'fastclick/fastclick'
},
shim: {
forge: {
@ -38,17 +37,10 @@
exports: 'angular',
deps: ['angular']
},
angularTouch: {
exports: 'angular',
deps: ['angular']
},
angularAnimate: {
exports: 'angular',
deps: ['angular']
},
iscroll: {
exports: 'IScroll'
},
lawnchair: {
exports: 'Lawnchair'
},

View File

@ -40,7 +40,7 @@ textarea {
// Custom scrollbars in webkit
// @see http://css-tricks.com/custom-scrollbars-in-webkit/
::-webkit-scrollbar {
width: 10px;
width: $scrollbar-width;
}
::-webkit-scrollbar-track {
background: transparent;

View File

@ -20,7 +20,7 @@ $color-white: #fff;
$color-grey: #666;
$color-grey-input: #949494;
$color-grey-dark: #333;
$color-grey-medium: #aaa;
$color-grey-medium: #999;
$color-grey-light: #ccc;
$color-grey-lighter: #ddd;
$color-grey-lighterer: #f0eff5;
@ -37,12 +37,14 @@ $content-nav-width: 344px;
// Animations
// -------------------------------------------
$time-nav-animation: 0.2s;
$time-nav-animation: 0.15s;
$time-li-fade: 0.15s;
// Components
// -------------------------------------------
$scrollbar-width: 10px;
$nav-max-width: 347px;
$nav-width: 80%;
$nav-padding: 15px;

View File

@ -20,7 +20,11 @@
font-size: em(13);
}
.input-search {
width: 93%;
// need to be more specific than normalize.css
.input-search,
input[type="search"].input-search {
box-sizing: border-box;
width: 100%;
border-radius: 0;
-webkit-appearance: searchfield;
}

View File

@ -2,6 +2,7 @@
@include clearfix();
height: 100%;
overflow: hidden;
backface-visibility: hidden;
// double in modile to allow slide transition
@include respond-to(mobile) {

View File

@ -66,6 +66,7 @@
left: 0;
z-index: 1000;
background: $color-grey-dark-alpha;
overflow: auto;
@include respond-to(desktop) {
@include scut-vcenter-ib(".lightbox");

View File

@ -6,19 +6,38 @@
margin: 0;
padding: 0;
&:last-child {
margin-bottom: 0;
}
li {
& > li {
position: relative;
display: block;
margin-bottom: 7px;
padding: $padding-vertical $padding-horizontal;
background: $color-white;
cursor: pointer;
transition: background-color $time-li-fade, color $time-li-fade;
margin-top: 11px;
&:before {
content: '';
display: block;
position: absolute;
top: -6px;
left: 0;
right: 0;
height: 0;
border-top: 1px solid $color-grey-lighter;
}
&:first-child {
box-shadow: none;
border-top: 0;
margin-top: 0;
&:before {
display: none;
}
}
&:last-child {
margin-bottom: 5px;
}
&.ng-animate {
transition: none;
}
@ -67,16 +86,31 @@
text-align: right;
line-height: 1.5em * ($font-size-small / $font-size-smaller);
}
.flag {
width: 1em;
height: 1em;
border-radius: 50%;
box-shadow: inset 1px 1px 1px $color-grey-light;
position: absolute;
top: 0;
left: 0;
margin-top: 0.2em;
margin-left: -1.3em;
}
.flags {
position: absolute;
top: 0;
left: 0;
list-style: none;
margin: 0.8em 0 0;
padding: 0;
color: $color-grey-medium;
width: 30px;
line-height: 1.6em;
& > li {
font-size: 90%;
text-align: center;
&:nth-child(1) {
&:after {
display: inline-block;
content: '';
width: 1em;
height: 1em;
border-radius: 50%;
background-color: $color-blue;
}
}
}
}
@ -90,46 +124,6 @@
background-color: mix($color-white, $color-blue, 90%);
}
&.mail-list-attachment {
.head:after {
content: "\e003";
color: $color-grey-medium;
font-family: $font-family-icons;
position: absolute;
right: 0;
top: 0;
margin-top: -0.3em;
margin-right: -1 * $padding-horizontal;
text-align: center;
line-height: 1.8em;
width: $padding-horizontal;
}
}
&.mail-list-unread {
.flag {
background-color: $color-blue;
box-shadow: inset 0.5px 1px 1px $color-grey-medium;
}
}
&.mail-list-replied {
.flag {
color: $color-grey-medium;
font-family: $font-family-icons;
position: absolute;
left: 0;
top: 0;
margin-left: -1 * $padding-horizontal;
text-align: center;
line-height: 1.8em / 0.8em;
box-shadow: none;
width: $padding-horizontal;
height: auto;
font-size: 0.8em;
}
}
&.mail-list-active,
&.mail-list-active:hover {
background-color: $color-blue;
@ -152,27 +146,27 @@
.body {
color: $color-white;
}
.flag {
box-shadow: inset 1px 1px 1px $color-grey-light;
background-color: $color-white;
}
&.mail-list-attachment {
.head:after {
.flags {
& > li {
color: $color-white;
&:nth-child(1) {
&:after {
background-color: $color-white;
}
}
}
}
&.mail-list-unread {
.flag {
box-shadow: inset 1px 1px 1px $color-grey-light;
background-color: $color-white;
}
}
@include respond-to(desktop) {
margin-top: 0;
margin-bottom: 7px;
&:before {
display: none;
}
&.mail-list-replied {
.flag {
color: $color-white;
background: transparent;
box-shadow: none;
}
&:last-child {
margin-bottom: 0;
}
}
}

View File

@ -1,16 +1,35 @@
.view-contacts {
.key-controls {
display: flex;
flex-direction: row;
margin: 30px;
input[type=text] {
line-height: 23px;
.key-controls-search {
flex-grow: 1;
input[type=text] {
line-height: 23px;
width: 100%;
}
}
.key-controls-import {
display: block;
width: 8em;
flex-shrink: 0;
margin-left: 0.5em;
input[type=file] {
visibility: hidden;
width: 0;
height: 0;
position: absolute;
}
.btn {
width: 100%;
}
input[type=file] {
visibility: hidden;
width: 0;
height: 0;
@include respond-to(desktop) {
width: 10em;
}
}
}

View File

@ -4,26 +4,34 @@
height: 100%;
background-color: $color-grey-lightest;
color: $color-grey-dark;
text-align: center;
padding: 20px;
.logo-wrapper {
.logo {
max-width: 700px;
height: 58px;
margin: 145px auto 75px auto;
.logo {
background-image:url('../img/whiteout_logo.svg');
background-repeat: no-repeat;
background-size: 320px 58px;
margin: 135px auto 75px;
img {
display: block;
max-width: 100%;
width: 320px;
height: 58px;
margin-left: auto;
margin-right: auto;
@include respond-to(desktop) {
margin-left: 0;
}
}
}
.spinner {
font-size: 150%;
}
.content {
max-width: 400px;
margin-left: auto;
margin-right: auto;
text-align: left;
b, a {
color: $color-blue;
}
@ -39,8 +47,14 @@
input {
margin-right: 10px;
}
input[type="text"],
input[type="password"] {
margin-bottom: 10px;
width: 100%;
}
input[type=file] {
width: 100%;
background-color: white;
border-width: 1px;
border-style: solid;
@ -76,6 +90,21 @@
float: left;
}
}
.popover-info {
display: none; // hide on mobile
}
@include respond-to(desktop) {
input[type="text"],
input[type="password"],
input[type="file"] {
width: auto;
}
.popover-info {
display: inline-block;
}
}
}
}

View File

@ -1,16 +1,17 @@
.view-mail-list {
$padding-horizontal: 15px;
$padding-vertical: 10px;
position: relative;
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
background: $color-grey-lighterer;
background-image: linear-gradient(to right ,$color-grey-lighterer 98%, darken($color-grey-lighterer, 1%) 100%);
background: $color-white;
header {
flex-shrink: 0;
cursor: pointer;
padding: $padding-vertical $padding-horizontal;
text-shadow: 0px 1px 1px $color-grey-lighter;
&:before {
color: $color-blue;
font-size: $font-size-bigger;
@ -24,39 +25,52 @@
font-size: $font-size-bigger;
font-weight: normal;
vertical-align: middle;
text-shadow: 0px 1px 1px $color-grey-lighter;
}
button {
float: right;
margin-top: -0.05em; // for perfect vertical alignment with headline
@include respond-to(desktop) {
display: none;
}
}
}
.search {
flex-shrink: 0;
padding: 0 $padding-horizontal $padding-vertical $padding-horizontal;
margin: 0 auto;
width: 100%;
}
.list-wrapper {
height: 100%;
padding: 0 $padding-horizontal;
overflow-y: hidden;
}
ul {
padding-bottom: 126px;
flex-grow: 1;
padding: 0 ($padding-horizontal - $scrollbar-width) 0 $padding-horizontal;
overflow-y: scroll;
}
footer {
flex-shrink: 0;
position: relative;
height: 28px;
cursor: pointer;
position: absolute;
bottom: 0px;
left: 0px;
padding: 0 $nav-padding;
background: darken($color-grey-lighterer, 1%);
background: $color-white;
width: 100%;
font-size: $font-size-smaller;
color: $color-grey-dark;
line-height: em(28,12);
&:before {
content: '';
display: block;
position: absolute;
top: 0;
left: $nav-padding;
right: $nav-padding;
height: 0;
border-top: 1px solid $color-grey-medium;
}
.offline {
&[data-icon]:before {
padding-right: 0.5em;
@ -73,4 +87,16 @@
}
}
}
@include respond-to(desktop) {
background: $color-grey-lighterer;
background-image: linear-gradient(to right ,$color-grey-lighterer 98%, darken($color-grey-lighterer, 1%) 100%);
footer {
background: darken($color-grey-lighterer, 1%);
&:before {
display: none;
}
}
}
}

View File

@ -14,6 +14,16 @@
.subject {
font-size: $font-size-bigger;
margin: 0;
cursor: pointer;
&:before {
color: $color-blue;
font-size: $font-size-smaller;
margin-right: 0.5em;
@include respond-to(desktop) {
display: none;
}
}
}
.date {

View File

@ -8,11 +8,13 @@
<div class="view-contacts">
<div class="key-controls">
<input class="input-text" type="text" placeholder="Search..." ng-model="searchText">
<span>
<div class="key-controls-search">
<input class="input-text" type="text" placeholder="Search..." ng-model="searchText">
</div>
<div class="key-controls-import">
<input id="keyfile-input" type="file" multiple accept=".asc" keyfile-input>
<button class="btn" ng-class="{'btn-primary': sendBtnSecure === false}" keyfile-btn>Import public keys</button>
</span>
<button class="btn" ng-class="{'btn-primary': sendBtnSecure === false}" keyfile-btn>Import keys</button>
</div>
</div>
<div class="key-list">

View File

@ -1,6 +1,6 @@
<div class="view-login view-login-existing">
<div class="logo-wrapper">
<div class="logo"></div>
<div class="logo">
<img src="img/whiteout_logo.svg" alt="whiteout.io">
</div><!--/logo-->
<div class="content">

View File

@ -1,6 +1,6 @@
<div class="view-login view-login-initial" ng-class="{'waiting-cursor': state.ui === 2}">
<div class="logo-wrapper">
<div class="logo"></div>
<div class="logo">
<img src="img/whiteout_logo.svg" alt="whiteout.io">
</div><!--/logo-->
<div class="content" ng-switch on="state.ui">

View File

@ -1,6 +1,6 @@
<div class="view-login">
<div class="logo-wrapper">
<div class="logo"></div>
<div class="logo">
<img src="img/whiteout_logo.svg" alt="whiteout.io">
</div><!--/logo-->
<div class="content">

View File

@ -1,11 +1,9 @@
<div class="view-login waiting-cursor">
<div class="logo-wrapper">
<div class="logo"></div>
<div class="logo">
<img src="img/whiteout_logo.svg" alt="whiteout.io">
</div><!--/logo-->
<div class="content">
<p><b>Login.</b> Authenticating with the mail server...</p>
</div><!--/content-->
<span class="spinner"></span>
</div>

View File

@ -2,23 +2,28 @@
<!-- nav controll and section headline -->
<header data-icon="&#xe004;" ng-click="state.nav.toggle(true); $event.stopPropagation()">
<h2>{{state.nav.currentFolder.type}}</h2>
<button ng-click="state.writer.write(); $event.stopPropagation()" class="btn-icon" title="New mail"></button>
</header>
<div class="search">
<input class="input-text input-search" type="search" results="5" ng-model="searchText" placeholder=" Filter..." focus-me="state.mailList.searching">
</div>
<div class="list-wrapper" ng-iscroll="filteredMessages">
<div class="list-wrapper" list-scroll="filteredMessages">
<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.unread && email.answered}" ng-click="select(email)" ng-repeat="email in (filteredMessages = (state.nav.currentFolder.messages | filter:searchText | orderBy:'uid':true | limitTo:100))">
<li ng-class="{'mail-list-active': email === state.mailList.selected}" ng-click="select(email)" ng-repeat="email in (filteredMessages = (state.nav.currentFolder.messages | filter:searchText | orderBy:'uid':true | limitTo:100))">
<h3>{{email.from[0].name || email.from[0].address}}</h3>
<div class="encrypted" data-icon="{{email.encrypted && email.decrypted ? '&#xe012;' : email.encrypted ? '&#xe009;' : ''}}"></div>
<div class="head">
<div class="flag" data-icon="{{(!email.unread && email.answered) ? '&#xe002;' : ''}}" ng-click="toggleUnread(email); $event.stopPropagation()"></div>
<p class="subject">{{email.subject || 'No subject'}}</p>
<time>{{email.sentDate | date:'mediumDate'}}</time>
</div>
<p class="body">{{email.body}}</p>
<ul class="flags">
<li ng-show="email.unread"></li>
<li data-icon="&#xe002;" ng-show="!email.unread && email.answered"></li>
<li data-icon="&#xe003;" ng-show="email.attachments !== undefined && email.attachments.length > 0"></li>
</ul>
</li>
</ul><!--/.mail-list-->
</div>

View File

@ -7,7 +7,7 @@
<button ng-click="state.writer.write()" class="btn-icon" title="New mail">&#xe006;</button>
</div><!--/.controls-->
<p class="subject" ng-click="state.read.toggle(false)">{{(state.mailList.selected.subject) ? state.mailList.selected.subject : 'No subject'}}</p>
<p class="subject" ng-click="state.read.toggle(false)" data-icon="&#xe016;">{{(state.mailList.selected.subject) ? state.mailList.selected.subject : 'No subject'}}</p>
<p class="date">{{state.mailList.selected.sentDate | date:'EEEE, MMM d, yyyy h:mm a'}}</p>
<div class="mail-addresses">
<p>