NIHVIVO-646 Initial setup for autocomplete field in authors form.
Fixed typos in TabFilteringTest class and getTabHierarchy method names.
This commit is contained in:
parent
1577753b83
commit
bd45d55237
2 changed files with 19 additions and 6 deletions
|
@ -36,6 +36,8 @@ core:authorInAuthorship (Person : Authorship) - inverse of linkedAuthor
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
||||||
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.JavaScript" %>
|
||||||
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
||||||
|
|
||||||
<%@ page import="org.apache.commons.logging.Log" %>
|
<%@ page import="org.apache.commons.logging.Log" %>
|
||||||
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
||||||
|
@ -243,14 +245,16 @@ SPARQL queries for existing values. --%>
|
||||||
vreq.setAttribute("infoResourceName", infoResource.getName());
|
vreq.setAttribute("infoResourceName", infoResource.getName());
|
||||||
|
|
||||||
String linkedAuthorProperty = "http://vivoweb.org/ontology/core#linkedAuthor";
|
String linkedAuthorProperty = "http://vivoweb.org/ontology/core#linkedAuthor";
|
||||||
|
|
||||||
List<String> customJs = new ArrayList<String>(Arrays.asList("/js/utils.js",
|
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
||||||
"/js/customFormUtils.js",
|
JavaScript.UTILS.path(),
|
||||||
|
JavaScript.CUSTOM_FORM_UTILS.path(),
|
||||||
"/edit/forms/js/addAuthorsToInformationResource.js"
|
"/edit/forms/js/addAuthorsToInformationResource.js"
|
||||||
));
|
));
|
||||||
request.setAttribute("customJs", customJs);
|
request.setAttribute("customJs", customJs);
|
||||||
|
|
||||||
List<String> customCss = new ArrayList<String>(Arrays.asList("/edit/forms/css/customForm.css",
|
List<String> customCss = new ArrayList<String>(Arrays.asList(Css.JQUERY_UI.path(),
|
||||||
|
Css.CUSTOM_FORM.path(),
|
||||||
"/edit/forms/css/addAuthorsToInformationResource.css"
|
"/edit/forms/css/addAuthorsToInformationResource.css"
|
||||||
));
|
));
|
||||||
request.setAttribute("customCss", customCss);
|
request.setAttribute("customCss", customCss);
|
||||||
|
|
|
@ -38,9 +38,7 @@ var addAuthorForm = {
|
||||||
},
|
},
|
||||||
|
|
||||||
initForm: function() {
|
initForm: function() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.showFormButton.click(function() {
|
this.showFormButton.click(function() {
|
||||||
addAuthorForm.showFormDiv.hide();
|
addAuthorForm.showFormDiv.hide();
|
||||||
addAuthorForm.form.show();
|
addAuthorForm.form.show();
|
||||||
|
@ -52,8 +50,19 @@ var addAuthorForm = {
|
||||||
addAuthorForm.showFormDiv.show();
|
addAuthorForm.showFormDiv.show();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//this.setUpAutocomplete();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// setUpAutocomplete: function() {
|
||||||
|
//
|
||||||
|
// var names = ["Adams", "Bell", "Smith", "Smile", "Smelt", "Younes", "Young"];
|
||||||
|
// $('#lastName').autocomplete({
|
||||||
|
// source: names
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
|
||||||
toggleRemoveLink: function() {
|
toggleRemoveLink: function() {
|
||||||
// when clicking remove: remove the author, and change link text to "undo"
|
// when clicking remove: remove the author, and change link text to "undo"
|
||||||
// when clicking undo: add the author back, and change link text to "remove"
|
// when clicking undo: add the author back, and change link text to "remove"
|
||||||
|
|
Loading…
Add table
Reference in a new issue