Skip to content

Commit 612b47a

Browse files
SilverDavmmoqui
authored andcommitted
Feature #13573 : See also: improve display order of the publications
1 parent 3d3c77e commit 612b47a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

kmelia/kmelia-war/src/main/webapp/kmelia/jsp/publicationLinksManager.jsp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
<script type="text/javascript" src="<%=m_context %>/util/javaScript/treeMenu/menu.js"></script>
6464

6565
<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%>';
7373
function buildTree() {
7474
//create a new tree:
7575
tree = new YAHOO.widget.TreeView("treeDiv1");
@@ -80,15 +80,15 @@
8080
8181
//add child nodes for tree; our top level nodes are
8282
try{
83-
var mes = [];
83+
var mes;
8484
mes =YAHOO.lang.JSON.stringify(<%=TreeHandler.processMenu(request,MenuConstants.SEE_ALSO_MENU_TYPE, true)%>);
8585
mes = YAHOO.lang.JSON.parse(mes);
8686
}catch(x){
8787
notyError("JSON Parse failed: "+x);
8888
return;
8989
}
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);
9292
tempNode.multiExpand =false;
9393
}
9494
//render tree with these toplevel nodes; all descendants of these nodes
@@ -141,7 +141,7 @@
141141
}
142142
143143
function doPagination(index, nbItemsPerPage){
144-
var ieFix = new Date().getTime();
144+
const ieFix = new Date().getTime();
145145
$.get(getWebContext()+'/RAjaxPublicationsListServlet', {PubId:pubId,Index:index,NbItemsPerPage:nbItemsPerPage,ComponentId:currentComponent,ToLink:1,Sort:currentSort,IEFix:ieFix},
146146
function(data){
147147
$('#pubList').html(data);
@@ -154,7 +154,7 @@
154154
}
155155
156156
function displayPublications(CompoId,topicId){
157-
var ieFix = new Date().getTime();
157+
const ieFix = new Date().getTime();
158158
$.get(getWebContext()+'/RAjaxPublicationsListServlet', {PubId:pubId,ComponentId:CompoId,TopicToLinkId:topicId,ToLink:1,Sort:currentSort,IEFix:ieFix},
159159
function(data){
160160
$('#pubList').html(data);
@@ -163,14 +163,14 @@
163163
164164
function sendPubId(pubId,checked){
165165
166-
var action;
166+
let action;
167167
168168
if(checked){
169169
action="Action=bindToPub";
170170
}else{
171171
action="Action=unbindToPub";
172172
}
173-
var ieFix = new Date().getTime();
173+
const ieFix = new Date().getTime();
174174
$.get(getWebContext()+'/KmeliaAJAXServlet?'+action, {TopicToLinkId:pubId,IEFix:ieFix});
175175
}
176176
@@ -179,7 +179,7 @@
179179
}
180180
181181
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") %>';
183183
}
184184
185185
function showPublicationOperations() {

0 commit comments

Comments
 (0)