Преглед изворни кода

#1 - Image uploader in comments.

AntonLV пре 13 година
родитељ
комит
5a459b79b0
3 измењених фајлова са 17 додато и 9 уклоњено
  1. 1 1
      template/comment.html
  2. 1 1
      template/comments_uploader_bs.html
  3. 15 7
      template/css/cmts.css

+ 1 - 1
template/comment.html

@@ -34,7 +34,7 @@
 				<div class="__style_prefix__-attached bx-def-margin-thd-topbottom bx-clearfix">
 					<bx_repeat:attached>
 						<div class="__style_prefix__-attached-preview bx-def-thumb bx-def-margin-sec-left-auto">
-							<img src="__image__" />
+							<img src="<bx_image_url:spacer.gif />" style="background-image:url(__image__)" />
 						</div>
 					</bx_repeat:attached>
 				</div>

+ 1 - 1
template/comments_uploader_bs.html

@@ -1,4 +1,4 @@
-    <a href="javascript:void(0);" onclick="__uploader_instance_name__.showUploaderForm();" class="bx-btn bx-btn-small bx-def-margin-sec-left cmts-uploader-button">
+    <a href="javascript:void(0);" onclick="__uploader_instance_name__.showUploaderForm();" class="bx-btn bx-btn-small bx-def-margin-sec-top bx-def-margin-sec-left cmts-uploader-button">
     	<i class="sys-icon __button_title__"></i>
     </a>
     <script>

+ 15 - 7
template/css/cmts.css

@@ -152,13 +152,19 @@
 		font-weight: bold;
     }
 
-    div.cmt-attached-preview {
-		position: relative;
-    	float: left;
-
+    div.cmt-attached-preview,
+    div.cmt-attached-preview img {
     	width: 100px;
     	height: 100px;
-    } 
+    }
+    div.cmt-attached-preview {
+    	position: relative;
+    	float: left;
+	}
+	div.cmt-attached-preview img {
+		background-position: center center;
+		background-repeat: no-repeat;
+	}
 
     /*--- Comment Actions ---*/
 	div.cmt-actions {
@@ -219,12 +225,14 @@
     form.cmt-post-reply .bx-form-input-submit {
     	text-transform: uppercase;
     }
+    form.cmt-post-reply div#bx-form-element-cmt_image,
     form.cmt-post-reply .bx-form-input-files-uploaders {
-		text-align: right;
+		margin-top: 0px;
     }
 
     a.cmts-uploader-button {
-		
+		position: absolute;
+    	right: 0px;
     }
     div.cmts-uploader-file {
 		position: relative;