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.
This commit is contained in:
parent
b2dc8f0060
commit
9366d80151
5 changed files with 2 additions and 5 deletions
|
@ -252,7 +252,6 @@ SPARQL queries for existing values. --%>
|
||||||
List<Individual> authorships = infoResource.getRelatedIndividuals(predicateUri);
|
List<Individual> authorships = infoResource.getRelatedIndividuals(predicateUri);
|
||||||
|
|
||||||
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
||||||
JavaScript.UTILS.path(),
|
|
||||||
JavaScript.CUSTOM_FORM_UTILS.path(),
|
JavaScript.CUSTOM_FORM_UTILS.path(),
|
||||||
"/edit/forms/js/addAuthorsToInformationResource.js"
|
"/edit/forms/js/addAuthorsToInformationResource.js"
|
||||||
));
|
));
|
||||||
|
|
|
@ -169,7 +169,6 @@ PREFIX core: <${vivoCore}> SELECT ?individual WHERE {<${subjectUri}> core:hasPri
|
||||||
String subjectUri = vreq.getParameter("subjectUri");
|
String subjectUri = vreq.getParameter("subjectUri");
|
||||||
|
|
||||||
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
||||||
JavaScript.UTILS.path(),
|
|
||||||
JavaScript.CUSTOM_FORM_UTILS.path(),
|
JavaScript.CUSTOM_FORM_UTILS.path(),
|
||||||
"/edit/forms/js/customFormWithAdvanceTypeSelection.js"
|
"/edit/forms/js/customFormWithAdvanceTypeSelection.js"
|
||||||
));
|
));
|
||||||
|
|
|
@ -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.prepareForNonUpdate(model); // we're only adding new, not editing existing
|
||||||
editConfig.setEntityToReturnTo("?pubUri");
|
editConfig.setEntityToReturnTo("?pubUri");
|
||||||
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
||||||
JavaScript.UTILS.path(),
|
|
||||||
JavaScript.CUSTOM_FORM_UTILS.path(),
|
JavaScript.CUSTOM_FORM_UTILS.path(),
|
||||||
"/edit/forms/js/customFormWithAdvanceTypeSelection.js"
|
"/edit/forms/js/customFormWithAdvanceTypeSelection.js"
|
||||||
));
|
));
|
||||||
|
|
|
@ -12,7 +12,7 @@ var addAuthorForm = {
|
||||||
|
|
||||||
mixIn: function() {
|
mixIn: function() {
|
||||||
// Mix in the custom form utility methods
|
// 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
|
// Get the custom form data from the page
|
||||||
$.extend(this, customFormData);
|
$.extend(this, customFormData);
|
||||||
|
|
|
@ -12,7 +12,7 @@ var customForm = {
|
||||||
|
|
||||||
mixIn: function() {
|
mixIn: function() {
|
||||||
// Mix in the custom form utility methods
|
// 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
|
// Get the custom form data from the page
|
||||||
$.extend(this, customFormData);
|
$.extend(this, customFormData);
|
||||||
|
|
Loading…
Add table
Reference in a new issue