Commit b654f20f authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Léger changements de styles et de templates.

Showing with 27 additions and 11 deletions
+27 -11
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
$this.find('.icon') $this.find('.icon')
.removeClass('fa-circle-o-notch fa-spin fa-file-o') .removeClass('fa-circle-o-notch fa-spin fa-file-o')
.addClass('fa-exclamation-triangle'); .addClass('fa-exclamation-triangle');
$this.find('.description').remove();
$this.find('.id').remove();
}, },
updateDisplay = function() { updateDisplay = function() {
var hasEntry = false; var hasEntry = false;
......
...@@ -4,18 +4,17 @@ All rights reserved. ...@@ -4,18 +4,17 @@ All rights reserved.
*/ */
@import "variables.less"; @import "variables.less";
@import "bootstrap/less/mixins.less";
.fileinput-entry { .fileinput-entry {
.cancel, .delete { & > * {
margin-left: 0.5em; margin: 0 0.2em;
} }
.description { .description {
display: inline; display: inline;
width: auto; width: auto;
height: auto; height: auto;
padding: @padding-xs-vertical @padding-xs-horizontal; padding: @padding-xs-vertical @padding-xs-horizontal;
margin: 0; //margin: 0;
} }
.progress { .progress {
height: (@line-height-computed / 2); height: (@line-height-computed / 2);
...@@ -24,9 +23,25 @@ All rights reserved. ...@@ -24,9 +23,25 @@ All rights reserved.
.progress-text { .progress-text {
float: right; float: right;
} }
.error {
display: none;
}
.size {
&:before { content: '('; }
&:after { content: ')'; }
}
&.alert { &.alert {
padding: @padding-xs-vertical @padding-xs-horizontal; padding: @padding-xs-vertical @padding-xs-horizontal;
margin-bottom: 0; margin-bottom: 0;
.name:after {
content: " :";
}
.error {
display: inline;
}
.size, .description {
display: none;
}
} }
} }
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
{% block file_upload_progress_prototype %} {% block file_upload_progress_prototype %}
<div class="template-upload fileinput-entry"> <div class="template-upload fileinput-entry">
<div class="progress-text" style="display: none"></div> <div class="progress-text" style="display: none"></div>
<i class="fa fa-circle-o-notch fa-spin icon"></i>&nbsp;<span class="name"></span>&nbsp;(<span class="size"></span>) <i class="fa fa-circle-o-notch fa-spin icon"></i>&nbsp;<span class="name"></span>
<span class="error" style="display: none"></span> <span class="size"></span>
<span class="error"></span>
<a href="#" class="danger cancel" title="{% trans %}button.cancel{% endtrans %}"> <a href="#" class="danger cancel" title="{% trans %}button.cancel{% endtrans %}">
{{- irstea_icon('remove') -}} {{- irstea_icon('remove') -}}
</a> </a>
...@@ -19,12 +20,10 @@ ...@@ -19,12 +20,10 @@
<input class="id" type="hidden" name="{{ full_name }}{% if multiple %}[{{index|default('__index__')}}]{% endif %}[id]" value="{{ file.id|default }}"/> <input class="id" type="hidden" name="{{ full_name }}{% if multiple %}[{{index|default('__index__')}}]{% endif %}[id]" value="{{ file.id|default }}"/>
<i class="fa fa-file{% if file.icon|default(false) %}-{{ file.icon }}{% endif %}-o icon"></i>&nbsp;<span class="name"> <i class="fa fa-file{% if file.icon|default(false) %}-{{ file.icon }}{% endif %}-o icon"></i>&nbsp;<span class="name">
<a{% if file %} href="{{ path('file_upload_get_content', {id: file.id, token: csrf_token}) }}"{% endif %}>{{ file.name|default }}</a> <a{% if file %} href="{{ path('file_upload_get_content', {id: file.id, token: csrf_token}) }}"{% endif %}>{{ file.name|default }}</a>
</span> </span>
(<span class="size"> <span class="size">{{ file.size|default }}</span>
{{- file.size|default -}}
</span>)
<input class="form-control description" type="text" placeholder="{% trans %}form.file_upload.description.placeholder{% endtrans %}" name="{{ full_name }}{% if multiple %}[{{index|default('__index__')}}]{% endif %}[description]" value="{{ file.description|default }}"/> <input class="form-control description" type="text" placeholder="{% trans %}form.file_upload.description.placeholder{% endtrans %}" name="{{ full_name }}{% if multiple %}[{{index|default('__index__')}}]{% endif %}[description]" value="{{ file.description|default }}"/>
<span class="error danger" style="display: none">ERROR</span> <span class="error"></span>
<a href="#" class="danger delete {%- if disabled or read_only %} disabled{% endif -%}" title="{% trans %}button.delete{% endtrans %}"> <a href="#" class="danger delete {%- if disabled or read_only %} disabled{% endif -%}" title="{% trans %}button.delete{% endtrans %}">
{{- irstea_icon('remove') -}} {{- irstea_icon('remove') -}}
</a> </a>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment