From 9366d80151a8b7517156544d04b167b51d6e57ec Mon Sep 17 00:00:00 2001 From: rjy7 Date: Mon, 12 Jul 2010 16:17:16 +0000 Subject: [PATCH] Using jQuery.extend to mix in customFormUtils methods, instead of borrowMethods in utils.js. Utils.js no longer needs to be loaded into the custom forms. --- productMods/edit/forms/addAuthorsToInformationResource.jsp | 1 - productMods/edit/forms/addGrantRoleToPerson.jsp | 1 - productMods/edit/forms/addPublicationToAuthor.jsp | 1 - productMods/edit/forms/js/addAuthorsToInformationResource.js | 2 +- productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js | 2 +- 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/productMods/edit/forms/addAuthorsToInformationResource.jsp b/productMods/edit/forms/addAuthorsToInformationResource.jsp index 9f55cc36..91bd3979 100644 --- a/productMods/edit/forms/addAuthorsToInformationResource.jsp +++ b/productMods/edit/forms/addAuthorsToInformationResource.jsp @@ -252,7 +252,6 @@ SPARQL queries for existing values. --%> List authorships = infoResource.getRelatedIndividuals(predicateUri); List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), - JavaScript.UTILS.path(), JavaScript.CUSTOM_FORM_UTILS.path(), "/edit/forms/js/addAuthorsToInformationResource.js" )); diff --git a/productMods/edit/forms/addGrantRoleToPerson.jsp b/productMods/edit/forms/addGrantRoleToPerson.jsp index 9b99dc06..f4d5a125 100644 --- a/productMods/edit/forms/addGrantRoleToPerson.jsp +++ b/productMods/edit/forms/addGrantRoleToPerson.jsp @@ -169,7 +169,6 @@ PREFIX core: <${vivoCore}> SELECT ?individual WHERE {<${subjectUri}> core:hasPri String subjectUri = vreq.getParameter("subjectUri"); List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), - JavaScript.UTILS.path(), JavaScript.CUSTOM_FORM_UTILS.path(), "/edit/forms/js/customFormWithAdvanceTypeSelection.js" )); diff --git a/productMods/edit/forms/addPublicationToAuthor.jsp b/productMods/edit/forms/addPublicationToAuthor.jsp index fc081abc..4c3ff7f3 100644 --- a/productMods/edit/forms/addPublicationToAuthor.jsp +++ b/productMods/edit/forms/addPublicationToAuthor.jsp @@ -191,7 +191,6 @@ PREFIX core: <${vivoCore}> SELECT ?individual WHERE {<${subjectUri}> core:author editConfig.prepareForNonUpdate(model); // we're only adding new, not editing existing editConfig.setEntityToReturnTo("?pubUri"); List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), - JavaScript.UTILS.path(), JavaScript.CUSTOM_FORM_UTILS.path(), "/edit/forms/js/customFormWithAdvanceTypeSelection.js" )); diff --git a/productMods/edit/forms/js/addAuthorsToInformationResource.js b/productMods/edit/forms/js/addAuthorsToInformationResource.js index 1343cc65..e282dbe4 100644 --- a/productMods/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/edit/forms/js/addAuthorsToInformationResource.js @@ -12,7 +12,7 @@ var addAuthorForm = { mixIn: function() { // Mix in the custom form utility methods - vitro.utils.borrowMethods(vitro.customFormUtils, this); + $.extend(this, vitro.customFormUtils); // Get the custom form data from the page $.extend(this, customFormData); diff --git a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js index d4c9b2f1..136be5f1 100644 --- a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js +++ b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js @@ -12,7 +12,7 @@ var customForm = { mixIn: function() { // Mix in the custom form utility methods - vitro.utils.borrowMethods(vitro.customFormUtils, this); + $.extend(this, vitro.customFormUtils); // Get the custom form data from the page $.extend(this, customFormData);