mirror of
https://github.com/moparisthebest/mail
synced 2024-12-22 23:38:48 -05:00
Use wo-click-file-input directive for attachment input as well
This commit is contained in:
parent
ac7af7168b
commit
6668174852
@ -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;
|
module.exports = WriteCtrl;
|
@ -48,7 +48,7 @@
|
|||||||
<div class="write__subject">
|
<div class="write__subject">
|
||||||
<input class="input-text" ng-model="subject" spellcheck="true" tabindex="2" placeholder="Subject" ng-change="updatePreview()">
|
<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>
|
<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>
|
<svg><use xlink:href="#icon-attachment" /><title>Add attachment</title></svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user