diff src/main/webapp/pages/home.jsp @ 95:b27a99201cbe

New feature: new full text search with MySQL ngram parser (5.7.6 above)
author Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
date Mon, 03 Jul 2017 23:48:53 +0200
parents fc5116de601f
children 2ac9b2e3fb57
line wrap: on
line diff
--- a/src/main/webapp/pages/home.jsp	Mon Jul 03 23:43:44 2017 +0200
+++ b/src/main/webapp/pages/home.jsp	Mon Jul 03 23:48:53 2017 +0200
@@ -12,16 +12,16 @@
 <head>
 <jsp:include page="../componentes/headContent.jsp" />
 <script>
-	
+
 		$(function() {
-			
-			
+
+
 			$( ".addSectionToTopic" ).click(function() {
 				var sectionId = $( this ).data('section-id');
 				console.log("addSectionToTopic. sectionId = " + sectionId);
-						
+
 				var url0 = "<%=sessionBean.getApplicationBean().getRootServer()%>/methods/addSectionToTopic.jsp?sectionId=" + sectionId + "&sourceBean=home";
-		
+
 				$.ajax( url0 )
 				.done(function(data) {
 					$( "#dialogAddSectionToTopicTable" ).replaceWith(data);
@@ -30,17 +30,17 @@
 			  	.fail(function() {
 			    	console.error("Error calling: " + query);
 			  	})
-					
+
 			});
-			
-			
+
+
 			var dialogAddSectionToTopic = $("#dialogAddSectionToTopic").dialog({
 				position: { my: "center", at: "top+400", of: window },	// TODO show dialog at cursor position?
 				autoOpen: false
-			});	  
-			
-			
-			
+			});
+
+
+
 			$("#level1Filter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -51,7 +51,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -65,8 +65,8 @@
 					});
 				},
 				minLength : 0
-			});	
-			
+			});
+
 			$("#level2Filter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -77,7 +77,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -91,9 +91,9 @@
 					});
 				},
 				minLength : 0
-			});	
-	
-		
+			});
+
+
 			$("#bookNameFilter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -104,7 +104,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -118,9 +118,9 @@
 					});
 				},
 				minLength : 0
-			});	
-			
-			
+			});
+
+
 			$("#dynastyFilter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -131,7 +131,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -145,8 +145,8 @@
 					});
 				},
 				minLength : 0
-			});	
-		
+			});
+
 			$("#periodFilter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -157,7 +157,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -171,8 +171,8 @@
 					});
 				},
 				minLength : 0
-			});	
-			
+			});
+
 			$("#adminTypeFilter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -183,7 +183,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -197,8 +197,8 @@
 					});
 				},
 				minLength : 0
-			});	
-			
+			});
+
 			$("#sectionNameFilter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -209,7 +209,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -223,8 +223,8 @@
 					});
 				},
 				minLength : 0
-			});	
-			
+			});
+
 			$("#labelFilter").autocomplete({
 				source : function(request, response) {
 					$.ajax({
@@ -235,7 +235,7 @@
 							term : request.term
 						},
 						success : function(data) {
-	
+
 							response($.map(data, function(item) {
 								return {
 									label : item.name,
@@ -249,34 +249,34 @@
 					});
 				},
 				minLength : 0
-			});	
-			
+			});
+
 		});
-		
-		
+
+
 		function updatePage() {
 			var text = getCookie();
-		    
+
 		    if (text == "1") {
 		        setCookie("0");
 		        setAction('forceReloadBranches', 'homeForm');
 
 		        document.forms['homeForm'].submit();
 		    }
-			
+
 		    setTimeout(updatePage, 1000);
 		}
 		updatePage();
-		
-		
-		
-		
+
+
+
+
 	</script>
 </head>
 
 <body>
 
-	<jsp:include page="../componentes/template.jsp" />
+	<jsp:include page="../componentes/template2.jsp" />
 
 	<div id="dialogAddSectionToTopic" title="Add Section(s) into Topic:">
 		<div id="dialogAddSectionToTopicTable"></div>
@@ -287,7 +287,7 @@
 		<%
 			if (sessionBean.getUser() == null) {
 		%>
-		<label class="subTitel">You must login!</label>
+        <label class="subTitel">Please login or create a new account above</label>
 		<%
 			} else {
 
@@ -301,7 +301,7 @@
 		<form name="homeForm" method="post"
 			action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp">
 			<input name="bean" type="hidden" value="homeBean" />
-			
+
 			<label class="subTitel">
 				<input type="image"
 					onclick="setAction('forceReloadBranches', 'homeForm');"
@@ -309,13 +309,13 @@
 							.getRefreshImage()%>"
 					width="20" height="20" />
 			</label>
-					
+
 			<% if (sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { %>
 				<label class="subTitel">You have no task!</label>
 			<% } else { %>
 
 			<div class="subTitel">
-				Your Tasks 
+				Your Tasks
 
 				<p class="label">
 					You have
@@ -334,7 +334,7 @@
 			<div class="tableDiv double-scroll">
 				<table class="pageTable">
 					<tr>
-						<!-- remove this to save space 
+						<!-- remove this to save space
 							<td>
 								<table class="sortTable">
 									<tr>
@@ -342,14 +342,14 @@
 										<td>
 											<table>
 												<tr><td>
-													<input type="image" 
+													<input type="image"
 														onclick="setAction('sortByBranchIdUp', 'homeForm');"
-														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
 												</td></tr>
 												<tr><td>
 													<input type="image"
 														onclick="setAction('sortByBranchIdDown', 'homeForm');"
-														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>
 												</td></tr>
 											</table>
 										</td>
@@ -793,9 +793,9 @@
 
 						<!-- Add to Topic -->
 						<td style="max-width: 300px;">
-							<!-- existing topic --> 
+							<!-- existing topic -->
 							<% if (branch.getSection().getTopicSectionRelation() != null && !branch.getSection().getTopicSectionRelation().isEmpty()) { %>
-							
+
 							<lable>Already in topic: </lable>
 							<table style="width: 100%">
 								<%
@@ -864,4 +864,4 @@
 		%>
 	</div>
 
-</body>
\ No newline at end of file
+</body>