Add file upload indicator

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-14 10:27:20 +02:00
parent 581fa011e3
commit 48c622d19e
3 changed files with 9 additions and 3 deletions

View File

@@ -781,6 +781,9 @@ input.input-inline {
} }
} }
.icon-upload.icon-loading-small {
background-image: none;
}
.card-attachments { .card-attachments {
ul { ul {
li.attachment { li.attachment {

View File

@@ -24,6 +24,7 @@ import app from './App.js';
/* global Snap */ /* global Snap */
app.run(function ($document, $rootScope, $transitions, BoardService) { app.run(function ($document, $rootScope, $transitions, BoardService) {
'use strict'; 'use strict';
$document.click(function (event) { $document.click(function (event) {
$rootScope.$broadcast('documentClicked', event); $rootScope.$broadcast('documentClicked', event);
}); });

View File

@@ -89,7 +89,7 @@
<div class="section-header"> <div class="section-header">
<h4><?php p($l->t('Attachments')); ?></h4> <h4><?php p($l->t('Attachments')); ?></h4>
<label for="attachment-upload" class="button icon-upload"></label> <label for="attachment-upload" class="button icon-upload" ng-class="{'icon-loading-small': uploader.isUploading}"></label>
<input id="attachment-upload" type="file" nv-file-select="" uploader="uploader" class="hidden" options="{cardId: cardservice.getCurrent().id}" /> <input id="attachment-upload" type="file" nv-file-select="" uploader="uploader" class="hidden" options="{cardId: cardservice.getCurrent().id}" />
</div> </div>
<div class="section-content card-attachments" ng-if="cardservice.getCurrent() && isArray(cardservice.getCurrent().attachments)"> <div class="section-content card-attachments" ng-if="cardservice.getCurrent() && isArray(cardservice.getCurrent().attachments)">
@@ -104,6 +104,8 @@
</div> </div>
<span class="filesize">{{ attachment.extendedData.filesize | bytes }}</span> <span class="filesize">{{ attachment.extendedData.filesize | bytes }}</span>
<span class="filedate">{{ attachment.createdAt|relativeDateFilter }}</span> <span class="filedate">{{ attachment.createdAt|relativeDateFilter }}</span>
<span class="filedate">{{ attachment.lastModified|relativeDateFilter }}</span>
<span class="filedate">{{ attachment.createdBy }}</span>
</a> </a>
</div> </div>
<button class="icon icon-history button-inline" ng-click="cardservice.attachmentRemoveUndo(attachment)" ng-if="attachment.deletedAt > 0" title="<?php p($l->t('Undo file deletion - Otherwise the file will be deleted during the next cronjob run.')); ?>"> <button class="icon icon-history button-inline" ng-click="cardservice.attachmentRemoveUndo(attachment)" ng-if="attachment.deletedAt > 0" title="<?php p($l->t('Undo file deletion - Otherwise the file will be deleted during the next cronjob run.')); ?>">