diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/DisplayVocabulary.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/DisplayVocabulary.java index 4e23e7cba..708bff318 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/DisplayVocabulary.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/DisplayVocabulary.java @@ -130,11 +130,14 @@ public class DisplayVocabulary { public static final String HOME_MENU_ITEM = DISPLAY_NS + "HomeMenuItem"; - /* some URIs of properties used with the SPARQL DataGetter */ + /* some URIs of properties used with the SPARQL DataGetter, and save to var is saved for fixedHtml */ public static final String SAVE_TO_VAR = DISPLAY_NS + "saveToVar" ; public static final String QUERY_MODEL = DISPLAY_NS + "queryModel"; public static final String QUERY = DISPLAY_NS + "query"; + /* URI of property for Fixed HTML Generator */ + public static final String FIXED_HTML_VALUE = DISPLAY_NS + "htmlValue"; + //public static final Individual EVENTS = m_model.createIndividual( NS + "Events", PAGE ); //public static final Individual EVENTS_MENU_ITEM = m_model.createIndividual( NS + "EventsMenuItem", NAVIGATION_ELEMENT ); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManagePageGenerator.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManagePageGenerator.java index a873e3474..287099b78 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManagePageGenerator.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/ManagePageGenerator.java @@ -13,6 +13,7 @@ import javax.servlet.http.HttpSession; import com.hp.hpl.jena.ontology.OntModel; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder; import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; @@ -154,7 +155,7 @@ public class ManagePageGenerator extends BaseEditConfigurationGenerator implemen //For the case of a new page if(subjectUri == null) { //Once added, return to pageList - editConfiguration.setUrlToReturnTo("/pageList"); + editConfiguration.setUrlToReturnTo(UrlBuilder.getUrl("/pageList")); editConfiguration.setEntityToReturnTo("?page"); editConfiguration.setPredicateUri(predicateUri); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ManagePagePreprocessor.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ManagePagePreprocessor.java index 6bef8be20..632f5afce 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ManagePagePreprocessor.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/ManagePagePreprocessor.java @@ -180,10 +180,7 @@ public class ManagePagePreprocessor extends uriValuesSubmission = uriValues.toArray(uriValuesSubmission); //This adds literal, connecting the field with the value - submission.addLiteralToForm(editConfiguration, - editConfiguration.getField(submissionUriName), - submissionUriName, - uriValuesSubmission); + submission.addUriToForm(editConfiguration, submissionUriName, uriValuesSubmission); } //this needs to be different diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessClassGroupDataGetterN3.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessClassGroupDataGetterN3.java index f1070ef6e..fcbc2ff6e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessClassGroupDataGetterN3.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessClassGroupDataGetterN3.java @@ -18,7 +18,7 @@ import net.sf.json.JSONSerializer; //Returns the appropriate n3 based on data getter public class ProcessClassGroupDataGetterN3 extends ProcessDataGetterAbstract { private static String classType = "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData"; - + private static String classGroupVarBase = "classGroup"; public ProcessClassGroupDataGetterN3(){ } @@ -27,18 +27,28 @@ public class ProcessClassGroupDataGetterN3 extends ProcessDataGetterAbstract { //TODO: ensure correct model returned //We shouldn't use the ACTUAL values here but generate the n3 required public List retrieveN3Required(int counter) { - String dataGetterVar = getDataGetterVar(counter); - String n3 = dataGetterVar + " a <" + classType + ">; \n" + - "<" + DisplayVocabulary.FOR_CLASSGROUP + "> ?classGroup ."; - List requiredList = new ArrayList(); - requiredList.add(getPrefixes() + n3); - return requiredList; + return this.retrieveN3ForTypeAndClassGroup(counter); } public List retrieveN3Optional(int counter) { return null; } + public List retrieveN3ForTypeAndClassGroup(int counter) { + String n3ForType = this.getN3ForTypePartial(counter); + String n3 = n3ForType +"; \n" + + "<" + DisplayVocabulary.FOR_CLASSGROUP + "> " + getN3VarName(classGroupVarBase, counter) + " ."; + List n3List = new ArrayList(); + n3List.add(getPrefixes() + n3); + return n3List; + } + + public String getN3ForTypePartial(int counter) { + String dataGetterVar = getDataGetterVar(counter); + String n3 = dataGetterVar + " a <" + getClassType() + ">"; + return n3; + } + //These methods will return the literals and uris expected within the n3 //and the counter is used to ensure they are numbered correctly @@ -75,6 +85,10 @@ public class ProcessClassGroupDataGetterN3 extends ProcessDataGetterAbstract { return Arrays.asList("classGroup"); } + //This class can be extended so returning type here + public String getClassType() { + return classType; + } } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3.java index a69417d4c..97ca9df78 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3.java @@ -10,7 +10,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; //Returns the appropriate n3 based on data getter public interface ProcessDataGetterN3 { - public List retrieveN3Required(int counter); + public List retrieveN3Required(int counter); public List retrieveN3Optional(int counter); public ListretrieveLiteralsOnForm(int counter); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3Utils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3Utils.java index 4e74d8589..2026ce7e9 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3Utils.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessDataGetterN3Utils.java @@ -33,7 +33,8 @@ public class ProcessDataGetterN3Utils { map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessSparqlDataGetterN3"); map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessClassGroupDataGetterN3"); map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.IndividualsForClassesDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessIndividualsForClassesDataGetterN3"); - + map.put("edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter", "edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils.ProcessFixedHTMLN3"); + return map; } @@ -57,13 +58,15 @@ public class ProcessDataGetterN3Utils { ProcessDataGetterN3 pn = null; try { Class clz = Class.forName(processorClass); - Constructor ct = clz.getConstructor(); - Class[] parameterTypes =ct.getParameterTypes(); - if(parameterTypes.length > 0 && parameterTypes[0].isAssignableFrom(jsonObject.getClass())) { - pn = (ProcessDataGetterN3) ct.newInstance(jsonObject); - } else { - pn = (ProcessDataGetterN3) ct.newInstance(); - } + Constructor[] ctList = clz.getConstructors(); + for (Constructor ct: ctList) { + Class[] parameterTypes =ct.getParameterTypes(); + if(parameterTypes.length > 0 && parameterTypes[0].isAssignableFrom(jsonObject.getClass())) { + pn = (ProcessDataGetterN3) ct.newInstance(jsonObject); + } else { + pn = (ProcessDataGetterN3) ct.newInstance(); + } + } } catch(Exception ex) { log.error("Error occurred instantiating " + processorClass, ex); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessFixedHTMLN3.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessFixedHTMLN3.java new file mode 100644 index 000000000..01d8a933f --- /dev/null +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessFixedHTMLN3.java @@ -0,0 +1,81 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils; + +import java.util.List; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +import com.hp.hpl.jena.rdf.model.Literal; + +import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; + +import net.sf.json.JSONObject; +import net.sf.json.JSONSerializer; +//Returns the appropriate n3 based on data getter +public class ProcessFixedHTMLN3 extends ProcessDataGetterAbstract { + private static String classType = "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter"; + + public ProcessFixedHTMLN3(){ + + } + //Pass in variable that represents the counter + + //TODO: ensure correct model returned + //We shouldn't use the ACTUAL values here but generate the n3 required + public List retrieveN3Required(int counter) { + String dataGetterVar = getDataGetterVar(counter); + String n3 = dataGetterVar + " a <" + classType + ">; \n" + + "display:saveToVar " + getN3VarName("saveToVar", counter) + "; \n" + + "display:htmlValue " + getN3VarName("htmlValue", counter) + " ."; + List requiredList = new ArrayList(); + requiredList.add(getPrefixes() + n3); + return requiredList; + + } + public List retrieveN3Optional(int counter) { + return null; + } + + + public List retrieveLiteralsOnForm(int counter) { + List literalsOnForm = new ArrayList(); + literalsOnForm.add(getVarName("saveToVar",counter)); + literalsOnForm.add(getVarName("htmlValue", counter)); + return literalsOnForm; + + } + + + public List retrieveUrisOnForm(int counter) { + List urisOnForm = new ArrayList(); + return urisOnForm; + + } + + public List retrieveFields(int counter) { + List fields = new ArrayList(); + + //fields.add(new FieldVTwo().setName(getVarName("dataGetter", counter))); + fields.add(new FieldVTwo().setName(getVarName("saveToVar", counter))); + fields.add(new FieldVTwo().setName(getVarName("htmlValue", counter))); + + return fields; + } + + public List getLiteralVarNamesBase() { + return Arrays.asList("saveToVar", "htmlValue"); + } + + //these are for the fields ON the form + public List getUriVarNamesBase() { + return Arrays.asList(); + } + + + +} + + diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessIndividualsForClassesDataGetterN3.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessIndividualsForClassesDataGetterN3.java index 1328fb773..463c7e7b5 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessIndividualsForClassesDataGetterN3.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/preprocessors/utils/ProcessIndividualsForClassesDataGetterN3.java @@ -36,12 +36,20 @@ public class ProcessIndividualsForClassesDataGetterN3 extends ProcessClassGroup //TODO: ensure correct model returned //We shouldn't use the ACTUAL values here but generate the n3 required public List retrieveN3Required(int counter) { - List classGroupN3 = super.retrieveN3Required(counter); + + List classGroupN3 = this.retrieveN3ForTypeAndClassGroup(counter); classGroupN3.addAll(this.addIndividualClassesN3(counter)); return classGroupN3; } + /* + @Override + public String getN3ForTypePartial(int counter) { + String dataGetterVar = getDataGetterVar(counter); + String n3 = dataGetterVar + " a <" + getClassType() + ">"; + return n3; + }*/ private List addIndividualClassesN3(int counter) { List classN3 = new ArrayList(); @@ -126,6 +134,11 @@ public class ProcessIndividualsForClassesDataGetterN3 extends ProcessClassGroup public List getUriVarNamesBase() { return Arrays.asList("classGroup", individualClassVarNameBase); } + + @Override + public String getClassType() { + return classType; + } } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/FixedHTMLDataGetter.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/FixedHTMLDataGetter.java new file mode 100644 index 000000000..afa3b2f6e --- /dev/null +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/FixedHTMLDataGetter.java @@ -0,0 +1,128 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ +package edu.cornell.mannlib.vitro.webapp.utils.dataGetter; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import com.hp.hpl.jena.query.Query; +import com.hp.hpl.jena.query.QueryExecution; +import com.hp.hpl.jena.query.QueryExecutionFactory; +import com.hp.hpl.jena.query.QueryFactory; +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.QuerySolutionMap; +import com.hp.hpl.jena.query.ResultSet; +import com.hp.hpl.jena.rdf.model.Literal; +import com.hp.hpl.jena.rdf.model.Model; +import com.hp.hpl.jena.rdf.model.RDFNode; +import com.hp.hpl.jena.rdf.model.Resource; +import com.hp.hpl.jena.rdf.model.ResourceFactory; +import com.hp.hpl.jena.shared.Lock; + +import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; +import edu.cornell.mannlib.vitro.webapp.dao.DisplayVocabulary; + +public class FixedHTMLDataGetter extends DataGetterBase implements DataGetter{ + String dataGetterURI; + String htmlValue; + String saveToVar; + VitroRequest vreq; + ServletContext context; + private final static String defaultTemplate = "menupage--defaultFixedHtml.ftl"; + + final static Log log = LogFactory.getLog(FixedHTMLDataGetter.class); + + /** + * Constructor with display model and data getter URI that will be called by reflection. + */ + public FixedHTMLDataGetter(VitroRequest vreq, Model displayModel, String dataGetterURI){ + this.configure(vreq, displayModel,dataGetterURI); + } + + @Override + public Map getData(Map pageData) { + Map rmap = new HashMap(); + rmap.put("variableName", this.saveToVar); + rmap.put(this.saveToVar, this.htmlValue); + //this is the default template set here - overridden by page level template if there is one + rmap.put("bodyTemplate", defaultTemplate); + return rmap; + } + + /** + * Configure this instance based on the URI and display model. + */ + protected void configure(VitroRequest vreq, Model displayModel, String dataGetterURI) { + if( vreq == null ) + throw new IllegalArgumentException("VitroRequest may not be null."); + if( displayModel == null ) + throw new IllegalArgumentException("Display Model may not be null."); + if( dataGetterURI == null ) + throw new IllegalArgumentException("PageUri may not be null."); + + this.vreq = vreq; + this.context = vreq.getSession().getServletContext(); + this.dataGetterURI = dataGetterURI; + + QuerySolutionMap initBindings = new QuerySolutionMap(); + initBindings.add("dataGetterURI", ResourceFactory.createResource(this.dataGetterURI)); + + int count = 0; + Query dataGetterConfigurationQuery = QueryFactory.create(dataGetterQuery) ; + displayModel.enterCriticalSection(Lock.READ); + try{ + QueryExecution qexec = QueryExecutionFactory.create( + dataGetterConfigurationQuery, displayModel, initBindings) ; + ResultSet res = qexec.execSelect(); + try{ + while( res.hasNext() ){ + count++; + QuerySolution soln = res.next(); + + // is NOT OPTIONAL + Literal value = soln.getLiteral("htmlValue"); + if( dataGetterConfigurationQuery == null ) + log.error("no html value defined for page " + this.dataGetterURI); + else + this.htmlValue = value.getLexicalForm(); + + + //saveToVar is OPTIONAL + Literal saveTo = soln.getLiteral("saveToVar"); + if( saveTo != null && saveTo.isLiteral() ){ + this.saveToVar = saveTo.asLiteral().getLexicalForm(); + }else{ + this.saveToVar = defaultVarNameForResults; + } + } + }finally{ qexec.close(); } + }finally{ displayModel.leaveCriticalSection(); } + } + + + + private static final String saveToVarPropertyURI= "<" + DisplayVocabulary.SAVE_TO_VAR+ ">"; + private static final String htmlValuePropertyURI= "<" + DisplayVocabulary.FIXED_HTML_VALUE+ ">"; + + public static final String defaultVarNameForResults = "results"; + + /** + * Query to get the definition of the SparqlDataGetter for a given URI. + */ + private static final String dataGetterQuery = + "PREFIX display: <" + DisplayVocabulary.DISPLAY_NS +"> \n" + + "SELECT ?saveToVar ?htmlValue WHERE { \n" + + " ?dataGetterURI "+saveToVarPropertyURI+" ?saveToVar . \n" + + " ?dataGetterURI "+htmlValuePropertyURI+" ?htmlValue . \n" + + "}"; + + +} diff --git a/webapp/web/WEB-INF/ontologies/app/menuload/displayTBOX.n3 b/webapp/web/WEB-INF/ontologies/app/menuload/displayTBOX.n3 index 5ba172b5a..656e1aad7 100644 --- a/webapp/web/WEB-INF/ontologies/app/menuload/displayTBOX.n3 +++ b/webapp/web/WEB-INF/ontologies/app/menuload/displayTBOX.n3 @@ -112,7 +112,10 @@ owl:versionInfo a owl:DatatypeProperty. - a owl:DatatypeProperty. + a owl:DatatypeProperty. + + + a owl:DatatypeProperty. ######### Object Properties######### ###Basic diff --git a/webapp/web/js/menupage/pageManagementUtils.js b/webapp/web/js/menupage/pageManagementUtils.js index f4a71a096..77a41e0ad 100644 --- a/webapp/web/js/menupage/pageManagementUtils.js +++ b/webapp/web/js/menupage/pageManagementUtils.js @@ -221,8 +221,8 @@ var pageManagementUtils = { pageManagementUtils.createPageContentForSubmission(); //return true; //For testing, not submitting anything - event.preventDefault(); - return false; + //event.preventDefault(); + return true; } else{ $('#error-alert').removeClass('hidden'); @@ -261,9 +261,9 @@ var pageManagementUtils = { //Clone the object, renaming ids and copying text area values as well $newContentObj = pageManagementUtils.createCloneObject(contentType, counter); - if ( contentType == "fixedHTML" || contentType == "sparqlQuery") { - varOrClass = $newContentObj.find('input#saveToVar').val(); - } + if ( contentType == "sparqlQuery" || contentType == "fixedHtml") { + varOrClass = $newContentObj.find('input[name="saveToVar"]').val(); + } else if ( contentType == "browseClassGroup" ) { $newContentObj.find('section#classesInSelectedGroup' + counter).removeClass('hidden'); varOrClass = $newContentObj.find('select#selectClassGroup' + counter + ' option:selected').text(); diff --git a/webapp/web/js/menupage/processClassGroupDataGetterContent.js b/webapp/web/js/menupage/processClassGroupDataGetterContent.js index 90c676b72..9462eedd0 100644 --- a/webapp/web/js/menupage/processClassGroupDataGetterContent.js +++ b/webapp/web/js/menupage/processClassGroupDataGetterContent.js @@ -12,7 +12,7 @@ var processClassGroupDataGetterContent = { processPageContentSection:function(pageContentSection) { //Will look at classes etc. var classGroup = pageContentSection.find("select[name='selectClassGroup']").val(); - //query model should also be an input + //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; } diff --git a/webapp/web/js/menupage/processFixedHTMLDataGetterContent.js b/webapp/web/js/menupage/processFixedHTMLDataGetterContent.js index 1f3735739..577a0e719 100644 --- a/webapp/web/js/menupage/processFixedHTMLDataGetterContent.js +++ b/webapp/web/js/menupage/processFixedHTMLDataGetterContent.js @@ -9,10 +9,10 @@ var processFixedHTMLDataGetterContent = { }, //requires variable and text area processPageContentSection:function(pageContentSection) { - var variableValue = pageContentSection.find("input[name='variable']").val(); - var queryValue = pageContentSection.find("textarea[name='textArea']").val(); + var saveToVarValue = pageContentSection.find("input[name='saveToVar']").val(); + var htmlValue = pageContentSection.find("textarea[name='htmlValue']").val(); //query model should also be an input - var returnObject = {saveToVar:variableValue, query:queryValue, dataGetterClass:this.dataGetterClass, queryModel:"vitro:contextDisplayModel"}; + var returnObject = {saveToVar:saveToVarValue, htmlValue:htmlValue, dataGetterClass:this.dataGetterClass}; return returnObject; } diff --git a/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js b/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js index fa9e3cb31..f2f654e68 100644 --- a/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js +++ b/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js @@ -12,6 +12,7 @@ var processIndividualsForClassesDataGetterContent = { //Get classes selected var classesSelected = []; pageContentSection.find("input[name='classInClassGroup']:checked").each(function(){ + //Need to make sure that the class is also saved as a URI classesSelected.push($(this).val()); }); var returnObject = {classGroup:classGroup, classesSelectedInClassGroup:classesSelected, dataGetterClass:this.dataGetterClass}; diff --git a/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl b/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl new file mode 100644 index 000000000..cc45a0bde --- /dev/null +++ b/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl @@ -0,0 +1,15 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#--Save to variable indicated in generator --> + +<#assign htmlExists = false/> +<#if variableName?has_content> + <#assign htmlExists = true /> + +<#if htmlExists> + ${variableName} +<#else> + No HTML specified. + + +