Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
show first folder of an account incase of invalid folder id
Browse files Browse the repository at this point in the history
  • Loading branch information
tahaalibra committed May 8, 2016
1 parent 271dff5 commit 3c49bd2
Show file tree
Hide file tree
Showing 25 changed files with 487 additions and 227 deletions.
103 changes: 66 additions & 37 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,85 @@
# Changelog
All notable changes to this project will be documented in this file.

## 0.4.3
* Improved autoconfig
[#1407](https://github.com/owncloud/mail/pull/1407) @Scheirle
* Better color generator for accounts
[#1428](https://github.com/owncloud/mail/pull/1425) @skjnldsv
* Load next messages automatically when reaching end of the list
[#499](https://github.com/owncloud/mail/pull/1432) @ChristophWurst
* Fix bug with address collector (Data too long for column)
[#1421](https://github.com/owncloud/mail/pull/1433) @ChristophWurst
## [Unreleased]

## 0.4.2
* Fix autocompletion (regression)
[#1394](https://github.com/owncloud/mail/pull/1394) @ChristophWurst
* Fix show total email count for drafts folder
[#1396](https://github.com/owncloud/mail/pull/1396) @tahaalibra
## 0.4.4

## 0.4.1
* Fix js error when adding attachments
[#1378](https://github.com/owncloud/mail/pull/1378) @ChristophWurst
### Added
- Collapse folders and show only important ones
[#1445](https://github.com/owncloud/mail/pull/1445) @ChristophWurst

## 0.4
### Changed
- Show attachments as blocks instead of list
[#1448](https://github.com/owncloud/mail/pull/1448) @ChristophWurst

New:
### Fixed
- Fix button and sidebar layout
[#1476](https://github.com/owncloud/mail/pull/1476) @skjnldsv
- Invalidate js cache if app version changes
[#1457](https://github.com/owncloud/mail/pull/1457) @ChristophWurst
- Fixed newly created account not being shown after successful setup
[#1459](https://github.com/owncloud/mail/pull/1459) @ChristophWurst
[#1462](https://github.com/owncloud/mail/pull/1462) @ChristophWurst
- Replace old drafts correctly
[#1464](https://github.com/owncloud/mail/pull/1464) @ChristophWurst
- JavaScript tests are now excluded from the app archive
[#1466](https://github.com/owncloud/mail/pull/1466) @ChristophWurst
- show first folder of an account incase of invalid folder id
[#1471] (https://github.com/owncloud/mail/pull/1471) @tahaalibra

* Add console command for account creation
[#1202](https://github.com/owncloud/mail/pull/1202) @ChristophWurst
## 0.4.3 – 2016-04-23

* Drop owncloud 7 support
[#1267](https://github.com/owncloud/mail/pull/1267) @ChristophWurst
### Added
- Load next messages automatically when reaching end of the list
[#499](https://github.com/owncloud/mail/pull/1432) @ChristophWurst

* Address collector - Addresses of sent mails will be used for auto-completion
[#1276](https://github.com/owncloud/mail/pull/1276) @ChristophWurst
### Changed
- Improved autoconfig
[#1407](https://github.com/owncloud/mail/pull/1407) @Scheirle
- Better color generator for accounts
[#1428](https://github.com/owncloud/mail/pull/1425) @skjnldsv

* PHP 7 support
[#1300](https://github.com/owncloud/mail/pull/1300) @ChristophWurst
### Fixed
- Fix bug with address collector (Data too long for column)
[#1421](https://github.com/owncloud/mail/pull/1433) @ChristophWurst

Fixes:
## 0.4.2 – 2016-04-13

*
### Added
- Fix show total email count for drafts folder
[#1396](https://github.com/owncloud/mail/pull/1396) @tahaalibra

## 0.3.1 (unreleased)
### Fixed
- Fix autocompletion (regression)
[#1394](https://github.com/owncloud/mail/pull/1394) @ChristophWurst

## 0.4.1 – 2016-03-30

Fixes:
### Fixed
- Fix js error when adding attachments
[#1378](https://github.com/owncloud/mail/pull/1378) @ChristophWurst

* Message list is not hidden when adding a secondary account
[#1295](https://github.com/owncloud/mail/issues/1295) @Gomez
## 0.4.0 – 2016-03-17

* Sub-sub folders not handled correctly
[#618](https://github.com/owncloud/mail/issues/618) @ErikPel
### Added
- Add console command for account creation
[#1202](https://github.com/owncloud/mail/pull/1202) @ChristophWurst
- Address collector - Addresses of sent mails will be used for auto-completion
[#1276](https://github.com/owncloud/mail/pull/1276) @ChristophWurst
- PHP 7 support
[#1300](https://github.com/owncloud/mail/pull/1300) @ChristophWurst

### Deprecated
- Drop owncloud 7 support
[#1267](https://github.com/owncloud/mail/pull/1267) @ChristophWurst

## 0.3 (2016-02-03)
## 0.3.1

### Fixed
- Message list is not hidden when adding a secondary account
[#1295](https://github.com/owncloud/mail/issues/1295) @Gomez
- Sub-sub folders not handled correctly
[#618](https://github.com/owncloud/mail/issues/618) @ErikPel

## 0.3 - 2016-02-03
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"domReady": "^2.0.1",
"handlebars": "^4.0.5",
"jquery": "2.2.3",
"jquery-storage-api": "jQuery-Storage-API#^1.8.1",
"jquery-storage-api": "julien-maurel/jQuery-Storage-API#~1.7.4",
"jquery-visibility": "~1.0.11",
"requirejs": "2.2.0",
"text": "^2.0.14",
Expand Down
71 changes: 55 additions & 16 deletions css/mail.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@

/* fix scrolling */
#app-navigation {
overflow-y: auto;
overflow-x: hidden;
overflow: hidden;
}

#app-navigation .utils {
Expand Down Expand Up @@ -129,6 +128,9 @@
opacity: .3;
}

#app-navigation > ul {
height: calc(100% - 65px);
}
#app-navigation ul {
overflow-x: hidden;
}
Expand Down Expand Up @@ -183,7 +185,7 @@
white-space: nowrap;
}
.mail-account-email:first-child {
padding-top: 50px;
display: none;
}
.account-toggle-collapse {
display: block;
Expand Down Expand Up @@ -355,22 +357,22 @@

/* editor */
#mail-new-message-fixed {
position: fixed !important;
width: 241px !important;
z-index: 1;
padding-bottom: 12px;
background-color: rgba(255, 255, 255, .75);
padding: 10px;
position: relative;
}
#mail-new-message-list {
margin-top: 36px;
}
#mail_new_message {
width: 92%;
width: 100%;
padding: 10px;
padding-left: 34px;
margin: 10px 10px 0;
background-position: 10px center;
text-align: left;
margin: 0;
}

.message-composer {
Expand Down Expand Up @@ -629,20 +631,49 @@ input.submit-message,
.mail-message-attachments {
margin-bottom: 20px;
}
.mail-message-attachment {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.mail-message-attachments .attachments > div {
position: relative;
display: inline-block;
border: 1px solid #f5f5f5;
margin: 5px;
padding: 6px;
}
.mail-message-attachment-image {
margin-bottom: 32px;
.mail-message-attachments .attachments > div:hover,
.mail-message-attachments .attachments > div span:hover {
background-color: #f8f8f8;
cursor: pointer;
}
@media only screen and (max-width: 768px) {
.mail-message-attachments .attachments > div {
width: calc(100% - 5px);
}
}
@media only screen and (min-width: 769px) and (max-width: 1400px) {
.mail-message-attachments .attachments > div {
width: calc(50% - 10px);
}
}
@media only screen and (min-width: 1401px) {
.mail-message-attachments .attachments > div {
width: calc(33% - 12px);
}
}
.mail-message-attachments .mail-attached-image {
max-width: 100%;
max-height: 120px;
}
.attachment-save-to-cloud,
.attachment-download {
position: absolute;
height: 32px;
min-width: 32px;
float: left;
display: inline-block;
width: 32px;
bottom: 3px;
}
.attachment-save-to-cloud {
right: 3px;
}
.attachment-download {
right: 41px;
}
/* show icon + text for Download all button
as well as when there is only one attachment */
Expand All @@ -653,6 +684,14 @@ input.submit-message,
background-position: 9px center;
padding-left: 32px;
}
.attachment-name {
display: inline-block;
width: calc(100% - 110px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
/* show attachment size less prominent */
.attachment-size {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
Expand Down
3 changes: 3 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define(function(require) {
var Marionette = require('marionette');
var OC = require('OC');
var AppView = require('views/app');
var Cache = require('cache');
var Radio = require('radio');
var Router = require('router');
var AccountController = require('controller/accountcontroller');
Expand All @@ -37,6 +38,7 @@ define(function(require) {
require('controller/foldercontroller');
require('controller/messagecontroller');
require('service/accountservice');
require('service/attachmentservice');
require('service/folderservice');
require('service/messageservice');
require('notification');
Expand Down Expand Up @@ -76,6 +78,7 @@ define(function(require) {

Mail.on('start', function() {
this.view = new AppView();
Cache.init();

Radio.ui.trigger('content:loading');

Expand Down
19 changes: 18 additions & 1 deletion js/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* later. See the COPYING file.
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @copyright Christoph Wurst 2015
* @copyright Christoph Wurst 2015, 2016
*/

define(function(require) {
Expand Down Expand Up @@ -61,6 +61,22 @@ define(function(require) {
}
};

function init() {
console.log('initializing cache…');
var installedVersion = $('#config-installed-version').val();
if (storage.isSet('mail-app-version')) {
var cachedVersion = storage.get('mail-app-version');
if (cachedVersion !== installedVersion) {
console.log('clearing cache because app version has changed');
storage.removeAll();
}
} else {
// Could be an old version -> clear data
storage.removeAll();
}
storage.set('mail-app-version', installedVersion);
}

/**
* @param {AccountsCollection} accounts
* @returns {undefined}
Expand Down Expand Up @@ -221,6 +237,7 @@ define(function(require) {
}

return {
init: init,
cleanUp: cleanUp,
getMessage: getMessage,
addMessage: addMessage,
Expand Down
Loading

0 comments on commit 3c49bd2

Please sign in to comment.