Skip to content

Commit

Permalink
Merge branch 'master' into 1.0
Browse files Browse the repository at this point in the history
Conflicts:
	Resources/views/Form/fields.html.twig
  • Loading branch information
comur committed Apr 1, 2015
2 parents 55255af + a313e64 commit c8c4957
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Resources/views/Form/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
{% if form[name].vars.value %}
<img src="/{{ options.uploadConfig.webDir ~ '/' ~ form[name].vars.value }}?{{ 'now' | date('U') }}" id="{{ form[name].vars.id }}_preview" style="{{ options.uploadConfig.saveOriginal ? 'cursor:hand; cursor: pointer' : ''}}"/>
{% else %}
<img src="holder.js/{{ options.cropConfig.minWidth }}x{{ options.cropConfig.minHeight}}" id="{{ form[name].vars.id }}_preview"/>
<img data-src="holder.js/{{ options.cropConfig.minWidth }}x{{ options.cropConfig.minHeight}}" id="{{ form[name].vars.id }}_preview"/>
{% endif %}
{% else %}
{% if form[name].vars.value %}
<img src="/{{ (options.uploadConfig.webDir ~ '/' ~ form[name].vars.value)|thumb(options.fieldImage.maxWidth, options.fieldImage.maxHeight) }}?{{ 'now' | date('U') }}" id="{{ form[name].vars.id }}_preview" style="{{ options.uploadConfig.saveOriginal ? 'cursor:hand; cursor: pointer' : ''}}"/>
{% else %}
<img src="holder.js/{{ options.fieldImage.maxWidth }}x{{ options.fieldImage.maxHeight}}" id="{{ form[name].vars.id }}_preview"/>
<img data-src="holder.js/{{ options.fieldImage.maxWidth }}x{{ options.fieldImage.maxHeight}}" id="{{ form[name].vars.id }}_preview"/>
{% endif %}
{% endif %}

Expand All @@ -39,6 +39,7 @@

<script>
$(document).ready(function(){
Holder.run();
{% if options.uploadConfig.saveOriginal %}
if($('#{{ form[options.uploadConfig.saveOriginal].vars.id }}').val()){
$('#{{ form[name].vars.id }}_preview').click(function(e){
Expand Down

0 comments on commit c8c4957

Please sign in to comment.