Merge remote-tracking branch 'origin/v2' into v2

# Conflicts:
#	src/app/theme/components/sidebar/SidebarCtrl.js
pull/3/head
KostyaDanovsky 2016-01-13 18:29:50 +03:00
commit 8e8d542e07
13 changed files with 164 additions and 100 deletions

View File

@ -11,15 +11,15 @@ var _ = require('lodash');
var browserSync = require('browser-sync');
gulp.task('inject-reload', ['inject'], function() {
gulp.task('inject-reload', ['inject'], function () {
browserSync.reload();
});
gulp.task('inject', ['scripts', 'styles'], function () {
gulp.task('inject', ['scripts', 'styles', 'injectAuth', 'inject404'], function () {
var injectStyles = gulp.src([
path.join(conf.paths.tmp, '/serve/app/**/*.css'),
path.join(conf.paths.tmp, '/serve/app/main.css'),
path.join('!' + conf.paths.tmp, '/serve/app/vendor.css')
], { read: false });
], {read: false});
var injectScripts = gulp.src([
path.join(conf.paths.src, '/assets/js/**/*.js'),
@ -28,16 +28,46 @@ gulp.task('inject', ['scripts', 'styles'], function () {
path.join('!' + conf.paths.src, '/app/**/*.spec.js'),
path.join('!' + conf.paths.src, '/app/**/*.mock.js'),
])
/*.pipe($.angularFilesort())*/.on('error', conf.errorHandler('AngularFilesort'));
/*.pipe($.angularFilesort())*/.on('error', conf.errorHandler('AngularFilesort'));
var injectOptions = {
ignorePath: [conf.paths.src, path.join(conf.paths.tmp, '/serve')],
addRootSlash: false
};
return gulp.src(path.join(conf.paths.src, '/*.html'))
return gulp.src(path.join(conf.paths.src, '/index.html'))
.pipe($.inject(injectStyles, injectOptions))
.pipe($.inject(injectScripts, injectOptions))
.pipe(wiredep(_.extend({}, conf.wiredep)))
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve')));
});
gulp.task('injectAuth', ['stylesAuth'], function () {
return injectAlone({
css: [path.join('!' + conf.paths.tmp, '/serve/app/vendor.css'), path.join(conf.paths.tmp, '/serve/app/auth.css')],
paths: [path.join(conf.paths.src, '/auth.html'), path.join(conf.paths.src, '/reg.html')]
})
});
gulp.task('inject404', ['styles404'], function () {
return injectAlone({
css: [path.join('!' + conf.paths.tmp, '/serve/app/vendor.css'), path.join(conf.paths.tmp, '/serve/app/404.css')],
paths: path.join(conf.paths.src, '/404.html')
})
});
var injectAlone = function (options) {
var injectStyles = gulp.src(
options.css
, {read: false});
var injectOptions = {
ignorePath: [conf.paths.src, path.join(conf.paths.tmp, '/serve')],
addRootSlash: false
};
return gulp.src(options.paths)
.pipe($.inject(injectStyles, injectOptions))
.pipe(wiredep(_.extend({}, conf.wiredep)))
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve')));
};

View File

@ -11,27 +11,36 @@ var $ = require('gulp-load-plugins')();
var wiredep = require('wiredep').stream;
var _ = require('lodash');
gulp.task('styles-reload', ['styles'], function() {
gulp.task('styles-reload', ['styles'], function () {
return buildStyles()
.pipe(browserSync.stream());
});
gulp.task('styles', function() {
gulp.task('styles', function () {
return buildStyles();
});
var buildStyles = function() {
gulp.task('stylesAuth', function () {
return buildSingleScss(path.join(conf.paths.src, '/sass/auth.scss'));
});
gulp.task('styles404', function () {
return buildSingleScss(path.join(conf.paths.src, '/sass/404.scss'));
});
var buildStyles = function () {
var sassOptions = {
style: 'expanded'
};
var injectFiles = gulp.src([
path.join(conf.paths.src, '/sass/**/_*.scss'),
'!' + path.join(conf.paths.src, '/sass/theme/conf/**/*.scss')
], { read: false });
'!' + path.join(conf.paths.src, '/sass/theme/conf/**/*.scss'),
'!' + path.join(conf.paths.src, '/sass/404.scss'),
'!' + path.join(conf.paths.src, '/sass/auth.scss')
], {read: false});
var injectOptions = {
transform: function(filePath) {
transform: function (filePath) {
filePath = filePath.replace(conf.paths.src + '/sass/', '');
return '@import "' + filePath + '";';
},
@ -51,3 +60,14 @@ var buildStyles = function() {
.pipe($.sourcemaps.write())
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve/app/')));
};
var buildSingleScss = function (paths) {
var sassOptions = {
style: 'expanded'
};
return gulp.src([paths])
.pipe($.sass(sassOptions)).on('error', conf.errorHandler('Sass'))
.pipe($.autoprefixer()).on('error', conf.errorHandler('Autoprefixer'))
.pipe(gulp.dest(path.join(conf.paths.tmp, '/serve/app/')));
};

View File

@ -12,7 +12,11 @@
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
<link rel="stylesheet" href="css/404.min.css">
<!-- build:css({.tmp/serve,src}) styles/404.css -->
<!-- inject:css -->
<!-- css files will be automatically insert here -->
<!-- endinject -->
<!-- endbuild -->
</head>
<body>
<div class="page-not-found-modal">

View File

@ -5,22 +5,22 @@
<span class="header-controls">
<i class="ion-minus-round"></i>
<i class="ion-arrow-resize"></i>
<i ng-click="close()" class="ion-close-round"></i>
<i ng-click="$dismiss()" class="ion-close-round"></i>
</span>
</div>
<div >
<input type="text" class="form-control compose-input" placeholder="To" ng-model="to">
<input type="text" class="form-control compose-input" placeholder="Subject" ng-model="subject">
<input type="text" class="form-control compose-input" placeholder="To" ng-model="boxCtrl.to">
<input type="text" class="form-control compose-input" placeholder="Subject" ng-model="boxCtrl.subject">
<div class="compose-container">
<text-angular-toolbar ta-toolbar-class="toolbarMain" name="toolbarMain" ta-toolbar="[['h1','h2','h3','bold','italics', 'underline', 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull']]"></text-angular-toolbar>
<text-angular name="htmlcontent" ta-target-toolbars='toolbarMain,toolbarFooter' ng-model="text"></text-angular>
<text-angular name="htmlcontent" ta-target-toolbars='toolbarMain,toolbarFooter' ng-model="boxCtrl.text"></text-angular>
</div>
</div>
<div class="compose-footer">
<button type="button" ng-click="close()" class="btn btn-send">Send</button>
<button type="button" ng-click="$dismiss()" class="btn btn-send">Send</button>
<text-angular-toolbar ta-toolbar-class="toolbarFooter" name="toolbarFooter" ta-toolbar="[['insertLink', 'insertImage', 'html', 'quote','insertVideo']]"></text-angular-toolbar>
<div class="footer-controls">
<i class="footer-control-first compose-footer-icon ion-arrow-down-b"></i>
<i ng-click="close()" class="compose-footer-icon ion-android-delete"></i>
<i ng-click="$dismiss()" class="compose-footer-icon ion-android-delete"></i>
</div>
</div>

View File

@ -9,14 +9,10 @@
.controller('composeBoxCtrl', composeBoxCtrl);
/** @ngInject */
function composeBoxCtrl($scope, $uibModalInstance, subject, to, text) {
$scope.subject = subject;
$scope.to = to;
$scope.text = text;
console.log(subject, to , text);
$scope.close = function () {
$uibModalInstance.dismiss('cancel');
};
function composeBoxCtrl(subject, to, text) {
var vm = this;
vm.subject = subject;
vm.to = to;
vm.text = text;
}
})();

View File

@ -10,12 +10,12 @@
/** @ngInject */
function composeModal($uibModal) {
return {
open : function(options){
this.open = function(options){
return $uibModal.open({
animation: false,
templateUrl: 'app/pages/mail/composeBox/compose.html',
controller: 'composeBoxCtrl',
controllerAs: 'boxCtrl',
size: 'slim',
resolve: {
subject: function () {
@ -30,7 +30,7 @@
}
});
}
}
}
})();

View File

@ -9,14 +9,10 @@
.controller('MailDetailCtrl', MailDetailCtrl);
/** @ngInject */
function MailDetailCtrl($state, $stateParams, mailMessages) {
function MailDetailCtrl($stateParams, mailMessages) {
var vm = this;
vm.mail = mailMessages.getMessageById($stateParams.id);
vm.back = function(){
$state.go('mail.label', {
label: $stateParams.label
})
}
vm.label = $stateParams.label;
}
})();

View File

@ -1,7 +1,7 @@
<div class="message-container">
<div class="message">
<div class="row">
<button ng-click="detailCtrl.back()" type="button" class="back-button btn btn-default btn-with-icon"><i
<button ui-sref="mail.label({label : detailCtrl.label})" type="button" class="back-button btn btn-default btn-with-icon"><i
class="ion-chevron-left"></i>Back
</button>
</div>
@ -64,8 +64,8 @@
</div>
<div class="line" ng-show="detailCtrl.mail.attachment"></div>
<div class="answer-container">
<button type="button" class="btn btn-with-icon" ng-click="showCompose(detailCtrl.mail.subject,detailCtrl.mail.email,'')"><i class="ion-reply"></i>Reply</button>
<button type="button" class="btn btn-with-icon" ng-click="showCompose(detailCtrl.mail.subject,'',detailCtrl.mail.body)"><i class="ion-forward"></i>Forward</button>
<button type="button" class="btn btn-with-icon" ng-click="tabCtrl.showCompose(detailCtrl.mail.subject,detailCtrl.mail.email,'')"><i class="ion-reply"></i>Reply</button>
<button type="button" class="btn btn-with-icon" ng-click="tabCtrl.showCompose(detailCtrl.mail.subject,'',detailCtrl.mail.body)"><i class="ion-forward"></i>Forward</button>
<button type="button" class="btn btn-with-icon"><i class="ion-printer"></i>Print</button>
<button type="button" class="btn btn-with-icon"><i class="ion-android-remove-circle"></i>Spam</button>
<button type="button" class="btn btn-with-icon"><i class="ion-android-delete"></i>Delete</button>

View File

@ -12,7 +12,17 @@
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
<link rel="stylesheet" href="css/auth.min.css">
<!-- build:css({.tmp/serve,src}) styles/vendor.css -->
<!-- bower:css -->
<!-- run `gulp inject` to automatically populate bower styles dependencies -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css({.tmp/serve,src}) styles/auth.css -->
<!-- inject:css -->
<!-- css files will be automatically insert here -->
<!-- endinject -->
<!-- endbuild -->
</head>
<body>
<main class="auth-main">

View File

@ -12,7 +12,17 @@
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
<link rel="stylesheet" href="css/auth.min.css">
<!-- build:css({.tmp/serve,src}) styles/vendor.css -->
<!-- bower:css -->
<!-- run `gulp inject` to automatically populate bower styles dependencies -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css({.tmp/serve,src}) styles/auth.css -->
<!-- inject:css -->
<!-- css files will be automatically insert here -->
<!-- endinject -->
<!-- endbuild -->
</head>
<body>
<main class="auth-main">

View File

@ -1,5 +1,4 @@
@import "_variables.scss";
@import "_mixins.scss";
@import "common.scss";
html {
position: relative;

View File

@ -1,4 +1,4 @@
.letter-layout{
.letter-layout {
margin-top: -15px;
margin-right: -22px;
}
@ -55,32 +55,31 @@
}
}
.labels, .add-label-container{
.labels, .add-label-container {
margin-top: 16px;
margin-left: 22px;
}
.labels-title{
.labels-title {
padding-left: 10px;
border-bottom: 1px solid $border-light;
.label-header{
.label-header {
line-height: 24px;
}
}
.label-item{
.label-item {
margin: 10px 0 0 10px;
}
.add-label-container{
.add-label-container {
padding-left: 10px;
font-size: 16px;
font-weight: 100;
.label-input-stub{
.label-input-stub {
margin-left: 5px;
}
i{
i {
cursor: pointer;
}
}
@ -89,14 +88,14 @@
margin-left: 10px;
}
.messages-control{
.messages-control {
padding: 10px;
.dropdown-menu {
margin-left: 10px;
}
.btn{
.btn {
background-color: transparent;
border: 1px solid $border-light;
}
@ -108,13 +107,12 @@
font-weight: 100;
}
span.select-all-label{
span.select-all-label {
font-size: 13px;
font-weight: 100;
}
}
.message-container, .side-message-navigation, .mail-navigation-container {
float: left;
padding: 0 15px;
@ -123,31 +121,31 @@
overflow: scroll;
}
.side-message-navigation{
.side-message-navigation {
padding: 10px 0 0 0;
width: calc(100% - 300px);
box-shadow: -4px 0 7px -2px $input-border;
.side-message-navigation-item{
box-shadow: -4px 0 7px -2px $input-border;
.side-message-navigation-item {
border-bottom: 1px solid $input-border;
&.work {
border-left:4px solid $primary-light;
border-left: 4px solid $primary-light;
}
&.study {
border-left:4px solid $google-color;
border-left: 4px solid $google-color;
}
&.family {
border-left:4px solid $warning;
border-left: 4px solid $warning;
}
&.friend {
border-left:4px solid $danger;
border-left: 4px solid $danger;
}
}
}
.mail-body-part{
.mail-body-part {
text-overflow: ellipsis;
height: 16px;
overflow: hidden;
@ -155,7 +153,7 @@
margin-left: 5px;
}
.mail-tag.tag.label{
.mail-tag.tag.label {
display: inline-block;
font-size: 14px;
text-transform: uppercase;
@ -163,9 +161,9 @@
width: 65px;
}
.phone-email{
i{
color:$primary-dark;
.phone-email {
i {
color: $primary-dark;
}
}
@ -191,7 +189,7 @@
vertical-align: super;
white-space: nowrap;
}
.name-wrap{
.name-wrap {
margin-left: 10px;
}
.date {
@ -214,11 +212,11 @@
.little-human-picture {
animation: rotateReturnAnimation 0.5s;
}
color: $dribble-color;
color: $dribble-color;
}
}
.mail-checkbox{
.mail-checkbox {
margin-top: 5px;
margin-left: 6px;
}
@ -354,7 +352,7 @@
cursor: pointer;
}
}
.date{
.date {
white-space: nowrap;
}
}
@ -416,14 +414,14 @@
.answer-container {
float: right;
margin-top: 10px;
.btn{
.btn {
margin-top: 3px;
background-color: $primary-light;
border: none;
color: white;
width: 100px;
transition: none;
&:hover{
&:hover {
transform: none;
background-color: $danger;
}
@ -434,12 +432,11 @@
margin-top: -7px;
}
@keyframes rotateReturnAnimation {
0% {
transform: rotate(0deg);
}
50%{
50% {
transform: rotate(10deg);
}
100% {
@ -449,7 +446,7 @@
@media screen and (max-width: 1300px) {
.mail-navigation-container{
.mail-navigation-container {
width: 260px
}
@ -463,9 +460,8 @@
}
@media screen and (max-width: 1199px) {
.name-h{
.name-h {
display: inline;
}
.person-info .human-picture {
@ -477,7 +473,7 @@
}
@media screen and (max-width: 990px) {
.mail-navigation-container{
.mail-navigation-container {
width: 200px
}
@ -498,19 +494,19 @@
}
.person-info{
.person-info {
padding-left: 0;
}
.message-container{
.message-container {
padding-left: 15px;
}
.back-button, .contact-info{
.back-button, .contact-info {
margin-left: 15px;
}
.additional-info{
.additional-info {
display: none;
}
@ -518,7 +514,7 @@
font-size: 10px;
}
.margin-left{
.margin-left {
margin-left: 5px;
}
@ -526,7 +522,7 @@
@media screen and (max-width: 650px) {
.mail-navigation-container{
.mail-navigation-container {
width: 175px
}
@ -538,10 +534,10 @@
width: calc(100% - 175px);
}
.mail-body-part{
.mail-body-part {
display: none;
}
.little-human .little-human-picture{
.little-human .little-human-picture {
width: 30px;
height: 30px;
}
@ -549,12 +545,13 @@
width: 50px;
}
}
@media screen and (max-width: 470px) {
.little-human .little-human-picture{
.little-human .little-human-picture {
display: none;
}
.mail-navigation-container{
.mail-navigation-container {
width: 155px
}
@ -574,7 +571,7 @@
font-size: 14px;
}
.mail-navigation-container .mail-navigation .new-mails{
.mail-navigation-container .mail-navigation .new-mails {
padding: 0px 5px;
margin-top: 0px;
font-size: 12px;
@ -585,15 +582,13 @@
}
.add-label-container {
padding-left: 0;
padding-left: 0;
font-size: 13px;
font-weight: 100;
}
}
.compose-header {
padding: 8px 3px 8px 10px;
color: white;
@ -615,14 +610,18 @@
}
}
.compose-container .ta-scroll-window > .ta-bind {
height: 290px;
overflow-y: scroll;
}
.compose-input {
border-left: 0;
border-right: 0;
border-top: 0;
}
.compose-footer {
padding: 2px 4px;
background-color: whitesmoke;
@ -633,7 +632,7 @@
margin: 3px;
font-weight: 100;
}
.btn-default{
.btn-default {
background-color: transparent;
border: none;
}
@ -648,6 +647,7 @@
font-size: 18px;
margin-right: 5px;
cursor: pointer;
color: $help-text;
&:hover {
color: $primary-light;
}

View File

@ -1,5 +1,4 @@
@import "theme/_variables.scss";
@import "theme/_mixins.scss";
@import "common.scss";
@import "theme/_socicon.scss";
@import "theme/_layout.scss";