This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show attachments as blocks instead of list to allow enhanced actions
- Loading branch information
1 parent
edeca8a
commit a7497c4
Showing
8 changed files
with
164 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{#if isImage}} | ||
<img class="mail-attached-image" src="{{downloadUrl}}"> | ||
<br> | ||
{{/if}} | ||
<img class="attachment-icon" src="{{mimeUrl}}" /> | ||
<span class="attachment-name">{{fileName}} <span class="attachment-size">({{humanFileSize size}})</span></span> | ||
<a class="button icon-download attachment-download" href="{{downloadUrl}}" title="{{ t 'Download attachment' }}"></a> | ||
<button class="icon-folder attachment-save-to-cloud" title="{{ t 'Save to Files' }}"></button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<div class="attachments"> | ||
|
||
</div> | ||
<p> | ||
<button data-message-id="{{id}}" class="icon-folder attachments-save-to-cloud">{{ t 'Save all to Files' }}</button> | ||
</p> | ||
|
||
<!-- {{#if attachment}} | ||
<ul> | ||
<li class="mail-message-attachment mail-message-attachment-single" data-message-id="{{attachment.messageId}}" data-attachment-id="{{attachment.id}}" data-attachment-mime="{{attachment.mime}}"> | ||
{{#if attachment.isImage}} | ||
<img class="mail-attached-image" src="{{attachment.downloadUrl}}"> | ||
<br> | ||
{{/if}} | ||
<img class="attachment-icon" src="{{attachment.mimeUrl}}" /> | ||
{{attachment.fileName}} <span class="attachment-size">({{humanFileSize attachment.size}})</span><br/> | ||
<a class="button icon-download attachment-download" href="{{attachment.downloadUrl}}">{{ t 'Download attachment' }}</a> | ||
<button class="icon-folder attachment-save-to-cloud">{{ t 'Save to Files' }}</button> | ||
</li> | ||
</ul> | ||
{{/if}} | ||
{{#if attachments}} | ||
<ul> | ||
{{#each attachments}} | ||
<li class="mail-message-attachment {{#if isImage}}mail-message-attachment-image{{/if}}" data-message-id="{{messageId}}" data-attachment-id="{{id}}" data-attachment-mime="{{mime}}"> | ||
{{#if isImage}} | ||
<img class="mail-attached-image" src="{{downloadUrl}}"> | ||
<br> | ||
{{/if}} | ||
<a class="button icon-download attachment-download" href="{{downloadUrl}}" title="{{ t 'Download attachment' }}"></a> | ||
<button class="icon-folder attachment-save-to-cloud" title="{{ t 'Save to Files' }}"></button> | ||
<img class="attachment-icon" src="{{mimeUrl}}" /> | ||
{{fileName}} <span class="attachment-size">({{humanFileSize size}})</span> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
<p> | ||
<button data-message-id="{{id}}" class="icon-folder attachments-save-to-cloud">{{ t 'Save all to Files' }}</button> | ||
</p> | ||
{{/if}} --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> | ||
* | ||
* ownCloud - Mail | ||
* | ||
* This code is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License, version 3, | ||
* as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License, version 3, | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* | ||
*/ | ||
|
||
define(function(require) { | ||
'use strict'; | ||
|
||
var Handlebars = require('handlebars'); | ||
var Marionette = require('marionette'); | ||
var MessageAttachmentTemplate = require('text!templates/message-attachment.html'); | ||
|
||
/** | ||
* @class MessageAttachmentView | ||
*/ | ||
var MessageAttachmentView = Marionette.ItemView.extend({ | ||
template: Handlebars.compile(MessageAttachmentTemplate) | ||
}); | ||
|
||
return MessageAttachmentView; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> | ||
* | ||
* ownCloud - Mail | ||
* | ||
* This code is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License, version 3, | ||
* as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License, version 3, | ||
* along with this program. If not, see <http://www.gnu.org/licenses/> | ||
* | ||
*/ | ||
|
||
define(function(require) { | ||
'use strict'; | ||
|
||
var Handlebars = require('handlebars'); | ||
var Marionette = require('marionette'); | ||
var AttachmentView = require('views/messageattachment'); | ||
var AttachmentsTemplate = require('text!templates/message-attachments.html'); | ||
|
||
/** | ||
* | ||
* @type MessageAttachmentsView | ||
*/ | ||
var MessageAttachmentsView = Marionette.CompositeView.extend({ | ||
/** | ||
* @lends Marionette.CompositeView | ||
*/ | ||
template: Handlebars.compile(AttachmentsTemplate), | ||
childView: AttachmentView, | ||
childViewContainer: '.attachments', | ||
initialize: function(options) { | ||
console.log(arguments); | ||
} | ||
}); | ||
|
||
return MessageAttachmentsView; | ||
}); |