mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 17:02:17 -05:00
implement read view
This commit is contained in:
parent
18d82aca49
commit
02fcb18121
15
Gruntfile.js
15
Gruntfile.js
@ -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,
|
||||||
|
@ -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) {
|
||||||
|
@ -21,3 +21,4 @@
|
|||||||
// Views
|
// Views
|
||||||
@import "views/navigation";
|
@import "views/navigation";
|
||||||
@import "views/mail-list";
|
@import "views/mail-list";
|
||||||
|
@import "views/read";
|
||||||
|
@ -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
44
src/sass/views/_read.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
@ -1,39 +1,29 @@
|
|||||||
<div class="buttons">
|
<div class="controls">
|
||||||
<div ng-click="write()" class="circle btn-shadow">
|
<button class="btn-icon"></button>
|
||||||
<div class="icon-new-mail"></div>
|
<button class="btn-icon"></button>
|
||||||
</div>
|
<button ng-click="write()" class="btn-icon"></button>
|
||||||
|
</div><!--/.controls-->
|
||||||
|
|
||||||
<div class="circle btn-shadow">
|
<div class="view-read">
|
||||||
<div class="icon-reply"></div>
|
<div class="headers">
|
||||||
</div>
|
<p class="subject">{{selected.subject}}</p>
|
||||||
|
<p class="date">{{selected.longDisplayDate}}</p>
|
||||||
<div class="circle btn-shadow">
|
<p class="address">From: <span class="label">{{selected.from[0].name || selected.from[0].address}}</span></p>
|
||||||
<div class="icon-delete"></div>
|
<p class="address">To: <span class="label" ng-repeat="t in selected.to">{{t.address}} </span></p>
|
||||||
</div>
|
|
||||||
</div><!--/.buttons-->
|
|
||||||
|
|
||||||
<div class="read-message">
|
|
||||||
<p class="subject">{{selected.subject}}</p>
|
|
||||||
<p class="date">{{selected.longDisplayDate}}</p>
|
|
||||||
|
|
||||||
<div class="address-headers">
|
|
||||||
<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-->
|
Loading…
Reference in New Issue
Block a user