From 24e7f9ef6d5942a2647880cdbc85af020a5b191b Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Wed, 6 Jun 2012 18:41:27 +0000 Subject: [PATCH] updates for page management - for internal class content type. --- .../processInternalClassDataGetterContent.js | 10 +++++----- ...ageManagement--browseClassGroupsScripts.ftl | 5 +++++ .../forms/pageManagement--customDataScript.ftl | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 productMods/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl create mode 100644 productMods/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl diff --git a/productMods/js/menupage/processInternalClassDataGetterContent.js b/productMods/js/menupage/processInternalClassDataGetterContent.js index 17cdf132..a6196b93 100644 --- a/productMods/js/menupage/processInternalClassDataGetterContent.js +++ b/productMods/js/menupage/processInternalClassDataGetterContent.js @@ -1,6 +1,6 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ -var processIndividualsForClassesDataGetterContent = { +var processInternalClassDataGetterContent = { dataGetterClass:null, //can use this if expect to initialize from elsewhere initProcessor:function(dataGetterClassInput) { @@ -15,13 +15,13 @@ var processIndividualsForClassesDataGetterContent = { classesSelected.push($(this).val()); }); //If internal class selected, include here - var isInternal:false; + var isInternal=false; //if this checkbox is checked, then isInternal should be true pageContentSection.find("input[name='display-internalClass']:checked").each(function() { - isInternal:true; + isInternal=true; }); - var returnObject = {classGroup:classGroup, - classesSelectedInClassGroup:classesSelected, + //Not returning class group although could if need be.. + var returnObject = { classesSelectedInClassGroup:classesSelected, isInternal:isInternal, dataGetterClass:this.dataGetterClass}; return returnObject; diff --git a/productMods/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl b/productMods/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl new file mode 100644 index 00000000..51b361c1 --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/pageManagement--browseClassGroupsScripts.ftl @@ -0,0 +1,5 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#-- Scripts for class group browsing --> +<#--Replaces Vitro's processing for individuals for classes with VIVO's processing internal classes--> +${scripts.add('')} +${scripts.add('')} diff --git a/productMods/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl b/productMods/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl new file mode 100644 index 00000000..3159c07d --- /dev/null +++ b/productMods/templates/freemarker/edit/forms/pageManagement--customDataScript.ftl @@ -0,0 +1,18 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#--Sets up script for custom form data. Including here instead of as separate javascript +file to ensure this script is always loaded first. Can also make sure placed first in +scripts list.--> + +<#--Overwrites original in Vitro by including internalClass as the data getter instead of individuals for classes--> + + \ No newline at end of file