Răsfoiți Sursa

修改企业社区

李广朋 9 ani în urmă
părinte
comite
73a5d5bde0

+ 2 - 2
core/src/web/staticres/js/entcommunity.js

@@ -262,9 +262,9 @@ mCommunity.prototype.init.prototype = mCommunity.prototype;
 
 function changeSearchBorder(){
 	var width=$("#query").css("width");
-	width=width.substr(0,width.indexOf("p"))-30+"px";
+	width=width.substr(0,width.indexOf("p"))-45+"px";
 	$("#immediately").css("width",width);
-	$("#immediately").css("margin-left",$("#query").offset().left+15);
+	$("#immediately").css("margin-left",$("#query").offset().left);
 }
 
 function viewcontent(n){

+ 40 - 5
core/src/web/templates/member/incmobile/index.html

@@ -52,7 +52,28 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
     });
 }	
 </script>
-
+	<style>
+			.immediately {
+		    position: absolute;
+		    display: none;
+		    z-index: 9999;
+		    border: 1px solid #B5B6BB;
+		    border-top: 0px;
+		    padding: 3px;
+		    background: #FFF;
+		}
+		 .immediately div:hover {
+		    cursor: pointer;
+		    background-color: #16A086;
+		    color: #FFF;
+		}
+		.immediately div {
+		        height: 30px;
+			    line-height: 30px;
+			    color: #000;
+			    text-align: center;
+		}
+	</style>
 	</head>
 <body class="index-bodybg">
 		<div class="main">
@@ -73,6 +94,8 @@ if(typeof(signature) != "undefined" && signature != null && signature.length ==
 							<span class="glyphicon glyphicon-camera input-after" id="camera"></span>
 							<span class="input-group-addon"><span onclick="$('#search').submit();" class="glyphicon glyphicon-search"></span></span>
              		</div>
+						<div id="immediately" class="immediately">
+						</div>
 					</form>
 			</div>
 		</div>
@@ -132,13 +155,25 @@ function getmpname(serverId){
         } 
     }); 
 }
+	function changeSearchBorder(){
+		var width=$("#query").css("width");
+		width=width.substr(0,width.indexOf("p"))+"px";
+		$("#immediately").css("width",width);
+	}
 $(function(){
-	$("#query").focus(function(){
-		$(".main").css("position","absolute").css("top","-130px");
+	changeSearchBorder();
+	$(window).resize(function(){
+			changeSearchBorder();
 	});
-	$("#query").blur(function(){
-		$(".main").css("position","").css("top","");
+	$("#query").focus(function(){
+		$(".main").css("margin-top","-130px");
 	});
+	$("#query").keyup(function(){
+			imFind(this);
+			if($("#immediately").children().length>0){
+				$("#immediately").show();
+			}
+		});
 });
 </script>
 

+ 1 - 0
core/src/web/templates/member/incmobile/list.html

@@ -284,6 +284,7 @@
 				}
 			});
 		}
+		
 		</script>
 
  </body>