diff --git a/webapp/config/licenser/known_exceptions.txt b/webapp/config/licenser/known_exceptions.txt index 83df251b1..2551ba6f7 100644 --- a/webapp/config/licenser/known_exceptions.txt +++ b/webapp/config/licenser/known_exceptions.txt @@ -38,6 +38,7 @@ webapp/web/js/tiny_mce/**/* webapp/web/js/jquery.js webapp/web/js/jquery-ui/* webapp/web/js/jquery_plugins/* +webapp/web/js/jquery.fix.clone.js # See /doc/3rd-party-licenses.txt for LICENSE file webapp/web/dojo.js @@ -174,6 +175,9 @@ webapp/src/edu/cornell/mannlib/vitro/webapp/web/antisamy-vitro-1.4.4.xml # A kluge class derived from JarJar code. See /doc/3rd-party-licenses.txt for LICENSE file utilities/buildutils/src/com/tonicsystems/jarjar/KlugedDepFind.java +#Public Domain +webapp/web/js/json2.js + # Part of the OpenSocial integration - What license should apply here? webapp/src/edu/ucsf/vitro/opensocial/GadgetController.java webapp/src/edu/ucsf/vitro/opensocial/GadgetSpec.java 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 632f5afce..0030d7038 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 @@ -151,11 +151,13 @@ public class ManagePagePreprocessor extends JSONArray values = jsonObject.getJSONArray(literalLabel); literalValues = (List) JSONSerializer.toJava(values); } + String[] literalValuesSubmission = new String[literalValues.size()]; + literalValuesSubmission = literalValues.toArray(literalValuesSubmission); //This adds literal, connecting the field with submission.addLiteralToForm(editConfiguration, editConfiguration.getField(submissionLiteralName), submissionLiteralName, - (String[])literalValues.toArray()); + literalValuesSubmission); } for(String uriLabel:uriLabels) { 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 463c7e7b5..cd7f25b31 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 @@ -20,9 +20,9 @@ import net.sf.json.JSONSerializer; //Returns the appropriate n3 for selection of classes from within class group public class ProcessIndividualsForClassesDataGetterN3 extends ProcessClassGroupDataGetterN3 { private static String classType = "java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.IndividualsForClassesDataGetter"; - private JSONObject values = null; + protected JSONObject values = null; int classCount = 0; - private static String individualClassVarNameBase = "classesSelectedInClassGroup"; + protected static String individualClassVarNameBase = "classesSelectedInClassGroup"; public ProcessIndividualsForClassesDataGetterN3(JSONObject jsonObject){ this.values = jsonObject; if(values != null && values.containsKey(individualClassVarNameBase)) { @@ -43,15 +43,8 @@ public class ProcessIndividualsForClassesDataGetterN3 extends ProcessClassGroup } - /* - @Override - public String getN3ForTypePartial(int counter) { - String dataGetterVar = getDataGetterVar(counter); - String n3 = dataGetterVar + " a <" + getClassType() + ">"; - return n3; - }*/ - private List addIndividualClassesN3(int counter) { + protected List addIndividualClassesN3(int counter) { List classN3 = new ArrayList(); if(classCount > 0) { classN3.add(generateIndividualClassN3(counter)); @@ -59,7 +52,7 @@ public class ProcessIndividualsForClassesDataGetterN3 extends ProcessClassGroup return classN3; } - private String generateIndividualClassN3(int counter) { + protected String generateIndividualClassN3(int counter) { String dataGetterVar = getDataGetterVar(counter); String n3 = dataGetterVar + " <" + DisplayVocabulary.GETINDIVIDUALS_FOR_CLASS + "> "; //Consider a multi-valued field - in this case single field with multiple values diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java index 1d5c10a3d..b6c16a6ff 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/IndividualsForClassesDataGetter.java @@ -47,7 +47,8 @@ public class IndividualsForClassesDataGetter extends DataGetterBase implements D String dataGetterURI; String classGroupURI; Map classIntersectionsMap; - + private final static String defaultTemplate = "page-classgroup.ftl"; + /** * Constructor with display model and data getter URI that will be called by reflection. */ @@ -132,6 +133,8 @@ public class IndividualsForClassesDataGetter extends DataGetterBase implements D data.put("dataServiceUrlIndividualsByVClass", this.getDataServiceUrl()); //this is the class group associated with the data getter utilized for display on menu editing, not the custom one created data.put("classGroupUri",this.classGroupURI); + //default template, overridden at page level if specified in display model + data.put("bodyTemplate", defaultTemplate); } catch(Exception ex) { log.error("An error occurred retrieving Vclass Intersection individuals", ex); } diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/SparqlQueryDataGetter.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/SparqlQueryDataGetter.java index ebfe75890..058de06aa 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/SparqlQueryDataGetter.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/SparqlQueryDataGetter.java @@ -37,9 +37,11 @@ public class SparqlQueryDataGetter extends DataGetterBase implements DataGetter{ String modelURI; VitroRequest vreq; ServletContext context; - + final static Log log = LogFactory.getLog(SparqlQueryDataGetter.class); + //default template + private final static String defaultTemplate = "menupage--defaultSparql.ftl"; /** * Constructor with display model and data getter URI that will be called by reflection. @@ -134,7 +136,9 @@ public class SparqlQueryDataGetter extends DataGetterBase implements DataGetter{ //put results in page data, what key to use for results? Map rmap = new HashMap(); - rmap.put(this.saveToVar, results); + rmap.put(this.saveToVar, results); + //This will be overridden at page level in display model if template specified there + rmap.put("bodyTemplate", defaultTemplate); return rmap; } diff --git a/webapp/web/css/menupage/pageList.css b/webapp/web/css/menupage/pageList.css index 7b124d062..a5e32fb5e 100644 --- a/webapp/web/css/menupage/pageList.css +++ b/webapp/web/css/menupage/pageList.css @@ -1,3 +1,5 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + .menuFlag { width:67px; height:18px; diff --git a/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js b/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js index f2f654e68..290ca11b3 100644 --- a/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js +++ b/webapp/web/js/menupage/processIndividualsForClassesDataGetterContent.js @@ -1,3 +1,5 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + var processIndividualsForClassesDataGetterContent = { dataGetterClass:null, //can use this if expect to initialize from elsewhere diff --git a/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl b/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl index cc45a0bde..d44ca480e 100644 --- a/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl +++ b/webapp/web/templates/freemarker/body/menupage/menupage--defaultFixedHtml.ftl @@ -7,7 +7,7 @@ <#assign htmlExists = true /> <#if htmlExists> - ${variableName} + ${.globals[variableName]} <#else> No HTML specified.