Selaa lähdekoodia

#1 - Image uploader in comments.

AntonLV 13 vuotta sitten
vanhempi
sitoutus
39853cb2a7
2 muutettua tiedostoa jossa 8 lisäystä ja 3 poistoa
  1. 2 2
      template/comments_uploader_nfw.html
  2. 6 1
      template/css/cmts.css

+ 2 - 2
template/comments_uploader_nfw.html

@@ -1,6 +1,6 @@
 <div id="bx-uploader-file-{file_id}" class="cmts-uploader-file bx-def-margin-sec-top bx-def-margin-sec-left-auto">
-    <div class="cmts-uploader-file-preview bx-def-border">
-        <img src="{file_icon}" />
+    <div class="cmts-uploader-file-preview bx-def-thumb">
+    	<img src="<bx_image_url:spacer.gif />" style="background-image:url({file_icon})" />
     </div>
     <div class="cmts-uploader-file-actions bx-def-margin-thd-top bx-clearfix">
     	<a class="bx-btn bx-btn-small" href="javascript:void(0);" onclick="{js_instance_name}.deleteGhost('{file_id}')"><bx_text:_Delete /></a>

+ 6 - 1
template/css/cmts.css

@@ -238,7 +238,12 @@
 		position: relative;
     	float: left;
     }
-    div.cmts-uploader-file-preview {
+    div.cmts-uploader-file-preview,
+    div.cmts-uploader-file-preview img {
 		width: 100px;
     	height: 100px;
+    }
+    div.cmts-uploader-file-preview img {
+		background-position: center center;
+		background-repeat: no-repeat;
     }