Attachment: add focus style so that it gets highlighted when tabbing through inputs
- also, usability: use a <label> for “select attachment…” and connect it to the <input type=“file”>
This commit is contained in:
parent
23dd56feb1
commit
7d5d2626c2
3 changed files with 17 additions and 6 deletions
|
@ -2,8 +2,11 @@
|
|||
<div class="article-attachment">
|
||||
<div class="attachmentPlaceholder">
|
||||
<span class="attachmentPlaceholder-inputHolder fileUpload">
|
||||
<%- @T('select attachment...') %>
|
||||
<input multiple="multiple" type="file" name="file" style="">
|
||||
<% uid = _.uniqueId('fileUpload_') %>
|
||||
<input multiple="multiple" type="file" name="file" id="<%- uid %>">
|
||||
<label class="attachmentPlaceholder-label" for="<%- uid %>">
|
||||
<%- @T('select attachment...') %>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="attachmentUpload hide">
|
||||
|
|
|
@ -69,9 +69,12 @@
|
|||
<div class="article-attachment">
|
||||
<div class="attachmentPlaceholder">
|
||||
<span class="attachmentPlaceholder-hint"><%- @T('Enter Answer or') %></span>
|
||||
<span class="attachmentPlaceholder-inputHolder">
|
||||
<%- @T('select attachment...') %>
|
||||
<input multiple="multiple" type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;">
|
||||
<span class="attachmentPlaceholder-inputHolder fileUpload">
|
||||
<% uid = _.uniqueId('fileUpload_') %>
|
||||
<input multiple="multiple" type="file" name="file" id="<%- uid %>">
|
||||
<label class="attachmentPlaceholder-label" for="<%- uid %>">
|
||||
<%- @T('select attachment...') %>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="attachmentUpload hide">
|
||||
|
|
|
@ -1358,7 +1358,8 @@ label,
|
|||
.inline-label,
|
||||
.label-success,
|
||||
.label-warning,
|
||||
.label-danger {
|
||||
.label-danger,
|
||||
.fileUpload label {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
text-align: inherit;
|
||||
|
@ -7378,6 +7379,10 @@ label + .wizard-buttonList {
|
|||
padding: 0;
|
||||
@extend %clickable;
|
||||
opacity: 0;
|
||||
|
||||
&:focus + label {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.imagePreview img {
|
||||
|
|
Loading…
Reference in a new issue