Selaa lähdekoodia

发布界面缩略图

huangct 8 vuotta sitten
vanhempi
commit
b3919bc7a1

+ 33 - 5
jpress-web-admin/src/main/webapp/WEB-INF/admin/content/_edit_include.html

@@ -277,14 +277,14 @@
 	.coverContentUas .chooseImg .showImg {
 		margin-top: 32px;
 		float: left;
-		width: 150px;
-		height: 150px;
+		/*width: 150px;*/
+		/*height: 150px;*/
 		overflow: hidden;
 		border: 1px solid #aaacad;
 	}
 	.coverContentUas .chooseImg .showImg  img{
-		max-width: 150px;
-		max-height: 150px;
+		/*width: 150px;*/
+		/*height: 150px;*/
 	}
 	.copyright h5{
 		margin: 5px 0;
@@ -293,7 +293,35 @@
 		width: 930px;
 		height: 30px;
 	}
+	.thumbnail-height {
+		width: 150px;
+		opacity: 1;
+		overflow: hidden;
+	}
+	.thumbnail-news {
+		width: 150px;
+		height: 150px;
+		opacity: 0;
+		overflow: hidden;
+	}
 </style>
+<script type="text/javascript" src="${CTPATH}/assets/js/jquery.min.js"></script>
+<script>
+	jQuery(document).ready(function() {
+		var thumbnails = $(".content-thumbnail");
+		$.each(thumbnails, function(k, v) {
+			var me = $(v);
+			var width = me.width(), height = me.height();
+			if(width/height > 1) {
+				me.parent().addClass("thumbnail-height");
+				me.parent().removeClass("thumbnail-news");
+			} else {
+				me.parent().addClass("thumbnail-width");
+				me.parent().removeClass("thumbnail-news");
+			}
+		});
+	});
+</script>
 <#if module ?? && module.name=="uuhelper">
 	<!-- 软文发布界面 -->
     <section class="content-header">
@@ -408,7 +436,7 @@
 								<span class="inputUas" onclick="doSelectThumbnail()"><em>从图库选择</em><!--<input type="file">--></span>
 							</div>
 							<div class="showImg">
-								<img src="${(content.thumbnail)!CPATH+'/static/jpress/admin/image/nothumbnail.jpg'}" id="thumbnail" class="jp-content-thumbnail"/>
+								<img src="${(content.thumbnail)!CPATH+'/static/jpress/admin/image/nothumbnail.jpg'}" id="thumbnail" class="jp-content-thumbnail content-thumbnail"/>
 							</div>
 						</div>
 						<div class="detailUas">

+ 2 - 2
jpress-web-admin/src/main/webapp/WEB-INF/admin/content/_index_include.html

@@ -74,11 +74,11 @@
 						<thead>
 						<tr>
 							<th width="20"><input type="checkbox"></th>
-							<th width="300">标题</th>
+							<th width="240">标题</th>
 							<th width="135">日期</th>
 							<th width="110">作者</th>
 							<th width="110">版权</th>
-							<th width="110">类别</th>
+							<th width="120">类别</th>
 							<th width="100">留言条数</th>
 						</tr>
 						</thead>