Mercurial > hg > LGServices
changeset 62:824b808a7481
improvements and bug fixed
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 18 Jul 2016 17:35:32 +0200 |
parents | 2486846e61d5 |
children | fc5116de601f |
files | src/main/java/de/mpiwg/gazetteer/rest/GetFullTextSearchHtmlFile.java src/main/java/de/mpiwg/gazetteer/utils/FileManager.java src/main/java/de/mpiwg/web/jsp/BranchPage.java src/main/java/de/mpiwg/web/jsp/HomePage.java src/main/java/de/mpiwg/web/jsp/TopicListPage.java src/main/resources/config.properties src/main/webapp/componentes/template.jsp src/main/webapp/methods/addSectionToTopic.jsp 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/topicPage.jsp src/main/webapp/resources/js/LGSearch.js |
diffstat | 14 files changed, 639 insertions(+), 579 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/rest/GetFullTextSearchHtmlFile.java Wed May 25 11:20:27 2016 +0200 +++ b/src/main/java/de/mpiwg/gazetteer/rest/GetFullTextSearchHtmlFile.java Mon Jul 18 17:35:32 2016 +0200 @@ -2,6 +2,7 @@ import java.io.PrintWriter; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import javax.servlet.http.HttpServletRequest; @@ -18,6 +19,7 @@ import de.mpiwg.gazetteer.bo.LGFile; import de.mpiwg.gazetteer.bo.LGFullTextSearchFile; import de.mpiwg.gazetteer.db.DBContents; +import de.mpiwg.gazetteer.utils.DBService; import de.mpiwg.gazetteer.utils.DataProvider; import de.mpiwg.gazetteer.utils.FileManager; import de.mpiwg.gazetteer.utils.HTTPUtils; @@ -42,12 +44,15 @@ LGFullTextSearchFile file = DataProvider.getInstance().getFullTextSearchFile(fileId); if(file != null){ + // we should only show the ones are not removed. removed them using javascript in LGService.js + String html = FileManager.getFullTextSearchHtmlFileText(file); - // parse text so that it doesn't show the field "isRemoved", which has two values, true or false + /* html = html.replaceAll("isRemoved", ""); html = html.replaceAll("true", ""); html = html.replaceAll("false", ""); + */ PrintWriter out = response.getWriter(); out.print(html);
--- a/src/main/java/de/mpiwg/gazetteer/utils/FileManager.java Wed May 25 11:20:27 2016 +0200 +++ b/src/main/java/de/mpiwg/gazetteer/utils/FileManager.java Mon Jul 18 17:35:32 2016 +0200 @@ -60,7 +60,7 @@ PrintWriter out = new PrintWriter(absolutePath + fileName); String text = new String(); // make it from list - text += "Address,LEVEL1,LEVEL2,Name,DYNASTY,PERIOD,ADMIN_TYPE,TimeSpan:begin,TimeSpan:end,Longitude,Latitude,PAGE,SECTION,CONTENT,BOOK_ID,Description\n"; + text += "Address,LEVEL1,LEVEL2,Name,DYNASTY,PERIOD,ADMIN_TYPE,TimeSpan:begin,TimeSpan:end,Longitude,Latitude,PAGE,SECTION,CONTENT,BOOK_ID,Author,Edition,Volume,Description\n"; for (DBContents c : list) { @@ -85,6 +85,14 @@ c.getSection().getName() + "," + c.getContent() + "," + c.getBookId() + "," + + + + // add author, edition, volume + book.getAuthor() + "," + + book.getEdition() + "," + + book.getVolume() + "," + + + description + "\n"; } } @@ -153,11 +161,11 @@ + "<td class='tableTitle'>section name</td>" + "<td class='tableTitle'>page</td>" + "<td class='tableTitle'>content</td>" - + "<td class='tableTitle'>content id</td>" - + "<td class='tableTitle'>isRemoved</td>" + + "<td class='tableTitle hiddenField'>content id</td>" + + "<td class='tableTitle hiddenField'>isRemoved</td>" - // TODO add Author, edition, volume, place name, coordinates (x,y) - + "<td class='tableTitle'>Author</td>" + // add author, edition, volume, place name, coordinates (x,y) + + "<td class='tableTitle'>author</td>" + "<td class='tableTitle'>edition</td>" + "<td class='tableTitle'>volume</td>" + "<td class='tableTitle'>place name</td>" @@ -171,8 +179,14 @@ if ( c.getSection() != null){ DBBook book = c.getSection().getBook(); - - text += "<tr>" + + + if (c.isRemoved()) { + text += "<tr class='hiddenField'>"; + } else { + text += "<tr>"; + + } + text += "<td>" + c.getInx() + "</td>" + "<td>" + c.getBookId() + "</td>" + "<td>" + book.getName() + "</td>" + @@ -184,10 +198,9 @@ "<td>" + c.getSection().getName() + "</td>" + "<td>" + c.getPage() + "</td>" + "<td class='content'>" + c.getContent() + "</td>" + - "<td>" + c.getId() + "</td>" + - "<td>" + c.isRemoved() + "</td>" + + "<td class='hiddenField'>" + c.getId() + "</td>" + + "<td class='hiddenField'>" + c.isRemoved() + "</td>" + - // TODO "<td>" + book.getAuthor() + "</td>" + "<td>" + book.getEdition() + "</td>" + "<td>" + book.getVolume() + "</td>" +
--- a/src/main/java/de/mpiwg/web/jsp/BranchPage.java Wed May 25 11:20:27 2016 +0200 +++ b/src/main/java/de/mpiwg/web/jsp/BranchPage.java Mon Jul 18 17:35:32 2016 +0200 @@ -20,7 +20,7 @@ public class BranchPage extends AbstractJSPPage{ - private static Logger logger = Logger.getLogger(CreateFilePage.class); + private static Logger logger = Logger.getLogger(BranchPage.class); public static String bean = "branchBean"; public static String page = "pages/branchPage.jsp"; @@ -145,6 +145,9 @@ public void loadBranch(String branchId0){ + + System.out.println("loading branch: " + branchId0); + try { this.branchId = Long.parseLong(branchId0);
--- a/src/main/java/de/mpiwg/web/jsp/HomePage.java Wed May 25 11:20:27 2016 +0200 +++ b/src/main/java/de/mpiwg/web/jsp/HomePage.java Mon Jul 18 17:35:32 2016 +0200 @@ -311,7 +311,7 @@ } if(completeBranchList.size() > 0){ - this.filteringMessage = this.filteredBranchList.size() + " branches listed after filtering"; + this.filteringMessage = this.filteredBranchList.size() + " tasks listed after filtering"; this.paginator.setCurrentPage(0); this.paginator.resetNumberOfPages(filteredBranchList.size()); this.updateCurrentBranches();
--- a/src/main/java/de/mpiwg/web/jsp/TopicListPage.java Wed May 25 11:20:27 2016 +0200 +++ b/src/main/java/de/mpiwg/web/jsp/TopicListPage.java Mon Jul 18 17:35:32 2016 +0200 @@ -12,6 +12,7 @@ import de.mpiwg.gazetteer.bo.LGTopic; import de.mpiwg.gazetteer.utils.DataProvider; + import de.mpiwg.web.topicList.SortByDescription; import de.mpiwg.web.topicList.SortByLastModified; import de.mpiwg.web.topicList.SortByNameCh;
--- a/src/main/resources/config.properties Wed May 25 11:20:27 2016 +0200 +++ b/src/main/resources/config.properties Mon Jul 18 17:35:32 2016 +0200 @@ -7,12 +7,12 @@ db_gazetter_username=root db_gazetter_password=root dvn_server=http://localhost:8082 -dvn_apitoken=9dd1f749-8c42-49ab-a2ba-fbb963c2ff90 +dvn_apitoken=ceaee8bb-483c-42c6-841a-f9ad9c39bdb4 dv_id=2 root_server=http://localhost:8080/LGServices toc_interface=http://localhost:1080/localgazetteers-dev/LGToc extraction_interface=http://localhost:1080/localgazetteers-dev/extraction-interface -localgazetteers_dvId=185 +localgazetteers_dvId=226 lgmap=http://localhost:1080/localgazetteers-dev/LGMap/map.php?mode=1 lgmap_datasets=/Applications/MAMP/htdocs/localgazetteers-dev/LGMap/datasets
--- a/src/main/webapp/componentes/template.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/componentes/template.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -77,8 +77,8 @@ <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/createFile.jsp" class="current">Create File</a> --> <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/search.jsp">Sections</a> + <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/fullTextSearch.jsp">Full Text Search</a> <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/books.jsp">Books</a> - <a href="<%=sessionBean.getApplicationBean().getRootServer()%>/pages/fullTextSearch.jsp">Full Text Search</a> </div>
--- a/src/main/webapp/methods/addSectionToTopic.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/methods/addSectionToTopic.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -38,32 +38,43 @@ <td><label style="font-weight: bold;">Name</label></td> </tr> - <% for (LGTopic topic : sessionBean.getTopicListPage().getCompleteTopicList() ) {%> - <tr> - <td><%=topic.getId() %></td> - <td> - <%=topic.getNameEn() %>(<%=topic.getNameCh() %>) - - <% if(request.getParameter("sectionId") != null) { - Long sectionId = Long.parseLong(request.getParameter("sectionId")); - %> - <!-- add section to selected topic --> - <input name="selectedSectionId" type="hidden" value="<%=request.getParameter("sectionId") %>" /> - - <input type="image" - onclick="setAction0('addSection', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');" - src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/> - - <% } else if (request.getParameter("addAllSections") != null) { %> - <input type="image" - onclick="setAction0('addAllSections', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');" - src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/> + + <% + Long userId = sessionBean.getUser().getId(); + + for (LGTopic topic : sessionBean.getTopicListPage().getCompleteTopicList() ) { + // should show only the topic that current user has access to (is the creator or in contributorList) + if (Long.compare(topic.getUserId(), userId) == 0 || topic.getContributorsList().contains(userId) ) { + + %> + <tr> + <td><%=topic.getId() %></td> + <td> + <%=topic.getNameEn() %>(<%=topic.getNameCh() %>) - <% } %> - - </td> - </tr> - <% } %> + <% if(request.getParameter("sectionId") != null) { + Long sectionId = Long.parseLong(request.getParameter("sectionId")); + %> + <!-- add section to selected topic --> + <input name="selectedSectionId" type="hidden" value="<%=request.getParameter("sectionId") %>" /> + + <input type="image" + onclick="setAction0('addSection', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');" + src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/> + + <% } else if (request.getParameter("addAllSections") != null) { %> + <input type="image" + onclick="setAction0('addAllSections', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');" + src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/> + + <% } %> + + </td> + </tr> + <% + } + } + %> </table> </form>
--- a/src/main/webapp/pages/branchPage.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/pages/branchPage.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -128,18 +128,18 @@ <td> <table class="tableComponent"> <tr> - <td><label>Branch Id</label></td> + <td><label>Task Id</label></td> <td><label><%=sessionBean.getBranchPage().getBranch().getId() %></label></td> </tr> <tr> <td><label>Label</label></td> <td> - <form name="branchForm" + <form name="branchForm1" id="branchForm1" action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="branchBean" /> <input type="text" name="branchLabel" size="60" maxlength="250" value="<%=sessionBean.getBranchPage().getBranch().getLabel() %>" /> - <input type="image" alt="edit label" onclick="setAction('updateLabel', 'branchForm');" + <input type="image" onclick="setAction('updateLabel', 'branchForm1');" src="<%=sessionBean.getApplicationBean().getSaveImage()%>" width="15" height="15"/> </form>
--- a/src/main/webapp/pages/fullTextSearch.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/pages/fullTextSearch.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -5,16 +5,17 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" /> - +<jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" + scope="session" /> + <html> <head> - <jsp:include page="../componentes/headContent.jsp"/> +<jsp:include page="../componentes/headContent.jsp" /> - <script> +<script> $(function() { @@ -46,6 +47,11 @@ dialogSave.dialog( "open" ); }); + + + $("#prompToSaveResult").click( function () { + $("#saveResult").click(); + }); var dialogViewSavedResult = $("#dialogViewSavedResult").dialog( @@ -336,306 +342,285 @@ <body> - <jsp:include page="../componentes/template.jsp"/> + <jsp:include page="../componentes/template.jsp" /> - <div id="dialogMoreInfo" title="Full Text Search Details"> </div> - + <div id="dialogMoreInfo" title="Full Text Search Details"></div> + <div id="page"> - - <% if(sessionBean.getUser() == null) { %> - <label class="subTitel">You must login!</label> - <% } else { - - if (sessionBean.getFullTextSearchPage().getFileList() == null){ - sessionBean.getFullTextSearchPage().loadParameters(request, response); - sessionBean.getFullTextSearchPage().forceLoadFileList(); - } - - %> - - <div id="dialogSave" title="Save Table:"> - - <form name="saveTableForm" id="saveTableForm" - action="<%= sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" - method="post"> - <input name="bean" type="hidden" value="fullTextSearchBean" /> - <table> - <tr> - <td> - <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> - - </td> - </tr> - </table> - </form> - - </div> - - <div id="dialogViewSavedResult" title="Saved Table(s)"> - - <div class="label">This week:</div> - <table class="savedResultTable"> - <tr> - <% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getWeekFileList() ){%> - <td> - <div><%= aFile.getFileName() %></div> - <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> - - <!-- download csv file --> - <a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadFullTextSearchCsvFile?file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv" - target="_blank"> - <img title="Download CSV" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/> - </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> - </table> - - <div class="label">This month:</div> - <table class="savedResultTable"> - <tr> - <% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getMonthFileList() ){ %> - <td> - <div><%= aFile.getFileName() %></div> - <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> - - <!-- download csv file --> - <a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadFullTextSearchCsvFile?file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv" - target="_blank"> - <img title="Download CSV" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/> - </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> - - <% } %> + + <% + if (sessionBean.getUser() == null) { + %> + <label class="subTitel">You must login!</label> + <% + } else { + + if (sessionBean.getFullTextSearchPage().getFileList() == null) { + sessionBean.getFullTextSearchPage().loadParameters(request, + response); + sessionBean.getFullTextSearchPage().forceLoadFileList(); + } + %> + + <div id="dialogSave" title="Save Table:"> + + <form name="saveTableForm" id="saveTableForm" + action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" + method="post"> + <input name="bean" type="hidden" value="fullTextSearchBean" /> + <table> + <tr> + <td><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> + + </td> </tr> </table> - - <div class="label">Older...</div> - <table class="savedResultTable"> + </form> + + </div> + + <div id="dialogViewSavedResult" title="Saved Table(s)"> + + <div class="label">This week:</div> + <table class="savedResultTable"> <tr> - <% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getOlderFileList() ){%> + <% + for (LGFullTextSearchFile aFile : sessionBean + .getFullTextSearchPage().getWeekFileList()) { + %> + <td> + <div><%=aFile.getFileName()%></div> + <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> <!-- download csv file --> <a + href="<%=sessionBean.getApplicationBean().getRootServer()%>/rest/text/downloadFullTextSearchCsvFile?file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv" + target="_blank"> <img title="Download CSV" + src="<%=sessionBean.getApplicationBean() + .getDownloadImage()%>" /> + </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> + </table> + + <div class="label">This month:</div> + <table class="savedResultTable"> + <tr> + <% + for (LGFullTextSearchFile aFile : sessionBean + .getFullTextSearchPage().getMonthFileList()) { + %> + <td> + <div><%=aFile.getFileName()%></div> + <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> <!-- download csv file --> <a + href="<%=sessionBean.getApplicationBean().getRootServer()%>/rest/text/downloadFullTextSearchCsvFile?file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv" + target="_blank"> <img title="Download CSV" + src="<%=sessionBean.getApplicationBean() + .getDownloadImage()%>" /> + </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> + </table> + + <div class="label">Older...</div> + <table class="savedResultTable"> + <tr> + <% + for (LGFullTextSearchFile aFile : sessionBean + .getFullTextSearchPage().getOlderFileList()) { + %> <td> - <div><%= aFile.getFileName() %></div> - <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> - - <!-- download csv file --> - <a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadFullTextSearchCsvFile?file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv" - target="_blank"> - <img title="Download CSV" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/> - </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()%>"/> + <div><%=aFile.getFileName()%></div> + <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> <!-- download csv file --> <a + href="<%=sessionBean.getApplicationBean().getRootServer()%>/rest/text/downloadFullTextSearchCsvFile?file=<%=aFile.getUserId().toString()%>_<%=aFile.getFileName()%>.csv" + target="_blank"> <img title="Download CSV" + src="<%=sessionBean.getApplicationBean() + .getDownloadImage()%>" /> + </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> + </table> + + + </div> + <label class="subTitel">Full Text Search</label> + <form name="fullTextSearchForm" id="fullTextSearchForm" + action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" + method="post" class="contentForm"> + <input name="bean" type="hidden" value="fullTextSearchBean" /> <input + id="focusedId" type="hidden" + value="<%=sessionBean.getFullTextSearchPage().getFocusedContentId()%>" /> + + <input id="mouseX" name="mouseX" type="hidden" + value="<%=sessionBean.getFullTextSearchPage().getMouseX()%>" /> <input + id="mouseY" name="mouseY" type="hidden" + value="<%=sessionBean.getFullTextSearchPage().getMouseY()%>" /> + + <table style="width: 300px; margin-left: auto; margin-right: auto;"> + <tr> + <td><input id="searchTerm" name="searchTerm" type="text" + placeholder='if multiple terms, use "," to separate them.' + class="searchInput" + value="<%=sessionBean.getFullTextSearchPage().getSearchTerm()%>" /> + </td> + <td><input id="search" type="image" + onclick="setAction('search', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getSearchImage()%>" /></td> + + + </tr> + + <!-- batching querying --> + <!-- for batching, query keyword sets separated by ";" and within each keyword set, keywords separated by "," --> + + <% + if (StringUtils.equals(sessionBean.getUserName(), "admin")) { // || StringUtils.equals(sessionBean.getUserName(), "silk")) { + %> + <tr> + <td><input id="batchSearchTerm" name="batchSearchTerm" + type="text" placeholder="(TODO plz Don't use this to search)" + class="searchInput" + value="<%=sessionBean.getFullTextSearchPage() + .getBatchSearchTerm()%>" /> + </td> + <td><input id="search" type="image" + onclick="setAction('searchBatch', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getSearchImage()%>" /></td> + + + </tr> + <% + } + %> + + <tr> + <td><label class="label"><%=(StringUtils.isNotEmpty(sessionBean + .getFullTextSearchPage().getSearchMessage())) ? sessionBean + .getFullTextSearchPage().getSearchMessage() : ""%></label></td> + </tr> + <tr> + <td><label class="label"><%=(StringUtils.isNotEmpty(sessionBean + .getFullTextSearchPage().getFilteringMessage())) ? sessionBean + .getFullTextSearchPage().getFilteringMessage() : ""%></label></td> + </tr> + <tr> + <td><label class="label"><%=(StringUtils.isNotEmpty(sessionBean + .getFullTextSearchPage().getSelectedContentMessage())) ? sessionBean + .getFullTextSearchPage().getSelectedContentMessage() + : ""%></label></td> + </tr> + + <tr> + <td> + <button id="saveResult" type="button" class="lgButton">Save + Table</button> + <button id="viewSavedResult" type="button" class="lgButton">View/Load + Saved Table(s)</button> + + + </td> + </tr> + <tr> + <td> + <!-- for view on LGMap, prompt to save if it's not saved. After saving, it could be shown on LGMap --> + <% + if (sessionBean.getFullTextSearchPage().getFile() != null) { + LGFullTextSearchFile theFile = sessionBean + .getFullTextSearchPage().getFile(); + %> + <a + href="<%=sessionBean.getApplicationBean().getLGMapUrl()%>&file=<%=theFile.getUserId().toString()%>_<%=theFile.getFileName()%>.csv&name=<%=theFile.getSearchTerms()%>" + target="_blank">View on LGMap </a> <!-- download csv file --> <a + href="<%=sessionBean.getApplicationBean().getRootServer()%>/rest/text/downloadFullTextSearchCsvFile?file=<%=theFile.getUserId().toString()%>_<%=theFile.getFileName()%>.csv" + target="_blank"> <img title="Download CSV" + src="<%=sessionBean.getApplicationBean() + .getDownloadImage()%>" /> + </a> + <% } else if (sessionBean.getFullTextSearchPage().getCompleteList() != null) { %> + <!-- prompt to save --> + <!-- A click icon for Save Table, showing the text as bellow --> + <button id="prompToSaveResult" type="button" class="lgButton">View on LGMap?</button> + <% } %> </td> - - <% } %> - </tr> - </table> - - <!-- - <table class="pageTable"> - <tr> - <td class="tableTitle">Table name</td> - <td class="tableTitle"></td> - <td class="tableTitle">View html</td> - <td class="tableTitle">View on LGMap</td> - <td class="tableTitle">Delete</td> - </tr> - - <% for (LGFullTextSearchFile aFile : sessionBean.getFullTextSearchPage().getFileList() ){%> - <tr> - <td><%= aFile.getFileName() %></td> - <td> - <button type="button" class="lgButton" onclick="setAction0('loadFile', 'fullTextSearchForm', 'fileId', <%=aFile.getId() %>); document.getElementById('fullTextSearchForm').submit();">load</button> - </td> - - <td> - - <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 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> - <form name="fullTextSearchForm" id="fullTextSearchForm" - action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" - method="post" - class="contentForm"> - <input name="bean" type="hidden" value="fullTextSearchBean" /> - <input id="focusedId" type="hidden" value="<%=sessionBean.getFullTextSearchPage().getFocusedContentId() %>"/> - - <input id="mouseX" name="mouseX" type="hidden" value="<%=sessionBean.getFullTextSearchPage().getMouseX() %>"/> - <input id="mouseY" name="mouseY" type="hidden" value="<%=sessionBean.getFullTextSearchPage().getMouseY() %>"/> - - <table style="width: 300px; margin-left: auto;margin-right: auto;"> - <tr> - <td> - <input - id="searchTerm" - name="searchTerm" - type="text" - placeholder='if multiple terms, use "," to separate them.' - class="searchInput" - value="<%=sessionBean.getFullTextSearchPage().getSearchTerm()%>" /> - </td> - <td> - <input id="search" - type="image" - onclick="setAction('search', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getSearchImage()%>"/> - </td> - - </tr> - - <!-- 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> - <td> - <input - id="batchSearchTerm" - name="batchSearchTerm" - type="text" - placeholder="(TODO plz Don't use this to search)" - class="searchInput" - value="<%=sessionBean.getFullTextSearchPage().getBatchSearchTerm() %>" /> - </td> - <td> - <input id="search" - type="image" - onclick="setAction('searchBatch', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getSearchImage()%>"/> - </td> - - - </tr> - <% } %> - - <tr><td><label class="label"><%= (StringUtils.isNotEmpty(sessionBean.getFullTextSearchPage().getSearchMessage())) ? sessionBean.getFullTextSearchPage().getSearchMessage() : ""%></label></td></tr> - <tr><td><label class="label"><%= (StringUtils.isNotEmpty(sessionBean.getFullTextSearchPage().getFilteringMessage())) ? sessionBean.getFullTextSearchPage().getFilteringMessage() : ""%></label></td></tr> - <tr><td><label class="label"><%= (StringUtils.isNotEmpty(sessionBean.getFullTextSearchPage().getSelectedContentMessage())) ? sessionBean.getFullTextSearchPage().getSelectedContentMessage() : ""%></label></td></tr> - - <tr><td> - <button id="saveResult" type="button" class="lgButton">Save Table</button> - <button id="viewSavedResult" type="button" class="lgButton">View/Load Saved Table(s)</button> - - - </td></tr> - <tr><td> - <!-- for view on LGMap, prompt to save if it's not saved. After saving, it could be shown on LGMap --> - <% if (sessionBean.getFullTextSearchPage().getFile() != null) { - LGFullTextSearchFile theFile = sessionBean.getFullTextSearchPage().getFile(); %> - <a href="<%=sessionBean.getApplicationBean().getLGMapUrl() %>&file=<%=theFile.getUserId().toString()%>_<%=theFile.getFileName()%>.csv&name=<%=theFile.getSearchTerms() %>" - target="_blank">View on LGMap - </a> - - <!-- download csv file --> - <a href="<%=sessionBean.getApplicationBean().getRootServer() %>/rest/text/downloadFullTextSearchCsvFile?file=<%=theFile.getUserId().toString()%>_<%=theFile.getFileName()%>.csv" - target="_blank"> - <img title="Download CSV" src="<%=sessionBean.getApplicationBean().getDownloadImage()%>"/> - </a> - - <% } else { %> - <!-- prompt to save --> - <label class="label">(save table first to view on LGMap)</label> - <% } %> - </td></tr> - - </table> - - + + </table> + + <% if (sessionBean.getFullTextSearchPage().getCompleteList() != null) { %> - - + + <jsp:include page="../componentes/paginator.jsp"> - <jsp:param name="formName" value="fullTextSearchForm"/> - </jsp:include> - - + <jsp:param name="formName" value="fullTextSearchForm" /> + </jsp:include> + + <div class="tableDiv double-scroll"> <table class="pageTable"> <tbody> @@ -646,16 +631,18 @@ <td><label class="tableTitle">#</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByInxUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByInxDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> @@ -667,28 +654,31 @@ <td><label class="tableTitle">Book Id</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByBookIdUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByBookIdDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="bookIdFilter" id="bookIdFilter" value="<%= sessionBean.getFullTextSearchPage().getBookIdFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> + <td><input type="text" class="filterInput" + name="bookIdFilter" id="bookIdFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getBookIdFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> </tr> </table> </th> @@ -698,30 +688,33 @@ <td><label class="tableTitle">Book Name</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByBookNameUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByBookNameDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="bookNameFilter" id="bookNameFilter" value="<%= sessionBean.getFullTextSearchPage().getBookNameFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> + <td><input type="text" class="filterInput" + name="bookNameFilter" id="bookNameFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getBookNameFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> </tr> - </table> + </table> </th> <th> <table class="sortTable"> @@ -729,30 +722,33 @@ <td><label class="tableTitle">Level 1</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByLevel1Up', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByLevel1Down', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="level1Filter" id="level1Filter" value="<%= sessionBean.getFullTextSearchPage().getLevel1Filter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> - </tr> - </table> + <td><input type="text" class="filterInput" + name="level1Filter" id="level1Filter" + value="<%=sessionBean.getFullTextSearchPage() + .getLevel1Filter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> + </tr> + </table> </th> <th> <table class="sortTable"> @@ -760,29 +756,32 @@ <td><label class="tableTitle">Level 2</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByLevel2Up', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByLevel2Down', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="level2Filter" id="level2Filter" value="<%= sessionBean.getFullTextSearchPage().getLevel2Filter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> - </tr> + <td><input type="text" class="filterInput" + name="level2Filter" id="level2Filter" + value="<%=sessionBean.getFullTextSearchPage() + .getLevel2Filter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> + </tr> </table> </th> <th> @@ -791,30 +790,33 @@ <td><label class="tableTitle">Dynasty</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByDynastyUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByDynastyDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="dynastyFilter" id="dynastyFilter" value="<%= sessionBean.getFullTextSearchPage().getDynastyFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> + <td><input type="text" class="filterInput" + name="dynastyFilter" id="dynastyFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getDynastyFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> </tr> - </table> + </table> </th> <th> <table class="sortTable"> @@ -822,30 +824,33 @@ <td><label class="tableTitle">Period</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByPeriodUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByPeriodDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="periodFilter" id="periodFilter" value="<%= sessionBean.getFullTextSearchPage().getPeriodFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> + <td><input type="text" class="filterInput" + name="periodFilter" id="periodFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getPeriodFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> </tr> - </table> + </table> </th> <th> <table class="sortTable"> @@ -853,64 +858,70 @@ <td><label class="tableTitle">Admin Type</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByAdminTypeUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByAdminTypeDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="adminTypeFilter" id="adminTypeFilter" value="<%= sessionBean.getFullTextSearchPage().getAdminTypeFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> - </tr> - </table> + <td><input type="text" class="filterInput" + name="adminTypeFilter" id="adminTypeFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getAdminTypeFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> + </tr> + </table> </th> - + <th> <table class="sortTable"> <tr> <td><label class="tableTitle">Section Name</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortBySectionNameUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortBySectionNameDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="sectionNameFilter" id="sectionNameFilter" value="<%= sessionBean.getFullTextSearchPage().getSectionNameFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> + <td><input type="text" class="filterInput" + name="sectionNameFilter" id="sectionNameFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getSectionNameFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> </tr> - </table> + </table> </th> - + <!-- <th> <table class="sortTable"> @@ -941,122 +952,140 @@ <td><label class="tableTitle">Page</label></td> <td> <table> - <tr><td> - <input type="image" + <tr> + <td><input type="image" onclick="setAction('sortByStartPageUp', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getUpImage()%>"/> - </td></tr> - <tr><td> - <input type="image" + src="<%=sessionBean.getApplicationBean().getUpImage()%>" /> + </td> + </tr> + <tr> + <td><input type="image" onclick="setAction('sortByStartPageDown', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getDownImage()%>"/> - </td></tr> + src="<%=sessionBean.getApplicationBean().getDownImage()%>" /> + </td> + </tr> </table> </td> </tr> - </table> - + </table> + </th> - <th style="min-width:300px"> - + <th style="min-width: 300px"> + <table class="sortTable"> <tr> <td><label class="tableTitle">Content</label></td> <td></td> </tr> <tr> - <td> - <input type="text" class="filterInput" name="contentFilter" id="contentFilter" value="<%= sessionBean.getFullTextSearchPage().getContentFilter()%>" size="8"/> - </td> - <td> - <input type="image" - onclick="setAction('filter', 'fullTextSearchForm');" - src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/> - </td> + <td><input type="text" class="filterInput" + name="contentFilter" id="contentFilter" + value="<%=sessionBean.getFullTextSearchPage() + .getContentFilter()%>" + size="8" /></td> + <td><input type="image" + onclick="setAction('filter', 'fullTextSearchForm');" + src="<%=sessionBean.getApplicationBean().getFilterImage()%>" /> + </td> </tr> - - </table> - + + </table> + </th> <th><label class="tableTitle">Select rows</label></th> </tr> - - + + <% - for (DBContents content : sessionBean.getFullTextSearchPage().getDisplayList() ) { + for (DBContents content : sessionBean + .getFullTextSearchPage().getDisplayList()) { %> + + <% + if (content.isRemoved()) { + %> + <tr class="removedContent"> + <% + } else { + %> - <% if ( content.isRemoved() ) { %> - <tr class="removedContent"> - <% } else { %> - <tr> - <% } %> - - <td><%=content.getInx() %></td> - <td><%=content.getBookId() %></td> + <tr> + <% + } + %> + + <td><%=content.getInx()%></td> + <td><%=content.getBookId()%></td> <td><%=content.getSection().getBook().getName()%></td> <td><%=content.getSection().getBook().getLevel1()%></td> <td><%=content.getSection().getBook().getLevel2()%></td> <td><%=content.getSection().getBook().getDynasty()%></td> <td><%=content.getSection().getBook().getPeriod()%></td> - <td><%=content.getSection().getBook().getAdmin_type() %></td> - <td><%=content.getSection().getName() %></td> - + <td><%=content.getSection().getBook() + .getAdmin_type()%></td> + <td><%=content.getSection().getName()%></td> + <!-- View text in Ext-Interface --> - <td> - <a href="#" - title="Show Section in Extraction Interface" - onclick="sectionInExtractionInterface('<%=content.getSection().getId() %>', '<%=content.getSection().getName() %>', '<%=content.getSection().getBook().getId() %>', '<%=content.getSection().getBook().getName() %>', '<%=sessionBean.getTopicListPage().getCompleteTopicList().get(0).getId() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');"> - <img title="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>"> - </a> - - </td> - - - <td><%=content.getPage() %></td> + <td><a href="#" title="Show Section in Extraction Interface" + onclick="sectionInExtractionInterface('<%=content.getSection().getId()%>', '<%=content.getSection().getName()%>', '<%=content.getSection().getBook().getId()%>', '<%=content.getSection().getBook().getName()%>', '<%=sessionBean.getTopicListPage() + .getCompleteTopicList().get(0).getId()%>', '<%=sessionBean.getUser().getId()%>', '<%=sessionBean.getApplicationBean() + .getExtractionInterfaceUrl()%>');"> + <img title="Show Section in Extraction Interface" + src="<%=sessionBean.getApplicationBean() + .getShowImage()%>"> + </a></td> + + + <td><%=content.getPage()%></td> <td class="content"><%=content.getContent()%></td> - <td id="content_<%=content.getId() %>"> - <% if ( content.isRemoved() ) { %> - - <input type="image" onclick="setMousePos(); setAction0('recoverFocusedContent', 'fullTextSearchForm', 'focusedContentId', '<%=content.getId() %>');" - src="<%=sessionBean.getApplicationBean().getCheckboxUncheckedImage()%>" width="20" height="20"/> - - <% } else { %> - - <input type="image" onclick="setMousePos(); setAction0('removeFocusedContent', 'fullTextSearchForm', 'focusedContentId', '<%=content.getId() %>');" - src="<%=sessionBean.getApplicationBean().getCheckboxCheckedImage()%>" width="20" height="20"/> - - <% } %> - - - + <td id="content_<%=content.getId()%>"> + <% + if (content.isRemoved()) { + %> <input type="image" + onclick="setMousePos(); setAction0('recoverFocusedContent', 'fullTextSearchForm', 'focusedContentId', '<%=content.getId()%>');" + src="<%=sessionBean.getApplicationBean() + .getCheckboxUncheckedImage()%>" + width="20" height="20" /> <% + } else { + %> <input type="image" + onclick="setMousePos(); setAction0('removeFocusedContent', 'fullTextSearchForm', 'focusedContentId', '<%=content.getId()%>');" + src="<%=sessionBean.getApplicationBean() + .getCheckboxCheckedImage()%>" + width="20" height="20" /> <% + } + %> + + + </td> - - + + </tr> <% } %> - + </tbody> </table> - - - <% - } - %> - + + + <% + } + %> + </div> - + <jsp:include page="../componentes/paginator.jsp"> - <jsp:param name="formName" value="fullTextSearchForm"/> - </jsp:include> - - + <jsp:param name="formName" value="fullTextSearchForm" /> + </jsp:include> + + </form> - - <% } %> - + + <% + } + %> + </div> </body>
--- a/src/main/webapp/pages/home.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/pages/home.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -298,18 +298,13 @@ sessionBean.getHomePage().reloadBranches(); %> - <% - if (sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { - %> - <label class="subTitel">You have no task!</label> - <% - } else { - - %> - <form name="homeForm" method="post" action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp"> <input name="bean" type="hidden" value="homeBean" /> + + <% if (sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { %> + <label class="subTitel">You have no task!</label> + <% } else { %> <div class="subTitel"> Your Tasks <input type="image" @@ -794,11 +789,9 @@ <!-- Add to Topic --> <td style="max-width: 300px;"> - <!-- existing topic --> <% - if (branch.getSection().getTopicSectionRelation() != null - && !branch.getSection() - .getTopicSectionRelation().isEmpty()) { - %> + <!-- existing topic --> + <% if (branch.getSection().getTopicSectionRelation() != null && !branch.getSection().getTopicSectionRelation().isEmpty()) { %> + <lable>Already in topic: </lable> <table style="width: 100%"> <%
--- a/src/main/webapp/pages/search.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/pages/search.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -23,8 +23,8 @@ var r = confirm("Add all sections to a topic?"); if (r == true) { console.log("addAllSectionsToTopic"); - - var url0 = "<%=sessionBean.getApplicationBean().getRootServer()%>/methods/addSectionToTopic.jsp?addAllSections=1"; + + var url0 = "<%=sessionBean.getApplicationBean().getRootServer()%>/methods/addSectionToTopic.jsp?addAllSections=1&sourceBean=search"; $.ajax( url0 ) .done(function(data) {
--- a/src/main/webapp/pages/topicPage.jsp Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/pages/topicPage.jsp Mon Jul 18 17:35:32 2016 +0200 @@ -62,6 +62,8 @@ }); }); + + </script> </head>
--- a/src/main/webapp/resources/js/LGSearch.js Wed May 25 11:20:27 2016 +0200 +++ b/src/main/webapp/resources/js/LGSearch.js Mon Jul 18 17:35:32 2016 +0200 @@ -1,5 +1,8 @@ $(document).ready(function(){ + + $(".hiddenField").remove(); highlightKeywords(); + }) function highlightKeywords() // highlight keywords in content column, with class="content" @@ -24,4 +27,4 @@ }; }; -} \ No newline at end of file +}