Mercurial > hg > LGServices
comparison src/main/webapp/pages/createFile.jsp @ 95:b27a99201cbe
New feature: new full text search with MySQL ngram parser (5.7.6 above)
author | Calvin Yeh <cyeh@mpipw-berlin.mpg.com> |
---|---|
date | Mon, 03 Jul 2017 23:48:53 +0200 |
parents | 3e62083dbcbf |
children |
comparison
equal
deleted
inserted
replaced
94:d0dcbe8254f5 | 95:b27a99201cbe |
---|---|
7 <html> | 7 <html> |
8 | 8 |
9 <head> | 9 <head> |
10 | 10 |
11 <jsp:include page="../componentes/headContent.jsp"/> | 11 <jsp:include page="../componentes/headContent.jsp"/> |
12 | 12 |
13 <script> | 13 <script> |
14 $(function() { | 14 $(function() { |
15 $("#sectionId").autocomplete({ | 15 $("#sectionId").autocomplete({ |
16 source : function(request, response) { | 16 source : function(request, response) { |
17 $.ajax({ | 17 $.ajax({ |
20 dataType : "json", | 20 dataType : "json", |
21 data : { | 21 data : { |
22 term : request.term | 22 term : request.term |
23 }, | 23 }, |
24 success : function(data) { | 24 success : function(data) { |
25 | 25 |
26 response($.map(data, function(item) { | 26 response($.map(data, function(item) { |
27 return { | 27 return { |
28 label : item.name, | 28 label : item.name, |
29 value : item.value, | 29 value : item.value, |
30 } | 30 } |
35 } | 35 } |
36 }); | 36 }); |
37 }, | 37 }, |
38 minLength : 0 | 38 minLength : 0 |
39 }); | 39 }); |
40 }); | 40 }); |
41 </script> | 41 </script> |
42 | 42 |
43 | 43 |
44 </head> | 44 </head> |
45 | 45 |
46 <body> | 46 <body> |
47 | 47 |
48 <jsp:include page="../componentes/template.jsp"/> | 48 <jsp:include page="../componentes/template2.jsp"/> |
49 | 49 |
50 <div id="page"> | 50 <div id="page"> |
51 | 51 |
52 <% if(sessionBean.getUser() == null) { %> | 52 <% if(sessionBean.getUser() == null) { %> |
53 <label>You must login!</label> | 53 <label class="subTitel">Please login or create a new account above</label> |
54 <% } else { %> | 54 <% } else { %> |
55 | 55 |
56 <label class="subTitel">Create New File (Branch)</label> | 56 <label class="subTitel">Create New File (Branch)</label> |
57 | 57 |
58 <form name="createFileForm" | 58 <form name="createFileForm" |
59 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" | 59 action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" |
60 method="post" | 60 method="post" |
61 class="contentForm"> | 61 class="contentForm"> |
62 <input name="bean" type="hidden" value="createFileBean" /> | 62 <input name="bean" type="hidden" value="createFileBean" /> |
63 | 63 |
64 <table style="width: 300px; margin-left: auto;margin-right: auto;"> | 64 <table style="width: 300px; margin-left: auto;margin-right: auto;"> |
65 <tr> | 65 <tr> |
66 <td><label>Section Id</label></td> | 66 <td><label>Section Id</label></td> |
67 <td> | 67 <td> |
68 <input | 68 <input |
69 id="sectionId" | 69 id="sectionId" |
70 name="sectionId" | 70 name="sectionId" |
71 type="text" | 71 type="text" |
72 class="searchInput" | 72 class="searchInput" |
73 value="<%=(sessionBean.getCreateFilePage().getSectionId() == null) ? "" : sessionBean.getCreateFilePage().getSectionId()%>" | 73 value="<%=(sessionBean.getCreateFilePage().getSectionId() == null) ? "" : sessionBean.getCreateFilePage().getSectionId()%>" |
74 style="width: 150px;" /> | 74 style="width: 150px;" /> |
75 </td> | 75 </td> |
76 <td> | 76 <td> |
77 <input type="submit" value="Load" onclick="setAction('loadSection', 'createFileForm');"/> | 77 <input type="submit" value="Load" onclick="setAction('loadSection', 'createFileForm');"/> |
78 </td> | 78 </td> |
79 </tr> | 79 </tr> |
80 </table> | 80 </table> |
81 | 81 |
82 <% if(sessionBean.getCreateFilePage().getSection() != null) { %> | 82 <% if(sessionBean.getCreateFilePage().getSection() != null) { %> |
83 | 83 |
84 <table style="width: 300px; margin-left: auto;margin-right: auto;"> | 84 <table style="width: 300px; margin-left: auto;margin-right: auto;"> |
85 <tr> | 85 <tr> |
86 <td><label>Section Name</label></td> | 86 <td><label>Section Name</label></td> |
87 <td><label><%= sessionBean.getCreateFilePage().getSection().getName() %></label></td> | 87 <td><label><%= sessionBean.getCreateFilePage().getSection().getName() %></label></td> |
88 </tr> | 88 </tr> |
98 <td><label>Text</label></td> | 98 <td><label>Text</label></td> |
99 <td> | 99 <td> |
100 <textarea rows=20" cols="70"> | 100 <textarea rows=20" cols="70"> |
101 <%=sessionBean.getCreateFilePage().getSection().getText() %> | 101 <%=sessionBean.getCreateFilePage().getSection().getText() %> |
102 </textarea> | 102 </textarea> |
103 | 103 |
104 </td> | 104 </td> |
105 </tr> | 105 </tr> |
106 <tr> | 106 <tr> |
107 <td></td> | 107 <td></td> |
108 <td> | 108 <td> |
109 <input type="submit" | 109 <input type="submit" |
110 value="Create" | 110 value="Create" |
111 title="Create Branch in Extraction Interface" | 111 title="Create Branch in Extraction Interface" |
112 onclick="sectionInExtractionInterface(<%=sessionBean.getCreateFilePage().getSectionId() %>, '<%=sessionBean.getCreateFilePage().getSection().getName()%>', <%=sessionBean.getCreateFilePage().getSection().getBook().getId() %>, '<%=sessionBean.getCreateFilePage().getSection().getBook().getName() %>', <%=sessionBean.getUser().getId() %>, '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl() %>');"/> | 112 onclick="sectionInExtractionInterface(<%=sessionBean.getCreateFilePage().getSectionId() %>, '<%=sessionBean.getCreateFilePage().getSection().getName()%>', <%=sessionBean.getCreateFilePage().getSection().getBook().getId() %>, '<%=sessionBean.getCreateFilePage().getSection().getBook().getName() %>', <%=sessionBean.getUser().getId() %>, '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl() %>');"/> |
113 | 113 |
114 <input type="submit" value="Reset" onclick="setAction('reset', 'createFileForm');"/> | 114 <input type="submit" value="Reset" onclick="setAction('reset', 'createFileForm');"/> |
115 </td> | 115 </td> |
116 </tr> | 116 </tr> |
117 </table> | 117 </table> |
118 | 118 |
119 | 119 |
120 <% } %> | 120 <% } %> |
121 | 121 |
122 </form> | 122 </form> |
123 <% } %> | 123 <% } %> |
124 | 124 |
125 </div> | 125 </div> |
126 | 126 |
127 </body> | 127 </body> |