diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index 9d3f419..fe1e8e6 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -65,6 +65,7 @@ define(function(require) { } // development... display dummy mail objects + firstSelect = true; updateStatus('Last update: ', new Date()); $scope.$parent.emails = $scope.emails = createDummyMails(); $scope.select($scope.emails[0]); @@ -167,10 +168,15 @@ define(function(require) { return; } + $scope.openReadMode(); + if (!window.chrome || !chrome.socket) { + return; + } + if (!email.unread) { return; } - + email.unread = false; emailDao.imapMarkMessageRead({ folder: getFolder().path, diff --git a/src/js/controller/navigation.js b/src/js/controller/navigation.js index a752765..f6a2292 100644 --- a/src/js/controller/navigation.js +++ b/src/js/controller/navigation.js @@ -50,6 +50,13 @@ define(function(require) { $scope.accountOpen = false; }; + $scope.openReadMode = function() { + $scope.readingMode = true; + }; + $scope.closeReadMode = function() { + $scope.readingMode = false; + }; + $scope.remove = function(email) { if (!email) { return; diff --git a/src/js/controller/write.js b/src/js/controller/write.js index ff46339..13fa8e2 100644 --- a/src/js/controller/write.js +++ b/src/js/controller/write.js @@ -114,10 +114,9 @@ define(function(require) { return; } - var ps = $scope.$parent.$parent; - ps.closeWriter(); - ps.$apply(); - ps.emptyOutbox(); + $scope.closeWriter(); + $scope.$apply(); + $scope.emptyOutbox(); }); }; }; diff --git a/src/sass/_responsive.scss b/src/sass/_responsive.scss index 1aa6dae..5924a0e 100755 --- a/src/sass/_responsive.scss +++ b/src/sass/_responsive.scss @@ -2,7 +2,10 @@ // ------------------------- @mixin respond-to($media) { - @if $media == desktop { + @if $media == mobile { + @media only screen and (max-width: $respond-size-desktop - 1) { @content; } + } + @else if $media == desktop { @media only screen and (min-width: $respond-size-desktop) { @content; } } @else if $media == retina { diff --git a/src/sass/_scaffolding.scss b/src/sass/_scaffolding.scss index 9583382..b124666 100755 --- a/src/sass/_scaffolding.scss +++ b/src/sass/_scaffolding.scss @@ -46,4 +46,9 @@ textarea { ::-webkit-scrollbar { width: 0px; } + + // remove flickering on item touch selection in ios + * { + -webkit-tap-highlight-color: transparent !important; + } } \ No newline at end of file diff --git a/src/sass/components/_layout.scss b/src/sass/components/_layout.scss index 56ef2b2..cabc82f 100755 --- a/src/sass/components/_layout.scss +++ b/src/sass/components/_layout.scss @@ -2,9 +2,35 @@ @include clearfix(); height: 100%; overflow: hidden; + + // double in modile to allow slide transition + @include respond-to(mobile) { + width: 200%; // this currently causes a smear effect bug on mail-list header in safari + transition: transform $time-nav-animation ease-in-out; + } } .column { height: 100%; overflow: hidden; + + // half of main-content in mobile mode to allow slide transition + @include respond-to(mobile) { + width: 50%; + } +} + +.column-left { + float: left; + + @include respond-to(desktop) { + width: $content-nav-width; + border-right: 1px solid $color-grey-light; + } +} + +.shift-right { + @include respond-to(mobile) { + transform: translateX(-50%); + } } \ No newline at end of file diff --git a/src/sass/components/_nav.scss b/src/sass/components/_nav.scss index 3ffd936..b3f3ea5 100755 --- a/src/sass/components/_nav.scss +++ b/src/sass/components/_nav.scss @@ -49,13 +49,6 @@ border-right: 1px solid $color-grey-light; } -.nav-menu-open .nav-pusher::after { - width: 100%; - height: 100%; - opacity: 1; - transition: opacity $time-nav-animation; -} - .nav-effect.nav-menu-open .nav-pusher { transform: translate3d($nav-max-width, 0, 0); } @@ -65,9 +58,8 @@ } } - .nav-effect.nav-menu { -z-index: 1; + z-index: 1; transform: translate3d(-50%, 0, 0); } diff --git a/src/sass/views/_mail-list.scss b/src/sass/views/_mail-list.scss index eeb7508..0cd9ba3 100755 --- a/src/sass/views/_mail-list.scss +++ b/src/sass/views/_mail-list.scss @@ -1,22 +1,11 @@ .view-mail-list { $padding-horizontal: 15px; $padding-vertical: 10px; + height: 100%; background: $color-grey-lightest; background-image: linear-gradient(to right ,$color-grey-lightest 98%, darken($color-grey-lightest, 1%) 100%); - // remove flickering on item touch selection in ios - * { - -webkit-tap-highlight-color: transparent !important; - } - - width: 100%; - @include respond-to(desktop) { - float: left; - width: $content-nav-width; - border-right: 1px solid $color-grey-light; - } - header { cursor: pointer; diff --git a/src/tpl/desktop.html b/src/tpl/desktop.html index c0292df..312978f 100644 --- a/src/tpl/desktop.html +++ b/src/tpl/desktop.html @@ -5,10 +5,10 @@