77 {% if options .uploadConfig .saveOriginal %}
88 {{ form_widget(form [options .uploadConfig .saveOriginal ])}}
99 {% endif %}
10-
10+
1111 <div class =" field-error clearfix hidden" >
1212 <div id =" {{form [name ].vars.id }}_widget_error" class =" alert alert-danger span6" >
1313 </div >
2323 {% if form [name ].vars.value %}
2424 <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' : ' ' }}" />
2525 {% else %}
26- <img src =" holder.js/{{ options .cropConfig .minWidth }}x{{ options .cropConfig .minHeight }}" id =" {{ form [name ].vars.id }}_preview" />
26+ <img data- src =" holder.js/{{ options .cropConfig .minWidth }}x{{ options .cropConfig .minHeight }}" id =" {{ form [name ].vars.id }}_preview" />
2727 {% endif %}
2828 {% else %}
2929 {% if form [name ].vars.value %}
3030 <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' : ' ' }}" />
3131 {% else %}
32- <img src =" holder.js/{{ options .fieldImage .maxWidth }}x{{ options .fieldImage .maxHeight }}" id =" {{ form [name ].vars.id }}_preview" />
32+ <img data- src =" holder.js/{{ options .fieldImage .maxWidth }}x{{ options .fieldImage .maxHeight }}" id =" {{ form [name ].vars.id }}_preview" />
3333 {% endif %}
3434 {% endif %}
35-
35+
3636 </div >
3737 </div >
3838 {% endspaceless %}
3939
4040 <script >
4141 $ (document ).ready (function (){
42+ Holder .run ();
4243 {% if options .uploadConfig .saveOriginal % }
4344 if ($ (' #{{ form[options.uploadConfig.saveOriginal].vars.id }}' ).val ()){
4445 $ (' #{{ form[name].vars.id }}_preview' ).click (function (e ){
5051 });
5152 }
5253 {% endif % }
53- $ (' #image_preview_{{ form[name].vars.id }}.select-image-button .image_edit_button' ).click (function (event ){
54+ $ (' #image_preview_{{ form[name].vars.id }}.select-image-button .image_edit_button' ).click (function (event ){
5455 var options = $ .parseJSON (' {{ options | json_encode() | raw }}' );
5556 {% if options .uploadConfig .saveOriginal % }
5657 options[' originalImageFieldId' ] = ' {{ form[options.uploadConfig.saveOriginal].vars.id }}' ;
7778 {# trans_default_domain 'ComurImageBundle' #}
7879
7980 {% spaceless %}
80-
81+
8182 <div class =" field-error clearfix hidden" >
8283 <div id =" {{form [name ].vars.id }}_widget_error" class =" alert alert-danger span6" >
8384 </div >
106107 $ (document ).ready (function (){
107108 rebindGalleryRemove ();
108109 galleries[' {{form[name].vars.id}}' ] = true ;
109- $ (' .image_add_button' ).click (function (event ){
110+ $ (' .image_add_button' ).click (function (event ){
110111 initializeImageManager (' {{ form[name].vars.id }}' , $ .parseJSON (' {{ options | json_encode() | raw }}' ));
111112 $ (' #image_upload_modal' ).modal (' show' );
112113 });
120121 });
121122
122123 </script >
123- {% endblock %}
124+ {% endblock %}
0 commit comments