Browse Source

UU助手后台软文发布系统发送信息页面

hangb 8 years ago
parent
commit
6c7a6db4ce

+ 43 - 21
jpress-web-admin/src/main/webapp/WEB-INF/admin/content/_edit_include.html

@@ -277,14 +277,18 @@
 	.coverContentUas .chooseImg .showImg {
 	.coverContentUas .chooseImg .showImg {
 		margin-top: 32px;
 		margin-top: 32px;
 		float: left;
 		float: left;
-		/*width: 150px;*/
-		/*height: 150px;*/
+		width: 200px;
+		height: 170px;
+		line-height: 170px;
+		text-align: center;
 		overflow: hidden;
 		overflow: hidden;
 		border: 1px solid #aaacad;
 		border: 1px solid #aaacad;
 	}
 	}
 	.coverContentUas .chooseImg .showImg  img{
 	.coverContentUas .chooseImg .showImg  img{
-		/*width: 150px;*/
-		/*height: 150px;*/
+		/*max-width: 200px;*/
+		/*max-height: 170px;*/
+		width: 200px;
+		height: 170px;
 	}
 	}
 	.copyright h5{
 	.copyright h5{
 		margin: 5px 0;
 		margin: 5px 0;
@@ -293,33 +297,52 @@
 		width: 930px;
 		width: 930px;
 		height: 30px;
 		height: 30px;
 	}
 	}
+	/*控制图片大小*/
+	.thumbnail-width {
+		height: 100px;
+		opacity: 1;
+		overflow: hidden;
+	}
 	.thumbnail-height {
 	.thumbnail-height {
-		width: 150px;
+		width: 160px;
 		opacity: 1;
 		opacity: 1;
 		overflow: hidden;
 		overflow: hidden;
 	}
 	}
 	.thumbnail-news {
 	.thumbnail-news {
-		width: 150px;
-		height: 150px;
+		width: 160px;
+		height: 100px;
 		opacity: 0;
 		opacity: 0;
 		overflow: hidden;
 		overflow: hidden;
 	}
 	}
 </style>
 </style>
 <script type="text/javascript" src="${CTPATH}/assets/js/jquery.min.js"></script>
 <script type="text/javascript" src="${CTPATH}/assets/js/jquery.min.js"></script>
 <script>
 <script>
+//	控制图片大小
 	jQuery(document).ready(function() {
 	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");
-			}
-		});
+//		var thumbnails = $(".content-thumbnail");
+//		$.each(thumbnails, function(k, v) {
+//			var me = $(v);
+//			var width = me.width(), height = me.height();
+//			if(width/height > 16/10) {
+//				me.parent().addClass("thumbnail-height");
+//				me.parent().removeClass("thumbnail-news");
+//			} else {
+//				me.parent().addClass("thumbnail-width");
+//				me.parent().removeClass("thumbnail-news");
+//			}
+//		});
+//		function validImg (ele) {
+//			var file = ele.value;
+//			var image = new Image();
+//			image.src = file;
+//			var filesize = image.filesize;
+//			if (filesize>51200) {
+//				alert ('图片大小不能超过50KB');
+//				return false;
+//			}else{
+//				return true;
+//			}
+//		}
 	});
 	});
 </script>
 </script>
 <#if module ?? && module.name=="uuhelper">
 <#if module ?? && module.name=="uuhelper">
@@ -413,7 +436,6 @@
 													<span><em></em></span>
 													<span><em></em></span>
 												</span>
 												</span>
 											</#if>
 											</#if>
-
 										</p>
 										</p>
 									</div>
 									</div>
 								</div>
 								</div>
@@ -433,7 +455,7 @@
 							<div class="choose">
 							<div class="choose">
 								<p>封面</p>
 								<p>封面</p>
 								<input type="hidden" name="content.thumbnail" value="${(content.thumbnail)!}" id="content_thumbnail">
 								<input type="hidden" name="content.thumbnail" value="${(content.thumbnail)!}" id="content_thumbnail">
-								<span class="inputUas" onclick="doSelectThumbnail()"><em>从图库选择</em><!--<input type="file">--></span>
+								<span class="inputUas" onclick="doSelectThumbnail()" onchange="Javascript:validImg(this);"><em>从图库选择</em><!--<input type="file">--></span>
 							</div>
 							</div>
 							<div class="showImg">
 							<div class="showImg">
 								<img src="${(content.thumbnail)!CPATH+'/static/jpress/admin/image/nothumbnail.jpg'}" id="thumbnail" class="jp-content-thumbnail content-thumbnail"/>
 								<img src="${(content.thumbnail)!CPATH+'/static/jpress/admin/image/nothumbnail.jpg'}" id="thumbnail" class="jp-content-thumbnail content-thumbnail"/>

+ 9 - 19
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_uuhelper.html

@@ -354,24 +354,14 @@
             LoadingDataFn();
             LoadingDataFn();
         });
         });
         //滚动加载方法
         //滚动加载方法
-//        $('.footer-section').scroll(function() {
-//            if (($(this)[0] + $(this).height() + 30) >= $(this)[0].scrollHeight) {
-//                console.log($(this)[0].scrollTop)
-//                clearTimeout(timers);
-//                timers = setTimeout(function() {
-//                    page++;
-//                    LoadingDataFn(); //调用执行上面的加载方法
-//                }, 300);
-//            }
-//        });
-    $(window).scroll(function() {
-        if (($(window).height() + $(window).scrollTop() + 60) >= $(document).height()) {
-            clearTimeout(timers);
-            timers = setTimeout(function() {
-                page++;
-                LoadingDataFn();
-            }, 300);
-        }
-    });
+        $(window).scroll(function() {
+            if (($(window).height() + $(window).scrollTop() + 60) >= $(document).height()) {
+                clearTimeout(timers);
+                timers = setTimeout(function() {
+                    page++;
+                    LoadingDataFn();
+                }, 300);
+            }
+        });
 </script>
 </script>
 </html>
 </html>