page management related updates

This commit is contained in:
hjkhjk54 2012-06-15 22:14:09 +00:00
parent 7da1f47b62
commit f327e91a3c
12 changed files with 266 additions and 80 deletions

View file

@ -15,7 +15,19 @@ var processClassGroupDataGetterContent = {
//query model should also be an input, ensure class group URI is saved as URI and not string
var returnObject = {classGroup:classGroup, dataGetterClass:this.dataGetterClass};
return returnObject;
},
//For an existing set of content where form is already set, fill in the values
populatePageContentSection:function(existingContentObject, pageContentSection) {
var classGroupValue = existingContentObject["classGroup"];
pageContentSection.find("select[name='selectClassGroup']").val(classGroupValue);
},
//For the label of the content section for editing, need to add additional value
retrieveAdditionalLabelText:function(existingContentObject) {
//Right now return empty but can hook this into a hashmap with labels and uris
//set up in browse class group
return "";
}
}

View file

@ -19,6 +19,24 @@ var processIndividualsForClassesDataGetterContent = {
});
var returnObject = {classGroup:classGroup, classesSelectedInClassGroup:classesSelected, dataGetterClass:this.dataGetterClass};
return returnObject;
}
},
//For an existing set of content where form is already set, fill in the values
populatePageContentSection:function(existingContentObject, pageContentSection) {
var classGroupValue = existingContentObject["classGroup"];
var classesSelected = existingContenetObject["classesSelectedInClassGroup"];
var numberSelected = classesSelected.length;
var i;
for(i = 0; i < numberSelected; i++) {
var classSelected = classesSelected[i];
pageContentSection.find("input[name='classInClassGroup'][value='" + classSelected + "']").attr("checked", "checked");
}
pageContentSection.find("select[name='selectClassGroup']").val(classGroupValue);
},
//For the label of the content section for editing, need to add additional value
retrieveAdditionalLabelText:function(existingContentObject) {
//Right now return empty but can hook this into a hashmap with labels and uris
//set up in browse class group
return "";
}
}

View file

@ -17,6 +17,21 @@ var processSparqlDataGetterContent = {
//set query model to query model here - vitro:contentDisplayModel
var returnObject = {saveToVar:variableValue, query:queryValue, dataGetterClass:this.dataGetterClass, queryModel:queryModel};
return returnObject;
},
//For an existing set of content where form is already set, fill in the values
populatePageContentSection:function(existingContentObject, pageContentSection) {
var saveToVarValue = existingContentObject["saveToVar"];
var queryValue = existingContentObject["query"];
var queryModelValue = existingContentObject["queryModel"];
//Now find and set value
pageContentSection.find("input[name='saveToVar']").val(saveToVarValue);
pageContentSection.find("textarea[name='query']").val(queryValue);
pageContentSection.find("input[name='queryModel']").val(queryModelValue);
},
//For the label of the content section for editing, need to add additional value
retrieveAdditionalLabelText:function(existingContentObject) {
var saveToVarValue = existingContentObject["saveToVar"];
return saveToVarValue;
}

View file

@ -2,3 +2,4 @@
<#-- Scripts for class group browsing -->
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processClassGroupDataGetterContent.js"></script>')}
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processIndividualsForClassesDataGetterContent.js"></script>')}
<#--Setting up script with class group URIs and labels for editing purposes-->

View file

@ -16,7 +16,7 @@
<#--Existing Values For Editing condition-->
<#assign literalValues = editConfiguration.existingLiteralValues />
<#assign uriValues = editConfiguration.existingUriValues />
<#if menuAction == "Edit">
<#if menuAction = "Edit">
<#assign pageName = lvf.getFormFieldValue(editSubmission, editConfiguration, "pageName")/>
<#assign prettyUrl = lvf.getFormFieldValue(editSubmission, editConfiguration, "prettyUrl")/>
<#assign menuItem = lvf.getFormFieldValue(editSubmission, editConfiguration, "menuItem")/>
@ -76,10 +76,10 @@
<input type="text" name="prettyUrl" value="${prettyUrl!''}" role="input" />
<p class="note">Must begin with a leading forward slash: / (e.g., /people)</p>
<p style="margin-top:8px;margin-bottom:2px">Template<span class="requiredHint"> *</span></p>
<input type="radio" class="default-template" name="selectedTemplate" value="default" <#if selectedTemplateType = "default">checked</#if> role="radio" />
<input type="radio" class="default-template" name="selectedTemplate" value="default" <#if selectedTemplateType = "default">checked="checked"</#if> role="radio" />
<label class="inline" for="default"> Default</label>
<br />
<input type="radio" name="selectedTemplate" class="custom-template" value="custom" <#if selectedTemplateType = "custom">checked</#if> role="input" />
<input type="radio" name="selectedTemplate" class="custom-template" value="custom" <#if selectedTemplateType = "custom">checked="checked"</#if> role="input" />
<label class="inline" for="custom"> Custom template</label>
<section id="custom-template" <#if selectedTemplateType != 'custom'>class="hidden" </#if>role="region">
<input type="text" name="customTemplate" value="${customTemplate!''}" size="40" role="input" /><span class="requiredHint"> *</span>
@ -87,6 +87,7 @@
<p style="margin-top:10px;margin-bottom:0px"><input id="menuCheckbox" type="checkbox" name="menuCheckbox"> This is a menu page</p>
<section id="menu" role="region" style="margin-top:10px">
<label for="default">Menu Item Name</label>
<input type="hidden" id="menuItem" name="menuItem" value="${menuItem!''}" />
<input type="text" id="menuLinkText" name="menuLinkText" value="${menuLinkText!''}" size="28" role="input" />
<input type="text" id="menuPosition" name="menuPosition" value="${menuPosition!''}" />
<p class="note">If left blank, the page title will be used.</p>