updates for menu management and internal institutional class
This commit is contained in:
parent
d170336432
commit
21c8f4990d
8 changed files with 119 additions and 48 deletions
|
@ -26,22 +26,22 @@ var menuManagementEdit = {
|
|||
});
|
||||
},
|
||||
showClassGroups: function() {
|
||||
if(!this.existingContentType.hasClass("hide")) {
|
||||
this.existingContentType.addClass("hide");
|
||||
this.selectClassesMessage.addClass("hide");
|
||||
this.classesForClassGroup.addClass("hide");
|
||||
if(!this.existingContentType.hasClass("hidden")) {
|
||||
this.existingContentType.addClass("hidden");
|
||||
this.selectClassesMessage.addClass("hidden");
|
||||
this.classesForClassGroup.addClass("hidden");
|
||||
}
|
||||
this.selectContentType.removeClass("hide");
|
||||
this.selectContentType.removeClass("hidden");
|
||||
|
||||
},
|
||||
hideClassGroups: function() {
|
||||
if(!this.selectContentType.hasClass("hide")) {
|
||||
if(!this.selectContentType.hasClass("hidden")) {
|
||||
|
||||
this.selectContentType.addClass("hide");
|
||||
this.selectContentType.addClass("hidden");
|
||||
}
|
||||
this.existingContentType.removeClass("hide");
|
||||
this.selectClassesMessage.removeClass("hide");
|
||||
this.classesForClassGroup.removeClass("hide");
|
||||
this.existingContentType.removeClass("hidden");
|
||||
this.selectClassesMessage.removeClass("hidden");
|
||||
this.classesForClassGroup.removeClass("hidden");
|
||||
},
|
||||
chooseClassGroup: function() {
|
||||
|
||||
|
@ -56,13 +56,13 @@ var menuManagementEdit = {
|
|||
} else {
|
||||
//update existing content type with correct class group name and hide class group select again
|
||||
var _this = menuManagementEdit;
|
||||
_this.hideClassGroups();
|
||||
menuManagementEdit.hideClassGroups();
|
||||
|
||||
_this.selectedGroupForPage.html(results.classGroupName);
|
||||
menuManagementEdit.selectedGroupForPage.html(results.classGroupName);
|
||||
//retrieve classes for class group and display with all selected
|
||||
_this.classesForClassGroup.empty();
|
||||
_this.classesForClassGroup.append("<ul id='selectedClasses' name='selectedClasses'>");
|
||||
_this.classesForClassGroup.append('<li class="ui-state-default">' +
|
||||
menuManagementEdit.classesForClassGroup.empty();
|
||||
menuManagementEdit.classesForClassGroup.append('<ul id="selectedClasses" name="selectedClasses">');
|
||||
menuManagementEdit.classesForClassGroup.append('<li class="ui-state-default">' +
|
||||
'<input type="checkbox" name="allSelected" id="allSelected" value="all" checked/>' +
|
||||
'<label class="inline" for="All"> All</label>' +
|
||||
'</li>');
|
||||
|
@ -75,7 +75,7 @@ var menuManagementEdit = {
|
|||
'<label class="inline" for="' + thisClassName + '"> ' + thisClassName + '</label>' +
|
||||
'</li>');
|
||||
});
|
||||
_this.classesForClassGroup.append("</ul>");
|
||||
menuManagementEdit.classesForClassGroup.append("</ul>");
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
<#--
|
||||
Institutional Internal Class Form
|
||||
Associated with generator:
|
||||
edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.InstitutionalInternalClassForm
|
||||
edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.InstitutionalInternalClassForm.
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<h2>Lorem ipsum dolor sit amet</h2>
|
||||
<h2>Set up Institutional Internal Class</h2>
|
||||
|
||||
<form class="editForm" action = "${editConfiguration.submitToUrl}">
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<#-- some additional processing here which shows or hides the class group selection and classes based on initial action-->
|
||||
<#assign existingClassGroupStyle = " " />
|
||||
<#assign selectClassGroupStyle = 'class="hide"' />
|
||||
<#assign selectClassGroupStyle = 'class="hidden"' />
|
||||
<#if menuAction = "Add">
|
||||
<#assign existingClassGroupStyle = 'class="hide"' />
|
||||
<#assign existingClassGroupStyle = 'class="hidden"' />
|
||||
<#assign selectClassGroupStyle = " " />
|
||||
</#if>
|
||||
|
||||
|
@ -65,8 +65,8 @@
|
|||
</section>
|
||||
|
||||
<#-- Select classes in a class group -->
|
||||
<p id="selectClassesMessage" name="selectClassesMessage">Select content to display</p>
|
||||
<section id="classesInSelectedGroup" name="classesInSelectedGroup">
|
||||
<p id="selectClassesMessage" name="selectClassesMessage" ${existingClassGroupStyle}>Select content to display</p>
|
||||
<section id="classesInSelectedGroup" name="classesInSelectedGroup" ${existingClassGroupStyle}>
|
||||
|
||||
<ul id="selectedClasses" name="selectedClasses">
|
||||
<#--Adding a default class for "ALL" in case all classes selected-->
|
||||
|
@ -76,7 +76,15 @@
|
|||
</li>
|
||||
<#list classGroup as classInClassGroup>
|
||||
<li class="ui-state-default">
|
||||
<input type="checkbox" id="classInClassGroup" name="classInClassGroup" value="${classInClassGroup.URI}" <#if includeAllClasses = true>checked</#if> />
|
||||
<input type="checkbox" id="classInClassGroup" name="classInClassGroup" value="${classInClassGroup.URI}"
|
||||
<#if includeAllClasses = true>checked</#if> />
|
||||
<#if isIndividualsForClassesPage?has_content>
|
||||
<#list includeClasses as includeClass>
|
||||
<#if includeClass = classInClassGroup.URI>
|
||||
checked
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
<label class="inline" for="${classInClassGroup.name}"> ${classInClassGroup.name}</label>
|
||||
<span class="ui-icon-sortable"></span> <#--sortable icon for dragging and dropping menu items-->
|
||||
</li>
|
||||
|
@ -84,6 +92,22 @@
|
|||
</ul>
|
||||
</section>
|
||||
|
||||
<#if internalClass?has_content>
|
||||
<#assign enableInternalClass = '<p>To enable this option, you must first select an institutional internal class for your instance</p>' />
|
||||
<#assign disableClass = 'class="disable"' />
|
||||
<#else>
|
||||
<#assign enableInternalClass = '' />
|
||||
<#assign disableClass = '' />
|
||||
</#if>
|
||||
<input type="checkbox" ${disableClass} name="display-internalClass" value="${internalClass}" id="display-internalClass"
|
||||
<#if pageInternalOnly?has_content>
|
||||
checked
|
||||
</#if>
|
||||
/>
|
||||
<label ${disableClass} for="display-internalClass}">Only display ${associatedPage} within my institution</label>
|
||||
${enableInternalClass}
|
||||
|
||||
|
||||
<input type="submit" name="submit-${menuAction}" value="Save changes" class="submit" /> or <a class="cancel" href="${formUrls}">Cancel</a>
|
||||
|
||||
<p class="requiredHint">* required fields</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue