changeset 54:a00efd5d9e77

new: adding delete saved table function
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 04 Feb 2016 11:30:46 +0100
parents db2088ac1f50
children 95bf4ac726e6
files src/main/java/de/mpiwg/gazetteer/utils/DBService.java src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java src/main/java/de/mpiwg/gazetteer/utils/FileManager.java src/main/java/de/mpiwg/web/jsp/ApplicationBean.java src/main/java/de/mpiwg/web/jsp/BooksPage.java src/main/java/de/mpiwg/web/jsp/FullTextSearchPage.java src/main/webapp/pages/branchPage.jsp src/main/webapp/pages/fullTextSearch.jsp src/main/webapp/pages/home.jsp src/main/webapp/pages/search.jsp src/main/webapp/pages/topicList.jsp src/main/webapp/pages/topicPage.jsp src/main/webapp/resources/images/view-on-map.png
diffstat 13 files changed, 188 insertions(+), 59 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/utils/DBService.java	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/java/de/mpiwg/gazetteer/utils/DBService.java	Thu Feb 04 11:30:46 2016 +0100
@@ -722,6 +722,21 @@
 		return modifiedFiles;
 	}
 	
+	protected static int deleteFullTextSearchFileFromDB(Long fileId){
+		int modifiedFiles = 0;
+		
+		Session session = HibernateUtil.getSessionFactory().getCurrentSession();
+		session.getTransaction().begin();
+		
+		Query query0 = session.createQuery("delete LGFullTextSearchFile where id = :fileId");
+		query0.setLong("fileId", fileId);
+		modifiedFiles = query0.executeUpdate();
+		
+		session.getTransaction().commit();
+		
+		return modifiedFiles;
+	}
+	
 	protected static int deleteFileFromDB(Long fileId){
 		
 		int modifiedFiles;
--- a/src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java	Thu Feb 04 11:30:46 2016 +0100
@@ -1,5 +1,6 @@
 package de.mpiwg.gazetteer.utils;
 
+import java.io.IOException;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -296,6 +297,21 @@
 	}
 
 	
+	
+	
+	public void deleteLGFullTextSearchFile(LGFullTextSearchFile file) throws IOException{
+		//deleting file from DB: the record in table FullTextSearchFile
+		int modifiedFiles = DBService.deleteFullTextSearchFileFromDB(file.getId());
+		
+		// delete the files from file system (html in ftsearch-data/... and csv in LGMap/datasets/) 
+		FileManager.deleteFullTextSearchFileCsv(file);
+		FileManager.deleteFullTextSearchFileHtml(file);
+		
+		// delete file from cache
+		this.getFullTextSearchFileMap().remove(file.getKey());
+		logger.debug("deleteLGFullTextSearchFile");
+	}
+	
 	public LGFullTextSearchFile saveLGFullTextSearchFile(List<DBContents> list, Long userId, LGFullTextSearchFile searchFile) throws Exception {	
 		// save as csv and html file in filesystem, and records in db `FullTextSearchFile
 		// List<DBContents> list is the filteredList of searching result with isRemoved field
--- a/src/main/java/de/mpiwg/gazetteer/utils/FileManager.java	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/java/de/mpiwg/gazetteer/utils/FileManager.java	Thu Feb 04 11:30:46 2016 +0100
@@ -4,6 +4,7 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.nio.file.Files;
+import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
@@ -246,6 +247,40 @@
 		return new String(encoded, "UTF8");
 		
 	}
+
+
+	
+	protected static void deleteFileFromFileSystemByAbsolutePath(String absolutePath) {
+		try{	
+    		File file = new File(absolutePath);
+        	
+    		if(file.delete()){
+    			System.out.println(file.getName() + " is deleted!");
+    		}else{
+    			System.out.println("Delete operation is failed.");
+    		}
+    	   
+    	}catch(Exception e){
+    		
+    		e.printStackTrace();
+    		
+    	}
+	}
+	
+	public static void deleteFullTextSearchFileCsv(LGFullTextSearchFile file) throws IOException {
+		// csv file is in LGMap/datasets/
+		String absolutePath = PropertiesUtils.getPropValue("lgmap_datasets") + "/" + file.getUserId() + "_" + file.getFileName() + ".csv";
+		
+		deleteFileFromFileSystemByAbsolutePath(absolutePath);
+	}
+
+
+	public static void deleteFullTextSearchFileHtml(LGFullTextSearchFile file) throws IOException {
+		// html file is in ftsearch-data/... 
+		String absolutePath = PropertiesUtils.getPropValue("ftsearch_root") + "/html/"  + file.getUserId().toString() + "/" + file.getFileName() + ".html";
+
+		deleteFileFromFileSystemByAbsolutePath(absolutePath);
+	}
 	
 	
 }
--- a/src/main/java/de/mpiwg/web/jsp/ApplicationBean.java	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/ApplicationBean.java	Thu Feb 04 11:30:46 2016 +0100
@@ -78,7 +78,9 @@
 		return value;
 	}
 	
-	
+	public String getViewOnMap() {
+		return getRootServer() + "/resources/images/view-on-map.png";
+	}
 	public String getOkImage(){
 		return getRootServer() + "/resources/images/ok.png";
 	}
--- a/src/main/java/de/mpiwg/web/jsp/BooksPage.java	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/BooksPage.java	Thu Feb 04 11:30:46 2016 +0100
@@ -89,13 +89,13 @@
 		for(DBBook book : this.completeBookList){
 			if(!this.filteredBookList.contains(book)){
 				
-				if( (StringUtils.isEmpty(dynastyFilter) || StringUtils.startsWith(book.getDynasty(), dynastyFilter)) &&
-					(StringUtils.isEmpty(level1Filter) || StringUtils.startsWith(book.getLevel1(), level1Filter)) &&
-					(StringUtils.isEmpty(level2Filter) || StringUtils.startsWith(book.getLevel2(), level2Filter)) &&
-					(StringUtils.isEmpty(periodFilter) || StringUtils.startsWith(book.getPeriod(), periodFilter)) &&
-					(StringUtils.isEmpty(editionFilter) || StringUtils.startsWith(book.getEdition(), editionFilter)) &&
-					(StringUtils.isEmpty(bookNameFilter) || StringUtils.startsWith(book.getName(), bookNameFilter)) &&
-					(StringUtils.isEmpty(adminTypeFilter) || StringUtils.startsWith(book.getAdmin_type(), adminTypeFilter))	
+				if( //(StringUtils.isEmpty(dynastyFilter) || StringUtils.startsWith(book.getDynasty(), dynastyFilter)) &&
+					(StringUtils.isEmpty(level1Filter) || StringUtils.contains(book.getLevel1(), level1Filter)) &&
+					(StringUtils.isEmpty(level2Filter) || StringUtils.contains(book.getLevel2(), level2Filter)) &&
+					(StringUtils.isEmpty(periodFilter) || StringUtils.contains(book.getPeriod(), periodFilter)) &&
+					(StringUtils.isEmpty(editionFilter) || StringUtils.contains(book.getEdition(), editionFilter)) &&
+					(StringUtils.isEmpty(bookNameFilter) || StringUtils.contains(book.getName(), bookNameFilter)) &&
+					(StringUtils.isEmpty(adminTypeFilter) || StringUtils.contains(book.getAdmin_type(), adminTypeFilter))	
 					){
 						String lastEditor = new String();
 						String editTime = new String();
@@ -104,8 +104,8 @@
 							editTime = book.getCurrentSectionVersion().getDate();
 						}
 						
-						if( (StringUtils.isEmpty(lastEditorFilter) || StringUtils.startsWith(lastEditor, lastEditorFilter)) &&
-							(StringUtils.isEmpty(editTimeFilter) || StringUtils.startsWith(editTime, editTimeFilter))
+						if( (StringUtils.isEmpty(lastEditorFilter) || StringUtils.contains(lastEditor, lastEditorFilter)) &&
+							(StringUtils.isEmpty(editTimeFilter) || StringUtils.contains(editTime, editTimeFilter))
 								
 							){
 								this.filteredBookList.add(book);
--- a/src/main/java/de/mpiwg/web/jsp/FullTextSearchPage.java	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/FullTextSearchPage.java	Thu Feb 04 11:30:46 2016 +0100
@@ -1,5 +1,6 @@
 package de.mpiwg.web.jsp;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -14,6 +15,8 @@
 import org.jsoup.nodes.Element;
 import org.jsoup.select.Elements;
 
+import de.mpiwg.gazetteer.bo.LGBranch;
+import de.mpiwg.gazetteer.bo.LGFile;
 import de.mpiwg.gazetteer.bo.LGFullTextSearchFile;
 import de.mpiwg.gazetteer.db.DBContents;
 import de.mpiwg.gazetteer.utils.DBService;
@@ -212,19 +215,32 @@
 			
 			// set FileList for the user
 			DataProvider.getInstance().setFullTextSearchFileMap(null);	// set fullTextSearchFileMap to null, to force reload
-			this.setFileList(DataProvider.getInstance().getSearchFileList4User(getSessionBean().getUser().getId()));						
+			this.setFileList(DataProvider.getInstance().getSearchFileList4User(getSessionBean().getUser().getId()));				
 		}
 
 	}
 	
-	public void deleteFile() {
-		// TODO delete the files from file system (html in ftsearch-data/... and csv in LGMap/datasets/) and the record in database table FullTextSearchFile
+	public void deleteFile() throws IOException {
+		
 		Long fileId = getLongParameter("fileId");
-		logger.debug("loading fileId=" + fileId);
+		logger.debug("deleting fileId=" + fileId);
 		
 		if(fileId != null){
+
+			LGFullTextSearchFile file = DataProvider.getInstance().getFullTextSearchFile(fileId);
+			if(file != null){
+				
+				DataProvider.getInstance().deleteLGFullTextSearchFile(file);
+				
+				// update FileList
+				DataProvider.getInstance().setFullTextSearchFileMap(null);	// set fullTextSearchFileMap to null, to force reload
+				this.setFileList(DataProvider.getInstance().getSearchFileList4User(getSessionBean().getUser().getId()));
+				
+				addMsg("The file " + file.getFileName() + " has been deleted.");
+			}	
 		
 		}
+
 	}
 	
 	public void loadFile() {
@@ -244,6 +260,7 @@
 					Element body = doc.body();
 		
 					this.setSearchTerm(body.getElementById("searchTerm").text());
+					this.setFileName(file.getFileName());
 					
 					Element pageTableBody = body.getElementsByTag("tbody").first();
 					
@@ -302,7 +319,6 @@
 					if (this.completeList != null ){
 						Collections.sort(this.completeList);
 						filter();
-						// TODO 
 						this.calSelectedContentInCompleteList();
 						
 					}
@@ -372,6 +388,7 @@
 		// update FileList
 		DataProvider.getInstance().setFullTextSearchFileMap(null);	// set fullTextSearchFileMap to null, to force reload
 		this.setFileList(DataProvider.getInstance().getSearchFileList4User(getSessionBean().getUser().getId()));
+		
 	}
 	
 	
--- a/src/main/webapp/pages/branchPage.jsp	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/webapp/pages/branchPage.jsp	Thu Feb 04 11:30:46 2016 +0100
@@ -314,13 +314,13 @@
 												<td>
 													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getFileText?fileId=<%=file.getId() %>"
 														target="_blank">
-														<img alt="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
+														<img title="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
 													</a>
 												</td>
 												<td>
 													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getTable4File?fileId=<%=file.getId() %>"
 														target="_blank">
-														<img alt="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
+														<img title="Show table" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
 													</a>												
 												</td>	
 												
@@ -328,7 +328,7 @@
 												<td>
 													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getTabDelimited4File?fileId=<%=file.getId() %>"
 														target="_blank">
-														<img alt="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
+														<img title="Show text" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
 													</a>												
 												</td>	
 														
@@ -344,7 +344,7 @@
 													<% } %>		
 												</td>												
 												<td>
-													<input type="image" 
+													<input type="image" title="Delete it"
 														onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> setAction0('deleteFile', 'filesForm', 'fileId', <%=file.getId() %>);" 
 														src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>
 												</td>
--- a/src/main/webapp/pages/fullTextSearch.jsp	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/webapp/pages/fullTextSearch.jsp	Thu Feb 04 11:30:46 2016 +0100
@@ -39,6 +39,9 @@
 				    value: $("#searchTerm").val()
 				}).appendTo('form[name="saveTableForm"]');
 				
+				if ($("#fileName").val() == "") {
+					$("#fileName").val($("#searchTerm").val());		// set the default table name to be the searched term if no fileName
+				}
 				
 				dialogSave.dialog( "open" );
 			});
@@ -47,6 +50,9 @@
 				{
 					autoOpen: false,
 					position: { my: "left+100px", at: "top", of: $("#viewSavedResult") },
+
+					//position: { my: "center", at: "top+150px", of: $("#viewSavedResult") },	// TODO
+					// width: "600px",
 				}
 		  	);
 			$("#viewSavedResult").button().on( "click", function() {
@@ -159,7 +165,7 @@
 					<table>
 						<tr>
 							<td>
-								<input id="fileName" name="fileName" type="text" placeholder="table name"/>
+								<input id="fileName" name="fileName" type="text" placeholder="table name" value="<%= sessionBean.getFullTextSearchPage().getFileName() %>"/>
 							</td>
 							<td>
 								<button onclick="setAction('save', 'saveTableForm'); document.getElementById('saveTableForm').submit();">Save</button> 
@@ -171,53 +177,89 @@
 			 	
 			</div>	
 			
-			<div id="dialogViewSavedResult" title="Saved Table List:">
-		
+			<div id="dialogViewSavedResult" title="Saved Table">
+				
+				<div class="label">Recent</div>		
+				<table class="pageTable">
+				
+					<% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getFileList() ){%>
+					<tr><td>
+						<%= aFile.getFileName() %>
+						
+							<button type="button" class="lgButton" onclick="setAction0('loadFile', 'fullTextSearchForm', 'fileId', <%=aFile.getId() %>); document.getElementById('fullTextSearchForm').submit();">load</button>	
+						
+							<!-- getFullTextSearchFileText?fileId= &userId= -->
+					
+							<!-- click searching result to open it in the same table of full-text-search result -->
+							<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getFullTextSearchHtmlFile?fileId=<%= aFile.getId() %>"
+										target="_blank">
+								<img title="Show text in html" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>	
+							</a>
+						
+				
+							<!-- view on LGMap -->
+							<a href="<%=sessionBean.getApplicationBean().getLGMapUrl() %>&file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv&name=<%=aFile.getSearchTerms() %>"
+										target="_blank">
+								<img title="View on LGMap" src="<%=sessionBean.getApplicationBean().getViewOnMap()%>"/>	
+							</a>
+						
+							<input type="image" title="Delete it"
+								onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> setAction0('deleteFile', 'fullTextSearchForm', 'fileId','<%=aFile.getId() %>'); document.getElementById('fullTextSearchForm').submit();" 
+								src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>
+						</td>
+					<tr>
+					<% } %>
+					</tr>
+				</table>
+				
+				<div class="label">Last Week</div>				
+				<div class="label">Last Month</div>
+				<div class="label">Older...</div>
+				
+				<!-- 
 				<table class="pageTable">
 					<tr>
 						<td class="tableTitle">Table name</td>
+						<td class="tableTitle"></td>
 						<td class="tableTitle">View html</td>
-						<td class="tableTitle"></td>
 						<td class="tableTitle">View on LGMap</td>
-						<!-- 
-						<td class="tableTitle">Delete(TODO?)</td>
-						-->
+						<td class="tableTitle">Delete</td>
 					</tr>
-					
+				
 					<% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getFileList() ){%>
 					<tr>
 						<td><%= aFile.getFileName() %></td>
-						<!-- getFullTextSearchFileText?fileId= &userId= -->
-						<td>
-							<!-- click searching result to open it in the same table of full-text-search result -->
-							<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getFullTextSearchHtmlFile?fileId=<%= aFile.getId() %>"
-										target="_blank">
-								<img alt="Show text in html" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>	
-							</a>
-						</td>
 						<td>
 							<button type="button" class="lgButton" onclick="setAction0('loadFile', 'fullTextSearchForm', 'fileId', <%=aFile.getId() %>); document.getElementById('fullTextSearchForm').submit();">load</button>	
 						</td>
+						
 						<td>
-							<!-- view on LGMap -->
+							
+							<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/getFullTextSearchHtmlFile?fileId=<%= aFile.getId() %>"
+										target="_blank">
+								<img title="Show text in html" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>	
+							</a>
+						</td>
+						
+						<td>
+							
 							<a href="<%=sessionBean.getApplicationBean().getLGMapUrl() %>&file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv&name=<%=aFile.getSearchTerms() %>"
 										target="_blank">
-								<img alt="View on LGMap" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>	
+								<img title="View on LGMap" src="<%=sessionBean.getApplicationBean().getViewOnMap()%>"/>	
 							</a>
 						</td>
-						<!-- 
+						
 						<td>
 							<input type="image" 
 								onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> setAction0('deleteFile', 'fullTextSearchForm', 'fileId','<%=aFile.getId() %>'); document.getElementById('fullTextSearchForm').submit();" 
 								src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>
-									
 						</td>
-						 -->
+						
 					</tr>
 					<% } %>
 					
 				</table>
-				
+				-->
 		
 			</div>	
 		<label class="subTitel">Full Text Search</label> 
@@ -241,6 +283,7 @@
 							id="searchTerm"
 							name="searchTerm"
 							type="text"
+							placeholder='if multiple terms, use "," to separate them.'
 							class="searchInput"
 							value="<%=sessionBean.getFullTextSearchPage().getSearchTerm()%>" />				
 					</td>
@@ -254,7 +297,7 @@
 		
 				</tr>
 				
-				<!-- TODO batching querying -->
+				<!-- batching querying -->
 				<!-- for batching, query keyword sets separated by ";" and within each keyword set, keywords separated by "," -->
 				<% if (StringUtils.equals(sessionBean.getUserName(), "zhong") || StringUtils.equals(sessionBean.getUserName(), "silk")) { %>
 				<tr>
@@ -263,6 +306,7 @@
 							id="batchSearchTerm"
 							name="batchSearchTerm"
 							type="text"
+							placeholder="(TODO plz Don't use this to search)"
 							class="searchInput"
 							value="<%=sessionBean.getFullTextSearchPage().getBatchSearchTerm() %>" />				
 					</td>
--- a/src/main/webapp/pages/home.jsp	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/webapp/pages/home.jsp	Thu Feb 04 11:30:46 2016 +0100
@@ -36,7 +36,7 @@
 		
 		
 		<% if(sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { %>
-			<label class="subTitel">You have no branch!</label>
+			<label class="subTitel">You have no task!</label>
 		<% } else { %>
 				
 			<form name="homeForm" method="post"
@@ -61,7 +61,7 @@
 							<td>
 								<table class="sortTable">
 									<tr>
-										<td><label class="tableTitle">Branch ID</label></td>
+										<td><label class="tableTitle">Task ID</label></td>
 										<td>
 											<table>
 												<tr><td>
@@ -462,7 +462,7 @@
 							<td><%=branch.getFomattedLastChange() %></td>
 							<td>
 								<a onclick="branchInExtractionInterface('<%=branch.getId() %>', '<%=branch.getCurrentLastFileId() %>', '<%=branch.getSectionId() %>', '<%=branch.getSection().getName() %>', '<%=branch.getBook().getId() %>', '<%=branch.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
-									<img alt="Show Branch in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
+									<img title="Show Task in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>"/>
 								</a>
 							</td>
 							<!-- Dataverse -->
@@ -471,11 +471,11 @@
 							</td>
 							<td>
 								<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/branchPage.jsp?branchId=<%=branch.getId() %>" >
-									<img alt="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
+									<img title="Manage the task" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
 								</a>
 							</td>
 							<td>
-								<input type="image" 
+								<input type="image" title="Delete it"
 									onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> deleteBranch('deleteBranch', 'homeForm', '<%=branch.getId() %>');" 
 									src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>
 							</td>
--- a/src/main/webapp/pages/search.jsp	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/webapp/pages/search.jsp	Thu Feb 04 11:30:46 2016 +0100
@@ -479,7 +479,7 @@
 									<th>
 										<label class="tableTitle">Add to Topic</label>
 										
-										<img id="addAllSectionsToTopic" width="15" height="15" alt="Add all sections to Topic" src="<%=sessionBean.getApplicationBean().getPlusImage()%>">
+										<img id="addAllSectionsToTopic" width="15" height="15" title="Add all sections to Topic" src="<%=sessionBean.getApplicationBean().getPlusImage()%>">
 										
 										
 									</th>
@@ -495,7 +495,7 @@
 										<a href="<%=sessionBean.getApplicationBean().getTocInterfaceUrl()%>/check_sections_details.php?book_id=<%=section.getBook().getId() %>&amp;count=100&amp;sessionId=<%= session.getId()%>" target="blank">
 											<%=section.getBook().getId()%>
 										</a>	
-										<img alt="More Information" src="<%=sessionBean.getApplicationBean().getMoreInfoImage()%>" data-section-id="<%=section.getId()%>" class="moreInfo"/>
+										<img title="More Information" src="<%=sessionBean.getApplicationBean().getMoreInfoImage()%>" data-section-id="<%=section.getId()%>" class="moreInfo"/>
 									</td>
 									<td><%=section.getBook().getName()%></td>
 									<td><%=section.getBook().getLevel1()%></td>
@@ -512,7 +512,7 @@
 										<a href="#"
 											title="Show Section in Extraction Interface"
 										 	onclick="sectionInExtractionInterface('<%=section.getId() %>', '<%=section.getName() %>', '<%=section.getBook().getId() %>', '<%=section.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
-										 	<img alt="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
+										 	<img title="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
 										</a>
 										
 									</td>
@@ -533,7 +533,7 @@
 														<td style="max-width:150px">
 															
 															<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/topicPage.jsp?topicId=<%=relation.getTopicId() %>" >
-																<img alt="Manage Topic" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
+																<img title="Manage Topic" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
 															</a>												
 															
 														</td>
@@ -542,7 +542,7 @@
 											</table>
 										<% } %>
 										
-										<img width="10" height="10" alt="Add the section to Topic" src="<%=sessionBean.getApplicationBean().getPlusImage()%>" data-section-id="<%=section.getId()%>" class="addSectionToTopic">
+										<img width="10" height="10" title="Add the section to Topic" src="<%=sessionBean.getApplicationBean().getPlusImage()%>" data-section-id="<%=section.getId()%>" class="addSectionToTopic">
 									
 									
 									</td>
@@ -563,7 +563,7 @@
 														<td style="max-width:150px">
 															<% if (branch.hasContributor(sessionBean.getUser().getId())) { %>
 															<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/branchPage.jsp?branchId=<%=branch.getId() %>" >
-																<img alt="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
+																<img title="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
 															</a>												
 															<% } else { %>
 																<label>Contributors: <%=branch.getContributorsNameList() %></label>
--- a/src/main/webapp/pages/topicList.jsp	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/webapp/pages/topicList.jsp	Thu Feb 04 11:30:46 2016 +0100
@@ -273,7 +273,7 @@
 							<td>
 								<%if(topic.hasContributor(sessionBean.getUser().getId())){  %>
 									<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/topicPage.jsp?topicId=<%=topic.getId() %>" >
-										<img alt="Manage Topic" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
+										<img title="Manage Topic" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
 									</a>
 								<% } %>
 								
@@ -281,7 +281,7 @@
 							</td>
 							<td>
 								<%if(topic.hasContributor(sessionBean.getUser().getId())){  %>
-									<input type="image" 
+									<input type="image" title="Delete it"
 										onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> deleteTopic('deleteTopic', 'topicListForm', '<%=topic.getId() %>');" 
 										src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>
 								<% } %>
--- a/src/main/webapp/pages/topicPage.jsp	Mon Feb 01 15:49:48 2016 +0100
+++ b/src/main/webapp/pages/topicPage.jsp	Thu Feb 04 11:30:46 2016 +0100
@@ -131,7 +131,7 @@
 							<td><label>Description</label></td>
 							<td>
 								<input type="text" name="description" size="60" maxlength="250" value="<%=sessionBean.getTopicPage().getTopic().getDescription() %>" />
-								<input type="image" alt="edit description" onclick="setAction('updateDescription', 'topicForm');" 
+								<input type="image" title="edit description" onclick="setAction('updateDescription', 'topicForm');" 
 									src="<%=sessionBean.getApplicationBean().getSaveImage()%>" width="15" height="15"/>	
 						
 							</td>
@@ -140,7 +140,7 @@
 							<td><label>Searching Keywords(separated by ",")</label></td>
 							<td>
 								<input type="text" name="keywords" size="60" maxlength="250" value="<%=sessionBean.getTopicPage().getTopic().getKeywords() %>" />
-								<input type="image" alt="edit keywords" onclick="setAction('updateKeywords', 'topicForm');" 
+								<input type="image" title="edit keywords" onclick="setAction('updateKeywords', 'topicForm');" 
 									src="<%=sessionBean.getApplicationBean().getSaveImage()%>" width="15" height="15"/>	
 						
 							</td>
@@ -562,7 +562,7 @@
 										<a	href="#"
 											title="Show Section in Extraction Interface" 
 										 	onclick="sectionInExtractionInterface('<%=section.getId() %>', '<%=section.getName() %>', '<%=section.getBookId() %>', '<%=section.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
-										 	<img alt="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
+										 	<img title="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
 										</a>
 									</td>
 									
@@ -581,7 +581,7 @@
 														<td style="max-width:150px">
 															<% if (branch.hasContributor(sessionBean.getUser().getId())) { %>
 															<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/branchPage.jsp?branchId=<%=branch.getId() %>" >
-																<img alt="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
+																<img title="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
 															</a>												
 															<% } else { %>
 																<label>Contributors: <%=branch.getContributorsNameList() %></label>
Binary file src/main/webapp/resources/images/view-on-map.png has changed