# HG changeset patch # User Zoe Hong # Date 1464167492 -7200 # Node ID 90d5e86c157dbeeb2d00d551621b5a383bf7200a # Parent bc0219c2600b9248a46fd32791ad0ac6e817c09c new: auto refresh page when there's new version saved from Ext-Interface diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/gazetteer/utils/DBService.java --- a/src/main/java/de/mpiwg/gazetteer/utils/DBService.java Mon May 09 16:02:32 2016 +0200 +++ b/src/main/java/de/mpiwg/gazetteer/utils/DBService.java Wed May 25 11:11:32 2016 +0200 @@ -34,7 +34,7 @@ // JDBC driver name and database URL static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; - static final String DB_URL = "jdbc:mysql://localhost/"; + static final String DB_URL = "jdbc:mysql://localhost/"; // TODO: when move Gazetteer database to SBB, need to re-config this private static String SECTIONS_TABLE = "sections_index"; diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/jsp/JSPProxy.java --- a/src/main/java/de/mpiwg/web/jsp/JSPProxy.java Mon May 09 16:02:32 2016 +0200 +++ b/src/main/java/de/mpiwg/web/jsp/JSPProxy.java Wed May 25 11:11:32 2016 +0200 @@ -328,7 +328,32 @@ } else if(StringUtils.equals(action, "createTopic")){ Long userId = getSessionBean().getUser().getId(); getSessionBean().getTopicListPage().createTopic(userId); - } + + } else if(StringUtils.equals(action, "sortByTopicIdUp")) { + getSessionBean().getTopicListPage().sortByTopicIdUp(); + } else if(StringUtils.equals(action, "sortByTopicIdDown")) { + getSessionBean().getTopicListPage().sortByTopicIdDown(); + } else if(StringUtils.equals(action, "sortByNameEnUp")) { + getSessionBean().getTopicListPage().sortByNameEnUp(); + } else if(StringUtils.equals(action, "sortByNameEnDown")) { + getSessionBean().getTopicListPage().sortByNameEnDown(); + } else if(StringUtils.equals(action, "sortByNameChUp")) { + getSessionBean().getTopicListPage().sortByNameChUp(); + } else if(StringUtils.equals(action, "sortByNameChDown")) { + getSessionBean().getTopicListPage().sortByNameChDown(); + } else if(StringUtils.equals(action, "sortByNamePinyinUp")) { + getSessionBean().getTopicListPage().sortByNamePinyinUp(); + } else if(StringUtils.equals(action, "sortByNamePinyinDown")) { + getSessionBean().getTopicListPage().sortByNamePinyinDown(); + } else if(StringUtils.equals(action, "sortByDescriptionUp")) { + getSessionBean().getTopicListPage().sortByDescriptionUp(); + } else if(StringUtils.equals(action, "sortByDescriptionDown")) { + getSessionBean().getTopicListPage().sortByDescriptionDown(); + } else if(StringUtils.equals(action, "sortByLastModifiedUp")) { + getSessionBean().getTopicListPage().sortByLastModifiedUp(); + } else if(StringUtils.equals(action, "sortByLastModifiedDown")) { + getSessionBean().getTopicListPage().sortByLastModifiedDown(); + } return TopicListPage.page; diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/jsp/TopicListPage.java --- a/src/main/java/de/mpiwg/web/jsp/TopicListPage.java Mon May 09 16:02:32 2016 +0200 +++ b/src/main/java/de/mpiwg/web/jsp/TopicListPage.java Wed May 25 11:11:32 2016 +0200 @@ -12,6 +12,13 @@ import de.mpiwg.gazetteer.bo.LGTopic; import de.mpiwg.gazetteer.utils.DataProvider; +import de.mpiwg.web.fullTextSearch.SortContentByStartPage; +import de.mpiwg.web.topicList.SortByDescription; +import de.mpiwg.web.topicList.SortByLastModified; +import de.mpiwg.web.topicList.SortByNameCh; +import de.mpiwg.web.topicList.SortByNameEn; +import de.mpiwg.web.topicList.SortByNamePinyin; +import de.mpiwg.web.topicList.SortByTopicId; public class TopicListPage extends AbstractJSPPage{ private static Logger logger = Logger.getLogger(TopicListPage.class); @@ -189,15 +196,70 @@ - // sort - + // TODO sort + public void sortByTopicIdUp() { + Collections.sort(this.completeTopicList, new SortByTopicId()); + filter(); + } + public void sortByTopicIdDown() { + Collections.sort(this.completeTopicList, new SortByTopicId()); + Collections.reverse(this.completeTopicList); + filter(); + } + + public void sortByLastModifiedUp() { + Collections.sort(this.completeTopicList, new SortByLastModified()); + filter(); + } public void sortByLastModifiedDown() { - //Collections.sort(this.completeTopicList, new SortByLastModified()); - //Collections.reverse(this.completeTopicList); + Collections.sort(this.completeTopicList, new SortByLastModified()); + Collections.reverse(this.completeTopicList); filter(); } + public void sortByNameChUp() { + Collections.sort(this.completeTopicList, new SortByNameCh()); + filter(); + } + public void sortByNameChDown() { + Collections.sort(this.completeTopicList, new SortByNameCh()); + Collections.reverse(this.completeTopicList); + filter(); + } + public void sortByNameEnUp() { + Collections.sort(this.completeTopicList, new SortByNameEn()); + filter(); + } + + public void sortByNameEnDown() { + Collections.sort(this.completeTopicList, new SortByNameEn()); + Collections.reverse(this.completeTopicList); + filter(); + } + + public void sortByNamePinyinUp() { + Collections.sort(this.completeTopicList, new SortByNamePinyin()); + filter(); + } + + public void sortByNamePinyinDown() { + Collections.sort(this.completeTopicList, new SortByNamePinyin()); + Collections.reverse(this.completeTopicList); + filter(); + } + public void sortByDescriptionUp() { + Collections.sort(this.completeTopicList, new SortByDescription()); + filter(); + } + + public void sortByDescriptionDown() { + Collections.sort(this.completeTopicList, new SortByDescription()); + Collections.reverse(this.completeTopicList); + filter(); + } + + // ---- public List getCompleteTopicList() { return completeTopicList; diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/SortByDescription.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/SortByDescription.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.topicList; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.bo.LGTopic; + +public class SortByDescription implements Comparator{ + + public int compare(LGTopic o1, LGTopic o2) { + if(o1.getDescription() == null || o2.getDescription() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getDescription().compareTo(o2.getDescription()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/SortByLastModified.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/SortByLastModified.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.topicList; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.bo.LGTopic; + +public class SortByLastModified implements Comparator{ + + public int compare(LGTopic o1, LGTopic o2) { + if(o1.getLastChangeDate() == null || o2.getLastChangeDate() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getLastChangeDate().compareTo(o2.getLastChangeDate()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/SortByNameCh.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/SortByNameCh.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.topicList; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.bo.LGTopic; + +public class SortByNameCh implements Comparator{ + + public int compare(LGTopic o1, LGTopic o2) { + if(o1.getNameCh() == null || o2.getNameCh() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getNameCh().compareTo(o2.getNameCh()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/SortByNameEn.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/SortByNameEn.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.topicList; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.bo.LGTopic; + +public class SortByNameEn implements Comparator{ + + public int compare(LGTopic o1, LGTopic o2) { + if(o1.getNameEn() == null || o2.getNameEn() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getNameEn().compareTo(o2.getNameEn()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/SortByNamePinyin.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/SortByNamePinyin.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.topicList; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.bo.LGTopic; + +public class SortByNamePinyin implements Comparator{ + + public int compare(LGTopic o1, LGTopic o2) { + if(o1.getNamePinyin() == null || o2.getNamePinyin() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getNamePinyin().compareTo(o2.getNamePinyin()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/SortByTopicId.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/SortByTopicId.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.topicList; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.bo.LGTopic; + +public class SortByTopicId implements Comparator{ + + public int compare(LGTopic o1, LGTopic o2) { + if(o1.getId() == null || o2.getId() == null){ + return 1; + } + return o1.getId().compareTo(o2.getId()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByAdminType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByAdminType.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,16 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + + +public class SortContentByAdminType implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getAdmin_type().compareTo(o2.getSection().getBook().getAdmin_type()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByBookId.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByBookId.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + +public class SortContentByBookId implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getId().compareTo(o2.getSection().getBook().getId()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByBookName.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByBookName.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,16 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; +import de.mpiwg.gazetteer.db.DBSection; + +public class SortContentByBookName implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getName().compareTo(o2.getSection().getBook().getName()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByDynasty.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByDynasty.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,16 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; +import de.mpiwg.gazetteer.db.DBSection; + +public class SortContentByDynasty implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getDynasty().compareTo(o2.getSection().getBook().getDynasty()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentById.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentById.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,12 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + +public class SortContentById implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + return o1.getId().compareTo(o2.getId()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByInx.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByInx.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,16 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + + +public class SortContentByInx implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getInx() == null || o2.getInx() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getInx().compareTo(o2.getInx()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByLevel1.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByLevel1.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,16 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; +import de.mpiwg.gazetteer.db.DBSection; + +public class SortContentByLevel1 implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getLevel1().compareTo(o2.getSection().getBook().getLevel1()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByLevel2.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByLevel2.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,15 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + +public class SortContentByLevel2 implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getLevel2().compareTo(o2.getSection().getBook().getLevel2()); + } +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByPeriod.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByPeriod.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,16 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + +public class SortContentByPeriod implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getBook().getPeriod().compareTo(o2.getSection().getBook().getPeriod()); + } + +} diff -r bc0219c2600b -r 90d5e86c157d src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByStartPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByStartPage.java Wed May 25 11:11:32 2016 +0200 @@ -0,0 +1,17 @@ +package de.mpiwg.web.fullTextSearch; + +import java.util.Comparator; + +import de.mpiwg.gazetteer.db.DBContents; + +public class SortContentByStartPage implements Comparator{ + + public int compare(DBContents o1, DBContents o2) { + if(o1.getSection() == null || o2.getSection() == null){ + return o1.getId().compareTo(o2.getId()); + } + return o1.getSection().getStart_page().compareTo(o2.getSection().getStart_page()); + } + + +} diff -r bc0219c2600b -r 90d5e86c157d src/main/resources/hibernate.cfg.xml --- a/src/main/resources/hibernate.cfg.xml Mon May 09 16:02:32 2016 +0200 +++ b/src/main/resources/hibernate.cfg.xml Wed May 25 11:11:32 2016 +0200 @@ -14,6 +14,7 @@ org.hibernate.dialect.MySQLDialect --> com.mysql.jdbc.Driver + jdbc:mysql://localhost/LGServices?characterEncoding=UTF-8 root diff -r bc0219c2600b -r 90d5e86c157d src/main/webapp/pages/branchPage.jsp --- a/src/main/webapp/pages/branchPage.jsp Mon May 09 16:02:32 2016 +0200 +++ b/src/main/webapp/pages/branchPage.jsp Wed May 25 11:11:32 2016 +0200 @@ -55,6 +55,23 @@ dialog.dialog( "open" ); }); }); + + + function updatePage() { + var text = getCookie(); + + if (text == "1") { + setCookie("0"); + setAction('forceReloadBranch', 'branchForm'); + + document.forms['branchForm'].submit(); + } + + setTimeout(updatePage, 1000); + } + updatePage(); + + diff -r bc0219c2600b -r 90d5e86c157d src/main/webapp/pages/home.jsp --- a/src/main/webapp/pages/home.jsp Mon May 09 16:02:32 2016 +0200 +++ b/src/main/webapp/pages/home.jsp Wed May 25 11:11:32 2016 +0200 @@ -4,13 +4,14 @@ <%@page import="de.mpiwg.gazetteer.db.DBSection"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - + - - - - + +
- +
- - <% if(sessionBean.getUser() == null) { %> - - <% } else { - - if (sessionBean.getHomePage().getCompleteBranchList() == null){ - sessionBean.getHomePage().loadParameters(request, response); - //sessionBean.getHomePage().reloadBranches(); - } - sessionBean.getHomePage().reloadBranches(); - + + <% + if (sessionBean.getUser() == null) { + %> + + <% + } else { + + if (sessionBean.getHomePage().getCompleteBranchList() == null) { + sessionBean.getHomePage().loadParameters(request, response); + //sessionBean.getHomePage().reloadBranches(); + } + sessionBean.getHomePage().reloadBranches(); + %> + + <% + if (sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { + %> + + <% + } else { + %> - - - - - <% if(sessionBean.getHomePage().getCompleteBranchList().isEmpty()) { %> - - <% } else { %> - -
- - -
Your Tasks - - -

You have <%= sessionBean.getHomePage().getBranchNumber() %> tasks.

-

<%= (StringUtils.isNotEmpty(sessionBean.getHomePage().getFilteringMessage())) ? sessionBean.getHomePage().getFilteringMessage() : ""%>

-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - <% for (LGBranch branch : sessionBean.getHomePage().getDisplayBranchList() ) { - %> - - - - - - - - - - - - - - - - - - - - - - - + + + + + +
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - -
- - - -
- -
- -
-
-
- - - - - - - - - -
- - - -
- -
- -
-
- - - -
-
- - - - - - -
- - - -
- -
- -
-
-
- - - - - - -
- - - -
- -
- -
-
- -
<%=branch.getBook().getId() %><%=branch.getBook().getName() %><%=branch.getBook().getLevel1() %><%=branch.getBook().getLevel2() %><%=branch.getBook().getDynasty() %><%=branch.getBook().getPeriod() %><%=branch.getBook().getAdmin_type() %><%=branch.getSection().getName() %> - <% if (branch.isDeprecated()) { %> - - <% } %> - <%=branch.getSection().getPages() %><%=branch.getLabel() %> - - <% for(String contributor : branch.getContributorsNameList()) { %> - - <% } %> -
-
<%=branch.getFomattedLastChange() %> - - - - - <%= (branch.isPublished()) ? "V":"" %> - - - - - - - <% if(branch.getSection().getTopicSectionRelation() != null && !branch.getSection().getTopicSectionRelation().isEmpty()) { %> - Already in topic: - - <% for(LGTopicSectionRelation relation : branch.getSection().getTopicSectionRelation()) { %> + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+
+
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+
+
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+
+
+ + + + + + + + + +
+ + + + - + +
+
- - -
<%=relation.getTopic().info() %>
+
+
+
+
+
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+
+
+ + + + + + + + + +
+ + + - + + + +
- - - - - +
+
+
+
+
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+
+
+ + + + - - - - - - - - <% } %> - -
+ + + + + + - <% } %> -
+
- <% } %> - - - -
- -
+
+
+
+ + + + + + + +
+ + + + + + + +
+
+
+
+ + + + + + + + + + + +
+ + + + + + + +
+
+
+
+
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+ + + + + + + + + +
+ + + + + + + +
+
+
+
+ + + + + + + -
- - - - - - -
- <% } %> - <% } %> + <% + for (LGBranch branch : sessionBean.getHomePage() + .getDisplayBranchList()) { + %> + + <%=branch.getBook().getId()%> + <%=branch.getBook().getName()%> + <%=branch.getBook().getLevel1()%> + <%=branch.getBook().getLevel2()%> + <%=branch.getBook().getDynasty()%> + <%=branch.getBook().getPeriod()%> + <%=branch.getBook().getAdmin_type()%> + <%=branch.getSection().getName()%> <% + if (branch.isDeprecated()) { + %> + <% + } + %> + <%=branch.getSection().getPages()%> + + <%=branch.getLabel()%> + + + <% + for (String contributor : branch + .getContributorsNameList()) { + %> + + + + <% + } + %> +
+ + <%=branch.getFomattedLastChange()%> + + + + + <%=(branch.isPublished()) ? "V" : ""%> + + + + + + + + + <% + if (branch.getSection().getTopicSectionRelation() != null + && !branch.getSection() + .getTopicSectionRelation().isEmpty()) { + %> + Already in topic: + + <% + for (LGTopicSectionRelation relation : branch + .getSection().getTopicSectionRelation()) { + %> + + + + + <% + } + %> +
+ + + + +
<%=relation.getTopic().info()%>
+
+ +
<% + } + %> + + + + + + + + + + <% + } + %> + + + +
+ + + + + + + + <% + } + %> + <% + } + %> - + \ No newline at end of file diff -r bc0219c2600b -r 90d5e86c157d src/main/webapp/pages/topicPage.jsp --- a/src/main/webapp/pages/topicPage.jsp Mon May 09 16:02:32 2016 +0200 +++ b/src/main/webapp/pages/topicPage.jsp Wed May 25 11:11:32 2016 +0200 @@ -60,7 +60,8 @@ $( "#addContributors" ).button().on( "click", function() { dialog.dialog( "open" ); }); - }); + }); + diff -r bc0219c2600b -r 90d5e86c157d src/main/webapp/resources/js/proxyMethods.js --- a/src/main/webapp/resources/js/proxyMethods.js Mon May 09 16:02:32 2016 +0200 +++ b/src/main/webapp/resources/js/proxyMethods.js Wed May 25 11:11:32 2016 +0200 @@ -55,4 +55,23 @@ input.value = userId; theForm.appendChild(input); setAction(action, formName); -} \ No newline at end of file +} + +function setCookie(value) { + document.cookie = "saveTextToLGService=" + value + "; path=/LGServices/pages"; + return true; +} +function getCookie() { + var cname = "saveTextToLGService="; + var ca = document.cookie.split(';'); + + for (var i=0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(cname) == 0) { + return c.substring(cname.length, c.length); + } + } + return null; +} +