Update for menu management: correct url forwarding from edit request dispatch, updates to javascript for checking all classes when new content type selected, and editing
This commit is contained in:
parent
1dacb70669
commit
e6f4c2a861
6 changed files with 83 additions and 14 deletions
|
@ -31,7 +31,7 @@
|
|||
if(request.getParameter("switchToDisplayModel") != null) {
|
||||
//forward to Edit Request Dispatch Controller
|
||||
String queryString = request.getQueryString();
|
||||
response.sendRedirect("http://localhost:8080/vivo/editRequestDispatch?" + queryString);
|
||||
response.sendRedirect(request.getContextPath() + "/editRequestDispatch?" + queryString);
|
||||
}
|
||||
|
||||
// Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, predicateUriJson in request
|
||||
|
|
|
@ -30,8 +30,8 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
//forward to Edit Request Dispatch Controller
|
||||
String queryString = request.getQueryString();
|
||||
//Instead of edit request which is what we'll do later, here we'll forward to Menu Management Controller
|
||||
//response.sendRedirect("http://localhost:8080/vivo/editRequestDispatch?" + queryString);
|
||||
response.sendRedirect("http://localhost:8080/vivo/editDisplayModel?" + queryString);
|
||||
//response.sendRedirect("editRequestDispatch?" + queryString);
|
||||
response.sendRedirect(request.getContextPath() + "/editDisplayModel?" + queryString);
|
||||
}
|
||||
/*
|
||||
Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, and predicateUriJson in request.
|
||||
|
|
|
@ -63,14 +63,15 @@ var menuManagementEdit = {
|
|||
_this.classesForClassGroup.empty();
|
||||
_this.classesForClassGroup.append("<ul id='selectedClasses' name='selectedClasses'>");
|
||||
_this.classesForClassGroup.append('<li class="ui-state-default">' +
|
||||
'<input type="checkbox" name="allSelected" id="allSelected" value="all" checked</#if>' +
|
||||
'<input type="checkbox" name="allSelected" id="allSelected" value="all" checked/>' +
|
||||
'<label class="inline" for="All"> All</label>' +
|
||||
'</li>');
|
||||
$.each(results.classes, function(i, item) {
|
||||
var thisClass = results.classes[i];
|
||||
var thisClassName = thisClass.name;
|
||||
//When first selecting new content type, all classes should be selected
|
||||
menuManagementEdit.classesForClassGroup.append(' <li class="ui-state-default">' +
|
||||
'<input type="checkbox" name="classInClassGroup" value="' + thisClass.URI + '" />' +
|
||||
'<input type="checkbox" checked name="classInClassGroup" value="' + thisClass.URI + '" />' +
|
||||
'<label class="inline" for="' + thisClassName + '"> ' + thisClassName + '</label>' +
|
||||
'</li>');
|
||||
});
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
<section>
|
||||
<form method="POST" action="${formUrls}">
|
||||
<input type="hidden" name="cmd" id="cmd" value="${menuAction}"/>
|
||||
<input type="hidden" name="menuItem" id="menuItem" value="${menuItem}"/>
|
||||
<input type="hidden" name="switchToDisplayModel" id="switchToDisplayModel" value="true"/>
|
||||
|
||||
<legend>${menuAction} menu item</legend>
|
||||
|
||||
<label for="menu-name">Name *</label>
|
||||
|
@ -76,7 +79,7 @@
|
|||
</li>
|
||||
<#list classGroup as classInClassGroup>
|
||||
<li class="ui-state-default">
|
||||
<input type="checkbox" name="classInClassGroup" value="${classInClassGroup.URI}"
|
||||
<input type="checkbox" id="classInClassGroup" name="classInClassGroup" value="${classInClassGroup.URI}"
|
||||
<#if includeAllClasses = true>checked</#if> />
|
||||
<label class="inline" for="${classInClassGroup.name}"> ${classInClassGroup.name}</label>
|
||||
<span class="ui-icon-sortable"></span> <#--sortable icon for dragging and dropping menu items-->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue