|
63 | 63 | <script type="text/javascript" src="<%=m_context %>/util/javaScript/treeMenu/menu.js"></script>
|
64 | 64 |
|
65 | 65 | <script type="text/javascript">
|
66 |
| - var context ='<%=m_context %>'; |
67 |
| - var currentNodeId; |
68 |
| - var currentNodeIndex; |
69 |
| - var currentComponent; |
70 |
| - var pubId = '<%=pubId%>'; |
71 |
| - var currentSort = <%=KmeliaPublicationSort.SORT_TITLE_ASC%>; |
72 |
| - var menuType='<%=MenuConstants.SEE_ALSO_MENU_TYPE%>'; |
| 66 | + const context ='<%=m_context %>'; |
| 67 | + let currentNodeId; |
| 68 | + let currentNodeIndex; |
| 69 | + let currentComponent; |
| 70 | + const pubId = '<%=pubId%>'; |
| 71 | + let currentSort = <%=KmeliaPublicationSort.SORT_TITLE_ASC%>; |
| 72 | + const menuType='<%=MenuConstants.SEE_ALSO_MENU_TYPE%>'; |
73 | 73 | function buildTree() {
|
74 | 74 | //create a new tree:
|
75 | 75 | tree = new YAHOO.widget.TreeView("treeDiv1");
|
|
80 | 80 |
|
81 | 81 | //add child nodes for tree; our top level nodes are
|
82 | 82 | try{
|
83 |
| - var mes = []; |
| 83 | + var mes; |
84 | 84 | mes =YAHOO.lang.JSON.stringify(<%=TreeHandler.processMenu(request,MenuConstants.SEE_ALSO_MENU_TYPE, true)%>);
|
85 | 85 | mes = YAHOO.lang.JSON.parse(mes);
|
86 | 86 | }catch(x){
|
87 | 87 | notyError("JSON Parse failed: "+x);
|
88 | 88 | return;
|
89 | 89 | }
|
90 |
| - for (var i=0, j=mes.length; i<j; i++) { |
91 |
| - var tempNode = new YAHOO.widget.TextNode(mes[i], root, false); |
| 90 | + for (let i=0, j=mes.length; i<j; i++) { |
| 91 | + const tempNode = new YAHOO.widget.TextNode(mes[i], root, false); |
92 | 92 | tempNode.multiExpand =false;
|
93 | 93 | }
|
94 | 94 | //render tree with these toplevel nodes; all descendants of these nodes
|
|
141 | 141 | }
|
142 | 142 |
|
143 | 143 | function doPagination(index, nbItemsPerPage){
|
144 |
| - var ieFix = new Date().getTime(); |
| 144 | + const ieFix = new Date().getTime(); |
145 | 145 | $.get(getWebContext()+'/RAjaxPublicationsListServlet', {PubId:pubId,Index:index,NbItemsPerPage:nbItemsPerPage,ComponentId:currentComponent,ToLink:1,Sort:currentSort,IEFix:ieFix},
|
146 | 146 | function(data){
|
147 | 147 | $('#pubList').html(data);
|
|
154 | 154 | }
|
155 | 155 |
|
156 | 156 | function displayPublications(CompoId,topicId){
|
157 |
| - var ieFix = new Date().getTime(); |
| 157 | + const ieFix = new Date().getTime(); |
158 | 158 | $.get(getWebContext()+'/RAjaxPublicationsListServlet', {PubId:pubId,ComponentId:CompoId,TopicToLinkId:topicId,ToLink:1,Sort:currentSort,IEFix:ieFix},
|
159 | 159 | function(data){
|
160 | 160 | $('#pubList').html(data);
|
|
163 | 163 |
|
164 | 164 | function sendPubId(pubId,checked){
|
165 | 165 |
|
166 |
| - var action; |
| 166 | + let action; |
167 | 167 |
|
168 | 168 | if(checked){
|
169 | 169 | action="Action=bindToPub";
|
170 | 170 | }else{
|
171 | 171 | action="Action=unbindToPub";
|
172 | 172 | }
|
173 |
| - var ieFix = new Date().getTime(); |
| 173 | + const ieFix = new Date().getTime(); |
174 | 174 | $.get(getWebContext()+'/KmeliaAJAXServlet?'+action, {TopicToLinkId:pubId,IEFix:ieFix});
|
175 | 175 | }
|
176 | 176 |
|
|
179 | 179 | }
|
180 | 180 |
|
181 | 181 | function displayHomeMessage(){
|
182 |
| - document.getElementById('pubList').innerHTML = '<p align="center" ><%= kmeliaScc.getString("kmelia.linkManager.home.title")%></p> <p align="center"> <br><br><%=kmeliaScc.getString("kmelia.linkManager.home.description") %>'; |
| 182 | + document.getElementById('pubList').innerHTML = '<p align="center"><%= kmeliaScc.getString("kmelia.linkManager.home.title")%></p> <p align="center"> <br><br><%=kmeliaScc.getString("kmelia.linkManager.home.description") %>'; |
183 | 183 | }
|
184 | 184 |
|
185 | 185 | function showPublicationOperations() {
|
|
0 commit comments