fix #914
parent
353542c53b
commit
14cbc30848
|
@ -95,11 +95,6 @@ AttachmentsDirective = ($repo, $rs, $confirm) ->
|
|||
.prop("title", "show deprecated attachments") # TODO: i18n
|
||||
$el.find("div.single-attachment.deprecated").addClass("hidden")
|
||||
|
||||
## Add Attachments
|
||||
$el.on "click", "a.add-attach", ->
|
||||
event.preventDefault()
|
||||
angular.element("input.add-attach").trigger("click")
|
||||
|
||||
$el.on "change", "input.add-attach", ->
|
||||
files = _.map(event.target.files, (x) -> x)
|
||||
return if files.length < 1
|
||||
|
|
|
@ -7,9 +7,9 @@ section.attachments(tg-attachments, ng-model=attachModel, ng-if="#{attachModel}.
|
|||
span.icon.icon-attachments
|
||||
span.attachments-num 0
|
||||
span.attachments-text attachments
|
||||
a.button.button-gray.add-attach(tg-check-permission, permission="modify_"+permissionSuffix, href="", title="Add new attachment")
|
||||
div.button.button-gray.add-attach(tg-check-permission, permission="modify_"+permissionSuffix, title="Add new attachment")
|
||||
span +new file
|
||||
input.hidden.add-attach(type="file", multiple="multiple")
|
||||
input.add-attach(type="file", multiple="multiple")
|
||||
|
||||
div.attachment-body.sortable
|
||||
div.hidden.single-attachment(ng-repeat="attach in attachments",
|
||||
|
|
|
@ -157,3 +157,17 @@
|
|||
background: lighten($green-taiga, 60%);
|
||||
}
|
||||
}
|
||||
|
||||
.add-attach {
|
||||
position: relative;
|
||||
input {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue