1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-23 01:12:19 -05:00

implement read view

This commit is contained in:
Tankred Hase 2013-09-18 20:45:58 +02:00
parent 18d82aca49
commit 02fcb18121
6 changed files with 66 additions and 43 deletions

View File

@ -75,11 +75,6 @@ module.exports = function(grunt) {
files: { files: {
'dist/css/all.css': 'src/sass/all.scss' 'dist/css/all.css': 'src/sass/all.scss'
} }
},
oldSass: {
files: {
'dist/css/style.css': 'src/css/style.scss'
}
} }
}, },
autoprefixer: { autoprefixer: {
@ -107,10 +102,6 @@ module.exports = function(grunt) {
files: ['src/sass/**/*.scss'], files: ['src/sass/**/*.scss'],
tasks: ['dist-css'] tasks: ['dist-css']
}, },
oldSass: {
files: ['src/css/**/*.scss'],
tasks: ['sass:oldSass']
},
js: { js: {
files: ['src/js/**/*.js'], files: ['src/js/**/*.js'],
tasks: ['copy:js'] tasks: ['copy:js']
@ -125,12 +116,6 @@ module.exports = function(grunt) {
} }
}, },
copy: { copy: {
oldSass: {
expand: true,
cwd: 'src/css/',
src: ['reset.css', 'icons.ttf'],
dest: 'dist/css/'
},
npm: { npm: {
expand: true, expand: true,
flatten: true, flatten: true,

View File

@ -14,6 +14,8 @@ define(function(require) {
$scope.select = function(email) { $scope.select = function(email) {
email.bodyDisplayParts = email.body.split('\n'); email.bodyDisplayParts = email.body.split('\n');
$scope.selected = email; $scope.selected = email;
// set selected in parent scope ro it can be displayed in the read view
$scope.$parent.selected = $scope.selected;
}; };
$scope.write = function(replyTo) { $scope.write = function(replyTo) {

View File

@ -21,3 +21,4 @@
// Views // Views
@import "views/navigation"; @import "views/navigation";
@import "views/mail-list"; @import "views/mail-list";
@import "views/read";

View File

@ -21,6 +21,7 @@
height: 100px; height: 100px;
width: 300px; width: 300px;
margin: 0px; margin: 0px;
padding: 0px;
padding-top: 10px; padding-top: 10px;
color: #fff; color: #fff;

44
src/sass/views/_read.scss Normal file
View File

@ -0,0 +1,44 @@
.view-read {
padding: 10px 15px;
color: $color-grey-dark;
.headers {
p {
margin: 0px;
padding: 0px;
}
.subject {
font-size: $font-size-bigger;
}
.date {
color: $color-grey-light;
font-size: $font-size-small;
margin-top: 0.5em;
margin-bottom: 1.5em;
padding: 0px;
}
.address {
padding: 0.2em 0;
}
}
.seperator-line {
height: 1px;
color: $color-grey-lighter;
background-color: $color-grey-lighter;
margin-top: 1em;
margin-bottom: 1.5em;
}
}
.controls {
float: right;
margin: 10px 15px;
button {
margin-left: 7px;
}
}

View File

@ -1,39 +1,29 @@
<div class="buttons"> <div class="controls">
<div ng-click="write()" class="circle btn-shadow"> <button class="btn-icon">&#xe005;</button>
<div class="icon-new-mail"></div> <button class="btn-icon">&#xe002;</button>
</div> <button ng-click="write()" class="btn-icon">&#xe006;</button>
</div><!--/.controls-->
<div class="circle btn-shadow"> <div class="view-read">
<div class="icon-reply"></div> <div class="headers">
</div>
<div class="circle btn-shadow">
<div class="icon-delete"></div>
</div>
</div><!--/.buttons-->
<div class="read-message">
<p class="subject">{{selected.subject}}</p> <p class="subject">{{selected.subject}}</p>
<p class="date">{{selected.longDisplayDate}}</p> <p class="date">{{selected.longDisplayDate}}</p>
<p class="address">From: <span class="label">{{selected.from[0].name || selected.from[0].address}}</span></p>
<div class="address-headers"> <p class="address">To: <span class="label" ng-repeat="t in selected.to">{{t.address}} </span></p>
<p>From: <span class="address address-verified">{{selected.from[0].name || selected.from[0].address}}</span></p>
<p>To: <span class="address address-verified" ng-repeat="t in selected.to">{{t.address}} </span></p>
<div ng-switch="selected.cc !== undefined"> <div ng-switch="selected.cc !== undefined">
<p ng-switch-when="true"> <p class="address" ng-switch-when="true">
CC: <span class="address address-verified" ng-repeat="t in selected.cc">{{t.address}} </span> CC: <span class="label" ng-repeat="t in selected.cc">{{t.address}} </span>
</p> </p>
</div> </div>
</div><!--/.address-headers--> </div><!--/.headers-->
<div class="seperator-line"></div> <div class="seperator-line"></div>
<div class="mail-text-body"> <div class="mail-text-body">
<p ng-repeat="part in selected.bodyDisplayParts track by $index"> <p ng-repeat="part in selected.bodyDisplayParts track by $index">
<span ng-switch="part.length === 0"> <span ng-switch="part.length !== 0">
<span ng-switch-when="true"><br></span> <span ng-switch-when="true">{{part}}</span>
<span ng-switch-when="false">{{part}}</span>
</span> </span>
</p> </p>
</div> </div><!--/.mail-text-body-->
</div><!--/.read-message--> </div><!--/.view-read-->