Refactor html of new-attachments

stable
David Barragán Merino 2014-08-02 17:00:53 +02:00
parent d45477e6d5
commit c95c09ffea
3 changed files with 6 additions and 38 deletions

View File

@ -43,7 +43,7 @@ resourceProvider = ($rootScope, $urls, $model, $repo, $auth, $q) ->
file.status = "in-progress"
file.size = sizeFormat(evt.total)
file.progressMessage = "upload #{sizeFormat(evt.loaded)} of #{sizeFormat(evt.total)}"
file.progressPercent = Math.round((evt.loaded / evt.total) * 100)
file.progressPercent = "#{Math.round((evt.loaded / evt.total) * 100)}%"
uploadComplete = (evt) =>
$rootScope.$apply ->

View File

@ -16,47 +16,15 @@ section.attachments(tg-attachments, ng-model=attachModel)
tg-attachment="attach")
//- See modules/common/attachments.coffee - AttachmentDirective
//-
//- An attachment ('deprecated' class for deprecxated attachments)
//-div.single-attachment
//- div.attachment-name
//- a(href="", title="Attachment pefildeusuario.png") pefildeusuariopefuario.png
//- div.attachment-comment
//- span.attachment-size (42 B)
//- span A sort description
//- a.settings.icon.icon-edit(href="", "Edit")
//- a.settings.icon.icon-delete(href="", "Delete")
//- a.settings.icon.icon-drag-v(href="", "Drag")
//-
//- An edittable attachment ('deprecated' class for deprecxated attachments)
//-div.single-attachment
//- div.attachment-name
//- a(href="", title="Attachment pefildeusuario.png") pefildeusuariopefuario.png
//- div.editable.editable-attachment-comment
//- span.attachment-size (42 B)
//- input(type="text")
//- div.editable.editable-attachment-deprecated
//- label Deprecated?
//- input(type="checkbox")
//- a.editable.icon.icon-floppy(href="#", "Save")
//- a.editable.icon.icon-delete(href="#", "Cancel")
//- div.single-attachment(ng-repeat="file in uploadingFiles")
//- div.attachment-name
//- span
//- a(href="", title="{{ file.name }}") file.name
//- div.attachment-comment
//- span.attachment-size ({{ file.size }})
//- span(ng-if="file.progressMessage", style="color:#72a114; font-weight: bold;") {{ file.progressMessage }} | {{ file.progressPercent }}%
div.single-attachment(ng-repeat="file in uploadingFiles")
div.attachment-name
a(href="", title="{{ file.name }}") {{ file.name }}
a(href="", tg-bo-title="file.name", tg-bo-html="file.name")
div.attachment-size
span.attachment-size {{ file.size }}
span.attachment-size(tg-bo-html="file.size")
div.attachment-comments
span {{ file.progressMessage }}
div.percentage(style="width: {{ file.progressPercent }}%")
span(ng-bind="file.progressMessage")
div.percentage(ng-style="{'width': file.progressPercent}")
div.attachment-settings
a.hidden.more-attachments(href="", title="show deprecated atachments")

View File

@ -135,7 +135,7 @@
.percentage {
background: rgba($green-taiga, .1);
bottom: 0;
height: 55px;
height: 40px;
left: 0;
position: absolute;
top: 0;