From 08932802fb60670b435114507c3c90c47744a57b Mon Sep 17 00:00:00 2001 From: rjy7 Date: Mon, 12 Jul 2010 16:44:29 +0000 Subject: [PATCH] NIHVIVO-763 Remove onfocus event from last name field of add authors form. Prevents user from going back and correcting his input. --- .../edit/forms/js/addAuthorsToInformationResource.js | 10 +--------- .../forms/js/customFormWithAdvanceTypeSelection.js | 9 +++++---- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/productMods/edit/forms/js/addAuthorsToInformationResource.js b/productMods/edit/forms/js/addAuthorsToInformationResource.js index e282dbe4..57c5aca6 100644 --- a/productMods/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/edit/forms/js/addAuthorsToInformationResource.js @@ -439,15 +439,7 @@ var addAuthorForm = { this.lastNameField.blur(function() { addAuthorForm.onLastNameChange(); }); - - // This is somewhat questionable. If we return to the last name - // field to look again for an existing person, we'd want to hide those - // fields. If we return to it to correct spelling of last name, say, - // we wouldn't. - this.lastNameField.focus(function() { - addAuthorForm.hideFieldsForNewPerson(); - }); - + // When hitting enter in last name field, if not an autocomplete // selection, show first and middle name fields. this.lastNameField.keydown(function(event) { diff --git a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js index 136be5f1..da3b6c31 100644 --- a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js +++ b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js @@ -40,7 +40,8 @@ var customForm = { // These are classed rather than id'd in case we want more than one autocomplete on a form. this.acSelector = this.form.find('.acSelector'); - this.acSelection = this.form.find('.acSelection'); + this.acSelection = this.form.find('.acSelection'); + this.acSelectionInfo = this.form.find('.acSelectionInfo'); this.acReceiver = this.form.find('.acReceiver'); }, @@ -190,9 +191,9 @@ var customForm = { // console.log("adding " + this.label + " to filtered results"); filteredResults.push(this); } -// else { -// console.log("filtering out " + this.label); -// } + else { + // console.log("filtering out " + this.label); + } }); return filteredResults; },