1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-22 15:28:49 -05:00

Use wo-click-file-input directive for attachment input as well

This commit is contained in:
Tankred Hase 2014-11-29 13:03:09 +01:00
parent ac7af7168b
commit 6668174852
2 changed files with 1 additions and 10 deletions

View File

@ -491,13 +491,4 @@ ngModule.directive('attachmentInput', function() {
};
});
ngModule.directive('attachmentBtn', function() {
return function(scope, elm) {
elm.on('click touchstart', function(e) {
e.preventDefault();
document.querySelector('#attachment-input').click();
});
};
});
module.exports = WriteCtrl;

View File

@ -48,7 +48,7 @@
<div class="write__subject">
<input class="input-text" ng-model="subject" spellcheck="true" tabindex="2" placeholder="Subject" ng-change="updatePreview()">
<input id="attachment-input" type="file" multiple attachment-input>
<button class="btn" ng-class="{'btn--invalid': sendBtnSecure === false}" attachment-btn>
<button class="btn" ng-class="{'btn--invalid': sendBtnSecure === false}" wo-click-file-input="#attachment-input">
<svg><use xlink:href="#icon-attachment" /><title>Add attachment</title></svg>
</button>
</div>